fix: 修复role新增编辑bug, 调整列表页

This commit is contained in:
lilinyuan
2024-03-29 14:06:47 +08:00
parent 51cf038bed
commit 47a4c311af
2 changed files with 9 additions and 5 deletions

View File

@@ -154,7 +154,11 @@ const filterMenu = (value, data) => {
}
const checkChange = (data) => {
return menuTree.value.getCheckedKeys()
// 获取已选
const checkedKeys = menuTree.value.getCheckedKeys()
// 获取半选
const halfCheckedKeys = menuTree.value.getHalfCheckedKeys()
return [...checkedKeys, ...halfCheckedKeys]
}
const checkBoxChange = (val) => {

View File

@@ -109,10 +109,10 @@ const tableConfig = reactive({
align: 'center'
},
{
prop: 'dataScope',
label: '数据范围',
prop: 'template',
label: '是否为模版角色',
align: 'center',
currentRender: ({row, index}) => (<span>{formatDataScope(row.dataScope)}</span>)
currentRender: ({row, index}) => (<Tag dictType={'yes_no'} value={row.template ? '1' : '0'} />)
},
{
prop: 'roleSort',
@@ -154,7 +154,7 @@ const tableConfig = reactive({
btn.push({label: '删除', auth: auths.edit, func: ()=>handleDel(row) , type: 'danger'})
}
return (
<div>
<div style={{width: '100%'}}>
{
btn.map(item=>(
<el-button