创建列表设置页面
parent
39877e9d3f
commit
72aa79f2f5
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* @Description: 基础配置 -> 列表设置接口
|
||||
* @Author: lijj
|
||||
* @Date: 2024-04-16 14:44:08
|
||||
*/
|
||||
import { request } from '/@/utils/request'
|
||||
import { DataResult, PageRequest } from '/@/api/model/baseModel'
|
||||
enum Api {
|
||||
list = '/mainApi/ColumnSet/GetColumnSetList',
|
||||
}
|
||||
// 列表数据
|
||||
export function getColumnSetList(data: PageRequest) {
|
||||
return request<DataResult>({
|
||||
url: Api.list,
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* @Description: 基础配置 -> 列表设置
|
||||
* @Author: lijj
|
||||
* @Date: 2024-04-16 10:33:31
|
||||
-->
|
||||
<template>
|
||||
<div class="table-set">222</div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate"> 添加表单设置 </a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
icon: 'clarity:note-edit-line',
|
||||
tooltip: '编辑',
|
||||
onClick: handleAudit.bind(null, record),
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
|
||||
import { onMounted } from 'vue'
|
||||
import { getColumnSetList } from './api'
|
||||
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
|
||||
title: '表单设置列表',
|
||||
api: async (p) => {
|
||||
console.log(p, 11)
|
||||
const res: API.DataResult = await getColumnSetList(p)
|
||||
|
||||
return new Promise((resolve) => {
|
||||
resolve({ data: [...res.data], total: res.count })
|
||||
})
|
||||
},
|
||||
})
|
||||
// 页面初始化接口
|
||||
// const init = () => {
|
||||
// getColumnSetList()
|
||||
// }
|
||||
onMounted(() => {
|
||||
console.log(1111)
|
||||
})
|
||||
</script>
|
Loading…
Reference in New Issue