问题调整
This commit is contained in:
parent
2b0ec10e81
commit
1ea7343267
@ -1562,13 +1562,13 @@ export const asyncRouter = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 多人仿真
|
||||
path: 'multiplayerSimulation',
|
||||
// component: multiplayerSimulation,
|
||||
meta: {
|
||||
i18n: 'newRouter.multiplayerSimulation'
|
||||
}
|
||||
},
|
||||
// { // 多人仿真
|
||||
// path: 'multiplayerSimulation',
|
||||
// // component: multiplayerSimulation,
|
||||
// meta: {
|
||||
// i18n: 'newRouter.multiplayerSimulation'
|
||||
// }
|
||||
// },
|
||||
{ // 监管仿真
|
||||
path: 'regulationSimulation',
|
||||
component: ExistingSimulation,
|
||||
|
@ -12,14 +12,14 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="联机" name="second">
|
||||
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
|
||||
<el-form ref="ruleForm" v-loading="loading" :model="ruleForm" :rules="rules" label-width="100px">
|
||||
<el-form-item label="仿真号" prop="inputGroup">
|
||||
<el-input v-model="ruleForm.inputGroup" placeholder="请输入仿真号" />
|
||||
<el-input v-model="ruleForm.inputGroup" placeholder="请输入仿真号" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="joinSimulation">立即加入</el-button>
|
||||
<el-button @click="resetGroup">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="joinSimulation">立即加入</el-button>
|
||||
<el-button @click="resetGroup">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="权限" name="third">
|
||||
@ -34,12 +34,11 @@
|
||||
<script>
|
||||
import { getMapIdPermisson } from '@/api/userRulesManage';
|
||||
import { queryMapFunctionList } from '@/api/trainingPlatform';
|
||||
import { superAdmin, admin } from '@/router/index';
|
||||
import selectRole from './selectRole/list';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { createSimulation } from '@/api/simulation';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
import { jointSimulationByPermission } from '@/api/jointSimulation';
|
||||
export default {
|
||||
name: 'Simulation',
|
||||
components: {
|
||||
@ -47,6 +46,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
param: '',
|
||||
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts', 'teaching', 'designteaching'],
|
||||
activeName: 'first',
|
||||
@ -98,14 +98,14 @@ export default {
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.permissionType, 'permissionTypeList'); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '主体类型',
|
||||
prop: 'subjectType',
|
||||
width: '80',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.subjectType, 'subTypeList'); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
// {
|
||||
// title: '主体类型',
|
||||
// prop: 'subjectType',
|
||||
// width: '80',
|
||||
// type: 'tag',
|
||||
// columnValue: (row) => { return this.$ConstSelect.translate(row.subjectType, 'subTypeList'); },
|
||||
// tagType: (row) => { return ''; }
|
||||
// },
|
||||
{
|
||||
title: '功能',
|
||||
prop: 'systemAbilityList',
|
||||
@ -159,26 +159,26 @@ export default {
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.belonger'),
|
||||
prop: 'named',
|
||||
width: '80',
|
||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '300',
|
||||
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0 || this.$store.state.user.roles.indexOf(admin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('permission.setBelonger'),
|
||||
handleClick: this.handleRoleVest,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// title: this.$t('permission.belonger'),
|
||||
// prop: 'named',
|
||||
// width: '80',
|
||||
// isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
|
||||
// },
|
||||
// {
|
||||
// type: 'button',
|
||||
// title: this.$t('global.operate'),
|
||||
// width: '300',
|
||||
// hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0 || this.$store.state.user.roles.indexOf(admin) < 0; },
|
||||
// buttons: [
|
||||
// {
|
||||
// name: this.$t('permission.setBelonger'),
|
||||
// handleClick: this.handleRoleVest,
|
||||
// type: ''
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -262,9 +262,28 @@ export default {
|
||||
this.disabled = false;
|
||||
});
|
||||
},
|
||||
joinSimulation() {
|
||||
|
||||
}
|
||||
async joinSimulation() {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
jointSimulationByPermission(this.ruleForm.inputGroup).then(resp => {
|
||||
this.loading = false;
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');
|
||||
if (error.code == 10002) {
|
||||
this.$messageBox(`${errorMessage}:房间已经存在,请从快速入口进入`);
|
||||
} else {
|
||||
this.$messageBox(`${errorMessage}:请稍后再试`);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
resetGroup() {
|
||||
this.ruleForm.inputGroup = '';
|
||||
this.$refs.ruleForm.resetFields();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user