feige
2024-03-05 4d3ebe187b31d7b9b1827a4e006749deddfc38ae
修改了个人模块的图片上传等问题
16个文件已修改
2858 ■■■■ 已修改文件
ruoyi-ui/src/api/healthy/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/honor/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/selfeconomy/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/wish/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/Examination.vue 211 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/ExaminationInfo.vue 315 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/healthYear.vue 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/healthyInfo.vue 350 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/healthy/index.vue 213 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/honor/honorInfo.vue 355 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/honor/index.vue 223 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/selfeconomy/index.vue 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/selfeconomy/memo.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue 311 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/wish/index.vue 215 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/wish/wishInfo.vue 334 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/healthy/index.js
@@ -98,7 +98,7 @@
//上传文件
export function uploadPic(data) {
  return request({
    url: '/common/upload',
    url: '/common/uploads',
    method: 'post',
    data: data
  })
ruoyi-ui/src/api/honor/index.js
@@ -54,7 +54,7 @@
//上传文件
export function uploadPic(data) {
  return request({
    url: '/common/upload',
    url: '/common/uploads',
    method: 'post',
    data: data
  })
ruoyi-ui/src/api/selfeconomy/index.js
@@ -49,7 +49,7 @@
//上传文件
export function uploadPic(data) {
  return request({
    url: '/common/upload',
    url: '/common/uploads',
    method: 'post',
    data: data
  })
ruoyi-ui/src/api/wish/index.js
@@ -48,7 +48,7 @@
//上传文件
export function uploadPic(data) {
  return request({
    url: '/common/upload',
    url: '/common/uploads',
    method: 'post',
    data: data
  })
ruoyi-ui/src/views/healthy/Examination.vue
@@ -189,8 +189,14 @@
          action="#"
          list-type="picture-card"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          :on-change="handleChange"
          :auto-upload="false"
              ref="upload"
        >
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
@@ -223,23 +229,75 @@
          </div>
        </el-upload>
        <el-button
                 style="margin-left: 10px"
                 size="small"
                 type="success"
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
          :file-list="fileListOther"
          class="upload-demo"
          multiple
          :on-remove="handleRemoveFile"
          :http-request="requestUpload"
          :show-file-list="true"
          multiple
              ref="upload1"
          :on-change="handleChange1"
          :auto-upload="false"
          list-type="picture-card"
            :http-request="requestUpload1"
        >
          <el-button type="primary">点击上传</el-button>
          <template #tip>
            <div class="el-upload__tip">
            </div>
          </template>
        </el-upload>
        <i slot="default" class="el-icon-plus"></i>
                <div slot="file" slot-scope="{file}">
                  <!-- 添加video元素用于显示视频 -->
                  <video
                    v-if="file.url.includes('.mp4')"
                    class="el-upload-list__item-thumbnail"
                    :src="file.url"
                    style="width: 147px; height: 147px"
                    fit="cover"
                  ></video>
                  <img v-else
                       class="el-upload-list__item-thumbnail"
                       :src="file.url"
                       alt=""
                       style="width: 100%; height: 100%"
                       fit="cover"></img>
                  <span class="el-upload-list__item-actions">
                       <span class="el-upload-list__item-name">{{ file.name }}</span>
                            <span
                              class="el-upload-list__item-preview"
                              @click="handleFileCardPreview(file)"
                            >
                              <i class="el-icon-zoom-in"></i>
                            </span>
                            <span
                              class="el-upload-list__item-delete"
                              @click="handleRemoveFile(file)"
                            >
                              <i class="el-icon-delete"></i>
                            </span>
                      </span>
                </div>
              </el-upload>
             <el-button
                          style="margin-left: 10px"
                          size="small"
                          type="success"
                          @click="fileUpload"
                        >上传到服务器</el-button>
      </el-form>
      <h4 class="form-header"> </h4>
@@ -308,14 +366,17 @@
      
      fileList:[
      ],
      fileListOther:[ ],
      fileList1:[],
            uploadFileList: [],
              uploadFileList1: [],
      fileListOther:[],
      dsb:true,
      btn:false,
      formDat: {
        happenTime: undefined,
        report: undefined,
        url: undefined,
        url: '',
      },
      // 菜单列表
      menuOptions: [],
@@ -405,14 +466,20 @@
    },
    handleRemove(file) {
      for (let i = 0; i < this.fileList.length; i++) {
        if (this.fileList[i].url == file.url)
          this.$delete(this.fileList, i);
        if(this.fileList[i].url==file.url)
        {
          this.$delete(this.fileList,i);
                 this.$delete(this.uploadFileList,i);
                 }
      }
    },
    handleRemoveFile(file) {
      for (let i = 0; i < this.fileListOther.length; i++) {
        if (this.fileListOther[i].url == file.url)
          this.$delete(this.fileListOther, i);
        if(this.fileListOther[i].url==file.url)
        {
          this.$delete(this.fileListOther,i);
          this.$delete(this.uploadFileList1,i);
          }
      }
    },
@@ -502,13 +569,13 @@
    /** 提交按钮(数据权限) */
    submitDataScope: function () {
      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.formDat.url = ul + "," + uls
      // 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.formDat.url = ul + "," + uls
      this.$refs["elForm"].validate(valid => {
        if (valid) {
          addExamination(this.formDat).then(response => {
@@ -532,25 +599,89 @@
      });
    },
    handleChange(file, fileList1) {
       //定义一个全局数组uploadFileList来做存储
     // this.uploadFileList.push(file.raw);
      console.log("=========5555=========")
      console.log(file)
    //  console.log(this.uploadFileList)
    //  this.fileList = fileList
    //alert(file)
        this.uploadFileList.push(file.raw);
         this.fileList.push({name:file.name,url:file.url})
    //alert(fileList1.length)
    },
    handleChange1(file, fileOtherList1) {
       //定义一个全局数组uploadFileList来做存储
    this.uploadFileList1.push(file.raw);
     this.fileListOther.push({name:file.name,url:file.url})
     // this.uploadFileList.push(file.raw);
      console.log("=========5555=========")
      //console.log(file)
    //  console.log(this.uploadFileList)
    //  this.fileList = fileList
    },
    fileUpload(){
    //    var file = params.file;
        var formData = new FormData();
        this.$refs.upload1.submit();
        // formData.append('uploadFile', file);
        if(this.uploadFileList1.length==0){
              this.$modal.msgSuccess("文档上传列表不能为空!");
              return
        }
        this.uploadFileList1.forEach((elem)=>{
            formData.append("files", elem)
        })
        let _this = this
        this.uploading = true;
        uploadPic(formData).then(response => {
        _this.uploadFileList1 = []
        _this.formDat.url = _this.formDat.url+","+response.fileNames
        _this.$modal.msgSuccess("文件上传成功!");
          })
    },
    picUpload()
    {
        var formData = new FormData();
        //alert(976)
        //this.$refs.upload.submit();
        //alert(8)
        //alert(this.uploadFileList.length)
    if(this.uploadFileList.length==0){
          this.$modal.msgSuccess("图片上传列表不能为空!");
          return}
    //console.log(this.uploadFileList)
        this.uploadFileList.forEach((elem)=>{
            formData.append("files", elem)
        })
        //alert(90)
        let _this = this
        //alert(9)
        uploadPic(formData).then(response => {
        //    alert("dds")
          _this.formDat.url = _this.formDat.url+","+response.fileNames
          _this.uploadFileList = []
          _this.$modal.msgSuccess("图片上传成功");
      });
    },
    requestUpload(params) {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length - 4, response.data.originalFilename.length)
        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})
        }
      })
//alert(98)
 //    this.uploadFileList.push(params.file);
    },
    requestUpload1(params)
    {
        //     this.uploadFileList1.push(params.file);
    },
    /** 删除按钮操作 */
    /** 删除按钮操作 */
    handleDelete(row) {
      const Ids = row.id || this.ids;
ruoyi-ui/src/views/healthy/ExaminationInfo.vue
@@ -31,10 +31,16 @@
        multiple
        :http-request="requestUpload"
        :file-list="fileList"
        ref="upload"
        show-file-list="true"
             :on-change="handleChange"
              :auto-upload="false"
        :disabled="!btn"
        :class="{ hide: !btn }"
      >
        <div v-if="uploading" class="upload-status">正在上传...</div>
        <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
        <div slot="file" slot-scope="{file}">
          <img
@@ -72,7 +78,13 @@
        </div>
      </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="picUpload"
                >上传到服务器</el-button>
      <h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
@@ -81,13 +93,16 @@
        multiple
        list-type="picture-card"
        :on-preview="handleFileCardPreview"
        :on-remove="handleRemoveFile"
        :http-request="requestUpload"
        :show-file-list="true"
        :on-remove="handleRemoveFile"
        :http-request="requestUpload1"
        :on-change="handleChange1"
        :auto-upload="false"
        :disabled="!btn"
        :class="{ hide: !btn }"
      >
        <div v-if="uploading" class="upload-status">正在上传...</div>
        <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
        <div slot="file" slot-scope="{file}">
          <!-- 添加video元素用于显示视频 -->
@@ -133,7 +148,14 @@
      </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="fileUpload"
                >上传到服务器</el-button>
                      <h4 class="form-header"> </h4>
      <el-form-item size="large">
        <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
      </el-form-item>
@@ -165,8 +187,11 @@
      
      fileList:[
      ],
      fileList1:[],
      uploadFileList:[],
      uploadFileList1:[],
      fileListOther:[
      ],
      dsb:true,
      btn:false,
@@ -183,7 +208,7 @@
        isPrivate:undefined,
        location:undefined,
        remark: undefined,
        url: undefined,
        url: '',
      },
      dialogImageUrl: '',
      dialogVisible: false,
