From 9a61e46d96536f3299e57f7259ae1c9972256ec6 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 30 九月 2025 09:42:09 +0800
Subject: [PATCH] 1. 隐藏未完成的账户匹配页面 2. 根据第三方新的接口文档修改接口url地址
---
src/views/fysp/check/components/ComChangeEdit.vue | 59 +++++++++++++++++++++++++++++++++++------------------------
1 files changed, 35 insertions(+), 24 deletions(-)
diff --git a/src/views/fysp/check/components/ComChangeEdit.vue b/src/views/fysp/check/components/ComChangeEdit.vue
index 6660d76..b8b5b27 100644
--- a/src/views/fysp/check/components/ComChangeEdit.vue
+++ b/src/views/fysp/check/components/ComChangeEdit.vue
@@ -46,17 +46,19 @@
</el-col>
</el-row>
<div class="flex-div">
- <el-button type="primary" @click="onSubmit">淇濆瓨</el-button>
+ <el-button type="primary" @click="onSubmit" :loading="loading"
+ >淇濆瓨</el-button
+ >
<el-button @click="onCancel">鍙栨秷</el-button>
</div>
<el-image-viewer
- v-if="previewDialogVisible"
- :url-list="fileList.map((item) => item.url)"
- :initial-index="initialIndex"
- @close="previewDialogVisible = false"
- alt="棰勮"
- class="preview-pic"
- />
+ v-if="previewDialogVisible"
+ :url-list="fileList.map((item) => item.url)"
+ :initial-index="initialIndex"
+ @close="previewDialogVisible = false"
+ alt="棰勮"
+ class="preview-pic"
+ />
</template>
</CompGenericWrapper>
</template>
@@ -68,8 +70,7 @@
import { ElMessage } from 'element-plus';
export default {
emits: ['submit', 'cancel'],
- components: {
- },
+ components: {},
watch: {
oldChangeFileList: {
handler(nv, ov) {
@@ -117,13 +118,15 @@
deleteImg: [],
ledgerPicDialog: false,
- anyPhotoDialog: false
+ anyPhotoDialog: false,
+
+ loading: false
};
},
mounted() {},
methods: {
pictureValidate() {
- if (this.changeType == 1 && this.fileList.length < 1) {
+ if (this.fileList.length < 1) {
ElMessage({
message: '鑷冲皯涓婁紶涓�寮犲浘鐗�',
type: 'error'
@@ -161,13 +164,14 @@
this.oldFileList = useCloned(beforeEditImgList).cloned.value;
},
onCancel() {
- this.$emit("cancel")
- this.$emit('update:visible', false)
+ this.$emit('cancel');
+ this.$emit('update:visible', false);
},
onSubmit() {
if (!this.pictureValidate()) {
return;
}
+ this.loading = true;
// 鏁版嵁鍑嗗
let data = new FormData();
var picUrls = [];
@@ -190,28 +194,35 @@
}
});
- const that = this;
let deleteImgCopy = this.deleteImg;
if (this.changeType == 1) {
- fileUtil.getImageFiles(picUrls, function (files) {
+ fileUtil.getImageFiles(picUrls, (files) => {
data.append('deleteImg', deleteImgCopy);
- data.append('problemId', that.problemId);
+ data.append('problemId', this.problemId);
files.forEach((image) => {
data.append('images', image);
});
- problemApi.updateChange(data).then((res) => {});
+ problemApi
+ .updateChange(data)
+ .then((res) => {
+ this.$emit('submit', true);
+ })
+ .finally(() => (this.loading = false));
});
- that.$emit('submit', true);
} else {
- fileUtil.getImageFiles(picUrls, function (files) {
- data.append('problemId', that.problemId);
+ fileUtil.getImageFiles(picUrls, (files) => {
+ data.append('problemId', this.problemId);
files.forEach((image) => {
data.append('images', image);
});
- problemApi.changeProblem(data).then((res) => {});
- that.$emit('submit', true);
+ problemApi
+ .changeProblem(data)
+ .then((res) => {
+ this.$emit('submit', true);
+ })
+ .finally(() => (this.loading = false));
});
}
},
@@ -222,7 +233,7 @@
}
},
handlePictureCardPreview(uploadFile) {
- this.initialIndex = this.fileList.indexOf(uploadFile)
+ this.initialIndex = this.fileList.indexOf(uploadFile);
this.previewDialogVisible = true;
this.previewDialogImageUrl = uploadFile.url;
},
--
Gitblit v1.9.3