Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
2e2feac47d
@ -302,17 +302,6 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
const controlTransfer = this.$store.state.scriptRecord.controlTransfer;
|
||||
if (controlTransfer.stations) {
|
||||
replyVOList.forEach(replyVO=>{
|
||||
controlTransfer.stations.splice(controlTransfer.stations.indexOf(replyVO.stationCode), 1);
|
||||
});
|
||||
}
|
||||
if (controlTransfer.stations.length > 0) {
|
||||
this.$store.dispatch('scriptRecord/updateControlTransfer', controlTransfer);
|
||||
} else {
|
||||
this.$store.dispatch('scriptRecord/updateControlTransfer', {});
|
||||
}
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
@ -342,17 +331,6 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
const controlTransfer = this.$store.state.scriptRecord.controlTransfer;
|
||||
if (controlTransfer.stations) {
|
||||
replyVOList.forEach(replyVO=>{
|
||||
controlTransfer.stations.splice(controlTransfer.stations.indexOf(replyVO.stationCode), 1);
|
||||
});
|
||||
}
|
||||
if (controlTransfer.stations.length > 0) {
|
||||
this.$store.dispatch('scriptRecord/updateControlTransfer', controlTransfer);
|
||||
} else {
|
||||
this.$store.dispatch('scriptRecord/updateControlTransfer', {});
|
||||
}
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
|
@ -13,8 +13,7 @@ const scriptRecord = {
|
||||
updateRoleStatus:0, // 剧本更新角色标志
|
||||
updateRoleId:'', // 剧本更新角色id
|
||||
updateCoversitionStatus:0, // 剧本仿真更新会话信息
|
||||
userRole:null, // 剧本更新的角色
|
||||
controlTransfer:{} // 剧本控制权转移
|
||||
userRole:null // 剧本更新的角色
|
||||
},
|
||||
getters: {
|
||||
mapLocation: (state)=>{
|
||||
@ -73,9 +72,6 @@ const scriptRecord = {
|
||||
},
|
||||
updateCoversitionInfo:(state) => {
|
||||
state.updateCoversitionStatus += 1;
|
||||
},
|
||||
updateControlTransfer:(state, controlTransfer) => {
|
||||
state.controlTransfer = controlTransfer;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@ -105,9 +101,6 @@ const scriptRecord = {
|
||||
},
|
||||
updateCoversitionInfo:({ commit }) => {
|
||||
commit('updateCoversitionInfo');
|
||||
},
|
||||
updateControlTransfer:({ commit }, controlTransfer) => {
|
||||
commit('updateControlTransfer', controlTransfer);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
<span>iscs系统列表</span>
|
||||
</div>
|
||||
<div class="text_item">
|
||||
<el-cascader v-model="testList" style="width: 100%;" :props="props" placeholder="请选择车站" />
|
||||
<el-cascader v-model="mapStationList" style="width: 100%;" :props="props" placeholder="请选择车站" />
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div class="tree_box">
|
||||
<el-tree ref="tree" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent" @node-contextmenu="showContextMenu">
|
||||
@ -45,7 +45,7 @@ export default {
|
||||
editModel: {},
|
||||
lineCode: '',
|
||||
mapList: [],
|
||||
testList: []
|
||||
mapStationList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
testList(val) {
|
||||
mapStationList(val) {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
|
@ -35,6 +35,7 @@ import merge from 'webpack-merge';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import { clearSimulation } from '@/api/simulation';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -268,7 +269,8 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
stationList: []
|
||||
stationList: [],
|
||||
firstBack: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -283,12 +285,12 @@ export default {
|
||||
'$store.state.socket.simulationRoleList':function(val) {
|
||||
(val || []).forEach(item => {
|
||||
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
|
||||
this.back();
|
||||
!this.firstBack && this.back();
|
||||
}
|
||||
});
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
this.back();
|
||||
!this.firstBack && this.back();
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
@ -311,7 +313,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.onbeforeunload = this.clearSubscribe;
|
||||
this.subscribe();
|
||||
this.navList.forEach((nav, navIndex)=>{
|
||||
if (nav.children && nav.children.length > 0) {
|
||||
@ -329,9 +330,6 @@ export default {
|
||||
this.currentSystem = 'center';
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe();
|
||||
},
|
||||
methods: {
|
||||
show(item) {
|
||||
let flag = false;
|
||||
@ -388,12 +386,18 @@ export default {
|
||||
this.$router.push({ path: `/displayIscs/system/config/${this.type}`, query: query });
|
||||
},
|
||||
back() {
|
||||
this.firstBack = true;
|
||||
this.clearSubscribe();
|
||||
if (this.projectDevice) {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
clearSimulation(this.$route.query.group).then(resp => {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
}).catch(()=> {
|
||||
this.$message.error('清除仿真失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
changeCurrentSystem() {
|
||||
|
@ -239,6 +239,7 @@ export default {
|
||||
async loadChartPage() {
|
||||
try {
|
||||
this.seriesMap = {};
|
||||
this.staticSeries = [];
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
@ -413,7 +414,6 @@ export default {
|
||||
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||
list.push(time);
|
||||
}
|
||||
|
||||
const startValue = 3600 * 6;
|
||||
const offsetTime = 3600 * 1;
|
||||
|
||||
|
@ -150,11 +150,6 @@ export default {
|
||||
if (operateType == 'CM') {
|
||||
operateType = 'ControlConvertMenu';
|
||||
}
|
||||
if (commandName == 'CM_Apply_For_Station_Control') {
|
||||
this.$store.dispatch('scriptRecord/updateControlTransfer', {type:'CM_Apply_For_Station_Control', stations:element.operationParamMap.stationCodes, roleId:this.$store.state.scriptRecord.updateRoleId});
|
||||
} else if (commandName == 'CM_Apply_For_Center_Control') {
|
||||
this.$store.dispatch('scriptRecord/updateControlTransfer', {type:'CM_Apply_For_Center_Control', stations:element.operationParamMap.stationCodes, roleId:this.$store.state.scriptRecord.updateRoleId});
|
||||
}
|
||||
const operateName = Object.values(CMD[operateType]).find(res=>{ return res.value == commandName; });
|
||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机'};
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
|
@ -69,8 +69,6 @@ export default {
|
||||
mapLocation:null,
|
||||
allMemberList:[],
|
||||
memberList:[],
|
||||
inter:null,
|
||||
times:60,
|
||||
size: {
|
||||
width: 300,
|
||||
height: 300
|
||||
@ -161,40 +159,13 @@ export default {
|
||||
switchMode(role) {
|
||||
changeScriptRole(this.group, role).then(res=>{
|
||||
let prdType = '';
|
||||
const controlTransferList = [];
|
||||
const memberInfo = this.memberList.find(member=>{
|
||||
return member.id == role;
|
||||
});
|
||||
if (memberInfo) {
|
||||
if (memberInfo.type == '行值') {
|
||||
const controlTransfer = this.$store.state.scriptRecord.controlTransfer;
|
||||
if (controlTransfer.type == 'CM_Apply_For_Center_Control' && controlTransfer.stations.includes(memberInfo.deviceCode) ) {
|
||||
const stations = controlTransfer.stations;
|
||||
stations.forEach(station=>{
|
||||
controlTransferList.push({code:station, deviceType:'STATION',
|
||||
controlMode:'Local', tbStrategyId:1, applicantIdOfControlTransfer:controlTransfer.roleId, apply2TheControlMode:'Center', validDurationOfControlTransferApplication:60 });
|
||||
});
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.$store.dispatch('training/setRoleDeviceCode', memberInfo.deviceCode);
|
||||
}
|
||||
prdType = '01';
|
||||
} else if (memberInfo.type == '行调') {
|
||||
const controlTransfer = this.$store.state.scriptRecord.controlTransfer;
|
||||
if (controlTransfer.type == 'CM_Apply_For_Station_Control') {
|
||||
const stations = controlTransfer.stations;
|
||||
// if (stations.indexOf(memberInfo.deviceCode)) {
|
||||
// // {"type":"Simulation_DeviceStatus","body":[{"code":"Station18000",
|
||||
// // "deviceType":,"controlMode":"Center","tbStrategyId":1,"applicantIdOfControlTransfer":"3",
|
||||
// // "apply2TheControlMode":"Local","validDurationOfControlTransferApplication":53}]}
|
||||
// const controlTransferList = [{code:'', applicantIdOfControlTransfer:'' }];
|
||||
// this.store.dispatch('map/setControlTransfer', controlTransferList);
|
||||
// }
|
||||
stations.forEach(station=>{
|
||||
controlTransferList.push({code:station, deviceType:'STATION',
|
||||
controlMode:'Center', tbStrategyId:1, applicantIdOfControlTransfer:controlTransfer.roleId, apply2TheControlMode:'Local', validDurationOfControlTransferApplication:60 });
|
||||
});
|
||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||
}
|
||||
prdType = '02';
|
||||
} else if (memberInfo.type == '司机') {
|
||||
prdType = '04';
|
||||
@ -212,32 +183,6 @@ export default {
|
||||
);
|
||||
this.oldMemberId = role;
|
||||
this.$store.dispatch('training/setPrdType', prdType);
|
||||
if (controlTransferList.length > 0) {
|
||||
this.$store.dispatch('map/setControlTransfer', controlTransferList);
|
||||
// this.inter = setInterval(()=>{
|
||||
// if (this.times > 0) {
|
||||
// const controlTransfers = [];
|
||||
// controlTransferList.forEach(controlTransfer=>{
|
||||
// controlTransfer.validDurationOfControlTransferApplication = this.times;
|
||||
// controlTransfers.push(controlTransfer);
|
||||
// });
|
||||
// this.$store.dispatch('map/setControlTransfer', controlTransfers);
|
||||
// this.times--;
|
||||
// } else {
|
||||
// clearInterval(this.inter);
|
||||
// const controlTransfers = [];
|
||||
// controlTransferList.forEach(controlTransfer=>{
|
||||
// controlTransfer.controlMode = controlTransfer.apply2TheControlMode;
|
||||
// controlTransfer.applicantIdOfControlTransfer = null;
|
||||
// controlTransfer.apply2TheControlMode = null;
|
||||
// controlTransfer.validDurationOfControlTransferApplication = null;
|
||||
// controlTransfers.push(controlTransfer);
|
||||
// });
|
||||
// this.$store.dispatch('map/setControlTransfer', controlTransfers);
|
||||
// this.$store.dispatch('scriptRecord/updateControlTransfer', {});
|
||||
// }
|
||||
// }, 1000);
|
||||
}
|
||||
ConstConfig.ConstSelect.roleTypeNew.forEach(each=>{
|
||||
if (each.label == memberInfo.type) {
|
||||
this.$store.dispatch('scriptRecord/updateRole', each.value + ':' + role);
|
||||
|
Loading…
Reference in New Issue
Block a user