增加西安 三号线设置折返策略元素
This commit is contained in:
parent
49c61f8c8d
commit
9be9c9a313
File diff suppressed because one or more lines are too long
@ -502,6 +502,23 @@ class SkinCode extends defaultStyle {
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationTurnBack] = { // 站后折返
|
||||
lamp: {
|
||||
fill: '#FFFF00', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
},
|
||||
text: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 12,
|
||||
distance: 10
|
||||
},
|
||||
rect: {
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#fff',
|
||||
lineWidth: 2,
|
||||
padding: 6
|
||||
}
|
||||
}
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
|
@ -250,4 +250,9 @@ deviceRender[deviceType.Power] = {
|
||||
_type: deviceType.Power,
|
||||
zlevel: 1
|
||||
};
|
||||
// 站后折返
|
||||
deviceRender[deviceType.StationTurnBack] = {
|
||||
_type: deviceType.StationTurnBack,
|
||||
zlevel: 1
|
||||
};
|
||||
export default deviceRender;
|
||||
|
@ -43,7 +43,8 @@ const deviceType = {
|
||||
SplitStation:'SplitStation',
|
||||
SwitchFault: 'SwitchFault',
|
||||
Arrow: 'Arrow',
|
||||
Power: 'Power'
|
||||
Power: 'Power',
|
||||
StationTurnBack: 'StationTurnBack'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -110,6 +110,9 @@ class Status {
|
||||
handleLimitControl(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleStationTurnBack(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
}
|
||||
|
120
src/jmapNew/shape/StationTurnBack/index.js
Normal file
120
src/jmapNew/shape/StationTurnBack/index.js
Normal file
@ -0,0 +1,120 @@
|
||||
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';
|
||||
|
||||
export default class StationTurnBack extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 40;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
// this.isShowShape = true;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
if (model.show) {
|
||||
this.control = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: model.position.x,
|
||||
cy: model.position.y,
|
||||
r: style.StationTurnBack.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
fill: style.StationTurnBack.lamp.fill
|
||||
}
|
||||
});
|
||||
this.controlRect = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: model.position.x - style.StationTurnBack.lamp.radiusR - style.StationTurnBack.rect.padding / 2,
|
||||
y: model.position.y - style.StationTurnBack.lamp.radiusR - style.StationTurnBack.rect.padding / 2,
|
||||
width: style.StationTurnBack.lamp.radiusR * 2 + style.StationTurnBack.rect.padding,
|
||||
height: style.StationTurnBack.lamp.radiusR * 2 + style.StationTurnBack.rect.padding
|
||||
},
|
||||
style: {
|
||||
fill: style.StationTurnBack.rect.fill,
|
||||
stroke: style.StationTurnBack.rect.stroke,
|
||||
lineWidth: style.StationTurnBack.rect.lineWidth
|
||||
}
|
||||
});
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.position.x,
|
||||
y: model.position.y - style.StationTurnBack.lamp.radiusR - style.StationTurnBack.text.distance,
|
||||
fontWeight: style.StationTurnBack.text.fontWeight,
|
||||
fontSize: style.StationTurnBack.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: model.name,
|
||||
textFill: '#fff',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'bottom'
|
||||
}
|
||||
});
|
||||
this.strategyText = new Text({
|
||||
_subType: 'Text',
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.position.x,
|
||||
y: model.position.y + style.StationTurnBack.lamp.radiusR + style.StationTurnBack.text.distance,
|
||||
fontWeight: style.StationTurnBack.text.fontWeight,
|
||||
fontSize: style.StationTurnBack.text.fontSize,
|
||||
fontFamily: style.fontFamily,
|
||||
text: '按计划执行',
|
||||
textFill: '#fff',
|
||||
textAlign: 'center',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
});
|
||||
this.add(this.control);
|
||||
this.add(this.controlRect);
|
||||
this.add(this.text);
|
||||
this.add(this.strategyText);
|
||||
// this.strategyText.hide();
|
||||
}
|
||||
}
|
||||
|
||||
recover() {
|
||||
|
||||
}
|
||||
|
||||
// 设置状态
|
||||
setState(model) {
|
||||
// if (!this.isShowShape) return;
|
||||
// this.recover();
|
||||
// console.log(model, '站后折返model')
|
||||
}
|
||||
|
||||
setShowMode() {
|
||||
}
|
||||
setShowStation(flag) {
|
||||
// if (flag) {
|
||||
// this.eachChild(item => {
|
||||
// item.show();
|
||||
// });
|
||||
// this.isShowShape = true;
|
||||
// this.setState(this.model);
|
||||
// } else {
|
||||
// this.eachChild(item => {
|
||||
// item.hide();
|
||||
// });
|
||||
// this.isShowShape = false;
|
||||
// }
|
||||
}
|
||||
}
|
@ -25,6 +25,7 @@ import SaidLamp from './SaidLamp/index.js';
|
||||
import SplitStation from './SplitStation/index';
|
||||
import Arrow from './Arrow/index';
|
||||
import Power from './Power/index';
|
||||
import StationTurnBack from './StationTurnBack/index';
|
||||
|
||||
/** 图库*/
|
||||
const mapShape = {};
|
||||
@ -71,6 +72,7 @@ mapShape[deviceType.SwitchFault] = SaidLamp;
|
||||
mapShape[deviceType.SplitStation] = SplitStation;
|
||||
mapShape[deviceType.Arrow] = Arrow;
|
||||
mapShape[deviceType.Power] = Power;
|
||||
mapShape[deviceType.StationTurnBack] = StationTurnBack;
|
||||
|
||||
function shapefactory(device, jmap) {
|
||||
const type = device._type;
|
||||
|
@ -55,6 +55,7 @@ export default {
|
||||
doShow(messages) {
|
||||
this.dialogShow = true;
|
||||
this.messages = [this.$t('tip.commandFailed')];
|
||||
console.log(this.messages);
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
|
@ -4,110 +4,72 @@
|
||||
class="xian-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>车站名称</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>站台方向</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<div style="height: 32px;">
|
||||
<el-radio v-model="standStatus" :label="true" style="line-height: 32px;" disabled>上行方向</el-radio>
|
||||
<el-radio v-model="standStatus" :label="false" style="line-height: 32px;" disabled>下行方向</el-radio>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationName" size="mini" disabled />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>站台状态</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||
<el-table-column prop="name" :width="170" label="折返站" />
|
||||
<el-table-column prop="station" label="折返站台" />
|
||||
<el-table-column prop="strategy" label="折返策略">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="scope.row.strategy"
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
|
||||
<div style="margin-bottom: 5px;">
|
||||
<el-input v-model="stationStrategy" size="mini" disabled />
|
||||
</div>
|
||||
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="strategyList"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
@change="strategySelectChange"
|
||||
height="180"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in strategyList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="label" style="margin-left:30px" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<span v-if="isSelect && tempData.length">{{ $t('menu.switchbackStrategyTip') }}</span>
|
||||
<span v-if="isConfirm && tempData.length">{{ $t('menu.setSwitchbackStrategyTipPrefix') + tempData[0].name + $t('menu.setSwitchbackStrategyTipSuffix') }}</span>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'StandBackStrategy',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyList: [
|
||||
{
|
||||
value: '01',
|
||||
label: this.$t('menu.noSwitchback')
|
||||
},
|
||||
{
|
||||
value: '02',
|
||||
label: this.$t('menu.noOneSwitchback')
|
||||
},
|
||||
{
|
||||
value: '03',
|
||||
label: this.$t('menu.automaticChange')
|
||||
},
|
||||
{
|
||||
value: '04',
|
||||
label: this.$t('menu.default')
|
||||
}
|
||||
],
|
||||
strategyList: [],
|
||||
stationName: '',
|
||||
standStatus: '',
|
||||
stationStrategy: '',
|
||||
selection: [],
|
||||
isSelect: true,
|
||||
isConfirm: false,
|
||||
strategy: ''
|
||||
strategyId: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -121,13 +83,13 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Station.setBackStrategy.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Station.setBackStrategy.choose.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.setSwitchbackStrategy');
|
||||
return '策略选择';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -136,23 +98,12 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standStatus = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standStatus = selected.right;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected);
|
||||
this.stationName = selected.name || '';
|
||||
this.stationStrategy = ''; // 当前默认折返策略
|
||||
this.strategyList = selected.optionList; // 策略列表
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -160,6 +111,18 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
clickEvent(row, column, event) {
|
||||
const operate = {
|
||||
operation: OperationEvent.Station.setBackStrategy.choose.operation
|
||||
};
|
||||
this.strategyId = row.id;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
@ -175,21 +138,6 @@ export default {
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
strategySelectChange(strategy) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||
val: `${strategy}`
|
||||
};
|
||||
|
||||
this.strategy = strategy;
|
||||
this.isSelect = false;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
@ -197,16 +145,8 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
param:{
|
||||
standReentryStrategy: this.strategy
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.setBackStrategy, {id: this.strategyId}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -9,6 +9,7 @@
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
@ -26,6 +27,7 @@ import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from './passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
@ -42,6 +44,7 @@ export default {
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
PassiveAlarm,
|
||||
MenuStationTurnBack,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
|
109
src/jmapNew/theme/xian_01/menus/menuStationTurnBack.vue
Normal file
109
src/jmapNew/theme/xian_01/menus/menuStationTurnBack.vue
Normal file
@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'menuStationTurnBack',
|
||||
components: {
|
||||
PopMenu,
|
||||
StandBackStrategy
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationTurnBack) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.stationCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -256,6 +256,7 @@ export const menuOperate = {
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
//
|
||||
},
|
||||
StationControl:{
|
||||
requestCentralControl:{
|
||||
@ -272,7 +273,12 @@ export const menuOperate = {
|
||||
// 紧急站控
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
},
|
||||
setBackStrategy:{
|
||||
// 设置折返策略
|
||||
operation: OperationEvent.Station.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
},
|
||||
},
|
||||
TrainWindow: {
|
||||
editTrainId: {
|
||||
|
@ -144,6 +144,10 @@ export function parser(data, skinCode, showConfig) {
|
||||
zrUtil.each(data.splitStationList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.SplitStation, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.tbStrategyList || [], elem => { // 站后折返按钮
|
||||
mapDevice[elem.code] = createDevice(deviceType.StationTurnBack, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
zrUtil.each(data.arrowList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Arrow, elem, propConvert, showConfig);
|
||||
}, this);
|
||||
@ -330,6 +334,7 @@ export function updateMapData(state, model) {
|
||||
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
||||
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
|
||||
case deviceType.StationTurnBack : updateForList(model, state, 'tbStrategyList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ export const DeviceMenu = {
|
||||
AutoTurnBack: '11',
|
||||
AxleReset: '12',
|
||||
Enabled: '13',
|
||||
StationTurnBack: '14',
|
||||
|
||||
Map: '100',
|
||||
PrdCategory: '101',
|
||||
|
@ -204,7 +204,9 @@ export default {
|
||||
/** 上电解锁 */
|
||||
CMD_STATION_POWER_ON_UNLOCK: {value: 'Station_Power_On_Unlock', label: '上电解锁'},
|
||||
/** 执行关键操作测试 */
|
||||
CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'}
|
||||
CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'},
|
||||
// 设置折返策略
|
||||
CMD_STATION_SET_TURN_BACK_STRATEGY: {value: 'Station_Set_Turn_Back_Strategy', label: '设置折返策略'}
|
||||
},
|
||||
|
||||
// 列车
|
||||
|
@ -1711,8 +1711,23 @@ export const OperationEvent = {
|
||||
operation: '609',
|
||||
domId: '_Tips-Station-GuideLock-Button{TOP}'
|
||||
}
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy: {
|
||||
menu: {
|
||||
operation: '610',
|
||||
domId: '_Tips-Station-SetBackStrategy-Menu'
|
||||
},
|
||||
choose: {
|
||||
operation: '6101',
|
||||
domId: '_Tips-Station-setBackStrategy-Choose'
|
||||
},
|
||||
confirm: {
|
||||
operation: '6102',
|
||||
domId: '_Tips-Station-setBackStrategy-confirm'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 列车
|
||||
Train: {
|
||||
|
@ -364,6 +364,13 @@ const map = {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
tbStrategyList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.tbStrategyList || [];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
axleCounterResetButtonList: (state) => {
|
||||
if (state.map) {
|
||||
return state.map.axleCounterResetButtonList || [];
|
||||
|
@ -4,8 +4,8 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -145,6 +145,18 @@ export default {
|
||||
mode: 'bas',
|
||||
id: '25',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '电扶梯',
|
||||
mode: 'bas',
|
||||
id: '26',
|
||||
type: 'interface'
|
||||
},
|
||||
{
|
||||
name: '机电排水',
|
||||
mode: 'bas',
|
||||
id: '27',
|
||||
type: 'interface'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -131,6 +131,22 @@
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="楼梯" name="Escalator">
|
||||
<escalator
|
||||
ref="escalator"
|
||||
style="width: 100%;height: 100%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="闸机" name="FasBrakeMachine">
|
||||
<fas-brake-machine
|
||||
ref="fasBrakeMachine"
|
||||
style="width: 100%;height: 100%;"
|
||||
@createDataModel="createDataModel"
|
||||
@deleteDataModel="deleteDataModel"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="照明组" name="LightingGroup">
|
||||
<lighting-group
|
||||
ref="lightingGroup"
|
||||
@ -198,6 +214,8 @@ import LightingGroup from './lightingGroup';
|
||||
import BalancedElectric from './balancedElectric';
|
||||
import ElectricButterflyValve from './electricButterflyValve';
|
||||
import Cistern from './cistern';
|
||||
import Escalator from '../iscsOperate/escalator'; // 楼梯
|
||||
import FasBrakeMachine from '../iscsOperate/brakeMachine'; // 闸机
|
||||
|
||||
export default {
|
||||
name: 'IscsOperate',
|
||||
@ -221,7 +239,9 @@ export default {
|
||||
LightingGroup,
|
||||
BalancedElectric,
|
||||
ElectricButterflyValve,
|
||||
Cistern
|
||||
Cistern,
|
||||
Escalator,
|
||||
FasBrakeMachine
|
||||
},
|
||||
mixins: [
|
||||
],
|
||||
|
37
src/views/iscs/iscsSystem/config/bas/electricEscalator.vue
Normal file
37
src/views/iscs/iscsSystem/config/bas/electricEscalator.vue
Normal file
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="bigSystemBox">
|
||||
<div class="title-name">{{ $route.query.stationName }}机电、电扶梯</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1220" :canvas-height="650" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
name: 'LightingSystem',
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show('26');
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.title-name{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
margin-top: 30px;
|
||||
color: #56E5DE;
|
||||
}
|
||||
</style>
|
36
src/views/iscs/iscsSystem/config/bas/waterSupply.vue
Normal file
36
src/views/iscs/iscsSystem/config/bas/waterSupply.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div class="bigSystemBox">
|
||||
<div class="title-name">{{ $route.query.stationName }}机电给排水</div>
|
||||
<div class="">
|
||||
<iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="650" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
export default {
|
||||
components: {
|
||||
iscsSystem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$refs.iscsPlate.show('27');
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.title-name{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
margin-top: 30px;
|
||||
color: #56E5DE;
|
||||
}
|
||||
</style>
|
@ -28,8 +28,10 @@
|
||||
<small-system v-else-if="mode==='smallSystem'" />
|
||||
<water-system v-else-if="mode==='waterSystem'" />
|
||||
<lighting-system v-else-if="mode === 'lighting'" />
|
||||
<graphic-ele ref="graphicEle" />
|
||||
<device-control ref="deviceControl" />
|
||||
<graphic-ele v-else-if="mode === 'graphicEle'" />
|
||||
<device-control v-else-if="mode === 'deviceControl'" />
|
||||
<electric-escalator v-else-if="mode === 'electricEscalator'" />
|
||||
<water-supply v-else-if="mode === 'waterSupply'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -64,6 +66,8 @@ import waterSystem from './bas/waterSystem';
|
||||
import LightingSystem from './bas/lightingSystem';
|
||||
import GraphicEle from './graphicEle';
|
||||
import DeviceControl from './deviceControl';
|
||||
import ElectricEscalator from './bas/electricEscalator';
|
||||
import WaterSupply from './bas/waterSupply';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -96,7 +100,9 @@ export default {
|
||||
SmallSystem,
|
||||
BigSystem,
|
||||
waterSystem,
|
||||
LightingSystem
|
||||
LightingSystem,
|
||||
ElectricEscalator,
|
||||
WaterSupply
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -3,7 +3,51 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules">
|
||||
<div class="card-box" v-if="editModel.type == 'StationTurnBack'">
|
||||
<div class="card_title">站后折返数据</div>
|
||||
<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="操作">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 12px;">{{ cardTitle }}</span>
|
||||
<el-button v-if="cardMode === 'generate'" style="float: right; padding: 3px 0" type="text" @click="generateOverlab">生成</el-button>
|
||||
<el-button-group v-else-if=" cardMode === 'edit'" style="float: right;">
|
||||
<el-button type="text" style="padding:3px 3px" @click="updateOverlab">修改</el-button>
|
||||
<el-button type="text" style="padding:3px 0" @click="cancelOverlab">取消</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="hostileForm" :model="addBackModel" :rules="addBackRules" label-width="135px" size="mini" style="margin-top: 15px;padding-right: 10px;">
|
||||
<el-form-item label="类型:" prop="type">
|
||||
<el-select v-model="addBackModel.type" clearable :filterable="true">
|
||||
<el-option v-for="item in turnBackList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述:" prop="label">
|
||||
<el-input v-model="addBackModel.label" type="text" maxlength="30" :show-word-limit="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="sectionList" v-if="addBackModel.type != 'NONE'">
|
||||
<el-select v-model="addBackModel.sectionList" clearable multiple :filterable="true">
|
||||
<el-option v-for="item in sectionList" :key="item.value" :label="`${item.name}(${item.code})`" :value="item.value" />
|
||||
</el-select>
|
||||
<el-button :type="field === 'sectionCode1' ? 'danger' : 'primary'" @click="hover('sectionCode1')">激活</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</config-list>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
@ -55,18 +99,36 @@ export default {
|
||||
activeName: 'first',
|
||||
lazy: true,
|
||||
autoList: [],
|
||||
field: '',
|
||||
turnBackList: [
|
||||
{ name: '按计划执行', value: 'NONE' },
|
||||
{ name: '仅某个折返轨', value: 'ONLY' },
|
||||
{ name: '等价折返', value: 'EQUAL' },
|
||||
{ name: '优先/次之', value: 'FIRST' }
|
||||
],
|
||||
typeList: [
|
||||
{ name: '自动折返', value: 'AutoTurnBack' },
|
||||
{ name: '计轴复位', value: 'AxleReset' },
|
||||
{ name: '自动进路', value: 'AutomaticRoute' },
|
||||
{ name: '引导总锁', value: 'GuideLock' },
|
||||
{ name: '全线临时限速', value: 'LimitControl' }
|
||||
{ name: '全线临时限速', value: 'LimitControl' },
|
||||
{ name: '站后折返', value: 'StationTurnBack' }
|
||||
],
|
||||
cardMode: 'generate',
|
||||
addBackModel: {
|
||||
id: '',
|
||||
type: '',
|
||||
label: '',
|
||||
sectionList: [],
|
||||
parentIndex: 0
|
||||
},
|
||||
editModel: {
|
||||
code: '',
|
||||
type: '',
|
||||
name: '',
|
||||
show: true, // 站后折返显示
|
||||
subtitleName: '',
|
||||
optionList: [], // 战后折返列表
|
||||
automaticRouteCode: '', // 关联自动进路code
|
||||
cycleCode: '', // 自动折返关联code
|
||||
stationCode: '', // 所属设备集中站
|
||||
@ -101,6 +163,17 @@ export default {
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
addBackRules: {
|
||||
type: [
|
||||
{ required: true, message: '请选择类型', trigger: 'change' }
|
||||
],
|
||||
label: [
|
||||
{ required: true, message: '请填写描述', trigger: 'blur' }
|
||||
],
|
||||
sectionList: [
|
||||
{ required: true, message: '请选择站台轨', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -111,8 +184,19 @@ export default {
|
||||
'tempSpeedLimitList',
|
||||
'axleCounterResetButtonList',
|
||||
'totalGuideLockButtonVOList',
|
||||
'stationList'
|
||||
'stationList',
|
||||
'sectionList',
|
||||
'tbStrategyList'
|
||||
]),
|
||||
cardTitle() {
|
||||
if (this.cardMode === 'generate') {
|
||||
return '生成数据';
|
||||
} else if (this.cardMode === 'edit') {
|
||||
return '编辑数据';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
@ -127,14 +211,15 @@ export default {
|
||||
{ prop:'type', label: this.$t('map.functionButtonType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, disabled: true },
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.buttonMainName'), type: 'input' },
|
||||
{ prop: 'subtitleName', label: this.$t('map.buttonViceName'), type: 'input' },
|
||||
{ prop: 'show', label: '是否显示:', type: 'checkbox', isHidden: !this.isTurnBackShow },
|
||||
{ prop: 'subtitleName', label: this.$t('map.buttonViceName'), type: 'input', isHidden: !this.isHiddensubtitleNameVO },
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop:'automaticRouteCode', label: this.$t('map.automaticRouteCode'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenAutomaticRoute, change: true, deviceChange: this.changeEditStation },
|
||||
{ prop:'cycleCode', label: this.$t('map.cycleCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenMapCycleButtonVO, change: true, deviceChange: this.changeEditStation },
|
||||
{ prop:'stationCode', label: this.$t('map.ownedCiStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledStation, isHidden: !this.isHiddenStation }
|
||||
{ prop:'stationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledStation, isHidden: !this.isHiddenStation }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -153,7 +238,7 @@ export default {
|
||||
] },
|
||||
{ prop:'automaticRouteCode', label: this.$t('map.automaticRouteCode'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenCreateAutomaticRoute, change: true, deviceChange: this.changeStation },
|
||||
{ prop:'cycleCode', label: this.$t('map.cycleCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList, isHidden: !this.isHiddenCreateMapCycleButtonVO, change: true, deviceChange: this.changeStation },
|
||||
{ prop:'stationCode', label: this.$t('map.ownedCiStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledCreateStation, isHidden: !this.isHiddenCreateStation }
|
||||
{ prop:'stationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, disabled: this.isDisabledCreateStation, isHidden: !this.isHiddenCreateStation }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -180,11 +265,17 @@ export default {
|
||||
isHiddenMapCycleButtonVO() {
|
||||
return this.editModel.type == 'AutoTurnBack';
|
||||
},
|
||||
isTurnBackShow() {
|
||||
return this.editModel.type == 'StationTurnBack';
|
||||
},
|
||||
isHiddensubtitleNameVO() {
|
||||
return this.editModel.type != 'StationTurnBack';
|
||||
},
|
||||
isDisabledStation() {
|
||||
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'AutomaticRoute';
|
||||
},
|
||||
isHiddenStation() {
|
||||
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'GuideLock' || this.editModel.type == 'AxleReset';
|
||||
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'GuideLock' || this.editModel.type == 'AxleReset' || this.editModel.type == 'StationTurnBack';
|
||||
},
|
||||
|
||||
isHiddenCreateAutomaticRoute() {
|
||||
@ -197,17 +288,9 @@ export default {
|
||||
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute';
|
||||
},
|
||||
isHiddenCreateStation() {
|
||||
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset';
|
||||
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset' || this.addModel.type == 'StationTurnBack';
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// selected(val, oldVal) {
|
||||
// if (val && val._type) {
|
||||
// this.handleTypes(val._type);
|
||||
// this.deviceSelect(val);
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
@ -247,6 +330,9 @@ export default {
|
||||
case 'GuideLock':
|
||||
this.selectLists = this.totalGuideLockButtonVOList;
|
||||
break;
|
||||
case 'StationTurnBack':
|
||||
this.selectLists = this.tbStrategyList;
|
||||
break;
|
||||
}
|
||||
},
|
||||
changeStation(code) { // 选择对应的所属设备集中站
|
||||
@ -271,16 +357,20 @@ export default {
|
||||
this.getAutoMaticList();
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase() || selected._type.toUpperCase() == 'StationTurnBack'.toUpperCase()) {
|
||||
this.handleTypes(selected._type);
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
this.$nextTick(() => {
|
||||
this.setStation(selected);
|
||||
});
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionCode1'.toUpperCase()) {
|
||||
if (!this.addBackModel.sectionList.includes(selected.code)) {
|
||||
this.addBackModel.sectionList.push(selected.code);
|
||||
}
|
||||
}
|
||||
},
|
||||
async getAutoMaticList() { // 获取自动信号列表
|
||||
@ -317,10 +407,12 @@ export default {
|
||||
code: uid,
|
||||
name: this.addModel.name,
|
||||
subtitleName: this.addModel.subtitleName,
|
||||
show: true,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
},
|
||||
optionList: [],
|
||||
automaticRouteCode: this.addModel.automaticRouteCode, // 关联自动进路code
|
||||
cycleCode: this.addModel.cycleCode, // 自动折返关联code
|
||||
stationCode: this.addModel.stationCode // 所属设备集中站
|
||||
@ -354,6 +446,60 @@ export default {
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('selectFiled', this.field);
|
||||
},
|
||||
deleteOverlab(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
editOverlab(list, index) {
|
||||
this.addBackModel = deepAssign({}, list[index]);
|
||||
this.addBackModel.parentIndex = index;
|
||||
this.cardMode = 'edit';
|
||||
},
|
||||
updateOverlab() { // 修改数据
|
||||
this.$refs.hostileForm.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
id: this.addBackModel.id,
|
||||
type: this.addBackModel.type,
|
||||
label: this.addBackModel.label,
|
||||
sectionList: this.addBackModel.sectionList,
|
||||
};
|
||||
this.editModel.optionList.splice(this.addBackModel.parentIndex, 1, data);
|
||||
this.$refs.hostileForm.resetFields();
|
||||
this.cardMode = 'generate';
|
||||
}
|
||||
});
|
||||
},
|
||||
generateOverlab() { // 生成数据
|
||||
this.$refs.hostileForm.validate((valid) => {
|
||||
if (valid) {
|
||||
const id = this.createUid(this.editModel.optionList); // 根据类型写 uid 前缀命名
|
||||
this.editModel.optionList.push({
|
||||
id: id,
|
||||
type: this.addBackModel.type,
|
||||
label: this.addBackModel.label,
|
||||
sectionList: this.addBackModel.sectionList,
|
||||
});
|
||||
this.$refs.hostileForm.resetFields();
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelOverlab() {
|
||||
this.$refs.hostileForm.resetFields();
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
createUid(list) {
|
||||
if (list.length) {
|
||||
let num = Number(list[list.length - 1].id);
|
||||
return ++num
|
||||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -389,4 +535,24 @@ export default {
|
||||
.map-draft-group {
|
||||
color: #3E44BE;
|
||||
}
|
||||
.card-box{
|
||||
border: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
padding-top: 18px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.card_title {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: -8px;
|
||||
background: #fff;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -174,6 +174,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</template>
|
||||
<slot />
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
@ -270,6 +270,7 @@
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<slot />
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
@ -106,6 +106,7 @@
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@selectFiled="selectFiled"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.saidLamp')" class="tab_pane_box" name="ControlLamp" :lazy="lazy">
|
||||
@ -285,6 +286,7 @@ export default {
|
||||
switchType: '',
|
||||
stationStandType:'',
|
||||
psdType: '',
|
||||
controlType: '',
|
||||
ViewMode: ViewMode,
|
||||
enabledTab: 'Section',
|
||||
autoSaveTask: null,
|
||||
@ -351,7 +353,7 @@ export default {
|
||||
this.enabledTab = 'Esp';
|
||||
} else if (this.feild) {
|
||||
this.enabledTab = 'Section';
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock' || type == 'StationTurnBack' || this.controlType) {
|
||||
this.enabledTab = 'ControlDraft';
|
||||
} else if (controlLampTypeList.includes(type) || this.saidLampType) {
|
||||
this.enabledTab = 'ControlLamp';
|
||||
@ -359,6 +361,9 @@ export default {
|
||||
this.enabledTab = type;
|
||||
}
|
||||
},
|
||||
selectFiled(type) {
|
||||
this.controlType = type;
|
||||
},
|
||||
esqTab(type) {
|
||||
this.esqType = type;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user