diff --git a/src/jmapNew/shape/utils/ShapeStatusCovert.js b/src/jmapNew/shape/utils/ShapeStatusCovert.js index afedfc490..5682e7202 100644 --- a/src/jmapNew/shape/utils/ShapeStatusCovert.js +++ b/src/jmapNew/shape/utils/ShapeStatusCovert.js @@ -4,18 +4,18 @@ export function traverseLineElements(currentType, elementTypeList, model, style, obj) { const currentTypeList = currentType.elemnetType; currentTypeList.forEach(element => { - const ClassName = elementTypeList[element]; - if (ClassName) { - obj[element] = new ClassName({ - zlevel: model.zlevel, - z: 1 + currentType[element].z, - style: style, - modelData:model - }); - obj.add(obj[element]); - } else { - console.error(`not find class name: ${ClassName}`); - } + const ClassName = elementTypeList[element]; + if (ClassName) { + obj[element] = new ClassName({ + zlevel: model.zlevel, + z: 1 + currentType[element].z, + style: style, + modelData:model + }); + obj.add(obj[element]); + } else { + console.error(`not find class name: ${ClassName}`); + } }); } // 遍历后端返回的状态控制的绘图 diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index 88a30e2ac..a5f771733 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -151,10 +151,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); - + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue index e870caf44..25ed5c2c2 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuSection.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuSection.vue @@ -132,10 +132,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); - + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue index d4d2a75a7..181241ed8 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSection.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSection.vue @@ -129,10 +129,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); - + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/components/menus/dialog/setFault.vue b/src/jmapNew/theme/components/menus/dialog/setFault.vue index 9a80448ff..c4b4552d4 100644 --- a/src/jmapNew/theme/components/menus/dialog/setFault.vue +++ b/src/jmapNew/theme/components/menus/dialog/setFault.vue @@ -1,39 +1,79 @@ + + + + diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index e8fba250f..3575817cd 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -66,7 +66,7 @@ export const menuOperate = { cmdType: CMD.Section.CMD_SECTION_DETAILS }, loadSpareTrain: { - // 添加备用车 + // 添加备用车 operation: OperationEvent.Section.loadSpareTrain.menu.operation, cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } @@ -370,6 +370,16 @@ export const menuOperate = { cancelFault: { operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation, cmdType: CMD.Fault.CMD_CANCEL_FAULT + }, + // 设置托管 + collocation: { + operation: OperationEvent.MixinCommand.collocation.menu.operation, + cmdType: CMD.Train.CMD_TRAIN_TRUST + }, + // 设置连挂 + setLink: { + operation: OperationEvent.MixinCommand.setLink.menu.operation, + cmdType: CMD.Train.CMD_TRAIN_LINK } }, Station:{ diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue index 7fd36bc6e..06597c5f6 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue @@ -164,9 +164,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue index ac1f0616a..3ac6a613d 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue @@ -199,10 +199,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); - + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSection.vue b/src/jmapNew/theme/haerbin_01/menus/menuSection.vue index 74e129a5d..fd074f917 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSection.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSection.vue @@ -107,10 +107,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); - + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index a5f7a871b..000c3ca4b 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -169,9 +169,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/ningbo_03/menus/menuSection.vue b/src/jmapNew/theme/ningbo_03/menus/menuSection.vue index 9649357da..3395cadc9 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuSection.vue @@ -151,9 +151,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/race_01/menus/menuSection.vue b/src/jmapNew/theme/race_01/menus/menuSection.vue index 03bd20178..d05b7d6b2 100644 --- a/src/jmapNew/theme/race_01/menus/menuSection.vue +++ b/src/jmapNew/theme/race_01/menus/menuSection.vue @@ -129,6 +129,18 @@ export default { handler: this.loadSpare, cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN } + ], + faultList: [ + { + label: '设置故障', + handler: this.setStoppage, + cmdType: CMD.Fault.CMD_SET_FAULT + }, + { + label: '取消故障', + handler: this.cancelStoppage, + cmdType: CMD.Fault.CMD_CANCEL_FAULT + } ] }; }, @@ -169,11 +181,18 @@ export default { }, initMenu() { // 编辑模式菜单列表 - this.menu = MenuContextHandler.covert(this.menuNormal); + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode == OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } + if (this.operatemode == OperateMode.FAULT && this.selected.type == '04') { + this.menu = this.faultList; + } }, doShow(point) { this.clickEvent(); diff --git a/src/jmapNew/theme/race_01/menus/menuTrain.vue b/src/jmapNew/theme/race_01/menus/menuTrain.vue index 7149c071e..6b218552c 100644 --- a/src/jmapNew/theme/race_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/race_01/menus/menuTrain.vue @@ -11,6 +11,7 @@ + @@ -26,6 +27,7 @@ import TrainSetHead from './dialog/trainSetHead'; import TrainSetWork from './dialog/trainSetWork'; import trainSetWorkATP from './dialog/trainSetWorkATP'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; +import SetTrainOperation from '@/jmapNew/theme/components/menus/dialog/setTrainOperation'; import { mapGetters } from 'vuex'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; @@ -47,7 +49,8 @@ export default { TrainSetWork, trainSetWorkATP, SetFault, - SpeedLimit + SpeedLimit, + SetTrainOperation }, props: { selected: { @@ -207,6 +210,14 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '托管', + handler: this.setCollocation + }, + { + label: '连挂', + handler: this.setLink } ], menuDirective: [ @@ -321,6 +332,22 @@ export default { } }); }, + // 设置托管 + setCollocation() { + commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true); + } + }); + }, + // 设置连挂 + setLink() { + commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{ + if (valid) { + this.$refs.setTrainOperation.doShow(menuOperate.Common.setLink, this.selected, true); + } + }); + }, nextStation() { // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ // }).catch((error) => { diff --git a/src/jmapNew/theme/xian_01/menus/menuSection.vue b/src/jmapNew/theme/xian_01/menus/menuSection.vue index 93a6d184f..0784ab55e 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSection.vue @@ -177,11 +177,13 @@ export default { }, initMenu() { // 编辑模式菜单列表 - - this.menu = MenuContextHandler.covert(this.menuNormal); - + if (this.selected.type != '04') { + this.menu = MenuContextHandler.covert(this.menuNormal); + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/jmapNew/theme/xian_02/menus/menuSection.vue b/src/jmapNew/theme/xian_02/menus/menuSection.vue index ee4f3245e..ecb3f799a 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSection.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSection.vue @@ -182,9 +182,13 @@ export default { initMenu() { // 编辑模式菜单列表 // this.menu = MenuContextHandler.covert(this.menuNormal); - this.menu = this.menuNormal.Center; + if (this.selected.type != '04') { + this.menu = this.menuNormal.Center; + } else { + this.menu = []; + } // 故障模式菜单列表 - if (this.operatemode === OperateMode.FAULT) { + if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; } }, diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index c76ef2c24..5b0967b4a 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -94,12 +94,11 @@ export default { {label: '观众', value: 'AUDIENCE', enLabel: 'Audience '}, {label: '司机', value: 'DRIVER', enLabel: 'Driver '}, {label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '}, - {label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '}, + {label: '车辆段信号楼', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '}, {label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'}, {label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}, {label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'}, {label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'} - ], SimulationType: [ { label: '实训', value: 'Training'}, diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 332779ef3..ec761c1d2 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -229,7 +229,9 @@ export default { CMD_TRAIN_CANCEL_HOLD: {value:'Train_Cancel_Hold', label: '列车发车'}, CMD_TRAIN_CHANGE_TRIP_NUMBER: {value:'Train_Change_Trip_Number', label: '更改列车车次'}, CMD_TRAIN_DELETE_SERVICE_NUMBER: {value:'Train_Delete_Service_Number', label: '删除车次号'}, - CMD_TRAIN_CHANGE_DESTINATION_CODE: {value:'Train_Change_Destination_Code', label: '更改目的地码'} + CMD_TRAIN_CHANGE_DESTINATION_CODE: {value:'Train_Change_Destination_Code', label: '更改目的地码'}, + CMD_TRAIN_TRUST: {value: 'Train_Trust', label: '设置托管'}, + CMD_TRAIN_LINK: {value: 'Train_Link', label: '设置连挂'} }, TrainWindow: { /** 修改列车识别号 */ diff --git a/src/scripts/cmdPlugin/CommandHandler.js b/src/scripts/cmdPlugin/CommandHandler.js index 7627c62dc..f92d043e3 100644 --- a/src/scripts/cmdPlugin/CommandHandler.js +++ b/src/scripts/cmdPlugin/CommandHandler.js @@ -32,6 +32,20 @@ class CommandHandle { simulationRole: 'Center', controlMode: ['OperateCenterControl'], conditionList: [] + }, + Train_Trust: { + operate: 'Train_Trust', + paramList:[{name: 'groupNumber'}, {name: 'targetDeviceCode'}], + simulationRole: 'Center', + controlMode: ['OperateCenterControl'], + conditionList: [] + }, + Train_Link: { + operate: 'Train_Link', + paramList:[{name: 'groupNumber1'}, {name: 'groupNumber2'}], + simulationRole: 'Center', + controlMode: ['OperateCenterControl'], + conditionList: [] } } }; diff --git a/src/scripts/cmdPlugin/Config.js b/src/scripts/cmdPlugin/Config.js index d117de63f..411cb1082 100644 --- a/src/scripts/cmdPlugin/Config.js +++ b/src/scripts/cmdPlugin/Config.js @@ -38,8 +38,8 @@ export const deviceFaultType = { Switch: [ {label: '失表', value: 'SPLIT'}, {label: '定位失表', value: 'NORMAL_SPLIT'}, - {label: '反位失表', value: 'REVERSE_SPLIT'}, - {label: '道岔区段计轴故障', value: 'AXLE_FAULT'} + {label: '反位失表', value: 'REVERSE_SPLIT'} + // {label: '道岔区段计轴故障', value: 'AXLE_FAULT'} ], StationStand: [ {label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'}, @@ -49,7 +49,8 @@ export const deviceFaultType = { {label: 'zc故障', value: 'FAULT'} ], Train: [ - {label: '通信异常', value: 'COMMUNICATION_ABNORMAL'} + {label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}, + {label: '驾驶故障', value: 'DRIVE_FAULT'} ], Power:[ {label: '供电故障', value: 'FAULT'} diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index a063c08e8..1f6099519 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -2442,6 +2442,18 @@ export const OperationEvent = { menu: { operation: '2996' } + }, + // 设置托管 + collocation: { + menu: { + operation: '2997' + } + }, + // 设置连挂 + setLink: { + menu: { + operation: '2999' + } } } diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 1da1932c6..3b232efa2 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -874,11 +874,10 @@ const map = { let isExist = false; state.activeTrainList.forEach(elem => { if (elem == data.code) { + isExist = true; if (data.dispose) { state.activeTrainList.splice(state.activeTrainList.indexOf(data.code), 1); state.activeTrainListChange += 1; - } else { - isExist = true; } } }); diff --git a/src/store/modules/runplan.js b/src/store/modules/runplan.js index 32fd26060..cd9f13a54 100644 --- a/src/store/modules/runplan.js +++ b/src/store/modules/runplan.js @@ -22,36 +22,6 @@ const runPlan = { }, draftStations: (state) => { return state.draftStations || []; - }, - convertPlanData: (state) => () => { - const data = { serviceNumberDataList: [] }; - const serviceNumberList = Object.keys(state.editData).sort((a, b) => { - return state.editData[a].oldIndex - state.editData[b].oldIndex; - }); - - serviceNumberList.forEach(serviceNumber => { - const serviceObj = { - serviceNumber: serviceNumber, - tripNumberDataList: [] - }; - - if (state.editData[serviceNumber].backup) { - serviceObj['backup'] = state.editData[serviceNumber].backup; - } - - const trainMap = state.editData[serviceNumber].trainMap; - const tripNumberList = Object.keys(trainMap).sort((a, b) => { - return trainMap[a].oldIndex - trainMap[b].oldIndex; - }); - - tripNumberList.forEach(tripNumber => { - serviceObj.tripNumberDataList.push(trainMap[tripNumber]); - }); - - data.serviceNumberDataList.push(serviceObj); - }); - - return data; } }, mutations: { @@ -77,7 +47,6 @@ const runPlan = { const trainList = service.tripNumberDataList; state.initialPlanData[service.serviceNumber] = { oldIndex: i, serviceNumber: service.serviceNumber, backup: service.backup, trainMap: {} }; trainList.forEach((train, j) => { - // ${train.directionCode} state.initialPlanData[service.serviceNumber].trainMap[`${train.tripNumber}`] = { oldIndex: j, tripNumber: train.tripNumber, directionCode: train.directionCode, reentry: train.reentry, stationTimeList: train.stationTimeList }; }); }); diff --git a/src/views/drts/scene/index.vue b/src/views/drts/scene/index.vue index ed1068eae..fd4feb691 100644 --- a/src/views/drts/scene/index.vue +++ b/src/views/drts/scene/index.vue @@ -103,7 +103,7 @@ export default { }; }, created() { - getScriptPageListOnlineNew().then(response=>{ + getScriptPageListOnlineNew({pageSize:999, pageNum:1}).then(response=>{ this.scriptList = response.data.list.map(elem => { return { value: parseInt(elem.id), label: elem.name }; }); // this.queryForm.queryObject.scriptId.config.data = this.scriptList; }); diff --git a/src/views/iscs/iscsSystem/stationConfig/dialog/alarm.vue b/src/views/iscs/iscsSystem/stationConfig/dialog/alarm.vue index 65713ca5a..92ecdc9c1 100644 --- a/src/views/iscs/iscsSystem/stationConfig/dialog/alarm.vue +++ b/src/views/iscs/iscsSystem/stationConfig/dialog/alarm.vue @@ -4,17 +4,6 @@ v-show="show" class="iscs_fuzhou-01__systerm route-detail el-dialog" > -
报警浏览
- @@ -80,7 +68,6 @@ export default { - diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index f04438a67..f4765aad9 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -67,8 +67,8 @@ export default { viewDisabled: true, swch: '02', isScriptCommand:false, - faultMode: false, - firstLoad: true + faultMode: false + // firstLoad: true }; }, computed: { diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue index 0d3331b5c..70c10c0b6 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue @@ -233,7 +233,7 @@ export default { type: 'role', children: result.deviceListData[1] }, { - label: '车辆段', + label: '车辆段信号楼', id: 'depotDispatcher', type: 'role', children: result.deviceListData[4] diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue b/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue index e09159481..517625e7b 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptRecord/index.vue @@ -88,12 +88,6 @@ export default { default() { return 0; } - }, - project:{ - type: String, - default() { - return ''; - } } }, data() { @@ -228,10 +222,8 @@ export default { }); }, back() { - this.$store.dispatch('training/over').then(() => { - history.go(-1); - Notification.closeAll(); - }); + history.go(-1); + Notification.closeAll(); }, resetChat() { // this.$refs.chatbox.resetCoversition(); diff --git a/src/views/newMap/displayNew/utils.js b/src/views/newMap/displayNew/utils.js index 83a6b9966..c6478fcbc 100644 --- a/src/views/newMap/displayNew/utils.js +++ b/src/views/newMap/displayNew/utils.js @@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) { member.label = member.type + name + userName; member.normalName = member.type + name; } - const deviceType = ['行调', '通号', '行值', '司机', '车辆段调度', '上级部门', '电力调度', '停车场信号楼']; + const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼']; const deviceTypeIndex = deviceType.indexOf(member.type); if (deviceTypeIndex >= 0) { if (deviceTypeIndex == 3) { diff --git a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue index bc8469054..cdfcbd658 100644 --- a/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue +++ b/src/views/newMap/jointTrainingNew/memberManage/membersManage.vue @@ -158,7 +158,7 @@ export default { electricDispatcherList.push(this.memberData[item.id]); break; case 'DEPOT_DISPATCHER': - this.memberData[item.id].labelName = '车辆段调度' + (item.name || ''); + this.memberData[item.id].labelName = '车辆段信号楼' + (item.name || ''); depotDispatcherList.push(this.memberData[item.id]); break; case 'STATION_SUPERVISOR': @@ -192,7 +192,7 @@ export default { id: 'maintainer', children: maintainerList }, { - labelName: '车辆段', + labelName: '车辆段信号楼', id: 'depotDispatcher', children: depotDispatcherList }, { diff --git a/src/views/newMap/mapsystemNew/common/index.vue b/src/views/newMap/mapsystemNew/common/index.vue index 432fd5e81..f4310e478 100644 --- a/src/views/newMap/mapsystemNew/common/index.vue +++ b/src/views/newMap/mapsystemNew/common/index.vue @@ -83,9 +83,9 @@ export default { if (device._type == 'Section' && device.type == '03') { // 过滤道岔相关区段变成道岔model device = this.$store.getters['map/getDeviceByCode'](device.switch.code); } - if (device._type == 'Section' && device.type == '04') { - device = null; - } + // if (device._type == 'Section' && device.type == '04') { + // device = null; + // } return device; }, clickEvent(em) { @@ -180,12 +180,14 @@ export default { }, checkShouldPop(device) { const lineCode = this.$store.getters['map/lineCode']; - if (device._type === 'Signal') { - return device._viewVal === '3'; - } else if (device._type === 'StationControl' && lineCode == '01') { // 中控模式显示范围 - return device._viewVal === '1'; - } else { - return true; + if (device) { + if (device._type === 'Signal') { + return device._viewVal === '3'; + } else if (device._type === 'StationControl' && lineCode == '01') { // 中控模式显示范围 + return device._viewVal === '1'; + } else { + return true; + } } }, mapViewLoaded(loading) { diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index 80bb2d794..bb061bc4d 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -467,8 +467,8 @@ export default { }); }, updateMapModel(data) { - this.$emit('updateMapModel', data); - this.field = ''; + this.$emit('updateMapModel', data); + this.field = ''; }, deleteObj() { this.$refs.dataform.deleteObj(); diff --git a/src/views/scriptManage/conditionManage.vue b/src/views/scriptManage/conditionManage.vue index 8fc4e5cdd..63b52fe03 100644 --- a/src/views/scriptManage/conditionManage.vue +++ b/src/views/scriptManage/conditionManage.vue @@ -136,7 +136,7 @@ export default { watch: { '$store.state.menuOperation.selectedCount':function(em) { const device = this.$store.state.menuOperation.selected; - if (device.code) { + if (device && device.code) { this.deviceSelect(device); } } diff --git a/src/views/scriptManage/tipScriptRecord.vue b/src/views/scriptManage/tipScriptRecord.vue index 27e7718a7..07ecf0032 100644 --- a/src/views/scriptManage/tipScriptRecord.vue +++ b/src/views/scriptManage/tipScriptRecord.vue @@ -195,7 +195,7 @@ export default { type: 'role', children: result.deviceListData[1] }, { - label: '车辆段', + label: '车辆段信号楼', id: 'depotDispatcher', type: 'role', children: result.deviceListData[4] @@ -273,7 +273,7 @@ export default { const covertmember = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew); const newMember = covertmember[0]; this.memberList.push(newMember); - const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段调度', '上级部门', '电力调度', '停车场信号楼']; + const deviceTypeList = ['行调', '行值', '司机', '通号', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼']; const index = deviceTypeList.indexOf(newMember.type); if (index >= 0) { const treeDataIn = this.treeData[index]; @@ -479,7 +479,7 @@ export default { } }); this.openWindow = window.open(routeData.href); - } else if (role.type == '车辆段调度') { + } else if (role.type == '车辆段信号楼') { prdType = '05'; role.type = 'DEPOT_DISPATCHER'; this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER'); @@ -520,7 +520,7 @@ export default { 'DISPATCHER':'行调', 'DRIVER':'司机', 'MAINTAINER':'通号', - 'DEPOT_DISPATCHER':'车辆段调度', + 'DEPOT_DISPATCHER':'车辆段信号楼', 'PARENT_DEPARTMENT':'上级部门', 'ELECTRIC_DISPATCHER':'电力调度', 'PARKING_LOT_SIGNAL_BUILDING':'停车场信号楼' diff --git a/src/views/system/commandDictionary/copyParam.vue b/src/views/system/commandDictionary/copyParam.vue index 1d6bd21c0..7ced5e307 100644 --- a/src/views/system/commandDictionary/copyParam.vue +++ b/src/views/system/commandDictionary/copyParam.vue @@ -19,6 +19,12 @@ export default { default() { return []; } + }, + deviceTypeList:{ + type: Array, + default() { + return []; + } } }, data() { @@ -30,9 +36,7 @@ export default { targetIds: '', deviceType: [] }, - deviceTypeList: [], - targetList: [], - lineCode: '' + targetList: [] }; }, computed: { @@ -58,36 +62,17 @@ export default { }; } }, - watch: { - taskStatusList(list) { - this.targetList = []; - list.forEach(item => { - if (item.value != this.lineCode) { - this.targetList.push(item); - } - }); - } - }, - created() { - this.deviceTypeList = []; - this.$ConstSelect.deviceTypeList.forEach(item => { - this.deviceTypeList.push(item); - }); - }, methods: { doShow(lineCode) { this.dialogVisible = true; if (lineCode) { - this.lineCode = lineCode; this.targetList = []; this.taskStatusList.forEach(item => { - item.value = item.code; - item.label = item.name; - if (item.code != lineCode) { + if (item.value != lineCode) { this.targetList.push(item); } else { - this.formModel.fromCode = item.code; - this.formModel.fromName = item.name; + this.formModel.fromCode = item.value; + this.formModel.fromName = item.label; } }); } diff --git a/src/views/system/commandDictionary/edit.vue b/src/views/system/commandDictionary/edit.vue index d7b4d6fd6..f904aa247 100644 --- a/src/views/system/commandDictionary/edit.vue +++ b/src/views/system/commandDictionary/edit.vue @@ -27,10 +27,14 @@
指令参数:
- + + + @@ -44,9 +48,6 @@ {{ $t('global.confirm') }} 返回
- - - @@ -56,7 +57,6 @@ import ConstConfig from '@/scripts/ConstConfig'; import Cookies from 'js-cookie'; import { createCommand, editCommand, getCommandDetail } from '@/api/management/dictionary'; -import CommandEdit from './editParam'; import { getLineCodeList } from '@/api/management/mapline'; import EditCondition from './editCondition'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; @@ -64,7 +64,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'DictionaryEdit', components: { - CommandEdit, EditCondition }, props: { @@ -165,6 +164,9 @@ export default { }, doSave() { this.$refs.dataform.validateForm(() => { + this.formModel.paramList = this.formModel.paramList.filter(param=>{ + return param.name != ''; + }); if (this.type == 'add') { this.create(); } else { @@ -191,21 +193,16 @@ export default { }); }, handleBack() { - this.$router.push({ path: `/system/commands`, query: { } }); - }, - - editData(data) { - this.formModel.paramList.splice(this.editIndex, 1, data); - }, - addData(data) { - this.formModel.paramList.push(data); + this.$router.go(-1); }, addParam() { - this.$refs.create.doShow(); + this.formModel.paramList.push({name:''}); + this.$nextTick(()=>{ + document.querySelector('#param' + (this.formModel.paramList.length - 1)).focus(); + }); }, - editParam(index, row) { - this.$refs.edit.doShow(row); - this.editIndex = index; + editParam(index) { + document.querySelector('#param' + index).focus(); }, delParam(index) { this.formModel.paramList.splice(index, 1); @@ -274,4 +271,15 @@ export default { justify-content: center; } } + .paramCode{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + border: none; + text-indent: 10px; + outline: none; + color: #606266; + } diff --git a/src/views/system/commandDictionary/editParam.vue b/src/views/system/commandDictionary/editParam.vue deleted file mode 100644 index fc8c72ca7..000000000 --- a/src/views/system/commandDictionary/editParam.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/src/views/system/commandDictionary/index.vue b/src/views/system/commandDictionary/index.vue index b164868ba..f73039cd4 100644 --- a/src/views/system/commandDictionary/index.vue +++ b/src/views/system/commandDictionary/index.vue @@ -2,7 +2,7 @@
- +
@@ -22,6 +22,7 @@ export default { data() { return { taskStatusList: [], + deviceTypeList:[], operateList: [], pagerConfig: { pageSize: 'pageSize', @@ -57,14 +58,14 @@ export default { title: this.$t('system.lineCode'), // 线路编号 prop: 'lineCode', type: 'tag', - columnValue: (row) => { return this.$convertField(row.lineCode, this.taskStatusList, ['code', 'name']); }, + columnValue: (row) => { return this.convertField(this.taskStatusList, row.lineCode); }, tagType: (row) => { return 'success'; } }, { title: this.$t('system.simulationRole'), // 仿真角色 prop: 'simulationRole', type: 'tag', - columnValue: (row) => { return this.$convertField(row.simulationRole, this.$ConstSelect.simulationRole, ['value', 'label']); }, + columnValue: (row) => { return this.convertField(this.$ConstSelect.simulationRole, row.simulationRole); }, tagType: (row) => { return 'success'; } }, { @@ -78,7 +79,7 @@ export default { title: this.$t('system.deviceType'), // 操作对象 prop: 'operateObject', type: 'tag', - columnValue: (row) => { return this.$convertField(row.operateObject, this.$ConstSelect.deviceTypeList, ['value', 'label']); }, + columnValue: (row) => { return this.convertField( this.deviceTypeList, row.operateObject); }, tagType: (row) => { return ''; } }, { @@ -130,7 +131,6 @@ export default { currentModel: {} }; }, - mounted () { this.loadInitData(); }, @@ -140,13 +140,14 @@ export default { this.taskStatusList = []; this.mapList = []; const list = await getLineCodeList(); - this.taskStatusList = list.data; list.data.forEach(elem => { - this.queryForm.queryObject.lineCode.config.data.push({ value: elem.code, label: elem.name }); + this.taskStatusList.push({ value: elem.code, label: elem.name }); }); + this.queryForm.queryObject.lineCode.config.data = this.taskStatusList; this.$ConstSelect.deviceTypeList.forEach(elem => { - this.queryForm.queryObject.operateObject.config.data.push(elem); + this.deviceTypeList.push(elem); }); + this.queryForm.queryObject.operateObject.config.data = this.deviceTypeList; } catch (error) { console.log(error); } @@ -161,13 +162,11 @@ export default { }, replace(fieldValue) { const arr = []; - if (fieldValue && fieldValue.length) { - fieldValue.forEach((v, j) => { - if (v.name) { - arr.push(v.name); - } - }); - } + fieldValue.forEach((v, j) => { + if (v.name) { + arr.push(v.name); + } + }); return arr; }, // 显示条件参数 @@ -192,7 +191,6 @@ export default { this.$message.success(this.$t('system.deleteSuccess')); this.reloadTable(); }).catch(() => { - this.reloadTable(); this.$messageBox(this.$t('error.deleteFailed')); }); }); @@ -218,6 +216,10 @@ export default { }, reloadTable() { this.queryList.reload(); + }, + convertField(list, status) { + console.log(list, typeof list, status); + if (list && list.length > 0) { return list.find(each=>{ return status == each.value; }).label; } } } };