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,16 +17,17 @@
: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" />
</div> </div>
</template> </template>
@ -45,42 +43,46 @@ const topBtnConfig = [
} }
] ]
// edit here // edit here
const tableBtn = [{ const tableBtn = [
type: 'edit', {
btnName: 'btn.edit' type: 'edit',
}, { btnName: 'btn.edit'
type: 'EmPower', },
btnName: i18n.t('roleManage.roleEmPower') {
}, { type: 'EmPower',
type: 'delete', btnName: i18n.t('roleManage.roleEmPower')
btnName: 'btn.delete' },
} {
type: 'delete',
btnName: 'btn.delete'
}
]
const tableProps = [
{
prop: 'code',
label: i18n.t('roleManage.roleCode')
},
{
prop: 'name',
label: i18n.t('roleManage.roleName')
},
{
prop: 'enabled',
label: i18n.t('roleManage.status'),
filter: basicData('enableState')
},
// {
// prop: 'category',
// label: i18n.t('roleManage.roleType'),
// align: 'center',
// filter: basicData('roleType')
// },
{
prop: 'remark',
label: i18n.t('roleManage.remark')
}
] ]
const tableProps = [{
prop: 'code',
label: i18n.t('roleManage.roleCode'),
align: 'center'
}, {
prop: 'name',
label: i18n.t('roleManage.roleName'),
align: 'center'
}, {
prop: 'enabled',
label: i18n.t('roleManage.status'),
align: 'center',
filter: basicData('enableState')
},
// {
// prop: 'category',
// label: i18n.t('roleManage.roleType'),
// align: 'center',
// filter: basicData('roleType')
// },
{
prop: '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'
@ -193,7 +195,7 @@ export default {
}, },
clickTopBtn(val) { clickTopBtn(val) {
if (val === 'add') { if (val === 'add') {
this.addNew()// this.addNew() //
} }
} }
} }

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 {
@ -244,7 +237,7 @@ export default {
confirmButtonText: i18n.t('btn.confirm'), confirmButtonText: i18n.t('btn.confirm'),
cancelButtonText: i18n.t('btn.cancel'), cancelButtonText: i18n.t('btn.cancel'),
type: 'warning' type: 'warning'
}).then(async () => { }).then(async() => {
// //
const result = await delUser({ const result = await delUser({
id: raw.data.id id: raw.data.id