This commit is contained in:
lVAL 2020-12-28 16:59:57 +08:00
commit f97a98da21
30 changed files with 950 additions and 362 deletions

View File

@ -70,7 +70,7 @@ export function getIbpInfoByStation(mapId, stationCode) {
// 获取IBP盘数据
export function getIbpList(params) {
return request({
url: `/api/ibp/list`,
url: `/api/ibp`,
method: 'get',
params: params
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -87,5 +87,6 @@ export default {
AuthorList: 'Authorization code list',
questionsRuleManage: 'Question rule manage',
preTheoryData: 'Pre Theory Data',
boardManage: 'Message Board Manage'
boardManage: 'Message Board Manage',
publishIBPManage:'publish IBP Manage'
};

View File

@ -92,5 +92,6 @@ export default {
AuthorList: '授权列表',
questionsRuleManage: '出题规则管理',
preTheoryData: '理论导入预处理',
boardManage: '留言板管理'
boardManage: '留言板管理',
publishIBPManage:'发布IBP盘管理'
};

View File

@ -14,13 +14,13 @@ class EEmergentCross extends Group {
const model = this.model.modelData;
const style = this.model.style;
const emergentOffset = model.inside ? style.StationStand.emergentCross.insideOffset : style.StationStand.emergentCross.outsideOffset;
const emergentOffset = model.inside ? style.StationStand.emergentRhombus.insideOffset : style.StationStand.emergentRhombus.outsideOffset;
const emergentH = model.right ? 1 : -1;
const emergentX = model.position.x + emergentH * emergentOffset.x;
const emergentY = model.position.y + emergentH * emergentOffset.y;
model.r = style.StationStand.emergentCross.mergentR;
model.n = style.StationStand.emergentCross.mergentN;
model.r = style.StationStand.emergentRhombus.mergentR;
model.n = style.StationStand.emergentRhombus.mergentN;
this.emergent = new Isogon({
zlevel: this.model.zlevel,
@ -33,7 +33,7 @@ class EEmergentCross extends Group {
},
style: {
lineWidth: 2,
stroke:style.StationStand.emergentCross.defaultColor
stroke:style.StationStand.emergentRhombus.defaultColor
}
});
this.add(this.emergent);
@ -52,7 +52,7 @@ class EEmergentCross extends Group {
},
style:{
lineWidth:2,
stroke:style.StationStand.emergentCross.defaultColor
stroke:style.StationStand.emergentRhombus.defaultColor
}
});
this.emergentLine2 = new Line({
@ -66,7 +66,7 @@ class EEmergentCross extends Group {
},
style:{
lineWidth:2,
stroke:style.StationStand.emergentCross.defaultColor
stroke:style.StationStand.emergentRhombus.defaultColor
}
});
this.add(this.emergentLine1);

View File

@ -49,7 +49,7 @@ class EHollowStand extends Group {
// 停车
model.trainParking && this.setColor(style.StationStand.hollowStand.doorOpenColor);
// 紧急停车
model.emergencyClosed && this.setColor(this.style.StationStand.hollowStand.spareColor);
model.emergencyClosed && this.setColor(style.StationStand.hollowStand.spareColor);
}
}

View File

@ -84,7 +84,7 @@ class ESolidStand extends Group {
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
model.trainParking && this.setStroke(style.StationStand.solidStand.doorOpenColor);
// 紧急停车
model.emergencyClosed && this.setColor(this.style.StationStand.solidStand.spareColor);
model.emergencyClosed && this.setColor(style.StationStand.solidStand.spareColor);
} else {
this.handlePassagerColor(model.num);
}

View File

@ -154,10 +154,10 @@ export default {
}
],
menuSpeed: [
{
label: '确认运行至前方站',
handler: this.limitSpeed
}
// {
// label: '',
// handler: this.limitSpeed
// }
]
};
},

View File