@@ -245,18 +270,28 @@
        for(let i = 0; i < paths.length; i++)
        {
          if(paths[i]!="") {
            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
            if (_this.fot.includes(pth) === true)
              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
            else {
              // alert(paths[i])
              let nms = paths[i].split("\/")
              let nm = nms[nms.length - 1]
              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
              let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
          //    alert(pth)
              if (_this.fot.includes(pth) === true)
              {
                  if(paths[i][0]=="/")
                _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                else
                   _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
                }
              else {
                // alert(paths[i])
               // alert()
                let nms = paths[i].split("\/")
                let nm = nms[nms.length - 1]
                if(paths[i][0]=="/")
                _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                  else
                  _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
              }
            }
          }
        }
        this.loading = false;
      });
@@ -326,18 +361,83 @@
      })
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
      //判读是否是之前的图片
        let res = false
        for(let i = 0; i < this.fileListOther.length; i++)
        {
          if(this.fileListOther[i].url==file.url)
          {
              if(this.fileListOther[i].res==false)
                  res = true
              else
              {
                  this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
              }
            this.$delete(this.fileListOther,i);
          }
        }
        let ul = ""
        this.fileList.map(function (elem){
                if(elem.res==false)
                    ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
                    uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
      //  alert(this.formData.url)
        if(res==true){
            updateExamination(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
              // this.open = false;
            });
        }
    },
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
     //判断是否是之前的图片
       let res = false
     //  alert(this.fileList.length)
       for(let i = 0; i < this.fileList.length; i++)
       {
         if(this.fileList[i].url==file.url)
         {
             //原来图像标记为false
             //alert(this.fileList[i].res)
           if(this.fileList[i].res==false)
             res = true
           else
           {
             //  alert(this.uploadFileList.length)
             //  alert(87)
              this.$delete(this.uploadFileList, Math.abs(i - this.uploadFileList.length-1))
                  //      alert(this.uploadFileList.length)
              }
           this.$delete(this.fileList,i);
       }
       }
       let ul = ""
       this.fileList.map(function (elem){
         if(elem.res==false)
             ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
       })
       let uls = ""
       this.fileListOther.map(function (elem){
         if(elem.res==false)
             uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
       })
       this.formData.url = ul+","+uls;
       if(res==true){
           updateExamination(this.formData).then(response => {
             this.$modal.msgSuccess("删除成功");
           });
       }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
@@ -375,44 +475,125 @@
      this.btn = true
      this.isShow=false
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      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)
        // alert(87)
         updateExamination(_this.formData).then(response => {
           _this.$modal.msgSuccess("图片上传成功");
           // this.open = false;
         });
      })
    },
  //自定义上传方法
      handleChange(file, fileList1) {
         //定义一个全局数组uploadFileList来做存储
       // this.uploadFileList.push(file.raw);
        console.log("=========5555=========")
        this.uploadFileList.push(file.raw);
         this.fileList.push({name:file.name,url:file.url,res:true})
      },
      //自定义上传方法
      handleChange1(file, fileListOther1) {
             //定义一个全局数组uploadFileList来做存储
           // this.uploadFileList.push(file.raw);
           this.uploadFileList1.push(file.raw);
            this.fileListOther.push({name:file.name,url:file.url,res:true})
            console.log("=========5555=========")
            //console.log(file)
          //  console.log(this.uploadFileList)
          //  this.fileList = fileList
      },
      fileUpload(){
      //    var file = params.file;
          var formData = new FormData();
          //this.$refs.upload1.submit();
      //    alert(this.uploadFileList1.length)
          // formData.append('uploadFile', file);
          if(this.uploadFileList1.length==0){
                this.$modal.msgSuccess("文档上传列表不能为空!");
                return}
          this.uploadFileList1.forEach((elem)=>{
              formData.append("files", elem)
          })
          console.log(this.uploadFileList1)
          let _this = this
          this.uploading = true;
          uploadPic(formData).then(response => {
          _this.uploadFileList1 = []
            _this.formData.url = _this.formData.url+","+response.fileNames
              updateExamination(_this.formData).then(response => {
                this.$modal.msgSuccess("文档上传成功");
                // this.open = false;
              });
            })
      },
      picUpload()
      {
          var formData = new FormData();
          //this.$refs.upload.submit();
          //alert(this.uploadFileList.length)
      if(this.uploadFileList.length==0){
            this.$modal.msgSuccess("图像上传列表不能为空!");
            return}
          this.uploadFileList.forEach((elem)=>{
              formData.append("files", elem)
          })
          let _this = this
          uploadPic(formData).then(response => {
              // console.log(response.originalFilenames)
              // console.log(response.urls)
              // console.log(response.fileNames)
              //         console.log(response.newFileNames)
          // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
          // _this.uploading1= false;
          // console.log(_this.fot.includes(pth))
          // // debugger
          // if(_this.fot.includes(pth) === true)
          // {
          //   _this.fileList.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(",")
          //console.log(_this.fileList)
      //    alert(response.fileNames)
            _this.formData.url = _this.formData.url+","+response.fileNames
          _this.uploadFileList = []
           // alert(87)
            updateExamination(_this.formData).then(response => {
              _this.$modal.msgSuccess("图片上传成功");
              // this.open = false;
            });
          // }
          // else{
          //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
          // }
        });
      },
       requestUpload(params)
      {
     //  alert(124)
  //     this.uploadFileList.push(params.file);
       //alert(34)
      },
      requestUpload1(params)
      {
      //    alert(123)
     // this.uploadFileList1.push(params.file);
    //  console.log("-----------")
      //console.log(this.uploadFileList1)
      },
  }
}
ruoyi-ui/src/views/healthy/healthYear.vue
@@ -597,12 +597,12 @@
               v-loading="loading" :data="HealthNoteList" >
        <el-button size='mini' type="text" class="btn_edit" @click="saveData" style='top: 0px;right: 20px;'>
          <sapn v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></sapn>
          <span >{{ editMode ? '保存' : '修改' }}</span>
          <span >{{ editMode ? this.bstn='保存' : this.bstn='修改' }}</span>
        </el-button>
        <el-tab-pane label="生活习惯" name="lifeHabits" >
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.lifeHabits"  ></el-input>
              <el-input  v-model="HealthNoteList.lifeHabits"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
