| | |
| | | * @version: |
| | | * @Date: 2024-06-18 23:30:30 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-21 18:03:22 |
| | | * @LastEditTime: 2024-07-23 23:16:58 |
| | | --> |
| | | <template> |
| | | <PageWrapper |
| | |
| | | @back="goBack" |
| | | > |
| | | <Suspense class="w-1/4 xl:w-1/5"> |
| | | <LeftTree @select="NodeSelect" /> |
| | | <LeftTree @select="NodeSelect" @deletenode="delCallback" /> |
| | | </Suspense> |
| | | <Suspense> |
| | | <div class="w-3/4 xl:w-4/5 p-5"> |
| | |
| | | const { notification, createErrorModal } = useMessage(); |
| | | const go = useGo(); |
| | | const route = useRoute(); |
| | | const { setTitle } = useTabs(); |
| | | const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); //ref(JSON.parse(history.state.obj)) |
| | | const entityName = ref(objParams.value.Name); |
| | | const { setTitle, refreshPage } = useTabs(); |
| | | // const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); //ref(JSON.parse(history.state.obj)) |
| | | const routeParams = ref(JSON.parse(decodeURI(route.params?.id as string))); |
| | | // 从sessionStorage中读取参数并转换回对象 |
| | | const savedParams = sessionStorage.getItem(`${routeParams.value.sName}_params`); |
| | | const objParams = savedParams ? ref(JSON.parse(decodeURI(savedParams))) : ref({}); |
| | | const entityName = ref(routeParams.value.Name); |
| | | const useModalData = ref({}); //表单中插槽渲染按钮打开模态框useModal方法 |
| | | const useFormData = ref({}); |
| | | const cType = ref(''); |
| | |
| | | const dense = isNullOrUnDef(objParams.value.dense) ? ref(false) : ref(objParams.value.dense); |
| | | const pageTitle = ref(objParams.value.pageTitle); |
| | | const pageContent = ref(objParams.value.pageContent); |
| | | const colSlots = ref<any>(objParams.value.colSlots); |
| | | const selectedNodes = ref([]); |
| | | const isMounted = ref(false); |
| | | const showNav = ref(false); |
| | |
| | | if (!isNullOrUnDef(custImport.value)) { |
| | | const [{ GetHomeUrl }] = custImport.value['default'](); |
| | | // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页 |
| | | go(GetHomeUrl(entityName.value)); |
| | | go(GetHomeUrl({ colSlots: colSlots.value })); |
| | | } |
| | | } |
| | | |
| | |
| | | nodes: [], |
| | | edges: [], |
| | | }; |
| | | initRoute(currlf, e.nodes[0].id, routeData, currlf); |
| | | if ((e.nodes[0].type == 'Route')) { |
| | | initRoute(currlf, e.nodes[0].code, routeData, currlf); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: 删除节点后回调 |
| | | * @param {*} node |
| | | * @return {*} |
| | | */ |
| | | function delCallback(node) { |
| | | refreshPage(); |
| | | } |
| | | |
| | | /** |