-
+
-
+
@@ -89,6 +89,7 @@ export default {
viewDisabled: true,
runing: false,
swch: '01',
+ isScriptCommand:false,
swchList: [
{ value: '01', name: '现地' },
{ value: '02', name: '行调' }
@@ -126,10 +127,14 @@ export default {
await this.loadRunData(this.$route.query);
}
}
+ },
+ '$store.state.scriptRecord.bgSet':function (val) {
+ this.isScriptCommand = val;
}
},
async mounted() {
await this.loadRunData(this.$route.query);
+ this.isScriptCommand = this.$store.state.scriptRecord.bgSet;
},
methods: {
loadRunData(opt) {
@@ -185,7 +190,7 @@ export default {
},
switchMode(swch) {
this.$emit('switchMode', swch);
- let showMode = '02';
+ let showMode = '03';
if (swch == '01') {
showMode = '03';
} else if (swch == '02') {
@@ -202,6 +207,11 @@ export default {
}
});
this.$jlmap.updateShowMode(list, showMode);
+ if (swch == '02') {
+ this.switchStationMode('');
+ } else {
+ this.switchStationMode(null);
+ }
},
switchStationMode(val) {
this.$emit('switchStationMode', val);
diff --git a/src/views/scriptManage/display/tipScriptRecord.vue b/src/views/scriptManage/display/tipScriptRecord.vue
index ecff2cfb2..ea36b40a3 100644
--- a/src/views/scriptManage/display/tipScriptRecord.vue
+++ b/src/views/scriptManage/display/tipScriptRecord.vue
@@ -31,6 +31,7 @@ import Vue from 'vue';
import AddAction from '../scriptRecord/addAction';
import GetAction from '../scriptRecord/getAction';
import AddRole from '../scriptRecord/addRole';
+import {getDraftScriptByGroupNew} from '@/api/script';
import {saveScriptScenes, saveScriptScenesNew, saveScriptData, saveScriptDataNew, dumpScriptData, dumpScriptDataNew, updateMapLocation, updateMapLocationNew, scriptPause, simulationPause, executeScript, executeScriptNew} from '@/api/simulation';
export default {
@@ -85,7 +86,15 @@ export default {
},
mounted() {
// this.initAutoSaveScript();
- this.backDisabled = this.$store.state.scriptRecord.bgSet;
+ if (this.drawWay) {
+ getDraftScriptByGroupNew(this.group).then(response=>{
+ this.backDisabled = response.data.bgSet;
+ this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
+ });
+ } else {
+ this.backDisabled = this.$store.state.scriptRecord.bgSet;
+ }
+
},
beforeDestroy() {
this.clearAutoSave();
diff --git a/src/views/scriptManage/scriptRecord/addAction.vue b/src/views/scriptManage/scriptRecord/addAction.vue
index 83e0ab83b..07a8aef0f 100644
--- a/src/views/scriptManage/scriptRecord/addAction.vue
+++ b/src/views/scriptManage/scriptRecord/addAction.vue
@@ -271,19 +271,19 @@ export default {
});
return lastData;
},
- hover(field) {
- if (this.field == '') {
- if (this.isFirstTips) {
- this.$message('请在右侧地图上选择操作');
- this.isFirstTips = false;
- }
- this.field = field;
- this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
- } else {
- this.field = '';
- this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
- }
- },
+ // hover(field) {
+ // if (this.field == '') {
+ // if (this.isFirstTips) {
+ // this.$message('请在右侧地图上选择操作');
+ // this.isFirstTips = false;
+ // }
+ // this.field = field;
+ // this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
+ // } else {
+ // this.field = '';
+ // this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
+ // }
+ // },
changeRole(index) {
const role = this.orginMemberList.find(elem=>{ return elem.id == index; }).role;
const data = {role:role};
diff --git a/src/views/trainRoom/e-role.vue b/src/views/trainRoom/e-role.vue
index a9e5d575b..62f7ae5d8 100644
--- a/src/views/trainRoom/e-role.vue
+++ b/src/views/trainRoom/e-role.vue
@@ -33,8 +33,8 @@
@change="handleUpdUser(node, index)"
>
{ return elem.centralized; }).map(item => {
- const elem = { code: item.code, name: item.name, disabled: false };
- this.attendantList.forEach(nor => {
- if (elem.code == nor.deviceCode) {
- elem.disabled = true;
- }
+ if (this.drawWay === 'true') {
+ return this.availableStationList;
+ } else {
+ return this.stationList.filter(elem => { return elem.centralized; }).map(item => {
+ const elem = { code: item.code, name: item.name, disabled: false };
+ this.attendantList.forEach(nor => {
+ if (elem.code == nor.deviceCode) {
+ elem.disabled = true;
+ }
+ });
+ return elem;
});
- return elem;
- });
+ }
+
},
stationListForIBP() {
return this.stationList.map(item => {
diff --git a/src/views/trainRoom/index.vue b/src/views/trainRoom/index.vue
index 993fb4aaf..f0b489b96 100644
--- a/src/views/trainRoom/index.vue
+++ b/src/views/trainRoom/index.vue
@@ -22,6 +22,7 @@
:members="members"
:height="height"
:station-list="stationList"
+ :available-station-list="availableStationList"
:stand-list="standList"
:door-list="doorList"
@message="messageInfo"
@@ -47,7 +48,7 @@ import eMembers from './e-members';
import eChat from './e-chat';
import eRoles from './e-roles';
import { postRoomDetail, getJointTrainRoomUserList, getRealDevices, putJointTrainingSimulationEntrance, getjointTraining } from '@/api/chat';
-import { postRoomDetailNew, getJointTrainRoomUserListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew, getRealDevicesNew} from '@/api/jointTraining';
+import { postRoomDetailNew, getJointTrainRoomUserListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew, getRealDevicesNew, getAvailableStaionList} from '@/api/jointTraining';
import { getPublishMapInfo, hasDoorStationList } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen';
import { getStationList } from '@/api/runplan';
@@ -76,6 +77,7 @@ export default {
userMap: [],
members: [],
stationList: [],
+ availableStationList:[],
standList: [],
doorList: [],
timer: null
@@ -138,6 +140,9 @@ export default {
await this.getUserList();
await this.getStandList();
await this.getStaionList(this.room.mapId);
+ if (this.drawWay === 'true') {
+ await this.getAvailableStaionList(this.room.mapId);
+ }
await this.getDoorList(this.room.mapId, this.stationList);
if (this.timer) { clearInterval(this.timer); }
this.timer = setInterval(() => {
@@ -170,6 +175,10 @@ export default {
const resp = await getStationList(mapId);
this.stationList = resp.data || [];
},
+ async getAvailableStaionList(mapId) {
+ const resp = await getAvailableStaionList(mapId);
+ this.availableStationList = resp.data || [];
+ },
async getDoorList(mapId, stationList) {
const doorList = [];
hasDoorStationList(mapId).then(res =>{