@gct-paas/excel 0.1.39-beta.43 → 0.1.39-beta.46

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.
Files changed (63) hide show
  1. package/dist/{BaseComponent-DhTXxc4x.js → BaseComponent-D_qr1qAV.js} +1 -1
  2. package/dist/{barcode-design-NS1lArmz.js → barcode-design-B1E1I0h9.js} +1 -1
  3. package/dist/base/index.es.js +34 -11
  4. package/dist/{diagonal-design-Cwftu7hx.js → diagonal-design-vUC0R6G9.js} +1 -1
  5. package/dist/{dynamic-table-action-prScpPSO.js → dynamic-table-action-BjNAbOiM.js} +69 -47
  6. package/dist/excel.css +72 -58
  7. package/dist/{exceljs.min-C8jXFWc7.js → exceljs.min-ruMnRdmJ.js} +1 -1
  8. package/dist/{font-editor-CsApTDPC.js → font-editor-KgE3aTA7.js} +1 -1
  9. package/dist/{index-BHvLNvGx.js → index-B1Zk4PhS.js} +1 -1
  10. package/dist/{index-BVdJYwE3.js → index-BK2bj0YC.js} +1 -1
  11. package/dist/{index-COddIoq-.js → index-BkrySdbu.js} +2 -2
  12. package/dist/{index-mfqsTXoB.js → index-BtAn5HaV.js} +1 -1
  13. package/dist/{index-CxPjhQyf.js → index-C3GeooR3.js} +1 -1
  14. package/dist/{index-yo02_Auy.js → index-CHFipq2D.js} +1 -1
  15. package/dist/{index-8qbd3NxM.js → index-CKKmoHnx.js} +2 -2
  16. package/dist/{index-D_up7D_j.js → index-CWr2IJif.js} +1 -1
  17. package/dist/{index-k2fPE1RL.js → index-CeUHeApW.js} +1 -1
  18. package/dist/{index-DyMkQIRS.js → index-CpDIChOU.js} +1 -1
  19. package/dist/{index-D9x5f9Aq.js → index-CquK-4J5.js} +1 -1
  20. package/dist/{index-D6wyJoQk.js → index-D0wXTI_4.js} +3 -3
  21. package/dist/{index-D9hguffi.js → index-DC9Ri3CX.js} +355 -181
  22. package/dist/{index-DxlyGiK8.js → index-DPZCDmkK.js} +2 -2
  23. package/dist/{index-D1mJkeww.js → index-DSFStTXw.js} +1 -1
  24. package/dist/{index-0mcNFwv7.js → index-DierjEYd.js} +1 -1
  25. package/dist/{index-CbsfoOi4.js → index-DnmoxMpn.js} +1 -1
  26. package/dist/{index-DK3dd2is.js → index-DoOqRMkR.js} +2 -2
  27. package/dist/{index-DCrPZFf7.js → index-Dojxm4da.js} +2 -2
  28. package/dist/{index-BEIwixHG.js → index-DqeDXZCe.js} +1 -1
  29. package/dist/{index-D-Xv5wzv.js → index-DvzscBgj.js} +1 -1
  30. package/dist/{index-Bjd5wuw-.js → index-DzW9E770.js} +1 -1
  31. package/dist/{index-CKEpTba9.js → index-bBk6szgy.js} +2 -2
  32. package/dist/{index-BH-h7Bat.js → index-owxyHZ4N.js} +1 -1
  33. package/dist/index.es.js +1 -1
  34. package/dist/{pagination-design-DITDQsUU.js → pagination-design-BqD1xNnj.js} +1 -1
  35. package/dist/paper-widget-design-0Wlu4W7D.js +4 -0
  36. package/dist/{print-runtime-instance-CvgieNN9.js → print-runtime-instance-D-zZ-Pnj.js} +1 -1
  37. package/dist/{print-snapshot-renderer-ex82O_4p.js → print-snapshot-renderer-CAu5xiAs.js} +3 -3
  38. package/dist/{qrcode-design-BGpk7DbL.js → qrcode-design-Dx0mGVK1.js} +1 -1
  39. package/dist/seal-design-BSsVnsgS.js +4 -0
  40. package/dist/{single-field-drop-D6uaQgvU.js → single-field-drop-CadWmOmY.js} +1 -1
  41. package/dist/src/nocode-base/src/hooks/material-consume/bom-validator.d.ts +2 -2
  42. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +14 -13
  43. package/dist/src/nocode-base/src/hooks/material-consume/tmpl-bom-controller.d.ts +8 -0
  44. package/dist/src/online-form/src/views/__cell_widgets__/cell-widget-design.vue.d.ts +1 -0
  45. package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/useReferenceLabel.d.ts +4 -0
  46. package/dist/{sub-table-factory-BN0oN8fv.js → sub-table-factory-oIHIEDd1.js} +1 -1
  47. package/dist/{text-design-BWOLDnTX.js → text-design-DvaCN4xE.js} +1 -1
  48. package/dist/{trace-like-wrapper-Cpc_zYa_.js → trace-like-wrapper-DjdghEJk.js} +1 -1
  49. package/dist/{value-editor.vue_vue_type_style_index_0_lang-frsVEjsA.js → value-editor.vue_vue_type_style_index_0_lang-DOoBSxtT.js} +1 -1
  50. package/dist/{widget-barcode-EVHu7mED.js → widget-barcode-Bihp8eQf.js} +2 -2
  51. package/dist/{widget-diagonal-Diw_gUHO.js → widget-diagonal-CU143lb2.js} +2 -2
  52. package/dist/{widget-image-Cbtyhn6y.js → widget-image-CvQtHO9u.js} +1 -1
  53. package/dist/{widget-line-DUUUqzV9.js → widget-line-BWWibbG3.js} +1 -1
  54. package/dist/{widget-pagination-BN0-keGV.js → widget-pagination-BOlbp2M6.js} +2 -2
  55. package/dist/{widget-power-Bh_7NHI0.js → widget-power-BQrjZJ0s.js} +2 -2
  56. package/dist/{widget-qrcode-B03rwAGe.js → widget-qrcode-CMrJuNbq.js} +2 -2
  57. package/dist/{widget-rangelimit-BInkWZeQ.js → widget-rangelimit-CGkoloXm.js} +2 -2
  58. package/dist/{widget-serialnumber-BaL2uasA.js → widget-serialnumber-Rwq-qlyD.js} +1 -1
  59. package/dist/{widget-text-C0Y_wCd_.js → widget-text-Qj9jHnAY.js} +3 -3
  60. package/dist/{widget-timediff-vo-vEV1L.js → widget-timediff-DVtLFiEW.js} +1 -1
  61. package/package.json +1 -1
  62. package/dist/paper-widget-design-BGs8VQMz.js +0 -4
  63. package/dist/seal-design-BTVRnLdn.js +0 -4
