feige
2024-02-21 c1cff08cdbcee3278c1ac8d8a3a067e3bf015202
ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -477,10 +477,13 @@
   },
   fileUpload(){
   //   var file = params.file;
      var formData = new FormData();
      this.$refs.upload1.submit();
      // formData.append('uploadFile', file);
   //   if(this.uploadFileList1.length==0)
      if(this.uploadFileList1.length==0){
           this.$modal.msgSuccess("文档上传列表不能为空!");
           return}
      
      this.uploadFileList1.forEach((elem)=>{
         formData.append("files", elem)
@@ -491,39 +494,23 @@
      this.uploading = true;
      uploadPic(formData).then(response => {
      //   let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
      //   _this.uploading = false;
      //   // this.$modal.msgSuccess("上传成功");
      //   if(_this.fot.includes(pth) === true)
      //   {
      //     _this.fileList.push({name:response.data.fileName, "url":response.data.url})
      //   }
      //   else{
      //     _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
      //     let ul = _this.fileList.map(function (elem){
      //       return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      //     }).join(",")
      //     let uls = _this.fileListOther.map(function (elem){
      //       return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      //     }).join(",")
      //     _this.formData.url = ul+","+uls
      //     console.log(_this.formData.url)
      _this.uploadFileList1 = []
        _this.formData.url = _this.formData.url+","+response.fileNames
          updateFamilyevent(_this.formData).then(response => {
            this.$modal.msgSuccess("文档上传成功");
            // this.open = false;
          });
        })
   },
   picUpload()
   {
      var formData = new FormData();
      this.$refs.upload.submit();
   if(this.uploadFileList.length==0){
        this.$modal.msgSuccess("图像上传列表不能为空!");
        return}
      this.uploadFileList.forEach((elem)=>{
         formData.append("files", elem)
@@ -553,7 +540,7 @@
      //console.log(_this.fileList)
   //   alert(response.fileNames)
          _this.formData.url = _this.formData.url+","+response.fileNames
      _this.uploadFileList = []
         // alert(87)
          updateFamilyevent(_this.formData).then(response => {
            _this.$modal.msgSuccess("图片上传成功");