From f19e5267cc23b1c714dc746239864f33ed715dd9 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 05 十二月 2025 17:55:02 +0800
Subject: [PATCH] 完成地图制作任务功能初版
---
src/views/fysp/check/components/CompProblemAddOrUpd.vue | 54 ++++++++++++++++++++++++++++++++++--------------------
1 files changed, 34 insertions(+), 20 deletions(-)
diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
index ad0049c..8221a0e 100644
--- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue
+++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -1,5 +1,5 @@
<template>
- <CompGenericWrapper type="dialog">
+ <CompGenericWrapper type="dialog" append-to-body>
<template #content>
<div class="main-container">
<el-form
@@ -165,7 +165,11 @@
</el-form-item>
</el-form>
<el-row justify="end">
- <el-button type="primary" @click="onSubmit" v-show="!readonly"
+ <el-button
+ type="primary"
+ @click="onSubmit"
+ v-show="!readonly"
+ :loading="loading"
>淇濆瓨</el-button
>
<el-button @click="onCancel" v-show="!readonly">鍙栨秷</el-button>
@@ -314,7 +318,8 @@
{ id: 0, label: '鐩戞帶璁惧' },
{ id: 1, label: '娌荤悊璁惧' },
{ id: 2, label: '鐢熶骇璁惧' }
- ]
+ ],
+ loading: false
};
},
watch: {
@@ -532,9 +537,7 @@
onProAdviseEditChange(value) {},
onProTypeChange(value) {
// 榛樿闂鎻忚堪鍜岄棶棰樺缓璁负绗竴涓�
- this.currProTypeGuid = this.descriptionOptions[0].guid;
- this.deepCopyProblem.description = this.descriptionOptions[0].description;
- this.onProDesChange(this.deepCopyProblem.description);
+ this.onProDesChange(this.descriptionOptions[0].description);
this.deepCopyProblem.advice = this.adviseOptions[0].adName;
this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice;
},
@@ -550,7 +553,8 @@
onProDesChange(value) {
let currPro = this.findProByProDesName(value);
this.currProTypeGuid = currPro.guid;
- // this.deepCopyProblem.description = currPro.description;
+ this.deepCopyProblem.description = currPro.description;
+ this.deepCopyProblem.ptguid = this.currProTypeGuid;
this.changeProblemname();
var adName =
this.adviseOptions.length == 0 ? '' : this.adviseOptions[0].adName;
@@ -588,6 +592,7 @@
this.$emit('update:visible', false);
},
onSubmit() {
+ this.loading = true;
this.$refs.formRef.validate((valid) => {
if (valid && this.pictureValidate()) {
// 鏁版嵁鍑嗗
@@ -616,7 +621,7 @@
let deleteImgCopy = this.deleteImg;
fileUtil.getImageFiles(picUrls, (files) => {
data.append('deleteImg', deleteImgCopy);
- deepCopyPro.advise = deepCopyPro.advice;
+ deepCopyPro.advise = deepCopyPro._adviseEdit;
delete deepCopyPro['advice'];
delete deepCopyPro['mediafileList'];
delete deepCopyPro['description'];
@@ -627,9 +632,14 @@
files.forEach((image) => {
data.append('images', image);
});
- problemApi.updateProblem(data).then((res) => {
- this.$emit('submit', false);
- });
+ problemApi
+ .updateProblem(data)
+ .then((res) => {
+ this.$emit('submit', false);
+ })
+ .finally(() => {
+ this.loading = false;
+ });
});
} else {
const deepCopySubTask = useCloned(this.subtask).cloned.value;
@@ -638,9 +648,8 @@
delete deepCopyPro['description'];
deepCopyPro.proName = deepCopyPro.problemname;
delete deepCopyPro['problemname'];
- deepCopyPro.ptGuid = this.findProTypeByGuid(
- this.currProTypeGuid
- ).guid;
+ deepCopyPro.ptGuid = this.currProTypeGuid;
+ delete deepCopyPro['ptguid'];
deepCopyPro.locationId = deepCopyPro.locationid;
delete deepCopyPro['locationid'];
delete deepCopyPro['_adviseEdit'];
@@ -649,9 +658,14 @@
files.forEach((image) => {
data.append('images', image);
});
- problemApi.newProblem(data).then((res) => {
- this.$emit('submit', true);
- });
+ problemApi
+ .newProblem(data)
+ .then((res) => {
+ this.$emit('submit', true);
+ })
+ .finally(() => {
+ this.loading = false;
+ });
});
}
}
@@ -750,7 +764,7 @@
.row {
width: 100%;
}
-::v-deep .el-upload-list--picture-card .el-upload-list__item-thumbnail {
+:deep(.el-upload-list--picture-card .el-upload-list__item-thumbnail) {
object-fit: cover !important;
}
.preview-pic {
@@ -758,11 +772,11 @@
width: 100%;
height: 100%;
}
-::v-deep .el-upload--picture-card {
+:deep(.el-upload--picture-card) {
display: none;
}
/* 闅愯棌el-upload涓婁紶鎴愬姛缁勪欢 */
-::v-deep .el-upload-list__item-status-label {
+:deep(.el-upload-list__item-status-label) {
display: none !important;
}
</style>
--
Gitblit v1.9.3