From 4eea8d695eb415961e922456a41c56d00fbdf7f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com>
Date: Sun, 7 Apr 2024 11:42:44 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/editorialSpecialization.js | 2 +-
.../system/editorialSpecialization/index.vue | 86 ++++++++++++++++++-
2 files changed, 84 insertions(+), 4 deletions(-)
diff --git a/src/api/system/editorialSpecialization.js b/src/api/system/editorialSpecialization.js
index 51142f3..08f61f6 100644
--- a/src/api/system/editorialSpecialization.js
+++ b/src/api/system/editorialSpecialization.js
@@ -28,7 +28,7 @@ export function triggerCondition(id) {
export function triggerConditionedit(data) {
return request({
url: `/system/triggerCondition/edit`,
- method: 'post',
+ method: 'put',
data
})
}
diff --git a/src/views/system/editorialSpecialization/index.vue b/src/views/system/editorialSpecialization/index.vue
index 26c8cbd..1810087 100644
--- a/src/views/system/editorialSpecialization/index.vue
+++ b/src/views/system/editorialSpecialization/index.vue
@@ -85,7 +85,7 @@
-
+
@@ -128,6 +128,40 @@
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -136,7 +170,7 @@ import {
updateSpecialDiseaseRoute,
} from "@/api/system/specialDiseaseRoute";
import {
- specialDiseaseRoute, selectSpecialDisease, triggerConditiondel, specialDiseaseRoutedel, triggerConditionadd
+ specialDiseaseRoute, selectSpecialDisease, triggerConditiondel, specialDiseaseRoutedel, triggerConditionadd, triggerCondition, triggerConditionedit
} from "@/api/system/editorialSpecialization";
export default {
name: "editorialSpecialization",
@@ -158,6 +192,8 @@ export default {
triggerConditionValue: '',
}],
},
+ editopen: false,
+ updataform: {},
// 表单校验
rules: {
routeName: [
@@ -224,6 +260,29 @@ export default {
triggerConditionValue: '',
})
},
+ editopenfalse() {
+ this.updataform = {}
+ this.editopen = false
+ this.resetForm("updataform");
+ },
+ editupload() {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ triggerConditionedit(this.updataform).then(res => {
+ loading.close();
+ this.$notify({
+ type: 'success',
+ title: '提示',
+ message: '修改触发条件成功',
+ });
+ this.info();
+ this.editopenfalse();
+ })
+ },
openfalse() {
this.updata.triggerConditionList = [{
routeId: '',
@@ -236,18 +295,25 @@ export default {
this.resetForm("updata");
},
upload() {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
this.updata.triggerConditionList.forEach(e => {
e.routeId = this.$route.query.id
e.routeName = this.$route.query.routeName
})
triggerConditionadd(this.updata).then(res => {
- this.open = false
+ loading.close();
this.$notify({
type: 'success',
title: '提示',
message: '新增触发条件成功',
});
this.info();
+ this.openfalse();
})
},
//保存
@@ -273,6 +339,20 @@ export default {
});
})
},
+ //触发条件修改详情
+ triggerConditionedit(item) {
+ const loading = this.$loading({
+ lock: true,
+ text: 'Loading',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ triggerCondition(item.triggerConditionId).then(res => {
+ loading.close();
+ this.editopen = true
+ this.updataform = res.data
+ })
+ },
},
};