yz3456
2024-03-26 062cafaecdd03f085ab1555b3343c36c18af491e
ruoyi-ui/src/views/self/show.vue
@@ -292,6 +292,9 @@
          multiple
          :http-request="requestUploadm"
          :file-list="fileList"
          :on-change="handleChange1"
          :auto-upload="false"
          ref="upload"
        >
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{ file }">
@@ -870,6 +873,8 @@
  data() {
    return {
       uploadFileList: [],
      uploadFileList1: [],
      // 遮罩层
      disabled: false,
@@ -955,6 +960,7 @@
     fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
       '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      fileList1:[],
      fileList:[],
      fileListOther:[],
      dsb:true,
@@ -1159,6 +1165,42 @@
  },
  methods: {
    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);
      }
      }
    },
    handleRemove(file) {
      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);
           }
      }
     },
    handleChange1(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)
    },
    // 取消按钮
    cancelData() {
   //   alert(23)