@@ -5,7 +5,7 @@ import { range, cloneDeep, get as get$3, merge, isEmpty, zip, pick, omit, has, d
5
5
  import dayjs from "dayjs";
6
6
  import * as Antd from "ant-design-vue";
7
7
  import { message, Modal, Alert, 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";
8
- import { M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, g as getBusinessFieldKey, b as MULTI_SHEET_SCHEMA_VERSION, n as normalizeGridColumnWidth, c as getParseFormulaVarInfos, d as createRuntimeDocumentV2, e as clampSealPosition, f as normalizeSealDiameter, h as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, i as isCellAutoLineBreak, B as BorderTD, u as useFormTmplConfig, j as normalizeHistoricalBusinessRow, k as DeviceLinkTmplUtil, l as normalizeAIOcrTmpl, m as useWidgetStaticAttrs, o as useRuntimeInstanceServices, s as setSelectValidatorId, p as setSelectAnnotationId, q as useRuntimeRowState, r as getObjectBomMaterialLotQuery, t as buildObjectLotExtraQuery, v as resolveObjectFieldKeys, w as MaterialConsumptionPatternEnum, x as validateObjectBomForScan, y as resolveObjectBomEntry, z as runWithFillProduct, A as useNocodeFormWidget, C as applyConsumeObjectTraceChange, E as getObjectBomProductQuery, F as EMPTY_PRODUCT_VERSION_ID, G as normalizeHistoricalAutofillRow, N as NCB_PROVIDE, H as readSealValue, I as isSealStamped, J as stampSealValue, K as isValidSealValue, L as clearSealValue, O as parseRuntimeFieldPath, P as calculateFormula, Q as useStyles, R as useDependency, S as useFieldPresentation, T as useRuntimeEditorFlusher, U as RuntimeFormStateStore, V as createRuntimeInstanceContext, W as RuntimeInstanceRegistry, X as ScanParamType, Y as RequiredQtyCalcRule, Z as registerFormulaFuncs, _ as moveSealValue, $ as DocumentPaper, a0 as DynamicTableAction, a1 as _sfc_main$6w } from "./dynamic-table-action-prScpPSO.js";
8
+ import { M as MAX_RUNTIME_SHEETS, a as MAX_RUNTIME_SHEET_TITLE_LENGTH, g as getBusinessFieldKey, b as MULTI_SHEET_SCHEMA_VERSION, n as normalizeGridColumnWidth, c as getParseFormulaVarInfos, d as createRuntimeDocumentV2, e as clampSealPosition, f as normalizeSealDiameter, h as normalizeFieldWidth, D as DEFAULT_BOOLEAN_FIELD_WIDTH, i as isCellAutoLineBreak, B as BorderTD, u as useFormTmplConfig, j as normalizeHistoricalBusinessRow, k as DeviceLinkTmplUtil, l as normalizeAIOcrTmpl, m as useWidgetStaticAttrs, o as useRuntimeInstanceServices, s as setSelectValidatorId, p as setSelectAnnotationId, q as useRuntimeRowState, r as getObjectBomMaterialLotQuery, t as buildObjectLotExtraQuery, v as resolveObjectFieldKeys, w as MaterialConsumptionPatternEnum, x as validateObjectBomForScan, y as resolveObjectBomEntry, z as runWithFillProduct, A as useNocodeFormWidget, C as applyConsumeObjectTraceChange, E as getObjectBomProductQuery, F as EMPTY_PRODUCT_VERSION_ID, G as normalizeHistoricalAutofillRow, N as NCB_PROVIDE, H as readSealValue, I as isSealStamped, J as stampSealValue, K as isValidSealValue, L as clearSealValue, O as parseRuntimeFieldPath, P as calculateFormula, Q as useStyles, R as useDependency, S as useFieldPresentation, T as useRuntimeEditorFlusher, U as RuntimeFormStateStore, V as createRuntimeInstanceContext, W as RuntimeInstanceRegistry, X as ScanParamType, Y as RequiredQtyCalcRule, Z as registerFormulaFuncs, _ as moveSealValue, $ as DocumentPaper, a0 as DynamicTableAction, a1 as _sfc_main$6w } from "./dynamic-table-action-BjNAbOiM.js";
9
9
  import { S as SEARCH_SEVICE, V as VersionSelect, C as CloseOutlined, E as EmptyImg$2, _ as _sfc_main$6u, P as ProductTypeEnum } from "./online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CQytxboy.js";
10
10
  import { I as Icon$1, w as warning, u as useInsertStyles, s as svgBaseProps, a as useNamespace } from "./AntdIcon-DCIaV352.js";
11
11
  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$6v, h as initWebNocodeAdapter } from "./index-DZMdGtEu.js";
@@ -1931,7 +1931,7 @@ function openWindow(url, opt) {
1931
1931
  const FieldPropLabels = Object.entries(FIELD_PROP_LABEL_MAP);
1932
1932
  const FieldTypeLabels = Object.entries(FIELD_TYPE_LABEL_MAP);
1933
1933
  async function createWorkbook() {
1934
- const ExcelJs = (await import("./exceljs.min-C8jXFWc7.js").then((n) => n.e)).default;
1934
+ const ExcelJs = (await import("./exceljs.min-ruMnRdmJ.js").then((n) => n.e)).default;
1935
1935
  return new ExcelJs.Workbook();
1936
1936
  }
1937
1937
  class XlsxParser {
@@ -2302,28 +2302,28 @@ class XlsxParser {
2302
2302
  }
2303
2303
  function asyncImportClassModules() {
2304
2304
  const modules = /* @__PURE__ */ Object.assign({
2305
- "./_field_/auto-complete/index.ts": () => import("./index-8qbd3NxM.js").then((m) => m["default"]),
2306
- "./_field_/datepicker/index.ts": () => import("./index-k2fPE1RL.js").then((m) => m["default"]),
2307
- "./_field_/datetimepicker/index.ts": () => import("./index-0mcNFwv7.js").then((m) => m["default"]),
2308
- "./_field_/department/index.ts": () => import("./index-yo02_Auy.js").then((m) => m["default"]),
2309
- "./_field_/enum-select/index.ts": () => import("./index-DK3dd2is.js").then((m) => m["default"]),
2310
- "./_field_/input/index.ts": () => import("./index-BH-h7Bat.js").then((m) => m["default"]),
2311
- "./_field_/inputdouble/index.ts": () => import("./index-D-Xv5wzv.js").then((m) => m["default"]),
2312
- "./_field_/inputnumber/index.ts": () => import("./index-Bjd5wuw-.js").then((m) => m["default"]),
2313
- "./_field_/rdo-select/index.ts": () => import("./index-DxlyGiK8.js").then((m) => m["default"]),
2314
- "./_field_/seal/index.ts": () => import("./index-CKEpTba9.js").then((m) => m["default"]),
2315
- "./_field_/select/index.ts": () => import("./index-DCrPZFf7.js").then((m) => m["default"]),
2316
- "./_field_/sign/index.ts": () => import("./index-D9x5f9Aq.js").then((m) => m["default"]),
2317
- "./_field_/switch/index.ts": () => import("./index-D6wyJoQk.js").then((m) => m["default"]),
2318
- "./_field_/textarea/index.ts": () => import("./index-mfqsTXoB.js").then((m) => m["default"]),
2319
- "./_field_/timepicker/index.ts": () => import("./index-BHvLNvGx.js").then((m) => m["default"]),
2320
- "./_field_/upload-file/index.ts": () => import("./index-D_up7D_j.js").then((m) => m["default"]),
2321
- "./_field_/upload-image/index.ts": () => import("./index-DyMkQIRS.js").then((m) => m["default"]),
2322
- "./_field_/userpicker/index.ts": () => import("./index-CbsfoOi4.js").then((m) => m["default"]),
2305
+ "./_field_/auto-complete/index.ts": () => import("./index-CKKmoHnx.js").then((m) => m["default"]),
2306
+ "./_field_/datepicker/index.ts": () => import("./index-CeUHeApW.js").then((m) => m["default"]),
2307
+ "./_field_/datetimepicker/index.ts": () => import("./index-DierjEYd.js").then((m) => m["default"]),
2308
+ "./_field_/department/index.ts": () => import("./index-CHFipq2D.js").then((m) => m["default"]),
2309
+ "./_field_/enum-select/index.ts": () => import("./index-DoOqRMkR.js").then((m) => m["default"]),
2310
+ "./_field_/input/index.ts": () => import("./index-owxyHZ4N.js").then((m) => m["default"]),
2311
+ "./_field_/inputdouble/index.ts": () => import("./index-DvzscBgj.js").then((m) => m["default"]),
2312
+ "./_field_/inputnumber/index.ts": () => import("./index-DzW9E770.js").then((m) => m["default"]),
2313
+ "./_field_/rdo-select/index.ts": () => import("./index-DPZCDmkK.js").then((m) => m["default"]),
2314
+ "./_field_/seal/index.ts": () => import("./index-bBk6szgy.js").then((m) => m["default"]),
2315
+ "./_field_/select/index.ts": () => import("./index-Dojxm4da.js").then((m) => m["default"]),
2316
+ "./_field_/sign/index.ts": () => import("./index-CquK-4J5.js").then((m) => m["default"]),
2317
+ "./_field_/switch/index.ts": () => import("./index-D0wXTI_4.js").then((m) => m["default"]),
2318
+ "./_field_/textarea/index.ts": () => import("./index-BtAn5HaV.js").then((m) => m["default"]),
2319
+ "./_field_/timepicker/index.ts": () => import("./index-B1Zk4PhS.js").then((m) => m["default"]),
2320
+ "./_field_/upload-file/index.ts": () => import("./index-CWr2IJif.js").then((m) => m["default"]),
2321
+ "./_field_/upload-image/index.ts": () => import("./index-CpDIChOU.js").then((m) => m["default"]),
2322
+ "./_field_/userpicker/index.ts": () => import("./index-DnmoxMpn.js").then((m) => m["default"]),
2323
2323
  "./_widget_/barcode/index.ts": () => import("./index-CwIsdzXH.js").then((m) => m["default"]),
2324
- "./_widget_/combine-fields/index.ts": () => import("./index-D1mJkeww.js").then((m) => m["default"]),
2325
- "./_widget_/diagonal/index.ts": () => import("./index-BVdJYwE3.js").then((m) => m["default"]),
2326
- "./_widget_/dyn-value/index.ts": () => import("./index-BEIwixHG.js").then((m) => m["default"]),
2324
+ "./_widget_/combine-fields/index.ts": () => import("./index-DSFStTXw.js").then((m) => m["default"]),
2325
+ "./_widget_/diagonal/index.ts": () => import("./index-BK2bj0YC.js").then((m) => m["default"]),
2326
+ "./_widget_/dyn-value/index.ts": () => import("./index-DqeDXZCe.js").then((m) => m["default"]),
2327
2327
  "./_widget_/image/index.ts": () => import("./index-DCjd1J3_.js").then((m) => m["default"]),
2328
2328
  "./_widget_/line/index.ts": () => import("./index-BO1Li3H3.js").then((m) => m["default"]),
2329
2329
  "./_widget_/power/index.ts": () => import("./index-BO9uHu6r.js").then((m) => m["default"]),
@@ -2333,8 +2333,8 @@ function asyncImportClassModules() {
2333
2333
  "./_widget_/sub-table/index.ts": () => import("./index-BjU6Dtry.js").then((m) => m["default"]),
2334
2334
  "./_widget_/timediff/index.ts": () => import("./index-vFXGFf0u.js").then((m) => m["default"]),
2335
2335
  "./paper/index.ts": () => import("./index-BmMbk3ux.js").then((m) => m["default"]),
2336
- "./td/index.ts": () => import("./index-COddIoq-.js").then((m) => m["default"]),
2337
- "./tr/index.ts": () => import("./index-CxPjhQyf.js").then((m) => m["default"])
2336
+ "./td/index.ts": () => import("./index-BkrySdbu.js").then((m) => m["default"]),
2337
+ "./tr/index.ts": () => import("./index-C3GeooR3.js").then((m) => m["default"])
2338
2338
  });
2339
2339
  return modules;
2340
2340
  }
@@ -14898,7 +14898,8 @@ const _sfc_main$6b = /* @__PURE__ */ defineComponent({
14898
14898
  props: {
14899
14899
  fieldWidget: {},
14900
14900
  fieldMeta: {},
14901
- autoLineBreak: { type: Boolean }
14901
+ autoLineBreak: { type: Boolean },
14902
+ inCombinedFields: { type: Boolean }
14902
14903
  },
14903
14904
  setup(__props) {
14904
14905
  const ns = useNamespace("cell");
@@ -14953,6 +14954,11 @@ const _sfc_main$6b = /* @__PURE__ */ defineComponent({
14953
14954
  const preserveAffixWidth = computed(
14954
14955
  () => !readonly.value && hasAnyAffix.value && !wrapAffix.value
14955
14956
  );
14957
+ const preserveOptionWidth = computed(
14958
+ () => props2.inCombinedFields && !props2.autoLineBreak && !readonly.value && props2.fieldWidget.category === CellWidgetCategory.Enum && [CellWidgetRenderComp.Radio, CellWidgetRenderComp.Checkbox].includes(
14959
+ props2.fieldWidget.renderComp
14960
+ )
14961
+ );
14956
14962
  const wrapperSizeStyle = computed(() => ({
14957
14963
  width: wrapAffix.value ? "fit-content" : readonly.value ? void 0 : preserveAffixWidth.value ? "max-content" : `${normalizedCompWidth.value}px`
14958
14964
  }));
@@ -14990,7 +14996,8 @@ const _sfc_main$6b = /* @__PURE__ */ defineComponent({
14990
14996
  "cell-widget-design--with-prefix": hasOuterPrefix.value,
14991
14997
  "cell-widget-design--with-suffix": hasOuterSuffix.value,
14992
14998
  "cell-widget-design--fixed-affix": preserveAffixWidth.value,
14993
- "cell-widget-design--wrap-affix": wrapAffix.value
14999
+ "cell-widget-design--wrap-affix": wrapAffix.value,
15000
+ "cell-widget-design--unwrapped-options": preserveOptionWidth.value
14994
15001
  }
14995
15002
  ]),
14996
15003
  style: normalizeStyle([styleVars.value, wrapperSizeStyle.value])
@@ -15010,7 +15017,7 @@ const _sfc_main$6b = /* @__PURE__ */ defineComponent({
15010
15017
  };
15011
15018
  }
15012
15019
  });
15013
- const CellWidgetDesign = /* @__PURE__ */ _export_sfc(_sfc_main$6b, [["__scopeId", "data-v-e83b495f"]]);
15020
+ const CellWidgetDesign = /* @__PURE__ */ _export_sfc(_sfc_main$6b, [["__scopeId", "data-v-0c318157"]]);
15014
15021
  const cellWidgetDesign = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15015
15022
  __proto__: null,
15016
15023
  default: CellWidgetDesign
@@ -16044,7 +16051,7 @@ function asyncImportWidgetConfigList() {
16044
16051
  return widgetConfigList;
16045
16052
  }
16046
16053
  function asyncImportWidgetDesign() {
16047
- const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-BTVRnLdn.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-NS1lArmz.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-Cwftu7hx.js"), "./image/image-design.vue": () => import("./image-design-CvPulfQ5.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-DITDQsUU.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-BGs8VQMz.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-BGpk7DbL.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-b3PN24Uf.js"), "./text/text-design.vue": () => import("./text-design-BWOLDnTX.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-BLpsTDOD.js") });
16054
+ const modules = /* @__PURE__ */ Object.assign({ "../__cell_widgets__/cell-widget-design.vue": () => Promise.resolve().then(() => cellWidgetDesign), "../__cell_widgets__/seal/seal-design.vue": () => import("./seal-design-BSsVnsgS.js"), "./barcode/barcode-design.vue": () => import("./barcode-design-B1E1I0h9.js"), "./diagonal/diagonal-design.vue": () => import("./diagonal-design-vUC0R6G9.js"), "./image/image-design.vue": () => import("./image-design-CvPulfQ5.js"), "./line/line-design.vue": () => Promise.resolve().then(() => lineDesign), "./pagination/pagination-design.vue": () => import("./pagination-design-BqD1xNnj.js"), "./paper-widget-design.vue": () => import("./paper-widget-design-0Wlu4W7D.js"), "./power/power-design.vue": () => Promise.resolve().then(() => powerDesign), "./qrcode/qrcode-design.vue": () => import("./qrcode-design-Dx0mGVK1.js"), "./rangelimit/rangelimit-design.vue": () => Promise.resolve().then(() => rangelimitDesign), "./serialnumber/serialnumber-design.vue": () => import("./serialnumber-design-b3PN24Uf.js"), "./text/text-design.vue": () => import("./text-design-DvaCN4xE.js"), "./timediff/timediff-design.vue": () => import("./timediff-design-BLpsTDOD.js") });
16048
16055
  const widgetDesignMap = Object.keys(modules).reduce((map2, path) => {
16049
16056
  const mKey = path.match(/\/([a-z]+)-design\.vue$/)?.[1];
16050
16057
  if (mKey) {
@@ -21982,7 +21989,8 @@ const _sfc_main$5U = /* @__PURE__ */ defineComponent({
21982
21989
  key: 1,
21983
21990
  "field-widget": item.fieldWidget,
21984
21991
  "field-meta": item.fieldMeta,
21985
- "auto-line-break": isAutoLineBreak.value
21992
+ "auto-line-break": isAutoLineBreak.value,
21993
+ "in-combined-fields": ""
21986
21994
  }, null, 8, ["field-widget", "field-meta", "auto-line-break"])) : createCommentVNode("", true)
21987
21995
  ], 64);
21988
21996
  }), 128))
@@ -22027,7 +22035,7 @@ const _sfc_main$5U = /* @__PURE__ */ defineComponent({
22027
22035
  };
22028
22036
  }
22029
22037
  });
22030
- const SpreadSheetCell = /* @__PURE__ */ _export_sfc(_sfc_main$5U, [["__scopeId", "data-v-e393c404"]]);
22038
+ const SpreadSheetCell = /* @__PURE__ */ _export_sfc(_sfc_main$5U, [["__scopeId", "data-v-e082ef2d"]]);
22031
22039
  const ThresholdValue = 8;
22032
22040
  function getOffsetValue(left, width, points) {
22033
22041
  let offset2 = left;
@@ -53009,7 +53017,7 @@ const _sfc_main$3q = /* @__PURE__ */ defineComponent({
53009
53017
  }
53010
53018
  });
53011
53019
  function asyncImportWidgetProp() {
53012
- const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-EVHu7mED.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-Diw_gUHO.js"), "./widget-image.vue": () => import("./widget-image-Cbtyhn6y.js"), "./widget-line.vue": () => import("./widget-line-DUUUqzV9.js"), "./widget-pagination.vue": () => import("./widget-pagination-BN0-keGV.js"), "./widget-power.vue": () => import("./widget-power-Bh_7NHI0.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-B03rwAGe.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-BInkWZeQ.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-BaL2uasA.js"), "./widget-text.vue": () => import("./widget-text-C0Y_wCd_.js"), "./widget-timediff.vue": () => import("./widget-timediff-vo-vEV1L.js") });
53020
+ const modules = /* @__PURE__ */ Object.assign({ "./widget-barcode.vue": () => import("./widget-barcode-Bihp8eQf.js"), "./widget-diagonal.vue": () => import("./widget-diagonal-CU143lb2.js"), "./widget-image.vue": () => import("./widget-image-CvQtHO9u.js"), "./widget-line.vue": () => import("./widget-line-BWWibbG3.js"), "./widget-pagination.vue": () => import("./widget-pagination-BOlbp2M6.js"), "./widget-power.vue": () => import("./widget-power-BQrjZJ0s.js"), "./widget-qrcode.vue": () => import("./widget-qrcode-CMrJuNbq.js"), "./widget-rangelimit.vue": () => import("./widget-rangelimit-CGkoloXm.js"), "./widget-serialnumber.vue": () => import("./widget-serialnumber-Rwq-qlyD.js"), "./widget-text.vue": () => import("./widget-text-Qj9jHnAY.js"), "./widget-timediff.vue": () => import("./widget-timediff-DVtLFiEW.js") });
53013
53021
  const widgetPropMap = Object.keys(modules).reduce((map2, path) => {
53014
53022
  const mKey = path.match(/\/widget-([a-z]+)\.vue$/)?.[1];
53015
53023
  if (mKey) {
@@ -66782,6 +66790,9 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
66782
66790
  const emit2 = __emit;
66783
66791
  const currentValue = computed({
66784
66792
  get() {
66793
+ if (props2.value === void 0 || props2.value === null || props2.value === "") {
66794
+ return [];
66795
+ }
66785
66796
  if (props2.value && !Array.isArray(props2.value) && props2.mode !== "multiple") {
66786
66797
  return [props2.value];
66787
66798
  }
@@ -66822,7 +66833,7 @@ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
66822
66833
  };
66823
66834
  }
66824
66835
  });
66825
- const CheckboxSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["__scopeId", "data-v-4c31c26d"]]);
66836
+ const CheckboxSwitch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["__scopeId", "data-v-784964bd"]]);
66826
66837
  const _sfc_main$24 = /* @__PURE__ */ defineComponent({
66827
66838
  __name: "radio-enum",
66828
66839
  props: {
@@ -72359,7 +72370,6 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
72359
72370
  showRequired,
72360
72371
  showDisabled,
72361
72372
  options: initialOptions,
72362
- loadFinished2Options,
72363
72373
  newTotalCount,
72364
72374
  newQueryDataRef
72365
72375
  } = useWidgetStaticAttrs(props2.widget);
@@ -72447,6 +72457,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
72447
72457
  allowClear: true,
72448
72458
  defaultActiveFirstOption: false,
72449
72459
  showSearch: true,
72460
+ filterOption: false,
72450
72461
  notFoundContent: void 0
72451
72462
  };
72452
72463
  return attr;
@@ -72598,7 +72609,6 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
72598
72609
  }
