Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1

This commit is contained in:
fan 2023-02-10 09:42:11 +08:00
commit 4323ed274e
19 changed files with 355 additions and 58 deletions

View File

@ -56,13 +56,13 @@ class ESwLocal extends Group {
this.locShelter.setStyle(data);
}
addHover(style) {
this.__zr && this.__zr.addHover(this.locShelter, style)
}
addHover(style) {
this.__zr && this.__zr.addHover(this.locShelter, style);
}
removeHover() {
this.__zr && this.__zr.removeHover(this.locShelter);
}
removeHover() {
this.__zr && this.__zr.removeHover(this.locShelter);
}
animateStyle(cb) {
this.eachChild((child) => {

View File

@ -0,0 +1,44 @@
<template>
<div class="menus">
<menu-train ref="menuTrain" :selected="selected" :work="'driverAtsWork'" />
</div>
</template>
<script>
import MenuTrain from './menuTrain';
export default {
name: 'DriverAtsWorkMenuBar',
components: {
MenuTrain
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
};
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
},
methods: {
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
</style>

View File

@ -0,0 +1,103 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="fuzhou-01__systerm" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'MenuTrain',
components: {
PopMenu,
SetFault
},
props: {
selected: {
type: Object,
default() {
return null;
}
},
work: {
type: String,
default() {
return '';
}
}
},
data() {
return {
menu:[],
menuNormal: [
{
label: '换端',
handler: this.handleTurnDirection
},
{
label: '驾驶',
handler: this.handleDriveTo
},
{
label: '回库',
handler: this.setInbound
}
]
};
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initMenu() {
//
this.menu = [...this.menuNormal];
},
//
handleTurnDirection() {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
setInbound() {
commitOperate(menuOperate.Driver.inbound, { groupNumber: this.selected.code }, 3).then(({valid, operate}) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, 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();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
}
}
};
</script>

View File

@ -114,6 +114,10 @@ class Theme {
loadLocalWorkMenuComponent(code) {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default);
}
// 加载司机ats工作站菜单组件
loadDriverAtsWorkMenuComponent(code) {
return Object.assign({}, require(`./components/menus/driverAtsWorMenu`).default);
}
loadCtcWorkMenuComponent(code) {
if (code == '16') {
return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/ctcWorkMenu`).default);

View File

@ -62,6 +62,7 @@ export default {
{ label: '通号', value: 'MAINTAINER', enLabel: 'Repairman ' },
{ label: '车辆段/停车场调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher ' },
{ label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher' },
{ label: '电力工务', value: 'STATION_ELECTRIC_WORKER', enLabel: 'Station Electric dispatcher' },
{ label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher ' },
{ label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department' },
{ label: '车辆段/停车场信号楼', value: 'SIGNAL_BUILDING', enLabel: 'Signal Building' },

View File

@ -276,6 +276,7 @@ export default {
if (valid) {
sendCommandNew(this.group, 'KEY_LINK_CONTROL_INFO_SAVE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('提交成功!');
this.initFormData();
}).catch(error => {
this.$messageBox('提交失败:' + error.message);

View File

@ -45,7 +45,7 @@ export default {
},
boxHeight() {
const allH = this.$store.state.app.height;
let h = allH - 103 - 39 - 30 - 41 - 15;
let h = allH - 63 - 39 - 30 - 41 - 15 - 20;
h = h > 0 ? h : 0;
return h;
}

View File

@ -0,0 +1,65 @@
<template>
<div>
<component :is="menus" :selected="selected" />
<station-diagram ref="stationDiagram" @setSelected="setSelected" />
</div>
</template>
<script>
import StationDiagram from '../stationDiagram/index';
// import {mapGetters} from 'vuex';
import { clearSubscribe, getTopic} from '@/utils/stomp';
export default {
name: 'DriverAtsWork',
components: {
StationDiagram
},
data() {
return {
menus: null,
selected: null
};
},
computed: {
mapData() {
return this.$store.state.map.map;
},
group() {
return this.$route.query.group;
},
mapDevice() {
return this.$store.state.map.mapDevice;
}
},
watch: {
//
'$store.state.map.mapDataLoadedCount': function () {
const lineCode = this.$jlmap.lineCode;
if (lineCode) {
this.menus = this.$theme.loadDriverAtsWorkMenuComponent(lineCode);
}
},
'$store.state.map.initJlmapLoadedCount': function (val) {
this.handleDispatchWorkData();
}
},
beforeDestroy() {
clearSubscribe(getTopic('ATS_STATUS', this.group));
},
methods: {
setSelected(val) {
this.selected = val;
},
handleDispatchWorkData() {
const logicData = {routeData:this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData};
const repaint = this.$store.state.map.initJlmapLoadedCount === 1;
const width = this.$store.state.app.width;
const height = this.$store.state.app.height;
this.$store.dispatch('config/resize', { width, height });
this.$jlmap.resize({ width, height });
this.$nextTick(()=>{
this.$jlmap.setMap(this.mapData, this.mapDevice, logicData, repaint);
});
}
}
};
</script>

View File

@ -6,6 +6,7 @@
<el-table
:data="tableData"
style="width:100%"
:height="tableHeight"
>
<el-table-column label="请求施工(慢行及封锁)登记">
<el-table-column prop="no" label="本月施工编号" width="120">
@ -87,7 +88,7 @@
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { sendCommandNew } from '@/api/jmap/training';
export default {
name:'EquipmentConstructionTable',
data() {
@ -99,11 +100,20 @@ export default {
};
},
computed: {
group() {
return this.$route.query.group;
},
constructionFill() {
return OperationEvent.RailCommand.equipmentConstructionFill;
},
constructionFillIn() {
return OperationEvent.RailCommand.equipmentConstructionFill.menu;
},
tableHeight() {
const allH = this.$store.state.app.height;
let h = allH - 63 - 39 - 30 - 42;
h = h > 0 ? h : 0;
return h;
}
},
mounted() {
@ -111,12 +121,12 @@ export default {
},
methods:{
add() {
if (!this.isEditing) {
const operate = {
start: true,
operation: this.constructionFill.constructionInput.operation
};
this.$store.dispatch('trainingNew/next', operate).then(resp => {
const operate = {
start: true,
operation: this.constructionFill.constructionInput.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (!this.isEditing) {
const data = {
no: '', //
@ -134,16 +144,15 @@ export default {
this.tableData.push(data);
this.isEditing = true;
this.isAdd = true;
});
}
}
});
},
queryData() {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
commitOperate(menuOperate.Rail.equipmentConstructionQuery, params, 3).then(({valid, operate, response})=>{
this.tableData = response.data;
sendCommandNew(this.group, 'EQUIPMENT_CONSTRUCTION_INFO_QUERY', params).then((res) => {
this.tableData = res.data;
this.dataIndex = null;
}).catch(()=>{
}).catch(() => {
this.$message.error('查询行车设备施工登记簿失败!');
});
},
@ -220,12 +229,21 @@ export default {
saveData(data, index) {
// if (this.isAdd) {
const params = Object.assign({stationCode:this.$store.state.training.roleDeviceCode}, data);
commitOperate(menuOperate.Rail.equipmentConstructionFill, params, 3).then(({valid, operate})=>{
this.queryData();
this.isEditing = false;
this.isAdd = false;
}).catch(()=>{
this.$message.error('保存行车设备施工登记簿失败!');
const operate = {
operation: this.constructionFillIn.operation,
param: params
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'EQUIPMENT_CONSTRUCTION_INFO_SAVE', params).then((res) => {
this.$message.success('保存成功!');
this.queryData();
this.isEditing = false;
this.isAdd = false;
}).catch(() => {
this.$message.error('保存行车设备施工登记簿失败!');
});
}
});
// }
// }else{

View File

@ -274,6 +274,7 @@ export default {
if (valid) {
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_SAVE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('提交成功!');
this.initFormData();
}).catch(error => {
this.$messageBox('提交失败:' + error.message);
@ -291,6 +292,7 @@ export default {
if (valid) {
sendCommandNew(this.group, 'CONTROL_FLOOD_SIGN_UPDATE', obj).then((res) => {
console.log(res, '---res');
this.$message.success('更新成功!');
this.isEdit = false;
}).catch(error => {
this.$messageBox('更新失败:' + error.message);

View File

@ -45,7 +45,7 @@ export default {
},
boxHeight() {
const allH = this.$store.state.app.height;
let h = allH - 103 - 39 - 30 - 41 - 15;
let h = allH - 63 - 39 - 30 - 41 - 15 - 20;
h = h > 0 ? h : 0;
return h;
}

View File

@ -34,6 +34,8 @@
<interlock-work v-if="picture=='interlockWork'" ref="interlockWork" :centralized-station-map="centralizedStationMap" />
<test-runplan v-if="picture=='testRunplan'" ref="testRunplan" :plan-id="loadPlanId" @pictureChange="pictureChangeAndPlan" />
<driver-ats-work v-if="picture=='driverAtsWork'" ref="driverAtsWork" />
<!-- driverAtsWork -->
<terminal-menu
v-if="menuShow"
@ -82,6 +84,7 @@ import DisplayBaSiDi from './displayBaSiDi/index';
import TroWork from './troWork';
import TroDetailWork from './troDetailWork';
import TestRunplan from './testRunplan';
import DriverAtsWork from './driverAtsWork';
export default {
name: 'Index',
@ -117,7 +120,8 @@ export default {
DisplayBaSiDi,
TroDetailWork,
Jl3dMaintainerSelect,
TestRunplan
TestRunplan,
DriverAtsWork
},
data() {
return {

View File

@ -9,6 +9,7 @@
<el-table
:data="tableData"
style="width: 100%"
:height="tableHeight"
>
<el-table-column prop="date" label="月 日" width="95">
<template slot-scope="scope">
@ -109,13 +110,12 @@
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import FloodControlSafetyTable from './floodControlSafetyTable/index';
import EquipmentConstructionTable from './equipmentConstructionTable';
import AbnormalTrain from './abnormalTrain/index';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { sendCommandNew } from '@/api/jmap/training';
// key-link-control-table
export default {
name: 'Index',
@ -133,14 +133,24 @@ export default {
};
},
computed: {
group() {
return this.$route.query.group;
},
registerInput() {
return OperationEvent.TicketOrRegister.registerInput;
},
railFillInRegister() {
return OperationEvent.RailCommand.railFillInRegister.menu;
},
tableHeight() {
const allH = this.$store.state.app.height;
let h = allH - 63 - 39 - 30 - 42;
h = h > 0 ? h : 0;
return h;
}
},
mounted() {
this.$store.dispatch('training/emitTipFresh');
this.queryData();
},
methods: {
@ -158,7 +168,8 @@ export default {
this.queryData();
},
queryData() {
sendCommandNew(this.$route.query.group, CMD.RAIL.CMD_RAIL_QUERY_REGISTER.value, { stationCode: this.$store.state.training.roleDeviceCode}).then(response => {
const params = { stationCode: this.$store.state.training.roleDeviceCode};
sendCommandNew(this.group, 'RAIL_QUERY_REGISTER', params).then((response) => {
this.tableData = response.data ? response.data.lines : [];
this.dataIndex = null;
}).catch(() => {
@ -167,10 +178,19 @@ export default {
},
saveData(data) {
const params = { stationCode: this.$store.state.training.roleDeviceCode, line: data };
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
this.queryData();
}).catch(()=>{
this.$message.error('保存簿册失败!');
const operate = {
operation: this.railFillInRegister.operation,
param: params
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
sendCommandNew(this.group, 'RAIL_FILL_IN_REGISTER', params).then((res) => {
this.$message.success('保存成功!');
this.queryData();
}).catch(() => {
this.$message.error('保存簿册失败!');
});
}
});
},
add() {

View File

@ -96,6 +96,13 @@ export default {
isShow: () => this.$route.query.simType === 'METRO',
click: this.changePictureShow
},
{
name: '司机ATS工作站',
code: 'driverAtsWork',
roleList: ['DRIVER'],
isShow: () => this.$route.query.simType === 'METRO',
click: this.changePictureShow
},
{
name: '运行图预览',
code: 'diagramPreview',
@ -297,7 +304,7 @@ export default {
this.changePictureShow('maintainerSelect');
} else if (this.roles === 'DRIVER') {
//
this.changePictureShow('drivingPlan');
this.changePictureShow('driverAtsWork');
}
},
changePictureShow(code) {

View File

@ -52,19 +52,21 @@
<div style="width: 100px;margin-left: 40px;">更新时间</div>
<div>{{ bgSceneObj.systemTime || '' }}</div>
</div>
<el-divider content-position="center">实训定位</el-divider>
<el-button class="text-button-position" type="text" @click="updateMapLocation">定位</el-button>
<div style="display: flex;font-size: 14px;text-align: left;">
<div style="width: 100px;margin-left: 40px;">X坐标</div>
<div>{{ mapLocationObj.x || '' }}</div>
</div>
<div style="display: flex;font-size: 14px;text-align: left;margin-top: 10px;">
<div style="width: 100px;margin-left: 40px;">Y坐标</div>
<div>{{ mapLocationObj.y || '' }}</div>
</div>
<div style="display: flex;font-size: 14px;text-align: left;margin-top: 10px;">
<div style="width: 100px;margin-left: 40px;">缩放</div>
<div>{{ mapLocationObj.scale || '' }}</div>
<div v-if="!isScene">
<el-divider content-position="center">实训定位</el-divider>
<el-button class="text-button-position" type="text" @click="updateMapLocation">定位</el-button>
<div style="display: flex;font-size: 14px;text-align: left;">
<div style="width: 100px;margin-left: 40px;">X坐标</div>
<div>{{ mapLocationObj.x || '' }}</div>
</div>
<div style="display: flex;font-size: 14px;text-align: left;margin-top: 10px;">
<div style="width: 100px;margin-left: 40px;">Y坐标</div>
<div>{{ mapLocationObj.y || '' }}</div>
</div>
<div style="display: flex;font-size: 14px;text-align: left;margin-top: 10px;">
<div style="width: 100px;margin-left: 40px;">缩放</div>
<div>{{ mapLocationObj.scale || '' }}</div>
</div>
</div>
<el-divider content-position="center">实训步骤</el-divider>
<div class="text-button-position">
@ -157,6 +159,13 @@ export default {
},
trainingSwitch() {
return this.$store.state.trainingNew.trainingSwitch;
},
isScene() {
let s = false;
if (this.editData && this.editData.type == 'SCENE') {
s = true;
}
return s;
}
},
watch: {
@ -170,7 +179,7 @@ export default {
},
editData() {
this.mapLocationObj = {};
if (this.editData['mapLocationJson']) {
if (this.editData['mapLocationJson'] && !this.isScene) {
this.mapLocationObj = JSON.parse(this.editData['mapLocationJson']);
}
this.bgSceneObj = {};

View File

@ -39,7 +39,7 @@ export default {
this.scoringRuleList = this.$store.state.trainingNew.scoringRules.find(rule => rule.memberId == MyMemberId );
console.log(this.scoringRuleList, this.$store.state.trainingNew.scoringRules);
this.stepList = this.$store.state.trainingNew.stepList;
this.scoringRuleList.details.forEach(item => {
this.scoringRuleList && this.scoringRuleList.details.forEach(item => {
const desc = this.handleStepInfo(item.elementId);
const score = this.handleScore(item.elementId);
this.tableData.push({ desc: desc, score: score, totalScore: item.score });

View File

@ -1,12 +1,19 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" width="400px" :before-close="doClose">
<el-form ref="form111" :model="studentModel" :rules="rules" label-width="120px" size="mini">
<el-form-item label="学生姓名:" prop="name">
<el-form-item v-if="title === '新建学生'" label="类型:">
<el-radio v-model="isAccount" :label="true">学号</el-radio>
<el-radio v-model="isAccount" :label="false">手机号</el-radio>
</el-form-item>
<el-form-item v-if="isAccount" label="学生姓名:" prop="name">
<el-input v-model="studentModel.name" style="width: 220px;" />
</el-form-item>
<el-form-item label="学号:" prop="account">
<el-form-item v-if="isAccount" label="学号:" prop="account">
<el-input v-model="studentModel.account" style="width: 220px;" :disabled="title==='修改学生'" />
</el-form-item>
<el-form-item v-if="!isAccount" label="手机号:" prop="mobile">
<el-input v-model="studentModel.mobile" style="width: 220px;" :disabled="title==='修改学生'" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
@ -23,11 +30,13 @@ export default {
name: 'CreateClass',
data() {
return {
isAccount: true,
dialogShow: false,
loading: false,
studentModel: {
name: '',
account: ''
account: '',
mobile: ''
},
title: '新建学生'
};
@ -40,6 +49,9 @@ export default {
],
account: [
{ required: true, message: '请输入学生学号', trigger: 'blur' }
],
mobile: [
{ required: true, message: '请输入手机号', trigger: 'blur' }
]
};
return baseRules;
@ -52,6 +64,8 @@ export default {
if (row) {
this.studentModel.name = row.name;
this.studentModel.account = row.account;
this.studentModel.mobile = row.mobile || '';
this.isAccount = true;
this.title = '修改学生';
} else {
this.title = '新建学生';
@ -62,10 +76,15 @@ export default {
create() {
this.$refs.form111.validate((valid) => {
if (valid) {
const model = {
let model = {
account: this.studentModel.account,
name: this.studentModel.name
};
if (!this.isAccount) {
model = {
mobile: this.studentModel.mobile
};
}
createStudent( this.$route.query.classId, model).then(response => {
this.$emit('refresh');
this.doClose();