剧本编制代码调整
This commit is contained in:
parent
6a4cc3a2bc
commit
cd877b8800
@ -62,7 +62,16 @@
|
|||||||
@switchStationMode="switchStationMode"
|
@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
|
<menu-practice
|
||||||
v-if="isPractice"
|
v-if="isPractice"
|
||||||
@ -539,6 +548,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (textStatus) {
|
if (textStatus) {
|
||||||
this.textStatusHeight = textStatus.offsetHeight || 0;
|
this.textStatusHeight = textStatus.offsetHeight || 0;
|
||||||
|
textStatus.style.top = this.offset - 15 + 'px';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,21 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
<div class="display-draft">
|
||||||
|
<!-- :style="{bottom: offsetBottom + 'px'}" -->
|
||||||
<el-button-group>
|
<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="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 v-if="!isScriptCommand" type="danger" :disabled="dataError" @click="end">初始化</el-button>
|
||||||
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</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" />
|
<script-chat ref="chatbox" :group="group" :user-role="userRole" />
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 单人仿真 -->
|
<!-- 单人仿真 -->
|
||||||
<script>
|
<script>
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
import ScriptChat from './scriptChat';
|
import ScriptChat from './scriptChat';
|
||||||
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
|
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
|
||||||
import SetTime from './demon/setTime';
|
import SetTime from './demon/setTime';
|
||||||
@ -40,14 +55,33 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
offset: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
textStatusHeight: {
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
project:{
|
||||||
|
type: String,
|
||||||
|
default() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isDisable: false,
|
isDisable: false,
|
||||||
isScriptCommand:false
|
isScriptCommand:false,
|
||||||
|
hoverBtn: false,
|
||||||
|
btnWidth: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
scriptId() {
|
scriptId() {
|
||||||
return this.$route.query.scriptId;
|
return this.$route.query.scriptId;
|
||||||
@ -60,6 +94,12 @@ export default {
|
|||||||
},
|
},
|
||||||
userRole() {
|
userRole() {
|
||||||
return this.$store.state.scriptRecord.userRole ? this.$store.state.scriptRecord.userRole : 'ADMIN';
|
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: {
|
watch: {
|
||||||
@ -75,6 +115,9 @@ export default {
|
|||||||
if (!this.isScriptCommand) {
|
if (!this.isScriptCommand) {
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
}
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.menuClick();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initPlannedDriving(isDisable) {
|
initPlannedDriving(isDisable) {
|
||||||
@ -86,6 +129,16 @@ export default {
|
|||||||
resetBeginTime() {
|
resetBeginTime() {
|
||||||
this.isDisable = false;
|
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) {
|
start(model) {
|
||||||
this.isDisable = true;
|
this.isDisable = true;
|
||||||
const data = {
|
const data = {
|
||||||
@ -143,8 +196,21 @@ export default {
|
|||||||
Notification.closeAll();
|
Notification.closeAll();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
jumpjlmap3d() {
|
jumpjlmap3dDriver() {
|
||||||
this.$emit('script3ddriveshow');
|
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: {
|
addModel: {
|
||||||
type: '',
|
type: '',
|
||||||
stationCode: ''
|
stationCode: ''
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: {
|
rules: {
|
||||||
...mapGetters('map', [
|
|
||||||
'counterList',
|
|
||||||
'stationList',
|
|
||||||
'lineCode'
|
|
||||||
]),
|
|
||||||
rules: function () {
|
|
||||||
return {
|
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: this.$t('map.pleaseSelectDevice'), trigger: 'change' }
|
{ required: true, message: this.$t('map.pleaseSelectDevice'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
@ -98,8 +89,15 @@ export default {
|
|||||||
'position.y': [
|
'position.y': [
|
||||||
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'change' }
|
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'counterList',
|
||||||
|
'stationList',
|
||||||
|
'lineCode'
|
||||||
|
]),
|
||||||
form() {
|
form() {
|
||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
|
@ -1,15 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" class="card">
|
<el-tabs v-model="activeName" class="card">
|
||||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
<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
|
<operate-property
|
||||||
ref="dataform"
|
ref="dataform"
|
||||||
:form="form"
|
:form="form"
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import GetActionNew from './getAction';
|
import GetActionNew from './getAction';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
import {getSimulationMemberList, executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause} from '@/api/simulation';
|
import {getSimulationMemberList, executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause} from '@/api/simulation';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import {getDraftScriptByGroupNew, changeScriptRole} from '@/api/script';
|
import {getDraftScriptByGroupNew, changeScriptRole} from '@/api/script';
|
||||||
@ -53,6 +54,10 @@ export default {
|
|||||||
offsetBottom:{
|
offsetBottom:{
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
offset:{
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -172,6 +177,19 @@ export default {
|
|||||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||||
} else if (memberInfo.type == '司机') {
|
} else if (memberInfo.type == '司机') {
|
||||||
prdType = '04';
|
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 {
|
} else {
|
||||||
prdType = '';
|
prdType = '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user