| | |
| | | <GeneralTree |
| | | class="w-1/4 xl:w-1/5" |
| | | @select="handleSelect" |
| | | @UnSelect="UnSelect" |
| | | :title="title" |
| | | :treeData="treeData" |
| | | :create-icon="createIcon" |
| | |
| | | add |
| | | @handle-add="handleAdd" --> |
| | | <div class="w-3/4 xl:w-4/5 p-5"> |
| | | <RouteAction v-if="entityName == 'ProdRouteBinding'" /> |
| | | <RouteAction v-if="entityName == 'ProdRouteBinding' && rotType=='Product'" /> |
| | | </div> |
| | | <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable"> |
| | | <template #toolbar> |
| | |
| | | import { PageWrapper } from '@/components/Page'; |
| | | import GeneralTree from '/@/views/components/GeneralTree.vue'; |
| | | 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, |
| | | GetSelectSuccess, |
| | | OpenCustModal, |
| | | fetchTreeData, |
| | | getFormSchema, |
| | | getHomeUrl, |
| | | getOthersValues, |
| | | } from '../data'; |
| | | import { onMounted, reactive, ref } from 'vue'; |
| | | import { Ref, onMounted, provide, reactive, ref } from 'vue'; |
| | | import { useRoute } from 'vue-router'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import { BasicForm, useForm } from '/@/components/Form/index'; |
| | | import { TreeItem } from '/@/components/TigerTree'; |
| | | import { createIconByType } from '../data'; |
| | | import { RouteToProd } from '/@/api/tigerapi/mes/router'; |
| | | import { useTabs } from '/@/hooks/web/useTabs'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import { useGo } from '/@/hooks/web/usePage'; |
| | |
| | | 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 prodCode = ref(''); |
| | | const rotType = ref(''); |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | provide<Ref<string>>('prodCode', prodCode); |
| | | setTitle(objParams.value.Title); //设置标签页标题 |
| | | // const [registerTable, { reload }] = useTable({ |
| | | // title: '列表信息', |
| | |
| | | return validates; |
| | | } |
| | | |
| | | function handleCreate() { |
| | | // validate().then((res) => { |
| | | // const Keys = Object.getOwnPropertyNames(useFormData.value); |
| | | // let i; |
| | | // for (i = 0; i < Keys.length; i++) { |
| | | // others.value[objParams.value.pCode] = objParams.value.IsID |
| | | // ? res[Keys[i]]['ID'] |
| | | // : res[Keys[i]][objParams.value.pCode]; |
| | | // } |
| | | // openDrawer(true, { |
| | | // isUpdate: false, |
| | | // ifSave: true, |
| | | // entityName: entityName.value, |
| | | // formJson: getFormSchema(`${entityName.value}_Crud`), |
| | | // crudColSlots, |
| | | // others: others.value, |
| | | // }); |
| | | // }); |
| | | RouteToProd({ rotId: 'e4712192f75b465585107fdcd13d8003', prodCode: 'K5019AA013517' }).then( |
| | | () => {}, |
| | | ); |
| | | } |
| | | |
| | | // function handleEdit(record: Recordable) { |
| | | // openModal(true, { |
| | | // record, |
| | |
| | | |
| | | function handleSelect(deptId = '', info) { |
| | | searchInfo.deptId = deptId; |
| | | prodCode.value = info.selectedNodes[0].code; |
| | | rotType.value = info.selectedNodes[0].type; |
| | | // reload(); |
| | | } |
| | | |
| | | /** |
| | | * @description: 取消选择时事件返回方法 |
| | | * @param {*} node |
| | | * @return {*} |
| | | */ |
| | | function UnSelect(node) { |
| | | prodCode.value = ''; |
| | | rotType.value = ''; |
| | | // reload(); |
| | | } |
| | | |