This commit is contained in:
joylink_cuiweidong 2020-08-24 16:11:50 +08:00
commit e4a13de455
18 changed files with 572 additions and 92 deletions

View File

@ -144,7 +144,7 @@
:disabled="isTableBtnDisabled(button, scope.$index, scope.row)"
:loading="scope.row['loading'+idx]"
>
<input :id="button.id" type="file" class="file_box" accept=".json, application/json" @change="button.handleClick(scope.$index, scope.row, idx)">
<input :class="button.class" type="file" class="file_box" accept=".json, application/json" @change="button.handleClick(scope.$index, scope.row, idx)">
{{ getTableBtnName(button.name, scope.$index, scope.row) }}
</el-button>
</template>

View File

@ -436,6 +436,27 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F'
}
}
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
spliceShow: true, // 西安二号线特殊显示
lamp: {
fill: '#FFFF00', // 填充色
radiusR: 6 // 控制灯大小
},
text: {
titleTextShow: false,
fontWeight: 580,
fontSize: 12,
distance: 10
},
rect: {
fill: 'rgba(0,0,0,0)',
stroke: '#fff',
lineWidth: 2,
padding: 6
}
};
this[deviceType.Switch] = {
@ -625,13 +646,14 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.ReturnModeGroup] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
insideDistance: 2, // 折返模块边框内部距离
outsideDistance: 10, // 折返模块边框之间距离
rectWidth: 20, // 折返模块宽度
lineWidth: 3, // 折返模块线宽
fillColor: 'rgba(0,0,0,0)', // 填充色
strokeColor: '#9F9C9C' // 线颜色
strokeColor: '#9F9C9C', // 线颜色
highlightColor: '#fff' // 高亮颜色
};
this[deviceType.ModeStatusGroup] = { // 车站状态模式
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示

View File

@ -0,0 +1,141 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
export default class EFoldbackMode extends Group {
constructor(model) {
super();
this.model = model;
this.zlevel = model.zlevel;
this._subType = model._subType;
this.z = model.z;
this.onmouseover = model.mouseover;
this.onmouseout = model.mouseout;
this.create(model);
}
create(model) {
const style = model.style;
this.lateralLinePriorityRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor,
fill: style.ReturnModeGroup.fillColor
}
});
this.lateralLinePriority1 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.style.ReturnModeGroup.insideDistance,
y1: model.y + model.style.ReturnModeGroup.insideDistance,
x2: model.x + model.width - style.ReturnModeGroup.insideDistance,
y2: model.y + model.width - style.ReturnModeGroup.insideDistance
},
style: {
lineWidth: model.style.ReturnModeGroup.lineWidth,
stroke: model.style.ReturnModeGroup.strokeColor
}
});
this.lateralLinePriority2 = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width - style.ReturnModeGroup.insideDistance,
y1: model.y + style.ReturnModeGroup.insideDistance,
x2: model.x + style.ReturnModeGroup.insideDistance,
y2: model.y + model.width - style.ReturnModeGroup.insideDistance
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor
}
});
this.add(this.lateralLinePriorityRect);
this.add(this.lateralLinePriority1);
this.add(this.lateralLinePriority2);
this.linearFoldbackRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x + model.width + style.ReturnModeGroup.outsideDistance,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor,
fill: style.ReturnModeGroup.fillColor
}
});
this.linearFoldback = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width + style.ReturnModeGroup.outsideDistance + style.ReturnModeGroup.insideDistance,
y1: model.y + model.width / 2,
x2: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance - style.ReturnModeGroup.insideDistance,
y2: model.y + model.width / 2
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor
}
});
this.add(this.linearFoldbackRect);
this.add(this.linearFoldback);
this.lateralLineRect = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2,
y: model.y,
width: model.width,
height:model.width
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor,
fill: style.ReturnModeGroup.fillColor
}
});
this.lateralLine = new Line({
zlevel: model.zlevel,
z: model.z,
shape: {
x1: model.x + model.width * 2 + style.ReturnModeGroup.outsideDistance * 2 + style.ReturnModeGroup.insideDistance,
y1: model.y + model.width - style.ReturnModeGroup.insideDistance,
x2: model.x + model.width * 3 + style.ReturnModeGroup.outsideDistance * 2 - style.ReturnModeGroup.insideDistance,
y2: model.y + style.ReturnModeGroup.insideDistance
},
style: {
lineWidth: style.ReturnModeGroup.lineWidth,
stroke: style.ReturnModeGroup.strokeColor
}
});
this.add(this.lateralLineRect);
this.add(this.lateralLine);
}
highlightType1(color) {
this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color);
this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color);
this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color);
}
highlightType2(color) {
this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color);
this.linearFoldback && this.linearFoldback.setStyle('stroke', color);
}
highlightType3(color) {
this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color);
this.lateralLine && this.lateralLine.setStyle('stroke', color);
}
}

