Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2023-05-30 17:55:25 +08:00
commit ca329a4db7
57 changed files with 920 additions and 156 deletions

9
.env.sai Normal file
View File

@ -0,0 +1,9 @@
# just a flag
NODE_ENV = 'production'
VUE_APP_PRO = 'common'
# base api
# VUE_APP_BASE_API = 'http://160.20.60.15:9000'
# VUE_APP_VOICE_API = 'http://160.20.60.15/oss/joylink'
# VUE_APP_UPLOAD_API = 'http://160.20.60.15'
# VUE_APP_BASE_SITE='http://160.20.60.15'

View File

@ -166,3 +166,19 @@ export function clearDesignTraining(trainingId, group) {
method: 'delete' method: 'delete'
}); });
} }
/** 导出实训数据 */
export function exportTrainingData(data) {
return request({
url: `/api/v2/training/published/export`,
method: 'post',
data
});
}
/** 导入实训数据 */
export function importTrainingData(data) {
return request({
url: `/api/v2/training/published/import`,
method: 'post',
data
});
}

View File

@ -635,6 +635,19 @@ class SkinCode extends defaultStyle {
controlColor: 'red' // 控制灯颜色 (灰色) controlColor: 'red' // 控制灯颜色 (灰色)
} }
}; };
/* 上电解锁 */
this[deviceType.PowerUnLock] = {
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: 5 // 灯跟文字距离
},
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: 'red' // 控制灯颜色 (灰色)
}
};
/** 引导总锁 */ /** 引导总锁 */
this[deviceType.GuideLock] = { this[deviceType.GuideLock] = {

View File

@ -347,4 +347,9 @@ deviceRender[deviceType.Counter] = {
_type: deviceType.Counter, _type: deviceType.Counter,
zlevel: 1 zlevel: 1
}; };
/** PowerUnLock 上电解锁*/
deviceRender[deviceType.PowerUnLock] = {
_type: deviceType.PowerUnLock,
zlevel: 1
};
export default deviceRender; export default deviceRender;

View File

@ -63,6 +63,7 @@ const deviceType = {
SectionOccupied: 'SectionOccupied', SectionOccupied: 'SectionOccupied',
ThroatRoute: 'ThroatRoute', ThroatRoute: 'ThroatRoute',
NoStatusLamp: 'NoStatusLamp', NoStatusLamp: 'NoStatusLamp',
Counter: 'Counter' Counter: 'Counter',
PowerUnLock: 'PowerUnLock'
}; };
export default deviceType; export default deviceType;

View File

@ -122,6 +122,11 @@ export function parser(data, skinCode, showConfig) {
mapDevice[elem.code] = createDevice(deviceType.AxleReset, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.AxleReset, elem, propConvert, showConfig);
}, this); }, this);
zrUtil.each(data.powerUnLockButtonList || [], elem => { // 上电解锁列表
mapDevice[elem.code] = createDevice(deviceType.PowerUnLock, elem, propConvert, showConfig);
mapDevice[elem.stationCode].powerUnLockCode = elem.code;
}, this);
zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表 zrUtil.each(data.totalGuideLockButtonVOList || [], elem => { // 引导总锁列表
mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig);
if (!elem.direction) { if (!elem.direction) {
@ -342,6 +347,7 @@ export function updateMapData(state, model) {
case deviceType.Esp: updateForList(model, state, 'espList'); break; case deviceType.Esp: updateForList(model, state, 'espList'); break;
case deviceType.AutoTurnBack: updateForList(model, state, 'cycleButtonList'); break; case deviceType.AutoTurnBack: updateForList(model, state, 'cycleButtonList'); break;
case deviceType.AxleReset: updateForList(model, state, 'axleCounterResetButtonList'); break; case deviceType.AxleReset: updateForList(model, state, 'axleCounterResetButtonList'); break;
case deviceType.PowerUnLock: updateForList(model, state, 'powerUnLockButtonList'); break;
case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break; case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break;
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break; case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break; case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break;

View File

@ -0,0 +1,57 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
export default class EMouse extends Group {
constructor(device) {
super();
this.device = device;
this.create();
}
create() {
this.text = new Text({
zlevel: this.device.zlevel,
z: this.device.z + 1,
position: [0, 0],
style: {
x: this.device.computedPosition.x,
y: this.device.computedPosition.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,
textVerticalAlign: this.device.style.LcControl.mouseOverStyle.textVerticalAlign
}
});
this.add(this.text);
this.text.hide();
}
mouseover(e) {
if (e &&
e.target &&
e.target._subType == 'Text') {
this.text.show();
} else {
// this.device.control.setControlColor(this.device.style.LcControl.mouseOverStyle.arcColor);
// this.device.control.setTextColor(this.device.style.LcControl.mouseOverStyle.textColor);
// this.device.control.setTextBorder(true);
// this.device.control.setArcBorder(true);
}
}
mouseout(e) {
if (!this.device.__down) {
if (e &&
e.target &&
e.target._subType == 'Text') {
this.text.hide();
} else {
// this.device.control.setControlColor(this.device.style.LcControl.lamp.controlColor);
// this.device.control.setTextColor('#FFFFFF');
// this.device.control.setTextBorder(false);
// this.device.control.setArcBorder(false);
}
}
}
}

View File

@ -0,0 +1,165 @@
/*
* 上电解锁 控制器
*/
import Group from 'zrender/src/container/Group';
import Arc from 'zrender/src/graphic/shape/Arc';
import Text from 'zrender/src/graphic/Text';
import EMouse from './EMouse';
import BoundingRect from 'zrender/src/core/BoundingRect';
import store from '@/store/index';
export default class PowerUnLock extends Group {
constructor(model, {style}) {
super();
this.z = 20;
this._code = model.code;
this._type = model._type;
this.zlevel = model.zlevel;
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code);
if (pictureDevice) {
this.computedPosition = pictureDevice.position;
} else {
this.computedPosition = model.position;
}
this.model = model;
this.style = style;
this.isShowShape = true;
this.create();
this.createMouseEvent();
this.setState(model);
}
create() {
const powerUnLockStyle = this.style.PowerUnLock ? this.style.PowerUnLock : { lamp: {}, text: {}, subtitleText: {} };
const model = this.model;
this.control = new Arc({
_subType: 'Control',
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.computedPosition.x,
cy: this.computedPosition.y,
r: powerUnLockStyle.lamp.radiusR
},
style: {
stroke: '##b5b3b3',
lineWidth: 1.5,
fill: powerUnLockStyle.lamp.controlColor
}
});
this.text = new Text({
_subType: 'Text',
zlevel: this.zlevel,
z: this.z,
position: [0, 0],
style: {
x: this.computedPosition.x,
y: this.computedPosition.y + powerUnLockStyle.lamp.radiusR + powerUnLockStyle.text.distance,
fontWeight: powerUnLockStyle.text.fontWeight,
fontSize: powerUnLockStyle.text.fontSize,
fontFamily: this.style.fontFamily,
text: model.name,
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
}
});
if (this.model.subtitleName) {
this.subtitleText = new Text({
_subType: 'Text',
zlevel: this.zlevel,
z: this.z,
position: [0, 0],
style: {
x: this.computedPosition.x,
y: this.computedPosition.y + powerUnLockStyle.lamp.radiusR + powerUnLockStyle.subtitleText.distance,
fontWeight: powerUnLockStyle.subtitleText.fontWeight,
fontSize: powerUnLockStyle.subtitleText.fontSize,
fontFamily: this.style.fontFamily,
text: model.subtitleName,
textFill: '#fff',
textAlign: 'middle',
textVerticalAlign: 'top'
}
});
this.add(this.subtitleText);
}
this.add(this.control);
this.add(this.text);
}
setAshShow() {
this.control && this.control.setStyle({fill:'#FFF'});
}
// 设置状态
setState(model) {
this.recover();
// 只响应前端自定义类型的状态变化
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.control && this.control.hide();
this.text && this.text.hide();
this.subtitleText && this.subtitleText.hide();
} else if (model._free) {
this.setAshShow();
}
}
handleShowHide(powerUnLockCode) {
const path = window.location.href;
if (powerUnLockCode || path.includes('/map/draw')) {
this.control && this.control.show();
this.text && this.text.show();
this.subtitleText && this.subtitleText.show();
} else {
this.control && this.control.hide();
this.text && this.text.hide();
this.subtitleText && this.subtitleText.hide();
}
}
recover() {
this.control && this.control.show();
this.text && this.text.show();
this.subtitleText && this.subtitleText.show();
}
createMouseEvent() {
if (this.style.LcControl.mouseOverStyle) {
this.mouseEvent = new EMouse(this);
this.add(this.mouseEvent);
this.on('mouseout', (e) => { this.mouseEvent.mouseout(e); });
this.on('mouseover', (e) => { this.mouseEvent.mouseover(e); });
}
}
getShapeTipPoint() {
if (this.control) {
var distance = 2;
var rect = this.control.getBoundingRect();
return {
x: rect.x + rect.width / 2,
y: rect.y - distance
};
}
return null;
}
getBoundingRect() { // 计算自动折返包围框
if (this.control) {
const rect = this.control.getBoundingRect().clone();
if (this.text) {
const text = this.text.getBoundingRect().clone();
rect.union(text);
return rect;
} else {
return rect;
}
} else {
return new BoundingRect(0, 0, 0, 0);
}
}
getAnchorPoint() {
return this.computedPosition;
}
}

View File

@ -75,6 +75,9 @@ export default class Line2 extends Group {
currentTypeList.forEach(element => { currentTypeList.forEach(element => {
this[element].setState(model); this[element].setState(model);
}); });
if (model.noStatus) {
this.setAshShow();
}
} }
} }

