@gct-paas/excel 0.1.40-beta.25 → 0.1.40-beta.27
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-B0s9C7u7.js} +2 -2
- package/dist/{VueVideoPlayer-CB5VHlj2.js → VueVideoPlayer-BCGJs86_.js} +2 -2
- package/dist/{align-editor-ssy7gJsD.js → align-editor-DBWdbAV_.js} +1 -1
- package/dist/{barcode-design-Mjrep3H_.js → barcode-design-YdLnj4EK.js} +2 -2
- package/dist/base/index.es.js +189 -193
- package/dist/{diagonal-design-CFBp2E-O.js → diagonal-design-vCovyGwZ.js} +2 -2
- package/dist/{dynamic-table-action-BKX0Oeoy.js → dynamic-table-action-9oc6dkLz.js} +144 -215
- 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-CMil2DLD.js} +751 -320
- package/dist/{edit.utils-CXmmCnxE-CwPcGg-f.js → edit.utils-CXmmCnxE-BvWz-8bv.js} +1 -1
- package/dist/excel.css +12 -12
- package/dist/{exceljs.min-eo-E80If.js → exceljs.min-Dp6PAQE9.js} +2 -2
- package/dist/{font-editor-CAZX85G4.js → font-editor-gcStnuue.js} +3 -3
- package/dist/{image-design-g9R_z-IY.js → image-design-DJ3VRU2t.js} +2 -2
- package/dist/{index--7My1yo5.js → index-2mRh7iFw.js} +350 -192
- package/dist/{index-BBq6DSLI.js → index-7WwJSlNN.js} +2 -2
- package/dist/{index-DEMinegB.js → index-AmKjgww5.js} +1 -1
- package/dist/{index--RhdrCZV.js → index-Avrz1-1F.js} +2 -2
- package/dist/{index-C6oivLbu.js → index-B5AUi6i3.js} +1 -1
- package/dist/{index-DifKRFVy.js → index-BCeR77y-.js} +2 -2
- package/dist/{index-D3cPbNne.js → index-BHTcJLrz.js} +1 -1
- package/dist/{index-DzT1SZ9z.js → index-BYf9Fudx.js} +3 -3
- package/dist/{index-CoKpbR25.js → index-BaCa0TgP.js} +2 -2
- package/dist/{index-BycDrbO0.js → index-BsmHcJs3.js} +2 -2
- package/dist/{index-D-WSp3EA.js → index-CFTsMiRR.js} +1 -1
- package/dist/{index-CpQiCEe7.js → index-CFvLIeFl.js} +1 -1
- package/dist/{index-B9hIqELW.js → index-CLLc5Ob2.js} +1 -1
- package/dist/{index-PUFY8idd.js → index-COOampHb.js} +1 -1
- package/dist/{index-Cpn8pcne.js → index-Ck06j4gn.js} +2 -2
- package/dist/{index-NH1JcF4s.js → index-Cl-QMM1R.js} +2 -2
- package/dist/{index-0S-kw2HL.js → index-CtEUzXVk.js} +2 -2
- package/dist/{index-iYrfBvkL.js → index-CzUGIYOv.js} +2 -2
- package/dist/{index-0pYUJqWX.js → index-D3ZQLjrQ.js} +2 -2
- package/dist/{index-BoGFEaqo.js → index-D6eANpFX.js} +2 -2
- package/dist/{index-NulsmEum.js → index-D90UOUAU.js} +3 -3
- package/dist/{index-DozFqpk2.js → index-D9j3S6qI.js} +1 -1
- package/dist/{index-SrAjB-wq.js → index-DIodi5gH.js} +4 -4
- package/dist/{index-8WHvZyAx.js → index-DPP4WDPc.js} +2 -2
- package/dist/{index-hNdJpzws.js → index-DXqsUrWV.js} +3 -3
- package/dist/{index-BLv5fzzG.js → index-DnsZjDDh.js} +2 -2
- package/dist/{index-Cmr9DRpz.js → index-Dzl5Ukft.js} +1 -1
- package/dist/{index-BMlGh5m0.js → index-Mg-zrcwn.js} +2 -2
- package/dist/{index-jTfc0zM7.js → index-agcLaGBj.js} +2 -2
- package/dist/{index-BLqJtzs6.js → index-cOcBl2Ga.js} +2 -2
- package/dist/{index-DgEDg0_J.js → index-gWEP20xe.js} +3 -3
- package/dist/{index-fcxbS2U1.js → index-iYYd2oH1.js} +3 -3
- package/dist/{index-9Mi1Iiw8.js → index-sWtzbaDv.js} +3 -3
- package/dist/{index-YteSvWxT.js → index-y3jt4BZe.js} +1 -1
- 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-B79l8Vcj.js} +1 -1
- package/dist/{pagination-design-DelDPMV6.js → pagination-design-BZZcBbIF.js} +2 -2
- package/dist/paper-widget-design-Coh8v5mV.js +4 -0
- package/dist/{print-runtime-instance-NcHBwPwX.js → print-runtime-instance-CV0WcU-Z.js} +1 -1
- package/dist/{print-snapshot-renderer-Dw-xzoDx.js → print-snapshot-renderer-hHd4ThE0.js} +3 -3
- package/dist/{qrcode-design-DAYfoLN-.js → qrcode-design-C8d7cE3K.js} +1 -1
- package/dist/{revo-grid.entry-Bh8ebL13.js → revo-grid.entry-DSnc_nH1.js} +1 -1
- package/dist/{revogr-attribution_7.entry-CsJaMH68.js → revogr-attribution_7.entry-D67ci-yw.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-DgmZ8Pc0.js → revogr-clipboard_3.entry-C9h0dhAb.js} +2 -2
- package/dist/{revogr-data_4.entry-CPW7BILy.js → revogr-data_4.entry-DuuRVRex.js} +2 -2
- package/dist/{revogr-filter-panel.entry-BpIcSbuR.js → revogr-filter-panel.entry-BeIaYORN.js} +1 -1
- package/dist/seal-design-DfKie-Qg.js +4 -0
- package/dist/{serialnumber-design-C92sT5qW.js → serialnumber-design-wyJY14Fx.js} +1 -1
- package/dist/shared/index.es.js +25 -25
- package/dist/{single-field-drop-BcuqHgNO.js → single-field-drop-CA6EtCtR.js} +2 -2
- package/dist/{size-editor-JdHGylGx.js → size-editor-lAn0ECzs.js} +1 -1
- package/dist/src/nocode-base/src/core/factory/sub-table-factory.d.ts +2 -0
- package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +3 -0
- package/dist/src/nocode-base/src/hooks/useRenderPageFactory.d.ts +3 -0
- package/dist/src/nocode-base/src/interface/render.d.ts +2 -1
- package/dist/src/nocode-base/src/interface/transform.d.ts +8 -0
- package/dist/src/nocode-base/src/runtime/designer-default-values.d.ts +23 -0
- package/dist/src/nocode-base/src/runtime/runtime-default-value-validation.d.ts +23 -0
- package/dist/src/nocode-base/src/runtime/runtime-instance-registry.d.ts +3 -0
- package/dist/src/nocode-base/src/types/common/base.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/useReferenceLabel.d.ts +4 -0
- package/dist/src/shared/enum/field-type.d.ts +1 -1
- package/dist/{sub-table-factory-v9spfnMN.js → sub-table-factory-CwbQEPJq.js} +14 -2
- package/dist/{text-design-BjhwgpUv.js → text-design-Bv4PfeOW.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-DQh0IPeE.js → throttle-Cpk1LoGk-BaXaGrUw.js} +1 -1
- package/dist/{timediff-design-D84T_Isx.js → timediff-design-CxT_O6R8.js} +1 -1
- package/dist/{trace-like-wrapper-DHb2jlre.js → trace-like-wrapper-CGe5K_FN.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-CQTuzWX2.js} +2 -2
- package/dist/{widget-barcode-CNB9Sqle.js → widget-barcode-C83yiwNl.js} +4 -4
- package/dist/{widget-diagonal-6ZDcxCwX.js → widget-diagonal-C-zD-MLy.js} +3 -3
- package/dist/{widget-image-D--Ynjra.js → widget-image-DIcnWHn7.js} +4 -4
- package/dist/{widget-line-CpwqEFD9.js → widget-line-BnMezWy-.js} +2 -2
- package/dist/{widget-pagination-BN3wWsKq.js → widget-pagination-QWM1Nmlo.js} +5 -5
- package/dist/{widget-power-Cn61OOWe.js → widget-power-DnqxPUmW.js} +3 -3
- package/dist/{widget-qrcode-BgUCM01T.js → widget-qrcode-PBnm6ehD.js} +3 -3
- package/dist/{widget-rangelimit-CnNNwIo0.js → widget-rangelimit-CDyYKHeg.js} +3 -3
- package/dist/{widget-serialnumber-gZih5585.js → widget-serialnumber-BwS-Ac9h.js} +1 -1
- package/dist/{widget-text--iXnC5zl.js → widget-text-COW-IQ1P.js} +5 -5
- package/dist/{widget-timediff-DN-FCR7T.js → widget-timediff-RpQcMPpb.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
|
|
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 getBusinessFieldKey, N as FieldTypeToJs, Q as CreateType, R as uuid2, U as useModal, V as requireEstraverse, W as commonjsGlobal, X as getDefaultExportFromCjs, Y as PaperWidgeValueType, Z as onlineFormMasterModelTypeEnum, _ as WAREHOUSE_FIELD_TYPES, $ as UniqueConstraintType, a0 as FieldDefaultValueTypeEnum, a1 as FormTypeEnum, a2 as mitt, a3 as isDateObjectField, a4 as PlatformEnum, a5 as LabelPosition, a6 as BooleanShowMode, a7 as SignatureImageDirectionEnum, a8 as FallbackSignTypeEnum, a9 as SignatureNumberTypeEnum, aa as SignatureTimeTypeEnum, ab as SignShowTypeEnum, ac as SignatureTypeEnum, ad as useNamespace, ae as _export_sfc, af as normalizeFieldType, ag as PaperSizeMap, ah as getFieldMain, ai as buildUUID, aj as FieldIconMap, ak as BigNumber, al as FieldSysVarDefaultValueEnum, am as CellWidgetViewState, an as DiagonalDirection, ao as WidgetImageSizeMode, ap as LineDirection, aq as TimeDiffFormat, ar as DiagonalVertex, as as resolveDiagonalVertex, at as getThemeColorByTableType, au as ViewTypeEnum, av as isDynamicSubTablePanelType, aw as isFixedSubTablePanelType, ax as ExpressionModeEnum, ay as ReturnTypeEnum, az as ExpressionTabEnum, aA as RangeValidateMode, aB as RangeCompareOp, aC as getExclusiveBusinessTypeTokens, aD as getSubTableTypeByRefModelType, aE as findFieldMain, aF as DecimalDisplayMode$1, aG as ImageDisplayModeEnum, aH as FormDesignEnum, aI as BASIC_FIELD_TYPES, aJ as buildDeviceFilterQuery, aK as refUtils, aL as getAllTableProfiles, aM as getAugmentedNamespace, aN as transformUtils, aO as EmptySymbol, aP as ASSIGNMENTSTRATEGY_ENUM, aQ as Dependency_ENUM, aR as EntityModelCategoryEnum, aS as resolveLotDisplayLabel, aT as CheckDsTypeEnum, aU as DeviceLink, aV as DeviceParamsTypeTitle, aW as AITooltips, aX as DenoiseMethodOptions, aY as BinarizeMethodOptions, aZ as JoinModelTypeEum, a_ as sqlUtils, a$ as DateFormat, b0 as withRequestCache, b1 as LOT_CONTAINER_ROLE, b2 as buildLotSnListQuery, b3 as renderUtils, b4 as resolveLotRecordByValue, b5 as materialCheck, b6 as getLotLockedReason, b7 as validateReinspectionDate, b8 as buildMaterialLotListQuery, b9 as ProductionIdentificationTypeEnum, ba as BindCmpStyleEnum, bb as getParseRuleInfo, bc as getParseRuleValue, bd as normalizeRefLoaderResult, be as STOCKTAKE_DIMENSION, bf as F, bg as resolveStocktakeSelectApi, bh as normalizeProductionContainerOptions, bi as buildProductionLotListQuery, bj as buildInspectionLotListQuery, bk as DEVICE_GROUP_QUERY_KEY, bl as parseRuntimeFieldPath, bm as getRowId, bn as findRuntimeTableRow, bo as RenderModeEnum, bp as findRuntimeParentRow, bq as useOnlineFormTransformField2Component, br as FormulaRuleFieldKeyEnum, bs as formulaRuleFieldDict, bt as resolveDesignPanelFeatures, bu as BIZ_TABLE_CONFIG_SEED_TYPES, bv as STOCKTAKE_DIMENSION_OPTIONS, bw as isRepeatingSubTablePanelType, bx as uuid2$1 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-CMil2DLD.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,
|
|
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, d as MULTI_SHEET_SCHEMA_VERSION, n as normalizeGridColumnWidth, g as getParseFormulaVarInfos, e as createRuntimeDocumentV2, f as clampSealPosition, h as normalizeSealDiameter, i as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, j as isCellAutoLineBreak, B as BorderTD, u as useFormModel, k as useFormTmplConfig, l as findFieldProfile, m as normalizeHistoricalBusinessRow, o as DeviceLinkTmplUtil, p as normalizeAIOcrTmpl, q as useWidgetStaticAttrs, r as useRuntimeInstanceServices, s as setSelectValidatorId, t as setSelectAnnotationId, v as useRuntimeRowState, w as getObjectBomMaterialLotQuery, x as buildObjectLotExtraQuery, y as resolveObjectFieldKeys, F as FormModelController, z as MaterialConsumptionPatternEnum, A as validateObjectBomForScan, C as resolveObjectBomEntry, E as runWithFillProduct, G as useNocodeFormWidget, H as applyConsumeObjectTraceChange, I as getObjectBomProductQuery, J as EMPTY_PRODUCT_VERSION_ID, K as normalizeHistoricalAutofillRow, L as readSealValue, N as isSealStamped, O as stampSealValue, P as isValidSealValue, Q as clearSealValue, R as NCB_PROVIDE, S as calculateFormula, T as useStyles, U as useDependency, V as useFieldPresentation, W as useRuntimeEditorFlusher, X as RuntimeFormStateStore, Y as createRuntimeInstanceContext, Z as RuntimeInstanceRegistry, _ as ScanParamType, $ as RequiredQtyCalcRule, a0 as MBRender, a1 as MCRender, a2 as moveSealValue, a3 as DocumentPaper, a4 as DynamicTableAction, a5 as _sfc_main$6C } from "./dynamic-table-action-9oc6dkLz.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-B79l8Vcj.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-Dp6PAQE9.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-gWEP20xe.js").then((m) => m["default"]),
|
|
2391
|
+
"./_field_/datepicker/index.ts": () => import("./index-Avrz1-1F.js").then((m) => m["default"]),
|
|
2392
|
+
"./_field_/datetimepicker/index.ts": () => import("./index-CzUGIYOv.js").then((m) => m["default"]),
|
|
2393
|
+
"./_field_/department/index.ts": () => import("./index-7WwJSlNN.js").then((m) => m["default"]),
|
|
2394
|
+
"./_field_/enum-select/index.ts": () => import("./index-DXqsUrWV.js").then((m) => m["default"]),
|
|
2395
|
+
"./_field_/input/index.ts": () => import("./index-CtEUzXVk.js").then((m) => m["default"]),
|
|
2396
|
+
"./_field_/inputdouble/index.ts": () => import("./index-D6eANpFX.js").then((m) => m["default"]),
|
|
2397
|
+
"./_field_/inputnumber/index.ts": () => import("./index-BCeR77y-.js").then((m) => m["default"]),
|
|
2398
|
+
"./_field_/rdo-select/index.ts": () => import("./index-D90UOUAU.js").then((m) => m["default"]),
|
|
2399
|
+
"./_field_/seal/index.ts": () => import("./index-iYYd2oH1.js").then((m) => m["default"]),
|
|
2400
|
+
"./_field_/select/index.ts": () => import("./index-BYf9Fudx.js").then((m) => m["default"]),
|
|
2401
|
+
"./_field_/sign/index.ts": () => import("./index-Ck06j4gn.js").then((m) => m["default"]),
|
|
2402
|
+
"./_field_/switch/index.ts": () => import("./index-DIodi5gH.js").then((m) => m["default"]),
|
|
2403
|
+
"./_field_/textarea/index.ts": () => import("./index-Cl-QMM1R.js").then((m) => m["default"]),
|
|
2404
|
+
"./_field_/timepicker/index.ts": () => import("./index-agcLaGBj.js").then((m) => m["default"]),
|
|
2405
|
+
"./_field_/upload-file/index.ts": () => import("./index-DPP4WDPc.js").then((m) => m["default"]),
|
|
2406
|
+
"./_field_/upload-image/index.ts": () => import("./index-DnsZjDDh.js").then((m) => m["default"]),
|
|
2407
|
+
"./_field_/userpicker/index.ts": () => import("./index-cOcBl2Ga.js").then((m) => m["default"]),
|
|
2408
|
+
"./_widget_/barcode/index.ts": () => import("./index-BHTcJLrz.js").then((m) => m["default"]),
|
|
2409
|
+
"./_widget_/combine-fields/index.ts": () => import("./index-D3ZQLjrQ.js").then((m) => m["default"]),
|
|
2410
|
+
"./_widget_/diagonal/index.ts": () => import("./index-BsmHcJs3.js").then((m) => m["default"]),
|
|
2411
|
+
"./_widget_/dyn-value/index.ts": () => import("./index-BaCa0TgP.js").then((m) => m["default"]),
|
|
2412
|
+
"./_widget_/image/index.ts": () => import("./index-CFTsMiRR.js").then((m) => m["default"]),
|
|
2413
|
+
"./_widget_/line/index.ts": () => import("./index-B5AUi6i3.js").then((m) => m["default"]),
|
|
2414
|
+
"./_widget_/power/index.ts": () => import("./index-D9j3S6qI.js").then((m) => m["default"]),
|
|
2415
|
+
"./_widget_/qrcode/index.ts": () => import("./index-AmKjgww5.js").then((m) => m["default"]),
|
|
2416
|
+
"./_widget_/ro/index.ts": () => import("./index-CLLc5Ob2.js").then((m) => m["default"]),
|
|
2417
|
+
"./_widget_/serialnumber/index.ts": () => import("./index-y3jt4BZe.js").then((m) => m["default"]),
|
|
2418
|
+
"./_widget_/sub-table/index.ts": () => import("./index-CFvLIeFl.js").then((m) => m["default"]),
|
|
2419
|
+
"./_widget_/timediff/index.ts": () => import("./index-COOampHb.js").then((m) => m["default"]),
|
|
2420
|
+
"./paper/index.ts": () => import("./index-Dzl5Ukft.js").then((m) => m["default"]),
|
|
2421
|
+
"./td/index.ts": () => import("./index-sWtzbaDv.js").then((m) => m["default"]),
|
|
2422
|
+
"./tr/index.ts": () => import("./index-Mg-zrcwn.js").then((m) => m["default"])
|
|
2423
2423
|
});
|
|
2424
2424
|
return modules;
|
|
2425
2425
|
}
|
|
@@ -9357,7 +9357,6 @@ const uploadType = {
|
|
|
9357
9357
|
};
|
|
9358
9358
|
function handleFrontFieldType(data) {
|
|
9359
9359
|
if (data.type === FIELD_TYPE.SEAL) {
|
|
9360
|
-
data.type = FIELD_TYPE.TEXT;
|
|
9361
9360
|
data.bizType = FIELD_TYPE.SEAL;
|
|
9362
9361
|
}
|
|
9363
9362
|
if (data.type === FIELD_TYPE.WAREHOUSE_IN_OUT) {
|
|
@@ -13322,7 +13321,7 @@ function useSpreadSheet() {
|
|
|
13322
13321
|
);
|
|
13323
13322
|
const seal = {
|
|
13324
13323
|
id: uuid2(16),
|
|
13325
|
-
fieldMeta: { ...data
|
|
13324
|
+
fieldMeta: { ...data },
|
|
13326
13325
|
fieldWidget,
|
|
13327
13326
|
layout
|
|
13328
13327
|
};
|
|
@@ -16190,7 +16189,7 @@ function asyncImportWidgetConfigList() {
|
|
|
16190
16189
|
return widgetConfigList;
|
|
16191
16190
|
}
|
|
16192
16191
|
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-
|
|
16192
|
+
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-DfKie-Qg.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-YdLnj4EK.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-vCovyGwZ.js"), "./image/image-design.vue": () => import("./image-design-DJ3VRU2t.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-BZZcBbIF.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-Coh8v5mV.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-C8d7cE3K.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-wyJY14Fx.js"), "./text/text-design.vue": () => import("./text-design-Bv4PfeOW.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-CxT_O6R8.js") });
|
|
16194
16193
|
const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
|
|
16195
16194
|
const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
|
|
16196
16195
|
if (mKey) {
|
|
@@ -22952,7 +22951,7 @@ const _sfc_main$5S = /* @__PURE__ */ defineComponent({
|
|
|
22952
22951
|
refId: __props.id
|
|
22953
22952
|
}))
|
|
22954
22953
|
}, [
|
|
22955
|
-
createTextVNode(toDisplayString$1(_ctx.$t("sys.onlineForm.
|
|
22954
|
+
createTextVNode(toDisplayString$1(_ctx.$t("sys.onlineForm.subTableType.CHECK")) + " ", 1),
|
|
22956
22955
|
createVNode(_component_ArrowUpOutlined, {
|
|
22957
22956
|
class: "arrow",
|
|
22958
22957
|
onClick: _cache[0] || (_cache[0] = (e) => {
|
|
@@ -22970,7 +22969,7 @@ const _sfc_main$5S = /* @__PURE__ */ defineComponent({
|
|
|
22970
22969
|
};
|
|
22971
22970
|
}
|
|
22972
22971
|
});
|
|
22973
|
-
const SpreadSheetCheckTr = /* @__PURE__ */ _export_sfc(_sfc_main$5S, [["__scopeId", "data-v-
|
|
22972
|
+
const SpreadSheetCheckTr = /* @__PURE__ */ _export_sfc(_sfc_main$5S, [["__scopeId", "data-v-4309310b"]]);
|
|
22974
22973
|
const _sfc_main$5R = /* @__PURE__ */ defineComponent({
|
|
22975
22974
|
__name: "sheet-data-group-ref",
|
|
22976
22975
|
props: {
|
|
@@ -24336,7 +24335,7 @@ const _sfc_main$5H = /* @__PURE__ */ defineComponent({
|
|
|
24336
24335
|
addField(field);
|
|
24337
24336
|
addFloatingSeal({
|
|
24338
24337
|
field: field.key,
|
|
24339
|
-
fieldType: FIELD_TYPE.
|
|
24338
|
+
fieldType: FIELD_TYPE.SEAL,
|
|
24340
24339
|
bizType: FIELD_TYPE.SEAL,
|
|
24341
24340
|
model: field.modelKey,
|
|
24342
24341
|
fieldLink: field.key,
|
|
@@ -24377,7 +24376,7 @@ const _sfc_main$5H = /* @__PURE__ */ defineComponent({
|
|
|
24377
24376
|
};
|
|
24378
24377
|
}
|
|
24379
24378
|
});
|
|
24380
|
-
const SpreadSheetPaper = /* @__PURE__ */ _export_sfc(_sfc_main$5H, [["__scopeId", "data-v-
|
|
24379
|
+
const SpreadSheetPaper = /* @__PURE__ */ _export_sfc(_sfc_main$5H, [["__scopeId", "data-v-acc024c7"]]);
|
|
24381
24380
|
const _sfc_main$5G = defineComponent({
|
|
24382
24381
|
name: "SvgIcon",
|
|
24383
24382
|
props: {
|
|
@@ -56809,7 +56808,7 @@ const _sfc_main$3v = /* @__PURE__ */ defineComponent({
|
|
|
56809
56808
|
}
|
|
56810
56809
|
});
|
|
56811
56810
|
function asyncImportWidgetProp() {
|
|
56812
|
-
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-
|
|
56811
|
+
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-C83yiwNl.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-C-zD-MLy.js"), "./widget-image.vue": () => import("./widget-image-DIcnWHn7.js"), "./widget-line.vue": () => import("./widget-line-BnMezWy-.js"), "./widget-pagination.vue": () => import("./widget-pagination-QWM1Nmlo.js"), "./widget-power.vue": () => import("./widget-power-DnqxPUmW.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-PBnm6ehD.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-CDyYKHeg.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-BwS-Ac9h.js"), "./widget-text.vue": () => import("./widget-text-COW-IQ1P.js"), "./widget-timediff.vue": () => import("./widget-timediff-RpQcMPpb.js") });
|
|
56813
56812
|
const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
|
|
56814
56813
|
const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
|
|
56815
56814
|
if (mKey) {
|
|
@@ -74458,7 +74457,7 @@ const VuePdf = /* @__PURE__ */ defineComponent({
|
|
|
74458
74457
|
}
|
|
74459
74458
|
});
|
|
74460
74459
|
const VueVideoPlayer = defineAsyncComponent(
|
|
74461
|
-
() => import("./VueVideoPlayer-
|
|
74460
|
+
() => import("./VueVideoPlayer-BCGJs86_.js")
|
|
74462
74461
|
);
|
|
74463
74462
|
const _hoisted_1$18 = {
|
|
74464
74463
|
key: 0,
|
|
@@ -76431,7 +76430,6 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76431
76430
|
showRequired,
|
|
76432
76431
|
showDisabled,
|
|
76433
76432
|
options: initialOptions,
|
|
76434
|
-
loadFinished2Options,
|
|
76435
76433
|
newTotalCount,
|
|
76436
76434
|
newQueryDataRef
|
|
76437
76435
|
} = useWidgetStaticAttrs(props2.widget);
|
|
@@ -76519,6 +76517,7 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76519
76517
|
allowClear: true,
|
|
76520
76518
|
defaultActiveFirstOption: false,
|
|
76521
76519
|
showSearch: true,
|
|
76520
|
+
filterOption: false,
|
|
76522
76521
|
notFoundContent: void 0
|
|
76523
76522
|
};
|
|
76524
76523
|
return attr;
|
|
@@ -76670,7 +76669,6 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76670
76669
|
}
|
|
76671
76670
|
);
|
|
76672
76671
|
const handleSearch = (keyword2) => {
|
|
76673
|
-
if (loadFinished2Options) return;
|
|
76674
76672
|
state.data = [];
|
|
76675
76673
|
debounceSearch(keyword2);
|
|
76676
76674
|
};
|
|
@@ -76775,7 +76773,7 @@ const _sfc_main$1K = /* @__PURE__ */ defineComponent({
|
|
|
76775
76773
|
};
|
|
76776
76774
|
}
|
|
76777
76775
|
});
|
|
76778
|
-
const AllocatePart = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["__scopeId", "data-v-
|
|
76776
|
+
const AllocatePart = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["__scopeId", "data-v-6c8bafae"]]);
|
|
76779
76777
|
function useAsyncOptions$1({ bindModelKey, modelCategory, code: code2 }) {
|
|
76780
76778
|
async function getRefList(arg = {}) {
|
|
76781
76779
|
const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
@@ -76870,10 +76868,11 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76870
76868
|
emit2("update:modelValue", val);
|
|
76871
76869
|
}
|
|
76872
76870
|
});
|
|
76871
|
+
let optionsRequestId = 0;
|
|
76873
76872
|
watch(
|
|
76874
76873
|
() => currentValue.value,
|
|
76875
76874
|
async () => {
|
|
76876
|
-
if (!state.
|
|
76875
|
+
if (!state.data.some((option2) => option2.value === currentValue.value)) {
|
|
76877
76876
|
await checkInitialValue();
|
|
76878
76877
|
}
|
|
76879
76878
|
},
|
|
@@ -76894,7 +76893,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76894
76893
|
allowClear: true,
|
|
76895
76894
|
showSearch: true,
|
|
76896
76895
|
defaultActiveFirstOption: false,
|
|
76897
|
-
filterOption:
|
|
76896
|
+
filterOption: false,
|
|
76898
76897
|
notFoundContent: void 0
|
|
76899
76898
|
};
|
|
76900
76899
|
return attr;
|
|
@@ -76907,54 +76906,55 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76907
76906
|
});
|
|
76908
76907
|
}
|
|
76909
76908
|
onBeforeMount(async () => {
|
|
76909
|
+
const id = ++optionsRequestId;
|
|
76910
76910
|
const { options, finished } = await getOptionsByQuery();
|
|
76911
|
+
if (id !== optionsRequestId) return;
|
|
76911
76912
|
state.loadFinished2Options = finished;
|
|
76912
76913
|
state.initialOptions = options;
|
|
76913
76914
|
state.data = options || [];
|
|
76915
|
+
await checkInitialValue();
|
|
76914
76916
|
});
|
|
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
76917
|
const handleSearch = (keyword2) => {
|
|
76928
|
-
|
|
76918
|
+
++optionsRequestId;
|
|
76929
76919
|
state.hasSearched = true;
|
|
76930
76920
|
state.fetching = true;
|
|
76931
76921
|
state.data = [];
|
|
76932
76922
|
debounceSearch(keyword2);
|
|
76933
76923
|
};
|
|
76934
76924
|
const debounceSearch = debounce(async (keyword2) => {
|
|
76925
|
+
const id = ++optionsRequestId;
|
|
76926
|
+
const value = keyword2?.trim();
|
|
76935
76927
|
try {
|
|
76936
|
-
|
|
76937
|
-
|
|
76938
|
-
|
|
76939
|
-
|
|
76928
|
+
const queryName = `${searchField}.like`;
|
|
76929
|
+
const codeName = "code_.like";
|
|
76930
|
+
const res = await getOptionsByQuery({
|
|
76931
|
+
...value ? {
|
|
76940
76932
|
exp: `OR(${queryName},${codeName})`,
|
|
76941
|
-
queryData: { [queryName]:
|
|
76942
|
-
|
|
76943
|
-
|
|
76944
|
-
|
|
76945
|
-
|
|
76946
|
-
|
|
76947
|
-
|
|
76948
|
-
|
|
76933
|
+
queryData: { [queryName]: value, [codeName]: value }
|
|
76934
|
+
} : {},
|
|
76935
|
+
pageSize: 30
|
|
76936
|
+
});
|
|
76937
|
+
if (id !== optionsRequestId) return;
|
|
76938
|
+
state.data = res.options ?? [];
|
|
76939
|
+
state.hasSearched = !!value;
|
|
76940
|
+
state.loadFinished2Options = !!res.finished;
|
|
76949
76941
|
} catch (error) {
|
|
76950
76942
|
console.error("请求失败:", error);
|
|
76943
|
+
if (id === optionsRequestId) state.data = [];
|
|
76951
76944
|
} finally {
|
|
76952
|
-
state.fetching = false;
|
|
76945
|
+
if (id === optionsRequestId) state.fetching = false;
|
|
76953
76946
|
}
|
|
76954
76947
|
}, 300);
|
|
76948
|
+
onBeforeUnmount(() => {
|
|
76949
|
+
debounceSearch.cancel();
|
|
76950
|
+
++optionsRequestId;
|
|
76951
|
+
});
|
|
76955
76952
|
async function checkInitialValue() {
|
|
76953
|
+
const id = optionsRequestId;
|
|
76954
|
+
const value = currentValue.value;
|
|
76956
76955
|
if (currentValue.value && !state.initialOptions.some((o) => o.value === currentValue.value)) {
|
|
76957
76956
|
const remoteOption = await getOptionByIds(currentValue.value);
|
|
76957
|
+
if (id !== optionsRequestId || value !== currentValue.value) return;
|
|
76958
76958
|
state.data = [...remoteOption, ...state.initialOptions];
|
|
76959
76959
|
} else {
|
|
76960
76960
|
state.data = state.initialOptions;
|
|
@@ -76988,7 +76988,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
76988
76988
|
};
|
|
76989
76989
|
}
|
|
76990
76990
|
});
|
|
76991
|
-
const TraceSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["__scopeId", "data-v-
|
|
76991
|
+
const TraceSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["__scopeId", "data-v-fefa9ebf"]]);
|
|
76992
76992
|
const _hoisted_1$11 = { class: "trace-device__dropdown" };
|
|
76993
76993
|
const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
76994
76994
|
__name: "trace-device",
|
|
@@ -77040,7 +77040,6 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77040
77040
|
showRequired,
|
|
77041
77041
|
showDisabled,
|
|
77042
77042
|
options: initialOptions,
|
|
77043
|
-
loadFinished2Options,
|
|
77044
77043
|
newTotalCount
|
|
77045
77044
|
} = useWidgetStaticAttrs(props2.widget);
|
|
77046
77045
|
const { displayFields, autofillRules, enableAutofill } = props2.widget.props;
|
|
@@ -77082,7 +77081,7 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77082
77081
|
allowClear: true,
|
|
77083
77082
|
defaultActiveFirstOption: false,
|
|
77084
77083
|
showSearch: false,
|
|
77085
|
-
|
|
77084
|
+
filterOption: false,
|
|
77086
77085
|
notFoundContent: void 0
|
|
77087
77086
|
};
|
|
77088
77087
|
return attr;
|
|
@@ -77307,9 +77306,8 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77307
77306
|
selectedDisposed = true;
|
|
77308
77307
|
selectedRequestId++;
|
|
77309
77308
|
});
|
|
77310
|
-
const handleSearch = (
|
|
77311
|
-
|
|
77312
|
-
debounceSearch(keyword2);
|
|
77309
|
+
const handleSearch = () => {
|
|
77310
|
+
debounceSearch();
|
|
77313
77311
|
};
|
|
77314
77312
|
async function getOptionByIds(ids) {
|
|
77315
77313
|
const { data = [] } = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
|
|
@@ -77458,7 +77456,54 @@ const _sfc_main$1I = /* @__PURE__ */ defineComponent({
|
|
|
77458
77456
|
};
|
|
77459
77457
|
}
|
|
77460
77458
|
});
|
|
77461
|
-
const TraceDevice = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["__scopeId", "data-v-
|
|
77459
|
+
const TraceDevice = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["__scopeId", "data-v-104db85d"]]);
|
|
77460
|
+
function useReferenceLabel(rowSource, field, dataField = field) {
|
|
77461
|
+
const { formStateStore } = useRuntimeInstanceServices();
|
|
77462
|
+
const labelKey = `${field}_lb_`;
|
|
77463
|
+
let disposed = false;
|
|
77464
|
+
onScopeDispose(() => {
|
|
77465
|
+
disposed = true;
|
|
77466
|
+
});
|
|
77467
|
+
watch(
|
|
77468
|
+
[() => formStateStore.value, rowSource],
|
|
77469
|
+
([store, row], _previous, onCleanup) => {
|
|
77470
|
+
if (!store || store.getObjectPath(row) === void 0) return;
|
|
77471
|
+
let previousValue = row[dataField];
|
|
77472
|
+
let previousLabel = row[labelKey];
|
|
77473
|
+
const labelPath = store.getFieldPath(row, labelKey);
|
|
77474
|
+
onCleanup(
|
|
77475
|
+
store.subscribe(({ paths }) => {
|
|
77476
|
+
const value = row[dataField];
|
|
77477
|
+
const label = row[labelKey];
|
|
77478
|
+
const stale = value !== previousValue && label === previousLabel;
|
|
77479
|
+
previousValue = value;
|
|
77480
|
+
previousLabel = label;
|
|
77481
|
+
const labelProvided = paths.some(
|
|
77482
|
+
(path) => path === labelPath || labelPath.startsWith(`${path}.`)
|
|
77483
|
+
);
|
|
77484
|
+
if (stale && label != null && !labelProvided) {
|
|
77485
|
+
store.setObjectField(row, labelKey, null, "restore");
|
|
77486
|
+
}
|
|
77487
|
+
})
|
|
77488
|
+
);
|
|
77489
|
+
},
|
|
77490
|
+
{ immediate: true, flush: "sync" }
|
|
77491
|
+
);
|
|
77492
|
+
function syncSelectedLabel(option2, source) {
|
|
77493
|
+
const store = formStateStore.value;
|
|
77494
|
+
const row = rowSource();
|
|
77495
|
+
if (disposed || !option2 || option2.value == null || option2.value === "" || !store || store.getObjectPath(row) === void 0 || row[dataField] !== option2.value)
|
|
77496
|
+
return;
|
|
77497
|
+
const current = row[labelKey];
|
|
77498
|
+
if (source === "restore") {
|
|
77499
|
+
if (option2.label == null || option2.label === "") return;
|
|
77500
|
+
if (current != null && current !== "" && current !== "[]") return;
|
|
77501
|
+
}
|
|
77502
|
+
const label = option2.label == null ? null : JSON.stringify([option2.label]);
|
|
77503
|
+
if (current !== label) store.setObjectField(row, labelKey, label, source);
|
|
77504
|
+
}
|
|
77505
|
+
return { syncSelectedLabel };
|
|
77506
|
+
}
|
|
77462
77507
|
const _hoisted_1$10 = { class: "search-wrapper" };
|
|
77463
77508
|
const _hoisted_2$J = {
|
|
77464
77509
|
key: 1,
|
|
@@ -77485,9 +77530,11 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77485
77530
|
};
|
|
77486
77531
|
const props2 = __props;
|
|
77487
77532
|
const { setRowField } = useRuntimeRowState(() => props2.formData);
|
|
77533
|
+
const { formStateStore } = useRuntimeInstanceServices();
|
|
77488
77534
|
const emit2 = __emit;
|
|
77489
77535
|
const {
|
|
77490
77536
|
field,
|
|
77537
|
+
targetFieldId,
|
|
77491
77538
|
modelKey,
|
|
77492
77539
|
refModelKey,
|
|
77493
77540
|
placeholder,
|
|
@@ -77501,6 +77548,9 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77501
77548
|
customLoaderRef
|
|
77502
77549
|
} = useWidgetStaticAttrs(props2.widget);
|
|
77503
77550
|
const runtimeProps = resolveRuntimeQuickSearchProps(props2.widget.props);
|
|
77551
|
+
const dataField = targetFieldId || field;
|
|
77552
|
+
const labelKey = `${field}_lb_`;
|
|
77553
|
+
const { syncSelectedLabel } = useReferenceLabel(() => props2.formData, field, dataField);
|
|
77504
77554
|
const searchField = searchFieldMap[fieldType] || "name_";
|
|
77505
77555
|
const searchVisible = computed(() => {
|
|
77506
77556
|
const { quickSearchField } = runtimeProps;
|
|
@@ -77524,16 +77574,22 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77524
77574
|
});
|
|
77525
77575
|
const state = reactive({
|
|
77526
77576
|
hasSearched: false,
|
|
77527
|
-
data: initialOptions,
|
|
77577
|
+
data: initialOptions ?? [],
|
|
77528
77578
|
fetching: false
|
|
77529
77579
|
});
|
|
77530
|
-
const currentValue = computed(
|
|
77531
|
-
|
|
77532
|
-
|
|
77533
|
-
|
|
77534
|
-
|
|
77535
|
-
|
|
77536
|
-
|
|
77580
|
+
const currentValue = computed(() => props2.value);
|
|
77581
|
+
let optionsRequestId = 0;
|
|
77582
|
+
let lookupSeq = 0;
|
|
77583
|
+
let selectionSeq = 0;
|
|
77584
|
+
let disposed = false;
|
|
77585
|
+
let selectedOption;
|
|
77586
|
+
let selectedOptionRow;
|
|
77587
|
+
onScopeDispose(() => {
|
|
77588
|
+
disposed = true;
|
|
77589
|
+
optionsRequestId++;
|
|
77590
|
+
lookupSeq++;
|
|
77591
|
+
selectionSeq++;
|
|
77592
|
+
debounceSearch.cancel();
|
|
77537
77593
|
});
|
|
77538
77594
|
const selectProps = computed(() => {
|
|
77539
77595
|
let attr = {
|
|
@@ -77541,7 +77597,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77541
77597
|
allowClear: true,
|
|
77542
77598
|
showSearch: searchVisible.value,
|
|
77543
77599
|
defaultActiveFirstOption: false,
|
|
77544
|
-
filterOption:
|
|
77600
|
+
filterOption: false,
|
|
77545
77601
|
notFoundContent: void 0
|
|
77546
77602
|
};
|
|
77547
77603
|
return attr;
|
|
@@ -77558,39 +77614,9 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77558
77614
|
handleSyncVirtualListWidth,
|
|
77559
77615
|
handleShowCustomTooltip
|
|
77560
77616
|
} = 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
77617
|
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
|
-
},
|
|
77618
|
+
[() => props2.value, () => props2.formData, () => customLoaderRef.value],
|
|
77619
|
+
() => checkInitialValue(),
|
|
77594
77620
|
{
|
|
77595
77621
|
immediate: true
|
|
77596
77622
|
}
|
|
@@ -77615,9 +77641,11 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77615
77641
|
queryData
|
|
77616
77642
|
};
|
|
77617
77643
|
};
|
|
77618
|
-
let optionsRequestId = 0;
|
|
77619
77644
|
async function loadOptions({ pageSize: pageSize2, keyword: keyword2 }) {
|
|
77620
77645
|
const id = ++optionsRequestId;
|
|
77646
|
+
const row = props2.formData;
|
|
77647
|
+
const store = formStateStore.value;
|
|
77648
|
+
const loader = customLoaderRef.value;
|
|
77621
77649
|
state.fetching = true;
|
|
77622
77650
|
try {
|
|
77623
77651
|
const { exp, queryData } = buildQueryParams({ keyword: keyword2 });
|
|
@@ -77626,68 +77654,96 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77626
77654
|
fieldKey: field,
|
|
77627
77655
|
refModelKey,
|
|
77628
77656
|
isRdo: false,
|
|
77629
|
-
customLoader:
|
|
77657
|
+
customLoader: loader,
|
|
77630
77658
|
exp,
|
|
77631
77659
|
queryData,
|
|
77632
77660
|
pageSize: pageSize2
|
|
77633
77661
|
});
|
|
77634
|
-
if (id !== optionsRequestId
|
|
77662
|
+
if (disposed || id !== optionsRequestId || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader)
|
|
77663
|
+
return;
|
|
77635
77664
|
state.data = res.options ?? [];
|
|
77636
77665
|
return res.options ?? [];
|
|
77637
77666
|
} catch (error) {
|
|
77638
77667
|
console.error("请求失败:", error);
|
|
77639
|
-
if (id === optionsRequestId)
|
|
77640
|
-
|
|
77668
|
+
if (!disposed && id === optionsRequestId) {
|
|
77669
|
+
state.data = [];
|
|
77670
|
+
return [];
|
|
77671
|
+
}
|
|
77641
77672
|
} finally {
|
|
77642
|
-
if (id === optionsRequestId)
|
|
77643
|
-
|
|
77644
|
-
|
|
77673
|
+
if (!disposed && id === optionsRequestId) {
|
|
77674
|
+
state.fetching = false;
|
|
77675
|
+
if (!keyword2?.trim()) state.hasSearched = false;
|
|
77676
|
+
handleSyncVirtualListWidth();
|
|
77677
|
+
}
|
|
77645
77678
|
}
|
|
77646
77679
|
}
|
|
77647
77680
|
watch(
|
|
77648
77681
|
() => newQueryDataRef.value,
|
|
77649
77682
|
async () => {
|
|
77650
77683
|
if (!newQueryDataRef.value || !customLoaderRef.value) return;
|
|
77651
|
-
|
|
77684
|
+
const options = await loadOptions({ pageSize: 999 });
|
|
77685
|
+
if (options) autoQueryOptions.value = options;
|
|
77652
77686
|
},
|
|
77653
77687
|
{
|
|
77654
77688
|
immediate: true
|
|
77655
77689
|
}
|
|
77656
77690
|
);
|
|
77657
77691
|
const handleSearch = (keyword2) => {
|
|
77658
|
-
if (
|
|
77692
|
+
if (disposed) return;
|
|
77693
|
+
optionsRequestId++;
|
|
77659
77694
|
state.hasSearched = true;
|
|
77660
77695
|
state.fetching = true;
|
|
77661
77696
|
state.data = [];
|
|
77662
77697
|
debounceSearch(keyword2);
|
|
77663
77698
|
};
|
|
77664
77699
|
const debounceSearch = debounce(async (keyword2) => {
|
|
77700
|
+
await loadOptions({ pageSize: 30, keyword: keyword2?.trim() || void 0 });
|
|
77701
|
+
}, 300);
|
|
77702
|
+
watch(dropdownVisible, (visible) => {
|
|
77703
|
+
debounceSearch.cancel();
|
|
77704
|
+
++optionsRequestId;
|
|
77705
|
+
if (disposed || !visible) {
|
|
77706
|
+
state.fetching = false;
|
|
77707
|
+
return;
|
|
77708
|
+
}
|
|
77709
|
+
state.data = [];
|
|
77710
|
+
state.hasSearched = false;
|
|
77711
|
+
void loadOptions({ pageSize: 30 });
|
|
77712
|
+
});
|
|
77713
|
+
async function checkInitialValue() {
|
|
77714
|
+
const seq = ++lookupSeq;
|
|
77715
|
+
const requestId = ++optionsRequestId;
|
|
77716
|
+
const value = props2.value;
|
|
77717
|
+
const row = props2.formData;
|
|
77718
|
+
const store = formStateStore.value;
|
|
77719
|
+
const loader = customLoaderRef.value;
|
|
77665
77720
|
try {
|
|
77666
|
-
|
|
77667
|
-
|
|
77721
|
+
let option2 = !value ? void 0 : selectedOptionRow === row && selectedOption?.value === value ? selectedOption : [..._initialOptions.value, ...state.data].find((item) => item.value === value);
|
|
77722
|
+
if (value && !option2) {
|
|
77723
|
+
option2 = (await getOptionByIds([value], loader)).find((item) => item.value === value);
|
|
77668
77724
|
}
|
|
77669
|
-
|
|
77670
|
-
|
|
77725
|
+
await nextTick();
|
|
77726
|
+
if (disposed || seq !== lookupSeq || props2.value !== value || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader || row[dataField] !== value)
|
|
77727
|
+
return;
|
|
77728
|
+
if (option2) {
|
|
77729
|
+
selectedOption = option2;
|
|
77730
|
+
selectedOptionRow = row;
|
|
77731
|
+
syncSelectedLabel(option2, "restore");
|
|
77732
|
+
}
|
|
77733
|
+
if (requestId === optionsRequestId) {
|
|
77734
|
+
state.data = option2 ? [option2, ..._initialOptions.value.filter((item) => item.value !== value)] : _initialOptions.value;
|
|
77735
|
+
state.hasSearched = false;
|
|
77736
|
+
handleSyncVirtualListWidth();
|
|
77671
77737
|
}
|
|
77672
77738
|
} catch (error) {
|
|
77673
|
-
console.error("
|
|
77739
|
+
console.error("[TraceSelect] Failed to load selected option:", error);
|
|
77674
77740
|
} 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;
|
|
77741
|
+
if (!disposed && requestId === optionsRequestId) state.fetching = false;
|
|
77684
77742
|
}
|
|
77685
|
-
state.hasSearched = false;
|
|
77686
|
-
handleSyncVirtualListWidth();
|
|
77687
77743
|
}
|
|
77688
|
-
async function getOptionByIds(ids) {
|
|
77689
|
-
if (
|
|
77690
|
-
const res = await
|
|
77744
|
+
async function getOptionByIds(ids, loader = customLoaderRef.value) {
|
|
77745
|
+
if (loader) {
|
|
77746
|
+
const res = await loader({
|
|
77691
77747
|
mode: "byIds",
|
|
77692
77748
|
modelKey,
|
|
77693
77749
|
fieldKey: field,
|
|
@@ -77719,16 +77775,53 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77719
77775
|
}) ?? [];
|
|
77720
77776
|
}
|
|
77721
77777
|
async function handleChange(v, info) {
|
|
77778
|
+
if (disposed) return false;
|
|
77779
|
+
const value = v == null || v === "" ? null : v;
|
|
77780
|
+
const matchesValue = (actual) => value == null ? actual == null || actual === "" : actual === value;
|
|
77781
|
+
const option2 = info?.value === value ? info : state.data.find((item) => item.value === value);
|
|
77782
|
+
const row = props2.formData;
|
|
77783
|
+
const store = formStateStore.value;
|
|
77784
|
+
if (!store || option2?.disabled) return false;
|
|
77785
|
+
let seq = 0;
|
|
77786
|
+
let accepted = false;
|
|
77787
|
+
store.transaction("user", () => {
|
|
77788
|
+
emit2("update:value", value);
|
|
77789
|
+
accepted = formStateStore.value === store && props2.formData === row && matchesValue(row[dataField]);
|
|
77790
|
+
if (!accepted) return;
|
|
77791
|
+
seq = ++selectionSeq;
|
|
77792
|
+
lookupSeq++;
|
|
77793
|
+
optionsRequestId++;
|
|
77794
|
+
debounceSearch.cancel();
|
|
77795
|
+
state.fetching = false;
|
|
77796
|
+
selectedOptionRow = row;
|
|
77797
|
+
selectedOption = option2;
|
|
77798
|
+
if (value == null) {
|
|
77799
|
+
if (row[labelKey] != null) setRowField(labelKey, null, "user");
|
|
77800
|
+
} else {
|
|
77801
|
+
syncSelectedLabel(option2 ?? { value }, "user");
|
|
77802
|
+
if (option2 && !state.data.some((item) => item.value === value)) {
|
|
77803
|
+
state.data = [option2, ...state.data];
|
|
77804
|
+
}
|
|
77805
|
+
}
|
|
77806
|
+
});
|
|
77807
|
+
if (!accepted) return false;
|
|
77808
|
+
await nextTick();
|
|
77809
|
+
if (disposed || seq !== selectionSeq || formStateStore.value !== store || props2.formData !== row || !matchesValue(props2.value) || !matchesValue(row[dataField]))
|
|
77810
|
+
return false;
|
|
77722
77811
|
if (autofillRules && autofillRules.length !== 0) {
|
|
77723
|
-
|
|
77724
|
-
applyAutofillRules(autofillRules, info?._item, props2.formData, { enabled: enableAutofill });
|
|
77812
|
+
applyAutofillRules(autofillRules, option2?._item, row, { enabled: !!enableAutofill });
|
|
77725
77813
|
}
|
|
77726
|
-
emit2("change",
|
|
77814
|
+
emit2("change", value, option2);
|
|
77727
77815
|
handleCloseDropdown();
|
|
77816
|
+
return true;
|
|
77728
77817
|
}
|
|
77729
77818
|
const { handleSearchScan } = useRuleProps({
|
|
77730
77819
|
props: props2,
|
|
77731
77820
|
selectByCode: async (code2, signal) => {
|
|
77821
|
+
const seq = selectionSeq;
|
|
77822
|
+
const row = props2.formData;
|
|
77823
|
+
const store = formStateStore.value;
|
|
77824
|
+
const value = row[dataField];
|
|
77732
77825
|
const res = await renderUtils.requestRefOptions({
|
|
77733
77826
|
modelKey,
|
|
77734
77827
|
fieldKey: field,
|
|
@@ -77743,20 +77836,20 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77743
77836
|
},
|
|
77744
77837
|
pageSize: 30
|
|
77745
77838
|
});
|
|
77746
|
-
if (signal.aborted
|
|
77839
|
+
if (signal.aborted || disposed || seq !== selectionSeq || props2.formData !== row || formStateStore.value !== store || row[dataField] !== value)
|
|
77840
|
+
return false;
|
|
77747
77841
|
if (!res.options?.[0]) {
|
|
77748
77842
|
message.error($t2("sys.onlineForm.noCorrespondingDataFound"));
|
|
77749
77843
|
return false;
|
|
77750
77844
|
}
|
|
77751
77845
|
const info = res.options[0];
|
|
77752
|
-
|
|
77753
|
-
await handleChange(info.value, info);
|
|
77754
|
-
return true;
|
|
77846
|
+
return handleChange(info.value, info);
|
|
77755
77847
|
}
|
|
77756
77848
|
});
|
|
77757
77849
|
onMounted(async () => {
|
|
77758
77850
|
if (customLoaderRef.value) {
|
|
77759
|
-
|
|
77851
|
+
const options = await loadOptions({ pageSize: 999 });
|
|
77852
|
+
if (options) autoQueryOptions.value = options;
|
|
77760
77853
|
}
|
|
77761
77854
|
});
|
|
77762
77855
|
__expose({
|
|
@@ -77788,9 +77881,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77788
77881
|
},
|
|
77789
77882
|
select: async (option2) => {
|
|
77790
77883
|
if (option2.disabled) return;
|
|
77791
|
-
|
|
77792
|
-
currentValue.value = option2.value;
|
|
77793
|
-
await handleChange(option2.value, option2);
|
|
77884
|
+
return handleChange(option2.value, option2);
|
|
77794
77885
|
},
|
|
77795
77886
|
scan: handleSearchScan,
|
|
77796
77887
|
active: () => dropdownVisible.value && !showDisabled.value
|
|
@@ -77803,7 +77894,6 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77803
77894
|
class: ["cell-trace-select", unref(showRequired) && "is-show-required", __props.realFieldId],
|
|
77804
77895
|
dropdownClassName: "gct-common-select-dropdown vxe-table--ignore-clear",
|
|
77805
77896
|
value: currentValue.value,
|
|
77806
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => currentValue.value = $event),
|
|
77807
77897
|
options: unref(hideOptionsTitle)(state.data),
|
|
77808
77898
|
disabled: unref(showDisabled),
|
|
77809
77899
|
open: unref(dropdownVisible)
|
|
@@ -77838,7 +77928,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
77838
77928
|
placeholder: unref($t2)("sys.search"),
|
|
77839
77929
|
onChange: _cache[1] || (_cache[1] = (e) => handleSearch(e.target.value))
|
|
77840
77930
|
}, {
|
|
77841
|
-
prefix: withCtx(() => [..._cache[
|
|
77931
|
+
prefix: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
77842
77932
|
createElementVNode("i", { class: "icon iconfont icon-sousuo1" }, null, -1)
|
|
77843
77933
|
])]),
|
|
77844
77934
|
_: 1
|
|
@@ -77895,15 +77985,19 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
77895
77985
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
77896
77986
|
const props2 = __props;
|
|
77897
77987
|
const emit2 = __emit;
|
|
77988
|
+
const { setRowField } = useRuntimeRowState(() => props2.formData);
|
|
77989
|
+
const { formStateStore } = useRuntimeInstanceServices();
|
|
77898
77990
|
const {
|
|
77899
77991
|
field,
|
|
77992
|
+
targetFieldId,
|
|
77900
77993
|
modelKey,
|
|
77901
77994
|
refModelKey,
|
|
77902
77995
|
placeholder,
|
|
77903
77996
|
showRequired,
|
|
77904
77997
|
showDisabled,
|
|
77905
77998
|
options,
|
|
77906
|
-
newQueryDataRef
|
|
77999
|
+
newQueryDataRef,
|
|
78000
|
+
customLoaderRef
|
|
77907
78001
|
} = useWidgetStaticAttrs(props2.widget);
|
|
77908
78002
|
const { applyAutofillRules } = useAutofill();
|
|
77909
78003
|
const open = ref$1(false);
|
|
@@ -77917,30 +78011,64 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
77917
78011
|
popoverOverlayStyle,
|
|
77918
78012
|
calculateWrapperHeight
|
|
77919
78013
|
} = useWrapperHeight(selectRef);
|
|
78014
|
+
const dataField = targetFieldId || field;
|
|
78015
|
+
const labelKey = `${field}_lb_`;
|
|
78016
|
+
const { syncSelectedLabel } = useReferenceLabel(() => props2.formData, field, dataField);
|
|
78017
|
+
const selectedOptionRow = shallowRef();
|
|
77920
78018
|
const selectedOption = ref$1();
|
|
77921
78019
|
const selectedOptions = computed(() => {
|
|
77922
|
-
const selected = selectedOption.value?.value === props2.value ? selectedOption.value : options?.find((item) => item.value === props2.value);
|
|
78020
|
+
const selected = selectedOptionRow.value === props2.formData && selectedOption.value?.value === props2.value ? selectedOption.value : options?.find((item) => item.value === props2.value);
|
|
77923
78021
|
return selected ? [{ value: selected.value, label: selected.label }] : [];
|
|
77924
78022
|
});
|
|
77925
78023
|
let lookupSeq = 0;
|
|
78024
|
+
let selectionSeq = 0;
|
|
78025
|
+
let disposed = false;
|
|
78026
|
+
onScopeDispose(() => {
|
|
78027
|
+
disposed = true;
|
|
78028
|
+
lookupSeq++;
|
|
78029
|
+
selectionSeq++;
|
|
78030
|
+
});
|
|
77926
78031
|
watch(
|
|
77927
|
-
() =>
|
|
77928
|
-
|
|
78032
|
+
[() => selectedOptions.value[0], () => props2.formData, () => props2.formData[labelKey]],
|
|
78033
|
+
([option2]) => syncSelectedLabel(option2, "restore"),
|
|
78034
|
+
{ immediate: true }
|
|
78035
|
+
);
|
|
78036
|
+
watch(
|
|
78037
|
+
[() => props2.value, () => props2.formData],
|
|
78038
|
+
async ([value, row]) => {
|
|
77929
78039
|
const seq = ++lookupSeq;
|
|
78040
|
+
const store = formStateStore.value;
|
|
77930
78041
|
if (!value || selectedOptions.value.length) return;
|
|
77931
78042
|
try {
|
|
77932
|
-
|
|
77933
|
-
|
|
77934
|
-
|
|
77935
|
-
|
|
77936
|
-
|
|
77937
|
-
|
|
77938
|
-
|
|
77939
|
-
|
|
77940
|
-
|
|
77941
|
-
|
|
77942
|
-
|
|
77943
|
-
};
|
|
78043
|
+
let option2;
|
|
78044
|
+
const loader = customLoaderRef.value;
|
|
78045
|
+
if (loader) {
|
|
78046
|
+
const res = await loader({
|
|
78047
|
+
mode: "byIds",
|
|
78048
|
+
modelKey,
|
|
78049
|
+
fieldKey: field,
|
|
78050
|
+
refModelKey,
|
|
78051
|
+
ids: [value],
|
|
78052
|
+
isRdo: false,
|
|
78053
|
+
queryData: newQueryDataRef.value
|
|
78054
|
+
});
|
|
78055
|
+
option2 = normalizeRefLoaderResult(res, { isRdo: false }).options.find(
|
|
78056
|
+
(item) => item.value === value
|
|
78057
|
+
);
|
|
78058
|
+
} else {
|
|
78059
|
+
const res = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
|
|
78060
|
+
{ modelCategory: EntityModelCategoryEnum.ENTITY },
|
|
78061
|
+
{ fieldKey: field, modelKey, refModelKey, ids: [value], includeDeleted: true }
|
|
78062
|
+
);
|
|
78063
|
+
const record = res?.data?.find((item) => (item.id_ || item.id) === value);
|
|
78064
|
+
if (record) option2 = { value, label: record.__LABEL__, _item: record };
|
|
78065
|
+
}
|
|
78066
|
+
await nextTick();
|
|
78067
|
+
if (disposed || seq !== lookupSeq || props2.value !== value || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader || row[dataField] !== value)
|
|
78068
|
+
return;
|
|
78069
|
+
if (option2) {
|
|
78070
|
+
selectedOptionRow.value = row;
|
|
78071
|
+
selectedOption.value = option2;
|
|
77944
78072
|
}
|
|
77945
78073
|
} catch (error) {
|
|
77946
78074
|
console.error("[TraceRefTableSelect] Failed to load selected option:", error);
|
|
@@ -77954,21 +78082,51 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
77954
78082
|
}
|
|
77955
78083
|
async function onSelect(row) {
|
|
77956
78084
|
const option2 = row?._option;
|
|
77957
|
-
if (!option2) return;
|
|
77958
|
-
|
|
77959
|
-
|
|
78085
|
+
if (!option2 || option2.value == null || option2.value === "" || disposed) return;
|
|
78086
|
+
let seq = 0;
|
|
78087
|
+
const targetRow = props2.formData;
|
|
78088
|
+
const store = formStateStore.value;
|
|
78089
|
+
if (!store) return;
|
|
78090
|
+
let accepted = false;
|
|
78091
|
+
store.transaction("user", () => {
|
|
78092
|
+
emit2("update:value", option2.value);
|
|
78093
|
+
accepted = formStateStore.value === store && props2.formData === targetRow && targetRow[dataField] === option2.value;
|
|
78094
|
+
if (!accepted) return;
|
|
78095
|
+
seq = ++selectionSeq;
|
|
78096
|
+
lookupSeq++;
|
|
78097
|
+
selectedOptionRow.value = targetRow;
|
|
78098
|
+
selectedOption.value = option2;
|
|
78099
|
+
syncSelectedLabel(option2, "user");
|
|
78100
|
+
});
|
|
78101
|
+
if (!accepted) return;
|
|
78102
|
+
await nextTick();
|
|
78103
|
+
if (disposed || seq !== selectionSeq || formStateStore.value !== store || props2.formData !== targetRow || props2.value !== option2.value || targetRow[dataField] !== option2.value)
|
|
78104
|
+
return;
|
|
77960
78105
|
if (props2.widget.props.autofillRules?.length) {
|
|
77961
|
-
await nextTick();
|
|
77962
78106
|
applyAutofillRules(props2.widget.props.autofillRules, option2._item, props2.formData, {
|
|
77963
|
-
enabled: props2.widget.props.enableAutofill
|
|
78107
|
+
enabled: !!props2.widget.props.enableAutofill
|
|
77964
78108
|
});
|
|
77965
78109
|
}
|
|
77966
78110
|
emit2("change", option2.value, option2);
|
|
77967
78111
|
open.value = false;
|
|
77968
78112
|
}
|
|
77969
78113
|
function onClear() {
|
|
77970
|
-
|
|
77971
|
-
|
|
78114
|
+
if (disposed) return;
|
|
78115
|
+
const targetRow = props2.formData;
|
|
78116
|
+
const store = formStateStore.value;
|
|
78117
|
+
if (!store) return;
|
|
78118
|
+
let accepted = false;
|
|
78119
|
+
store.transaction("user", () => {
|
|
78120
|
+
emit2("update:value", null);
|
|
78121
|
+
accepted = formStateStore.value === store && props2.formData === targetRow && (targetRow[dataField] == null || targetRow[dataField] === "");
|
|
78122
|
+
if (!accepted) return;
|
|
78123
|
+
selectionSeq++;
|
|
78124
|
+
lookupSeq++;
|
|
78125
|
+
selectedOptionRow.value = void 0;
|
|
78126
|
+
selectedOption.value = void 0;
|
|
78127
|
+
if (targetRow[labelKey] != null) setRowField(labelKey, null, "user");
|
|
78128
|
+
});
|
|
78129
|
+
if (!accepted) return;
|
|
77972
78130
|
emit2("change", null);
|
|
77973
78131
|
open.value = false;
|
|
77974
78132
|
}
|
|
@@ -95977,8 +96135,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
95977
96135
|
printTask = (async () => {
|
|
95978
96136
|
if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
|
|
95979
96137
|
await nextTick();
|
|
95980
|
-
const { printRuntimeInstance } = await import("./print-runtime-instance-
|
|
95981
|
-
const { default: renderer } = await import("./print-snapshot-renderer-
|
|
96138
|
+
const { printRuntimeInstance } = await import("./print-runtime-instance-CV0WcU-Z.js");
|
|
96139
|
+
const { default: renderer } = await import("./print-snapshot-renderer-hHd4ThE0.js");
|
|
95982
96140
|
if (abort.signal.aborted) throw new Error("打印已取消");
|
|
95983
96141
|
printRenderer.value = markRaw(renderer);
|
|
95984
96142
|
await printRuntimeInstance(
|