yz3456
2024-04-06 1a1654bbd7d91df6cf4864986748e0940907c8eb
修改了241之前的新bug
5个文件已修改
174 ■■■■ 已修改文件
ruoyi-ui/src/views/bignote/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/collection/index.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/self/memoInfo.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/self/show.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/travel/edit.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/bignote/index.vue
@@ -310,7 +310,7 @@
          :http-request="requestUpload1"
          :show-file-list="true"
        >
<i slot="default" class="el-icon-plus"></i>
      <i slot="default" class="el-icon-plus"></i>
        <div slot="file" slot-scope="{file}">
          <!-- 添加video元素用于显示视频 -->
          <video
ruoyi-ui/src/views/collection/index.vue
@@ -374,7 +374,7 @@
                 style="margin-left: 10px"
                 size="small"
                 type="success"
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
@@ -416,9 +416,9 @@
                    >
                      <i class="el-icon-zoom-in"></i>
                    </span>
                    <span
                      class="el-upload-list__item-delete"
                      @click="handleRemoveFile(file)"
                    >
@@ -712,7 +712,7 @@
          this.$delete(this.fileList,i);
                 this.$delete(this.uploadFileList,i);
                 }
      }
    },
    handleRemoveFile(file) {
@@ -720,10 +720,10 @@
      {
        if(this.fileListOther[i].url==file.url)
        {
          this.$delete(this.fileListOther,i);
          this.$delete(this.uploadFileList1,i);
          }
      }
    },
@@ -828,6 +828,7 @@
            this.$modal.msgSuccess("新增成功");
            this.open = false;
            // 清空formDat对象的数据
            this.newOption = '';
            Object.keys(this.formDat).forEach(key => {
              this.formDat[key] = '';
            });
@@ -842,10 +843,22 @@
          });
        }
      });
      // 清空formDat对象的数据
      Object.keys(this.formDat).forEach(key => {
        this.formDat[key] = '';
      });
      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]);
      }
    },
  handleChange(file, fileList1) {
         //定义一个全局数组uploadFileList来做存储
       // this.uploadFileList.push(file.raw);
        console.log("=========5555=========")
        console.log(file)
@@ -868,7 +881,7 @@
      },
      fileUpload(){
      //    var file = params.file;
          var formData = new FormData();
          this.$refs.upload1.submit();
          // formData.append('uploadFile', file);
@@ -878,18 +891,18 @@
          }
          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()
      {
@@ -904,7 +917,7 @@
      //console.log(this.uploadFileList)
          this.uploadFileList.forEach((elem)=>{
              formData.append("files", elem)
          })
          //alert(90)
          let _this = this
@@ -914,7 +927,7 @@
            _this.formDat.url = _this.formDat.url+","+response.fileNames
            _this.uploadFileList = []
            _this.$modal.msgSuccess("图片上传成功");
        });
      },
      requestUpload(params) {
ruoyi-ui/src/views/self/memoInfo.vue
@@ -120,12 +120,15 @@
          action=""
          :file-list="fileListOther"
          class="upload-demo"
          ref="upload1"
          multiple
          list-type="picture-card"
          :on-preview="handleFileCardPreview"
          :on-remove="handleRemoveFile"
          :on-change="handleChange1"
          :http-request="requestUpload1"
          :show-file-list="true"
          :auto-upload="false"
          :disabled="!btn"
          :class="{ hide: !btn }"
        >
@@ -175,12 +178,20 @@
        </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>
      </el-form>
    </div>
</div>
    <el-dialog  :visible.sync="dialogVisible">
      <img w-full :src="dialogImageUrl"  style="width: 100%; height: 100%" alt="Preview Image" />
    </el-dialog>
@@ -499,6 +510,35 @@
            //  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
              updateNote(_this.formData).then(response => {
                this.$modal.msgSuccess("文档上传成功");
                // this.open = false;
              });
            })
      },
    picUpload(){
        var formData = new FormData();
    if(this.uploadFileList.length==0){
ruoyi-ui/src/views/self/show.vue
@@ -336,24 +336,67 @@
                 @click="picUpload"
               >上传到服务器</el-button>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
          :file-list="fileListOther"
          class="upload-demo"
          multiple
          ref="upload1"
          :on-change="handleChange1"
          :auto-upload="false"
          list-type="picture-card"
          :on-remove="handleRemove"
          :http-request="requestUpload1m"
          :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>
@@ -1193,6 +1236,32 @@
      }
     },
    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();
ruoyi-ui/src/views/travel/edit.vue
@@ -37,6 +37,10 @@
        <el-input v-model="formData.groupTotal" placeholder="请输入团费" clearable :style="{width: '100%'}" :disabled="dsb">
        </el-input>
      </el-form-item>
      <el-form-item label="感言" prop="spee">
        <el-input v-model="formData.spee" placeholder="请输入感言" clearable :style="{width: '100%'}" :disabled="dsb">
        </el-input>
      </el-form-item>
@@ -87,7 +91,7 @@
        property: undefined,
        manner: undefined,
        groupTotal: undefined,
        spee: undefined
      },
      dialogImageUrl: '',
      dialogVisible: false,