6
jinlin
2023-12-01 68981c58ea61ff4edc0479facfb8b76181d2a582
web/src/components/config-uploader/src/config-uploader.vue
@@ -53,7 +53,7 @@
              <zt-uploader v-model="dataForm[scope.row.busiField]" :dataForm="dataForm" multiple
                           :limit="scope.row.fileLimit" :file-type="scope.row.fileTypeArr"
                           :showFileList2="false" :accept="scope.row.accept" :file-size="scope.row.fileSize"
                           @input="change(scope.row.busiField)"/>
                           @input="change(scope.row.busiField)" @getUploaderImg="getUploaderImg"/>
            </template>
          </el-table-column>
        </el-table>
@@ -144,16 +144,28 @@
        }
        return null
      },
      getUploaderImg(list) {
        // this.imageList = list
        if (list[0].url) {
          this.$emit('getImageUrl', list[0].url)
        }
      },
      change(busiField) {
        console.log(busiField, 'config_uploader change(busiField) busiField')
        this.fields.forEach(field => {
          if (field.busiField === busiField) {
            field.files.length = 0
            this.dataForm[busiField].forEach(file => field.files.push(file))
            this.dataForm[busiField].forEach(file => {
                field.files.push(file)
              }
            )
            if (this.dataForm) {
              this.dataForm.hasUploadFinsh = 100
            }
          }
        })
        console.log(this.dataForm, 'config_uploader change(busiField)')
        this.$emit('getImageUrl')
      }
    }
  }
@@ -162,6 +174,7 @@
  .config-uploader label {
    width: 260px !important;
  }
   .zt .el-upload-list__item .el-progress{
    top:15px !important;
  }