@ -66,7 +66,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mapGetters } from 'vuex';
import ConfirmControl from './childDialog/confirmControl';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getStationList } from '@/api/runplan';
export default {
name: 'StandRunLevel',
@ -84,7 +84,8 @@ export default {
selection: [],
isSelect: true,
isConfirm: false,
time: ''
time: '',
sortStationList: []
};
},
computed: {
@ -132,6 +133,7 @@ export default {
}
},
mounted() {
this.sortStationList = [];
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
@ -139,21 +141,33 @@ export default {
methods: {
loadInitData(selected) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { //
//
if (index != 0) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: !!selected.runLevelTimeForever });
}
if (!this.sortStationList.length) {
getStationList(this.$route.query.mapId).then(resp => {
this.sortStationList = resp.data;
this.handleTempData(selected);
});
} else {
//
if (index != this.stationList.length) {
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: !!selected.runLevelTimeForever });
this.handleTempData(selected);
}
},
handleTempData(selected) {
const stationIndex = this.sortStationList.findIndex((item) => item.code == selected.stationCode);
if (selected.right) {
const nextStation = this.sortStationList[stationIndex + 1];
const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && stand.right);
nextStation && nextStationStand && this.tempData.push({
name: `${nextStationStand.name}(${nextStation.name})`,
time: selected.runLevelTime ? selected.runLevelTime : 0,
check: !!selected.runLevelTimeForever
});
} else {
const nextStation = this.sortStationList[stationIndex - 1];
const nextStationStand = this.stationStandList.find(stand => stand.stationCode === nextStation.code && !stand.right);
nextStation && nextStationStand && this.tempData.push({
name: `${nextStationStand.name}(${nextStation.name})`,
time: selected.runLevelTime ? selected.runLevelTime : 0,
check: !!selected.runLevelTimeForever
});
}
},
doShow(operate, selected) {

View File

@ -230,7 +230,7 @@ export default {
parkingTime: this.control === '01' ? -1 : this.time,
parkingAlwaysValid: this.control === '01' ? true : this.effective
},
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == true ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
};
this.loading = true;

View File

@ -222,6 +222,19 @@ export default {
},
watch: {
'$store.state.menuOperation.setMenuChangeCount': function (val) {
const State2SimulationMap = {
'01': 'Local', //
'02': 'Center' //
};
if (this.selected._type) {
const control = this.getStationControl(this.selected);
const type = State2SimulationMap[this.$store.state.training.prdType];
if (control.controlMode != type) {
this.clearAllMenuShow();
this.centralizedStationList = new Array(15).fill({});
return false;
}
}
this.selectedObj = this.selected;
this.speedShowCon = false;
if (this.selectedObj._type) {
@ -321,6 +334,23 @@ export default {
}
}
},
getStationControl(selected) {
let control;
if (selected._type == 'StationStand') {
control = this.$store.getters['map/getDeviceStationCodeByStationCode'](selected.deviceStationCode);
} else if (selected._type == 'Station') {
control = this.$store.getters['map/getDeviceStationCodeByStationCode'](selected.code);
} else if (selected._type == 'Train') { //
control = this.$store.getters['map/getStationCodeByTrain'](selected);
} else if (selected._type == 'TrainWindow') {
control = this.$store.getters['map/getDeviceTrainWindowCodeByStationCode'](selected.code);
} else if (selected._type == 'LimitControl') {
control = {controlMode: 'Center'};
} else {
control = this.$store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
}
return control;
},
clickCommand(row) {
this.clearAllMenuShow();
const commandList = ['ATP进路', '取消ATP', '联锁进路', '取消联锁', '引导进路', '取消引导'];

View File

@ -116,7 +116,6 @@
<signal-detail ref="signalDetail" />
<init-signal-mode ref="initSignalMode" />
<signal-mode ref="signalMode" />
<system-detain ref="systemDetain" />
<running-interval ref="runningInterval" />
<adjust-strategy ref="adjustStrategy" />
<train-depart ref="trainDepart" />
@ -172,7 +171,6 @@ import SignalBlock from './menuDialog/signalBlock';
import SignalDetail from './menuDialog/signalDetail';
import InitSignalMode from './menuDialog/initSignalMode';
import SignalMode from './menuDialog/signalMode';
import SystemDetain from './menuDialog/systemDetain';
import RunningInterval from './menuDialog/runningInterval';
import AdjustStrategy from './menuDialog/adjustStrategy';
import TrainDepart from './menuDialog/trainDepart';
@ -221,7 +219,6 @@ export default {
SectionLock,
InitSignalMode,
SignalMode,
SystemDetain,
RunningInterval,
AdjustStrategy,
TrainDepart,
@ -423,28 +420,28 @@ export default {
children: [
{
title: '开放/关闭',
click: this.standOpenOrClose,
click: this.standOpenOrClose
},
{
title: '设置/取消扣车',
click: this.setStandDetain,
click: this.setStandDetain
},
{
title: '设置站间列车数量',
// click: this.setIntervalStopNumber
click: this.undeveloped,
click: this.undeveloped
},
{
title: '分配停站时间',
click: this.setAllocateTime,
click: this.setAllocateTime
},
{
title: '授权转移',
click: this.authorizeTransfer,
click: this.authorizeTransfer
},
{
title: '显示',
click: this.showStandDetail,
click: this.showStandDetail
}
]
},
@ -454,23 +451,23 @@ export default {
children: [
{
title: '命令',
click: this.setSwitchCommand,
click: this.setSwitchCommand
},
{
title: '封锁',
click: this.setBlockSwitch,
click: this.setBlockSwitch
},
{
title: '解除封锁',
click: this.setUnblockSwitch,
click: this.setUnblockSwitch
},
{
title: '请求动岔/请求或授权/取消',
click: this.setSwitchActive,
click: this.setSwitchActive
},
{
title: '显示',
click: this.showSwitchDetail,
click: this.showSwitchDetail
}
]
},
@ -481,31 +478,31 @@ export default {
{
title: '引导',
click: this.setSignalGuide,
click: this.setSignalGuide
},
{
title: '取消允许锁闭',
click: this.setSignalCanBlock,
click: this.setSignalCanBlock
},
{
title: '进路/命令',
click: this.setRouteCommand,
click: this.setRouteCommand
},
{
title: '信号指示模式',
click: this.setSignalModel,
click: this.setSignalModel
},
{
title: '封锁',
click: this.setSignalBlock,
click: this.setSignalBlock
},
{
title: '解除封锁',
click: this.setSignalCancelBlock,
click: this.setSignalCancelBlock
},
{
title: '显示',
click: this.showSignalDetail,
click: this.showSignalDetail
}
]
},
@ -515,19 +512,19 @@ export default {
children: [
{
title: '开放',
click: this.handleOpenSection,
click: this.handleOpenSection
},
{
title: '关闭',
click: this.handleCloseSection,
click: this.handleCloseSection
},
{
title: '临时限速',
click: this.handleLimitSpeed,
click: this.handleLimitSpeed
},
{
title: '显示',
click: this.handleSectionShow,
click: this.handleSectionShow
}
]
},
@ -538,27 +535,27 @@ export default {
{
title: '取消转换锁闭',
// click: this.handleLock
click: this.undeveloped,
click: this.undeveloped
},
{
title: '取消过岔锁闭',
// click: this.handleUnLock
click: this.undeveloped,
click: this.undeveloped
},
{
title: '远程预复位使能',
// click: this.handleRestoration
click: this.undeveloped,
click: this.undeveloped
},
{
title: '复位',
// click: this.handleSectionRestoration
click: this.undeveloped,
click: this.undeveloped
},
{
title: '显示',
// click: this.handleSectionStopShow
click: this.undeveloped,
click: this.undeveloped
}
]
},
@ -1414,7 +1411,7 @@ export default {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetain.doShow();
this.$refs.standDetain.doShow({active:'first'});
}
});
},
@ -1789,7 +1786,8 @@ export default {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.systemDetain.doShow(operate);
// this.$refs.systemDetain.doShow(operate);
this.$refs.standDetain.doShow({active:'second'});
}
});
},

