成都三号线调整

This commit is contained in:
joylink_fanyuhong 2020-02-10 19:10:43 +08:00
parent 73ee89f299
commit 50a4f8ab0b
11 changed files with 139 additions and 64 deletions

View File

@ -816,9 +816,9 @@ export default class Section extends Group {
// } // }
// /** 区段切除*/ // /** 区段切除*/
// if (model.cutOff) { if (model.cutOff) {
// this.sectionCutOff(); this.sectionCutOff();
// } }
// /** 是否限速*/ // /** 是否限速*/
// if (model.speedUpperLimit >= 0) { // if (model.speedUpperLimit >= 0) {
// this.setSpeedUpperLimit(); // this.setSpeedUpperLimit();

View File

@ -33,14 +33,33 @@
highlight-current-row highlight-current-row
@row-click="clickEvent" @row-click="clickEvent"
> >
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" /> <el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;width: 80px">
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }} <div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}" style="width: 90px">
{{ handleRouteName(scope.row.name) }}
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px"> <el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template></template> <template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
</div>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -57,6 +76,7 @@
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog> </el-dialog>
</template> </template>
@ -65,11 +85,15 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState'; import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { deepAssign } from '@/utils/index';
import PasswordBox from './childDialog/passwordInputBox.vue';
export default { export default {
name: 'RouteSelection', name: 'RouteSelection',
components: { components: {
NoticeInfo NoticeInfo,
PasswordBox
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -89,9 +113,9 @@ export default {
tableStyle: { tableStyle: {
'border-bottom': 'none' 'border-bottom': 'none'
}, },
controlTypeNameMap: { controlTypeMap: {
'01': '折返', '01': '自动',
'02': '直通' '02': '人工'
} }
}; };
}, },
@ -117,7 +141,11 @@ export default {
disabled = !this.row.canSetting; disabled = !this.row.canSetting;
} }
return disabled; return disabled;
} },
...mapGetters('map', [
'signalList',
'sectionList'
])
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
@ -141,6 +169,19 @@ export default {
} }
return name; return name;
}, },
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
return '';
},
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
@ -154,7 +195,6 @@ export default {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.tempData = tempData || []; this.tempData = tempData || [];
this.operation = operate.operation; this.operation = operate.operation;
} }
@ -188,15 +228,18 @@ export default {
this.restoreBeforeDevices(); this.restoreBeforeDevices();
row.canSetting = true; row.canSetting = true;
// //
if (row.containSectionList && row.containSectionList.length) { const containSectionList = [];
if (row.routeSectionList && row.routeSectionList.length) {
// //
row.containSectionList.forEach(elem => { row.routeSectionList.forEach(elem => {
elem.cutOff = true; const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
section.cutOff = true;
containSectionList.push(section);
}); });
} }
this.$store.dispatch('training/updateMapState', [...row.containSectionList]); this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = row.containSectionList || []; this.beforeSectionList = containSectionList || [];
// //
const operate = { const operate = {
@ -218,10 +261,33 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
val: this.row.code, val: this.row.code,
param: { param: {
Route_Code: this.row.code routeCode: this.row.code
} }
}; };
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
// this.$refs.passwordBox.doShow(operate);
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
passWordCommit(data) {
const operate = {
over: true,
operation: data.operation,
cmdType: data.cmdType,
val: data.val,
param: data.param
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
@ -233,7 +299,6 @@ export default {
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}
}, },
cancel() { cancel() {
const operate = { const operate = {

View File

@ -140,7 +140,6 @@
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.$emit('setLoginResult', { this.$emit('setLoginResult', {
operation: operate.operation, operation: operate.operation,
@ -154,10 +153,9 @@
operation: operate.operation, operation: operate.operation,
success: false success: false
}); });
}) });
} else { } else {
this.$refs.noticeInfo.doShow(operate, ['密码输入错误!']); this.$refs.noticeInfo.doShow(operate, ['密码输入错误!']);
} }
}, },
click(key) { click(key) {

View File

@ -143,7 +143,7 @@ export default {
operation: OperationEvent.Section.alxeFailure.menu.operation, operation: OperationEvent.Section.alxeFailure.menu.operation,
cmdType: '', cmdType: '',
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -163,7 +163,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Section.fault.menu.operation, operation: OperationEvent.Section.fault.menu.operation,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
@ -180,7 +180,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Section.detail.menu.operation, operation: OperationEvent.Section.detail.menu.operation,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -198,7 +198,7 @@ export default {
operation: OperationEvent.Section.stoppage.menu.operation, operation: OperationEvent.Section.stoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT, cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -219,7 +219,7 @@ export default {
operation: OperationEvent.Section.cancelStoppage.menu.operation, operation: OperationEvent.Section.cancelStoppage.menu.operation,
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT, cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -239,7 +239,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.menu.operation, operation: OperationEvent.Section.setSpeed.menu.operation,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {

View File

@ -23,7 +23,6 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { querySignalStatus } from '@/api/simulation';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -160,6 +159,9 @@ export default {
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]), ]),
...mapGetters('map', [
'routeList'
]),
group() { group() {
return this.$route.query.group; return this.$route.query.group;
} }
@ -208,7 +210,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.signalClose.menu.operation, operation: OperationEvent.Signal.signalClose.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -228,7 +230,7 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT, cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
operation: OperationEvent.Signal.stoppage.menu.operation, operation: OperationEvent.Signal.stoppage.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
@ -250,7 +252,7 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT, cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
operation: OperationEvent.Signal.cancelStoppage.menu.operation, operation: OperationEvent.Signal.cancelStoppage.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
@ -271,17 +273,20 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.arrangementRoute.menu.operation, operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { const routes = [];
const tempData = resp.data; this.routeList.forEach(elem => {
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData); if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
}); });
this.$refs.routeSelection.doShow(step.operation, this.selected, routes);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(step); this.$refs.noticeInfo.doShow(step);
@ -294,16 +299,19 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.guide.menu.operation, operation: OperationEvent.Signal.guide.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { const routes = [];
const tempData = resp.data; this.routeList.forEach(elem => {
this.$refs.routeGuide.doShow(step.operation, this.selected, tempData); if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
}); });
this.$refs.routeGuide.doShow(step.operation, this.selected, routes);
} }
}); });
}, },
@ -314,7 +322,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -331,7 +339,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation, operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -348,7 +356,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.reopenSignal.menu.operation, operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -365,7 +373,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.lock.menu.operation, operation: OperationEvent.Signal.lock.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
@ -385,7 +393,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.unlock.menu.operation, operation: OperationEvent.Signal.unlock.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -402,7 +410,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.humanControl.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -422,7 +430,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation, operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -442,7 +450,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.detail.menu.operation, operation: OperationEvent.Signal.detail.menu.operation,
param: { param: {
Signal_Code: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {

View File

@ -133,7 +133,6 @@ export default {
start: true, start: true,
send: true, send: true,
code: this.selected.code, code: this.selected.code,
operation: OperationEvent.Station.cancelStoppage.menu.operation operation: OperationEvent.Station.cancelStoppage.menu.operation
}; };

View File

@ -155,7 +155,7 @@ export default {
operation: OperationEvent.Switch.stoppage.menu.operation, operation: OperationEvent.Switch.stoppage.menu.operation,
cmdType: CMD.Switch.CMD_STOPPAGE, cmdType: CMD.Switch.CMD_STOPPAGE,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
@ -177,7 +177,7 @@ export default {
operation: OperationEvent.Switch.cancelStoppage.menu.operation, operation: OperationEvent.Switch.cancelStoppage.menu.operation,
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE, cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
@ -198,7 +198,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.lock.menu.operation, operation: OperationEvent.Switch.lock.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -214,7 +214,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.unlock.menu.operation, operation: OperationEvent.Switch.unlock.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -230,7 +230,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.block.menu.operation, operation: OperationEvent.Switch.block.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -246,7 +246,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.unblock.menu.operation, operation: OperationEvent.Switch.unblock.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -262,7 +262,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.fault.menu.operation, operation: OperationEvent.Switch.fault.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -278,7 +278,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.active.menu.operation, operation: OperationEvent.Switch.active.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -294,7 +294,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.locate.menu.operation, operation: OperationEvent.Switch.locate.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -310,7 +310,7 @@ export default {
start: true, start: true,
operation: OperationEvent.Switch.reverse.menu.operation, operation: OperationEvent.Switch.reverse.menu.operation,
param: { param: {
Switch_Code: this.selected.code switchCode: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {

View File

@ -180,6 +180,7 @@ const map = {
state: { state: {
routeData: {}, // 进路数据 routeData: {}, // 进路数据
routeList: [], // 进路list
stepData: [], // 缓存数据 stepData: [], // 缓存数据
recoverStepData: [], // 缓存恢复数据 recoverStepData: [], // 缓存恢复数据
seclectDeviceList: [], // 包围框选中元素列表 seclectDeviceList: [], // 包围框选中元素列表
@ -200,6 +201,9 @@ const map = {
mapList: (state) => { mapList: (state) => {
return state.mapList; return state.mapList;
}, },
routeList: (state) => {
return state.routeList;
},
seclectDeviceList: (state) => { seclectDeviceList: (state) => {
return state.seclectDeviceList; return state.seclectDeviceList;
}, },
@ -562,6 +566,7 @@ const map = {
routeDataList.forEach(data => { routeDataList.forEach(data => {
state.routeData[data.code] = data; state.routeData[data.code] = data;
}); });
state.routeList = routeDataList;
}, },
updateRouteState: (state, status) => { updateRouteState: (state, status) => {
state.routeData[status.code] = deepAssign(state.routeData[status.code], status); state.routeData[status.code] = deepAssign(state.routeData[status.code], status);

View File

@ -2,7 +2,7 @@ import store from '@/store';
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
function handle(state, data) { function handle(state, data) {
// console.log(data, 'socket订阅'); console.log(data, 'socket订阅');
const msg = data.body; const msg = data.body;
const path = window.location.href; const path = window.location.href;
switch (data.type) { switch (data.type) {

View File

@ -3,11 +3,12 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.82:9000'; // 杜康
BASE_API = 'http://b29z135112.zicp.vip';
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API; BASE_API = process.env.VUE_APP_BASE_API;
} }

View File

@ -12,7 +12,6 @@ export function creatSubscribe(topic, header) {
if (!Vue.prototype.$stomp) { if (!Vue.prototype.$stomp) {
Vue.prototype.$stomp = new StompClient(); Vue.prototype.$stomp = new StompClient();
} }
Vue.prototype.$stomp.subscribe(topic, callback, header); Vue.prototype.$stomp.subscribe(topic, callback, header);
} catch (error) { } catch (error) {
console.error('websocket订阅失败'); console.error('websocket订阅失败');