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