@@ -610,35 +610,91 @@
          </template>
        </el-tab-pane>
        <el-tab-pane label="以往病史" name="historyDisease">
          {{HealthNoteList.historyDisease}}}
            <template v-if="editMode">
              <div style="padding-top: 10px">
                <el-input  v-model="HealthNoteList.historyDisease"  type="textarea"  ></el-input>
              </div>
            </template>
            <template v-else>
          {{HealthNoteList.historyDisease}}
                      </template>
        </el-tab-pane>
        <el-tab-pane label="治疗信息" name="treatmentInfo">
          <!-- 治疗信息的内容 -->
          {{HealthNoteList.treatmentInfo}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.treatmentInfo"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.treatmentInfo}}
          </template>
        </el-tab-pane>
        <el-tab-pane label="家族病史" name="familyDisease">
          <!-- 家族病史的内容 -->
          {{HealthNoteList.familyDisease}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.familyDisease"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.familyDisease}}
          </template>
        </el-tab-pane>
        <el-tab-pane label="现病史" name="nowDisease">
          <!-- 目前病情的内容 -->
          {{HealthNoteList.nowDisease}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.nowDisease"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.nowDisease}}
          </template>
        </el-tab-pane>
        <el-tab-pane label="疾病发生" name="diseaseHappen">
          <!-- 疾病发生的内容 -->
          {{HealthNoteList.diseaseHappen}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.diseaseHappen"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.diseaseHappen}}
          </template>
        </el-tab-pane>
        <el-tab-pane label="疾病发展" name="diseaseDevelop">
          <!-- 疾病发展的内容 -->
          {{HealthNoteList.diseaseDevelop}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.diseaseDevelop"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.diseaseDevelop}}
          </template>
        </el-tab-pane>
        <el-tab-pane label="疾病治疗" name="diseaseTreat">
          <!-- 疾病治疗的内容 -->
          {{HealthNoteList.diseaseTreat}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.diseaseTreat"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.diseaseTreat}}
          </template>
        </el-tab-pane>
        <el-tab-pane label="疾病复发" name="diseaseBack">
          <!-- 疾病复发的内容 -->
          {{HealthNoteList.diseaseBack}}}
          <template v-if="editMode">
            <div style="padding-top: 10px">
              <el-input  v-model="HealthNoteList.diseaseBack"  type="textarea"  ></el-input>
            </div>
          </template>
          <template v-else>
          {{HealthNoteList.diseaseBack}}
          </template>
        </el-tab-pane>
      </el-tabs>
    </div>
@@ -701,6 +757,7 @@
      ids: [],
      // 非单个禁用
      single: true,
      bstn: '修改',
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
@@ -988,12 +1045,27 @@
  methods: {
    saveData() {
      // 将数据发送给后端
      const data = {
        lifeHabits: this.HealthNoteList.lifeHabits,
        historyDisease: this.HealthNoteList.historyDisease,
        // 其他字段省略,请补充完整
      };
     // alert(this.bstn)
      this.editMode= true
      if(this.bstn=="保存")
      {
          const data = {
            lifeHabits: this.HealthNoteList.lifeHabits,
            historyDisease: this.HealthNoteList.historyDisease,
            treatmentInfo: this.HealthNoteList.treatmentInfo,
            familyDisease:this.HealthNoteList.familyDisease,
            nowDisease: this.HealthNoteList.nowDisease,// 现病史
            diseaseHappen: this.HealthNoteList.diseaseHappen,// 疾病的发生
            diseaseDevelop: this.HealthNoteList.diseaseDevelop,// 疾病的发展
            diseaseTreat: this.HealthNoteList.diseaseTreat,// 疾病的治疗
            diseaseBack: this.HealthNoteList.diseaseBack// 疾病的转归
            // 其他字段省略,请补充完整
          };
          updateHealthNote(data).then(response=>{
                 this.$modal.msgSuccess("修改成功!");
          })
          this.editMode = false
        }
    },
    //血型修改
ruoyi-ui/src/views/healthy/healthyInfo.vue
@@ -49,10 +49,15 @@
        multiple
        :http-request="requestUpload"
        :file-list="fileList"
        ref="upload"
        :show-file-list="true"
        :on-change="handleChange"
        :auto-upload="false"
        :disabled="!btn"
        :class="{ hide: !btn }"
      >
        <div v-if="uploading" class="upload-status">正在上传...</div>
        <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
        <div slot="file" slot-scope="{file}">
          <img
@@ -90,7 +95,13 @@
        </div>
      </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="picUpload"
                >上传到服务器</el-button>
      <h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
@@ -102,10 +113,14 @@
        :on-remove="handleRemoveFile"
        :http-request="requestUpload1"
        :show-file-list="true"
        ref="upload1"
        :on-change="handleChange1"
        :auto-upload="false"
        :disabled="!btn"
        :class="{ hide: !btn }"
      >
        <div v-if="uploading" class="upload-status">正在上传...</div>
        <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
        <div slot="file" slot-scope="{file}">
          <!-- 添加video元素用于显示视频 -->
@@ -151,7 +166,14 @@
      </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="fileUpload"
                >上传到服务器</el-button>
                      <h4 class="form-header"> </h4>
      <el-form-item size="large">
        <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
      </el-form-item>
@@ -183,8 +205,11 @@
      fileList:[
      ],
      fileList1:[],
      uploadFileList:[],
      uploadFileList1:[],
      fileListOther:[
      ],
      dsb:true,
      btn:false,
@@ -201,7 +226,7 @@
        isPrivate:undefined,
        location:undefined,
        remark: undefined,
        url: undefined,
        url: "",
      },
      dialogImageUrl: '',
      dialogVisible: false,
@@ -273,18 +298,28 @@
        for(let i = 0; i < paths.length; i++)
        {
          if(paths[i]!="") {
            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
            if (_this.fot.includes(pth) === true)
              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
            else {
              // alert(paths[i])
              let nms = paths[i].split("\/")
              let nm = nms[nms.length - 1]
              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
              let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
          //    alert(pth)
              if (_this.fot.includes(pth) === true)
              {
                  if(paths[i][0]=="/")
                _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                else
                   _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
                }
              else {
                // alert(paths[i])
               // alert()
                let nms = paths[i].split("\/")
                let nm = nms[nms.length - 1]
                if(paths[i][0]=="/")
                _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                  else
                  _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
              }
            }
          }
        }
        this.loading = false;
      });
@@ -354,18 +389,82 @@
      })
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
      //判读是否是之前的图片
        let res = false
        for(let i = 0; i < this.fileListOther.length; i++)
        {
          if(this.fileListOther[i].url==file.url)
          {
              if(this.fileListOther[i].res==false)
                  res = true
              else
              {
                  this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
              }
            this.$delete(this.fileListOther,i);
          }
        }
        let ul = ""
        this.fileList.map(function (elem){
                if(elem.res==false)
                    ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
                    uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
      //  alert(this.formData.url)
        if(res==true){
            updateHealth(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
              // this.open = false;
            });
        }
    },
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
      //判断是否是之前的图片
        let res = false
      //  alert(this.fileList.length)
        for(let i = 0; i < this.fileList.length; i++)
        {
          if(this.fileList[i].url==file.url)
          {
              //原来图像标记为false
              //alert(this.fileList[i].res)
            if(this.fileList[i].res==false)
              res = true
            else
            {
              //  alert(this.uploadFileList.length)
              //  alert(87)
               this.$delete(this.uploadFileList, Math.abs(i - this.uploadFileList.length-1))
                   //      alert(this.uploadFileList.length)
               }
            this.$delete(this.fileList,i);
        }
        }
        let ul = ""
        this.fileList.map(function (elem){
          if(elem.res==false)
              ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
              uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
        if(res==true){
            updateHealth(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
            });
        }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
@@ -413,88 +512,125 @@
      this.btn = true
      this.isShow=false
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      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)
    //自定义上传方法
        handleChange(file, fileList1) {
           //定义一个全局数组uploadFileList来做存储
         // this.uploadFileList.push(file.raw);
          console.log("=========5555=========")
          this.uploadFileList.push(file.raw);
           this.fileList.push({name:file.name,url:file.url,res:true})
        },
        //自定义上传方法
        handleChange1(file, fileListOther1) {
               //定义一个全局数组uploadFileList来做存储
             // this.uploadFileList.push(file.raw);
             this.uploadFileList1.push(file.raw);
              this.fileListOther.push({name:file.name,url:file.url,res:true})
              console.log("=========5555=========")
              //console.log(file)
            //  console.log(this.uploadFileList)
            //  this.fileList = fileList
        },
        fileUpload(){
        //    var file = params.file;
            var formData = new FormData();
            //this.$refs.upload1.submit();
        //    alert(this.uploadFileList1.length)
            // formData.append('uploadFile', file);
            if(this.uploadFileList1.length==0){
                  this.$modal.msgSuccess("文档上传列表不能为空!");
                  return}
            this.uploadFileList1.forEach((elem)=>{
                formData.append("files", elem)
            })
            console.log(this.uploadFileList1)
            let _this = this
            this.uploading = true;
            uploadPic(formData).then(response => {
            _this.uploadFileList1 = []
              _this.formData.url = _this.formData.url+","+response.fileNames
                updateHealth(_this.formData).then(response => {
                  this.$modal.msgSuccess("文档上传成功");
                  // this.open = false;
                });
              })
        },
        picUpload()
        {
            var formData = new FormData();
            //this.$refs.upload.submit();
            //alert(this.uploadFileList.length)
        if(this.uploadFileList.length==0){
              this.$modal.msgSuccess("图像上传列表不能为空!");
              return}
            this.uploadFileList.forEach((elem)=>{
                formData.append("files", elem)
            })
            let _this = this
            uploadPic(formData).then(response => {
                // console.log(response.originalFilenames)
                // console.log(response.urls)
                // console.log(response.fileNames)
                //         console.log(response.newFileNames)
            // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
            // _this.uploading1= false;
            // console.log(_this.fot.includes(pth))
            // // debugger
            // if(_this.fot.includes(pth) === true)
            // {
            //   _this.fileList.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(",")
            //console.log(_this.fileList)
        //    alert(response.fileNames)
              _this.formData.url = _this.formData.url+","+response.fileNames
            _this.uploadFileList = []
             // alert(87)
              updateHealth(_this.formData).then(response => {
                _this.$modal.msgSuccess("图片上传成功");
                // this.open = false;
              });
            // }
            // else{
            //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
            // }
          });
        },
         requestUpload(params)
        {
          _this.fileList.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
              // _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
               alert(_this.formData.url)
               alert(12)
               updateHealth(_this.formData).then(response => {
                 this.$modal.msgSuccess("修改成功");
                 // this.open = false;
                 this.btn=false
               });
        }
        else{
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
    },  requestUpload1(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      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)
       //  alert(124)
    //     this.uploadFileList.push(params.file);
         //alert(34)
        },
        requestUpload1(params)
        {
          _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
              // _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
               console.log(_this.formData.url)
               updateHealth(_this.formData).then(response => {
                 this.$modal.msgSuccess("修改成功");
                 // this.open = false;
                 this.btn=false
               });
        }
      })
    },
        //    alert(123)
       // this.uploadFileList1.push(params.file);
      //  console.log("-----------")
        //console.log(this.uploadFileList1)
        },
  }
}
ruoyi-ui/src/views/healthy/index.vue
@@ -234,9 +234,13 @@
        <el-upload
          action="#"
          list-type="picture-card"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          :on-change="handleChange"
          :auto-upload="false"
              ref="upload"
        >
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
@@ -269,6 +273,13 @@
          </div>
        </el-upload>
        <el-button
                 style="margin-left: 10px"
                 size="small"
                 type="success"
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
@@ -277,15 +288,61 @@
          multiple
          :on-remove="handleRemoveFile"
          :http-request="requestUpload"
          :show-file-list="true"
              ref="upload1"
          :on-change="handleChange1"
          :auto-upload="false"
          list-type="picture-card"
            :http-request="requestUpload1"
        >
          <el-button type="primary">点击上传</el-button>
          <template #tip>
            <div class="el-upload__tip">
            </div>
          </template>
        </el-upload>
      <i slot="default" class="el-icon-plus"></i>
              <div slot="file" slot-scope="{file}">
                <!-- 添加video元素用于显示视频 -->
                <video
                  v-if="file.url.includes('.mp4')"
                  class="el-upload-list__item-thumbnail"
                  :src="file.url"
                  style="width: 147px; height: 147px"
                  fit="cover"
                ></video>
                <img v-else
                     class="el-upload-list__item-thumbnail"
                     :src="file.url"
                     alt=""
                     style="width: 100%; height: 100%"
                     fit="cover"></img>
                <span class="el-upload-list__item-actions">
                     <span class="el-upload-list__item-name">{{ file.name }}</span>
                          <span
                            class="el-upload-list__item-preview"
                            @click="handleFileCardPreview(file)"
                          >
                            <i class="el-icon-zoom-in"></i>
                          </span>
                          <span
                            class="el-upload-list__item-delete"
                            @click="handleRemoveFile(file)"
                          >
                            <i class="el-icon-delete"></i>
                          </span>
                    </span>
              </div>
            </el-upload>
           <el-button
                        style="margin-left: 10px"
                        size="small"
                        type="success"
                        @click="fileUpload"
                      >上传到服务器</el-button>
      </el-form>
      <h4 class="form-header"> </h4>
