调整判断
This commit is contained in:
parent
5d413dba8c
commit
fe08980f2f
@ -308,8 +308,8 @@ export default {
|
||||
jump() {
|
||||
this.disabled = true;
|
||||
setTimeout(() => {
|
||||
if (!this.drawWay) {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
if (!this.drawWay) {
|
||||
simulationNotify(data).then(resp => {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project };
|
||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||
@ -319,9 +319,9 @@ export default {
|
||||
this.disabled = false;
|
||||
});
|
||||
} else {
|
||||
const data = { mapId: this.courseModel.mapId, prdType: this.currentPrdType };
|
||||
createSimulationNew(data).then(resp => {
|
||||
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, goodsId: this.goodsId, try: this.tryUser, project: this.project };
|
||||
this.$store.dispatch('training/setPrdType', this.currentPrdType); // 改变prdType
|
||||
this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
|
@ -76,8 +76,8 @@ export default {
|
||||
dataError: false,
|
||||
panelShow: true,
|
||||
memberData:[],
|
||||
simulationShow: false,
|
||||
drivingShow: false,
|
||||
// simulationShow: false,
|
||||
// drivingShow: false,
|
||||
isscriptRun:false, // 剧本是否正在加载
|
||||
showStation: '',
|
||||
stationListMode: [],
|
||||
@ -141,8 +141,6 @@ export default {
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
// this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||
// this.mapBoxP.style.cursor = '';
|
||||
this.switchStationMode(this.showStation);
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
:offset-bottom="offsetBottom"
|
||||
:tip-bottom="tipBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
@ -40,7 +40,7 @@
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
@ -52,7 +52,7 @@
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchMode="switchMode"
|
||||
@selectQuest="selectQuest"
|
||||
@ -67,7 +67,7 @@
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:station-list="stationListMode"
|
||||
:show-select-station="showSelectStation"
|
||||
:data-error="dataError"
|
||||
@switchMode="switchMode"
|
||||
@ -149,7 +149,7 @@ export default {
|
||||
dataError: false,
|
||||
group:'',
|
||||
showStation: '',
|
||||
stationList: [],
|
||||
stationListMode: [],
|
||||
showSelectStation: false, // 是否展示现地选择设备集中站select
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
@ -164,6 +164,10 @@ export default {
|
||||
...mapGetters([
|
||||
'canvasWidth'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'stationList'
|
||||
]),
|
||||
mode() {
|
||||
return this.$route.params.mode;
|
||||
},
|
||||
@ -219,6 +223,7 @@ export default {
|
||||
},
|
||||
'$store.state.training.prdType': function (val) { // 根据权限类型计算高度
|
||||
this.setPosition();
|
||||
this.setMode();
|
||||
},
|
||||
'size.width': function(val) {
|
||||
this.setWindowSize();
|
||||
@ -245,9 +250,8 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.map.map': function (val) {
|
||||
this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
this.showSelectStation && this.setStationList(val);
|
||||
'stationList': function () {
|
||||
this.setStationList();
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
if (this.planRunning) {
|
||||
@ -260,6 +264,7 @@ export default {
|
||||
this.group = this.$route.query.group;
|
||||
await this.setWindowSize();
|
||||
await this.initLoadData();
|
||||
this.setMode();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.quit(this.group);
|
||||
@ -393,7 +398,12 @@ export default {
|
||||
});
|
||||
},
|
||||
switchMode(prdType) {
|
||||
this.$store.dispatch('training/setPrdType', prdType);
|
||||
this.$store.dispatch('training/setPrdType', prdType); // 改变prdType
|
||||
},
|
||||
setMode() {
|
||||
if (this.map) {
|
||||
this.showSelectStation = this.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
}
|
||||
},
|
||||
// 选择脚本
|
||||
selectQuest(row) {
|
||||
@ -509,7 +519,7 @@ export default {
|
||||
offsetBottom = (menuBottom.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (menuButtonsBox) {
|
||||
this.tipBottom = menuButtonsBox.offsetHeight + 15 || 0;
|
||||
this.tipBottom = (menuButtonsBox.offsetHeight || 0) + 15;
|
||||
}
|
||||
if (this.offset != offset) {
|
||||
this.offset = offset;
|
||||
@ -520,12 +530,12 @@ export default {
|
||||
});
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.mapCanvas.setCenter(code);
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
switchStationMode(val) {
|
||||
if (this.stationList.length > 0) {
|
||||
if (this.stationListMode.length > 0) {
|
||||
if (val == null) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
}
|
||||
@ -548,15 +558,15 @@ export default {
|
||||
// this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
}
|
||||
},
|
||||
setStationList(val) {
|
||||
this.stationList = [];
|
||||
(val.stationList || []).forEach(item => {
|
||||
setStationList() {
|
||||
this.stationListMode = [];
|
||||
(this.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationList.push({value: item.code, name: item.name});
|
||||
this.stationListMode.push({value: item.code, name: item.name});
|
||||
}
|
||||
});
|
||||
if (this.stationList.length) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
if (this.stationListMode.length && this.showSelectStation) {
|
||||
this.showStation = this.stationListMode[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,8 @@
|
||||
<el-select v-if="(isScript&&!isScriptCommand) || isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<!-- ||(isScriptCommand && isLocalStation) -->
|
||||
<el-select v-if="showSelectStation&&((!isScriptCommand&&swch=='01')||(isScriptCommand && isLocalStation))" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
||||
<!-- showSelectStation&&((!isScriptCommand&&swch=='01')||(isScriptCommand && isLocalStation)) -->
|
||||
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
@ -112,7 +112,7 @@ export default {
|
||||
isDemon() {
|
||||
return this.$route.params.mode === 'demon';
|
||||
},
|
||||
isDesignPlatform() {
|
||||
isDesignPlatform() { // 是否剧本预览页面
|
||||
return this.$route.fullPath.includes('design/displayNew/demon');
|
||||
},
|
||||
isScheduling() {
|
||||
@ -153,8 +153,6 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
await this.loadRunData(this.$route.query);
|
||||
// this.isScriptCommand = this.$store.state.scriptRecord.bgSet;
|
||||
// this.showStationContent = this.showStation;
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
|
@ -80,7 +80,7 @@ import Jl3dMaintainer from '@/views/jlmap3d/maintainer/jl3dmaintainer';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
import { Message } from 'element-ui';
|
||||
import Vue from 'vue';
|
||||
// import Vue from 'vue';
|
||||
import localStore from 'storejs';
|
||||
import MembersManage from './memberManage/membersManage';
|
||||
import AddMember from './memberManage/addMember';
|
||||
@ -293,7 +293,7 @@ export default {
|
||||
});
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.mapCanvas.setCenter(code);
|
||||
this.$jlmap.setCenter(code);
|
||||
},
|
||||
// 加载地图数据
|
||||
initLoadData() {
|
||||
@ -553,8 +553,8 @@ export default {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
});
|
||||
Vue.prototype.$jlmap.updateShowStation(list, val);
|
||||
Vue.prototype.$jlmap.setCenter(val);
|
||||
this.$jlmap.updateShowStation(list, val);
|
||||
this.$jlmap.setCenter(val);
|
||||
},
|
||||
setStationList(val) {
|
||||
this.stationList = [];
|
||||
|
Loading…
Reference in New Issue
Block a user