| @ -0,0 +1,80 @@ | |||
| import {defHttp} from '/@/utils/http/axios'; | |||
| import {Modal} from 'ant-design-vue'; | |||
| enum Api { | |||
| list = '/educationThesisTwo/educationThesisTwo/list', | |||
| save='/educationThesisTwo/educationThesisTwo/add', | |||
| edit='/educationThesisTwo/educationThesisTwo/edit', | |||
| deleteOne = '/educationThesisTwo/educationThesisTwo/delete', | |||
| deleteBatch = '/educationThesisTwo/educationThesisTwo/deleteBatch', | |||
| importExcel = '/educationThesisTwo/educationThesisTwo/importExcel', | |||
| exportXls = '/educationThesisTwo/educationThesisTwo/exportXls', | |||
| educationExcelOneList = '/educationThesisTwo/educationThesisTwo/queryEducationExcelOneByMainId', | |||
| educationExcelTwoList = '/educationThesisTwo/educationThesisTwo/queryEducationExcelTwoByMainId', | |||
| educationDocumentTwoList = '/educationThesisTwo/educationThesisTwo/queryEducationDocumentTwoByMainId', | |||
| } | |||
| /** | |||
| * 导出api | |||
| * @param params | |||
| */ | |||
| export const getExportUrl = Api.exportXls; | |||
| /** | |||
| * 导入api | |||
| */ | |||
| export const getImportUrl = Api.importExcel; | |||
| /** | |||
| * 查询子表数据 | |||
| * @param params | |||
| */ | |||
| export const educationExcelOneList = Api.educationExcelOneList; | |||
| /** | |||
| * 查询子表数据 | |||
| * @param params | |||
| */ | |||
| export const educationExcelTwoList = Api.educationExcelTwoList; | |||
| /** | |||
| * 查询子表数据 | |||
| * @param params | |||
| */ | |||
| export const educationDocumentTwoList = Api.educationDocumentTwoList; | |||
| /** | |||
| * 列表接口 | |||
| * @param params | |||
| */ | |||
| export const list = (params) => | |||
| defHttp.get({url: Api.list, params}); | |||
| /** | |||
| * 删除单个 | |||
| */ | |||
| export const deleteOne = (params,handleSuccess) => { | |||
| return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { | |||
| handleSuccess(); | |||
| }); | |||
| } | |||
| /** | |||
| * 批量删除 | |||
| * @param params | |||
| */ | |||
| export const batchDelete = (params, handleSuccess) => { | |||
| Modal.confirm({ | |||
| title: '确认删除', | |||
| content: '是否删除选中数据', | |||
| okText: '确认', | |||
| cancelText: '取消', | |||
| onOk: () => { | |||
| return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { | |||
| handleSuccess(); | |||
| }); | |||
| } | |||
| }); | |||
| } | |||
| /** | |||
| * 保存或者更新 | |||
| * @param params | |||
| */ | |||
| export const saveOrUpdate = (params, isUpdate) => { | |||
| let url = isUpdate ? Api.edit : Api.save; | |||
| return defHttp.post({url: url, params}); | |||
| } | |||
| @ -0,0 +1,318 @@ | |||
| import {BasicColumn} from '/@/components/Table'; | |||
| import {FormSchema} from '/@/components/Table'; | |||
| import { rules} from '/@/utils/helper/validator'; | |||
| import { render } from '/@/utils/common/renderUtils'; | |||
| import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types' | |||
| //列表数据 | |||
| export const columns: BasicColumn[] = [ | |||
| { | |||
| title: '一级分类', | |||
| align:"center", | |||
| dataIndex: 'categoryOne' | |||
| }, | |||
| { | |||
| title: '二级分类', | |||
| align:"center", | |||
| dataIndex: 'categoryTwo_dictText' | |||
| }, | |||
| { | |||
| title: '标题', | |||
| align:"center", | |||
| dataIndex: 'title' | |||
| }, | |||
| { | |||
| title: '副标题', | |||
| align:"center", | |||
| dataIndex: 'shortTitle' | |||
| }, | |||
| { | |||
| title: '封面/海报图片', | |||
| align:"center", | |||
| dataIndex: 'paperImage', | |||
| customRender:render.renderAvatar, | |||
| }, | |||
| { | |||
| title: '详情页图片', | |||
| align:"center", | |||
| dataIndex: 'image', | |||
| customRender:render.renderAvatar, | |||
| }, | |||
| { | |||
| title: '模块标题一', | |||
| align:"center", | |||
| dataIndex: 'titleModuleOne' | |||
| }, | |||
| { | |||
| title: '模块内容一', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleOne', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '模块标题二', | |||
| align:"center", | |||
| dataIndex: 'titleModuleTwo' | |||
| }, | |||
| { | |||
| title: '模块内容二', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleTwo', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '模块标题三', | |||
| align:"center", | |||
| dataIndex: 'titleModuleThree' | |||
| }, | |||
| { | |||
| title: '模块内容三', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleThree', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '模块标题四', | |||
| align:"center", | |||
| dataIndex: 'titleModuleFour' | |||
| }, | |||
| { | |||
| title: '模块内容四', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleFour', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '模块标题五', | |||
| align:"center", | |||
| dataIndex: 'titleModuleFive' | |||
| }, | |||
| { | |||
| title: '模块内容五', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleFive', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '模块标题六', | |||
| align:"center", | |||
| dataIndex: 'titleModuleSix' | |||
| }, | |||
| { | |||
| title: '模块内容六', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleSix', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '模块标题七', | |||
| align:"center", | |||
| dataIndex: 'titleModuleSeven' | |||
| }, | |||
| { | |||
| title: '模块内容七', | |||
| align:"center", | |||
| dataIndex: 'cotentModuleSeven', | |||
| slots: { customRender: 'htmlSlot' }, | |||
| }, | |||
| { | |||
| title: '表格标题一', | |||
| align:"center", | |||
| dataIndex: 'titleExcelOne' | |||
| }, | |||
| { | |||
| title: '表格标题二', | |||
| align:"center", | |||
| dataIndex: 'titleExcelTwo' | |||
| }, | |||
| { | |||
| title: '标签', | |||
| align:"center", | |||
| dataIndex: 'tag' | |||
| }, | |||
| ]; | |||
| //查询数据 | |||
| export const searchFormSchema: FormSchema[] = [ | |||
| ]; | |||
| //表单数据 | |||
| export const formSchema: FormSchema[] = [ | |||
| { | |||
| label: '一级分类', | |||
| field: 'categoryOne', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '二级分类', | |||
| field: 'categoryTwo', | |||
| component: 'JDictSelectTag', | |||
| componentProps:{ | |||
| dictCode:"" | |||
| }, | |||
| }, | |||
| { | |||
| label: '标题', | |||
| field: 'title', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '副标题', | |||
| field: 'shortTitle', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '封面/海报图片', | |||
| field: 'paperImage', | |||
| component: 'JImageUpload', | |||
| componentProps:{ | |||
| }, | |||
| }, | |||
| { | |||
| label: '详情页图片', | |||
| field: 'image', | |||
| component: 'JImageUpload', | |||
| componentProps:{ | |||
| }, | |||
| }, | |||
| { | |||
| label: '模块标题一', | |||
| field: 'titleModuleOne', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容一', | |||
| field: 'cotentModuleOne', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '模块标题二', | |||
| field: 'titleModuleTwo', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容二', | |||
| field: 'cotentModuleTwo', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '模块标题三', | |||
| field: 'titleModuleThree', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容三', | |||
| field: 'cotentModuleThree', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '模块标题四', | |||
| field: 'titleModuleFour', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容四', | |||
| field: 'cotentModuleFour', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '模块标题五', | |||
| field: 'titleModuleFive', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容五', | |||
| field: 'cotentModuleFive', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '模块标题六', | |||
| field: 'titleModuleSix', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容六', | |||
| field: 'cotentModuleSix', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '模块标题七', | |||
| field: 'titleModuleSeven', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '模块内容七', | |||
| field: 'cotentModuleSeven', | |||
| component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
| }, | |||
| { | |||
| label: '表格标题一', | |||
| field: 'titleExcelOne', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '表格标题二', | |||
| field: 'titleExcelTwo', | |||
| component: 'Input', | |||
| }, | |||
| { | |||
| label: '标签', | |||
| field: 'tag', | |||
| component: 'Input', | |||
| }, | |||
| ]; | |||
| //子表单数据 | |||
| //子表表格配置 | |||
| export const educationExcelOneColumns: JVxeColumn[] = [ | |||
| { | |||
| title: '第一列', | |||
| key: 'columnOne', | |||
| type: JVxeTypes.textarea, | |||
| width:"200px", | |||
| placeholder: '请输入${title}', | |||
| defaultValue:'', | |||
| }, | |||
| { | |||
| title: '第二列', | |||
| key: 'columnTwo', | |||
| type: JVxeTypes.textarea, | |||
| width:"200px", | |||
| placeholder: '请输入${title}', | |||
| defaultValue:'', | |||
| }, | |||
| ] | |||
| export const educationExcelTwoColumns: JVxeColumn[] = [ | |||
| { | |||
| title: '第一列', | |||
| key: 'columnOne', | |||
| type: JVxeTypes.textarea, | |||
| width:"200px", | |||
| placeholder: '请输入${title}', | |||
| defaultValue:'', | |||
| }, | |||
| { | |||
| title: '第二列', | |||
| key: 'columnTwo', | |||
| type: JVxeTypes.textarea, | |||
| width:"200px", | |||
| placeholder: '请输入${title}', | |||
| defaultValue:'', | |||
| }, | |||
| ] | |||
| export const educationDocumentTwoColumns: JVxeColumn[] = [ | |||
| { | |||
| title: '标题', | |||
| key: 'title', | |||
| type: JVxeTypes.input, | |||
| width:"200px", | |||
| placeholder: '请输入${title}', | |||
| defaultValue:'', | |||
| }, | |||
| { | |||
| title: '文件', | |||
| key: 'document', | |||
| type: JVxeTypes.file, | |||
| token:true, | |||
| responseName:"message", | |||
| width:"200px", | |||
| placeholder: '请选择文件', | |||
| defaultValue:'', | |||
| }, | |||
| ] | |||
| @ -0,0 +1,162 @@ | |||
| <template> | |||
| <div> | |||
| <!--引用表格--> | |||
| <BasicTable @register="registerTable" :rowSelection="rowSelection"> | |||
| <!--插槽:table标题--> | |||
| <template #tableTitle> | |||
| <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> | |||
| <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> | |||
| <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> | |||
| <a-dropdown v-if="checkedKeys.length > 0"> | |||
| <template #overlay> | |||
| <a-menu> | |||
| <a-menu-item key="1" @click="batchHandleDelete"> | |||
| <Icon icon="ant-design:delete-outlined"></Icon> | |||
| 删除 | |||
| </a-menu-item> | |||
| </a-menu> | |||
| </template> | |||
| <a-button>批量操作 | |||
| <Icon icon="mdi:chevron-down"></Icon> | |||
| </a-button> | |||
| </a-dropdown> | |||
| </template> | |||
| <!--操作栏--> | |||
| <template #action="{ record }"> | |||
| <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> | |||
| </template> | |||
| <!--字段回显插槽--> | |||
| <template #htmlSlot="{text}"> | |||
| <div v-html="text"></div> | |||
| </template> | |||
| <template #fileSlot="{text}"> | |||
| <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
| <a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> | |||
| </template> | |||
| </BasicTable> | |||
| <!-- 表单区域 --> | |||
| <EducationThesisTwoModal @register="registerModal" @success="handleSuccess"></EducationThesisTwoModal> | |||
| </div> | |||
| </template> | |||
| <script lang="ts" name="educationThesisTwo-educationThesisTwo" setup> | |||
| import {ref, computed, unref} from 'vue'; | |||
| import {BasicTable, useTable, TableAction} from '/@/components/Table'; | |||
| import { useListPage } from '/@/hooks/system/useListPage' | |||
| import {useModal} from '/@/components/Modal'; | |||
| import EducationThesisTwoModal from './components/EducationThesisTwoModal.vue' | |||
| import {columns, searchFormSchema} from './educationThesisTwo.data'; | |||
| import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './educationThesisTwo.api'; | |||
| const checkedKeys = ref<Array<string | number>>([]); | |||
| //注册model | |||
| const [registerModal, {openModal}] = useModal(); | |||
| //注册table数据 | |||
| const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
| tableProps:{ | |||
| title: '论文信息表二', | |||
| api: list, | |||
| columns, | |||
| canResize:false, | |||
| formConfig: { | |||
| labelWidth: 120, | |||
| schemas: searchFormSchema, | |||
| autoSubmitOnEnter:true, | |||
| showAdvancedButton:true, | |||
| fieldMapToTime: [ | |||
| ], | |||
| }, | |||
| actionColumn: { | |||
| width: 120, | |||
| }, | |||
| }, | |||
| exportConfig: { | |||
| name:"论文信息表二", | |||
| url: getExportUrl, | |||
| }, | |||
| importConfig: { | |||
| url: getImportUrl | |||
| }, | |||
| }) | |||
| const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext | |||
| /** | |||
| * 新增事件 | |||
| */ | |||
| function handleAdd() { | |||
| openModal(true, { | |||
| isUpdate: false, | |||
| showFooter: true, | |||
| }); | |||
| } | |||
| /** | |||
| * 编辑事件 | |||
| */ | |||
| function handleEdit(record: Recordable) { | |||
| openModal(true, { | |||
| record, | |||
| isUpdate: true, | |||
| showFooter: true, | |||
| }); | |||
| } | |||
| /** | |||
| * 详情 | |||
| */ | |||
| function handleDetail(record: Recordable) { | |||
| openModal(true, { | |||
| record, | |||
| isUpdate: true, | |||
| showFooter: false, | |||
| }); | |||
| } | |||
| /** | |||
| * 删除事件 | |||
| */ | |||
| async function handleDelete(record) { | |||
| await deleteOne({id: record.id}, reload); | |||
| } | |||
| /** | |||
| * 批量删除事件 | |||
| */ | |||
| async function batchHandleDelete() { | |||
| await batchDelete({ids: checkedKeys.value}, reload); | |||
| } | |||
| /** | |||
| * 成功回调 | |||
| */ | |||
| function handleSuccess() { | |||
| reload(); | |||
| } | |||
| /** | |||
| * 操作栏 | |||
| */ | |||
| function getTableAction(record){ | |||
| return [ | |||
| { | |||
| label: '编辑', | |||
| onClick: handleEdit.bind(null, record), | |||
| } | |||
| ] | |||
| } | |||
| /** | |||
| * 下拉操作栏 | |||
| */ | |||
| function getDropDownAction(record){ | |||
| return [ | |||
| { | |||
| label: '详情', | |||
| onClick: handleDetail.bind(null, record), | |||
| }, { | |||
| label: '删除', | |||
| popConfirm: { | |||
| title: '是否确认删除', | |||
| confirm: handleDelete.bind(null, record), | |||
| } | |||
| } | |||
| ] | |||
| } | |||
| </script> | |||
| <style scoped> | |||
| </style> | |||
| @ -0,0 +1,149 @@ | |||
| <template> | |||
| <BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit"> | |||
| <BasicForm @register="registerForm" ref="formRef"/> | |||
| <!-- 子表单区域 --> | |||
| <a-tabs v-model:activeKey="activeKey" @change="handleChangeTabs"> | |||
| <a-tab-pane tab="表格一" :key="refKeys[0]" :forceRender="true"> | |||
| <JVxeTable | |||
| keep-source | |||
| resizable | |||
| :ref="refKeys[0]" | |||
| :loading="educationExcelOneTable.loading" | |||
| :columns="educationExcelOneTable.columns" | |||
| :dataSource="educationExcelOneTable.dataSource" | |||
| :maxHeight="300" | |||
| :rowNumber="true" | |||
| :rowSelection="true" | |||
| :toolbar="true" | |||
| /> | |||
| </a-tab-pane> | |||
| <a-tab-pane tab="表格二" :key="refKeys[1]" :forceRender="true"> | |||
| <JVxeTable | |||
| keep-source | |||
| resizable | |||
| :ref="refKeys[1]" | |||
| :loading="educationExcelTwoTable.loading" | |||
| :columns="educationExcelTwoTable.columns" | |||
| :dataSource="educationExcelTwoTable.dataSource" | |||
| :maxHeight="300" | |||
| :rowNumber="true" | |||
| :rowSelection="true" | |||
| :toolbar="true" | |||
| /> | |||
| </a-tab-pane> | |||
| <a-tab-pane tab="附加材料表二" :key="refKeys[2]" :forceRender="true"> | |||
| <JVxeTable | |||
| keep-source | |||
| resizable | |||
| :ref="refKeys[2]" | |||
| :loading="educationDocumentTwoTable.loading" | |||
| :columns="educationDocumentTwoTable.columns" | |||
| :dataSource="educationDocumentTwoTable.dataSource" | |||
| :maxHeight="300" | |||
| :rowNumber="true" | |||
| :rowSelection="true" | |||
| :toolbar="true" | |||
| /> | |||
| </a-tab-pane> | |||
| </a-tabs> | |||
| </BasicModal> | |||
| </template> | |||
| <script lang="ts" setup> | |||
| import {ref, computed, unref,reactive} from 'vue'; | |||
| import {BasicModal, useModalInner} from '/@/components/Modal'; | |||
| import {BasicForm, useForm} from '/@/components/Form/index'; | |||
| import { JVxeTable } from '/@/components/jeecg/JVxeTable' | |||
| import { useJvxeMethod } from '/@/hooks/system/useJvxeMethods.ts' | |||
| import {formSchema,educationExcelOneColumns,educationExcelTwoColumns,educationDocumentTwoColumns} from '../educationThesisTwo.data'; | |||
| import {saveOrUpdate,educationExcelOneList,educationExcelTwoList,educationDocumentTwoList} from '../educationThesisTwo.api'; | |||
| import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils' | |||
| // Emits声明 | |||
| const emit = defineEmits(['register','success']); | |||
| const isUpdate = ref(true); | |||
| const refKeys = ref(['educationExcelOne', 'educationExcelTwo', 'educationDocumentTwo', ]); | |||
| const activeKey = ref('educationExcelOne'); | |||
| const educationExcelOne = ref(); | |||
| const educationExcelTwo = ref(); | |||
| const educationDocumentTwo = ref(); | |||
| const tableRefs = {educationExcelOne, educationExcelTwo, educationDocumentTwo, }; | |||
| const educationExcelOneTable = reactive({ | |||
| loading: false, | |||
| dataSource: [], | |||
| columns:educationExcelOneColumns | |||
| }) | |||
| const educationExcelTwoTable = reactive({ | |||
| loading: false, | |||
| dataSource: [], | |||
| columns:educationExcelTwoColumns | |||
| }) | |||
| const educationDocumentTwoTable = reactive({ | |||
| loading: false, | |||
| dataSource: [], | |||
| columns:educationDocumentTwoColumns | |||
| }) | |||
| //表单配置 | |||
| const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({ | |||
| labelWidth: 150, | |||
| schemas: formSchema, | |||
| showActionButtonGroup: false, | |||
| }); | |||
| //表单赋值 | |||
| const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { | |||
| //重置表单 | |||
| await reset(); | |||
| setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter}); | |||
| isUpdate.value = !!data?.isUpdate; | |||
| if (unref(isUpdate)) { | |||
| //表单赋值 | |||
| await setFieldsValue({ | |||
| ...data.record, | |||
| }); | |||
| requestSubTableData(educationExcelOneList, {id:data?.record?.id}, educationExcelOneTable) | |||
| requestSubTableData(educationExcelTwoList, {id:data?.record?.id}, educationExcelTwoTable) | |||
| requestSubTableData(educationDocumentTwoList, {id:data?.record?.id}, educationDocumentTwoTable) | |||
| } | |||
| // 隐藏底部时禁用整个表单 | |||
| setProps({ disabled: !data?.showFooter }) | |||
| }); | |||
| //方法配置 | |||
| const [handleChangeTabs,handleSubmit,requestSubTableData,formRef] = useJvxeMethod(requestAddOrEdit,classifyIntoFormData,tableRefs,activeKey,refKeys); | |||
| //设置标题 | |||
| const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑')); | |||
| async function reset(){ | |||
| await resetFields(); | |||
| activeKey.value = 'educationExcelOne'; | |||
| educationExcelOneTable.dataSource = []; | |||
| educationExcelTwoTable.dataSource = []; | |||
| educationDocumentTwoTable.dataSource = []; | |||
| } | |||
| function classifyIntoFormData(allValues) { | |||
| let main = Object.assign({}, allValues.formValue) | |||
| return { | |||
| ...main, // 展开 | |||
| educationExcelOneList: allValues.tablesValue[0].tableData, | |||
| educationExcelTwoList: allValues.tablesValue[1].tableData, | |||
| educationDocumentTwoList: allValues.tablesValue[2].tableData, | |||
| } | |||
| } | |||
| //表单提交事件 | |||
| async function requestAddOrEdit(values) { | |||
| try { | |||
| setModalProps({confirmLoading: true}); | |||
| //提交表单 | |||
| await saveOrUpdate(values, isUpdate.value); | |||
| //关闭弹窗 | |||
| closeModal(); | |||
| //刷新列表 | |||
| emit('success'); | |||
| } finally { | |||
| setModalProps({confirmLoading: false}); | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="less" scoped> | |||
| </style> | |||