@@ -354,7 +411,10 @@
      fileList:[
      ],
      fileListOther:[ ],
      fileList1:[],
      uploadFileList: [],
      uploadFileList1: [],
      fileListOther:[],
      dsb:true,
      btn:false,
      formDat: {
@@ -364,7 +424,7 @@
        usePeople: undefined,
        kind:undefined,
        remark: undefined,
        url: undefined,
        url: "",
      },
      // 菜单列表
      menuOptions: [],
@@ -474,14 +534,20 @@
    },
    handleRemove(file) {
      for (let i = 0; i < this.fileList.length; i++) {
        if (this.fileList[i].url == file.url)
          this.$delete(this.fileList, i);
        if(this.fileList[i].url==file.url)
        {
          this.$delete(this.fileList,i);
                 this.$delete(this.uploadFileList,i);
                 }
      }
    },
    handleRemoveFile(file) {
      for (let i = 0; i < this.fileListOther.length; i++) {
        if (this.fileListOther[i].url == file.url)
          this.$delete(this.fileListOther, i);
        if(this.fileListOther[i].url==file.url)
        {
          this.$delete(this.fileListOther,i);
          this.$delete(this.uploadFileList1,i);
          }
      }
    },
@@ -571,13 +637,13 @@
    /** 提交按钮(数据权限) */
    submitDataScope: function () {
      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.formDat.url = ul + "," + uls
      // 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.formDat.url = ul + "," + uls
      this.$refs["elForm"].validate(valid => {
        if (valid) {
          addHealth(this.formDat).then(response => {
@@ -601,25 +667,88 @@
      });
    },
    requestUpload(params) {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length - 4, response.data.originalFilename.length)
        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})
        }
      })
    },
    handleChange(file, fileList1) {
           //定义一个全局数组uploadFileList来做存储
         // this.uploadFileList.push(file.raw);
          console.log("=========5555=========")
          console.log(file)
        //  console.log(this.uploadFileList)
        //  this.fileList = fileList
        //alert(file)
            this.uploadFileList.push(file.raw);
             this.fileList.push({name:file.name,url:file.url})
        //alert(fileList1.length)
        },
        handleChange1(file, fileOtherList1) {
           //定义一个全局数组uploadFileList来做存储
        this.uploadFileList1.push(file.raw);
         this.fileListOther.push({name:file.name,url:file.url})
         // this.uploadFileList.push(file.raw);
          console.log("=========5555=========")
          //console.log(file)
        //  console.log(this.uploadFileList)
        //  this.fileList = fileList
        },
        fileUpload(){
        //    var file = params.file;
            var formData = new FormData();
            this.$refs.upload1.submit();
            // formData.append('uploadFile', file);
            if(this.uploadFileList1.length==0){
                  this.$modal.msgSuccess("文档上传列表不能为空!");
                  return
            }
            this.uploadFileList1.forEach((elem)=>{
                formData.append("files", elem)
            })
            let _this = this
            this.uploading = true;
            uploadPic(formData).then(response => {
            _this.uploadFileList1 = []
            _this.formDat.url = _this.formDat.url+","+response.fileNames
            _this.$modal.msgSuccess("文件上传成功!");
              })
        },
        picUpload()
        {
            var formData = new FormData();
            //alert(976)
            //this.$refs.upload.submit();
            //alert(8)
            //alert(this.uploadFileList.length)
        if(this.uploadFileList.length==0){
              this.$modal.msgSuccess("图片上传列表不能为空!");
              return}
        //console.log(this.uploadFileList)
            this.uploadFileList.forEach((elem)=>{
                formData.append("files", elem)
            })
            //alert(90)
            let _this = this
            //alert(9)
            uploadPic(formData).then(response => {
            //    alert("dds")
              _this.formDat.url = _this.formDat.url+","+response.fileNames
              _this.uploadFileList = []
              _this.$modal.msgSuccess("图片上传成功");
          });
        },
        requestUpload(params) {
    //alert(98)
     //    this.uploadFileList.push(params.file);
        },
        requestUpload1(params)
        {
            //     this.uploadFileList1.push(params.file);
        },
    /** 删除按钮操作 */
    handleDelete(row) {
      const Ids = row.id || this.ids;
ruoyi-ui/src/views/honor/honorInfo.vue
@@ -92,12 +92,15 @@
          accept="image/jpeg, image/png,image/jpg, image/WMF,image/gif"
          list-type="picture-card"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          :show-file-list="true"
          :http-request="requestUpload"
                 :file-list="fileList"
               :on-change="handleChange"
                :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
          <div v-if="uploading" class="upload-status">正在上传...</div>
          <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
@@ -133,7 +136,13 @@
      </span>
          </div>
        </el-upload>
 <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="picUpload"
                >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
@@ -145,6 +154,11 @@
          :on-remove="handleRemoveFile"
          :http-request="requestUpload1"
          :show-file-list="true"
          ref="upload1"
                  :on-change="handleChange1"
                          :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
@@ -194,7 +208,15 @@
        </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="fileUpload"
                >上传到服务器</el-button>
                <h4 class="form-header"> </h4>
        <el-form-item size="large">
          <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
        </el-form-item>
@@ -227,7 +249,14 @@
       '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      fileList:[],
      fileListOther:[],
      fileList1:[],
      uploadFileList:[],
      uploadFileList1:[],
      fileListOther:[
      ],
      dsb:true,
      btn:false,
      isShow:true,
@@ -249,7 +278,7 @@
        getDate:undefined,
        location:undefined,
        remark:undefined,
        url: undefined,
        url: '',
      },
      desurl:'',
      dialogImageUrl: '',
@@ -352,18 +381,28 @@
        for(let i = 0; i < paths.length; i++)
        {
          if(paths[i]!="") {
            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
            if (_this.fot.includes(pth) === true)
              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
            else {
            // alert(paths[i])
            let nms = paths[i].split("\/")
            let nm = nms[nms.length - 1]
            _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
              let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
          //    alert(pth)
              if (_this.fot.includes(pth) === true)
              {
                  if(paths[i][0]=="/")
                _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                else
                   _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
                }
              else {
                // alert(paths[i])
               // alert()
                let nms = paths[i].split("\/")
                let nm = nms[nms.length - 1]
                if(paths[i][0]=="/")
                _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                  else
                  _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
              }
            }
          }
        }
        this.loading = false;
      });
