| | |
| | | }; |
| | | export type MesWslistPageParams = BasicPageParams & MES_WORKSHOPParams; |
| | | |
| | | export interface BIZ_MES_WO_BATCH { |
| | | ID: string; |
| | | CREATE_TIME: Date; |
| | | CREATE_USER: string; |
| | | UPDATE_TIME: Date; |
| | | UPDATE_USER: string; |
| | | GHOST_ROW: boolean; |
| | | AUTH_ORG: string; |
| | | AUTH_PROD: string; |
| | | AUTH_WH: string; |
| | | ORDER_NO: string; |
| | | STATUS: number; |
| | | ITEM_CODE: string; |
| | | CUST_CODE: string; |
| | | FACTORY: string; |
| | | WS_CODE: string; |
| | | ACT_LINE: string; |
| | | ACT_START_TIME: Date; |
| | | ACT_END_TIME: Date; |
| | | STD_WORKER_QTY: number; |
| | | ACT_WORKER_QTY: number; |
| | | RELEASE_TIME: Date; |
| | | RELEASE_USER: string; |
| | | PLAN_QTY: number; |
| | | INPUT_QTY: number; |
| | | OUTPUT_QTY: number; |
| | | SCRAP_QTY: number; |
| | | STOCK_IN_QTY: number; |
| | | UPH: number; |
| | | UPPH: number; |
| | | REMARK: string; |
| | | } |
| | | |
| | | export type OperPageListGetResultModel = BasicFetchResult<OperListItem>; |
| | | export type CheckRulePageListGetResultModel = BasicFetchResult<CheckRuleListItem>; |
| | | export type MeslinePageListGetResultModel = BasicFetchResult<MeslineListItem>; |
| | |
| | | ); |
| | | }; |
| | | |
| | | /* éç¨æ¥è¯¢å页 */ |
| | | /** |
| | | * @description: éç¨æ¥è¯¢å页 |
| | | * @param {T} params |
| | | * @return {*} |
| | | */ |
| | | export async function getListByPage<T>(params: T) { |
| | | const Keys = Object.getOwnPropertyNames(params); |
| | | let sqlcmd = '1=1 '; |
| | |
| | | Keys[k] != 'TABLE_NAME' && |
| | | Keys[k] != 'order' && |
| | | Keys[k] != 'field' && |
| | | Keys[k] != '0' |
| | | Keys[k] != '0' && |
| | | !Keys[k].toString().endsWith('PSelect_0') |
| | | ) { |
| | | if (!isNullOrEmpty(params[Keys[k]].length) && isTimeType(params[Keys[k]][0])) { |
| | | sqlcmd += ` And ${Keys[k]} > '${params[Keys[k]][0]}'`; |
| | |
| | | import { useSplitMenu } from './useLayoutMenu'; |
| | | import { openWindow } from '/@/utils'; |
| | | import { propTypes } from '/@/utils/propTypes'; |
| | | import { isUrl } from '/@/utils/is'; |
| | | import { isNullOrUnDef, isUrl } from '/@/utils/is'; |
| | | import { useRootSetting } from '/@/hooks/setting/useRootSetting'; |
| | | import { useAppInject } from '/@/hooks/web/useAppInject'; |
| | | import { useDesign } from '/@/hooks/web/useDesign'; |
| | | import { getEntity } from '/@/api/tigerapi/system'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'LayoutMenu', |
| | |
| | | * @param menu |
| | | */ |
| | | |
| | | function handleMenuClick(path: string) { |
| | | function handleMenuClick(path: string) { |
| | | if (path.split('/').length > 1 && path.split('/')[2] == 'LC') { |
| | | const id = { ID: path.split('/')[1] }; |
| | | getEntity({ |
| | | sqlcmd: `ASSEMBLY_NAME ='${path.split('/')[1]}'`, |
| | | entityName: 'SYS_LOW_CODE', |
| | | }).then((data) => { |
| | | var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); |
| | | let colSlots = [] as string[]; |
| | | for (const i in searchForms) { |
| | | if(!isNullOrUnDef(searchForms[i]['colSlot'])){ |
| | | colSlots.push('form-'+searchForms[i]['colSlot']); |
| | | } |
| | | } |
| | | |
| | | var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON); |
| | | let crudColSlots = [] as string[]; |
| | | for (const i in _cruds) { |
| | | if(!isNullOrUnDef(_cruds[i]['colSlot'])){ |
| | | crudColSlots.push(_cruds[i]['colSlot']); |
| | | } |
| | | } |
| | | const id = { ID: path.split('/')[1], colSlots: colSlots, crudColSlots: crudColSlots }; |
| | | go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify(id))}`); |
| | | }); |
| | | } else { |
| | | go(path); |
| | | } |
| | |
| | | <!-- |
| | | * @Description: èªå®ä¹å¼¹åºæ¡ï¼å¯ä»¥èªå®ä¹å¤ä¸ªè¡¨å |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-05 15:46:07 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-10 23:48:05 |
| | | --> |
| | | <template> |
| | | <BasicModal |
| | | v-bind="$attrs" |
| | |
| | | const title = ref(''); |
| | | const width = ref(''); |
| | | const FnName = ref({}); |
| | | const mValues = ref<Recordable>({}); |
| | | const initFnName = ref({}); |
| | | const dtlSlots = ref([] as any[]); |
| | | const formSchema = ref([] as FormSchema[]); |
| | |
| | | formElName.value = data?.formElName; //å¼¹æ¡ä¸è¡¨åååæ°ç» |
| | | useFormData.value = data?.formEl; //å¼¹æ¡ä¸è¡¨åå®ä¾æ°ç» |
| | | FnName.value = data?.fnName; //ä¿åæ°æ®æ¹æ³ |
| | | mValues.value = data?.values; //主表åä¼ è¿æ¥çæ°æ® |
| | | //循ç¯è¡¨ååæ°ç»ï¼æä½å表ååæ®µ |
| | | formElName.value.forEach((name) => { |
| | | if (!isNullOrUnDef(useFormData.value[name])) { |
| | | useFormData.value[name][1].resetFields(); |
| | | if (unref(isUpdate)) { |
| | | useFormData.value[name][1].setFieldsValue({ |
| | | ...data, |
| | | ...mValues.value, |
| | | }); |
| | | } |
| | | } |
| | |
| | | //åå§åæ¹æ³èªå®ä¹ |
| | | if (!isNullOrEmpty(data?.initFnName)) { |
| | | initFnName.value = data?.initFnName; |
| | | custFunction(unref(isUpdate.value), initFnName.value[cType.value], cType.value); |
| | | custFunction( |
| | | unref(isUpdate.value), |
| | | initFnName.value[cType.value], |
| | | cType.value, |
| | | mValues.value, |
| | | data?.others, |
| | | ); |
| | | } |
| | | }); |
| | | |
| | |
| | | // { deep: true }, |
| | | // ); |
| | | |
| | | /* å¼¹æ¡ç¡®å®æé®æ¹æ³ */ |
| | | /** |
| | | * @description: å¼¹æ¡ç¡®å®æé®æ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | async function handleSuccess() { |
| | | try { |
| | | var values = {} as any; |
| | |
| | | } |
| | | setModalProps({ confirmLoading: true }); |
| | | //è°ç¨èªå®ä¹ä¿åæ¹æ³ä¿åæ°æ® |
| | | values['mValues'] = mValues.value; |
| | | const action = await custFunction(values, FnName.value[cType.value], cType.value); |
| | | if (action as boolean) { |
| | | closeModal(); |
| | |
| | | /* |
| | | * @Description: å·¥åèªå®ä¹æ¹æ³ts |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-05 16:10:24 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-10 23:49:39 |
| | | */ |
| | | /* å·¥åç¸å
³èªå®ä¹æ¹æ³ */ |
| | | import { FunctionType } from '/@/api/tigerapi/model/systemModel'; |
| | | import { GetEnum, SaveEntity, getEntity } from '/@/api/tigerapi/system'; |
| | |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { uploadApi } from '/@/api/sys/upload'; |
| | | import { useLocale } from '/@/locales/useLocale'; |
| | | import { unref } from 'vue'; |
| | | import { ref, unref } from 'vue'; |
| | | import { BIZ_MES_WO_BATCH } from '/@/api/tigerapi/model/mesModel'; |
| | | import { buildUUID } from '/@/utils/uuid'; |
| | | import LogicFlow from '@logicflow/core'; |
| | | import { BpmnElement } from '@logicflow/extension'; |
| | | import { getRouteData } from '/@/api/tigerapi/mes/router'; |
| | | import customEdge from '/@/components/FlowChart/src/customEdge'; |
| | | import actionRect from '/@/components/FlowChart/src/actionRect'; |
| | | import TestNode from '/@/components/FlowChart/src/TestNode'; |
| | | import CollectNode from '/@/components/FlowChart/src/CollectNode'; |
| | | import AssemblyNode from '/@/components/FlowChart/src/AssemblyNode'; |
| | | import PackingNode from '/@/components/FlowChart/src/PackingNode'; |
| | | import RepairNode from '/@/components/FlowChart/src/RepairNode'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { getLocale } = useLocale(); |
| | | /* èªå®ä¹æ¹æ³ */ |
| | | |
| | | /** |
| | | * @description: èªå®ä¹æ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | export const getWoFns: Record<string, FunctionType> = { |
| | | handleSubmit: async (e, ...args) => { |
| | | const values = await args[0][0].validate(); |
| | |
| | | } |
| | | }); |
| | | }, |
| | | //å·¥åé
ç½®ä¿åæ¹æ³ |
| | | |
| | | /** |
| | | * @description: å·¥åé
ç½®ä¿åæ¹æ³ |
| | | * @param {*} e |
| | | * @param {array} args |
| | | * @return {*} |
| | | */ |
| | | SaveCofig: (e, ...args) => { |
| | | return new Promise((resolve, reject) => { |
| | | try { |
| | | const xx = e['prodinfo']; |
| | | resolve(true); |
| | | const form = e['prodinfo']; |
| | | const wo = e['mValues']; |
| | | wo.ROUTE_STATUS = 1; |
| | | SaveEntity(wo, true, 'BIZ_MES_WO').then((action) => { |
| | | if (action.IsSuccessed) { |
| | | resolve(true); |
| | | } else { |
| | | reject(false); |
| | | } |
| | | }); |
| | | } catch { |
| | | reject(false); |
| | | } finally { |
| | | args[0][0]({ confirmLoading: false }); |
| | | } |
| | | }); |
| | | }, |
| | | //å·¥åä¸åä¿åæ¹æ³ |
| | | /** |
| | | * @description: å·¥åä¸åä¿åæ¹æ³ |
| | | * @param {*} e |
| | | * @param {array} args |
| | | * @return {*} |
| | | */ |
| | | SaveWoBatch: (e, ...args) => { |
| | | return new Promise((resolve, reject) => { |
| | | try { |
| | | const xx = e['forminfo']; |
| | | const form = e['forminfo']; |
| | | const wo = e['mValues']; |
| | | wo.ROUTE_CODE = form.ROUTE_CODE; |
| | | wo.STATUS = 2; |
| | | const woBatch: BIZ_MES_WO_BATCH = { |
| | | ID: buildUUID(), |
| | | CREATE_TIME: new Date(), |
| | | CREATE_USER: useUserStore().getUserInfo.userId as string, |
| | | UPDATE_TIME: new Date(), |
| | | UPDATE_USER: useUserStore().getUserInfo.userId as string, |
| | | GHOST_ROW: false, |
| | | AUTH_ORG: '', |
| | | AUTH_PROD: useUserStore().getUserInfo.prodCode as string, |
| | | AUTH_WH: '', |
| | | ORDER_NO: wo.ORDER_NO, |
| | | STATUS: wo.STATUS, |
| | | ITEM_CODE: wo.ITEM_CODE, |
| | | CUST_CODE: wo.CUST_CODE, |
| | | FACTORY: wo.FACTORY, |
| | | WS_CODE: wo.WS_CODE, |
| | | ACT_LINE: form.PLAN_LINE, |
| | | STD_WORKER_QTY: wo.STD_WORKER_QTY, |
| | | ACT_WORKER_QTY: wo.ACT_WORKER_QTY, |
| | | RELEASE_TIME: new Date(), |
| | | RELEASE_USER: useUserStore().getUserInfo.userId as string, |
| | | PLAN_QTY: wo.PLAN_QTY, |
| | | INPUT_QTY: wo.INPUT_QTY, |
| | | OUTPUT_QTY: wo.OUTPUT_QTY, |
| | | SCRAP_QTY: wo.SCRAP_QTY, |
| | | STOCK_IN_QTY: wo.STOCK_IN_QTY, |
| | | UPH: wo.UPH, |
| | | UPPH: wo.UPPH, |
| | | REMARK: wo.REMARK, |
| | | ACT_START_TIME: wo.ACT_START_TIME, |
| | | ACT_END_TIME: wo.ACT_END_TIME, |
| | | }; |
| | | SaveEntity(woBatch, false, 'BIZ_MES_WO_BATCH').then((action) => { |
| | | if (action.IsSuccessed) { |
| | | SaveEntity(wo, true, 'BIZ_MES_WO').then((action) => { |
| | | if (action.IsSuccessed) { |
| | | resolve(true); |
| | | } else { |
| | | reject(false); |
| | | } |
| | | }); |
| | | } else { |
| | | reject(false); |
| | | } |
| | | }); |
| | | } catch { |
| | | reject(false); |
| | | } |
| | | }); |
| | | }, |
| | | initRoute: async (e, ...args) => { |
| | | const _data = await getRouteData(args[0][0].ROUTE_CODE); |
| | | args[0][1] = ref({ |
| | | nodes: [], |
| | | edges: [], |
| | | }); |
| | | return new Promise((resolve, reject) => { |
| | | try { |
| | | LogicFlow.use(BpmnElement); |
| | | const lf = new LogicFlow({ |
| | | container: document.querySelector('#lfContainer'), |
| | | edgeGenerator: (sourceNode) => { |
| | | // console.log('a'); |
| | | // èµ·å§èç¹ç±»å rect æ¶ä½¿ç¨ èªå®ä¹çè¾¹ custom-edge |
| | | if (sourceNode.properties.isReturn) return 'custom-edge'; |
| | | // if (sourceNode.type === 'rect') return 'custom-edge'; |
| | | // return 'custom-edge'; |
| | | }, |
| | | }); |
| | | lf.register(customEdge); |
| | | lf.register(actionRect); |
| | | lf.register(TestNode); |
| | | lf.register(CollectNode); |
| | | lf.register(AssemblyNode); |
| | | lf.register(PackingNode); |
| | | lf.register(RepairNode); |
| | | lf.render({}); |
| | | //éè¿å·¥èºè·¯çº¿IDè·åå¾å½¢æ°æ®ï¼å¹¶æ¸²æ |
| | | console.log('ç»ä»¶å·²æè½½', _data); |
| | | //å·¥èºè·¯çº¿å
¨ä¿¡æ¯ï¼å
æ¬NodeãEdgeåAct |
| | | // routeConfig.routeData = _data.Data; |
| | | if (_data.Data != null) { |
| | | //å·¥èºè·¯çº¿ä¸»ä¿¡æ¯ |
| | | const currRoute = _data.Data.route; |
| | | _data.Data.nodes.forEach((n) => { |
| | | n.node.properties = JSON.parse(n.node.properties); |
| | | args[0][1].value.nodes.push(n.node); |
| | | }); |
| | | console.log('111', args[0][1]); |
| | | _data.Data.edges.forEach((e) => { |
| | | e.edge.properties = JSON.parse(e.edge.properties); |
| | | args[0][1].value.edges.push(e.edge); |
| | | }); |
| | | _data.Data.acts.forEach((act) => { |
| | | act.node.properties = JSON.parse(act.node.properties); |
| | | args[0][1].value.nodes.push(act.node); |
| | | }); |
| | | console.log('init', unref(lf).getGraphData(), JSON.parse(JSON.stringify(args[0][1]))); |
| | | lf.render(args[0][1].value); |
| | | // lf.graphModel.resize(500, 400); |
| | | lf.graphModel.fitView(); |
| | | lf.graphModel.translateCenter(); |
| | | } |
| | | resolve(true); |
| | | } catch { |
| | | reject(false); |
| | | } finally { |
| | | args[0][0]({ confirmLoading: false }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | ]; |
| | | |
| | | //å·¥èºè·¯çº¿å¼¹æ¡è¿å |
| | | /** |
| | | * @description: å·¥èºè·¯çº¿å¼¹æ¡è¿å |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @return {*} |
| | | */ |
| | | export function woGetSelectSuccess(d, u) { |
| | | return { |
| | | ROUTE_CODE: d.values['val'], |
| | |
| | | }; |
| | | } |
| | | |
| | | /* èªå®ä¹æ¨¡ææ¡æå¼æ¹æ³ */ |
| | | /** |
| | | * @description: èªå®ä¹æ¨¡ææ¡æå¼æ¹æ³ |
| | | * @param {Fn} openModal |
| | | * @param {string} slotName |
| | | * @param {Fn} others |
| | | * @param {array} args |
| | | * @return {*} |
| | | */ |
| | | export function woCustFn(openModal: Fn, slotName: string, others: Fn[], ...args) { |
| | | switch (slotName) { |
| | | case 'add': |
| | |
| | | /* |
| | | * @Description: èªå®ä¹å¼¹åºæ¡è¯·æ°æ® |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-05 15:50:59 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-10 23:55:12 |
| | | */ |
| | | import { |
| | | getWoFns, |
| | | woGetSelectSuccess, |
| | |
| | | return _formSchema; |
| | | } |
| | | |
| | | /* å¼¹åºéæ©æ¡éæ©æå */ |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡éæ©æå |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @param {string} entityName |
| | | * @return {*} |
| | | */ |
| | | export function GetSelectSuccess(d, u, entityName: string) { |
| | | let data = {}; |
| | | switch (entityName) { |
| | |
| | | return data; |
| | | } |
| | | |
| | | /* æå¼å¼¹åºéæ©æ¡ */ |
| | | /** |
| | | * @description: æå¼å¼¹åºéæ©æ¡ |
| | | * @return {*} |
| | | */ |
| | | export function OpenSelectItem( |
| | | openItemModal: Fn, |
| | | entityName: string, |
| | |
| | | sorter: true, |
| | | resizable: true, |
| | | customRender: ({ record }) => { |
| | | const status = record.STATUS; |
| | | const status = record.ROUTE_STATUS; |
| | | let text = ''; |
| | | let color = ''; |
| | | switch (status) { |
| | |
| | | <!-- |
| | | * @Description: å·¥å管çé¡µé¢ |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-05-25 00:27:00 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-10 23:54:01 |
| | | --> |
| | | <template> |
| | | <div> |
| | | <BasicTable @register="registerTable"> |
| | |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { getListByPage } from '/@/api/tigerapi/system'; |
| | | import { SaveEntity, getListByPage } from '/@/api/tigerapi/system'; |
| | | import { GetSelectSuccess, OpenSelectItem, getFormSchema } from '/@/views/components/data'; |
| | | import LogicFlow from '@logicflow/core'; |
| | | import { getRouteData } from '/@/api/tigerapi/mes/router'; |
| | |
| | | import PackingNode from '/@/components/FlowChart/src/PackingNode'; |
| | | import RepairNode from '/@/components/FlowChart/src/RepairNode'; |
| | | import customEdge from '/@/components/FlowChart/src/customEdge'; |
| | | import { Snapshot, BpmnElement, Menu, DndPanel, SelectionSelect } from '@logicflow/extension'; |
| | | import { BpmnElement } from '@logicflow/extension'; |
| | | |
| | | const { t } = useI18n(); |
| | | const ASteps = Steps; |
| | |
| | | const mtitle = ref('å·¥åå表'); |
| | | const dtlSlots = ref([] as any[]); |
| | | const selectVals = ref({}); |
| | | const { createMessage } = useMessage(); |
| | | const { createMessage, createErrorModal } = useMessage(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | const compState = reactive({ |
| | | absolute: false, |
| | |
| | | const formSchema = ref([] as FormSchema[]); |
| | | const woSchema = ref([] as FormSchema[]); |
| | | const prodSchema = ref([] as FormSchema[]); |
| | | const rotSchema = ref([] as FormSchema[]); |
| | | const isCustEl = ref({ |
| | | forminfo: false, |
| | | woinfo: false, |
| | |
| | | woSchema.value = getFormSchema('woinfo'); |
| | | prodSchema.value = getFormSchema('prodinfo'); |
| | | // rotSchema.value = getFormSchema('rotinfo'); |
| | | //å·¥èºè·¯çº¿æ¸²æå¾åå§å |
| | | if (lfInstance.value != null) { |
| | | routeData.value = { |
| | | nodes: [], |
| | |
| | | const lf = unref(lfInstance)!; |
| | | lf.render({}); |
| | | } |
| | | selectVals.value['ROUTE_CODE'] = record.ROUTE_CODE; |
| | | openCustModal(true, { |
| | | isUpdate: true, |
| | | ctype: cType, |
| | |
| | | formElName: ['woinfo', 'prodinfo', 'rotinfo'], //è¡¨åææ§½åç§°ï¼æ¯æå¤ä¸ªè¡¨å |
| | | RowKey: '', |
| | | fnName: { BIZ_MES_WO_Config: 'SaveCofig' }, //ä¿åæ¹æ³å |
| | | initFnName: {}, //åå§åæ¹æ³å |
| | | initFnName: { BIZ_MES_WO_Config: 'initRoute' }, //åå§åæ¹æ³å |
| | | isCustEl: isCustEl.value, |
| | | ...record, |
| | | others: routeData.value, |
| | | values: record, //表åè®°å½ |
| | | }); |
| | | } |
| | | //ä¸å |
| | | |
| | | /** |
| | | * @description: ä¸å |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function handleRelease(record: Recordable) { |
| | | if (record.STATUS == 2) { |
| | | createErrorModal({ |
| | | title: t('è¦å'), |
| | | content: t('å·¥åå·²ç»ä¸åï¼ä¸è½åä¸åï¼'), |
| | | getContainer: () => document.body, |
| | | }); |
| | | return; |
| | | } |
| | | cType.value = 'BIZ_MES_WO'; |
| | | dtlSlots.value = [ |
| | | { |
| | |
| | | fnName: { BIZ_MES_WO: 'SaveWoBatch' }, //ä¿åæ¹æ³å |
| | | initFnName: {}, //åå§åæ¹æ³å |
| | | isCustEl: isCustEl.value, |
| | | ...record, |
| | | values: record, //表åè®°å½ |
| | | }); |
| | | } |
| | | function custSuccess(d) { |
| | | reload(); |
| | | |
| | | /** |
| | | * @description: åæ¶ä¸å |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function handleUnRelease(record: Recordable) { |
| | | if (record.STATUS == 0) { |
| | | createErrorModal({ |
| | | title: t('è¦å'), |
| | | content: t('工忝åå§åç¶æï¼ä¸è½åæ¶ä¸åï¼'), |
| | | getContainer: () => document.body, |
| | | }); |
| | | return; |
| | | } |
| | | record.STATUS = 0; |
| | | SaveEntity(record, true, 'BIZ_MES_WO').then((action) => { |
| | | if (action.IsSuccessed) { |
| | | createMessage.success(t('已忶ä¸å')); |
| | | reload(); |
| | | } else { |
| | | createMessage.success(t('åæ¶ä¸åæä½å¤±è´¥')); |
| | | } |
| | | }); |
| | | } |
| | | //åæ¶ä¸å |
| | | function handleUnRelease(record: Recordable) {} |
| | | //æå |
| | | function handlePause(record: Recordable) {} |
| | | //å é¤ |
| | | function handlePause(record: Recordable) { |
| | | if (record.STATUS == 0) { |
| | | createErrorModal({ |
| | | title: t('è¦å'), |
| | | content: t('工忝åå§åç¶æï¼ä¸è½æåï¼'), |
| | | getContainer: () => document.body, |
| | | }); |
| | | return; |
| | | } |
| | | if (record.STATUS == 5) { |
| | | createErrorModal({ |
| | | title: t('è¦å'), |
| | | content: t('å·¥åæ¯å®æç¶æï¼ä¸è½æåï¼'), |
| | | getContainer: () => document.body, |
| | | }); |
| | | return; |
| | | } |
| | | record.STATUS = 4; |
| | | SaveEntity(record, true, 'BIZ_MES_WO').then((action) => { |
| | | if (action.IsSuccessed) { |
| | | createMessage.success(t('å·²æå')); |
| | | reload(); |
| | | } else { |
| | | createMessage.success(t('æåæä½å¤±è´¥')); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: å é¤ |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | function handleDelete(record: Recordable) { |
| | | const apiAction = DeleteMesWo(record.ID); |
| | | apiAction.then((action) => { |
| | | DeleteMesWo(record.ID).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | createMessage.success(t('å·²å é¤')); |
| | | reload(); |
| | |
| | | } |
| | | }); |
| | | } |
| | | //ç¹å»æå¼ç©æåè¡¨æ¡ |
| | | |
| | | /** |
| | | * @description: å¼¹åºæ¡ç¡®å®è¿å |
| | | * @param {*} d |
| | | * @return {*} |
| | | */ |
| | | function custSuccess(d) { |
| | | reload(); |
| | | } |
| | | |
| | | /** |
| | | * @description: ç¹å»æå¼ç©æåè¡¨æ¡ |
| | | * @return {*} |
| | | */ |
| | | function handleSelectItem() { |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©ç©ææ¡è¿åæåæ¹æ³ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @return {*} |
| | | */ |
| | | function handleItemSuccess(d, u) { |
| | | getForm().setFieldsValue({ |
| | | ITEM_CODE: d.values['val'], |
| | | }); |
| | | } |
| | | /* å表åå
å¼¹åºéæ©æ¡éæ©æååäºä»¶ */ |
| | | |
| | | /** |
| | | * @description: å表åå
å¼¹åºéæ©æ¡éæ©æååæ¹æ³ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleEntSuccess(d, u, item) { |
| | | var values = GetSelectSuccess(d, u, cType.value); |
| | | selectVals.value = values; //ä¿åå¼¹åºæ¡éæ©çç»æ |
| | | let _val = {}; |
| | | _val[d.returnFieldName] = values[d.returnFieldName]; |
| | | useFormData.value[item][1].setFieldsValue(_val); |
| | | if (d.returnFieldName == 'ROUTE_CODE') { |
| | | if (d.returnFieldName == 'ROUTE_CODE' && cType.value == 'BIZ_MES_WO_Config') { |
| | | routeData.value = { |
| | | nodes: [], |
| | | edges: [], |
| | | }; |
| | | init(selectVals.value['ID']); |
| | | init(selectVals.value['ROUTE_CODE']); |
| | | } |
| | | } |
| | | |
| | | /* å¼¹åºéæ©æ¡ */ |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡ |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleCustClick(item) { |
| | | //æå¼èªå®ä¹æ¨¡ææ¡ |
| | | OpenSelectItem( |
| | |
| | | cType.value, |
| | | item, |
| | | [openRvModal], |
| | | selectVals.value['ID'], |
| | | selectVals.value['ROUTE_CODE'], |
| | | ); //[openRvModal], selectVals.value['ID']è¿æ¯èªå®ä¹åæ°ï¼æå®é
éæ± |
| | | } |
| | | function RvItemSuccess(d, u) {} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Description: éç¨ä½ä»£ç åç°é¡µé¢ä¸»æ°æ® |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-02 17:52:35 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-11 01:59:13 |
| | | */ |
| | | import { ref } from 'vue'; |
| | | import { |
| | | DftGrpRelease, |
| | | dftGrpActionItem, |
| | | dftGrpOpenSelectItem, |
| | | dftGrpGetSelectSuccess, |
| | | dftGrpactionColumn, |
| | | } from './normal/basDefectGrp'; |
| | | import { onChangeFns, rsGrpGetSelectSuccess, rsGrpOpenSelectItem } from './normal/basReasonGrp'; |
| | | import { DeleteEntity } from '/@/api/tigerapi/system'; |
| | | import { ActionItem, BasicColumn, FormSchema } from '/@/components/Table'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { isNullOrEmpty } from '/@/utils/is'; |
| | | import { woCustFn, woformSchema } from '/@/views/components/bizMesWo'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | |
| | | const { t } = useI18n(); |
| | | |
| | | /** |
| | | * @description: ä½ä»£ç 页é¢è·åæä½åæ®µç»æJsonï¼å¦å¢å æé®åæ¹æ³ |
| | | * @param {*} params |
| | | * @param {array} args |
| | | * @return {*} |
| | | */ |
| | | export function GetActionsData(params: {}, ...args: Fn[]) { |
| | | let data = [ |
| | | { |
| | | icon: 'clarity:note-edit-line', |
| | | onClick: editRecord.bind(null, args[0], params), |
| | | }, |
| | | { |
| | | icon: 'ant-design:delete-outlined', |
| | | color: 'error', |
| | | popConfirm: { |
| | | title: 'æ¯å¦ç¡®è®¤å é¤?', |
| | | placement: 'left', |
| | | confirm: deleteRecord.bind(null, args[1], params), |
| | | }, |
| | | }, |
| | | ] as ActionItem[]; |
| | | switch (params['entityName']) { |
| | | case 'BAS_DEFECT_GRP': |
| | | const _d = dftGrpActionItem; |
| | | _d[0].onClick = DftGrpRelease.bind(null, args, params); |
| | | data = [...data, ..._d]; |
| | | params.cType.value = 'BIZ_MES_WO'; |
| | | params.formSchemas.value[params.cType.value] = getFormSchema(params.cType.value); |
| | | params.useFormData.value = { |
| | | forminfo: args[3]({ |
| | | labelWidth: 120, |
| | | schemas: params.formSchemas.value[params.cType.value], |
| | | actionColOptions: { |
| | | span: 24, |
| | | }, |
| | | showActionButtonGroup: false, |
| | | }), |
| | | }; |
| | | break; |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | export function GetUseModalData(type: string) { |
| | | let data = {}; |
| | | switch (type) { |
| | | case 'BAS_DEFECT_GRP': |
| | | data = { |
| | | add: useModal(), |
| | | set: useModal(), |
| | | addRot: useModal(), |
| | | setRot: useModal(), |
| | | }; |
| | | break; |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | function editRecord(fn: Fn, params: {}) { |
| | | fn(true, params); |
| | | } |
| | | |
| | | function deleteRecord(fn: Fn, params: {}) { |
| | | console.log(params['record']); |
| | | //å é¤ |
| | | const apiAction = DeleteEntity(params['record'], params['entityName']); |
| | | apiAction.then((action) => { |
| | | if (action.IsSuccessed) { |
| | | fn(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | export function GetActionColumn(entityName: string) { |
| | | let data: BasicColumn = {}; |
| | | switch (entityName) { |
| | | case 'BAS_DEFECT_GRP': |
| | | data = dftGrpactionColumn; |
| | | break; |
| | | default: |
| | | data = { |
| | | width: 80, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | slots: { customRender: 'action' }, |
| | | fixed: undefined, |
| | | }; |
| | | break; |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | /* å¼¹åºéæ©æ¡éæ©æå */ |
| | | export function GetSelectSuccess(d, u, entityName: string) { |
| | | let data = {}; |
| | | switch (entityName) { |
| | | case 'BAS_DEFECT_GRP': |
| | | data = dftGrpGetSelectSuccess(d, u); |
| | | break; |
| | | case 'BAS_REASON_GRP': |
| | | data = rsGrpGetSelectSuccess(d, u); |
| | | break; |
| | | default: |
| | | data = { |
| | | ITEM_CODE: d.values['val'], |
| | | }; |
| | | break; |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * @description: æå¼å¼¹åºéæ©æ¡ |
| | | * @param {Fn} openItemModal |
| | | * @param {string} entityName |
| | | * @return {*} |
| | | */ |
| | | export function OpenSelectItem(openItemModal: Fn, entityName: string) { |
| | | switch (entityName) { |
| | | case 'BAS_DEFECT_GRP': |
| | | dftGrpOpenSelectItem(openItemModal); |
| | | break; |
| | | case 'BAS_REASON_GRP': |
| | | rsGrpOpenSelectItem(openItemModal); |
| | | break; |
| | | default: |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: 'ç©æç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('ç©æç¼ç '), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('ç©æåç§°'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: Select èªå®ä¹onChangeæ¹æ³ |
| | | * @param {any} e |
| | | * @param {string} fnName |
| | | * @param {string} entityName |
| | | * @return {*} |
| | | */ |
| | | export function custOnChange(e: any, fnName: string, entityName: string) { |
| | | if (!isNullOrEmpty(fnName)) { |
| | | switch (entityName) { |
| | | case 'BAS_REASON': |
| | | onChangeFns[fnName](e); |
| | | break; |
| | | default: |
| | | break; |
| | | (e) => {}; |
| | | } |
| | | } else { |
| | | (e) => {}; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: æå¼èªå®ä¹å¼¹åºæ¡æ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | export function OpenCustModal( |
| | | openItemModal: Fn, |
| | | entityName: string, |
| | | slotName: string, |
| | | others: Fn[], |
| | | ...args |
| | | ) { |
| | | switch (entityName) { |
| | | case 'BIZ_MES_WO': |
| | | case 'BIZ_MES_WO_Config': //æ ¹æ®å¸¦å
¥çåç§°æå¼ä¸åçå®ä½å表 |
| | | woCustFn(openItemModal, slotName, others, args); |
| | | break; |
| | | default: //é»è®¤æå¼ç©æå表 |
| | | openItemModal(true, { |
| | | title: 'ç©æå表', |
| | | schemas: [ |
| | | { |
| | | field: 'ITEM_CODE', |
| | | component: 'Input', |
| | | label: 'ç©æç¼ç ', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('ç©æç¼ç '), |
| | | dataIndex: 'ITEM_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('ç©æåç§°'), |
| | | dataIndex: 'ITEM_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_ITEM', |
| | | rowKey: 'ITEM_CODE', |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: è·åèªå®ä¹å¼¹åºæ¡ä¸è¡¨åçç»æ |
| | | * @param {string} type |
| | | * @return {*} |
| | | */ |
| | | export function getFormSchema(type: string) { |
| | | let _formSchema = [] as FormSchema[]; |
| | | switch (type) { |
| | | case 'BIZ_MES_WO': |
| | | _formSchema = woformSchema; |
| | | break; |
| | | // case 'woinfo': |
| | | // _formSchema = woCfgformSchema; |
| | | // break; |
| | | // case 'prodinfo': |
| | | // _formSchema = prodCfgformSchema; |
| | | // break; |
| | | // case 'xxinfo': |
| | | // _formSchema = xxCfgformSchema; |
| | | // break; |
| | | default: |
| | | break; |
| | | (e) => {}; |
| | | } |
| | | return _formSchema; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Description: ä½ä»£ç é«çº§åç°é¡µé¢ |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-05-30 13:28:20 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-11 02:02:14 |
| | | --> |
| | | <template> |
| | | <div> |
| | | <BasicTable @register="registerTable"> |
| | | <template #toolbar> |
| | | <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> æ°å¢ </a-button> |
| | | </template> |
| | | <template #action="{ record }"> |
| | | <TableAction :actions="createActions(record)" /> |
| | | </template> |
| | | <template #[item]="{ field }" v-for="item in colSlots" :key="item"> |
| | | <!-- <template #form-BAS_REASON3aadd="{ field }"> --> |
| | | <a-button |
| | | v-if="field" |
| | | class="mt-1 ml-1" |
| | | size="small" |
| | | @click="handleSelectItem(item)" |
| | | preIcon="search|svg" |
| | | /> |
| | | <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> |
| | | </template> |
| | | </BasicTable> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> |
| | | <CustModal |
| | | @register="registerCust" |
| | | @success="custSuccess" |
| | | :type="cType" |
| | | :detailSlots="dtlSlots" |
| | | > |
| | | <!-- ç¨ææ§½èªå®ä¹å¤è¡¨å --> |
| | | <template #[item.name] v-for="item in dtlSlots" :key="item.name"> |
| | | <BasicForm @register="useFormData[item.name][0]" v-if="useFormData[item.name]"> |
| | | <!-- ç¨ææ§½èªå®ä¹å¼¹åºéæ©æ¡ --> |
| | | <template #[name]="{ field }" v-for="name in item.slots" :key="name"> |
| | | <a-button |
| | | class="mt-1 ml-1" |
| | | size="small" |
| | | @click="handleCustClick(field)" |
| | | :preIcon="item.preIcons[name]" |
| | | /> |
| | | <NormalModal |
| | | @register="useModalData[name][0]" |
| | | @success="(d, u) => handleEntSuccess(d, u, item.name)" |
| | | /> |
| | | </template> |
| | | </BasicForm> |
| | | <!-- èªå®ä¹å
容 --> |
| | | </template> |
| | | </CustModal> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { h, onMounted, ref, unref } from 'vue'; |
| | | import { BasicTable, useTable, TableAction, BasicColumn, FormSchema } from '/@/components/Table'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import normalDrawer from './normalDrawer.vue'; |
| | | import NormalModal from '/@/views/components/NormalModal.vue'; |
| | | import { GetEnum, getEntity, getListByPage } from '/@/api/tigerapi/system'; |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | | import { useRoute } from 'vue-router'; |
| | | import { Tag, Tooltip } from 'ant-design-vue'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import { BasicForm, FormActionType, useForm } from '/@/components/Form/index'; |
| | | import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; |
| | | import { |
| | | GetActionColumn, |
| | | GetActionsData, |
| | | OpenSelectItem, |
| | | GetSelectSuccess, |
| | | custOnChange, |
| | | getFormSchema, |
| | | OpenCustModal, |
| | | GetUseModalData, |
| | | } from './data'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { useLocale } from '/@/locales/useLocale'; |
| | | |
| | | const { getLocale } = useLocale(); |
| | | const route = useRoute(); |
| | | const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); |
| | | const entityName = ref(objParams.value.ID); |
| | | const globSetting = useGlobSetting(); |
| | | const _columns = ref([]); |
| | | const _searchFormSchema = ref([]); |
| | | const _crudFormSchema = ref([]); |
| | | const formSchemas = ref({}); //å¼¹åºæ¡å¤è¡¨åç»æ |
| | | const useModalData = ref({}); //表åä¸ææ§½æ¸²ææé®æå¼æ¨¡ææ¡useModalæ¹æ³ |
| | | const useFormData = ref({}); |
| | | const colSlots = ref<any>(objParams.value.colSlots); //æé®ææ§½ |
| | | const crudColSlots = ref<any>(objParams.value.crudColSlots); |
| | | const cType = ref(''); |
| | | const dtlSlots = ref([] as any[]); |
| | | const selectVals = ref({}); |
| | | |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | const [registerTable, { getForm, reload }] = useTable({ |
| | | title: 'å表信æ¯', |
| | | api: getListByPage, |
| | | searchInfo: { TABLE_NAME: objParams.value.ID }, |
| | | columns: _columns as unknown as BasicColumn[], |
| | | formConfig: { |
| | | labelWidth: 140, |
| | | schemas: _searchFormSchema as unknown as FormSchema[], |
| | | }, |
| | | useSearchForm: true, |
| | | showTableSetting: true, |
| | | bordered: true, |
| | | canResize: true, |
| | | showIndexColumn: false, |
| | | actionColumn: GetActionColumn(objParams.value.ID), //èªå®ä¹æä½å |
| | | }); |
| | | /* çæåè¡¨ä¸æä½é¡¹çæé® */ |
| | | function createActions(record) { |
| | | return GetActionsData( |
| | | { |
| | | record, |
| | | isUpdate: true, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | cType, |
| | | dtlSlots, |
| | | formSchemas, |
| | | useModalData, |
| | | useFormData, |
| | | crudColSlots, |
| | | }, |
| | | openDrawer, |
| | | reload, |
| | | openCustomModal, |
| | | useForm, |
| | | useModal, |
| | | ); |
| | | } |
| | | |
| | | function handleCreate() { |
| | | openDrawer(true, { |
| | | isUpdate: false, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | crudColSlots, |
| | | }); |
| | | } |
| | | |
| | | function handleSuccess() { |
| | | reload(); |
| | | } |
| | | |
| | | onMounted(async () => { |
| | | /* ç¨jsonè·åå */ |
| | | // _searchFormSchema.value = await fetchJson( |
| | | // `${globSetting.downloadUrl}/LowCode/${objParams.value.ID}/${objParams.value.ID}_Searchform.json`, |
| | | // ); |
| | | // var objs = await fetchJson( |
| | | // `${globSetting.downloadUrl}/LowCode/${objParams.value.ID}/${objParams.value.ID}_Baseform.json`, |
| | | // ); |
| | | // for (const i in objs) { |
| | | // if (!isNullOrEmpty(objs[i].customRender)) { |
| | | // const func = new Function(objs[i].customRender)(); |
| | | // objs[i].customRender = ({ record }) => { |
| | | // let texts = func(record); |
| | | // return h(Tooltip, { title: texts.text }, () => |
| | | // h(Tag, { color: texts.color }, () => texts.text), |
| | | // ); |
| | | // }; |
| | | // } |
| | | // } |
| | | // _columns.value = objs; |
| | | |
| | | //è·å表åä¸ææ§½æ¸²æçæé®ç¹å»å¼¹åºæ¨¡æçªå£çå®ä¾ |
| | | useModalData.value = GetUseModalData(objParams.value.ID); |
| | | const data = await getEntity({ |
| | | sqlcmd: "ASSEMBLY_NAME ='" + objParams.value.ID + "'", |
| | | entityName: 'SYS_LOW_CODE', |
| | | }); |
| | | var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); |
| | | for (const i in searchForms) { |
| | | if ( |
| | | !isNullOrEmpty(searchForms[i].componentProps) && |
| | | !isNullOrEmpty(searchForms[i].componentProps.api) && |
| | | searchForms[i].componentProps.api == 'GetEnum' |
| | | ) { |
| | | searchForms[i].componentProps.api = GetEnum; |
| | | searchForms[ |
| | | i |
| | | ].componentProps.params.name = `${objParams.value.ID}+${searchForms[i].field}s`; |
| | | searchForms[i].componentProps.labelField = unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name'; |
| | | } |
| | | if ( |
| | | !isNullOrEmpty(searchForms[i].componentProps) && |
| | | !isNullOrEmpty(searchForms[i].componentProps.api) && |
| | | searchForms[i].componentProps.api == 'getEntity' |
| | | ) { |
| | | searchForms[i].componentProps.api = getEntity; |
| | | searchForms[i].componentProps.resultField = 'Data.Items'; |
| | | } |
| | | onChangeConfig(searchForms[i]); |
| | | } |
| | | _searchFormSchema.value = searchForms; |
| | | var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON); |
| | | for (const i in _cruds) { |
| | | if ( |
| | | !isNullOrEmpty(_cruds[i].componentProps) && |
| | | !isNullOrEmpty(_cruds[i].componentProps.api) && |
| | | _cruds[i].componentProps.api == 'GetEnum' |
| | | ) { |
| | | _cruds[i].componentProps.api = GetEnum; |
| | | _cruds[i].componentProps.params.name = `${objParams.value.ID}+${_cruds[i].field}s`; |
| | | _cruds[i].componentProps.labelField = unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name'; |
| | | } |
| | | if ( |
| | | !isNullOrEmpty(_cruds[i].componentProps) && |
| | | !isNullOrEmpty(_cruds[i].componentProps.api) && |
| | | _cruds[i].componentProps.api == 'getEntity' |
| | | ) { |
| | | _cruds[i].componentProps.api = getEntity; |
| | | _cruds[i].componentProps.resultField = 'Data.Items'; |
| | | } |
| | | onChangeConfig(_cruds[i]); |
| | | } |
| | | _crudFormSchema.value = _cruds; |
| | | |
| | | var objs = JSON.parse(data.Data.Items[0].BASE_FORM_JSON); |
| | | for (const i in objs) { |
| | | if (!isNullOrEmpty(objs[i].customRender)) { |
| | | const func = new Function(objs[i].customRender)(); |
| | | objs[i].customRender = ({ record }) => { |
| | | let texts = func(record); |
| | | return h(Tooltip, { title: texts.text }, () => |
| | | h(Tag, { color: texts.color }, () => texts.text), |
| | | ); |
| | | }; |
| | | } |
| | | } |
| | | _columns.value = objs; |
| | | }); |
| | | |
| | | /* å¼¹åºéæ©æ¡éæ©æååäºä»¶ */ |
| | | function handleItemSuccess(d, u, item) { |
| | | getForm().setFieldsValue(GetSelectSuccess(d, u, getForm().getFieldsValue()[`${item.replace(/form-/,'').replace(/add/,'')}PSelect_0`])); |
| | | } |
| | | |
| | | /* å¼¹åºéæ©æ¡ */ |
| | | function handleSelectItem(item) { |
| | | OpenSelectItem(openItemModal, getForm().getFieldsValue()[`${item.replace(/form-/,'').replace(/add/,'')}PSelect_0`]); |
| | | } |
| | | |
| | | /* Select èªå®ä¹onChangeæ¹æ³ */ |
| | | function onChangeConfig(obj: any) { |
| | | if (obj.component == 'Select') { |
| | | var options = obj.componentProps.options; |
| | | var onChange = obj.componentProps.onChange; |
| | | obj.componentProps = ({ schema, tableAction, formActionType, formModel }) => { |
| | | return { |
| | | options: options, |
| | | onChange: (e) => custOnChange(e, onChange, objParams.value.ID), |
| | | }; |
| | | }; |
| | | } |
| | | } |
| | | |
| | | //å¼¹åºæ¡ç¡®å®è¿å |
| | | function custSuccess(d) { |
| | | reload(); |
| | | } |
| | | |
| | | /* å表åå
å¼¹åºéæ©æ¡éæ©æååæ¹æ³ */ |
| | | function handleEntSuccess(d, u, item) { |
| | | var values = GetSelectSuccess(d, u, cType.value); |
| | | selectVals.value = values; //ä¿åå¼¹åºæ¡éæ©çç»æ |
| | | let _val = {}; |
| | | _val[d.returnFieldName] = values[d.returnFieldName]; |
| | | useFormData.value[item][1].setFieldsValue(_val); |
| | | } |
| | | |
| | | /* æå¼èªå®ä¹æ¨¡ææ¡ */ |
| | | function handleCustClick(item) { |
| | | OpenCustModal( |
| | | useModalData.value[item][1].openModal, //带å
¥openModalæ¹æ³ |
| | | cType.value, |
| | | item, |
| | | [], |
| | | // selectVals.value['ROUTE_CODE'], |
| | | ); //[openRvModal], selectVals.value['ID']è¿æ¯èªå®ä¹åæ°ï¼æå®é
éæ± |
| | | } |
| | | </script> |
| | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { useI18n } from '/@/hooks/web/useI18n'; |
| | | import { getFormSchema } from '/@/views/components/data'; |
| | | import { ref } from 'vue'; |
| | | |
| | | const { t } = useI18n(); |
| | | const { notification } = useMessage(); |
| | | const { notification, createErrorModal } = useMessage(); |
| | | /* èªå®ä¹æé®æ¹æ³ */ |
| | | export function DftGrpRelease(reload: Fn, params: {}) { |
| | | export function DftGrpRelease(args: Fn[], params: {}) { |
| | | console.log('ç¹å»äºä¸åæé®'); |
| | | notification.success({ |
| | | message: 'ç¹å»äºä¸åæé®', |
| | | description: `${params.entityName}`, |
| | | duration: 3, |
| | | // notification.success({ |
| | | // message: 'ç¹å»äºä¸åæé®', |
| | | // description: `${params.entityName}`, |
| | | // duration: 3, |
| | | // }); |
| | | // reload(); |
| | | // if (params.STATUS == 2) { |
| | | // createErrorModal({ |
| | | // title: t('è¦å'), |
| | | // content: t('å·¥åå·²ç»ä¸åï¼ä¸è½åä¸åï¼'), |
| | | // getContainer: () => document.body, |
| | | // }); |
| | | // return; |
| | | // } |
| | | params.dtlSlots.value = [ |
| | | { |
| | | name: 'forminfo', |
| | | slots: ['add', 'set'], |
| | | preIcons: { add: 'search|svg', set: 'config|svg' }, //妿æ¯å¤ä¸ªè¡¨åï¼å¢å å¤ä¸ªææ§½ãslotsæ¯å¼¹åºæ¡æé®çææ§½ï¼preIconsæ¯ææ§½å¯¹åºçæé®å¾æ |
| | | title: 'ä¸åé
ç½®', |
| | | }, |
| | | ]; |
| | | |
| | | args[2](true, { |
| | | isUpdate: true, //æ¯å¦æ´æ°æä½ |
| | | ctype: params.cType.value, //æ¯åªä¸ªé¡µé¢ |
| | | title: 'å·¥åä¸å', //æ é¢ |
| | | width: '900px', //å¼¹åºæ¡å®½åº¦ |
| | | formEl: params.useFormData.value, |
| | | formElName: ['forminfo'], //è¡¨åææ§½åç§° |
| | | RowKeys: { add: 'ROUTE_CODE', set: 'ROUTE_CODE' }, //ææ§½çå¼¹åºæ¡éæ©çcode |
| | | fnName: { BIZ_MES_WO: 'SaveWoBatch' }, //ä¿åæ¹æ³å |
| | | initFnName: {}, //åå§åæ¹æ³å |
| | | values: params.record, //表åè®°å½ |
| | | }); |
| | | reload(); |
| | | } |
| | | |
| | | export const dftGrpactionColumn: BasicColumn = { |
| | |
| | | <!-- |
| | | * @Description: ä½ä»£ç åç°é¡µé¢ |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-05-30 13:28:20 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-11 01:27:02 |
| | | --> |
| | | <template> |
| | | <div> |
| | | <BasicTable @register="registerTable"> |
| | |
| | | <template #action="{ record }"> |
| | | <TableAction :actions="createActions(record)" /> |
| | | </template> |
| | | <template #form-add="{ field }"> |
| | | <template #[item]="{ field }" v-for="item in colSlots" :key="item"> |
| | | <!-- <template #form-BAS_REASON3aadd="{ field }"> --> |
| | | <a-button |
| | | v-if="field" |
| | | class="mt-1 ml-1" |
| | | size="small" |
| | | @click="handleSelectItem" |
| | | @click="handleSelectItem(item)" |
| | | preIcon="search|svg" |
| | | /> |
| | | <NormalModal @register="registerItemAdd" @success="handleItemSuccess" /> |
| | | <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> |
| | | </template> |
| | | </BasicTable> |
| | | <normalDrawer @register="registerDrawer" @success="handleSuccess" /> |
| | | <CustModal |
| | | @register="registerCust" |
| | | @success="custSuccess" |
| | | :type="cType" |
| | | :detailSlots="dtlSlots" |
| | | > |
| | | <!-- ç¨ææ§½èªå®ä¹å¤è¡¨å --> |
| | | <template #[item.name] v-for="item in dtlSlots" :key="item.name"> |
| | | <BasicForm @register="useFormData[item.name][0]" v-if="useFormData[item.name]"> |
| | | <!-- ç¨ææ§½èªå®ä¹å¼¹åºéæ©æ¡ --> |
| | | <template #[name]="{ field }" v-for="name in item.slots" :key="name"> |
| | | <a-button |
| | | class="mt-1 ml-1" |
| | | size="small" |
| | | @click="handleCustClick(field)" |
| | | :preIcon="item.preIcons[name]" |
| | | /> |
| | | <NormalModal |
| | | @register="useModalData[name][0]" |
| | | @success="(d, u) => handleEntSuccess(d, u, item.name)" |
| | | /> |
| | | </template> |
| | | </BasicForm> |
| | | <!-- èªå®ä¹å
容 --> |
| | | </template> |
| | | </CustModal> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | | import { useRoute } from 'vue-router'; |
| | | import { Tag, Tooltip } from 'ant-design-vue'; |
| | | import { isNullOrEmpty } from '/@/utils/is'; |
| | | import CustModal from '/@/views/components/CustModal.vue'; |
| | | import { BasicForm, FormActionType, useForm } from '/@/components/Form/index'; |
| | | import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; |
| | | import { |
| | | GetActionColumn, |
| | | GetActionsData, |
| | | OpenSelectItem, |
| | | GetSelectSuccess, |
| | | custOnChange, |
| | | } from './data'; |
| | | getFormSchema, |
| | | OpenCustModal, |
| | | GetUseModalData, |
| | | } from '../data'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { useLocale } from '/@/locales/useLocale'; |
| | | |
| | |
| | | const _columns = ref([]); |
| | | const _searchFormSchema = ref([]); |
| | | const _crudFormSchema = ref([]); |
| | | const formSchemas = ref({}); //å¼¹åºæ¡å¤è¡¨åç»æ |
| | | const useModalData = ref({}); //表åä¸ææ§½æ¸²ææé®æå¼æ¨¡ææ¡useModalæ¹æ³ |
| | | const useFormData = ref({}); |
| | | const colSlots = ref<any>(objParams.value.colSlots); //æé®ææ§½ |
| | | const crudColSlots = ref<any>(objParams.value.crudColSlots); |
| | | const cType = ref(''); |
| | | const dtlSlots = ref([] as any[]); |
| | | const selectVals = ref({}); |
| | | |
| | | const [registerCust, { openModal: openCustomModal, closeModal }] = useModal(); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerDrawer, { openDrawer }] = useDrawer(); |
| | | const [registerTable, { getForm, reload }] = useTable({ |
| | |
| | | showIndexColumn: false, |
| | | actionColumn: GetActionColumn(objParams.value.ID), //èªå®ä¹æä½å |
| | | }); |
| | | |
| | | /* çæåè¡¨ä¸æä½é¡¹çæé® */ |
| | | function createActions(record) { |
| | | return GetActionsData( |
| | |
| | | isUpdate: true, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | cType, |
| | | dtlSlots, |
| | | formSchemas, |
| | | useModalData, |
| | | useFormData, |
| | | crudColSlots, |
| | | }, |
| | | openDrawer, |
| | | reload, |
| | | openCustomModal, |
| | | useForm, |
| | | useModal, |
| | | ); |
| | | } |
| | | |
| | |
| | | isUpdate: false, |
| | | entityName: objParams.value.ID, |
| | | formJson: _crudFormSchema.value, |
| | | crudColSlots, |
| | | }); |
| | | } |
| | | |
| | |
| | | // } |
| | | // } |
| | | // _columns.value = objs; |
| | | |
| | | //è·å表åä¸ææ§½æ¸²æçæé®ç¹å»å¼¹åºæ¨¡æçªå£çå®ä¾ |
| | | useModalData.value = GetUseModalData(objParams.value.ID); |
| | | const data = await getEntity({ |
| | | sqlcmd: "ASSEMBLY_NAME ='" + objParams.value.ID + "'", |
| | | entityName: 'SYS_LOW_CODE', |
| | |
| | | }); |
| | | |
| | | /* å¼¹åºéæ©æ¡éæ©æååäºä»¶ */ |
| | | function handleItemSuccess(d, u) { |
| | | getForm().setFieldsValue(GetSelectSuccess(d, u, getForm().getFieldsValue()['0'])); |
| | | function handleItemSuccess(d, u, item) { |
| | | getForm().setFieldsValue(GetSelectSuccess(d, u, getForm().getFieldsValue()[`${item.replace(/form-/,'').replace(/add/,'')}PSelect_0`])); |
| | | } |
| | | |
| | | /* å¼¹åºéæ©æ¡ */ |
| | | function handleSelectItem() { |
| | | OpenSelectItem(openItemModal, getForm().getFieldsValue()['0']); |
| | | function handleSelectItem(item) { |
| | | OpenSelectItem(openItemModal, getForm().getFieldsValue()[`${item.replace(/form-/,'').replace(/add/,'')}PSelect_0`]); |
| | | } |
| | | |
| | | /* Select èªå®ä¹onChangeæ¹æ³ */ |
| | |
| | | }; |
| | | } |
| | | } |
| | | |
| | | //å¼¹åºæ¡ç¡®å®è¿å |
| | | function custSuccess(d) { |
| | | reload(); |
| | | } |
| | | |
| | | /* å表åå
å¼¹åºéæ©æ¡éæ©æååæ¹æ³ */ |
| | | function handleEntSuccess(d, u, item) { |
| | | var values = GetSelectSuccess(d, u, cType.value); |
| | | selectVals.value = values; //ä¿åå¼¹åºæ¡éæ©çç»æ |
| | | let _val = {}; |
| | | _val[d.returnFieldName] = values[d.returnFieldName]; |
| | | useFormData.value[item][1].setFieldsValue(_val); |
| | | } |
| | | |
| | | /* æå¼èªå®ä¹æ¨¡ææ¡ */ |
| | | function handleCustClick(item) { |
| | | OpenCustModal( |
| | | useModalData.value[item][1].openModal, //带å
¥openModalæ¹æ³ |
| | | cType.value, |
| | | item, |
| | | [], |
| | | // selectVals.value['ROUTE_CODE'], |
| | | ); //[openRvModal], selectVals.value['ID']è¿æ¯èªå®ä¹åæ°ï¼æå®é
éæ± |
| | | } |
| | | </script> |
| | |
| | | <!-- |
| | | * @Description: file content |
| | | * @Author: your name |
| | | * @version: |
| | | * @Date: 2024-05-30 13:28:20 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-11 01:11:06 |
| | | --> |
| | | <template> |
| | | <BasicDrawer |
| | | v-bind="$attrs" |
| | |
| | | width="600px" |
| | | @ok="handleSubmit" |
| | | > |
| | | <BasicForm @register="registerForm" /> |
| | | <BasicForm @register="registerForm" > |
| | | <template #[item]="{ field }" v-for="item in crudColSlots" :key="item"> |
| | | <a-button |
| | | v-if="field" |
| | | class="mt-1 ml-1" |
| | | size="small" |
| | | @click="handleSelectItem(item)" |
| | | preIcon="search|svg" |
| | | /> |
| | | <NormalModal @register="registerItemAdd" @success="(d, u) => handleItemSuccess(d, u, item)" /> |
| | | </template> |
| | | </BasicForm> |
| | | </BasicDrawer> |
| | | </template> |
| | | <script lang="ts" setup> |
| | |
| | | import { BasicForm, FormSchema, useForm } from '/@/components/Form/index'; |
| | | import { BasicDrawer, useDrawerInner } from '/@/components/Drawer'; |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | | import NormalModal from '/@/views/components/NormalModal.vue'; |
| | | import { SaveEntity, fetchJson } from '/@/api/tigerapi/system'; |
| | | import { useModal } from '/@/components/Modal'; |
| | | import { GetSelectSuccess, OpenSelectItem } from '../data'; |
| | | |
| | | const emit = defineEmits(['success', 'register']); |
| | | const globSetting = useGlobSetting(); |
| | | const isUpdate = ref(true); |
| | | const entityName = ref(''); |
| | | const formSchema = ref([]); |
| | | const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ |
| | | const crudColSlots = ref<any>([]); |
| | | const [registerItemAdd, { openModal: openItemModal }] = useModal(); |
| | | const [registerForm, { resetFields, setFieldsValue, getFieldsValue, validate }] = useForm({ |
| | | labelWidth: 140, |
| | | schemas: formSchema as unknown as FormSchema[], |
| | | actionColOptions: { |
| | |
| | | // }_addEditform.json`, |
| | | // ); |
| | | formSchema.value = data?.formJson; |
| | | crudColSlots.value = data?.crudColSlots; |
| | | resetFields(); |
| | | setDrawerProps({ confirmLoading: false }); |
| | | |
| | |
| | | setDrawerProps({ confirmLoading: false }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡éæ©æååäºä»¶ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @param {*} item |
| | | * @return {*} |
| | | */ |
| | | function handleItemSuccess(d, u, item) { |
| | | setFieldsValue(GetSelectSuccess(d, u, getFieldsValue()[`${item.replace(/add/,'')}PSelect_0`])); |
| | | } |
| | | |
| | | /* å¼¹åºéæ©æ¡ */ |
| | | function handleSelectItem(item) { |
| | | OpenSelectItem(openItemModal, getFieldsValue()[`${item.replace(/add/,'')}PSelect_0`]); |
| | | } |
| | | </script> |
| | |
| | | <!-- |
| | | * @Description: ä½ä»£ç çæé¡µé¢ |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-05-30 22:00:44 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-11 01:50:33 |
| | | --> |
| | | <!-- eslint-disable prettier/prettier --> |
| | | <template> |
| | | <PageWrapper |
| | | class="high-form" |
| | |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | <template #[item]="{ model, field }" v-for="item in searchValueFieldSlots" :key="item"> |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | <template #[item]="{ model, field }" v-for="item in searchOptionsSlots" :key="item"> |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | <template #[item]="{ model, field }" v-for="item in searchOnChangeSlots" :key="item"> |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | <template #[item]="{ model, field }" v-for="item in searchPOptionsSlots" :key="item"> |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | </BasicForm> |
| | |
| | | <template #[item]="{ model, field }" v-for="item in crudOnChangeSlots" :key="item"> |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | <template #[item]="{ model, field }" v-for="item in crudPOptionsSlots" :key="item"> |
| | | <a-input v-model:value="model[field]" /> |
| | | </template> |
| | | </BasicForm> |
| | | </a-card> |
| | | |
| | |
| | | const searchResultFieldSlots = ref([] as string[]); |
| | | const searchLabelFieldSlots = ref([] as string[]); |
| | | const searchValueFieldSlots = ref([] as string[]); |
| | | const searchOptionsSlots = ref([] as string[]); |
| | | const searchOnChangeSlots = ref([] as string[]); |
| | | const searchPOptionsSlots = ref([] as string[]); |
| | | /* 主表 */ |
| | | const MainEntName = ref(''); |
| | | const mainSelectVals = ref({} as { [key: string]: any }); |
| | |
| | | const crudValueFieldSlots = ref([] as string[]); |
| | | const crudOptionsSlots = ref([] as string[]); |
| | | const crudOnChangeSlots = ref([] as string[]); |
| | | const crudPOptionsSlots = ref([] as string[]); |
| | | |
| | | const options = ref<SelectTypes['options']>([ |
| | | { |
| | |
| | | label: 'å¼¹åºéæ©æ¡', |
| | | }, |
| | | ]); |
| | | |
| | | /** |
| | | * @description: å®ä¾ç»ä»¶æè½½æ¶ |
| | | * @return {*} |
| | | */ |
| | | onMounted(() => { |
| | | if (unref(objParams.value.Update) == '1') { |
| | | getEntity({ |
| | | sqlcmd: "ID ='" + objParams.value.ID + "'", |
| | | entityName: 'SYS_LOW_CODE', |
| | | }).then((data) => { |
| | | /* æ¥è¯¢å è½½ */ |
| | | var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON); |
| | | SearchEntName.value = data.Data.Items[0].SEARCH_ASSY_NAME; |
| | | setFieldsValue({ ASSEMBLY_NAME: data.Data.Items[0].SEARCH_ASSY_NAME }); |
| | | searchForms = searchForms.filter((item) => !item['field'].toString().startsWith(SearchEntName.value) && !item['field'].toString().endsWith('PSelect_0')); |
| | | for (const i in searchForms) { |
| | | if (searchForms[i]['field'] != '0') { |
| | | condAdd(); |
| | | condAdd(); |
| | | if (searchForms[i]['component'] == 'ApiSelect') { |
| | | addApiSelectOption(`${SearchEntName.value}${Number(i) + 1}a`, 'search'); |
| | | setFieldsValue({ |
| | |
| | | searchForms[i]['componentProps']['valueField'], |
| | | }); |
| | | } |
| | | if (searchForms[i]['component'] == 'Select') { |
| | | addSelectOption(`${SearchEntName.value}${Number(i) + 1}a`, 'search'); |
| | | setFieldsValue({ |
| | | [`XSelect${SearchEntName.value}${Number(i) + 1}a`]: JSON.stringify( |
| | | searchForms[i]['componentProps']['options'], |
| | | ), |
| | | [`XOnChange${SearchEntName.value}${Number(i) + 1}a`]: |
| | | searchForms[i]['componentProps']['onChange'], |
| | | }); |
| | | } |
| | | setFieldsValue({ |
| | | [`${SearchEntName.value}${Number(i) + 1}a`]: searchForms[i]['field'], |
| | | [`InputNumber${Number(i) + 1}`]: searchForms[i]['colProps'].span, |
| | | [`Switch${Number(i) + 1}`]: searchForms[i]['ifShow'], |
| | | }); |
| | | objInputs.value[`${SearchEntName.value}${Number(i) + 1}a`] = searchForms[i]['label']; |
| | | searchSelectVals.value[`${SearchEntName.value}${Number(i) + 1}a`] = searchForms[i][ |
| | | 'comp' |
| | | ] |
| | | ? searchForms[i]['comp'] |
| | | : searchForms[i]['component']; |
| | | } |
| | | searchSelectVals.value[`${SearchEntName.value}${Number(i) + 1}a`] = searchForms[i]['comp']? searchForms[i]['comp']: searchForms[i]['component']; |
| | | if(searchForms[i]['comp']){ |
| | | addPopSelectOption(`${SearchEntName.value}${Number(i) + 1}a`, 'search'); |
| | | setFieldsValue({ |
| | | [`PSelect${SearchEntName.value}${Number(i) + 1}a`]: searchForms[i]['entityName'], |
| | | }); |
| | | } |
| | | } |
| | | /* å¢å æ¹å è½½ */ |
| | | var crudForms = JSON.parse(data.Data.Items[0].FORM_JSON); |
| | | CrudEntName.value = data.Data.Items[0].CRUD_ASSY_NAME; |
| | | setFieldsValueCrud({ crudAssemblyName: data.Data.Items[0].CRUD_ASSY_NAME }); |
| | | crudForms = crudForms.filter((item) => !item['field'].toString().startsWith(CrudEntName.value) && !item['field'].toString().endsWith('PSelect_0')); |
| | | for (const i in crudForms) { |
| | | crudCondAdd(); |
| | | if (crudForms[i]['component'] == 'ApiSelect') { |
| | | addApiSelectOption(`${CrudEntName.value}${Number(i) + 1}a`, 'crud'); |
| | | if (crudForms[i]['component'] == 'ApiSelect') { |
| | | addApiSelectOption(`${CrudEntName.value}${Number(i) + 1}a`, 'crud'); |
| | | setFieldsValueCrud({ |
| | | [`ApiSelect${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['api'], |
| | | [`Params${CrudEntName.value}${Number(i) + 1}a`]: JSON.stringify( |
| | | crudForms[i]['componentProps']['params'], |
| | | ), |
| | | [`Result${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['resultField'], |
| | | [`Label${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['labelField'], |
| | | [`Value${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['valueField'], |
| | | }); |
| | | } |
| | | if (crudForms[i]['component'] == 'Select') { |
| | | addSelectOption(`${CrudEntName.value}${Number(i) + 1}a`, 'crud'); |
| | | setFieldsValueCrud({ |
| | | [`XSelect${CrudEntName.value}${Number(i) + 1}a`]: JSON.stringify( |
| | | crudForms[i]['componentProps']['options'], |
| | | ), |
| | | [`XOnChange${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['onChange'], |
| | | }); |
| | | } |
| | | setFieldsValueCrud({ |
| | | [`ApiSelect${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['api'], |
| | | [`Params${CrudEntName.value}${Number(i) + 1}a`]: JSON.stringify( |
| | | crudForms[i]['componentProps']['params'], |
| | | ), |
| | | [`Result${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['resultField'], |
| | | [`Label${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['labelField'], |
| | | [`Value${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['valueField'], |
| | | [`${CrudEntName.value}${Number(i) + 1}a`]: crudForms[i]['field'], |
| | | [`InputNumber${Number(i) + 1}`]: crudForms[i]['colProps'].span, |
| | | [`Switch${Number(i) + 1}`]: crudForms[i]['show'], |
| | | [`rSwitch${Number(i) + 1}`]: crudForms[i]['required'], |
| | | }); |
| | | } |
| | | if (crudForms[i]['component'] == 'Select') { |
| | | addSelectOption(`${CrudEntName.value}${Number(i) + 1}a`, 'crud'); |
| | | setFieldsValueCrud({ |
| | | [`XSelect${CrudEntName.value}${Number(i) + 1}a`]: JSON.stringify( |
| | | crudForms[i]['componentProps']['options'], |
| | | ), |
| | | [`XOnChange${CrudEntName.value}${Number(i) + 1}a`]: |
| | | crudForms[i]['componentProps']['onChange'], |
| | | }); |
| | | } |
| | | setFieldsValueCrud({ |
| | | [`${CrudEntName.value}${Number(i) + 1}a`]: crudForms[i]['field'], |
| | | [`InputNumber${Number(i) + 1}`]: crudForms[i]['colProps'].span, |
| | | [`Switch${Number(i) + 1}`]: crudForms[i]['show'], |
| | | [`rSwitch${Number(i) + 1}`]: crudForms[i]['required'], |
| | | }); |
| | | crudInputs.value[`${CrudEntName.value}${Number(i) + 1}a`] = crudForms[i]['label']; |
| | | crudSelectVals.value[`${CrudEntName.value}${Number(i) + 1}a`] = crudForms[i]['component']; |
| | | crudInputs.value[`${CrudEntName.value}${Number(i) + 1}a`] = crudForms[i]['label']; |
| | | crudSelectVals.value[`${CrudEntName.value}${Number(i) + 1}a`] = crudForms[i]['comp']? crudForms[i]['comp']: crudForms[i]['component']; |
| | | if(crudForms[i]['comp']){ |
| | | addPopSelectOption(`${CrudEntName.value}${Number(i) + 1}a`, 'crud'); |
| | | setFieldsValueCrud({ |
| | | [`PSelect${CrudEntName.value}${Number(i) + 1}a`]: crudForms[i]['entityName'], |
| | | }); |
| | | } |
| | | } |
| | | /* 主表å è½½ */ |
| | | var objs = JSON.parse(data.Data.Items[0].BASE_FORM_JSON); |
| | | MainEntName.value = data.Data.Items[0].ASSEMBLY_NAME; |
| | | setFieldsValueMain({ MainAssemblyName: MainEntName.value }); |
| | |
| | | } |
| | | }); |
| | | |
| | | /** |
| | | * @description: å
¨é¨æäº¤ |
| | | * @return {*} |
| | | */ |
| | | async function submitAll() { |
| | | try { |
| | | const [values, crudvalues, mainvalues] = await Promise.all([ |
| | |
| | | var searchjsons = []; |
| | | var _json = {}; |
| | | var _n = 0; |
| | | let firstField = ''; |
| | | for (const k in Keys) { |
| | | console.log(`${k}:${Keys[k]}`); |
| | | if (Keys[k].toString().startsWith(getFieldsValue().ASSEMBLY_NAME)) { |
| | | firstField = Keys[k]; |
| | | _json['field'] = isNullOrEmpty(values[Keys[k]]) ? '' : values[Keys[k]]; |
| | | _json['label'] = objInputs.value[Keys[k]]; |
| | | _json['defaultValue'] = ''; |
| | |
| | | resultField: values[`Result${Keys[k]}`], |
| | | labelField: values[`Label${Keys[k]}`], |
| | | valueField: values[`Value${Keys[k]}`], |
| | | }; |
| | | } |
| | | if (searchSelectVals.value[Keys[k]] == 'Select') { |
| | | _json['componentProps'] = { |
| | | options: JSON.parse(values[`XSelect${Keys[k]}`]), |
| | | onChange: values[`XOnChange${Keys[k]}`], |
| | | }; |
| | | } |
| | | _n = _n + 4; |
| | |
| | | if (_json['component'] == 'PoPSelect') { |
| | | _json['component'] = 'Input'; |
| | | _json['comp'] = 'PoPSelect'; |
| | | _json['entityName'] = values[`PSelect${firstField}`]; |
| | | searchjsons.push(_json); |
| | | _json = {}; |
| | | _json['field'] = '0'; |
| | | _json['field'] = `${firstField}PSelect_0`; |
| | | _json['label'] = '1'; |
| | | _json['defaultValue'] = ''; |
| | | _json['defaultValue'] = values[`PSelect${firstField}`]; |
| | | _json['component'] = 'Input'; |
| | | _json['colProps'] = { span: 4 }; |
| | | _json['ifShow'] = true; |
| | | _json['colSlot'] = 'add'; |
| | | _json['colSlot'] = `${firstField}add`; |
| | | } |
| | | searchjsons.push(_json); |
| | | _json = {}; |
| | |
| | | var cjsons = []; |
| | | var cjson = {}; |
| | | var c = 0; |
| | | let cfirstField = ''; |
| | | for (const k in cKeys) { |
| | | console.log(`${k}:${cKeys[k]}`); |
| | | if (cKeys[k].toString().startsWith(getFieldsValueCrud().crudAssemblyName)) { |
| | | cfirstField = cKeys[k]; |
| | | cjson['field'] = isNullOrEmpty(crudvalues[cKeys[k]]) ? '' : crudvalues[cKeys[k]]; |
| | | cjson['label'] = isNullOrEmpty(crudInputs.value[cKeys[k]]) |
| | | ? '' |
| | |
| | | c++; |
| | | } |
| | | if (!isNullOrEmpty(cjson) && c == 6) { |
| | | //妿æ¯å¼¹åºéæ©æ¡ |
| | | if (cjson['component'] == 'PoPSelect') { |
| | | cjson['component'] = 'Input'; |
| | | cjson['comp'] = 'PoPSelect'; |
| | | cjson['entityName'] = crudvalues[`PSelect${cfirstField}`]; |
| | | cjsons.push(cjson); |
| | | cjson = {}; |
| | | cjson['field'] = `${cfirstField}PSelect_0`; |
| | | cjson['label'] = '1'; |
| | | cjson['defaultValue'] = crudvalues[`PSelect${cfirstField}`]; |
| | | cjson['component'] = 'Input'; |
| | | cjson['colProps'] = { span: 4 }; |
| | | cjson['ifShow'] = true; |
| | | cjson['colSlot'] = `${cfirstField}add`; |
| | | } |
| | | cjsons.push(cjson); |
| | | c = 0; |
| | | cjson = {}; |
| | |
| | | } |
| | | |
| | | function handleEdit(record: Recordable) {} |
| | | |
| | | /** |
| | | * @description: æ¥è¯¢é
置类åéæ©æé®æ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | function handleSelecNew() { |
| | | openNewModal(true, { |
| | | data: 'content', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: 主表é
置类åéæ©æé®æ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | function mainSelectAssy() { |
| | | openMainModal(true, { |
| | | data: 'content', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¢å æ¹é
置类åéæ©æé®æ¹æ³ |
| | | * @return {*} |
| | | */ |
| | | function handleSelectCrud() { |
| | | openCrudModal(true, { |
| | | data: 'content', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * @description: éæ©ç±»åå¼¹åºæ¡è¿åæåæ¹æ³ |
| | | * @param {*} d |
| | | * @param {*} u |
| | | * @return {*} |
| | | */ |
| | | async function mainAssySuccess(d, u) { |
| | | setFieldsValueMain({ |
| | | MainAssemblyName: d.values['val'], |
| | |
| | | crudProperties.value = data.items; |
| | | CrudEntName.value = d.values['val']; |
| | | } |
| | | /* éæ©ç±»åå¼¹åºæ¡è¿åæåæ¹æ³ End */ |
| | | |
| | | /** |
| | | * @description: é
ç½®åæ®µéæ©æ¹ååäºä»¶æ¹æ³ |
| | | * @param {*} value |
| | | * @param {*} option |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function change(value, option, field) { |
| | | console.log(value, option, field); |
| | | objInputs.value[field] = option.label; |
| | |
| | | console.log(value, option, field); |
| | | crudInputs.value[field] = option.label; |
| | | } |
| | | /* æ¥è¯¢ç»ä»¶éæ©äºä»¶ */ |
| | | /* é
ç½®åæ®µéæ©æ¹ååäºä»¶æ¹æ³ End */ |
| | | |
| | | /** |
| | | * @description: æ¥è¯¢ç»ä»¶éæ©äºä»¶ |
| | | * @param {*} value |
| | | * @param {*} option |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchOnChange(value, option, field) { |
| | | console.log(value, option, field); |
| | | if (value == 'ApiSelect') { |
| | | addApiSelectOption(field, 'search'); |
| | | delSelectOption(field, 'search'); |
| | | delPSelectOption(field, 'search'); |
| | | } else { |
| | | delApiSelectOption(field, 'search'); |
| | | } |
| | | // if (value == 'PoPSelect') {} |
| | | if (value == 'Select') { |
| | | addSelectOption(field, 'search'); |
| | | delApiSelectOption(field, 'search'); |
| | | delPSelectOption(field, 'search'); |
| | | } else { |
| | | delSelectOption(field, 'search'); |
| | | } |
| | | if (value == 'PoPSelect') { |
| | | addPopSelectOption(field, 'search'); |
| | | delApiSelectOption(field, 'search'); |
| | | delSelectOption(field, 'search'); |
| | | } else { |
| | | delPSelectOption(field, 'search'); |
| | | } |
| | | } |
| | | /* å¢å æ¹ç»ä»¶éæ©äºä»¶ */ |
| | | |
| | | /** |
| | | * @description: å¢å æ¹ç»ä»¶éæ©äºä»¶ |
| | | * @param {*} value |
| | | * @param {*} option |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function componentChange(value, option, field) { |
| | | console.log(value, option, field); |
| | | if (value == 'ApiSelect') { |
| | | addApiSelectOption(field, 'crud'); |
| | | delSelectOption(field, 'crud'); |
| | | delPSelectOption(field, 'crud'); |
| | | } else { |
| | | delApiSelectOption(field, 'crud'); |
| | | } |
| | | if (value == 'Select') { |
| | | addSelectOption(field, 'crud'); |
| | | delApiSelectOption(field, 'crud'); |
| | | delPSelectOption(field, 'crud'); |
| | | } else { |
| | | delSelectOption(field, 'crud'); |
| | | } |
| | | // if (value == 'PoPSelect') {} |
| | | if (value == 'PoPSelect') { |
| | | addPopSelectOption(field, 'crud'); |
| | | delApiSelectOption(field, 'crud'); |
| | | delSelectOption(field, 'crud'); |
| | | } else { |
| | | delPSelectOption(field, 'crud'); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: éæ©äºApiSelectç»ä»¶é项åï¼å¢å ç¸åºçè¾å
¥é¡¹ |
| | | * @param {*} field |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | function addApiSelectOption(field: string, type: string) { |
| | | const appendData: FormSchema[] = [ |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /* å¢å æ¹ApiSelectææ§½æ°æ®æ·»å */ |
| | | /** |
| | | * @description: å¢å æ¹ApiSelectææ§½æ°æ®æ·»å |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function crudSlotsPush(field: string) { |
| | | crudApiSlots.value.push(`Api${field}`); |
| | | crudParamsSlots.value.push(`Params_${field}`); |
| | |
| | | crudLabelFieldSlots.value.push(`LabelField${field}`); |
| | | crudValueFieldSlots.value.push(`ValueField${field}`); |
| | | } |
| | | /* æ¥è¯¢ApiSelectææ§½æ°æ®æ·»å */ |
| | | |
| | | /** |
| | | * @description: æ¥è¯¢ApiSelectææ§½æ°æ®æ·»å |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchSlotsPush(field: string) { |
| | | searchApiSlots.value.push(`Api${field}`); |
| | | searchParamsSlots.value.push(`Params_${field}`); |
| | |
| | | searchValueFieldSlots.value.push(`ValueField${field}`); |
| | | } |
| | | |
| | | /** |
| | | * @description: åæ¶ApiSelectç»ä»¶åå 餿·»å çè¾å
¥é¡¹ |
| | | * @param {*} field |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | function delApiSelectOption(field: string, type: string) { |
| | | const removeData: string[] = [ |
| | | `ApiSelect${field}`, |
| | |
| | | } |
| | | } |
| | | |
| | | /* å¢å æ¹ææ§½å é¤é¡¹ */ |
| | | /** |
| | | * @description: å¢å æ¹ææ§½å é¤é¡¹ |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function crudSlotsSplice(field: string) { |
| | | crudApiSlots.value = crudApiSlots.value.filter((item) => item !== `Api${field}`); |
| | | crudParamsSlots.value = crudParamsSlots.value.filter((item) => item !== `Params_${field}`); |
| | |
| | | (item) => item !== `ValueField${field}`, |
| | | ); |
| | | } |
| | | /* å¢å æ¹ææ§½å é¤é¡¹ */ |
| | | |
| | | /** |
| | | * @description: å¢å æ¹ææ§½å é¤é¡¹ |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchSlotsSplice(field: string) { |
| | | searchApiSlots.value = searchApiSlots.value.filter((item) => item !== `Api${field}`); |
| | | searchParamsSlots.value = searchParamsSlots.value.filter((item) => item !== `Params_${field}`); |
| | |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @description: 䏿æ¡Selectæ·»å é项 |
| | | * @return {*} |
| | | */ |
| | | function addSelectOption(field: string, type: string) { |
| | | const appendData: FormSchema[] = [ |
| | | { |
| | |
| | | switch (type) { |
| | | case 'search': |
| | | appendSchemaByField(appendData, ''); |
| | | // searchSelSlotsPush(field); |
| | | searchSelSlotsPush(field); |
| | | break; |
| | | case 'crud': |
| | | appendSchemaByFieldCrud(appendData, ''); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: åæ¶Selectç»ä»¶åå 餿·»å çè¾å
¥é¡¹ |
| | | * @param {*} field |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | function delSelectOption(field: string, type: string) { |
| | | const removeData: string[] = [`XSelect${field}`, `XOnChange${field}`]; |
| | | switch (type) { |
| | | case 'search': |
| | | //if (!isNullOrEmpty(getFieldsValue()[`XSelect${field}`])) { |
| | | removeSchemaByField(removeData); |
| | | // searchSelSlotsSplice(field); |
| | | searchSelSlotsSplice(field); |
| | | //} |
| | | break; |
| | | case 'crud': |
| | |
| | | } |
| | | } |
| | | |
| | | /* å¢å æ¹Selectææ§½æ°æ®æ·»å */ |
| | | /** |
| | | * @description: æ¥è¯¢Selectææ§½æ°æ®æ·»å |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchSelSlotsPush(field: string) { |
| | | searchOptionsSlots.value.push(`Select_${field}`); |
| | | searchOptionsSlots.value.push(`OnChange_${field}`); |
| | | } |
| | | |
| | | /** |
| | | * @description: æ¥è¯¢ææ§½å é¤é¡¹ |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchSelSlotsSplice(field: string) { |
| | | searchOptionsSlots.value = searchOptionsSlots.value.filter( |
| | | (item) => item !== `Select_${field}`, |
| | | ); |
| | | searchOptionsSlots.value = searchOptionsSlots.value.filter( |
| | | (item) => item !== `OnChange_${field}`, |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¢å æ¹Selectææ§½æ°æ®æ·»å |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function crudSelSlotsPush(field: string) { |
| | | crudOptionsSlots.value.push(`Select_${field}`); |
| | | crudOnChangeSlots.value.push(`OnChange_${field}`); |
| | | } |
| | | |
| | | /* å¢å æ¹ææ§½å é¤é¡¹ */ |
| | | /** |
| | | * @description: å¢å æ¹ææ§½å é¤é¡¹ |
| | | * @return {*} |
| | | */ |
| | | function crudSelSlotsSplice(field: string) { |
| | | crudOptionsSlots.value = crudOptionsSlots.value.filter((item) => item !== `Select_${field}`); |
| | | crudOnChangeSlots.value = crudOnChangeSlots.value.filter((item) => item !== `Select_${field}`); |
| | | crudOnChangeSlots.value = crudOnChangeSlots.value.filter( |
| | | (item) => item !== `OnChange_${field}`, |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¼¹åºéæ©æ¡PopSelectæ·»å é项 |
| | | * @param {*} field |
| | | * @param {*} type |
| | | * @return {*} |
| | | */ |
| | | function addPopSelectOption(field: string, type: string) { |
| | | const appendData: FormSchema[] = [ |
| | | { |
| | | field: `PSelect${field}`, |
| | | component: 'Input', |
| | | label: `defaultValue`, |
| | | slot: `PSelect_${field}`, |
| | | colProps: { span: 24 }, |
| | | }, |
| | | ]; |
| | | switch (type) { |
| | | case 'search': |
| | | appendSchemaByField(appendData, ''); |
| | | searchPSelSlotsPush(field); |
| | | break; |
| | | case 'crud': |
| | | appendSchemaByFieldCrud(appendData, ''); |
| | | crudPSelSlotsPush(field); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: æ¥è¯¢PopSelectææ§½æ°æ®æ·»å |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchPSelSlotsPush(field: string) { |
| | | searchPOptionsSlots.value.push(`PSelect_${field}`); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¢å æ¹PopSelectææ§½æ°æ®æ·»å |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function crudPSelSlotsPush(field: string) { |
| | | crudPOptionsSlots.value.push(`PSelect_${field}`); |
| | | } |
| | | |
| | | function delPSelectOption(field: string, type: string) { |
| | | const removeData: string[] = [`PSelect${field}`]; |
| | | switch (type) { |
| | | case 'search': |
| | | removeSchemaByField(removeData); |
| | | searchPSelSlotsSplice(field); |
| | | break; |
| | | case 'crud': |
| | | removeSchemaByFieldCrud(removeData); |
| | | crudPSelSlotsSplice(field); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description: æ¥è¯¢ææ§½å é¤é¡¹ |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function searchPSelSlotsSplice(field: string) { |
| | | searchPOptionsSlots.value = searchPOptionsSlots.value.filter( |
| | | (item) => item !== `PSelect_${field}`, |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * @description: å¢å æ¹ææ§½å é¤é¡¹ |
| | | * @param {*} field |
| | | * @return {*} |
| | | */ |
| | | function crudPSelSlotsSplice(field: string) { |
| | | crudPOptionsSlots.value = crudPOptionsSlots.value.filter((item) => item !== `PSelect_${field}`); |
| | | } |
| | | |
| | | const n = ref(1); |
| | |
| | | if (searchSlots.value.length == 0) { |
| | | n.value = 1; |
| | | } |
| | | delApiSelectOption(`${CrudEntName.value}${field}a`, 'search'); |
| | | delSelectOption(`${CrudEntName.value}${field}a`, 'search'); |
| | | delPSelectOption(`${CrudEntName.value}${field}a`, 'search'); |
| | | } |
| | | |
| | | /* 主表é
ç½® */ |
| | | /** |
| | | * @description: 主表é
ç½® |
| | | * @return {*} |
| | | */ |
| | | function mainCondAdd() { |
| | | appendSchemaByFieldMain( |
| | | [ |
| | |
| | | } |
| | | } |
| | | |
| | | /* å¢å æ¹é
ç½® */ |
| | | /** |
| | | * @description: å¢å æ¹é
ç½® |
| | | * @return {*} |
| | | */ |
| | | function crudCondAdd() { |
| | | appendSchemaByFieldCrud( |
| | | [ |
| | |
| | | j.value = 1; |
| | | } |
| | | delApiSelectOption(`${CrudEntName.value}${field}a`, 'crud'); |
| | | delSelectOption(`${CrudEntName.value}${field}a`, 'crud'); |
| | | delPSelectOption(`${CrudEntName.value}${field}a`, 'crud'); |
| | | } |
| | | |
| | | function goBack() { |
| | |
| | | <style lang="less" scoped> |
| | | .high-form { |
| | | padding-bottom: 48px; |
| | | }</style |
| | | >: { values: any[]; }: any: { values: any[]; }: any: { values: any[]; }: any: any: any: any: any: |
| | | } |
| | | </style> |
| | | : { values: any[]; }: any: { values: any[]; }: any: { values: any[]; }: any: any: any: any: any: |
| | | any: any |