道岔计轴添加关联岔芯参数&宁波三排列进路到
This commit is contained in:
parent
0b361fd0fc
commit
d9d2e9b6cd
@ -429,3 +429,11 @@ export function getLogList(group, params) {
|
||||
params:params
|
||||
});
|
||||
}
|
||||
/* 宁波三排列进路到 获取路径列表 */
|
||||
export function getPathListByStandCodeOrSignalCode( group, params ) {
|
||||
return request({
|
||||
url: `/simulation/${group}/querySectionPaths`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -110,7 +110,8 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
runLineShow:{
|
||||
lineWidth: 6,
|
||||
lineStroke:'#F37117'
|
||||
lineStroke:'#F37117',
|
||||
pathStroke: '#00f'
|
||||
},
|
||||
routeArrow: {
|
||||
radius: 5,
|
||||
|
@ -426,12 +426,17 @@ export default class ELines extends Group {
|
||||
|
||||
setRunLineDefault() {
|
||||
this.runLine && this.runLine.hide();
|
||||
this.runLine.dirty();
|
||||
this.runLine && this.runLine.dirty();
|
||||
}
|
||||
|
||||
runLineShow() {
|
||||
runLineShow(type) {
|
||||
if (type === 'runPath') {
|
||||
this.runLine && this.runLine.setStyle({ stroke: this.model.style.Section.runLineShow.lineStroke });
|
||||
} else if (type === 'path') {
|
||||
this.runLine && this.runLine.setStyle({ stroke: this.model.style.Section.runLineShow.pathStroke });
|
||||
}
|
||||
this.runLine && this.runLine.show();
|
||||
this.runLine.dirty();
|
||||
this.runLine && this.runLine.dirty();
|
||||
}
|
||||
|
||||
hide() {
|
||||
|
@ -254,8 +254,8 @@ export default class Section extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
showRunLine() {
|
||||
this.line && this.line.runLineShow();
|
||||
showRunLine(type) {
|
||||
this.line && this.line.runLineShow(type);
|
||||
}
|
||||
setRunLineDefault() {
|
||||
this.line && this.line.setRunLineDefault();
|
||||
|
@ -2,11 +2,21 @@
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-table :data="tableData" height="397px" style="margin-top: 57px">
|
||||
<el-table-column prop="groupNumber" label="列车" />
|
||||
<el-table :data="tableData" height="397px" style="margin-top: 57px" highlight-current-row @current-change="handleTrainChange">
|
||||
<el-table-column label="列车">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="groupNumber" label="班次" />
|
||||
<el-table-column prop="groupNumber" label="运行线" />
|
||||
<el-table-column prop="groupNumber" label="模式" />
|
||||
<el-table-column label="运行线">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getTrainDestinationCode(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="groupNumber" label="模式">
|
||||
<span>自动</span>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="13" :offset="1">
|
||||
@ -22,9 +32,13 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="1">
|
||||
<el-table :data="tempData" height="340px">
|
||||
<el-table :data="tempData" height="340px" highlight-current-row @current-change="handlePathChange">
|
||||
<el-table-column prop="groupNumber" label="路径" />
|
||||
<el-table-column prop="groupNumber" label="运行方向" />
|
||||
<el-table-column prop="groupNumber" label="运行方向">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRunDirection(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="displayCopyPath">显示复制路径</el-checkbox>
|
||||
</el-col>
|
||||
@ -33,15 +47,19 @@
|
||||
<el-tab-pane label="信号机" name="second">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-table :data="signalList" height="380px">
|
||||
<el-table :data="signalList" height="380px" highlight-current-row @current-change="handleSignalChange">
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
<el-table-column prop="show" label="显示" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="1">
|
||||
<el-table :data="tempData" height="340px">
|
||||
<el-table :data="tempData" height="340px" highlight-current-row @current-change="handlePathChange">
|
||||
<el-table-column prop="groupNumber" label="路径" />
|
||||
<el-table-column prop="groupNumber" label="运行方向" />
|
||||
<el-table-column label="运行方向">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getRunDirection(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="displayCopyPath">显示复制路径</el-checkbox>
|
||||
</el-col>
|
||||
@ -74,6 +92,8 @@ import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'
|
||||
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getPathListByStandCodeOrSignalCode } from '@/api/simulation';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
@ -83,13 +103,17 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
tableData: [{}],
|
||||
tableData: [],
|
||||
activeName: 'first',
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
displayCopyPath: false,
|
||||
selectStandCode: ''
|
||||
selectStandCode: '',
|
||||
selectTrainCode: '',
|
||||
selectSignalCode: '',
|
||||
oldSectionList: [],
|
||||
routeCodeList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -124,25 +148,101 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectStand(stationStand) {
|
||||
this.selectStandCode = stationStand.code;
|
||||
},
|
||||
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate) {
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.selectTrainCode = '';
|
||||
this.selectStandCode = '';
|
||||
this.selectSignalCode = '';
|
||||
this.tableData = this.$store.state.map.activeTrainList;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.handlePathChange([]);
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
getTrainDestinationCode(trainCode) {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
return train.destinationCode;
|
||||
},
|
||||
selectStand(stationStand) {
|
||||
this.selectStandCode = stationStand.code;
|
||||
if (this.selectTrainCode && this.selectStandCode) {
|
||||
this.getPathList({ groupNumber: this.selectTrainCode, standCode: this.selectStandCode });
|
||||
}
|
||||
},
|
||||
getRunDirection(routeCodeList) {
|
||||
if (routeCodeList && routeCodeList.length) {
|
||||
const route = this.$store.state.map.routeData[routeCodeList[0]];
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](route.startSignalCode);
|
||||
return signal.right ? '0' : '1';
|
||||
}
|
||||
},
|
||||
handlePathChange(routeCodeList) {
|
||||
this.routeCodeList = routeCodeList;
|
||||
if (this.oldSectionList && this.oldSectionList.length) {
|
||||
this.oldSectionList.forEach(sectionCode => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
section && section.instance && section.instance.setRunLineDefault();
|
||||
});
|
||||
}
|
||||
if (routeCodeList && routeCodeList.length) {
|
||||
let nowSectionList = [];
|
||||
routeCodeList.forEach((routeCode) => {
|
||||
const route = this.$store.state.map.routeData[routeCode];
|
||||
nowSectionList = [...nowSectionList, ...route.routeSectionList];
|
||||
route && route.routeSectionList.forEach(sectionCode => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
section && section.instance && section.instance.showRunLine('path');
|
||||
});
|
||||
});
|
||||
this.oldSectionList = nowSectionList;
|
||||
}
|
||||
},
|
||||
handleTrainChange(val) {
|
||||
this.selectTrainCode = val;
|
||||
if (this.activeName === 'first' && this.selectTrainCode && this.selectStandCode) {
|
||||
this.getPathList({ groupNumber: this.selectTrainCode, standCode: this.selectStandCode });
|
||||
} else if (this.activeName === 'second' && this.selectTrainCode && this.selectSignalCode) {
|
||||
this.getPathList({ groupNumber: this.selectTrainCode, signalCode: this.selectSignalCode });
|
||||
}
|
||||
},
|
||||
handleSignalChange(signal) {
|
||||
this.selectSignalCode = signal.code;
|
||||
if (this.selectTrainCode && this.selectSignalCode) {
|
||||
this.getPathList({ groupNumber: this.selectTrainCode, signalCode: this.selectSignalCode });
|
||||
}
|
||||
},
|
||||
getPathList(params) {
|
||||
getPathListByStandCodeOrSignalCode(this.$route.query.group, params).then(resp => {
|
||||
this.tempData = resp.data;
|
||||
}).catch(e => {
|
||||
this.$message.error('获取路径列表失败!');
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.trainSetRoute.confirm.operation,
|
||||
cmdType: CMD.Train.CMD_TRAIN_SET_ROUTE,
|
||||
param: { routes: this.routeCodeList }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
|
@ -257,7 +257,7 @@ export default {
|
||||
} else {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](path);
|
||||
if (section && section.instance) {
|
||||
section.instance.showRunLine();
|
||||
section.instance.showRunLine('runPath');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -309,7 +309,7 @@ export default {
|
||||
runPath.forEach(sectionCode=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
if (section && section.instance) {
|
||||
if (isShow) { section.instance.showRunLine(); } else { section.instance.setRunLineDefault(); }
|
||||
if (isShow) { section.instance.showRunLine('runPath'); } else { section.instance.setRunLineDefault(); }
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -268,7 +268,8 @@ export default {
|
||||
/** 下令停车 */
|
||||
CMD_TRAIN_ORDER_STOP: {value: 'Train_Order_Stop', label:'下令停车'},
|
||||
/** 取消停车命令 */
|
||||
CMD_TRAIN_CANCEL_ORDER_STOP: {value: 'Train_Cancel_Order_Stop', label:'取消停车命令'}
|
||||
CMD_TRAIN_CANCEL_ORDER_STOP: {value: 'Train_Cancel_Order_Stop', label:'取消停车命令'},
|
||||
CMD_TRAIN_SET_ROUTE: {value: 'Train_Set_Route', label: '列车排列进路'}
|
||||
},
|
||||
TrainWindow: {
|
||||
/** 修改列车识别号 */
|
||||
|
@ -2904,6 +2904,16 @@ export const OperationEvent = {
|
||||
operation: '70q',
|
||||
domId: '_Tips-Train-trainCancleOrderStop-Menu'
|
||||
}
|
||||
},
|
||||
trainSetRoute: {
|
||||
menu: {
|
||||
operation: '70r',
|
||||
domId: '_Tips-Train-trainSetRoute-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '70r1',
|
||||
domId: '_Tips-Train-trainSetRoute-Confirm'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://api.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.129:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -113,7 +113,8 @@ export default {
|
||||
oldLeftSectionCode: '',
|
||||
oldRightSectionCode: '',
|
||||
tipInfoList: [],
|
||||
centralizedStationList: []
|
||||
centralizedStationList: [],
|
||||
crossSectionList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -211,7 +212,8 @@ export default {
|
||||
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 左向停车点偏移量
|
||||
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 右向停车点偏移量
|
||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow }
|
||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow },
|
||||
{ prop: 'relCrossSection', label: '关联岔芯', type: 'select', optionLabel: 'name&&code', optionValue: 'code', isHidden: this.isSwitchSectionType, options: this.crossSectionList }
|
||||
// || !this.isCrossSectionType
|
||||
]
|
||||
}
|
||||
@ -400,6 +402,9 @@ export default {
|
||||
if (this.stationList && this.stationList.length) {
|
||||
this.centralizedStationList = this.stationList.filter(station => station.centralized);
|
||||
}
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
this.crossSectionList = this.sectionList.filter(section => section.type === '05');
|
||||
}
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
// 判断是否激活选择站台
|
||||
|
Loading…
Reference in New Issue
Block a user