From ff4e34a9b624c182a9f49a962f1c7078bc75639e Mon Sep 17 00:00:00 2001 From: guoyuepeng <770272267@qq.com> Date: Thu, 26 Sep 2024 16:22:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=BF=98=E5=8E=9F=E9=9A=90=E6=82=A3=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E5=9B=BE=E7=89=87=E4=B8=8D=E8=83=BD=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hidden/rectify/components/change.vue | 161 +++--------------- 1 file changed, 24 insertions(+), 137 deletions(-) diff --git a/src/views/hidden/rectify/components/change.vue b/src/views/hidden/rectify/components/change.vue index 85c4268..c80f0f7 100644 --- a/src/views/hidden/rectify/components/change.vue +++ b/src/views/hidden/rectify/components/change.vue @@ -33,46 +33,25 @@ - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
+ + + + + +
@@ -215,13 +194,11 @@ export default { INVESTMENT_FUNDS: '', // 投入资金 RECTIFICATIONTIME: ''// 整改时间 }, - imgUrl: '', rectify_files: [], hideUpload: false, // 整改照片 dialogImageVisible: false, // 放大照片的显示和隐藏 dialogImageUrl: '', // 照片的地址 scheme_files: [], // 整改方案图片 - temporaryFilePath: [], formRule: { RECTIFICATIONDEPT: [{ required: true, message: '请选择整改部门', trigger: 'blur' }], RECTIFICATIONOR: [{ required: true, message: '请选择整改人', trigger: 'blur' }], @@ -275,53 +252,6 @@ export default { this.getEditMyInfo() }, methods: { - uploadFiles(file) { - // 调用文件大小校验方法 - if (this.beforeUpload(file.file)) { - this.formData = new FormData() - this.formData.append('FFILE', file.file) - // 请求接口 - upload( - '/mfolder/upLoadTemporary', - this.formData - ).then((data) => { - if (data.result == 'success') { - this.$message({ - message: '保存成功', - type: 'success' - }) - this.loading = false - this.temporaryFilePath.push(data.temporaryFilePath) - console.info('this.temporaryFilePath========' + this.temporaryFilePath) - } else { - this.$message({ - message: data.exception, - type: 'error' - }) - this.loading = false - } - }).catch((e) => { - this.listLoading = false - this.loading = false - }) - } - }, - // 文件大小校验 - beforeUpload(file) { - if (file.size > 10 * 1024 * 1024) { - this.$message('文件过大,请上传小于10MB的文件〜') - return false - } - return true - }, - // 删除图片 - imageRemove() { - this.imgUrl = '' - this.$message({ - message: '删除图片成功', - type: 'success' - }) - }, getEditMyInfo: function() { requestFN( '/user/goEditMyInfo', @@ -484,8 +414,7 @@ export default { }, saveRectify() { // 正常整改 this.loading = true - // if (this.$refs.zhenggaiupload.uploadFiles.length < 1) { - if (this.temporaryFilePath.length < 1) { + if (this.$refs.zhenggaiupload.uploadFiles.length < 1) { this.$message({ message: '请上传整改后照片', type: 'error' @@ -612,24 +541,16 @@ export default { text: '加载中......', background: 'rgba(0,0,0,0.5)' }) - // this.$refs.zhenggaiupload.submit() + this.$refs.zhenggaiupload.submit() var todata = new FormData() - for (var i = 0; i < _this.temporaryFilePath.length; i++) { - if (_this.temporaryFilePath[i]) { - todata.append('temporaryFilePath', _this.temporaryFilePath[i]) + for (var i = 0; i < _this.rectify_files.length; i++) { + if (_this.rectify_files[i]) { + todata.append('FFILE', _this.rectify_files[i]) } } - if (!todata.get('temporaryFilePath')) { + if (!todata.get('FFILE')) { return } - // for (var i = 0; i < _this.rectify_files.length; i++) { - // if (_this.rectify_files[i]) { - // todata.append('FFILE', _this.rectify_files[i]) - // } - // } - // if (!todata.get('FFILE')) {f - // return - // } todata.append('FOREIGN_KEY', this.HIDDEN_ID) todata.append('TYPE', 4) upload( @@ -682,7 +603,6 @@ export default { } todata.append('FOREIGN_KEY', this.HIDDEN_ID) todata.append('TYPE', 8) - todata.append('temporaryFilePath', this.temporaryFilePath) upload( '/imgfiles/add', todata @@ -764,39 +684,6 @@ export default { this.scheme_files.push(file) } }, - submitUpload() { - var _this = this - this.$refs.zhenggaiupload.submit() - var todata = new FormData() - for (var i = 0; i < _this.rectify_files.length; i++) { - if (_this.rectify_files[i]) { - todata.append('FFILE', _this.rectify_files[i]) - } - } - console.log(todata) - upload( - '/mfolder/upLoadTemporary', - todata - ).then((data) => { - if (data.result == 'success') { - this.$message({ - message: '保存成功', - type: 'success' - }) - this.loading = false - this.temporaryFilePath = data.temporaryFilePath - } else { - this.$message({ - message: data.exception, - type: 'error' - }) - this.loading = false - } - }).catch((e) => { - this.listLoading = false - this.loading = false - }) - }, back() { this.$parent.activeName = 'List' }