View File

@ -446,6 +446,10 @@ export default class Section extends Group {
this.line && this.line.setStyle({stroke: '#7F7F7F'}); this.line && this.line.setStyle({stroke: '#7F7F7F'});
this.line && this.line.setCross({fill: '#7F7F7F'}); this.line && this.line.setCross({fill: '#7F7F7F'});
this.name && this.name.setStyle({textFill: '#7F7F7f'}); this.name && this.name.setStyle({textFill: '#7F7F7f'});
this.standTrackText && this.standTrackText.setStyle({textFill: '#7F7F7f'});
this.reentryTrackText && this.reentryTrackText.setStyle({textFill: '#7F7F7f'});
this.transferTrackText && this.transferTrackText.setStyle({textFill: '#7F7F7f'});
this.destinationText && this.destinationText.setStyle({textFill: '#7F7F7f'});
} }
/** 计轴预复位 */ /** 计轴预复位 */
preReset(blockade) { preReset(blockade) {

View File

@ -21,7 +21,7 @@ class EStationText extends Group {
x: model.computedPosition.x, x: model.computedPosition.x,
y: model.computedPosition.y, y: model.computedPosition.y,
fontWeight: style.Station.stationText.fontWeight, fontWeight: style.Station.stationText.fontWeight,
fontSize: isNaN(Number(model.nameFont)) ? 20 : Number(model.nameFont), fontSize: model.nameFont || 20,
fontFamily: style.fontFamily, fontFamily: style.fontFamily,
text: model.number ? model.number + model.name : model.name, text: model.number ? model.number + model.name : model.name,
textAlign: 'middle', textAlign: 'middle',

View File

@ -1008,6 +1008,7 @@ export default class Station extends Group {
model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController); model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController);
model.controlApplicant && this.handleControlApplicant(model); model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy(model); model.allowAutonomy && this.handleAllowAutonomy(model);
// this.handlePowerUnlockShow(model);
this.handleGuideLock(model); this.handleGuideLock(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) { if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => { model.chargeStationCodeList.forEach(item => {
@ -1062,6 +1063,12 @@ export default class Station extends Group {
handleAllowAutonomy() { handleAllowAutonomy() {
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.lightColor); this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.lightColor);
} }
// handlePowerUnlockShow(model) {
// if (model.powerUnLockCode) {
// const powerUnLock = store.getters['map/getDeviceByCode'](model.powerUnLockCode);
// powerUnLock && powerUnLock.instance && powerUnLock.instance.handleShowHide(model.powerUnlockButtonShow);
// }
// }
handleControlApplicant(model) { handleControlApplicant(model) {
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {

View File

@ -1,5 +1,6 @@
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect'; import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index';
class EHollowStand extends Group { class EHollowStand extends Group {
constructor(model) { constructor(model) {
@ -52,6 +53,9 @@ class EHollowStand extends Group {
model.trainParking && this.setColor(style.StationStand.hollowStand.doorOpenColor); model.trainParking && this.setColor(style.StationStand.hollowStand.doorOpenColor);
// 紧急停车 // 紧急停车
model.emergencyClosed && this.setColor(style.StationStand.hollowStand.spareColor); model.emergencyClosed && this.setColor(style.StationStand.hollowStand.spareColor);
if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) {
this.setColor('#7F7F7F');
}
} }
} }

View File

@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
import Polyline from 'zrender/src/graphic/shape/Polyline'; import Polyline from 'zrender/src/graphic/shape/Polyline';
// import Rect from 'zrender/src/graphic/shape/Rect'; // import Rect from 'zrender/src/graphic/shape/Rect';
// import Text from 'zrender/src/graphic/Text'; // import Text from 'zrender/src/graphic/Text';
import store from '@/store/index';
class ESolidStand extends Group { class ESolidStand extends Group {
constructor(model) { constructor(model) {
@ -65,6 +66,9 @@ class ESolidStand extends Group {
} }
setState(model) { setState(model) {
if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) {
this.setColor('#7F7F7F');
}
} }
} }

View File

@ -145,6 +145,10 @@ class ESolidStand extends Group {
model.sysHoldTrain && this.setHoldTrain('System'); model.sysHoldTrain && this.setHoldTrain('System');
// 站台关闭 // 站台关闭
model.closed && this.setColor(style.StationStand.solidStand.closeColor); model.closed && this.setColor(style.StationStand.solidStand.closeColor);
if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) {
this.setColor('#7F7F7F');
}
} else { } else {
this.handlePassagerColor(model.num); this.handlePassagerColor(model.num);
} }

View File

@ -17,6 +17,7 @@ import Train from './Train/index.js';
import Line from './Line/index.js'; import Line from './Line/index.js';
import Text2 from './Text/index.js'; import Text2 from './Text/index.js';
import AxleReset from './AxleReset/index'; import AxleReset from './AxleReset/index';
import PowerUnLock from './PowerUnLock/index';
import GuideLock from './GuideLock/index'; import GuideLock from './GuideLock/index';
import AutoTurnBack from './AutoTurnBack/index.js'; import AutoTurnBack from './AutoTurnBack/index.js';
import OutFrame from './OutFrame/index.js'; import OutFrame from './OutFrame/index.js';
@ -99,5 +100,6 @@ mapShape[deviceType.FloodGate] = FloodGate;
mapShape[deviceType.DirectionRod] = DirectionRod; mapShape[deviceType.DirectionRod] = DirectionRod;
mapShape[deviceType.Responder] = Responder; mapShape[deviceType.Responder] = Responder;
mapShape[deviceType.SignalButton] = SignalButton; mapShape[deviceType.SignalButton] = SignalButton;
mapShape[deviceType.PowerUnLock] = PowerUnLock;
export default mapShape; export default mapShape;

View File

@ -79,14 +79,14 @@ export default {
label: '设置临时限速', label: '设置临时限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1, isDisabled: (section, work) => section.speedUpLimit > 0,
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04' isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
}, },
{ {
label: '取消临时限速', label: '取消临时限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1, isDisabled: (section, work) => section.speedUpLimit <= 0,
isShow: (section, work) => work === 'dispatchWork' && section.type !== '04' isShow: (section, work) => work === 'dispatchWork' && section.type !== '04'
} }
], ],

View File

@ -289,6 +289,10 @@ export default {
{label: '计轴受扰', value: 'ARB'}, {label: '计轴受扰', value: 'ARB'},
{label:'无数据故障', value:'UNABLE_COLLECT_STATUS'} {label:'无数据故障', value:'UNABLE_COLLECT_STATUS'}
]; ];
} else if (selected._type === 'Station' && ['ningbo-01__systerm', 'fuzhou-01__systerm'].includes(this.popClass)) {
this.faultList = [
{label: '联锁故障', value: 'INTERLOCK_FAULT'}
];
} }
if (this.faultList && this.faultList.length) { if (this.faultList && this.faultList.length) {
this.form.faultType = this.faultList[0].value; this.form.faultType = this.faultList[0].value;

View File

@ -105,14 +105,14 @@ export default {
label: '设置限速', label: '设置限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1, isDisabled: (section, work) => section.speedUpLimit > 0,
isShow: (section, work) => section.type === '02' isShow: (section, work) => section.type === '02'
}, },
{ {
label: '取消限速', label: '取消限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1, isDisabled: (section, work) => section.speedUpLimit <= 0,
isShow: (section, work) => section.type === '02' isShow: (section, work) => section.type === '02'
} }
], ],

View File

@ -78,6 +78,13 @@ export default {
isDisabled: (station, work) => false, isDisabled: (station, work) => false,
isShow: (station, work) => work === 'dispatchWork' isShow: (station, work) => work === 'dispatchWork'
}, },
{
label: '上电解锁',
handler: this.powerUnLock,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
isDisabled: (station, work) => false,
isShow: (station, work) => work === 'localWork'
},
{ {
label: this.$t('menu.menuStation.execKeyOperationTest'), label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest, handler: this.execKeyOperationTest,
@ -97,6 +104,11 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{
label: '设置车站故障',
handler: this.setStationStoppage,
cmdType: CMD.Station.CMD_SET_FAULT
},
{ {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
@ -229,6 +241,20 @@ export default {
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
} }
}); });
},
setStationStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
cancelStationStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
} }
} }
}; };

