Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
1392503b9f
@ -103,7 +103,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.type == "Train_Hmi_3D"){
|
if(data.type == "Train_Hmi_3D"){
|
||||||
// console.log(data.body);
|
console.log(data.body);
|
||||||
updatestatus(data.body);
|
updatestatus(data.body);
|
||||||
|
|
||||||
// if(data.body.trust){
|
// if(data.body.trust){
|
||||||
|
@ -108,7 +108,6 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
|||||||
getPublishMapDetail(skinCode).then(data => {
|
getPublishMapDetail(skinCode).then(data => {
|
||||||
let mapnetdata = data.data;
|
let mapnetdata = data.data;
|
||||||
getPublish3dMapDetail(skinCode).then(netdata => {
|
getPublish3dMapDetail(skinCode).then(netdata => {
|
||||||
console.log(netdata);
|
|
||||||
let assetsdata = JSON.parse(netdata.data.sections);
|
let assetsdata = JSON.parse(netdata.data.sections);
|
||||||
if(assetsdata.link){
|
if(assetsdata.link){
|
||||||
scope.datatype = "old";
|
scope.datatype = "old";
|
||||||
|
@ -143,6 +143,13 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
.then(function(data){
|
.then(function(data){
|
||||||
|
camera.position.x = stationstandlist.group.children[0].position.x;
|
||||||
|
camera.position.y = stationstandlist.group.children[0].position.y+500;
|
||||||
|
camera.position.z = stationstandlist.group.children[0].position.z+800;
|
||||||
|
//更新相机方向
|
||||||
|
controls.target = new THREE.Vector3(stationstandlist.group.children[0].position.x,stationstandlist.group.children[0].position.y,stationstandlist.group.children[0].position.z);
|
||||||
|
controls.upmodeldirect(stationstandlist,trainlisttest);
|
||||||
|
controls.update();
|
||||||
|
|
||||||
backdata.loaderdata(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails);
|
backdata.loaderdata(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails);
|
||||||
scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload);
|
scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload);
|
||||||
|
@ -144,6 +144,7 @@ export default {
|
|||||||
width:80%;
|
width:80%;
|
||||||
height:30px;
|
height:30px;
|
||||||
margin:0px 0px 50px 0px;
|
margin:0px 0px 50px 0px;
|
||||||
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
.modelpic{
|
.modelpic{
|
||||||
left:0;
|
left:0;
|
||||||
|
@ -67,7 +67,7 @@ import EditTable from '@/views/components/editTable/index';
|
|||||||
|
|
||||||
// 排班计划弹窗列表
|
// 排班计划弹窗列表
|
||||||
export default {
|
export default {
|
||||||
name: 'AddQuest',
|
name: 'Scheduling',
|
||||||
components: {
|
components: {
|
||||||
EditTable
|
EditTable
|
||||||
},
|
},
|
||||||
|
302
src/views/newMap/displayNew/demon/schedulingView.vue
Normal file
302
src/views/newMap/displayNew/demon/schedulingView.vue
Normal file
@ -0,0 +1,302 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
top="50px"
|
||||||
|
width="95%"
|
||||||
|
:before-do-close="doClose"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:z-index="2000"
|
||||||
|
>
|
||||||
|
<div class="scheduling">
|
||||||
|
<el-card class="scheduling_header">
|
||||||
|
<el-form>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('display.schedule.scheduleSelect')">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formModel.planDate"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
@change="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item :label="$t('display.schedule.runDiagramName')">
|
||||||
|
<!--<el-select v-model="formModel.runPlanName" size="small" style="display: inline-block">-->
|
||||||
|
<!--<el-option-->
|
||||||
|
<!--v-for="item in runPlanList"-->
|
||||||
|
<!--:key="item.value"-->
|
||||||
|
<!--:label="item.label"-->
|
||||||
|
<!--:value="item.value"-->
|
||||||
|
<!--/>-->
|
||||||
|
<!--</el-select>-->
|
||||||
|
<el-input v-model="formModel.runPlanName" size="small" style="width:140px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<div class="scheduling_body">
|
||||||
|
<div class="scheduling_body-table">
|
||||||
|
<edit-table ref="table" v-loading="loading" border stripe :table-data="tableData" :table-form="tableForm" :row-style="handleRowStyle" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { querySechedulingNew } from '@/api/scheduling';
|
||||||
|
import { hexColor } from '@/utils/runPlan';
|
||||||
|
import EditTable from '@/views/components/editTable/index';
|
||||||
|
|
||||||
|
// 排班计划弹窗列表
|
||||||
|
export default {
|
||||||
|
name: 'AddQuest',
|
||||||
|
components: {
|
||||||
|
EditTable
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
group: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
loading: false,
|
||||||
|
runPlanList: [],
|
||||||
|
groupNumberList: [],
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() < Date.now() - 24 * 3600 * 1000;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formModel: {
|
||||||
|
id: '',
|
||||||
|
mode: '',
|
||||||
|
planDate: '',
|
||||||
|
runPlanName: ''
|
||||||
|
},
|
||||||
|
tableForm: {
|
||||||
|
index: true,
|
||||||
|
columns: [
|
||||||
|
// {
|
||||||
|
// title: this.$t('display.schedule.driverNumber'),
|
||||||
|
// prop: 'driverCode',
|
||||||
|
// type: 'text'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.trainNumber'),
|
||||||
|
prop: 'groupNumber',
|
||||||
|
type: 'select',
|
||||||
|
width: '150',
|
||||||
|
options: () => { return this.groupNumberList; },
|
||||||
|
editable: false,
|
||||||
|
editing: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.onlineSection'),
|
||||||
|
prop: 'outDepotTrip.outDepotSectionCode',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return this.handleDeviceName(row.outDepotTrip.outDepotSectionCode); }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.onlineServerNumber'),
|
||||||
|
prop: 'outDepotTrip.serviceNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.outDepotTrip.serviceNumber; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.onlineTargetNumber'),
|
||||||
|
prop: 'outDepotTrip.destinationCode',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.outDepotTrip.destinationCode; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.onlineTime'),
|
||||||
|
prop: 'outDepotTrip.outDepotTime',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.outDepotTrip.outDepotTime; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.onlineTripNumber'),
|
||||||
|
prop: 'outDepotTrip.tripNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.outDepotTrip.tripNumber; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.outDepot'),
|
||||||
|
prop: 'outDepotTrip.outDepotCode',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return this.handleDeviceName(row.outDepotTrip.outDepotCode); }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.outDepotStatus'),
|
||||||
|
prop: 'outDepotTrip.status',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$ConstSelect.translate(row.outDepotTrip.status, 'Whether'); },
|
||||||
|
tagType: (row) => {
|
||||||
|
switch (row.outDepotTrip.status) {
|
||||||
|
case true: return 'success';
|
||||||
|
case false: return 'danger';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.offlineSection'),
|
||||||
|
prop: 'offlineSection',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return this.handleDeviceName(row.inDepotTrip.inDepotSectionCode); }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.offlineServerNumber'),
|
||||||
|
prop: 'offlineServerNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.inDepotTrip.serviceNumber; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.offlineTargetNumber'),
|
||||||
|
prop: 'offlineTargetNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.inDepotTrip.destinationCode; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.offlineTime'),
|
||||||
|
prop: 'offlineTime',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.inDepotTrip.inDepotTime; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.offlineTripNumber'),
|
||||||
|
prop: 'offlineTripNumber',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return row.inDepotTrip.tripNumber; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.inDepot'),
|
||||||
|
prop: 'inDepot',
|
||||||
|
type: 'text',
|
||||||
|
format: (row) => { return this.handleDeviceName(row.inDepotTrip.inDepotCode); }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('display.schedule.inDepotStatus'),
|
||||||
|
prop: 'inStatus',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$ConstSelect.translate(row.inDepotTrip.status, 'Whether'); },
|
||||||
|
tagType: (row) => {
|
||||||
|
switch (row.inDepotTrip.status) {
|
||||||
|
case true: return 'success';
|
||||||
|
case false: return 'danger';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
tableData: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
return '派班计划预览';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$store.state.map.mapDataLoadedCount': function () {
|
||||||
|
const trainList = this.$store.state.map.map.trainList || [];
|
||||||
|
this.groupNumberList = [];
|
||||||
|
trainList.forEach(item => {
|
||||||
|
this.groupNumberList.push({value: item.code, label: item.groupNumber});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow() {
|
||||||
|
this.formModel.day = '';
|
||||||
|
this.show = true;
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.show = false;
|
||||||
|
},
|
||||||
|
handleQuery(day) {
|
||||||
|
if (day) {
|
||||||
|
this.loading = true;
|
||||||
|
querySechedulingNew(this.group, {day}).then(resp => {
|
||||||
|
this.tableData = [];
|
||||||
|
if (resp.data) {
|
||||||
|
this.tableData = this.initTableData(resp.data.planList || []);
|
||||||
|
this.formModel.id = resp.data.id;
|
||||||
|
this.formModel.planDate = resp.data.planDate;
|
||||||
|
this.formModel.runPlanName = resp.data.runPlanName;
|
||||||
|
this.$message.success(`${this.$t('display.schedule.loadData')} ${day} ${this.$t('display.schedule.schedulePlanSuccess')}`);
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${error.message}`);
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleRowStyle({row, rowIndex}) {
|
||||||
|
return row['$conflict'] ? {background: row.$conflict} : {background: '#FFF'};
|
||||||
|
},
|
||||||
|
setConflictList(list) {
|
||||||
|
this.tableData.forEach(elem => { elem['$conflict'] = null; });
|
||||||
|
if (list && list.length) {
|
||||||
|
list.forEach(idList => {
|
||||||
|
const color = hexColor.colorRandom();
|
||||||
|
this.tableData.forEach(elem => {
|
||||||
|
if (idList.includes(parseInt(elem.id))) {
|
||||||
|
elem['$conflict'] = color;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.tableData = [...this.tableData];
|
||||||
|
},
|
||||||
|
initTableData(tableData) {
|
||||||
|
tableData.forEach(elem => {
|
||||||
|
this.$set(elem, '$conflict', null);
|
||||||
|
});
|
||||||
|
|
||||||
|
return tableData;
|
||||||
|
},
|
||||||
|
handleDeviceName(code) {
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](code) || {};
|
||||||
|
return device.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped rel="stylesheet/scss" lang="scss">
|
||||||
|
.scheduling {
|
||||||
|
&_header {
|
||||||
|
background: #fff;
|
||||||
|
padding: 30px 30px 0;
|
||||||
|
}
|
||||||
|
&_body {
|
||||||
|
margin-top: 30px;
|
||||||
|
background: #ffff;
|
||||||
|
border: 1px solid #F1F1F1;
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-dialog__body {
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ label {
|
||||||
|
font-weight: 0;
|
||||||
|
}
|
||||||
|
</style>
|
@ -19,6 +19,7 @@
|
|||||||
@jl3dstation="jl3dstation"
|
@jl3dstation="jl3dstation"
|
||||||
@devicemodel="devicemodel"
|
@devicemodel="devicemodel"
|
||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
|
@schedulingView="schedulingView"
|
||||||
@switchStationMode="switchStationMode"
|
@switchStationMode="switchStationMode"
|
||||||
/>
|
/>
|
||||||
<menu-lesson
|
<menu-lesson
|
||||||
@ -89,6 +90,7 @@
|
|||||||
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
<Jl3d-Drive v-show="drivingShow" ref="Jl3dDrive" :panel-show="drivingShow" @showdriving="showdriving" />
|
||||||
|
|
||||||
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
|
<scheduling v-if="isShowScheduling" ref="scheduling" :group="group" />
|
||||||
|
<scheduling-view v-if="isShowScheduling" ref="schedulingView" :group="group" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -107,6 +109,7 @@ import MenuPractice from '@/views/newMap/displayNew/menuPractice';
|
|||||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||||
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
import Jl3dDevice from '@/views/jlmap3d/device/jl3ddevice';
|
||||||
import Scheduling from './demon/scheduling';
|
import Scheduling from './demon/scheduling';
|
||||||
|
import SchedulingView from './demon/schedulingView';
|
||||||
import { clearSimulation, getSimulationInfoNew, getSimulationMemberList } from '@/api/simulation';
|
import { clearSimulation, getSimulationInfoNew, getSimulationMemberList } from '@/api/simulation';
|
||||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@ -133,7 +136,8 @@ export default {
|
|||||||
// Jl3dSimulation,
|
// Jl3dSimulation,
|
||||||
Jl3dDrive,
|
Jl3dDrive,
|
||||||
Jl3dDevice,
|
Jl3dDevice,
|
||||||
Scheduling
|
Scheduling,
|
||||||
|
SchedulingView
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -491,6 +495,9 @@ export default {
|
|||||||
showScheduling() {
|
showScheduling() {
|
||||||
this.$refs.scheduling.doShow();
|
this.$refs.scheduling.doShow();
|
||||||
},
|
},
|
||||||
|
schedulingView() {
|
||||||
|
this.$refs.schedulingView.doShow();
|
||||||
|
},
|
||||||
showdriving() {
|
showdriving() {
|
||||||
this.panelShow = true;
|
this.panelShow = true;
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
<!-- cctv视图 -->
|
<!-- cctv视图 -->
|
||||||
<el-button v-if="!isShowScheduling" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
<el-button v-if="!isShowScheduling" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
|
||||||
<!-- 排班计划 -->
|
<!-- 排班计划 -->
|
||||||
<el-button v-if="isShowScheduling" type="primary" size="small" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
|
<el-button v-if="isShowScheduling && !runing" type="primary" size="small" @click="jumpScheduling">派班计划加载</el-button>
|
||||||
|
<el-button v-if="isShowScheduling && runing" type="primary" size="small" @click="schedulingView">派班计划预览</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
<div class="display-draft" :class="{'haerbin_btn_box': $route.query.lineCode == '07'}" :style="{bottom: offsetBottom + 'px'}">
|
||||||
@ -107,7 +108,8 @@ export default {
|
|||||||
isShow3dmodel :false,
|
isShow3dmodel :false,
|
||||||
isGoback: false,
|
isGoback: false,
|
||||||
hoverBtn: false,
|
hoverBtn: false,
|
||||||
btnWidth: 0
|
btnWidth: 0,
|
||||||
|
runing:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -153,6 +155,9 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.socket.simulationOver':function(val) {
|
'$store.state.socket.simulationOver':function(val) {
|
||||||
!this.isGoback && this.back();
|
!this.isGoback && this.back();
|
||||||
|
},
|
||||||
|
'$store.state.training.started': function (val) {
|
||||||
|
this.setRuning(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -247,6 +252,9 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
setRuning(run) {
|
||||||
|
this.runing = run;
|
||||||
|
},
|
||||||
end() {
|
end() {
|
||||||
this.isDisable = false;
|
this.isDisable = false;
|
||||||
exitRunPlan(this.group).then(() => {
|
exitRunPlan(this.group).then(() => {
|
||||||
@ -316,6 +324,9 @@ export default {
|
|||||||
jumpScheduling() {
|
jumpScheduling() {
|
||||||
this.$emit('showScheduling');
|
this.$emit('showScheduling');
|
||||||
},
|
},
|
||||||
|
schedulingView() {
|
||||||
|
this.$emit('schedulingView');
|
||||||
|
},
|
||||||
setTryTime() {
|
setTryTime() {
|
||||||
if (this.try) {
|
if (this.try) {
|
||||||
const data = { time: this.tryTime, goodsId: this.goodsId };
|
const data = { time: this.tryTime, goodsId: this.goodsId };
|
||||||
|
Loading…
Reference in New Issue
Block a user