Merge remote-tracking branch 'origin/develop'
All checks were successful
master分支构建发布到公网服务器 / Build-Publish (push) Successful in 6m37s

This commit is contained in:
joylink_fanyuhong 2024-09-30 09:32:05 +08:00
commit 4e37183818
20 changed files with 347 additions and 40 deletions

View File

@ -346,14 +346,15 @@ class SkinCode extends defaultStyle {
this[deviceType.StationTurnBack] = { // 站后折返 this[deviceType.StationTurnBack] = { // 站后折返
lamp: { lamp: {
fill: '#f1f1f1', // 填充色 fill: '#ccc', // 填充色
radiusR: 7 // 控制灯大小 radiusR: 6,
otherFill: '#0F0' // 控制灯大小
}, },
text: { text: {
titleTextShow: false, titleTextShow: false,
fontWeight: 580, fontWeight: 580,
fontSize: 10, fontSize: 10,
distance: 10 distance: 5
}, },
rect: { rect: {
fill: 'rgba(0,0,0,0)', fill: 'rgba(0,0,0,0)',

View File

@ -166,6 +166,11 @@ export default class StationTurnBack extends Group {
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor); this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
} }
} }
if (this.style.StationTurnBack.lamp.otherFill) {
if (name == '自动折返' || name == '固定折返轨1' || name == '固定折返轨1') {
this.control && this.control.setStyle({fill: this.style.StationTurnBack.lamp.otherFill});
}
}
} }
setAshShow() { setAshShow() {

View File

@ -0,0 +1,174 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationName" size="mini" disabled />
</div>
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
<div style="margin-bottom: 5px;">
<el-input v-model="stationStrategy" size="mini" disabled />
</div>
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
<el-table
ref="table"
:data="strategyList"
border
:cell-style="tableStyle"
style="width: 100%; margin-top:10px"
size="mini"
height="180"
highlight-current-row
:show-header="false"
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="label" style="margin-left:30px" />
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
name: 'StandBackStrategy',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
strategyList: [],
stationName: '',
stationStrategy: '',
selection: [],
isConfirm: false,
strategyId: '',
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Station.setBackStrategy.choose.domId : '';
},
title() {
return '策略选择';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
const name = selected.optionList.find(ele => ele.id == selected.tbStrategyId).label;
this.stationName = selected.name || '';
this.stationStrategy = selected.tbStrategyId ? name : '无策略折返'; //
this.strategyList = selected.optionList; //
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
clickEvent(row, column, event) {
const operate = {
operation: OperationEvent.Station.setBackStrategy.choose.operation
};
this.strategyId = row.id;
this.isConfirm = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.isConfirm) {
this.loading = true;
commitOperate(menuOperate.StationControl.setBackStrategy, {id: this.strategyId}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
this.doClose();
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -8,6 +8,7 @@
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" /> <menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" /> <menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" /> <menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" :work="'dispatchWork'" />
<passive-alarm ref="passiveAlarm" /> <passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" /> <passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
@ -24,6 +25,7 @@ import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection'; import MenuSection from './menuSection';
import MenuStation from './menuStation'; import MenuStation from './menuStation';
import MenuTrain from './menuTrain'; import MenuTrain from './menuTrain';
import MenuStationTurnBack from './menuStationTurnBack.vue';
import PassiveAlarm from './passiveDialog/alarm'; import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
@ -40,7 +42,8 @@ export default {
MenuTrain, MenuTrain,
PassiveAlarm, PassiveAlarm,
PassiveContorl, PassiveContorl,
PassiveTimeout PassiveTimeout,
MenuStationTurnBack
}, },
props: { props: {
selected: { selected: {

View File

@ -350,7 +350,7 @@ export default {
} }
} }
// //
if (signal.aspect == 'R' && isArrangementRoute) { // if (signal.lockedRouteCode) { //
operate.over = true; operate.over = true;
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL; operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
operate.code = deviceList[0].code; operate.code = deviceList[0].code;
@ -370,7 +370,8 @@ export default {
this.routeList.forEach(item => { this.routeList.forEach(item => {
// item.endButtonSignalCode // item.endButtonSignalCode
// //
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { const endSignalCode = item.endButtonSignalCode || item.endSignalCode;
if (item.startSignalCode === deviceList[0].code && endSignalCode === deviceList[1].code) {
operate.over = true; operate.over = true;
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
operate.code = deviceList[1].code; operate.code = deviceList[1].code;
@ -396,19 +397,28 @@ export default {
operation: this.$store.state.menuOperation.buttonOperation, operation: this.$store.state.menuOperation.buttonOperation,
param: {} param: {}
}; };
if (model._type === 'StationStand' && subType === 'StopJumpLamp') { let controlMode = '';
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
if (station) {
controlMode = station.controlMode;
// if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
// controlFlag = true;Interlock
// }
}
const list2 = ['Local', 'Emergency'];
if (model._type === 'StationStand' && subType === 'StopJumpLamp' && list2.includes(controlMode)) {
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP; operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
operate.param = {standCode: model.code, trainGroupNumber: ''}; operate.param = {standCode: model.code, trainGroupNumber: ''};
operate.code = model.code; operate.code = model.code;
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') { } else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp' && list2.includes(controlMode)) {
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP; operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
operate.param = {standCode: model.code, trainGroupNumber: ''}; operate.param = {standCode: model.code, trainGroupNumber: ''};
operate.code = model.code; operate.code = model.code;
} else if (model._type === 'AutoTurnBack' ) { } else if (model._type === 'AutoTurnBack' && controlMode === 'Interlock') {
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
operate.param = {cycleCode: model.cycleCode}; operate.param = {cycleCode: model.cycleCode};
operate.code = model.code; operate.code = model.code;
} else if (model._type === 'AutomaticRoute') { } else if (model._type === 'AutomaticRoute' && controlMode === 'Interlock') {
const route = this.routeData[model.automaticRouteCode]; const route = this.routeData[model.automaticRouteCode];
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
operate.param = {signalCode: route.startSignalCode}; operate.param = {signalCode: route.startSignalCode};
@ -436,13 +446,16 @@ export default {
operate.code = model.code; operate.code = model.code;
break; break;
case 'interconnected': case 'interconnected':
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL; operate.cmdType = CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL;
delete operate.over; delete operate.over;
operate.subType = 'interconnected'; operate.subType = 'interconnected';
operate.param = {stationCodes: [model.code]}; operate.param = {stationCodes: [model.code]};
operate.code = model.code; operate.code = model.code;
break; break;
} }
} else {
this.$message.info('请检查操作设备或控制权');
return;
} }
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
// //
@ -559,7 +572,8 @@ export default {
}; };
let flag = false; let flag = false;
this.routeList.forEach(item => { this.routeList.forEach(item => {
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { const endSignalCode = item.endButtonSignalCode || item.endSignalCode;
if (item.startSignalCode === deviceList[0].code && endSignalCode === deviceList[1].code) {
operate.param = {routeCode: item.code, signalCode: deviceList[0].code}; operate.param = {routeCode: item.code, signalCode: deviceList[0].code};
this.deviceList = []; this.deviceList = [];
flag = true; flag = true;
@ -705,38 +719,37 @@ export default {
this.handelFunctionButton(model, subType); this.handelFunctionButton(model, subType);
} else { } else {
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode); const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
const list1 = ['Local', 'Emergency', 'Interlock'];
const list2 = ['Local', 'Emergency'];
if (station) { if (station) {
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
if (buttonOperation && this.commandTypeList.includes(model._type)) { if (buttonOperation && this.commandTypeList.includes(model._type)) {
this.deviceList.push(model); this.deviceList.push(model);
if (buttonOperation === this.Signal.arrangementRoute.button.operation) { if (buttonOperation === this.Signal.arrangementRoute.button.operation && list1.includes(station.controlMode)) {
this.arrangementRouteOperation(this.deviceList); this.arrangementRouteOperation(this.deviceList);
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) { } else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handelTotalCancel(model, subType); this.handelTotalCancel(model, subType);
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) { } else if (buttonOperation === this.Signal.humanTrainRoute.button.operation && list1.includes(station.controlMode)) {
this.handleTotalHumanSolution(model); this.handleTotalHumanSolution(model);
} else if (buttonOperation === this.Signal.guide.button.operation) { } else if (buttonOperation === this.Signal.guide.button.operation && list1.includes(station.controlMode)) {
this.handleGuideRoute(this.deviceList); this.handleGuideRoute(this.deviceList);
} else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) { } else if ((buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) && list2.includes(station.controlMode)) {
this.handelControlRoute(model); this.handelControlRoute(model);
} else if (switchOperation.includes(buttonOperation)) { } else if (switchOperation.includes(buttonOperation) && list1.includes(station.controlMode)) {
this.handelSwitchOperate(model); this.handelSwitchOperate(model);
} else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) { } else if ((buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) && list1.includes(station.controlMode)) {
this.handelBlockOrUnblock(model); this.handelBlockOrUnblock(model);
} else if (buttonOperation === this.Station.guideLock.button.operation) { } else if (buttonOperation === this.Station.guideLock.button.operation && station.controlMode === 'Interlock') {
this.handelGuideLock(model); this.handelGuideLock(model);
} else if (buttonOperation === this.Section.fault.button.operation) { } else if (buttonOperation === this.Section.fault.button.operation && list1.includes(station.controlMode)) {
this.handelFaultSection(model); this.handelFaultSection(model);
} else { } else {
this.clearOperate(); this.clearOperate();
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
} }
} else { } else {
this.clearOperate(); this.clearOperate();
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
} }
} else {
this.clearOperate();
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
}
} }
} }
}, },

View File

@ -0,0 +1,105 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<station-back-strategy ref="stationBackStrategy" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StationBackStrategy from './dialog/stationBackStrategy';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'MenuStationTurnBack',
components: {
PopMenu,
StationBackStrategy
},
props: {
selected: {
type: Object,
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuNormal: [
{
label: '设置折返策略',
handler: this.setBackStrategy,
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
}
],
menuForce: [
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationTurnBack) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initMenu() {
//
this.menu = [];
this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
doShow(point) {
this.initMenu();
if (this.menu && this.menu.length > 0) {
this.setBackStrategy();
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setBackStrategy() {
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.stationCode}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.stationBackStrategy.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -299,7 +299,7 @@ export default {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'lucency'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'lucency');
if (picture) { if (picture) {
this.$jlmap.updateShowStation(list, ''); this.$jlmap.updateShowStation(list, '');
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {
@ -320,7 +320,7 @@ export default {
if (this.$store.state.map.map && this.$store.state.map.map.pictureList) { if (this.$store.state.map.map && this.$store.state.map.map.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'chainStation'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCodes && picture.stationCodes.includes(this.roleDeviceCode) && picture.type === 'chainStation');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -100,7 +100,7 @@ export default {
this.show = true this.show = true
this.$nextTick(() => { this.$nextTick(() => {
const picData = this.mapData.pictureList.find(pic => pic.stationCodes.includes(stationCode) && pic.type === 'regionBatchOperation') const picData = this.mapData.pictureList.find(pic => pic.stationCodes.includes(stationCode) && pic.type === 'regionBatchOperation')
this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap) this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap || {})
const list = [] const list = []
for (const deviceCode in picData.deviceMap) { for (const deviceCode in picData.deviceMap) {
list.push(deviceCode) list.push(deviceCode)

View File

@ -131,7 +131,7 @@ export default {
picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
} }
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -49,7 +49,7 @@ export default {
if (this.mapData && this.mapData.pictureList) { if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -97,7 +97,7 @@ export default {
list.push(this.mapDevice[key]); list.push(this.mapDevice[key]);
deviceList.push(key); deviceList.push(key);
} }
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -61,7 +61,7 @@ export default {
if (this.mapData && this.mapData.pictureList) { if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -82,7 +82,7 @@ export default {
deviceList.push(key); deviceList.push(key);
} }
this.$jlmap.updateShowStation(list); this.$jlmap.updateShowStation(list);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin); this.$jlmap.updateTransform(picture.scaling, picture.origin);

View File

@ -89,7 +89,7 @@ export default {
list.push(this.mapDevice[key]); list.push(this.mapDevice[key]);
deviceList.push(key); deviceList.push(key);
} }
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -117,7 +117,7 @@ export default {
deviceList.push(key); deviceList.push(key);
} }
this.$jlmap.updateShowStation(list); this.$jlmap.updateShowStation(list);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -92,7 +92,7 @@ export default {
deviceList.push(key); deviceList.push(key);
} }
this.$jlmap.updateShowStation(list); this.$jlmap.updateShowStation(list);
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin); this.$jlmap.updateTransform(picture.scaling, picture.origin);
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]); this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationMap[this.roleDeviceCode]);

View File

@ -118,7 +118,7 @@ export default {
list.push(this.mapDevice[key]); list.push(this.mapDevice[key]);
deviceList.push(key); deviceList.push(key);
} }
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
setTimeout(() => { setTimeout(() => {
this.$jlmap.updatePicture(deviceList); this.$jlmap.updatePicture(deviceList);
const trainingDetail = this.$store.state.trainingNew.trainingDetail; const trainingDetail = this.$store.state.trainingNew.trainingDetail;

View File

@ -48,7 +48,7 @@ export default {
if (this.mapData && this.mapData.pictureList) { if (this.mapData && this.mapData.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen'); const picture = this.$store.state.map.map.pictureList.find(picture => picture.type === 'bigScreen');
if (picture) { if (picture) {
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap); this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap || {});
const deviceList = []; const deviceList = [];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
for (const deviceCode in mapDevice) { for (const deviceCode in mapDevice) {

View File

@ -451,7 +451,7 @@ export default {
this.$refs.mapOperate.pictureChanged(pictureName); this.$refs.mapOperate.pictureChanged(pictureName);
const pictureModel = this.$store.state.map.map.pictureList.find(elem => elem.name == pictureName); const pictureModel = this.$store.state.map.map.pictureList.find(elem => elem.name == pictureName);
const deviceMap = pictureModel ? pictureModel.deviceMap : {}; const deviceMap = pictureModel ? pictureModel.deviceMap : {};
this.$store.dispatch('map/setPictureDeviceMap', deviceMap); this.$store.dispatch('map/setPictureDeviceMap', deviceMap || {});
const deviceList = []; const deviceList = [];
const map = this.$store.state.map.map; const map = this.$store.state.map.map;
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;

View File

@ -1199,7 +1199,13 @@ export default {
deviceCode: '' deviceCode: ''
}; };
memberMap[this.generationForm.systemType].push(memberEnvironmentDispatcher); memberMap[this.generationForm.systemType].push(memberEnvironmentDispatcher);
const memberScheduling = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'SCHEDULING',
deviceCode: ''
};
memberMap[this.generationForm.systemType].push(memberScheduling);
} }
this.$message.success('一键生成成功!'); this.$message.success('一键生成成功!');
this.resetForm(); this.resetForm();