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>
<div class="app-container">
<head-form
:form-config="headFormConfig"
@headBtnClick="btnClick"
/>
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:top-btn-config="topBtnConfig"
:table-config="tableProps"
@ -20,16 +17,17 @@
:limit="listQuery.size"
@clickTopBtn="clickTopBtn"
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
<method-btn slot="handleBtn" :width="trueWidth" :method-list="tableBtn" @clickBtn="handleClick" />
</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" />
<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" />
</div>
</template>
@ -45,42 +43,46 @@ const topBtnConfig = [
}
]
// edit here
const tableBtn = [{
type: 'edit',
btnName: 'btn.edit'
}, {
type: 'EmPower',
btnName: i18n.t('roleManage.roleEmPower')
}, {
type: 'delete',
btnName: 'btn.delete'
}
const tableBtn = [
{
type: 'edit',
btnName: 'btn.edit'
},
{
type: 'EmPower',
btnName: i18n.t('roleManage.roleEmPower')
},
{
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 EditForm from './EditForm'
import menuEmpower from './menuEmpower'
@ -193,7 +195,7 @@ export default {
},
clickTopBtn(val) {
if (val === 'add') {
this.addNew()//
this.addNew() //
}
}
}

View File

@ -112,55 +112,48 @@ const tableBtn = [
const tableProps = [
{
prop: 'name',
label: i18n.t('userManage.userName'),
align: 'center'
label: i18n.t('userManage.userName')
},
{
prop: 'email',
label: i18n.t('userManage.email'),
align: 'center'
label: i18n.t('userManage.email')
},
{
prop: 'mobile',
label: i18n.t('userManage.mobile'),
align: 'center'
label: i18n.t('userManage.mobile')
},
// {
// prop: 'birthday',
// label: i18n.t('userManage.birthday'),
// align: 'center'
//
// },
{
prop: 'orgName',
label: i18n.t('userManage.orgName'),
align: 'center'
label: i18n.t('userManage.orgName')
},
{
prop: 'roleName',
label: i18n.t('roleManage.roleName'),
align: 'center'
label: i18n.t('roleManage.roleName')
},
// {
// prop: 'sex',
// label: i18n.t('userManage.sex'),
// align: 'center',
//
// filter: dataDict('sex')
// },
{
prop: 'code',
label: i18n.t('userManage.code'),
align: 'center'
label: i18n.t('userManage.code')
},
{
prop: 'enabled',
label: i18n.t('userManage.status'),
align: 'center',
filter: dataDict('enableState')
},
{
prop: 'remark',
label: i18n.t('userManage.remark'),
align: 'center'
label: i18n.t('userManage.remark')
}
]
export default {
@ -244,7 +237,7 @@ export default {
confirmButtonText: i18n.t('btn.confirm'),
cancelButtonText: i18n.t('btn.cancel'),
type: 'warning'
}).then(async () => {
}).then(async() => {
//
const result = await delUser({
id: raw.data.id