@gct-paas/excel 0.1.40-beta.25 → 0.1.40-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseComponent-gOtXQLY_.js → BaseComponent-ClKLQPlb.js} +2 -2
- package/dist/{VueVideoPlayer-CB5VHlj2.js → VueVideoPlayer-D7buOU3g.js} +2 -2
- package/dist/{align-editor-ssy7gJsD.js → align-editor-BM2D1Kjn.js} +1 -1
- package/dist/{barcode-design-Mjrep3H_.js → barcode-design-D8H2Bg9b.js} +2 -2
- package/dist/base/index.es.js +12 -8
- package/dist/{diagonal-design-CFBp2E-O.js → diagonal-design-Ca9DW4R9.js} +2 -2
- package/dist/{dynamic-table-action-BKX0Oeoy.js → dynamic-table-action-DPgnmGmu.js} +21 -2
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BsyVWing.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BUKMwvFf.js} +27 -7
- package/dist/{edit.utils-CXmmCnxE-CwPcGg-f.js → edit.utils-CXmmCnxE-ogCEEMW7.js} +1 -1
- package/dist/excel.css +9 -9
- package/dist/{exceljs.min-eo-E80If.js → exceljs.min-BzSfyOeP.js} +2 -2
- package/dist/{font-editor-CAZX85G4.js → font-editor-tmQsLM86.js} +3 -3
- package/dist/{image-design-g9R_z-IY.js → image-design-oRvqavKb.js} +2 -2
- package/dist/{index-C6oivLbu.js → index-1GK0_6yB.js} +1 -1
- package/dist/{index-9Mi1Iiw8.js → index-3K7-At9-.js} +3 -3
- package/dist/{index-DifKRFVy.js → index-61ZlwI2f.js} +2 -2
- package/dist/{index-NH1JcF4s.js → index-AU7rrK9g.js} +2 -2
- package/dist/{index--RhdrCZV.js → index-B3_1mcU-.js} +2 -2
- package/dist/{index-8WHvZyAx.js → index-BMUAwQmf.js} +2 -2
- package/dist/{index-D-WSp3EA.js → index-BVJENFMM.js} +1 -1
- package/dist/{index-SrAjB-wq.js → index-B_CDhpav.js} +4 -4
- package/dist/{index-BoGFEaqo.js → index-C4txo2fg.js} +2 -2
- package/dist/{index-hNdJpzws.js → index-C4v0H4FC.js} +3 -3
- package/dist/{index-B9hIqELW.js → index-C5Bdrx4J.js} +1 -1
- package/dist/{index-0pYUJqWX.js → index-C8-IDtVr.js} +2 -2
- package/dist/{index-0S-kw2HL.js → index-CHTrEvG1.js} +2 -2
- package/dist/{index-Cpn8pcne.js → index-CI051jjs.js} +2 -2
- package/dist/{index-BLv5fzzG.js → index-CKyxWh-q.js} +2 -2
- package/dist/{index-CoKpbR25.js → index-CMKlsuD6.js} +2 -2
- package/dist/{index-PUFY8idd.js → index-CcC1xcOH.js} +1 -1
- package/dist/{index-BBq6DSLI.js → index-Coz70NtU.js} +2 -2
- package/dist/{index-DEMinegB.js → index-D0PRNLPd.js} +1 -1
- package/dist/{index--7My1yo5.js → index-D1KO6u1Z.js} +347 -188
- package/dist/{index-iYrfBvkL.js → index-DAuoR0-c.js} +2 -2
- package/dist/{index-Cmr9DRpz.js → index-DLRVgGXr.js} +1 -1
- package/dist/{index-D3cPbNne.js → index-DS7TSyjT.js} +1 -1
- package/dist/{index-jTfc0zM7.js → index-DUrJEPXQ.js} +2 -2
- package/dist/{index-DozFqpk2.js → index-DbuDWYlA.js} +1 -1
- package/dist/{index-NulsmEum.js → index-DvXsENIM.js} +3 -3
- package/dist/{index-YteSvWxT.js → index-IlasHrys.js} +1 -1
- package/dist/{index-DzT1SZ9z.js → index-ZHmmTlG-.js} +3 -3
- package/dist/{index-DgEDg0_J.js → index-ZxBcNN-g.js} +3 -3
- package/dist/{index-CpQiCEe7.js → index-cBtITF-e.js} +1 -1
- package/dist/{index-BycDrbO0.js → index-eyK5xPX3.js} +2 -2
- package/dist/{index-fcxbS2U1.js → index-nhC91wtN.js} +3 -3
- package/dist/{index-BLqJtzs6.js → index-sEcLP8dk.js} +2 -2
- package/dist/{index-BMlGh5m0.js → index-zJwCoxly.js} +2 -2
- package/dist/index.es.js +2 -2
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DjI5GeWt.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DhmtOtIs.js} +1 -1
- package/dist/{pagination-design-DelDPMV6.js → pagination-design-Bh5sF0VU.js} +2 -2
- package/dist/paper-widget-design-DZrP96jp.js +4 -0
- package/dist/{print-runtime-instance-NcHBwPwX.js → print-runtime-instance-19OA8Ubq.js} +1 -1
- package/dist/{print-snapshot-renderer-Dw-xzoDx.js → print-snapshot-renderer-D5OUO3Sx.js} +3 -3
- package/dist/{qrcode-design-DAYfoLN-.js → qrcode-design-CkwIXxb_.js} +1 -1
- package/dist/{revo-grid.entry-Bh8ebL13.js → revo-grid.entry-CJ1rhBKH.js} +1 -1
- package/dist/{revogr-attribution_7.entry-CsJaMH68.js → revogr-attribution_7.entry-Ba9MJ5p9.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-DgmZ8Pc0.js → revogr-clipboard_3.entry--neB-vq8.js} +2 -2
- package/dist/{revogr-data_4.entry-CPW7BILy.js → revogr-data_4.entry-BcmetTvO.js} +2 -2
- package/dist/{revogr-filter-panel.entry-BpIcSbuR.js → revogr-filter-panel.entry-jp8iD-xn.js} +1 -1
- package/dist/seal-design-DX7PP65G.js +4 -0
- package/dist/{serialnumber-design-C92sT5qW.js → serialnumber-design-LzvbjC79.js} +1 -1
- package/dist/shared/index.es.js +2 -2
- package/dist/{single-field-drop-BcuqHgNO.js → single-field-drop-CEbaTw0-.js} +2 -2
- package/dist/{size-editor-JdHGylGx.js → size-editor-CaFqQHeU.js} +1 -1
- package/dist/src/nocode-base/src/core/factory/sub-table-factory.d.ts +2 -0
- package/dist/src/nocode-base/src/interface/transform.d.ts +5 -0
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/useReferenceLabel.d.ts +4 -0
- package/dist/{sub-table-factory-v9spfnMN.js → sub-table-factory-_1c-Dsu_.js} +14 -2
- package/dist/{text-design-BjhwgpUv.js → text-design-D5QIq5aE.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-DQh0IPeE.js → throttle-Cpk1LoGk-BMfNVrvD.js} +1 -1
- package/dist/{timediff-design-D84T_Isx.js → timediff-design-B9m-zonK.js} +1 -1
- package/dist/{trace-like-wrapper-DHb2jlre.js → trace-like-wrapper-C_NJVd6e.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-CV1HsENd.js → value-editor.vue_vue_type_style_index_0_lang-BpZAIeLC.js} +2 -2
- package/dist/{widget-barcode-CNB9Sqle.js → widget-barcode-CDMJo5uk.js} +4 -4
- package/dist/{widget-diagonal-6ZDcxCwX.js → widget-diagonal-D9AC_qNv.js} +3 -3
- package/dist/{widget-image-D--Ynjra.js → widget-image-DMiIjg8J.js} +4 -4
- package/dist/{widget-line-CpwqEFD9.js → widget-line-BwSO-GKu.js} +2 -2
- package/dist/{widget-pagination-BN3wWsKq.js → widget-pagination-Buo5s7Xq.js} +5 -5
- package/dist/{widget-power-Cn61OOWe.js → widget-power-D8HtIVO2.js} +3 -3
- package/dist/{widget-qrcode-BgUCM01T.js → widget-qrcode-XEY9m1Dj.js} +3 -3
- package/dist/{widget-rangelimit-CnNNwIo0.js → widget-rangelimit-C9j1s6Md.js} +3 -3
- package/dist/{widget-serialnumber-gZih5585.js → widget-serialnumber-B_IA4_De.js} +1 -1
- package/dist/{widget-text--iXnC5zl.js → widget-text-Bp0FEZa1.js} +5 -5
- package/dist/{widget-timediff-DN-FCR7T.js → widget-timediff-BlYRlDYp.js} +2 -2
- package/package.json +2 -2
- package/dist/paper-widget-design-UPTi8CN4.js +0 -4
- package/dist/seal-design-CeJEHJ-K.js +0 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Vue from "vue";
|
|
2
2
|
import { createVNode, computed, unref, ref as ref$1, defineComponent, onMounted, resolveComponent, openBlock, createElementBlock, withCtx, watch, toRaw, inject, reactive, createBlock, Fragment, renderList, createTextVNode, toDisplayString as toDisplayString$1, createCommentVNode, createElementVNode, normalizeClass, h, normalizeStyle, watchEffect, renderSlot, shallowRef, defineAsyncComponent, resolveDynamicComponent, mergeProps, normalizeProps, guardReactiveProps, onUnmounted, Text, nextTick, onBeforeUnmount, withModifiers, withDirectives, vShow, Teleport, getCurrentScope, onScopeDispose, getCurrentInstance as getCurrentInstance$1, withKeys, vModelText, isRef, provide, isVNode as isVNode$1, createApp, render, TransitionGroup, toRefs, useAttrs, createSlots, useCssVars, onBeforeMount, toRef, mergeDefaults, toHandlers, Transition, useModel, mergeModels as mergeModels$1, onErrorCaptured, markRaw } from "vue";
|
|
3
|
-
import { g as getAllDataProfiles, i as isDataTableProfile, a as getProfile, b as isBusinessSubTableProfile, c as getProfileByTableType, r as resolveCreateTargetByTableType, d as getBusinessProfileByRefModelType, S as SUB_TABLE_PANEL_TYPE_NAME, e as expandAutofillTemplates, f as resolveAutofillToField, h as SubTableType, j as getAllBusinessRefModelTypes, D as DateObjectContext, k as isBlank$1, F as FIELD_TYPE, l as isSameFieldValue$1, m as runDateObjectHandler, n as companionIdKey, o as companionLabelKey, p as api, I as Icon$1, w as warning, u as useInsertStyles, s as svgBaseProps, P as PaginationFormat, q as PaperWidgeType, B as BwipCodeType, L as LineType, t as PageSizeEnum, O as Orientation, v as src, T as TRACE_FIELD_TYPES, x as BUSINESS_FIELD_TYPES, y as resolveFieldRenderComponent, C as ComponentTypeEnum, z as parse$2, A as estraverse, E as Syntax, G as isDynamicCreateTarget, H as CellType, J as isDynamicCellSubTable, K as ParamModelTypeEnum, M as FieldTypeToJs, N as CreateType, Q as uuid2, R as useModal, U as requireEstraverse, V as commonjsGlobal, W as getDefaultExportFromCjs, X as PaperWidgeValueType, Y as onlineFormMasterModelTypeEnum, Z as WAREHOUSE_FIELD_TYPES, _ as UniqueConstraintType, $ as FieldDefaultValueTypeEnum, a0 as FormTypeEnum, a1 as mitt, a2 as isDateObjectField, a3 as PlatformEnum, a4 as LabelPosition, a5 as BooleanShowMode, a6 as SignatureImageDirectionEnum, a7 as FallbackSignTypeEnum, a8 as SignatureNumberTypeEnum, a9 as SignatureTimeTypeEnum, aa as SignShowTypeEnum, ab as SignatureTypeEnum, ac as useNamespace, ad as _export_sfc, ae as normalizeFieldType, af as PaperSizeMap, ag as getFieldMain, ah as buildUUID, ai as FieldIconMap, aj as BigNumber, ak as FieldSysVarDefaultValueEnum, al as CellWidgetViewState, am as DiagonalDirection, an as WidgetImageSizeMode, ao as LineDirection, ap as TimeDiffFormat, aq as DiagonalVertex, ar as resolveDiagonalVertex, as as getThemeColorByTableType, at as ViewTypeEnum, au as isDynamicSubTablePanelType, av as isFixedSubTablePanelType, aw as ExpressionModeEnum, ax as ReturnTypeEnum, ay as ExpressionTabEnum, az as RangeValidateMode, aA as RangeCompareOp, aB as getExclusiveBusinessTypeTokens, aC as getSubTableTypeByRefModelType, aD as findFieldMain, aE as DecimalDisplayMode$1, aF as ImageDisplayModeEnum, aG as FormDesignEnum, aH as BASIC_FIELD_TYPES, aI as buildDeviceFilterQuery, aJ as refUtils, aK as getAllTableProfiles, aL as getAugmentedNamespace, aM as transformUtils, aN as EmptySymbol, aO as ASSIGNMENTSTRATEGY_ENUM, aP as Dependency_ENUM, aQ as EntityModelCategoryEnum, aR as resolveLotDisplayLabel, aS as CheckDsTypeEnum, aT as DeviceLink, aU as DeviceParamsTypeTitle, aV as AITooltips, aW as DenoiseMethodOptions, aX as BinarizeMethodOptions, aY as JoinModelTypeEum, aZ as sqlUtils, a_ as DateFormat, a$ as withRequestCache, b0 as LOT_CONTAINER_ROLE, b1 as buildLotSnListQuery, b2 as renderUtils, b3 as resolveLotRecordByValue, b4 as materialCheck, b5 as getLotLockedReason, b6 as validateReinspectionDate, b7 as buildMaterialLotListQuery, b8 as ProductionIdentificationTypeEnum, b9 as BindCmpStyleEnum, ba as getParseRuleInfo, bb as getParseRuleValue, bc as normalizeRefLoaderResult, bd as STOCKTAKE_DIMENSION, be as F, bf as resolveStocktakeSelectApi, bg as normalizeProductionContainerOptions, bh as buildProductionLotListQuery, bi as buildInspectionLotListQuery, bj as DEVICE_GROUP_QUERY_KEY, bk as getRowId, bl as findRuntimeTableRow, bm as RenderModeEnum, bn as findRuntimeParentRow, bo as useOnlineFormTransformField2Component, bp as FormulaRuleFieldKeyEnum, bq as formulaRuleFieldDict, br as resolveDesignPanelFeatures, bs as BIZ_TABLE_CONFIG_SEED_TYPES, bt as STOCKTAKE_DIMENSION_OPTIONS, bu as isRepeatingSubTablePanelType, bv as uuid2$1 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-
|
|
3
|
+
import { g as getAllDataProfiles, i as isDataTableProfile, a as getProfile, b as isBusinessSubTableProfile, c as getProfileByTableType, r as resolveCreateTargetByTableType, d as getBusinessProfileByRefModelType, S as SUB_TABLE_PANEL_TYPE_NAME, e as expandAutofillTemplates, f as resolveAutofillToField, h as SubTableType, j as getAllBusinessRefModelTypes, D as DateObjectContext, k as isBlank$1, F as FIELD_TYPE, l as isSameFieldValue$1, m as runDateObjectHandler, n as companionIdKey, o as companionLabelKey, p as api, I as Icon$1, w as warning, u as useInsertStyles, s as svgBaseProps, P as PaginationFormat, q as PaperWidgeType, B as BwipCodeType, L as LineType, t as PageSizeEnum, O as Orientation, v as src, T as TRACE_FIELD_TYPES, x as BUSINESS_FIELD_TYPES, y as resolveFieldRenderComponent, C as ComponentTypeEnum, z as parse$2, A as estraverse, E as Syntax, G as isDynamicCreateTarget, H as CellType, J as isDynamicCellSubTable, K as ParamModelTypeEnum, M as FieldTypeToJs, N as CreateType, Q as uuid2, R as useModal, U as requireEstraverse, V as commonjsGlobal, W as getDefaultExportFromCjs, X as PaperWidgeValueType, Y as onlineFormMasterModelTypeEnum, Z as WAREHOUSE_FIELD_TYPES, _ as UniqueConstraintType, $ as FieldDefaultValueTypeEnum, a0 as FormTypeEnum, a1 as mitt, a2 as isDateObjectField, a3 as PlatformEnum, a4 as LabelPosition, a5 as BooleanShowMode, a6 as SignatureImageDirectionEnum, a7 as FallbackSignTypeEnum, a8 as SignatureNumberTypeEnum, a9 as SignatureTimeTypeEnum, aa as SignShowTypeEnum, ab as SignatureTypeEnum, ac as useNamespace, ad as _export_sfc, ae as normalizeFieldType, af as PaperSizeMap, ag as getFieldMain, ah as buildUUID, ai as FieldIconMap, aj as BigNumber, ak as FieldSysVarDefaultValueEnum, al as CellWidgetViewState, am as DiagonalDirection, an as WidgetImageSizeMode, ao as LineDirection, ap as TimeDiffFormat, aq as DiagonalVertex, ar as resolveDiagonalVertex, as as getThemeColorByTableType, at as ViewTypeEnum, au as isDynamicSubTablePanelType, av as isFixedSubTablePanelType, aw as ExpressionModeEnum, ax as ReturnTypeEnum, ay as ExpressionTabEnum, az as RangeValidateMode, aA as RangeCompareOp, aB as getExclusiveBusinessTypeTokens, aC as getSubTableTypeByRefModelType, aD as findFieldMain, aE as DecimalDisplayMode$1, aF as ImageDisplayModeEnum, aG as FormDesignEnum, aH as BASIC_FIELD_TYPES, aI as buildDeviceFilterQuery, aJ as refUtils, aK as getAllTableProfiles, aL as getAugmentedNamespace, aM as transformUtils, aN as EmptySymbol, aO as ASSIGNMENTSTRATEGY_ENUM, aP as Dependency_ENUM, aQ as EntityModelCategoryEnum, aR as resolveLotDisplayLabel, aS as CheckDsTypeEnum, aT as DeviceLink, aU as DeviceParamsTypeTitle, aV as AITooltips, aW as DenoiseMethodOptions, aX as BinarizeMethodOptions, aY as JoinModelTypeEum, aZ as sqlUtils, a_ as DateFormat, a$ as withRequestCache, b0 as LOT_CONTAINER_ROLE, b1 as buildLotSnListQuery, b2 as renderUtils, b3 as resolveLotRecordByValue, b4 as materialCheck, b5 as getLotLockedReason, b6 as validateReinspectionDate, b7 as buildMaterialLotListQuery, b8 as ProductionIdentificationTypeEnum, b9 as BindCmpStyleEnum, ba as getParseRuleInfo, bb as getParseRuleValue, bc as normalizeRefLoaderResult, bd as STOCKTAKE_DIMENSION, be as F, bf as resolveStocktakeSelectApi, bg as normalizeProductionContainerOptions, bh as buildProductionLotListQuery, bi as buildInspectionLotListQuery, bj as DEVICE_GROUP_QUERY_KEY, bk as getRowId, bl as findRuntimeTableRow, bm as RenderModeEnum, bn as findRuntimeParentRow, bo as useOnlineFormTransformField2Component, bp as FormulaRuleFieldKeyEnum, bq as formulaRuleFieldDict, br as resolveDesignPanelFeatures, bs as BIZ_TABLE_CONFIG_SEED_TYPES, bt as STOCKTAKE_DIMENSION_OPTIONS, bu as isRepeatingSubTablePanelType, bv as uuid2$1 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BUKMwvFf.js";
|
|
4
4
|
import { range as range$1, cloneDeep, get as get$4, merge, isEmpty, zip, pick, omit, has, debounce, isNil, times, clone as clone$3, differenceBy, last, mapValues, set as set$2, hasIn, isEqual } from "lodash-es";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import { useFormBaseModal, DataSourceChangeEvent, getBuiltinContextFields, DataSources, FieldFills, closeAllFormBaseModal, FormBaseModalPlugin } from "@gct-paas/form-base";
|
|
7
7
|
import * as Antd from "ant-design-vue";
|
|
8
8
|
import { message, Modal, Alert, Empty, InputSearch, Cascader, ConfigProvider, Tooltip as Tooltip$1, Input, Tree, Transfer, Select, Tag, Form, AutoComplete, TimePicker, DatePicker, Textarea, TreeSelect, CheckboxGroup, Checkbox, Radio, RadioGroup } from "ant-design-vue";
|
|
9
|
-
import { b as bindFormulaCacheInvalidation, c as currentParamsConfig, M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, g as getBusinessFieldKey, d as MULTI_SHEET_SCHEMA_VERSION, n as normalizeGridColumnWidth, e as getParseFormulaVarInfos, f as createRuntimeDocumentV2, h as clampSealPosition, i as normalizeSealDiameter, j as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, k as isCellAutoLineBreak, B as BorderTD, u as useFormModel, l as useFormTmplConfig, m as findFieldProfile, o as normalizeHistoricalBusinessRow, p as DeviceLinkTmplUtil, q as normalizeAIOcrTmpl, r as useWidgetStaticAttrs, s as useRuntimeInstanceServices, t as setSelectValidatorId, v as setSelectAnnotationId, w as useRuntimeRowState, x as getObjectBomMaterialLotQuery, y as buildObjectLotExtraQuery, z as resolveObjectFieldKeys, F as FormModelController, A as MaterialConsumptionPatternEnum, C as validateObjectBomForScan, E as resolveObjectBomEntry, G as runWithFillProduct, H as useNocodeFormWidget, I as applyConsumeObjectTraceChange, J as getObjectBomProductQuery, K as EMPTY_PRODUCT_VERSION_ID, L as normalizeHistoricalAutofillRow, N as readSealValue, O as isSealStamped, P as stampSealValue, Q as isValidSealValue, R as clearSealValue, S as parseRuntimeFieldPath, T as NCB_PROVIDE, U as calculateFormula, V as useStyles, W as useDependency, X as useFieldPresentation, Y as useRuntimeEditorFlusher, Z as RuntimeFormStateStore, _ as createRuntimeInstanceContext, $ as RuntimeInstanceRegistry, a0 as ScanParamType, a1 as RequiredQtyCalcRule, a2 as MBRender, a3 as MCRender, a4 as moveSealValue, a5 as DocumentPaper, a6 as DynamicTableAction, a7 as _sfc_main$6C } from "./dynamic-table-action-
|
|
10
|
-
import { S as SEARCH_SEVICE, u as useWebUpload, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2, _ as _sfc_main$6B, P as ProductTypeEnum } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-
|
|
9
|
+
import { b as bindFormulaCacheInvalidation, c as currentParamsConfig, M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, g as getBusinessFieldKey, d as MULTI_SHEET_SCHEMA_VERSION, n as normalizeGridColumnWidth, e as getParseFormulaVarInfos, f as createRuntimeDocumentV2, h as clampSealPosition, i as normalizeSealDiameter, j as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, k as isCellAutoLineBreak, B as BorderTD, u as useFormModel, l as useFormTmplConfig, m as findFieldProfile, o as normalizeHistoricalBusinessRow, p as DeviceLinkTmplUtil, q as normalizeAIOcrTmpl, r as useWidgetStaticAttrs, s as useRuntimeInstanceServices, t as setSelectValidatorId, v as setSelectAnnotationId, w as useRuntimeRowState, x as getObjectBomMaterialLotQuery, y as buildObjectLotExtraQuery, z as resolveObjectFieldKeys, F as FormModelController, A as MaterialConsumptionPatternEnum, C as validateObjectBomForScan, E as resolveObjectBomEntry, G as runWithFillProduct, H as useNocodeFormWidget, I as applyConsumeObjectTraceChange, J as getObjectBomProductQuery, K as EMPTY_PRODUCT_VERSION_ID, L as normalizeHistoricalAutofillRow, N as readSealValue, O as isSealStamped, P as stampSealValue, Q as isValidSealValue, R as clearSealValue, S as parseRuntimeFieldPath, T as NCB_PROVIDE, U as calculateFormula, V as useStyles, W as useDependency, X as useFieldPresentation, Y as useRuntimeEditorFlusher, Z as RuntimeFormStateStore, _ as createRuntimeInstanceContext, $ as RuntimeInstanceRegistry, a0 as ScanParamType, a1 as RequiredQtyCalcRule, a2 as MBRender, a3 as MCRender, a4 as moveSealValue, a5 as DocumentPaper, a6 as DynamicTableAction, a7 as _sfc_main$6C } from "./dynamic-table-action-DPgnmGmu.js";
|
|
10
|
+
import { S as SEARCH_SEVICE, u as useWebUpload, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2, _ as _sfc_main$6B, P as ProductTypeEnum } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DhmtOtIs.js";
|
|
11
11
|
import { HttpUtil } from "@gct-paas/api";
|
|
12
12
|
import { Tooltip, Grid, Table, Column, Icon as Icon$2, Edit, Validator, VxeGrid } from "vxe-table";
|
|
13
13
|
import { useModal as useModal$1, t as t$2 } from "@gct-paas/core";
|
|
@@ -2016,7 +2016,7 @@ function openWindow(url, opt) {
|
|
|
2016
2016
|
const FieldPropLabels = Object.entries(FIELD_PROP_LABEL_MAP);
|
|
2017
2017
|
const FieldTypeLabels = Object.entries(FIELD_TYPE_LABEL_MAP);
|
|
2018
2018
|
async function createWorkbook() {
|
|
2019
|
-
const ExcelJs = (await import("./exceljs.min-
|
|
2019
|
+
const ExcelJs = (await import("./exceljs.min-BzSfyOeP.js").then((n) => n.e)).default;
|
|
2020
2020
|
return new ExcelJs.Workbook();
|
|
2021
2021
|
}
|
|
2022
2022
|
class XlsxParser {
|
|
@@ -2387,39 +2387,39 @@ class XlsxParser {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
function asyncImportClassModules() {
|
|
2389
2389
|
const modules = /* @__PURE__ */ Object.assign({
|
|
2390
|
-
"./_field_/auto-complete/index.ts": () => import("./index-
|
|
2391
|
-
"./_field_/datepicker/index.ts": () => import("./index
|
|
2392
|
-
"./_field_/datetimepicker/index.ts": () => import("./index-
|
|
2393
|
-
"./_field_/department/index.ts": () => import("./index-
|
|
2394
|
-
"./_field_/enum-select/index.ts": () => import("./index-
|
|
2395
|
-
"./_field_/input/index.ts": () => import("./index-
|
|
2396
|
-
"./_field_/inputdouble/index.ts": () => import("./index-
|
|
2397
|
-
"./_field_/inputnumber/index.ts": () => import("./index-
|
|
2398
|
-
"./_field_/rdo-select/index.ts": () => import("./index-
|
|
2399
|
-
"./_field_/seal/index.ts": () => import("./index-
|
|
2400
|
-
"./_field_/select/index.ts": () => import("./index-
|
|
2401
|
-
"./_field_/sign/index.ts": () => import("./index-
|
|
2402
|
-
"./_field_/switch/index.ts": () => import("./index-
|
|
2403
|
-
"./_field_/textarea/index.ts": () => import("./index-
|
|
2404
|
-
"./_field_/timepicker/index.ts": () => import("./index-
|
|
2405
|
-
"./_field_/upload-file/index.ts": () => import("./index-
|
|
2406
|
-
"./_field_/upload-image/index.ts": () => import("./index-
|
|
2407
|
-
"./_field_/userpicker/index.ts": () => import("./index-
|
|
2408
|
-
"./_widget_/barcode/index.ts": () => import("./index-
|
|
2409
|
-
"./_widget_/combine-fields/index.ts": () => import("./index-
|
|
2410
|
-
"./_widget_/diagonal/index.ts": () => import("./index-
|
|
2411
|
-
"./_widget_/dyn-value/index.ts": () => import("./index-
|
|
2412
|
-
"./_widget_/image/index.ts": () => import("./index-
|
|
2413
|
-
"./_widget_/line/index.ts": () => import("./index-
|
|
2414
|
-
"./_widget_/power/index.ts": () => import("./index-
|
|
2415
|
-
"./_widget_/qrcode/index.ts": () => import("./index-
|
|
2416
|
-
"./_widget_/ro/index.ts": () => import("./index-
|
|
2417
|
-
"./_widget_/serialnumber/index.ts": () => import("./index-
|
|
2418
|
-
"./_widget_/sub-table/index.ts": () => import("./index-
|
|
2419
|
-
"./_widget_/timediff/index.ts": () => import("./index-
|
|
2420
|
-
"./paper/index.ts": () => import("./index-
|
|
2421
|
-
"./td/index.ts": () => import("./index-
|
|
2422
|
-
"./tr/index.ts": () => import("./index-
|
|
2390
|
+
"./_field_/auto-complete/index.ts": () => import("./index-ZxBcNN-g.js").then((m) => m["default"]),
|
|
2391
|
+
"./_field_/datepicker/index.ts": () => import("./index-B3_1mcU-.js").then((m) => m["default"]),
|
|
2392
|
+
"./_field_/datetimepicker/index.ts": () => import("./index-DAuoR0-c.js").then((m) => m["default"]),
|
|
2393
|
+
"./_field_/department/index.ts": () => import("./index-Coz70NtU.js").then((m) => m["default"]),
|
|
2394
|
+
"./_field_/enum-select/index.ts": () => import("./index-C4v0H4FC.js").then((m) => m["default"]),
|
|
2395
|
+
"./_field_/input/index.ts": () => import("./index-CHTrEvG1.js").then((m) => m["default"]),
|
|
2396
|
+
"./_field_/inputdouble/index.ts": () => import("./index-C4txo2fg.js").then((m) => m["default"]),
|
|
2397
|
+
"./_field_/inputnumber/index.ts": () => import("./index-61ZlwI2f.js").then((m) => m["default"]),
|
|
2398
|
+
"./_field_/rdo-select/index.ts": () => import("./index-DvXsENIM.js").then((m) => m["default"]),
|
|
2399
|
+
"./_field_/seal/index.ts": () => import("./index-nhC91wtN.js").then((m) => m["default"]),
|
|
2400
|
+
"./_field_/select/index.ts": () => import("./index-ZHmmTlG-.js").then((m) => m["default"]),
|
|
2401
|
+
"./_field_/sign/index.ts": () => import("./index-CI051jjs.js").then((m) => m["default"]),
|
|
2402
|
+
"./_field_/switch/index.ts": () => import("./index-B_CDhpav.js").then((m) => m["default"]),
|
|
2403
|
+
"./_field_/textarea/index.ts": () => import("./index-AU7rrK9g.js").then((m) => m["default"]),
|
|
2404
|
+
"./_field_/timepicker/index.ts": () => import("./index-DUrJEPXQ.js").then((m) => m["default"]),
|
|
2405
|
+
"./_field_/upload-file/index.ts": () => import("./index-BMUAwQmf.js").then((m) => m["default"]),
|
|
2406
|
+
"./_field_/upload-image/index.ts": () => import("./index-CKyxWh-q.js").then((m) => m["default"]),
|
|
2407
|
+
"./_field_/userpicker/index.ts": () => import("./index-sEcLP8dk.js").then((m) => m["default"]),
|
|
2408
|
+
"./_widget_/barcode/index.ts": () => import("./index-DS7TSyjT.js").then((m) => m["default"]),
|
|
2409
|
+
"./_widget_/combine-fields/index.ts": () => import("./index-C8-IDtVr.js").then((m) => m["default"]),
|
|
2410
|
+
"./_widget_/diagonal/index.ts": () => import("./index-eyK5xPX3.js").then((m) => m["default"]),
|
|
2411
|
+
"./_widget_/dyn-value/index.ts": () => import("./index-CMKlsuD6.js").then((m) => m["default"]),
|
|
2412
|
+
"./_widget_/image/index.ts": () => import("./index-BVJENFMM.js").then((m) => m["default"]),
|
|
2413
|
+
"./_widget_/line/index.ts": () => import("./index-1GK0_6yB.js").then((m) => m["default"]),
|
|
2414
|
+
"./_widget_/power/index.ts": () => import("./index-DbuDWYlA.js").then((m) => m["default"]),
|
|
2415
|
+
"./_widget_/qrcode/index.ts": () => import("./index-D0PRNLPd.js").then((m) => m["default"]),
|
|
2416
|
+
"./_widget_/ro/index.ts": () => import("./index-C5Bdrx4J.js").then((m) => m["default"]),
|
|
2417
|
+
"./_widget_/serialnumber/index.ts": () => import("./index-IlasHrys.js").then((m) => m["default"]),
|
|
2418
|
+
"./_widget_/sub-table/index.ts": () => import("./index-cBtITF-e.js").then((m) => m["default"]),
|
|
2419
|
+
"./_widget_/timediff/index.ts": () => import("./index-CcC1xcOH.js").then((m) => m["default"]),
|
|
2420
|
+
"./paper/index.ts": () => import("./index-DLRVgGXr.js").then((m) => m["default"]),
|
|
2421
|
+
"./td/index.ts": () => import("./index-3K7-At9-.js").then((m) => m["default"]),
|
|
2422
|
+
"./tr/index.ts": () => import("./index-zJwCoxly.js").then((m) => m["default"])
|
|
2423
2423
|
});
|
|
2424
2424
|
return modules;
|
|
2425
2425
|
}
|
|
@@ -16190,7 +16190,7 @@ function asyncImportWidgetConfigList() {
|
|
|
16190
16190
|
return widgetConfigList;
|
|
16191
16191
|
}
|
|
16192
16192
|
function asyncImportWidgetDesign() {
|
|
16193
|
-
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-
|
|
16193
|
+
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-DX7PP65G.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-D8H2Bg9b.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-Ca9DW4R9.js"), "./image/image-design.vue": () => import("./image-design-oRvqavKb.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-Bh5sF0VU.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-DZrP96jp.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-CkwIXxb_.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-LzvbjC79.js"), "./text/text-design.vue": () => import("./text-design-D5QIq5aE.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-B9m-zonK.js") });
|
|
16194
16194
|
const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
|
|
16195
16195
|
const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
|
|
16196
16196
|
if (mKey) {
|
|
@@ -22952,7 +22952,7 @@ const _sfc_main$5S = /* @__PURE__ */ defineComponent({
|
|
|
22952
22952
|
refId: __props.id
|
|
22953
22953
|
}))
|
|
22954
22954
|
}, [
|
|
22955
|
-
createTextVNode(toDisplayString$1(_ctx.$t("sys.onlineForm.
|
|
22955
|
+
createTextVNode(toDisplayString$1(_ctx.$t("sys.onlineForm.subTableType.CHECK")) + " ", 1),
|
|
22956
22956
|
createVNode(_component_ArrowUpOutlined, {
|
|
22957
22957
|
class: "arrow",
|
|
22958
22958
|
onClick: _cache[0] || (_cache[0] = (e) => {
|
|
@@ -22970,7 +22970,7 @@ const _sfc_main$5S = /* @__PURE__ */ defineComponent({
|
|
|
22970
22970
|
};
|
|
22971
22971
|
}
|
|
22972
22972
|
});
|
|
22973
|
-
const SpreadSheetCheckTr = /* @__PURE__ */ _export_sfc(_sfc_main$5S, [["__scopeId", "data-v-
|
|
22973
|
+
const SpreadSheetCheckTr = /* @__PURE__ */ _export_sfc(_sfc_main$5S, [["__scopeId", "data-v-4309310b"]]);
|
|
22974
22974
|
const _sfc_main$5R = /* @__PURE__ */ defineComponent({
|
|
22975
22975
|
__name: "sheet-data-group-ref",
|
|
22976
22976
|
props: {
|
|
@@ -56809,7 +56809,7 @@ const _sfc_main$3v = /* @__PURE__ */ defineComponent({
|
|
|
56809
56809
|
}
|
|
56810
56810
|
});
|
|
56811
56811
|
function asyncImportWidgetProp() {
|
|
56812
|
-
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-
|
|
56812
|
+
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-CDMJo5uk.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-D9AC_qNv.js"), "./widget-image.vue": () => import("./widget-image-DMiIjg8J.js"), "./widget-line.vue": () => import("./widget-line-BwSO-GKu.js"), "./widget-pagination.vue": () => import("./widget-pagination-Buo5s7Xq.js"), "./widget-power.vue": () => import("./widget-power-D8HtIVO2.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-XEY9m1Dj.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-C9j1s6Md.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-B_IA4_De.js"), "./widget-text.vue": () => import("./widget-text-Bp0FEZa1.js"), "./widget-timediff.vue": () => import("./widget-timediff-BlYRlDYp.js") });
|
|
56813
56813
|
const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
|
|
56814
56814
|
const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
|
|
56815
56815
|
if (mKey) {
|
|
@@ -74458,7 +74458,7 @@ const VuePdf = /* @__PURE__ */ defineComponent({
|
|
|
74458
74458
|
}
|
|
74459
74459
|
});
|
|
74460
74460
|
const VueVideoPlayer = defineAsyncComponent(
|
|
74461
|
-
() => import("./VueVideoPlayer-
|
|
74461
|
+
() => import("./VueVideoPlayer-D7buOU3g.js")
|
|
74462
74462
|
);
|
|
74463
74463
|
const _hoisted_1$18 = {
|
|
74464
74464
|
key: 0,
|
|
@@ -76431,7 +76431,6 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76431
76431
|
showRequired,
|
|
76432
76432
|
showDisabled,
|
|
76433
76433
|
options: initialOptions,
|
|
76434
|
-
loadFinished2Options,
|
|
76435
76434
|
newTotalCount,
|
|
76436
76435
|
newQueryDataRef
|
|
76437
76436
|
} = useWidgetStaticAttrs(props2.widget);
|
|
@@ -76519,6 +76518,7 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76519
76518
|
allowClear: true,
|
|
76520
76519
|
defaultActiveFirstOption: false,
|
|
76521
76520
|
showSearch: true,
|
|
76521
|
+
filterOption: false,
|
|
76522
76522
|
notFoundContent: void 0
|
|
76523
76523
|
};
|
|
76524
76524
|
return attr;
|
|
@@ -76670,7 +76670,6 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76670
76670
|
}
|
|
76671
76671
|
);
|
|
76672
76672
|
const handleSearch = (keyword2) => {
|
|
76673
|
-
if (loadFinished2Options) return;
|
|
76674
76673
|
state.data = [];
|
|
76675
76674
|
debounceSearch(keyword2);
|
|
76676
76675
|
};
|
|
@@ -76775,7 +76774,7 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76775
76774
|
};
|
|
76776
76775
|
}
|
|
76777
76776
|
});
|
|
76778
|
-
const AllocatePart = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["__scopeId", "data-v-
|
|
76777
|
+
const AllocatePart = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["__scopeId", "data-v-6c8bafae"]]);
|
|
76779
76778
|
function useAsyncOptions$1({ bindModelKey, modelCategory, code: code2 }) {
|
|
76780
76779
|
async function getRefList(arg = {}) {
|
|
76781
76780
|
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
@@ -76870,10 +76869,11 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76870
76869
|
emit2("update:modelValue", val);
|
|
76871
76870
|
}
|
|
76872
76871
|
});
|
|
76872
|
+
let optionsRequestId = 0;
|
|
76873
76873
|
watch(
|
|
76874
76874
|
() => currentValue.value,
|
|
76875
76875
|
async () => {
|
|
76876
|
-
if (!state.
|
|
76876
|
+
if (!state.data.some((option2) => option2.value === currentValue.value)) {
|
|
76877
76877
|
await checkInitialValue();
|
|
76878
76878
|
}
|
|
76879
76879
|
},
|
|
@@ -76894,7 +76894,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76894
76894
|
allowClear: true,
|
|
76895
76895
|
showSearch: true,
|
|
76896
76896
|
defaultActiveFirstOption: false,
|
|
76897
|
-
filterOption:
|
|
76897
|
+
filterOption: false,
|
|
76898
76898
|
notFoundContent: void 0
|
|
76899
76899
|
};
|
|
76900
76900
|
return attr;
|
|
@@ -76907,54 +76907,55 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76907
76907
|
});
|
|
76908
76908
|
}
|
|
76909
76909
|
onBeforeMount(async () => {
|
|
76910
|
+
const id = ++optionsRequestId;
|
|
76910
76911
|
const { options, finished } = await getOptionsByQuery();
|
|
76912
|
+
if (id !== optionsRequestId) return;
|
|
76911
76913
|
state.loadFinished2Options = finished;
|
|
76912
76914
|
state.initialOptions = options;
|
|
76913
76915
|
state.data = options || [];
|
|
76916
|
+
await checkInitialValue();
|
|
76914
76917
|
});
|
|
76915
|
-
function onFilterOption(input, option2) {
|
|
76916
|
-
if (option2.label) {
|
|
76917
|
-
const options = option2._item;
|
|
76918
|
-
const label = option2?.__LABEL__ || options[searchField];
|
|
76919
|
-
const code2 = options["code_"];
|
|
76920
|
-
const keyword2 = input.toLowerCase();
|
|
76921
|
-
return [label, code2].some(
|
|
76922
|
-
(v) => String(v ?? "").toLowerCase().includes(keyword2)
|
|
76923
|
-
);
|
|
76924
|
-
}
|
|
76925
|
-
return false;
|
|
76926
|
-
}
|
|
76927
76918
|
const handleSearch = (keyword2) => {
|
|
76928
|
-
|
|
76919
|
+
++optionsRequestId;
|
|
76929
76920
|
state.hasSearched = true;
|
|
76930
76921
|
state.fetching = true;
|
|
76931
76922
|
state.data = [];
|
|
76932
76923
|
debounceSearch(keyword2);
|
|
76933
76924
|
};
|
|
76934
76925
|
const debounceSearch = debounce(async (keyword2) => {
|
|
76926
|
+
const id = ++optionsRequestId;
|
|
76927
|
+
const value = keyword2?.trim();
|
|
76935
76928
|
try {
|
|
76936
|
-
|
|
76937
|
-
|
|
76938
|
-
|
|
76939
|
-
|
|
76929
|
+
const queryName = `${searchField}.like`;
|
|
76930
|
+
const codeName = "code_.like";
|
|
76931
|
+
const res = await getOptionsByQuery({
|
|
76932
|
+
...value ? {
|
|
76940
76933
|
exp: `OR(${queryName},${codeName})`,
|
|
76941
|
-
queryData: { [queryName]:
|
|
76942
|
-
|
|
76943
|
-
|
|
76944
|
-
|
|
76945
|
-
|
|
76946
|
-
|
|
76947
|
-
|
|
76948
|
-
|
|
76934
|
+
queryData: { [queryName]: value, [codeName]: value }
|
|
76935
|
+
} : {},
|
|
76936
|
+
pageSize: 30
|
|
76937
|
+
});
|
|
76938
|
+
if (id !== optionsRequestId) return;
|
|
76939
|
+
state.data = res.options ?? [];
|
|
76940
|
+
state.hasSearched = !!value;
|
|
76941
|
+
state.loadFinished2Options = !!res.finished;
|
|
76949
76942
|
} catch (error) {
|
|
76950
76943
|
console.error("请求失败:", error);
|
|
76944
|
+
if (id === optionsRequestId) state.data = [];
|
|
76951
76945
|
} finally {
|
|
76952
|
-
state.fetching = false;
|
|
76946
|
+
if (id === optionsRequestId) state.fetching = false;
|
|
76953
76947
|
}
|
|
76954
76948
|
}, 300);
|
|
76949
|
+
onBeforeUnmount(() => {
|
|
76950
|
+
debounceSearch.cancel();
|
|
76951
|
+
++optionsRequestId;
|
|
76952
|
+
});
|
|
76955
76953
|
async function checkInitialValue() {
|
|
76954
|
+
const id = optionsRequestId;
|
|
76955
|
+
const value = currentValue.value;
|
|
76956
76956
|
if (currentValue.value && !state.initialOptions.some((o) => o.value === currentValue.value)) {
|
|
76957
76957
|
const remoteOption = await getOptionByIds(currentValue.value);
|
|
76958
|
+
if (id !== optionsRequestId || value !== currentValue.value) return;
|
|
76958
76959
|
state.data = [...remoteOption, ...state.initialOptions];
|
|
76959
76960
|
} else {
|
|
76960
76961
|
state.data = state.initialOptions;
|
|
@@ -76988,7 +76989,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76988
76989
|
};
|
|
76989
76990
|
}
|
|
76990
76991
|
});
|
|
76991
|
-
const TraceSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["__scopeId", "data-v-
|
|
76992
|
+
const TraceSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["__scopeId", "data-v-fefa9ebf"]]);
|
|
76992
76993
|
const _hoisted_1$11 = { class: "trace-device__dropdown" };
|
|
76993
76994
|
const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
76994
76995
|
__name: "trace-device",
|
|
@@ -77040,7 +77041,6 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77040
77041
|
showRequired,
|
|
77041
77042
|
showDisabled,
|
|
77042
77043
|
options: initialOptions,
|
|
77043
|
-
loadFinished2Options,
|
|
77044
77044
|
newTotalCount
|
|
77045
77045
|
} = useWidgetStaticAttrs(props2.widget);
|
|
77046
77046
|
const { displayFields, autofillRules, enableAutofill } = props2.widget.props;
|
|
@@ -77082,7 +77082,7 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77082
77082
|
allowClear: true,
|
|
77083
77083
|
defaultActiveFirstOption: false,
|
|
77084
77084
|
showSearch: false,
|
|
77085
|
-
|
|
77085
|
+
filterOption: false,
|
|
77086
77086
|
notFoundContent: void 0
|
|
77087
77087
|
};
|
|
77088
77088
|
return attr;
|
|
@@ -77307,9 +77307,8 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77307
77307
|
selectedDisposed = true;
|
|
77308
77308
|
selectedRequestId++;
|
|
77309
77309
|
});
|
|
77310
|
-
const handleSearch = (
|
|
77311
|
-
|
|
77312
|
-
debounceSearch(keyword2);
|
|
77310
|
+
const handleSearch = () => {
|
|
77311
|
+
debounceSearch();
|
|
77313
77312
|
};
|
|
77314
77313
|
async function getOptionByIds(ids) {
|
|
77315
77314
|
const { data = [] } = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
|
|
@@ -77458,7 +77457,54 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77458
77457
|
};
|
|
77459
77458
|
}
|
|
77460
77459
|
});
|
|
77461
|
-
const TraceDevice = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["__scopeId", "data-v-
|
|
77460
|
+
const TraceDevice = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["__scopeId", "data-v-104db85d"]]);
|
|
77461
|
+
function useReferenceLabel(rowSource, field, dataField = field) {
|
|
77462
|
+
const { formStateStore } = useRuntimeInstanceServices();
|
|
77463
|
+
const labelKey = `${field}_lb_`;
|
|
77464
|
+
let disposed = false;
|
|
77465
|
+
onScopeDispose(() => {
|
|
77466
|
+
disposed = true;
|
|
77467
|
+
});
|
|
77468
|
+
watch(
|
|
77469
|
+
[() => formStateStore.value, rowSource],
|
|
77470
|
+
([store, row], _previous, onCleanup) => {
|
|
77471
|
+
if (!store || store.getObjectPath(row) === void 0) return;
|
|
77472
|
+
let previousValue = row[dataField];
|
|
77473
|
+
let previousLabel = row[labelKey];
|
|
77474
|
+
const labelPath = store.getFieldPath(row, labelKey);
|
|
77475
|
+
onCleanup(
|
|
77476
|
+
store.subscribe(({ paths }) => {
|
|
77477
|
+
const value = row[dataField];
|
|
77478
|
+
const label = row[labelKey];
|
|
77479
|
+
const stale = value !== previousValue && label === previousLabel;
|
|
77480
|
+
previousValue = value;
|
|
77481
|
+
previousLabel = label;
|
|
77482
|
+
const labelProvided = paths.some(
|
|
77483
|
+
(path) => path === labelPath || labelPath.startsWith(`${path}.`)
|
|
77484
|
+
);
|
|
77485
|
+
if (stale && label != null && !labelProvided) {
|
|
77486
|
+
store.setObjectField(row, labelKey, null, "restore");
|
|
77487
|
+
}
|
|
77488
|
+
})
|
|
77489
|
+
);
|
|
77490
|
+
},
|
|
77491
|
+
{ immediate: true, flush: "sync" }
|
|
77492
|
+
);
|
|
77493
|
+
function syncSelectedLabel(option2, source) {
|
|
77494
|
+
const store = formStateStore.value;
|
|
77495
|
+
const row = rowSource();
|
|
77496
|
+
if (disposed || !option2 || option2.value == null || option2.value === "" || !store || store.getObjectPath(row) === void 0 || row[dataField] !== option2.value)
|
|
77497
|
+
return;
|
|
77498
|
+
const current = row[labelKey];
|
|
77499
|
+
if (source === "restore") {
|
|
77500
|
+
if (option2.label == null || option2.label === "") return;
|
|
77501
|
+
if (current != null && current !== "" && current !== "[]") return;
|
|
77502
|
+
}
|
|
77503
|
+
const label = option2.label == null ? null : JSON.stringify([option2.label]);
|
|
77504
|
+
if (current !== label) store.setObjectField(row, labelKey, label, source);
|
|
77505
|
+
}
|
|
77506
|
+
return { syncSelectedLabel };
|
|
77507
|
+
}
|
|
77462
77508
|
const _hoisted_1$10 = { class: "search-wrapper" };
|
|
77463
77509
|
const _hoisted_2$J = {
|
|
77464
77510
|
key: 1,
|
|
@@ -77485,9 +77531,11 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77485
77531
|
};
|
|
77486
77532
|
const props2 = __props;
|
|
77487
77533
|
const { setRowField } = useRuntimeRowState(() => props2.formData);
|
|
77534
|
+
const { formStateStore } = useRuntimeInstanceServices();
|
|
77488
77535
|
const emit2 = __emit;
|
|
77489
77536
|
const {
|
|
77490
77537
|
field,
|
|
77538
|
+
targetFieldId,
|
|
77491
77539
|
modelKey,
|
|
77492
77540
|
refModelKey,
|
|
77493
77541
|
placeholder,
|
|
@@ -77501,6 +77549,9 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77501
77549
|
customLoaderRef
|
|
77502
77550
|
} = useWidgetStaticAttrs(props2.widget);
|
|
77503
77551
|
const runtimeProps = resolveRuntimeQuickSearchProps(props2.widget.props);
|
|
77552
|
+
const dataField = targetFieldId || field;
|
|
77553
|
+
const labelKey = `${field}_lb_`;
|
|
77554
|
+
const { syncSelectedLabel } = useReferenceLabel(() => props2.formData, field, dataField);
|
|
77504
77555
|
const searchField = searchFieldMap[fieldType] || "name_";
|
|
77505
77556
|
const searchVisible = computed(() => {
|
|
77506
77557
|
const { quickSearchField } = runtimeProps;
|
|
@@ -77524,16 +77575,22 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77524
77575
|
});
|
|
77525
77576
|
const state = reactive({
|
|
77526
77577
|
hasSearched: false,
|
|
77527
|
-
data: initialOptions,
|
|
77578
|
+
data: initialOptions ?? [],
|
|
77528
77579
|
fetching: false
|
|
77529
77580
|
});
|
|
77530
|
-
const currentValue = computed(
|
|
77531
|
-
|
|
77532
|
-
|
|
77533
|
-
|
|
77534
|
-
|
|
77535
|
-
|
|
77536
|
-
|
|
77581
|
+
const currentValue = computed(() => props2.value);
|
|
77582
|
+
let optionsRequestId = 0;
|
|
77583
|
+
let lookupSeq = 0;
|
|
77584
|
+
let selectionSeq = 0;
|
|
77585
|
+
let disposed = false;
|
|
77586
|
+
let selectedOption;
|
|
77587
|
+
let selectedOptionRow;
|
|
77588
|
+
onScopeDispose(() => {
|
|
77589
|
+
disposed = true;
|
|
77590
|
+
optionsRequestId++;
|
|
77591
|
+
lookupSeq++;
|
|
77592
|
+
selectionSeq++;
|
|
77593
|
+
debounceSearch.cancel();
|
|
77537
77594
|
});
|
|
77538
77595
|
const selectProps = computed(() => {
|
|
77539
77596
|
let attr = {
|
|
@@ -77541,7 +77598,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77541
77598
|
allowClear: true,
|
|
77542
77599
|
showSearch: searchVisible.value,
|
|
77543
77600
|
defaultActiveFirstOption: false,
|
|
77544
|
-
filterOption:
|
|
77601
|
+
filterOption: false,
|
|
77545
77602
|
notFoundContent: void 0
|
|
77546
77603
|
};
|
|
77547
77604
|
return attr;
|
|
@@ -77558,39 +77615,9 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77558
77615
|
handleSyncVirtualListWidth,
|
|
77559
77616
|
handleShowCustomTooltip
|
|
77560
77617
|
} = useCommonSelect({ searchable: searchVisible.value });
|
|
77561
|
-
function onFilterOption(input, option2) {
|
|
77562
|
-
if (option2.label) {
|
|
77563
|
-
const options = option2._item;
|
|
77564
|
-
const label = option2?.__LABEL__ || options[searchField];
|
|
77565
|
-
const code2 = options["code_"];
|
|
77566
|
-
const keyword2 = input.toLowerCase();
|
|
77567
|
-
return [label, code2].some(
|
|
77568
|
-
(v) => String(v ?? "").toLowerCase().includes(keyword2)
|
|
77569
|
-
);
|
|
77570
|
-
}
|
|
77571
|
-
return false;
|
|
77572
|
-
}
|
|
77573
77618
|
watch(
|
|
77574
|
-
() =>
|
|
77575
|
-
|
|
77576
|
-
if (!loadFinished2Options || customLoaderRef.value) {
|
|
77577
|
-
await checkInitialValue();
|
|
77578
|
-
}
|
|
77579
|
-
if (!isNil(currentValue.value)) {
|
|
77580
|
-
const newLb = JSON.stringify(
|
|
77581
|
-
renderUtils.getSelectOptions({
|
|
77582
|
-
value: currentValue.value,
|
|
77583
|
-
multiple: false,
|
|
77584
|
-
options: state.data,
|
|
77585
|
-
key: "label"
|
|
77586
|
-
}).labels
|
|
77587
|
-
);
|
|
77588
|
-
const oldLb = props2.formData[`${field}_lb_`];
|
|
77589
|
-
if (oldLb !== newLb) {
|
|
77590
|
-
setRowField(`${field}_lb_`, newLb, "restore");
|
|
77591
|
-
}
|
|
77592
|
-
}
|
|
77593
|
-
},
|
|
77619
|
+
[() => props2.value, () => props2.formData, () => customLoaderRef.value],
|
|
77620
|
+
() => checkInitialValue(),
|
|
77594
77621
|
{
|
|
77595
77622
|
immediate: true
|
|
77596
77623
|
}
|
|
@@ -77615,9 +77642,11 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77615
77642
|
queryData
|
|
77616
77643
|
};
|
|
77617
77644
|
};
|
|
77618
|
-
let optionsRequestId = 0;
|
|
77619
77645
|
async function loadOptions({ pageSize: pageSize2, keyword: keyword2 }) {
|
|
77620
77646
|
const id = ++optionsRequestId;
|
|
77647
|
+
const row = props2.formData;
|
|
77648
|
+
const store = formStateStore.value;
|
|
77649
|
+
const loader = customLoaderRef.value;
|
|
77621
77650
|
state.fetching = true;
|
|
77622
77651
|
try {
|
|
77623
77652
|
const { exp, queryData } = buildQueryParams({ keyword: keyword2 });
|
|
@@ -77626,68 +77655,96 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77626
77655
|
fieldKey: field,
|
|
77627
77656
|
refModelKey,
|
|
77628
77657
|
isRdo: false,
|
|
77629
|
-
customLoader:
|
|
77658
|
+
customLoader: loader,
|
|
77630
77659
|
exp,
|
|
77631
77660
|
queryData,
|
|
77632
77661
|
pageSize: pageSize2
|
|
77633
77662
|
});
|
|
77634
|
-
if (id !== optionsRequestId
|
|
77663
|
+
if (disposed || id !== optionsRequestId || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader)
|
|
77664
|
+
return;
|
|
77635
77665
|
state.data = res.options ?? [];
|
|
77636
77666
|
return res.options ?? [];
|
|
77637
77667
|
} catch (error) {
|
|
77638
77668
|
console.error("请求失败:", error);
|
|
77639
|
-
if (id === optionsRequestId)
|
|
77640
|
-
|
|
77669
|
+
if (!disposed && id === optionsRequestId) {
|
|
77670
|
+
state.data = [];
|
|
77671
|
+
return [];
|
|
77672
|
+
}
|
|
77641
77673
|
} finally {
|
|
77642
|
-
if (id === optionsRequestId)
|
|
77643
|
-
|
|
77644
|
-
|
|
77674
|
+
if (!disposed && id === optionsRequestId) {
|
|
77675
|
+
state.fetching = false;
|
|
77676
|
+
if (!keyword2?.trim()) state.hasSearched = false;
|
|
77677
|
+
handleSyncVirtualListWidth();
|
|
77678
|
+
}
|
|
77645
77679
|
}
|
|
77646
77680
|
}
|
|
77647
77681
|
watch(
|
|
77648
77682
|
() => newQueryDataRef.value,
|
|
77649
77683
|
async () => {
|
|
77650
77684
|
if (!newQueryDataRef.value || !customLoaderRef.value) return;
|
|
77651
|
-
|
|
77685
|
+
const options = await loadOptions({ pageSize: 999 });
|
|
77686
|
+
if (options) autoQueryOptions.value = options;
|
|
77652
77687
|
},
|
|
77653
77688
|
{
|
|
77654
77689
|
immediate: true
|
|
77655
77690
|
}
|
|
77656
77691
|
);
|
|
77657
77692
|
const handleSearch = (keyword2) => {
|
|
77658
|
-
if (
|
|
77693
|
+
if (disposed) return;
|
|
77694
|
+
optionsRequestId++;
|
|
77659
77695
|
state.hasSearched = true;
|
|
77660
77696
|
state.fetching = true;
|
|
77661
77697
|
state.data = [];
|
|
77662
77698
|
debounceSearch(keyword2);
|
|
77663
77699
|
};
|
|
77664
77700
|
const debounceSearch = debounce(async (keyword2) => {
|
|
77701
|
+
await loadOptions({ pageSize: 30, keyword: keyword2?.trim() || void 0 });
|
|
77702
|
+
}, 300);
|
|
77703
|
+
watch(dropdownVisible, (visible) => {
|
|
77704
|
+
debounceSearch.cancel();
|
|
77705
|
+
++optionsRequestId;
|
|
77706
|
+
if (disposed || !visible) {
|
|
77707
|
+
state.fetching = false;
|
|
77708
|
+
return;
|
|
77709
|
+
}
|
|
77710
|
+
state.data = [];
|
|
77711
|
+
state.hasSearched = false;
|
|
77712
|
+
void loadOptions({ pageSize: 30 });
|
|
77713
|
+
});
|
|
77714
|
+
async function checkInitialValue() {
|
|
77715
|
+
const seq = ++lookupSeq;
|
|
77716
|
+
const requestId = ++optionsRequestId;
|
|
77717
|
+
const value = props2.value;
|
|
77718
|
+
const row = props2.formData;
|
|
77719
|
+
const store = formStateStore.value;
|
|
77720
|
+
const loader = customLoaderRef.value;
|
|
77665
77721
|
try {
|
|
77666
|
-
|
|
77667
|
-
|
|
77722
|
+
let option2 = !value ? void 0 : selectedOptionRow === row && selectedOption?.value === value ? selectedOption : [..._initialOptions.value, ...state.data].find((item) => item.value === value);
|
|
77723
|
+
if (value && !option2) {
|
|
77724
|
+
option2 = (await getOptionByIds([value], loader)).find((item) => item.value === value);
|
|
77668
77725
|
}
|
|
77669
|
-
|
|
77670
|
-
|
|
77726
|
+
await nextTick();
|
|
77727
|
+
if (disposed || seq !== lookupSeq || props2.value !== value || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader || row[dataField] !== value)
|
|
77728
|
+
return;
|
|
77729
|
+
if (option2) {
|
|
77730
|
+
selectedOption = option2;
|
|
77731
|
+
selectedOptionRow = row;
|
|
77732
|
+
syncSelectedLabel(option2, "restore");
|
|
77733
|
+
}
|
|
77734
|
+
if (requestId === optionsRequestId) {
|
|
77735
|
+
state.data = option2 ? [option2, ..._initialOptions.value.filter((item) => item.value !== value)] : _initialOptions.value;
|
|
77736
|
+
state.hasSearched = false;
|
|
77737
|
+
handleSyncVirtualListWidth();
|
|
77671
77738
|
}
|
|
77672
77739
|
} catch (error) {
|
|
77673
|
-
console.error("
|
|
77740
|
+
console.error("[TraceSelect] Failed to load selected option:", error);
|
|
77674
77741
|
} finally {
|
|
77675
|
-
state.fetching = false;
|
|
77676
|
-
}
|
|
77677
|
-
}, 300);
|
|
77678
|
-
async function checkInitialValue() {
|
|
77679
|
-
if (currentValue.value && !_initialOptions.value.some((o) => o.value === currentValue.value)) {
|
|
77680
|
-
const remoteOption = await getOptionByIds([currentValue.value]);
|
|
77681
|
-
state.data = [...remoteOption, ..._initialOptions.value];
|
|
77682
|
-
} else {
|
|
77683
|
-
state.data = _initialOptions.value;
|
|
77742
|
+
if (!disposed && requestId === optionsRequestId) state.fetching = false;
|
|
77684
77743
|
}
|
|
77685
|
-
state.hasSearched = false;
|
|
77686
|
-
handleSyncVirtualListWidth();
|
|
77687
77744
|
}
|
|
77688
|
-
async function getOptionByIds(ids) {
|
|
77689
|
-
if (
|
|
77690
|
-
const res = await
|
|
77745
|
+
async function getOptionByIds(ids, loader = customLoaderRef.value) {
|
|
77746
|
+
if (loader) {
|
|
77747
|
+
const res = await loader({
|
|
77691
77748
|
mode: "byIds",
|
|
77692
77749
|
modelKey,
|
|
77693
77750
|
fieldKey: field,
|
|
@@ -77719,16 +77776,53 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77719
77776
|
}) ?? [];
|
|
77720
77777
|
}
|
|
77721
77778
|
async function handleChange(v, info) {
|
|
77779
|
+
if (disposed) return false;
|
|
77780
|
+
const value = v == null || v === "" ? null : v;
|
|
77781
|
+
const matchesValue = (actual) => value == null ? actual == null || actual === "" : actual === value;
|
|
77782
|
+
const option2 = info?.value === value ? info : state.data.find((item) => item.value === value);
|
|
77783
|
+
const row = props2.formData;
|
|
77784
|
+
const store = formStateStore.value;
|
|
77785
|
+
if (!store || option2?.disabled) return false;
|
|
77786
|
+
let seq = 0;
|
|
77787
|
+
let accepted = false;
|
|
77788
|
+
store.transaction("user", () => {
|
|
77789
|
+
emit2("update:value", value);
|
|
77790
|
+
accepted = formStateStore.value === store && props2.formData === row && matchesValue(row[dataField]);
|
|
77791
|
+
if (!accepted) return;
|
|
77792
|
+
seq = ++selectionSeq;
|
|
77793
|
+
lookupSeq++;
|
|
77794
|
+
optionsRequestId++;
|
|
77795
|
+
debounceSearch.cancel();
|
|
77796
|
+
state.fetching = false;
|
|
77797
|
+
selectedOptionRow = row;
|
|
77798
|
+
selectedOption = option2;
|
|
77799
|
+
if (value == null) {
|
|
77800
|
+
if (row[labelKey] != null) setRowField(labelKey, null, "user");
|
|
77801
|
+
} else {
|
|
77802
|
+
syncSelectedLabel(option2 ?? { value }, "user");
|
|
77803
|
+
if (option2 && !state.data.some((item) => item.value === value)) {
|
|
77804
|
+
state.data = [option2, ...state.data];
|
|
77805
|
+
}
|
|
77806
|
+
}
|
|
77807
|
+
});
|
|
77808
|
+
if (!accepted) return false;
|
|
77809
|
+
await nextTick();
|
|
77810
|
+
if (disposed || seq !== selectionSeq || formStateStore.value !== store || props2.formData !== row || !matchesValue(props2.value) || !matchesValue(row[dataField]))
|
|
77811
|
+
return false;
|
|
77722
77812
|
if (autofillRules && autofillRules.length !== 0) {
|
|
77723
|
-
|
|
77724
|
-
applyAutofillRules(autofillRules, info?._item, props2.formData, { enabled: enableAutofill });
|
|
77813
|
+
applyAutofillRules(autofillRules, option2?._item, row, { enabled: !!enableAutofill });
|
|
77725
77814
|
}
|
|
77726
|
-
emit2("change",
|
|
77815
|
+
emit2("change", value, option2);
|
|
77727
77816
|
handleCloseDropdown();
|
|
77817
|
+
return true;
|
|
77728
77818
|
}
|
|
77729
77819
|
const { handleSearchScan } = useRuleProps({
|
|
77730
77820
|
props: props2,
|
|
77731
77821
|
selectByCode: async (code2, signal) => {
|
|
77822
|
+
const seq = selectionSeq;
|
|
77823
|
+
const row = props2.formData;
|
|
77824
|
+
const store = formStateStore.value;
|
|
77825
|
+
const value = row[dataField];
|
|
77732
77826
|
const res = await renderUtils.requestRefOptions({
|
|
77733
77827
|
modelKey,
|
|
77734
77828
|
fieldKey: field,
|
|
@@ -77743,20 +77837,20 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77743
77837
|
},
|
|
77744
77838
|
pageSize: 30
|
|
77745
77839
|
});
|
|
77746
|
-
if (signal.aborted
|
|
77840
|
+
if (signal.aborted || disposed || seq !== selectionSeq || props2.formData !== row || formStateStore.value !== store || row[dataField] !== value)
|
|
77841
|
+
return false;
|
|
77747
77842
|
if (!res.options?.[0]) {
|
|
77748
77843
|
message.error($t2("sys.onlineForm.noCorrespondingDataFound"));
|
|
77749
77844
|
return false;
|
|
77750
77845
|
}
|
|
77751
77846
|
const info = res.options[0];
|
|
77752
|
-
|
|
77753
|
-
await handleChange(info.value, info);
|
|
77754
|
-
return true;
|
|
77847
|
+
return handleChange(info.value, info);
|
|
77755
77848
|
}
|
|
77756
77849
|
});
|
|
77757
77850
|
onMounted(async () => {
|
|
77758
77851
|
if (customLoaderRef.value) {
|
|
77759
|
-
|
|
77852
|
+
const options = await loadOptions({ pageSize: 999 });
|
|
77853
|
+
if (options) autoQueryOptions.value = options;
|
|
77760
77854
|
}
|
|
77761
77855
|
});
|
|
77762
77856
|
__expose({
|
|
@@ -77788,9 +77882,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77788
77882
|
},
|
|
77789
77883
|
select: async (option2) => {
|
|
77790
77884
|
if (option2.disabled) return;
|
|
77791
|
-
|
|
77792
|
-
currentValue.value = option2.value;
|
|
77793
|
-
await handleChange(option2.value, option2);
|
|
77885
|
+
return handleChange(option2.value, option2);
|
|
77794
77886
|
},
|
|
77795
77887
|
scan: handleSearchScan,
|
|
77796
77888
|
active: () => dropdownVisible.value && !showDisabled.value
|
|
@@ -77803,7 +77895,6 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77803
77895
|
class: ["cell-trace-select", unref(showRequired) && "is-show-required", __props.realFieldId],
|
|
77804
77896
|
dropdownClassName: "gct-common-select-dropdown vxe-table--ignore-clear",
|
|
77805
77897
|
value: currentValue.value,
|
|
77806
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => currentValue.value = $event),
|
|
77807
77898
|
options: unref(hideOptionsTitle)(state.data),
|
|
77808
77899
|
disabled: unref(showDisabled),
|
|
77809
77900
|
open: unref(dropdownVisible)
|
|
@@ -77838,7 +77929,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77838
77929
|
placeholder: unref($t2)("sys.search"),
|
|
77839
77930
|
onChange: _cache[1] || (_cache[1] = (e) => handleSearch(e.target.value))
|
|
77840
77931
|
}, {
|
|
77841
|
-
prefix: withCtx(() => [..._cache[
|
|
77932
|
+
prefix: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
77842
77933
|
createElementVNode("i", { class: "icon iconfont icon-sousuo1" }, null, -1)
|
|
77843
77934
|
])]),
|
|
77844
77935
|
_: 1
|
|
@@ -77895,15 +77986,19 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
77895
77986
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
77896
77987
|
const props2 = __props;
|
|
77897
77988
|
const emit2 = __emit;
|
|
77989
|
+
const { setRowField } = useRuntimeRowState(() => props2.formData);
|
|
77990
|
+
const { formStateStore } = useRuntimeInstanceServices();
|
|
77898
77991
|
const {
|
|
77899
77992
|
field,
|
|
77993
|
+
targetFieldId,
|
|
77900
77994
|
modelKey,
|
|
77901
77995
|
refModelKey,
|
|
77902
77996
|
placeholder,
|
|
77903
77997
|
showRequired,
|
|
77904
77998
|
showDisabled,
|
|
77905
77999
|
options,
|
|
77906
|
-
newQueryDataRef
|
|
78000
|
+
newQueryDataRef,
|
|
78001
|
+
customLoaderRef
|
|
77907
78002
|
} = useWidgetStaticAttrs(props2.widget);
|
|
77908
78003
|
const { applyAutofillRules } = useAutofill();
|
|
77909
78004
|
const open = ref$1(false);
|
|
@@ -77917,30 +78012,64 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
77917
78012
|
popoverOverlayStyle,
|
|
77918
78013
|
calculateWrapperHeight
|
|
77919
78014
|
} = useWrapperHeight(selectRef);
|
|
78015
|
+
const dataField = targetFieldId || field;
|
|
78016
|
+
const labelKey = `${field}_lb_`;
|
|
78017
|
+
const { syncSelectedLabel } = useReferenceLabel(() => props2.formData, field, dataField);
|
|
78018
|
+
const selectedOptionRow = shallowRef();
|
|
77920
78019
|
const selectedOption = ref$1();
|
|
77921
78020
|
const selectedOptions = computed(() => {
|
|
77922
|
-
const selected = selectedOption.value?.value === props2.value ? selectedOption.value : options?.find((item) => item.value === props2.value);
|
|
78021
|
+
const selected = selectedOptionRow.value === props2.formData && selectedOption.value?.value === props2.value ? selectedOption.value : options?.find((item) => item.value === props2.value);
|
|
77923
78022
|
return selected ? [{ value: selected.value, label: selected.label }] : [];
|
|
77924
78023
|
});
|
|
77925
78024
|
let lookupSeq = 0;
|
|
78025
|
+
let selectionSeq = 0;
|
|
78026
|
+
let disposed = false;
|
|
78027
|
+
onScopeDispose(() => {
|
|
78028
|
+
disposed = true;
|
|
78029
|
+
lookupSeq++;
|
|
78030
|
+
selectionSeq++;
|
|
78031
|
+
});
|
|
77926
78032
|
watch(
|
|
77927
|
-
() =>
|
|
77928
|
-
|
|
78033
|
+
[() => selectedOptions.value[0], () => props2.formData, () => props2.formData[labelKey]],
|
|
78034
|
+
([option2]) => syncSelectedLabel(option2, "restore"),
|
|
78035
|
+
{ immediate: true }
|
|
78036
|
+
);
|
|
78037
|
+
watch(
|
|
78038
|
+
[() => props2.value, () => props2.formData],
|
|
78039
|
+
async ([value, row]) => {
|
|
77929
78040
|
const seq = ++lookupSeq;
|
|
78041
|
+
const store = formStateStore.value;
|
|
77930
78042
|
if (!value || selectedOptions.value.length) return;
|
|
77931
78043
|
try {
|
|
77932
|
-
|
|
77933
|
-
|
|
77934
|
-
|
|
77935
|
-
|
|
77936
|
-
|
|
77937
|
-
|
|
77938
|
-
|
|
77939
|
-
|
|
77940
|
-
|
|
77941
|
-
|
|
77942
|
-
|
|
77943
|
-
};
|
|
78044
|
+
let option2;
|
|
78045
|
+
const loader = customLoaderRef.value;
|
|
78046
|
+
if (loader) {
|
|
78047
|
+
const res = await loader({
|
|
78048
|
+
mode: "byIds",
|
|
78049
|
+
modelKey,
|
|
78050
|
+
fieldKey: field,
|
|
78051
|
+
refModelKey,
|
|
78052
|
+
ids: [value],
|
|
78053
|
+
isRdo: false,
|
|
78054
|
+
queryData: newQueryDataRef.value
|
|
78055
|
+
});
|
|
78056
|
+
option2 = normalizeRefLoaderResult(res, { isRdo: false }).options.find(
|
|
78057
|
+
(item) => item.value === value
|
|
78058
|
+
);
|
|
78059
|
+
} else {
|
|
78060
|
+
const res = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
|
|
78061
|
+
{ modelCategory: EntityModelCategoryEnum.ENTITY },
|
|
78062
|
+
{ fieldKey: field, modelKey, refModelKey, ids: [value], includeDeleted: true }
|
|
78063
|
+
);
|
|
78064
|
+
const record = res?.data?.find((item) => (item.id_ || item.id) === value);
|
|
78065
|
+
if (record) option2 = { value, label: record.__LABEL__, _item: record };
|
|
78066
|
+
}
|
|
78067
|
+
await nextTick();
|
|
78068
|
+
if (disposed || seq !== lookupSeq || props2.value !== value || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader || row[dataField] !== value)
|
|
78069
|
+
return;
|
|
78070
|
+
if (option2) {
|
|
78071
|
+
selectedOptionRow.value = row;
|
|
78072
|
+
selectedOption.value = option2;
|
|
77944
78073
|
}
|
|
77945
78074
|
} catch (error) {
|
|
77946
78075
|
console.error("[TraceRefTableSelect] Failed to load selected option:", error);
|
|
@@ -77954,21 +78083,51 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
77954
78083
|
}
|
|
77955
78084
|
async function onSelect(row) {
|
|
77956
78085
|
const option2 = row?._option;
|
|
77957
|
-
if (!option2) return;
|
|
77958
|
-
|
|
77959
|
-
|
|
78086
|
+
if (!option2 || option2.value == null || option2.value === "" || disposed) return;
|
|
78087
|
+
let seq = 0;
|
|
78088
|
+
const targetRow = props2.formData;
|
|
78089
|
+
const store = formStateStore.value;
|
|
78090
|
+
if (!store) return;
|
|
78091
|
+
let accepted = false;
|
|
78092
|
+
store.transaction("user", () => {
|
|
78093
|
+
emit2("update:value", option2.value);
|
|
78094
|
+
accepted = formStateStore.value === store && props2.formData === targetRow && targetRow[dataField] === option2.value;
|
|
78095
|
+
if (!accepted) return;
|
|
78096
|
+
seq = ++selectionSeq;
|
|
78097
|
+
lookupSeq++;
|
|
78098
|
+
selectedOptionRow.value = targetRow;
|
|
78099
|
+
selectedOption.value = option2;
|
|
78100
|
+
syncSelectedLabel(option2, "user");
|
|
78101
|
+
});
|
|
78102
|
+
if (!accepted) return;
|
|
78103
|
+
await nextTick();
|
|
78104
|
+
if (disposed || seq !== selectionSeq || formStateStore.value !== store || props2.formData !== targetRow || props2.value !== option2.value || targetRow[dataField] !== option2.value)
|
|
78105
|
+
return;
|
|
77960
78106
|
if (props2.widget.props.autofillRules?.length) {
|
|
77961
|
-
await nextTick();
|
|
77962
78107
|
applyAutofillRules(props2.widget.props.autofillRules, option2._item, props2.formData, {
|
|
77963
|
-
enabled: props2.widget.props.enableAutofill
|
|
78108
|
+
enabled: !!props2.widget.props.enableAutofill
|
|
77964
78109
|
});
|
|
77965
78110
|
}
|
|
77966
78111
|
emit2("change", option2.value, option2);
|
|
77967
78112
|
open.value = false;
|
|
77968
78113
|
}
|
|
77969
78114
|
function onClear() {
|
|
77970
|
-
|
|
77971
|
-
|
|
78115
|
+
if (disposed) return;
|
|
78116
|
+
const targetRow = props2.formData;
|
|
78117
|
+
const store = formStateStore.value;
|
|
78118
|
+
if (!store) return;
|
|
78119
|
+
let accepted = false;
|
|
78120
|
+
store.transaction("user", () => {
|
|
78121
|
+
emit2("update:value", null);
|
|
78122
|
+
accepted = formStateStore.value === store && props2.formData === targetRow && (targetRow[dataField] == null || targetRow[dataField] === "");
|
|
78123
|
+
if (!accepted) return;
|
|
78124
|
+
selectionSeq++;
|
|
78125
|
+
lookupSeq++;
|
|
78126
|
+
selectedOptionRow.value = void 0;
|
|
78127
|
+
selectedOption.value = void 0;
|
|
78128
|
+
if (targetRow[labelKey] != null) setRowField(labelKey, null, "user");
|
|
78129
|
+
});
|
|
78130
|
+
if (!accepted) return;
|
|
77972
78131
|
emit2("change", null);
|
|
77973
78132
|
open.value = false;
|
|
77974
78133
|
}
|
|
@@ -95977,8 +96136,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
95977
96136
|
printTask = (async () => {
|
|
95978
96137
|
if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
|
|
95979
96138
|
await nextTick();
|
|
95980
|
-
const { printRuntimeInstance } = await import("./print-runtime-instance-
|
|
95981
|
-
const { default: renderer } = await import("./print-snapshot-renderer-
|
|
96139
|
+
const { printRuntimeInstance } = await import("./print-runtime-instance-19OA8Ubq.js");
|
|
96140
|
+
const { default: renderer } = await import("./print-snapshot-renderer-D5OUO3Sx.js");
|
|
95982
96141
|
if (abort.signal.aborted) throw new Error("打印已取消");
|
|
95983
96142
|
printRenderer.value = markRaw(renderer);
|
|
95984
96143
|
await printRuntimeInstance(
|