View File

@ -275,6 +275,16 @@ export default {
this.doClose(); this.doClose();
} }
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); }); }).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} else if (this.operation === OperationEvent.Station.powerUnLock.confirm1.operation) {
const step = {
operation: OperationEvent.Command.common.affirm.operation,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
};
commitOperate(step, {}, 2).then(({valid}) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.$refs.noticeInfo.doShow(); });
} }
}, },
doClose() { doClose() {

View File

@ -13,7 +13,7 @@
> >
<el-row justify="center" style="height: 40px;"> <el-row justify="center" style="height: 40px;">
<el-col :span="8"> <el-col :span="8">
<div style="height: 40px;line-height: 40px;color: #000;">密码</div> <div style="height: 40px;line-height: 40px;color: #000;">密码(root)</div>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-input ref="passwordBox" v-model="password" size="mini" show-password /> <el-input ref="passwordBox" v-model="password" size="mini" show-password />

View File

@ -54,7 +54,7 @@ export default {
loading: false, loading: false,
operation: '', operation: '',
sectionCode: '', sectionCode: '',
selected: null selected: null
}; };
}, },
computed: { computed: {
@ -64,7 +64,7 @@ export default {
switchAndPhySicalSectionList() { switchAndPhySicalSectionList() {
let list = []; let list = [];
if (this.sectionList && this.sectionList.length) { if (this.sectionList && this.sectionList.length) {
list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '03'; }); list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '04'; });
} }
return list; return list;
}, },
@ -93,9 +93,9 @@ export default {
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
this.$root.$emit('dialogOpen', selected); this.$root.$emit('dialogOpen', selected);
if (!this.dialogShow) { if (!this.dialogShow) {
this.selected = selected; this.selected = selected;
this.sectionCode = ''; this.sectionCode = '';
this.operation = operate.operation || ''; this.operation = operate.operation || '';
} }
@ -107,7 +107,7 @@ export default {
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected); this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
sectionSelectChange() { sectionSelectChange() {

View File

@ -0,0 +1,143 @@
<template>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm section-control"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="24">
<span style="margin-right: 10px;">车站:</span>
<el-select
:id="domIdChoose"
v-model="stationCode"
:disabled="true"
size="mini"
>
<el-option v-for="(option,index) in stationList" :key="index" :label="option.name" :value="option.code" />
</el-select>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<confirm-tip ref="confirmTip" @close="doClose" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import ConfirmTip from './childDialog/confirmTip';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationPowerUnLock',
components: {
NoticeInfo,
ConfirmTip
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
stationCode: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdChoose() {
return this.dialogShow ? OperationEvent.AxleReset.SetAxleReset.choose.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
return '上电解锁';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.loading) {
this.commit();
}
}
},
methods: {
doShow(operate, selected) {
this.$root.$emit('dialogOpen', selected);
if (!this.dialogShow) {
this.selected = selected;
this.stationCode = selected.stationCode;
this.operation = operate.operation || '';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
const step = {
operation: OperationEvent.Station.powerUnLock.confirm1.operation,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
};
commitOperate(step, {stationCode:this.stationCode}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
const station = this.$store.getters['map/getDeviceByCode'](this.stationCode);
operate.message = `命令:上电解锁<br/>车站:${station.name}`;
this.$refs.confirmTip.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -16,6 +16,7 @@
<menu-station-pre-reset ref="menuStationPreReset" :selected="selected" :work="work" /> <menu-station-pre-reset ref="menuStationPreReset" :selected="selected" :work="work" />
<!--<passive-alarm ref="passiveAlarm" />--> <!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" :selected="selected" /> <passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" :selected="selected" />
<menu-power-un-lock ref="menuPowerUnLock" pop-class="ningbo-01__systerm" :selected="selected" :work="work" />
<alarm-detail ref="alarmDetail" /> <alarm-detail ref="alarmDetail" />
<!--<passive-Timeout ref="passiveTimeout" />--> <!--<passive-Timeout ref="passiveTimeout" />-->
</div> </div>
@ -37,6 +38,7 @@ import MenuLimit from './menuLimit';
import MenuStationTurnBack from './menuStationTurnBack'; import MenuStationTurnBack from './menuStationTurnBack';
import MenuStationLight from './menuStationLight'; import MenuStationLight from './menuStationLight';
import MenuStationPreReset from './menuStationPreReset'; import MenuStationPreReset from './menuStationPreReset';
import MenuPowerUnLock from './menuPowerUnLock';
// import PassiveAlarm from './passiveDialog/alarm'; // import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import AlarmDetail from './alarmDetail'; import AlarmDetail from './alarmDetail';
@ -61,7 +63,8 @@ export default {
PassiveContorl, PassiveContorl,
MenuStationLight, MenuStationLight,
MenuStationPreReset, MenuStationPreReset,
AlarmDetail AlarmDetail,
MenuPowerUnLock
// PassiveTimeout // PassiveTimeout
}, },
props: { props: {

View File

@ -0,0 +1,115 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<station-power-un-lock ref="stationPowerUnLock" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import StationPowerUnLock from './dialog/stationPowerUnLock';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { DeviceMenu, OperateMode, TrainingMode } from '@/scripts/ConstDic';
import { judgeStationControl } from '@/jmapNew/theme/components/utils/menuJudge.js';
export default {
name: 'MenuLimit',
components: {
PopMenu,
StationPowerUnLock
},
props: {
selected: {
type: Object,
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu: [],
menuForce:[],
menuNormal: [
{
label: '上电解锁',
handler: this.handlePowerUnLock,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
isShow: (selected, work) => work == 'localWork'
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.PowerUnLock) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initMenu() {
//
this.menu = [];
this.menuNormal.forEach(menuItem => {
const status = judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work);
menuItem.disabled = !status;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
this.menu.push(menuItem);
});
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
if (this.$store.state.training.mode === TrainingMode.NORMAL) {
const station = this.$store.getters['map/getDeviceByCode'](this.selected.stationCode);
const memberData = this.$store.state.training.memberData;
const userId = this.$store.state.user.id;
if (!station.controller || !memberData[station.controller] || memberData[station.controller].userId != userId) {
this.menu.forEach(item => {
item.disabled = true;
});
}
}
},
doShow(point) {
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();
}
},
//
handlePowerUnLock() {
commitOperate(menuOperate.Station.powerUnLock, { stationCode: this.selected.stationCode }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.stationPowerUnLock.doShow(operate, this.selected);
}
});
}
}
};
</script>

View File

@ -61,12 +61,12 @@ export default {
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
isShow: (selected, work) => work == 'localWork' isShow: (selected, work) => work == 'localWork'
}, },
{ // {
label: '上电解锁', // label: '',
handler: this.powerUnLock, // handler: this.powerUnLock,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK, // cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
isShow: (selected, work) => work == 'localWork' // isShow: (selected, work) => work == 'localWork'
}, // },
// { // {
// label: '', // label: '',
// handler: this.execKeyOperationTest, // handler: this.execKeyOperationTest,
@ -101,6 +101,11 @@ export default {
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
}, },
{
label: '设置车站故障',
handler: this.setStationStoppage,
cmdType: CMD.Station.CMD_SET_FAULT
},
{ {
label: '重启联锁机', label: '重启联锁机',
handler: this.restartInterlock, handler: this.restartInterlock,
@ -186,6 +191,13 @@ export default {
} }
}); });
}, },
setStationStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
// //
cancelStoppage() { cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{

View File

@ -214,7 +214,7 @@ export default {
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) { // if (!this.$store.state.scriptRecord.bgSet) {
const menuHook = [{ const menuHook = [{
label: '道岔钩锁', label: '手摇道岔钩锁',
handler: this.hookLock handler: this.hookLock
}]; }];
this.menu = [...this.menuForce, ...menuHook]; this.menu = [...this.menuForce, ...menuHook];

View File

@ -105,14 +105,14 @@ export default {
label: '设置临时限速', label: '设置临时限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit !== -1, isDisabled: (section, work) => section.speedUpLimit > 0,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork' isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
}, },
{ {
label: '取消临时限速', label: '取消临时限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED,
isDisabled: (section, work) => section.speedUpLimit === -1, isDisabled: (section, work) => section.speedUpLimit <= 0,
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork' isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work == 'dispatchWork'
} }
], ],

View File

