mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-21 14:25:06 +08:00
主子表:同步三种模式的代码
This commit is contained in:
@ -11,12 +11,7 @@
|
||||
<el-form-item>
|
||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openForm('create')"
|
||||
v-hasPermi="['infra:demo-student:create']"
|
||||
>
|
||||
<el-button type="primary" plain @click="openForm('create')">
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -35,19 +30,10 @@
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="编号" align="center" prop="id">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.$dictType.toUpperCase()" :value="scope.row.id" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编号" align="center" prop="id" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
v-hasPermi="['infra:demo-student:update']"
|
||||
>
|
||||
<el-button link type="primary" @click="openForm('update', scope.row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -98,9 +84,13 @@ const exportLoading = ref(false) // 导出的加载中
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await DemoStudentApi.getDemoStudentPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
// const data = await DemoStudentApi.getDemoStudentPage(queryParams)
|
||||
list.value = [
|
||||
{
|
||||
id: 1
|
||||
}
|
||||
]
|
||||
total.value = 10
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@ -120,7 +110,10 @@ const resetQuery = () => {
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
// const demoStudentContactFormRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
// console.log(demoStudentContactFormRef, 'xx demoStudentContactFormRef xx')
|
||||
// demoStudentContactFormRef.value.validate()
|
||||
formRef.value.open(type, id)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user