优化用户、租户、部门、角色模块

This commit is contained in:
zjl 2024-08-30 10:03:03 +08:00
parent efefd1b348
commit bb2f767725
7 changed files with 45 additions and 21 deletions

View File

@ -11,10 +11,16 @@
:model="formData" :model="formData"
label-width="80px" label-width="80px"
> >
<el-form-item label="部门类型" prop="type"> <el-form-item
<el-select v-model="formData.type" class="flex-1" clearable placeholder="请选择部门类型"> label="部门名称"
<el-option v-for="(item, index) in optionData.deptTypeList" :key="index" :label="item.name" :value="item.id" /> prop="name"
</el-select> :rules="{ required: true, message: '请输入部门名称', trigger: 'blur' }"
>
<el-input
v-model="formData.name"
placeholder="请输入部门名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="父级部门" label="父级部门"
@ -35,16 +41,10 @@
check-strictly check-strictly
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="部门类型" prop="type">
label="部门名称" <el-select v-model="formData.type" class="flex-1" clearable placeholder="请选择部门类型">
prop="name" <el-option v-for="(item, index) in optionData.deptTypeList" :key="index" :label="item.name" :value="item.id" />
:rules="{ required: true, message: '请输入部门名称', trigger: 'blur' }" </el-select>
>
<el-input
v-model="formData.name"
placeholder="请输入部门名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="部门排序" prop="sort" class="flex-1"> <el-form-item label="部门排序" prop="sort" class="flex-1">
<div> <div>

View File

@ -18,11 +18,17 @@
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column label="部门名称" prop="name" min-width="150" show-overflow-tooltip/> <el-table-column label="部门名称" prop="name" min-width="150" show-overflow-tooltip/>
<el-table-column align="center" label="部门类型" prop="type" min-width="80"> <el-table-column align="center" label="部门类型" prop="type" min-width="80">
<template #default="{ row }"> <!-- <template #default="{ row }">
<div v-if="row.type ==1">公司</div> <div v-if="row.type ==1">公司</div>
<div v-else-if="row.type == 2">子公司</div> <div v-else-if="row.type == 2">子公司</div>
<div v-else-if="row.type == 3">部门</div> <div v-else-if="row.type == 3">部门</div>
<div v-else-if="row.type == 4">小组</div> <div v-else-if="row.type == 4">小组</div>
</template> -->
<template #default="{ row }">
<el-tag v-if="row.type == 1">公司</el-tag>
<el-tag v-else-if="row.type == 2" type="success">子公司</el-tag>
<el-tag v-else-if="row.type == 3" type="warning">部门</el-tag>
<el-tag v-else-if="row.type == 4" type="info">小组</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="部门排序" prop="sort" min-width="100"/> <el-table-column align="center" label="部门排序" prop="sort" min-width="100"/>

View File

@ -16,9 +16,14 @@ export const columns = [
{ {
label: '角色编码', label: '角色编码',
prop: 'code', prop: 'code',
width: 250,
}, },
{ {
label: '说明', label: '排序',
prop: 'sort',
},
{
label: '备注',
prop: 'note', prop: 'note',
}, },
{ {

View File

@ -76,7 +76,7 @@ const authVisible=ref(false)
const tableRef = ref(); const tableRef = ref();
const actionColumn = reactive({ const actionColumn = reactive({
width: 250, width: 300,
label: '操作', label: '操作',
prop: 'action', prop: 'action',
fixed: 'right', fixed: 'right',

View File

@ -12,6 +12,7 @@ export const columns = [
{ {
label: '租户名称', label: '租户名称',
prop: 'name', prop: 'name',
width: 150,
}, },
{ {
label: '租户编码', label: '租户编码',
@ -29,6 +30,7 @@ export const columns = [
{ {
label: '到期时间', label: '到期时间',
prop: 'expireTime', prop: 'expireTime',
width: 180,
}, },
{ {
label: '联系人姓名', label: '联系人姓名',
@ -48,12 +50,18 @@ export const columns = [
{ {
label: '联系人邮箱', label: '联系人邮箱',
prop: 'contactEmail', prop: 'contactEmail',
width:140 width:200
}, },
{ {
label: '联系人网址', label: '租户网址',
prop: 'contactSite', prop: 'contactSite',
width:140 width:140,
render(record) {
return h('a', {
href: record.row.contactSite,
target:"_blank"
}, "点击查看网址");
},
}, },
{ {
label: '状态', label: '状态',

View File

@ -12,10 +12,12 @@ export const columns = [
{ {
label: '登录账号', label: '登录账号',
prop: 'username', prop: 'username',
width: 100,
}, },
{ {
label: '用户姓名', label: '用户姓名',
prop: 'realname', prop: 'realname',
width: 100,
}, },
{ {
label: '头像', label: '头像',
@ -60,14 +62,17 @@ export const columns = [
} }
return h('span', roleNames || '-'); return h('span', roleNames || '-');
}, },
width: 100,
}, },
{ {
label: '职级', label: '职级',
prop: 'levelName', prop: 'levelName',
width: 100,
}, },
{ {
label: '岗位', label: '岗位',
prop: 'positionName', prop: 'positionName',
width: 100,
}, },
{ {
label: '部门', label: '部门',

View File

@ -117,7 +117,7 @@
const actionColumn = reactive({ const actionColumn = reactive({
width:360, width:370,
label: '操作', label: '操作',
prop: 'action', prop: 'action',
fixed: 'right', fixed: 'right',