@gct-paas/excel 0.1.40-beta.21 → 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-CWYhEmYn.js → BaseComponent-0BP8yUp3.js} +2 -2
- package/dist/{VueVideoPlayer-D5zE_mXQ.js → VueVideoPlayer-BTRWrHgw.js} +2 -2
- package/dist/{align-editor-C2fibWP5.js → align-editor-ssy7gJsD.js} +1 -1
- package/dist/{barcode-design-l3rdfj4B.js → barcode-design-BOutrCCv.js} +2 -2
- package/dist/base/index.es.js +83 -83
- package/dist/{diagonal-design-BPLxs9ji.js → diagonal-design-C8Y7RdW8.js} +2 -2
- package/dist/{dynamic-table-action-D-e5iLib.js → dynamic-table-action-DLctOchz.js} +3 -3
- 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-CyjI4C57.js → exceljs.min-CbCAYZ_e.js} +2 -2
- package/dist/{font-editor-CGSk5kFM.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-BBnCJHvC.js → index-BIm_YKSw.js} +344 -198
- package/dist/{index-C03h1mdc.js → index-C0riszYt.js} +4 -4
- package/dist/{index-SsQpzWJV.js → index-C5Z5DcwP.js} +3 -3
- package/dist/{index-DpCJBo9U.js → index-C6oivLbu.js} +1 -1
- package/dist/{index-Cbfa0l4P.js → index-C8vcYrJ2.js} +2 -2
- package/dist/{index-DOKlk-Nf.js → index-CBSkF7uO.js} +2 -2
- package/dist/{index-D9jgkb7e.js → index-CE0kTBaD.js} +2 -2
- package/dist/{index-BCl6C48o.js → index-CQxjpFgv.js} +2 -2
- package/dist/{index-DU5m20W6.js → index-CTHjoZJh.js} +3 -3
- package/dist/{index-WGbD1Pm6.js → index-C_Wum5DS.js} +2 -2
- package/dist/{index-DphJXlye.js → index-Cek24DHR.js} +2 -2
- package/dist/{index-DgcqMrSq.js → index-CjjnjV4j.js} +6 -3
- package/dist/{index-4b7WInws.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-DSTGDFEt.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-BTvFf_Od.js → index-D6dtoM6l.js} +2 -2
- package/dist/{index-v-rdo6ME.js → index-D9ZmqZVa.js} +2 -2
- package/dist/{index-C4cVVxUT.js → index-DEMinegB.js} +1 -1
- package/dist/{index-_lobWWTu.js → index-DNc82Cm4.js} +3 -3
- package/dist/{index-CJZP3Y8A.js → index-Djsed3L4.js} +2 -2
- package/dist/{index-CjK1DtkT.js → index-DozFqpk2.js} +1 -1
- package/dist/{index-CrNQ4fzl.js → index-DuRfWFNu.js} +3 -3
- package/dist/{index-D6YZXtdZ.js → index-JFbTpwJI.js} +2 -2
- package/dist/{index-CCAULEff.js → index-JOJRN3MY.js} +2 -2
- package/dist/{index-DHBkzfbv.js → index-PUFY8idd.js} +1 -1
- package/dist/{index-DNODemiT.js → index-TTjH7nBY.js} +2 -2
- package/dist/{index-BOOwVQlO.js → index-YteSvWxT.js} +1 -1
- package/dist/{index-Ddsrowty.js → index-c69w0WwG.js} +2 -2
- package/dist/{index-8ar-Bsw7.js → index-fTuTQkkK.js} +2 -2
- package/dist/{index-CxthKExE.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-DGqFvJxx.js → pagination-design-CA-dxfST.js} +2 -2
- package/dist/paper-widget-design-z1CF36U7.js +4 -0
- package/dist/{print-runtime-instance-D4Pj5Qhr.js → print-runtime-instance-Df03RTCq.js} +1 -1
- package/dist/{print-snapshot-renderer-De-pf1K_.js → print-snapshot-renderer-CifB67Uu.js} +3 -3
- package/dist/{qrcode-design-Ck2_tB4Q.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-Q1xjuTpb.js → single-field-drop-CzMkcDOQ.js} +2 -2
- package/dist/{size-editor-CeB5cXTJ.js → size-editor-JdHGylGx.js} +1 -1
- 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-DFQip2cb.js → sub-table-factory-BUKjHjsJ.js} +9 -13
- package/dist/{text-design-CPMzgWXN.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-DIsU2-KV.js → trace-like-wrapper-B8ZB0cEY.js} +5 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-Dv47SN2Z.js → value-editor.vue_vue_type_style_index_0_lang-C7aAgLHW.js} +2 -2
- package/dist/{widget-barcode-CHBw2stC.js → widget-barcode-D0VKq_RH.js} +4 -4
- package/dist/{widget-diagonal-NClGO5Rn.js → widget-diagonal-B4-YeaS-.js} +3 -3
- package/dist/{widget-image-_Nb1X3Xz.js → widget-image-CnOxfH66.js} +4 -4
- package/dist/{widget-line-Bipjn0YA.js → widget-line-C-RWHAjB.js} +2 -2
- package/dist/{widget-pagination-B_Pse1Fh.js → widget-pagination-CdkML1ma.js} +5 -5
- package/dist/{widget-power-DKccfSH2.js → widget-power-CLg0Ov4-.js} +3 -3
- package/dist/{widget-qrcode-D-9tBxgw.js → widget-qrcode-Bo_PZVS3.js} +3 -3
- package/dist/{widget-rangelimit-BpOZXTEa.js → widget-rangelimit-vmFExwlR.js} +3 -3
- package/dist/{widget-serialnumber-zGQ-Z_UV.js → widget-serialnumber-DUCvkD2p.js} +1 -1
- package/dist/{widget-text-CVJ1-3y3.js → widget-text-CwSG4P5w.js} +5 -5
- package/dist/{widget-timediff-CBonTDnJ.js → widget-timediff-CenBgqXn.js} +2 -2
- package/package.json +1 -1
- package/dist/paper-widget-design-DrRVelBu.js +0 -4
- package/dist/seal-design-DjQNPduq.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";
|
|
@@ -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-CbCAYZ_e.js").then((n) => n.e)).default;
|
|
2020
2020
|
return new ExcelJs.Workbook();
|
|
2021
2021
|
}
|
|
2022
2022
|
class XlsxParser {
|
|
@@ -2042,66 +2042,95 @@ class XlsxParser {
|
|
|
2042
2042
|
});
|
|
2043
2043
|
return paperFields;
|
|
2044
2044
|
}
|
|
2045
|
-
static async xlsx2Sheets(file, keyList = []) {
|
|
2045
|
+
static async xlsx2Sheets(file, keyList = [], options = {}) {
|
|
2046
2046
|
const workbook = await createWorkbook();
|
|
2047
2047
|
const xlsxData = await workbook.xlsx.load(file);
|
|
2048
|
+
const warnings = [];
|
|
2048
2049
|
const fieldSheetName = $t("sys.onlineForm.formFields");
|
|
2049
2050
|
const fieldSheet = workbook.getWorksheet(fieldSheetName);
|
|
2050
|
-
const
|
|
2051
|
+
const withFields = options.withFields !== false;
|
|
2052
|
+
const fields = withFields && fieldSheet ? XlsxParser.sheetToFields(fieldSheet, keyList, warnings) : null;
|
|
2051
2053
|
const candidates = workbook.worksheets.filter((sheet) => sheet.name !== fieldSheetName);
|
|
2052
2054
|
const hidden = candidates.filter(
|
|
2053
2055
|
(sheet) => sheet.state === "hidden" || sheet.state === "veryHidden"
|
|
2054
2056
|
);
|
|
2055
2057
|
if (hidden.length) {
|
|
2056
|
-
|
|
2058
|
+
warnings.push(`已跳过隐藏工作表:${hidden.map((sheet) => sheet.name).join("、")}。`);
|
|
2057
2059
|
}
|
|
2058
|
-
|
|
2059
|
-
if (
|
|
2060
|
-
|
|
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
|
+
);
|
|
2061
2066
|
}
|
|
2062
2067
|
const names = /* @__PURE__ */ new Set();
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
);
|
|
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}」。`);
|
|
2069
2085
|
}
|
|
2070
|
-
if (names.has(title)) throw new Error(`工作表名称重复:${title}`);
|
|
2071
2086
|
names.add(title);
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
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 格)。`
|
|
2077
2097
|
);
|
|
2078
2098
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
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++;
|
|
2084
2107
|
}
|
|
2085
2108
|
});
|
|
2086
2109
|
});
|
|
2087
|
-
if (
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
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 };
|
|
2101
2130
|
}
|
|
2102
|
-
static sheetToPaper(paperSheet, xlsxData) {
|
|
2103
|
-
const SheetRowCount = Math.min(paperSheet.dimensions?.bottom ??
|
|
2104
|
-
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));
|
|
2105
2134
|
const paper2 = {};
|
|
2106
2135
|
const { defaultRowHeight, defaultColWidth } = paperSheet.properties;
|
|
2107
2136
|
const defaultRowHeightPx = parseInt(src(`${defaultRowHeight}pt`));
|
|
@@ -2115,7 +2144,7 @@ class XlsxParser {
|
|
|
2115
2144
|
paper2.rows = rows;
|
|
2116
2145
|
const cols = [];
|
|
2117
2146
|
Array(SheetColCount).fill("").forEach((c, i) => {
|
|
2118
|
-
const
|
|
2147
|
+
const width = paperSheet.columns?.[i]?.width;
|
|
2119
2148
|
const _w = width ?? defaultColWidth;
|
|
2120
2149
|
cols.push({
|
|
2121
2150
|
// width: _w === undefined ? 80 : Math.floor(_w * 7 + 5),
|
|
@@ -2131,7 +2160,7 @@ class XlsxParser {
|
|
|
2131
2160
|
Array(SheetColCount).fill("").forEach((_2, colIndex) => {
|
|
2132
2161
|
const cell = paperSheet._rows[rowIndex]._cells[colIndex];
|
|
2133
2162
|
if (!cell) return;
|
|
2134
|
-
const { alignment,
|
|
2163
|
+
const { alignment, fill, font } = cell.style;
|
|
2135
2164
|
const cellName = cell._address;
|
|
2136
2165
|
const cellStyle = {
|
|
2137
2166
|
"text-align": alignment?.horizontal ?? "left",
|
|
@@ -2147,7 +2176,10 @@ class XlsxParser {
|
|
|
2147
2176
|
cells[rowIndex][colIndex].style = cellStyle;
|
|
2148
2177
|
if (cellName !== cell.master.address) return;
|
|
2149
2178
|
let cellValue = "";
|
|
2150
|
-
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") {
|
|
2151
2183
|
cellValue = cell.value;
|
|
2152
2184
|
} else if (typeof cell.text !== "object") {
|
|
2153
2185
|
cellValue = cell.text;
|
|
@@ -2174,10 +2206,10 @@ class XlsxParser {
|
|
|
2174
2206
|
const cell = paperSheet._rows[rowIndex]._cells[colIndex];
|
|
2175
2207
|
if (!cell) return;
|
|
2176
2208
|
const { border } = cell.style;
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
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);
|
|
2181
2213
|
});
|
|
2182
2214
|
});
|
|
2183
2215
|
const medias = (xlsxData.media ?? []).map((m) => {
|
|
@@ -2199,6 +2231,7 @@ class XlsxParser {
|
|
|
2199
2231
|
const tlNativeCol = range2?.tl?.nativeCol ?? 0;
|
|
2200
2232
|
const brNativeRow = range2?.br?.nativeRow ?? tlNativeRow;
|
|
2201
2233
|
const brNativeCol = range2?.br?.nativeCol ?? tlNativeCol;
|
|
2234
|
+
if (tlNativeRow >= SheetRowCount || tlNativeCol >= SheetColCount) return;
|
|
2202
2235
|
const rowSpan = Math.max(0, brNativeRow - tlNativeRow);
|
|
2203
2236
|
const colSpan = Math.max(0, brNativeCol - tlNativeCol);
|
|
2204
2237
|
const imageLayout = {
|
|
@@ -2245,12 +2278,12 @@ class XlsxParser {
|
|
|
2245
2278
|
* @param sheet
|
|
2246
2279
|
* @returns
|
|
2247
2280
|
*/
|
|
2248
|
-
static sheetToFields(sheet, keyList) {
|
|
2281
|
+
static sheetToFields(sheet, keyList, warnings = []) {
|
|
2249
2282
|
const SheetRowCount = Math.min(sheet.rowCount, 300);
|
|
2250
2283
|
const SheetColCount = Math.min(sheet.columnCount, 10);
|
|
2251
2284
|
const colFieldPropMap = /* @__PURE__ */ new Map();
|
|
2252
2285
|
Array(SheetColCount).fill("").forEach((_, colIndex) => {
|
|
2253
|
-
const cell = sheet._rows[0]
|
|
2286
|
+
const cell = sheet._rows[0]?._cells[colIndex];
|
|
2254
2287
|
const fieldProp = FieldPropLabels.find(
|
|
2255
2288
|
(f) => f[1] === (cell?.text ?? "").replaceAll("*", "").trim()
|
|
2256
2289
|
);
|
|
@@ -2258,6 +2291,12 @@ class XlsxParser {
|
|
|
2258
2291
|
colFieldPropMap.set(colIndex, fieldProp[0]);
|
|
2259
2292
|
}
|
|
2260
2293
|
});
|
|
2294
|
+
if (![...colFieldPropMap.values()].includes("key") || ![...colFieldPropMap.values()].includes("name")) {
|
|
2295
|
+
warnings.push(
|
|
2296
|
+
`工作表「${sheet.name}」缺少字段标识或名称表头,已忽略字段配置,保留表单文本。`
|
|
2297
|
+
);
|
|
2298
|
+
return [];
|
|
2299
|
+
}
|
|
2261
2300
|
const fields = [];
|
|
2262
2301
|
Array(SheetRowCount).fill("").forEach((_, rowIndex) => {
|
|
2263
2302
|
if (rowIndex === 0) return;
|
|
@@ -2269,6 +2308,10 @@ class XlsxParser {
|
|
|
2269
2308
|
field[colFieldPropMap.get(colIndex)] = cell?.text ?? "";
|
|
2270
2309
|
}
|
|
2271
2310
|
});
|
|
2311
|
+
if (!field.key || !field.name) {
|
|
2312
|
+
warnings.push(`字段配置第 ${rowIndex + 1} 行缺少字段标识或名称,已跳过该行。`);
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2272
2315
|
fields.push(field);
|
|
2273
2316
|
});
|
|
2274
2317
|
const cloneKeyList = [...keyList];
|
|
@@ -2344,39 +2387,39 @@ class XlsxParser {
|
|
|
2344
2387
|
}
|
|
2345
2388
|
function asyncImportClassModules() {
|
|
2346
2389
|
const modules = /* @__PURE__ */ Object.assign({
|
|
2347
|
-
"./_field_/auto-complete/index.ts": () => import("./index-
|
|
2348
|
-
"./_field_/datepicker/index.ts": () => import("./index-
|
|
2349
|
-
"./_field_/datetimepicker/index.ts": () => import("./index-
|
|
2350
|
-
"./_field_/department/index.ts": () => import("./index-
|
|
2351
|
-
"./_field_/enum-select/index.ts": () => import("./index-
|
|
2352
|
-
"./_field_/input/index.ts": () => import("./index-
|
|
2353
|
-
"./_field_/inputdouble/index.ts": () => import("./index-
|
|
2354
|
-
"./_field_/inputnumber/index.ts": () => import("./index-
|
|
2355
|
-
"./_field_/rdo-select/index.ts": () => import("./index-
|
|
2356
|
-
"./_field_/seal/index.ts": () => import("./index-
|
|
2357
|
-
"./_field_/select/index.ts": () => import("./index-
|
|
2358
|
-
"./_field_/sign/index.ts": () => import("./index-
|
|
2359
|
-
"./_field_/switch/index.ts": () => import("./index-
|
|
2360
|
-
"./_field_/textarea/index.ts": () => import("./index-
|
|
2361
|
-
"./_field_/timepicker/index.ts": () => import("./index-
|
|
2362
|
-
"./_field_/upload-file/index.ts": () => import("./index-
|
|
2363
|
-
"./_field_/upload-image/index.ts": () => import("./index-
|
|
2364
|
-
"./_field_/userpicker/index.ts": () => import("./index-
|
|
2365
|
-
"./_widget_/barcode/index.ts": () => import("./index-
|
|
2366
|
-
"./_widget_/combine-fields/index.ts": () => import("./index-
|
|
2367
|
-
"./_widget_/diagonal/index.ts": () => import("./index-
|
|
2368
|
-
"./_widget_/dyn-value/index.ts": () => import("./index-
|
|
2369
|
-
"./_widget_/image/index.ts": () => import("./index
|
|
2370
|
-
"./_widget_/line/index.ts": () => import("./index-
|
|
2371
|
-
"./_widget_/power/index.ts": () => import("./index-
|
|
2372
|
-
"./_widget_/qrcode/index.ts": () => import("./index-
|
|
2373
|
-
"./_widget_/ro/index.ts": () => import("./index-
|
|
2374
|
-
"./_widget_/serialnumber/index.ts": () => import("./index-
|
|
2375
|
-
"./_widget_/sub-table/index.ts": () => import("./index-
|
|
2376
|
-
"./_widget_/timediff/index.ts": () => import("./index-
|
|
2377
|
-
"./paper/index.ts": () => import("./index-
|
|
2378
|
-
"./td/index.ts": () => import("./index-
|
|
2379
|
-
"./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"])
|
|
2380
2423
|
});
|
|
2381
2424
|
return modules;
|
|
2382
2425
|
}
|
|
@@ -3592,6 +3635,45 @@ class ImgParser {
|
|
|
3592
3635
|
});
|
|
3593
3636
|
}
|
|
3594
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
|
+
}
|
|
3595
3677
|
const Default_Apis = {
|
|
3596
3678
|
getFieldMetaList: api.apaas.fieldMeta.getList,
|
|
3597
3679
|
getModelMetaSubModelList: api.apaas.modelComprehensive.getSubModelList,
|
|
@@ -4111,8 +4193,8 @@ function normalizePaperGrid(paper2) {
|
|
|
4111
4193
|
paper2.fixedTables = (Array.isArray(paper2.fixedTables) ? paper2.fixedTables : []).map((table) => normalizeTable(table, rowCount, colCount)).filter((table) => !!table);
|
|
4112
4194
|
return paper2;
|
|
4113
4195
|
}
|
|
4114
|
-
const _hoisted_1$
|
|
4115
|
-
const _sfc_main$
|
|
4196
|
+
const _hoisted_1$3D = { class: "p24px" };
|
|
4197
|
+
const _sfc_main$6A = /* @__PURE__ */ defineComponent({
|
|
4116
4198
|
__name: "add-sheet",
|
|
4117
4199
|
props: {
|
|
4118
4200
|
modal: {},
|
|
@@ -4138,7 +4220,7 @@ const _sfc_main$6z = /* @__PURE__ */ defineComponent({
|
|
|
4138
4220
|
const _component_a_input = resolveComponent("a-input");
|
|
4139
4221
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
4140
4222
|
const _component_a_form = resolveComponent("a-form");
|
|
4141
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4223
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3D, [
|
|
4142
4224
|
createVNode(_component_a_form, {
|
|
4143
4225
|
ref_key: "formRef",
|
|
4144
4226
|
ref: formRef,
|
|
@@ -10033,21 +10115,18 @@ const designerSheetsSnapshot = () => sheetsData$1.value.map(({ sheetId, title, p
|
|
|
10033
10115
|
title,
|
|
10034
10116
|
paper: cloneDeep(paper2)
|
|
10035
10117
|
}));
|
|
10036
|
-
function getPlacedFieldCounts(sheets) {
|
|
10118
|
+
function getPlacedFieldCounts(sheets, includeHidden = false) {
|
|
10037
10119
|
const counts = /* @__PURE__ */ new Map();
|
|
10038
10120
|
sheets.forEach((sheet) => {
|
|
10039
|
-
(sheet.paper
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
10049
|
-
}
|
|
10050
|
-
});
|
|
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
|
+
}
|
|
10051
10130
|
});
|
|
10052
10131
|
return counts;
|
|
10053
10132
|
}
|
|
@@ -10192,7 +10271,7 @@ const useAllSpreadSheets = () => {
|
|
|
10192
10271
|
return;
|
|
10193
10272
|
}
|
|
10194
10273
|
const res = await window.NocodeAdapter.utils.overlay.modal(
|
|
10195
|
-
_sfc_main$
|
|
10274
|
+
_sfc_main$6A,
|
|
10196
10275
|
{
|
|
10197
10276
|
data,
|
|
10198
10277
|
validator: (rule, value) => {
|
|
@@ -10315,7 +10394,7 @@ const useAllSpreadSheets = () => {
|
|
|
10315
10394
|
}
|
|
10316
10395
|
const names = /* @__PURE__ */ new Set();
|
|
10317
10396
|
let staticCellCount = 0;
|
|
10318
|
-
const savedFieldCounts = getPlacedFieldCounts(cloneSheetsData.value);
|
|
10397
|
+
const savedFieldCounts = getPlacedFieldCounts(cloneSheetsData.value, true);
|
|
10319
10398
|
const fieldOwners = /* @__PURE__ */ new Map();
|
|
10320
10399
|
const subTables = /* @__PURE__ */ new Map();
|
|
10321
10400
|
sheetsData$1.value.forEach((sheet) => {
|
|
@@ -10343,10 +10422,9 @@ const useAllSpreadSheets = () => {
|
|
|
10343
10422
|
}
|
|
10344
10423
|
fieldOwners.set(key, { sheetTitle: previous?.sheetTitle ?? sheet.title, count });
|
|
10345
10424
|
};
|
|
10346
|
-
(sheet.paper
|
|
10347
|
-
registerField(
|
|
10348
|
-
|
|
10349
|
-
});
|
|
10425
|
+
for (const { content, hidden } of getCellFieldPlacements(sheet.paper)) {
|
|
10426
|
+
if (!hidden) registerField(content);
|
|
10427
|
+
}
|
|
10350
10428
|
[...sheet.paper.dynamicTables ?? [], ...sheet.paper.fixedTables ?? []].forEach(
|
|
10351
10429
|
(table) => {
|
|
10352
10430
|
if (!table.field) return;
|
|
@@ -10617,7 +10695,7 @@ const useAllSpreadSheets = () => {
|
|
|
10617
10695
|
removeField: removeField2
|
|
10618
10696
|
};
|
|
10619
10697
|
};
|
|
10620
|
-
const _sfc_main$
|
|
10698
|
+
const _sfc_main$6z = /* @__PURE__ */ defineComponent({
|
|
10621
10699
|
__name: "table-modal",
|
|
10622
10700
|
props: {
|
|
10623
10701
|
type: { default: SubTableType.DEFAULT }
|
|
@@ -10821,7 +10899,7 @@ const _sfc_main$6y = /* @__PURE__ */ defineComponent({
|
|
|
10821
10899
|
};
|
|
10822
10900
|
}
|
|
10823
10901
|
});
|
|
10824
|
-
const _sfc_main$
|
|
10902
|
+
const _sfc_main$6y = /* @__PURE__ */ defineComponent({
|
|
10825
10903
|
__name: "thead-modal",
|
|
10826
10904
|
setup(__props) {
|
|
10827
10905
|
const { selection: selection2, paper: paper2, platformType: platformType2, isTextOnlineForm: isTextOnlineForm2 } = useSpreadSheet();
|
|
@@ -11372,7 +11450,7 @@ function parseHtml(html) {
|
|
|
11372
11450
|
mergedCells
|
|
11373
11451
|
};
|
|
11374
11452
|
}
|
|
11375
|
-
const _sfc_main$
|
|
11453
|
+
const _sfc_main$6x = /* @__PURE__ */ defineComponent({
|
|
11376
11454
|
__name: "field-edit-modal",
|
|
11377
11455
|
props: {
|
|
11378
11456
|
field: {}
|
|
@@ -11462,7 +11540,54 @@ const _sfc_main$6w = /* @__PURE__ */ defineComponent({
|
|
|
11462
11540
|
};
|
|
11463
11541
|
}
|
|
11464
11542
|
});
|
|
11465
|
-
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"]]);
|
|
11466
11591
|
let doc$1;
|
|
11467
11592
|
const topPublishVersions = ref$1([]);
|
|
11468
11593
|
const currentVersion = ref$1();
|
|
@@ -12454,7 +12579,7 @@ function useSpreadSheet() {
|
|
|
12454
12579
|
}
|
|
12455
12580
|
if (checkSelectionConflict(selection$1)) return;
|
|
12456
12581
|
const { ok, data } = await window.NocodeAdapter.utils.overlay.modal(
|
|
12457
|
-
_sfc_main$
|
|
12582
|
+
_sfc_main$6z,
|
|
12458
12583
|
{ type: type2 },
|
|
12459
12584
|
{ title: `添加${$t("sys.onlineForm.subTableType." + type2)}`, width: "640px" }
|
|
12460
12585
|
);
|
|
@@ -12526,7 +12651,7 @@ function useSpreadSheet() {
|
|
|
12526
12651
|
return;
|
|
12527
12652
|
}
|
|
12528
12653
|
const { ok, data } = await window.NocodeAdapter.utils.overlay.modal(
|
|
12529
|
-
_sfc_main$
|
|
12654
|
+
_sfc_main$6y,
|
|
12530
12655
|
{},
|
|
12531
12656
|
{
|
|
12532
12657
|
title: $t("sys.onlineForm.addHeader"),
|
|
@@ -12783,22 +12908,24 @@ function useSpreadSheet() {
|
|
|
12783
12908
|
const size = [w - padding.l - padding.r + "mm", paperHeight - padding.t - padding.b + "mm"];
|
|
12784
12909
|
const { modelMetaMap: modelMetaMap2, refreshModelFields: refreshModelFields2 } = useModelFields();
|
|
12785
12910
|
const keyList = (modelMetaMap2.value[doc.value.modelKey]?.fields ?? []).map((i) => i.key);
|
|
12786
|
-
const imported = await XlsxParser.xlsx2Sheets(file, payload?.withFields ? keyList : []
|
|
12911
|
+
const imported = await XlsxParser.xlsx2Sheets(file, payload?.withFields ? keyList : [], {
|
|
12912
|
+
withFields: !!payload?.withFields
|
|
12913
|
+
});
|
|
12787
12914
|
imported.sheets.forEach((sheet) => XlsxParser.contentFitToPaper(sheet.paper, size));
|
|
12788
12915
|
const confirmed = await new Promise((resolve) => {
|
|
12789
12916
|
Modal.confirm({
|
|
12790
12917
|
title: `确认替换为 ${imported.sheets.length} 个工作表`,
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
imported.sheets.map(
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
),
|
|
12801
|
-
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 ? "继续导入" : "导入",
|
|
12802
12929
|
cancelText: $t("sys.cancel"),
|
|
12803
12930
|
zIndex: 2e3,
|
|
12804
12931
|
onOk: () => resolve(true),
|
|
@@ -12817,20 +12944,6 @@ function useSpreadSheet() {
|
|
|
12817
12944
|
}
|
|
12818
12945
|
return result;
|
|
12819
12946
|
};
|
|
12820
|
-
const importedFieldOwners = /* @__PURE__ */ new Map();
|
|
12821
|
-
imported.sheets.forEach((sheet) => {
|
|
12822
|
-
sheet.paperFields.forEach((field) => {
|
|
12823
|
-
const key = field.fieldKey || field.fieldName;
|
|
12824
|
-
if (!key) return;
|
|
12825
|
-
const owner = importedFieldOwners.get(key);
|
|
12826
|
-
if (owner) {
|
|
12827
|
-
throw new Error(
|
|
12828
|
-
`字段「${key}」重复出现(${owner}、${sheet.title}),同一字段只能导入一次`
|
|
12829
|
-
);
|
|
12830
|
-
}
|
|
12831
|
-
importedFieldOwners.set(key, sheet.title);
|
|
12832
|
-
});
|
|
12833
|
-
});
|
|
12834
12947
|
imported.fields?.forEach((item) => {
|
|
12835
12948
|
const { type: type2, key, name: rawName, required, uniqueConstraint, disabled } = item;
|
|
12836
12949
|
if (!key || !rawName) {
|
|
@@ -13244,6 +13357,7 @@ function useSpreadSheet() {
|
|
|
13244
13357
|
}
|
|
13245
13358
|
}
|
|
13246
13359
|
const fieldWidget = getFieldWidget2(bindField);
|
|
13360
|
+
sheetsData.value.forEach((sheet) => clearHiddenCellFieldPlacements(sheet.paper, bindField));
|
|
13247
13361
|
const content = {
|
|
13248
13362
|
type: CellType.Field,
|
|
13249
13363
|
fieldMeta: bindField,
|
|
@@ -14650,15 +14764,15 @@ const _sfc_main$6m = /* @__PURE__ */ defineComponent({
|
|
|
14650
14764
|
const value = computed(() => {
|
|
14651
14765
|
const dateWidget = props2.fieldWidget;
|
|
14652
14766
|
if (dateWidget.defaultSystemDate) {
|
|
14653
|
-
|
|
14654
|
-
return
|
|
14767
|
+
iconType.value === "time" ? "HH:mm:ss" : iconType.value === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
14768
|
+
return void 0;
|
|
14655
14769
|
}
|
|
14656
14770
|
const defaultValue = props2.fieldWidget.defaultValue;
|
|
14657
14771
|
if (defaultValue === FieldSysVarDefaultValueEnum.CURRENT_USER) {
|
|
14658
|
-
return
|
|
14772
|
+
return void 0;
|
|
14659
14773
|
}
|
|
14660
14774
|
if (defaultValue === FieldSysVarDefaultValueEnum.CURRENT_ORG) {
|
|
14661
|
-
return
|
|
14775
|
+
return void 0;
|
|
14662
14776
|
}
|
|
14663
14777
|
if (["fw:select", "fw:tree-select", "fw:rdo-select"].includes(props2.design ?? "fw:select")) {
|
|
14664
14778
|
return void 0;
|
|
@@ -14684,7 +14798,7 @@ const _sfc_main$6m = /* @__PURE__ */ defineComponent({
|
|
|
14684
14798
|
};
|
|
14685
14799
|
}
|
|
14686
14800
|
});
|
|
14687
|
-
const FakeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6m, [["__scopeId", "data-v-
|
|
14801
|
+
const FakeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6m, [["__scopeId", "data-v-a6a3e9c6"]]);
|
|
14688
14802
|
const _sfc_main$6l = /* @__PURE__ */ defineComponent({
|
|
14689
14803
|
__name: "radio-icon",
|
|
14690
14804
|
props: {
|
|
@@ -14790,6 +14904,12 @@ const _sfc_main$6j = /* @__PURE__ */ defineComponent({
|
|
|
14790
14904
|
}));
|
|
14791
14905
|
});
|
|
14792
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
|
+
}
|
|
14793
14913
|
if (isBoolean2.value) {
|
|
14794
14914
|
return [booleanWidget.value.defaultValue];
|
|
14795
14915
|
}
|
|
@@ -14885,7 +15005,7 @@ const _sfc_main$6j = /* @__PURE__ */ defineComponent({
|
|
|
14885
15005
|
};
|
|
14886
15006
|
}
|
|
14887
15007
|
});
|
|
14888
|
-
const FakeOptionSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6j, [["__scopeId", "data-v-
|
|
15008
|
+
const FakeOptionSelect = /* @__PURE__ */ _export_sfc(_sfc_main$6j, [["__scopeId", "data-v-d12ad167"]]);
|
|
14889
15009
|
const FieldDesignComponents = {
|
|
14890
15010
|
"fw:input": FakeInput,
|
|
14891
15011
|
"fw:number": FakeNumberInput,
|
|
@@ -16063,7 +16183,7 @@ function asyncImportWidgetConfigList() {
|
|
|
16063
16183
|
return widgetConfigList;
|
|
16064
16184
|
}
|
|
16065
16185
|
function asyncImportWidgetDesign() {
|
|
16066
|
-
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") });
|
|
16067
16187
|
const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
|
|
16068
16188
|
const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
|
|
16069
16189
|
if (mKey) {
|
|
@@ -39389,13 +39509,28 @@ function useDefaultValueOptions({ source, getFields, fetchPage }) {
|
|
|
39389
39509
|
const searchKeys = ["code_", "name_"].filter((key) => keys2.includes(key));
|
|
39390
39510
|
if (!searchKeys.length) keyword2.value = "";
|
|
39391
39511
|
const conditions = keyword2.value ? searchKeys.map((key) => `${key}.like`) : [];
|
|
39392
|
-
|
|
39512
|
+
if (modelKey === "em_device") {
|
|
39513
|
+
conditions.push("asset_number_.like");
|
|
39514
|
+
}
|
|
39515
|
+
let bodyData = {
|
|
39393
39516
|
pageNo: currentPage,
|
|
39394
39517
|
pageSize: PAGE_SIZE,
|
|
39395
39518
|
sorts: SORTS,
|
|
39396
39519
|
query: Object.fromEntries(conditions.map((key) => [key, keyword2.value])),
|
|
39397
39520
|
...conditions.length > 1 ? { exp: `OR(${conditions.join(",")})` } : {}
|
|
39398
|
-
}
|
|
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);
|
|
39399
39534
|
if (!isCurrent()) return;
|
|
39400
39535
|
if (!Array.isArray(page?.data)) throw new Error("Invalid default value page");
|
|
39401
39536
|
const merged = new Map(options.value.map((option2) => [option2.value, option2]));
|
|
@@ -39604,11 +39739,11 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39604
39739
|
FIELD_TYPE.SHOPFLOOR,
|
|
39605
39740
|
FIELD_TYPE.WAREHOUSE,
|
|
39606
39741
|
FIELD_TYPE.TARGET_WAREHOUSE,
|
|
39607
|
-
FIELD_TYPE.ROUTING_OPERATION
|
|
39608
|
-
FIELD_TYPE.NOT_GOOD_GROUP,
|
|
39609
|
-
FIELD_TYPE.NOT_GOOD_REASON,
|
|
39610
|
-
FIELD_TYPE.SCRAP_GROUP,
|
|
39611
|
-
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,
|
|
39612
39747
|
];
|
|
39613
39748
|
const defaultValueVisible = useDefaultValueVisibility(() => props2.fieldMeta);
|
|
39614
39749
|
const showType = computed(() => {
|
|
@@ -39618,6 +39753,19 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39618
39753
|
const isShowBizType = showTypes.includes(bizType);
|
|
39619
39754
|
return isShowType || isShowBizType;
|
|
39620
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
|
+
};
|
|
39621
39769
|
const { modelMetaMap: modelMetaMap2 } = useModelFields();
|
|
39622
39770
|
const {
|
|
39623
39771
|
options,
|
|
@@ -39649,10 +39797,22 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39649
39797
|
return fields.map((field) => field.key).filter((key) => !!key);
|
|
39650
39798
|
},
|
|
39651
39799
|
async fetchPage(modelKey, body) {
|
|
39800
|
+
const { fieldType, bizType } = props2.fieldMeta;
|
|
39801
|
+
const cusBiz = typeBizMaps[bizType || fieldType];
|
|
39652
39802
|
return await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
39653
|
-
{
|
|
39803
|
+
{
|
|
39804
|
+
modelCategory: "entity",
|
|
39805
|
+
modelKey,
|
|
39806
|
+
bsKey: cusBiz?.bsKey || "listByPage"
|
|
39807
|
+
},
|
|
39654
39808
|
{},
|
|
39655
|
-
|
|
39809
|
+
{
|
|
39810
|
+
...body,
|
|
39811
|
+
query: {
|
|
39812
|
+
...body.query || {},
|
|
39813
|
+
...cusBiz?.body?.query || {}
|
|
39814
|
+
}
|
|
39815
|
+
}
|
|
39656
39816
|
);
|
|
39657
39817
|
}
|
|
39658
39818
|
});
|
|
@@ -39701,6 +39861,7 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39701
39861
|
"default-active-first-option": false,
|
|
39702
39862
|
"label-in-value": "",
|
|
39703
39863
|
style: { "width": "100%" },
|
|
39864
|
+
allowClear: "",
|
|
39704
39865
|
onChange: handleChange,
|
|
39705
39866
|
onDropdownVisibleChange: unref(handleOpen),
|
|
39706
39867
|
onPopupScroll: unref(handleScroll),
|
|
@@ -39750,7 +39911,7 @@ const _sfc_main$4v = /* @__PURE__ */ defineComponent({
|
|
|
39750
39911
|
};
|
|
39751
39912
|
}
|
|
39752
39913
|
});
|
|
39753
|
-
const DefaultValueSelectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4v, [["__scopeId", "data-v-
|
|
39914
|
+
const DefaultValueSelectEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4v, [["__scopeId", "data-v-43b7850e"]]);
|
|
39754
39915
|
const _hoisted_1$2w = { class: "flex justify-between items-center" };
|
|
39755
39916
|
const _sfc_main$4u = /* @__PURE__ */ defineComponent({
|
|
39756
39917
|
__name: "ref-props",
|
|
@@ -55660,15 +55821,14 @@ const _sfc_main$3C = /* @__PURE__ */ defineComponent({
|
|
|
55660
55821
|
示例:PROCESSPARAMCHECK('gycs',灭菌参数) 返回 true`,
|
|
55661
55822
|
definition: "declare function PROCESSPARAMCHECK(key:string; value: number): Promise<boolean | null>;"
|
|
55662
55823
|
},
|
|
55663
|
-
{
|
|
55664
|
-
|
|
55665
|
-
|
|
55666
|
-
|
|
55667
|
-
|
|
55668
|
-
|
|
55669
|
-
|
|
55670
|
-
|
|
55671
|
-
},
|
|
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
|
+
// },
|
|
55672
55832
|
{
|
|
55673
55833
|
id: "INSPECTIONPARAMCHECK",
|
|
55674
55834
|
returnType: "boolean",
|
|
@@ -55876,7 +56036,7 @@ const _sfc_main$3C = /* @__PURE__ */ defineComponent({
|
|
|
55876
56036
|
};
|
|
55877
56037
|
}
|
|
55878
56038
|
});
|
|
55879
|
-
const addDependencyModal = /* @__PURE__ */ _export_sfc(_sfc_main$3C, [["__scopeId", "data-v-
|
|
56039
|
+
const addDependencyModal = /* @__PURE__ */ _export_sfc(_sfc_main$3C, [["__scopeId", "data-v-eec1bc1b"]]);
|
|
55880
56040
|
const _hoisted_1$29 = { class: "text-[#C3C3C3] text-12px mb8px" };
|
|
55881
56041
|
const _hoisted_2$1y = { class: "ks-row" };
|
|
55882
56042
|
const _hoisted_3$1c = { class: "mr-auto" };
|
|
@@ -56641,7 +56801,7 @@ const _sfc_main$3v = /* @__PURE__ */ defineComponent({
|
|
|
56641
56801
|
}
|
|
56642
56802
|
});
|
|
56643
56803
|
function asyncImportWidgetProp() {
|
|
56644
|
-
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") });
|
|
56645
56805
|
const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
|
|
56646
56806
|
const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
|
|
56647
56807
|
if (mKey) {
|
|
@@ -66240,7 +66400,7 @@ const _sfc_main$2y = /* @__PURE__ */ defineComponent({
|
|
|
66240
66400
|
onSelect: onClearAll
|
|
66241
66401
|
}, null, 8, ["value"]),
|
|
66242
66402
|
_cache[9] || (_cache[9] = createElementVNode("div", { class: "split" }, null, -1)),
|
|
66243
|
-
joinModelType.value === unref(JoinModelTypeEum).FormModel ? (openBlock(), createBlock(unref(_sfc_main$
|
|
66403
|
+
joinModelType.value === unref(JoinModelTypeEum).FormModel ? (openBlock(), createBlock(unref(_sfc_main$6B), {
|
|
66244
66404
|
key: 0,
|
|
66245
66405
|
class: "custom-select",
|
|
66246
66406
|
placeholder: _ctx.$t("sys.cardDesign.form.modelRequired"),
|
|
@@ -69669,23 +69829,11 @@ const _sfc_main$2e = /* @__PURE__ */ defineComponent({
|
|
|
69669
69829
|
keyword: void 0
|
|
69670
69830
|
});
|
|
69671
69831
|
const manualInputValue = computed(() => String(searchForm.value.keyword ?? "").trim());
|
|
69672
|
-
const searchField = [
|
|
69673
|
-
"name_.like",
|
|
69674
|
-
"product_id_code_.like",
|
|
69675
|
-
"product_id_name_.like",
|
|
69676
|
-
"spec_.like"
|
|
69677
|
-
];
|
|
69678
69832
|
const fetcher = async ({ keyword: keyword2 = "", pageNo, pageSize: pageSize2 }) => {
|
|
69679
|
-
const queryData
|
|
69680
|
-
total[fieldKey.includes(".") ? fieldKey : `${fieldKey}.like`] = keyword2;
|
|
69681
|
-
return total;
|
|
69682
|
-
}, {}) : {};
|
|
69833
|
+
const { queryData, exp } = buildMaterialLotListQuery(keyword2, props2.extraQuery);
|
|
69683
69834
|
const res = await renderUtils.requestMaterialLotOptions({
|
|
69684
|
-
exp
|
|
69685
|
-
queryData
|
|
69686
|
-
...queryData,
|
|
69687
|
-
...props2.extraQuery
|
|
69688
|
-
},
|
|
69835
|
+
exp,
|
|
69836
|
+
queryData,
|
|
69689
69837
|
pageNo,
|
|
69690
69838
|
pageSize: pageSize2
|
|
69691
69839
|
});
|
|
@@ -69813,7 +69961,7 @@ const _sfc_main$2e = /* @__PURE__ */ defineComponent({
|
|
|
69813
69961
|
};
|
|
69814
69962
|
}
|
|
69815
69963
|
});
|
|
69816
|
-
const MaterialLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["__scopeId", "data-v-
|
|
69964
|
+
const MaterialLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["__scopeId", "data-v-be7eefec"]]);
|
|
69817
69965
|
const _sfc_main$2d = /* @__PURE__ */ defineComponent({
|
|
69818
69966
|
__name: "trace-material-lot-select",
|
|
69819
69967
|
props: {
|
|
@@ -74299,7 +74447,7 @@ const VuePdf = /* @__PURE__ */ defineComponent({
|
|
|
74299
74447
|
}
|
|
74300
74448
|
});
|
|
74301
74449
|
const VueVideoPlayer = defineAsyncComponent(
|
|
74302
|
-
() => import("./VueVideoPlayer-
|
|
74450
|
+
() => import("./VueVideoPlayer-BTRWrHgw.js")
|
|
74303
74451
|
);
|
|
74304
74452
|
const _hoisted_1$18 = {
|
|
74305
74453
|
key: 0,
|
|
@@ -77896,12 +78044,8 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
|
77896
78044
|
...props2.widget,
|
|
77897
78045
|
props: {
|
|
77898
78046
|
...props2.widget.props,
|
|
77899
|
-
displayFields: [
|
|
77900
|
-
{ key: "code_", name: $t("sys.edhr.field.code") }
|
|
77901
|
-
{ key: "product_id_name_", name: "产品名称" },
|
|
77902
|
-
{ key: "product_id_code_", name: "产品编码" },
|
|
77903
|
-
{ key: "product_id_spec_", name: "产品规格" },
|
|
77904
|
-
{ key: "qty_", name: "数量" }
|
|
78047
|
+
displayFields: props2.widget.props.displayFields ?? [
|
|
78048
|
+
{ key: "code_", name: $t("sys.edhr.field.code") }
|
|
77905
78049
|
],
|
|
77906
78050
|
quickSearchable: true,
|
|
77907
78051
|
quickSearchField,
|
|
@@ -78154,7 +78298,7 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
|
78154
78298
|
};
|
|
78155
78299
|
}
|
|
78156
78300
|
});
|
|
78157
|
-
const selectRender = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-
|
|
78301
|
+
const selectRender = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-b2337210"]]);
|
|
78158
78302
|
const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
78159
78303
|
__proto__: null,
|
|
78160
78304
|
default: selectRender
|
|
@@ -84534,6 +84678,8 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
|
84534
84678
|
default: withCtx(() => [
|
|
84535
84679
|
createVNode(unref(CellMedia), {
|
|
84536
84680
|
class: normalizeClass([
|
|
84681
|
+
"image-cell-content",
|
|
84682
|
+
images.value.length && isAdaptive.value && "is-adaptive",
|
|
84537
84683
|
!images.value.length && unref(showRequired) && "is-show-required",
|
|
84538
84684
|
unref(realFieldId),
|
|
84539
84685
|
unref(showDisplayStatus),
|
|
@@ -84594,7 +84740,7 @@ const _sfc_main$1u = /* @__PURE__ */ defineComponent({
|
|
|
84594
84740
|
};
|
|
84595
84741
|
}
|
|
84596
84742
|
});
|
|
84597
|
-
const uploadImageRender = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["__scopeId", "data-v-
|
|
84743
|
+
const uploadImageRender = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["__scopeId", "data-v-8a9e24fe"]]);
|
|
84598
84744
|
const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
84599
84745
|
__proto__: null,
|
|
84600
84746
|
default: uploadImageRender
|
|
@@ -95815,8 +95961,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
95815
95961
|
printTask = (async () => {
|
|
95816
95962
|
if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
|
|
95817
95963
|
await nextTick();
|
|
95818
|
-
const { printRuntimeInstance } = await import("./print-runtime-instance-
|
|
95819
|
-
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");
|
|
95820
95966
|
if (abort.signal.aborted) throw new Error("打印已取消");
|
|
95821
95967
|
printRenderer.value = markRaw(renderer);
|
|
95822
95968
|
await printRuntimeInstance(
|
|
@@ -95963,7 +96109,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
95963
96109
|
provide(NCB_PROVIDE.RUNTIME_INSTANCE_REGISTRY, runtimeRegistry);
|
|
95964
96110
|
initWebPaasUploadApis();
|
|
95965
96111
|
return (_ctx, _cache) => {
|
|
95966
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
96112
|
+
return openBlock(), createBlock(unref(_sfc_main$6C), {
|
|
95967
96113
|
loading: __props.loading,
|
|
95968
96114
|
"has-data": __props.hasData,
|
|
95969
96115
|
error: unref(runtimeRegistry).loadState.error?.message
|