剧本编制代码调整
This commit is contained in:
parent
6a4cc3a2bc
commit
cd877b8800
@ -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';
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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',
|
||||
|
@ -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"
|
||||
|
@ -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() {
|
||||
@ -172,6 +177,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
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
} else {
|
||||
prdType = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user