style: 部门管理页面排版

This commit is contained in:
TsMask
2024-01-10 16:04:30 +08:00
parent 515cc7dbf5
commit 81f0da4f1b
3 changed files with 18 additions and 11 deletions

View File

@@ -1390,7 +1390,6 @@ export default {
open:'Exhibition', open:'Exhibition',
close:'Fold', close:'Fold',
addClass:'Add new sub-department', addClass:'Add new sub-department',
showSort:'Show Sort',
admin:'Principal', admin:'Principal',
phone:'Contact Number', phone:'Contact Number',
email:'Mail', email:'Mail',

View File

@@ -1390,7 +1390,6 @@ export default {
open:'展', open:'展',
close:'折', close:'折',
addClass:'新增子部门', addClass:'新增子部门',
showSort:'显示排序',
admin:'负责人', admin:'负责人',
phone:'联系电话', phone:'联系电话',
email:'邮箱', email:'邮箱',

View File

@@ -84,28 +84,33 @@ let tableColumns: ColumnsType = [
{ {
title: t('views.system.dept.className'), title: t('views.system.dept.className'),
dataIndex: 'deptName', dataIndex: 'deptName',
align: 'center', align: 'left',
width: 300,
}, },
{ {
title: t('views.system.dept.classId'), title: t('views.system.dept.classId'),
dataIndex: 'deptId', dataIndex: 'deptId',
align: 'center', align: 'left',
width: 150,
}, },
{ {
title: t('views.system.dept.className'), title: t('views.system.dept.classSort'),
dataIndex: 'orderNum', dataIndex: 'orderNum',
align: 'center', align: 'left',
width: 200,
}, },
{ {
title: t('views.system.dept.status'), title: t('views.system.dept.status'),
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
align: 'center', align: 'center',
width: 150,
}, },
{ {
title: t('views.system.dept.createTime'), title: t('views.system.dept.createTime'),
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'center', align: 'center',
width: 150,
customRender(opt) { customRender(opt) {
if (+opt.value <= 0) return ''; if (+opt.value <= 0) return '';
return parseDateToStr(+opt.value); return parseDateToStr(+opt.value);
@@ -114,7 +119,7 @@ let tableColumns: ColumnsType = [
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'deptId', key: 'deptId',
align: 'center', align: 'left',
}, },
]; ];
@@ -553,7 +558,7 @@ onMounted(() => {
:size="tableState.size" :size="tableState.size"
:row-class-name="fnTableStriped" :row-class-name="fnTableStriped"
:pagination="false" :pagination="false"
:scroll="{ x: true }" :scroll="{ x: tableColumns.length * 120 }"
children-column-name="children" children-column-name="children"
:expanded-row-keys="tableState.expandedRowKeys" :expanded-row-keys="tableState.expandedRowKeys"
@expandedRowsChange="fnTableExpandedRowsChange" @expandedRowsChange="fnTableExpandedRowsChange"
@@ -594,7 +599,7 @@ onMounted(() => {
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip v-if="record.status !== '0'"> <a-tooltip placement="topRight" v-if="record.status !== '0'">
<template #title>{{ <template #title>{{
t('views.system.dept.addClass') t('views.system.dept.addClass')
}}</template> }}</template>
@@ -653,7 +658,7 @@ onMounted(() => {
</a-col> </a-col>
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-form-item <a-form-item
:label="t('views.system.dept.showSort')" :label="t('views.system.dept.classSort')"
name="orderNum" name="orderNum"
> >
{{ modalState.from.orderNum }} {{ modalState.from.orderNum }}
@@ -727,6 +732,8 @@ onMounted(() => {
:label="t('views.system.dept.highClass')" :label="t('views.system.dept.highClass')"
name="parentId" name="parentId"
v-bind="modalStateFrom.validateInfos.parentId" v-bind="modalStateFrom.validateInfos.parentId"
:label-col="{ span: 3 }"
:labelWrap="true"
> >
<a-tree-select <a-tree-select
v-model:value="modalState.from.parentId" v-model:value="modalState.from.parentId"
@@ -750,6 +757,8 @@ onMounted(() => {
:label="t('views.system.dept.className')" :label="t('views.system.dept.className')"
name="deptName" name="deptName"
v-bind="modalStateFrom.validateInfos.deptName" v-bind="modalStateFrom.validateInfos.deptName"
:label-col="{ span: 3 }"
:labelWrap="true"
> >
<a-input <a-input
v-model:value="modalState.from.deptName" v-model:value="modalState.from.deptName"
@@ -771,7 +780,7 @@ onMounted(() => {
</a-col> </a-col>
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-form-item <a-form-item
:label="t('views.system.dept.showSort')" :label="t('views.system.dept.classSort')"
name="orderNum" name="orderNum"
> >
<a-input-number <a-input-number