实训调整
This commit is contained in:
parent
97065ca162
commit
0851691587
@ -135,12 +135,12 @@ export default {
|
||||
break;
|
||||
}
|
||||
case 'trainingDesign': {
|
||||
const data = { mapId: obj.mapId };
|
||||
const data = { mapId: obj.mapId, prdType: '01' };
|
||||
createSimulationNew(data).then(resp => {
|
||||
if (this.loadingProjectList.includes(this.project)) {
|
||||
this.$store.dispatch('app/transitionAnimations');
|
||||
}
|
||||
const query = { ...data, group: resp.data, lineCode:obj.lineCode};
|
||||
const query = { mapId: obj.mapId, group: resp.data, lineCode:obj.lineCode};
|
||||
this.$router.push({ path: `/trainingDesign`, query });
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
|
@ -459,6 +459,14 @@ export default {
|
||||
if (this.$route.query.newApi + '' === 'true') {
|
||||
getMemberListCommon(this.group).then(resp => {
|
||||
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.userId });
|
||||
const member = resp.data.find(elem => elem.userId === this.userId);
|
||||
if (member) {
|
||||
this.userRole = member.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', member.deviceCode);
|
||||
this.$store.dispatch('training/setUserRole', this.userRole);
|
||||
this.deviceCode = member.deviceCode;
|
||||
this.setSimulationPrdType(this.centralizedStationMap[member.deviceCode]);
|
||||
}
|
||||
getUserListCommon(this.group).then(res => {
|
||||
this.$store.dispatch('training/setSimulationUserList', res.data);
|
||||
}).catch(() => {
|
||||
@ -471,6 +479,14 @@ export default {
|
||||
// 获取仿真成员列表
|
||||
getSimulationMemberList(this.group).then(resp => {
|
||||
this.$store.dispatch('training/setMemberList', { memberList: resp.data, userId: this.userId });
|
||||
const member = resp.data.find(elem => elem.userId === this.userId);
|
||||
if (member) {
|
||||
this.userRole = member.type || 'AUDIENCE';
|
||||
this.$store.dispatch('training/setRoleDeviceCode', member.deviceCode);
|
||||
this.$store.dispatch('training/setUserRole', this.userRole);
|
||||
this.deviceCode = member.deviceCode;
|
||||
this.setSimulationPrdType(this.centralizedStationMap[member.deviceCode]);
|
||||
}
|
||||
getAllSimulationUser(this.group).then(res => {
|
||||
this.$store.dispatch('training/setSimulationUserList', res.data);
|
||||
}).catch(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user