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