72599
72610
  );
72600
72611
  const handleSearch = (keyword2) => {
72601
- if (loadFinished2Options) return;
72602
72612
  state.data = [];
72603
72613
  debounceSearch(keyword2);
72604
72614
  };
@@ -72703,7 +72713,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
72703
72713
  };
72704
72714
  }
72705
72715
  });
72706
- const AllocatePart = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["__scopeId", "data-v-8620f4a0"]]);
72716
+ const AllocatePart = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["__scopeId", "data-v-6c8bafae"]]);
72707
72717
  function useAsyncOptions({ bindModelKey, modelCategory, code: code2 }) {
72708
72718
  async function getRefList(arg = {}) {
72709
72719
  const res = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
@@ -72798,10 +72808,11 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
72798
72808
  emit2("update:modelValue", val);
72799
72809
  }
72800
72810
  });
72811
+ let optionsRequestId = 0;
72801
72812
  watch(
72802
72813
  () => currentValue.value,
72803
72814
  async () => {
72804
- if (!state.loadFinished2Options) {
72815
+ if (!state.data.some((option2) => option2.value === currentValue.value)) {
72805
72816
  await checkInitialValue();
72806
72817
  }
72807
72818
  },
@@ -72822,7 +72833,7 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
72822
72833
  allowClear: true,
72823
72834
  showSearch: true,
72824
72835
  defaultActiveFirstOption: false,
72825
- filterOption: state.loadFinished2Options ? onFilterOption : false,
72836
+ filterOption: false,
72826
72837
  notFoundContent: void 0
72827
72838
  };
72828
72839
  return attr;
@@ -72835,54 +72846,55 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
72835
72846
  });
