| | |
| | | </CustModal> |
| | | </Suspense> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> |
| | | <ImportExcelModal @register="registerImport" :title="ImportTitle" /> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | |
| | | import normalDrawer from '../normalDrawer.vue'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import RouteViewModal from '/@/views/components/RouteViewModal.vue'; |
| | | import ImportExcelModal from '/@/views/components/ImportExcelModal.vue'; |
| | | import { FlowChartView } from '/@/components/FlowChart'; |
| | | import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; |
| | | import { useModal } from '/@/components/Modal'; |
| | |
| | | const [registerRv, { openModal: openRvModal, closeModal: RvcloseModal }] = useModal(); |
| | | const [registerCust, { openModal: openCustModal }] = useModal(); |
| | | const [registerCrud, { openModal: openCrudModal }] = useModal(); |
| | | const [registerImport, { openModal: openImportModal }] = useModal(); |
| | | const cType = ref(''); |
| | | const formSchemas = ref({}); //弹出框多表单结构 |
| | | const routeData = ref({ |
| | |
| | | OpenSelectItem: OpenSelectCust, |
| | | GetSelectSuccess, |
| | | CustFunc, |
| | | GetTitle, |
| | | }, |
| | | ActionColumn, |
| | | ] = isNullOrUnDef(custImport.value['default']) |
| | |
| | | ? {} |
| | | : KeyFieldValues(objParams.value['CODE'], objParams.value['ID']); |
| | | const dtlSlots = ref<any[]>([]); |
| | | const ImportTitle = GetTitle && isFunction(GetTitle)? ref(GetTitle().importTitle): ref(''); |
| | | const useformdata = GetUseForm && isFunction(GetUseForm) ? GetUseForm() : {}; |
| | | const useFormData = ref<any>(useformdata); |
| | | /* 自定义模态窗口中表单中插槽渲染按钮打开模态框useModal方法 */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description: 获取新增按钮的行为 |
| | | * @description: 获取工具栏中按钮的行为 |
| | | * @return {*} |
| | | */ |
| | | function handleCreate(fnName: string) { |
| | |
| | | } else { |
| | | /* 如果动态加载的实体类.ts存在,根据.ts文件中的方法来执行操作 */ |
| | | const [{ CreateAction }] = custImport.value['default'](); |
| | | const result = CreateAction(entityName.value, colSlots.value); |
| | | const result = CreateAction(entityName.value, fnName); |
| | | switch (result.action) { |
| | | case 'go' /* 跳转页面 */: |
| | | // 将对象转换为JSON字符串并保存到sessionStorage |
| | |
| | | ifSave: true, //是否提交表单时保存到数据库,否-暂存|是-保存 |
| | | }); |
| | | break; |
| | | case 'importModal' /* 打开导入Excel模态窗口 */: |
| | | openImportModal(true, result.params); |
| | | break; |
| | | } |
| | | } |
| | | } |