Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
2fb83cd34e
@ -39,6 +39,7 @@ const training = {
|
||||
memberList: [], // 综合仿真成员列表
|
||||
memberData: {}, // 综合仿真成员列表
|
||||
simulationUserList: [], // 综合仿真用户列表
|
||||
userRole: '', // 本人仿真成员角色
|
||||
orignalUserRoleId:'', // 设置旧的角色的id
|
||||
scriptQuitCount: 0, // 主动退出剧本
|
||||
scriptOperationType: '', // 剧本操作类型
|
||||
@ -297,6 +298,9 @@ const training = {
|
||||
/** 运行线 (宁波三号线) */
|
||||
setRunPathSelected: (state, runPathList) => {
|
||||
state.runPathList = runPathList;
|
||||
},
|
||||
setUserRole: (state, userRole) => {
|
||||
state.userRole = userRole;
|
||||
}
|
||||
},
|
||||
|
||||
@ -655,6 +659,9 @@ const training = {
|
||||
/** 运行线 (宁波三号线) */
|
||||
setRunPathSelected: ({ commit }, runPathList) => {
|
||||
commit('setRunPathSelected', runPathList);
|
||||
},
|
||||
setUserRole: ({ commit }, userRole) => {
|
||||
commit('setUserRole', userRole);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -141,6 +141,7 @@ export default {
|
||||
beforeDestroy() {
|
||||
clearSimulation(this.group);
|
||||
this.$store.dispatch('training/setSimulationUserList', []);
|
||||
this.$store.dispatch('training/setUserRole', '');
|
||||
this.$store.dispatch('training/reset');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
|
@ -326,6 +326,7 @@ export default {
|
||||
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && stationRoleList.includes(item.type)) {
|
||||
// this.userRole = item.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.$store.dispatch('training/setUserRole', item.type);
|
||||
this.deviceCode = item.deviceCode;
|
||||
// this.setShowStation(item.deviceCode);
|
||||
this.setShowStation(item.deviceCode);
|
||||
|
@ -30,7 +30,7 @@
|
||||
<el-button size="small" :disabled="viewDisabled || isscriptRun" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR'&&$route.query.lineCode ==='16'" size="small" @click="goCtc">车务终端</el-button>
|
||||
<el-button v-if="$route.query.lineCode ==='16'&&$store.state.training.prdType === '01'" size="small" @click="showTrainTicket">路票</el-button>
|
||||
<el-button v-if="$route.query.lineCode === '16'&&$store.state.training.prdType ==='01'" size="small" @click="showRegisterBook">簿册</el-button>
|
||||
<el-button v-if="showRegisterBookBtn" size="small" @click="showRegisterBook">簿册</el-button>
|
||||
<el-button v-if="showDispatcherStation && userRole === 'DISPATCHER'" size="small" @click="changeShowMap">调度台</el-button>
|
||||
<!-- 运行图加载 -->
|
||||
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
@ -166,6 +166,10 @@ export default {
|
||||
{ value: 4, label: '4倍速' },
|
||||
{ value: 5, label: '5倍速' }
|
||||
];
|
||||
},
|
||||
showRegisterBookBtn() {
|
||||
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole);
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
|
@ -173,6 +173,7 @@ export default {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.$store.dispatch('training/setUserRole', item.type);
|
||||
this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode);
|
||||
this.setCenter(showStationCode);
|
||||
}
|
||||
|
@ -300,6 +300,7 @@ export default {
|
||||
await this.$store.dispatch('training/reset');
|
||||
await this.$store.dispatch('map/mapClear');
|
||||
await this.$store.dispatch('menuOperation/resetRequestList');
|
||||
this.$store.dispatch('training/setUserRole', '');
|
||||
Message.closeAll();
|
||||
},
|
||||
methods: {
|
||||
@ -782,6 +783,7 @@ export default {
|
||||
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
|
||||
this.userRole = item.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.$store.dispatch('training/setUserRole', this.userRole);
|
||||
this.deviceCode = item.deviceCode;
|
||||
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
|
||||
this.$nextTick(() => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR'&&$route.query.lineCode ==='16'" size="small" @click="goCtc">车务终端</el-button>
|
||||
<el-button v-if="$route.query.lineCode ==='16'&&$store.state.training.prdType === '01'" size="small" @click="showTrainTicket">路票</el-button>
|
||||
<el-button v-if="$route.query.lineCode === '16'&&$store.state.training.prdType ==='01'" size="small" @click="showRegisterBook">簿册</el-button>
|
||||
<el-button v-if="showRegisterBookBtn" size="small" @click="showRegisterBook">簿册</el-button>
|
||||
<el-button v-if="showDispatcherStation" size="small" @click="changeShowMap">调度台</el-button>
|
||||
<el-button v-if="ibpShow" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice && hasBigScreen" size="small" @click="goBigScreen">大屏</el-button>
|
||||
@ -169,6 +169,10 @@ export default {
|
||||
ibpShow() {
|
||||
const lineCodeList = ['08', '16'];
|
||||
return this.userRole === 'STATION_SUPERVISOR' && !this.$route.query.projectDevice && !lineCodeList.includes(this.$route.query.lineCode);
|
||||
},
|
||||
showRegisterBookBtn() {
|
||||
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
||||
return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -98,7 +98,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!addModel.multiRoute">
|
||||
<el-select v-model="addModel.pathSwitchPosition.normal" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-select key="123" v-model="addModel.pathSwitchPosition.normal" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in SwitchLocateTypeList"
|
||||
:key="item.value"
|
||||
@ -423,7 +423,16 @@ export default {
|
||||
api(newModel, that.mapInfo.id, newModel.code).then(res=>{
|
||||
that.$message.success(that.$t(this.isModify ? 'tip.updateSuccessfully' : 'tip.creatingSuccessful'));
|
||||
that.loading = false;
|
||||
if (!this.isModify && !newModel.multiRoute) { that.routeList.push({code:newModel.code, name:newModel.name, stationCode: newModel.stationCode || ''}); }
|
||||
if (!this.isModify && !newModel.multiRoute) {
|
||||
let sCode = newModel.stationCode;
|
||||
if (!sCode && newModel.startSignalCode) {
|
||||
const startSignalObj = that.signalList.find(item => {
|
||||
return item.code == newModel.startSignalCode;
|
||||
});
|
||||
sCode = startSignalObj ? startSignalObj.stationCode : '';
|
||||
}
|
||||
that.routeList.push({code:newModel.code, name:newModel.name, stationCode: sCode || ''});
|
||||
}
|
||||
that.clear();
|
||||
}).catch(() => {
|
||||
that.$messageBox(that.$t(this.isModify ? 'tip.updateFailed' : 'tip.operationAbnormal'));
|
||||
@ -439,7 +448,7 @@ export default {
|
||||
this.addModel = {
|
||||
...this.initModelData()
|
||||
};
|
||||
this.$refs.form.resetFields();
|
||||
// this.$refs.form.resetFields();
|
||||
}
|
||||
this.isModify = false;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user