72836
72847
  }
72837
72848
  onBeforeMount(async () => {
72849
+ const id = ++optionsRequestId;
72838
72850
  const { options, finished } = await getOptionsByQuery();
72851
+ if (id !== optionsRequestId) return;
72839
72852
  state.loadFinished2Options = finished;
72840
72853
  state.initialOptions = options;
72841
72854
  state.data = options || [];
72855
+ await checkInitialValue();
72842
72856
  });
72843
- function onFilterOption(input, option2) {
72844
- if (option2.label) {
72845
- const options = option2._item;
72846
- const label = option2?.__LABEL__ || options[searchField];
72847
- const code2 = options["code_"];
72848
- const keyword2 = input.toLowerCase();
72849
- return [label, code2].some(
72850
- (v) => String(v ?? "").toLowerCase().includes(keyword2)
72851
- );
72852
- }
72853
- return false;
72854
- }
72855
72857
  const handleSearch = (keyword2) => {
72856
- if (state.loadFinished2Options) return;
72858
+ ++optionsRequestId;
72857
72859
  state.hasSearched = true;
72858
72860
  state.fetching = true;
72859
72861
  state.data = [];
72860
72862
  debounceSearch(keyword2);
72861
72863
  };
72862
72864
  const debounceSearch = debounce(async (keyword2) => {
72865
+ const id = ++optionsRequestId;
72866
+ const value = keyword2?.trim();
72863
72867
  try {
72864
- if (keyword2 && keyword2.trim()) {
72865
- const queryName = `${searchField}.like`;
72866
- const codeName = "code_.like";
72867
- const res = await getOptionsByQuery({
72868
+ const queryName = `${searchField}.like`;
72869
+ const codeName = "code_.like";
72870
+ const res = await getOptionsByQuery({
72871
+ ...value ? {
72868
72872
  exp: `OR(${queryName},${codeName})`,
72869
- queryData: { [queryName]: keyword2, [codeName]: keyword2 },
72870
- pageSize: 30
72871
- });
72872
- state.data = res.options ?? [];
72873
- }
72874
- if (!keyword2) {
72875
- await checkInitialValue();
72876
- }
72873
+ queryData: { [queryName]: value, [codeName]: value }
72874
+ } : {},
72875
+ pageSize: 30
72876
+ });
72877
+ if (id !== optionsRequestId) return;
72878
+ state.data = res.options ?? [];
72879
+ state.hasSearched = !!value;
72880
+ state.loadFinished2Options = !!res.finished;
72877
72881
  } catch (error) {
72878
72882
  console.error("请求失败:", error);
72883
+ if (id === optionsRequestId) state.data = [];
72879
72884
  } finally {
72880
- state.fetching = false;
72885
+ if (id === optionsRequestId) state.fetching = false;
72881
72886
  }
72882
72887
  }, 300);
