@gct-paas/excel 0.1.40-beta.3 → 0.1.40-beta.4
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-B9o59n-h.js → BaseComponent-BcxRArl9.js} +2 -2
- package/dist/{VueVideoPlayer-CAWYWBHi.js → VueVideoPlayer-DjIr6Duj.js} +2 -2
- package/dist/{align-editor-a4DQt4Un.js → align-editor-99-Qs6Pu.js} +1 -1
- package/dist/{barcode-design-CBqUEPYu.js → barcode-design-BSkeINVU.js} +2 -2
- package/dist/base/index.es.js +238 -197
- package/dist/{diagonal-design-u23896Ky.js → diagonal-design-CR7fiPt_.js} +2 -2
- package/dist/{dynamic-table-action-BWI4Gaqi.js → dynamic-table-action-D8JTGNuH.js} +175 -95
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BvrrN6te.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CxqmyuOf.js} +625 -398
- package/dist/{edit.utils-CXmmCnxE-XxpC8ALV.js → edit.utils-CXmmCnxE-5YnG7Mod.js} +1 -1
- package/dist/excel.css +325 -158
- package/dist/{exceljs.min-DfbB110X.js → exceljs.min-Ckn1GGo5.js} +2 -2
- package/dist/{font-editor-BtSCLMrM.js → font-editor-CIv2e95b.js} +3 -3
- package/dist/{image-design-CtE-Lw7N.js → image-design-Bg1m0JLl.js} +2 -2
- package/dist/{index-BGAcYDx-.js → index-0kZW-sd4.js} +1 -1
- package/dist/{index-aNV9T6LI.js → index-6wZ6Y0W3.js} +2 -2
- package/dist/{index-CIa37rQm.js → index-B4XMnrfl.js} +2 -2
- package/dist/{index-BRQkrFQ9.js → index-BA_C4l6u.js} +2 -2
- package/dist/{index-BFg5eUdY.js → index-BIraya7K.js} +1 -1
- package/dist/{index-BMoz_QhA.js → index-BZQrpoEw.js} +1 -1
- package/dist/{index-Bc61F6Hm.js → index-BunphFuS.js} +2 -2
- package/dist/{index-DVEe11uM.js → index-BzdZIihy.js} +1 -1
- package/dist/{index-3WwCV4xR.js → index-C7oAVon1.js} +1 -1
- package/dist/{index-BKXb3VJc.js → index-C8H-5Adw.js} +2 -2
- package/dist/{index-B0cdcIWq.js → index-CRLydLMf.js} +2 -2
- package/dist/{index-51LtNdZ2.js → index-CTyszA6m.js} +1 -1
- package/dist/{index-I1r5pfu5.js → index-CUPuw1ng.js} +2 -2
- package/dist/{index-BC8hQ4vo.js → index-CYb8lY4k.js} +2 -2
- package/dist/{index-CeEhYXl9.js → index-CeCk3V8r.js} +2 -2
- package/dist/{index-CAdDeEzJ.js → index-CeMM7qev.js} +2 -2
- package/dist/{index-CYLAVQfT.js → index-Cjor8DKp.js} +2 -2
- package/dist/{index-DeHX7rte.js → index-CsIKJvLT.js} +50 -3
- package/dist/{index-CL9K9orM.js → index-CzgWwoNs.js} +2 -2
- package/dist/{index-IVc1dOet.js → index-D7DYLntD.js} +3 -3
- package/dist/{index-9S48hpoJ.js → index-DFJ19IKk.js} +2 -2
- package/dist/{index-CPTGioxl.js → index-DG8I3apA.js} +1 -1
- package/dist/{index-BP-LhXXV.js → index-DHvbmtBs.js} +4 -4
- package/dist/{index-ixQwAcB1.js → index-DLZKDd1x.js} +812 -463
- package/dist/{index-DNj0vFvx.js → index-DN83FHdO.js} +1 -1
- package/dist/{index-7aS5L4ot.js → index-DZxTtwzU.js} +3 -3
- package/dist/{index-CpPk8P3L.js → index-DbXQsLWI.js} +1 -1
- package/dist/{index-CdHVHaxO.js → index-DgRCrbjc.js} +2 -2
- package/dist/{index-CVsoaxTR.js → index-Do1A3RoM.js} +2 -2
- package/dist/{index-DdWefZMa.js → index-DprbnBOa.js} +2 -2
- package/dist/{index-Ca9TLzUh.js → index-DtwSR71M.js} +1 -1
- package/dist/{index-Dyomjz3y.js → index-OHHmkknK.js} +2 -2
- package/dist/{index-BfBuxgcp.js → index-k_OAhCop.js} +2 -2
- package/dist/{index-731OYkrc.js → index-mxtsA6kq.js} +3 -3
- package/dist/{index-Bnb70qEi.js → index-rYGo3i42.js} +3 -3
- package/dist/index.es.js +12 -10
- package/dist/{mb-render-Bs9S9oFn.js → mb-render-BW27j2qa.js} +1 -1
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CRyGHP7k.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-JuGFe7ao.js} +1 -1
- package/dist/{pagination-design-CmbsdlMe.js → pagination-design-C59mi1du.js} +2 -2
- package/dist/paper-widget-design-BNmIT8FC.js +4 -0
- package/dist/{print-runtime-instance-DQysbz5n.js → print-runtime-instance-CT3EaCDJ.js} +1 -1
- package/dist/{print-snapshot-renderer-DWHjMsOC.js → print-snapshot-renderer-Bm-fpHUt.js} +3 -3
- package/dist/{qrcode-design-CX0_2mLC.js → qrcode-design-Brx73IFy.js} +1 -1
- package/dist/{revo-grid.entry-DbmWFi7p.js → revo-grid.entry-CREHbVNI.js} +1 -1
- package/dist/{revogr-attribution_7.entry-BWQDu7fq.js → revogr-attribution_7.entry-CBUFDouS.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-BtTYHFZi.js → revogr-clipboard_3.entry-C9D5KQdr.js} +2 -2
- package/dist/{revogr-data_4.entry-CWPXyZ7g.js → revogr-data_4.entry-DpskbAdh.js} +2 -2
- package/dist/{revogr-filter-panel.entry-5gYct0XI.js → revogr-filter-panel.entry-CqdNtCzb.js} +1 -1
- package/dist/seal-design-XhQfBjxE.js +4 -0
- package/dist/{serialnumber-design-aSqL4gX6.js → serialnumber-design-CJM0MP9w.js} +1 -1
- package/dist/shared/index.es.js +24 -24
- package/dist/{single-field-drop-C67wLHxK.js → single-field-drop-B82L3Pe3.js} +2 -2
- package/dist/{size-editor-BHGTPLir.js → size-editor-CybxvVWn.js} +1 -1
- package/dist/src/domain/table/business/material/material-balance/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/material/material-consume/profile/fields.d.ts +2 -0
- package/dist/src/domain/table/business/material/material-substitution/profile/field-keys.d.ts +13 -0
- package/dist/src/domain/table/business/warehouse/shared/autofill-source-labels.d.ts +19 -0
- package/dist/src/domain/table/design/autofill-expander.d.ts +2 -0
- package/dist/src/domain/table/design/hooks/on-field-attach.d.ts +6 -0
- package/dist/src/domain/table/index.d.ts +1 -1
- package/dist/src/domain/table/types.d.ts +2 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +2 -1
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +1 -0
- package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +12 -7
- package/dist/src/nocode-base/src/hooks/validation/createValidateFactory.d.ts +1 -0
- package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +5 -1
- package/dist/src/nocode-web-render/src/render/sub-table/common/inventory-scan-columns.d.ts +6 -0
- package/dist/src/online-form/src/views/designer/conversions/normalize-paper-grid.d.ts +3 -0
- package/dist/src/online-form/src/views/designer/utils/placed-fields.d.ts +9 -0
- package/dist/src/online-form/src/views/designer/utils/template-placed-fields.d.ts +7 -0
- package/dist/src/shared/components/Signature/logic/index.d.ts +14 -0
- package/dist/{sub-table-factory-DTtDvr17.js → sub-table-factory-BrwMeqWM.js} +11 -60
- package/dist/{text-design-Dz0Qf2O3.js → text-design-Qem3wirw.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-CgtsG2CV.js → throttle-Cpk1LoGk-Bm1w1voP.js} +1 -1
- package/dist/{timediff-design-D9JfNqH8.js → timediff-design-CiGukjs9.js} +1 -1
- package/dist/{trace-like-wrapper-BXgr0Uv3.js → trace-like-wrapper-DrUDJDgX.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-doohzADY.js → value-editor.vue_vue_type_style_index_0_lang-DXBstCLM.js} +2 -2
- package/dist/web-render/index.es.js +3 -3
- package/dist/{widget-barcode-XF3nCU9v.js → widget-barcode-DH30z4yi.js} +4 -4
- package/dist/{widget-diagonal-DSym7fks.js → widget-diagonal-Bv-Eb2Fi.js} +3 -3
- package/dist/{widget-image-CmjwkVs7.js → widget-image-67Q9gRCG.js} +5 -5
- package/dist/{widget-line-BX64xVfU.js → widget-line-DP3dKXNd.js} +2 -2
- package/dist/{widget-pagination-BV89Lvjt.js → widget-pagination-B66PcWXU.js} +5 -5
- package/dist/{widget-power-DoSfQv92.js → widget-power-yRy8897o.js} +3 -3
- package/dist/{widget-qrcode-UGcRLC56.js → widget-qrcode-DN3R8N41.js} +3 -3
- package/dist/{widget-rangelimit-CUHD__1H.js → widget-rangelimit-zWZZMPvn.js} +3 -3
- package/dist/{widget-serialnumber-CAkZR5Xl.js → widget-serialnumber-p7wB7-Bz.js} +1 -1
- package/dist/{widget-text-DtYVTThu.js → widget-text-BQO0Rf5A.js} +5 -5
- package/dist/{widget-timediff-DX_IoCMO.js → widget-timediff-C1VxWKle.js} +2 -2
- package/package.json +1 -1
- package/dist/paper-widget-design-DIhsk1I9.js +0 -4
- package/dist/seal-design-BhzgwVju.js +0 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as Vue from "vue";
|
|
2
2
|
import { createVNode, computed, unref, ref, 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, withKeys, vModelText, isRef, provide, isVNode as isVNode$1, createApp, render, TransitionGroup, toRefs, useAttrs, createSlots, onScopeDispose, useCssVars, onBeforeMount, toRef, mergeDefaults, toHandlers, getCurrentInstance as getCurrentInstance$1, 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
|
|
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, P as PaginationFormat, q as PaperWidgeType, B as BwipCodeType, L as LineType, s as PageSizeEnum, O as Orientation, t as src, T as TRACE_FIELD_TYPES, u as BUSINESS_FIELD_TYPES, v as resolveFieldRenderComponent, C as ComponentTypeEnum, w as parse$1, x as estraverse, y as Syntax, z as isDynamicCreateTarget, A as CellType, E as isDynamicCellSubTable, G as ParamModelTypeEnum, H as FieldTypeToJs, I as CreateType, J as uuid2, K as useModal, M as requireEstraverse, N as commonjsGlobal, Q as getDefaultExportFromCjs, R as PaperWidgeValueType, U as getParseFormulaVarInfos, V as onlineFormMasterModelTypeEnum, W as WAREHOUSE_FIELD_TYPES, X as UniqueConstraintType, Y as FieldDefaultValueTypeEnum, Z as FormTypeEnum, _ as mitt, $ as isDateObjectField, a0 as PlatformEnum, a1 as LabelPosition, a2 as BooleanShowMode, a3 as SignatureImageDirectionEnum, a4 as FallbackSignTypeEnum, a5 as SignatureNumberTypeEnum, a6 as SignatureTimeTypeEnum, a7 as SignShowTypeEnum, a8 as SignatureTypeEnum, a9 as _export_sfc, aa as normalizeFieldType, ab as PaperSizeMap, ac as clampSealPosition, ad as normalizeSealDiameter, ae as getFieldMain, af as buildUUID, ag as FieldIconMap, ah as BigNumber, ai as FieldSysVarDefaultValueEnum, aj as CellWidgetViewState, ak as DiagonalDirection, al as WidgetImageSizeMode, am as LineDirection, an as TimeDiffFormat, ao as DiagonalVertex, ap as resolveDiagonalVertex, aq as getThemeColorByTableType, ar as ViewTypeEnum, as as isDynamicSubTablePanelType, at as isFixedSubTablePanelType, au as ExpressionModeEnum, av as ReturnTypeEnum, aw as ExpressionTabEnum, ax as RangeValidateMode, ay as RangeCompareOp, az as getExclusiveBusinessTypeTokens, aA as getSubTableTypeByRefModelType, aB as findFieldMain, aC as DecimalDisplayMode$1, aD as ImageDisplayModeEnum, aE as FormDesignEnum, aF as BASIC_FIELD_TYPES, aG as getAllTableProfiles, aH as transformUtils, aI as EmptySymbol, aJ as ASSIGNMENTSTRATEGY_ENUM, aK as Dependency_ENUM, aL as EntityModelCategoryEnum, aM as resolveLotDisplayLabel, aN as CheckDsTypeEnum, aO as DeviceLink, aP as DeviceParamsTypeTitle, aQ as AITooltips, aR as DenoiseMethodOptions, aS as BinarizeMethodOptions, aT as DateFormat, aU as LOT_CONTAINER_ROLE, aV as buildLotSnListQuery, aW as renderUtils, aX as resolveLotRecordByValue, aY as materialCheck, aZ as getLotLockedReason, a_ as validateReinspectionDate, a$ as BindCmpStyleEnum, b0 as getParseRuleInfo, b1 as getParseRuleValue, b2 as normalizeRefLoaderResult, b3 as STOCKTAKE_DIMENSION, b4 as F, b5 as resolveStocktakeSelectApi, b6 as readSealValue, b7 as isSealStamped, b8 as RenderModeEnum, b9 as stampSealValue, ba as isValidSealValue, bb as clearSealValue, bc as normalizeProductionContainerOptions, bd as buildProductionLotListQuery, be as refUtils, bf as buildInspectionLotListQuery, bg as buildDeviceFilterQuery, bh as DEVICE_GROUP_QUERY_KEY, bi as getRowId, bj as findRuntimeTableRow, bk as calculateFormula, bl as findRuntimeParentRow, bm as useOnlineFormTransformField2Component, bn as FormulaRuleFieldKeyEnum, bo as formulaRuleFieldDict, bp as resolveDesignPanelFeatures, bq as BIZ_TABLE_CONFIG_SEED_TYPES, br as STOCKTAKE_DIMENSION_OPTIONS, bs as isRepeatingSubTablePanelType, bt as moveSealValue, bu as uuid2$1 } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CxqmyuOf.js";
|
|
4
4
|
import { range, cloneDeep, get as get$3, merge, isEmpty, zip, pick, omit, has, debounce, isNil, times, clone as clone$3, differenceBy, mapValues, last, set as set$2, hasIn, isEqual } from "lodash-es";
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
6
|
import { DataSourceChangeEvent, useFormBaseModal, getBuiltinContextFields, DataSources, FieldFills, FormBaseModalPlugin } from "@gct-paas/form-base";
|
|
7
7
|
import * as Antd from "ant-design-vue";
|
|
8
8
|
import { message, Modal, notification, Empty, InputSearch, Cascader, ConfigProvider, Tooltip as Tooltip$1, Input, Tree, Transfer, Select, Tag, 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, d as MULTI_SHEET_SCHEMA_VERSION, e as createRuntimeDocumentV2, g as getBusinessFieldKey, n as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, B as BorderTD, u as useFormTmplConfig, f as
|
|
10
|
-
import { S as SEARCH_SEVICE, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2 } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-
|
|
9
|
+
import { b as bindFormulaCacheInvalidation, c as currentParamsConfig, M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, d as MULTI_SHEET_SCHEMA_VERSION, e as createRuntimeDocumentV2, g as getBusinessFieldKey, n as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, B as BorderTD, u as useFormTmplConfig, f as findFieldProfile, h as normalizeHistoricalBusinessRow, i as DeviceLinkTmplUtil, j as normalizeAIOcrTmpl, k as useWidgetStaticAttrs, l as useRuntimeInstanceServices, s as setSelectValidatorId, m as setSelectAnnotationId, o as useRuntimeRowState, p as getObjectBomMaterialLotQuery, q as buildObjectLotExtraQuery, r as resolveObjectFieldKeys, t as MaterialConsumptionPatternEnum, v as validateObjectBomForScan, w as resolveObjectBomEntry, x as runWithFillProduct, y as useNocodeFormWidget, z as applyConsumeObjectTraceChange, A as getObjectBomProductQuery, E as EMPTY_PRODUCT_VERSION_ID, C as normalizeHistoricalAutofillRow, N as NCB_PROVIDE, F as parseRuntimeFieldPath, G as useStyles, H as useDependency, I as useFieldPresentation, J as useRuntimeEditorFlusher, R as RuntimeFormStateStore, K as createRuntimeInstanceContext, L as RuntimeInstanceRegistry, S as ScanParamType, O as RequiredQtyCalcRule, P as DocumentPaper, Q as DynamicTableAction, _ as _sfc_main$6g } from "./dynamic-table-action-D8JTGNuH.js";
|
|
10
|
+
import { S as SEARCH_SEVICE, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2 } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-JuGFe7ao.js";
|
|
11
11
|
import { I as Icon$1, w as warning, u as useInsertStyles, s as svgBaseProps, a as useNamespace } from "./AntdIcon-DCIaV352.js";
|
|
12
|
-
import { u as useWebUpload, i as initWebPaasUploadApis, a as useThrottleFn, d as defaultWindow, n as noop, b as useEventListener, c as isIOS, e as unrefElement, r as require$$0, U as Uploader, f as useIntersectionObserver, g as cacheAdapter, w as watchDebounced, A as AddRuleBtn, M as ModalWrapper, F as FormFieldSelect, o as onClickOutside$1, _ as _sfc_main$6f, h as initWebNocodeAdapter } from "./index-
|
|
12
|
+
import { u as useWebUpload, i as initWebPaasUploadApis, a as useThrottleFn, d as defaultWindow, n as noop, b as useEventListener, c as isIOS, e as unrefElement, r as require$$0, U as Uploader, f as useIntersectionObserver, g as cacheAdapter, w as watchDebounced, A as AddRuleBtn, M as ModalWrapper, F as FormFieldSelect, o as onClickOutside$1, _ as _sfc_main$6f, h as initWebNocodeAdapter } from "./index-CsIKJvLT.js";
|
|
13
13
|
import { Tooltip, Grid, Table, Column, Icon as Icon$2, Edit, Validator, VxeGrid } from "vxe-table";
|
|
14
|
-
import { u as useFormModel, F as FormModelController } from "./mb-render-
|
|
14
|
+
import { u as useFormModel, F as FormModelController } from "./mb-render-BW27j2qa.js";
|
|
15
15
|
import { HttpUtil } from "@gct-paas/api";
|
|
16
16
|
import { useModal as useModal$1, t as t$2 } from "@gct-paas/core";
|
|
17
17
|
import { useRoute } from "vue-router";
|
|
@@ -218,6 +218,17 @@ function matchBusinessField(field, profile) {
|
|
|
218
218
|
function resolveBusinessFieldProfile(field, fieldProfiles = []) {
|
|
219
219
|
return fieldProfiles.find((profile) => matchBusinessField(field, profile));
|
|
220
220
|
}
|
|
221
|
+
function getBuiltInAutofillRules(field) {
|
|
222
|
+
if (!field.subModelType || !field.fieldKey) return [];
|
|
223
|
+
const tableProfile = getProfileByTableType(field.subModelType);
|
|
224
|
+
const businessProfile = tableProfile && isBusinessSubTableProfile(tableProfile) ? tableProfile : getBusinessProfileByRefModelType(field.subModelType);
|
|
225
|
+
const fieldProfile = resolveBusinessFieldProfile(field, businessProfile?.fields);
|
|
226
|
+
return (fieldProfile?.autofillTemplates ?? []).map((template) => ({
|
|
227
|
+
fromField: template.fromField,
|
|
228
|
+
toField: resolveAutofillToField(template, field.fieldKey),
|
|
229
|
+
fromFieldLabel: template.fromFieldLabel
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
221
232
|
function applyFieldProfileOnAttach(widget2, field) {
|
|
222
233
|
if (!field.subModelType || !field.fieldKey) return widget2;
|
|
223
234
|
const tableProfile = getProfileByTableType(field.subModelType);
|
|
@@ -1410,8 +1421,8 @@ const NumColMap = Array(1e3).fill("").reduce((m, e, i) => {
|
|
|
1410
1421
|
m[i + 1] = num2Col(i + 1);
|
|
1411
1422
|
return m;
|
|
1412
1423
|
}, {});
|
|
1413
|
-
const DEFAULT_ROW_HEIGHT = 30;
|
|
1414
|
-
const DEFAULT_COL_WIDTH = 75;
|
|
1424
|
+
const DEFAULT_ROW_HEIGHT$1 = 30;
|
|
1425
|
+
const DEFAULT_COL_WIDTH$1 = 75;
|
|
1415
1426
|
const PaperWidgetDropBoxId = "PaperWidgetDropBoxId";
|
|
1416
1427
|
const ValueEditorFieldDropBoxId = "ValueEditorFieldDropBoxId";
|
|
1417
1428
|
const FontSizeOptions = [5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
|
|
@@ -1437,10 +1448,10 @@ const DefaultPaper = {
|
|
|
1437
1448
|
},
|
|
1438
1449
|
orientation: Orientation.Portrait,
|
|
1439
1450
|
cols: Array(10).fill("").map(() => ({
|
|
1440
|
-
width: DEFAULT_COL_WIDTH
|
|
1451
|
+
width: DEFAULT_COL_WIDTH$1
|
|
1441
1452
|
})),
|
|
1442
1453
|
rows: Array(20).fill("").map(() => ({
|
|
1443
|
-
height: DEFAULT_ROW_HEIGHT
|
|
1454
|
+
height: DEFAULT_ROW_HEIGHT$1
|
|
1444
1455
|
})),
|
|
1445
1456
|
cells: Array(20).fill("").map(
|
|
1446
1457
|
() => Array(12).fill("").map(() => ({}))
|
|
@@ -2002,7 +2013,7 @@ function openWindow(url, opt) {
|
|
|
2002
2013
|
const FieldPropLabels = Object.entries(FIELD_PROP_LABEL_MAP);
|
|
2003
2014
|
const FieldTypeLabels = Object.entries(FIELD_TYPE_LABEL_MAP);
|
|
2004
2015
|
async function createWorkbook() {
|
|
2005
|
-
const ExcelJs = (await import("./exceljs.min-
|
|
2016
|
+
const ExcelJs = (await import("./exceljs.min-Ckn1GGo5.js").then((n) => n.e)).default;
|
|
2006
2017
|
return new ExcelJs.Workbook();
|
|
2007
2018
|
}
|
|
2008
2019
|
class XlsxParser {
|
|
@@ -2330,39 +2341,39 @@ class XlsxParser {
|
|
|
2330
2341
|
}
|
|
2331
2342
|
function asyncImportClassModules() {
|
|
2332
2343
|
const modules = /* @__PURE__ */ Object.assign({
|
|
2333
|
-
"./_field_/auto-complete/index.ts": () => import("./index-
|
|
2334
|
-
"./_field_/datepicker/index.ts": () => import("./index-
|
|
2335
|
-
"./_field_/datetimepicker/index.ts": () => import("./index-
|
|
2336
|
-
"./_field_/department/index.ts": () => import("./index-
|
|
2337
|
-
"./_field_/enum-select/index.ts": () => import("./index-
|
|
2338
|
-
"./_field_/input/index.ts": () => import("./index-
|
|
2339
|
-
"./_field_/inputdouble/index.ts": () => import("./index-
|
|
2340
|
-
"./_field_/inputnumber/index.ts": () => import("./index-
|
|
2341
|
-
"./_field_/rdo-select/index.ts": () => import("./index-
|
|
2342
|
-
"./_field_/seal/index.ts": () => import("./index-
|
|
2343
|
-
"./_field_/select/index.ts": () => import("./index-
|
|
2344
|
-
"./_field_/sign/index.ts": () => import("./index-
|
|
2345
|
-
"./_field_/switch/index.ts": () => import("./index-
|
|
2346
|
-
"./_field_/textarea/index.ts": () => import("./index-
|
|
2347
|
-
"./_field_/timepicker/index.ts": () => import("./index-
|
|
2348
|
-
"./_field_/upload-file/index.ts": () => import("./index-
|
|
2349
|
-
"./_field_/upload-image/index.ts": () => import("./index-
|
|
2350
|
-
"./_field_/userpicker/index.ts": () => import("./index-
|
|
2351
|
-
"./_widget_/barcode/index.ts": () => import("./index-
|
|
2352
|
-
"./_widget_/combine-fields/index.ts": () => import("./index-
|
|
2353
|
-
"./_widget_/diagonal/index.ts": () => import("./index-
|
|
2354
|
-
"./_widget_/dyn-value/index.ts": () => import("./index-
|
|
2355
|
-
"./_widget_/image/index.ts": () => import("./index-
|
|
2356
|
-
"./_widget_/line/index.ts": () => import("./index-
|
|
2357
|
-
"./_widget_/power/index.ts": () => import("./index-
|
|
2358
|
-
"./_widget_/qrcode/index.ts": () => import("./index-
|
|
2359
|
-
"./_widget_/ro/index.ts": () => import("./index-
|
|
2360
|
-
"./_widget_/serialnumber/index.ts": () => import("./index-
|
|
2361
|
-
"./_widget_/sub-table/index.ts": () => import("./index-
|
|
2362
|
-
"./_widget_/timediff/index.ts": () => import("./index-
|
|
2363
|
-
"./paper/index.ts": () => import("./index-
|
|
2364
|
-
"./td/index.ts": () => import("./index-
|
|
2365
|
-
"./tr/index.ts": () => import("./index-
|
|
2344
|
+
"./_field_/auto-complete/index.ts": () => import("./index-mxtsA6kq.js").then((m) => m["default"]),
|
|
2345
|
+
"./_field_/datepicker/index.ts": () => import("./index-CRLydLMf.js").then((m) => m["default"]),
|
|
2346
|
+
"./_field_/datetimepicker/index.ts": () => import("./index-DgRCrbjc.js").then((m) => m["default"]),
|
|
2347
|
+
"./_field_/department/index.ts": () => import("./index-6wZ6Y0W3.js").then((m) => m["default"]),
|
|
2348
|
+
"./_field_/enum-select/index.ts": () => import("./index-D7DYLntD.js").then((m) => m["default"]),
|
|
2349
|
+
"./_field_/input/index.ts": () => import("./index-OHHmkknK.js").then((m) => m["default"]),
|
|
2350
|
+
"./_field_/inputdouble/index.ts": () => import("./index-C8H-5Adw.js").then((m) => m["default"]),
|
|
2351
|
+
"./_field_/inputnumber/index.ts": () => import("./index-CeCk3V8r.js").then((m) => m["default"]),
|
|
2352
|
+
"./_field_/rdo-select/index.ts": () => import("./index-rYGo3i42.js").then((m) => m["default"]),
|
|
2353
|
+
"./_field_/seal/index.ts": () => import("./index-B4XMnrfl.js").then((m) => m["default"]),
|
|
2354
|
+
"./_field_/select/index.ts": () => import("./index-DZxTtwzU.js").then((m) => m["default"]),
|
|
2355
|
+
"./_field_/sign/index.ts": () => import("./index-Cjor8DKp.js").then((m) => m["default"]),
|
|
2356
|
+
"./_field_/switch/index.ts": () => import("./index-DHvbmtBs.js").then((m) => m["default"]),
|
|
2357
|
+
"./_field_/textarea/index.ts": () => import("./index-Do1A3RoM.js").then((m) => m["default"]),
|
|
2358
|
+
"./_field_/timepicker/index.ts": () => import("./index-CUPuw1ng.js").then((m) => m["default"]),
|
|
2359
|
+
"./_field_/upload-file/index.ts": () => import("./index-CYb8lY4k.js").then((m) => m["default"]),
|
|
2360
|
+
"./_field_/upload-image/index.ts": () => import("./index-k_OAhCop.js").then((m) => m["default"]),
|
|
2361
|
+
"./_field_/userpicker/index.ts": () => import("./index-CeMM7qev.js").then((m) => m["default"]),
|
|
2362
|
+
"./_widget_/barcode/index.ts": () => import("./index-BIraya7K.js").then((m) => m["default"]),
|
|
2363
|
+
"./_widget_/combine-fields/index.ts": () => import("./index-CzgWwoNs.js").then((m) => m["default"]),
|
|
2364
|
+
"./_widget_/diagonal/index.ts": () => import("./index-DFJ19IKk.js").then((m) => m["default"]),
|
|
2365
|
+
"./_widget_/dyn-value/index.ts": () => import("./index-BA_C4l6u.js").then((m) => m["default"]),
|
|
2366
|
+
"./_widget_/image/index.ts": () => import("./index-DG8I3apA.js").then((m) => m["default"]),
|
|
2367
|
+
"./_widget_/line/index.ts": () => import("./index-C7oAVon1.js").then((m) => m["default"]),
|
|
2368
|
+
"./_widget_/power/index.ts": () => import("./index-CTyszA6m.js").then((m) => m["default"]),
|
|
2369
|
+
"./_widget_/qrcode/index.ts": () => import("./index-0kZW-sd4.js").then((m) => m["default"]),
|
|
2370
|
+
"./_widget_/ro/index.ts": () => import("./index-DN83FHdO.js").then((m) => m["default"]),
|
|
2371
|
+
"./_widget_/serialnumber/index.ts": () => import("./index-BZQrpoEw.js").then((m) => m["default"]),
|
|
2372
|
+
"./_widget_/sub-table/index.ts": () => import("./index-BzdZIihy.js").then((m) => m["default"]),
|
|
2373
|
+
"./_widget_/timediff/index.ts": () => import("./index-DbXQsLWI.js").then((m) => m["default"]),
|
|
2374
|
+
"./paper/index.ts": () => import("./index-DtwSR71M.js").then((m) => m["default"]),
|
|
2375
|
+
"./td/index.ts": () => import("./index-BunphFuS.js").then((m) => m["default"]),
|
|
2376
|
+
"./tr/index.ts": () => import("./index-DprbnBOa.js").then((m) => m["default"])
|
|
2366
2377
|
});
|
|
2367
2378
|
return modules;
|
|
2368
2379
|
}
|
|
@@ -4054,6 +4065,62 @@ function migrateDesignerToV2(maps, info, createPaper) {
|
|
|
4054
4065
|
})
|
|
4055
4066
|
};
|
|
4056
4067
|
}
|
|
4068
|
+
const DEFAULT_ROW_HEIGHT = 30;
|
|
4069
|
+
const DEFAULT_COL_WIDTH = 75;
|
|
4070
|
+
const positiveSize = (value, fallback) => typeof value === "number" && Number.isFinite(value) && value > 0 ? value : fallback;
|
|
4071
|
+
const normalizeCell = (value) => {
|
|
4072
|
+
if (value && typeof value === "object" && !Array.isArray(value)) return value;
|
|
4073
|
+
return value == null ? {} : { value };
|
|
4074
|
+
};
|
|
4075
|
+
const normalizeRange = (range2, rows, cols) => {
|
|
4076
|
+
if (!range2 || ![range2.t, range2.b, range2.l, range2.r].every(Number.isInteger)) return;
|
|
4077
|
+
const t2 = Math.max(1, range2.t);
|
|
4078
|
+
const b = Math.min(rows, range2.b);
|
|
4079
|
+
const l = Math.max(1, range2.l);
|
|
4080
|
+
const r = Math.min(cols, range2.r);
|
|
4081
|
+
if (t2 > b || l > r) return;
|
|
4082
|
+
return { ...range2, t: t2, b, l, r };
|
|
4083
|
+
};
|
|
4084
|
+
const normalizeTable = (table, rows, cols) => {
|
|
4085
|
+
if (!table || typeof table !== "object") return;
|
|
4086
|
+
const range2 = normalizeRange(table.range, rows, cols);
|
|
4087
|
+
if (!range2) return;
|
|
4088
|
+
table.range = range2;
|
|
4089
|
+
if (table.thRange) table.thRange = normalizeRange(table.thRange, rows, cols);
|
|
4090
|
+
if (table.dgRange) table.dgRange = normalizeRange(table.dgRange, rows, cols);
|
|
4091
|
+
if (table.rowRange) table.rowRange = normalizeRange(table.rowRange, rows, cols);
|
|
4092
|
+
return table;
|
|
4093
|
+
};
|
|
4094
|
+
function normalizePaperGrid(paper2) {
|
|
4095
|
+
const sourceRows = Array.isArray(paper2.rows) ? paper2.rows : [];
|
|
4096
|
+
const sourceCols = Array.isArray(paper2.cols) ? paper2.cols : [];
|
|
4097
|
+
const sourceCells = Array.isArray(paper2.cells) ? paper2.cells : [];
|
|
4098
|
+
const rowCount = Math.max(1, sourceRows.length, sourceCells.length);
|
|
4099
|
+
const widestRow = sourceCells.reduce(
|
|
4100
|
+
(width, row) => Math.max(width, Array.isArray(row) ? row.length : 0),
|
|
4101
|
+
0
|
|
4102
|
+
);
|
|
4103
|
+
const colCount = Math.max(1, sourceCols.length, widestRow);
|
|
4104
|
+
paper2.rows = Array.from({ length: rowCount }, (_, index2) => ({
|
|
4105
|
+
...sourceRows[index2],
|
|
4106
|
+
height: positiveSize(sourceRows[index2]?.height, DEFAULT_ROW_HEIGHT)
|
|
4107
|
+
}));
|
|
4108
|
+
paper2.cols = Array.from({ length: colCount }, (_, index2) => ({
|
|
4109
|
+
...sourceCols[index2],
|
|
4110
|
+
width: positiveSize(sourceCols[index2]?.width, DEFAULT_COL_WIDTH)
|
|
4111
|
+
}));
|
|
4112
|
+
paper2.cells = Array.from({ length: rowCount }, (_, rowIndex) => {
|
|
4113
|
+
const row = Array.isArray(sourceCells[rowIndex]) ? sourceCells[rowIndex] : [];
|
|
4114
|
+
return Array.from({ length: colCount }, (_2, colIndex) => normalizeCell(row[colIndex]));
|
|
4115
|
+
});
|
|
4116
|
+
paper2.mergedCells = (Array.isArray(paper2.mergedCells) ? paper2.mergedCells : []).map((range2) => normalizeRange(range2, rowCount, colCount)).filter((range2) => !!range2);
|
|
4117
|
+
if (paper2.thead?.thRange) {
|
|
4118
|
+
paper2.thead.thRange = normalizeRange(paper2.thead.thRange, rowCount, colCount);
|
|
4119
|
+
}
|
|
4120
|
+
paper2.dynamicTables = (Array.isArray(paper2.dynamicTables) ? paper2.dynamicTables : []).map((table) => normalizeTable(table, rowCount, colCount)).filter((table) => !!table);
|
|
4121
|
+
paper2.fixedTables = (Array.isArray(paper2.fixedTables) ? paper2.fixedTables : []).map((table) => normalizeTable(table, rowCount, colCount)).filter((table) => !!table);
|
|
4122
|
+
return paper2;
|
|
4123
|
+
}
|
|
4057
4124
|
const _hoisted_1$3q = { class: "p24px" };
|
|
4058
4125
|
const _sfc_main$6e = /* @__PURE__ */ defineComponent({
|
|
4059
4126
|
__name: "add-sheet",
|
|
@@ -9946,14 +10013,7 @@ const setActive = (sheetId) => {
|
|
|
9946
10013
|
const getSheet = (paperId) => {
|
|
9947
10014
|
return sheetsData$1.value.find((item) => item.sheetId === paperId);
|
|
9948
10015
|
};
|
|
9949
|
-
const
|
|
9950
|
-
const { paper: paper2 } = sheet;
|
|
9951
|
-
const colCount = paper2.cols.length;
|
|
9952
|
-
paper2.cells = paper2.cells.map(
|
|
9953
|
-
(row) => Array.from({ length: colCount }, (_, index2) => row[index2] ?? {})
|
|
9954
|
-
);
|
|
9955
|
-
paper2.mergedCells = paper2.mergedCells.filter((range2) => range2.l < colCount).map((range2) => ({ ...range2, r: Math.min(range2.r, colCount - 1) }));
|
|
9956
|
-
};
|
|
10016
|
+
const normalizeSheetGrid = (sheet) => normalizePaperGrid(sheet.paper);
|
|
9957
10017
|
const normalizeSterilizeInputProps = (sheet) => {
|
|
9958
10018
|
sheet.paper.cells.flat().forEach((cell) => {
|
|
9959
10019
|
for (const content of [cell, ...cell.multiFieldsContent ?? []]) {
|
|
@@ -10088,7 +10148,7 @@ const useAllSpreadSheets = () => {
|
|
|
10088
10148
|
designerConfig.value = { mainModelKey, modelMetaMap: modelMetaMap2 };
|
|
10089
10149
|
formConfig$3.value = cloneDeep(designer.formConfig);
|
|
10090
10150
|
sheetsData$1.value = cloneDeep(designer.sheets);
|
|
10091
|
-
sheetsData$1.value.forEach(
|
|
10151
|
+
sheetsData$1.value.forEach(normalizeSheetGrid);
|
|
10092
10152
|
sheetsData$1.value.forEach(normalizeSterilizeInputProps);
|
|
10093
10153
|
mergeFormTmplBomList(info.formTmplBomList);
|
|
10094
10154
|
mergeFormTmplObjectBomList(info.formTmplObjectBomList);
|
|
@@ -10150,7 +10210,7 @@ const useAllSpreadSheets = () => {
|
|
|
10150
10210
|
sheetId
|
|
10151
10211
|
})
|
|
10152
10212
|
};
|
|
10153
|
-
|
|
10213
|
+
normalizeSheetGrid(sheet);
|
|
10154
10214
|
normalizeSterilizeInputProps(sheet);
|
|
10155
10215
|
cacheStep();
|
|
10156
10216
|
sheetsData$1.value.push(sheet);
|
|
@@ -10205,7 +10265,7 @@ const useAllSpreadSheets = () => {
|
|
|
10205
10265
|
sheetId
|
|
10206
10266
|
})
|
|
10207
10267
|
};
|
|
10208
|
-
|
|
10268
|
+
normalizeSheetGrid(sheet);
|
|
10209
10269
|
normalizeSterilizeInputProps(sheet);
|
|
10210
10270
|
return sheet;
|
|
10211
10271
|
});
|
|
@@ -10301,7 +10361,7 @@ const useAllSpreadSheets = () => {
|
|
|
10301
10361
|
}
|
|
10302
10362
|
function saveSheets2(isEasyEdition2) {
|
|
10303
10363
|
try {
|
|
10304
|
-
sheetsData$1.value.forEach(
|
|
10364
|
+
sheetsData$1.value.forEach(normalizeSheetGrid);
|
|
10305
10365
|
sheetsData$1.value.forEach(normalizeSterilizeInputProps);
|
|
10306
10366
|
validateSheetsBeforeSave();
|
|
10307
10367
|
if (isEasyEdition2) {
|
|
@@ -12222,7 +12282,7 @@ function useSpreadSheet() {
|
|
|
12222
12282
|
function resizeCol(e) {
|
|
12223
12283
|
const x = Number(e.target.parentNode.dataset.x);
|
|
12224
12284
|
const startX = e.clientX;
|
|
12225
|
-
const startWidth = paper$1.value.cols[x - 1]?.width ?? DEFAULT_COL_WIDTH;
|
|
12285
|
+
const startWidth = paper$1.value.cols[x - 1]?.width ?? DEFAULT_COL_WIDTH$1;
|
|
12226
12286
|
function handleMouseMove(e2) {
|
|
12227
12287
|
const nextWidth = Math.max(1, startWidth + e2.clientX - startX);
|
|
12228
12288
|
setColWidth(x, nextWidth);
|
|
@@ -12457,7 +12517,7 @@ function useSpreadSheet() {
|
|
|
12457
12517
|
function insertRow(row, inheritRow) {
|
|
12458
12518
|
const rowIndex = (row ?? paper$1.value.rows.length) - 1;
|
|
12459
12519
|
paper$1.value.rows.splice(rowIndex, 0, {
|
|
12460
|
-
height: DEFAULT_ROW_HEIGHT
|
|
12520
|
+
height: DEFAULT_ROW_HEIGHT$1
|
|
12461
12521
|
});
|
|
12462
12522
|
const _inheritRow = isNil(inheritRow) ? new Array(paper$1.value.cols.length).fill(void 0) : inheritRow;
|
|
12463
12523
|
paper$1.value.cells.splice(
|
|
@@ -12502,7 +12562,7 @@ function useSpreadSheet() {
|
|
|
12502
12562
|
}
|
|
12503
12563
|
function insertCol(col, insertCols2) {
|
|
12504
12564
|
const colIndex = (col ?? paper$1.value.cols.length) - 1;
|
|
12505
|
-
paper$1.value.cols.splice(colIndex, 0, { width: DEFAULT_COL_WIDTH });
|
|
12565
|
+
paper$1.value.cols.splice(colIndex, 0, { width: DEFAULT_COL_WIDTH$1 });
|
|
12506
12566
|
paper$1.value.cells.forEach((row, index2) => {
|
|
12507
12567
|
const cell = insertCols2 ? insertCols2[index2] : void 0;
|
|
12508
12568
|
const style = cell?.style ? cloneDeep(cell?.style) : void 0;
|
|
@@ -13053,7 +13113,19 @@ function useSpreadSheet() {
|
|
|
13053
13113
|
subModelType: data.subModelType
|
|
13054
13114
|
});
|
|
13055
13115
|
const { fieldMetaMap: fieldMetaMap2 } = useModelFields();
|
|
13056
|
-
const
|
|
13116
|
+
const modelField = fieldMetaMap2.value[`${data.model}.${data.field}`];
|
|
13117
|
+
if (data.fieldType === FIELD_TYPE.BOOLEAN) {
|
|
13118
|
+
const config2 = modelField?.specificConfig;
|
|
13119
|
+
const trueText = config2?.["true"];
|
|
13120
|
+
const falseText = config2?.["false"];
|
|
13121
|
+
if (typeof trueText === "string" || typeof trueText === "number") {
|
|
13122
|
+
Object.assign(profiledWidget, { trueText: String(trueText) });
|
|
13123
|
+
}
|
|
13124
|
+
if (typeof falseText === "string" || typeof falseText === "number") {
|
|
13125
|
+
Object.assign(profiledWidget, { falseText: String(falseText) });
|
|
13126
|
+
}
|
|
13127
|
+
}
|
|
13128
|
+
const modelDefaultValue = modelField?.defaultValue;
|
|
13057
13129
|
if (modelDefaultValue?.type !== FieldDefaultValueTypeEnum.NONE && !isNil(modelDefaultValue?.value)) {
|
|
13058
13130
|
Object.assign(profiledWidget, { defaultValue: cloneDeep(modelDefaultValue.value) });
|
|
13059
13131
|
}
|
|
@@ -13612,14 +13684,14 @@ function useSpreadSheet() {
|
|
|
13612
13684
|
const pageHeightPx = parseInt(src(`${size[1]}mm`));
|
|
13613
13685
|
const availableWidthPx = pageWidthPx - DefaultPaper.padding.l - DefaultPaper.padding.r;
|
|
13614
13686
|
const availableHeightPx = pageHeightPx - DefaultPaper.padding.t - DefaultPaper.padding.b;
|
|
13615
|
-
const cols = Math.max(1, Math.floor(availableWidthPx / DEFAULT_COL_WIDTH));
|
|
13616
|
-
const rows = Math.max(1, Math.floor(availableHeightPx / DEFAULT_ROW_HEIGHT));
|
|
13687
|
+
const cols = Math.max(1, Math.floor(availableWidthPx / DEFAULT_COL_WIDTH$1));
|
|
13688
|
+
const rows = Math.max(1, Math.floor(availableHeightPx / DEFAULT_ROW_HEIGHT$1));
|
|
13617
13689
|
Object.assign(config2, {
|
|
13618
13690
|
cols: Array(cols).fill("").map(() => ({
|
|
13619
|
-
width: DEFAULT_COL_WIDTH
|
|
13691
|
+
width: DEFAULT_COL_WIDTH$1
|
|
13620
13692
|
})),
|
|
13621
13693
|
rows: Array(rows).fill("").map(() => ({
|
|
13622
|
-
height: DEFAULT_ROW_HEIGHT
|
|
13694
|
+
height: DEFAULT_ROW_HEIGHT$1
|
|
13623
13695
|
})),
|
|
13624
13696
|
cells: Array(rows).fill("").map(
|
|
13625
13697
|
() => Array(cols).fill("").map(() => ({}))
|
|
@@ -15940,7 +16012,7 @@ function asyncImportWidgetConfigList() {
|
|
|
15940
16012
|
return widgetConfigList;
|
|
15941
16013
|
}
|
|
15942
16014
|
function asyncImportWidgetDesign() {
|
|
15943
|
-
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-
|
|
16015
|
+
const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-XhQfBjxE.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-BSkeINVU.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-CR7fiPt_.js"), "./image/image-design.vue": () => import("./image-design-Bg1m0JLl.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-C59mi1du.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-BNmIT8FC.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-Brx73IFy.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-CJM0MP9w.js"), "./text/text-design.vue": () => import("./text-design-Qem3wirw.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-CiGukjs9.js") });
|
|
15944
16016
|
const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
|
|
15945
16017
|
const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
|
|
15946
16018
|
if (mKey) {
|
|
@@ -21636,6 +21708,8 @@ function resolveCellContentStyle(cellStyle = {}, isDroppedField) {
|
|
|
21636
21708
|
display: "flex",
|
|
21637
21709
|
boxSizing: "border-box",
|
|
21638
21710
|
lineHeight: "1.5",
|
|
21711
|
+
// 纯文本与渲染器一致,保留原始换行;显式设置的 white-space 优先。
|
|
21712
|
+
"white-space": isDroppedField ? void 0 : cellStyle["white-space"] ?? "pre",
|
|
21639
21713
|
"align-items": alignItems,
|
|
21640
21714
|
"justify-content": justifyContent,
|
|
21641
21715
|
paddingLeft: effectiveTextAlign === "left" ? textInset : "0px",
|
|
@@ -21813,6 +21887,11 @@ const _sfc_main$5G = /* @__PURE__ */ defineComponent({
|
|
|
21813
21887
|
if (!isEmpty(props2.cell.style) && has(props2.cell.style, "white-space") && has(props2.cell.style, "word-break") && props2.cell.style["white-space"] === "pre-wrap" && props2.cell.style["word-break"] === "break-all") {
|
|
21814
21888
|
styles["--auto-line-break"] = "wrap";
|
|
21815
21889
|
}
|
|
21890
|
+
if (props2.cell.multiFields) {
|
|
21891
|
+
const mode = styles["writing-mode"] ?? styles.writingMode;
|
|
21892
|
+
styles["--composite-text-writing-mode"] = mode && mode !== "unset" ? mode : "horizontal-tb";
|
|
21893
|
+
styles.writingMode = styles["writing-mode"] = "horizontal-tb";
|
|
21894
|
+
}
|
|
21816
21895
|
return styles;
|
|
21817
21896
|
});
|
|
21818
21897
|
const divStyle2 = computed(
|
|
@@ -21920,7 +21999,7 @@ const _sfc_main$5G = /* @__PURE__ */ defineComponent({
|
|
|
21920
21999
|
};
|
|
21921
22000
|
}
|
|
21922
22001
|
});
|
|
21923
|
-
const SpreadSheetCell = /* @__PURE__ */ _export_sfc(_sfc_main$5G, [["__scopeId", "data-v-
|
|
22002
|
+
const SpreadSheetCell = /* @__PURE__ */ _export_sfc(_sfc_main$5G, [["__scopeId", "data-v-ae22e414"]]);
|
|
21924
22003
|
const ThresholdValue = 8;
|
|
21925
22004
|
function getOffsetValue(left, width, points) {
|
|
21926
22005
|
let offset2 = left;
|
|
@@ -23813,7 +23892,7 @@ const _hoisted_2$2b = ["data-x", "width"];
|
|
|
23813
23892
|
const _hoisted_3$1G = ["data-x"];
|
|
23814
23893
|
const _hoisted_4$1a = ["onMouseenter"];
|
|
23815
23894
|
const _hoisted_5$W = ["onClick"];
|
|
23816
|
-
const _hoisted_6$
|
|
23895
|
+
const _hoisted_6$I = ["data-x"];
|
|
23817
23896
|
const _sfc_main$5o = /* @__PURE__ */ defineComponent({
|
|
23818
23897
|
__name: "table-x",
|
|
23819
23898
|
setup(__props) {
|
|
@@ -23921,7 +24000,7 @@ const _sfc_main$5o = /* @__PURE__ */ defineComponent({
|
|
|
23921
24000
|
style: normalizeStyle({
|
|
23922
24001
|
height: tableHeight.value + "px"
|
|
23923
24002
|
})
|
|
23924
|
-
}, null, 14, _hoisted_6$
|
|
24003
|
+
}, null, 14, _hoisted_6$I);
|
|
23925
24004
|
}), 128))
|
|
23926
24005
|
], 4)
|
|
23927
24006
|
])
|
|
@@ -23940,8 +24019,8 @@ const _hoisted_2$2a = {
|
|
|
23940
24019
|
const _hoisted_3$1F = ["width"];
|
|
23941
24020
|
const _hoisted_4$19 = ["data-y", "height"];
|
|
23942
24021
|
const _hoisted_5$V = { style: { "position": "relative" } };
|
|
23943
|
-
const _hoisted_6$
|
|
23944
|
-
const _hoisted_7$
|
|
24022
|
+
const _hoisted_6$H = ["onMouseenter"];
|
|
24023
|
+
const _hoisted_7$u = ["onClick"];
|
|
23945
24024
|
const _sfc_main$5n = /* @__PURE__ */ defineComponent({
|
|
23946
24025
|
__name: "table-y",
|
|
23947
24026
|
setup(__props) {
|
|
@@ -24018,8 +24097,8 @@ const _sfc_main$5n = /* @__PURE__ */ defineComponent({
|
|
|
24018
24097
|
createElementVNode("i", {
|
|
24019
24098
|
class: "iconfont icon-tianjia hover-icon",
|
|
24020
24099
|
onClick: (e) => addRow(e, rowIndex + 1)
|
|
24021
|
-
}, null, 8, _hoisted_7$
|
|
24022
|
-
], 42, _hoisted_6$
|
|
24100
|
+
}, null, 8, _hoisted_7$u)
|
|
24101
|
+
], 42, _hoisted_6$H)
|
|
24023
24102
|
]),
|
|
24024
24103
|
createElementVNode("td", {
|
|
24025
24104
|
class: normalizeClass([
|
|
@@ -24206,8 +24285,8 @@ const _hoisted_2$28 = { class: "item-box" };
|
|
|
24206
24285
|
const _hoisted_3$1D = ["onClick"];
|
|
24207
24286
|
const _hoisted_4$17 = ["onClick"];
|
|
24208
24287
|
const _hoisted_5$T = ["onClick"];
|
|
24209
|
-
const _hoisted_6$
|
|
24210
|
-
const _hoisted_7$
|
|
24288
|
+
const _hoisted_6$G = ["title"];
|
|
24289
|
+
const _hoisted_7$t = {
|
|
24211
24290
|
key: 0,
|
|
24212
24291
|
class: "swapper-btn"
|
|
24213
24292
|
};
|
|
@@ -24311,7 +24390,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
|
|
|
24311
24390
|
style: normalizeStyle({
|
|
24312
24391
|
"pointer-events": __props.readonly ? "none" : "unset"
|
|
24313
24392
|
})
|
|
24314
|
-
}, toDisplayString$1(item.title), 13, _hoisted_6$
|
|
24393
|
+
}, toDisplayString$1(item.title), 13, _hoisted_6$G)
|
|
24315
24394
|
]),
|
|
24316
24395
|
_: 2
|
|
24317
24396
|
}, 1032, ["onVisibleChange"])
|
|
@@ -24319,7 +24398,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
|
|
|
24319
24398
|
}), 128))
|
|
24320
24399
|
])
|
|
24321
24400
|
], 512),
|
|
24322
|
-
showMoreBtn.value ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
24401
|
+
showMoreBtn.value ? (openBlock(), createElementBlock("div", _hoisted_7$t, [
|
|
24323
24402
|
createElementVNode("i", {
|
|
24324
24403
|
class: normalizeClass(["iconfont icon-arrow_left_more", [curPage.value <= 1 && "disabled-btn"]]),
|
|
24325
24404
|
onClick: _cache[0] || (_cache[0] = ($event) => onMove(true))
|
|
@@ -25365,21 +25444,21 @@ const _hoisted_3$1y = { style: {
|
|
|
25365
25444
|
} };
|
|
25366
25445
|
const _hoisted_4$14 = { class: "color-picker-middle" };
|
|
25367
25446
|
const _hoisted_5$R = { style: { "flex": "auto" } };
|
|
25368
|
-
const _hoisted_6$
|
|
25369
|
-
const _hoisted_7$
|
|
25370
|
-
const _hoisted_8$
|
|
25371
|
-
const _hoisted_9$
|
|
25372
|
-
const _hoisted_10$
|
|
25373
|
-
const _hoisted_11$
|
|
25374
|
-
const _hoisted_12$
|
|
25375
|
-
const _hoisted_13$
|
|
25376
|
-
const _hoisted_14$
|
|
25377
|
-
const _hoisted_15$
|
|
25378
|
-
const _hoisted_16$
|
|
25379
|
-
const _hoisted_17$
|
|
25380
|
-
const _hoisted_18$
|
|
25381
|
-
const _hoisted_19$
|
|
25382
|
-
const _hoisted_20$
|
|
25447
|
+
const _hoisted_6$F = { class: "color-picker-diamond" };
|
|
25448
|
+
const _hoisted_7$s = { class: "color-picker-value" };
|
|
25449
|
+
const _hoisted_8$n = { class: "hex" };
|
|
25450
|
+
const _hoisted_9$h = ["value"];
|
|
25451
|
+
const _hoisted_10$f = { class: "rgba-r" };
|
|
25452
|
+
const _hoisted_11$d = ["value"];
|
|
25453
|
+
const _hoisted_12$a = { class: "rgba-g" };
|
|
25454
|
+
const _hoisted_13$9 = ["value"];
|
|
25455
|
+
const _hoisted_14$7 = { class: "rgba-b" };
|
|
25456
|
+
const _hoisted_15$5 = ["value"];
|
|
25457
|
+
const _hoisted_16$5 = { class: "rgba-a" };
|
|
25458
|
+
const _hoisted_17$4 = ["value"];
|
|
25459
|
+
const _hoisted_18$4 = { class: "presetColor" };
|
|
25460
|
+
const _hoisted_19$4 = { class: "preset" };
|
|
25461
|
+
const _hoisted_20$4 = ["onClick"];
|
|
25383
25462
|
const _sfc_main$5a = /* @__PURE__ */ defineComponent({
|
|
25384
25463
|
__name: "ColorPicker",
|
|
25385
25464
|
props: {
|
|
@@ -25806,69 +25885,69 @@ const _sfc_main$5a = /* @__PURE__ */ defineComponent({
|
|
|
25806
25885
|
}, null, 4)
|
|
25807
25886
|
], 544)
|
|
25808
25887
|
]),
|
|
25809
|
-
createElementVNode("div", _hoisted_6$
|
|
25888
|
+
createElementVNode("div", _hoisted_6$F, [
|
|
25810
25889
|
createElementVNode("div", {
|
|
25811
25890
|
style: normalizeStyle(`background-color: ${colorObj.value.rgba};width: 100%;height: 100%;box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);`)
|
|
25812
25891
|
}, null, 4)
|
|
25813
25892
|
])
|
|
25814
25893
|
]),
|
|
25815
|
-
createElementVNode("div", _hoisted_7$
|
|
25816
|
-
createElementVNode("div", _hoisted_8$
|
|
25894
|
+
createElementVNode("div", _hoisted_7$s, [
|
|
25895
|
+
createElementVNode("div", _hoisted_8$n, [
|
|
25817
25896
|
createElementVNode("label", null, [
|
|
25818
25897
|
createElementVNode("input", {
|
|
25819
25898
|
value: colorObj.value.hex8,
|
|
25820
25899
|
onInput: hexChange,
|
|
25821
25900
|
spellcheck: "false"
|
|
25822
|
-
}, null, 40, _hoisted_9$
|
|
25901
|
+
}, null, 40, _hoisted_9$h)
|
|
25823
25902
|
]),
|
|
25824
25903
|
_cache[2] || (_cache[2] = createElementVNode("p", null, "Hex", -1))
|
|
25825
25904
|
]),
|
|
25826
|
-
createElementVNode("div", _hoisted_10$
|
|
25905
|
+
createElementVNode("div", _hoisted_10$f, [
|
|
25827
25906
|
createElementVNode("label", null, [
|
|
25828
25907
|
createElementVNode("input", {
|
|
25829
25908
|
value: red.value,
|
|
25830
25909
|
onInput: redChange
|
|
25831
|
-
}, null, 40, _hoisted_11$
|
|
25910
|
+
}, null, 40, _hoisted_11$d)
|
|
25832
25911
|
]),
|
|
25833
25912
|
_cache[3] || (_cache[3] = createElementVNode("p", null, "R", -1))
|
|
25834
25913
|
]),
|
|
25835
|
-
createElementVNode("div", _hoisted_12$
|
|
25914
|
+
createElementVNode("div", _hoisted_12$a, [
|
|
25836
25915
|
createElementVNode("label", null, [
|
|
25837
25916
|
createElementVNode("input", {
|
|
25838
25917
|
value: green.value,
|
|
25839
25918
|
onInput: greenChange
|
|
25840
|
-
}, null, 40, _hoisted_13$
|
|
25919
|
+
}, null, 40, _hoisted_13$9)
|
|
25841
25920
|
]),
|
|
25842
25921
|
_cache[4] || (_cache[4] = createElementVNode("p", null, "G", -1))
|
|
25843
25922
|
]),
|
|
25844
|
-
createElementVNode("div", _hoisted_14$
|
|
25923
|
+
createElementVNode("div", _hoisted_14$7, [
|
|
25845
25924
|
createElementVNode("label", null, [
|
|
25846
25925
|
createElementVNode("input", {
|
|
25847
25926
|
value: blue.value,
|
|
25848
25927
|
onInput: blueChange
|
|
25849
|
-
}, null, 40, _hoisted_15$
|
|
25928
|
+
}, null, 40, _hoisted_15$5)
|
|
25850
25929
|
]),
|
|
25851
25930
|
_cache[5] || (_cache[5] = createElementVNode("p", null, "B", -1))
|
|
25852
25931
|
]),
|
|
25853
|
-
createElementVNode("div", _hoisted_16$
|
|
25932
|
+
createElementVNode("div", _hoisted_16$5, [
|
|
25854
25933
|
createElementVNode("label", null, [
|
|
25855
25934
|
createElementVNode("input", {
|
|
25856
25935
|
value: alpha.value,
|
|
25857
25936
|
onInput: alphaChange
|
|
25858
|
-
}, null, 40, _hoisted_17$
|
|
25937
|
+
}, null, 40, _hoisted_17$4)
|
|
25859
25938
|
]),
|
|
25860
25939
|
_cache[6] || (_cache[6] = createElementVNode("p", null, "A", -1))
|
|
25861
25940
|
])
|
|
25862
25941
|
]),
|
|
25863
|
-
createElementVNode("div", _hoisted_18$
|
|
25942
|
+
createElementVNode("div", _hoisted_18$4, [
|
|
25864
25943
|
_cache[7] || (_cache[7] = createElementVNode("div", { class: "title" }, "推荐颜色", -1)),
|
|
25865
|
-
createElementVNode("ul", _hoisted_19$
|
|
25944
|
+
createElementVNode("ul", _hoisted_19$4, [
|
|
25866
25945
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.preset, (item) => {
|
|
25867
25946
|
return openBlock(), createElementBlock("li", {
|
|
25868
25947
|
key: item,
|
|
25869
25948
|
style: normalizeStyle(`background-color: ${item}`),
|
|
25870
25949
|
onClick: ($event) => presetChange(item)
|
|
25871
|
-
}, null, 12, _hoisted_20$
|
|
25950
|
+
}, null, 12, _hoisted_20$4);
|
|
25872
25951
|
}), 128))
|
|
25873
25952
|
])
|
|
25874
25953
|
])
|
|
@@ -26074,34 +26153,34 @@ const _hoisted_2$22 = { class: "inline-media-modal__header" };
|
|
|
26074
26153
|
const _hoisted_3$1x = ["aria-label"];
|
|
26075
26154
|
const _hoisted_4$13 = ["aria-selected"];
|
|
26076
26155
|
const _hoisted_5$Q = ["aria-selected"];
|
|
26077
|
-
const _hoisted_6$
|
|
26156
|
+
const _hoisted_6$E = {
|
|
26078
26157
|
key: 0,
|
|
26079
26158
|
class: "inline-media-modal__body icon-picker"
|
|
26080
26159
|
};
|
|
26081
|
-
const _hoisted_7$
|
|
26082
|
-
const _hoisted_8$
|
|
26160
|
+
const _hoisted_7$r = ["aria-label"];
|
|
26161
|
+
const _hoisted_8$m = {
|
|
26083
26162
|
key: 0,
|
|
26084
26163
|
class: "icon-picker__group-block"
|
|
26085
26164
|
};
|
|
26086
|
-
const _hoisted_9$
|
|
26087
|
-
const _hoisted_10$
|
|
26088
|
-
const _hoisted_11$
|
|
26165
|
+
const _hoisted_9$g = ["aria-expanded"];
|
|
26166
|
+
const _hoisted_10$e = ["src"];
|
|
26167
|
+
const _hoisted_11$c = {
|
|
26089
26168
|
key: 0,
|
|
26090
26169
|
class: "icon-picker__group-children"
|
|
26091
26170
|
};
|
|
26092
|
-
const _hoisted_12$
|
|
26093
|
-
const _hoisted_13$
|
|
26094
|
-
const _hoisted_14$
|
|
26095
|
-
const _hoisted_15$
|
|
26096
|
-
const _hoisted_16$
|
|
26171
|
+
const _hoisted_12$9 = ["title", "onClick"];
|
|
26172
|
+
const _hoisted_13$8 = { class: "icon-picker__group-block" };
|
|
26173
|
+
const _hoisted_14$6 = ["aria-expanded"];
|
|
26174
|
+
const _hoisted_15$4 = ["src"];
|
|
26175
|
+
const _hoisted_16$4 = {
|
|
26097
26176
|
key: 0,
|
|
26098
26177
|
class: "icon-picker__group-children"
|
|
26099
26178
|
};
|
|
26100
|
-
const _hoisted_17$
|
|
26101
|
-
const _hoisted_18$
|
|
26102
|
-
const _hoisted_19$
|
|
26103
|
-
const _hoisted_20$
|
|
26104
|
-
const _hoisted_21$
|
|
26179
|
+
const _hoisted_17$3 = ["title", "onClick"];
|
|
26180
|
+
const _hoisted_18$3 = { class: "icon-picker__main" };
|
|
26181
|
+
const _hoisted_19$3 = { class: "icon-picker__search" };
|
|
26182
|
+
const _hoisted_20$3 = ["src"];
|
|
26183
|
+
const _hoisted_21$3 = ["placeholder", "onKeydown"];
|
|
26105
26184
|
const _hoisted_22$2 = ["aria-label"];
|
|
26106
26185
|
const _hoisted_23$2 = ["src"];
|
|
26107
26186
|
const _hoisted_24$2 = { class: "icon-picker__results-viewport" };
|
|
@@ -26356,7 +26435,7 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
|
|
|
26356
26435
|
}, toDisplayString$1(_ctx.$t("sys.image")), 11, _hoisted_5$Q)
|
|
26357
26436
|
], 8, _hoisted_3$1x)
|
|
26358
26437
|
]),
|
|
26359
|
-
activeTab.value === "icon" ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
26438
|
+
activeTab.value === "icon" ? (openBlock(), createElementBlock("div", _hoisted_6$E, [
|
|
26360
26439
|
createElementVNode("aside", {
|
|
26361
26440
|
class: "icon-picker__sidebar",
|
|
26362
26441
|
"aria-label": _ctx.$t("sys.onlineForm.inlineMedia.categoryAriaLabel")
|
|
@@ -26366,7 +26445,7 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
|
|
|
26366
26445
|
class: normalizeClass(["icon-picker__category", activeGroupId.value === "all" && "icon-picker__category--active"]),
|
|
26367
26446
|
onClick: _cache[2] || (_cache[2] = ($event) => activeGroupId.value = "all")
|
|
26368
26447
|
}, toDisplayString$1(_ctx.$t("sys.all")), 3),
|
|
26369
|
-
unref(assetIconGroups).length ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
26448
|
+
unref(assetIconGroups).length ? (openBlock(), createElementBlock("div", _hoisted_8$m, [
|
|
26370
26449
|
createElementVNode("button", {
|
|
26371
26450
|
type: "button",
|
|
26372
26451
|
class: "icon-picker__group-heading",
|
|
@@ -26379,11 +26458,11 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
|
|
|
26379
26458
|
createElementVNode("img", {
|
|
26380
26459
|
src: unref(CaretDownIcon),
|
|
26381
26460
|
alt: ""
|
|
26382
|
-
}, null, 8, _hoisted_10$
|
|
26461
|
+
}, null, 8, _hoisted_10$e)
|
|
26383
26462
|
], 2),
|
|
26384
26463
|
createElementVNode("span", null, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.assetIcons")), 1)
|
|
26385
|
-
], 8, _hoisted_9$
|
|
26386
|
-
assetExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_11$
|
|
26464
|
+
], 8, _hoisted_9$g),
|
|
26465
|
+
assetExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_11$c, [
|
|
26387
26466
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(assetIconGroups), (group) => {
|
|
26388
26467
|
return openBlock(), createElementBlock("button", {
|
|
26389
26468
|
key: group.id,
|
|
@@ -26391,11 +26470,11 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
|
|
|
26391
26470
|
class: normalizeClass(["icon-picker__category", activeGroupId.value === group.id && "icon-picker__category--active"]),
|
|
26392
26471
|
title: group.name,
|
|
26393
26472
|
onClick: ($event) => activeGroupId.value = group.id
|
|
26394
|
-
}, toDisplayString$1(group.name), 11, _hoisted_12$
|
|
26473
|
+
}, toDisplayString$1(group.name), 11, _hoisted_12$9);
|
|
26395
26474
|
}), 128))
|
|
26396
26475
|
])) : createCommentVNode("", true)
|
|
26397
26476
|
])) : createCommentVNode("", true),
|
|
26398
|
-
createElementVNode("div", _hoisted_13$
|
|
26477
|
+
createElementVNode("div", _hoisted_13$8, [
|
|
26399
26478
|
createElementVNode("button", {
|
|
26400
26479
|
type: "button",
|
|
26401
26480
|
class: "icon-picker__group-heading",
|
|
@@ -26408,11 +26487,11 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
|
|
|
26408
26487
|
createElementVNode("img", {
|
|
26409
26488
|
src: unref(CaretDownIcon),
|
|
26410
26489
|
alt: ""
|
|
26411
|
-
}, null, 8, _hoisted_15$
|
|
26490
|
+
}, null, 8, _hoisted_15$4)
|
|
26412
26491
|
], 2),
|
|
26413
26492
|
createElementVNode("span", null, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.builtinIcons")), 1)
|
|
26414
|
-
], 8, _hoisted_14$
|
|
26415
|
-
builtinExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_16$
|
|
26493
|
+
], 8, _hoisted_14$6),
|
|
26494
|
+
builtinExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_16$4, [
|
|
26416
26495
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(builtinIconGroups), (group) => {
|
|
26417
26496
|
return openBlock(), createElementBlock("button", {
|
|
26418
26497
|
key: group.id,
|
|
@@ -26420,25 +26499,25 @@ const _sfc_main$55 = /* @__PURE__ */ defineComponent({
|
|
|
26420
26499
|
class: normalizeClass(["icon-picker__category", activeGroupId.value === group.id && "icon-picker__category--active"]),
|
|
26421
26500
|
title: _ctx.$t("sys.onlineForm.inlineMedia.medicalDevice"),
|
|
26422
26501
|
onClick: ($event) => activeGroupId.value = group.id
|
|
26423
|
-
}, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.medicalDevice")), 11, _hoisted_17$
|
|
26502
|
+
}, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.medicalDevice")), 11, _hoisted_17$3);
|
|
26424
26503
|
}), 128))
|
|
26425
26504
|
])) : createCommentVNode("", true)
|
|
26426
26505
|
])
|
|
26427
|
-
], 8, _hoisted_7$
|
|
26428
|
-
createElementVNode("main", _hoisted_18$
|
|
26429
|
-
createElementVNode("label", _hoisted_19$
|
|
26506
|
+
], 8, _hoisted_7$r),
|
|
26507
|
+
createElementVNode("main", _hoisted_18$3, [
|
|
26508
|
+
createElementVNode("label", _hoisted_19$3, [
|
|
26430
26509
|
createElementVNode("img", {
|
|
26431
26510
|
class: "icon-picker__search-icon",
|
|
26432
26511
|
src: unref(SearchIcon),
|
|
26433
26512
|
alt: ""
|
|
26434
|
-
}, null, 8, _hoisted_20$
|
|
26513
|
+
}, null, 8, _hoisted_20$3),
|
|
26435
26514
|
withDirectives(createElementVNode("input", {
|
|
26436
26515
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => searchInputValue.value = $event),
|
|
26437
26516
|
type: "text",
|
|
26438
26517
|
placeholder: _ctx.$t("sys.onlineForm.inlineMedia.searchIconPlaceholder"),
|
|
26439
26518
|
onInput: handleSearchInput,
|
|
26440
26519
|
onKeydown: withKeys(withModifiers(handleSearchConfirm, ["prevent"]), ["enter"])
|
|
26441
|
-
}, null, 40, _hoisted_21$
|
|
26520
|
+
}, null, 40, _hoisted_21$3), [
|
|
26442
26521
|
[vModelText, searchInputValue.value]
|
|
26443
26522
|
]),
|
|
26444
26523
|
searchInputValue.value ? (openBlock(), createElementBlock("button", {
|
|
@@ -26657,22 +26736,22 @@ const _hoisted_2$21 = { class: "designer__toolbar__left" };
|
|
|
26657
26736
|
const _hoisted_3$1w = { class: "designer__toolbar__left__second" };
|
|
26658
26737
|
const _hoisted_4$12 = { class: "second__top" };
|
|
26659
26738
|
const _hoisted_5$P = { class: "tool--dropdown" };
|
|
26660
|
-
const _hoisted_6$
|
|
26661
|
-
const _hoisted_7$
|
|
26662
|
-
const _hoisted_8$
|
|
26663
|
-
const _hoisted_9$
|
|
26664
|
-
const _hoisted_10$
|
|
26665
|
-
const _hoisted_11$
|
|
26666
|
-
const _hoisted_12$
|
|
26667
|
-
const _hoisted_13$
|
|
26668
|
-
const _hoisted_14$
|
|
26669
|
-
const _hoisted_15$
|
|
26670
|
-
const _hoisted_16$
|
|
26671
|
-
const _hoisted_17$
|
|
26672
|
-
const _hoisted_18$
|
|
26673
|
-
const _hoisted_19$
|
|
26674
|
-
const _hoisted_20$
|
|
26675
|
-
const _hoisted_21$
|
|
26739
|
+
const _hoisted_6$D = { class: "flex items-center text-14px" };
|
|
26740
|
+
const _hoisted_7$q = { class: "tool--dropdown" };
|
|
26741
|
+
const _hoisted_8$l = { class: "tool--dropdown" };
|
|
26742
|
+
const _hoisted_9$f = { class: "designer__toolbar__left__third" };
|
|
26743
|
+
const _hoisted_10$d = ["onClick"];
|
|
26744
|
+
const _hoisted_11$b = ["aria-disabled"];
|
|
26745
|
+
const _hoisted_12$8 = ["src"];
|
|
26746
|
+
const _hoisted_13$7 = { class: "tool--dropdown tool--dropdown-expand" };
|
|
26747
|
+
const _hoisted_14$5 = ["src"];
|
|
26748
|
+
const _hoisted_15$3 = { class: "expand-text" };
|
|
26749
|
+
const _hoisted_16$3 = { class: "flex items-center text-14px" };
|
|
26750
|
+
const _hoisted_17$2 = ["src"];
|
|
26751
|
+
const _hoisted_18$2 = { class: "tool--dropdown tool--dropdown-expand" };
|
|
26752
|
+
const _hoisted_19$2 = ["src"];
|
|
26753
|
+
const _hoisted_20$2 = { class: "expand-text" };
|
|
26754
|
+
const _hoisted_21$2 = { class: "menu-item-subtitle" };
|
|
26676
26755
|
const _hoisted_22$1 = { class: "flex items-center text-14px" };
|
|
26677
26756
|
const _hoisted_23$1 = ["src"];
|
|
26678
26757
|
const _hoisted_24$1 = { class: "designer__toolbar__right" };
|
|
@@ -26991,7 +27070,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
26991
27070
|
key: item.type
|
|
26992
27071
|
}, {
|
|
26993
27072
|
default: withCtx(() => [
|
|
26994
|
-
createElementVNode("div", _hoisted_6$
|
|
27073
|
+
createElementVNode("div", _hoisted_6$D, [
|
|
26995
27074
|
createVNode(BorderIcon, {
|
|
26996
27075
|
type: item.type,
|
|
26997
27076
|
class: "mr-6px relative -top-1px"
|
|
@@ -27012,7 +27091,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27012
27091
|
_: 1
|
|
27013
27092
|
})
|
|
27014
27093
|
]),
|
|
27015
|
-
createElementVNode("div", _hoisted_7$
|
|
27094
|
+
createElementVNode("div", _hoisted_7$q, [
|
|
27016
27095
|
createElementVNode("i", null, [
|
|
27017
27096
|
_cache[18] || (_cache[18] = createElementVNode("i", { class: "iconfont icon-wenziyanse" }, null, -1)),
|
|
27018
27097
|
createElementVNode("div", {
|
|
@@ -27039,7 +27118,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27039
27118
|
_: 1
|
|
27040
27119
|
}, 8, ["color"])
|
|
27041
27120
|
]),
|
|
27042
|
-
createElementVNode("div", _hoisted_8$
|
|
27121
|
+
createElementVNode("div", _hoisted_8$l, [
|
|
27043
27122
|
createElementVNode("i", null, [
|
|
27044
27123
|
_cache[20] || (_cache[20] = createElementVNode("i", { class: "iconfont icon-tianchongyanse relative left-1px" }, null, -1)),
|
|
27045
27124
|
createElementVNode("div", {
|
|
@@ -27068,7 +27147,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27068
27147
|
])
|
|
27069
27148
|
]),
|
|
27070
27149
|
_cache[28] || (_cache[28] = createElementVNode("div", { class: "vertical-divider" }, null, -1)),
|
|
27071
|
-
createElementVNode("div", _hoisted_9$
|
|
27150
|
+
createElementVNode("div", _hoisted_9$f, [
|
|
27072
27151
|
(openBlock(true), createElementBlock(Fragment, null, renderList(alignList.value, (item, index2) => {
|
|
27073
27152
|
return openBlock(), createBlock(_component_a_tooltip, {
|
|
27074
27153
|
placement: "bottom",
|
|
@@ -27089,7 +27168,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27089
27168
|
createElementVNode("i", {
|
|
27090
27169
|
class: normalizeClass(item.icon)
|
|
27091
27170
|
}, null, 2)
|
|
27092
|
-
], 10, _hoisted_10$
|
|
27171
|
+
], 10, _hoisted_10$d)
|
|
27093
27172
|
]),
|
|
27094
27173
|
_: 2
|
|
27095
27174
|
}, 1032, ["align"]);
|
|
@@ -27121,9 +27200,9 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27121
27200
|
src: unref(ToolbarInsertIcon),
|
|
27122
27201
|
alt: "",
|
|
27123
27202
|
"aria-hidden": "true"
|
|
27124
|
-
}, null, 8, _hoisted_12$
|
|
27203
|
+
}, null, 8, _hoisted_12$8),
|
|
27125
27204
|
createElementVNode("span", null, toDisplayString$1(_ctx.$t("sys.onlineForm.inlineMedia.insert")), 1)
|
|
27126
|
-
], 42, _hoisted_11$
|
|
27205
|
+
], 42, _hoisted_11$b)
|
|
27127
27206
|
]),
|
|
27128
27207
|
_: 1
|
|
27129
27208
|
}),
|
|
@@ -27206,13 +27285,13 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27206
27285
|
onClick: ($event) => onDataMenuClick(item)
|
|
27207
27286
|
}, {
|
|
27208
27287
|
default: withCtx(() => [
|
|
27209
|
-
createElementVNode("div", _hoisted_16$
|
|
27288
|
+
createElementVNode("div", _hoisted_16$3, [
|
|
27210
27289
|
createElementVNode("img", {
|
|
27211
27290
|
class: "expand-img m-r-6px",
|
|
27212
27291
|
src: item.iconSrc,
|
|
27213
27292
|
alt: "",
|
|
27214
27293
|
srcset: ""
|
|
27215
|
-
}, null, 8, _hoisted_17$
|
|
27294
|
+
}, null, 8, _hoisted_17$2),
|
|
27216
27295
|
createElementVNode("span", null, toDisplayString$1(item.label), 1)
|
|
27217
27296
|
])
|
|
27218
27297
|
]),
|
|
@@ -27224,15 +27303,15 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27224
27303
|
})
|
|
27225
27304
|
]),
|
|
27226
27305
|
default: withCtx(() => [
|
|
27227
|
-
createElementVNode("div", _hoisted_13$
|
|
27306
|
+
createElementVNode("div", _hoisted_13$7, [
|
|
27228
27307
|
createElementVNode("img", {
|
|
27229
27308
|
class: "expand-img",
|
|
27230
27309
|
src: unref(TABLE_CATEGORY_SVG).dataTable,
|
|
27231
27310
|
alt: "",
|
|
27232
27311
|
srcset: ""
|
|
27233
|
-
}, null, 8, _hoisted_14$
|
|
27312
|
+
}, null, 8, _hoisted_14$5),
|
|
27234
27313
|
_cache[25] || (_cache[25] = createElementVNode("i", { class: "arrow" }, null, -1)),
|
|
27235
|
-
createElementVNode("div", _hoisted_15$
|
|
27314
|
+
createElementVNode("div", _hoisted_15$3, toDisplayString$1(_ctx.$t("sys.dataSet.dataTableLabel")), 1)
|
|
27236
27315
|
])
|
|
27237
27316
|
]),
|
|
27238
27317
|
_: 1
|
|
@@ -27252,7 +27331,7 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27252
27331
|
return openBlock(), createElementBlock(Fragment, {
|
|
27253
27332
|
key: group.title
|
|
27254
27333
|
}, [
|
|
27255
|
-
createElementVNode("div", _hoisted_21$
|
|
27334
|
+
createElementVNode("div", _hoisted_21$2, toDisplayString$1(group.title), 1),
|
|
27256
27335
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.items, (item) => {
|
|
27257
27336
|
return openBlock(), createBlock(_component_a_menu_item, {
|
|
27258
27337
|
key: item.type,
|
|
@@ -27279,15 +27358,15 @@ const _sfc_main$54 = /* @__PURE__ */ defineComponent({
|
|
|
27279
27358
|
})
|
|
27280
27359
|
]),
|
|
27281
27360
|
default: withCtx(() => [
|
|
27282
|
-
createElementVNode("div", _hoisted_18$
|
|
27361
|
+
createElementVNode("div", _hoisted_18$2, [
|
|
27283
27362
|
createElementVNode("img", {
|
|
27284
27363
|
class: "expand-img",
|
|
27285
27364
|
src: unref(TABLE_CATEGORY_SVG).businessTable,
|
|
27286
27365
|
alt: "",
|
|
27287
27366
|
srcset: ""
|
|
27288
|
-
}, null, 8, _hoisted_19$
|
|
27367
|
+
}, null, 8, _hoisted_19$2),
|
|
27289
27368
|
_cache[26] || (_cache[26] = createElementVNode("i", { class: "arrow" }, null, -1)),
|
|
27290
|
-
createElementVNode("div", _hoisted_20$
|
|
27369
|
+
createElementVNode("div", _hoisted_20$2, toDisplayString$1(_ctx.$t("sys.printDesigner.businessTable")), 1)
|
|
27291
27370
|
])
|
|
27292
27371
|
]),
|
|
27293
27372
|
_: 1
|
|
@@ -27498,7 +27577,7 @@ const FIELD_TYPE_PANEL_LABELS = {
|
|
|
27498
27577
|
[FIELD_TYPE.WAREHOUSE_IN_OUT]: "出入库明细表",
|
|
27499
27578
|
[FIELD_TYPE.STOCKTAKE]: "库存盘点表",
|
|
27500
27579
|
[FIELD_TYPE.ALLOCATE]: "库存调拨表",
|
|
27501
|
-
[FIELD_TYPE.STERILIZE_BATCH]: "
|
|
27580
|
+
[FIELD_TYPE.STERILIZE_BATCH]: "生产批次灭菌表",
|
|
27502
27581
|
[FIELD_TYPE.PRETREATMENT_LIST]: "产前表",
|
|
27503
27582
|
[FIELD_TYPE.INSPECTION]: "检验表",
|
|
27504
27583
|
[FIELD_TYPE.MATERIAL_CONSUME_TABLE]: "物料消耗表",
|
|
@@ -32180,8 +32259,8 @@ const _hoisted_2$1R = { class: "option-container" };
|
|
|
32180
32259
|
const _hoisted_3$1n = { class: "option" };
|
|
32181
32260
|
const _hoisted_4$$ = { class: "option__label" };
|
|
32182
32261
|
const _hoisted_5$M = { class: "option-container" };
|
|
32183
|
-
const _hoisted_6$
|
|
32184
|
-
const _hoisted_7$
|
|
32262
|
+
const _hoisted_6$C = { class: "option" };
|
|
32263
|
+
const _hoisted_7$p = { class: "option__label" };
|
|
32185
32264
|
const _sfc_main$4M = /* @__PURE__ */ defineComponent({
|
|
32186
32265
|
__name: "boolean-props",
|
|
32187
32266
|
props: {
|
|
@@ -32275,8 +32354,8 @@ const _sfc_main$4M = /* @__PURE__ */ defineComponent({
|
|
|
32275
32354
|
}, null, 8, ["disabled", "items"])) : createCommentVNode("", true)
|
|
32276
32355
|
]),
|
|
32277
32356
|
createElementVNode("div", _hoisted_5$M, [
|
|
32278
|
-
createElementVNode("div", _hoisted_6$
|
|
32279
|
-
createElementVNode("span", _hoisted_7$
|
|
32357
|
+
createElementVNode("div", _hoisted_6$C, [
|
|
32358
|
+
createElementVNode("span", _hoisted_7$p, toDisplayString$1(`${_ctx.$t("sys.fake")}`), 1),
|
|
32280
32359
|
createVNode(_component_a_input, {
|
|
32281
32360
|
class: "option__input",
|
|
32282
32361
|
size: "small",
|
|
@@ -33341,6 +33420,52 @@ const _sfc_main$4G = /* @__PURE__ */ defineComponent({
|
|
|
33341
33420
|
}
|
|
33342
33421
|
});
|
|
33343
33422
|
const IndicesEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4G, [["__scopeId", "data-v-97c50769"]]);
|
|
33423
|
+
const ASSOC_FILTER_SOURCE_TYPES = /* @__PURE__ */ new Set([
|
|
33424
|
+
FIELD_TYPE.MATERIAL_NO,
|
|
33425
|
+
FIELD_TYPE.MFG_ORDER
|
|
33426
|
+
]);
|
|
33427
|
+
const BUSINESS_SUB_TABLE_TYPES = getExclusiveBusinessTypeTokens();
|
|
33428
|
+
function isSubTableField(fieldMeta) {
|
|
33429
|
+
return !!(fieldMeta.subModelKey && fieldMeta.subFieldKey);
|
|
33430
|
+
}
|
|
33431
|
+
function isFieldOnSubModel(fieldMeta, masterModelKey) {
|
|
33432
|
+
if (isSubTableField(fieldMeta)) return true;
|
|
33433
|
+
return !!(fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey);
|
|
33434
|
+
}
|
|
33435
|
+
function normalizeSubTableType(type) {
|
|
33436
|
+
if (!type) return void 0;
|
|
33437
|
+
return getSubTableTypeByRefModelType(type) ?? type;
|
|
33438
|
+
}
|
|
33439
|
+
function isBusinessSubTableType(type) {
|
|
33440
|
+
if (!type) return false;
|
|
33441
|
+
const normalized = normalizeSubTableType(type);
|
|
33442
|
+
return BUSINESS_SUB_TABLE_TYPES.has(type) || !!normalized && BUSINESS_SUB_TABLE_TYPES.has(normalized);
|
|
33443
|
+
}
|
|
33444
|
+
function resolveSubTableType(fieldMeta, ctx = {}) {
|
|
33445
|
+
const fromFieldMeta = normalizeSubTableType(fieldMeta.subModelType);
|
|
33446
|
+
if (fromFieldMeta) return fromFieldMeta;
|
|
33447
|
+
const fromCell = normalizeSubTableType(ctx.cellSubTableType);
|
|
33448
|
+
if (fromCell) return fromCell;
|
|
33449
|
+
const { tables = [], masterModelKey } = ctx;
|
|
33450
|
+
const matchedTable = tables.find(
|
|
33451
|
+
(t2) => fieldMeta.subFieldKey && t2.field === fieldMeta.subFieldKey || fieldMeta.subModelKey && t2.model === fieldMeta.subModelKey || fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey && t2.model === fieldMeta.model
|
|
33452
|
+
);
|
|
33453
|
+
const fromTable = normalizeSubTableType(matchedTable?.type);
|
|
33454
|
+
if (fromTable) return fromTable;
|
|
33455
|
+
return normalizeSubTableType(ctx.modelMetaSubModelType);
|
|
33456
|
+
}
|
|
33457
|
+
function canShowAssocFilter(fieldMeta, fieldType, ctx = {}) {
|
|
33458
|
+
if (fieldType !== FIELD_TYPE.PRODUCT) return false;
|
|
33459
|
+
const onSubModel = isFieldOnSubModel(fieldMeta, ctx.masterModelKey);
|
|
33460
|
+
const subType = resolveSubTableType(fieldMeta, ctx);
|
|
33461
|
+
if (!onSubModel && !subType) return true;
|
|
33462
|
+
if (isBusinessSubTableType(subType)) return false;
|
|
33463
|
+
if (onSubModel && !subType) return false;
|
|
33464
|
+
return true;
|
|
33465
|
+
}
|
|
33466
|
+
function buildAssocSourceFieldValue(fieldKey, subFieldKey) {
|
|
33467
|
+
return subFieldKey ? `${subFieldKey}.${fieldKey}` : fieldKey;
|
|
33468
|
+
}
|
|
33344
33469
|
const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
33345
33470
|
__name: "number-range-editor",
|
|
33346
33471
|
props: {
|
|
@@ -33352,6 +33477,8 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33352
33477
|
},
|
|
33353
33478
|
setup(__props) {
|
|
33354
33479
|
const ns = useNamespace("number-range-editor");
|
|
33480
|
+
const { currentCell: currentCell2, paper: paper2, doc: doc2 } = useSpreadSheet();
|
|
33481
|
+
const { modelMetaMap: modelMetaMap2 } = useModelFields();
|
|
33355
33482
|
const props2 = __props;
|
|
33356
33483
|
const formState = computed({
|
|
33357
33484
|
get() {
|
|
@@ -33367,13 +33494,31 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33367
33494
|
const minInputRef = ref(null);
|
|
33368
33495
|
const isIntegerField = computed(() => props2.fieldMeta?.fieldType === FIELD_TYPE.INTEGER);
|
|
33369
33496
|
const inputMax = computed(() => isIntegerField.value ? 21e8 : Infinity);
|
|
33497
|
+
const lowerBoundInputMin = computed(() => {
|
|
33498
|
+
const field = props2.fieldMeta;
|
|
33499
|
+
const manifestProps = findFieldMain(field.bizType, field.fieldType)?.defaultProps;
|
|
33500
|
+
const modelKey = field.subModelKey || field.model;
|
|
33501
|
+
const cellSubTableType = currentCell2.value?.dynamicTable?.type || currentCell2.value?.fixedTable?.type || currentCell2.value?.dataGroup2D?.type || currentCell2.value?.dataGroup?.type;
|
|
33502
|
+
const subModelType = resolveSubTableType(field, {
|
|
33503
|
+
masterModelKey: doc2.value.modelKey,
|
|
33504
|
+
cellSubTableType,
|
|
33505
|
+
tables: [...paper2.value.dynamicTables ?? [], ...paper2.value.fixedTables ?? []],
|
|
33506
|
+
modelMetaSubModelType: modelKey ? modelMetaMap2.value[modelKey]?.meta?.subModelType : void 0
|
|
33507
|
+
});
|
|
33508
|
+
const tableProfile = getProfileByTableType(subModelType) ?? getBusinessProfileByRefModelType(subModelType);
|
|
33509
|
+
const tableProps = tableProfile && isBusinessSubTableProfile(tableProfile) ? findFieldProfile(tableProfile, field.field ?? "")?.defaultProps : void 0;
|
|
33510
|
+
return [tableProps, manifestProps].some(
|
|
33511
|
+
(defaults2) => defaults2?.enableRangeValidate === true && defaults2.minValidateMode === RangeValidateMode.Fixed_Number && defaults2.minValue === 0
|
|
33512
|
+
) ? 0 : void 0;
|
|
33513
|
+
});
|
|
33370
33514
|
const withinLimit = (text) => (text.match(/[0-9]/g) ?? []).length <= (isIntegerField.value ? 10 : 15);
|
|
33371
33515
|
const fitsLength = (number2) => {
|
|
33372
33516
|
const digits = props2.precision;
|
|
33373
33517
|
const display = typeof digits === "number" && Number.isInteger(digits) && digits >= 0 ? number2.toFixed(digits) : number2.toFixed();
|
|
33374
33518
|
return withinLimit(display);
|
|
33375
33519
|
};
|
|
33376
|
-
const canInput = (text) => {
|
|
33520
|
+
const canInput = (text, target) => {
|
|
33521
|
+
if (target === "min" && lowerBoundInputMin.value === 0 && text.startsWith("-")) return false;
|
|
33377
33522
|
if (!withinLimit(text)) return false;
|
|
33378
33523
|
if (!/^[+-]?(?:\d+(?:\.\d*)?|\.\d*)?$/.test(text)) return false;
|
|
33379
33524
|
const number2 = new BigNumber(text);
|
|
@@ -33384,19 +33529,21 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33384
33529
|
const end = input.selectionEnd ?? start;
|
|
33385
33530
|
return input.value.slice(0, start) + insertedText + input.value.slice(end);
|
|
33386
33531
|
};
|
|
33387
|
-
const onBeforeInput = (event2) => {
|
|
33532
|
+
const onBeforeInput = (event2, target) => {
|
|
33388
33533
|
if (!event2.inputType.startsWith("insert") || event2.isComposing) return;
|
|
33389
33534
|
const text = event2.data ?? event2.dataTransfer?.getData("text");
|
|
33390
33535
|
if (text == null) return;
|
|
33391
|
-
if (!canInput(nextInput(event2.target, text)))
|
|
33536
|
+
if (!canInput(nextInput(event2.target, text), target))
|
|
33537
|
+
event2.preventDefault();
|
|
33392
33538
|
};
|
|
33393
|
-
const onPaste = (event2) => {
|
|
33539
|
+
const onPaste = (event2, target) => {
|
|
33394
33540
|
const text = event2.clipboardData?.getData("text");
|
|
33395
33541
|
if (text == null) return;
|
|
33396
|
-
if (!canInput(nextInput(event2.target, text)))
|
|
33542
|
+
if (!canInput(nextInput(event2.target, text), target))
|
|
33543
|
+
event2.preventDefault();
|
|
33397
33544
|
};
|
|
33398
33545
|
const onInput = (text, target) => {
|
|
33399
|
-
if (canInput(text)) return;
|
|
33546
|
+
if (canInput(text, target)) return;
|
|
33400
33547
|
if (target === "max") {
|
|
33401
33548
|
maxInputKey.value += 1;
|
|
33402
33549
|
nextTick(() => maxInputRef.value?.focus());
|
|
@@ -33420,7 +33567,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33420
33567
|
set: (value) => {
|
|
33421
33568
|
if (value == null) {
|
|
33422
33569
|
formState.value.min = void 0;
|
|
33423
|
-
} else if (Number.isFinite(value) && fitsLength(new BigNumber(value))) {
|
|
33570
|
+
} else if (Number.isFinite(value) && (lowerBoundInputMin.value === void 0 || value >= lowerBoundInputMin.value) && fitsLength(new BigNumber(value))) {
|
|
33424
33571
|
formState.value.min = value;
|
|
33425
33572
|
}
|
|
33426
33573
|
}
|
|
@@ -33472,7 +33619,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33472
33619
|
{ label: $t("sys.rangeCompareOp.gt"), value: RangeCompareOp.GT }
|
|
33473
33620
|
];
|
|
33474
33621
|
const minLimit = computed(() => ({
|
|
33475
|
-
lowerLimit: -Infinity,
|
|
33622
|
+
lowerLimit: lowerBoundInputMin.value ?? -Infinity,
|
|
33476
33623
|
upperLimit: Math.min(formState.value.max ?? Infinity, inputMax.value)
|
|
33477
33624
|
}));
|
|
33478
33625
|
const maxLimit = computed(() => ({
|
|
@@ -33552,9 +33699,9 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33552
33699
|
placeholder: _ctx.$t("sys.inputTextTip", { name: _ctx.$t("sys.maxNumber") }),
|
|
33553
33700
|
disabled: __props.disabled || __props.readonly,
|
|
33554
33701
|
maxlength: 17,
|
|
33555
|
-
onBeforeinput: onBeforeInput,
|
|
33556
|
-
onPaste,
|
|
33557
|
-
onInput: _cache[
|
|
33702
|
+
onBeforeinput: _cache[4] || (_cache[4] = (event2) => onBeforeInput(event2, "max")),
|
|
33703
|
+
onPaste: _cache[5] || (_cache[5] = (event2) => onPaste(event2, "max")),
|
|
33704
|
+
onInput: _cache[6] || (_cache[6] = (text) => onInput(text, "max"))
|
|
33558
33705
|
}, null, 8, ["class", "value", "min", "max", "precision", "placeholder", "disabled"]))
|
|
33559
33706
|
]),
|
|
33560
33707
|
_: 1
|
|
@@ -33566,9 +33713,9 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33566
33713
|
modelKey: __props.fieldMeta.model,
|
|
33567
33714
|
disabled: __props.disabled,
|
|
33568
33715
|
expr: formState.value.maxExpr,
|
|
33569
|
-
"onUpdate:expr": _cache[
|
|
33716
|
+
"onUpdate:expr": _cache[7] || (_cache[7] = ($event) => formState.value.maxExpr = $event),
|
|
33570
33717
|
"expr-echo": formState.value.maxExprEcho,
|
|
33571
|
-
"onUpdate:exprEcho": _cache[
|
|
33718
|
+
"onUpdate:exprEcho": _cache[8] || (_cache[8] = ($event) => formState.value.maxExprEcho = $event)
|
|
33572
33719
|
}, null, 8, ["class", "modelKey", "disabled", "expr", "expr-echo"])) : createCommentVNode("", true),
|
|
33573
33720
|
createVNode(FormItem, {
|
|
33574
33721
|
label: _ctx.$t("sys.minValidateMode"),
|
|
@@ -33583,7 +33730,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33583
33730
|
options: unref(validateModeOptions),
|
|
33584
33731
|
disabled: __props.disabled,
|
|
33585
33732
|
value: formState.value.minValidateMode,
|
|
33586
|
-
"onUpdate:value": _cache[
|
|
33733
|
+
"onUpdate:value": _cache[9] || (_cache[9] = ($event) => formState.value.minValidateMode = $event)
|
|
33587
33734
|
}, null, 8, ["options", "disabled", "value"])
|
|
33588
33735
|
]),
|
|
33589
33736
|
_: 1
|
|
@@ -33602,7 +33749,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33602
33749
|
disabled: __props.disabled || __props.readonly,
|
|
33603
33750
|
"dropdown-match-select-width": false,
|
|
33604
33751
|
"dropdown-style": { minWidth: "110px" },
|
|
33605
|
-
onChange: _cache[
|
|
33752
|
+
onChange: _cache[10] || (_cache[10] = (v) => formState.value.minCompareOp = v)
|
|
33606
33753
|
}, null, 8, ["class", "value", "disabled"]),
|
|
33607
33754
|
(openBlock(), createBlock(_component_a_input_number, {
|
|
33608
33755
|
key: minInputKey.value,
|
|
@@ -33611,7 +33758,7 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33611
33758
|
size: "small",
|
|
33612
33759
|
class: normalizeClass([unref(ns).e("value")]),
|
|
33613
33760
|
value: minValue.value,
|
|
33614
|
-
"onUpdate:value": _cache[
|
|
33761
|
+
"onUpdate:value": _cache[11] || (_cache[11] = ($event) => minValue.value = $event),
|
|
33615
33762
|
min: minLimit.value.lowerLimit,
|
|
33616
33763
|
max: minLimit.value.upperLimit,
|
|
33617
33764
|
precision: __props.precision,
|
|
@@ -33619,9 +33766,9 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33619
33766
|
placeholder: _ctx.$t("sys.inputTextTip", { name: _ctx.$t("sys.minNumber") }),
|
|
33620
33767
|
disabled: __props.disabled || __props.readonly,
|
|
33621
33768
|
maxlength: 17,
|
|
33622
|
-
onBeforeinput: onBeforeInput,
|
|
33623
|
-
onPaste,
|
|
33624
|
-
onInput: _cache[
|
|
33769
|
+
onBeforeinput: _cache[12] || (_cache[12] = (event2) => onBeforeInput(event2, "min")),
|
|
33770
|
+
onPaste: _cache[13] || (_cache[13] = (event2) => onPaste(event2, "min")),
|
|
33771
|
+
onInput: _cache[14] || (_cache[14] = (text) => onInput(text, "min"))
|
|
33625
33772
|
}, null, 8, ["class", "value", "min", "max", "precision", "placeholder", "disabled"]))
|
|
33626
33773
|
]),
|
|
33627
33774
|
_: 1
|
|
@@ -33633,16 +33780,16 @@ const _sfc_main$4F = /* @__PURE__ */ defineComponent({
|
|
|
33633
33780
|
modelKey: __props.fieldMeta.model,
|
|
33634
33781
|
disabled: __props.disabled,
|
|
33635
33782
|
expr: formState.value.minExpr,
|
|
33636
|
-
"onUpdate:expr": _cache[
|
|
33783
|
+
"onUpdate:expr": _cache[15] || (_cache[15] = ($event) => formState.value.minExpr = $event),
|
|
33637
33784
|
"expr-echo": formState.value.minExprEcho,
|
|
33638
|
-
"onUpdate:exprEcho": _cache[
|
|
33785
|
+
"onUpdate:exprEcho": _cache[16] || (_cache[16] = ($event) => formState.value.minExprEcho = $event)
|
|
33639
33786
|
}, null, 8, ["class", "modelKey", "disabled", "expr", "expr-echo"])) : createCommentVNode("", true)
|
|
33640
33787
|
], 64)) : createCommentVNode("", true)
|
|
33641
33788
|
], 2);
|
|
33642
33789
|
};
|
|
33643
33790
|
}
|
|
33644
33791
|
});
|
|
33645
|
-
const NumberRangeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4F, [["__scopeId", "data-v-
|
|
33792
|
+
const NumberRangeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4F, [["__scopeId", "data-v-31445c84"]]);
|
|
33646
33793
|
function normalizeNumberText(value) {
|
|
33647
33794
|
const text = value == null ? "" : typeof value === "number" && Number.isFinite(value) ? new BigNumber(value).toFixed() : String(value);
|
|
33648
33795
|
return text.replace(/。/g, ".").replace(/\$\s?|,|,|\s/g, "");
|
|
@@ -37611,11 +37758,36 @@ const matchAutofillTargetField = (fromMeta, toMeta) => {
|
|
|
37611
37758
|
}
|
|
37612
37759
|
return matched;
|
|
37613
37760
|
};
|
|
37614
|
-
const _hoisted_1$2p = {
|
|
37615
|
-
|
|
37616
|
-
|
|
37617
|
-
|
|
37618
|
-
const
|
|
37761
|
+
const _hoisted_1$2p = {
|
|
37762
|
+
key: 0,
|
|
37763
|
+
class: "built-in-section"
|
|
37764
|
+
};
|
|
37765
|
+
const _hoisted_2$1F = { class: "section-heading" };
|
|
37766
|
+
const _hoisted_3$1g = { class: "section-title" };
|
|
37767
|
+
const _hoisted_4$Y = { class: "rule-count" };
|
|
37768
|
+
const _hoisted_5$L = { class: "section-hint" };
|
|
37769
|
+
const _hoisted_6$B = { class: "built-in-table" };
|
|
37770
|
+
const _hoisted_7$o = { class: "built-in-table-head" };
|
|
37771
|
+
const _hoisted_8$k = ["title"];
|
|
37772
|
+
const _hoisted_9$e = { class: "field-name" };
|
|
37773
|
+
const _hoisted_10$c = { class: "field-key" };
|
|
37774
|
+
const _hoisted_11$a = ["aria-label"];
|
|
37775
|
+
const _hoisted_12$7 = ["title"];
|
|
37776
|
+
const _hoisted_13$6 = { class: "field-name" };
|
|
37777
|
+
const _hoisted_14$4 = { class: "field-key" };
|
|
37778
|
+
const _hoisted_15$2 = {
|
|
37779
|
+
key: 1,
|
|
37780
|
+
class: "custom-section-heading"
|
|
37781
|
+
};
|
|
37782
|
+
const _hoisted_16$2 = { class: "section-title" };
|
|
37783
|
+
const _hoisted_17$1 = {
|
|
37784
|
+
key: 3,
|
|
37785
|
+
class: "custom-empty"
|
|
37786
|
+
};
|
|
37787
|
+
const _hoisted_18$1 = { class: "text-[#8B8B8B]" };
|
|
37788
|
+
const _hoisted_19$1 = { class: "atuofill-field-icon" };
|
|
37789
|
+
const _hoisted_20$1 = { class: "form-table-label" };
|
|
37790
|
+
const _hoisted_21$1 = ["onClick"];
|
|
37619
37791
|
const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
37620
37792
|
__name: "autofill-rules-modal",
|
|
37621
37793
|
props: {
|
|
@@ -37649,15 +37821,37 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37649
37821
|
const bindFiledList = ref([]);
|
|
37650
37822
|
const allFieldInFormWithout = ref([]);
|
|
37651
37823
|
const formModelName = ref("");
|
|
37824
|
+
const builtInDefinitions = computed(
|
|
37825
|
+
() => getBuiltInAutofillRules({
|
|
37826
|
+
fieldKey: props2.fieldMeta.field,
|
|
37827
|
+
bizType: props2.fieldMeta.bizType,
|
|
37828
|
+
subModelType: props2.fieldMeta.subModelType || modelMetaMap2.value[modelKey.value]?.meta?.subModelType
|
|
37829
|
+
})
|
|
37830
|
+
);
|
|
37831
|
+
const persistedBuiltInRules = ref([]);
|
|
37832
|
+
const getBuiltInSourceLabel = (rule) => rule.fromFieldLabel || bindFiledList.value.find((field) => field.key === rule.fromField)?.name || rule.fromField || "";
|
|
37833
|
+
const getBuiltInTargetLabel = (fieldKey) => allFieldInFormWithout.value.find((field) => field.key === fieldKey)?.name || fieldKey;
|
|
37834
|
+
const builtInDisplayRules = computed(
|
|
37835
|
+
() => persistedBuiltInRules.value.map((rule) => {
|
|
37836
|
+
const fromFieldLabel = builtInDefinitions.value.find(
|
|
37837
|
+
(definition) => definition.fromField === rule.fromField && definition.toField === rule.toField
|
|
37838
|
+
)?.fromFieldLabel;
|
|
37839
|
+
const sourceLabel = getBuiltInSourceLabel({ ...rule, fromFieldLabel });
|
|
37840
|
+
const targetLabel = getBuiltInTargetLabel(rule.toField || "");
|
|
37841
|
+
return {
|
|
37842
|
+
...rule,
|
|
37843
|
+
sourceLabel,
|
|
37844
|
+
targetLabel
|
|
37845
|
+
};
|
|
37846
|
+
})
|
|
37847
|
+
);
|
|
37652
37848
|
onMounted(async () => {
|
|
37653
37849
|
const modelDetail = await api.apaas.modelMeta.getDetail({
|
|
37654
37850
|
modelKey: modelKey.value
|
|
37655
37851
|
});
|
|
37656
37852
|
allFieldInFormWithout.value = modelDetail?.fieldMetaList?.filter((d) => d.createType !== "SYSTEM") || [];
|
|
37657
37853
|
formModelName.value = modelDetail?.name || "";
|
|
37658
|
-
|
|
37659
|
-
onDataReceive({ rules: props2.rules });
|
|
37660
|
-
}
|
|
37854
|
+
onDataReceive({ rules: props2.rules || [] });
|
|
37661
37855
|
});
|
|
37662
37856
|
const fromFieldTreeData = computed(() => {
|
|
37663
37857
|
const children = bindFiledList.value.filter((f) => f.key !== "id_").map((f) => ({
|
|
@@ -37785,12 +37979,16 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37785
37979
|
return treeData;
|
|
37786
37980
|
};
|
|
37787
37981
|
const onDataReceive = async ({ rules }) => {
|
|
37788
|
-
|
|
37789
|
-
|
|
37790
|
-
|
|
37791
|
-
fromField
|
|
37792
|
-
|
|
37793
|
-
|
|
37982
|
+
const remainingRules = cloneDeep(rules);
|
|
37983
|
+
persistedBuiltInRules.value = builtInDefinitions.value.flatMap((definition) => {
|
|
37984
|
+
const index2 = remainingRules.findIndex(
|
|
37985
|
+
(rule) => rule.fromField === definition.fromField && rule.toField === definition.toField
|
|
37986
|
+
);
|
|
37987
|
+
return index2 >= 0 ? remainingRules.splice(index2, 1) : [];
|
|
37988
|
+
});
|
|
37989
|
+
formState.rules = stripSubTableRuleFields(remainingRules);
|
|
37990
|
+
if (!persistedBuiltInRules.value.length && !formState.rules.length) {
|
|
37991
|
+
formState.rules.push({ fromField: void 0, toField: void 0 });
|
|
37794
37992
|
}
|
|
37795
37993
|
const res = await api.apaas.modelMeta.getDetail({
|
|
37796
37994
|
modelKey: refModelKey.value
|
|
@@ -37810,10 +38008,10 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37810
38008
|
};
|
|
37811
38009
|
const modal = useModal$1(async () => {
|
|
37812
38010
|
if (props2.readonly) return null;
|
|
37813
|
-
await autofillForm.value
|
|
38011
|
+
await autofillForm.value?.validate();
|
|
37814
38012
|
return {
|
|
37815
38013
|
ok: true,
|
|
37816
|
-
data: stripSubTableRuleFields(formState.rules)
|
|
38014
|
+
data: [...persistedBuiltInRules.value, ...stripSubTableRuleFields(formState.rules)]
|
|
37817
38015
|
};
|
|
37818
38016
|
});
|
|
37819
38017
|
onMounted(() => {
|
|
@@ -37871,14 +38069,73 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37871
38069
|
return openBlock(), createElementBlock("div", {
|
|
37872
38070
|
class: normalizeClass(["px-16px py-16px", { "is-readonly": __props.readonly }])
|
|
37873
38071
|
}, [
|
|
37874
|
-
|
|
37875
|
-
|
|
38072
|
+
builtInDisplayRules.value.length ? (openBlock(), createElementBlock("div", _hoisted_1$2p, [
|
|
38073
|
+
createElementVNode("div", _hoisted_2$1F, [
|
|
38074
|
+
createElementVNode("div", _hoisted_3$1g, [
|
|
38075
|
+
createTextVNode(toDisplayString$1(unref($t2)("sys.pageDesigner.builtInFillRules")) + " ", 1),
|
|
38076
|
+
createElementVNode("span", _hoisted_4$Y, toDisplayString$1(builtInDisplayRules.value.length), 1)
|
|
38077
|
+
]),
|
|
38078
|
+
createElementVNode("span", _hoisted_5$L, toDisplayString$1(unref($t2)("sys.pageDesigner.builtInFillRulesTip")), 1)
|
|
38079
|
+
]),
|
|
38080
|
+
createElementVNode("div", _hoisted_6$B, [
|
|
38081
|
+
createElementVNode("div", _hoisted_7$o, [
|
|
38082
|
+
createElementVNode("span", null, toDisplayString$1(unref($t2)("sys.pageDesigner.valueSource")), 1),
|
|
38083
|
+
_cache[0] || (_cache[0] = createElementVNode("span", null, null, -1)),
|
|
38084
|
+
createElementVNode("span", null, toDisplayString$1(unref($t2)("sys.pageDesigner.targetField")), 1)
|
|
38085
|
+
]),
|
|
38086
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(builtInDisplayRules.value, (rule) => {
|
|
38087
|
+
return openBlock(), createElementBlock("div", {
|
|
38088
|
+
key: `${rule.fromField}:${rule.toField}`,
|
|
38089
|
+
class: "built-in-table-row"
|
|
38090
|
+
}, [
|
|
38091
|
+
createElementVNode("div", {
|
|
38092
|
+
class: "field-cell",
|
|
38093
|
+
title: rule.fromField
|
|
38094
|
+
}, [
|
|
38095
|
+
createElementVNode("span", _hoisted_9$e, toDisplayString$1(rule.sourceLabel), 1),
|
|
38096
|
+
createElementVNode("code", _hoisted_10$c, toDisplayString$1(rule.fromField), 1)
|
|
38097
|
+
], 8, _hoisted_8$k),
|
|
38098
|
+
createElementVNode("span", {
|
|
38099
|
+
class: "rule-arrow",
|
|
38100
|
+
"aria-label": unref($t2)("sys.pageDesigner.valueFillTip")
|
|
38101
|
+
}, "→", 8, _hoisted_11$a),
|
|
38102
|
+
createElementVNode("div", {
|
|
38103
|
+
class: "field-cell",
|
|
38104
|
+
title: rule.toField
|
|
38105
|
+
}, [
|
|
38106
|
+
createElementVNode("span", _hoisted_13$6, toDisplayString$1(rule.targetLabel), 1),
|
|
38107
|
+
createElementVNode("code", _hoisted_14$4, toDisplayString$1(rule.toField), 1)
|
|
38108
|
+
], 8, _hoisted_12$7)
|
|
38109
|
+
]);
|
|
38110
|
+
}), 128))
|
|
38111
|
+
])
|
|
38112
|
+
])) : createCommentVNode("", true),
|
|
38113
|
+
builtInDisplayRules.value.length ? (openBlock(), createElementBlock("div", _hoisted_15$2, [
|
|
38114
|
+
createElementVNode("span", _hoisted_16$2, toDisplayString$1(unref($t2)("sys.pageDesigner.customFillRules")), 1),
|
|
38115
|
+
!__props.readonly ? (openBlock(), createBlock(_component_a_button, {
|
|
38116
|
+
key: 0,
|
|
38117
|
+
type: "link",
|
|
38118
|
+
class: "custom-add-button",
|
|
38119
|
+
onClick: addRule
|
|
38120
|
+
}, {
|
|
38121
|
+
default: withCtx(() => [
|
|
38122
|
+
_cache[1] || (_cache[1] = createElementVNode("i", {
|
|
38123
|
+
class: "iconfont icon-chuangjian mr8px",
|
|
38124
|
+
style: { "vertical-align": "-1px" }
|
|
38125
|
+
}, null, -1)),
|
|
38126
|
+
createTextVNode(" " + toDisplayString$1(unref($t2)("sys.pageDesigner.fillRules")), 1)
|
|
38127
|
+
]),
|
|
38128
|
+
_: 1
|
|
38129
|
+
})) : createCommentVNode("", true)
|
|
38130
|
+
])) : createCommentVNode("", true),
|
|
38131
|
+
!builtInDisplayRules.value.length && !__props.readonly ? (openBlock(), createBlock(_component_a_button, {
|
|
38132
|
+
key: 2,
|
|
37876
38133
|
type: "link",
|
|
37877
38134
|
onClick: addRule,
|
|
37878
38135
|
class: "mv10px pl24px mt4px"
|
|
37879
38136
|
}, {
|
|
37880
38137
|
default: withCtx(() => [
|
|
37881
|
-
_cache[
|
|
38138
|
+
_cache[2] || (_cache[2] = createElementVNode("i", {
|
|
37882
38139
|
class: "iconfont icon-chuangjian mr8px",
|
|
37883
38140
|
style: { "vertical-align": "-1px" }
|
|
37884
38141
|
}, null, -1)),
|
|
@@ -37886,7 +38143,11 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37886
38143
|
]),
|
|
37887
38144
|
_: 1
|
|
37888
38145
|
})) : createCommentVNode("", true),
|
|
37889
|
-
|
|
38146
|
+
builtInDisplayRules.value.length && !formState.rules.length ? (openBlock(), createElementBlock("div", _hoisted_17$1, toDisplayString$1(unref($t2)("sys.pageDesigner.noCustomFillRules")), 1)) : createCommentVNode("", true),
|
|
38147
|
+
formState.rules.length || !builtInDisplayRules.value.length ? (openBlock(), createElementBlock("div", {
|
|
38148
|
+
key: 4,
|
|
38149
|
+
class: normalizeClass(["px24px", builtInDisplayRules.value.length ? "mt8px" : "mt20px"])
|
|
38150
|
+
}, [
|
|
37890
38151
|
createVNode(_component_a_row, {
|
|
37891
38152
|
gutter: 4,
|
|
37892
38153
|
style: { "margin-bottom": "4px", "padding": "0 10px" },
|
|
@@ -37903,7 +38164,7 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37903
38164
|
createVNode(_component_a_col, { span: 11 }, {
|
|
37904
38165
|
default: withCtx(() => [
|
|
37905
38166
|
createTextVNode(toDisplayString$1(unref($t2)("sys.pageDesigner.targetField")) + " ", 1),
|
|
37906
|
-
createElementVNode("span",
|
|
38167
|
+
createElementVNode("span", _hoisted_18$1, " ( " + toDisplayString$1(unref($t2)("sys.pageDesigner.onlineFormFieldInForm")) + ") ", 1)
|
|
37907
38168
|
]),
|
|
37908
38169
|
_: 1
|
|
37909
38170
|
})
|
|
@@ -37962,7 +38223,7 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37962
38223
|
onChange: ($event) => handleFromChange(element)
|
|
37963
38224
|
}, {
|
|
37964
38225
|
title: withCtx((data) => [
|
|
37965
|
-
createElementVNode("span",
|
|
38226
|
+
createElementVNode("span", _hoisted_19$1, [
|
|
37966
38227
|
data.type ? (openBlock(), createElementBlock("i", {
|
|
37967
38228
|
key: 0,
|
|
37968
38229
|
class: normalizeClass(["iconfont", unref(FieldIconMap)[data.type] || "text"])
|
|
@@ -37980,7 +38241,7 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
37980
38241
|
}, 1024),
|
|
37981
38242
|
createVNode(_component_a_col, { span: 4 }, {
|
|
37982
38243
|
default: withCtx(() => [
|
|
37983
|
-
createElementVNode("span",
|
|
38244
|
+
createElementVNode("span", _hoisted_20$1, toDisplayString$1(unref($t2)("sys.pageDesigner.valueFillTip")), 1)
|
|
37984
38245
|
]),
|
|
37985
38246
|
_: 1
|
|
37986
38247
|
}),
|
|
@@ -38055,8 +38316,8 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
38055
38316
|
withDirectives(createElementVNode("i", {
|
|
38056
38317
|
class: "iconfont icon-shanchu2 text-[#797A7D] error-gct-hover cursor-pointer",
|
|
38057
38318
|
onClick: ($event) => removeRule(index2)
|
|
38058
|
-
}, null, 8,
|
|
38059
|
-
[vShow, !__props.readonly
|
|
38319
|
+
}, null, 8, _hoisted_21$1), [
|
|
38320
|
+
[vShow, !__props.readonly]
|
|
38060
38321
|
])
|
|
38061
38322
|
]),
|
|
38062
38323
|
_: 2
|
|
@@ -38070,12 +38331,12 @@ const _sfc_main$4g = /* @__PURE__ */ defineComponent({
|
|
|
38070
38331
|
]),
|
|
38071
38332
|
_: 1
|
|
38072
38333
|
}, 8, ["model"])
|
|
38073
|
-
])
|
|
38334
|
+
], 2)) : createCommentVNode("", true)
|
|
38074
38335
|
], 2);
|
|
38075
38336
|
};
|
|
38076
38337
|
}
|
|
38077
38338
|
});
|
|
38078
|
-
const AutofillRulesModal = /* @__PURE__ */ _export_sfc(_sfc_main$4g, [["__scopeId", "data-v-
|
|
38339
|
+
const AutofillRulesModal = /* @__PURE__ */ _export_sfc(_sfc_main$4g, [["__scopeId", "data-v-06fec19c"]]);
|
|
38079
38340
|
const _hoisted_1$2o = { class: "muted" };
|
|
38080
38341
|
const _hoisted_2$1E = ["onClick"];
|
|
38081
38342
|
const _sfc_main$4f = /* @__PURE__ */ defineComponent({
|
|
@@ -38671,52 +38932,6 @@ function useDefaultValueOptions({ source, getFields, fetchPage }) {
|
|
|
38671
38932
|
resolveSelected
|
|
38672
38933
|
};
|
|
38673
38934
|
}
|
|
38674
|
-
const ASSOC_FILTER_SOURCE_TYPES = /* @__PURE__ */ new Set([
|
|
38675
|
-
FIELD_TYPE.MATERIAL_NO,
|
|
38676
|
-
FIELD_TYPE.MFG_ORDER
|
|
38677
|
-
]);
|
|
38678
|
-
const BUSINESS_SUB_TABLE_TYPES = getExclusiveBusinessTypeTokens();
|
|
38679
|
-
function isSubTableField(fieldMeta) {
|
|
38680
|
-
return !!(fieldMeta.subModelKey && fieldMeta.subFieldKey);
|
|
38681
|
-
}
|
|
38682
|
-
function isFieldOnSubModel(fieldMeta, masterModelKey) {
|
|
38683
|
-
if (isSubTableField(fieldMeta)) return true;
|
|
38684
|
-
return !!(fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey);
|
|
38685
|
-
}
|
|
38686
|
-
function normalizeSubTableType(type) {
|
|
38687
|
-
if (!type) return void 0;
|
|
38688
|
-
return getSubTableTypeByRefModelType(type) ?? type;
|
|
38689
|
-
}
|
|
38690
|
-
function isBusinessSubTableType(type) {
|
|
38691
|
-
if (!type) return false;
|
|
38692
|
-
const normalized = normalizeSubTableType(type);
|
|
38693
|
-
return BUSINESS_SUB_TABLE_TYPES.has(type) || !!normalized && BUSINESS_SUB_TABLE_TYPES.has(normalized);
|
|
38694
|
-
}
|
|
38695
|
-
function resolveSubTableType(fieldMeta, ctx = {}) {
|
|
38696
|
-
const fromFieldMeta = normalizeSubTableType(fieldMeta.subModelType);
|
|
38697
|
-
if (fromFieldMeta) return fromFieldMeta;
|
|
38698
|
-
const fromCell = normalizeSubTableType(ctx.cellSubTableType);
|
|
38699
|
-
if (fromCell) return fromCell;
|
|
38700
|
-
const { tables = [], masterModelKey } = ctx;
|
|
38701
|
-
const matchedTable = tables.find(
|
|
38702
|
-
(t2) => fieldMeta.subFieldKey && t2.field === fieldMeta.subFieldKey || fieldMeta.subModelKey && t2.model === fieldMeta.subModelKey || fieldMeta.model && masterModelKey && fieldMeta.model !== masterModelKey && t2.model === fieldMeta.model
|
|
38703
|
-
);
|
|
38704
|
-
const fromTable = normalizeSubTableType(matchedTable?.type);
|
|
38705
|
-
if (fromTable) return fromTable;
|
|
38706
|
-
return normalizeSubTableType(ctx.modelMetaSubModelType);
|
|
38707
|
-
}
|
|
38708
|
-
function canShowAssocFilter(fieldMeta, fieldType, ctx = {}) {
|
|
38709
|
-
if (fieldType !== FIELD_TYPE.PRODUCT) return false;
|
|
38710
|
-
const onSubModel = isFieldOnSubModel(fieldMeta, ctx.masterModelKey);
|
|
38711
|
-
const subType = resolveSubTableType(fieldMeta, ctx);
|
|
38712
|
-
if (!onSubModel && !subType) return true;
|
|
38713
|
-
if (isBusinessSubTableType(subType)) return false;
|
|
38714
|
-
if (onSubModel && !subType) return false;
|
|
38715
|
-
return true;
|
|
38716
|
-
}
|
|
38717
|
-
function buildAssocSourceFieldValue(fieldKey, subFieldKey) {
|
|
38718
|
-
return subFieldKey ? `${subFieldKey}.${fieldKey}` : fieldKey;
|
|
38719
|
-
}
|
|
38720
38935
|
const HIDDEN_TABLE_TYPES = /* @__PURE__ */ new Set([
|
|
38721
38936
|
SubTableType.WAREHOUSE_IN,
|
|
38722
38937
|
SubTableType.WAREHOUSE_OUT,
|
|
@@ -45753,121 +45968,167 @@ async function completeSignInfo(partial) {
|
|
|
45753
45968
|
}
|
|
45754
45969
|
return partial;
|
|
45755
45970
|
}
|
|
45756
|
-
|
|
45757
|
-
|
|
45758
|
-
|
|
45759
|
-
|
|
45760
|
-
|
|
45761
|
-
|
|
45762
|
-
|
|
45763
|
-
|
|
45764
|
-
|
|
45765
|
-
|
|
45766
|
-
|
|
45767
|
-
|
|
45768
|
-
|
|
45769
|
-
}
|
|
45770
|
-
if (currentLine) {
|
|
45771
|
-
lines.push(currentLine);
|
|
45772
|
-
}
|
|
45773
|
-
return lines;
|
|
45971
|
+
const FALLBACK_SIGN_DPR = 2;
|
|
45972
|
+
const FALLBACK_SIGN_DISPLAY_SIZE = { width: 120, height: 68 };
|
|
45973
|
+
const SIGN_NAME_FONT_SIZE = 26;
|
|
45974
|
+
const SIGN_LONG_NAME_FONT_SIZE = 16;
|
|
45975
|
+
const SIGN_META_FONT_SIZE = 12;
|
|
45976
|
+
const FORM_SIGN_PADDING = 8;
|
|
45977
|
+
const FORM_SIGN_SECTION_GAP = 8;
|
|
45978
|
+
const FORM_SIGN_MAX_WIDTH = 360;
|
|
45979
|
+
const FORM_SIGN_LONG_NAME_MAX_WIDTH = 120;
|
|
45980
|
+
function getSignNameFontSize(name) {
|
|
45981
|
+
return Array.from(name).length >= 6 ? SIGN_LONG_NAME_FONT_SIZE : SIGN_NAME_FONT_SIZE;
|
|
45982
|
+
}
|
|
45983
|
+
function getSignNameFont(name) {
|
|
45984
|
+
return `600 ${getSignNameFontSize(name)}px Arial, sans-serif`;
|
|
45774
45985
|
}
|
|
45775
|
-
function
|
|
45776
|
-
|
|
45777
|
-
|
|
45986
|
+
function measureLinesWidth(lines, ctx) {
|
|
45987
|
+
return Math.max(...lines.map((line) => ctx.measureText(line).width));
|
|
45988
|
+
}
|
|
45989
|
+
function fitTextWithEllipsis(text, maxWidth, ctx) {
|
|
45990
|
+
if (ctx.measureText(text).width <= maxWidth) return text;
|
|
45991
|
+
const ellipsis = "…";
|
|
45992
|
+
let fitted = "";
|
|
45993
|
+
for (const character of Array.from(text)) {
|
|
45994
|
+
if (ctx.measureText(fitted + character + ellipsis).width > maxWidth) break;
|
|
45995
|
+
fitted += character;
|
|
45778
45996
|
}
|
|
45779
|
-
|
|
45780
|
-
|
|
45997
|
+
return fitted + ellipsis;
|
|
45998
|
+
}
|
|
45999
|
+
function layoutFormSignName(name, maxWidth, ctx) {
|
|
46000
|
+
const remaining = Array.from(name);
|
|
45781
46001
|
const lines = [];
|
|
45782
|
-
for (let
|
|
45783
|
-
|
|
46002
|
+
for (let lineIndex = 0; lineIndex < 2 && remaining.length; lineIndex++) {
|
|
46003
|
+
let line = "";
|
|
46004
|
+
while (remaining.length && ctx.measureText(line + remaining[0]).width <= maxWidth) {
|
|
46005
|
+
line += remaining.shift();
|
|
46006
|
+
}
|
|
46007
|
+
if (!line) line = remaining.shift();
|
|
46008
|
+
if (lineIndex === 1 && remaining.length) {
|
|
46009
|
+
line = fitTextWithEllipsis(line + remaining.join(""), maxWidth, ctx);
|
|
46010
|
+
}
|
|
46011
|
+
lines.push(line);
|
|
45784
46012
|
}
|
|
45785
46013
|
return lines;
|
|
45786
46014
|
}
|
|
45787
|
-
function
|
|
45788
|
-
|
|
46015
|
+
function layoutSimpleNameLines(name, ctx) {
|
|
46016
|
+
const characters = Array.from(name);
|
|
46017
|
+
if (characters.length < 6) return [name];
|
|
46018
|
+
const maxTextWidth = FORM_SIGN_MAX_WIDTH - FORM_SIGN_PADDING * 2;
|
|
46019
|
+
let splitIndex = Math.ceil(characters.length / 2);
|
|
46020
|
+
while (splitIndex > 1 && ctx.measureText(characters.slice(0, splitIndex).join("")).width > maxTextWidth) {
|
|
46021
|
+
splitIndex--;
|
|
46022
|
+
}
|
|
46023
|
+
return [
|
|
46024
|
+
characters.slice(0, splitIndex).join(""),
|
|
46025
|
+
fitTextWithEllipsis(characters.slice(splitIndex).join(""), maxTextWidth, ctx)
|
|
46026
|
+
];
|
|
45789
46027
|
}
|
|
45790
|
-
function
|
|
45791
|
-
const
|
|
45792
|
-
|
|
45793
|
-
|
|
45794
|
-
|
|
45795
|
-
|
|
45796
|
-
|
|
45797
|
-
|
|
45798
|
-
|
|
45799
|
-
|
|
45800
|
-
|
|
45801
|
-
|
|
45802
|
-
|
|
45803
|
-
|
|
46028
|
+
function measureFormSignFallback(name, time2, height = FALLBACK_SIGN_DISPLAY_SIZE.height) {
|
|
46029
|
+
const ctx = document.createElement("canvas").getContext("2d");
|
|
46030
|
+
const nameFontSize = getSignNameFontSize(name);
|
|
46031
|
+
const dateStr = time2 ? dayjs(time2).format("YYYY-MM-DD") : dayjs().format("YYYY-MM-DD");
|
|
46032
|
+
const sourceMetaLines = [
|
|
46033
|
+
`${$t("sys.onlineForm.electronicSignatureLabel")}:${name}`,
|
|
46034
|
+
`${$t("sys.onlineForm.dateLabel")}:${dateStr}`
|
|
46035
|
+
];
|
|
46036
|
+
ctx.font = getSignNameFont(name);
|
|
46037
|
+
const naturalNameWidth = ctx.measureText(name).width;
|
|
46038
|
+
const nameMaxWidth = nameFontSize === SIGN_LONG_NAME_FONT_SIZE ? Math.min(naturalNameWidth, FORM_SIGN_LONG_NAME_MAX_WIDTH) : naturalNameWidth;
|
|
46039
|
+
const nameLines = layoutFormSignName(name, nameMaxWidth, ctx);
|
|
46040
|
+
const nameWidth = nameLines.length ? Math.min(nameMaxWidth, measureLinesWidth(nameLines, ctx)) : 0;
|
|
46041
|
+
ctx.font = `${SIGN_META_FONT_SIZE}px Arial, sans-serif`;
|
|
46042
|
+
const naturalMetaWidth = measureLinesWidth(sourceMetaLines, ctx);
|
|
46043
|
+
const maxWidth = Math.min(
|
|
46044
|
+
FORM_SIGN_MAX_WIDTH,
|
|
46045
|
+
Math.ceil(FORM_SIGN_PADDING * 2 + nameWidth + FORM_SIGN_SECTION_GAP + naturalMetaWidth)
|
|
46046
|
+
);
|
|
46047
|
+
const metaMaxWidth = maxWidth - FORM_SIGN_PADDING * 2 - nameWidth - FORM_SIGN_SECTION_GAP;
|
|
46048
|
+
const metaLines = sourceMetaLines.map((line) => fitTextWithEllipsis(line, metaMaxWidth, ctx));
|
|
46049
|
+
const metaWidth = measureLinesWidth(metaLines, ctx);
|
|
46050
|
+
const width = Math.ceil(FORM_SIGN_PADDING * 2 + nameWidth + FORM_SIGN_SECTION_GAP + metaWidth);
|
|
46051
|
+
return { width, height, nameFontSize, nameWidth, nameLines, metaWidth, metaLines };
|
|
46052
|
+
}
|
|
46053
|
+
function getFormSignFallbackSize(name, time2, height = FALLBACK_SIGN_DISPLAY_SIZE.height) {
|
|
46054
|
+
const layout = measureFormSignFallback(name, time2, height);
|
|
46055
|
+
return { width: layout.width, height: layout.height };
|
|
46056
|
+
}
|
|
46057
|
+
function getSimpleNameFallbackSize(name, height) {
|
|
46058
|
+
const ctx = document.createElement("canvas").getContext("2d");
|
|
46059
|
+
ctx.font = getSignNameFont(name);
|
|
46060
|
+
const lines = layoutSimpleNameLines(name, ctx);
|
|
46061
|
+
return {
|
|
46062
|
+
width: Math.min(
|
|
46063
|
+
FORM_SIGN_MAX_WIDTH,
|
|
46064
|
+
Math.ceil(measureLinesWidth(lines, ctx) + FORM_SIGN_PADDING * 2)
|
|
46065
|
+
),
|
|
46066
|
+
height
|
|
45804
46067
|
};
|
|
45805
|
-
|
|
45806
|
-
|
|
45807
|
-
|
|
45808
|
-
}
|
|
45809
|
-
if (name.length >= 3 && name.length <= 6) {
|
|
45810
|
-
const balancedFit = tryFitLines(splitBalancedNameLines(name, 2), initialFontSize);
|
|
45811
|
-
if (balancedFit) {
|
|
45812
|
-
return balancedFit;
|
|
45813
|
-
}
|
|
45814
|
-
}
|
|
45815
|
-
let fontSize = minFontSize;
|
|
45816
|
-
ctx.font = `bold ${fontSize}px Arial, sans-serif`;
|
|
45817
|
-
let lines = wrapText(name, maxWidth, ctx);
|
|
45818
|
-
let lineHeight = fontSize * 1.2;
|
|
45819
|
-
while (lines.length * lineHeight > maxHeight && fontSize > 10) {
|
|
45820
|
-
fontSize--;
|
|
45821
|
-
lineHeight = fontSize * 1.2;
|
|
45822
|
-
ctx.font = `bold ${fontSize}px Arial, sans-serif`;
|
|
45823
|
-
lines = wrapText(name, maxWidth, ctx);
|
|
45824
|
-
}
|
|
45825
|
-
return { fontSize, lines, lineHeight };
|
|
45826
|
-
}
|
|
45827
|
-
function getSignCanvasHorizontalMargin(width) {
|
|
45828
|
-
return (width - width * 0.9) / 2;
|
|
45829
|
-
}
|
|
45830
|
-
const SIGN_CANVAS_BASE_WIDTH = 240;
|
|
45831
|
-
const FORM_SIGN_CANVAS_WIDTH = 360;
|
|
45832
|
-
const FORM_SIGN_CANVAS_HEIGHT = 204;
|
|
45833
|
-
const FORM_SIGN_VERTICAL_CANVAS_WIDTH = FORM_SIGN_CANVAS_HEIGHT;
|
|
45834
|
-
const FORM_SIGN_VERTICAL_CANVAS_HEIGHT = FORM_SIGN_CANVAS_WIDTH;
|
|
45835
|
-
function getFormSignSectionGap(width) {
|
|
45836
|
-
return Math.round(8 * (width / SIGN_CANVAS_BASE_WIDTH));
|
|
45837
|
-
}
|
|
45838
|
-
function createSimpleNameImage(name, width, height) {
|
|
46068
|
+
}
|
|
46069
|
+
function createFormSignFallbackImage(name, height, time2) {
|
|
46070
|
+
const layout = measureFormSignFallback(name, time2, height);
|
|
46071
|
+
const { width } = layout;
|
|
45839
46072
|
const canvas = document.createElement("canvas");
|
|
45840
|
-
canvas.width = width;
|
|
45841
|
-
canvas.height = height;
|
|
46073
|
+
canvas.width = Math.max(1, Math.round(width * FALLBACK_SIGN_DPR));
|
|
46074
|
+
canvas.height = Math.max(1, Math.round(height * FALLBACK_SIGN_DPR));
|
|
45842
46075
|
const ctx = canvas.getContext("2d");
|
|
46076
|
+
ctx.scale(FALLBACK_SIGN_DPR, FALLBACK_SIGN_DPR);
|
|
45843
46077
|
ctx.fillStyle = "#ffffff";
|
|
45844
46078
|
ctx.fillRect(0, 0, width, height);
|
|
45845
|
-
|
|
45846
|
-
ctx.
|
|
45847
|
-
|
|
45848
|
-
|
|
45849
|
-
|
|
45850
|
-
|
|
45851
|
-
|
|
45852
|
-
|
|
45853
|
-
ctx.
|
|
45854
|
-
|
|
45855
|
-
|
|
46079
|
+
ctx.fillStyle = "#000000";
|
|
46080
|
+
ctx.textAlign = "left";
|
|
46081
|
+
ctx.textBaseline = "middle";
|
|
46082
|
+
const nameLineHeight = layout.nameFontSize * 1.2;
|
|
46083
|
+
const nameTotalHeight = layout.nameLines.length * nameLineHeight;
|
|
46084
|
+
const nameStartY = (height - nameTotalHeight) / 2 + nameLineHeight / 2;
|
|
46085
|
+
layout.nameLines.forEach((line, index2) => {
|
|
46086
|
+
ctx.font = getSignNameFont(name);
|
|
46087
|
+
ctx.fillText(line, FORM_SIGN_PADDING, nameStartY + index2 * nameLineHeight, layout.nameWidth);
|
|
46088
|
+
});
|
|
46089
|
+
const metaLineHeight = SIGN_META_FONT_SIZE * 1.35;
|
|
46090
|
+
const metaTotalHeight = layout.metaLines.length * metaLineHeight;
|
|
46091
|
+
const metaStartY = (height - metaTotalHeight) / 2 + metaLineHeight / 2;
|
|
46092
|
+
layout.metaLines.forEach((line, index2) => {
|
|
46093
|
+
ctx.font = `${SIGN_META_FONT_SIZE}px Arial, sans-serif`;
|
|
46094
|
+
ctx.fillText(
|
|
46095
|
+
line,
|
|
46096
|
+
FORM_SIGN_PADDING + layout.nameWidth + FORM_SIGN_SECTION_GAP,
|
|
46097
|
+
metaStartY + index2 * metaLineHeight,
|
|
46098
|
+
layout.metaWidth
|
|
46099
|
+
);
|
|
46100
|
+
});
|
|
46101
|
+
return canvas.toDataURL("image/png");
|
|
46102
|
+
}
|
|
46103
|
+
function createSimpleNameImage(name, height) {
|
|
46104
|
+
const { width } = getSimpleNameFallbackSize(name, height);
|
|
46105
|
+
const canvas = document.createElement("canvas");
|
|
46106
|
+
canvas.width = Math.max(1, Math.round(width * FALLBACK_SIGN_DPR));
|
|
46107
|
+
canvas.height = Math.max(1, Math.round(height * FALLBACK_SIGN_DPR));
|
|
46108
|
+
const ctx = canvas.getContext("2d");
|
|
46109
|
+
ctx.scale(FALLBACK_SIGN_DPR, FALLBACK_SIGN_DPR);
|
|
46110
|
+
ctx.fillStyle = "#ffffff";
|
|
46111
|
+
ctx.fillRect(0, 0, width, height);
|
|
46112
|
+
const maxTextWidth = width - FORM_SIGN_PADDING * 2;
|
|
46113
|
+
ctx.font = getSignNameFont(name);
|
|
46114
|
+
const lines = layoutSimpleNameLines(name, ctx);
|
|
46115
|
+
const lineHeight = getSignNameFontSize(name) * 1.2;
|
|
45856
46116
|
const totalTextHeight = lines.length * lineHeight;
|
|
45857
46117
|
const startY = (height - totalTextHeight) / 2 + lineHeight / 2;
|
|
45858
46118
|
ctx.fillStyle = "#000000";
|
|
45859
|
-
ctx.textAlign = "
|
|
46119
|
+
ctx.textAlign = "left";
|
|
45860
46120
|
ctx.textBaseline = "middle";
|
|
45861
46121
|
lines.forEach((line, index2) => {
|
|
45862
|
-
ctx.fillText(line,
|
|
46122
|
+
ctx.fillText(line, FORM_SIGN_PADDING, startY + index2 * lineHeight, maxTextWidth);
|
|
45863
46123
|
});
|
|
45864
46124
|
return canvas.toDataURL("image/png");
|
|
45865
46125
|
}
|
|
45866
46126
|
function createVerticalNameImage(name, width, height) {
|
|
45867
46127
|
const canvas = document.createElement("canvas");
|
|
45868
|
-
canvas.width = width;
|
|
45869
|
-
canvas.height = height;
|
|
46128
|
+
canvas.width = Math.max(1, Math.round(width * FALLBACK_SIGN_DPR));
|
|
46129
|
+
canvas.height = Math.max(1, Math.round(height * FALLBACK_SIGN_DPR));
|
|
45870
46130
|
const ctx = canvas.getContext("2d");
|
|
46131
|
+
ctx.scale(FALLBACK_SIGN_DPR, FALLBACK_SIGN_DPR);
|
|
45871
46132
|
ctx.fillStyle = "#ffffff";
|
|
45872
46133
|
ctx.fillRect(0, 0, width, height);
|
|
45873
46134
|
const characters = Array.from(name);
|
|
@@ -45875,20 +46136,13 @@ function createVerticalNameImage(name, width, height) {
|
|
|
45875
46136
|
const verticalPadding = height * 0.08;
|
|
45876
46137
|
const availableWidth = width - horizontalPadding * 2;
|
|
45877
46138
|
const availableHeight = height - verticalPadding * 2;
|
|
45878
|
-
|
|
45879
|
-
|
|
45880
|
-
|
|
45881
|
-
|
|
45882
|
-
|
|
45883
|
-
while (columnCount * columnWidth > availableWidth && fontSize > 10) {
|
|
45884
|
-
fontSize--;
|
|
45885
|
-
rowHeight = fontSize * 1.15;
|
|
45886
|
-
columnWidth = fontSize * 1.15;
|
|
45887
|
-
rowsPerColumn = Math.max(1, Math.floor(availableHeight / rowHeight));
|
|
45888
|
-
columnCount = Math.ceil(characters.length / rowsPerColumn);
|
|
45889
|
-
}
|
|
46139
|
+
const fontSize = getSignNameFontSize(name);
|
|
46140
|
+
const rowHeight = fontSize * 1.15;
|
|
46141
|
+
const rowsPerColumn = Math.max(1, Math.floor(availableHeight / rowHeight));
|
|
46142
|
+
const columnCount = Math.ceil(characters.length / rowsPerColumn);
|
|
46143
|
+
const columnWidth = Math.min(fontSize * 1.15, availableWidth / columnCount);
|
|
45890
46144
|
ctx.fillStyle = "#000000";
|
|
45891
|
-
ctx.font =
|
|
46145
|
+
ctx.font = getSignNameFont(name);
|
|
45892
46146
|
ctx.textAlign = "center";
|
|
45893
46147
|
ctx.textBaseline = "middle";
|
|
45894
46148
|
const totalWidth = columnCount * columnWidth;
|
|
@@ -45902,53 +46156,11 @@ function createVerticalNameImage(name, width, height) {
|
|
|
45902
46156
|
const top = (height - columnHeight) / 2;
|
|
45903
46157
|
const x = left + (columnCount - columnIndex - 0.5) * columnWidth;
|
|
45904
46158
|
columnCharacters.forEach((character, rowIndex) => {
|
|
45905
|
-
ctx.fillText(character, x, top + (rowIndex + 0.5) * rowHeight);
|
|
46159
|
+
ctx.fillText(character, x, top + (rowIndex + 0.5) * rowHeight, columnWidth);
|
|
45906
46160
|
});
|
|
45907
46161
|
}
|
|
45908
46162
|
return canvas.toDataURL("image/png");
|
|
45909
46163
|
}
|
|
45910
|
-
function createFormSignFallbackImage(name, width, height, time2) {
|
|
45911
|
-
const canvas = document.createElement("canvas");
|
|
45912
|
-
canvas.width = width;
|
|
45913
|
-
canvas.height = height;
|
|
45914
|
-
const ctx = canvas.getContext("2d");
|
|
45915
|
-
ctx.fillStyle = "#ffffff";
|
|
45916
|
-
ctx.fillRect(0, 0, width, height);
|
|
45917
|
-
const margin = getSignCanvasHorizontalMargin(width);
|
|
45918
|
-
const sectionGap = getFormSignSectionGap(width);
|
|
45919
|
-
const dateStr = time2 ? dayjs(time2).format("YYYY-MM-DD") : dayjs().format("YYYY-MM-DD");
|
|
45920
|
-
const metaLines = [
|
|
45921
|
-
`${$t("sys.onlineForm.electronicSignatureLabel")}:${name}`,
|
|
45922
|
-
`${$t("sys.onlineForm.dateLabel")}:${dateStr}`
|
|
45923
|
-
];
|
|
45924
|
-
const metaFontSize = Math.max(10, Math.floor(height * 0.1));
|
|
45925
|
-
const metaLineHeight = metaFontSize * 1.45;
|
|
45926
|
-
ctx.font = `${metaFontSize}px Arial, sans-serif`;
|
|
45927
|
-
const metaWidth = Math.max(...metaLines.map((line) => ctx.measureText(line).width));
|
|
45928
|
-
const metaTotalHeight = metaLines.length * metaLineHeight;
|
|
45929
|
-
const rightSectionX = width - margin - metaWidth;
|
|
45930
|
-
const leftSectionWidth = Math.max(40, rightSectionX - margin - sectionGap);
|
|
45931
|
-
const {
|
|
45932
|
-
fontSize: nameFontSize,
|
|
45933
|
-
lines: nameLines,
|
|
45934
|
-
lineHeight: nameLineHeight
|
|
45935
|
-
} = fitNameInSection(name, leftSectionWidth, height, ctx, Math.floor(height / 3));
|
|
45936
|
-
ctx.fillStyle = "#000000";
|
|
45937
|
-
ctx.textAlign = "left";
|
|
45938
|
-
ctx.textBaseline = "middle";
|
|
45939
|
-
const nameTotalHeight = nameLines.length * nameLineHeight;
|
|
45940
|
-
const nameStartY = (height - nameTotalHeight) / 2 + nameLineHeight / 2;
|
|
45941
|
-
nameLines.forEach((line, index2) => {
|
|
45942
|
-
ctx.font = `bold ${nameFontSize}px Arial, sans-serif`;
|
|
45943
|
-
ctx.fillText(line, margin, nameStartY + index2 * nameLineHeight);
|
|
45944
|
-
});
|
|
45945
|
-
const metaStartY = (height - metaTotalHeight) / 2 + metaLineHeight / 2;
|
|
45946
|
-
metaLines.forEach((line, index2) => {
|
|
45947
|
-
ctx.font = `${metaFontSize}px Arial, sans-serif`;
|
|
45948
|
-
ctx.fillText(line, rightSectionX, metaStartY + index2 * metaLineHeight);
|
|
45949
|
-
});
|
|
45950
|
-
return canvas.toDataURL("image/png");
|
|
45951
|
-
}
|
|
45952
46164
|
function resolveSignImageUrl(url, callback) {
|
|
45953
46165
|
if (callback && typeof callback === "function") {
|
|
45954
46166
|
return callback?.(url);
|
|
@@ -45961,6 +46173,12 @@ function resolveFallbackSignType(type) {
|
|
|
45961
46173
|
function resolveSignatureImageDirection(direction) {
|
|
45962
46174
|
return direction === SignatureImageDirectionEnum.VERTICAL ? SignatureImageDirectionEnum.VERTICAL : SignatureImageDirectionEnum.HORIZONTAL;
|
|
45963
46175
|
}
|
|
46176
|
+
function getFormSignPreviewSize(name, time2, fallbackSignType, signatureImageDirection) {
|
|
46177
|
+
if (resolveSignatureImageDirection(signatureImageDirection) === SignatureImageDirectionEnum.VERTICAL) {
|
|
46178
|
+
return { width: FALLBACK_SIGN_DISPLAY_SIZE.height, height: FALLBACK_SIGN_DISPLAY_SIZE.width };
|
|
46179
|
+
}
|
|
46180
|
+
return resolveFallbackSignType(fallbackSignType) === FallbackSignTypeEnum.NAME_ONLY ? getSimpleNameFallbackSize(name, FALLBACK_SIGN_DISPLAY_SIZE.height) : getFormSignFallbackSize(name, time2);
|
|
46181
|
+
}
|
|
45964
46182
|
function getFormSignPreviewUrl(url, name, callback, time2, fallbackSignType, signatureImageDirection) {
|
|
45965
46183
|
if (url) {
|
|
45966
46184
|
return resolveSignImageUrl(url, callback);
|
|
@@ -45968,14 +46186,14 @@ function getFormSignPreviewUrl(url, name, callback, time2, fallbackSignType, sig
|
|
|
45968
46186
|
if (resolveSignatureImageDirection(signatureImageDirection) === SignatureImageDirectionEnum.VERTICAL) {
|
|
45969
46187
|
return createVerticalNameImage(
|
|
45970
46188
|
name,
|
|
45971
|
-
|
|
45972
|
-
|
|
46189
|
+
FALLBACK_SIGN_DISPLAY_SIZE.height,
|
|
46190
|
+
FALLBACK_SIGN_DISPLAY_SIZE.width
|
|
45973
46191
|
);
|
|
45974
46192
|
}
|
|
45975
46193
|
if (resolveFallbackSignType(fallbackSignType) === FallbackSignTypeEnum.NAME_ONLY) {
|
|
45976
|
-
return createSimpleNameImage(name,
|
|
46194
|
+
return createSimpleNameImage(name, FALLBACK_SIGN_DISPLAY_SIZE.height);
|
|
45977
46195
|
}
|
|
45978
|
-
return createFormSignFallbackImage(name,
|
|
46196
|
+
return createFormSignFallbackImage(name, FALLBACK_SIGN_DISPLAY_SIZE.height, time2);
|
|
45979
46197
|
}
|
|
45980
46198
|
}
|
|
45981
46199
|
const _hoisted_1$2i = { class: "text-[#384356] text-[14px] cursor-pointer primary-gct text-right" };
|
|
@@ -47018,10 +47236,14 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
|
|
|
47018
47236
|
formState.value.signatureImageDirection = v;
|
|
47019
47237
|
}
|
|
47020
47238
|
});
|
|
47021
|
-
const
|
|
47239
|
+
const getFallbackPreviewName = () => {
|
|
47022
47240
|
const userInfo = window.NocodeAdapter.stores?.userInfo?.value;
|
|
47023
|
-
|
|
47024
|
-
|
|
47241
|
+
return userInfo?.fullname || userInfo?.username || $t("sys.user");
|
|
47242
|
+
};
|
|
47243
|
+
const getFallbackPreviewSrc = (type) => getFormSignPreviewUrl("", getFallbackPreviewName(), void 0, Date.now(), type);
|
|
47244
|
+
const getFallbackPreviewStyle = (type) => {
|
|
47245
|
+
const { width, height } = getFormSignPreviewSize(getFallbackPreviewName(), void 0, type);
|
|
47246
|
+
return { width: `${width}px`, height: `${height}px` };
|
|
47025
47247
|
};
|
|
47026
47248
|
const getPopupContainer = () => document.body;
|
|
47027
47249
|
const signDisplayMode = computed({
|
|
@@ -47323,8 +47545,9 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
|
|
|
47323
47545
|
content: withCtx(() => [
|
|
47324
47546
|
createElementVNode("img", {
|
|
47325
47547
|
src: getFallbackPreviewSrc(value),
|
|
47548
|
+
style: normalizeStyle(getFallbackPreviewStyle(value)),
|
|
47326
47549
|
alt: ""
|
|
47327
|
-
}, null,
|
|
47550
|
+
}, null, 12, _hoisted_7$n)
|
|
47328
47551
|
]),
|
|
47329
47552
|
default: withCtx(() => [
|
|
47330
47553
|
createElementVNode("div", _hoisted_8$j, toDisplayString$1(label), 1)
|
|
@@ -47351,7 +47574,7 @@ const _sfc_main$41 = /* @__PURE__ */ defineComponent({
|
|
|
47351
47574
|
};
|
|
47352
47575
|
}
|
|
47353
47576
|
});
|
|
47354
|
-
const __vite_glob_0_13$1 = /* @__PURE__ */ _export_sfc(_sfc_main$41, [["__scopeId", "data-v-
|
|
47577
|
+
const __vite_glob_0_13$1 = /* @__PURE__ */ _export_sfc(_sfc_main$41, [["__scopeId", "data-v-0a560a33"]]);
|
|
47355
47578
|
const _hoisted_1$2c = { class: "number-range" };
|
|
47356
47579
|
const _hoisted_2$1y = { class: "middle" };
|
|
47357
47580
|
const _hoisted_3$1c = { class: "length-sep" };
|
|
@@ -51001,6 +51224,12 @@ const _sfc_main$3w = /* @__PURE__ */ defineComponent({
|
|
|
51001
51224
|
disabled: { type: Boolean }
|
|
51002
51225
|
},
|
|
51003
51226
|
setup(__props) {
|
|
51227
|
+
const props2 = __props;
|
|
51228
|
+
const handleDiameterBlur = () => {
|
|
51229
|
+
if (props2.widget.diameterMm == null) {
|
|
51230
|
+
props2.widget.diameterMm = 42;
|
|
51231
|
+
}
|
|
51232
|
+
};
|
|
51004
51233
|
return (_ctx, _cache) => {
|
|
51005
51234
|
const _component_a_input_number = resolveComponent("a-input-number");
|
|
51006
51235
|
return openBlock(), createBlock(FormItem, {
|
|
@@ -51017,7 +51246,8 @@ const _sfc_main$3w = /* @__PURE__ */ defineComponent({
|
|
|
51017
51246
|
disabled: __props.disabled,
|
|
51018
51247
|
"addon-after": "mm",
|
|
51019
51248
|
size: "small",
|
|
51020
|
-
style: { "width": "100%" }
|
|
51249
|
+
style: { "width": "100%" },
|
|
51250
|
+
onBlur: handleDiameterBlur
|
|
51021
51251
|
}, null, 8, ["value", "disabled"])
|
|
51022
51252
|
]),
|
|
51023
51253
|
_: 1
|
|
@@ -51998,11 +52228,29 @@ const CellWidgetEvent = /* @__PURE__ */ _export_sfc(_sfc_main$3j, [["__scopeId",
|
|
|
51998
52228
|
function useFormulaEditor(props2) {
|
|
51999
52229
|
const { masterModel: masterModel2, modelMetaMap: modelMetaMap2, subTableFieldModel: subTableFieldModel2 } = useModelFields();
|
|
52000
52230
|
const buildChildrenFromModel = (model) => {
|
|
52001
|
-
|
|
52002
|
-
|
|
52003
|
-
|
|
52004
|
-
|
|
52005
|
-
|
|
52231
|
+
const belongingObjectMap = /* @__PURE__ */ new Map();
|
|
52232
|
+
for (const { belongingObject } of model.fields) {
|
|
52233
|
+
if (belongingObject) {
|
|
52234
|
+
belongingObjectMap.set(belongingObject, void 0);
|
|
52235
|
+
}
|
|
52236
|
+
}
|
|
52237
|
+
for (const { key, name } of model.fields) {
|
|
52238
|
+
if (belongingObjectMap.has(key)) {
|
|
52239
|
+
belongingObjectMap.set(key, name);
|
|
52240
|
+
}
|
|
52241
|
+
}
|
|
52242
|
+
return model.fields.reduce((options, { key, name, type, belongingObject }) => {
|
|
52243
|
+
if (belongingObjectMap.has(key)) {
|
|
52244
|
+
return options;
|
|
52245
|
+
}
|
|
52246
|
+
const objectName = belongingObjectMap.get(belongingObject);
|
|
52247
|
+
options.push({
|
|
52248
|
+
id: key,
|
|
52249
|
+
name: objectName ? `${objectName}.${name}` : name,
|
|
52250
|
+
valueType: type
|
|
52251
|
+
});
|
|
52252
|
+
return options;
|
|
52253
|
+
}, []);
|
|
52006
52254
|
};
|
|
52007
52255
|
const buildIdentifierGroup = ({
|
|
52008
52256
|
id,
|
|
@@ -53090,7 +53338,7 @@ const _sfc_main$3b = /* @__PURE__ */ defineComponent({
|
|
|
53090
53338
|
}
|
|
53091
53339
|
});
|
|
53092
53340
|
function asyncImportWidgetProp() {
|
|
53093
|
-
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-
|
|
53341
|
+
const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-DH30z4yi.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-Bv-Eb2Fi.js"), "./widget-image.vue": () => import("./widget-image-67Q9gRCG.js"), "./widget-line.vue": () => import("./widget-line-DP3dKXNd.js"), "./widget-pagination.vue": () => import("./widget-pagination-B66PcWXU.js"), "./widget-power.vue": () => import("./widget-power-yRy8897o.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-DN3R8N41.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-zWZZMPvn.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-p7wB7-Bz.js"), "./widget-text.vue": () => import("./widget-text-BQO0Rf5A.js"), "./widget-timediff.vue": () => import("./widget-timediff-C1VxWKle.js") });
|
|
53094
53342
|
const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
|
|
53095
53343
|
const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
|
|
53096
53344
|
if (mKey) {
|
|
@@ -63566,7 +63814,7 @@ const _sfc_main$2a = /* @__PURE__ */ defineComponent({
|
|
|
63566
63814
|
};
|
|
63567
63815
|
}
|
|
63568
63816
|
});
|
|
63569
|
-
const CheckboxSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["__scopeId", "data-v-
|
|
63817
|
+
const CheckboxSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["__scopeId", "data-v-ec8bfe18"]]);
|
|
63570
63818
|
const _sfc_main$29 = /* @__PURE__ */ defineComponent({
|
|
63571
63819
|
__name: "radio-enum",
|
|
63572
63820
|
props: {
|
|
@@ -63628,7 +63876,7 @@ const _sfc_main$29 = /* @__PURE__ */ defineComponent({
|
|
|
63628
63876
|
};
|
|
63629
63877
|
}
|
|
63630
63878
|
});
|
|
63631
|
-
const RadioSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["__scopeId", "data-v-
|
|
63879
|
+
const RadioSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["__scopeId", "data-v-ed6a3486"]]);
|
|
63632
63880
|
const _hoisted_1$1e = { class: "search-wrapper" };
|
|
63633
63881
|
const _hoisted_2$Q = { class: "inner-list search-visible" };
|
|
63634
63882
|
const _hoisted_3$F = ["onContextmenu"];
|
|
@@ -63812,8 +64060,10 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
|
63812
64060
|
const contentJustifyStyle = computed(() => {
|
|
63813
64061
|
const textAlign = props2.widget.style?.textAlign;
|
|
63814
64062
|
if (!textAlign) return void 0;
|
|
64063
|
+
const align = textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : "flex-start";
|
|
63815
64064
|
return {
|
|
63816
|
-
"--justifyContent":
|
|
64065
|
+
"--justifyContent": align,
|
|
64066
|
+
"--enum-option-align": align
|
|
63817
64067
|
};
|
|
63818
64068
|
});
|
|
63819
64069
|
const separatorAttr = computed(() => {
|
|
@@ -63980,7 +64230,7 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
|
63980
64230
|
};
|
|
63981
64231
|
}
|
|
63982
64232
|
});
|
|
63983
|
-
const enumSelectRender = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["__scopeId", "data-v-
|
|
64233
|
+
const enumSelectRender = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["__scopeId", "data-v-40fbf186"]]);
|
|
63984
64234
|
const __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
63985
64235
|
__proto__: null,
|
|
63986
64236
|
default: enumSelectRender
|
|
@@ -67056,7 +67306,7 @@ const VuePdf = /* @__PURE__ */ defineComponent({
|
|
|
67056
67306
|
}
|
|
67057
67307
|
});
|
|
67058
67308
|
const VueVideoPlayer = defineAsyncComponent(
|
|
67059
|
-
() => import("./VueVideoPlayer-
|
|
67309
|
+
() => import("./VueVideoPlayer-DjIr6Duj.js")
|
|
67060
67310
|
);
|
|
67061
67311
|
const _hoisted_1$1a = {
|
|
67062
67312
|
key: 0,
|
|
@@ -67913,7 +68163,7 @@ const _sfc_main$1R = /* @__PURE__ */ defineComponent({
|
|
|
67913
68163
|
};
|
|
67914
68164
|
}
|
|
67915
68165
|
});
|
|
67916
|
-
const sealRender = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["__scopeId", "data-v-
|
|
68166
|
+
const sealRender = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["__scopeId", "data-v-b0d382d2"]]);
|
|
67917
68167
|
const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
67918
68168
|
__proto__: null,
|
|
67919
68169
|
default: sealRender
|
|
@@ -68623,7 +68873,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
68623
68873
|
currentValue.value = option2.value;
|
|
68624
68874
|
await handleChange(option2.value, option2);
|
|
68625
68875
|
},
|
|
68626
|
-
active: () => dropdownVisible.value && !showDisabled
|
|
68876
|
+
active: () => dropdownVisible.value && !showDisabled.value
|
|
68627
68877
|
});
|
|
68628
68878
|
return (_ctx, _cache) => {
|
|
68629
68879
|
const _component_a_spin = resolveComponent("a-spin");
|
|
@@ -68762,7 +69012,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
68762
69012
|
keyword: void 0
|
|
68763
69013
|
});
|
|
68764
69014
|
const columns = computed(() => {
|
|
68765
|
-
return getColumns(["radio", "lot2sn", "productCode", "productName", "productSpec"]);
|
|
69015
|
+
return bizType === FIELD_TYPE.INSPECTION_CONTAINER ? getColumns(["radio", "lot2sn", "modifyUserName", "modifyTime"]) : getColumns(["radio", "lot2sn", "productCode", "productName", "productSpec"]);
|
|
68766
69016
|
});
|
|
68767
69017
|
const fetcher = async ({ keyword: keyword2 = "", pageNo, pageSize: pageSize2 }) => {
|
|
68768
69018
|
const { queryData, exp } = bizType === FIELD_TYPE.INSPECTION_CONTAINER ? buildInspectionLotListQuery(keyword2, props2.extraQuery) : buildProductionLotListQuery(keyword2, props2.extraQuery);
|
|
@@ -68886,7 +69136,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
68886
69136
|
};
|
|
68887
69137
|
}
|
|
68888
69138
|
});
|
|
68889
|
-
const ProductionLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-
|
|
69139
|
+
const ProductionLotSelectTable = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["__scopeId", "data-v-ac7544a5"]]);
|
|
68890
69140
|
const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
68891
69141
|
__name: "production-container-select",
|
|
68892
69142
|
props: {
|
|
@@ -70444,7 +70694,7 @@ const _sfc_main$1J = /* @__PURE__ */ defineComponent({
|
|
|
70444
70694
|
await handleChange(option2.value, option2);
|
|
70445
70695
|
},
|
|
70446
70696
|
scan: handleSearchScan,
|
|
70447
|
-
active: () => dropdownVisible.value && !showDisabled
|
|
70697
|
+
active: () => dropdownVisible.value && !showDisabled.value
|
|
70448
70698
|
});
|
|
70449
70699
|
return (_ctx, _cache) => {
|
|
70450
70700
|
const _component_a_spin = resolveComponent("a-spin");
|
|
@@ -71180,6 +71430,7 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
71180
71430
|
updateDateFields(newSignature);
|
|
71181
71431
|
applySignatureAutofill(newSignature);
|
|
71182
71432
|
onChange();
|
|
71433
|
+
popoverVisible.value = false;
|
|
71183
71434
|
};
|
|
71184
71435
|
const formattedDate = (time2) => {
|
|
71185
71436
|
let format2 = signatureType === SignatureTypeEnum.SIGNATURE_DATE ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm";
|
|
@@ -71196,6 +71447,17 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
71196
71447
|
fallbackSignType,
|
|
71197
71448
|
signatureImageDirection
|
|
71198
71449
|
);
|
|
71450
|
+
const getFallbackSignImageStyle = (signature2) => {
|
|
71451
|
+
if (signature2.url || !signature2.username || isAdaptive.value || signatureImageDirection === SignatureImageDirectionEnum.VERTICAL)
|
|
71452
|
+
return void 0;
|
|
71453
|
+
const { width, height } = getFormSignPreviewSize(
|
|
71454
|
+
signature2.username,
|
|
71455
|
+
signature2.time,
|
|
71456
|
+
fallbackSignType,
|
|
71457
|
+
signatureImageDirection
|
|
71458
|
+
);
|
|
71459
|
+
return { width: `${width}px`, height: `${height}px` };
|
|
71460
|
+
};
|
|
71199
71461
|
const removeSignature = (index2) => {
|
|
71200
71462
|
signatures.value = signatures.value.filter((_, signatureIndex) => signatureIndex !== index2);
|
|
71201
71463
|
onChange();
|
|
@@ -71234,6 +71496,9 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
71234
71496
|
const signaturePreviewClasses = (signature2) => [
|
|
71235
71497
|
"signature-preview",
|
|
71236
71498
|
{ adaptive: isAdaptive.value },
|
|
71499
|
+
{
|
|
71500
|
+
"is-fallback-signature": !signature2.url && Boolean(signature2.username) && !isAdaptive.value && signatureImageDirection === SignatureImageDirectionEnum.HORIZONTAL
|
|
71501
|
+
},
|
|
71237
71502
|
{ "is-vertical-signature": signatureImageDirection === SignatureImageDirectionEnum.VERTICAL },
|
|
71238
71503
|
{
|
|
71239
71504
|
"is-inline-date": signDisplayStyle === SignShowTypeEnum.HORIZONTAL && signature2.type !== SignatureTypeEnum.SIGNATURE_ONLY
|
|
@@ -71436,8 +71701,9 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
71436
71701
|
}, [
|
|
71437
71702
|
createVNode(_component_a_image, {
|
|
71438
71703
|
preview: false,
|
|
71439
|
-
src: getSignaturePreviewUrl(signature2)
|
|
71440
|
-
|
|
71704
|
+
src: getSignaturePreviewUrl(signature2),
|
|
71705
|
+
style: normalizeStyle(getFallbackSignImageStyle(signature2))
|
|
71706
|
+
}, null, 8, ["src", "style"]),
|
|
71441
71707
|
shouldFollowSignatureDate.value && signature2.time ? (openBlock(), createElementBlock("div", _hoisted_5$j, toDisplayString$1(formattedDate(signature2.time)), 1)) : createCommentVNode("", true)
|
|
71442
71708
|
], 2);
|
|
71443
71709
|
}), 128))
|
|
@@ -71462,8 +71728,9 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
|
|
|
71462
71728
|
}, [
|
|
71463
71729
|
createVNode(_component_a_image, {
|
|
71464
71730
|
preview: false,
|
|
71465
|
-
src: getSignaturePreviewUrl(signature2)
|
|
71466
|
-
|
|
71731
|
+
src: getSignaturePreviewUrl(signature2),
|
|
71732
|
+
style: normalizeStyle(getFallbackSignImageStyle(signature2))
|
|
71733
|
+
}, null, 8, ["src", "style"]),
|
|
71467
71734
|
shouldFollowSignatureDate.value && signature2.time ? (openBlock(), createElementBlock("div", _hoisted_6$e, toDisplayString$1(formattedDate(signature2.time)), 1)) : createCommentVNode("", true)
|
|
71468
71735
|
], 2);
|
|
71469
71736
|
}), 128))
|
|
@@ -71533,7 +71800,7 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
|
|
|
71533
71800
|
};
|
|
71534
71801
|
}
|
|
71535
71802
|
});
|
|
71536
|
-
const CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-
|
|
71803
|
+
const CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-929e5a9f"]]);
|
|
71537
71804
|
const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
71538
71805
|
__name: "radio-switch",
|
|
71539
71806
|
props: {
|
|
@@ -71588,7 +71855,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
|
71588
71855
|
};
|
|
71589
71856
|
}
|
|
71590
71857
|
});
|
|
71591
|
-
const RadioSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["__scopeId", "data-v-
|
|
71858
|
+
const RadioSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["__scopeId", "data-v-d558bf8a"]]);
|
|
71592
71859
|
const _hoisted_1$10 = { class: "inner-list" };
|
|
71593
71860
|
const _hoisted_2$G = ["onContextmenu"];
|
|
71594
71861
|
const _hoisted_3$x = { class: "inner-label-box" };
|
|
@@ -71743,6 +72010,12 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
|
71743
72010
|
return optionsWithRefs.value;
|
|
71744
72011
|
}
|
|
71745
72012
|
});
|
|
72013
|
+
const contentAlignStyle = computed(() => {
|
|
72014
|
+
const textAlign = props2.widget.style?.textAlign;
|
|
72015
|
+
return {
|
|
72016
|
+
"--boolean-option-align": textAlign === "left" ? "flex-start" : textAlign === "right" ? "flex-end" : "center"
|
|
72017
|
+
};
|
|
72018
|
+
});
|
|
71746
72019
|
const separatorAttr = computed(() => {
|
|
71747
72020
|
const cmpStyle = {};
|
|
71748
72021
|
const cmpClass = [
|
|
@@ -71812,7 +72085,8 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
|
71812
72085
|
formData: __props.formData,
|
|
71813
72086
|
callback: readonlyCallback,
|
|
71814
72087
|
annotationInfo: unref(annotationInfo),
|
|
71815
|
-
class: "switch-render"
|
|
72088
|
+
class: "switch-render",
|
|
72089
|
+
style: normalizeStyle(contentAlignStyle.value)
|
|
71816
72090
|
}, {
|
|
71817
72091
|
readonlyIntroduce: withCtx(() => [
|
|
71818
72092
|
(openBlock(true), createElementBlock(Fragment, null, renderList(renderIntroduce.value, (fieldWidget) => {
|
|
@@ -71859,11 +72133,11 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
|
71859
72133
|
}, 16, ["value", "checked", "isAutoLineBreak"]))
|
|
71860
72134
|
]),
|
|
71861
72135
|
_: 1
|
|
71862
|
-
}, 8, ["modelValue", "widget", "formData", "annotationInfo"]);
|
|
72136
|
+
}, 8, ["modelValue", "widget", "formData", "annotationInfo", "style"]);
|
|
71863
72137
|
};
|
|
71864
72138
|
}
|
|
71865
72139
|
});
|
|
71866
|
-
const switchRender = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["__scopeId", "data-v-
|
|
72140
|
+
const switchRender = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["__scopeId", "data-v-bf15424f"]]);
|
|
71867
72141
|
const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71868
72142
|
__proto__: null,
|
|
71869
72143
|
default: switchRender
|
|
@@ -86722,6 +86996,7 @@ const sys$1 = {
|
|
|
86722
86996
|
materialSubstitutionTableConfig: "Material Substitution Table Config",
|
|
86723
86997
|
edhr: {
|
|
86724
86998
|
mcTable: {
|
|
86999
|
+
lotOrUniqueCodeRequired: "Invalid barcode: at least one of lot or unique code is required",
|
|
86725
87000
|
materialStrategyConfig: "Material strategy configuration",
|
|
86726
87001
|
loadingType: "Loading method",
|
|
86727
87002
|
loadingTypeTip: "Material view: display only; By quantity: validate and fill by quantity; By lot: validate and fill by lot",
|
|
@@ -87047,7 +87322,7 @@ const sys = {
|
|
|
87047
87322
|
materialRequisitionTableConfig: "产线收料表配置",
|
|
87048
87323
|
materialSubstitutionTableConfig: "物料替换表配置",
|
|
87049
87324
|
pretreatmentTableConfig: "产前表配置",
|
|
87050
|
-
sterilizeBatchConfig: "
|
|
87325
|
+
sterilizeBatchConfig: "生产批次灭菌表配置",
|
|
87051
87326
|
printFillAreaBg: "是否打印填报内容区底色",
|
|
87052
87327
|
printFillAreaBgYes: "是",
|
|
87053
87328
|
printFillAreaBgNo: "否",
|
|
@@ -87117,6 +87392,7 @@ const sys = {
|
|
|
87117
87392
|
},
|
|
87118
87393
|
edhr: {
|
|
87119
87394
|
mcTable: {
|
|
87395
|
+
lotOrUniqueCodeRequired: "无效条码,批次、唯一码至少要有一个",
|
|
87120
87396
|
materialStrategyConfig: "用料策略配置",
|
|
87121
87397
|
loadingType: "上料方式",
|
|
87122
87398
|
loadingTypeTip: "物料查看:仅展示物料;按数量上料:按数量校验与填充;按批次上料:按批次校验与填充",
|
|
@@ -87280,6 +87556,10 @@ const sys = {
|
|
|
87280
87556
|
},
|
|
87281
87557
|
pageDesigner: {
|
|
87282
87558
|
addFieldNotReady: "添加字段组件加载中,请稍后重试",
|
|
87559
|
+
builtInFillRules: "内置填充",
|
|
87560
|
+
builtInFillRulesTip: "业务表预置 · 只读",
|
|
87561
|
+
customFillRules: "自定义填充",
|
|
87562
|
+
noCustomFillRules: "暂无自定义规则",
|
|
87283
87563
|
alwaysCover: "始终覆盖",
|
|
87284
87564
|
notCovered: "不覆盖已修改(本次编辑有效)",
|
|
87285
87565
|
notCoveredForever: "不覆盖已修改(永久有效)",
|
|
@@ -88620,8 +88900,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
88620
88900
|
printTask = (async () => {
|
|
88621
88901
|
if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
|
|
88622
88902
|
await nextTick();
|
|
88623
|
-
const { printRuntimeInstance } = await import("./print-runtime-instance-
|
|
88624
|
-
const { default: renderer } = await import("./print-snapshot-renderer-
|
|
88903
|
+
const { printRuntimeInstance } = await import("./print-runtime-instance-CT3EaCDJ.js");
|
|
88904
|
+
const { default: renderer } = await import("./print-snapshot-renderer-Bm-fpHUt.js");
|
|
88625
88905
|
if (abort.signal.aborted) throw new Error("打印已取消");
|
|
88626
88906
|
printRenderer.value = markRaw(renderer);
|
|
88627
88907
|
await printRuntimeInstance(
|
|
@@ -88838,6 +89118,73 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
88838
89118
|
}
|
|
88839
89119
|
});
|
|
88840
89120
|
const previewContainer = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-f233c660"]]);
|
|
89121
|
+
function collectPlacedFieldsByType(sheets, fieldType) {
|
|
89122
|
+
const result = [];
|
|
89123
|
+
const addFieldMeta = (fieldMeta) => {
|
|
89124
|
+
if (!fieldMeta.field) return;
|
|
89125
|
+
const modelKey = fieldMeta.model || fieldMeta.modelLink?.split(".").pop();
|
|
89126
|
+
if (!modelKey) return;
|
|
89127
|
+
result.push({
|
|
89128
|
+
field: fieldMeta.field,
|
|
89129
|
+
fieldType: fieldMeta.bizType || fieldMeta.fieldType || fieldType,
|
|
89130
|
+
model: modelKey,
|
|
89131
|
+
...fieldMeta.subFieldKey ? { subFieldKey: fieldMeta.subFieldKey } : {}
|
|
89132
|
+
});
|
|
89133
|
+
};
|
|
89134
|
+
for (const { paper: paper2 } of sheets) {
|
|
89135
|
+
const addField = (content) => {
|
|
89136
|
+
const fieldMeta = content.fieldMeta;
|
|
89137
|
+
if (!fieldMeta?.field || (fieldMeta.bizType || fieldMeta.fieldType) !== fieldType) return;
|
|
89138
|
+
addFieldMeta(fieldMeta);
|
|
89139
|
+
};
|
|
89140
|
+
for (const field of paper2.floatingFields ?? []) addField(field);
|
|
89141
|
+
for (const row of paper2.cells ?? []) {
|
|
89142
|
+
for (const cell of row) {
|
|
89143
|
+
if (cell.multiFieldsContent?.length) {
|
|
89144
|
+
for (const content of cell.multiFieldsContent) {
|
|
89145
|
+
if (!content.type || content.type === CellType.Field) addField(content);
|
|
89146
|
+
}
|
|
89147
|
+
} else if (!cell.type || cell.type === CellType.Field) {
|
|
89148
|
+
addField(cell);
|
|
89149
|
+
}
|
|
89150
|
+
}
|
|
89151
|
+
}
|
|
89152
|
+
if (fieldType === FIELD_TYPE.MASTERSLAVE) {
|
|
89153
|
+
for (const table of [...paper2.dynamicTables ?? [], ...paper2.fixedTables ?? []]) {
|
|
89154
|
+
if (!table.field) continue;
|
|
89155
|
+
addFieldMeta({
|
|
89156
|
+
field: table.field,
|
|
89157
|
+
model: table.mainModel,
|
|
89158
|
+
fieldType: FIELD_TYPE.MASTERSLAVE
|
|
89159
|
+
});
|
|
89160
|
+
}
|
|
89161
|
+
}
|
|
89162
|
+
}
|
|
89163
|
+
return result;
|
|
89164
|
+
}
|
|
89165
|
+
function collectPlacedFieldsFromDesignerJson(designerJson, fieldType) {
|
|
89166
|
+
if (!designerJson) return [];
|
|
89167
|
+
let designer = designerJson;
|
|
89168
|
+
if (typeof designer === "string") {
|
|
89169
|
+
try {
|
|
89170
|
+
designer = JSON.parse(designer);
|
|
89171
|
+
} catch {
|
|
89172
|
+
return [];
|
|
89173
|
+
}
|
|
89174
|
+
}
|
|
89175
|
+
if (!designer || typeof designer !== "object") return [];
|
|
89176
|
+
const saved = designer;
|
|
89177
|
+
const sheets = Array.isArray(saved.sheets) ? saved.sheets.filter((sheet) => !!sheet?.paper) : Array.isArray(saved.cells) ? [{ sheetId: saved.sheetId ?? "", title: "", paper: saved }] : [];
|
|
89178
|
+
return collectPlacedFieldsByType(sheets, fieldType);
|
|
89179
|
+
}
|
|
89180
|
+
async function getPlacedFieldsByType(fieldType, templateId) {
|
|
89181
|
+
if (!templateId) throw new Error("getPlacedFieldsByType requires a templateId");
|
|
89182
|
+
const template = await api.apaas.onlineFormTmpl.getGetVersionById({ id: templateId });
|
|
89183
|
+
return collectPlacedFieldsFromDesignerJson(template?.designerJson, fieldType);
|
|
89184
|
+
}
|
|
89185
|
+
function getPlacedSealFields(templateId) {
|
|
89186
|
+
return getPlacedFieldsByType(FIELD_TYPE.SEAL, templateId);
|
|
89187
|
+
}
|
|
88841
89188
|
const UNIQUE_KEY = "online-form-web-render-form-version-diff-iframe-util";
|
|
88842
89189
|
const _hoisted_1$9 = ["src"];
|
|
88843
89190
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
@@ -90434,14 +90781,16 @@ export {
|
|
|
90434
90781
|
XlsxParser as aj,
|
|
90435
90782
|
calcUsedFields as ak,
|
|
90436
90783
|
createDefaultExcelStores as al,
|
|
90437
|
-
|
|
90438
|
-
|
|
90439
|
-
|
|
90440
|
-
|
|
90441
|
-
|
|
90442
|
-
|
|
90443
|
-
|
|
90444
|
-
|
|
90784
|
+
getPlacedFieldsByType as am,
|
|
90785
|
+
getPlacedSealFields as an,
|
|
90786
|
+
installFormBaseModal as ao,
|
|
90787
|
+
isReverseModelingEnabled as ap,
|
|
90788
|
+
openVersionDiff as aq,
|
|
90789
|
+
registerExcelHostComponents as ar,
|
|
90790
|
+
registerExcelLocale as as,
|
|
90791
|
+
scanField as at,
|
|
90792
|
+
setupExcel as au,
|
|
90793
|
+
useCheckItem as av,
|
|
90445
90794
|
isInventoryProductField as b,
|
|
90446
90795
|
commonjsRequire as c,
|
|
90447
90796
|
captureRuntimePrintSnapshot as d,
|