From 1fbd8b582443e3513f22680fe78c0d399e8f7042 Mon Sep 17 00:00:00 2001 From: fan Date: Mon, 12 Dec 2022 17:00:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E3=80=90=E5=8C=97=E4=BA=AC=E4=B8=80?= =?UTF-8?q?=E5=8F=B7=E7=BA=BF=E3=80=91=E7=AB=99=E6=8E=A7=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=BD=A6=E7=AB=99=E5=BA=94=E6=97=A0=E6=B3=95=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E3=80=91&=E5=88=9B=E5=BB=BA=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD=E6=A0=A1=E9=AA=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menus/menuDialog/stationControl.vue | 6 +-- .../theme/beijing_01/menus/menuStation.vue | 1 + .../trainingDesign/createDraftTraining.vue | 37 ++++++++++--------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuDialog/stationControl.vue b/src/jmapNew/theme/beijing_01/menus/menuDialog/stationControl.vue index f074a1ca8..f94e17295 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuDialog/stationControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuDialog/stationControl.vue @@ -193,7 +193,7 @@ export default { }, // 请求遥控 conterCommit() { - commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{ + commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 1).then(({valid, operate})=>{ if (valid) { this.doClose(); this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName); @@ -202,7 +202,7 @@ export default { }, // 请求站控 requestCommit() { - commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{ + commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 1).then(({valid, operate})=>{ if (valid) { this.doClose(); this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName); @@ -211,7 +211,7 @@ export default { }, // 紧急站控 emergencyCommit() { - commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{ + commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 1).then(({valid, operate})=>{ if (valid) { this.doClose(); this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName); diff --git a/src/jmapNew/theme/beijing_01/menus/menuStation.vue b/src/jmapNew/theme/beijing_01/menus/menuStation.vue index 7c121a37d..1f71a617c 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuStation.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuStation.vue @@ -151,6 +151,7 @@ export default { initMenu() { this.menu = []; this.menuNormal.forEach(menuItem => { + console.log(this.selected, this.work, '------'); menuItem.show = menuItem.isShow && menuItem.isShow(this.selected, this.work); menuItem.disabled = !judgeStationControl(this.selected.code, this.selected.stationCode, this.work) || (menuItem.isDisabled && menuItem.isDisabled(this.selected, this.work)); this.menu.push(menuItem); diff --git a/src/views/newMap/display/trainingDesign/createDraftTraining.vue b/src/views/newMap/display/trainingDesign/createDraftTraining.vue index cd61005cf..ee1805f66 100644 --- a/src/views/newMap/display/trainingDesign/createDraftTraining.vue +++ b/src/views/newMap/display/trainingDesign/createDraftTraining.vue @@ -160,23 +160,26 @@ export default { }, doCreate() { this.$refs.dataform.validateForm(() => { - const cpData = Object.assign({}, this.formModel); - cpData.client = this.tagForm.client; - cpData.labelJson = JSON.stringify(this.tagForm.dynamicTags); - console.log(cpData, '----------'); - let api = updateTraining; - let mes = '编辑'; - if (this.isCreate) { - api = createTraining; - mes = '创建'; - } - api(cpData).then(res => { - this.$message.success(`${mes}实训成功!`); - this.$emit('edit'); - this.doClose(); - }).catch(err => { - this.$message.error('获取实训详情信息失败!'); - this.$message.error(`${mes}实训失败!,${err.message}`); + this.$refs.form.validate(valid => { + if (valid) { + const cpData = Object.assign({}, this.formModel); + cpData.client = this.tagForm.client; + cpData.labelJson = JSON.stringify(this.tagForm.dynamicTags); + let api = updateTraining; + let mes = '编辑'; + if (this.isCreate) { + api = createTraining; + mes = '创建'; + } + api(cpData).then(res => { + this.$message.success(`${mes}实训成功!`); + this.$emit('edit'); + this.doClose(); + }).catch(err => { + this.$message.error('获取实训详情信息失败!'); + this.$message.error(`${mes}实训失败!,${err.message}`); + }); + } }); }); },