72888
+ onBeforeUnmount(() => {
72889
+ debounceSearch.cancel();
72890
+ ++optionsRequestId;
72891
+ });
72883
72892
  async function checkInitialValue() {
72893
+ const id = optionsRequestId;
72894
+ const value = currentValue.value;
72884
72895
  if (currentValue.value && !state.initialOptions.some((o) => o.value === currentValue.value)) {
72885
72896
  const remoteOption = await getOptionByIds(currentValue.value);
72897
+ if (id !== optionsRequestId || value !== currentValue.value) return;
72886
72898
  state.data = [...remoteOption, ...state.initialOptions];
72887
72899
  } else {
72888
72900
  state.data = state.initialOptions;
@@ -72916,7 +72928,7 @@ const _sfc_main$1G = /* @__PURE__ */ defineComponent({
72916
72928
  };
72917
72929
  }
72918
72930
  });
72919
- const TraceSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["__scopeId", "data-v-9cd98049"]]);
72931
+ const TraceSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["__scopeId", "data-v-fefa9ebf"]]);
72920
72932
  const _hoisted_1$10 = { class: "trace-device__dropdown" };
72921
72933
  const _sfc_main$1F = /* @__PURE__ */ defineComponent({
72922
72934
  __name: "trace-device",
@@ -72968,7 +72980,6 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
72968
72980
  showRequired,
72969
72981
  showDisabled,
72970
72982
  options: initialOptions,
72971
- loadFinished2Options,
72972
72983
  newTotalCount
72973
72984
  } = useWidgetStaticAttrs(props2.widget);
72974
72985
  const { displayFields, autofillRules, enableAutofill } = props2.widget.props;
@@ -73010,7 +73021,7 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
73010
73021
  allowClear: true,
73011
73022
  defaultActiveFirstOption: false,
73012
73023
  showSearch: false,
73013
- // filterOption: loadFinished2Options ? onFilterOption : false,
73024
+ filterOption: false,
73014
73025
  notFoundContent: void 0
73015
73026
  };
73016
73027
  return attr;
@@ -73235,9 +73246,8 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
73235
73246
  selectedDisposed = true;
73236
73247
  selectedRequestId++;
73237
73248
  });
73238
- const handleSearch = (keyword2) => {
73239
- if (loadFinished2Options) return;
73240
- debounceSearch(keyword2);
73249
+ const handleSearch = () => {
73250
+ debounceSearch();
73241
73251
  };
73242
73252
  async function getOptionByIds(ids) {
73243
73253
  const { data = [] } = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
@@ -73386,7 +73396,54 @@ const _sfc_main$1F = /* @__PURE__ */ defineComponent({
73386
73396
  };
73387
73397
  }
73388
73398
  });
73389
- const TraceDevice = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-8b3e2bc3"]]);
73399
+ const TraceDevice = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["__scopeId", "data-v-104db85d"]]);
73400
+ function useReferenceLabel(rowSource, field, dataField = field) {
73401
+ const { formStateStore } = useRuntimeInstanceServices();
73402
+ const labelKey = `${field}_lb_`;
73403
+ let disposed = false;
73404
+ onScopeDispose(() => {
73405
+ disposed = true;
73406
+ });
73407
+ watch(
73408
+ [() => formStateStore.value, rowSource],
73409
+ ([store, row], _previous, onCleanup) => {
73410
+ if (!store || store.getObjectPath(row) === void 0) return;
73411
+ let previousValue = row[dataField];
73412
+ let previousLabel = row[labelKey];
73413
+ const labelPath = store.getFieldPath(row, labelKey);
73414
+ onCleanup(
73415
+ store.subscribe(({ paths }) => {
73416
+ const value = row[dataField];
73417
+ const label = row[labelKey];
73418
+ const stale = value !== previousValue && label === previousLabel;
73419
+ previousValue = value;
73420
+ previousLabel = label;
73421
+ const labelProvided = paths.some(
73422
+ (path) => path === labelPath || labelPath.startsWith(`${path}.`)
73423
+ );
73424
+ if (stale && label != null && !labelProvided) {
73425
+ store.setObjectField(row, labelKey, null, "restore");
73426
+ }
73427
+ })
73428
+ );
73429
+ },
73430
+ { immediate: true, flush: "sync" }
73431
+ );
73432
+ function syncSelectedLabel(option2, source) {
73433
+ const store = formStateStore.value;
73434
+ const row = rowSource();
73435
+ if (disposed || !option2 || option2.value == null || option2.value === "" || !store || store.getObjectPath(row) === void 0 || row[dataField] !== option2.value)
73436
+ return;
73437
+ const current = row[labelKey];
73438
+ if (source === "restore") {
73439
+ if (option2.label == null || option2.label === "") return;
73440
+ if (current != null && current !== "" && current !== "[]") return;
73441
+ }
73442
+ const label = option2.label == null ? null : JSON.stringify([option2.label]);
73443
+ if (current !== label) store.setObjectField(row, labelKey, label, source);
73444
+ }
73445
+ return { syncSelectedLabel };
73446
+ }
73390
73447
  const _hoisted_1$$ = { class: "search-wrapper" };
73391
73448
  const _hoisted_2$J = {
73392
73449
  key: 1,
@@ -73413,9 +73470,11 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73413
73470
  };
73414
73471
  const props2 = __props;
73415
73472
  const { setRowField } = useRuntimeRowState(() => props2.formData);
73473
+ const { formStateStore } = useRuntimeInstanceServices();
73416
73474
  const emit2 = __emit;
73417
73475
  const {
73418
73476
  field,
73477
+ targetFieldId,
73419
73478
  modelKey,
73420
73479
  refModelKey,
73421
73480
  placeholder,
@@ -73429,6 +73488,9 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73429
73488
  customLoaderRef
73430
73489
  } = useWidgetStaticAttrs(props2.widget);
73431
73490
  const runtimeProps = resolveRuntimeQuickSearchProps(props2.widget.props);
73491
+ const dataField = targetFieldId || field;
73492
+ const labelKey = `${field}_lb_`;
73493
+ const { syncSelectedLabel } = useReferenceLabel(() => props2.formData, field, dataField);
73432
73494
  const searchField = searchFieldMap[fieldType] || "name_";
73433
73495
  const searchVisible = computed(() => {
73434
73496
  const { quickSearchField } = runtimeProps;
@@ -73452,16 +73514,22 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73452
73514
  });
73453
73515
  const state = reactive({
73454
73516
  hasSearched: false,
73455
- data: initialOptions,
73517
+ data: initialOptions ?? [],
73456
73518
  fetching: false
73457
73519
  });
