diff --git a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue index 00d6ef30c..a87f759fd 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue @@ -144,7 +144,7 @@ export default { }; }, computed: { - ...mapGetters('training', [ + ...mapGetters('training', [ 'operatemode' ]), ...mapGetters('map', [ @@ -152,7 +152,7 @@ export default { 'routeData', 'signalList', 'autoReentryList', - 'autoReentryData', + 'autoReentryData' ]), Switch() { return OperationEvent.Switch; @@ -333,7 +333,7 @@ export default { const operate = { operation: this.$store.state.menuOperation.buttonOperation }; - let isArrangementRoute = false; + let isArrangementRoute = false; if (deviceList.length === 1) { const signal = deviceList[0]; const sectionModel = this.$store.getters['map/getDeviceByCode'](signal.sectionCode); @@ -385,6 +385,7 @@ export default { } } }, + // handelFunctionButton(model, subType) { // debugger; const operate = { @@ -395,35 +396,37 @@ export default { }; if (model._type === 'StationStand' && subType === 'StopJumpLamp') { operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP; - operate.param = {standCode: model.code, trainGroupNumber: ''}; - operate.code = model.code; + operate.param = {standCode: model.code, trainGroupNumber: ''}; + operate.code = model.code; } else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') { operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP; - operate.param = {standCode: model.code, trainGroupNumber: ''}; - operate.code = model.code; + operate.param = {standCode: model.code, trainGroupNumber: ''}; + operate.code = model.code; } else if (model._type === 'AutoTurnBack' ) { operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK; operate.param = {cycleCode: model.cycleCode}; + operate.code = model.code; } else if (model._type === 'AutomaticRoute') { const route = this.routeData[model.automaticRouteCode]; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO; operate.param = {signalCode: route.startSignalCode}; + operate.code = model.code; } else if (model._type === 'Station') { switch (subType) { case 'substation': - operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL; - operate.param = {stationCodes: [model.code]}; - operate.code = model.code; + operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL; + operate.param = {stationCodes: [model.code]}; + operate.code = model.code; break; case 'center': operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; - operate.param = {stationCodes: [model.code]}; - operate.code = model.code; + operate.param = {stationCodes: [model.code]}; + operate.code = model.code; break; case 'emergency': operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL; - operate.param = {stationCodes: [model.code]}; - operate.code = model.code; + operate.param = {stationCodes: [model.code]}; + operate.code = model.code; break; } } @@ -460,10 +463,12 @@ export default { } else if (model._type === 'AutoTurnBack') { operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK; operate.param = {cycleCode: model.cycleCode, cancelRoute: false}; + operate.code = model.code; } else if (model._type === 'AutomaticRoute') { const route = this.routeData[model.automaticRouteCode]; operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO; operate.param = {signalCode: route.startSignalCode}; + operate.code = model.code; } this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch((error) => { this.deviceList = []; @@ -697,8 +702,8 @@ export default { this.clearOperate(); } } else { - this.clearOperate(); - this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控'); + this.clearOperate(); + this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控'); } } } diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue deleted file mode 100644 index 8555ce074..000000000 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControl.vue +++ /dev/null @@ -1,370 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControlSpeed.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControlSpeed.vue deleted file mode 100644 index 67a0a32c5..000000000 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmControlSpeed.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmSignalUnlock.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmSignalUnlock.vue deleted file mode 100644 index bf590181f..000000000 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/childDialog/confirmSignalUnlock.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/sectionCmdControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/sectionCmdControl.vue deleted file mode 100644 index dd0db453f..000000000 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/sectionCmdControl.vue +++ /dev/null @@ -1,419 +0,0 @@ - - diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/switchCmdControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/switchCmdControl.vue deleted file mode 100644 index 2fa60ef77..000000000 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/switchCmdControl.vue +++ /dev/null @@ -1,482 +0,0 @@ - - diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmControl.vue deleted file mode 100644 index 079b94fb9..000000000 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmControl.vue +++ /dev/null @@ -1,365 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmControlSpeed.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmControlSpeed.vue deleted file mode 100644 index 67a0a32c5..000000000 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmControlSpeed.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmSignalUnlock.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmSignalUnlock.vue deleted file mode 100644 index bf590181f..000000000 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/childDialog/confirmSignalUnlock.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - diff --git a/src/views/lesson/trainingmanage/index.vue b/src/views/lesson/trainingmanage/index.vue index a1c23a25f..4ed206a4d 100644 --- a/src/views/lesson/trainingmanage/index.vue +++ b/src/views/lesson/trainingmanage/index.vue @@ -48,8 +48,8 @@ export default { pageIndex: 'pageNum' }, queryForm: { - labelWidth: '120px', - // initLoadCallback: this.initForm, + labelWidth: '120px', + initLoadCallback: this.initForm, queryObject: { prdType: { type: 'select', @@ -160,7 +160,7 @@ export default { this.typeChoose(json); }, mounted() { - this.interCheckGenerateStatus(); + this.interCheckGenerateStatus(); }, beforeDestroy() { this.isLeaving = true; @@ -179,15 +179,13 @@ export default { await this.prdChoose(queryData); this.reloadTable(); - }, - initForm(form) { - if (form) { - this.prdChoose(form); - this.typeChoose(form); - // form.type = ''; - // form.operateType = ''; - } - }, + }, + async initForm(form) { + if (form) { + await this.prdChoose(form, false); + await this.typeChoose(form, false); + } + }, interCheckGenerateStatus() { createAllTrainingList(this.$route.query.mapId, false).then((data)=>{ if (data.data) { @@ -217,10 +215,10 @@ export default { }, 3000); }); }, - async prdChoose(form) { - this.trainingTypeMap = {}; + async prdChoose(form, isClean = true) { + this.trainingTypeMap = {}; - const lineCode = this.$route.query.lineCode; + const lineCode = this.$route.query.lineCode; const res = await getCmdList(lineCode, {prdType:form.prdType}); const trainingOperateList = []; const trainingOperateConfigList = []; @@ -234,12 +232,14 @@ export default { LimitControl: [], TrainWindow: [], Driver: [] - }; + }; - form.type = ''; - form.operateType = ''; - this.queryForm.queryObject.type.config.data = []; - this.queryForm.queryObject.operateType.config.data = []; + if (isClean) { + form.type = ''; + form.operateType = ''; + } + this.queryForm.queryObject.type.config.data = []; + this.queryForm.queryObject.operateType.config.data = []; if (res && res.code === 200) { res.data.forEach(item => { @@ -256,17 +256,19 @@ export default { trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label}); } }); - this.queryForm.queryObject.type.config.data = trainingOperateConfigList; + this.queryForm.queryObject.type.config.data = trainingOperateConfigList; - this.trainingTypeList = trainingOperateConfigList; + this.trainingTypeList = trainingOperateConfigList; this.trainingTypeMap = operateTypeMap; } else { this.$message.error(this.$t('error.failedToObtainTrainingType')); } }, - typeChoose(form) { + typeChoose(form, isClean = true) { this.queryForm.queryObject.operateType.config.data = []; - form.operateType = ''; + if (isClean) { + form.operateType = ''; + } if (form && form.type && this.trainingTypeMap[form.type]) { this.trainingTypeMap[form.type].forEach(elem => { this.queryForm.queryObject.operateType.config.data.push({ value: elem.value, label: elem.label });