@ -111,7 +111,6 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import SystemTitle from './Title'; import SystemTitle from './Title';
import {getSessionStorage } from '@/utils/auth'; import {getSessionStorage } from '@/utils/auth';
import { ThirdLoginList } from '@/scripts/ProjectConfig';
export default { export default {
components: { components: {
@ -131,7 +130,7 @@ export default {
'routers' 'routers'
]), ]),
thirdLogin() { thirdLogin() {
return ThirdLoginList.includes(getSessionStorage('project')); return this.$store.state.user.thirdLogin;
}, },
username() { username() {
return this.$store.state.user.nickname; return this.$store.state.user.nickname;

View File

@ -1948,6 +1948,16 @@ export const asyncRouter = [
path: 'publishIscs', path: 'publishIscs',
component: PublishISCS, component: PublishISCS,
hidden: true hidden: true
},
{ // ibp列表
path: 'ibp/home/:mapId',
component: IbpHome,
hidden: true
},
{
path: 'ibp/edit',
component: IbpDraw,
hidden: true
} }
] ]
}, },

View File

@ -80,7 +80,7 @@ export default {
{label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, {label: 'NCC调度', value: 'NCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '信息调度', value: 'OCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, {label: '信息调度', value: 'OCC_DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '行调', value: 'DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, {label: '行调', value: 'DISPATCHER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '行值', value: 'STATION_SUPERVISOR', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, {label: '行值', value: 'STATION_SUPERVISOR', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, // 大铁:车站值班员
{label: '司机', value: 'DRIVER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, {label: '司机', value: 'DRIVER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '通号', value: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']}, {label: '通号', value: 'MAINTAINER', simTypeList: ['METRO', 'RAILWAY', 'EMERGENCY']},
{label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']}, {label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', simTypeList: ['METRO']},
@ -94,7 +94,7 @@ export default {
{label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']}, {label: '车站工务工', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
{label: '车务段段长', value: 'TRAIN_MASTER', simTypeList: ['METRO']}, {label: '车务段段长', value: 'TRAIN_MASTER', simTypeList: ['METRO']},
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']}, {label: '工电调度', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']},
{label: '电力工务', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO']}, {label: '电力工务', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO', 'RAILWAY']}, // 大铁:车站电务
{label: '上级部分', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']}, {label: '上级部分', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']},
{label: '派班员', value: 'SCHEDULING', simTypeList: ['METRO']}, {label: '派班员', value: 'SCHEDULING', simTypeList: ['METRO']},
{label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']}, {label: '设备管理员', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},

View File

@ -99,6 +99,7 @@ export const DeviceMenu = {
Power:'15', Power:'15',
StationLight: '16', StationLight: '16',
StationPreReset: '17', StationPreReset: '17',
PowerUnLock: '18',
Map: '100', Map: '100',
PrdCategory: '101', PrdCategory: '101',

View File

@ -891,7 +891,7 @@
// jjjlm: 'JJJLM' // jjjlm: 'JJJLM'
// }; // };
// /** 嵌入第三方平台 导航栏右上角 清空 */ // /** 嵌入第三方平台 导航栏右上角 清空 */
export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs', 'richorgscm']; // export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs', 'richorgscm'];
// /** 底部栏仅展示公司信息不展示备案号 */ // /** 底部栏仅展示公司信息不展示备案号 */
// export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', // export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls',
// 'designhls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'richorygy', // 'designhls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'richorygy',

View File

@ -144,17 +144,17 @@ class Handler {
const stepInfo = store.state.trainingNew.stepInfo; const stepInfo = store.state.trainingNew.stepInfo;
const operateOrder = store.state.trainingNew.operateOrder; const operateOrder = store.state.trainingNew.operateOrder;
const operation = stepInfo.operations[operateOrder]; const operation = stepInfo.operations[operateOrder];
const operation1 = { // const operation1 = {
userOperationType: UserOperationType.LEFTCLICK, // userOperationType: UserOperationType.LEFTCLICK,
domId: OperationEvent.Conversation.Chat.sideButton.operation, // domId: OperationEvent.Conversation.Chat.sideButton.operation,
params: { chatBoxMin: true } // params: { chatBoxMin: true }
}; // };
const step1 = { // const step1 = {
description: '点击打开聊天室', // description: '点击打开聊天室',
memberId: stepInfo.memberId, // memberId: stepInfo.memberId,
operations: [operation1], // operations: [operation1],
tipPosition: { deviceCode: '', domId: operation1.domId, operateIndex: 0 } // tipPosition: { deviceCode: '', domId: operation1.domId, operateIndex: 0 }
}; // };
const operation2 = { const operation2 = {
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
domId: OperationEvent.Conversation.Chat.record.operation, domId: OperationEvent.Conversation.Chat.record.operation,
@ -192,11 +192,11 @@ class Handler {
operations: [operation3], operations: [operation3],
tipPosition: { deviceCode: '', domId: operation3.domId, operateIndex: 0 } tipPosition: { deviceCode: '', domId: operation3.domId, operateIndex: 0 }
}; };
if (store.state.training.chatBoxMin) { // if (store.state.training.chatBoxMin) {
store.dispatch('trainingNew/setVoiceStepList', [step1, step2, step3]); // store.dispatch('trainingNew/setVoiceStepList', [step1, step2, step3]);
} else { // } else {
store.dispatch('trainingNew/setVoiceStepList', [step2, step3]); // }
} store.dispatch('trainingNew/setVoiceStepList', [step2, step3]);
} }
} }
export default new Handler(); export default new Handler();

View File

@ -446,6 +446,13 @@ const map = {
return []; return [];
} }
}, },
powerUnLockButtonList: state => {
if (state.map) {
return state.map.powerUnLockButtonList || [];
} else {
return [];
}
},
totalGuideLockButtonVOList: state => { totalGuideLockButtonVOList: state => {
if (state.map) { if (state.map) {
return state.map.totalGuideLockButtonVOList || []; return state.map.totalGuideLockButtonVOList || [];

View File

@ -1,4 +1,4 @@
import { login, logout, getInfo, preLogout } from '@/api/login'; import { login, logout, getInfo, preLogout, getLoginInfo } from '@/api/login';
import { getToken, setToken, removeToken } from '@/utils/auth'; import { getToken, setToken, removeToken } from '@/utils/auth';
import { LoginParams } from '@/utils/login'; import { LoginParams } from '@/utils/login';
import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp'; import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp';
@ -146,8 +146,8 @@ const user = {
// 获取用户信息 // 获取用户信息
GetInfo({ commit }, token) { GetInfo({ commit }, token) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo(token).then(response => { getLoginInfo(token).then(response => {
const user = response.data; const user = response.data.accountVO;
if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组 if (user.roles && user.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', user.roles); commit('SET_ROLES', user.roles);
} else { } else {
@ -163,7 +163,7 @@ const user = {
commit('SET_COMPANYADMIN', user.companyAdmin); commit('SET_COMPANYADMIN', user.companyAdmin);
commit('SET_COMPANYNAME', user.companyName); commit('SET_COMPANYNAME', user.companyName);
commit('SET_COMPANYPROJECTLIST', user.projectCodes); commit('SET_COMPANYPROJECTLIST', user.projectCodes);
commit('SET_THIRDLOGIN', user.thirdLogin); commit('SET_THIRDLOGIN', response.data.thirdLogin);
resolve(user); resolve(user);
}).catch(error => { }).catch(error => {
reject(error); reject(error);

View File

@ -52,6 +52,11 @@ export function handlerUrl() {
BASE_API = 'http://160.20.60.15:9000'; BASE_API = 'http://160.20.60.15:9000';
BASE_SITE = 'http://160.20.60.15'; BASE_SITE = 'http://160.20.60.15';
OSS_URL = 'https://joylink.club/oss-rtss'; OSS_URL = 'https://joylink.club/oss-rtss';
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'sai') {
// 本地打包分支
BASE_API = 'http://192.168.53.10/jcloud';
BASE_SITE = 'http://192.168.53.10';
OSS_URL = 'https://192.168.53.10/oss-rtss';
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// 远程发布分支 // 远程发布分支
BASE_API = 'https://joylink.club/jlcloud'; BASE_API = 'https://joylink.club/jlcloud';

View File

@ -2,6 +2,7 @@
<div class="joylink-card"> <div class="joylink-card">
<div class="scriptHeader"> <div class="scriptHeader">
<div class="scriptList">IBP盘列表</div> <div class="scriptList">IBP盘列表</div>
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="goBack">返回</el-button>
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button> <el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
<el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button> <el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button>
</div> </div>
@ -142,7 +143,7 @@ export default {
// //
handleModify(index, row) { handleModify(index, row) {
const query = { mapId: this.$route.params.mapId, stationCode: row.stationCode, ibpId: row.id }; const query = { mapId: this.$route.params.mapId, stationCode: row.stationCode, ibpId: row.id };
this.$router.push({ path: `/design/ibp/edit`, query: query }); this.$router.push({ path: `/systemManagement/lineDataManage/ibp/edit`, query: query });
}, },
// //
editInfo(index, row) { editInfo(index, row) {
@ -184,6 +185,9 @@ export default {
}, },
createByPublish() { createByPublish() {
this.$refs.copyIbp.doShow(null); this.$refs.copyIbp.doShow(null);
},
goBack() {
this.$router.go(-1);
} }
} }
}; };

View File

@ -14,6 +14,7 @@
:value="item.value" :value="item.value"
/> />
</el-select> --> </el-select> -->
<el-button type="text" style="float: right; padding: 15px 0; margin-right: 5px;" @click="goBack">返回</el-button>
<el-button type="text" style="float: right; padding: 15px 0; margin-right: 5px;" @click="handleSave">{{ $t('ibp.save') }}</el-button> <el-button type="text" style="float: right; padding: 15px 0; margin-right: 5px;" @click="handleSave">{{ $t('ibp.save') }}</el-button>
</div> </div>
<el-tabs v-model="enabledTab" class="ibpEdit" type="card" @tab-click="handleTabClick"> <el-tabs v-model="enabledTab" class="ibpEdit" type="card" @tab-click="handleTabClick">
@ -140,6 +141,9 @@ export default {
deleteDataModel(model) { deleteDataModel(model) {
this.$store.dispatch('ibp/deleteIbpDevices', model); this.$store.dispatch('ibp/deleteIbpDevices', model);
}, },
goBack() {
this.$router.go(-1);
},
async handleSave() { async handleSave() {
if (this.$store.state.ibp.ibp.background) { if (this.$store.state.ibp.ibp.background) {
try { try {

View File

@ -13,7 +13,6 @@
<script> <script>
import IbpPlate from '@/views/ibp/ibpsystem/index'; import IbpPlate from '@/views/ibp/ibpsystem/index';
import IbpOperate from './ibpOperate/index'; import IbpOperate from './ibpOperate/index';
import localStore from 'storejs';
import { parser } from '@/ibp/utils/parser'; import { parser } from '@/ibp/utils/parser';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -25,9 +24,8 @@ export default {
}, },
data() { data() {
return { return {
widthLeft: Number(localStore.get('LeftWidth')) || 450,
size: { size: {
width: this.$store.state.app.width - 521 - (Number(localStore.get('LeftWidth')) || 450), width: this.$store.state.app.width - 521,
height: this.$store.state.app.height - 60 height: this.$store.state.app.height - 60
} }
}; };
@ -40,12 +38,12 @@ export default {
}, },
watch: { watch: {
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.size = { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 }; this.size = { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 };
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 }); this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 });
} }
}, },
created() { created() {
this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521 - this.widthLeft, height: this.$store.state.app.height - 60 }); this.$store.dispatch('config/resize', { width: this.$store.state.app.width - 521, height: this.$store.state.app.height - 60 });
}, },
mounted() { mounted() {
this.$refs.ibpPlate.show(); this.$refs.ibpPlate.show();

View File

@ -283,34 +283,38 @@ export default {
}, },
onMouseDown(em) { onMouseDown(em) {
if (['SquareButton', 'Key'].includes(em.deviceType)) { if (['SquareButton', 'Key'].includes(em.deviceType)) {
const operate = { setTimeout(() => {
start: true, const operate = {
send: true, start: true,
operation: OperationEvent.Ibp.buttonPressed.operation, send: true,
cmdType: CMD.IBP.CMD_IBP_PRESS_BUTTON, operation: OperationEvent.Ibp.buttonPressed.operation,
param: { cmdType: CMD.IBP.CMD_IBP_PRESS_BUTTON,
stationCode: this.stationCode, param: {
buttonCode: em.deviceCode stationCode: this.stationCode,
} buttonCode: em.deviceCode
}; }
this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); }); };
this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); });
// handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); }); // handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
}, 500);
} }
}, },
onMouseUp(em) { onMouseUp(em) {
if (['SquareButton'].includes(em.deviceType)) { if (['SquareButton'].includes(em.deviceType)) {
const operate = { setTimeout(() => {
start: true, const operate = {
send: true, start: true,
operation: OperationEvent.Ibp.buttonRelease.operation, send: true,
cmdType: CMD.IBP.CMD_IBP_RELEASE_BUTTON, operation: OperationEvent.Ibp.buttonRelease.operation,
param: { cmdType: CMD.IBP.CMD_IBP_RELEASE_BUTTON,
stationCode: this.stationCode, param: {
buttonCode: em.deviceCode stationCode: this.stationCode,
} buttonCode: em.deviceCode
}; }
this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); }); };
this.$store.dispatch('trainingNew/next', operate).catch(error => { this.$message.error(error.message); });
// handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); }); // handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
}, 500);
} }
}, },
// //

View File

@ -99,6 +99,9 @@ export default {
if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') { if (item.value == 'STATION_SUPERVISOR' && this.simType == 'RAILWAY') {
obj.label = '车站值班员'; obj.label = '车站值班员';
} }
if (item.value == 'STATION_ELECTRIC_WORKER' && this.simType == 'RAILWAY') {
obj.label = '车站电务';
}
list.push(obj); list.push(obj);
} }
}); });

