成都三号线调整

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) {
// this.sectionCutOff();
// }
if (model.cutOff) {
this.sectionCutOff();
}
// /** 是否限速*/
// if (model.speedUpperLimit >= 0) {
// this.setSpeedUpperLimit();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -180,6 +180,7 @@ const map = {
state: {
routeData: {}, // 进路数据
routeList: [], // 进路list
stepData: [], // 缓存数据
recoverStepData: [], // 缓存恢复数据
seclectDeviceList: [], // 包围框选中元素列表
@ -200,6 +201,9 @@ const map = {
mapList: (state) => {
return state.mapList;
},
routeList: (state) => {
return state.routeList;
},
seclectDeviceList: (state) => {
return state.seclectDeviceList;
},
@ -562,6 +566,7 @@ const map = {
routeDataList.forEach(data => {
state.routeData[data.code] = data;
});
state.routeList = routeDataList;
},
updateRouteState: (state, 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';
function handle(state, data) {
// console.log(data, 'socket订阅');
console.log(data, 'socket订阅');
const msg = data.body;
const path = window.location.href;
switch (data.type) {

View File

@ -3,11 +3,12 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// 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.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
BASE_API = 'http://b29z135112.zicp.vip';
} else {
BASE_API = process.env.VUE_APP_BASE_API;
}

View File

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