Commit eb257f77 by jack

业务可见度增加校验

1 parent dedfa5d4
......@@ -222,6 +222,13 @@ export default {
{ required: true, message: "请选择数据权限" },
{ validator: checkRolePermissionType, trigger: "change" },
],
bizPermissionType: [
{
required: true,
message: "请选择业务数据可见度",
trigger: "change",
},
],
menuIdList: [{ required: true, validator: checkMenu, trigger: "blur" }],
},
treedata: [],
......@@ -263,12 +270,12 @@ export default {
// 业务数据可见度
let row = this.dataVisibilityList;
let arr = []
for(let k in row){
let m = {}
m.type = k
m.visibility = row[k]
arr.push(m)
let arr = [];
for (let k in row) {
let m = {};
m.type = k;
m.visibility = row[k];
arr.push(m);
}
params.bizDataPermissions = arr;
......@@ -340,19 +347,23 @@ export default {
editEvent(row) {
const that = this;
roleInfo({ id: row.id }).then((res) => {
let obj = res.data || {}
let obj = res.data || {};
this.roleForm = JSON.parse(JSON.stringify(res.data));
this.roleForm.enableStatus = res.data.enableStatus == 1 ? true : false;
this.roleForm.roleVisibility = res.data.roleVisibility;
this.roleForm.rolePermissionType = res.data.rolePermissionType;
let list = obj.bizDataPermissions||[]
let options = {}
if(list && list.length>0){
list.map(k => {
options[k.type] = k.visibility
})
this.$set(this.roleForm,'bizPermissionType',Number(list[0].type))
let list = obj.bizDataPermissions || [];
let options = {};
if (list && list.length > 0) {
list.map((k) => {
options[k.type] = k.visibility;
});
this.$set(this.roleForm, "bizPermissionType", Number(list[0].type));
} else {
// 针对历史数据,写个默认数据
options[1] = 1;
this.$set(this.roleForm, "bizPermissionType", 2);
}
this.dataVisibilityList = options;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!