73458
- const currentValue = computed({
73459
- get() {
73460
- return props2.value;
73461
- },
73462
- set(val) {
73463
- emit2("update:value", val ? val : null);
73464
- }
73520
+ const currentValue = computed(() => props2.value);
73521
+ let optionsRequestId = 0;
73522
+ let lookupSeq = 0;
73523
+ let selectionSeq = 0;
73524
+ let disposed = false;
73525
+ let selectedOption;
73526
+ let selectedOptionRow;
73527
+ onScopeDispose(() => {
73528
+ disposed = true;
73529
+ optionsRequestId++;
73530
+ lookupSeq++;
73531
+ selectionSeq++;
73532
+ debounceSearch.cancel();
73465
73533
  });
73466
73534
  const selectProps = computed(() => {
73467
73535
  let attr = {
@@ -73469,7 +73537,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73469
73537
  allowClear: true,
73470
73538
  showSearch: searchVisible.value,
73471
73539
  defaultActiveFirstOption: false,
73472
- filterOption: loadFinished2Options && !customLoaderRef.value ? onFilterOption : false,
73540
+ filterOption: false,
73473
73541
  notFoundContent: void 0
73474
73542
  };
73475
73543
  return attr;
@@ -73486,39 +73554,9 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73486
73554
  handleSyncVirtualListWidth,
73487
73555
  handleShowCustomTooltip
73488
73556
  } = useCommonSelect({ searchable: searchVisible.value });
73489
- function onFilterOption(input, option2) {
73490
- if (option2.label) {
73491
- const options = option2._item;
73492
- const label = option2?.__LABEL__ || options[searchField];
73493
- const code2 = options["code_"];
73494
- const keyword2 = input.toLowerCase();
73495
- return [label, code2].some(
73496
- (v) => String(v ?? "").toLowerCase().includes(keyword2)
73497
- );
73498
- }
73499
- return false;
73500
- }
73501
73557
  watch(
73502
- () => currentValue.value,
73503
- async () => {
73504
- if (!loadFinished2Options || customLoaderRef.value) {
73505
- await checkInitialValue();
73506
- }
73507
- if (!isNil(currentValue.value)) {
73508
- const newLb = JSON.stringify(
73509
- renderUtils.getSelectOptions({
73510
- value: currentValue.value,
73511
- multiple: false,
73512
- options: state.data,
73513
- key: "label"
73514
- }).labels
73515
- );
73516
- const oldLb = props2.formData[`${field}_lb_`];
73517
- if (oldLb !== newLb) {
73518
- setRowField(`${field}_lb_`, newLb, "restore");
73519
- }
73520
- }
73521
- },
73558
+ [() => props2.value, () => props2.formData, () => customLoaderRef.value],
73559
+ () => checkInitialValue(),
73522
73560
  {
73523
73561
  immediate: true
73524
73562
  }
@@ -73543,9 +73581,11 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73543
73581
  queryData
73544
73582
  };
73545
73583
  };
73546
- let optionsRequestId = 0;
73547
73584
  async function loadOptions({ pageSize: pageSize2, keyword: keyword2 }) {
73548
73585
  const id = ++optionsRequestId;
73586
+ const row = props2.formData;
73587
+ const store = formStateStore.value;
73588
+ const loader = customLoaderRef.value;
73549
73589
  state.fetching = true;
73550
73590
  try {
73551
73591
  const { exp, queryData } = buildQueryParams({ keyword: keyword2 });
@@ -73554,68 +73594,96 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73554
73594
  fieldKey: field,
73555
73595
  refModelKey,
73556
73596
  isRdo: false,
73557
- customLoader: customLoaderRef.value,
73597
+ customLoader: loader,
73558
73598
  exp,
73559
73599
  queryData,
73560
73600
  pageSize: pageSize2
73561
73601
  });
73562
- if (id !== optionsRequestId) return [];
73602
+ if (disposed || id !== optionsRequestId || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader)
73603
+ return;
73563
73604
  state.data = res.options ?? [];
73564
73605
  return res.options ?? [];
73565
73606
  } catch (error) {
73566
73607
  console.error("请求失败:", error);
73567
- if (id === optionsRequestId) state.data = [];
73568
- return [];
73608
+ if (!disposed && id === optionsRequestId) {
73609
+ state.data = [];
73610
+ return [];
73611
+ }
73569
73612
  } finally {
73570
- if (id === optionsRequestId) state.fetching = false;
73571
- if (!keyword2) state.hasSearched = false;
73572
- handleSyncVirtualListWidth();
73613
+ if (!disposed && id === optionsRequestId) {
73614
+ state.fetching = false;
73615
+ if (!keyword2?.trim()) state.hasSearched = false;
73616
+ handleSyncVirtualListWidth();
73617
+ }
73573
73618
  }
73574
73619
  }
73575
73620
  watch(
73576
73621
  () => newQueryDataRef.value,
73577
73622
  async () => {
73578
73623
  if (!newQueryDataRef.value || !customLoaderRef.value) return;
73579
- autoQueryOptions.value = await loadOptions({ pageSize: 999 });
73624
+ const options = await loadOptions({ pageSize: 999 });
73625
+ if (options) autoQueryOptions.value = options;
73580
73626
  },
73581
73627
  {
73582
73628
  immediate: true
73583
73629
  }
73584
73630
  );
73585
73631
  const handleSearch = (keyword2) => {
73586
- if (loadFinished2Options && !customLoaderRef.value) return;
73632
+ if (disposed) return;
73633
+ optionsRequestId++;
73587
73634
  state.hasSearched = true;
73588
73635
  state.fetching = true;
73589
73636
  state.data = [];
73590
73637
  debounceSearch(keyword2);
73591
73638
  };
