diff --git a/src/jmapNew/theme/xian_01/menus/menuBar.vue b/src/jmapNew/theme/xian_01/menus/menuBar.vue index 527d7b2c4..11c964005 100644 --- a/src/jmapNew/theme/xian_01/menus/menuBar.vue +++ b/src/jmapNew/theme/xian_01/menus/menuBar.vue @@ -5,7 +5,7 @@ - + @@ -15,6 +15,7 @@ + @@ -23,6 +24,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBar'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js'; import StationControlConvert from './menuDialog/stationControlConvert'; +import WarningInfo from './menuDialog/warningInfo'; import TrainAdd from './menuDialog/trainAdd'; // import AddRunplanLine from './menuDialog/addRunplanLine'; import TrainTranstalet from './menuDialog/trainTranstalet'; @@ -50,7 +52,8 @@ export default { TrainTranstalet, TrainDelete, ManageUser, - HelpAbout + HelpAbout, + WarningInfo // DeleteRunplanLine }, props: { @@ -484,6 +487,9 @@ export default { blankClickClose() { this.$refs.menuBar.doClose(); }, + warningInfoDoShow(info) { + this.$refs.warningInfo.doShow(info); + }, undeveloped() { this.$refs.menuBar.doClose(); this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), { diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue index 7339a23a1..65a827a7d 100644 --- a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue @@ -153,6 +153,12 @@ export default { '$store.state.map.controlTransfer':function (controlTransferList) { controlTransferList.forEach(controlTransfer=>{ this.updateTableValue(controlTransfer); + if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] && + this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id && + this.$store.state.training.prdType === '01' + ) { + this.$emit('warningInfoDoShow', controlTransfer); + } }); }, // 深度数据状态 @@ -164,7 +170,7 @@ export default { } }, mounted() { - this.loadTableData(); + // this.loadTableData(); }, methods: { updateTableValue(controlTransfer) { @@ -241,15 +247,37 @@ export default { } }, initTableDataStatus() { - this.tableData.forEach(row => { - row.disabled = this.checkBoxDisabled(row); - row.check = false; - row.result = ''; - const control = this.$store.getters['map/getDeviceByCode'](row.code); - if (control) { - row.control = this.controlProps[control.controlMode]; - } - }); + this.tableData = []; + if (this.$store.state.training.prdType === '02') { + this.stationList && this.stationList.forEach(station => { + if (station.createControlMode) { + const control = this.$store.getters['map/getDeviceByCode'](station.code); + this.tableData.push({ + code: station.code, + operate: station.name || '', + control: control ? this.controlProps[control.controlMode] : '', + check: false, + disabled: this.checkBoxDisabled(station), + status: '正常', + result: '' + }); + } + }); + } else if (this.$store.state.training.prdType === '01') { + const stationCodeList = this.$store.state.map.stationControlMap[this.$store.state.training.roleDeviceCode]; + stationCodeList && stationCodeList.forEach(stationCode => { + const station = this.$store.getters['map/getDeviceByCode'](stationCode); + this.tableData.push({ + code: station.code, + operate: station.name || '', + control: station ? this.controlProps[station.controlMode] : '', + check: false, + disabled: this.checkBoxDisabled(station), + status: '正常', + result: '' + }); + }); + } }, doShow(operate) { if (!this.dialogShow) { diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue new file mode 100644 index 000000000..0fb63db15 --- /dev/null +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/store/modules/map.js b/src/store/modules/map.js index e49d18313..91d38410f 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -246,7 +246,8 @@ const map = { controlTransfer:[], // 控制权转移消息 mapDataParseCount: 0, foldLineMap: {}, // 现地折行线map数据 - clearButtonCount: 0 // 清除操作按钮计数器 + clearButtonCount: 0, // 清除操作按钮计数器 + stationControlMap: {} // 站控显示的map { 当前车站:显示车站列表 } }, getters: { @@ -718,6 +719,18 @@ const map = { state.foldLineMap = foldLineMap; const parser = parserFactory(ParserType.Graph.value); state.mapDevice = parser.parser(map, map.skinVO.code, showConfig); + state.stationControlMap = {}; + map.stationList.forEach(station => { + if (station.ciStation) { + const centrailzedList = [station.code]; + station.relStationCodeList.forEach(relStationCode => { + state.stationControlMap[relStationCode] = centrailzedList; + if (state.mapDevice[relStationCode].centralized) { + centrailzedList.push(relStationCode); + } + }); + } + }); Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice); } else { state.map = null;