Merge remote-tracking branch 'origin/test' into thailand

# Conflicts:
#	src/jmapNew/theme/components/menus/dialog/setFault.vue
#	src/jmapNew/theme/datie_01/menus/menuDialog/helpAbout.vue
#	src/jmapNew/theme/datie_02/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue
#	src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue
#	src/scripts/ConstConfig.js
#	src/views/newMap/display/chatBox.vue
#	src/views/newMap/display/memberManage/membersManage.vue
#	src/views/newMap/display/simulationMenu/simulationMenu.vue
#	src/views/newMap/display/terminals/equipmentConstructionTable.vue
#	src/views/newMap/display/terminals/registerBook.vue
#	src/views/newMap/display/terminals/terminalMenu.vue
#	src/views/newMap/display/trainingList/trainingMenu.vue
#	src/views/newMap/display/trainingList/trainingTip.vue
This commit is contained in:
fan 2023-06-01 16:15:38 +08:00
commit 6a9aa02cc3
87 changed files with 2007 additions and 504 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

@ -265,3 +265,11 @@ export function loadTrainingBg(group, trainingId) {
method: 'post'
});
}
/** 预备开始场景 */
export function prepareScene(group, params) {
return request({
url:`/api/training2Simulation/${group}/prepare/start`,
method: 'post',
params
});
}

View File

@ -166,3 +166,26 @@ export function clearDesignTraining(trainingId, group) {
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
});
}
/** 实训跳转到当前步骤*/
export function jumpToTraining(group, stepId) {
return request({
url: `/api/training2Simulation/${group}/jumpTo/${stepId}`,
method: 'put'
});
}

View File