View File

@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
import Circle from 'zrender/src/graphic/shape/Circle';
import Text from 'zrender/src/graphic/Text';
import Rect from 'zrender/src/graphic/shape/Rect';
import EFoldbackMode from './EFoldbackMode';
import Vue from 'vue';
export default class StationTurnBack extends Group {
@ -20,9 +21,9 @@ export default class StationTurnBack extends Group {
}
create() {
const model = this.model;
const style = this.style;
const style = this.style;
if (model.show) {
if (model.show && !style.StationTurnBack.spliceShow) {
this.control = new Circle({
zlevel: this.zlevel,
z: this.z,
@ -94,23 +95,49 @@ export default class StationTurnBack extends Group {
this.add(this.controlRect);
this.add(this.text);
this.add(this.strategyText);
}
}
if (style.StationTurnBack.spliceShow) {
this.control = new EFoldbackMode({
zlevel: this.zlevel,
z: this.z,
x: model.position.x,
y: model.position.y,
width: style.ReturnModeGroup.rectWidth,
style: style
});
this.add(this.control);
}
}
recover() {
const path = window.location.href;
if (!path.includes('/map/draw')) {
this.strategyText.hide();
}
this.strategyText && this.strategyText.hide();
}
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
// this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
}
handleStatus(name) {
this.strategyText.show();
this.strategyText.attr({
this.strategyText && this.strategyText.show();
this.strategyText && this.strategyText.attr({
style: {
text: name
}
});
});
this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
if (name == '优先折返') {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
} else if (name == '直线折返') {
this.control && this.control.highlightType2(this.style.ReturnModeGroup.highlightColor);
} else if (name == '侧线折返') {
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
}
}
// 设置状态
@ -125,7 +152,6 @@ export default class StationTurnBack extends Group {
}
});
}
// console.log(model, '站后折返model');
}
setShowMode() {
@ -142,8 +168,6 @@ export default class StationTurnBack extends Group {
this.eachChild(item => {
item.show();
});
// this.isShowShape = true;
// this.setState(this.model);
} else {
this.eachChild(item => {
item.hide();

View File

@ -97,6 +97,7 @@
<help-about ref="helpAbout" />
<arrange-route ref="arrangeRoute" />
<train-distribution ref="trainDistribution" />
<stand-control ref="standControl" />
</div>
</template>
<script>
@ -116,6 +117,7 @@ import { EventBus } from '@/scripts/event-bus';
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import TrainDistribution from './menuDialog/trainDistribution';
import StandControl from './menuDialog/standControl';
export default {
name: 'MenuBar',
@ -130,7 +132,8 @@ export default {
ManageUser,
HelpAbout,
ArrangeRoute,
TrainDistribution
TrainDistribution,
StandControl
},
props: {
selected: {
@ -271,7 +274,7 @@ export default {
children: [
{
title: '开放/关闭',
click: this.undeveloped
click: this.standOpenOrClose
},
{
title: '设置/取消扣车',
@ -685,7 +688,7 @@ export default {
children: [
{
title: '开放/关闭',
click: this.undeveloped
click: this.standOpenOrClose
},
{
title: '设置/取消扣车',
@ -1315,12 +1318,16 @@ export default {
});
},
handleArrangeRoute() {
this.closeMenu(true);
this.$refs.arrangeRoute.doShow();
this.doClose();
},
handleTrainDistribution() {
this.closeMenu(true);
this.$refs.trainDistribution.doShow();
this.doClose();
},
standOpenOrClose() {
this.closeMenu(true);
this.$refs.standControl.doShow();
}
}
};

View File

@ -0,0 +1,206 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="16">
<el-table :data="stationStandList" height="350px">
<el-table-column prop="name" label="站台" />
<el-table-column prop="groupNumber" label="状态">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<span>打开</span>
</div>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="7" :offset="1">
<div class="set-status-box">
<div class="set-status-title">设置状态</div>
<el-radio v-model="status" :disabled="standStatus" :label="true">打开</el-radio>
<br>
<el-radio v-model="status" :disabled="!standStatus" :label="false">关闭</el-radio>
</div>
<el-checkbox v-model="allChecked" style="position: relative; top: 220px;">所有站台(F)</el-checkbox>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
</template>
<script>
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 { mapGetters } from 'vuex';
export default {
name: 'StandControl',
components: {
NoticeInfo
},
data() {
return {
tempData: [],
tableData: [],
activeName: 'first',
status: false,
standStatus: true,
allChecked: false,
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: '',
selectStandCode: '',
displayCopyPath: false,
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '站台开放/关闭';
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.commitDisabled) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
expandPath() {
console.log('展开进路预览');
},
doShow(operate, selected, tempData) {
this.selected = selected;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected);
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = [];
},
commit() {
if (this.row && this.row.canSetting) {
this.loading = true;
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
},
handleClick() {
},
selectStand(stationStand) {
this.selectStandCode = stationStand.code;
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menu-li {
height: 30px;
line-height: 30px;
text-align: left;
list-style:none;
padding-left: 5px;
border-right: 2px solid #696969;
color: #000;
}
.set-status-box {
position: relative;
top: 200px;
border: 1px solid #AFAFAF;
padding-left: 10px;
}
.set-status-title{
position: relative;
top: -15px;
background: #F0F0F0;
width: 60px;
text-align: center;
}
</style>

View File

@ -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">
<div style="width: 100%;border: 2px solid #696969; border-bottom: 0;color: #000;padding-left: 5px;">站台</div>
<div style="width: 100%;height: 350px;overflow: scroll; border: 2px solid #696969;">
<div class="menu-box-title">站台</div>
<div class="menu-box">
<template v-for="(stationStand, index) in stationStandList">
<li :key="index" class="menu-li" :style="{background: selectStandCode === stationStand.code? '#BFCDDB': '#FFF'}" @click="selectStand(stationStand)">{{ stationStand.name }}</li>
</template>
@ -52,14 +52,14 @@ import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'
import { mapGetters } from 'vuex';
export default {
name: 'RouteSelection',
name: 'TrainDistribution',
components: {
NoticeInfo
},
data() {
return {
tempData: [],
tableData: [{}],
tableData: [],
activeName: 'first',
beforeSectionList: [],
dialogShow: false,
@ -191,4 +191,17 @@ export default {
border-right: 2px solid #696969;
color: #000;
}
.menu-box-title {
width: 100%;
border: 2px solid #696969;
border-bottom: 0;
color: #000;
padding-left: 5px;
}
.menu-box {
width: 100%;
height: 350px;
overflow: scroll;
border: 2px solid #696969;
}
</style>

View File

@ -11,35 +11,42 @@
:close-on-click-modal="false"
>
<el-row>
<el-col :span="12">车体号:</el-col>
<el-col :span="12">追踪号:</el-col>
<el-col :span="3" :offset="9">车体号:</el-col>
<el-col :span="10" :offset="2">追踪号:</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
<el-col :span="3" :offset="9">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 80px;" @change="inputGroupNumber" />
</el-col>
<el-col :span="10" :offset="2">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 80px;" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row style="border-top: 1px solid #3C6C68; border-bottom: 1px solid #3C6C68">
<el-row>
<el-col :span="12" style="text-align: right;padding-right: 20px;">实际的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="text-align: right;padding-right: 20px;">被请求的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
</el-col>
</el-row>
</el-row>
<el-row>
<el-col :span="12" style="text-align: right;padding-right: 20px;">DID浏览选项</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">实际的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">被请求的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">DID浏览选项</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row class="option_box">
<div v-for="(item, index) in optionList" :key="index">{{ item.name }}</div>
</el-row>
<el-row class="option_result_box">
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -65,7 +72,15 @@ export default {
data() {
return {
trainNoList: [],
selected: null,
selected: null,
optionList: [
{ name: '0001 北客站一韦曲南站 往返运营', id: 1 },
{ name: '0002 北客站一韦曲南站 北客站站前折返 往返运营', id: 2 },
{ name: '0003 北客站一韦曲南站 韦曲南站站前折返 往返运营', id: 3 },
{ name: '0004 北客站一韦曲南站 北客站和韦曲南站均站前折返 往返运营', id: 4 },
{ name: '0005 北客站一会展中心 往返运营', id: 5 },
{ name: '0006 北客站一会展中心 北客站站前折返 往返运营', id: 6 }
],
addModel: {
stationName: '',
trainWindowCode: '',
@ -174,9 +189,14 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
/deep/ {
.el-dialog .el-dialog__body{
padding: 0!important;
}
.el-row {
margin: 10px
}
}
.xian-02__system .el-dialog .base-label {
background: rgba(0, 0, 0, 0.3);
@ -186,4 +206,19 @@ export default {
padding: 0 5px;
background-color: #F0F0F0;
}
.option_box{
box-shadow: 1px 1px 3px #3a3a3a inset;
padding: 4px;
color: #191919;
height: 155px;
overflow: auto;
margin-bottom: 20px;
}
.option_result_box{
box-shadow: 1px 1px 3px #3a3a3a inset;
padding: 4px;
color: #191919;
height: 90px;
overflow: hidden;
}
</style>

View File

@ -286,11 +286,11 @@ export default {
//
arrangementRoute() {
let step = '';
let routeCode = '';
let routeCode = '';
if (this.selected.isTerminalSignal) {
const endSignalRouteList = this.$store.state.menuOperation.endSignalRouteList;
endSignalRouteList.forEach(item => {
if (item.endSignalCode === this.selected.code) {
if (item.endButtonSignalCode === this.selected.code) {
routeCode = item.routeCode;
}
});
@ -313,14 +313,14 @@ export default {
this.resetRouteSignal();
const updateDeviceList = [];
updateDeviceList.push({code: this.selected.code, _type: 'Signal', isStartSignal: 1});
const endSignalRouteList = [];
const endSignalRouteList = [];
this.routeList.forEach(item => {
if (item.startSignalCode === this.selected.code) {
endSignalRouteList.push({endSignalCode: item.endSignalCode, routeCode: item.code});
updateDeviceList.push({code: item.endSignalCode, _type: 'Signal', isTerminalSignal: 1});
endSignalRouteList.push({endButtonSignalCode: item.endButtonSignalCode, routeCode: item.code});
updateDeviceList.push({code: item.endButtonSignalCode, _type: 'Signal', isTerminalSignal: 1});
}
});
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', {startSignalCode: this.selected.code, endSignalRouteList: endSignalRouteList});
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', {startSignalCode: this.selected.code, endSignalRouteList: endSignalRouteList});
this.$store.dispatch('training/updateMapState', updateDeviceList);
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -525,9 +525,9 @@ export default {
updateDeviceList.push({code: startSignalCode, _type: 'Signal', isStartSignal: 0});
}
endSignalRouteList.forEach(item => {
updateDeviceList.push({code: item.endSignalCode, _type: 'Signal', isTerminalSignal: 0});
updateDeviceList.push({code: item.endButtonSignalCode, _type: 'Signal', isTerminalSignal: 0});
});
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', { startSignalCode: '', endSignalRouteList: [] });
this.$store.dispatch('menuOperation/setRouteSelectStartSignal', { startSignalCode: '', endSignalRouteList: [] });
this.$store.dispatch('training/updateMapState', updateDeviceList);
},
enabledConfirm() {

View File

@ -71,8 +71,8 @@ export default {
children: [
{
label: '目的地ID',
// handler: this.updateDestination,
handler: this.undeveloped,
handler: this.updateDestination,
// handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{

View File

@ -787,7 +787,7 @@ const map = {
state.map.automaticRouteButtonList && state.map.automaticRouteButtonList.forEach(item => {
state.routeData[item.automaticRouteCode].automaticRouteCode = item.code;
});
state.routeList = routeDataList;
state.routeList = routeDataList;
},
setOverlapData: (state, overlapList) => {
state.overlapData = {};

View File

@ -66,7 +66,7 @@ export function covertData(resp, resolve) {
resolve();
});
});
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
const overlapData = resp.data.logicDataNew.overlapList;
const autoReentryData = resp.data.logicDataNew.autoReentryList; // 自动折返数据
const signalApproachSectionData = resp.data.logicDataNew.signalApproachSectionList; // 信号机接近区段数据

View File

@ -19,7 +19,7 @@
:device-code="deviceCode"
:countdown-time="countdownTime"
@passflow="passflow"
@faultdevice = "faultdevice"
@faultdevice="faultdevice"
@getUserRole="getUserRole"
@hidepanel="hidepanel"
@devicemodel="devicemodel"
@ -487,16 +487,16 @@ export default {
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
faultdevice() {
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
showdriving() {
this.panelShow = true;

View File

@ -5,7 +5,6 @@
<!-- 地图错误判断 -->
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
<div class="btn_hover" @click="menuClick">菜单</div>
<!-- transform: translateX(-${btnWidth}px) -->
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 设备视图 -->
<el-button v-if="isShow3dmodel && isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ $t('display.demon.deviceView') }}</el-button>

View File

@ -15,7 +15,6 @@
<el-button v-if="faultMode && !dataError" size="small" type="danger" @click="setFault">{{ $t('joinTraining.faultSetting') }}</el-button>
</template>
</el-button-group>
<!-- <el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? 'danger' : ''" @click="changeOperateMode()">故障模式</el-button> -->
<el-button v-if="isAdmin && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式':'切换到故障模式' }}</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button>

View File

@ -85,7 +85,8 @@ export default {
overlapOnlyOneSwitch: false,
generateCycle: false,
routeButton: false,
likeHa1: false,
likeHa1: false,
getNearlySignal: false,
overlapSettingByTrigger: false,
overlapReleaseTime: 45,
routeReleaseTime: 60
@ -94,7 +95,7 @@ export default {
focus: false,
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'overlapSettingByTrigger', 'generateFls'],
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls'],
selectList: [],
numberList: ['overlapReleaseTime', 'routeReleaseTime'],
optionsMap: {
@ -119,7 +120,8 @@ export default {
routeReleaseTime: '默认进路解锁时间',
generateCycle: '是否生成自动折返',
routeButton: '是否生成进路结束按钮',
likeHa1: '是否类似哈尔滨一号线联锁分为ATP信号、地面信号、引导信号',
likeHa1: '是否类似哈尔滨一号线联锁分为ATP信号、地面信号、引导信号',
getNearlySignal: '生成进路信号按钮,进路信号按钮是否取最近的一个信号机',
overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立',
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔'
}

View File

@ -3,13 +3,18 @@
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<div class="view-control-content">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules">
<div v-if="editModel.type == 'StationTurnBack'" class="card-box">
<div class="card_title">站后折返数据</div>
<fieldset v-if="editModel.type == 'StationTurnBack'" class="card-box">
<legend class="card_title">站后折返数据</legend>
<div>
<el-table :data="editModel.optionList" border style="width: 100%">
<el-table-column prop="id" label="编号" width="100px" />
<el-table-column prop="label" label="描述" width="250px" />
<el-table-column fixed="right" label="操作">
<el-table-column prop="id" label="编号" width="50px" />
<el-table-column prop="label" label="描述" />
<el-table-column label="配置默认" width="100px">
<template slot-scope="scope">
<el-checkbox @click.native.prevent="checkOverlab(editModel.optionList, scope.$index)" v-model="scope.row.checked"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="操作" width="100px">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.prevent="deleteOverlab(editModel.optionList, scope.$index)">移出</el-button>
<el-button type="text" size="small" @click.native.prevent="editOverlab(editModel.optionList, scope.$index)">编辑</el-button>
@ -45,7 +50,7 @@
</div>
</el-card>
</div>
</div>
</fieldset>
</config-list>
</div>
<div class="button_box">
@ -122,7 +127,8 @@ export default {
type: '',
name: '',
show: true, //
subtitleName: '',
subtitleName: '',
initId: '',
optionList: [], //
automaticRouteCode: '', // code
cycleCode: '', // code
@ -310,7 +316,8 @@ export default {
code: '',
type: '',
name: '',
show: true, //
show: true, //
initId: '',
subtitleName: '',
optionList: [], //
automaticRouteCode: '', // code
@ -380,7 +387,13 @@ export default {
this.handleTypes(selected._type);
this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make && this.$refs.make.resetFields();
this.activeName = 'first';
this.activeName = 'first';
selected.optionList.forEach(item => {
item.checked = false;
if (item.id == selected.initId) {
item.checked = true;
}
});
this.editModel = deepAssign(this.editModel, selected);
this.editModel.type = selected._type;
this.$nextTick(() => {
@ -441,7 +454,8 @@ export default {
edit() {
this.$refs['dataform'].validate((valid) => {
if (valid) {
const data = Object.assign({_type: this.editModel.type}, this.editModel);
const data = Object.assign({_type: this.editModel.type}, this.editModel);
console.log(data, '=====');
this.$emit('updateMapModel', data);
}
});
@ -469,7 +483,18 @@ export default {
} else {
this.$emit('deviceSelect', '');
}
},
},
checkOverlab(list, index) {
list.forEach((item, i) => {
if (i != index) {
item.checked = false;
}
})
list[index].checked = !list[index].checked;
if (list[index].checked) {
this.editModel.initId = list[index].id;
}
},
deleteOverlab(list, index) {
list.splice(index, 1);
this.cardMode = 'generate';
@ -485,7 +510,8 @@ export default {
const data = {
id: this.addBackModel.id,
type: this.addBackModel.type,
label: this.addBackModel.label,
label: this.addBackModel.label,
checked: false,
sectionList: this.addBackModel.type == 'NONE' ? [] : this.addBackModel.sectionList
};
this.editModel.optionList.splice(this.addBackModel.parentIndex, 1, data);
@ -502,7 +528,8 @@ export default {
this.editModel.optionList.push({
id: id,
type: this.addBackModel.type,
label: this.addBackModel.label,
label: this.addBackModel.label,
checked: false,
sectionList: this.addBackModel.type == 'NONE' ? [] : this.addBackModel.sectionList
});
this.$refs.hostileForm.resetFields();
@ -559,6 +586,7 @@ export default {
box-sizing: border-box;
position: relative;
margin-bottom: 15px;
margin-top: 15px;
&:last-child{
margin-bottom: 0;

View File

@ -135,7 +135,7 @@ export default {
name: '导入',
handleClick: this.handleImportMap,
type: 'file',
id: 'queryPagesFilesInput'
class: 'queryPagesFilesInput'
},
{
name: '导出',
@ -375,7 +375,11 @@ export default {
handleImportMap(index, row, idx) {
setTimeout(() => {
this.$set(row, 'loading' + idx, true);
const obj = document.getElementById('queryPagesFilesInput');
const objInput = document.getElementsByClassName('queryPagesFilesInput');
let obj = {files: null};
if (objInput.length) {
obj = objInput[index];
}
if (!obj.files) return;
const f = obj.files[0];
const reader = new FileReader();