@@ -386,7 +425,7 @@
  methods: {
    // 获取数据方法
    fetchData(id) {
      const url = 'http://47.93.189.255:8080/zHonor/id=${id}'; // 接口 URL'/zHonor/id='+query
      const url = 'https://47.93.189.255:8080/zHonor/id=${id}'; // 接口 URL'/zHonor/id='+query
      fetch(url)
        .then(response => response.json())
        .then(data => {
@@ -497,42 +536,83 @@
      })
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
        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(",")
      //判读是否是之前的图片
        let res = false
        for(let i = 0; i < this.fileListOther.length; i++)
        {
          if(this.fileListOther[i].url==file.url)
          {
              if(this.fileListOther[i].res==false)
                  res = true
              else
              {
                  this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
              }
            this.$delete(this.fileListOther,i);
          }
        }
        let ul = ""
        this.fileList.map(function (elem){
                if(elem.res==false)
                    ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
                    uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
        updateHonor(this.formData).then(response => {
          this.$modal.msgSuccess("删除成功");
          // this.open = false;
          // this.btn=false
        });
      }
      //  alert(this.formData.url)
        if(res==true){
            updateHonor(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
              // this.open = false;
            });
        }
    },
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
        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(",")
      //判断是否是之前的图片
        let res = false
      //  alert(this.fileList.length)
        for(let i = 0; i < this.fileList.length; i++)
        {
          if(this.fileList[i].url==file.url)
          {
              //原来图像标记为false
              //alert(this.fileList[i].res)
            if(this.fileList[i].res==false)
              res = true
            else
            {
              //  alert(this.uploadFileList.length)
              //  alert(87)
               this.$delete(this.uploadFileList, Math.abs(i - this.uploadFileList.length-1))
                   //      alert(this.uploadFileList.length)
               }
            this.$delete(this.fileList,i);
        }
        }
        let ul = ""
        this.fileList.map(function (elem){
          if(elem.res==false)
              ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
              uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
        updateHonor(this.formData).then(response => {
          this.$modal.msgSuccess("删除成功");
          // this.open = false;
          // this.btn=false
        });
      }
        if(res==true){
            updateHonor(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
            });
        }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
@@ -567,74 +647,123 @@
      this.btn = true
      this.isShow=false
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading = true;
//自定义上传方法
    handleChange(file, fileList1) {
       //定义一个全局数组uploadFileList来做存储
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading = false;
        if(_this.fot.includes(pth) === true)
        {
          _this.fileList.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)
          updateHonor(this.formData).then(response => {
            this.$modal.msgSuccess("图片上传成功");
     // this.uploadFileList.push(file.raw);
      console.log("=========5555=========")
      this.uploadFileList.push(file.raw);
       this.fileList.push({name:file.name,url:file.url,res:true})
    },
    //自定义上传方法
    handleChange1(file, fileListOther1) {
           //定义一个全局数组uploadFileList来做存储
         // this.uploadFileList.push(file.raw);
         this.uploadFileList1.push(file.raw);
          this.fileListOther.push({name:file.name,url:file.url,res:true})
          console.log("=========5555=========")
          //console.log(file)
        //  console.log(this.uploadFileList)
        //  this.fileList = fileList
    },
    fileUpload(){
    //    var file = params.file;
        var formData = new FormData();
        //this.$refs.upload1.submit();
    //    alert(this.uploadFileList1.length)
        // formData.append('uploadFile', file);
        if(this.uploadFileList1.length==0){
              this.$modal.msgSuccess("文档上传列表不能为空!");
              return}
        this.uploadFileList1.forEach((elem)=>{
            formData.append("files", elem)
        })
        console.log(this.uploadFileList1)
        let _this = this
        this.uploading = true;
        uploadPic(formData).then(response => {
        _this.uploadFileList1 = []
          _this.formData.url = _this.formData.url+","+response.fileNames
            updateHonor(_this.formData).then(response => {
              this.$modal.msgSuccess("文档上传成功");
              // this.open = false;
            });
          })
    },
    picUpload()
    {
        var formData = new FormData();
        //this.$refs.upload.submit();
        //alert(this.uploadFileList.length)
    if(this.uploadFileList.length==0){
          this.$modal.msgSuccess("图像上传列表不能为空!");
          return}
        this.uploadFileList.forEach((elem)=>{
            formData.append("files", elem)
        })
        let _this = this
        uploadPic(formData).then(response => {
            // console.log(response.originalFilenames)
            // console.log(response.urls)
            // console.log(response.fileNames)
            //         console.log(response.newFileNames)
        // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        // _this.uploading1= false;
        // console.log(_this.fot.includes(pth))
        // // debugger
        // if(_this.fot.includes(pth) === true)
        // {
        //   _this.fileList.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(",")
        //console.log(_this.fileList)
    //    alert(response.fileNames)
          _this.formData.url = _this.formData.url+","+response.fileNames
        _this.uploadFileList = []
         // alert(87)
          updateHonor(_this.formData).then(response => {
            _this.$modal.msgSuccess("图片上传成功");
            // this.open = false;
            // this.btn=false
          });
        }
        else{
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
          });
        // }
        // else{
        //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        // }
      });
    },
     requestUpload(params)
    {
   //  alert(124)
//     this.uploadFileList.push(params.file);
     //alert(34)
    },
    requestUpload1(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading1 = true;
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading1 = 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)
          updateHonor(this.formData).then(response => {
            this.$modal.msgSuccess("文档上传成功");
            // this.open = false;
            // this.btn=false
          });
        }
      })
    //    alert(123)
   // this.uploadFileList1.push(params.file);
  //  console.log("-----------")
    //console.log(this.uploadFileList1)
    },
  }
ruoyi-ui/src/views/honor/index.vue
@@ -260,6 +260,11 @@
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          :on-change="handleChange"
          :auto-upload="false"
              ref="upload"
        >
         <i  slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{ file }">
@@ -293,6 +298,13 @@
          </div>
        </el-upload>
        <el-button
                 style="margin-left: 10px"
                 size="small"
                 type="success"
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
@@ -301,20 +313,61 @@
          multiple
          :on-remove="handleRemoveFile"
          :http-request="requestUpload1"
          :show-file-list="true"
          ref="upload1"
          :on-change="handleChange1"
          :auto-upload="false"
          list-type="picture-card"
            :http-request="requestUpload1"
            :show-file-list="true"
        >
          <el-button type="primary">点击上传</el-button>
          <div v-if="uploading1" class="upload-status">正在上传...</div>
          <template #tip>
            <div class="el-upload__tip">
            </div>
          </template>
  <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <!-- 添加video元素用于显示视频 -->
            <video
              v-if="file.url.includes('.mp4')"
              class="el-upload-list__item-thumbnail"
              :src="file.url"
              style="width: 147px; height: 147px"
              fit="cover"
            ></video>
            <img v-else
                 class="el-upload-list__item-thumbnail"
                 :src="file.url"
                 alt=""
                 style="width: 100%; height: 100%"
                 fit="cover"></img>
            <span class="el-upload-list__item-actions">
                 <span class="el-upload-list__item-name">{{ file.name }}</span>
                      <span
                        class="el-upload-list__item-preview"
                        @click="handleFileCardPreview(file)"
                      >
                        <i class="el-icon-zoom-in"></i>
                      </span>
                      <span
                        class="el-upload-list__item-delete"
                        @click="handleRemoveFile(file)"
                      >
                        <i class="el-icon-delete"></i>
                      </span>
                </span>
          </div>
        </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  @click="fileUpload"
                >上传到服务器</el-button>
      </el-form>
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
@@ -378,6 +431,9 @@
      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      fileList:[],
      fileList1:[],
      uploadFileList: [],
              uploadFileList1: [],
      fileListOther:[],
      dsb:true,
      btn:false,
@@ -396,7 +452,7 @@
        getDate:undefined,
        location:undefined,
        remark:undefined,
        url: undefined,
        url: '',
      },
      // 菜单列表
@@ -585,15 +641,21 @@
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
       if(this.fileList[i].url==file.url)
       {
         this.$delete(this.fileList,i);
                this.$delete(this.uploadFileList,i);
                }
      }
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      if(this.fileListOther[i].url==file.url)
      {
        this.$delete(this.fileListOther,i);
        this.$delete(this.uploadFileList1,i);
        }
      }
    },
    // 取消按钮
