feige
2023-09-10 8319f67b9bec1d19c06eaa4216f0f34c67e3afb1
ruoyi-ui/src/views/selfeconomy/index.vue
@@ -288,7 +288,7 @@
            <el-input v-model="formDat.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" ></el-input>
          </el-form-item>
          <h4 class="form-header">电子文件 </h4>
          <h4 class="form-header">相关图片 </h4>
          <el-upload
            action="#"
            list-type="picture-card"
@@ -296,7 +296,7 @@
            :http-request="requestUpload"
            :file-list="fileList"
          >
            <i slot="default" class="el-icon-plus"></i>
            <i  slot="default" class="el-icon-plus"></i>
            <div slot="file" slot-scope="{file}">
              <img
                class="el-upload-list__item-thumbnail"
@@ -338,6 +338,7 @@
            :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>
@@ -416,7 +417,7 @@
        dsb:true,
        btn:false,
        fit:['fill'],
        uploading: false,
        formDat: {
          //百年心愿记录
          id:undefined,
@@ -701,8 +702,13 @@
        Object.keys(this.formDat).forEach(key => {
          this.formDat[key] = '';
        });
        this.handleRemove(this.fileList[0]);
        this.handleRemoveFile(this.fileListOther[0]);
        for(let i = 0; i <= this.fileList.length; i++)
        {
          this.handleRemove(this.fileList[0]);
        }
        for(let i = 0; i < this.fileListOther.length; i++){
          this.handleRemoveFile(this.fileListOther[0]);
        }
      },
      requestUpload(params)
      {
@@ -710,10 +716,11 @@
        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})