From 002a2fddd2b72174b5141d901aaed25bb5f7cd59 Mon Sep 17 00:00:00 2001
From: dong <58670809@qq.com>
Date: Tue, 1 Nov 2022 14:02:40 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/userRulesManage.js | 8 ++
src/scripts/ConstConfig.js | 17 +++-
src/views/functionManage/index.vue | 9 --
src/views/permissionManage/create.vue | 7 +-
src/views/permissionManage/index.vue | 11 +--
src/views/trainingPlatform/simulation.vue | 87 +++++++++++++++-----
src/views/userRulesManage/index.vue | 19 ++---
src/views/userRulesManage/permissionList.vue | 12 +--
8 files changed, 101 insertions(+), 69 deletions(-)
diff --git a/src/api/userRulesManage.js b/src/api/userRulesManage.js
index fbaa6aced..df2dfbe01 100644
--- a/src/api/userRulesManage.js
+++ b/src/api/userRulesManage.js
@@ -25,3 +25,11 @@ export function getPermissonInDistribute(subjectId) {
method: 'get'
});
}
+
+/** 查看当前mapId 下用户的所有权限及功能*/
+export function getMapIdPermisson(mapId) {
+ return request({
+ url: `/api/v2/permission/subject/permission/${mapId}`,
+ method: 'get'
+ });
+}
diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js
index 0fc62b905..ac8b6c0b4 100644
--- a/src/scripts/ConstConfig.js
+++ b/src/scripts/ConstConfig.js
@@ -257,6 +257,19 @@ export default {
{ label: 'SF', value: 'SF' },
{ label: 'SD', value: 'SD' }
],
+ permissionTypeList: [ // 权限类型
+ {label: '项目', value: 0},
+ {label: '线路', value: 1},
+ {label: '线路功能', value: 2}
+ ],
+ EffectiveTypeList: [ // 有效类型
+ { value: '1', label: '有效'},
+ { value: '2', label: '无效'}
+ ],
+ subTypeList: [ // 主体类型
+ { value: 'user', label: '个人'},
+ { value: 'org', label: '组织'}
+ ],
trainingType: [
// 实训类型
{ enlabel: 'single operation', label: '单操', value: 'SINGLE' },
@@ -294,7 +307,7 @@ export default {
{ label: '自动闭塞', value: 'StationDirectionAuto' },
{ label: '半自动闭塞', value: 'StationDirectionSemi' }
],
- paperStateArr: ['正在编辑', '封存', '已使用'], //试卷定义状态
- paperStateQueryArr: ['所有', '正在编辑', '可生成试卷', '封存', '已被使用'], //试卷定义查询状态
+ paperStateArr: ['正在编辑', '封存', '已使用'], // 试卷定义状态
+ paperStateQueryArr: ['所有', '正在编辑', '可生成试卷', '封存', '已被使用'] // 试卷定义查询状态
}
};
diff --git a/src/views/functionManage/index.vue b/src/views/functionManage/index.vue
index 0e4714d43..bff6cacce 100644
--- a/src/views/functionManage/index.vue
+++ b/src/views/functionManage/index.vue
@@ -14,7 +14,6 @@ export default {
},
data() {
return {
- PermissionTypeList: [],
mapList: [],
pagerConfig: {
pageSize: 'pageSize',
@@ -81,14 +80,6 @@ export default {
},
methods: {
loadInitData() {
- // this.$Dictionary.permissionType().then(list => {
- // list.forEach(elem => {
- // this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
- // });
- // this.$convertList(list, this.PermissionTypeList, elem => {
- // return true;
- // });
- // });
// 获取地图
this.mapList = [];
getPublishMapListOnline().then(res => {
diff --git a/src/views/permissionManage/create.vue b/src/views/permissionManage/create.vue
index 5ad251967..d28c32c00 100644
--- a/src/views/permissionManage/create.vue
+++ b/src/views/permissionManage/create.vue
@@ -67,10 +67,6 @@ export default {
required:true,
type:Array
},
- permissionTypeList: {
- required:true,
- type:Array
- },
mapList: {
required:true,
type:Array
@@ -128,6 +124,9 @@ export default {
return this.abilityList.filter(item => {
return item.mapName == this.mapName;
});
+ },
+ permissionTypeList() {
+ return this.$ConstSelect.permissionTypeList;
}
},
methods: {
diff --git a/src/views/permissionManage/index.vue b/src/views/permissionManage/index.vue
index b498d6e7d..5dbe519fb 100644
--- a/src/views/permissionManage/index.vue
+++ b/src/views/permissionManage/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -35,11 +35,6 @@ export default {
},
data() {
return {
- permissionTypeList: [
- {label: '项目', value: 0},
- {label: '线路', value: 1},
- {label: '线路功能', value: 2}
- ],
mapList: [],
abilityList: [],
pagerConfig: {
@@ -103,7 +98,7 @@ export default {
title: this.$t('orderAuthor.permissionType'),
prop: 'permissionType',
type: 'tag',
- columnValue: (row) => { return this.$convertField(row.permissionType, this.permissionTypeList, ['value', 'label']); },
+ columnValue: (row) => { return this.$ConstSelect.translate(row.permissionType, 'permissionTypeList'); },
tagType: (row) => { return ''; }
},
{
@@ -183,7 +178,7 @@ export default {
},
methods: {
loadInitData() {
- this.queryForm.queryObject.permissionType.config.data = this.permissionTypeList;
+ this.queryForm.queryObject.permissionType.config.data = this.$ConstSelect.permissionTypeList;
this.queryForm.queryObject.projectCode.config.data = ProjectList;
// 获取地图
queryMapListByUser().then(res => {
diff --git a/src/views/trainingPlatform/simulation.vue b/src/views/trainingPlatform/simulation.vue
index e7a98fedf..cfbbe9920 100644
--- a/src/views/trainingPlatform/simulation.vue
+++ b/src/views/trainingPlatform/simulation.vue
@@ -21,7 +21,7 @@