@ -635,6 +635,19 @@ class SkinCode extends defaultStyle {
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] = {

View File

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

View File

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

View File

@ -122,6 +122,11 @@ export function parser(data, skinCode, showConfig) {
mapDevice[elem.code] = createDevice(deviceType.AxleReset, elem, propConvert, showConfig);
}, 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 => { // 引导总锁列表
mapDevice[elem.code] = createDevice(deviceType.GuideLock, elem, propConvert, showConfig);
if (!elem.direction) {
@ -342,6 +347,7 @@ export function updateMapData(state, model) {
case deviceType.Esp: updateForList(model, state, 'espList'); break;
case deviceType.AutoTurnBack: updateForList(model, state, 'cycleButtonList'); 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.OutFrame: updateForList(model, state, 'outerFrameList'); 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 => {
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.setCross({fill: '#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) {

View File

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

View File

@ -1008,6 +1008,7 @@ export default class Station extends Group {
model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController);
model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy(model);
// this.handlePowerUnlockShow(model);
this.handleGuideLock(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => {
@ -1062,6 +1063,12 @@ export default class Station extends Group {
handleAllowAutonomy() {
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) {
if (this.style.Station.stationText.isSpecialType) {

View File

@ -1,5 +1,6 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index';
class EHollowStand extends Group {
constructor(model) {
@ -52,6 +53,9 @@ class EHollowStand extends Group {
model.trainParking && this.setColor(style.StationStand.hollowStand.doorOpenColor);
// 紧急停车
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 Rect from 'zrender/src/graphic/shape/Rect';
// import Text from 'zrender/src/graphic/Text';
import store from '@/store/index';
class ESolidStand extends Group {
constructor(model) {
@ -65,6 +66,9 @@ class ESolidStand extends Group {
}
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.closed && this.setColor(style.StationStand.solidStand.closeColor);
if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) {
this.setColor('#7F7F7F');
}
} else {
this.handlePassagerColor(model.num);
}

View File

@ -318,11 +318,12 @@ export default class Switch extends Group {
/** 名称动画*/
nameTextAnimation() {
if (this.name.getNameText()) {
this.name.getNameText().animateStyle(true)
.when(0, { textFill: this.style.backgroundColor })
.when(1000, { textFill: this.style.Switch.text.lossColor })
.when(2000, { textFill: this.style.backgroundColor })
.start();
.when(2000, { textFill: this.style.backgroundColor });
}
this.name.getTextRect().animateStyle(true)
.when(0, { textFill: this.style.backgroundColor })

View File

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

View File

@ -24,7 +24,7 @@
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
@ -40,6 +40,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
@ -60,6 +61,9 @@ export default {
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},

View File

@ -79,14 +79,14 @@ export default {
label: '设置临时限速',
handler: this.setSpeed,
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'
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
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'
}
],

View File

@ -1,28 +1,38 @@
<template>
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;">
</div>
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
:loading="loading" @click="commit">确定</el-button>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" label="模块名称" width="180">
</el-table-column>
<el-table-column prop="version" label="版本" width="180">
</el-table-column>
<el-table-column prop="updateDate" label="修改日期">
</el-table-column>
<el-table-column prop="moduleName" label="模块名称" width="180" />
<el-table-column prop="version" label="版本" width="180" />
<el-table-column prop="updateDate" label="修改日期" />
</el-table>
</div>
</el-dialog>
@ -30,6 +40,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
@ -46,10 +57,13 @@
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
selected: null
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -60,7 +74,7 @@
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '关于ControlMonitor'
return '关于ControlMonitor';
}
},
methods: {
@ -83,10 +97,10 @@
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
@ -97,13 +111,13 @@
}).catch(error => {
this.loading = false;
this.doClose();
})
});
},
cancel() {
let operate = {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
@ -112,7 +126,7 @@
}).catch(error => { this.doClose(); });
}
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {

View File

@ -244,51 +244,23 @@ export default {
// {label: '', value: 'CBTC_OCCUPIED_FAULT'},
{label: 'Circuit failure', value: 'AXLE_FAULT'}
];
// } else if (selected._type === 'Section' && this.popClass === 'xian-01__systerm') {
// this.faultList = [
// {label: '', value: 'FAULT'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'},
// {label: '', value: 'ARB'}
// ];
// } else if (selected._type === 'Switch' && this.popClass === 'xian-01__systerm' ) {
// this.faultList = [
// {label: '', value: 'SPLIT'},
// {label: '', value: 'NORMAL_SPLIT'},
// {label: '', value: 'REVERSE_SPLIT'},
// {label: '', value: 'SQUEEZE'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'},
// {label: '', value: 'AXLE_FAULT'},
// {label: '', value: 'ARB'}
// ];
// } else if (selected._type === 'Switch' && this.popClass === 'nanjing-02__systerm' ) {
// this.faultList = [
// {label: '', value: 'SPLIT'},
// {label: '', value: 'SPLIT_1'},
// {label: '', value: 'NORMAL_SPLIT'},
// {label: '', value: 'REVERSE_SPLIT'},
// {label: '', value: 'SQUEEZE'},
// {label: '', value: 'SECTION_NO_STATUS'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'},
// {label: '', value: 'AXLE_FAULT'},
// {label: '', value: 'ARB'}
// ];
// } else if (selected._type === 'Server' && this.popClass === 'nanjing-02__systerm') {
// this.faultList = [
// {label: 'ATS', value: 'ATS_FAULT' }
// ];
// } else if (selected._type === 'Signal' && this.popClass === 'nanjing-02__systerm') {
// this.faultList = [
// {label: '(CTC)', value: 'NO_OPEN'},
// {label: '', value: 'LIGHTING_UNIT_FAULT_NAME'},
// {label: '', value: 'LIGHTING_UNIT_FAULT_HEAD'}
// ];
// } else if (selected._type === 'Section' && this.popClass === 'nanjing-02__systerm') {
// this.faultList = [
// {label: '', value: 'FAULT'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'},
// {label: '', value: 'ARB'},
// {label:'', value:'UNABLE_COLLECT_STATUS'}
// ];
} else if (selected._type === 'Signal' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [
{label: '无法开放(非CTC)', value: 'NO_OPEN'},
{label: '编号闪', value: 'LIGHTING_UNIT_FAULT_NAME'},
{label: '机头闪', value: 'LIGHTING_UNIT_FAULT_HEAD'}
];
} else if (selected._type === 'Section' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [
{label: '紫光带故障', value: 'FAULT'},
{label: '红光带故障', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴受扰', value: 'ARB'},
{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) {
this.form.faultType = this.faultList[0].value;

View File

@ -0,0 +1,140 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" label="模块名称" width="180" />
<el-table-column prop="version" label="版本" width="180" />
<el-table-column prop="updateDate" label="修改日期" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: '主程序版本:',
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '关于ControlMonitor';
}
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,163 @@
<template>
<el-dialog
v-dialogDrag
:class="popClass+' train-set-plan'"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="11">车组号</el-col>
<el-col :span="11" :offset="1">
<el-select v-model="addModel.groupNumber" size="mini">
<el-option
v-for="item in trainList"
:key="item.code"
:disabled="disabledTrain(item.code)"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default {
name: 'TrainSetPlan',
components: {
NoticeInfo
},
props:{
popClass:{
type:String,
required:true
}
},
data() {
return {
trainNoList: [],
selected: null,
messageTip1:'',
addModel: {
groupNumber: '',
sectionCode: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'mapConfig',
'trainList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '加载备用车';
}
},
watch:{},
methods: {
doShow(operate, selected) {
this.$root.$emit('dialogOpen', selected);
this.selected = selected;
//
this.addModel.sectionCode = selected.code;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.addModel = {
groupNumber: '',
sectionCode: ''
};
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
commit() {
if (!this.addModel.groupNumber) {
this.messageTip1 = '请输入车组号';
return;
}
const params = {
groupNumber: this.addModel.groupNumber,
sectionCode: this.addModel.sectionCode,
right: true
};
this.messageTip1 = '';
this.loading = true;
commitOperate(menuOperate.Section.loadSpareTrain, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).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(); });
},
disabledTrain(code) {
return this.$store.state.map.activeTrainList.includes(code);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-01__systerm .el-dialog .base-label {
// background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -4,6 +4,7 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="datie-02__systerm" />
<load-spare-train ref="loadSpareTrain" pop-class="datie-02__systerm" />
<add-spare-train ref="addSpareTrain" />
<draw-select ref="drawSelect" />
<fork-directive ref="forkDirective" />
@ -22,6 +23,7 @@ import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/men
import AddSpareTrain from './dialog/addSpareTrain';
import DrawSelect from './dialog/drawSelect';
import ForkDirective from './dialog/forkDirective';
import LoadSpareTrain from './dialog/loadSpareTrain';
export default {
name: 'SectionMenu',
@ -32,7 +34,8 @@ export default {
SetFault,
AddSpareTrain,
DrawSelect,
ForkDirective
ForkDirective,
LoadSpareTrain
},
props: {
selected: {
@ -84,6 +87,11 @@ export default {
label: 'Cancel faults',
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: 'Add a spare train',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
}
]
};
@ -107,14 +115,14 @@ export default {
}
},
mounted() {
const isDev = process.env.NODE_ENV === 'development';
if (isDev) {
this.menuNormal.push( {
label: 'New planned train',
handler: this.createPlanTrain,
cmdType: CMD.Section.CMD_Train_Init_Plan
});
}
// const isDev = process.env.NODE_ENV === 'development';
// if (isDev) {
// this.menuNormal.push( {
// label: '',
// handler: this.createPlanTrain,
// cmdType: CMD.Section.CMD_Train_Init_Plan
// });
// }
},
methods: {
initMenu() {
@ -202,6 +210,13 @@ export default {
this.$refs.trainAddPlan.doShow(operate);
}
});
},
loadSpare() {
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
if (valid) {
this.$refs.loadSpareTrain.doShow(operate, this.selected);
}
});
}
}
};

View File

@ -0,0 +1,140 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" label="模块名称" width="180" />
<el-table-column prop="version" label="版本" width="180" />
<el-table-column prop="updateDate" label="修改日期" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: '主程序版本:',
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '关于ControlMonitor';
}
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,140 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" label="模块名称" width="180" />
<el-table-column prop="version" label="版本" width="180" />
<el-table-column prop="updateDate" label="修改日期" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: '主程序版本:',
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '关于ControlMonitor';
}
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -105,14 +105,14 @@ export default {
label: '设置限速',
handler: this.setSpeed,
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'
},
{
label: '取消限速',
handler: this.cancelSpeed,
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'
}
],

View File

@ -78,6 +78,13 @@ export default {
isDisabled: (station, work) => false,
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'),
handler: this.execKeyOperationTest,
@ -97,6 +104,11 @@ export default {
handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '设置车站故障',
handler: this.setStationStoppage,
cmdType: CMD.Station.CMD_SET_FAULT
},
{
label: '重启联锁机',
handler: this.restartInterlock,
@ -229,6 +241,20 @@ export default {
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();
}
}).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() {

View File

@ -13,7 +13,7 @@
>
<el-row justify="center" style="height: 40px;">
<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 :span="16">
<el-input ref="passwordBox" v-model="password" size="mini" show-password />

View File

@ -64,7 +64,7 @@ export default {
switchAndPhySicalSectionList() {
let list = [];
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;
},

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" />
<!--<passive-alarm ref="passiveAlarm" />-->
<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" />
<!--<passive-Timeout ref="passiveTimeout" />-->
</div>
@ -37,6 +38,7 @@ import MenuLimit from './menuLimit';
import MenuStationTurnBack from './menuStationTurnBack';
import MenuStationLight from './menuStationLight';
import MenuStationPreReset from './menuStationPreReset';
import MenuPowerUnLock from './menuPowerUnLock';
// import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import AlarmDetail from './alarmDetail';
@ -61,7 +63,8 @@ export default {
PassiveContorl,
MenuStationLight,
MenuStationPreReset,
AlarmDetail
AlarmDetail,
MenuPowerUnLock
// PassiveTimeout
},
props: {

View File

@ -24,7 +24,7 @@
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
@ -40,6 +40,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
@ -60,6 +61,9 @@ export default {
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},

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,
isShow: (selected, work) => work == 'localWork'
},
{
label: '上电解锁',
handler: this.powerUnLock,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
isShow: (selected, work) => work == 'localWork'
},
// {
// label: '',
// handler: this.powerUnLock,
// cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
// isShow: (selected, work) => work == 'localWork'
// },
// {
// label: '',
// handler: this.execKeyOperationTest,
@ -101,6 +101,11 @@ export default {
handler: this.cancelStoppage,
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
},
{
label: '设置车站故障',
handler: this.setStationStoppage,
cmdType: CMD.Station.CMD_SET_FAULT
},
{
label: '重启联锁机',
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() {
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.$store.state.scriptRecord.bgSet) {
const menuHook = [{
label: '道岔钩锁',
label: '手摇道岔钩锁',
handler: this.hookLock
}];
this.menu = [...this.menuForce, ...menuHook];

View File

@ -24,7 +24,7 @@
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
@ -40,6 +40,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
@ -60,6 +61,9 @@ export default {
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},

View File

@ -105,14 +105,14 @@ export default {
label: '设置临时限速',
handler: this.setSpeed,
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'
},
{
label: '取消临时限速',
handler: this.cancelSpeed,
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'
}
],

View File

@ -24,7 +24,7 @@
>确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
<span v-if="copyrightShow"> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
@ -41,6 +41,7 @@
<script>
import { MapDeviceType } from '@/scripts/cmdPlugin/Config';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {mapGetters} from 'vuex';
export default {
name: 'ManageUser',
@ -61,6 +62,9 @@ export default {
};
},
computed: {
...mapGetters('projectConfig', [
'copyrightShow'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},

View File

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

View File

@ -94,7 +94,7 @@ export default {
{label: 'STATION_WORKER', value: 'STATION_WORKER', simTypeList: ['RAILWAY']},
{label: 'TRAIN_MASTER', value: 'TRAIN_MASTER', simTypeList: ['METRO']},
{label: 'ELECTRIC_DISPATCHER', value: 'ELECTRIC_DISPATCHER', simTypeList: ['METRO']},
{label: 'STATION_ELECTRIC_WORKER', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO']},
{label: 'STATION_ELECTRIC_WORKER', value: 'STATION_ELECTRIC_WORKER', simTypeList: ['METRO', 'RAILWAY']},
{label: 'PARENT_DEPARTMENT', value: 'PARENT_DEPARTMENT', simTypeList: ['METRO']},
{label: 'SCHEDULING', value: 'SCHEDULING', simTypeList: ['METRO']},
{label: 'DEVICE_MANAGER', value: 'DEVICE_MANAGER', simTypeList: ['RAILWAY']},

View File

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

View File

@ -891,7 +891,7 @@
// jjjlm: 'JJJLM'
// };
// /** 嵌入第三方平台 导航栏右上角 清空 */
// export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs'];
// export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs', 'richorgscm'];
// /** 底部栏仅展示公司信息不展示备案号 */
// 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',

View File

@ -516,7 +516,9 @@ export default {
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'},
CMD_Conversation_Group_Private_Text_Chat: {value: 'Conversation_Group_Private_Text_Chat', label: '发送私聊文字消息'},
CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'}
CMD_Conversation_Group_Private_Audio_Base64: {value: 'Conversation_Group_Private_Audio_Base64', label: '发送私聊语音消息'},
CMD_Conversation_Group_Create: {value: 'Conversation_Group_Create', label: '创建会话群'},
CMD_Conversation_Group_Invite_Member: {value: 'Conversation_Group_Invite_Member', label: '邀请人员入群'}
},
PSL: {
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}

View File

@ -4389,11 +4389,11 @@ export const OperationEvent = {
},
moonDay: {
operation: 'b101',
domId: '_Tips-TicketOrRegister-RegisterInput-MoonDay'
domId: '_Tips-TicketOrRegister-RegisterInput-MoonDay{BOTTOM}'
},
hourMinute: {
operation: 'b102',
domId: '_Tips-TicketOrRegister-RegisterInput-HourMinute'
domId: '_Tips-TicketOrRegister-RegisterInput-HourMinute{BOTTOM}'
},
result: {
operation: 'b103',
@ -4401,11 +4401,11 @@ export const OperationEvent = {
},
noticeTimeMoonDay: {
operation: 'b104',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeMoonDay'
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeMoonDay{BOTTOM}'
},
noticeTimeHourMinute: {
operation: 'b105',
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeHourMinute'
domId: '_Tips-TicketOrRegister-RegisterInput-NoticeTimeHourMinute{BOTTOM}'
},
noticeTimeInfo: {
operation: 'b106',
@ -4413,11 +4413,11 @@ export const OperationEvent = {
},
arriveTimeMoonDay: {
operation: 'b107',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeMoonDay'
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeMoonDay{BOTTOM}'
},
arriveTimeHourMinute: {
operation: 'b108',
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeHourMinute'
domId: '_Tips-TicketOrRegister-RegisterInput-ArriveTimeHourMinute{BOTTOM}'
},
arriveTimeInfo: {
operation: 'b109',
@ -4425,11 +4425,11 @@ export const OperationEvent = {
},
endTimeMoonDay: {
operation: 'b110',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeMoonDay'
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeMoonDay{BOTTOM}'
},
endTimeHourMinute: {
operation: 'b111',
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeHourMinute'
domId: '_Tips-TicketOrRegister-RegisterInput-EndTimeHourMinute{BOTTOM}'
},
endTimeInfo: {
operation: 'b112',
@ -5027,7 +5027,7 @@ export const OperationEvent = {
},
requestDate:{
operation: '120a',
domId: '_Tips-Rail-equipmentConstructionFill-requestDate'
domId: '_Tips-Rail-equipmentConstructionFill-requestDate{BOTTOM}'
},
requestDetails:{
operation: '120b',
@ -5035,7 +5035,7 @@ export const OperationEvent = {
},
planSpendTime:{
operation: '120c',
domId: '_Tips-Rail-equipmentConstructionFill-planSpendTime'
domId: '_Tips-Rail-equipmentConstructionFill-planSpendTime{BOTTOM}'
},
acceptDetail:{
operation: '120d',
@ -5043,7 +5043,7 @@ export const OperationEvent = {
},
confirmReviewDate:{
operation: '120e',
domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDate'
domId: '_Tips-Rail-equipmentConstructionFill-confirmReviewDate{BOTTOM}'
},
confirmReviewDetail:{
operation: '120f',
@ -5165,6 +5165,14 @@ export const OperationEvent = {
record: {
operation: '1403',
domId: '_Tips-Conversation-Chat-record'
},
createGroup: {
operation: '1404',
domId: '_Tips-Conversation-Chat-createGroup'
},
inviteToGroup: {
operation: '1405',
domId: '_Tips-Conversation-Chat-inviteToGroup'
}
}
},

View File

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

View File

@ -83,7 +83,6 @@ class ValidateHandler {
if (stepOperation.val) {
valid = ((operate.val).toString() === stepOperation.val.toString()) && valid;
}
const opParam = operate.param === undefined ? {} : operate.param;
if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) {
valid = this.checkParamConsistent(opParam, stepOperation.params, operate.operation) && valid;
@ -100,7 +99,7 @@ class ValidateHandler {
Handler.judgeIsTextSendOperation();
} else {
store.dispatch('trainingNew/handleStepRecord', { type:'ERROR', stepOperation });
console.error('校验失败;');
console.error('校验失败;', stepOperation, operate);
}
return valid;
}

View File

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

View File

@ -20,7 +20,8 @@ const training = {
voiceStepList: [], // 实训特殊语音步骤列表
voiceStepIndex: -1,
examSwitch: false, // 考试开始结束标注
stepRecord: [] // 操作记录
stepRecord: [], // 操作记录
joinTrainingInfo: null
},
getters: {
teachMode: (state) => {
@ -51,7 +52,9 @@ const training = {
state.trainingSwitch = flag;
state.stepInfo = {};
state.operateOrder = 0;
if (flag) {
state.stepRecord = [];
}
},
setTrainingOperate: (state, trainingOperate) => {
state.trainingOperate = trainingOperate;
@ -125,6 +128,9 @@ const training = {
if (type === 'OVER') {
step.success = true;
}
},
setJoinTrainingInfo: (state, joinTrainingInfo) => {
state.joinTrainingInfo = joinTrainingInfo;
}
},
actions: {
@ -200,7 +206,7 @@ const training = {
},
handleMatchVoice: ({ commit }, info) => {
const stepOperation = Handler.getTrainingOperation();
if (info && info.content === 'true') {
if (info && info.content === 'true' && store.state.training.myMemberId == info.memberId) {
const rightMsg = {errMsg: LangStorage.getLang() === 'en' ? "Correct operation! That's great!" : '操作正确!真棒!', color: 'green'};
commit('setOperateErrMsg', rightMsg);
if (Handler.isLastOperation()) {
@ -225,6 +231,9 @@ const training = {
},
handleStepRecord: ({ commit }, { type, stepOperation }) => {
commit('handleStepRecord', { type, stepOperation });
},
setJoinTrainingInfo: ({ commit }, joinTrainingInfo ) => {
commit('setJoinTrainingInfo', joinTrainingInfo);
}
}
};

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

View File

@ -52,6 +52,11 @@ export function handlerUrl() {
BASE_API = 'http://160.20.60.15:9000';
BASE_SITE = 'http://160.20.60.15';
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') {
// 远程发布分支
BASE_API = 'https://joylink.club/jlcloud';

View File

@ -213,6 +213,16 @@ function handle(data) {
case 'Simulation_Control_Transfer_Result':
store.dispatch('socket/setControlTransfer', msg);
break;
case 'Simulation_Training_Prepare_Start': // 仿真预加载
store.dispatch('trainingNew/setJoinTrainingInfo', msg);
break;
case 'Simulation_Training_Status': // 仿真实训开始结束状态
if (msg == 1) {
store.dispatch('trainingNew/trainingStart');
} else {
store.dispatch('trainingNew/trainingEnd');
}
break;
}
}
// 仿真内部聊天

View File

@ -2,6 +2,7 @@
<div class="joylink-card">
<div class="scriptHeader">
<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" @click="createByPublish">发布数据创建</el-button>
</div>
@ -142,7 +143,7 @@ export default {
//
handleModify(index, row) {
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) {
@ -184,6 +185,9 @@ export default {
},
createByPublish() {
this.$refs.copyIbp.doShow(null);
},
goBack() {
this.$router.go(-1);
}
}
};

View File

@ -14,6 +14,7 @@
:value="item.value"
/>
</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>
</div>
<el-tabs v-model="enabledTab" class="ibpEdit" type="card" @tab-click="handleTabClick">
@ -140,6 +141,9 @@ export default {
deleteDataModel(model) {
this.$store.dispatch('ibp/deleteIbpDevices', model);
},
goBack() {
this.$router.go(-1);
},
async handleSave() {
if (this.$store.state.ibp.ibp.background) {
try {

View File

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

View File

@ -283,6 +283,7 @@ export default {
},
onMouseDown(em) {
if (['SquareButton', 'Key'].includes(em.deviceType)) {
setTimeout(() => {
const operate = {
start: true,
send: true,
@ -295,10 +296,12 @@ export default {
};
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); });
}, 500);
}
},
onMouseUp(em) {
if (['SquareButton'].includes(em.deviceType)) {
setTimeout(() => {
const operate = {
start: true,
send: true,
@ -311,6 +314,7 @@ export default {
};
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); });
}, 500);
}
},
//

View File

@ -138,7 +138,7 @@ export default {
return this.$route.query.projectDevice;
},
projectCode() {
return this.$store.state.projectConfig.projectCode;
return this.$store.state.projectConfig.markKey;
}
},
watch: {
@ -250,7 +250,7 @@ export default {
},
judgeOtherPage(params) {
// itemMap: {DEFAULT_MEMBER: '1'}type: "METRO"
getBackProjectConfigByCode(this.projectCode).then(res=>{
getBackProjectConfigByCode(this.$store.state.projectConfig.projectCode).then(res=>{
if (res.data) {
const {mapId, functionId} = res.data;
if (functionId && mapId) {
@ -354,7 +354,7 @@ export default {
const model = Object.assign({}, this.loginForm);
model.password = md5(model.password);
model.type = 'class';
model.project = this.projectCode;
model.project = this.$store.state.projectConfig.projectCode;
if (this.$route.query.projectDevice) {
model.deviceCode = this.$route.query.projectDevice;
}

View File

@ -111,7 +111,7 @@ export default {
submitAnswer(postData).then(resp => {
this.$set(this.questionStateList[1], this.currentQuestionIndex, true);
this.$store.dispatch('trainingNew/trainingEnd');
// this.$store.dispatch('trainingNew/trainingEnd');
}).catch(() => {
this.$message.error('记录数据失败!');
});

View File

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

View File

@ -207,7 +207,8 @@ export default {
const environmentDispatherList = [];
const parentDepartmentList = [];
const schedulingList = [];
const t = this.simType == 'METRO' ? 'STATION_SUPERVISOR-' : 'STATION_SUPERVISOR-';
const ss = this.simType == 'METRO' ? 'STATION_SUPERVISOR-' : 'STATION_SUPERVISOR-';
const sew = this.simType == 'RAILWAY' ? 'STATION_ELECTRIC_WORKER' : 'STATION_ELECTRIC_WORKER';
val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) {
@ -236,7 +237,7 @@ export default {
signalBuildingList.push(this.memberData[item.id]);
break;
case 'STATION_SUPERVISOR':
this.memberData[item.id].labelName = 'STATION_SUPERVISOR-' + device.name + (item.name ? `-${item.name }` : '');
this.memberData[item.id].labelName = ss + '-' + device.name + (item.name ? `-${item.name }` : '');
stationSupervisorList.push(this.memberData[item.id]);
break;
case 'DRIVER':
@ -304,7 +305,7 @@ export default {
schedulingList.push(this.memberData[item.id]);
break;
case 'STATION_ELECTRIC_WORKER':
this.memberData[item.id].labelName = 'STATION_ELECTRIC_WORKER' + (item.name || '');
this.memberData[item.id].labelName = sew + '-' + device.name + (item.name ? `-${item.name }` : '');
stationElectricWorkerList.push(this.memberData[item.id]);
break;
}

View File

@ -26,7 +26,7 @@
</div>
</div>
<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="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" />
@ -97,8 +97,11 @@ export default {
sendTextId() {
return OperationEvent.Conversation.Chat.menu.domId;
},
chatBoxMin() {
return this.$store.state.training.chatBoxMin;
},
recordVoice() {
return OperationEvent.Conversation.Chat.record.domId;
return this.chatBoxMin ? '' : OperationEvent.Conversation.Chat.record.domId;
},
sideButtonDom() {
return OperationEvent.Conversation.Chat.sideButton;
@ -194,7 +197,7 @@ export default {
return name;
},
sendText() {
if ((!this.id && !this.privateChatId) || !this.textContent) { return; }
if ((!this.id && !this.privateChatId) || this.contentSend) { return; }
const operate = {
over: true,
cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat,

View File

@ -17,8 +17,8 @@
</div>
<div class="dialogBody">
<div class="leftBox">
<div class="leftLogo">
<img :src="logoImgUrl" :alt="logoImgUrl">
<div class="leftLogo" :title="loginProtitle">
<img :src="logoImgUrl" alt="">
</div>
<div v-for="(item, index) in tabs" :key="index" class="tab pointer" :class="{active: index === tabActive}" @click="tabsClick(index)">
<i :class="item.icon" />
@ -34,7 +34,7 @@
</div>
<div class="nullDiv" />
<div class="editFilter" :class="myMemberId ? 'pointer' : 'disable'">
<i class="el-icon-plus" title="创建会话群" @click="createGroup" />
<i :id="createGroupDomId" class="el-icon-plus" title="创建会话群" @click="createGroup" />
<!-- <i class="el-icon-more" /> -->
</div>
</div>
@ -63,7 +63,7 @@
<address-book ref="addressBook" :member-tree-data="memberTreeData" @sendPrivateMsg="sendPrivateMsg" />
</div>
</div>
<edit-group ref="editGroup" :member-tree-data="memberTreeData" />
<edit-group ref="editGroup" :member-tree-data="memberTreeData" @handleEditGroup="handleEditGroup" />
<pop-menu ref="popMenu" :menu="menu" />
<dialog-member ref="dialogMember" :member-tree-data="memberTreeData" @updateLeaderId="updateLeaderId" />
</el-dialog>
@ -79,6 +79,7 @@ import AddressBook from './addressBook';
import PopMenu from '@/components/PopMenu';
import DialogMember from './dialogMember';
import { objectIsEqual } from '@/utils/date';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ChatDialog',
components: {
@ -95,6 +96,7 @@ export default {
return {
logoImgUrl: '',
dialogVisible: false,
showEditGroup: false,
tabs: [
{label:'消息', icon:'el-icon-chat-dot-square'},
{label:'通讯录', icon:'el-icon-notebook-1'}
@ -115,10 +117,13 @@ export default {
};
},
computed: {
...mapGetters('projectConfig', ['loginProLogo']),
...mapGetters('projectConfig', ['loginProLogo', 'loginProtitle']),
groupId() {
return this.$route.query.group;
},
createGroupDomId() {
return this.showEditGroup ? '' : OperationEvent.Conversation.Chat.createGroup.domId;
},
myMemberId() {
return this.$store.state.training.myMemberId;
},
@ -275,6 +280,9 @@ export default {
this.handleClose();
},
methods: {
handleEditGroup(val) {
this.showEditGroup = val;
},
showMenu(event, item) {
this.groupClick(item);
this.initMenu(item);
@ -514,7 +522,7 @@ export default {
}
});
if (this.groupList && this.groupList[0] && !this.id && !this.privateChatId) {
this.id = this.groupList[0].id;
this.groupClick(this.groupList[0]);
}
});
},
@ -554,7 +562,9 @@ export default {
} else {
this.privateChatId = this.getPrivateChatId(item);
}
if (this.getBadge(item.messageList)) {
this.setReadGroup();
}
},
getPrivateChatId(item) {
let pId = '';

View File

@ -59,7 +59,7 @@
</el-form-item> -->
<el-form-item v-if="showSubmitBtn">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="onSubmit">确定</el-button>
<el-button :id="submitDomId" type="primary" @click="onSubmit">确定</el-button>
</el-form-item>
</el-form>
</div>
@ -69,8 +69,11 @@
</template>
<script>
import { createGroup, inviteMemberToGroup } from '@/api/newChat';
import { inviteMemberToGroup } from '@/api/newChat';
import { getUploadUrl } from '@/api/projectConfig';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {UserOperationType} from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'EditGroup',
components: {
@ -118,6 +121,15 @@ export default {
groupId() {
return this.$route.query.group;
},
submitDomId() {
let domId = '';
if (this.title == '邀请成员') {
domId = OperationEvent.Conversation.Chat.inviteToGroup.domId;
} else if (this.title == '创建会话群') {
domId = OperationEvent.Conversation.Chat.createGroup.domId;
}
return this.dialogVisible ? domId : '';
},
memberData() {
return this.$store.state.training.memberData;
},
@ -155,6 +167,12 @@ export default {
this.treeDisabled = true;
this.nameDisabled = true;
}
},
dialogVisible() {
this.$emit('handleEditGroup', this.dialogVisible);
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
}
},
mounted() {
@ -231,21 +249,27 @@ export default {
}).catch(err => {
this.$message.error(`邀请成员失败!${err.message}`);
});
} else if (this.title == '创建会话群') {
const list = [];
this.selectTreeNode.forEach(item => {
list.push(item.id);
});
const params = {
const operate = {
over: true,
cmdType: CMD.Conversation.CMD_Conversation_Group_Create,
operation: OperationEvent.Conversation.Chat.createGroup.operation,
userOperationType: UserOperationType.LEFTCLICK,
param: {
name: this.form.name,
imageUrl: this.form.imageUrl,
memberIds: list
}
};
createGroup(this.groupId, params).then(res => {
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.initData();
this.handleClose();
this.$message.success('创建会话群成功!');
}
}).catch(err => {
this.$message.error(`创建会话群失败!${err.message}`);
});

View File

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

View File

@ -24,9 +24,10 @@
<span v-else>{{ scope.row.projectName }}</span>
</template>
</el-table-column>
<el-table-column prop="requestDate" :label="'Month Day Hour'" width="80">
<el-table-column prop="requestDate" :label="'Month Day Hour'" width="160">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" @blur="requestDateChange(scope.row.requestDate)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" @blur="requestDateChange(scope.row.requestDate)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="constructionFill.requestDate.domId" v-model="scope.row.requestDate" format="M-d HH:mm" value-format="M月d日 HH:mm" class="dateClass" :clearable="false" type="datetime" @change="requestDateChange(scope.row.requestDate)" />
<span v-else>{{ scope.row.requestDate }}</span>
</template>
</el-table-column>
@ -36,9 +37,10 @@
<span v-else>{{ scope.row.requestDetails }}</span>
</template>
</el-table-column>
<el-table-column prop="planSpendTime" :label="'Month Day Hour'" width="80">
<el-table-column prop="planSpendTime" :label="'Month Day Hour'" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" @blur="planSpendTimeChange(scope.row.planSpendTime)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" @blur="planSpendTimeChange(scope.row.planSpendTime)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="constructionFill.planSpendTime.domId" v-model="scope.row.planSpendTime" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="planSpendTimeChange(scope.row.planSpendTime)" />
<span v-else>{{ scope.row.planSpendTime }}</span>
</template>
</el-table-column>
@ -52,9 +54,10 @@
</el-table-column>
</el-table-column>
<el-table-column label="After the construction of the opening inspection confirmation, cancel the record">
<el-table-column prop="confirmReviewDate" :label="'Month Day Hour'" width="80">
<el-table-column prop="confirmReviewDate" :label="'Month Day Hour'" width="160">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" @blur="confirmReviewDateChange(scope.row.confirmReviewDate)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" @blur="confirmReviewDateChange(scope.row.confirmReviewDate)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="constructionFill.confirmReviewDate.domId" v-model="scope.row.confirmReviewDate" format="M-d HH:mm" value-format="M月d日 HH:mm" class="dateClass" :clearable="false" type="datetime" @change="confirmReviewDateChange(scope.row.confirmReviewDate)" />
<span v-else>{{ scope.row.confirmReviewDate }}</span>
</template>
</el-table-column>
@ -256,7 +259,7 @@ export default {
</script>
<style lang="scss" scoped>
.equipmentConstructionTable{
width:91%;margin-left:15px
width: 100%;
}
.el-table .cell {
white-space: pre-line;
@ -265,4 +268,14 @@ export default {
margin-right: 20px;
margin-bottom: 10px;
}
.dateClass {
width: 139px;
}
.timeClass {
width: 79px;
}
/deep/ .el-input--suffix .el-input__inner {
padding-right: 10px;
padding-left: 28px;
}
</style>

View File

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

View File

@ -14,15 +14,17 @@
<template slot="empty">
<el-empty description="No data available" />
</template>
<el-table-column prop="date" label="Day of the month" width="95">
<el-table-column prop="date" label="Day of the month" width="120">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" @blur="moonDayChange(scope.row.moonDay)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" @blur="moonDayChange(scope.row.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.moonDay.domId" v-model="scope.row.moonDay" format="M-d" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="moonDayChange(scope.row.moonDay)" />
<span v-else>{{ scope.row.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="time" label="Hour" width="95">
<el-table-column prop="time" label="Hour" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" @blur="hourMinuteChange(scope.row.hourMinute)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" @blur="hourMinuteChange(scope.row.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.hourMinute.domId" v-model="scope.row.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="hourMinuteChange(scope.row.hourMinute)" />
<span v-else>{{ scope.row.hourMinute }}</span>
</template>
</el-table-column>
@ -33,15 +35,17 @@
</template>
</el-table-column>
<el-table-column label="Time of notification">
<el-table-column prop="noticeDate" label="Day of the month" width="100">
<el-table-column prop="noticeDate" label="Day of the month" width="120">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" @blur="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" @blur="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeMoonDay.domId" v-model="scope.row.noticeTime.moonDay" format="M-d" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="noticeTimeMoonDayChange(scope.row.noticeTime.moonDay)" />
<span v-else>{{ scope.row.noticeTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeTime" label="Hour" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" @blur="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" @blur="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.noticeTimeHourMinute.domId" v-model="scope.row.noticeTime.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="noticeTimeHourMinuteChange(scope.row.noticeTime.hourMinute)" />
<span v-else>{{ scope.row.noticeTime.hourMinute }}</span>
</template>
</el-table-column>
@ -53,15 +57,17 @@
</el-table-column>
</el-table-column>
<el-table-column label="Time of arrival">
<el-table-column prop="arriveDate" label="Day of the month" width="100">
<el-table-column prop="arriveDate" label="Day of the month" width="120">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" @blur="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" @blur="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeMoonDay.domId" v-model="scope.row.arriveTime.moonDay" format="M-d" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="arriveTimeMoonDayChange(scope.row.arriveTime.moonDay)" />
<span v-else>{{ scope.row.arriveTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveTime" label="Hour" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" @blur="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" @blur="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.arriveTimeHourMinute.domId" v-model="scope.row.arriveTime.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="arriveTimeHourMinuteChange(scope.row.arriveTime.hourMinute)" />
<span v-else>{{ scope.row.arriveTime.hourMinute }}</span>
</template>
</el-table-column>
@ -73,15 +79,17 @@
</el-table-column>
</el-table-column>
<el-table-column label="When the defect or damage was removed and stamped">
<el-table-column prop="repairDate" label="Day of the month" width="100">
<el-table-column prop="repairDate" label="Day of the month" width="120">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" @blur="endTimeMoonDayChange(scope.row.endTime.moonDay)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" @blur="endTimeMoonDayChange(scope.row.endTime.moonDay)" /> -->
<el-date-picker v-if="dataIndex === scope.$index" :id="registerInput.endTimeMoonDay.domId" v-model="scope.row.endTime.moonDay" format="M-d" value-format="M月d日" class="dateClass" :clearable="false" type="date" @change="endTimeMoonDayChange(scope.row.endTime.moonDay)" />
<span v-else>{{ scope.row.endTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="repairTime" label="Hour" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" @blur="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" />
<!-- <el-input v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" @blur="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" /> -->
<el-time-picker v-if="dataIndex === scope.$index" :id="registerInput.endTimeHourMinute.domId" v-model="scope.row.endTime.hourMinute" :picker-options="{format:'HH:mm'}" format="HH:mm" value-format="HH:mm" class="timeClass" :clearable="false" @change="endTimeHourMinuteChange(scope.row.endTime.hourMinute)" />
<span v-else>{{ scope.row.endTime.hourMinute }}</span>
</template>
</el-table-column>
@ -307,6 +315,15 @@ export default {
};
</script>
<style scoped>
<style lang="scss" scoped>
.dateClass {
width: 99px;
}
.timeClass {
width: 79px;
}
/deep/ .el-input--suffix .el-input__inner {
padding-right: 10px;
padding-left: 28px;
}
</style>

View File

@ -19,7 +19,7 @@
<template v-for="terminal in terminalList">
<div :key="terminal.id" class="terminal-button">
<div class="terminal-button-name" :class="{ active: terminal.id === nowTerminal.id }" @click="changePictureShow(terminal)">{{ terminal.name }}</div>
<div v-if="!trainingDesign" class="terminal-button-text" @click="openNewWindow(terminal)">Open in new window</div>
<div v-if="!trainingDesign && !thirdLogin" class="terminal-button-text" @click="openNewWindow(terminal)">Open in new window</div>
</div>
</template>
</div>
@ -53,6 +53,9 @@ export default {
},
trainingDesign() {
return this.$store.state.training.domConfig && this.$store.state.training.domConfig.trainingDesign;
},
thirdLogin() {
return this.$store.state.user.thirdLogin;
}
},
watch: {
@ -158,7 +161,6 @@ export default {
findTerminalFromMapById(id) {
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
console.log(mapClientList, id, this.$route.query.simType, mapClientMap);
return mapClientList.find(item => item.id === id);
},
findTerminalFromMap(type) {

View File

@ -351,6 +351,7 @@ export default {
list.push(obj);
});
await updateTrainingStep(this.group, this.editData.id, { step2VOList: list, playerIdList: this.playerIdList });
this.getStepList(this.editData);
this.$message.success('保存实训成功!');
} catch {
this.$message.error('保存实训失败');

View File

@ -263,9 +263,9 @@ export default {
this.$message.error('Please finish the current training before loading the new training!');
return;
}
const qObj = {...this.$route.query};
delete qObj.record;
this.$router.replace({ query:{...qObj}});
// const qObj = {...this.$route.query};
// delete qObj.record;
// this.$router.replace({ query:{...qObj}});
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); //
try {
const detailResp = await getTrainingAll(data.id);
@ -274,14 +274,6 @@ export default {
const mapLocation = JSON.parse(detailResp.data.mapLocationJson);
this.$jlmap && this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});
}
if (detailResp.data.playerIdJson) {
const playerId = JSON.parse(detailResp.data.playerIdJson)[0];
if (playerId) {
const member = this.$store.state.training.memberData[playerId];
this.$store.dispatch('training/setPrdType', this.prdTypeMap[member.type]);
this.$store.dispatch('training/setRoles', member.type);
}
}
this.$emit('closeAllDialog');
this.$store.dispatch('trainingNew/setTrainingDetail', detailResp.data);
await loadDraftTraining(this.group, data.id, {mode: this.teachMode});

View File

@ -1,6 +1,8 @@
<template>
<div>
<div style="text-align: right;padding-right: 10px;">
<el-button v-if="showJumpToTraining" size="small" type="text" @click="jumpToTraining">仿真到当前步骤</el-button>
<el-divider v-if="showJumpToTraining" direction="vertical" />
<el-button size="small" type="text" @click="clearOperation">清空</el-button>
<el-divider direction="vertical" />
<el-button size="small" type="text" @click="backDesignPane">返回</el-button>
@ -36,6 +38,7 @@
<script>
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { jumpToTraining} from '@/api/trainingManage';
export default {
name: 'EditOperateNew',
data() {
@ -48,6 +51,18 @@ export default {
stepIndex: ''
};
},
computed: {
showJumpToTraining() {
let s = false;
if (this.stepDetail.id) {
s = true;
}
return s;
},
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.trainingNew.trainingOperate': function (val) {
if (val && this.editMode) {
@ -97,6 +112,15 @@ export default {
this.$store.dispatch('trainingNew/editDraftStepList', null);
},
methods: {
jumpToTraining() {
if (this.group && this.stepDetail.id) {
jumpToTraining(this.group, this.stepDetail.id).then(res => {
console.log(res, '跳转成功!');
}).catch(err => {
this.$message.error(`跳转失败!${err.message}`);
});
}
},
initData(data) {
this.editMode = true;
this.stepIndex = data.index;

View File

@ -8,7 +8,7 @@
center
>
<template v-for="user in userList">
<div :key="user.id" style="display: flex;justify-content: space-between;">
<div :key="user.id" style="display: flex;justify-content: space-between;margin-bottom: 10px;">
<div>{{ user.nickName }}</div>
<el-select v-model="user.memberId" size="mini" placeholder="Please select">
<el-option

View File

@ -4,9 +4,9 @@
<div ref="drapBox" class="reminder-box">
<div class="tip-title">
<div style="display: flex;justify-content: center;align-items: center;">
<i v-if="!trainingDesign && !examSwitch" class="icon el-icon-document" @click="trainingListShow" />
<i v-show="!isShrink && !trainingSwitch && trainingDetail" class="icon el-icon-video-play" @click="handlerStart" />
<i v-show="!isShrink && trainingSwitch" class="icon el-icon-switch-button" @click="handlerEnd" />
<i v-if="!trainingDesign && !examSwitch && simulationCreator" class="icon el-icon-document" @click="trainingListShow" />
<i v-show="!isShrink && !trainingSwitch && trainingDetail && simulationCreator" class="icon el-icon-video-play" @click="handlerStart" />
<i v-show="!isShrink && trainingSwitch && simulationCreator" class="icon el-icon-switch-button" @click="handlerEnd" />
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
</div>
@ -26,7 +26,7 @@
<p v-if="!examSwitch" class="list-item">
<span class="list-label">Mode of practical training</span>
<span class="list-elem">
<el-radio-group v-model="demoMode" :disabled="trainingSwitch" class="mode" size="small" @change="changeMode">
<el-radio-group v-model="demoMode" :disabled="trainingSwitch || !simulationCreator" class="mode" size="small" @change="changeMode">
<el-radio :label="TrainingMode.TEACH" border>{{ $t('display.lesson.teachingMode') }}</el-radio>
<el-radio :label="TrainingMode.PRACTICE" border>{{ $t('display.lesson.practiceMode') }}</el-radio>
<el-radio :label="TrainingMode.TEST" border>{{ $t('display.lesson.testMode') }}</el-radio>
@ -37,18 +37,18 @@
<span class="list-label" style="vertical-align: top;"> {{ $t('display.training.trainingInstructions') }}</span>
<span class="list-elem elem-span">{{ trainingDetail ?trainingDetail.description:'' }}</span>
</p>
<p class="list-item">
<span class="list-label">Operation buttons</span>
<p v-if="simulationCreator" class="list-item">
<span class="list-label">Operation buttons:</span>
<span class="list-elem">
<el-button v-if="!trainingSwitch && trainingDetail" size="small" type="success" @click="handlerStart">Start</el-button>
<el-button v-if="trainingSwitch" size="small" type="danger" @click="handlerEnd">Over</el-button>
</span>
</p>
<p v-if="!examSwitch" class="list-item">
<p v-if="!examSwitch && simulationCreator" class="list-item">
<span class="list-label">Previous question:</span>
<span class="list-elem elem-span training-box" @click="loadTraining(previousTraining)">{{ previousTraining? previousTraining.name: '' }}</span>
</p>
<p v-if="!examSwitch" class="list-item">
<p v-if="!examSwitch && simulationCreator" class="list-item">
<span class="list-label">Next question:</span>
<span class="list-elem elem-span training-box" @click="loadTraining(nextTraining)">{{ nextTraining? nextTraining.name:'' }}</span>
</p>
@ -68,7 +68,7 @@
<script>
import { ScriptMode } from '@/scripts/ConstDic';
import { startTraining, endTraining, getPublishTrainingDetail, loadPublishTraining } from '@/api/jmap/training';
import { startTraining, endTraining, getPublishTrainingDetail, loadPublishTraining, prepareScene } from '@/api/jmap/training';
import ScenePlayRole from './scenePlayRole';
import TestResult from './testResult';
import { EventBus } from '@/scripts/event-bus';
@ -116,11 +116,25 @@ export default {
},
examSwitch() {
return this.$store.state.trainingNew.examSwitch;
},
simulationCreator() {
return this.$store.state.training.simulationCreator;
}
},
watch: {
'$store.state.trainingNew.trainingDetail': function(val) {
this.initAdjacentTraining();
},
'$store.state.trainingNew.joinTrainingInfo': function(val) {
if (!this.simulationCreator && val && val.id) {
this.loadTraining({ id: val.id });
this.changeMode(val.mode);
}
},
'$store.state.trainingNew.trainingSwitch': function(val) {
if (!val && !this.simulationCreator) {
this.handlerEnd();
}
}
},
mounted() {
@ -159,15 +173,22 @@ export default {
handlerStart() {
Handler.clear();
if (this.trainingDetail.type === 'SCENE' && !this.examSwitch) {
this.$refs.scenePlayRole.doShow();
this.handlePrepareScene();
} else {
this.startTraining();
}
},
handlePrepareScene() {
prepareScene(this.group, {mode: this.demoMode}).then(() => {
this.$refs.scenePlayRole.doShow();
}).catch(() => {
this.$message.error('预开始场景实训失败!');
});
},
startTraining() {
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
startTraining(this.group, {mode: this.demoMode}).then(() => {
this.$store.dispatch('trainingNew/trainingStart');
// this.$store.dispatch('trainingNew/trainingStart');
}).catch(() => {
this.$message.error('The beginning of practical training failed!');
});
@ -185,7 +206,7 @@ export default {
if (this.demoMode === ScriptMode.TEST) {
this.$refs.testResult.doShow(resp.data);
}
this.$store.dispatch('trainingNew/trainingEnd');
// this.$store.dispatch('trainingNew/trainingEnd');
}).catch((e) => {
this.$message.error('Failed to complete the training!');
});

View File

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

View File

@ -21,6 +21,9 @@ export default {
},
myMemberId() {
return this.$store.state.training.myMemberId;
},
simulationCreator() {
return this.$store.state.training.simulationCreator;
}
},
watch: {
@ -33,12 +36,17 @@ export default {
},
'$store.state.trainingNew.trainingSwitch': function(val) {
if (!val) {
if (!this.simulationCreator) {
this.trainingTipMessage = '当前实训已结束!';
setTimeout(() => { this.trainingTipMessage = ''; }, 3000);
} else {
this.trainingTipMessage = '';
}
}
},
'$store.state.socket.trainingOverCount': function(val) {
if (this.teachMode === ScriptMode.TEACH || this.teachMode === ScriptMode.PRACTICE) {
this.trainingTipMessage = 'After the training, please click the end button.';
if ((this.teachMode === ScriptMode.TEACH || this.teachMode === ScriptMode.PRACTICE) && this.simulationCreator) {
this.trainingTipMessage = '实训完成,请点击结束按钮。';
}
},
'$store.state.trainingNew.operateErrMsg': function (val) {

View File

@ -41,6 +41,7 @@ export default {
'arrowList',
'automaticRouteButtonList',
'axleCounterResetButtonList',
'powerUnLockButtonList',
'cycleButtonList',
'directionRodList',
'espList',
@ -67,7 +68,7 @@ export default {
]),
deviceList () {
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.signalButtonList, ...this.splitStationList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList,
...this.zcList];

View File

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

View File

@ -190,7 +190,7 @@ export default {
const type = device._type;
if (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';
} else if (controlLampTypeList.includes(type)) {
this.enabledTab = 'ControlLamp';

View File

@ -126,7 +126,7 @@
</el-form>
</el-collapse-item>
<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>
</div>
@ -402,7 +402,9 @@ export default {
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 => {
map[itemName] && map[itemName].forEach(item => {
const flag = this.fromModel.right ? item.position.x > pointX : item.position.x < pointX;
@ -429,22 +431,22 @@ export default {
this.$emit('updateMapModel', models);
},
calculateSectionLength() {
const precisionOf = num => num.toString().split('.').pop().length
const precisionOf = num => num.toString().split('.').pop().length;
this.$confirm('确认设置所有区段的实际长度吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
this.sectionList.forEach(section => {
const { kmMin, kmMax } = section
const { kmMin, kmMax } = section;
if (typeof kmMin === 'number' && typeof kmMax === 'number') {
const precision = Math.max(precisionOf(kmMin), precisionOf(kmMax))
section.lengthFact = Number((kmMax - kmMin).toFixed(precision))
const precision = Math.max(precisionOf(kmMin), precisionOf(kmMax));
section.lengthFact = Number((kmMax - kmMin).toFixed(precision));
}
})
this.$emit('updateMapModel', this.sectionList)
this.$message.success('区段长度设置成功!')
})
});
this.$emit('updateMapModel', this.sectionList);
this.$message.success('区段长度设置成功!');
});
}
}
};

View File

@ -16,7 +16,7 @@
</el-col>
<el-col :span="5" :offset="1">
<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-col>
<el-col :span="5" :offset="1">
@ -48,7 +48,7 @@
</el-col>
<el-col :span="5" :offset="1">
<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-col>
<el-col :span="5" :offset="1">
@ -83,7 +83,7 @@
</el-col>
<el-col :span="5" :offset="1">
<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-col>
<el-col :span="5" :offset="1">
@ -111,7 +111,7 @@
</el-form-item>
<el-form-item label="成员类型:" prop="type">
<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-form-item>
<el-form-item label="关联设备:" prop="deviceCode">
@ -160,7 +160,7 @@
</el-form-item>
</el-col>
<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-form-item>
</el-col>
@ -239,8 +239,8 @@
<el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
</el-form-item>
</el-col>
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
<el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER">
<el-col v-if="batchForm.systemType === 'METRO' || batchForm.systemType === 'RAILWAY'" :span="12">
<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-form-item>
</el-col>
@ -320,13 +320,13 @@
</div>
</el-col>
<el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberMetroList)">
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, 'METRO')" :value="elem.id" />
</el-select>
</el-col>
<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-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-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, 'METRO')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -356,13 +356,13 @@
</div>
</el-col>
<el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberRailwayList)">
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, 'RAILWAY')" :value="elem.id" />
</el-select>
</el-col>
<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-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-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, 'RAILWAY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -392,13 +392,13 @@
</div>
</el-col>
<el-col :span="5">
<el-select v-model="item.leaderId" placeholder="请选择" size="mini" :title="getMemberTitle(item.leaderId, memberEmergencyList)">
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, 'EMERGENCY')" :value="elem.id" />
</el-select>
</el-col>
<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-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-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, 'EMERGENCY')" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -426,18 +426,18 @@
</div>
</el-form-item>
<el-form-item label="群主:" prop="leaderId">
<el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList)">
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<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, conversationForm.systemType)" :value="elem.id" />
</el-select>
</el-form-item>
<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-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-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, conversationForm.systemType)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" />
</el-select>
</el-form-item>
<el-form-item>
<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>
</div>
@ -505,7 +505,7 @@ export default {
},
disStationList: [],
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: {
systemType: 'METRO',
id: '',
@ -564,10 +564,27 @@ export default {
this.initDisStationList();
},
methods: {
resetConversationForm() {
this.$refs.conversationForm.resetFields();
getRoleList(type) {
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 = {};
list.forEach(item => {
mapList[item.id] = item;
@ -581,7 +598,7 @@ export default {
}
valArr.forEach(id => {
if (mapList[id]) {
titleArr.push(this.getLabel(mapList[id]));
titleArr.push(this.getLabel(mapList[id], type));
}
});
return titleArr.join('\n');
@ -589,9 +606,9 @@ export default {
getImgUrl(url) {
return url ? this.$store.state.user.ossUrl + '/conversationGroup/' + url : '';
},
getLabel(obj) {
getLabel(obj, type) {
let name = '';
const findType = this.roleList.find(item => {
const findType = this.getRoleList(type).find(item => {
return item.value == obj.type;
});
if (findType) {
@ -819,7 +836,7 @@ export default {
};
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 = {
id: this.getMemberId(this.batchForm.systemType),
name: '',
@ -1118,6 +1135,14 @@ export default {
deviceCode: station.code
};
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 = {

View File

@ -14,6 +14,7 @@ import { launchFullscreen } from '@/utils/screen';
import editTraining from './editTraining';
import { superAdmin, admin } from '@/router/index';
import { getAllPublishTrainingList, getManageTrainingListInOrg, publishTrainingPutOn, publishTrainingPutOff, publishTrainingDelete } from '@/api/jmap/training';
import { exportTrainingData, importTrainingData } from '@/api/trainingManage';
export default {
name:'TrainingManage',
components: {
@ -56,7 +57,9 @@ export default {
},
queryList:{
query: this.queryFunction,
selectCheckShow: false,
selectCheckShow: this.hasTeachingDataManage(),
selectCheckClass: 'hiddenCheckBtn',
onSelectionChange: this.onSelectionChange,
// paginationHiden: true,
indexShow: true,
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: {
@ -164,6 +172,54 @@ export default {
});
},
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() {
this.queryList.reload();
},
@ -270,3 +326,8 @@ export default {
}
};
</script>
<style>
.hiddenCheckBtn {
display: none;
}
</style>

View File

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

View File

@ -22,7 +22,7 @@
</el-select>
</el-form-item>
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formIbp.roleCode" placeholder="请选择" size="small" @change="changeRoleIBP">
<el-select v-model="formIbp.roleCode" placeholder="请选择" size="small">
<el-option
v-for="item in roleList"
:key="item.value"
@ -35,16 +35,16 @@
<el-select v-model="formIbp.client" placeholder="请选择" size="small">
<el-option
v-for="item in clientList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-form>
<el-form v-show="['IM','CW','DRIVE','DEPOT'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formIm.roleCode" placeholder="请选择" size="small" @change="changeRoleIM">
<el-select v-model="formIm.roleCode" placeholder="请选择" size="small">
<el-option
v-for="item in roleList"
:key="item.value"
@ -57,9 +57,9 @@
<el-select v-model="formIm.client" placeholder="请选择" size="small">
<el-option
v-for="item in clientList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
@ -76,7 +76,7 @@
</el-select>
</el-form-item>
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formLw.roleCode" placeholder="请选择" size="small" @change="changeRoleLW">
<el-select v-model="formLw.roleCode" placeholder="请选择" size="small">
<el-option
v-for="item in roleList"
:key="item.value"
@ -89,9 +89,9 @@
<el-select v-model="formLw.client" placeholder="请选择" size="small">
<el-option
v-for="item in clientList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
@ -128,7 +128,7 @@
</el-select>
</el-form-item>
<el-form-item label="关联角色:" prop="roleCode">
<el-select v-model="formIscs.roleCode" placeholder="请选择" size="small" @change="changeRoleIscs">
<el-select v-model="formIscs.roleCode" placeholder="请选择" size="small">
<el-option
v-for="item in roleList"
:key="item.value"
@ -141,9 +141,9 @@
<el-select v-model="formIscs.client" placeholder="请选择" size="small">
<el-option
v-for="item in clientList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
@ -157,17 +157,15 @@
<script>
import { getDeviceDetail, getDevicesByType, setDeviceConfig } from '@/api/project';
import { getAllMapOnline, querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
import { getClientDataById, querySimulationMemberByMapId, querySimulationStationsByMapId } from '@/api/jmap/map';
import { getBackProjectConfigByCode } from '@/api/projectConfig';
import { getMapFunctioById } from '@/api/trainingPlatform';
import ConstConfig from '@/scripts/ConstConfig';
export default {
name: 'EditConfig',
data() {
return {
dialogVisible: false,
data: {},
clientListMap:{},
roleList:[],
lwList: [],
formIm:{
@ -300,7 +298,9 @@ export default {
this.dialogVisible = true;
this.roleList = [];
if (data.functionId) {
if (data.mapId) { this.mapIdChange(data.mapId, data.functionId); }
if (data.mapId) {
this.mapIdChange(data.mapId, data.functionId);
}
} else {
this.$message.error('请先配置项目信息');
}
@ -387,7 +387,6 @@ export default {
},
mapIdChange(mapId, functionId) {
if (mapId) {
// const stationResp = await querySimulationStationsByMapId(this.$route.query.mapId);
querySimulationStationsByMapId(mapId).then(resp => {
if (resp.data && resp.data.length) {
this.stationList = resp.data;
@ -395,54 +394,29 @@ export default {
}).catch(() => {
this.$message.error('获取车站列表失败');
});
getMapFunctioById(functionId).then(functionResp => {
const simType = functionResp.data.simType;
querySimulationMemberByMapId(mapId).then(resp => {
if (resp.data) {
getMapFunctioById(functionId).then(response=>{
if (resp.data) {
const roleList = resp.data[response.data.simType];
const clientListMapIn = ConstConfig.ConstSelect.clientMap;
this.clientListMap = clientListMapIn[response.data.simType];
const roleList = resp.data[simType];
const covertRoleList = [];
roleList.forEach(member => {
const data = this.handleMember(member, this.stationList);
covertRoleList.push(data);
});
this.clientList = [];
this.roleList = covertRoleList;
const roleCode = this.formIbp.roleCode || this.formIm.roleCode || this.formLw.roleCode || this.formIscs.roleCode;
const role = this.roleList.find(each=>{ return each.value == roleCode; });
if (role) { this.clientList = this.clientListMap[role.memberType] || []; }
}
});
}
}).catch(() => {
this.$message.error('获取角色列表失败');
});
getClientDataById(mapId).then(resp => {
this.clientList = resp.data[simType];
}).catch(() => {
this.$message.error('获取客户端列表失败');
});
}).catch(() => { this.$message.error('获取线路功能数据失败!'); });
} else {
this.stationList = [];
}
},
changeRoleIBP(role) {
this.formIbp.client = '';
this.changeRole(role);
},
changeRoleIM(role) {
this.formIm.client = '';
this.changeRole(role);
},
changeRoleLW(role) {
this.formLw.client = '';
this.changeRole(role);
},
changeRoleIscs(role) {
this.formIscs.client = '';
this.changeRole(role);
},
changeRole(role) {
const roleMember = this.roleList.find(each=>{ return each.value == role; });
this.clientList = this.clientListMap[roleMember.memberType] || [];
},
handleMember(member, stationList) {
const data = { value: member.id, label: '', memberType: member.type };
const device = stationList.find(station => station.code === member.deviceCode) || {};

View File

@ -11,8 +11,7 @@
<script>
import { getDevicesByType, getDeviceDetail, setDeviceConfig } from '@/api/project';
// getStationListNeedAttendant
import { getAllMapOnline, getPublishMapListOnline, querySimulationStationsByMapId, getPsdListByStandCode, getStandListByStationCode, querySimulationMemberByMapId} from '@/api/jmap/map';
import ConstConfig from '@/scripts/ConstConfig';
import { querySimulationStationsByMapId, getPsdListByStandCode, getStandListByStationCode, querySimulationMemberByMapId, getClientDataById} from '@/api/jmap/map';
import { getBackProjectConfigByCode } from '@/api/projectConfig';
import { getMapFunctioById } from '@/api/trainingPlatform';
export default {
@ -70,8 +69,7 @@ export default {
stationList: [],
standList: [],
psdList: [],
roleList:[],
clientListMap:{}
roleList:[]
};
},
computed: {
@ -97,8 +95,8 @@ export default {
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList, optionLabel: 'name', optionValue: 'code', deviceChange: this.stationCodeChange},
{ prop: 'standCode', label: '关联站台:', type: 'select', options: this.standList, optionLabel: 'name', optionValue: 'code', deviceChange: this.standCodeChange},
{ prop: 'psdCode', label: '关联屏蔽门:', type: 'select', options: this.psdList, optionLabel: 'code', optionValue: 'code' },
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value', deviceChange:this.roleChange },
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
]
};
} else if (this.data.type === 'LSW') {
@ -107,7 +105,7 @@ export default {
items: [
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
{ prop: 'quadrant', label: '屏幕配置:', type: 'select', options: this.screenList, optionLabel: 'label', optionValue: 'value'},
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value', deviceChange:this.roleChange },
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
]
};
@ -116,7 +114,7 @@ export default {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value', deviceChange:this.roleChange },
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
]
};
@ -125,7 +123,7 @@ export default {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value', deviceChange:this.roleChange },
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
]
};
@ -134,7 +132,7 @@ export default {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value', deviceChange:this.roleChange },
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
]
};
@ -194,40 +192,54 @@ export default {
if (resp.data && resp.data.length) {
this.stationList = resp.data;
}
const self = this;
getMapFunctioById(functionId).then(functionResp => {
const simType = functionResp.data.simType;
querySimulationMemberByMapId(mapId).then(resp => {
if (resp.data) {
getMapFunctioById(functionId).then(response=>{
if (resp.data) {
const roleList = resp.data[response.data.simType];
const clientListMapIn = ConstConfig.ConstSelect.clientMap;
this.clientListMap = clientListMapIn[response.data.simType];
const roleList = resp.data[simType];
const covertRoleList = [];
roleList.forEach(member => {
const data = self.handleMember(member, self.stationList);
const data = this.handleMember(member, this.stationList);
covertRoleList.push(data);
});
this.clientList = [];
self.roleList = covertRoleList;
const roleCode = this.formData.roleCode;
const role = this.roleList.find(each=>{ return each.value == roleCode; });
if (role) { this.clientList = this.clientListMap[role.memberType] || []; }
}
});
}
this.roleList = covertRoleList;
}).catch(() => {
this.$message.error('获取角色列表失败');
});
getClientDataById(mapId).then(resp => {
this.clientList = resp.data[simType];
}).catch(() => {
this.$message.error('获取客户端列表失败');
});
}).catch(() => { this.$message.error('获取线路功能数据失败!'); });
// const self = this;
// querySimulationMemberByMapId(mapId).then(resp => {
// if (resp.data) {
// getMapFunctioById(functionId).then(response=>{
// if (resp.data) {
// const roleList = resp.data[response.data.simType];
// const clientListMapIn = ConstConfig.ConstSelect.clientMap;
// this.clientListMap = clientListMapIn[response.data.simType];
// const covertRoleList = [];
// roleList.forEach(member => {
// const data = self.handleMember(member, self.stationList);
// covertRoleList.push(data);
// });
// this.clientList = [];
// self.roleList = covertRoleList;
// const roleCode = this.formData.roleCode;
// const role = this.roleList.find(each=>{ return each.value == roleCode; });
// if (role) { this.clientList = this.clientListMap[role.memberType] || []; }
// }
// });
// }
// }).catch(() => {
// this.$message.error('');
// });
}).catch(() => {
this.$message.error('获取车站列表失败');
});
}
},
roleChange(role) {
this.formData.client = '';
const roleMember = this.roleList.find(each=>{ return each.value == role; });
if (roleMember) { this.clientList = this.clientListMap[roleMember.memberType] || []; }
},
handleMember(member, stationList) {
const data = { value: member.id, label: '', memberType: member.type };
const device = stationList.find(station => station.code === member.deviceCode) || {};

View File

@ -262,7 +262,7 @@ export default {
group: data.group,
mapId: data.map.id,
simType: data.paramVO.type,
project: this.$route.query.project || 'login'
project: this.project
};
if (data.paramVO && data.paramVO.domConfig && data.paramVO.domConfig.client) {
query.client = data.paramVO.domConfig.client;