This commit is contained in:
zyy 2021-05-19 18:14:44 +08:00
commit fbb9365b62
12 changed files with 324 additions and 13 deletions

View File

@ -52,6 +52,26 @@ class Theme {
'14': 'nanjing_02', // 南京二号线
'15': 'datie_01'
};
this._runplan = {
'00': 'aus_00',
'01': 'chengdu_01',
'02': 'fuzhou_01',
'03': 'beijing_01',
'04': 'chengdu_03',
'05': 'fuzhou_01', // 国际版运行图皮肤 指向05 福州线路
'06': 'ningbo_01',
'07': 'haerbin_01', // 哈尔滨培训线路
'08': 'foshan_01',
'09': 'xian_02',
'10': 'xian_01',
'11': 'xian_03',
'12': 'ningbo_03',
'13': 'race_01',
'14': 'nanjing_02', // 南京二号线
'15': 'datie_01'
};
this._localShowMode = { // 现地显示模式
'01': 'all', // 成都一 全显
'02': 'all', // 福州一 全显
@ -78,7 +98,7 @@ class Theme {
// 新版本
loadPlanParser(code) {
return PlanParser.load(require(`./${this._mapMenu[code || this._code]}/planConfig`).default);
return PlanParser.load(require(`./${this._runplan[code || this._code]}/planConfig`).default);
}
// 共有字段转换

View File

@ -0,0 +1,116 @@
<template>
<el-dialog
class="haerbin-01__systerm"
:modal="false"
:title="title"
:visible.sync="show"
:fullscreen="true"
:before-close="doClose"
:z-index="2000"
>
<div class="trainOverView">
<div class="trainViewList">
<div v-for="(eachTrainView,index) in trainViewList" :key="index" class="eachTrainView">
<div class="eachTrainViewIn">
<!-- <div class="eachTrainViewInL" /> -->
<div class="eachTrainViewInRhom" />
<!-- <div class="eachTrainViewInR" /> -->
<!-- -->
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
name:'Tra',
data() {
return {
dialogShow: false,
trainViewList:[]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '列车总览';
}
},
watch:{
'$store.state.map.activeTrainListChange': function (val) {
if (val) {
debugger;
this.activeTrainList = this.$store.state.map.activeTrainList;
}
}
},
methods:{
doShow() {
this.dialogShow = true;
this.$nextTick(function () {
debugger;
this.trainViewList = this.$store.state.map.activeTrainList;
});
},
doClose() {
// this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style scoped>
/deep/ .el-dialog {
background: rgba(100, 100, 100, 1) !important;
position: relative;
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
font-size: 14px;
display: flex;
flex-direction: column;
}
/deep/ .el-dialog .el-dialog__body{
background: rgba(100, 100, 100, 1) !important;
border: 0 !important;
height: 100%;
flex: 1;
}
.trainOverView{
width: 100%;
height: 100%;
background: #000;
display: inline-block;
}
.trainViewList{
width: 1226px;
border-left: 1px #f0f0f0 solid;
border-top: 1px #f0f0f0 solid;
margin-top: 30px;
margin-left: auto;
margin-right: auto;
}
.eachTrainView{
width: 245px;
display: inline-block;
padding: 10px 10px;
border-bottom: 1px #f0f0f0 solid;
border-right: 1px #f0f0f0 solid;
}
.eachTrainViewIn{
height: 60px;
border-bottom: 1px #484848 solid;
}
/* .eachTrainViewInL{}
.eachTrainViewInR{} */
.eachTrainViewInRhow{
width: 224px;
height: 60px;
border: 1px #dedede solid;
transform: skew(20deg, 0deg);
transform-origin: bottom center;
}
</style>

View File

@ -95,7 +95,7 @@
<div class="div-simulate-button" style="width: 40px;">车场</div>
<div class="div-simulate-button" style="width: 40px;" @click="troClick">轨道</div>
<div class="div-simulate-button" style="width: 40px;">系统</div>
<div class="div-simulate-button" style="width: 40px;">列车</div>
<div class="div-simulate-button" style="width: 40px;" @click="traClick">列车</div>
</div>
<div>
<div class="div-simulate-button" style="width: 40px;">联锁</div>
@ -171,6 +171,7 @@
<train-control ref="trainControl" :offset="10" />
<log-detail ref="logDetail" />
<rps-dialog ref="rpsDialog" />
<tra-dialog ref="traDialog" />
<tro-dialog ref="troDialog" @goTroDetail="goTroDetail" />
<tro-detail-dialog ref="troDetailDialog" :station-list="stationList" @goTroDialog="troClick" />
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
@ -189,6 +190,8 @@ import AlarmTableHmi from './menuDialog/alarmTableHmi';
import AlarmTableLow from './menuDialog/alarmTableLow';
import TrainControl from './dialog/trainControl';
import RpsDialog from './dialog/rps';
import TraDialog from './dialog/tra';
import TroDialog from './dialog/tro';
import TroDetailDialog from './dialog/troDetail';
import LogDetail from './menuDialog/logDetail';
@ -202,6 +205,7 @@ export default {
LogDetail,
RpsDialog,
TroDialog,
TraDialog,
TroDetailDialog
},
props: {
@ -492,6 +496,9 @@ export default {
troClick() {
this.$refs.troDialog.doShow();
},
traClick() {
this.$refs.traDialog.doShow();
},
goTroDetail(deviceCode) {
this.$refs.troDetailDialog.doShow(deviceCode);
},

View File

@ -0,0 +1,104 @@
import { convertSheetToList, prefixTime } from '../parser/util';
export default {
/** 运行图解析方式*/
type: 'Ratio',
/** 边缘高度*/
edge: 600,
/** 间隔高度*/
multiple: 1,
/** 偏移时间*/
translation: 60 * 60 * 2,
/** excel解析配置*/
excelConfig: {
beginRow: 1,
beginCol: 0,
fieldNum: 6,
sepField: '车次号',
columns: {
'停车站名称': { key: 'stationName', formatter: (val) => { return val; } },
'停车轨名称':{key: 'trackName', formatter: (val) => { return val; }},
'到达时间': { key: 'arriveTime', formatter: (val) => { return val; } },
'出发时间': { key: 'departureTime', formatter: (val) => { return val; } }
}
},
/** 解析excel数据转换为Json后台数据*/
importData(Sheet, JsonData) {
const dataList = convertSheetToList(Sheet, true);
const needList = Object.keys(this.excelConfig.columns);
if (dataList && dataList.length) {
for (let colIndex = this.excelConfig.beginCol; colIndex < dataList.length; colIndex += this.excelConfig.fieldNum + 1) {
let isContinue = true;
let tripObj = { code: '', directionCode: '', arrivalList: [] };
for (let rowIndex = this.excelConfig.beginRow; isContinue; rowIndex += 1) {
isContinue = false;
const stationObj = {};
for (let index = 0; index < this.excelConfig.fieldNum; index += 1) {
if (dataList[colIndex + index]) {
const title = dataList[colIndex + index][0];
const value = dataList[colIndex + index][rowIndex];
if (title && value) {
// 数据列解析
isContinue = true;
const titleStr = `${title}`.trim();
let valueStr = `${value}`.trim();
if (titleStr == this.excelConfig.sepField) {
valueStr = `${dataList[colIndex + index - 1][rowIndex]}${valueStr}`;
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length == 1) {
tripObj.arrivalList[0]['flag'] = true;
}
if (valueStr != tripObj.code) {
JsonData.push(tripObj);
const strVal = `${value}`.trim();
tripObj = { code: valueStr, directionCode: strVal[0], arrivalList: [] };
}
} else {
const strVal = `${value}`.trim();
tripObj.code = valueStr;
tripObj.directionCode = strVal[0];
}
}
// 取需要的字段
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr);
if (this.excelConfig.columns[titleStr].key == 'arriveTime' || this.excelConfig.columns[titleStr].key == 'departureTime') {
stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(prefixTime(valueStr));
}
}
}
}
}
// 添加字段值
if (Object.keys(stationObj).length) {
if (stationObj.trackName || stationObj.arriveTime) {
tripObj.arrivalList.push(stationObj);
}
}
}
// 添加最后那条没有车次的记录
if (tripObj.code) {
const length = tripObj.arrivalList.length;
if (length) {
tripObj.arrivalList[length - 1]['flag'] = true;
}
JsonData.push(tripObj);
}
}
}
return JsonData;
}
};

View File

@ -167,10 +167,6 @@ const training = {
state.timeInterval = setInterval(() => {
state.usedTime++;
}, 1000);
} else {
state.timeInterval = setInterval(() => {
state.initTime += 1000;
}, 1000);
}
},
stopCountTime: (state) => {
@ -241,6 +237,7 @@ const training = {
user.online = item.online;
user.memberId = item.memberId;
user.role = item.role;
user.type = item.type;
user.deviceCode = item.deviceCode;
memberIndex = index;
}

View File

@ -143,7 +143,7 @@ export default {
if (!resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
// this.$store.dispatch('training/countTime');
this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {
this.$store.commit('training/start');

View File

@ -205,7 +205,7 @@ export default {
if (!resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
// this.$store.dispatch('training/countTime');
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {

View File

@ -2,6 +2,14 @@
<div>
<div class="schema" :style="{top: offset+'px'}">
<select-station v-if="isLocalStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
<el-select v-if="isAdmin" v-model="speed" style="width: 100px;" size="small" @change="speedChange">
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<template v-if="!dataError">
<el-button-group v-if="project !== 'bjd'">
<el-button v-if="isLocalStation && $route.query.lineCode!='08'" size="small" @click="goIbp">IBP盘</el-button>
@ -43,6 +51,7 @@ import { getToken } from '@/utils/auth';
import { getIbpInfoByStation } from '@/api/ibp';
import { loadRunPlanData } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus';
import { timesSpeedPlayback } from '@/api/rtSimulation';
//
export default {
@ -74,7 +83,20 @@ export default {
viewDisabled: true,
swch: '02',
isScriptCommand:false,
faultMode: false
faultMode: false,
speedList:[
{ value: 1, label: '1倍速' },
{ value: 2, label: '2倍速' },
{ value: 3, label: '3倍速' },
{ value: 4, label: '4倍速' },
{ value: 5, label: '5倍速' },
{ value: 6, label: '6倍速' },
{ value: 7, label: '7倍速' },
{ value: 8, label: '8倍速' },
{ value: 9, label: '9倍速' },
{ value: 10, label: '10倍速' }
],
speed: 1
// firstLoad: true
};
},
@ -108,6 +130,9 @@ export default {
},
isContest() {
return this.project === 'drts';
},
isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
}
},
watch: {
@ -125,6 +150,9 @@ export default {
},
'$store.state.runPlan.loadRunPlanCount': function () {
this.viewDisabled = false;
},
'$store.state.socket.simulationSpeed': function (val) {
this.speed = val;
}
},
mounted() {
@ -166,6 +194,13 @@ export default {
// }
// this.$store.dispatch('training/changeOperateMode', { mode: mode });
// },
speedChange(val) {
timesSpeedPlayback(this.$route.query.group, val).then(resp => {
this.$message.success(`设置${val}倍速成功!`);
}).catch(e => {
this.$message.error('设置倍速失败!');
});
},
setFault() {
this.$refs.faultChoose.doShow();
},

View File

@ -289,7 +289,7 @@ export default {
if (!resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime');
// this.$store.dispatch('training/countTime');
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {

View File

@ -314,7 +314,7 @@ export default {
if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);//
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));// 仿
this.$store.dispatch('training/countTime');// 仿
// this.$store.dispatch('training/countTime');// 仿
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
if (resp.data.planRunning) {
this.$store.dispatch('training/start');// 仿

View File

@ -162,7 +162,7 @@ export default {
depotDispatcherList.push(this.memberData[item.id]);
break;
case 'STATION_SUPERVISOR':
this.memberData[item.id].labelName = '值班员-' + (item.name || device.name);
this.memberData[item.id].labelName = '值班员-' + device.name + (item.name ? `-${item.name }` : '');
stationSupervisorList.push(this.memberData[item.id]);
break;
case 'DRIVER':

View File

@ -4,6 +4,14 @@
<!--<el-select v-if="showSelectStation" v-model="chiShowStation" style="width: 100px;" size="small" @change="switchStationMode">-->
<!--<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />-->
<!--</el-select>-->
<el-select v-if="isAdmin && isSystemAdmin" v-model="speed" style="width: 100px;" size="small" @change="speedChange">
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-button-group>
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice && $route.query.lineCode!='08'" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice && hasBigScreen" size="small" @click="goBigScreen">大屏</el-button>
@ -33,6 +41,7 @@ import SelectIbp from '@/views/newMap/displayNew/demon/selectIbp';
import { getIbpInfoByStation } from '@/api/ibp';
import { loadRunPlanData } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus';
import { timesSpeedPlayback } from '@/api/rtSimulation';
import { queryHasIscs } from '@/api/iscs';
export default {
name: 'MenuDemonSchema',
@ -98,7 +107,20 @@ export default {
faultMode: false,
directiveMode: false,
firstLoad: true,
iscsShow:false
iscsShow:false,
speedList:[
{ value: 1, label: '1倍速' },
{ value: 2, label: '2倍速' },
{ value: 3, label: '3倍速' },
{ value: 4, label: '4倍速' },
{ value: 5, label: '5倍速' },
{ value: 6, label: '6倍速' },
{ value: 7, label: '7倍速' },
{ value: 8, label: '8倍速' },
{ value: 9, label: '9倍速' },
{ value: 10, label: '10倍速' }
],
speed: 1
};
},
computed: {
@ -122,6 +144,9 @@ export default {
},
hasBigScreen() {
return this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length;
},
isSystemAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
}
},
watch: {
@ -255,6 +280,13 @@ export default {
});
window.open(routeData.href, '_blank');
},
speedChange(val) {
timesSpeedPlayback(this.$route.query.group, val).then(resp => {
this.$message.success(`设置${val}倍速成功!`);
}).catch(e => {
this.$message.error('设置倍速失败!');
});
},
// ibp
goIbp() {
// this.$refs.selectIbp.doShow();