@gct-paas/excel 0.1.40-beta.20 → 0.1.40-beta.22
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-BGVcCPEa.js → BaseComponent-0BP8yUp3.js} +2 -2
- package/dist/{VueVideoPlayer-BjmIFrir.js → VueVideoPlayer-BTRWrHgw.js} +2 -2
- package/dist/{align-editor-C2fibWP5.js → align-editor-ssy7gJsD.js} +1 -1
- package/dist/{barcode-design-CaP1fm0_.js → barcode-design-BOutrCCv.js} +2 -2
- package/dist/base/index.es.js +83 -83
- package/dist/{diagonal-design-hlxcD87A.js → diagonal-design-C8Y7RdW8.js} +2 -2
- package/dist/{dynamic-table-action-Be8JlL37.js → dynamic-table-action-DLctOchz.js} +19 -4
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-DqGN_0-g.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-BsyVWing.js} +375 -290
- package/dist/{edit.utils-CXmmCnxE-BNPHbukz.js → edit.utils-CXmmCnxE-CwPcGg-f.js} +1 -1
- package/dist/excel.css +110 -59
- package/dist/{exceljs.min-W43at4dY.js → exceljs.min-CbCAYZ_e.js} +2 -2
- package/dist/{font-editor-D56ClIpW.js → font-editor-DdR8irtJ.js} +3 -3
- package/dist/{image-design-D0wFVrcv.js → image-design-g9R_z-IY.js} +2 -2
- package/dist/{index-17hYBH0H.js → index-B9hIqELW.js} +1 -1
- package/dist/{index-CjuxT4it.js → index-BIm_YKSw.js} +350 -203
- package/dist/{index-iPetBbbY.js → index-C0riszYt.js} +4 -4
- package/dist/{index-T8osZobv.js → index-C5Z5DcwP.js} +3 -3
- package/dist/{index-DpCJBo9U.js → index-C6oivLbu.js} +1 -1
- package/dist/{index-Cmd9eaD8.js → index-C8vcYrJ2.js} +2 -2
- package/dist/{index-BuT2pRA0.js → index-CBSkF7uO.js} +2 -2
- package/dist/{index-o5rZ0ZDF.js → index-CE0kTBaD.js} +2 -2
- package/dist/{index-BPrRTLOr.js → index-CQxjpFgv.js} +2 -2
- package/dist/{index-BRkEJrpd.js → index-CTHjoZJh.js} +3 -3
- package/dist/{index-BPWqx5U8.js → index-C_Wum5DS.js} +2 -2
- package/dist/{index-CKqEZAs1.js → index-Cek24DHR.js} +2 -2
- package/dist/{index-D0Fb9rtG.js → index-CjjnjV4j.js} +6 -3
- package/dist/{index-DgUdDef6.js → index-Cli4afdv.js} +3 -3
- package/dist/{index-CKCRmqHx.js → index-Cmr9DRpz.js} +1 -1
- package/dist/{index-CToveeX8.js → index-CpQiCEe7.js} +1 -1
- package/dist/{index-Bln92UeX.js → index-CqbuTaGQ.js} +2 -2
- package/dist/{index--BSSsMvy.js → index-D-WSp3EA.js} +1 -1
- package/dist/{index-DK_goJxq.js → index-D3cPbNne.js} +1 -1
- package/dist/{index-BQXA1mwd.js → index-D6dtoM6l.js} +2 -2
- package/dist/{index-CdXeZ5pv.js → index-D9ZmqZVa.js} +2 -2
- package/dist/{index-C4cVVxUT.js → index-DEMinegB.js} +1 -1
- package/dist/{index-QjAhy-KC.js → index-DNc82Cm4.js} +3 -3
- package/dist/{index-CZBPaApP.js → index-Djsed3L4.js} +2 -2
- package/dist/{index-CjK1DtkT.js → index-DozFqpk2.js} +1 -1
- package/dist/{index-2bzUMftk.js → index-DuRfWFNu.js} +3 -3
- package/dist/{index-DE-6ATOb.js → index-JFbTpwJI.js} +2 -2
- package/dist/{index-B2FagfyH.js → index-JOJRN3MY.js} +2 -2
- package/dist/{index-DHBkzfbv.js → index-PUFY8idd.js} +1 -1
- package/dist/{index-C0WZCZCj.js → index-TTjH7nBY.js} +2 -2
- package/dist/{index-BOOwVQlO.js → index-YteSvWxT.js} +1 -1
- package/dist/{index-BqIV-vij.js → index-c69w0WwG.js} +2 -2
- package/dist/{index-CKMx2z9Y.js → index-fTuTQkkK.js} +2 -2
- package/dist/{index-Bi2XvcZ1.js → index-x19gmsid.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-DcYth63e.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-DjI5GeWt.js} +1 -1
- package/dist/{pagination-design-DpqDw6Rf.js → pagination-design-CA-dxfST.js} +2 -2
- package/dist/paper-widget-design-z1CF36U7.js +4 -0
- package/dist/{print-runtime-instance-Dlj6q6O1.js → print-runtime-instance-Df03RTCq.js} +1 -1
- package/dist/{print-snapshot-renderer-CuY9mllK.js → print-snapshot-renderer-CifB67Uu.js} +3 -3
- package/dist/{qrcode-design-C0Vw-EIt.js → qrcode-design-BF9P4MgR.js} +1 -1
- package/dist/{revo-grid.entry-C-HyVU26.js → revo-grid.entry-Bh8ebL13.js} +1 -1
- package/dist/{revogr-attribution_7.entry-ZdEPNmCh.js → revogr-attribution_7.entry-CsJaMH68.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-DtDqwzVE.js → revogr-clipboard_3.entry-DgmZ8Pc0.js} +2 -2
- package/dist/{revogr-data_4.entry-CUTBFvV5.js → revogr-data_4.entry-CPW7BILy.js} +2 -2
- package/dist/{revogr-filter-panel.entry-uExDl-fd.js → revogr-filter-panel.entry-BpIcSbuR.js} +1 -1
- package/dist/seal-design-DNugznsd.js +4 -0
- package/dist/{serialnumber-design-BvJSmeFY.js → serialnumber-design-C92sT5qW.js} +1 -1
- package/dist/shared/index.es.js +12 -12
- package/dist/{single-field-drop-DDAoyRO7.js → single-field-drop-CzMkcDOQ.js} +2 -2
- package/dist/{size-editor-CeB5cXTJ.js → size-editor-JdHGylGx.js} +1 -1
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +3 -1
- package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +2 -0
- package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +12 -0
- package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +7 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/object-init/hooks/useObjectInit.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/comps/use-dynamic-sub-table-panel.d.ts +6 -0
- package/dist/src/online-form/src/views/designer/modules/xlsx-import-summary.vue.d.ts +11 -0
- package/dist/src/online-form/src/views/designer/utils/cell-field-placements.d.ts +12 -0
- package/dist/src/online-form/src/views/designer/utils/xlsx-parser.d.ts +9 -3
- package/dist/src/shared/utils/lot2sn.d.ts +14 -1
- package/dist/src/shared/utils/query-filter.d.ts +24 -0
- package/dist/{sub-table-factory-D3ln_RZX.js → sub-table-factory-BUKjHjsJ.js} +9 -13
- package/dist/{text-design-ZwhuY1Ts.js → text-design-0ye2Qkdm.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-DL2Yq0cn.js → throttle-Cpk1LoGk-DQh0IPeE.js} +1 -1
- package/dist/{timediff-design-CWiKmA7W.js → timediff-design-D84T_Isx.js} +1 -1
- package/dist/{trace-like-wrapper-Dy5yrPBO.js → trace-like-wrapper-B8ZB0cEY.js} +5 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DapCZObe.js → value-editor.vue_vue_type_style_index_0_lang-C7aAgLHW.js} +2 -2
- package/dist/{widget-barcode-BCcosC1i.js → widget-barcode-D0VKq_RH.js} +4 -4
- package/dist/{widget-diagonal-CdCN3K4_.js → widget-diagonal-B4-YeaS-.js} +3 -3
- package/dist/{widget-image-BUN-gvL5.js → widget-image-CnOxfH66.js} +4 -4
- package/dist/{widget-line-FYyPMMZ4.js → widget-line-C-RWHAjB.js} +2 -2
- package/dist/{widget-pagination-BtYkMtMd.js → widget-pagination-CdkML1ma.js} +5 -5
- package/dist/{widget-power-Cdgzng7w.js → widget-power-CLg0Ov4-.js} +3 -3
- package/dist/{widget-qrcode-D5Og1U4s.js → widget-qrcode-Bo_PZVS3.js} +3 -3
- package/dist/{widget-rangelimit-ByyBW9QW.js → widget-rangelimit-vmFExwlR.js} +3 -3
- package/dist/{widget-serialnumber-DfDvhdgO.js → widget-serialnumber-DUCvkD2p.js} +1 -1
- package/dist/{widget-text-CoskH_Ql.js → widget-text-CwSG4P5w.js} +5 -5
- package/dist/{widget-timediff-CZi5yk7E.js → widget-timediff-CenBgqXn.js} +2 -2
- package/package.json +1 -1
- package/dist/paper-widget-design-C71HXpQm.js +0 -4
- package/dist/seal-design-21xHvKov.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
|
|
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-BsyVWing.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
|
-
import { message, Modal, Empty, InputSearch, Cascader, ConfigProvider, Tooltip as Tooltip$1, Input, Tree, Transfer, Select, Tag, Form, AutoComplete, TimePicker, DatePicker, Textarea, TreeSelect, CheckboxGroup, Checkbox, Radio, RadioGroup
|
|
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$
|
|
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-DLctOchz.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-DjI5GeWt.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";
|
|
@@ -398,17 +398,18 @@ class DateObjectRuntime {
|
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
async function CALC_IS_QUALIFIED(key, value, paramList) {
|
|
401
|
-
console.log("CALC_IS_QUALIFIED------", key, value, paramList);
|
|
401
|
+
console.log("CALC_IS_QUALIFIED------", key, value, paramList, "excel");
|
|
402
402
|
if (!key || value == null) {
|
|
403
403
|
return null;
|
|
404
404
|
}
|
|
405
|
-
const config2 = paramList?.find((e) => e.customFieldKey === key);
|
|
405
|
+
const config2 = paramList?.find((e) => e.customFieldKey === key || e.custom_field_key_ === key);
|
|
406
406
|
if (!config2) return null;
|
|
407
|
-
const
|
|
407
|
+
const upperLimit = config2.upperLimit || config2.upper_limit_;
|
|
408
|
+
const lowerLimit = config2.lowerLimit || config2.lower_limit_;
|
|
408
409
|
if (lowerLimit == null || upperLimit == null) return null;
|
|
409
410
|
const actual = Number(value);
|
|
410
|
-
const min2 = Number(
|
|
411
|
-
const max2 = Number(
|
|
411
|
+
const min2 = Number(lowerLimit);
|
|
412
|
+
const max2 = Number(upperLimit);
|
|
412
413
|
if (![actual, min2, max2].every(Number.isFinite)) return null;
|
|
413
414
|
return actual >= min2 && actual <= max2;
|
|
414
415
|
}
|
|
@@ -2015,7 +2016,7 @@ function openWindow(url, opt) {
|
|
|
2015
2016
|
const FieldPropLabels = Object.entries(FIELD_PROP_LABEL_MAP);
|
|
2016
2017
|
const FieldTypeLabels = Object.entries(FIELD_TYPE_LABEL_MAP);
|
|
2017
2018
|
async function createWorkbook() {
|
|
2018
|
-
const ExcelJs = (await import("./exceljs.min-
|
|
2019
|
+
const ExcelJs = (await import("./exceljs.min-CbCAYZ_e.js").then((n) => n.e)).default;
|
|
2019
2020
|
return new ExcelJs.Workbook();
|
|
2020
2021
|
}
|
|
2021
2022
|
class XlsxParser {
|
|
@@ -2041,66 +2042,95 @@ class XlsxParser {
|
|
|
2041
2042
|
});
|
|
2042
2043
|
return paperFields;
|
|
2043
2044
|
}
|
|
2044
|
-
static async xlsx2Sheets(file, keyList = []) {
|
|
2045
|
+
static async xlsx2Sheets(file, keyList = [], options = {}) {
|
|
2045
2046
|
const workbook = await createWorkbook();
|
|
2046
2047
|
const xlsxData = await workbook.xlsx.load(file);
|
|
2048
|
+
const warnings = [];
|
|
2047
2049
|
const fieldSheetName = $t("sys.onlineForm.formFields");
|
|
2048
2050
|
const fieldSheet = workbook.getWorksheet(fieldSheetName);
|
|
2049
|
-
const
|
|
2051
|
+
const withFields = options.withFields !== false;
|
|
2052
|
+
const fields = withFields && fieldSheet ? XlsxParser.sheetToFields(fieldSheet, keyList, warnings) : null;
|
|
2050
2053
|
const candidates = workbook.worksheets.filter((sheet) => sheet.name !== fieldSheetName);
|
|
2051
2054
|
const hidden = candidates.filter(
|
|
2052
2055
|
(sheet) => sheet.state === "hidden" || sheet.state === "veryHidden"
|
|
2053
2056
|
);
|
|
2054
2057
|
if (hidden.length) {
|
|
2055
|
-
|
|
2058
|
+
warnings.push(`已跳过隐藏工作表:${hidden.map((sheet) => sheet.name).join("、")}。`);
|
|
2056
2059
|
}
|
|
2057
|
-
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2060
|
+
const visible = candidates.filter((sheet) => !hidden.includes(sheet));
|
|
2061
|
+
if (!visible.length) throw new Error("Excel 中没有可导入的可见工作表");
|
|
2062
|
+
if (visible.length > MAX_RUNTIME_SHEETS) {
|
|
2063
|
+
warnings.push(
|
|
2064
|
+
`最多导入 ${MAX_RUNTIME_SHEETS} 个工作表,已跳过:${visible.slice(MAX_RUNTIME_SHEETS).map((sheet) => sheet.name).join("、")}。`
|
|
2065
|
+
);
|
|
2060
2066
|
}
|
|
2061
2067
|
const names = /* @__PURE__ */ new Set();
|
|
2062
|
-
const
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
);
|
|
2068
|
+
const fieldOwners = /* @__PURE__ */ new Map();
|
|
2069
|
+
const sheets = [];
|
|
2070
|
+
let remainingCells = 3e4;
|
|
2071
|
+
for (const worksheet of visible.slice(0, MAX_RUNTIME_SHEETS)) {
|
|
2072
|
+
if (!remainingCells) {
|
|
2073
|
+
warnings.push(`工作表「${worksheet.name}」未导入:整份表单已达到 30000 个单元格上限。`);
|
|
2074
|
+
continue;
|
|
2075
|
+
}
|
|
2076
|
+
const base = worksheet.name.trim().slice(0, MAX_RUNTIME_SHEET_TITLE_LENGTH) || "工作表";
|
|
2077
|
+
let title = base;
|
|
2078
|
+
let suffix = 2;
|
|
2079
|
+
while (names.has(title)) {
|
|
2080
|
+
const tail = ` (${suffix++})`;
|
|
2081
|
+
title = base.slice(0, MAX_RUNTIME_SHEET_TITLE_LENGTH - tail.length) + tail;
|
|
2082
|
+
}
|
|
2083
|
+
if (title !== worksheet.name) {
|
|
2084
|
+
warnings.push(`工作表「${worksheet.name}」将重命名为「${title}」。`);
|
|
2068
2085
|
}
|
|
2069
|
-
if (names.has(title)) throw new Error(`工作表名称重复:${title}`);
|
|
2070
2086
|
names.add(title);
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2087
|
+
if (!worksheet.actualRowCount) {
|
|
2088
|
+
warnings.push(`工作表「${title}」为空,将按空白工作表导入。`);
|
|
2089
|
+
}
|
|
2090
|
+
const rowCount = Math.max(1, worksheet.dimensions?.bottom ?? worksheet.rowCount ?? 1);
|
|
2091
|
+
const colCount = Math.max(1, worksheet.dimensions?.right ?? worksheet.columnCount ?? 1);
|
|
2092
|
+
const cols = Math.min(colCount, 75, remainingCells);
|
|
2093
|
+
const rows = Math.min(rowCount, 300, Math.floor(remainingCells / cols));
|
|
2094
|
+
if (rows < rowCount || cols < colCount) {
|
|
2095
|
+
warnings.push(
|
|
2096
|
+
`工作表「${title}」原为 ${rowCount} 行 × ${colCount} 列,仅导入前 ${rows} 行 × ${cols} 列,超出范围的内容将不导入(每表最多 300 行 × 75 列,合计最多 30000 格)。`
|
|
2076
2097
|
);
|
|
2077
2098
|
}
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2099
|
+
const paper2 = XlsxParser.sheetToPaper(worksheet, xlsxData, { rows, cols });
|
|
2100
|
+
remainingCells -= rows * cols;
|
|
2101
|
+
let formulaCount = 0;
|
|
2102
|
+
worksheet.eachRow((row, rowNumber) => {
|
|
2103
|
+
if (rowNumber > rows) return;
|
|
2104
|
+
row.eachCell((cell, colNumber) => {
|
|
2105
|
+
if (colNumber <= cols && cell.address === cell.master.address && cell.formula) {
|
|
2106
|
+
formulaCount++;
|
|
2083
2107
|
}
|
|
2084
2108
|
});
|
|
2085
2109
|
});
|
|
2086
|
-
if (
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2110
|
+
if (formulaCount) {
|
|
2111
|
+
warnings.push(
|
|
2112
|
+
`工作表「${title}」的 ${formulaCount} 个公式单元格将按静态文本导入,不再自动计算;图片公式不会还原为图片。`
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
2115
|
+
const paperFields = XlsxParser.extractPaperFields(paper2, fields).filter((field) => {
|
|
2116
|
+
const key = field.fieldKey || field.fieldName;
|
|
2117
|
+
const owner = fieldOwners.get(key);
|
|
2118
|
+
if (owner) {
|
|
2119
|
+
warnings.push(
|
|
2120
|
+
`字段「${field.fieldName || key}」重复出现:保留「${owner}」的首处绑定,「${title}」第 ${field.y} 行第 ${field.x} 列按静态文本导入。`
|
|
2121
|
+
);
|
|
2122
|
+
return false;
|
|
2123
|
+
}
|
|
2124
|
+
fieldOwners.set(key, title);
|
|
2125
|
+
return true;
|
|
2126
|
+
});
|
|
2127
|
+
sheets.push({ title, paper: paper2, paperFields });
|
|
2128
|
+
}
|
|
2129
|
+
return { sheets, fields, warnings };
|
|
2100
2130
|
}
|
|
2101
|
-
static sheetToPaper(paperSheet, xlsxData) {
|
|
2102
|
-
const SheetRowCount = Math.min(paperSheet.dimensions?.bottom ??
|
|
2103
|
-
const SheetColCount = Math.min(paperSheet.dimensions?.right ??
|
|
2131
|
+
static sheetToPaper(paperSheet, xlsxData, size) {
|
|
2132
|
+
const SheetRowCount = size?.rows ?? Math.max(1, Math.min(paperSheet.dimensions?.bottom ?? 1, 300));
|
|
2133
|
+
const SheetColCount = size?.cols ?? Math.max(1, Math.min(paperSheet.dimensions?.right ?? 1, 75));
|
|
2104
2134
|
const paper2 = {};
|
|
2105
2135
|
const { defaultRowHeight, defaultColWidth } = paperSheet.properties;
|
|
2106
2136
|
const defaultRowHeightPx = parseInt(src(`${defaultRowHeight}pt`));
|
|
@@ -2114,7 +2144,7 @@ class XlsxParser {
|
|
|
2114
2144
|
paper2.rows = rows;
|
|
2115
2145
|
const cols = [];
|
|
2116
2146
|
Array(SheetColCount).fill("").forEach((c, i) => {
|
|
2117
|
-
const
|
|
2147
|
+
const width = paperSheet.columns?.[i]?.width;
|
|
2118
2148
|
const _w = width ?? defaultColWidth;
|
|
2119
2149
|
cols.push({
|
|
2120
2150
|
// width: _w === undefined ? 80 : Math.floor(_w * 7 + 5),
|
|
@@ -2130,7 +2160,7 @@ class XlsxParser {
|
|
|
2130
2160
|
Array(SheetColCount).fill("").forEach((_2, colIndex) => {
|
|
2131
2161
|
const cell = paperSheet._rows[rowIndex]._cells[colIndex];
|
|
2132
2162
|
if (!cell) return;
|
|
2133
|
-
const { alignment,
|
|
2163
|
+
const { alignment, fill, font } = cell.style;
|
|
2134
2164
|
const cellName = cell._address;
|
|
2135
2165
|
const cellStyle = {
|
|
2136
2166
|
"text-align": alignment?.horizontal ?? "left",
|
|
@@ -2146,7 +2176,10 @@ class XlsxParser {
|
|
|
2146
2176
|
cells[rowIndex][colIndex].style = cellStyle;
|
|
2147
2177
|
if (cellName !== cell.master.address) return;
|
|
2148
2178
|
let cellValue = "";
|
|
2149
|
-
if (
|
|
2179
|
+
if (cell.formula) {
|
|
2180
|
+
const result = cell.result;
|
|
2181
|
+
cellValue = result == null ? `=${cell.formula}` : typeof result === "object" && "error" in result ? result.error : String(result);
|
|
2182
|
+
} else if (typeof cell.value !== "object") {
|
|
2150
2183
|
cellValue = cell.value;
|
|
2151
2184
|
} else if (typeof cell.text !== "object") {
|
|
2152
2185
|
cellValue = cell.text;
|
|
@@ -2173,10 +2206,10 @@ class XlsxParser {
|
|
|
2173
2206
|
const cell = paperSheet._rows[rowIndex]._cells[colIndex];
|
|
2174
2207
|
if (!cell) return;
|
|
2175
2208
|
const { border } = cell.style;
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2209
|
+
if (border?.top) CellBorder.setTop(colIndex + 1, rowIndex + 1, paper2);
|
|
2210
|
+
if (border?.bottom) CellBorder.setBottom(colIndex + 1, rowIndex + 1, paper2);
|
|
2211
|
+
if (border?.left) CellBorder.setLeft(colIndex + 1, rowIndex + 1, paper2);
|
|
2212
|
+
if (border?.right) CellBorder.setRight(colIndex + 1, rowIndex + 1, paper2);
|
|
2180
2213
|
});
|
|
2181
2214
|
});
|
|
2182
2215
|
const medias = (xlsxData.media ?? []).map((m) => {
|
|
@@ -2198,6 +2231,7 @@ class XlsxParser {
|
|
|
2198
2231
|
const tlNativeCol = range2?.tl?.nativeCol ?? 0;
|
|
2199
2232
|
const brNativeRow = range2?.br?.nativeRow ?? tlNativeRow;
|
|
2200
2233
|
const brNativeCol = range2?.br?.nativeCol ?? tlNativeCol;
|
|
2234
|
+
if (tlNativeRow >= SheetRowCount || tlNativeCol >= SheetColCount) return;
|
|
2201
2235
|
const rowSpan = Math.max(0, brNativeRow - tlNativeRow);
|
|
2202
2236
|
const colSpan = Math.max(0, brNativeCol - tlNativeCol);
|
|
2203
2237
|
const imageLayout = {
|
|
@@ -2244,12 +2278,12 @@ class XlsxParser {
|
|
|
2244
2278
|
* @param sheet
|
|
2245
2279
|
* @returns
|
|
2246
2280
|
*/
|
|
2247
|
-
static sheetToFields(sheet, keyList) {
|
|
2281
|
+
static sheetToFields(sheet, keyList, warnings = []) {
|
|
2248
2282
|
const SheetRowCount = Math.min(sheet.rowCount, 300);
|
|
2249
2283
|
const SheetColCount = Math.min(sheet.columnCount, 10);
|
|
2250
2284
|
const colFieldPropMap = /* @__PURE__ */ new Map();
|
|
2251
2285
|
Array(SheetColCount).fill("").forEach((_, colIndex) => {
|
|
2252
|
-
const cell = sheet._rows[0]
|
|
2286
|
+
const cell = sheet._rows[0]?._cells[colIndex];
|
|
2253
2287
|
const fieldProp = FieldPropLabels.find(
|
|
2254
2288
|
(f) => f[1] === (cell?.text ?? "").replaceAll("*", "").trim()
|
|
2255
2289
|
);
|
|
@@ -2257,6 +2291,12 @@ class XlsxParser {
|
|
|
2257
2291
|
colFieldPropMap.set(colIndex, fieldProp[0]);
|
|
2258
2292
|
}
|
|
2259
2293
|
});
|
|
2294
|
+
if (![...colFieldPropMap.values()].includes("key") || ![...colFieldPropMap.values()].includes("name")) {
|
|
2295
|
+
warnings.push(
|
|
2296
|
+
`工作表「${sheet.name}」缺少字段标识或名称表头,已忽略字段配置,保留表单文本。`
|
|
2297
|
+
);
|
|
2298
|
+
return [];
|
|
2299
|
+
}
|
|
2260
2300
|
const fields = [];
|
|
2261
2301
|
Array(SheetRowCount).fill("").forEach((_, rowIndex) => {
|
|
2262
2302
|
if (rowIndex === 0) return;
|
|
@@ -2268,6 +2308,10 @@ class XlsxParser {
|
|
|
2268
2308
|
field[colFieldPropMap.get(colIndex)] = cell?.text ?? "";
|
|
2269
2309
|
}
|
|
2270
2310
|
});
|
|
2311
|
+
if (!field.key || !field.name) {
|
|
2312
|
+
warnings.push(`字段配置第 ${rowIndex + 1} 行缺少字段标识或名称,已跳过该行。`);
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2271
2315
|
fields.push(field);
|
|
2272
2316
|
});
|
|
2273
2317
|
const cloneKeyList = [...keyList];
|
|
@@ -2343,39 +2387,39 @@ class XlsxParser {
|
|
|
2343
2387
|
}
|
|
2344
2388
|
function asyncImportClassModules() {
|
|
2345
2389
|
const modules = /* @__PURE__ */ Object.assign({
|
|
2346
|
-
"./_field_/auto-complete/index.ts": () => import("./index-
|
|
2347
|
-
"./_field_/datepicker/index.ts": () => import("./index-
|
|
2348
|
-
"./_field_/datetimepicker/index.ts": () => import("./index-
|
|
2349
|
-
"./_field_/department/index.ts": () => import("./index-
|
|
2350
|
-
"./_field_/enum-select/index.ts": () => import("./index-
|
|
2351
|
-
"./_field_/input/index.ts": () => import("./index-
|
|
2352
|
-
"./_field_/inputdouble/index.ts": () => import("./index-
|
|
2353
|
-
"./_field_/inputnumber/index.ts": () => import("./index-
|
|
2354
|
-
"./_field_/rdo-select/index.ts": () => import("./index-
|
|
2355
|
-
"./_field_/seal/index.ts": () => import("./index-
|
|
2356
|
-
"./_field_/select/index.ts": () => import("./index-
|
|
2357
|
-
"./_field_/sign/index.ts": () => import("./index-
|
|
2358
|
-
"./_field_/switch/index.ts": () => import("./index-
|
|
2359
|
-
"./_field_/textarea/index.ts": () => import("./index-
|
|
2360
|
-
"./_field_/timepicker/index.ts": () => import("./index-
|
|
2361
|
-
"./_field_/upload-file/index.ts": () => import("./index-
|
|
2362
|
-
"./_field_/upload-image/index.ts": () => import("./index-
|
|
2363
|
-
"./_field_/userpicker/index.ts": () => import("./index-
|
|
2364
|
-
"./_widget_/barcode/index.ts": () => import("./index-
|
|
2365
|
-
"./_widget_/combine-fields/index.ts": () => import("./index-
|
|
2366
|
-
"./_widget_/diagonal/index.ts": () => import("./index-
|
|
2367
|
-
"./_widget_/dyn-value/index.ts": () => import("./index-
|
|
2368
|
-
"./_widget_/image/index.ts": () => import("./index
|
|
2369
|
-
"./_widget_/line/index.ts": () => import("./index-
|
|
2370
|
-
"./_widget_/power/index.ts": () => import("./index-
|
|
2371
|
-
"./_widget_/qrcode/index.ts": () => import("./index-
|
|
2372
|
-
"./_widget_/ro/index.ts": () => import("./index-
|
|
2373
|
-
"./_widget_/serialnumber/index.ts": () => import("./index-
|
|
2374
|
-
"./_widget_/sub-table/index.ts": () => import("./index-
|
|
2375
|
-
"./_widget_/timediff/index.ts": () => import("./index-
|
|
2376
|
-
"./paper/index.ts": () => import("./index-
|
|
2377
|
-
"./td/index.ts": () => import("./index-
|
|
2378
|
-
"./tr/index.ts": () => import("./index-
|
|
2390
|
+
"./_field_/auto-complete/index.ts": () => import("./index-C5Z5DcwP.js").then((m) => m["default"]),
|
|
2391
|
+
"./_field_/datepicker/index.ts": () => import("./index-D6dtoM6l.js").then((m) => m["default"]),
|
|
2392
|
+
"./_field_/datetimepicker/index.ts": () => import("./index-Djsed3L4.js").then((m) => m["default"]),
|
|
2393
|
+
"./_field_/department/index.ts": () => import("./index-C8vcYrJ2.js").then((m) => m["default"]),
|
|
2394
|
+
"./_field_/enum-select/index.ts": () => import("./index-DNc82Cm4.js").then((m) => m["default"]),
|
|
2395
|
+
"./_field_/input/index.ts": () => import("./index-C_Wum5DS.js").then((m) => m["default"]),
|
|
2396
|
+
"./_field_/inputdouble/index.ts": () => import("./index-x19gmsid.js").then((m) => m["default"]),
|
|
2397
|
+
"./_field_/inputnumber/index.ts": () => import("./index-D9ZmqZVa.js").then((m) => m["default"]),
|
|
2398
|
+
"./_field_/rdo-select/index.ts": () => import("./index-Cli4afdv.js").then((m) => m["default"]),
|
|
2399
|
+
"./_field_/seal/index.ts": () => import("./index-DuRfWFNu.js").then((m) => m["default"]),
|
|
2400
|
+
"./_field_/select/index.ts": () => import("./index-CjjnjV4j.js").then((m) => m["default"]),
|
|
2401
|
+
"./_field_/sign/index.ts": () => import("./index-Cek24DHR.js").then((m) => m["default"]),
|
|
2402
|
+
"./_field_/switch/index.ts": () => import("./index-C0riszYt.js").then((m) => m["default"]),
|
|
2403
|
+
"./_field_/textarea/index.ts": () => import("./index-TTjH7nBY.js").then((m) => m["default"]),
|
|
2404
|
+
"./_field_/timepicker/index.ts": () => import("./index-c69w0WwG.js").then((m) => m["default"]),
|
|
2405
|
+
"./_field_/upload-file/index.ts": () => import("./index-CE0kTBaD.js").then((m) => m["default"]),
|
|
2406
|
+
"./_field_/upload-image/index.ts": () => import("./index-JOJRN3MY.js").then((m) => m["default"]),
|
|
2407
|
+
"./_field_/userpicker/index.ts": () => import("./index-CQxjpFgv.js").then((m) => m["default"]),
|
|
2408
|
+
"./_widget_/barcode/index.ts": () => import("./index-D3cPbNne.js").then((m) => m["default"]),
|
|
2409
|
+
"./_widget_/combine-fields/index.ts": () => import("./index-CqbuTaGQ.js").then((m) => m["default"]),
|
|
2410
|
+
"./_widget_/diagonal/index.ts": () => import("./index-fTuTQkkK.js").then((m) => m["default"]),
|
|
2411
|
+
"./_widget_/dyn-value/index.ts": () => import("./index-CBSkF7uO.js").then((m) => m["default"]),
|
|
2412
|
+
"./_widget_/image/index.ts": () => import("./index-D-WSp3EA.js").then((m) => m["default"]),
|
|
2413
|
+
"./_widget_/line/index.ts": () => import("./index-C6oivLbu.js").then((m) => m["default"]),
|
|
2414
|
+
"./_widget_/power/index.ts": () => import("./index-DozFqpk2.js").then((m) => m["default"]),
|
|
2415
|
+
"./_widget_/qrcode/index.ts": () => import("./index-DEMinegB.js").then((m) => m["default"]),
|
|
2416
|
+
"./_widget_/ro/index.ts": () => import("./index-B9hIqELW.js").then((m) => m["default"]),
|
|
2417
|
+
"./_widget_/serialnumber/index.ts": () => import("./index-YteSvWxT.js").then((m) => m["default"]),
|
|
2418
|
+
"./_widget_/sub-table/index.ts": () => import("./index-CpQiCEe7.js").then((m) => m["default"]),
|
|
2419
|
+
"./_widget_/timediff/index.ts": () => import("./index-PUFY8idd.js").then((m) => m["default"]),
|
|
2420
|
+
"./paper/index.ts": () => import("./index-Cmr9DRpz.js").then((m) => m["default"]),
|
|
2421
|
+
"./td/index.ts": () => import("./index-CTHjoZJh.js").then((m) => m["default"]),
|
|
2422
|
+
"./tr/index.ts": () => import("./index-JFbTpwJI.js").then((m) => m["default"])
|
|
2379
2423
|
});
|
|
2380
2424
|
return modules;
|
|
2381
2425
|
}
|
|
@@ -3591,6 +3635,45 @@ class ImgParser {
|
|
|
3591
3635
|
});
|
|
3592
3636
|
}
|
|
3593
3637
|
}
|
|
3638
|
+
function getCellFieldPlacements(paper2) {
|
|
3639
|
+
const placements = [];
|
|
3640
|
+
(paper2.cells ?? []).forEach((row, rowIndex) => {
|
|
3641
|
+
row.forEach((cell, colIndex) => {
|
|
3642
|
+
if (!cell) return;
|
|
3643
|
+
const x = colIndex + 1;
|
|
3644
|
+
const y = rowIndex + 1;
|
|
3645
|
+
const hidden = (paper2.mergedCells ?? []).some(
|
|
3646
|
+
(range2) => range2.l <= x && range2.r >= x && range2.t <= y && range2.b >= y && (range2.l !== x || range2.t !== y)
|
|
3647
|
+
);
|
|
3648
|
+
for (const content of [cell, ...cell.multiFieldsContent ?? []]) {
|
|
3649
|
+
if (content.type && content.type !== CellType.Field) continue;
|
|
3650
|
+
if (content.fieldMeta?.field) placements.push({ cell, content, hidden });
|
|
3651
|
+
}
|
|
3652
|
+
});
|
|
3653
|
+
});
|
|
3654
|
+
return placements;
|
|
3655
|
+
}
|
|
3656
|
+
function clearHiddenCellFieldPlacements(paper2, field) {
|
|
3657
|
+
const key = getBusinessFieldKey({
|
|
3658
|
+
modelKey: field.model ?? field.modelLink,
|
|
3659
|
+
fieldId: field.field
|
|
3660
|
+
});
|
|
3661
|
+
for (const { cell, content, hidden } of getCellFieldPlacements(paper2)) {
|
|
3662
|
+
if (!hidden) continue;
|
|
3663
|
+
const meta = content.fieldMeta;
|
|
3664
|
+
if (getBusinessFieldKey({ modelKey: meta.model ?? meta.modelLink, fieldId: meta.field }) !== key) {
|
|
3665
|
+
continue;
|
|
3666
|
+
}
|
|
3667
|
+
if (content === cell) {
|
|
3668
|
+
cell.type = CellType.Default;
|
|
3669
|
+
cell.fieldMeta = void 0;
|
|
3670
|
+
cell.fieldWidget = void 0;
|
|
3671
|
+
} else {
|
|
3672
|
+
const contents = cell.multiFieldsContent;
|
|
3673
|
+
contents.splice(contents.indexOf(content), 1);
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3594
3677
|
const Default_Apis = {
|
|
3595
3678
|
getFieldMetaList: api.apaas.fieldMeta.getList,
|
|
3596
3679
|
getModelMetaSubModelList: api.apaas.modelComprehensive.getSubModelList,
|
|
@@ -4110,8 +4193,8 @@ function normalizePaperGrid(paper2) {
|
|
|
4110
4193
|
paper2.fixedTables = (Array.isArray(paper2.fixedTables) ? paper2.fixedTables : []).map((table) => normalizeTable(table, rowCount, colCount)).filter((table) => !!table);
|
|
4111
4194
|
return paper2;
|
|
4112
4195
|
}
|
|
4113
|
-
const _hoisted_1$
|
|
4114
|
-
const _sfc_main$
|
|
4196
|
+
const _hoisted_1$3D = { class: "p24px" };
|
|
4197
|
+
const _sfc_main$6A = /* @__PURE__ */ defineComponent({
|
|
4115
4198
|
__name: "add-sheet",
|
|
4116
4199
|
props: {
|
|
4117
4200
|
modal: {},
|
|
@@ -4137,7 +4220,7 @@ const _sfc_main$6z = /* @__PURE__ */ defineComponent({
|
|
|
4137
4220
|
const _component_a_input = resolveComponent("a-input");
|
|
4138
4221
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
4139
4222
|
const _component_a_form = resolveComponent("a-form");
|
|
4140
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4223
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3D, [
|
|
4141
4224
|
createVNode(_component_a_form, {
|
|
4142
4225
|
ref_key: "formRef",
|
|
4143
4226
|
ref: formRef,
|
|
@@ -10032,21 +10115,18 @@ const designerSheetsSnapshot = () => sheetsData$1.value.map(({ sheetId, title, p
|
|
|
10032
10115
|
title,
|
|
10033
10116
|
paper: cloneDeep(paper2)
|
|
10034
10117
|
}));
|
|
10035
|
-
function getPlacedFieldCounts(sheets) {
|
|
10118
|
+
function getPlacedFieldCounts(sheets, includeHidden = false) {
|
|
10036
10119
|
const counts = /* @__PURE__ */ new Map();
|
|
10037
10120
|
sheets.forEach((sheet) => {
|
|
10038
|
-
(sheet.paper
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
10048
|
-
}
|
|
10049
|
-
});
|
|
10121
|
+
for (const { content, hidden } of getCellFieldPlacements(sheet.paper)) {
|
|
10122
|
+
if (hidden && !includeHidden) continue;
|
|
10123
|
+
const meta = content.fieldMeta;
|
|
10124
|
+
const key = getBusinessFieldKey({
|
|
10125
|
+
modelKey: meta.model ?? meta.modelLink,
|
|
10126
|
+
fieldId: meta.field
|
|
10127
|
+
});
|
|
10128
|
+
counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
10129
|
+
}
|
|
10050
10130
|
});
|
|
10051
10131
|
return counts;
|
|
10052
10132
|
}
|
|
@@ -10191,7 +10271,7 @@ const useAllSpreadSheets = () => {
|
|
|
10191
10271
|
return;
|
|
10192
10272
|
}
|
|
10193
10273
|
const res = await window.NocodeAdapter.utils.overlay.modal(
|
|
10194
|
-
_sfc_main$
|
|
10274
|
+
_sfc_main$6A,
|
|
10195
10275
|
{
|
|
10196
10276
|
data,
|
|
10197
10277
|
validator: (rule, value) => {
|
|
@@ -10314,7 +10394,7 @@ const useAllSpreadSheets = () => {
|
|
|
10314
10394
|
}
|
|
10315
10395
|
const names = /* @__PURE__ */ new Set();
|
|
10316
10396
|
let staticCellCount = 0;
|
|
10317
|
-
const savedFieldCounts = getPlacedFieldCounts(cloneSheetsData.value);
|
|
10397
|
+
const savedFieldCounts = getPlacedFieldCounts(cloneSheetsData.value, true);
|
|
10318
10398
|
const fieldOwners = /* @__PURE__ */ new Map();
|
|
10319
10399
|
const subTables = /* @__PURE__ */ new Map();
|
|
10320
10400
|
sheetsData$1.value.forEach((sheet) => {
|
|
@@ -10342,10 +10422,9 @@ const useAllSpreadSheets = () => {
|
|
|
10342
10422
|
}
|
|
10343
10423
|
fieldOwners.set(key, { sheetTitle: previous?.sheetTitle ?? sheet.title, count });
|
|
10344
10424
|
};
|
|
10345
|
-
(sheet.paper
|
|
10346
|
-
registerField(
|
|
10347
|
-
|
|
10348
|
-
});
|
|
10425
|
+
for (const { content, hidden } of getCellFieldPlacements(sheet.paper)) {
|
|
10426
|
+
if (!hidden) registerField(content);
|
|
10427
|
+
}
|
|
10349
10428
|
[...sheet.paper.dynamicTables ?? [], ...sheet.paper.fixedTables ?? []].forEach(
|
|
10350
10429
|
(table) => {
|
|
10351
10430
|
if (!table.field) return;
|
|
@@ -10616,7 +10695,7 @@ const useAllSpreadSheets = () => {
|
|
|
10616
10695
|
removeField: removeField2
|
|
10617
10696
|
};
|
|
10618
10697
|
};
|
|
10619
|
-
const _sfc_main$
|
|
10698
|
+
const _sfc_main$6z = /* @__PURE__ */ defineComponent({
|
|
10620
10699
|
__name: "table-modal",
|
|
10621
10700
|
props: {
|
|
10622
10701
|
type: { default: SubTableType.DEFAULT }
|
|
@@ -10820,7 +10899,7 @@ const _sfc_main$6y = /* @__PURE__ */ defineComponent({
|
|
|
10820
10899
|
};
|
|
10821
10900
|
}
|
|
10822
10901
|
});
|
|
10823
|
-
const _sfc_main$
|
|
10902
|
+
const _sfc_main$6y = /* @__PURE__ */ defineComponent({
|
|
10824
10903
|
__name: "thead-modal",
|
|
10825
10904
|
setup(__props) {
|
|
10826
10905
|
const { selection: selection2, paper: paper2, platformType: platformType2, isTextOnlineForm: isTextOnlineForm2 } = useSpreadSheet();
|
|
@@ -11371,7 +11450,7 @@ function parseHtml(html) {
|
|
|
11371
11450
|
mergedCells
|
|
11372
11451
|
};
|
|
11373
11452
|
}
|
|
11374
|
-
const _sfc_main$
|
|
11453
|
+
const _sfc_main$6x = /* @__PURE__ */ defineComponent({
|
|
11375
11454
|
__name: "field-edit-modal",
|
|
11376
11455
|
props: {
|
|
11377
11456
|
field: {}
|
|
@@ -11461,7 +11540,54 @@ const _sfc_main$6w = /* @__PURE__ */ defineComponent({
|
|
|
11461
11540
|
};
|
|
11462
11541
|
}
|
|
11463
11542
|
});
|
|
11464
|
-
const FieldEditModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
11543
|
+
const FieldEditModal = /* @__PURE__ */ _export_sfc(_sfc_main$6x, [["__scopeId", "data-v-1eaa22cd"]]);
|
|
11544
|
+
const _hoisted_1$3C = { class: "xlsx-import-summary" };
|
|
11545
|
+
const _hoisted_2$2x = { class: "xlsx-import-summary__warnings" };
|
|
11546
|
+
const _hoisted_3$1U = { class: "xlsx-import-summary__heading" };
|
|
11547
|
+
const _hoisted_4$1l = { class: "xlsx-import-summary__sheets" };
|
|
11548
|
+
const _sfc_main$6w = /* @__PURE__ */ defineComponent({
|
|
11549
|
+
__name: "xlsx-import-summary",
|
|
11550
|
+
props: {
|
|
11551
|
+
sheets: {},
|
|
11552
|
+
warnings: {}
|
|
11553
|
+
},
|
|
11554
|
+
setup(__props) {
|
|
11555
|
+
return (_ctx, _cache) => {
|
|
11556
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3C, [
|
|
11557
|
+
__props.warnings.length ? (openBlock(), createBlock(unref(Alert), {
|
|
11558
|
+
key: 0,
|
|
11559
|
+
type: "warning",
|
|
11560
|
+
"show-icon": ""
|
|
11561
|
+
}, {
|
|
11562
|
+
message: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
11563
|
+
createTextVNode("以下内容已做兼容处理,可以继续导入", -1)
|
|
11564
|
+
])]),
|
|
11565
|
+
description: withCtx(() => [
|
|
11566
|
+
createElementVNode("ul", _hoisted_2$2x, [
|
|
11567
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.warnings, (warning2, index2) => {
|
|
11568
|
+
return openBlock(), createElementBlock("li", { key: index2 }, toDisplayString$1(warning2), 1);
|
|
11569
|
+
}), 128))
|
|
11570
|
+
])
|
|
11571
|
+
]),
|
|
11572
|
+
_: 1
|
|
11573
|
+
})) : createCommentVNode("", true),
|
|
11574
|
+
createElementVNode("div", _hoisted_3$1U, "将导入 " + toDisplayString$1(__props.sheets.length) + " 个工作表", 1),
|
|
11575
|
+
createElementVNode("ul", _hoisted_4$1l, [
|
|
11576
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.sheets, (sheet) => {
|
|
11577
|
+
return openBlock(), createElementBlock("li", {
|
|
11578
|
+
key: sheet.title
|
|
11579
|
+
}, [
|
|
11580
|
+
createElementVNode("span", null, toDisplayString$1(sheet.title), 1),
|
|
11581
|
+
createElementVNode("span", null, toDisplayString$1(sheet.rows) + " 行 × " + toDisplayString$1(sheet.cols) + " 列 · " + toDisplayString$1(sheet.fields) + " 个字段绑定", 1)
|
|
11582
|
+
]);
|
|
11583
|
+
}), 128))
|
|
11584
|
+
]),
|
|
11585
|
+
_cache[1] || (_cache[1] = createElementVNode("p", { class: "xlsx-import-summary__replace" }, "导入后将替换当前设计稿,请确认以上处理结果。", -1))
|
|
11586
|
+
]);
|
|
11587
|
+
};
|
|
11588
|
+
}
|
|
11589
|
+
});
|
|
11590
|
+
const XlsxImportSummary = /* @__PURE__ */ _export_sfc(_sfc_main$6w, [["__scopeId", "data-v-e66e3c0e"]]);
|
|
11465
11591
|
let doc$1;
|
|
11466
11592
|
const topPublishVersions = ref$1([]);
|
|
11467
11593
|
const currentVersion = ref$1();
|
|
@@ -12453,7 +12579,7 @@ function useSpreadSheet() {
|
|
|
12453
12579
|
}
|
|
12454
12580
|
if (checkSelectionConflict(selection$1)) return;
|
|
12455
12581
|
const { ok, data } = await window.NocodeAdapter.utils.overlay.modal(
|
|
12456
|
-
_sfc_main$
|
|
12582
|
+
_sfc_main$6z,
|
|
12457
12583
|
{ type: type2 },
|
|
12458
12584
|
{ title: `添加${$t("sys.onlineForm.subTableType." + type2)}`, width: "640px" }
|
|
12459
12585
|
);
|
|
@@ -12525,7 +12651,7 @@ function useSpreadSheet() {
|
|
|
12525
12651
|
return;
|
|
12526
12652
|
}
|
|
12527
12653
|
const { ok, data } = await window.NocodeAdapter.utils.overlay.modal(
|
|
12528
|
-
_sfc_main$
|
|
12654
|
+
_sfc_main$6y,
|
|
12529
12655
|
{},
|
|
12530
12656
|
{
|
|
12531
12657
|
title: $t("sys.onlineForm.addHeader"),
|
|
@@ -12782,22 +12908,24 @@ function useSpreadSheet() {
|
|
|
12782
12908
|
const size = [w - padding.l - padding.r + "mm", paperHeight - padding.t - padding.b + "mm"];
|
|
12783
12909
|
const { modelMetaMap: modelMetaMap2, refreshModelFields: refreshModelFields2 } = useModelFields();
|
|
12784
12910
|
const keyList = (modelMetaMap2.value[doc.value.modelKey]?.fields ?? []).map((i) => i.key);
|
|
12785
|
-
const imported = await XlsxParser.xlsx2Sheets(file, payload?.withFields ? keyList : []
|
|
12911
|
+
const imported = await XlsxParser.xlsx2Sheets(file, payload?.withFields ? keyList : [], {
|
|
12912
|
+
withFields: !!payload?.withFields
|
|
12913
|
+
});
|
|
12786
12914
|
imported.sheets.forEach((sheet) => XlsxParser.contentFitToPaper(sheet.paper, size));
|
|
12787
12915
|
const confirmed = await new Promise((resolve) => {
|
|
12788
12916
|
Modal.confirm({
|
|
12789
12917
|
title: `确认替换为 ${imported.sheets.length} 个工作表`,
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
imported.sheets.map(
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
),
|
|
12800
|
-
okText:
|
|
12918
|
+
width: 680,
|
|
12919
|
+
content: h(XlsxImportSummary, {
|
|
12920
|
+
sheets: imported.sheets.map((sheet) => ({
|
|
12921
|
+
title: sheet.title,
|
|
12922
|
+
rows: sheet.paper.rows.length,
|
|
12923
|
+
cols: sheet.paper.cols.length,
|
|
12924
|
+
fields: sheet.paperFields.length
|
|
12925
|
+
})),
|
|
12926
|
+
warnings: imported.warnings
|
|
12927
|
+
}),
|
|
12928
|
+
okText: imported.warnings.length ? "继续导入" : "导入",
|
|
12801
12929
|
cancelText: $t("sys.cancel"),
|
|
12802
12930
|
zIndex: 2e3,
|
|
12803
12931
|
onOk: () => resolve(true),
|
|
@@ -12816,20 +12944,6 @@ function useSpreadSheet() {
|
|
|
12816
12944
|
}
|
|
12817
12945
|
return result;
|
|
12818
12946
|
};
|
|
12819
|
-
const importedFieldOwners = /* @__PURE__ */ new Map();
|
|
12820
|
-
imported.sheets.forEach((sheet) => {
|
|
12821
|
-
sheet.paperFields.forEach((field) => {
|
|
12822
|
-
const key = field.fieldKey || field.fieldName;
|
|
12823
|
-
if (!key) return;
|
|
12824
|
-
const owner = importedFieldOwners.get(key);
|
|
12825
|
-
if (owner) {
|
|
12826
|
-
throw new Error(
|
|
12827
|
-
`字段「${key}」重复出现(${owner}、${sheet.title}),同一字段只能导入一次`
|
|
12828
|
-
);
|
|
12829
|
-
}
|
|
12830
|
-
importedFieldOwners.set(key, sheet.title);
|
|
12831
|
-
});
|
|
12832
|
-
});
|
|
12833
12947
|
imported.fields?.forEach((item) => {
|
|
12834
12948
|
const { type: type2, key, name: rawName, required, uniqueConstraint, disabled } = item;
|
|
12835
12949
|
if (!key || !rawName) {
|
|
@@ -13243,6 +13357,7 @@ function useSpreadSheet() {
|
|
|
13243
13357
|
}
|
|
13244
13358
|
}
|
|
13245
13359
|
const fieldWidget = getFieldWidget2(bindField);
|
|
13360
|
+
sheetsData.value.forEach((sheet) => clearHiddenCellFieldPlacements(sheet.paper, bindField));
|
|
13246
13361
|
const content = {
|
|
13247
13362
|
type: CellType.Field,
|
|
13248
13363
|
fieldMeta: bindField,
|
|
@@ -14649,15 +14764,15 @@ const _sfc_main$6m = /* @__PURE__ */ defineComponent({
|
|
|
14649
14764
|
const value = computed(() => {
|
|
14650
14765
|
const dateWidget = props2.fieldWidget;
|
|
14651
14766
|
if (dateWidget.defaultSystemDate) {
|
|
14652
|
-
|
|
14653
|
-
return
|
|
14767
|
+
iconType.value === "time" ? "HH:mm:ss" : iconType.value === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
14768
|
+
return void 0;
|
|
14654
14769
|
}
|
|
14655
14770
|
const defaultValue = props2.fieldWidget.defaultValue;
|
|
14656
14771
|
if (defaultValue === FieldSysVarDefaultValueEnum.CURRENT_USER) {
|
|
14657
|
-
return
|
|
14772
|
+
return void 0;
|
|
14658
14773
|
}
|
|
14659
14774
|
if (defaultValue === FieldSysVarDefaultValueEnum.CURRENT_ORG) {
|
|
14660
|
-
return
|
|
14775
|
+
return void 0;
|
|
14661
14776
|
}
|
|
14662
14777
|
if (["fw:select", "fw:tree-select", "fw:rdo-select"].includes(props2.design ?? "fw:select")) {
|
|
14663
14778
|
return void 0;
|
|
@@ -14683,7 +14798,7 @@ const _sfc_main$6m = /* @__PURE__ */ defineComponent({
|
|
|
14683
14798
|
};
|
|
14684
14799
|
}
|
|
14685
14800
|
});
|
|
14686
|
-
const FakeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6m, [["__scopeId", "data-v-
|
|
14801
|
+
const FakeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6m, [["__scopeId", "data-v-a6a3e9c6"]]);
|
|
14687
14802
|
const _sfc_main$6l = /* @__PURE__ */ defineComponent({
|
|
14688
14803
|
__name: "radio-icon",
|
|
14689
14804
|
props: {
|
|
@@ -14789,6 +14904,12 @@ const _sfc_main$6j = /* @__PURE__ */ defineComponent({
|
|
|
14789
14904
|
}));
|
|
14790
14905
|
});
|
|
14791
14906
|
const selectedValues = computed(() => {
|
|
14907
|
+
const fieldType = props2.fieldMeta?.fieldType;
|
|
14908
|
+
if ([FIELD_TYPE.ENUM, FIELD_TYPE.ENUM_MULTI, FIELD_TYPE.OPTION, FIELD_TYPE.OPTION_MULTI].includes(
|
|
14909
|
+
fieldType
|
|
14910
|
+
)) {
|
|
14911
|
+
return [];
|
|
14912
|
+
}
|
|
14792
14913
|
if (isBoolean2.value) {
|
|
14793
14914
|
return [booleanWidget.value.defaultValue];
|
|
14794
14915
|
}
|
|
@@ -14884,7 +15005,7 @@ const _sfc_main$6j = /* @__PURE__ */ defineComponent({
|
|
|
14884
15005
|
};
|
|
14885
15006
|
}
|
|
14886
15007
|
});
|
|
14887
|
-
const FakeOptionSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6j, [["__scopeId", "data-v-
|
|
15008
|
+
const FakeOptionSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6j, [["__scopeId", "data-v-d12ad167"]]);
|
|
14888
15009
|
const FieldDesignComponents = {
|
|
14889
15010
|
"fw:input": FakeInput,
|
|
14890
15011
|
"fw:number": FakeNumberInput,
|
|
@@ -16062,7 +16183,7 @@ function asyncImportWidgetConfigList() {
|
|
|
16062
16183
|
return widgetConfigList;
|
|
16063
16184
|
}
|
|
16064
16185
|
function asyncImportWidgetDesign() {
|
|
16065
|
-
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-
|
|
16186
|
+
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-DNugznsd.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-BOutrCCv.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-C8Y7RdW8.js"), "./image/image-design.vue": () => import("./image-design-g9R_z-IY.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-CA-dxfST.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-z1CF36U7.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-BF9P4MgR.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-C92sT5qW.js"), "./text/text-design.vue": () => import("./text-design-0ye2Qkdm.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-D84T_Isx.js") });
|
|
16066
16187
|
const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
|
|
16067
16188
|
const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
|
|
16068
16189
|
if (mKey) {
|
|
@@ -39388,13 +39509,28 @@ function useDefaultValueOptions({ source, getFields, fetchPage }) {
|
|
|
39388
39509
|
const searchKeys = ["code_", "name_"].filter((key) => keys2.includes(key));
|
|
39389
39510
|
if (!searchKeys.length) keyword2.value = "";
|
|
39390
39511
|
const conditions = keyword2.value ? searchKeys.map((key) => `${key}.like`) : [];
|
|
39391
|
-
|
|
39512
|
+
if (modelKey === "em_device") {
|
|
39513
|
+
conditions.push("asset_number_.like");
|
|
39514
|
+
}
|
|
39515
|
+
let bodyData = {
|
|
39392
39516
|
pageNo: currentPage,
|
|
39393
39517
|
pageSize: PAGE_SIZE,
|
|
39394
39518
|
sorts: SORTS,
|
|
39395
39519
|
query: Object.fromEntries(conditions.map((key) => [key, keyword2.value])),
|
|
39396
39520
|
...conditions.length > 1 ? { exp: `OR(${conditions.join(",")})` } : {}
|
|
39397
|
-
}
|
|
39521
|
+
};
|
|
39522
|
+
if (modelKey === "em_device") {
|
|
39523
|
+
const { queryData, exp: deviceExp } = buildDeviceFilterQuery();
|
|
39524
|
+
bodyData = {
|
|
39525
|
+
...bodyData,
|
|
39526
|
+
query: {
|
|
39527
|
+
...queryData,
|
|
39528
|
+
...bodyData.query
|
|
39529
|
+
},
|
|
39530
|
+
exp: keyword2.value ? refUtils.splicingExp(deviceExp, bodyData.exp) : deviceExp
|
|
39531
|
+
};
|
|
39532
|
+
}
|
|
39533
|
+
const page = await fetchPage(modelKey, bodyData);
|
|
39398
39534
|
if (!isCurrent()) return;
|
|
39399
39535
|
if (!Array.isArray(page?.data)) throw new Error("Invalid default value page");
|
|
39400
39536
|
const merged = new Map(options.value.map((option2) => [option2.value, option2]));
|
|
@@ -39603,11 +39739,11 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39603
39739
|
FIELD_TYPE.SHOPFLOOR,
|
|
39604
39740
|
FIELD_TYPE.WAREHOUSE,
|
|
39605
39741
|
FIELD_TYPE.TARGET_WAREHOUSE,
|
|
39606
|
-
FIELD_TYPE.ROUTING_OPERATION
|
|
39607
|
-
FIELD_TYPE.NOT_GOOD_GROUP,
|
|
39608
|
-
FIELD_TYPE.NOT_GOOD_REASON,
|
|
39609
|
-
FIELD_TYPE.SCRAP_GROUP,
|
|
39610
|
-
FIELD_TYPE.SCRAP_REASON
|
|
39742
|
+
FIELD_TYPE.ROUTING_OPERATION
|
|
39743
|
+
// FIELD_TYPE.NOT_GOOD_GROUP,
|
|
39744
|
+
// FIELD_TYPE.NOT_GOOD_REASON,
|
|
39745
|
+
// FIELD_TYPE.SCRAP_GROUP,
|
|
39746
|
+
// FIELD_TYPE.SCRAP_REASON,
|
|
39611
39747
|
];
|
|
39612
39748
|
const defaultValueVisible = useDefaultValueVisibility(() => props2.fieldMeta);
|
|
39613
39749
|
const showType = computed(() => {
|
|
@@ -39617,6 +39753,19 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39617
39753
|
const isShowBizType = showTypes.includes(bizType);
|
|
39618
39754
|
return isShowType || isShowBizType;
|
|
39619
39755
|
});
|
|
39756
|
+
const typeBizMaps = {
|
|
39757
|
+
[FIELD_TYPE.ROUTING_OPERATION]: {
|
|
39758
|
+
bsKey: "biz_list_available_operations",
|
|
39759
|
+
body: {
|
|
39760
|
+
query: {
|
|
39761
|
+
type_: "NODE_SPEC"
|
|
39762
|
+
}
|
|
39763
|
+
}
|
|
39764
|
+
},
|
|
39765
|
+
[FIELD_TYPE.DEVICE]: {
|
|
39766
|
+
bsKey: "biz_form_device_search"
|
|
39767
|
+
}
|
|
39768
|
+
};
|
|
39620
39769
|
const { modelMetaMap: modelMetaMap2 } = useModelFields();
|
|
39621
39770
|
const {
|
|
39622
39771
|
options,
|
|
@@ -39648,10 +39797,22 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39648
39797
|
return fields.map((field) => field.key).filter((key) => !!key);
|
|
39649
39798
|
},
|
|
39650
39799
|
async fetchPage(modelKey, body) {
|
|
39800
|
+
const { fieldType, bizType } = props2.fieldMeta;
|
|
39801
|
+
const cusBiz = typeBizMaps[bizType || fieldType];
|
|
39651
39802
|
return await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
39652
|
-
{
|
|
39803
|
+
{
|
|
39804
|
+
modelCategory: "entity",
|
|
39805
|
+
modelKey,
|
|
39806
|
+
bsKey: cusBiz?.bsKey || "listByPage"
|
|
39807
|
+
},
|
|
39653
39808
|
{},
|
|
39654
|
-
|
|
39809
|
+
{
|
|
39810
|
+
...body,
|
|
39811
|
+
query: {
|
|
39812
|
+
...body.query || {},
|
|
39813
|
+
...cusBiz?.body?.query || {}
|
|
39814
|
+
}
|
|
39815
|
+
}
|
|
39655
39816
|
);
|
|
39656
39817
|
}
|
|
39657
39818
|
});
|
|
@@ -39700,6 +39861,7 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39700
39861
|
"default-active-first-option": false,
|
|
39701
39862
|
"label-in-value": "",
|
|
39702
39863
|
style: { "width": "100%" },
|
|
39864
|
+
allowClear: "",
|
|
39703
39865
|
onChange: handleChange,
|
|
39704
39866
|
onDropdownVisibleChange: unref(handleOpen),
|
|
39705
39867
|
onPopupScroll: unref(handleScroll),
|
|
@@ -39749,7 +39911,7 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39749
39911
|
};
|
|
39750
39912
|
}
|
|
39751
39913
|
});
|
|
39752
|
-
const DefaultValueSelectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4v, [["__scopeId", "data-v-
|
|
39914
|
+
const DefaultValueSelectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4v, [["__scopeId", "data-v-43b7850e"]]);
|
|
39753
39915
|
const _hoisted_1$2w = { class: "flex justify-between items-center" };
|
|
39754
39916
|
const _sfc_main$4u = /* @__PURE__ */ defineComponent({
|
|
39755
39917
|
__name: "ref-props",
|
|
@@ -55659,15 +55821,14 @@ const _sfc_main$3C = /* @__PURE__ */ defineComponent({
|
|
|
55659
55821
|
示例:PROCESSPARAMCHECK('gycs',灭菌参数) 返回 true`,
|
|
55660
55822
|
definition: "declare function PROCESSPARAMCHECK(key:string; value: number): Promise<boolean | null>;"
|
|
55661
55823
|
},
|
|
55662
|
-
{
|
|
55663
|
-
|
|
55664
|
-
|
|
55665
|
-
|
|
55666
|
-
|
|
55667
|
-
|
|
55668
|
-
|
|
55669
|
-
|
|
55670
|
-
},
|
|
55824
|
+
// {
|
|
55825
|
+
// id: 'DEVICEPARAMCHECK',
|
|
55826
|
+
// returnType: 'boolean',
|
|
55827
|
+
// args: ['id', 'key', 'value'],
|
|
55828
|
+
// desc: `DEVICEPARAMCHECK(设备字段,参数字段KEY,参数字段)\n根据表单填报的设备参数实际值,与该参数配置的上限和下限进行比较,判断参数是否合格。\n示例:DEVICEPARAMCHECK(设备字段,'sbcs',运行转速) 返回 true`,
|
|
55829
|
+
// definition:
|
|
55830
|
+
// 'declare function DEVICEPARAMCHECK(id:string; key:string, value: number): Promise<boolean | null>;',
|
|
55831
|
+
// },
|
|
55671
55832
|
{
|
|
55672
55833
|
id: "INSPECTIONPARAMCHECK",
|
|
55673
55834
|
returnType: "boolean",
|
|
@@ -55875,7 +56036,7 @@ const _sfc_main$3C = /* @__PURE__ */ defineComponent({
|
|
|
55875
56036
|
};
|
|
55876
56037
|
}
|
|
55877
56038
|
});
|
|
55878
|
-
const addDependencyModal = /* @__PURE__ */ _export_sfc(_sfc_main$3C, [["__scopeId", "data-v-
|
|
56039
|
+
const addDependencyModal = /* @__PURE__ */ _export_sfc(_sfc_main$3C, [["__scopeId", "data-v-eec1bc1b"]]);
|
|
55879
56040
|
const _hoisted_1$29 = { class: "text-[#C3C3C3] text-12px mb8px" };
|
|
55880
56041
|
const _hoisted_2$1y = { class: "ks-row" };
|
|
55881
56042
|
const _hoisted_3$1c = { class: "mr-auto" };
|
|
@@ -56640,7 +56801,7 @@ const _sfc_main$3v = /* @__PURE__ */ defineComponent({
|
|
|
56640
56801
|
}
|
|
56641
56802
|
});
|
|
56642
56803
|
function asyncImportWidgetProp() {
|
|
56643
|
-
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-
|
|
56804
|
+
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-D0VKq_RH.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-B4-YeaS-.js"), "./widget-image.vue": () => import("./widget-image-CnOxfH66.js"), "./widget-line.vue": () => import("./widget-line-C-RWHAjB.js"), "./widget-pagination.vue": () => import("./widget-pagination-CdkML1ma.js"), "./widget-power.vue": () => import("./widget-power-CLg0Ov4-.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-Bo_PZVS3.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-vmFExwlR.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-DUCvkD2p.js"), "./widget-text.vue": () => import("./widget-text-CwSG4P5w.js"), "./widget-timediff.vue": () => import("./widget-timediff-CenBgqXn.js") });
|
|
56644
56805
|
const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
|
|
56645
56806
|
const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
|
|
56646
56807
|
if (mKey) {
|
|
@@ -66239,7 +66400,7 @@ const _sfc_main$2y = /* @__PURE__ */ defineComponent({
|
|
|
66239
66400
|
onSelect: onClearAll
|
|
66240
66401
|
}, null, 8, ["value"]),
|
|
66241
66402
|
_cache[9] || (_cache[9] = createElementVNode("div", { class: "split" }, null, -1)),
|
|
66242
|
-
joinModelType.value === unref(JoinModelTypeEum).FormModel ? (openBlock(), createBlock(unref(_sfc_main$
|
|
66403
|
+
joinModelType.value === unref(JoinModelTypeEum).FormModel ? (openBlock(), createBlock(unref(_sfc_main$6B), {
|
|
66243
66404
|
key: 0,
|
|
66244
66405
|
class: "custom-select",
|
|
66245
66406
|
placeholder: _ctx.$t("sys.cardDesign.form.modelRequired"),
|
|
@@ -69668,23 +69829,11 @@ const _sfc_main$2e = /* @__PURE__ */ defineComponent({
|
|
|
69668
69829
|
keyword: void 0
|
|
69669
69830
|
});
|
|
69670
69831
|
const manualInputValue = computed(() => String(searchForm.value.keyword ?? "").trim());
|
|
69671
|
-
const searchField = [
|
|
69672
|
-
"name_.like",
|
|
69673
|
-
"product_id_code_.like",
|
|
69674
|
-
"product_id_name_.like",
|
|
69675
|
-
"spec_.like"
|
|
69676
|
-
];
|
|
69677
69832
|
const fetcher = async ({ keyword: keyword2 = "", pageNo, pageSize: pageSize2 }) => {
|
|
69678
|
-
const queryData
|
|
69679
|
-
total[fieldKey.includes(".") ? fieldKey : `${fieldKey}.like`] = keyword2;
|
|
69680
|
-
return total;
|
|
69681
|
-
}, {}) : {};
|
|
69833
|
+
const { queryData, exp } = buildMaterialLotListQuery(keyword2, props2.extraQuery);
|
|
69682
69834
|
const res = await renderUtils.requestMaterialLotOptions({
|
|
69683
|
-
exp
|
|
69684
|
-
queryData
|
|
69685
|
-
...queryData,
|
|
69686
|
-
...props2.extraQuery
|
|
69687
|
-
},
|
|
69835
|
+
exp,
|
|
69836
|
+
queryData,
|
|
69688
69837
|
pageNo,
|
|
69689
69838
|
pageSize: pageSize2
|
|
69690
69839
|
});
|
|
@@ -69812,7 +69961,7 @@ const _sfc_main$2e = /* @__PURE__ */ defineComponent({
|
|
|
69812
69961
|
};
|
|
69813
69962
|
}
|
|
69814
69963
|
});
|
|
69815
|
-
const MaterialLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["__scopeId", "data-v-
|
|
69964
|
+
const MaterialLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["__scopeId", "data-v-be7eefec"]]);
|
|
69816
69965
|
const _sfc_main$2d = /* @__PURE__ */ defineComponent({
|
|
69817
69966
|
__name: "trace-material-lot-select",
|
|
69818
69967
|
props: {
|
|
@@ -74298,7 +74447,7 @@ const VuePdf = /* @__PURE__ */ defineComponent({
|
|
|
74298
74447
|
}
|
|
74299
74448
|
});
|
|
74300
74449
|
const VueVideoPlayer = defineAsyncComponent(
|
|
74301
|
-
() => import("./VueVideoPlayer-
|
|
74450
|
+
() => import("./VueVideoPlayer-BTRWrHgw.js")
|
|
74302
74451
|
);
|
|
74303
74452
|
const _hoisted_1$18 = {
|
|
74304
74453
|
key: 0,
|
|
@@ -77895,12 +78044,8 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
|
77895
78044
|
...props2.widget,
|
|
77896
78045
|
props: {
|
|
77897
78046
|
...props2.widget.props,
|
|
77898
|
-
displayFields: [
|
|
77899
|
-
{ key: "code_", name: $t("sys.edhr.field.code") }
|
|
77900
|
-
{ key: "product_id_name_", name: "产品名称" },
|
|
77901
|
-
{ key: "product_id_code_", name: "产品编码" },
|
|
77902
|
-
{ key: "product_id_spec_", name: "产品规格" },
|
|
77903
|
-
{ key: "qty_", name: "数量" }
|
|
78047
|
+
displayFields: props2.widget.props.displayFields ?? [
|
|
78048
|
+
{ key: "code_", name: $t("sys.edhr.field.code") }
|
|
77904
78049
|
],
|
|
77905
78050
|
quickSearchable: true,
|
|
77906
78051
|
quickSearchField,
|
|
@@ -78153,7 +78298,7 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
|
78153
78298
|
};
|
|
78154
78299
|
}
|
|
78155
78300
|
});
|
|
78156
|
-
const selectRender = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-
|
|
78301
|
+
const selectRender = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-b2337210"]]);
|
|
78157
78302
|
const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
78158
78303
|
__proto__: null,
|
|
78159
78304
|
default: selectRender
|
|
@@ -84533,6 +84678,8 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
|
84533
84678
|
default: withCtx(() => [
|
|
84534
84679
|
createVNode(unref(CellMedia), {
|
|
84535
84680
|
class: normalizeClass([
|
|
84681
|
+
"image-cell-content",
|
|
84682
|
+
images.value.length && isAdaptive.value && "is-adaptive",
|
|
84536
84683
|
!images.value.length && unref(showRequired) && "is-show-required",
|
|
84537
84684
|
unref(realFieldId),
|
|
84538
84685
|
unref(showDisplayStatus),
|
|
@@ -84593,7 +84740,7 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
|
84593
84740
|
};
|
|
84594
84741
|
}
|
|
84595
84742
|
});
|
|
84596
|
-
const uploadImageRender = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["__scopeId", "data-v-
|
|
84743
|
+
const uploadImageRender = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["__scopeId", "data-v-8a9e24fe"]]);
|
|
84597
84744
|
const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
84598
84745
|
__proto__: null,
|
|
84599
84746
|
default: uploadImageRender
|
|
@@ -95814,8 +95961,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
95814
95961
|
printTask = (async () => {
|
|
95815
95962
|
if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
|
|
95816
95963
|
await nextTick();
|
|
95817
|
-
const { printRuntimeInstance } = await import("./print-runtime-instance-
|
|
95818
|
-
const { default: renderer } = await import("./print-snapshot-renderer-
|
|
95964
|
+
const { printRuntimeInstance } = await import("./print-runtime-instance-Df03RTCq.js");
|
|
95965
|
+
const { default: renderer } = await import("./print-snapshot-renderer-CifB67Uu.js");
|
|
95819
95966
|
if (abort.signal.aborted) throw new Error("打印已取消");
|
|
95820
95967
|
printRenderer.value = markRaw(renderer);
|
|
95821
95968
|
await printRuntimeInstance(
|
|
@@ -95962,7 +96109,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
95962
96109
|
provide(NCB_PROVIDE.RUNTIME_INSTANCE_REGISTRY, runtimeRegistry);
|
|
95963
96110
|
initWebPaasUploadApis();
|
|
95964
96111
|
return (_ctx, _cache) => {
|
|
95965
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
96112
|
+
return openBlock(), createBlock(unref(_sfc_main$6C), {
|
|
95966
96113
|
loading: __props.loading,
|
|
95967
96114
|
"has-data": __props.hasData,
|
|
95968
96115
|
error: unref(runtimeRegistry).loadState.error?.message
|