@@ -694,13 +756,13 @@
    submitDataScope: function() {
      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.formDat.url = ul+","+uls
      // 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.formDat.url = ul+","+uls
      this.$refs["elForm"].validate(valid => {
        if (valid) {
@@ -723,40 +785,89 @@
        }
      });
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      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})
        }
      })
    },
    requestUpload1(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading1 = true;
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading1 = false;
        this.$modal.msgSuccess("上传成功");
        if(_this.fot.includes(pth) !== true)
        {
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
    },
   handleChange(file, fileList1) {
          //定义一个全局数组uploadFileList来做存储
        // this.uploadFileList.push(file.raw);
         console.log("=========5555=========")
         console.log(file)
       //  console.log(this.uploadFileList)
       //  this.fileList = fileList
       //alert(file)
           this.uploadFileList.push(file.raw);
            this.fileList.push({name:file.name,url:file.url})
       //alert(fileList1.length)
       },
       handleChange1(file, fileOtherList1) {
          //定义一个全局数组uploadFileList来做存储
       this.uploadFileList1.push(file.raw);
        this.fileListOther.push({name:file.name,url:file.url})
        // this.uploadFileList.push(file.raw);
         console.log("=========5555=========")
         //console.log(file)
       //  console.log(this.uploadFileList)
       //  this.fileList = fileList
       },
       fileUpload(){
       //    var file = params.file;
           var formData = new FormData();
           this.$refs.upload1.submit();
           // formData.append('uploadFile', file);
           if(this.uploadFileList1.length==0){
                 this.$modal.msgSuccess("文档上传列表不能为空!");
                 return
           }
           this.uploadFileList1.forEach((elem)=>{
               formData.append("files", elem)
           })
           let _this = this
           this.uploading = true;
           uploadPic(formData).then(response => {
           _this.uploadFileList1 = []
           _this.formDat.url = _this.formDat.url+","+response.fileNames
           _this.$modal.msgSuccess("文件上传成功!");
             })
       },
       picUpload()
       {
           var formData = new FormData();
           //alert(976)
           //this.$refs.upload.submit();
           //alert(8)
           //alert(this.uploadFileList.length)
       if(this.uploadFileList.length==0){
             this.$modal.msgSuccess("图片上传列表不能为空!");
             return}
       //console.log(this.uploadFileList)
           this.uploadFileList.forEach((elem)=>{
               formData.append("files", elem)
           })
           //alert(90)
           let _this = this
           //alert(9)
           uploadPic(formData).then(response => {
           //    alert("dds")
             _this.formDat.url = _this.formDat.url+","+response.fileNames
             _this.uploadFileList = []
             _this.$modal.msgSuccess("图片上传成功");
         });
       },
       requestUpload(params) {
   //alert(98)
    //    this.uploadFileList.push(params.file);
       },
       requestUpload1(params)
       {
           //     this.uploadFileList1.push(params.file);
       },
       /** 删除按钮操作 */
    /** 删除按钮操作 */
    handleDelete(row) {
      const Ids = row.id || this.ids;
ruoyi-ui/src/views/selfeconomy/index.vue
@@ -293,8 +293,11 @@
            action="#"
            list-type="picture-card"
            multiple
            :http-request="requestUpload"
            :file-list="fileList"
          :http-request="requestUpload"
          :file-list="fileList"
          :on-change="handleChange"
          :auto-upload="false"
              ref="upload"
          >
            <i  slot="default" class="el-icon-plus"></i>
            <div slot="file" slot-scope="{file}">
@@ -326,6 +329,13 @@
            </div>
          </el-upload>
          <el-button
                   style="margin-left: 10px"
                   size="small"
                   type="success"
                   @click="picUpload"
                 >上传到服务器</el-button>
          <h4 class="form-header">其他附件 </h4>
          <el-upload
            action=""
@@ -334,19 +344,68 @@
            multiple
            :on-remove="handleRemoveFile"
            :http-request="requestUpload"
            :show-file-list="true"
            ref="upload1"
            :on-change="handleChange1"
            :auto-upload="false"
            list-type="picture-card"
              :http-request="requestUpload1"
              :show-file-list="true"
          >
            <el-button type="primary">点击上传</el-button>
            <div v-if="uploading" class="upload-status">正在上传...</div>
            <template #tip>
              <div class="el-upload__tip">
              </div>
            </template>
         <i slot="default" class="el-icon-plus"></i>
                 <div slot="file" slot-scope="{file}">
                   <!-- 添加video元素用于显示视频 -->
                   <video
                     v-if="file.url.includes('.mp4')"
                     class="el-upload-list__item-thumbnail"
                     :src="file.url"
                     style="width: 147px; height: 147px"
                     fit="cover"
                   ></video>
                   <img v-else
                        class="el-upload-list__item-thumbnail"
                        :src="file.url"
                        alt=""
                        style="width: 100%; height: 100%"
                        fit="cover"></img>
                   <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-name">{{ file.name }}</span>
                             <span
                               class="el-upload-list__item-preview"
                               @click="handleFileCardPreview(file)"
                             >
                               <i class="el-icon-zoom-in"></i>
                             </span>
                             <span
                               class="el-upload-list__item-delete"
                               @click="handleRemoveFile(file)"
                             >
                               <i class="el-icon-delete"></i>
                             </span>
                       </span>
                 </div>
               </el-upload>
          </el-upload>
        </el-form>
        <h4 class="form-header"> </h4>
        <el-button
                          style="margin-left: 10px"
                          size="small"
                          type="success"
                          @click="fileUpload"
                        >上传到服务器</el-button>
         </el-form>
         <h4 class="form-header"> </h4>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="submitDataScope">保 存</el-button>
@@ -414,9 +473,10 @@
        fileList:[
        ],
        fileListOther:[
        ],
        fileList1:[],
              uploadFileList: [],
                uploadFileList1: [],
        fileListOther:[],
        dsb:true,
        btn:false,
        fit:['fill'],
@@ -434,7 +494,7 @@
          propertyRight:undefined,
          location:undefined,
          remark:undefined,
          url: undefined,
          url: "",
        },
        // 菜单列表
@@ -589,14 +649,20 @@
        for(let i = 0; i < this.fileList.length; i++)
        {
          if(this.fileList[i].url==file.url)
          {
            this.$delete(this.fileList,i);
                   this.$delete(this.uploadFileList,i);
                   }
        }
      },
      handleRemoveFile(file) {
        for(let i = 0; i < this.fileListOther.length; i++)
        {
          if(this.fileListOther[i].url==file.url)
          {
            this.$delete(this.fileListOther,i);
            this.$delete(this.uploadFileList1,i);
            }
        }
      },
      // 取消按钮
@@ -692,13 +758,13 @@
      /** 提交按钮(数据权限) */
      submitDataScope: function() {
        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.formDat.url = ul+","+uls
        // 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.formDat.url = ul+","+uls
        this.$refs["elForm"].validate(valid => {
          if (valid) {
@@ -721,30 +787,88 @@
          this.handleRemoveFile(this.fileListOther[0]);
        }
      },
      requestUpload(params)
      {
        var file = params.file;
        var formData = new FormData();
        formData.append('uploadFile', file);
        let _this = this
        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})
          }
        })
      },
    handleChange(file, fileList1) {
           //定义一个全局数组uploadFileList来做存储
         // this.uploadFileList.push(file.raw);
          console.log("=========5555=========")
          console.log(file)
        //  console.log(this.uploadFileList)
        //  this.fileList = fileList
        //alert(file)
            this.uploadFileList.push(file.raw);
             this.fileList.push({name:file.name,url:file.url})
        //alert(fileList1.length)
        },
        handleChange1(file, fileOtherList1) {
           //定义一个全局数组uploadFileList来做存储
        this.uploadFileList1.push(file.raw);
         this.fileListOther.push({name:file.name,url:file.url})
         // this.uploadFileList.push(file.raw);
          console.log("=========5555=========")
          //console.log(file)
        //  console.log(this.uploadFileList)
        //  this.fileList = fileList
        },
        fileUpload(){
        //    var file = params.file;
            var formData = new FormData();
            this.$refs.upload1.submit();
            // formData.append('uploadFile', file);
            if(this.uploadFileList1.length==0){
                  this.$modal.msgSuccess("文档上传列表不能为空!");
                  return
            }
            this.uploadFileList1.forEach((elem)=>{
                formData.append("files", elem)
            })
            let _this = this
            this.uploading = true;
            uploadPic(formData).then(response => {
            _this.uploadFileList1 = []
            _this.formDat.url = _this.formDat.url+","+response.fileNames
            _this.$modal.msgSuccess("文件上传成功!");
              })
        },
        picUpload()
        {
            var formData = new FormData();
            //alert(976)
            //this.$refs.upload.submit();
            //alert(8)
            //alert(this.uploadFileList.length)
        if(this.uploadFileList.length==0){
              this.$modal.msgSuccess("图片上传列表不能为空!");
              return}
        //console.log(this.uploadFileList)
            this.uploadFileList.forEach((elem)=>{
                formData.append("files", elem)
            })
            //alert(90)
            let _this = this
            //alert(9)
            uploadPic(formData).then(response => {
            //    alert("dds")
              _this.formDat.url = _this.formDat.url+","+response.fileNames
              _this.uploadFileList = []
              _this.$modal.msgSuccess("图片上传成功");
          });
        },
        requestUpload(params) {
    //alert(98)
     //    this.uploadFileList.push(params.file);
        },
        requestUpload1(params)
        {
            //     this.uploadFileList1.push(params.file);
        },
      /** 删除按钮操作 */
      handleDelete(row) {
        const Ids = row.id || this.ids;
ruoyi-ui/src/views/selfeconomy/memo.vue
@@ -198,6 +198,9 @@
    // 取消按钮
    cancelData() {
      this.open = false;
      Object.keys(this.formDat).forEach(key => {
        this.formDat[key] = '';
      });
      this.reset();
    },
    editAutobiography(row) {
ruoyi-ui/src/views/selfeconomy/selfeconomyInfo.vue
@@ -93,8 +93,14 @@
          action="#"
          list-type="picture-card"
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          ref="upload"
                          :show-file-list="true"
          :http-request="requestUpload"
                 :file-list="fileList"
               :on-change="handleChange"
                :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
@@ -136,6 +142,13 @@
          </div>
        </el-upload>
        <el-button
                 style="margin-left: 10px"
                 size="small"
                 type="success"
                          v-if="btn"
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
@@ -145,8 +158,12 @@
          list-type="picture-card"
          :on-preview="handleFileCardPreview"
          :on-remove="handleRemoveFile"
          :http-request="requestUpload"
          :show-file-list="true"
          ref="upload1"
               :http-request="requestUpload1"
                  :on-change="handleChange1"
                          :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
@@ -196,7 +213,14 @@
        </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="fileUpload"
                >上传到服务器</el-button>
                <h4 class="form-header"> </h4>
        <el-form-item size="large">
          <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb" >修改</el-button>
        </el-form-item>
@@ -231,8 +255,11 @@
     
      fileList:[
      ],
      fileList1:[],
      uploadFileList:[],
      uploadFileList1:[],
      fileListOther:[
      ],
      dsb:true,
      btn:false,
@@ -252,7 +279,7 @@
        propertyRight:undefined,
        location:undefined,
        remark:undefined,
        url: undefined,
        url: '',
      },
      dialogImageUrl: '',
      dialogVisible: false,
@@ -357,18 +384,28 @@
        for(let i = 0; i < paths.length; i++)
        {
          if(paths[i]!="") {
            let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
            if (_this.fot.includes(pth) === true)
              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
            else {
              // alert(paths[i])
              let nms = paths[i].split("\/")
              let nm = nms[nms.length - 1]
              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
              let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
          //    alert(pth)
              if (_this.fot.includes(pth) === true)
              {
                  if(paths[i][0]=="/")
                _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                else
                   _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
                }
              else {
                // alert(paths[i])
               // alert()
                let nms = paths[i].split("\/")
                let nm = nms[nms.length - 1]
                if(paths[i][0]=="/")
                _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
                  else
                  _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
              }
            }
          }
        }
        this.loading = false;
      });
