parent
63a0252451
commit
3728a73a23
@ -0,0 +1,60 @@
|
||||
import request from '@/config/axios';
|
||||
import type { TableData } from './types';
|
||||
|
||||
/** 获取表格数据 */
|
||||
export const getCodeRepItemListApi = (data: any) => {
|
||||
return request.postJson({ url: '/CodeRepItem/spi/dataset/CodeRepItem/CodeRepItemQueryPage', data });
|
||||
};
|
||||
|
||||
/** 批量删除 */
|
||||
export const delCodeRepItemListApi = (list: string[] | number[]): Promise<IResponse> => {
|
||||
const _list = list.map(v => {
|
||||
return {
|
||||
criid: v.criid,
|
||||
};
|
||||
});
|
||||
return request.postJson({
|
||||
url: '/CodeRepItem/spi/dataset/CodeRepItem/CodeRepItemBatchDelete',
|
||||
data: {
|
||||
list: _list,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除 */
|
||||
export const delCodeRepItemApi = (criid?: string): Promise<IResponse> => {
|
||||
return request.postJson({ url: '/CodeRepItem/spi/dataset/CodeRepItem/CodeRepItemDelete', data: { criid } });
|
||||
};
|
||||
|
||||
/** 保存 */
|
||||
export const saveCodeRepItemApi = (data: Partial<TableData>): Promise<IResponse> => {
|
||||
return request.postJson({ url: '/CodeRepItem/spi/dataset/CodeRepItem/CodeRepItemSave', data });
|
||||
};
|
||||
|
||||
/** 查询单条数据 */
|
||||
export const queryCodeRepItemApi = (criid?: string): Promise<IResponse> => {
|
||||
return request.postJson({ url: '/CodeRepItem/spi/dataset/CodeRepItem/CodeRepItemQueryOne', data: { criid } });
|
||||
};
|
||||
|
||||
/** 同步导入 */
|
||||
export const importExcelApiUrl = '/CodeRepItem/sui/dataset/CodeRepItem/CodeRepItemImportExcel';
|
||||
|
||||
/** 异步导入 */
|
||||
export const importExcelAsyncApiUrl = '/CodeRepItem/sui/dataset/CodeRepItem/CodeRepItemImportAsyncExcel';
|
||||
|
||||
/** 导出 */
|
||||
export const exportExcelApi = (params: any) => {
|
||||
return request.doExport({ url: '/CodeRepItem/sdi/dataset/CodeRepItem/CodeRepItemExportXls', params });
|
||||
};
|
||||
|
||||
/** 获取某个字典 */
|
||||
export const getCsckCheckType = ({ paramName, systemCode }): Promise<IResponse> => {
|
||||
return request.postJson({
|
||||
url: '/param/spi/param/systemparam',
|
||||
data: {
|
||||
paramName: paramName,
|
||||
systemCode: systemCode,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
@ -0,0 +1,76 @@
|
||||
/* eslint-disable lines-around-comment */
|
||||
|
||||
export type TableData = {
|
||||
/** 指标集编码 */
|
||||
indexsetCode?: string
|
||||
/** 科目编码 */
|
||||
code?: string
|
||||
/** 开始日期 */
|
||||
beginDate?: string
|
||||
/** 结束日期 */
|
||||
endDate?: string
|
||||
/** 科目名称 */
|
||||
itemName?: string
|
||||
/** 排序 */
|
||||
itemOrder?: string
|
||||
/** 频度 */
|
||||
frequency?: string
|
||||
/** 是否机构汇总 */
|
||||
isOrgCollect?: string
|
||||
/** 状态 */
|
||||
status?: string
|
||||
/** 对照指标编码 */
|
||||
conCode?: string
|
||||
/** */
|
||||
itemType1?: string
|
||||
/** */
|
||||
itemType2?: string
|
||||
/** */
|
||||
itemType3?: string
|
||||
/** */
|
||||
itemType4?: string
|
||||
/** */
|
||||
itemType5?: string
|
||||
/** 主键 */
|
||||
criid?: string
|
||||
}
|
||||
|
||||
export interface DictItem {
|
||||
dictId: string;
|
||||
dictName: string;
|
||||
}
|
||||
|
||||
export type FormModel = {
|
||||
/** 指标集编码 */
|
||||
indexsetCode?: string
|
||||
/** 科目编码 */
|
||||
code?: string
|
||||
/** 开始日期 */
|
||||
beginDate?: string
|
||||
/** 结束日期 */
|
||||
endDate?: string
|
||||
/** 科目名称 */
|
||||
itemName?: string
|
||||
/** 排序 */
|
||||
itemOrder?: string
|
||||
/** 频度 */
|
||||
frequency?: string
|
||||
/** 是否机构汇总 */
|
||||
isOrgCollect?: string
|
||||
/** 状态 */
|
||||
status?: string
|
||||
/** 对照指标编码 */
|
||||
conCode?: string
|
||||
/** */
|
||||
itemType1?: string
|
||||
/** */
|
||||
itemType2?: string
|
||||
/** */
|
||||
itemType3?: string
|
||||
/** */
|
||||
itemType4?: string
|
||||
/** */
|
||||
itemType5?: string
|
||||
/** 主键 */
|
||||
criid?: string
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
import request from '@/config/axios';
|
||||
import type { TableData } from './types';
|
||||
|
||||
/** 获取表格数据 */
|
||||
export const getRepVariableManagementListApi = (data: any) => {
|
||||
return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementQueryPage', data });
|
||||
};
|
||||
|
||||
/** 批量删除 */
|
||||
export const delRepVariableManagementListApi = (list: string[] | number[]): Promise<IResponse> => {
|
||||
const _list = list.map(v => {
|
||||
return {
|
||||
id: v.id,
|
||||
};
|
||||
});
|
||||
return request.postJson({
|
||||
url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementBatchDelete',
|
||||
data: {
|
||||
list: _list,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除 */
|
||||
export const delRepVariableManagementApi = (id?: string): Promise<IResponse> => {
|
||||
return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementDelete', data: { id } });
|
||||
};
|
||||
|
||||
/** 保存 */
|
||||
export const saveRepVariableManagementApi = (data: Partial<TableData>): Promise<IResponse> => {
|
||||
return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementSave', data });
|
||||
};
|
||||
|
||||
/** 查询单条数据 */
|
||||
export const queryRepVariableManagementApi = (id?: string): Promise<IResponse> => {
|
||||
return request.postJson({ url: '/dataset/spi/dataset/RepVariableManagement/RepVariableManagementQueryOne', data: { id } });
|
||||
};
|
||||
|
||||
/** 同步导入 */
|
||||
export const importExcelApiUrl = '/dataset/sui/dataset/RepVariableManagement/RepVariableManagementImportExcel';
|
||||
|
||||
/** 异步导入 */
|
||||
export const importExcelAsyncApiUrl = '/dataset/sui/dataset/RepVariableManagement/RepVariableManagementImportAsyncExcel';
|
||||
|
||||
/** 导出 */
|
||||
export const exportExcelApi = (params: any) => {
|
||||
return request.doExport({ url: '/dataset/sdi/dataset/RepVariableManagement/RepVariableManagementExportXls', params });
|
||||
};
|
||||
|
||||
/** 获取某个字典 */
|
||||
export const getCsckCheckType = ({ paramName, systemCode }): Promise<IResponse> => {
|
||||
return request.postJson({
|
||||
url: '/param/spi/param/systemparam',
|
||||
data: {
|
||||
paramName: paramName,
|
||||
systemCode: systemCode,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
@ -0,0 +1,36 @@
|
||||
/* eslint-disable lines-around-comment */
|
||||
|
||||
export type TableData = {
|
||||
/** 报告编码 */
|
||||
repCode?: string
|
||||
/** 报名名称 */
|
||||
repName?: string
|
||||
/** 指标编码 */
|
||||
indexCode?: string
|
||||
/** 指标名称 */
|
||||
indexName?: string
|
||||
/** 指标规则 */
|
||||
indexRule?: string
|
||||
/** 主键 */
|
||||
id?: string
|
||||
}
|
||||
|
||||
export interface DictItem {
|
||||
dictId: string;
|
||||
dictName: string;
|
||||
}
|
||||
|
||||
export type FormModel = {
|
||||
/** 报告编码 */
|
||||
repCode?: string
|
||||
/** 报名名称 */
|
||||
repName?: string
|
||||
/** 指标编码 */
|
||||
indexCode?: string
|
||||
/** 指标名称 */
|
||||
indexName?: string
|
||||
/** 指标规则 */
|
||||
indexRule?: string
|
||||
/** 主键 */
|
||||
id?: string
|
||||
}
|
@ -0,0 +1,308 @@
|
||||
<script setup lang="tsx">
|
||||
import { reactive, ref, unref } from 'vue'
|
||||
import {
|
||||
getCodeRepItemListApi,
|
||||
saveCodeRepItemApi,
|
||||
delCodeRepItemListApi,
|
||||
delCodeRepItemApi,
|
||||
queryCodeRepItemApi,
|
||||
importExcelApiUrl,
|
||||
exportExcelApi
|
||||
} from '@/api/dataset/CodeRepItem'
|
||||
import { TableData } from '@/api/dataset/CodeRepItem/types'
|
||||
import { useTable } from '@/hooks/web/useTable'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { Table, TableColumn } from '@/components/Table'
|
||||
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus'
|
||||
import { Search } from '@/components/Search'
|
||||
import { FormSchema } from '@/components/Form'
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import Write from './components/Write.vue'
|
||||
import { Dialog } from '@/components/Dialog'
|
||||
import { getWidth } from '@/utils';
|
||||
import Detail from './components/Detail.vue'
|
||||
import { Upload } from '@/components/Upload'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const ids = ref<string[]>([])
|
||||
|
||||
const { tableRegister, tableState, tableMethods } = useTable({
|
||||
fetchDataApi: async () => {
|
||||
const { currentPage, pageSize } = tableState
|
||||
const res = await getCodeRepItemListApi({
|
||||
pageIndex: unref(currentPage),
|
||||
pageSize: unref(pageSize),
|
||||
...unref(searchParams)
|
||||
})
|
||||
return {
|
||||
list: res.body.list,
|
||||
total: res.body.total
|
||||
}
|
||||
},
|
||||
fetchDelApi: async () => {
|
||||
const res = await delCodeRepItemListApi(unref(ids));
|
||||
return !!res;
|
||||
},
|
||||
})
|
||||
|
||||
const { loading, dataList, total, currentPage, pageSize } = tableState
|
||||
const { getList, getElTableExpose, delList, refresh } = tableMethods
|
||||
|
||||
const tableColumns = reactive<TableColumn[]>([
|
||||
{
|
||||
field: 'selection',
|
||||
type: 'selection',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
field: 'indexsetCode',
|
||||
label: '指标集编码'
|
||||
},
|
||||
{
|
||||
field: 'code',
|
||||
label: '科目编码'
|
||||
},
|
||||
{
|
||||
field: 'beginDate',
|
||||
label: '开始日期'
|
||||
},
|
||||
{
|
||||
field: 'endDate',
|
||||
label: '结束日期'
|
||||
},
|
||||
{
|
||||
field: 'itemName',
|
||||
label: '科目名称'
|
||||
},
|
||||
{
|
||||
field: 'itemOrder',
|
||||
label: '排序'
|
||||
},
|
||||
{
|
||||
field: 'frequency',
|
||||
label: '频度'
|
||||
},
|
||||
{
|
||||
field: 'isOrgCollect',
|
||||
label: '是否机构汇总'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '状态'
|
||||
},
|
||||
{
|
||||
field: 'conCode',
|
||||
label: '对照指标编码'
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
label: t('tableDemo.action'),
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
slots: {
|
||||
default: (data: any) => {
|
||||
return (
|
||||
<>
|
||||
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
|
||||
{t('tableDemo.edit')}
|
||||
</ElLink>
|
||||
<ElPopconfirm
|
||||
title={t('common.delTableMsg')}
|
||||
width={200}
|
||||
v-slots={{
|
||||
reference: () => {
|
||||
return (
|
||||
<>
|
||||
<ElLink type="primary" underline={false}>
|
||||
{t('tableDemo.del')}
|
||||
</ElLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}}
|
||||
onConfirm={() => delData(data.row)}
|
||||
></ElPopconfirm>
|
||||
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'detail')}>
|
||||
{t('tableDemo.detail')}
|
||||
</ElLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
|
||||
|
||||
const searchSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'itemName',
|
||||
label: '科目名称',
|
||||
componentProps: {},
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'frequency',
|
||||
label: '频度',
|
||||
componentProps: {},
|
||||
component: 'Select'
|
||||
},
|
||||
{
|
||||
field: 'isOrgCollect',
|
||||
label: '是否机构汇总',
|
||||
componentProps: {},
|
||||
component: 'Select'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '状态',
|
||||
componentProps: {},
|
||||
component: 'Select'
|
||||
}
|
||||
])
|
||||
|
||||
const searchParams = ref({})
|
||||
const setSearchParams = (data: any) => {
|
||||
searchParams.value = data
|
||||
getList()
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const dialogTitle = ref('')
|
||||
|
||||
const currentRow = ref()
|
||||
const actionType = ref('')
|
||||
|
||||
const writeRef = ref<ComponentRef<typeof Write>>()
|
||||
|
||||
/**单行查询**/
|
||||
const action = async (row: TableData, type: string) => {
|
||||
let detailLoading = ElLoading.service({
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const res = await queryCodeRepItemApi(row.criid)
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
detailLoading.close()
|
||||
})
|
||||
detailLoading.close()
|
||||
if (res) {
|
||||
const data = res.body.result
|
||||
dialogTitle.value = t(type === 'edit' ? 'tableDemo.edit' : 'tableDemo.detail')
|
||||
actionType.value = type
|
||||
currentRow.value = data
|
||||
dialogVisible.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const AddAction = () => {
|
||||
dialogTitle.value = t('tableDemo.add')
|
||||
currentRow.value = undefined
|
||||
dialogVisible.value = true
|
||||
actionType.value = 'add'
|
||||
}
|
||||
const saveLoading = ref(false)
|
||||
|
||||
/** 保存 **/
|
||||
const save = async () => {
|
||||
const write = unref(writeRef)
|
||||
const formData = await write?.submit()
|
||||
if (formData) {
|
||||
saveLoading.value = true
|
||||
const res = await saveCodeRepItemApi(formData)
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
saveLoading.value = false
|
||||
})
|
||||
if (res) {
|
||||
dialogVisible.value = false
|
||||
currentPage.value = 1
|
||||
getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const delLoading = ref(false)
|
||||
|
||||
/** 批量删除 **/
|
||||
const delDataBatch = async () => {
|
||||
const elTableExpose = await getElTableExpose()
|
||||
ids.value = elTableExpose?.getSelectionRows().map((v: TableData) => { v.criid }) || []
|
||||
delLoading.value = true
|
||||
await delList(unref(ids).length).finally(() => {
|
||||
delLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
/** 单行删除 */
|
||||
const delData = async (row: TableData) => {
|
||||
const res = await delCodeRepItemApi(row.criid)
|
||||
if (res) {
|
||||
const { code, errMsg } = res.head
|
||||
if (code === '0') {
|
||||
ElMessage.success('删除成功!')
|
||||
getList()
|
||||
} else {
|
||||
ElMessage.error(errMsg || '删除失败!')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const disabled = ref(true)
|
||||
|
||||
const onSelectionChange = (selection: TableData[]) => {
|
||||
disabled.value = selection.length === 0
|
||||
}
|
||||
|
||||
/** 导出Excel */
|
||||
const exportExcel = async () => {
|
||||
const data = { ...unref(searchParams) }
|
||||
await exportExcelApi(data)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<Search :schema="searchSchema" @reset="setSearchParams" @search="setSearchParams" />
|
||||
|
||||
<Table
|
||||
:columns="tableColumns"
|
||||
v-model:pageSize="pageSize"
|
||||
v-model:currentPage="currentPage"
|
||||
default-expand-all
|
||||
node-key="criid"
|
||||
:data="dataList"
|
||||
:loading="loading"
|
||||
:pagination="{
|
||||
total
|
||||
}"
|
||||
@selection-change="onSelectionChange"
|
||||
@register="tableRegister"
|
||||
@refresh="refresh"
|
||||
>
|
||||
<template #buttons>
|
||||
<ElButton type="primary" @click="AddAction">{{ t('tableDemo.add') }}</ElButton>
|
||||
<Upload :url="importExcelApiUrl" :callback="getList"> <ElButton type="primary">导入</ElButton> </Upload>
|
||||
<ElButton type="primary" @click="exportExcel()">导出</ElButton>
|
||||
<ElButton :loading="delLoading" type="primary" :disabled="disabled" @click="delDataBatch()">
|
||||
{{ t('tableDemo.del') }}
|
||||
</ElButton>
|
||||
</template>
|
||||
</Table>
|
||||
</ContentWrap>
|
||||
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
||||
<Write
|
||||
v-if="actionType !== 'detail'"
|
||||
ref="writeRef"
|
||||
:current-row="currentRow"
|
||||
:action-type="actionType"
|
||||
/>
|
||||
<Detail v-if="actionType === 'detail'" :current-row="currentRow" />
|
||||
<template #footer>
|
||||
<ElButton v-if="actionType !== 'detail'" type="primary" :loading="saveLoading" @click="save">
|
||||
{{ t('dialogDemo.save') }}
|
||||
</ElButton>
|
||||
<ElButton @click="dialogVisible = false">{{ t('dialogDemo.close') }}</ElButton>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
@ -0,0 +1,79 @@
|
||||
<script setup lang="tsx">
|
||||
import { PropType, ref } from 'vue'
|
||||
import { TableData } from '@/api/dataset/CodeRepItem'
|
||||
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
|
||||
|
||||
const detailSchema = ref<DescriptionsSchema[]>([
|
||||
{
|
||||
field: 'indexsetCode',
|
||||
label: '指标集编码'
|
||||
},
|
||||
{
|
||||
field: 'code',
|
||||
label: '科目编码'
|
||||
},
|
||||
{
|
||||
field: 'beginDate',
|
||||
label: '开始日期'
|
||||
},
|
||||
{
|
||||
field: 'endDate',
|
||||
label: '结束日期'
|
||||
},
|
||||
{
|
||||
field: 'itemName',
|
||||
label: '科目名称'
|
||||
},
|
||||
{
|
||||
field: 'itemOrder',
|
||||
label: '排序'
|
||||
},
|
||||
{
|
||||
field: 'frequency',
|
||||
label: '频度'
|
||||
},
|
||||
{
|
||||
field: 'isOrgCollect',
|
||||
label: '是否机构汇总'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '状态'
|
||||
},
|
||||
{
|
||||
field: 'conCode',
|
||||
label: '对照指标编码'
|
||||
},
|
||||
{
|
||||
field: 'itemType1',
|
||||
label: ''
|
||||
},
|
||||
{
|
||||
field: 'itemType2',
|
||||
label: ''
|
||||
},
|
||||
{
|
||||
field: 'itemType3',
|
||||
label: ''
|
||||
},
|
||||
{
|
||||
field: 'itemType4',
|
||||
label: ''
|
||||
},
|
||||
{
|
||||
field: 'itemType5',
|
||||
label: ''
|
||||
}
|
||||
])
|
||||
|
||||
defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<TableData>,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Descriptions :schema="detailSchema" :data="currentRow || {}" />
|
||||
</template>
|
@ -0,0 +1,186 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType, reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
},
|
||||
actionType: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
}
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues, getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'criid',
|
||||
label: '主键',
|
||||
component: 'Input',
|
||||
hidden: true
|
||||
},{
|
||||
field: 'indexsetCode',
|
||||
label: '指标集编码',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'code',
|
||||
label: '科目编码',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'beginDate',
|
||||
label: '开始日期',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'endDate',
|
||||
label: '结束日期',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemName',
|
||||
label: '科目名称',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemOrder',
|
||||
label: '排序',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'frequency',
|
||||
label: '频度',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'isOrgCollect',
|
||||
label: '是否机构汇总',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '状态',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'conCode',
|
||||
label: '对照指标编码',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemType1',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemType2',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemType3',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemType4',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'itemType5',
|
||||
label: '',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
}
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
|
||||
})
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData()
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
</template>
|
||||
|
@ -0,0 +1,272 @@
|
||||
<script setup lang="tsx">
|
||||
import { reactive, ref, unref } from 'vue'
|
||||
import {
|
||||
getRepVariableManagementListApi,
|
||||
saveRepVariableManagementApi,
|
||||
delRepVariableManagementListApi,
|
||||
delRepVariableManagementApi,
|
||||
queryRepVariableManagementApi,
|
||||
} from '@/api/dataset/RepVariableManagement'
|
||||
import { TableData } from '@/api/dataset/RepVariableManagement/RepVariableManagement/types'
|
||||
import { useTable } from '@/hooks/web/useTable'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { Table, TableColumn } from '@/components/Table'
|
||||
import { ElButton, ElLink, ElLoading, ElPopconfirm, ElMessage } from 'element-plus'
|
||||
import { Search } from '@/components/Search'
|
||||
import { FormSchema } from '@/components/Form'
|
||||
import { ContentWrap } from '@/components/ContentWrap'
|
||||
import Write from './components/Write.vue'
|
||||
import { Dialog } from '@/components/Dialog'
|
||||
import { getWidth } from '@/utils';
|
||||
import Detail from './components/Detail.vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
const ids = ref<string[]>([])
|
||||
|
||||
const { tableRegister, tableState, tableMethods } = useTable({
|
||||
fetchDataApi: async () => {
|
||||
const { currentPage, pageSize } = tableState
|
||||
const res = await getRepVariableManagementListApi({
|
||||
pageIndex: unref(currentPage),
|
||||
pageSize: unref(pageSize),
|
||||
...unref(searchParams)
|
||||
})
|
||||
return {
|
||||
list: res.body.list,
|
||||
total: res.body.total
|
||||
}
|
||||
},
|
||||
fetchDelApi: async () => {
|
||||
const res = await delRepVariableManagementListApi(unref(ids));
|
||||
return !!res;
|
||||
},
|
||||
})
|
||||
|
||||
const { loading, dataList, total, currentPage, pageSize } = tableState
|
||||
const { getList, getElTableExpose, delList, refresh } = tableMethods
|
||||
|
||||
const tableColumns = reactive<TableColumn[]>([
|
||||
{
|
||||
field: 'selection',
|
||||
type: 'selection',
|
||||
fixed: true
|
||||
},
|
||||
{
|
||||
field: 'repCode',
|
||||
label: '报告编码'
|
||||
},
|
||||
{
|
||||
field: 'repName',
|
||||
label: '报名名称'
|
||||
},
|
||||
{
|
||||
field: 'indexCode',
|
||||
label: '指标编码'
|
||||
},
|
||||
{
|
||||
field: 'indexName',
|
||||
label: '指标名称'
|
||||
},
|
||||
{
|
||||
field: 'indexRule',
|
||||
label: '指标规则'
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
label: t('tableDemo.action'),
|
||||
width: 160,
|
||||
fixed: 'right',
|
||||
slots: {
|
||||
default: (data: any) => {
|
||||
return (
|
||||
<>
|
||||
<ElLink type="primary" underline={false} onClick={() => action(data.row, 'edit')}>
|
||||
{t('tableDemo.edit')}
|
||||
</ElLink>
|
||||
<ElPopconfirm
|
||||
title={t('common.delTableMsg')}
|
||||
width={200}
|
||||
v-slots={{
|
||||
reference: () => {
|
||||
return (
|
||||
<>
|
||||
<ElLink type="primary" underline={false}>
|
||||
{t('tableDemo.del')}
|
||||
</ElLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}}
|
||||
onConfirm={() => delData(data.row)}
|
||||
></ElPopconfirm>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
].map(item => ({ minWidth: item.label ? getWidth(item.label) : 120, ...item }) as TableColumn))
|
||||
|
||||
const searchSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'repCode',
|
||||
label: '报告编码',
|
||||
componentProps: {},
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'repName',
|
||||
label: '报名名称',
|
||||
componentProps: {},
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'indexCode',
|
||||
label: '指标编码',
|
||||
componentProps: {},
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'indexName',
|
||||
label: '指标名称',
|
||||
componentProps: {},
|
||||
component: 'Input'
|
||||
}
|
||||
])
|
||||
|
||||
const searchParams = ref({})
|
||||
const setSearchParams = (data: any) => {
|
||||
searchParams.value = data
|
||||
getList()
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const dialogTitle = ref('')
|
||||
|
||||
const currentRow = ref()
|
||||
const actionType = ref('')
|
||||
|
||||
const writeRef = ref<ComponentRef<typeof Write>>()
|
||||
|
||||
/**单行查询**/
|
||||
const action = async (row: TableData, type: string) => {
|
||||
let detailLoading = ElLoading.service({
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
const res = await queryRepVariableManagementApi(row.id)
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
detailLoading.close()
|
||||
})
|
||||
detailLoading.close()
|
||||
if (res) {
|
||||
const data = res.body.result
|
||||
dialogTitle.value = t(type === 'edit' ? 'tableDemo.edit' : 'tableDemo.detail')
|
||||
actionType.value = type
|
||||
currentRow.value = data
|
||||
dialogVisible.value = true
|
||||
}
|
||||
}
|
||||
|
||||
const AddAction = () => {
|
||||
dialogTitle.value = t('tableDemo.add')
|
||||
currentRow.value = undefined
|
||||
dialogVisible.value = true
|
||||
actionType.value = 'add'
|
||||
}
|
||||
const saveLoading = ref(false)
|
||||
|
||||
/** 保存 **/
|
||||
const save = async () => {
|
||||
const write = unref(writeRef)
|
||||
const formData = await write?.submit()
|
||||
if (formData) {
|
||||
saveLoading.value = true
|
||||
const res = await saveRepVariableManagementApi(formData)
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
saveLoading.value = false
|
||||
})
|
||||
if (res) {
|
||||
dialogVisible.value = false
|
||||
currentPage.value = 1
|
||||
getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const delLoading = ref(false)
|
||||
|
||||
/** 批量删除 **/
|
||||
const delDataBatch = async () => {
|
||||
const elTableExpose = await getElTableExpose()
|
||||
ids.value = elTableExpose?.getSelectionRows().map((v: TableData) => { v.id }) || []
|
||||
delLoading.value = true
|
||||
await delList(unref(ids).length).finally(() => {
|
||||
delLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
/** 单行删除 */
|
||||
const delData = async (row: TableData) => {
|
||||
const res = await delRepVariableManagementApi(row.id)
|
||||
if (res) {
|
||||
const { code, errMsg } = res.head
|
||||
if (code === '0') {
|
||||
ElMessage.success('删除成功!')
|
||||
getList()
|
||||
} else {
|
||||
ElMessage.error(errMsg || '删除失败!')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const disabled = ref(true)
|
||||
|
||||
const onSelectionChange = (selection: TableData[]) => {
|
||||
disabled.value = selection.length === 0
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ContentWrap>
|
||||
<Search :schema="searchSchema" @reset="setSearchParams" @search="setSearchParams" />
|
||||
|
||||
<Table
|
||||
:columns="tableColumns"
|
||||
v-model:pageSize="pageSize"
|
||||
v-model:currentPage="currentPage"
|
||||
default-expand-all
|
||||
node-key="id"
|
||||
:data="dataList"
|
||||
:loading="loading"
|
||||
:pagination="{
|
||||
total
|
||||
}"
|
||||
@selection-change="onSelectionChange"
|
||||
@register="tableRegister"
|
||||
@refresh="refresh"
|
||||
>
|
||||
<template #buttons>
|
||||
<ElButton type="primary" @click="AddAction">{{ t('tableDemo.add') }}</ElButton>
|
||||
</template>
|
||||
</Table>
|
||||
</ContentWrap>
|
||||
|
||||
<Dialog v-model="dialogVisible" :title="dialogTitle">
|
||||
<Write
|
||||
v-if="actionType !== 'detail'"
|
||||
ref="writeRef"
|
||||
:current-row="currentRow"
|
||||
:action-type="actionType"
|
||||
/>
|
||||
<Detail v-if="actionType === 'detail'" :current-row="currentRow" />
|
||||
<template #footer>
|
||||
<ElButton v-if="actionType !== 'detail'" type="primary" :loading="saveLoading" @click="save">
|
||||
{{ t('dialogDemo.save') }}
|
||||
</ElButton>
|
||||
<ElButton @click="dialogVisible = false">{{ t('dialogDemo.close') }}</ElButton>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
@ -0,0 +1,39 @@
|
||||
<script setup lang="tsx">
|
||||
import { PropType, ref } from 'vue'
|
||||
import { TableData } from '@/api/dataset/RepVariableManagement/types'
|
||||
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
|
||||
|
||||
const detailSchema = ref<DescriptionsSchema[]>([
|
||||
{
|
||||
field: 'repCode',
|
||||
label: '报告编码'
|
||||
},
|
||||
{
|
||||
field: 'repName',
|
||||
label: '报名名称'
|
||||
},
|
||||
{
|
||||
field: 'indexCode',
|
||||
label: '指标编码'
|
||||
},
|
||||
{
|
||||
field: 'indexName',
|
||||
label: '指标名称'
|
||||
},
|
||||
{
|
||||
field: 'indexRule',
|
||||
label: '指标规则'
|
||||
}
|
||||
])
|
||||
|
||||
defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<TableData>,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Descriptions :schema="detailSchema" :data="currentRow || {}" />
|
||||
</template>
|
@ -0,0 +1,106 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType, reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
},
|
||||
actionType: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
}
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues, getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'id',
|
||||
label: '主键',
|
||||
component: 'Input',
|
||||
hidden: true
|
||||
},{
|
||||
field: 'repCode',
|
||||
label: '报告编码',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'repName',
|
||||
label: '报名名称',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'indexCode',
|
||||
label: '指标编码',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'indexName',
|
||||
label: '指标名称',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'indexRule',
|
||||
label: '指标规则',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
}
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
|
||||
})
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData()
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
</template>
|
||||
|
@ -1,147 +1,153 @@
|
||||
<script setup lang="tsx">
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType, reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { Form, FormSchema } from '@/components/Form'
|
||||
import { useForm } from '@/hooks/web/useForm'
|
||||
import { PropType, reactive, watch } from 'vue'
|
||||
import { useValidator } from '@/hooks/web/useValidator'
|
||||
import { ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
||||
|
||||
let fileChoose = null;
|
||||
const { required } = useValidator()
|
||||
|
||||
const { required } = useValidator()
|
||||
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
},
|
||||
actionType: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
}
|
||||
})
|
||||
const props = defineProps({
|
||||
currentRow: {
|
||||
type: Object as PropType<any>,
|
||||
default: () => null
|
||||
},
|
||||
actionType: {
|
||||
type: String,
|
||||
default: 'add'
|
||||
}
|
||||
})
|
||||
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues, getFormData, getElFormExpose } = formMethods
|
||||
const { formRegister, formMethods } = useForm()
|
||||
const { setValues, getFormData, getElFormExpose } = formMethods
|
||||
|
||||
const formSchema = reactive<FormSchema[]>([
|
||||
{
|
||||
field: 'tId',
|
||||
label: '编号',
|
||||
component: 'Input',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
field: 'tCategory',
|
||||
label: '报告分类',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'createUser',
|
||||
label: '编写人',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'tVersion',
|
||||
label: '报告版本',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
const formSchema = reactive < FormSchema[] > ([
|
||||
{
|
||||
field: 'tId',
|
||||
label: '编号',
|
||||
component: 'Input',
|
||||
hidden: true
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'tStatus',
|
||||
label: '报告状态',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'tDescription',
|
||||
label: '报告描述',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
type: 'textarea'
|
||||
{
|
||||
field: 'tCategory',
|
||||
label: '报告分类',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'organCode',
|
||||
label: '报告模版',
|
||||
component: 'Upload',
|
||||
colProps: { span: 160 },
|
||||
componentProps: {
|
||||
limit: 1,
|
||||
drag:true,
|
||||
accept:".doc,.docx",
|
||||
action: 'https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15',
|
||||
multiple: true,
|
||||
onPreview: (uploadFile) => {
|
||||
console.log(uploadFile)
|
||||
{
|
||||
field: 'createUser',
|
||||
label: '编写人',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
onRemove: (file) => {
|
||||
console.log(file)
|
||||
},
|
||||
{
|
||||
field: 'tVersion',
|
||||
label: '报告版本',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
beforeRemove: (uploadFile) => {
|
||||
return ElMessageBox.confirm(`Cancel the transfer of ${uploadFile.name} ?`).then(
|
||||
() => true,
|
||||
() => false
|
||||
)
|
||||
},
|
||||
{
|
||||
field: 'tStatus',
|
||||
label: '报告状态',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
||||
},
|
||||
onExceed: (files, uploadFiles) => {
|
||||
ElMessage.warning(
|
||||
`The limit is 1, you selected ${files.length} files this time, add up to ${
|
||||
files.length + uploadFiles.length
|
||||
} 总共`
|
||||
)
|
||||
},
|
||||
{
|
||||
field: 'tDescription',
|
||||
label: '报告描述',
|
||||
component: 'Input',
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
type: 'textarea'
|
||||
},
|
||||
slots: {
|
||||
default: () =><div class="el-upload"><div class="el-upload__text">拖曳报告模版到这里或<em>上传报告模版</em></div></div>,
|
||||
tip: () => <div class="el-upload__tip">doc,docx文件</div>
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
])
|
||||
{
|
||||
field: 'organCode',
|
||||
label: '报告模版',
|
||||
component: 'Upload',
|
||||
colProps: { span: 160 },
|
||||
componentProps: {
|
||||
limit: 1,
|
||||
drag: true,
|
||||
accept: ".doc,.docx",
|
||||
action: null,
|
||||
autoUpload:false,
|
||||
multiple: false,
|
||||
fileList: [],
|
||||
onPreview: (uploadFile) => {
|
||||
console.log(uploadFile)
|
||||
},
|
||||
onRemove: (file) => {
|
||||
console.log(file)
|
||||
},
|
||||
beforeRemove: (uploadFile) => {
|
||||
return ElMessageBox.confirm(`Cancel the transfer of ${uploadFile.name} ?`).then(
|
||||
() => true,
|
||||
() => false
|
||||
)
|
||||
},
|
||||
onExceed: (files, uploadFiles) => {
|
||||
ElMessage.warning(
|
||||
`The limit is 1, you selected ${files.length} files this time, add up to ${files.length + uploadFiles.length
|
||||
} 总共`
|
||||
)
|
||||
},
|
||||
slots: {
|
||||
default: () => <div class="el-upload"><div class="el-upload__text">拖曳报告模版到这里或<em>上传报告模版</em></div></div>,
|
||||
tip: () => <div class="el-upload__tip">doc,docx文件</div>,
|
||||
file: (file) => {
|
||||
fileChoose = file.file.raw;
|
||||
console.log(file, "file信息");
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
])
|
||||
|
||||
const rules = reactive({
|
||||
|
||||
})
|
||||
const rules = reactive({
|
||||
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData()
|
||||
return formData
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
const submit = async () => {
|
||||
const elForm = await getElFormExpose()
|
||||
const valid = await elForm?.validate().catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
if (valid) {
|
||||
const formData = await getFormData()
|
||||
formData.file = fileChoose;
|
||||
console.log(formData);
|
||||
return formData
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
watch(
|
||||
() => props.currentRow,
|
||||
(currentRow) => {
|
||||
if (!currentRow) return
|
||||
setValues(currentRow)
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
submit
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Form :rules="rules" @register="formRegister" :schema="formSchema" />
|
||||
</template>
|
||||
|
||||
</template>
|
Loading…
Reference in new issue