Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly

This commit is contained in:
joylink_cuiweidong 2023-01-16 18:22:52 +08:00
commit a08bce7316
13 changed files with 67 additions and 48 deletions

View File

@ -68,19 +68,19 @@ export default {
tempData: [],
strategyList: [
{
value: '01',
value: 'NONE',
label: '无折返'
},
{
value: '02',
value: 'UNMANNED',
label: '无人折返'
},
{
value: '03',
value: 'AUTO',
label: '自动换端'
},
{
value: '04',
value: 'DEFAULT',
label: '关闭'
}
],
@ -118,12 +118,12 @@ export default {
loadInitData(selected, opts) {
this.tempData = [];
const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
this.tempData.push({ name: station.name, station: selected.name, strategy: opts ? opts.reentryStrategy : '' });
this.$nextTick(() => {
this.$refs.table.setCurrentRow(null);
});
},
doShow(operate, selected, opts) {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.stationName = '';
@ -132,14 +132,18 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
this.strategyList.forEach(item => {
if (item.value == opts.reentryStrategy) {
this.stationStrategy = item.label;
}
});
if (selected.typeStrategy === 'DEFAULT') {
this.stationStrategy = '关闭';
} else if (selected.typeStrategy === 'NONE') {
this.stationStrategy = '无折返';
} else if (selected.typeStrategy === 'UNMANNED') {
this.stationStrategy = '无人折返';
} else if (selected.typeStrategy === 'AUTO') {
this.stationStrategy = '自动换端';
}
}
}
this.loadInitData(selected, opts);
this.loadInitData(selected);
}
this.dialogShow = true;
@ -177,7 +181,7 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},

View File

@ -235,7 +235,8 @@ export default {
commit() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.close.confirm.operation
operation: OperationEvent.Command.close.confirm.operation,
over: true
};
this.loading = true;
@ -252,7 +253,8 @@ export default {
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
operation: OperationEvent.Command.cancel.menu.operation,
cancel: true
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {

View File

@ -147,11 +147,14 @@ export default {
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
]),
roles() {
return this.$store.state.training.roles;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -193,18 +193,22 @@ export default {
...mapGetters('map', ['routeList']),
group() {
return this.$route.query.group;
},
roles() {
return this.$store.state.training.roles;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
},
'$store.state.menuOperation.selectedCount': function (val) {
if (this.$store.state.menuOperation.selected._type == 'Signal' && this.$store.state.training.prdType == '09') {
// '$store.state.menuOperation.selectedCount': function (val) {
'$store.state.menuOperation.leftClickCount': function (val) {
if (this.$store.state.menuOperation.selected._type == 'Signal' && this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER') { //
if (this.buttonOperation) {
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
this.$parent.$refs.menuDeplotButton.clearCountDown();

View File

@ -117,11 +117,14 @@ export default {
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
]),
roles() {
return this.$store.state.training.roles;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -183,11 +183,14 @@ export default {
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
]),
roles() {
return this.$store.state.training.roles;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -151,11 +151,14 @@ export default {
},
computed: {
...mapGetters('training', ['mode', 'operatemode']),
...mapGetters('menuOperation', ['buttonOperation'])
...mapGetters('menuOperation', ['buttonOperation']),
roles() {
return this.$store.state.training.roles;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();

View File

@ -160,7 +160,9 @@ export default {
},
mounted() {
this.routes = this.$router.options.routes;
if (this.$route.fullPath.includes('/trainingPlatform/simulation')) {
if (this.$route.fullPath.includes('/teaching/organization')) {
this.activePath = '/teaching/organization';
} else if (this.$route.fullPath.includes('/trainingPlatform/simulation')) {
this.activePath = '/simulation/simulationIndex';
} else if (this.$route.fullPath.indexOf('design/usermap') >= 0) {
this.activePath = '/design/usermap/home';

View File

@ -206,8 +206,11 @@ export default {
this.logout();
});
} else if (this.$route.query.third) {
// this.$router.push({ path: `/trainingPlatform/simulation/${this.$route.query.mapId}`, query: { lineCode: this.$route.query.lineCode } });
window.close();
if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') {
window.parent.postMessage('back', '*');
} else {
window.close();
}
} else if (this.projectDevice) {
this.logout();
} else {

View File

@ -149,7 +149,6 @@ export default {
},
watch: {
'$store.state.map.mapViewLoadedCount': function (val) { //
this.subscribe('STATE');
this.subscribe('ATS_STATUS');
if (this.isFirst) {
this.$store.dispatch('training/setMapDefaultState');
@ -187,6 +186,7 @@ export default {
this.group = this.$route.query.group;
this.isFirst = true;
this.subscribe('COMMON');
this.subscribe('STATE');
},
beforeDestroy() {
this.clearSubscribe();

View File

@ -83,7 +83,7 @@ export default {
{
name: '簿册',
code: 'registerBook',
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT'],
roleList: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER'],
isShow: () => this.$route.query.simType === 'RAILWAY',
click: this.changePictureShow
},

View File

@ -46,25 +46,17 @@ export default {
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
if (this.mapData && this.mapData.pictureList) {
const picture = this.mapData.pictureList.find(picture => picture.type === 'dispatchWork');
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) {
this.handlerPictureShow(picture);
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
const list = [];
for (const key in this.mapDevice) {
list.push(this.mapDevice[key]);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) {
deviceList.push(deviceCode);
}
this.$jlmap.updateShowStation(list);
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin);
}
} else {
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
const list = [];
for (const key in this.mapDevice) {
list.push(this.mapDevice[key]);
}
this.$jlmap.updateShowStation(list);
}
this.updateJlmapMode('05');
},

View File

@ -27,7 +27,7 @@ export default {
labels: this.$route.query.labels,
third: true
};
this.$router.push({ path: `/display/demon`, query: query });
this.$router.replace({ path: `/display/demon`, query: query });
launchFullscreen();
}).catch(error=>{
if (error.code == 10003) {