@@ -436,18 +473,82 @@
      })
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
      //判读是否是之前的图片
        let res = false
        for(let i = 0; i < this.fileListOther.length; i++)
        {
          if(this.fileListOther[i].url==file.url)
          {
              if(this.fileListOther[i].res==false)
                  res = true
              else
              {
                  this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
              }
            this.$delete(this.fileListOther,i);
          }
        }
        let ul = ""
        this.fileList.map(function (elem){
                if(elem.res==false)
                    ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
                    uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
      //  alert(this.formData.url)
        if(res==true){
            updateSelfEconomy(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
              // this.open = false;
            });
        }
    },
    handleRemove(file) {
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
      //判断是否是之前的图片
        let res = false
      //  alert(this.fileList.length)
        for(let i = 0; i < this.fileList.length; i++)
        {
          if(this.fileList[i].url==file.url)
          {
              //原来图像标记为false
              //alert(this.fileList[i].res)
            if(this.fileList[i].res==false)
              res = true
            else
            {
              //  alert(this.uploadFileList.length)
              //  alert(87)
               this.$delete(this.uploadFileList, Math.abs(i - this.uploadFileList.length-1))
                   //      alert(this.uploadFileList.length)
               }
            this.$delete(this.fileList,i);
        }
        }
        let ul = ""
        this.fileList.map(function (elem){
          if(elem.res==false)
              ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        let uls = ""
        this.fileListOther.map(function (elem){
          if(elem.res==false)
              uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
        })
        this.formData.url = ul+","+uls;
        if(res==true){
            updateSelfEconomy(this.formData).then(response => {
              this.$modal.msgSuccess("删除成功");
            });
        }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
@@ -485,43 +586,125 @@
      this.btn = true
      this.isShow=false
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      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
        updateSelfEconomy(_this.formData).then(response => {
            this.$modal.msgSuccess("修改成功");
            // this.open = false;
            this.btn=false
          });
      })
    },
 //自定义上传方法
     handleChange(file, fileList1) {
        //定义一个全局数组uploadFileList来做存储
      // this.uploadFileList.push(file.raw);
       console.log("=========5555=========")
       this.uploadFileList.push(file.raw);
        this.fileList.push({name:file.name,url:file.url,res:true})
     },
     //自定义上传方法
     handleChange1(file, fileListOther1) {
            //定义一个全局数组uploadFileList来做存储
          // this.uploadFileList.push(file.raw);
          this.uploadFileList1.push(file.raw);
           this.fileListOther.push({name:file.name,url:file.url,res:true})
           console.log("=========5555=========")
           //console.log(file)
         //  console.log(this.uploadFileList)
         //  this.fileList = fileList
     },
     fileUpload(){
     //    var file = params.file;
         var formData = new FormData();
         //this.$refs.upload1.submit();
     //    alert(this.uploadFileList1.length)
         // formData.append('uploadFile', file);
         if(this.uploadFileList1.length==0){
               this.$modal.msgSuccess("文档上传列表不能为空!");
               return}
         this.uploadFileList1.forEach((elem)=>{
             formData.append("files", elem)
         })
         console.log(this.uploadFileList1)
         let _this = this
         this.uploading = true;
         uploadPic(formData).then(response => {
         _this.uploadFileList1 = []
           _this.formData.url = _this.formData.url+","+response.fileNames
             updateSelfEconomy(_this.formData).then(response => {
               this.$modal.msgSuccess("文档上传成功");
               // this.open = false;
             });
           })
     },
     picUpload()
     {
         var formData = new FormData();
         //this.$refs.upload.submit();
         //alert(this.uploadFileList.length)
     if(this.uploadFileList.length==0){
           this.$modal.msgSuccess("图像上传列表不能为空!");
           return}
         this.uploadFileList.forEach((elem)=>{
             formData.append("files", elem)
         })
         let _this = this
         uploadPic(formData).then(response => {
             // console.log(response.originalFilenames)
             // console.log(response.urls)
             // console.log(response.fileNames)
             //         console.log(response.newFileNames)
         // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
         // _this.uploading1= false;
         // console.log(_this.fot.includes(pth))
         // // debugger
         // if(_this.fot.includes(pth) === true)
         // {
         //   _this.fileList.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(",")
         //console.log(_this.fileList)
     //    alert(response.fileNames)
           _this.formData.url = _this.formData.url+","+response.fileNames
         _this.uploadFileList = []
          // alert(87)
           updateSelfEconomy(_this.formData).then(response => {
             _this.$modal.msgSuccess("图片上传成功");
             // this.open = false;
           });
         // }
         // else{
         //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
         // }
       });
     },
      requestUpload(params)
     {
    //  alert(124)
 //     this.uploadFileList.push(params.file);
      //alert(34)
     },
     requestUpload1(params)
     {
     //    alert(123)
    // this.uploadFileList1.push(params.file);
   //  console.log("-----------")
     //console.log(this.uploadFileList1)
     },
    /** 导出按钮操作 */
    handleExport() {
ruoyi-ui/src/views/wish/index.vue
@@ -293,6 +293,10 @@
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          :on-change="handleChange"
          :auto-upload="false"
              ref="upload"
        >
          <i  slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{ file }">
@@ -326,6 +330,13 @@
          </div>
        </el-upload>
        <el-button
                 style="margin-left: 10px"
                 size="small"
                 type="success"
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
@@ -334,17 +345,63 @@
          multiple
          :on-remove="handleRemoveFile"
          :http-request="requestUpload1"
          :show-file-list="true"
          ref="upload1"
          :on-change="handleChange1"
          :auto-upload="false"
          list-type="picture-card"
            :http-request="requestUpload1"
        >
          <el-button type="primary">点击上传</el-button>
          <div v-if="uploading1" class="upload-status">正在上传...</div>
          <template #tip>
            <div class="el-upload__tip">
            </div>
          </template>
        </el-upload>
     <i slot="default" class="el-icon-plus"></i>
             <div slot="file" slot-scope="{file}">
               <!-- 添加video元素用于显示视频 -->
               <video
                 v-if="file.url.includes('.mp4')"
                 class="el-upload-list__item-thumbnail"
                 :src="file.url"
                 style="width: 147px; height: 147px"
                 fit="cover"
               ></video>
               <img v-else
                    class="el-upload-list__item-thumbnail"
                    :src="file.url"
                    alt=""
                    style="width: 100%; height: 100%"
                    fit="cover"></img>
               <span class="el-upload-list__item-actions">
                    <span class="el-upload-list__item-name">{{ file.name }}</span>
                         <span
                           class="el-upload-list__item-preview"
                           @click="handleFileCardPreview(file)"
                         >
                           <i class="el-icon-zoom-in"></i>
                         </span>
                         <span
                           class="el-upload-list__item-delete"
                           @click="handleRemoveFile(file)"
                         >
                           <i class="el-icon-delete"></i>
                         </span>
                   </span>
             </div>
           </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  @click="fileUpload"
                >上传到服务器</el-button>
      </el-form>
      <h4 class="form-header"> </h4>
@@ -414,6 +471,9 @@
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      
      fileList:[],
      fileList1:[],
      uploadFileList: [],
              uploadFileList1: [],
      fileListOther:[],
      dsb:true,
      btn:false,
@@ -431,7 +491,7 @@
        difficulty:undefined,
        isEffective:undefined,
        remark:undefined,
        url: undefined,
        url: "",
      },
      // 菜单列表
@@ -595,14 +655,20 @@
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
        {
          this.$delete(this.fileList,i);
                 this.$delete(this.uploadFileList,i);
                 }
      }
    },
    handleRemoveFile(file) {
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
        {
          this.$delete(this.fileListOther,i);
          this.$delete(this.uploadFileList1,i);
          }
      }
    },
    // 取消按钮