View File

@ -207,7 +207,8 @@ export default {
const environmentDispatherList = []; const environmentDispatherList = [];
const parentDepartmentList = []; const parentDepartmentList = [];
const schedulingList = []; const schedulingList = [];
const t = this.simType == 'METRO' ? '行值-' : '值班员-'; const ss = this.simType == 'RAILWAY' ? '车站值班员' : '行值';
const sew = this.simType == 'RAILWAY' ? '车站电务' : '电力工务';
val.forEach(item => { val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) { switch (item.type) {
@ -236,7 +237,7 @@ export default {
signalBuildingList.push(this.memberData[item.id]); signalBuildingList.push(this.memberData[item.id]);
break; break;
case 'STATION_SUPERVISOR': case 'STATION_SUPERVISOR':
this.memberData[item.id].labelName = t + device.name + (item.name ? `-${item.name }` : ''); this.memberData[item.id].labelName = ss + '-' + device.name + (item.name ? `-${item.name }` : '');
stationSupervisorList.push(this.memberData[item.id]); stationSupervisorList.push(this.memberData[item.id]);
break; break;
case 'DRIVER': case 'DRIVER':
@ -304,7 +305,7 @@ export default {
schedulingList.push(this.memberData[item.id]); schedulingList.push(this.memberData[item.id]);
break; break;
case 'STATION_ELECTRIC_WORKER': case 'STATION_ELECTRIC_WORKER':
this.memberData[item.id].labelName = '电力工务' + (item.name || ''); this.memberData[item.id].labelName = sew + '-' + device.name + (item.name ? `-${item.name }` : '');
stationElectricWorkerList.push(this.memberData[item.id]); stationElectricWorkerList.push(this.memberData[item.id]);
break; break;
} }
@ -325,7 +326,7 @@ export default {
memberType: 'DISPATCHER', memberType: 'DISPATCHER',
children: dispatcherList children: dispatcherList
}, { }, {
labelName: this.simType == 'METRO' ? '行值' : '车站值班员', labelName: ss,
id: 'stationSupervisor', id: 'stationSupervisor',
memberType: 'STATION_SUPERVISOR', memberType: 'STATION_SUPERVISOR',
children: stationSupervisorList children: stationSupervisorList
@ -426,7 +427,7 @@ export default {
children: environmentDispatherList children: environmentDispatherList
}, },
{ {
labelName: '电力工务 ', labelName: sew,
id: 'stationElectricWorker', id: 'stationElectricWorker',
memberType: 'STATION_ELECTRIC_WORKER', memberType: 'STATION_ELECTRIC_WORKER',
children: stationElectricWorkerList children: stationElectricWorkerList

View File

@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<div class="chat-box-footer"> <div class="chat-box-footer">
<el-input v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" /> <el-input v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="flex: 1; margin-left: 5px;" :rows="1" @keyup.enter.native="sendText" />
<el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend || (!id && !privateChatId)" @click="sendText">T</el-button> <el-button :id="sendTextId" size="mini" class="chat-box-footer-create" :disabled="contentSend || (!id && !privateChatId)" @click="sendText">T</el-button>
<el-button :id="recordVoice" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay || (trainingDesign && !trainingSwitch) || (!id && !privateChatId)" size="mini" type="primary" @click="startRecording()"> <el-button :id="recordVoice" class="chat-box-footer-create chat-box-footer-send" :class="{'active': recordSending}" :disabled="audioPlay || (trainingDesign && !trainingSwitch) || (!id && !privateChatId)" size="mini" type="primary" @click="startRecording()">
<el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/maxSeconds*seconds" :width="40" :stroke-width="2" status="success" /> <el-progress id="voice_progress_bar" type="circle" :show-text="false" :percentage="100/maxSeconds*seconds" :width="40" :stroke-width="2" status="success" />
@ -97,8 +97,11 @@ export default {
sendTextId() { sendTextId() {
return OperationEvent.Conversation.Chat.menu.domId; return OperationEvent.Conversation.Chat.menu.domId;
}, },
chatBoxMin() {
return this.$store.state.training.chatBoxMin;
},
recordVoice() { recordVoice() {
return OperationEvent.Conversation.Chat.record.domId; return this.chatBoxMin ? '' : OperationEvent.Conversation.Chat.record.domId;
}, },
sideButtonDom() { sideButtonDom() {
return OperationEvent.Conversation.Chat.sideButton; return OperationEvent.Conversation.Chat.sideButton;
@ -194,7 +197,7 @@ export default {
return name; return name;
}, },
sendText() { sendText() {
if ((!this.id && !this.privateChatId) || !this.textContent) { return; } if ((!this.id && !this.privateChatId) || this.contentSend) { return; }
const operate = { const operate = {
over: true, over: true,
cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat, cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat,

View File

@ -11,7 +11,7 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {UserOperationType} from '@/scripts/ConstDic'; // import {UserOperationType} from '@/scripts/ConstDic';
import chatDialog from './chatDialog'; import chatDialog from './chatDialog';
export default { export default {
name: 'ChatBox', name: 'ChatBox',
@ -32,6 +32,11 @@ export default {
} }
}, },
watch: { watch: {
chatBoxMin() {
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
}
}, },
mounted() { mounted() {
}, },
@ -40,18 +45,18 @@ export default {
this.totalUnreadNum = val; this.totalUnreadNum = val;
}, },
clickBtn() { clickBtn() {
const operate = { // const operate = {
operation: this.sideButtonDom.operation, // operation: this.sideButtonDom.operation,
param: { chatBoxMin: this.chatBoxMin }, // param: { chatBoxMin: this.chatBoxMin },
userOperationType: UserOperationType.LEFTCLICK // userOperationType: UserOperationType.LEFTCLICK
}; // };
this.$store.dispatch('training/setChatBoxMin', false); this.$store.dispatch('training/setChatBoxMin', false);
this.$refs.chatDialog.dialogVisible = true; this.$refs.chatDialog.dialogVisible = true;
if (this.$store.state.trainingNew.trainingSwitch) { // if (this.$store.state.trainingNew.trainingSwitch) {
this.$nextTick(() => { // this.$nextTick(() => {
this.$store.dispatch('trainingNew/next', operate); // this.$store.dispatch('trainingNew/next', operate);
}); // });
} // }
} }
} }
}; };

View File

@ -59,15 +59,18 @@ export default {
deviceShow: true, deviceShow: true,
allMenuList: [ allMenuList: [
{ label: '切换', name: 'switchOffset', click: this.switchOffset, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.ibp.moreScreen; } }, { label: '切换', name: 'switchOffset', click: this.switchOffset, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.ibp.moreScreen; } },
{ label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isDisabled: () => { return false; }, isShow: () => { return this.$route.query.client !== 'diagramEdit'; } }, { label: '设备视图', name: 'jlmap3dmodel', click: this.jlmap3dmodel, isDisabled: () => { return false; }, isShow: () => { return this.$route.query.client !== 'diagramEdit' && this.$route.query.simType !== 'EMERGENCY'; } },
{ label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW'); } }, { label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; },
isShow: () => {
return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW');
} },
{ label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } }, { label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } },
{ label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: this.isShowLpf}, { label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: this.isShowLpf},
{ label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } },
{ label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, { label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' }, isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' && this.$route.query.simType !== 'EMERGENCY' },
{ label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, { label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; },
isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' }, isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' },
{ label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return !this.$route.query.newOpen; } }, { label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return !this.$route.query.newOpen; } },

View File

@ -39,7 +39,7 @@
<driver-ats-work v-if="picture=='driverAtsWork'" ref="driverAtsWork" /> <driver-ats-work v-if="picture=='driverAtsWork'" ref="driverAtsWork" />
<terminal-menu <terminal-menu
v-if="menuShow" v-show="menuShow"
ref="terminalMenu" ref="terminalMenu"
:now-terminal="nowTerminal" :now-terminal="nowTerminal"
@pictureChange="pictureChange" @pictureChange="pictureChange"

View File

@ -28,8 +28,6 @@
</div> </div>
</template> </template>
<script> <script>
import { ThirdLoginList } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
export default { export default {
name:'TerminalList', name:'TerminalList',
props: { props: {
@ -57,7 +55,7 @@ export default {
return this.$store.state.training.domConfig && this.$store.state.training.domConfig.trainingDesign; return this.$store.state.training.domConfig && this.$store.state.training.domConfig.trainingDesign;
}, },
thirdLogin() { thirdLogin() {
return ThirdLoginList.includes(getSessionStorage('project')); return this.$store.state.user.thirdLogin;
} }
}, },
watch: { watch: {
@ -163,7 +161,6 @@ export default {
findTerminalFromMapById(id) { findTerminalFromMapById(id) {
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {}; const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : []; const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
console.log(mapClientList, id, this.$route.query.simType, mapClientMap);
return mapClientList.find(item => item.id === id); return mapClientList.find(item => item.id === id);
}, },
findTerminalFromMap(type) { findTerminalFromMap(type) {

View File

@ -121,6 +121,8 @@ export default {
this.position = position; this.position = position;
this.position.y -= distance; this.position.y -= distance;
this.popTipShow(); this.popTipShow();
} else {
this.popTipHide();
} }
} else { } else {
this.popTipHide(); this.popTipHide();

View File

@ -41,6 +41,7 @@ export default {
'arrowList', 'arrowList',
'automaticRouteButtonList', 'automaticRouteButtonList',
'axleCounterResetButtonList', 'axleCounterResetButtonList',
'powerUnLockButtonList',
'cycleButtonList', 'cycleButtonList',
'directionRodList', 'directionRodList',
'espList', 'espList',
@ -67,7 +68,7 @@ export default {
]), ]),
deviceList () { deviceList () {
return [...this.sectionList, ...this.signalList, ...this.psdList, ...this.stationStandList, ...this.stationList, ...this.trainWindowList, return [...this.sectionList, ...this.signalList, ...this.psdList, ...this.stationStandList, ...this.stationList, ...this.trainWindowList,
...this.arrowList, ...this.automaticRouteButtonList, ...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.directionRodList, ...this.espList, ...this.arrowList, ...this.automaticRouteButtonList, ...this.axleCounterResetButtonList, ...this.powerUnLockButtonList, ...this.cycleButtonList, ...this.directionRodList, ...this.espList,
...this.indicatorLightList, ...this.lcList, ...this.lineList, ...this.outerFrameList, ...this.resourceList, ...this.responderList, ...this.indicatorLightList, ...this.lcList, ...this.lineList, ...this.outerFrameList, ...this.resourceList, ...this.responderList,
...this.signalButtonList, ...this.splitStationList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList, ...this.signalButtonList, ...this.splitStationList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList,
...this.zcList]; ...this.zcList];

View File

@ -112,7 +112,8 @@ export default {
{ name: '自动进路', value: 'AutomaticRoute' }, { name: '自动进路', value: 'AutomaticRoute' },
{ name: '引导总锁', value: 'GuideLock' }, { name: '引导总锁', value: 'GuideLock' },
{ name: '全线临时限速', value: 'LimitControl' }, { name: '全线临时限速', value: 'LimitControl' },
{ name: '站后折返', value: 'StationTurnBack' } { name: '站后折返', value: 'StationTurnBack' },
{ name: '上电解锁', value: 'PowerUnLock' }
], ],
directionList: [ directionList: [
{ name: 'X方向', value: 'X' }, { name: 'X方向', value: 'X' },
@ -193,7 +194,8 @@ export default {
'totalGuideLockButtonVOList', 'totalGuideLockButtonVOList',
'stationList', 'stationList',
'sectionList', 'sectionList',
'tbStrategyList' 'tbStrategyList',
'powerUnLockButtonList'
]), ]),
cardTitle() { cardTitle() {
if (this.cardMode === 'generate') { if (this.cardMode === 'generate') {
@ -289,7 +291,8 @@ export default {
return this.editModel.type == 'AutoTurnBack'; return this.editModel.type == 'AutoTurnBack';
}, },
isHiddenStation() { isHiddenStation() {
return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'GuideLock' || this.editModel.type == 'AxleReset' || this.editModel.type == 'StationTurnBack' || this.editModel.type == 'AutomaticRoute'; return ['AutoTurnBack', 'GuideLock', 'AxleReset', 'StationTurnBack', 'AutomaticRoute', 'PowerUnLock'].includes(this.editModel.type);
// return this.editModel.type == 'AutoTurnBack' || this.editModel.type == 'GuideLock' || this.editModel.type == 'AxleReset' || this.editModel.type == 'StationTurnBack' || this.editModel.type == 'AutomaticRoute';
}, },
isHiddenCreateAutomaticRoute() { isHiddenCreateAutomaticRoute() {
@ -302,7 +305,8 @@ export default {
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute'; return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'AutomaticRoute';
}, },
isHiddenCreateStation() { isHiddenCreateStation() {
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset' || this.addModel.type == 'StationTurnBack'; return ['AutoTurnBack', 'GuideLock', 'AxleReset', 'StationTurnBack', 'PowerUnLock'].includes(this.addModel.type);
// return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset' || this.addModel.type == 'StationTurnBack';
} }
}, },
mounted() { mounted() {
@ -368,6 +372,9 @@ export default {
case 'StationTurnBack': case 'StationTurnBack':
this.selectLists = this.tbStrategyList; this.selectLists = this.tbStrategyList;
break; break;
case 'PowerUnLock':
this.selectLists = this.powerUnLockButtonList;
break;
} }
}, },
changeStation(code) { // changeStation(code) { //
@ -396,7 +403,8 @@ export default {
this.autoList = []; this.autoList = [];
}, },
deviceSelect(selected) { 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()) { const list = ['AutomaticRoute'.toUpperCase(), 'AutoTurnBack'.toUpperCase(), 'AxleReset'.toUpperCase(), 'LimitControl'.toUpperCase(), 'GuideLock'.toUpperCase(), 'StationTurnBack'.toUpperCase(), 'PowerUnLock'.toUpperCase()];
if (selected && list.includes(selected._type.toUpperCase())) {
this.handleTypes(selected._type); this.handleTypes(selected._type);
this.$refs.dataform && this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make && this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
@ -479,7 +487,8 @@ export default {
// //
deleteObj() { deleteObj() {
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code); const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
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()) { const list = ['AutomaticRoute'.toUpperCase(), 'AutoTurnBack'.toUpperCase(), 'AxleReset'.toUpperCase(), 'LimitControl'.toUpperCase(), 'GuideLock'.toUpperCase(), 'StationTurnBack'.toUpperCase(), 'PowerUnLock'.toUpperCase()];
if (selected && list.includes(selected._type.toUpperCase())) {
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), { this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'), confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),

View File

@ -190,7 +190,7 @@ export default {
const type = device._type; const type = device._type;
if (this.selectDevice) { if (this.selectDevice) {
this.enabledTab = this.selectDevice; this.enabledTab = this.selectDevice;
} else if (['AutomaticRoute', 'AutoTurnBack', 'AxleReset', 'LimitControl', 'GuideLock', 'StationTurnBack'].includes(type)) { } else if (['AutomaticRoute', 'AutoTurnBack', 'AxleReset', 'LimitControl', 'GuideLock', 'StationTurnBack', 'PowerUnLock'].includes(type)) {
this.enabledTab = 'ControlDraft'; this.enabledTab = 'ControlDraft';
} else if (controlLampTypeList.includes(type)) { } else if (controlLampTypeList.includes(type)) {
this.enabledTab = 'ControlLamp'; this.enabledTab = 'ControlLamp';

View File

@ -126,7 +126,7 @@
</el-form> </el-form>
</el-collapse-item> </el-collapse-item>
<el-collapse-item title="批量计算区段长度" name="8"> <el-collapse-item title="批量计算区段长度" name="8">
<el-button class="sectionSetting" @click="calculateSectionLength" type="primary" size="small">设置</el-button> <el-button class="sectionSetting" type="primary" size="small" @click="calculateSectionLength">设置</el-button>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
@ -402,7 +402,9 @@ export default {
models.push(deepAssign(item, { _dispose: true })); models.push(deepAssign(item, { _dispose: true }));
} }
}); });
const arrList = ['signalList', 'stationList', 'psdList', 'axleCounterResetButtonList', 'tbStrategyList', 'zcList', 'cycleButtonList', 'totalGuideLockButtonVOList', 'automaticRouteButtonList', 'outerFrameList', 'directionRodList', 'textList', 'indicatorLightList', 'splitStationList']; const arrList = ['signalList', 'stationList', 'psdList', 'axleCounterResetButtonList', 'tbStrategyList', 'zcList', 'cycleButtonList',
'totalGuideLockButtonVOList', 'automaticRouteButtonList', 'outerFrameList', 'directionRodList', 'textList', 'indicatorLightList',
'splitStationList', 'powerUnLockButtonList'];
arrList.forEach(itemName => { arrList.forEach(itemName => {
map[itemName] && map[itemName].forEach(item => { map[itemName] && map[itemName].forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX; const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
@ -428,23 +430,23 @@ export default {
models.push(deepAssign(section, { _type: 'Section' })); models.push(deepAssign(section, { _type: 'Section' }));
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
}, },
calculateSectionLength(){ calculateSectionLength() {
const precisionOf = num => num.toString().split('.').pop().length const precisionOf = num => num.toString().split('.').pop().length;
this.$confirm('确认设置所有区段的实际长度吗?', '提示', { this.$confirm('确认设置所有区段的实际长度吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(()=>{ }).then(()=>{
this.sectionList.forEach(section => { this.sectionList.forEach(section => {
const { kmMin, kmMax } = section const { kmMin, kmMax } = section;
if (typeof kmMin === 'number' && typeof kmMax === 'number') { if (typeof kmMin === 'number' && typeof kmMax === 'number') {
const precision = Math.max(precisionOf(kmMin), precisionOf(kmMax)) const precision = Math.max(precisionOf(kmMin), precisionOf(kmMax));
section.lengthFact = Number((kmMax - kmMin).toFixed(precision)) section.lengthFact = Number((kmMax - kmMin).toFixed(precision));
} }
}) });
this.$emit('updateMapModel', this.sectionList) this.$emit('updateMapModel', this.sectionList);
this.$message.success('区段长度设置成功!') this.$message.success('区段长度设置成功!');
}) });
} }
} }
}; };

View File

@ -16,7 +16,7 @@
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
<el-select v-model="item.type" placeholder="请选择" size="mini"> <el-select v-model="item.type" placeholder="请选择" size="mini">
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" /> <el-option v-for="elem in getRoleList('METRO')" :key="elem.value" :label="elem.label" :value="elem.value" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
@ -48,7 +48,7 @@
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
<el-select v-model="item.type" placeholder="请选择" size="mini"> <el-select v-model="item.type" placeholder="请选择" size="mini">
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" /> <el-option v-for="elem in getRoleList('RAILWAY')" :key="elem.value" :label="elem.label" :value="elem.value" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
@ -83,7 +83,7 @@
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
<el-select v-model="item.type" placeholder="请选择" size="mini"> <el-select v-model="item.type" placeholder="请选择" size="mini">
<el-option v-for="elem in roleList" :key="elem.value" :label="elem.label" :value="elem.value" /> <el-option v-for="elem in getRoleList('EMERGENCY')" :key="elem.value" :label="elem.label" :value="elem.value" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
@ -111,7 +111,7 @@
</el-form-item> </el-form-item>
<el-form-item label="成员类型:" prop="type"> <el-form-item label="成员类型:" prop="type">
<el-select v-model="createForm.type" placeholder="请选择"> <el-select v-model="createForm.type" placeholder="请选择">
<el-option v-for="item in roleList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in getRoleList(createForm.systemType)" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="关联设备:" prop="deviceCode"> <el-form-item label="关联设备:" prop="deviceCode">
@ -160,7 +160,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="行值:" prop="STATION_SUPERVISOR"> <el-form-item :label="batchForm.systemType == 'RAILWAY' ?'车站值班员:':'行值:'" prop="STATION_SUPERVISOR">
<el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -239,8 +239,8 @@
<el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="batchForm.systemType === 'METRO'" :span="12"> <el-col v-if="batchForm.systemType === 'METRO' || batchForm.systemType === 'RAILWAY'" :span="12">
<el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER"> <el-form-item :label="batchForm.systemType == 'RAILWAY' ?'车站电务:':'电力工务'" prop="STATION_ELECTRIC_WORKER">
<el-input-number v-model="batchForm.STATION_ELECTRIC_WORKER" size="small" :min="0" :step="1" :precision="0" /> <el-input-number v-model="batchForm.STATION_ELECTRIC_WORKER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -320,13 +320,13 @@
</div> </div>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberMetroList)"> <el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberMetroList, 'METRO')">
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" /> <el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem, 'METRO')" :value="elem.id" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberMetroList)"> <el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberMetroList, 'METRO')">
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" /> <el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem, 'METRO')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="3" style="text-align: center;"> <el-col :span="3" style="text-align: center;">
@ -356,13 +356,13 @@
</div> </div>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberRailwayList)"> <el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberRailwayList, 'RAILWAY')">
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" /> <el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem, 'RAILWAY')" :value="elem.id" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberRailwayList)"> <el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberRailwayList, 'RAILWAY')">
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" /> <el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem, 'RAILWAY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="3" style="text-align: center;"> <el-col :span="3" style="text-align: center;">
@ -392,13 +392,13 @@
</div> </div>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberEmergencyList)"> <el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberEmergencyList, 'EMERGENCY')">
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" /> <el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem, 'EMERGENCY')" :value="elem.id" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberEmergencyList)"> <el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberEmergencyList, 'EMERGENCY')">
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" /> <el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem, 'EMERGENCY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="3" style="text-align: center;"> <el-col :span="3" style="text-align: center;">
@ -426,18 +426,18 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="群主:" prop="leaderId"> <el-form-item label="群主:" prop="leaderId">
<el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList)"> <el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList, conversationForm.systemType)">
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" /> <el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem, conversationForm.systemType)" :value="elem.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="群成员:" prop="memberIds"> <el-form-item label="群成员:" prop="memberIds">
<el-select v-model="conversationForm.memberIds" :class="{disabledClear: conversationForm.memberIds.length ==1}" style="width: 200px;" multiple collapse-tags placeholder="请选择" :title="getMemberTitle(conversationForm.memberIds, getFormMemberList)"> <el-select v-model="conversationForm.memberIds" :class="{disabledClear: conversationForm.memberIds.length ==1}" style="width: 200px;" multiple collapse-tags placeholder="请选择" :title="getMemberTitle(conversationForm.memberIds, getFormMemberList, conversationForm.systemType)">
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" /> <el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem, conversationForm.systemType)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="createConversation">确定</el-button> <el-button type="primary" @click="createConversation">确定</el-button>
<el-button @click="resetConversationForm">重置</el-button> <el-button @click="resetConversationForm()">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -505,7 +505,7 @@ export default {
}, },
disStationList: [], disStationList: [],
stationShow: ['STATION_SUPERVISOR', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN', stationShow: ['STATION_SUPERVISOR', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'], 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', 'STATION_WORKER', 'STATION_ELECTRIC_WORKER'],
conversationForm: { conversationForm: {
systemType: 'METRO', systemType: 'METRO',
id: '', id: '',
@ -564,10 +564,27 @@ export default {
this.initDisStationList(); this.initDisStationList();
}, },
methods: { methods: {
resetConversationForm() { getRoleList(type) {
this.$refs.conversationForm.resetFields(); const list = JSON.parse(JSON.stringify(ConstConfig.ConstSelect.roleTypeList));
if (type == 'RAILWAY') {
list.forEach(item => {
if (item.value == 'STATION_SUPERVISOR') {
item.label = '车站值班员';
}
if (item.value == 'STATION_ELECTRIC_WORKER') {
item.label = '车站电务';
}
});
}
return list;
}, },
getMemberTitle(val, list) { resetConversationForm(val) {
this.$refs.conversationForm.resetFields();
if (val) {
this.conversationForm.systemType = val;
}
},
getMemberTitle(val, list, type) {
const mapList = {}; const mapList = {};
list.forEach(item => { list.forEach(item => {
mapList[item.id] = item; mapList[item.id] = item;
@ -581,7 +598,7 @@ export default {
} }
valArr.forEach(id => { valArr.forEach(id => {
if (mapList[id]) { if (mapList[id]) {
titleArr.push(this.getLabel(mapList[id])); titleArr.push(this.getLabel(mapList[id], type));
} }
}); });
return titleArr.join('\n'); return titleArr.join('\n');
@ -589,9 +606,9 @@ export default {
getImgUrl(url) { getImgUrl(url) {
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : ''; return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
}, },
getLabel(obj) { getLabel(obj, type) {
let name = ''; let name = '';
const findType = this.roleList.find(item => { const findType = this.getRoleList(type).find(item => {
return item.value == obj.type; return item.value == obj.type;
}); });
if (findType) { if (findType) {
@ -819,7 +836,7 @@ export default {
}; };
memberMap[this.batchForm.systemType].push(member); memberMap[this.batchForm.systemType].push(member);
} }
if (this.batchForm.STATION_ELECTRIC_WORKER && this.batchForm.systemType === 'RAILWAY') { if (this.batchForm.STATION_ELECTRIC_WORKER && (this.batchForm.systemType === 'RAILWAY' || this.batchForm.systemType === 'METRO')) {
const member = { const member = {
id: this.getMemberId(this.batchForm.systemType), id: this.getMemberId(this.batchForm.systemType),
name: '', name: '',
@ -1118,6 +1135,14 @@ export default {
deviceCode: station.code deviceCode: station.code
}; };
memberMap[this.generationForm.systemType].push(memberSignalBuilDing); memberMap[this.generationForm.systemType].push(memberSignalBuilDing);
} else {
const memberStationElectricWorker = {
id: this.getMemberId(this.generationForm.systemType),
name: '',
type: 'STATION_ELECTRIC_WORKER',
deviceCode: station.code
};
memberMap[this.generationForm.systemType].push(memberStationElectricWorker);
} }
}); });
const memberTrainMaster = { const memberTrainMaster = {

View File

@ -14,6 +14,7 @@ import { launchFullscreen } from '@/utils/screen';
import editTraining from './editTraining'; import editTraining from './editTraining';
import { superAdmin, admin } from '@/router/index'; import { superAdmin, admin } from '@/router/index';
import { getAllPublishTrainingList, getManageTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training'; import { getAllPublishTrainingList, getManageTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training';
import { exportTrainingData, importTrainingData } from '@/api/trainingManage';
export default { export default {
name:'TrainingManage', name:'TrainingManage',
components: { components: {
@ -56,7 +57,9 @@ export default {
}, },
queryList:{ queryList:{
query: this.queryFunction, query: this.queryFunction,
selectCheckShow: false, selectCheckShow: this.hasTeachingDataManage(),
selectCheckClass: 'hiddenCheckBtn',
onSelectionChange: this.onSelectionChange,
// paginationHiden: true, // paginationHiden: true,
indexShow: true, indexShow: true,
columns: [ columns: [
@ -133,8 +136,13 @@ export default {
} }
] ]
} }
],
actions: [
{ text: '导 入', fileType: 'file', handler: this.importTrainingData, show: this.hasTeachingDataManage() },
{ text: '导 出', handler: this.exportTrainingData, show: this.hasTeachingDataManage() }
] ]
} },
checkList: []
}; };
}, },
computed: { computed: {
@ -164,6 +172,54 @@ export default {
}); });
}, },
methods: { methods: {
onSelectionChange(val) {
this.checkList = val.map(item => {
return item.id;
});
},
importTrainingData() {
const loading = this.$loading({
lock: true,
text: '正在导入中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
const obj = document.getElementById('queryFormFilesInput');
if (!obj.files) return;
const f = obj.files[0];
const reader = new FileReader();
const that = this;
reader.readAsText(f, 'utf-8');
reader.onload = function(e) {
const data = e.target.result;
importTrainingData(JSON.parse(data)).then(res => {
that.$message.success('导入成功!');
loading.close();
that.queryList.reload();
}).catch(error => {
loading.close();
that.$message.error('导入失败' + error.message);
});
obj.value = '';
};
});
},
exportTrainingData() {
if (!this.checkList.length) { return; }
exportTrainingData(this.checkList).then(res => {
const content = new Blob([JSON.stringify(res.data)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `实训数据.json`;
el.click();
urlObject.revokeObjectURL(url);
}).catch(() => {
this.$message.error('导出失败');
});
},
editLabel() { editLabel() {
this.queryList.reload(); this.queryList.reload();
}, },
@ -270,3 +326,8 @@ export default {
} }
}; };
</script> </script>
<style>
.hiddenCheckBtn {
display: none;
}
</style>

View File

@ -205,6 +205,10 @@ export default {
name: '发布IBP管理', name: '发布IBP管理',
handleClick: this.publishIbpManage handleClick: this.publishIbpManage
}, },
{
name: '草稿IBP管理',
handleClick: this.draftIbpManage
},
{ {
name: '加载计划运行图管理', name: '加载计划运行图管理',
handleClick: this.runPlanCommonManage handleClick: this.runPlanCommonManage
@ -541,6 +545,9 @@ export default {
publishIbpManage(index, row) { publishIbpManage(index, row) {
this.$router.push({path: '/systemManagement/lineDataManage/publishIbp', query: {mapId: row.id, lineCode: row.lineCode}}); this.$router.push({path: '/systemManagement/lineDataManage/publishIbp', query: {mapId: row.id, lineCode: row.lineCode}});
}, },
draftIbpManage(index, row) {
this.$router.push({path: `/systemManagement/lineDataManage/ibp/home/${row.id}`, query: {lineCode: row.lineCode}});
},
runPlanCommonManage(index, row) { runPlanCommonManage(index, row) {
this.$router.push({path: '/systemManagement/lineDataManage/runPlanCommon', query: {mapId: row.id, lineCode: row.lineCode}}); this.$router.push({path: '/systemManagement/lineDataManage/runPlanCommon', query: {mapId: row.id, lineCode: row.lineCode}});
}, },