This commit is contained in:
sunzhenyu 2020-08-13 16:51:01 +08:00
commit 41319d9543
12 changed files with 133 additions and 46 deletions

View File

@ -435,10 +435,10 @@ class Jlmap {
}
} else if (elem.deviceType === 'STATION') {
// 如果是控制权转移消息
if (elem.hasOwnProperty('applicantIdOfControlTransfer')) {
if (elem.hasOwnProperty('applicantId')) {
controlTransferList.push(elem);
}
if (!elem.applicantIdOfControlTransfer) {
if (!elem.applicantId) {
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
const guideLock = this.mapDevice[oDevice.guideLockCode];
const guideLockStatus = {totalGuideLock: elem.totalGuideLock};

View File

@ -186,12 +186,12 @@ export default {
},
doShow(controlTransferList) {
const controlTransfer = controlTransferList[0];
if (controlTransfer.applicantIdOfControlTransfer) {
const member = this.$store.state.training.memberData[controlTransfer.applicantIdOfControlTransfer];
if (controlTransfer.applicantId) {
const member = this.$store.state.training.memberData[controlTransfer.applicantId];
const simulationUserList = this.$store.state.training.simulationUserList;
if (member.type == 'DISPATCHER' && controlTransferList.length > 1) {
controlTransferList.forEach(each=>{
this.showDialog(this.$store.state.training.memberData[each.applicantIdOfControlTransfer], each, simulationUserList, [each]);
this.showDialog(this.$store.state.training.memberData[each.applicantId], each, simulationUserList, [each]);
});
} else {
this.showDialog(member, controlTransfer, simulationUserList, controlTransferList);
@ -221,8 +221,8 @@ export default {
});
}
//
if (controlTransfer.validDurationOfControlTransferApplication) {
this.count = controlTransfer.validDurationOfControlTransferApplication;
if (controlTransfer.validDuration) {
this.count = controlTransfer.validDuration;
this.dialogShow = true;
this.requestInfo = info;
this.disabledAgree = true;
@ -240,7 +240,7 @@ export default {
}
} else {
//
this.count = controlTransfer.validDurationOfControlTransferApplication;
this.count = controlTransfer.validDuration;
}
}
},

View File

@ -154,7 +154,7 @@ export default {
updateTableValue(controlTransfer) {
this.centralizedStationList.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantIdOfControlTransfer) {
if (controlTransfer.applicantId) {
this.disabledCommit = true;
} else {
this.disabledCommit = false;

View File

@ -173,8 +173,8 @@ export default {
updateTableValue(controlTransfer) {
this.tableData.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantIdOfControlTransfer) {
row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDurationOfControlTransferApplication + this.$t('menu.menuDialog.senedMessageTwo');
if (controlTransfer.applicantId) {
row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDuration + this.$t('menu.menuDialog.senedMessageTwo');
row.disabled = true;
row.check = false;
} else {

View File

@ -152,7 +152,7 @@ export default {
updateTableValue(controlTransfer) {
this.stationLists.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantIdOfControlTransfer) {
if (controlTransfer.applicantId) {
this.commitDisabled = true;
} else {
this.commitDisabled = false;
@ -161,8 +161,8 @@ export default {
});
// this.tableData.forEach((row, index) => {
// if (row.code == controlTransfer.code) {
// if (controlTransfer.applicantIdOfControlTransfer) {
// row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDurationOfControlTransferApplication + this.$t('menu.menuDialog.senedMessageTwo');
// if (controlTransfer.applicantId) {
// row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDuration + this.$t('menu.menuDialog.senedMessageTwo');
// row.disabled = true;
// row.check = false;
// } else {

View File

@ -150,7 +150,7 @@ export default {
updateTableValue(controlTransfer) {
this.concertrateStationList.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantIdOfControlTransfer) {
if (controlTransfer.applicantId) {
this.disabledCommit = true;
} else {
this.disabledCommit = false;

View File

@ -173,8 +173,8 @@ export default {
updateTableValue(controlTransfer) {
this.tableData.forEach((row, index) => {
if (row.code == controlTransfer.code) {
if (controlTransfer.applicantIdOfControlTransfer) {
row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDurationOfControlTransferApplication + this.$t('menu.menuDialog.senedMessageTwo');
if (controlTransfer.applicantId) {
row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDuration + this.$t('menu.menuDialog.senedMessageTwo');
row.disabled = true;
row.check = false;
} else {

View File

@ -62,7 +62,16 @@
@switchStationMode="switchStationMode"
/>
<menu-script v-if="isScript" ref="menuScript" :offset-bottom="offsetBottom" :data-error="dataError" @script3ddriveshow="script3ddriveshow" />
<menu-script
v-if="isScript"
ref="menuScript"
:offset-bottom="offsetBottom"
:offset="offset"
:project="project"
:text-status-height="textStatusHeight"
:data-error="dataError"
@script3ddriveshow="script3ddriveshow"
/>
<menu-practice
v-if="isPractice"
@ -539,6 +548,7 @@ export default {
}
if (textStatus) {
this.textStatusHeight = textStatus.offsetHeight || 0;
textStatus.style.top = this.offset - 15 + 'px';
}
});
},

View File

@ -1,21 +1,36 @@
<template>
<div>
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
<div class="display-draft">
<!-- :style="{bottom: offsetBottom + 'px'}" -->
<el-button-group>
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
<el-button v-if="!isScriptCommand" type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
<el-button v-if="!isScriptCommand" type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
</el-button-group>
</div>
<div v-if="!dataError" class="display_top_draft" :style="{top: offset+textStatusHeight+'px'}">
<div class="btn_hover" @click="menuClick">菜单</div>
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 地图错误判断 -->
<!-- 设备视图 -->
<!-- <el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button> -->
<!-- 三维视图 -->
<el-button v-if="!isShowScheduling&&!isDriver" size="small" @click="jumpjlmap3d">{{ $t('display.demon.threeDimensionalView') }}</el-button>
<!-- cctv视图 -->
<!-- <el-button v-if="!isShowScheduling" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button> -->
<!-- 司机视角 -->
<el-button v-if="isDriver" size="small" type="jumpjlmap3d" @click="jumpjlmap3dDriver">{{ $t('joinTraining.driverPerspective') }}</el-button>
</el-button-group>
</div>
<script-chat ref="chatbox" :group="group" :user-role="userRole" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<tip-script-record-new ref="tipTaskRecordNew" :group="group" :offset-bottom="offsetBottom" />
<tip-script-record-new ref="tipTaskRecordNew" :group="group" :offset-bottom="offsetBottom" :offset="offset" />
</div>
</template>
<!-- 单人仿真 -->
<script>
import { getToken } from '@/utils/auth';
import ScriptChat from './scriptChat';
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
import SetTime from './demon/setTime';
@ -40,14 +55,33 @@ export default {
default() {
return false;
}
},
offset: {
type: Number,
required: true
},
textStatusHeight: {
type: Number,
default() {
return 0;
}
},
project:{
type: String,
default() {
return '';
}
}
},
data() {
return {
isDisable: false,
isScriptCommand:false
isScriptCommand:false,
hoverBtn: false,
btnWidth: 0
};
},
computed: {
scriptId() {
return this.$route.query.scriptId;
@ -60,6 +94,12 @@ export default {
},
userRole() {
return this.$store.state.scriptRecord.userRole ? this.$store.state.scriptRecord.userRole : 'ADMIN';
},
isDriver() {
return this.$store.state.scriptRecord.userRole == 'DRIVER';
},
isShowScheduling() {
return this.$store.state.training.prdType == '05';
}
},
watch: {
@ -75,6 +115,9 @@ export default {
if (!this.isScriptCommand) {
this.$store.dispatch('training/setPrdType', '01');
}
this.$nextTick(() => {
this.menuClick();
});
},
methods: {
initPlannedDriving(isDisable) {
@ -86,6 +129,16 @@ export default {
resetBeginTime() {
this.isDisable = false;
},
menuClick() {
this.hoverBtn = !this.hoverBtn;
if (this.hoverBtn) {
// this.$refs.button_group_box.$el.clientWidth ||
this.btnWidth = 500; //
} else {
// button_group_box
this.btnWidth = 0;
}
},
start(model) {
this.isDisable = true;
const data = {
@ -143,8 +196,21 @@ export default {
Notification.closeAll();
});
},
jumpjlmap3d() {
jumpjlmap3dDriver() {
this.$emit('script3ddriveshow');
},
jumpjlmap3d() {
const routeData = this.$router.resolve({
path:'/jlmap3d/sandbox',
query:{
mapid:this.$route.query.mapId,
group:this.group,
token:getToken(),
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
}
};

View File

@ -66,17 +66,8 @@ export default {
addModel: {
type: '',
stationCode: ''
}
};
},
computed: {
...mapGetters('map', [
'counterList',
'stationList',
'lineCode'
]),
rules: function () {
return {
},
rules: {
code: [
{ required: true, message: this.$t('map.pleaseSelectDevice'), trigger: 'change' }
],
@ -98,8 +89,15 @@ export default {
'position.y': [
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'change' }
]
};
},
}
};
},
computed: {
...mapGetters('map', [
'counterList',
'stationList',
'lineCode'
]),
form() {
const form = {
labelWidth: '120px',

View File

@ -1,15 +1,6 @@
<template>
<el-tabs v-model="activeName" class="card">
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
<!-- <div class="view-control-content">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</div>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
</el-button-group>
</div> -->
<operate-property
ref="dataform"
:form="form"

View File

@ -35,6 +35,7 @@
<script>
import Vue from 'vue';
import GetActionNew from './getAction';
import { getToken } from '@/utils/auth';
import {getSimulationMemberList, executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause} from '@/api/simulation';
import ConstConfig from '@/scripts/ConstConfig';
import {getDraftScriptByGroupNew, changeScriptRole} from '@/api/script';
@ -53,6 +54,10 @@ export default {
offsetBottom:{
type: Number,
required: true
},
offset:{
type: Number,
required: true
}
},
data() {
@ -72,7 +77,8 @@ export default {
size: {
width: 300,
height: 300
}
},
openWindow:null
};
},
watch:{
@ -163,6 +169,9 @@ export default {
return member.id == role;
});
if (memberInfo) {
if (this.openWindow) {
this.openWindow.close();
}
if (memberInfo.type == '行值') {
prdType = '01';
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
@ -172,6 +181,19 @@ export default {
this.$store.dispatch('training/setRoles', 'DISPATCHER');
} else if (memberInfo.type == '司机') {
prdType = '04';
} else if (memberInfo.type == '通号') {
prdType = '';
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
mapid:this.$route.query.mapId,
group:this.group,
token:getToken(),
project: this.project,
noPreLogout: true
}
});
this.openWindow = window.open(routeData.href);
} else {
prdType = '';
}