| | |
| | | * @version: |
| | | * @Date: 2024-06-18 23:30:30 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-22 16:25:39 |
| | | * @LastEditTime: 2024-08-06 10:04:20 |
| | | --> |
| | | <template> |
| | | <PageWrapper |
| | | :dense="dense" |
| | | contentFullHeight |
| | | fixedHeight |
| | | contentClass="flex" |
| | | :title="pageTitle" |
| | | :content="pageContent" |
| | | @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"> |
| | |
| | | </div> |
| | | </template> |
| | | </CarGridNav> |
| | | <Config v-if="showConfig" :configType="configType" @success="configSuccess" /> |
| | | <Config |
| | | v-if="showConfig" |
| | | :configType="configType" |
| | | :OtherTableName="OtherTableName" |
| | | @success="configSuccess" |
| | | /> |
| | | </div> |
| | | </Suspense> |
| | | <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> |
| | |
| | | const { notification, createErrorModal } = useMessage(); |
| | | const go = useGo(); |
| | | const route = useRoute(); |
| | | const { setTitle } = useTabs(); |
| | | 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 isMounted = ref(false); |
| | | const showNav = ref(false); |
| | | const showConfig = ref(false); |
| | | const showOtherTable = ref(false); |
| | | const configType = ref(''); |
| | | const OtherTableName = ref(''); |
| | | const nodes = ref([]); |
| | | const routeData = ref({ |
| | | nodes: [], |
| | |
| | | if (!isNullOrUnDef(custImport.value)) { |
| | | const [{ GetHomeUrl }] = custImport.value['default'](); |
| | | // 本例的效果时点击返回始终跳转到账号列表页,实际应用时可返回上一页 |
| | | go(GetHomeUrl({colSlots:colSlots.value})); |
| | | go(GetHomeUrl({ colSlots: colSlots.value })); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | const currlf = ref(null) as Ref<LogicFlow | null>; |
| | | /** |
| | | * @description: 工艺路线初始化 |
| | | * @description: 工艺路线初始化,特殊页面自定义内容 |
| | | * @param {*} lf |
| | | * @return {*} |
| | | */ |
| | | async function init(lf, rotId) { |
| | | initRoute(lf, rotId, routeData, currlf); |
| | | initRoute(lf, rotId, routeData, currlf, objParams.value.rotType); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | function NodeSelect(e) { |
| | | showConfig.value = e.showConfig; |
| | | showOtherTable.value = e.showOtherTable; |
| | | showNav.value = e.showNav; |
| | | configType.value = e.type; |
| | | OtherTableName.value = objParams.value.OtherTableName; |
| | | nodes.value = e.nodes; |
| | | routeData.value = { |
| | | nodes: [], |
| | | edges: [], |
| | | }; |
| | | initRoute(currlf, e.nodes[0].id, routeData, currlf); |
| | | /* 自定义内容,只有显示工艺路线的组合页面会进来 */ |
| | | if (e.nodes[0].type == 'Route') { |
| | | let _rotId = e.nodes[0].code; |
| | | if (objParams.value.rotType == 'Wo') { |
| | | _rotId = e.nodes[0].wo; |
| | | } |
| | | initRoute(currlf, _rotId, routeData, currlf, objParams.value.rotType); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: 删除节点后回调 |
| | | * @param {*} node |
| | | * @return {*} |
| | | */ |
| | | function delCallback(node) { |
| | | refreshPage(); |
| | | } |
| | | |
| | | /** |
| | |
| | | ); //[openRvModal], selectVals.value['ID']这是自定义参数,按实际需求 |
| | | } |
| | | </script> |
| | | <style lang="less"> |
| | | .vben-page-wrapper .vben-page-wrapper-content { |
| | | margin: 1px; |
| | | } |
| | | </style> |