优化系统管理模块

This commit is contained in:
zjl 2024-12-12 15:32:32 +08:00
parent 2f9fd9f0fa
commit 9026f05899
9 changed files with 137 additions and 83 deletions

View File

@ -20,11 +20,11 @@
ref="tableRef"
:data="lists"
row-key="id"
:height="fwbHeight"
:height="fwbHeight"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<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 label="部门名称" prop="name" min-width="200" show-overflow-tooltip />
<el-table-column align="center" label="部门类型" prop="type" min-width="100">
<!-- <template #default="{ row }">
<div v-if="row.type ==1">公司</div>
<div v-else-if="row.type == 2">子公司</div>
@ -39,7 +39,7 @@
</template>
</el-table-column>
<el-table-column align="center" label="部门排序" prop="sort" min-width="100" />
<el-table-column align="center" label="部门备注" prop="note" min-width="100" />
<el-table-column align="center" label="部门备注" prop="note" min-width="200" />
<el-table-column align="center" label="创建人" prop="createUser" min-width="180" />
<el-table-column align="center" label="创建时间" prop="createTime" min-width="180" />
<el-table-column align="center" label="操作" width="300" fixed="right">

View File

@ -13,10 +13,12 @@ export const columns = [
{
label: '职级名称',
prop: 'name',
width: 100,
},
{
label: '职级状态',
prop: 'status',
width: 100,
render(record) {
return h(
ElTag,
@ -32,10 +34,12 @@ export const columns = [
{
label: '排序',
prop: 'sort',
width: 100,
},
{
label: '创建人',
prop: 'createUser',
width: 100,
},
{
label: '创建时间',

View File

@ -12,15 +12,24 @@ export const columns = [
},
{
label: '访客',
align:'left',
render(record){
align: 'left',
width: 200,
render(record) {
return h('div', [
h('div',{
style: {marginBottom:'5px'}
}, record.row.username),
h('div',{
style: { marginBottom:'5px'}
}, record.row.ip),
h(
'div',
{
style: { marginBottom: '5px' },
},
record.row.username,
),
h(
'div',
{
style: { marginBottom: '5px' },
},
record.row.ip,
),
h(
ElTag,
{
@ -30,41 +39,47 @@ export const columns = [
default: () => record.row.location,
},
),
])
}
]);
},
},
{
label: '请求接口',
align:'left',
render(record){
align: 'left',
width: 200,
render(record) {
return h('div', [
h(ElTag,
h(
ElTag,
{
type: 'info',
style: {marginBottom:'5px'}
style: { marginBottom: '5px' },
},
{
default: () => (record.row.requestMethod),
}),
h('div', '接口:'+record.row.url),
default: () => record.row.requestMethod,
},
),
h('div', '接口:' + record.row.url),
h('div', '名称:' + record.title),
])
}
]);
},
},
{
label: '接口响应',
align:'left',
render(record){
align: 'left',
width: 250,
render(record) {
return h('div', [
h('span', '状态:'),
h(ElTag,
h(
ElTag,
{
type: record.row.status == 0 ? 'success' : 'danger',
style: {marginBottom:'5px'}
style: { marginBottom: '5px' },
},
{
default: () => (record.row.status == 0 ? '正常' : '异常'),
}),
},
),
h(
'div',
{
@ -73,19 +88,20 @@ export const columns = [
'请求耗时:' + record.row.consumeTime + 'ms',
),
h('div', '响应时间:' + record.row.updateTime),
])
}
]);
},
},
{
label: '操作来源',
align:'left',
render(record){
align: 'left',
width: 200,
render(record) {
return h('div', [
h('div', '系统:'+record.row.os),
h('div', '类型:'+record.row.typeText),
h('div', '来源:'+record.row.sourceText),
])
}
h('div', '系统:' + record.row.os),
h('div', '类型:' + record.row.typeText),
h('div', '来源:' + record.row.sourceText),
]);
},
},
{
label: '创建时间',

View File

@ -12,15 +12,24 @@ export const columns = [
},
{
label: '访客',
align:'left',
render(record){
align: 'left',
width: 200,
render(record) {
return h('div', [
h('div',{
style: {marginBottom:'5px'}
}, record.row.createUser),
h('div',{
style: { marginBottom:'5px'}
}, record.row.ip),
h(
'div',
{
style: { marginBottom: '5px' },
},
record.row.createUser,
),
h(
'div',
{
style: { marginBottom: '5px' },
},
record.row.ip,
),
h(
ElTag,
{
@ -30,41 +39,47 @@ export const columns = [
default: () => record.row.location,
},
),
])
}
]);
},
},
{
label: '请求接口',
align:'left',
render(record){
align: 'left',
width: 200,
render(record) {
return h('div', [
h(ElTag,
h(
ElTag,
{
type: 'info',
style: {marginBottom:'5px'}
style: { marginBottom: '5px' },
},
{
default: () => (record.row.requestMethod),
}),
h('div', '接口:'+record.row.url),
h('div', '名称:'+record.row.title),
])
}
default: () => record.row.requestMethod,
},
),
h('div', '接口:' + record.row.url),
h('div', '名称:' + record.row.title),
]);
},
},
{
label: '接口响应',
align:'left',
render(record){
align: 'left',
width: 250,
render(record) {
return h('div', [
h('span', '状态:'),
h(ElTag,
h(
ElTag,
{
type: record.row.status == 0 ? 'success' : 'danger',
style: {marginBottom:'5px'}
style: { marginBottom: '5px' },
},
{
default: () => (record.row.status == 0 ? '正常' : '异常'),
}),
},
),
h(
'div',
{
@ -73,19 +88,20 @@ export const columns = [
'请求耗时:' + record.row.consumeTime + 'ms',
),
h('div', '响应时间:' + record.row.updateTime),
])
}
]);
},
},
{
label: '操作来源',
align:'left',
render(record){
align: 'left',
width: 200,
render(record) {
return h('div', [
h('div', '系统:'+record.row.os),
h('div', '类型:'+record.row.typeText),
h('div', '来源:'+record.row.sourceText),
])
}
h('div', '系统:' + record.row.os),
h('div', '类型:' + record.row.typeText),
h('div', '来源:' + record.row.sourceText),
]);
},
},
{
label: '创建时间',

View File

@ -22,8 +22,8 @@
row-key="id"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<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 label="菜单名称" prop="name" min-width="200" show-overflow-tooltip />
<el-table-column align="center" label="类型" prop="type" min-width="100">
<template #default="{ row }">
<el-tag v-if="row.type == 0">菜单</el-tag>
<el-tag v-else-if="row.type == 1" type="warning">按钮</el-tag>
@ -35,7 +35,7 @@
<span v-else></span>
</template>
</el-table-column> -->
<el-table-column align="center" label="图标" prop="icon" min-width="80">
<el-table-column align="center" label="图标" prop="icon" min-width="100">
<template #default="{ row }">
<icon :name="row.icon" :size="20" v-if="row.icon" />
</template>
@ -44,7 +44,7 @@
align="center"
label="权限标识"
prop="permission"
min-width="150"
min-width="200"
show-overflow-tooltip
/>
<el-table-column align="center" label="状态" prop="status" min-width="100">
@ -115,11 +115,13 @@
} from 'vue';
import { getMenuList, menuDelete } from '@/api/system/menu';
import type { ElTable } from 'element-plus';
const tableRef = shallowRef<InstanceType<typeof ElTable>>();
import { confirm, message, buildTree } from '@/utils/auth';
/**
* 定义参数
*/
const tableRef = shallowRef<InstanceType<typeof ElTable>>();
const editDialog = defineAsyncComponent(() => import('./edit.vue'));
const isExpand = ref(false);
const loading = ref(false);
const editVisible = ref(false);

