update 用户管理,角色管理表格左对齐

This commit is contained in:
lb 2022-11-14 11:02:21 +08:00
parent 1f73240063
commit 35051463ad
2 changed files with 61 additions and 66 deletions

View File

@ -7,10 +7,7 @@
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<head-form <head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
:form-config="headFormConfig"
@headBtnClick="btnClick"
/>
<base-table <base-table
:top-btn-config="topBtnConfig" :top-btn-config="topBtnConfig"
:table-config="tableProps" :table-config="tableProps"
@ -20,14 +17,15 @@
:limit="listQuery.size" :limit="listQuery.size"
@clickTopBtn="clickTopBtn" @clickTopBtn="clickTopBtn"
> >
<method-btn <method-btn slot="handleBtn" :width="trueWidth" :method-list="tableBtn" @clickBtn="handleClick" />
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
</base-table> </base-table>
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" @pagination="getList" /> <pagination
v-show="total > 0"
:total="total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
@pagination="getList"
/>
<add-form :visible.sync="showDialog" @done="getList" /> <add-form :visible.sync="showDialog" @done="getList" />
<edit-form :visible.sync="showEditDialog" :target-info="{ id: curEditId }" @done="getList" /> <edit-form :visible.sync="showEditDialog" :target-info="{ id: curEditId }" @done="getList" />
<menu-empower ref="empowerRef" :visible.sync="empowerDialog" @done="getList" /> <menu-empower ref="empowerRef" :visible.sync="empowerDialog" @done="getList" />
@ -45,29 +43,33 @@ const topBtnConfig = [
} }
] ]
// edit here // edit here
const tableBtn = [{ const tableBtn = [
{
type: 'edit', type: 'edit',
btnName: 'btn.edit' btnName: 'btn.edit'
}, { },
{
type: 'EmPower', type: 'EmPower',
btnName: i18n.t('roleManage.roleEmPower') btnName: i18n.t('roleManage.roleEmPower')
}, { },
{
type: 'delete', type: 'delete',
btnName: 'btn.delete' btnName: 'btn.delete'
} }
] ]
const tableProps = [{ const tableProps = [
{
prop: 'code', prop: 'code',
label: i18n.t('roleManage.roleCode'), label: i18n.t('roleManage.roleCode')
align: 'center' },
}, { {
prop: 'name', prop: 'name',
label: i18n.t('roleManage.roleName'), label: i18n.t('roleManage.roleName')
align: 'center' },
}, { {
prop: 'enabled', prop: 'enabled',
label: i18n.t('roleManage.status'), label: i18n.t('roleManage.status'),
align: 'center',
filter: basicData('enableState') filter: basicData('enableState')
}, },
// { // {
@ -78,9 +80,9 @@ const tableProps = [{
// }, // },
{ {
prop: 'remark', prop: 'remark',
label: i18n.t('roleManage.remark'), label: i18n.t('roleManage.remark')
align: 'center' }
}] ]
import AddForm from './AddForm' import AddForm from './AddForm'
import EditForm from './EditForm' import EditForm from './EditForm'
import menuEmpower from './menuEmpower' import menuEmpower from './menuEmpower'

View File

@ -112,55 +112,48 @@ const tableBtn = [
const tableProps = [ const tableProps = [
{ {
prop: 'name', prop: 'name',
label: i18n.t('userManage.userName'), label: i18n.t('userManage.userName')
align: 'center'
}, },
{ {
prop: 'email', prop: 'email',
label: i18n.t('userManage.email'), label: i18n.t('userManage.email')
align: 'center'
}, },
{ {
prop: 'mobile', prop: 'mobile',
label: i18n.t('userManage.mobile'), label: i18n.t('userManage.mobile')
align: 'center'
}, },
// { // {
// prop: 'birthday', // prop: 'birthday',
// label: i18n.t('userManage.birthday'), // label: i18n.t('userManage.birthday'),
// align: 'center' //
// }, // },
{ {
prop: 'orgName', prop: 'orgName',
label: i18n.t('userManage.orgName'), label: i18n.t('userManage.orgName')
align: 'center'
}, },
{ {
prop: 'roleName', prop: 'roleName',
label: i18n.t('roleManage.roleName'), label: i18n.t('roleManage.roleName')
align: 'center'
}, },
// { // {
// prop: 'sex', // prop: 'sex',
// label: i18n.t('userManage.sex'), // label: i18n.t('userManage.sex'),
// align: 'center', //
// filter: dataDict('sex') // filter: dataDict('sex')
// }, // },
{ {
prop: 'code', prop: 'code',
label: i18n.t('userManage.code'), label: i18n.t('userManage.code')
align: 'center'
}, },
{ {
prop: 'enabled', prop: 'enabled',
label: i18n.t('userManage.status'), label: i18n.t('userManage.status'),
align: 'center',
filter: dataDict('enableState') filter: dataDict('enableState')
}, },
{ {
prop: 'remark', prop: 'remark',
label: i18n.t('userManage.remark'), label: i18n.t('userManage.remark')
align: 'center'
} }
] ]
export default { export default {