73592
73639
  const debounceSearch = debounce(async (keyword2) => {
73640
+ await loadOptions({ pageSize: 30, keyword: keyword2?.trim() || void 0 });
73641
+ }, 300);
73642
+ watch(dropdownVisible, (visible) => {
73643
+ debounceSearch.cancel();
73644
+ ++optionsRequestId;
73645
+ if (disposed || !visible) {
73646
+ state.fetching = false;
73647
+ return;
73648
+ }
73649
+ state.data = [];
73650
+ state.hasSearched = false;
73651
+ void loadOptions({ pageSize: 30 });
73652
+ });
73653
+ async function checkInitialValue() {
73654
+ const seq = ++lookupSeq;
73655
+ const requestId = ++optionsRequestId;
73656
+ const value = props2.value;
73657
+ const row = props2.formData;
73658
+ const store = formStateStore.value;
73659
+ const loader = customLoaderRef.value;
73593
73660
  try {
73594
- if (keyword2 && keyword2.trim()) {
73595
- await loadOptions({ pageSize: 30, keyword: keyword2 });
73661
+ let option2 = !value ? void 0 : selectedOptionRow === row && selectedOption?.value === value ? selectedOption : [..._initialOptions.value, ...state.data].find((item) => item.value === value);
73662
+ if (value && !option2) {
73663
+ option2 = (await getOptionByIds([value], loader)).find((item) => item.value === value);
73596
73664
  }
73597
- if (!keyword2) {
73598
- await checkInitialValue();
73665
+ await nextTick();
73666
+ if (disposed || seq !== lookupSeq || props2.value !== value || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader || row[dataField] !== value)
73667
+ return;
73668
+ if (option2) {
73669
+ selectedOption = option2;
73670
+ selectedOptionRow = row;
73671
+ syncSelectedLabel(option2, "restore");
73672
+ }
73673
+ if (requestId === optionsRequestId) {
73674
+ state.data = option2 ? [option2, ..._initialOptions.value.filter((item) => item.value !== value)] : _initialOptions.value;
73675
+ state.hasSearched = false;
73676
+ handleSyncVirtualListWidth();
73599
73677
  }
73600
73678
  } catch (error) {
73601
- console.error("请求失败:", error);
73679
+ console.error("[TraceSelect] Failed to load selected option:", error);
73602
73680
  } finally {
73603
- state.fetching = false;
73604
- }
73605
- }, 300);
73606
- async function checkInitialValue() {
73607
- if (currentValue.value && !_initialOptions.value.some((o) => o.value === currentValue.value)) {
73608
- const remoteOption = await getOptionByIds([currentValue.value]);
73609
- state.data = [...remoteOption, ..._initialOptions.value];
73610
- } else {
73611
- state.data = _initialOptions.value;
73681
+ if (!disposed && requestId === optionsRequestId) state.fetching = false;
73612
73682
  }
73613
- state.hasSearched = false;
73614
- handleSyncVirtualListWidth();
73615
73683
  }
73616
- async function getOptionByIds(ids) {
73617
- if (customLoaderRef.value) {
73618
- const res = await customLoaderRef.value({
73684
+ async function getOptionByIds(ids, loader = customLoaderRef.value) {
73685
+ if (loader) {
73686
+ const res = await loader({
73619
73687
  mode: "byIds",
73620
73688
  modelKey,
73621
73689
  fieldKey: field,
@@ -73647,16 +73715,53 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73647
73715
  }) ?? [];
73648
73716
  }
73649
73717
  async function handleChange(v, info) {
73718
+ if (disposed) return false;
73719
+ const value = v == null || v === "" ? null : v;
73720
+ const matchesValue = (actual) => value == null ? actual == null || actual === "" : actual === value;
73721
+ const option2 = info?.value === value ? info : state.data.find((item) => item.value === value);
73722
+ const row = props2.formData;
73723
+ const store = formStateStore.value;
73724
+ if (!store || option2?.disabled) return false;
73725
+ let seq = 0;
73726
+ let accepted = false;
73727
+ store.transaction("user", () => {
73728
+ emit2("update:value", value);
73729
+ accepted = formStateStore.value === store && props2.formData === row && matchesValue(row[dataField]);
73730
+ if (!accepted) return;
73731
+ seq = ++selectionSeq;
73732
+ lookupSeq++;
73733
+ optionsRequestId++;
73734
+ debounceSearch.cancel();
73735
+ state.fetching = false;
73736
+ selectedOptionRow = row;
73737
+ selectedOption = option2;
73738
+ if (value == null) {
73739
+ if (row[labelKey] != null) setRowField(labelKey, null, "user");
73740
+ } else {
73741
+ syncSelectedLabel(option2 ?? { value }, "user");
73742
+ if (option2 && !state.data.some((item) => item.value === value)) {
73743
+ state.data = [option2, ...state.data];
73744
+ }
73745
+ }
73746
+ });
73747
+ if (!accepted) return false;
73748
+ await nextTick();
73749
+ if (disposed || seq !== selectionSeq || formStateStore.value !== store || props2.formData !== row || !matchesValue(props2.value) || !matchesValue(row[dataField]))
73750
+ return false;
73650
73751
  if (autofillRules && autofillRules.length !== 0) {
73651
- await nextTick();
73652
- applyAutofillRules(autofillRules, info?._item, props2.formData, { enabled: enableAutofill });
73752
+ applyAutofillRules(autofillRules, option2?._item, row, { enabled: !!enableAutofill });
73653
73753
  }
73654
- emit2("change", v, info);
73754
+ emit2("change", value, option2);
73655
73755
  handleCloseDropdown();
73756
+ return true;
73656
73757
  }
73657
73758
  const { handleSearchScan } = useRuleProps({
73658
73759
  props: props2,
73659
73760
  selectByCode: async (code2, signal) => {
73761
+ const seq = selectionSeq;
73762
+ const row = props2.formData;
73763
+ const store = formStateStore.value;
73764
+ const value = row[dataField];
73660
73765
  const res = await renderUtils.requestRefOptions({
73661
73766
  modelKey,
73662
73767
  fieldKey: field,
@@ -73671,20 +73776,20 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73671
73776
  },
73672
73777
  pageSize: 30
73673
73778
  });
73674
- if (signal.aborted) return false;
73779
+ if (signal.aborted || disposed || seq !== selectionSeq || props2.formData !== row || formStateStore.value !== store || row[dataField] !== value)
73780
+ return false;
73675
73781
  if (!res.options?.[0]) {
73676
73782
  message.error($t2("sys.onlineForm.noCorrespondingDataFound"));
73677
73783
  return false;
73678
73784
  }
73679
73785
  const info = res.options[0];
73680
- currentValue.value = info.value;
73681
- await handleChange(info.value, info);
73682
- return true;
73786
+ return handleChange(info.value, info);
73683
73787
  }
73684
73788
  });
73685
73789
  onMounted(async () => {
73686
73790
  if (customLoaderRef.value) {
73687
- autoQueryOptions.value = await loadOptions({ pageSize: 999 });
73791
+ const options = await loadOptions({ pageSize: 999 });
73792
+ if (options) autoQueryOptions.value = options;
73688
73793
  }
73689
73794
  });
73690
73795
  __expose({
@@ -73716,9 +73821,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73716
73821
  },
73717
73822
  select: async (option2) => {
73718
73823
  if (option2.disabled) return;
73719
- state.data = [option2];
73720
- currentValue.value = option2.value;
73721
- await handleChange(option2.value, option2);
73824
+ return handleChange(option2.value, option2);
73722
73825
  },
73723
73826
  scan: handleSearchScan,
73724
73827
  active: () => dropdownVisible.value && !showDisabled.value
@@ -73731,7 +73834,6 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73731
73834
  class: ["cell-trace-select", unref(showRequired) && "is-show-required", __props.realFieldId],
73732
73835
  dropdownClassName: "gct-common-select-dropdown vxe-table--ignore-clear",
73733
73836
  value: currentValue.value,
73734
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => currentValue.value = $event),
73735
73837
  options: unref(hideOptionsTitle)(state.data),
73736
73838
  disabled: unref(showDisabled),
73737
73839
  open: unref(dropdownVisible)
@@ -73766,7 +73868,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
73766
73868
  placeholder: unref($t2)("sys.search"),
73767
73869
  onChange: _cache[1] || (_cache[1] = (e) => handleSearch(e.target.value))
73768
73870
  }, {
73769
- prefix: withCtx(() => [..._cache[4] || (_cache[4] = [
73871
+ prefix: withCtx(() => [..._cache[3] || (_cache[3] = [
73770
73872
  createElementVNode("i", { class: "icon iconfont icon-sousuo1" }, null, -1)
73771
73873
  ])]),
73772
73874
  _: 1
@@ -73823,15 +73925,19 @@ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
73823
73925
  setup(__props, { expose: __expose, emit: __emit }) {
73824
73926
  const props2 = __props;
73825
73927
  const emit2 = __emit;
73928
+ const { setRowField } = useRuntimeRowState(() => props2.formData);
73929
+ const { formStateStore } = useRuntimeInstanceServices();
73826
73930
  const {
73827
73931
  field,
73932
+ targetFieldId,
73828
73933
  modelKey,
73829
73934
  refModelKey,
73830
73935
  placeholder,
73831
73936
  showRequired,
73832
73937
  showDisabled,
73833
73938
  options,
73834
- newQueryDataRef
73939
+ newQueryDataRef,
73940
+ customLoaderRef
73835
73941
  } = useWidgetStaticAttrs(props2.widget);
73836
73942
  const { applyAutofillRules } = useAutofill();
73837
73943
  const open = ref(false);
@@ -73845,30 +73951,64 @@ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
73845
73951
  popoverOverlayStyle,
73846
73952
  calculateWrapperHeight
73847
73953
  } = useWrapperHeight(selectRef);
73954
+ const dataField = targetFieldId || field;
73955
+ const labelKey = `${field}_lb_`;
73956
+ const { syncSelectedLabel } = useReferenceLabel(() => props2.formData, field, dataField);
73957
+ const selectedOptionRow = shallowRef();
73848
73958
  const selectedOption = ref();
73849
73959
  const selectedOptions = computed(() => {
73850
- const selected = selectedOption.value?.value === props2.value ? selectedOption.value : options?.find((item) => item.value === props2.value);
73960
+ const selected = selectedOptionRow.value === props2.formData && selectedOption.value?.value === props2.value ? selectedOption.value : options?.find((item) => item.value === props2.value);
73851
73961
  return selected ? [{ value: selected.value, label: selected.label }] : [];
73852
73962
  });
73853
73963
  let lookupSeq = 0;
73964
+ let selectionSeq = 0;
73965
+ let disposed = false;
73966
+ onScopeDispose(() => {
73967
+ disposed = true;
73968
+ lookupSeq++;
73969
+ selectionSeq++;
73970
+ });
73854
73971
  watch(
73855
- () => props2.value,
73856
- async (value) => {
73972
+ [() => selectedOptions.value[0], () => props2.formData, () => props2.formData[labelKey]],
73973
+ ([option2]) => syncSelectedLabel(option2, "restore"),
73974
+ { immediate: true }
73975
+ );
73976
+ watch(
73977
+ [() => props2.value, () => props2.formData],
73978
+ async ([value, row]) => {
73857
73979
  const seq = ++lookupSeq;
73980
+ const store = formStateStore.value;
73858
73981
  if (!value || selectedOptions.value.length) return;
73859
73982
  try {
73860
- const res = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
73861
- { modelCategory: EntityModelCategoryEnum.ENTITY },
73862
- { fieldKey: field, modelKey, refModelKey, ids: [value], includeDeleted: true }
73863
- );
73864
- if (seq !== lookupSeq) return;
73865
- const record = res?.data?.[0];
73866
- if (record) {
73867
- selectedOption.value = {
73868
- value: record.id_ || record.id,
73869
- label: record.__LABEL__,
73870
- _item: record
73871
- };
73983
+ let option2;
73984
+ const loader = customLoaderRef.value;
73985
+ if (loader) {
73986
+ const res = await loader({
73987
+ mode: "byIds",
73988
+ modelKey,
73989
+ fieldKey: field,
73990
+ refModelKey,
73991
+ ids: [value],
73992
+ isRdo: false,
73993
+ queryData: newQueryDataRef.value
73994
+ });
73995
+ option2 = normalizeRefLoaderResult(res, { isRdo: false }).options.find(
73996
+ (item) => item.value === value
73997
+ );
73998
+ } else {
73999
+ const res = await api.apaas.modelComprehensive.postQueryRefDataByIdsModelCategory(
74000
+ { modelCategory: EntityModelCategoryEnum.ENTITY },
74001
+ { fieldKey: field, modelKey, refModelKey, ids: [value], includeDeleted: true }
74002
+ );
74003
+ const record = res?.data?.find((item) => (item.id_ || item.id) === value);
74004
+ if (record) option2 = { value, label: record.__LABEL__, _item: record };
74005
+ }
74006
+ await nextTick();
74007
+ if (disposed || seq !== lookupSeq || props2.value !== value || props2.formData !== row || formStateStore.value !== store || customLoaderRef.value !== loader || row[dataField] !== value)
74008
+ return;
74009
+ if (option2) {
74010
+ selectedOptionRow.value = row;
74011
+ selectedOption.value = option2;
73872
74012
  }
73873
74013
  } catch (error) {
73874
74014
  console.error("[TraceRefTableSelect] Failed to load selected option:", error);
@@ -73882,21 +74022,51 @@ const _sfc_main$1D = /* @__PURE__ */ defineComponent({
73882
74022
  }
73883
74023
  async function onSelect(row) {
73884
74024
  const option2 = row?._option;
73885
- if (!option2) return;
73886
- selectedOption.value = option2;
73887
- emit2("update:value", option2.value);
74025
+ if (!option2 || option2.value == null || option2.value === "" || disposed) return;
74026
+ let seq = 0;
74027
+ const targetRow = props2.formData;
74028
+ const store = formStateStore.value;
74029
+ if (!store) return;
74030
+ let accepted = false;
74031
+ store.transaction("user", () => {
74032
+ emit2("update:value", option2.value);
74033
+ accepted = formStateStore.value === store && props2.formData === targetRow && targetRow[dataField] === option2.value;
74034
+ if (!accepted) return;
74035
+ seq = ++selectionSeq;
74036
+ lookupSeq++;
74037
+ selectedOptionRow.value = targetRow;
74038
+ selectedOption.value = option2;
74039
+ syncSelectedLabel(option2, "user");
74040
+ });
74041
+ if (!accepted) return;
74042
+ await nextTick();
74043
+ if (disposed || seq !== selectionSeq || formStateStore.value !== store || props2.formData !== targetRow || props2.value !== option2.value || targetRow[dataField] !== option2.value)
74044
+ return;
73888
74045
  if (props2.widget.props.autofillRules?.length) {
73889
- await nextTick();
73890
74046
  applyAutofillRules(props2.widget.props.autofillRules, option2._item, props2.formData, {
73891
- enabled: props2.widget.props.enableAutofill
74047
+ enabled: !!props2.widget.props.enableAutofill
73892
74048
  });
73893
74049
  }
73894
74050
  emit2("change", option2.value, option2);
73895
74051
  open.value = false;
73896
74052
  }
73897
74053
  function onClear() {
73898
- selectedOption.value = void 0;
73899
- emit2("update:value", null);
74054
+ if (disposed) return;
74055
+ const targetRow = props2.formData;
74056
+ const store = formStateStore.value;
74057
+ if (!store) return;
74058
+ let accepted = false;
74059
+ store.transaction("user", () => {
74060
+ emit2("update:value", null);
74061
+ accepted = formStateStore.value === store && props2.formData === targetRow && (targetRow[dataField] == null || targetRow[dataField] === "");
74062
+ if (!accepted) return;
74063
+ selectionSeq++;
74064
+ lookupSeq++;
74065
+ selectedOptionRow.value = void 0;
74066
+ selectedOption.value = void 0;
74067
+ if (targetRow[labelKey] != null) setRowField(labelKey, null, "user");
74068
+ });
74069
+ if (!accepted) return;
73900
74070
  emit2("change", null);
73901
74071
  open.value = false;
73902
74072
  }
@@ -80990,6 +81160,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
80990
81160
  setup(__props) {
80991
81161
  const props2 = __props;
80992
81162
  const { fields } = reactive(props2.widget.props);
81163
+ const preserveOptionWidth = (fieldWidget) => fieldWidget.component === ComponentTypeEnum.EnumSelect && "bindCompStyleType" in fieldWidget.props && (fieldWidget.props.bindCompStyleType === BindCmpStyleEnum.CMP_RADIO || fieldWidget.props.bindCompStyleType === BindCmpStyleEnum.CMP_CHECKBOX) && !isCellAutoLineBreak(fieldWidget.style);
80993
81164
  const wrapFields = computed(() => isCellAutoLineBreak(props2.widget.style));
80994
81165
  const layoutStyle = computed(() => {
80995
81166
  const { textAlign, verticalAlign } = props2.widget.style ?? {};
@@ -81015,6 +81186,9 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
81015
81186
  style: normalizeStyle({ width: `${unref(normalizeSpacerWidth)(fieldWidget.props.spacerWidth)}px` })
81016
81187
  }, null, 4)) : (openBlock(), createBlock(_sfc_main$19, {
81017
81188
  key: 1,
81189
+ class: normalizeClass({
81190
+ "combine-fields-item--unwrapped-options": preserveOptionWidth(fieldWidget)
81191
+ }),
81018
81192
  widget: fieldWidget,
81019
81193
  formData: __props.formData,
81020
81194
  subtableFieldId: __props.subtableFieldId,
@@ -81022,14 +81196,14 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
81022
81196
  realColIndex: __props.realColIndex,
81023
81197
  pageRowIndex: __props.pageRowIndex,
81024
81198
  childSubTableDataIndex: __props.childSubTableDataIndex
81025
- }, null, 8, ["widget", "formData", "subtableFieldId", "realRowIndex", "realColIndex", "pageRowIndex", "childSubTableDataIndex"]))
81199
+ }, null, 8, ["class", "widget", "formData", "subtableFieldId", "realRowIndex", "realColIndex", "pageRowIndex", "childSubTableDataIndex"]))
81026
81200
  ], 64);
81027
81201
  }), 128))
81028
81202
  ], 6);
81029
81203
  };
81030
81204
  }
81031
81205
  });
81032
- const combineFieldsRender = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["__scopeId", "data-v-12d5c6e1"]]);
81206
+ const combineFieldsRender = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["__scopeId", "data-v-a4017dec"]]);
81033
81207
  const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81034
81208
  __proto__: null,
81035
81209
  default: combineFieldsRender
@@ -91233,8 +91407,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
91233
91407
  printTask = (async () => {
91234
91408
  if (document.activeElement instanceof HTMLElement) document.activeElement.blur();
91235
91409
  await nextTick();
91236
- const { printRuntimeInstance } = await import("./print-runtime-instance-CvgieNN9.js");
91237
- const { default: renderer } = await import("./print-snapshot-renderer-ex82O_4p.js");
91410
+ const { printRuntimeInstance } = await import("./print-runtime-instance-D-zZ-Pnj.js");
91411
+ const { default: renderer } = await import("./print-snapshot-renderer-CAu5xiAs.js");
91238
91412
  if (abort.signal.aborted) throw new Error("打印已取消");
91239
91413
  printRenderer.value = markRaw(renderer);
91240
91414
  await printRuntimeInstance(