View File

@ -13,10 +13,12 @@ export const columns = [
{
label: '岗位名称',
prop: 'name',
width: 100,
},
{
label: '岗位状态',
prop: 'status',
width: 100,
render(record) {
return h(
ElTag,
@ -32,10 +34,12 @@ export const columns = [
{
label: '排序',
prop: 'sort',
width: 100,
},
{
label: '创建人',
prop: 'createUser',
width: 100,
},
{
label: '创建时间',

View File

@ -13,6 +13,7 @@ export const columns = [
{
label: '角色名称',
prop: 'name',
width: 150,
},
{
label: '角色编码',
@ -22,14 +23,17 @@ export const columns = [
{
label: '排序',
prop: 'sort',
width: 100,
},
{
label: '备注',
prop: 'note',
width: 200,
},
{
label: '创建人',
prop: 'createUser',
width: 100,
},
{
label: '创建时间',

View File

@ -18,10 +18,12 @@ export const columns = [
{
label: '租户编码',
prop: 'code',
width: 100,
},
{
label: '租户图片',
prop: 'image',
width: 100,
render(record) {
return h(ElAvatar, {
size: 48,
@ -30,20 +32,21 @@ export const columns = [
fit: 'fill',
});
},
width: 100,
},
{
label: '统一社会信用代码',
prop: 'license',
width: 200,
width: 160,
},
{
label: '租户限额',
prop: 'number',
width: 100,
},
{
label: '租户人数',
prop: 'userNum',
width: 100,
},
{
label: '到期时间',
@ -88,6 +91,7 @@ export const columns = [
{
label: '状态',
prop: 'status',
width: 100,
render(record) {
return h(
ElTag,
@ -103,6 +107,7 @@ export const columns = [
{
label: '创建人',
prop: 'createUser',
width: 100,
},
{
label: '创建时间',

View File

@ -13,16 +13,17 @@ export const columns = [
{
label: '登录账号',
prop: 'username',
width: 150,
width: 100,
},
{
label: '用户姓名',
prop: 'realname',
width: 150,
width: 100,
},
{
label: '头像',
prop: 'avatar',
width: 100,
render(record) {
return h(ElAvatar, {
size: 48,
@ -31,11 +32,11 @@ export const columns = [
fit: 'fill',
});
},
width: 100,
},
{
label: '性别',
prop: 'gender',
width: 100,
render(record) {
let typeText = '';
let color = '';
@ -74,6 +75,7 @@ export const columns = [
{
label: '用户角色',
prop: 'role',
width: 100,
render(record) {
let roleNames = '';
if (record.row.roles.length > 0) {
@ -81,7 +83,6 @@ export const columns = [
}
return h('span', roleNames || '-');
},
width: 100,
},
{
label: '职级',
@ -101,6 +102,7 @@ export const columns = [
{
label: '状态',
prop: 'status',
width: 100,
render(record) {
return h(
ElTag,
@ -116,6 +118,7 @@ export const columns = [
{
label: '创建人',
prop: 'createUser',
width: 100,
},
{
label: '创建时间',