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 + }) + }, }, };