feige
2024-04-17 39c0ad120acd120b62cb69dc92b6fe63e8edf902
ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -225,6 +225,7 @@
      fileListOther:[
      ],
      fileListOther1:[],
      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      dsb:true,
@@ -334,6 +335,42 @@
  },
  mounted() {},
  methods: {
    getData(){
          const id = this.$route.params && this.$route.params.id;
          let _this = this
          if (id) {
            this.loading = true;
            getFamilyeventInfo(id).then((response) => {
              // console.log(response,'666666666')
              this.formData = response.data;
              let paths = this.formData.url.split(",");
              for(let i = 0; i < paths.length; i++)
              {
                if(paths[i]!="") {
                  let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
          //   alert(pth)
                  if (_this.fot.includes(pth) === true)
             {
              console.log()
               }
                  else {
                    let nms = paths[i].split("\/")
                    let nm = nms[nms.length - 1]
               if(paths[i][0]=="/")
                    _this.fileListOther1.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                else
                _this.fileListOther1.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
             }
                }
              }
              _this.fileListOther = _this.fileListOther1
              this.loading = false;
            });
          }
    },
    submitForm() {
      // let ul = this.fileList.map(function (elem){
@@ -500,7 +537,7 @@
      this.fileList.push({name:file.name,url:file.url,res:true})
    },
   //自定义上传方法
   handleChange1(file, fileListOther1) {
   handleChange1(file, fileListOther12) {
          //定义一个全局数组uploadFileList来做存储
        // this.uploadFileList.push(file.raw);
@@ -536,6 +573,8 @@
          updateFamilyevent(_this.formData).then(response => {
            this.$modal.msgSuccess("文档上传成功");
            // this.open = false;
          this.getData()
          this.fileListOther1=[]
          });
        })