Commit 15a6c5f6 authored by 赵伟庚's avatar 赵伟庚

update:优化组织管理树形,修改角色管理编辑逻辑和内容

parent ff29ae2e
...@@ -74,7 +74,7 @@ import { useRouter } from 'vue-router'; ...@@ -74,7 +74,7 @@ import { useRouter } from 'vue-router';
const actionFlag = ref(false) const actionFlag = ref(false)
const selectData = ref(null) const selectData = ref(null)
const selectDataParent = ref(null) const selectDataParent = ref(null)
const mvDataParent = ref(null) const mvDataParent = ref([])
const treeRef = ref(null) const treeRef = ref(null)
const orgData = ref([]) const orgData = ref([])
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
class="role_form" class="role_form"
> >
<el-form-item prop="role_name" label="角色名称"> <el-form-item prop="role_name" label="角色名称">
<el-input v-model="formData.role_name" maxlength="50" show-word-limit /> <el-input v-model="formData.role_name" maxlength="50" show-word-limit :disabled="rowType != 0" />
</el-form-item> </el-form-item>
<el-form-item prop="role_desc" label="描述"> <el-form-item prop="role_desc" label="描述">
<el-input <el-input
...@@ -27,11 +27,12 @@ ...@@ -27,11 +27,12 @@
maxlength="300" maxlength="300"
show-word-limit show-word-limit
:autosize="{ minRows: 5 }" :autosize="{ minRows: 5 }"
:disabled="rowType != 0"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="数据权限" prop="data_purview"> <el-form-item label="数据权限" prop="data_purview">
<el-radio-group v-model="formData.data_purview"> <el-radio-group v-model="formData.data_purview" :disabled="rowType != 0" >
<el-radio :label="3">全平台所有</el-radio> <el-radio :label="3">全平台所有</el-radio>
<el-radio :label="2">本组织所有</el-radio> <el-radio :label="2">本组织所有</el-radio>
<el-radio :label="1">仅自己</el-radio> <el-radio :label="1">仅自己</el-radio>
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
inline-prompt inline-prompt
active-text="是" active-text="是"
inactive-text="否" inactive-text="否"
:disabled="rowType != 0"
/> />
</el-form-item> </el-form-item>
...@@ -117,6 +119,7 @@ const roleState = reactive({ ...@@ -117,6 +119,7 @@ const roleState = reactive({
children: 'Child', children: 'Child',
}, // 菜单框默认配置 }, // 菜单框默认配置
permissionData: [], // 菜单数据 permissionData: [], // 菜单数据
rowType: 0,
}) })
const getMenuTree = () => { const getMenuTree = () => {
axios axios
...@@ -140,6 +143,7 @@ const getRoleDetail = () => { ...@@ -140,6 +143,7 @@ const getRoleDetail = () => {
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
let { role_name, role_desc, data_purview, state, menus } = res.data.data let { role_name, role_desc, data_purview, state, menus } = res.data.data
roleState.rowType = res.data.data.role_type
let permission_arr = [] let permission_arr = []
if (menus && menus.length > 0) { if (menus && menus.length > 0) {
menus.forEach(e => { menus.forEach(e => {
...@@ -214,6 +218,7 @@ const { ...@@ -214,6 +218,7 @@ const {
rules, rules,
defaultProps, defaultProps,
permissionData, permissionData,
rowType,
} = toRefs(roleState) } = toRefs(roleState)
</script> </script>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
{{ row.created_time.split("+")[0].replace("T", " ").replace("Z", " ") }} {{ row.created_time.split("+")[0].replace("T", " ").replace("Z", " ") }}
</template> </template>
<template v-slot:action="{ row }"> <template v-slot:action="{ row }">
<bg-table-btn class="can_click_text" :click="()=>{edit_row(row)}" :disabled="row.state == 1 || row.role_type == 1"> <bg-table-btn class="can_click_text" :click="()=>{edit_row(row)}">
编辑 编辑
</bg-table-btn> </bg-table-btn>
<bg-table-btn class="can_click_text" :click="()=>{distribute_user(row)}" :disabled="row.cant_allot == 1"> <bg-table-btn class="can_click_text" :click="()=>{distribute_user(row)}" :disabled="row.cant_allot == 1">
...@@ -621,6 +621,17 @@ const { ...@@ -621,6 +621,17 @@ const {
height: calc(100% - 68px); height: calc(100% - 68px);
.user_table { .user_table {
max-height: calc(100% - 48px); max-height: calc(100% - 48px);
:deep().bg-table {
.el-scrollbar {
--el-scrollbar-bg-color: #fff
}
.el-table__empty-block {
.empty_container {
height: calc(100% - 45px);
}
}
}
} }
} }
} }
......
...@@ -40,12 +40,6 @@ var adminMenu = [ ...@@ -40,12 +40,6 @@ var adminMenu = [
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25", dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2, menuType: 2,
}, },
{
menuName: "ui服务测试",
path: "/ui-example",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
},
{ {
menuName: "注册认证", menuName: "注册认证",
path: "/register-valid", path: "/register-valid",
...@@ -99,6 +93,14 @@ var adminMenu = [ ...@@ -99,6 +93,14 @@ var adminMenu = [
path: "/ability-manage/sold-list/service-test", path: "/ability-manage/sold-list/service-test",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25", dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2, menuType: 2,
children: [
{
menuName: "ui服务测试",
path: "/ui-example",
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
menuType: 2,
},
]
}, },
], ],
dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25", dict_group_id: "64c156e0-bfff-4bfc-a63a-56effe130a25",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment