Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
d84f4ba836
@ -108,6 +108,10 @@ class SkinCode extends defaultStyle {
|
||||
width: 2,
|
||||
defaultColor: '#03FFF8'
|
||||
},
|
||||
runLineShow:{
|
||||
lineWidth: 6,
|
||||
lineStroke:'#F37117'
|
||||
},
|
||||
routeArrow: {
|
||||
radius: 5,
|
||||
lineWidth: 3,
|
||||
|
@ -268,6 +268,28 @@ export default class ELines extends Group {
|
||||
this.bottomWithSection.hide();
|
||||
}
|
||||
|
||||
if (style.Section.runLineShow && !isCurve) {
|
||||
// 运行线
|
||||
const points = [];
|
||||
for (let i = 0; i < modelPoints.length; i++) {
|
||||
points.push([modelPoints[i].x, modelPoints[i].y]);
|
||||
}
|
||||
this.runLine = new Polyline({
|
||||
zlevel: this.zlevel,
|
||||
progressive: model.progressive,
|
||||
z: Z + 2,
|
||||
shape: {
|
||||
points: points
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Section.runLineShow.lineWidth,
|
||||
stroke: style.Section.runLineShow.lineStroke
|
||||
}
|
||||
});
|
||||
this.add(this.runLine);
|
||||
this.runLine.hide();
|
||||
}
|
||||
|
||||
if (style.Section.routeArrow && !isCurve) {
|
||||
const cPointLeft = {x: 0, y:0};
|
||||
const cPointRight = {x: 0, y:0};
|
||||
@ -402,6 +424,14 @@ export default class ELines extends Group {
|
||||
this.section && this.section.attr('z', lev);
|
||||
}
|
||||
|
||||
setRunLineDefault() {
|
||||
this.runLine && this.runLine.hide();
|
||||
}
|
||||
|
||||
runLineShow() {
|
||||
this.runLine && this.runLine.show();
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.eachChild((child) => {
|
||||
child.hide();
|
||||
|
@ -100,6 +100,7 @@ export default class Section extends Group {
|
||||
}
|
||||
this.line.setCrossSpeedUpperLimit('');
|
||||
this.line.setCrossDefault();
|
||||
// this.line.setRunLineDefault();
|
||||
}
|
||||
this.name && this.name.recover();
|
||||
this.speedLimit && this.speedLimit.hide();
|
||||
@ -253,6 +254,13 @@ export default class Section extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
showRunLine() {
|
||||
this.line && this.line.runLineShow();
|
||||
}
|
||||
setRunLineDefault() {
|
||||
this.line && this.line.setRunLineDefault();
|
||||
}
|
||||
|
||||
/** 保护区段锁闭 09*/
|
||||
protectiveLock(lockRight) {
|
||||
if (this.line) {
|
||||
@ -368,12 +376,14 @@ export default class Section extends Group {
|
||||
// 只响应前端自定义类型的状态变化
|
||||
if (model._free) {
|
||||
// 先初始化为灰色
|
||||
this.setAshShow()
|
||||
this.setAshShow();
|
||||
model.preGreen && this.line.setStyle({stroke: '#00FF00'});
|
||||
model.preBlue && this.line.setStyle({stroke: '#4A76B7'});
|
||||
} else {
|
||||
this.handleSwitchSection(model, flag);
|
||||
// 顺序代表优先级
|
||||
/** 宁波三号线 运行线显示状态 (前端自定义状态)*/
|
||||
// model.isRunLineShow && this.showRunLine();
|
||||
/** 道岔保护区段锁闭 */
|
||||
model.overlapLock && this.protectiveLock(model.lockRight);
|
||||
/** 空闲锁闭或者叫进路锁闭 */
|
||||
|
@ -245,7 +245,7 @@ export default {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding:0;
|
||||
max-height: 200px;
|
||||
// max-height: 200px;
|
||||
overflow: auto;
|
||||
position: fixed;
|
||||
border-left: 1px #CACACA solid;
|
||||
|
@ -2572,65 +2572,6 @@ export default {
|
||||
line-height: $height;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: #0000;
|
||||
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: linear-gradient(#FDFDFE, #DEE3F3);
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: $menuPadding;
|
||||
padding-right: $menuPadding;
|
||||
}
|
||||
|
||||
.nav-li:active {
|
||||
background: #C9D0E1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.nav-li-text {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-ul {
|
||||
display: none;
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
border: 1px solid gray !important;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
max-height: 550px;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #c3c3c3;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 0;
|
||||
background: #f0f0f0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.menu-ul {
|
||||
display: none;
|
||||
position: relative;
|
||||
@ -2642,77 +2583,4 @@ export default {
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth + 20;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: absolute;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.menu-ul-text {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
letter-spacing: 0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li {
|
||||
text-align: left;
|
||||
background: #F0F0F0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li-block {
|
||||
display: flex;
|
||||
letter-spacing: 0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li-text {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
width: $menuItemWidth;
|
||||
}
|
||||
|
||||
.menu-li-text .status {
|
||||
display: inline-block;
|
||||
border-right: 1px inset #CACACA;
|
||||
width: $width;
|
||||
}
|
||||
|
||||
.menu-li-text .label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.menu-separator {
|
||||
text-align: left;
|
||||
background: #F0F0F0;
|
||||
height: 2px;
|
||||
line-height: 2px;
|
||||
}
|
||||
|
||||
.menu-separator .status {
|
||||
display: inline-block;
|
||||
border-right: 1px inset #CACACA;
|
||||
width: $width;
|
||||
height: 100%;
|
||||
background: #EFECDE;
|
||||
}
|
||||
|
||||
.menu-separator .separator {
|
||||
display: inline-block;
|
||||
background: #CACACA;
|
||||
margin-left: 5px;
|
||||
height: 2px;
|
||||
width: $menuItemWidth - $width - 30px;
|
||||
}
|
||||
|
||||
.menu-li-block:hover {
|
||||
background: #C9DEF7;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
@ -14,8 +14,8 @@
|
||||
<el-col :span="13" :offset="1">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="运行线" name="first">
|
||||
<el-table :data="stationStandList" height="380px">
|
||||
<el-table-column prop="name" label="站台" />
|
||||
<el-table ref="runLineTable" :data="runLineList" height="380px" :highlight-current-row="true" @current-change="handleChange">
|
||||
<el-table-column prop="name" label="运行线" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="往返" name="second">
|
||||
@ -78,6 +78,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
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 { getSimulationDestinationList } from '@/api/jmap/mapdraft';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
@ -88,6 +89,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
runLineList:[],
|
||||
activeName: 'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
@ -103,9 +105,9 @@ export default {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selected() {
|
||||
return this.$store.state.menuOperation.selected;
|
||||
},
|
||||
// selected() {
|
||||
// return this.$store.state.menuOperation.selected;
|
||||
// },
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
@ -126,12 +128,20 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getSimulationDestinationList(this.$route.query.group).then(res=>{
|
||||
res.data.forEach(element => {
|
||||
this.runLineList.push({name:element.code + '(' + element.description + ')', runPath:element.runPath});
|
||||
});
|
||||
}).catch(()=>{
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
doShow(operate, activeName) {
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: selected});
|
||||
// this.$store.dispatch('menuOperation/setSelected', {device: selected});
|
||||
this.activeName = activeName;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
@ -143,12 +153,38 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.runLineTable.setCurrentRow();
|
||||
// mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/setRunPathSelected', []);
|
||||
},
|
||||
commit() {
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
handleChange(row) {
|
||||
if (row) {
|
||||
const runPath = row.runPath;
|
||||
if (runPath && runPath.length > 0) {
|
||||
const oldRunPath = this.$store.state.training.runPathList;
|
||||
this.setRunPath(oldRunPath, false);
|
||||
this.setRunPath(runPath, true);
|
||||
this.$store.dispatch('training/setRunPathSelected', runPath);
|
||||
|
||||
}
|
||||
} else {
|
||||
const runPath = this.$store.state.training.runPathList;
|
||||
this.setRunPath(runPath, false);
|
||||
}
|
||||
|
||||
},
|
||||
setRunPath(runPath, isShow) {
|
||||
runPath.forEach(sectionCode=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
if (section && section.instance) {
|
||||
if (isShow) { section.instance.showRunLine(); } else { section.instance.setRunLineDefault(); }
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
@ -45,7 +45,8 @@ const training = {
|
||||
triggerFaultCount: 0, // 触发故障计数器
|
||||
triggerFaultDevice: '', // 触发故障目标设备
|
||||
trainingStart: false, // 实训开始状态
|
||||
notifySelected: null // 场景弹窗内容
|
||||
notifySelected: null, // 场景弹窗内容
|
||||
runPathList:[] // 运行线 (宁波三号线)
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -295,6 +296,10 @@ const training = {
|
||||
},
|
||||
setNotifySelected: (state, data) => {
|
||||
state.notifySelected = data;
|
||||
},
|
||||
/** 运行线 (宁波三号线) */
|
||||
setRunPathSelected: (state, runPathList) => {
|
||||
state.runPathList = runPathList;
|
||||
}
|
||||
},
|
||||
|
||||
@ -650,6 +655,10 @@ const training = {
|
||||
/** 触发故障计数器 */
|
||||
setTriggerFaultCount: ({ commit }, device) => {
|
||||
commit('setTriggerFaultCount', device);
|
||||
},
|
||||
/** 运行线 (宁波三号线) */
|
||||
setRunPathSelected: ({ commit }, runPathList) => {
|
||||
commit('setRunPathSelected', runPathList);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user