Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
b50f950b80
@ -14,18 +14,18 @@ class KeyboardController extends Eventful {
|
||||
initHandler(zr) {
|
||||
if (zr) {
|
||||
var keydownHandle = this.keydown.bind(this);
|
||||
var dom = this.$zr.dom;
|
||||
// var dom = this.$zr.dom;
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
this._keyOnDownUp = opts.keyOnDownUp || true;
|
||||
|
||||
dom.addEventListener('keyup', keydownHandle, false);
|
||||
dom.focus();
|
||||
window.addEventListener('keyup', keydownHandle, false);
|
||||
// dom.focus();
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
dom.removeEventListener('keyup', keydownHandle, false);
|
||||
window.removeEventListener('keyup', keydownHandle, false);
|
||||
};
|
||||
|
||||
this.dispose = function() {
|
||||
|
@ -8,7 +8,7 @@
|
||||
<div class="station-box">
|
||||
<div class="leftRect" />
|
||||
<div class="rightRect" />
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStation == item.id}" @click="changeStation(item,index)" />
|
||||
<div class="station-list-box" :class="{'active': selectStation == item.id}" @click="changeStation(item.id)" />
|
||||
</div>
|
||||
<div class="station-name" :class="index==0?'station-name-first':index%2==1?'station-name-up':'station-name-down'">{{ item.name }}</div>
|
||||
</div>
|
||||
@ -16,13 +16,27 @@
|
||||
<div class="rightButtonGroup">
|
||||
<div class="rightButtonGroupL">
|
||||
<div class="controlCenter">
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStation == 'controlCenter'}" @click="changeStation(item,index)" />
|
||||
<div class="station-list-button" :class="{'active': selectStation == 'controlCenter'}" @click="changeStation('controlCenter')" />
|
||||
</div>
|
||||
<div class="stationDepot">{{ '' }}</div>
|
||||
<div class="parkingLot">{{ '' }}</div>
|
||||
<div class="stationDepot">
|
||||
<div class="station-list-button" :class="{'active': selectStation == 'stationDepot'}" @click="changeStation('stationDepot')" />
|
||||
</div>
|
||||
<div class="parkingLot">
|
||||
<div class="station-list-button" :class="{'active': selectStation == 'parkingLot'}" @click="changeStation('parkingLot')" />
|
||||
</div>
|
||||
<div class="controlCenterName">控制中心</div>
|
||||
<div class="parkingLotName">停车场</div>
|
||||
<div class="stationDepotName">车辆段</div>
|
||||
</div>
|
||||
<div class="rightButtonGroupR">
|
||||
{{ '' }}
|
||||
<div class="mainHouseOne">
|
||||
<div class="station-list-button" :class="{'active': selectStation == 'mainHouseOne'}" @click="changeStation('mainHouseOne')" />
|
||||
</div>
|
||||
<div class="mainHouseTwo">
|
||||
<div class="station-list-button" :class="{'active': selectStation == 'mainHouseTwo'}" @click="changeStation('mainHouseTwo')" />
|
||||
</div>
|
||||
<div class="mainHouseOneName">黄山主所</div>
|
||||
<div class="mainHouseTwoName">茶亭主所</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -65,7 +79,7 @@ export default {
|
||||
name:'StationNav',
|
||||
data() {
|
||||
return {
|
||||
selectStation: 'controlCenter',
|
||||
selectStation: 'mainHouseOne',
|
||||
stationList:[],
|
||||
group:'',
|
||||
lineCode:'',
|
||||
@ -256,6 +270,9 @@ export default {
|
||||
}
|
||||
}
|
||||
});
|
||||
if (this.$route.query.stationId) {
|
||||
this.selectStation = this.$route.query.stationId;
|
||||
}
|
||||
},
|
||||
async subscribe() {
|
||||
this.clearSubscribe();
|
||||
@ -281,8 +298,8 @@ export default {
|
||||
button.active = false;
|
||||
this.selectChildren(child.id, false);
|
||||
},
|
||||
changeStation(item, index) {
|
||||
this.selectStation = item.id;
|
||||
changeStation(item) {
|
||||
this.selectStation = item;
|
||||
this.selectChildren(this.$route.params.mode, false);
|
||||
},
|
||||
selectChildren(type, isReplace = false) { // 选择菜单
|
||||
@ -355,7 +372,7 @@ export default {
|
||||
top: -10%;
|
||||
border-radius: 130%;
|
||||
}
|
||||
.station-list-box.active{
|
||||
.station-list-box.active,.station-list-button.active{
|
||||
background:#cdcd37;
|
||||
}
|
||||
.station-name{
|
||||
@ -517,4 +534,78 @@ background:rgba(231,237,253,0.9);
|
||||
width: 17vw;
|
||||
height: 100%;
|
||||
}
|
||||
.rightButtonGroupL{
|
||||
width: 10vw;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
position: relative;
|
||||
border-left: 1px #000 solid;
|
||||
border-right: 1px #000 solid;
|
||||
}
|
||||
.rightButtonGroupR{
|
||||
width: 7vw;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
.controlCenter,.stationDepot,.parkingLot{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 31%;
|
||||
height: 100%;
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
}
|
||||
.controlCenterName{
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 0.3vw;
|
||||
}
|
||||
.stationDepotName{
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
left: 38%;
|
||||
}
|
||||
.parkingLotName{
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 11%;
|
||||
}
|
||||
.station-list-button{
|
||||
width: 1vw;
|
||||
height: 1vw;
|
||||
border-radius: 1vw;
|
||||
background: #ccc;
|
||||
position: absolute;
|
||||
border-left: 1px #fdfdfd solid;
|
||||
border-right: 1px #262626 solid;
|
||||
left: 50%;
|
||||
top: 21px;
|
||||
transform: translateX(-47%);
|
||||
cursor: pointer;
|
||||
}
|
||||
.mainHouseOne,.mainHouseTwo{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 49%;
|
||||
height: 100%;
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
}
|
||||
.mainHouseOneName{
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 0.3vw;
|
||||
}
|
||||
.mainHouseTwoName{
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
right: 8%;
|
||||
}
|
||||
</style>
|
||||
|
@ -26,9 +26,9 @@
|
||||
<el-input-number v-model="addModel.positionY" />
|
||||
</el-form-item>
|
||||
<el-table :data="addModel.modelList" style="width: 100%">
|
||||
<el-table-column label="计轴区段" prop="sectionName" width="160">
|
||||
<el-table-column label="计轴区段" prop="sectionName" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.sectionCode" filterable size="mini" placeholder="请选择">
|
||||
<el-select v-model="scope.row.sectionCode" filterable size="mini" style="width:120px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in PhysicalSectionList"
|
||||
:key="item.code"
|
||||
@ -36,6 +36,7 @@
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button size="mini" :type="field === 'standSection'&&rowData === scope.row?'danger':'primary'" @click="selectedSection(scope.row)">激活</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车站名称">
|
||||
@ -128,6 +129,7 @@ export default {
|
||||
modelList: [],
|
||||
positionY: 0
|
||||
},
|
||||
rowData: {},
|
||||
skins: [],
|
||||
mergeRules: {
|
||||
positionY: [
|
||||
@ -311,6 +313,8 @@ export default {
|
||||
if (!this.editModel.routingStationList.includes(selected.code) && this.editModel.code != selected.code) {
|
||||
this.editModel.routingStationList.push(selected.code);
|
||||
}
|
||||
} else if (selected && selected._type === 'Section' && this.field == 'standSection') {
|
||||
this.$set(this.rowData, 'sectionCode', selected.code);
|
||||
}
|
||||
},
|
||||
// 选择管理车站
|
||||
@ -389,7 +393,7 @@ export default {
|
||||
if (item.control) {
|
||||
model.controlModePoint = {
|
||||
x: sectionModel.points[0].x + (sectionModel.points[last].x - sectionModel.points[0].x) / 2,
|
||||
y: sectionModel.points[0].y - this.addModel.positionY + 30
|
||||
y: sectionModel.points[0].y - this.addModel.positionY + 45
|
||||
};
|
||||
}
|
||||
models.push(model);
|
||||
@ -469,6 +473,16 @@ export default {
|
||||
stationName: `车站 ${this.addModel.modelList.length + 1}`,
|
||||
control: false
|
||||
});
|
||||
},
|
||||
selectedSection(row) {
|
||||
if (this.field !== 'standSection') {
|
||||
this.hover('standSection');
|
||||
this.rowData = row;
|
||||
} else if (this.rowData !== row) {
|
||||
this.rowData = row;
|
||||
} else {
|
||||
this.hover('standSection');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -310,11 +310,11 @@ export default {
|
||||
const sectionc = this.findSectionData(sectionLists, elem.sectionCCode);
|
||||
if (sectiona && sectionb && sectionc) {
|
||||
let point = {
|
||||
x: sectiona.points[sectiona.points.length - 1].x,
|
||||
x: sectiona.points[sectiona.points.length - 1].x - 15,
|
||||
y: sectiona.points[sectiona.points.length - 1].y
|
||||
};
|
||||
if (JSON.stringify(sectiona.points[0]) === JSON.stringify(sectionb.points[sectionb.points.length - 1])) {
|
||||
point = { x: sectiona.points[0].x, y: sectiona.points[0].y };
|
||||
point = { x: sectiona.points[0].x + 15, y: sectiona.points[0].y };
|
||||
}
|
||||
const sectionModel = getModel('Section');
|
||||
const name = sectiona.name;
|
||||
|
Loading…
Reference in New Issue
Block a user