This commit is contained in:
u2nyakim 2025-08-25 18:01:25 +08:00
parent 724c39b974
commit 907eb67dc7
2 changed files with 20 additions and 14 deletions

View File

@ -16,7 +16,9 @@ class ConfigController extends BaseController
'group'=> $this->request->get('group/s','') 'group'=> $this->request->get('group/s','')
]); ]);
$data = CurdService::getList($this->request, $model); $list = CurdService::getList($this->request, $model)->toArray();
$data = list_build_tree($list);
return $this->writeSuccess('success', $data); return $this->writeSuccess('success', $data);
} }

View File

@ -35,16 +35,22 @@
添加 添加
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="d">
<el-link type="primary" underline="never" @click="openEdit(row)"> {{ d }}
修改 <!-- <template v-if="['tabs'].indexOf(row.type) != -1">-->
</el-link> <!-- {{ row }}-->
<template v-if="row.group != 'system'"> <!-- <el-link type="primary" underline="never" @click="openEdit(row)">添加子项</el-link>-->
<el-divider direction="vertical"/> <!-- <el-divider direction="vertical"/>-->
<el-link type="danger" underline="never" @click="remove(row)"> <!-- </template>-->
删除 <!-- <el-link type="primary" underline="never" @click="openEdit(row)">-->
</el-link> <!-- 修改-->
</template> <!-- </el-link>-->
<!-- <template v-if="row.group != 'system'">-->
<!-- <el-divider direction="vertical"/>-->
<!-- <el-link type="danger" underline="never" @click="remove(row)">-->
<!-- 删除-->
<!-- </el-link>-->
<!-- </template>-->
</template> </template>
<template #status="{ row }"> <template #status="{ row }">
<el-switch <el-switch
@ -92,7 +98,6 @@ const columns = ref<Columns>([
{ {
prop: 'name', prop: 'name',
label: '名称', label: '名称',
sortable: 'custom',
minWidth: 120 minWidth: 120
}, },
{ {
@ -110,7 +115,6 @@ const columns = ref<Columns>([
label: '状态', label: '状态',
width: 90, width: 90,
align: 'center', align: 'center',
sortable: 'custom',
slot: 'status', slot: 'status',
formatter: (row) => (row.status == 0 ? '正常' : '冻结') formatter: (row) => (row.status == 0 ? '正常' : '冻结')
}, },
@ -128,7 +132,7 @@ const columns = ref<Columns>([
columnKey: 'action', columnKey: 'action',
label: '操作', label: '操作',
width: 200, width: 200,
align: 'center' /* , align: 'right' /* ,
fixed: 'right' */, fixed: 'right' */,
slot: 'action', slot: 'action',
hideInPrint: true, hideInPrint: true,