优化字典数据列表,表单
This commit is contained in:
@@ -44,6 +44,14 @@ async function updateDictData(
|
||||
) {
|
||||
return requestClient.put(`/system/dict_data/${id}/`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典数据select用
|
||||
*/
|
||||
async function getDictDataSimple() {
|
||||
return requestClient.get(`/system/dict_data/simple/`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新字典数据
|
||||
*
|
||||
@@ -69,6 +77,7 @@ export {
|
||||
createDictData,
|
||||
deleteDictData,
|
||||
getDictDataList,
|
||||
getDictDataSimple,
|
||||
patchDictData,
|
||||
updateDictData,
|
||||
};
|
||||
|
||||
@@ -128,15 +128,17 @@ export function useColumns(
|
||||
fixed: 'left',
|
||||
title: 'id',
|
||||
treeNode: true,
|
||||
width: 150,
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
field: 'label',
|
||||
title: '字典标签',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
field: 'value',
|
||||
title: '字典键值',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
@@ -187,7 +189,7 @@ export function useColumns(
|
||||
headerAlign: 'center',
|
||||
showOverflow: false,
|
||||
title: '操作',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ const [FormModal, formModalApi] = useVbenModal({
|
||||
});
|
||||
|
||||
/**
|
||||
* 编辑套餐
|
||||
* 编辑字典数据
|
||||
* @param row
|
||||
*/
|
||||
function onEdit(row: SystemDictDataApi.SystemDictData) {
|
||||
@@ -37,14 +37,18 @@ function onEdit(row: SystemDictDataApi.SystemDictData) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建新套餐
|
||||
* 创建字典数据
|
||||
*/
|
||||
function onCreate() {
|
||||
formModalApi.setData(null).open();
|
||||
formModalApi
|
||||
.setData({
|
||||
dict_type: Number(route.query.dict_type),
|
||||
})
|
||||
.open();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除套餐
|
||||
* 删除字典数据
|
||||
* @param row
|
||||
*/
|
||||
function onDelete(row: SystemDictDataApi.SystemDictData) {
|
||||
|
||||
@@ -80,6 +80,7 @@ export function useColumns(): VxeTableGridOptions<SystemLoginLogApi.SystemLoginL
|
||||
{
|
||||
field: 'user_ip',
|
||||
title: '登录地址',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
field: 'user_agent',
|
||||
|
||||
Reference in New Issue
Block a user