View File

@ -1,4 +1,5 @@
<template>
<div>
<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="20">
@ -39,7 +40,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :disabled="!selected || speedLimitValue<=0" :loading="loading" @click="apply">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -49,8 +50,9 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template>
<script>
@ -141,7 +143,7 @@ export default {
this.tempData.push(item);
}
});
this.selected = selected;
// this.selected = selected;
this.initEle = null;
this.commandEleCode = null;
this.speedLimitValue = 0;
@ -226,7 +228,7 @@ export default {
return '';
}
},
commit() {
commit(isClosed = true) {
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.confirm.operation,
@ -237,11 +239,17 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionLimitSpeed.doShow(step, this.selected, this.speedLimitValue);
this.initEle = this.selected;
if (isClosed) {
this.doClose();
}
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
apply() {
this.commit(false);
},
commandSuccess(code, val) {
this.commandEleCode = code;
if (!val) {

View File

@ -1,4 +1,5 @@
<template>
<div>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
@ -25,7 +26,7 @@
<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 :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="apply">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -35,8 +36,9 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</div>
</template>
<script>
@ -133,6 +135,9 @@ export default {
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
apply() {
this.commit(false);
},
selectLine(val) {
if (!val) { return; }
this.initEle = null;
@ -173,7 +178,7 @@ export default {
}
return sectionElm.blockade ? '关闭双向:所有列车' : '打开';
},
commit() {
commit(isClosed = true) {
const step = {
code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Section.lock.confirm.operation : OperationEvent.Section.unlock.confirm.operation,
@ -184,6 +189,9 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionOpen.doShow(step, this.selected);
this.initEle = this.selected;
if (isClosed) {
this.doClose();
}
}
}).catch(() => {
this.$refs.noticeInfo.doShow();

View File

@ -48,7 +48,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>

View File

@ -97,7 +97,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道';
return this.isBlock ? '确认/取消关闭轨道' : '确认/取消开放轨道';
}
},
watch: {

View File

@ -2,13 +2,13 @@
<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-tabs type="border-card">
<el-tab-pane label="站台">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="站台" name="first">
<el-table
ref="singleTable"
:data="stationStandList"
highlight-current-row
height="350px"
height="280px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="站台" />
@ -17,7 +17,7 @@
<span>{{ getDetainStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<el-table-column prop="status" label="状态" width="80">
<!--<template slot-scope="scope">-->
<!--<div slot="reference" class="name-wrapper">-->
<span>打开</span>
@ -27,13 +27,20 @@
</el-table>
<el-checkbox v-model="allChecked" :disabled="true">所有站台(F)</el-checkbox>
</el-tab-pane>
<el-tab-pane label="系统">系统</el-tab-pane>
<el-tab-pane label="系统" style="height:310px;background: #F0F0F0;" name="second">
<div class="systemStatusOut">
<div class="systemStatus">系统状态</div>
<div class="activeStatus">
<el-input v-model="active" :disabled="true" size="mini" />
</div>
</div>
</el-tab-pane>
</el-tabs>
</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>
<div class="set-status-title">扣车</div>
<el-radio v-model="status" :disabled="standStatus" :label="true" style="margin-top:17px">设置</el-radio>
<br>
<el-radio v-model="status" :disabled="!standStatus" :label="false">取消</el-radio>
</div>
@ -75,7 +82,9 @@ export default {
allChecked: false,
dialogShow: false,
loading: false,
selected: null
selected: null,
activeName: 'first',
active: '未激活'
};
},
computed: {
@ -129,8 +138,11 @@ export default {
expandPath() {
console.log('展开进路预览');
},
doShow(operate, selected) {
this.selected = selected;
doShow(data) {
if (data.active == 'second') {
this.status = true;
}
this.activeName = data.active;
//
this.dialogShow = true;
this.$nextTick(function () {
@ -205,16 +217,39 @@ export default {
color: #000;
}
.set-status-box {
position: relative;
top: 200px;
position: absolute;
top: 150px;
border: 1px solid #AFAFAF;
padding-left: 10px;
padding-right: 20px;
}
.set-status-title{
position: relative;
position: absolute;
top: -15px;
background: #F0F0F0;
width: 60px;
width: 46px;
text-align: center;
}
.systemStatus{
width: 60px;
background: #f0f0f0;
position: absolute;
top: -15px;
left: 15px;
text-align: center;
}
.activeStatus{
width: 260px;
margin-top: 20px;
margin-left: 15px;
margin-bottom: 15px;
}
.systemStatusOut{
margin-top: 100px;
position: relative;
display: inline-block;
margin-left: 22px;
border: 1px #ccc solid;
width: 290px;
}
</style>

View File

@ -1,159 +0,0 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="19">
<el-tabs v-model="activeName" type="border-card" style="background: #F0F0F0">
<el-tab-pane label="站台" name="first" style="height: 300px;background: #F0F0F0;">站台</el-tab-pane>
<el-tab-pane label="系统" name="second" style="height:300px;background: #F0F0F0;">
<div class="set-status-title" style="width: 80px;">系统状态</div>
<div class="set-status-box" style="padding: 20px;">
<el-input v-model="active" :disabled="true" size="mini" />
</div>
</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="4" :offset="1">
<div class="set-status-title">扣车</div>
<div class="set-status-box">
<el-radio v-model="command" :disabled="true" :label="true">设置</el-radio>
<br>
<el-radio v-model="command" :label="false">取消</el-radio>
</div>
</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" @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: 'SignalBlock',
components: {
NoticeInfo
},
data() {
return {
status: false,
command: true,
allChecked: false,
dialogShow: false,
loading: false,
selected: null,
activeName: 'first',
operate: {},
active: '未激活'
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
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 '扣车';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
this.operate = operate;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
},
handleClick() {
},
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: 100px;
border: 1px solid #AFAFAF;
padding-left: 10px;
padding-top: 8px;
}
.set-status-title{
position: relative;
top: 115px;
background: #F0F0F0;
width: 40px;
text-align: center;
z-index: 22;
left: 10px;
}
</style>

View File

@ -107,6 +107,7 @@ const RunPlanEveryDay = () => import('@/views/publish/runPlanEveryDay/index');
const RunplanView = () => import('@/views/publish/runPlanEveryDay/runPlanView');
const PublishExamRule = () => import('@/views/publish/examRule/index');
const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index');
const PublishIBP = () => import('@/views/publish/publishIBP/index');
const TrainingPlatform = () => import('@/views/trainingPlatform/index');
@ -665,6 +666,13 @@ export const asyncRouter = [
path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft,
hidden: true
},
{ // 发布ibp盘
path: 'ibp',
component: PublishIBP,
meta: {
i18n: 'router.publishIBPManage'
}
}
]
},

View File

@ -58,7 +58,7 @@ export function handleMapData(mapData, type) {
}
}
export function loadRunPlanData(group, dataError) {
if (!store.state.runPlan.runPlanInfo) {
if (!store.state.runPlan.runPlanInfo || !store.state.runPlan.runPlanInfo.templateId) {
MessageBox.confirm('未获取到运行图信息!', '提示', {
confirmButtonText: '确定',
showCancelButton: false,

View File

@ -184,7 +184,7 @@ export default {
let res = {};
res = await createSimulationNew(data);
if (res && res.code == 200) {
const query = { group: res.data, lineCode:this.courseModel.lineCode };
const query = { group: res.data, lineCode:this.courseModel.lineCode, mapId: this.courseModel.mapId };
this.$router.push({ path: `/displayIscs/system`, query: query });
}
} catch (error) {

View File

@ -65,7 +65,7 @@ export default {
this.$store.dispatch('map/setTrainWindowShow', false);
this.$jlmap.off('zoom');
this.handleUpdateScreen();
if (this.$route.query.group) {
if (this.$route.query.group && !this.$route.path.includes('displayIscs')) {
this.subscribe();
}
},
@ -85,7 +85,7 @@ export default {
await this.setWindowSize();
await this.initLoadData();
this.disPlay = true;
if (this.$route.path.includes('design/bigScreen') || this.$route.query.noPreLogout || this.$route.query.projectDevice) {
if (this.$route.path.includes('design/bigScreen') || this.$route.query.noPreLogout || this.$route.query.projectDevice || this.$route.path.includes('displayIscs')) {
this.disPlay = false;
}
},

View File

@ -2,7 +2,7 @@
<div style="height: 100%; width: 100%;overflow-y:hidden;overflow-x:hidden;position: relative;">
<psd-system v-if="mode=='psdSystem'" />
<substation v-else-if="mode=='substation'" />
<schedule v-else-if="mode=='schedule'" />
<normal v-else-if="mode=='environmentThree'" />
<normal v-else-if="mode=='environmentFour'" />
<normal v-else-if="mode=='environmentFive'" />
@ -14,7 +14,7 @@
<normal v-else-if="mode=='environmentThirteen'" />
<normal v-else-if="mode=='environmentEleven'" />
<normal v-else-if="mode=='environmentTwelve'" />
<big-screen v-else-if="mode === 'signal'" />
<!-- -->
</div>
</template>
@ -22,11 +22,18 @@
import PsdSystem from './psdSystem/index.vue';
import Substation from './powerMonitor/substation.vue';
import Normal from './environment/index.vue';
import Schedule from './schedule';
import BigScreen from '@/views/designPlatform/bigScreen';
import { getSimulationInfoNew } from '@/api/simulation';
import { getByGroupStationList } from '@/api/jmap/map';
import { loadRunPlanData } from '@/utils/loaddata';
export default {
components:{
Schedule,
PsdSystem,
Substation,
Normal
Normal,
BigScreen
},
data() {
return {
@ -34,21 +41,44 @@ export default {
deviceList: []
};
},
computed: {
group() {
return this.$route.query.group;
}
},
watch: {
'$route': function(val) {
this.mode = this.$route.params.mode;
},
'$store.state.socket.runPlanReloadCount': function (val) {
getSimulationInfoNew(this.group).then(res => {
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
loadRunPlanData(this.group);
});
}
// '$store.state.iscs.selectedCount': function() {
// const device = this.$store.state.iscs.selected;
// if (device && device._type === 'IscsButton' && device.function === 'GraphicEle') {
// this.$refs.graphicEle.doShow();
// } else if (device && this.deviceList.includes(device._type)) {
// this.$refs.deviceControl.doShow(device);
// }
// }
},
mounted() {
this.mode = this.$route.params.mode;
getSimulationInfoNew(this.group).then(res => {
this.$store.dispatch('runPlan/setRunPlanInfo', res.data.runPlan);
this.loadRunData();
});
},
methods: {
loadRunData() {
this.$store.dispatch('runPlan/clear').then(() => {
if (this.group) {
//
getByGroupStationList(this.group).then(response => {
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
loadRunPlanData(this.group);
});
}).catch(() => {
this.$messageBox(this.$t('display.schema.getStationListFail'));
});
}
});
}
}
};
</script>

View File

@ -0,0 +1,507 @@
<template>
<div id="PlanSchedule" :style="{ height: height+'px'}">
<div class="left">
<div :id="runPlanId" />
</div>
<div class="right">
<data-table
ref="serviceTable1"
:height="height/2"
:config="serviceNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="scheduleTouch"
/>
<data-table
ref="tripTable1"
:height="height/2"
:config="tripNumberConfig"
:style="{top: top-height/2+'px'}"
@touch="trainNumTouch"
/>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { timeFormat } from '@/utils/date';
import DataTable from '@/views/planSchedule/menusPlan/components/dataTable';
import echarts from 'echarts';
import {toTimeStamp, formatDuring} from '@/utils/date';
import { deepAssign } from '@/utils/index';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'PlanSchedule',
components: {
DataTable
},
data() {
return {
top: 0,
height: 0,
inter:null,
runPlanId: 'run-plan-view',
myChart: null,
PlanConvert: {},
serviceNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.serviceNumberChange,
showClose: false,
columns: [
{
prop: 'serviceNumber',
label: '表号'
},
{
width: 40
}
]
},
tripNumberConfig: {
data: [],
highlightCurrentRow: true,
handleChange: this.tripNumberChange,
showClose: false,
columns: [
{
prop: 'tripNumber',
label: '车次号'
},
{
width: 40
}
]
},
realData: {},
kmRangeCoordMap: {},
absoluteTime: 2 * 3600,
indexKmRangeMap: {},
dialogLoading: false,
dialogShow: false,
seriesMap: {},
staticSeries: [],
runSeries: [],
selectSeries: [],
runPlanData: {}
};
},
computed: {
...mapGetters('runPlan', [
'stations'
]),
maxWidth() {
return this.$store.state.app.width > 1920 ? 1920 : this.$store.state.app.width;
},
maxHeight() {
return this.$store.state.app.height > 1080 ? 1050 : this.$store.state.app.height - 30;
},
title() {
return this.$t('display.runPlan.previewRunDiagram');
}
},
watch: {
maxWidth() {
this.setPosition();
},
maxHeight() {
this.setPosition();
},
'$store.state.runPlan.planLoadedCount': async function () {
try {
await this.loadChartPage();
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
if (this.dialogShow) {
await this.loadInitData();
}
} catch (e) {
console.error(e);
} finally {
this.loading = false;
}
},
'$store.state.socket.simulationReset': function (val) {
this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
if (this.dialogShow) {
this.loadInitData();
}
},
'$store.state.runPlan.planSizeCount': function () {
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
},
'$store.state.socket.trainStationList': function (val) {
if (val.length) {
this.updateRunPlanData(val);
}
}
},
mounted() {
this.staticSeries = []; this.selectSeries = []; this.runSeries = []; this.runPlanData = {};
this.PlanConvert = this.$theme.loadPlanConvert(this.$route.query.lineCode);
this.loadChartPage();
EventBus.$on('clearRunSeries', () => {
this.runSeries = [];
});
},
beforeDestroy() {
this.$store.dispatch('runPlan/setSelected', null);
this.destroy();
},
methods: {
async doClose() {
this.dialogShow = false;
this.inter && clearInterval(this.inter);
},
serviceNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
this.renderTripNumber({ serviceNumber: row.serviceNumber, tripNumber: null });
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
if (serviceObj) {
this.analyticalTripNumber(serviceObj.trainMap);
}
}
},
tripNumberChange(row) {
if (row) {
this.$store.dispatch('runPlan/setSelected', { serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
this.renderTripNumber({ serviceNumber: this.$store.state.runPlan.selected.serviceNumber, tripNumber: row.tripNumber });
}
},
async analyticalServiceNumber(data) {
this.serviceNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return parseInt(data[a].serviceNumber) - parseInt(data[b].serviceNumber); })
.map(serviceNumber => { return { serviceNumber }; });
},
async analyticalTripNumber(data) {
this.tripNumberConfig.data = Object.keys(data || {})
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
.map(tripNumber => { return { tripNumber }; });
},
async setPosition() {
this.$nextTick(() => {
const top = 54;
const width = this.maxWidth * 0.85;
let height = this.maxHeight;
height = height - top;
this.$store.dispatch('runPlan/resize', { width, height });
if (this.top != top) {
this.top = top;
}
if (this.height != height) {
this.height = height - top;
}
});
},
updateRunPlanData(data) {
const stations = this.$store.state.runPlan.stations;
const initialPlanData = this.$store.state.runPlan.initialPlanData;
data.forEach(item => {
if (item && initialPlanData[item.serviceNumber]) {
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
if (initialPlanData[item.serviceNumber].trainMap[ele + ''].tripNumber == item.tripNumber) {
item.directionCode = initialPlanData[item.serviceNumber].trainMap[ele + ''].directionCode;
}
});
item.secondTime = item.second;
}
});
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
);
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
this.myChart && this.myChart.setOption({series: series});
},
async loadChartPage() {
try {
this.seriesMap = {};
this.staticSeries = [];
const stations = this.$store.state.runPlan.stations;
const planData = this.$store.state.runPlan.planData;
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
this.pushModels(this.staticSeries, [this.PlanConvert.initializeYaxis(stations)]);
this.staticSeries = this.pushModels(this.staticSeries, this.PlanConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { color: '#000', width: 0.5 }));
this.staticSeries.forEach(item => {
this.seriesMap[item.name] = item;
});
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
await this.setPosition();
await this.loadInitData();
this.inter && clearInterval(this.inter);
} catch (error) {
this.$messageBox(`加载运行图数据失败`);
}
},
async loadInitData() {
this.myChart && this.myChart.showLoading();
const option = {
tooltip: {
axisPointer: {
trigger: 'item',
type: 'cross'
},
formatter: this.axisTooltip,
borderWidth: 1
},
grid: {
right: '40px',
left: '120px',
height: '85%'
},
xAxis: [
{
type: 'category',
data: [],
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
formatter: this.xAxisLableFormat,
textStyle: {
color: '#333'
}
},
axisPointer: {
snap: true,
label: {
formatter: this.xAxisPointFormat,
backgroundColor: 'rgb(255,0,0,0.5)',
color: 'white'
}
}
}
],
yAxis: [
{
type: 'value',
yAxisIndex: 0,
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
}
}
],
dataZoom: [{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}],
series: [
]
};
await this.xAxisInit(option);
await this.yAxisInit(option);
await this.loadInitChart(option);
this.myChart && this.myChart.hideLoading();
},
pushModels(series, models) {
if (models && models.length) {
models.forEach(elem => {
if (elem) {
series.push(elem);
}
});
}
return series;
},
loadInitChart(option) {
return new Promise((resolve, reject) => {
try {
this.destroy();
let startValue = 3600 + this.PlanConvert.TranslationTime;
const offsetTime = 3600;
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
startValue = initTime - this.PlanConvert.TranslationTime;
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (this.myChart) {
this.myChart.setOption(option);
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
this.myChart.on('click', this.mouseClick);
}
resolve(true);
} catch (error) {
reject(error);
}
});
},
xAxisPointFormat(params) {
return timeFormat(params.value);
},
yAxisPointFormat(params) {
return this.PlanConvert.computedFormatYAxis(this.stations, params);
},
xAxisLableFormat(value, index) {
return timeFormat(value);
},
yAxisLableFormat(value, index) {
return '';
},
xAxisInit(option) {
const list = [];
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
list.push(time);
}
const startValue = 3600 * 6;
const offsetTime = 3600 * 1;
option.xAxis[0].data = list;
if (!option.dataZoom[0].startValue) {
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
}
if (!option.dataZoom[0].endValue) {
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
}
},
yAxisInit(option) {
if (Object.keys(this.PlanConvert).length) {
option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
option.yAxis[0].max = this.PlanConvert.computedYaxisMaxValue(this.stations);
}
},
axisTooltip(param) {
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
return [
`Point Data <hr size=1 style=" margin: 3px 0">`,
`车站名称: ${station.name}<br>`,
`车站公里标: ${station.kmRange} km <br>`,
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
].join('');
},
renderTripNumber(params) {
const tripNumber = params.tripNumber; //
const serviceNumber = params.serviceNumber; //
let data, markPoint;
if (tripNumber && this.seriesMap[serviceNumber]) {
const temp = this.seriesMap[serviceNumber].data.filter(elem => elem[3] == tripNumber);
if (temp.length) {
data = temp;
this.seriesMap[serviceNumber].markPoint.data.forEach(each=> {
if (each.name == temp[0][4]) {
markPoint = deepAssign({}, {data:[each]});
markPoint.symbol = 'roundRect';
markPoint.symbolSize = 1;
markPoint.data[0].label.color = '#f00';
}
});
}
} else if (this.seriesMap[serviceNumber]) {
markPoint = deepAssign({}, this.seriesMap[serviceNumber].markPoint);
markPoint.data.forEach(each => {
each.label.color = '#f00';
});
data = this.seriesMap[serviceNumber].data;
}
this.selectSeries = [{
name: 'trainLabel',
lineStyle: {
color: '#f00',
width: 2,
type: 'solid'
},
z: 10,
type: 'line',
markPoint:markPoint,
animation: false,
data: data
}];
const series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
this.myChart && this.myChart.setOption({series: series});
},
mouseClick(params) {
const model = {
serviceNumber: params.seriesName
};
this.$store.dispatch('runPlan/setSelected', model);
},
reSize(opt) {
if (this.myChart) {
this.myChart.resize({
width: opt.width,
height: opt.height,
silent: false
});
}
},
destroy() {
if (this.myChart && this.myChart.isDisposed) {
this.myChart.dispose();
this.myChart = null;
}
},
scheduleTouch() {
},
trainNumTouch() {
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
#PlanSchedule {
position: absolute;
width: 100%;
.left {
height: 100%;
width: 85%;
float: left;
}
.right {
height: 100%;
width: 15%;
float: right;
}
}
</style>

View File

@ -49,8 +49,8 @@
<span class="eachButtonText">{{ button.name }}</span>
</div>
<div v-if="button.children&&button.children.length>0" class="childGroup" :class="isActive(button)">
<div v-for="child in button.children" :key="child.id" class="childButton" @click="gotoPage(button,child)">
<div class="childButtonIn">{{ child.name }}</div>
<div v-for="child in button.children" :key="child.id" class="childButton" :style="{cursor:child.disabled? 'not-allowed': 'pointer'}" @click="gotoPage(button,child)">
<div class="childButtonIn" :style="{color:child.disabled?'#c0c0c0':'#000'}">{{ child.name }}</div>
</div>
<div class="childLine" />
</div>
@ -260,7 +260,8 @@ export default {
name: 'TIS管理器',
mode: 'tis',
id: 'tis',
type: 'interface'
type: 'interface',
disabled: true
},
{
name: '列车时刻表',
@ -278,7 +279,8 @@ export default {
name: '全线信号系统界面',
mode: 'allLineSignal',
id: 'allLineSignal',
type: 'interface'
type: 'interface',
disabled: true
}
]}
// communication:{name:'', type:'totalSystem', id: 'communication', active:false, icon:iscs_icon7,
@ -398,8 +400,10 @@ export default {
this.buttonId = button.id;
},
gotoPage(button, child) {
if (!child.disabled) {
button.active = false;
this.selectChildren(child.id, false);
}
},
changeStation(item) {
this.selectStation = item;
@ -425,7 +429,7 @@ export default {
if (station) {
stationName = station.name;
}
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode };
const query = {stationName: stationName, stationId: this.selectStation, group: this.group, lineCode:this.lineCode, mapId: this.$route.query.mapId, noPreLogout:this.$route.query.noPreLogout };
if (isReplace) {
this.$router.replace({ path: `/displayIscs/system/stationConfig/${type}`, query: query });

View File

@ -7,6 +7,7 @@
<el-button-group>
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
<el-button v-if="userRole==='DISPATCHER' && !$route.query.projectDevice" size="small" @click="goIscs">ISCS</el-button>
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
<template v-if="isAdmin">
<el-button v-if="!running && !dataError && $route.query.type !== 'ILW'" size="small" type="warning" @click="loadRunPlan">
@ -202,6 +203,18 @@ export default {
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
goIscs() {
const routeData = this.$router.resolve({
path:`/displayIscs/system`,
query:{
lineCode: this.$route.query.lineCode,
mapId: this.$route.query.mapId,
group: this.$route.query.group,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
// ibp
goIbp() {
// this.$refs.selectIbp.doShow();

View File

@ -129,7 +129,7 @@ export default {
}
},
doShow() {
this.newModel.map = this.$route.params.mapId || this.$route.query.mapId;
this.newModel.mapId = this.$route.params.mapId || this.$route.query.mapId;
this.pullModel.mapId = this.$route.params.mapId || this.$route.query.mapId;
this.dialogShow = true;
this.initLoad();

View File

@ -129,7 +129,7 @@ export default {
}
},
doShow() {
this.newModel.map = this.$route.params.mapId || this.$route.query.mapId;
this.newModel.mapId = this.$route.params.mapId || this.$route.query.mapId;
this.pullModel.mapId = this.$route.params.mapId || this.$route.query.mapId;
this.dialogShow = true;
this.initLoad();

View File

@ -0,0 +1,90 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
</template>
<script>
import { getIbpList } from '@/api/ibp';
import {getPublishMapListOnline } from '@/api/jmap/map';
export default {
name: 'PublishIBP',
data() {
return {
mapListMap:{},
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '80px',
reset: true,
queryObject: {
mapId: {
type: 'select',
label: '地图名称',
config: {
data: []
}
},
stationCode: {
type: 'select',
label: '车站名称',
config: {
data: []
}
}
}
},
queryList: {
query: getIbpList,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '所属地图',
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.covertMap(row); },
tagType: (row) => { return ''; }
},
{
title: '关联站台',
prop: 'stationCode'
},
{
title: '创建时间',
prop: 'createTime'
}
]
}
};
},
mounted() {
this.loadInitData();
},
methods:{
async loadInitData() {
const res = await getPublishMapListOnline();
res.data.forEach(elem=>{
this.queryForm.queryObject.mapId.config.data.push({label:elem.name, value:elem.id});
this.mapListMap[elem.id] = elem.name;
});
},
covertMap(row) {
return this.mapListMap[row.mapId];
}
// covertData(row) {
// // const staitonlist = this.stationList.filter(element => {
// // return row.stationCode == element.code;
// // });
// // if (staitonlist.length) {
// // return staitonlist[0].name;
// // } else {
// // return '';
// // }
// }
}
};
</script>