| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-15 22:05:16 |
| | | * @LastEditTime: 2024-07-21 18:26:07 |
| | | */ |
| | | |
| | | import { Ref, h, ref, render, unref } from 'vue'; |
| | |
| | | import { FormSchema } from '/@/components/Table'; |
| | | import { initRoute } from '../data'; |
| | | import { CustModalParams } from '/@/api/tigerapi/model/systemModel'; |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { createErrorModal } = useMessage(); |
| | |
| | | */ |
| | | fetchTreeData: async (type: string, itemCode: string) => { |
| | | let data = { title: '', treeData: [] as any[], fieldNames: {} }; |
| | | let prodTreeData = await GetRoutePTree(itemCode); |
| | | let prodTreeData = await GetRoutePTree({prodCode: itemCode, orgCode: useUserStore().getUserInfo.orgCode}); |
| | | // let uniqueArr = prodTreeData.reduce((acc, current) => { |
| | | // if (!acc.some((x) => x.pid == current.pid && x.id == current.id && x.seq == current.seq && x.type == current.type)) { |
| | | // acc.push(current); |
| | |
| | | ], |
| | | tableName: 'MES_ROUTE', |
| | | rowKey: 'ROT_CODE', |
| | | returnFieldName: 'ROUTE_CODE', //返回值要赋值的字段名称 |
| | | returnFieldName: ['ROUTE_CODE'], //返回值要赋值的字段名称 |
| | | searchInfo: { TABLE_NAME: 'MES_ROUTE' }, |
| | | which: action, |
| | | }); |