This commit is contained in:
sjl
2024-11-14 18:26:34 +08:00
parent 65cb7826d3
commit 87fe66da3e
42 changed files with 188 additions and 204 deletions

View File

@@ -39,25 +39,32 @@
const treePopup = ref()
const columns = reactive<ColumnProps<Dict.ResDictTree>[]>([
{ type: 'index', fixed: 'left', width: 70, label: '序号' },
{
prop: 'name',
label: '字典名称',
},
{
prop: 'code',
label: '编码',
},
{
prop: 'remark',
label: '描述',
},
{
prop: 'sort',
label: '排序',
width:70,
render: scope => {
return String(scope.row.sort) // 将数字转换为字符串
},
},
{
prop: 'state',
label: '状态',
minWidth:30,
isShow:false,
enum: dictStore.getDictData('state'),
fieldNames: { label: 'label', value: 'code' },
render: scope => {
@@ -65,6 +72,7 @@
<el-tag type={scope.row.state === 0 ? 'success' : (scope.row.state === 1 ? 'warning' : 'danger')}>
{scope.row.state === 0 ? '正常' : (scope.row.state === 1 ? '停用' : '删除')}
</el-tag>
)
},
},
@@ -72,6 +80,7 @@
prop: 'operation',
label: '操作',
fixed: 'right',
width:250,
},
])
@@ -83,7 +92,6 @@
// 删除字典类型
const handleDelete = async (params: Dict.ResDictTree) => {
//console.log(params)
await useHandleData(deleteDictTree, params, `删除【${params.name}】树形字典类型`)
proTable.value?.getTableList()
}