@@ -698,13 +764,13 @@
    /** 提交按钮(数据权限) */
    submitDataScope: function() {
      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.formDat.url = ul+","+uls
      // 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.formDat.url = ul+","+uls
      this.$refs["elForm"].validate(valid => {
        if (valid) {
@@ -727,40 +793,89 @@
        }
      });
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      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})
        }
      })
    },
    requestUpload1(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading1 = true;
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading1 = false;
        this.$modal.msgSuccess("上传成功");
        if(_this.fot.includes(pth) !== true)
        {
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
    },
     handleChange(file, fileList1) {
        //定义一个全局数组uploadFileList来做存储
      // this.uploadFileList.push(file.raw);
       console.log("=========5555=========")
       console.log(file)
     //  console.log(this.uploadFileList)
     //  this.fileList = fileList
     //alert(file)
         this.uploadFileList.push(file.raw);
          this.fileList.push({name:file.name,url:file.url})
     //alert(fileList1.length)
     },
     handleChange1(file, fileOtherList1) {
        //定义一个全局数组uploadFileList来做存储
     this.uploadFileList1.push(file.raw);
      this.fileListOther.push({name:file.name,url:file.url})
      // this.uploadFileList.push(file.raw);
       console.log("=========5555=========")
       //console.log(file)
     //  console.log(this.uploadFileList)
     //  this.fileList = fileList
     },
     fileUpload(){
     //    var file = params.file;
         var formData = new FormData();
         this.$refs.upload1.submit();
         // formData.append('uploadFile', file);
         if(this.uploadFileList1.length==0){
               this.$modal.msgSuccess("文档上传列表不能为空!");
               return
         }
         this.uploadFileList1.forEach((elem)=>{
             formData.append("files", elem)
         })
         let _this = this
         this.uploading = true;
         uploadPic(formData).then(response => {
         _this.uploadFileList1 = []
         _this.formDat.url = _this.formDat.url+","+response.fileNames
         _this.$modal.msgSuccess("文件上传成功!");
           })
     },
     picUpload()
     {
         var formData = new FormData();
         //alert(976)
         //this.$refs.upload.submit();
         //alert(8)
         //alert(this.uploadFileList.length)
     if(this.uploadFileList.length==0){
           this.$modal.msgSuccess("图片上传列表不能为空!");
           return}
     //console.log(this.uploadFileList)
         this.uploadFileList.forEach((elem)=>{
             formData.append("files", elem)
         })
         //alert(90)
         let _this = this
         //alert(9)
         uploadPic(formData).then(response => {
         //    alert("dds")
           _this.formDat.url = _this.formDat.url+","+response.fileNames
           _this.uploadFileList = []
           _this.$modal.msgSuccess("图片上传成功");
       });
     },
     requestUpload(params) {
 //alert(98)
  //    this.uploadFileList.push(params.file);
     },
     requestUpload1(params)
     {
         //     this.uploadFileList1.push(params.file);
     },
    /** 删除按钮操作 */
    handleDelete(row) {
      const Ids = row.id || this.ids;
ruoyi-ui/src/views/wish/wishInfo.vue
@@ -84,6 +84,10 @@
          multiple
          :http-request="requestUpload"
          :file-list="fileList"
          :show-file-list="true"
               :on-change="handleChange"
                :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
@@ -125,7 +129,13 @@
          </div>
        </el-upload>
         <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="picUpload"
                >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
@@ -137,6 +147,9 @@
          :on-remove="handleRemoveFile"
          :http-request="requestUpload1"
          :show-file-list="true"
        :on-change="handleChange1"
        :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
@@ -185,7 +198,14 @@
          </div>
        </el-upload>
     <el-button
                  style="margin-left: 10px"
                  size="small"
                  type="success"
                  v-if="btn"
                  @click="fileUpload"
                >上传到服务器</el-button>
                      <h4 class="form-header"> </h4>
        <el-form-item size="large">
          <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb" >修改</el-button>
        </el-form-item>
@@ -220,7 +240,12 @@
       '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
     
      fileList:[],
      fileListOther:[],
      fileList1:[],
      uploadFileList:[],
      uploadFileList1:[],
      fileListOther:[
      ],
      dsb:true,
      btn:false,
      isShow:true,
@@ -240,7 +265,7 @@
        difficulty:undefined,
        isEffective:undefined,
        remark:undefined,
        url: undefined,
        url: "",
      },
      desurl:'',
      dialogImageUrl: '',
@@ -322,19 +347,29 @@
        let paths = response.data.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)
            if (_this.fot.includes(pth) === true)
              _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
            else {
              // alert(paths[i])
              let nms = paths[i].split("\/")
              let nm = nms[nms.length - 1]
              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
            }
          }
       if(paths[i]!="") {
           let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
       //    alert(pth)
           if (_this.fot.includes(pth) === true)
           {
               if(paths[i][0]=="/")
             _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
             else
                _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
             }
           else {
             // alert(paths[i])
            // alert()
             let nms = paths[i].split("\/")
             let nm = nms[nms.length - 1]
             if(paths[i][0]=="/")
             _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
               else
               _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
           }
         }
        }
        this.loading = false;
      });
@@ -391,42 +426,83 @@
      })
    },
    handleRemoveFile(file) {
      //判读是否是之前的图片
      let res = false
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
        {
            if(this.fileListOther[i].res==false)
                res = true
            else
            {
                this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
            }
          this.$delete(this.fileListOther,i);
        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;
        updateWish(this.formData).then(response => {
          this.$modal.msgSuccess("删除成功");
          // this.open = false;
          // this.btn=false
        });
        }
      }
      let ul = ""
      this.fileList.map(function (elem){
              if(elem.res==false)
                  ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      })
      let uls = ""
      this.fileListOther.map(function (elem){
        if(elem.res==false)
                  uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      })
      this.formData.url = ul+","+uls;
    //  alert(this.formData.url)
      if(res==true){
          updateWish(this.formData).then(response => {
            this.$modal.msgSuccess("删除成功");
            // this.open = false;
          });
      }
    },
    handleRemove(file) {
    handleRemove(file) {
              //判断是否是之前的图片
      let res = false
    //  alert(this.fileList.length)
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
        {
            //原来图像标记为false
            //alert(this.fileList[i].res)
          if(this.fileList[i].res==false)
            res = true
          else
          {
            //  alert(this.uploadFileList.length)
            //  alert(87)
             this.$delete(this.uploadFileList, Math.abs(i - this.uploadFileList.length-1))
                 //      alert(this.uploadFileList.length)
             }
          this.$delete(this.fileList,i);
        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;
        updateWish(this.formData).then(response => {
          this.$modal.msgSuccess("删除成功");
          // this.open = false;
          // this.btn=false
        });
      }
      }
      let ul = ""
      this.fileList.map(function (elem){
        if(elem.res==false)
            ul = ul + ","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      })
      let uls = ""
      this.fileListOther.map(function (elem){
        if(elem.res==false)
            uls = uls +","+elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
      })
      this.formData.url = ul+","+uls;
      if(res==true){
          updateWish(this.formData).then(response => {
            this.$modal.msgSuccess("删除成功");
          });
      }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
@@ -461,74 +537,124 @@
      this.btn = true
      this.isShow=false
    },
    requestUpload(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading = true;
//自定义上传方法
    handleChange(file, fileList1) {
       //定义一个全局数组uploadFileList来做存储
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading = false;
        if(_this.fot.includes(pth) === true)
        {
          _this.fileList.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)
          updateWish(this.formData).then(response => {
            this.$modal.msgSuccess("图片上传成功");
     // this.uploadFileList.push(file.raw);
      console.log("=========5555=========")
      this.uploadFileList.push(file.raw);
       this.fileList.push({name:file.name,url:file.url,res:true})
    },
    //自定义上传方法
    handleChange1(file, fileListOther1) {
           //定义一个全局数组uploadFileList来做存储
         // this.uploadFileList.push(file.raw);
         this.uploadFileList1.push(file.raw);
          this.fileListOther.push({name:file.name,url:file.url,res:true})
          console.log("=========5555=========")
          //console.log(file)
        //  console.log(this.uploadFileList)
        //  this.fileList = fileList
    },
    fileUpload(){
    //    var file = params.file;
        var formData = new FormData();
        //this.$refs.upload1.submit();
    //    alert(this.uploadFileList1.length)
        // formData.append('uploadFile', file);
        if(this.uploadFileList1.length==0){
              this.$modal.msgSuccess("文档上传列表不能为空!");
              return}
        this.uploadFileList1.forEach((elem)=>{
            formData.append("files", elem)
        })
        console.log(this.uploadFileList1)
        let _this = this
        this.uploading = true;
        uploadPic(formData).then(response => {
        _this.uploadFileList1 = []
          _this.formData.url = _this.formData.url+","+response.fileNames
            updateWish(_this.formData).then(response => {
              this.$modal.msgSuccess("文档上传成功");
              // this.open = false;
            });
          })
    },
    picUpload()
    {
        var formData = new FormData();
        //this.$refs.upload.submit();
        //alert(this.uploadFileList.length)
    if(this.uploadFileList.length==0){
          this.$modal.msgSuccess("图像上传列表不能为空!");
          return}
        this.uploadFileList.forEach((elem)=>{
            formData.append("files", elem)
        })
        let _this = this
        uploadPic(formData).then(response => {
            // console.log(response.originalFilenames)
            // console.log(response.urls)
            // console.log(response.fileNames)
            //         console.log(response.newFileNames)
        // let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        // _this.uploading1= false;
        // console.log(_this.fot.includes(pth))
        // // debugger
        // if(_this.fot.includes(pth) === true)
        // {
        //   _this.fileList.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(",")
        //console.log(_this.fileList)
    //    alert(response.fileNames)
          _this.formData.url = _this.formData.url+","+response.fileNames
        _this.uploadFileList = []
         // alert(87)
          updateWish(_this.formData).then(response => {
            _this.$modal.msgSuccess("图片上传成功");
            // this.open = false;
            // this.btn=false
          });
        }
        else{
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        }
      })
          });
        // }
        // else{
        //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
        // }
      });
    },
     requestUpload(params)
    {
   //  alert(124)
//     this.uploadFileList.push(params.file);
     //alert(34)
    },
    requestUpload1(params)
    {
      var file = params.file;
      var formData = new FormData();
      formData.append('uploadFile', file);
      let _this = this
      this.uploading1 = true;
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        this.uploading1 = 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)
          updateWish(this.formData).then(response => {
            this.$modal.msgSuccess("文档上传成功");
            // this.open = false;
            // this.btn=false
          });
        }
      })
    //    alert(123)
   // this.uploadFileList1.push(params.file);
  //  console.log("-----------")
    //console.log(this.uploadFileList1)
    },
  }