| | |
| | | <template> |
| | | <PageWrapper dense contentFullHeight fixedHeight contentClass="flex"> |
| | | <PageWrapper |
| | | :dense="dense" |
| | | contentFullHeight |
| | | fixedHeight |
| | | contentClass="flex" |
| | | :title="pageTitle" |
| | | :content="pageContent" |
| | | @back="goBack" |
| | | > |
| | | <GeneralTree |
| | | class="w-1/4 xl:w-1/5" |
| | | @select="handleSelect" |
| | |
| | | /><!-- |
| | | add |
| | | @handle-add="handleAdd" --> |
| | | <div class="w-3/4 xl:w-4/5"></div> |
| | | <div class="w-3/4 xl:w-4/5 p-5"> |
| | | <RouteAction v-if="entityName == 'ProdRouteBinding'" /> |
| | | </div> |
| | | <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> |
| | | <template #toolbar> |
| | | <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> 新增 </a-button> |
| | |
| | | </template> |
| | | </template> |
| | | </BasicTable> --> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> |
| | | <!-- <normalDrawer @register="registerDrawer" @success="handleSuccess" /> --> |
| | | <CustModal |
| | | @register="registerCust" |
| | | @success="custSuccess" |
| | |
| | | import { useModal } from '@/components/Modal'; |
| | | import normalDrawer from '../normalDrawer.vue'; |
| | | import GeneralModal from '/@/views/components/GeneralModal.vue'; |
| | | import RouteAction from './RouteAction.vue'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import { |
| | | GetActionsData, |
| | |
| | | OpenCustModal, |
| | | fetchTreeData, |
| | | getFormSchema, |
| | | getHomeUrl, |
| | | getOthersValues, |
| | | } from '../data'; |
| | | import { onMounted, reactive, ref } from 'vue'; |
| | |
| | | import { TreeItem } from '/@/components/TigerTree'; |
| | | import { createIconByType } from '../data'; |
| | | import { RouteToProd } from '/@/api/tigerapi/mes/router'; |
| | | import { useTabs } from '/@/hooks/web/useTabs'; |
| | | import { useTabs } from '/@/hooks/web/useTabs'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import { useGo } from '/@/hooks/web/usePage'; |
| | | |
| | | defineOptions({ name: 'DeptManagement' }); |
| | | |
| | | const go = useGo(); |
| | | const route = useRoute(); |
| | | const { setTitle } = useTabs(); |
| | | const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); |
| | | const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); //ref(JSON.parse(history.state.obj)) |
| | | const entityName = ref(objParams.value.Name); |
| | | const formSchemas = ref({}); //弹出框或高级页面多表单结构 |
| | | const useModalData = ref({}); //表单中插槽渲染按钮打开模态框useModal方法 |
| | |
| | | const treeData = ref<TreeItem[]>([]); |
| | | const title = ref(''); |
| | | const fieldNames = 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 others = ref(getOthersValues(entityName.value, objParams.value.CODE, objParams.value.ID)); |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | |
| | | * @description: 获取树形数据 |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | */ |
| | | async function fetch(type: string) { |
| | | //根据type获取树形数据 |
| | | const data = await fetchTreeData(type, objParams.value.CODE); |
| | | title.value = data.title; |
| | | treeData.value = data.treeData; |
| | | fieldNames.value = data.fieldNames; |
| | | } |
| | | |
| | | /** |
| | | * @description: 页面左侧点击返回链接时的操作 |
| | | * @return {*} |
| | | */ |
| | | function goBack() { |
| | | go(getHomeUrl(entityName.value)); |
| | | } |
| | | |
| | | // function handleAdd(){ |
| | |
| | | * @param {*} params |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | */ |
| | | function createIcon(params: Recordable<any>) { |
| | | return createIconByType(params, entityName.value); |
| | | } |
| | |
| | | // others: others.value, |
| | | // }); |
| | | // }); |
| | | RouteToProd({rotId: 'e4712192f75b465585107fdcd13d8003', prodCode: 'K5019AA013517'}).then(() => { |
| | | |
| | | }); |
| | | RouteToProd({ rotId: 'e4712192f75b465585107fdcd13d8003', prodCode: 'K5019AA013517' }).then( |
| | | () => {}, |
| | | ); |
| | | } |
| | | |
| | | // function handleEdit(record: Recordable) { |
| | |
| | | // console.log(record); |
| | | // } |
| | | |
| | | function handleSelect(deptId = '') { |
| | | function handleSelect(deptId = '', info) { |
| | | searchInfo.deptId = deptId; |
| | | reload(); |
| | | // reload(); |
| | | } |
| | | |
| | | function handleSuccess() { |
| | | reload(); |
| | | } |
| | | // function handleSuccess() { |
| | | // reload(); |
| | | // } |
| | | |
| | | /** |
| | | * @description: 弹出框确定返回 |
| | |
| | | * @return {*} |
| | | */ |
| | | function custSuccess(d) { |
| | | reload(); |
| | | // reload(); |
| | | } |
| | | |
| | | /** |