@gct-paas/word 0.2.29-beta.0 → 0.2.30-beta.0

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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @gct-paas/word v0.2.29-beta.0 */
1
+ /*! @gct-paas/word v0.2.30-beta.0 */
2
2
  import { Fragment, Suspense, Teleport, Transition, TransitionGroup, cloneVNode, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, getCurrentInstance, getCurrentScope, guardReactiveProps, h, inject, isRef, isVNode, markRaw, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, readonly, ref, render, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowReactive, shallowRef, toDisplayString, toHandlers, toRaw, toRef, toValue, unref, useAttrs, useCssVars, useModel, useSlots, vModelRadio, vModelSelect, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
3
  import fa, { PopperWrapper } from "floating-vue";
4
4
  import VueKonva from "vue-konva";
@@ -9486,7 +9486,7 @@ var init_base$2 = __esmMin((() => {
9486
9486
  //#region ../../node_modules/.pnpm/floating-vue@5.2.2_vue@3.5.24_typescript@5.9.3_/node_modules/floating-vue/dist/style.css
9487
9487
  var init_style = __esmMin((() => {}));
9488
9488
  //#endregion
9489
- //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.0_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_39aa7150ab8d68a2beeeb294d75bf9b7/node_modules/@gct-paas/form-base/dist/_commonjsHelpers-DaMA6jEr.js
9489
+ //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.1_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_22b44e53706d5f9862124f6441dde5d2/node_modules/@gct-paas/form-base/dist/_commonjsHelpers-DaMA6jEr.js
9490
9490
  function l$1(e) {
9491
9491
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
9492
9492
  }
@@ -9495,7 +9495,7 @@ var init__commonjsHelpers_DaMA6jEr = __esmMin((() => {
9495
9495
  o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
9496
9496
  }));
9497
9497
  //#endregion
9498
- //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.0_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_39aa7150ab8d68a2beeeb294d75bf9b7/node_modules/@gct-paas/form-base/dist/mysql-xjL-BUMC.js
9498
+ //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.1_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_22b44e53706d5f9862124f6441dde5d2/node_modules/@gct-paas/form-base/dist/mysql-xjL-BUMC.js
9499
9499
  var mysql_xjL_BUMC_exports = /* @__PURE__ */ __exportAll({ m: () => Iy });
9500
9500
  function Ey(Cr, Qt) {
9501
9501
  for (var ue = 0; ue < Qt.length; ue++) {
@@ -18612,7 +18612,7 @@ var init_mysql_xjL_BUMC = __esmMin((() => {
18612
18612
  Iy = /* @__PURE__ */ Ey({ __proto__: null }, [gy()]);
18613
18613
  }));
18614
18614
  //#endregion
18615
- //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.0_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_39aa7150ab8d68a2beeeb294d75bf9b7/node_modules/@gct-paas/form-base/dist/script-parser-DwzD37Rn.js
18615
+ //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.1_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_22b44e53706d5f9862124f6441dde5d2/node_modules/@gct-paas/form-base/dist/script-parser-DwzD37Rn.js
18616
18616
  var script_parser_DwzD37Rn_exports = /* @__PURE__ */ __exportAll({
18617
18617
  parseScriptReturnFields: () => Cs,
18618
18618
  validateScriptSyntax: () => ws
@@ -23612,7 +23612,7 @@ var init_script_parser_DwzD37Rn = __esmMin((() => {
23612
23612
  ]);
23613
23613
  }));
23614
23614
  //#endregion
23615
- //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.0_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_39aa7150ab8d68a2beeeb294d75bf9b7/node_modules/@gct-paas/form-base/dist/index.es.js
23615
+ //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.1_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_22b44e53706d5f9862124f6441dde5d2/node_modules/@gct-paas/form-base/dist/index.es.js
23616
23616
  function jo() {
23617
23617
  if (typeof globalThis < "u") {
23618
23618
  const e = globalThis._api;
@@ -23790,46 +23790,46 @@ function Pr(e) {
23790
23790
  var _u$children;
23791
23791
  u.rawValue && a.value.set(String(u.rawValue), u), (_u$children = u.children) === null || _u$children === void 0 || _u$children.forEach(n);
23792
23792
  }
23793
- function l(u, g, k) {
23794
- const v = k.__LABEL__ || k.version_, M = `${g}:${k.id_}`, q = {
23795
- key: M,
23793
+ function l(u, g, w) {
23794
+ const v = w.__LABEL__ || w.version_, R = `${g}:${w.id_}`, q = {
23795
+ key: R,
23796
23796
  title: v,
23797
23797
  displayLabel: `${u}:${v}`,
23798
- rawValue: M,
23799
- _info: k,
23800
- isDefault: !!k.default_
23798
+ rawValue: R,
23799
+ _info: w,
23800
+ isDefault: !!w.default_
23801
23801
  };
23802
23802
  return n(q), q;
23803
23803
  }
23804
23804
  function s(u = []) {
23805
23805
  return u.map((g) => {
23806
23806
  var _g$__CHILDREN__;
23807
- const k = g.__LABEL__ || g.name_, v = (_g$__CHILDREN__ = g.__CHILDREN__) === null || _g$__CHILDREN__ === void 0 ? void 0 : _g$__CHILDREN__.find((q) => q.default_), M = {
23807
+ const w = g.__LABEL__ || g.name_, v = (_g$__CHILDREN__ = g.__CHILDREN__) === null || _g$__CHILDREN__ === void 0 ? void 0 : _g$__CHILDREN__.find((q) => q.default_), R = {
23808
23808
  key: g.id_,
23809
- title: k,
23810
- displayLabel: k,
23809
+ title: w,
23810
+ displayLabel: w,
23811
23811
  rawValue: g.id_,
23812
23812
  _info: v,
23813
23813
  showDefaultTag: !!v,
23814
23814
  disabled: !0,
23815
- children: (g.__CHILDREN__ || []).map((q) => l(k, g.id_, q))
23815
+ children: (g.__CHILDREN__ || []).map((q) => l(w, g.id_, q))
23816
23816
  };
23817
- return n(M), M;
23817
+ return n(R), R;
23818
23818
  });
23819
23819
  }
23820
23820
  async function f(u = {}) {
23821
23821
  var _u$keyword, _e$getQueryData;
23822
- const g = u.pageNo ?? 1, k = u.pageSize ?? 30, v = ((_u$keyword = u.keyword) === null || _u$keyword === void 0 ? void 0 : _u$keyword.trim()) || void 0, M = (_e$getQueryData = e.getQueryData) === null || _e$getQueryData === void 0 ? void 0 : _e$getQueryData.call(e), q = await ka.handleRequest(`rdo-tree-list:${e.modelKey}`, {
23822
+ const g = u.pageNo ?? 1, w = u.pageSize ?? 30, v = ((_u$keyword = u.keyword) === null || _u$keyword === void 0 ? void 0 : _u$keyword.trim()) || void 0, R = (_e$getQueryData = e.getQueryData) === null || _e$getQueryData === void 0 ? void 0 : _e$getQueryData.call(e), q = await ka.handleRequest(`rdo-tree-list:${e.modelKey}`, {
23823
23823
  pageNo: g,
23824
- pageSize: k,
23824
+ pageSize: w,
23825
23825
  modelCategory: o,
23826
23826
  keyword: v,
23827
- queryData: M
23827
+ queryData: R
23828
23828
  }, () => Er(e.modelKey, o, {
23829
23829
  pageNo: g,
23830
- pageSize: k,
23830
+ pageSize: w,
23831
23831
  keyword: v,
23832
- queryData: M
23832
+ queryData: R
23833
23833
  }), 3e5);
23834
23834
  return {
23835
23835
  complete: (q === null || q === void 0 ? void 0 : q.totalPage) ? q.totalPage <= g : !0,
@@ -23845,30 +23845,30 @@ function Pr(e) {
23845
23845
  includeDeleted: 1
23846
23846
  }), 3e5)) === null || _await$ka$handleReque === void 0 || (_await$ka$handleReque = _await$ka$handleReque.data) === null || _await$ka$handleReque === void 0 ? void 0 : _await$ka$handleReque[0];
23847
23847
  if (!v) return null;
23848
- const M = v.__LABEL__ || v.name_;
23848
+ const R = v.__LABEL__ || v.name_;
23849
23849
  let q = [];
23850
23850
  try {
23851
23851
  var _await$xa;
23852
- q = (((_await$xa = await xa("rdoListVersionById", e.modelKey, o, { foreignFields: [] }, { id: g })) === null || _await$xa === void 0 ? void 0 : _await$xa.data) || []).map((A) => l(M, g, A));
23852
+ q = (((_await$xa = await xa("rdoListVersionById", e.modelKey, o, { foreignFields: [] }, { id: g })) === null || _await$xa === void 0 ? void 0 : _await$xa.data) || []).map((A) => l(R, g, A));
23853
23853
  } catch {
23854
23854
  q = [];
23855
23855
  }
23856
- const B = q.find((L) => L.isDefault), O = {
23856
+ const B = q.find((L) => L.isDefault), T = {
23857
23857
  key: g,
23858
- title: M,
23859
- displayLabel: M,
23858
+ title: R,
23859
+ displayLabel: R,
23860
23860
  rawValue: g,
23861
23861
  _info: B === null || B === void 0 ? void 0 : B._info,
23862
23862
  showDefaultTag: !!B,
23863
23863
  disabled: !0,
23864
23864
  children: q
23865
23865
  };
23866
- return n(O), O;
23866
+ return n(T), T;
23867
23867
  }
23868
23868
  async function r(u = {}) {
23869
23869
  var _t$value$at;
23870
- const g = u.pageNo ?? 1, { complete: k, nodes: v } = await f(u);
23871
- g > 1 ? ((_t$value$at = t.value.at(-1)) !== null && _t$value$at !== void 0 && _t$value$at.isLoadMore && t.value.pop(), t.value.push(...v)) : t.value = v, k || t.value.push({
23870
+ const g = u.pageNo ?? 1, { complete: w, nodes: v } = await f(u);
23871
+ g > 1 ? ((_t$value$at = t.value.at(-1)) !== null && _t$value$at !== void 0 && _t$value$at.isLoadMore && t.value.pop(), t.value.push(...v)) : t.value = v, w || t.value.push({
23872
23872
  key: `__load_more__:${g}`,
23873
23873
  title: "加载更多...",
23874
23874
  isLoadMore: !0,
@@ -23878,7 +23878,7 @@ function Pr(e) {
23878
23878
  async function h(u) {
23879
23879
  if (!u) return;
23880
23880
  const [g] = u.split(":");
23881
- if (a.value.has(u) || t.value.some((M) => M.key === g)) return;
23881
+ if (a.value.has(u) || t.value.some((R) => R.key === g)) return;
23882
23882
  const v = await i(u);
23883
23883
  v && t.value.unshift(v);
23884
23884
  }
@@ -23886,40 +23886,40 @@ function Pr(e) {
23886
23886
  return a.value.get(u) || t.value.find((g) => String(g.key) === u);
23887
23887
  }
23888
23888
  function d(u) {
23889
- var _k$children;
23890
- const [g] = u.split(":"), k = C(g || "");
23891
- return a.value.get(u) || (k === null || k === void 0 || (_k$children = k.children) === null || _k$children === void 0 ? void 0 : _k$children.find((v) => String(v.rawValue) === u));
23889
+ var _w$children;
23890
+ const [g] = u.split(":"), w = C(g || "");
23891
+ return a.value.get(u) || (w === null || w === void 0 || (_w$children = w.children) === null || _w$children === void 0 ? void 0 : _w$children.find((v) => String(v.rawValue) === u));
23892
23892
  }
23893
23893
  function m(u, g = !1) {
23894
23894
  if (!u) return { text: "" };
23895
- const [k, v] = u.split(":");
23896
- if (k && v) {
23895
+ const [w, v] = u.split(":");
23896
+ if (w && v) {
23897
23897
  const q = Ja(u, d, C);
23898
23898
  if (q) return q;
23899
23899
  }
23900
- if (k && !v && !g) {
23901
- const q = C(k);
23900
+ if (w && !v && !g) {
23901
+ const q = C(w);
23902
23902
  if (q) return {
23903
23903
  text: q.title,
23904
23904
  showDefaultTag: !0
23905
23905
  };
23906
23906
  }
23907
- const M = a.value.get(u);
23908
- return (M === null || M === void 0 ? void 0 : M.displayLabel) ? {
23909
- text: M.displayLabel,
23910
- showDefaultTag: !g && !!M.showDefaultTag
23907
+ const R = a.value.get(u);
23908
+ return (R === null || R === void 0 ? void 0 : R.displayLabel) ? {
23909
+ text: R.displayLabel,
23910
+ showDefaultTag: !g && !!R.showDefaultTag
23911
23911
  } : {
23912
23912
  text: u,
23913
23913
  showDefaultTag: !1
23914
23914
  };
23915
23915
  }
23916
- async function S(u, g = 9999, k = !1) {
23916
+ async function S(u, g = 9999, w = !1) {
23917
23917
  if (u) return t.value.length || await r({
23918
23918
  pageNo: 1,
23919
23919
  pageSize: g
23920
- }), await h(u), m(u, k);
23920
+ }), await h(u), m(u, w);
23921
23921
  }
23922
- function w() {
23922
+ function k() {
23923
23923
  t.value = [], a.value = /* @__PURE__ */ new Map();
23924
23924
  }
23925
23925
  return {
@@ -23930,7 +23930,7 @@ function Pr(e) {
23930
23930
  initByValue: S,
23931
23931
  findChildNode: d,
23932
23932
  findParentNode: C,
23933
- resetTreeData: w
23933
+ resetTreeData: k
23934
23934
  };
23935
23935
  }
23936
23936
  function Ne(e) {
@@ -23997,7 +23997,7 @@ function ic(e) {
23997
23997
  "float",
23998
23998
  "bigdecimal"
23999
23999
  ].includes(S) ? "number" : S === "long" ? "integer" : S
24000
- }), S === "object" && i(d.children, m), S === "array" && !m.includes("[].") && Array.isArray(d.children)) for (const w of d.children) i((_be4 = be(w)) === null || _be4 === void 0 ? void 0 : _be4.children, `${m}[]`);
24000
+ }), S === "object" && i(d.children, m), S === "array" && !m.includes("[].") && Array.isArray(d.children)) for (const k of d.children) i((_be4 = be(k)) === null || _be4 === void 0 ? void 0 : _be4.children, `${m}[]`);
24001
24001
  }
24002
24002
  }
24003
24003
  for (const r of s) i((_be5 = be(r)) === null || _be5 === void 0 ? void 0 : _be5.children);
@@ -24073,18 +24073,18 @@ function eo(e, o) {
24073
24073
  "float",
24074
24074
  "bigdecimal"
24075
24075
  ].includes(d)) {
24076
- const w = Number(S);
24077
- if (!Number.isFinite(w) || ["integer", "long"].includes(d) && !Number.isInteger(w)) throw new Error(`${m} 需要有效的${["integer", "long"].includes(d) ? "整数" : "数值"}`);
24078
- return w;
24076
+ const k = Number(S);
24077
+ if (!Number.isFinite(k) || ["integer", "long"].includes(d) && !Number.isInteger(k)) throw new Error(`${m} 需要有效的${["integer", "long"].includes(d) ? "整数" : "数值"}`);
24078
+ return k;
24079
24079
  }
24080
24080
  if (d === "boolean") {
24081
24081
  if (!["true", "false"].includes(S.trim())) throw new Error(`${m} 需要 true 或 false`);
24082
24082
  return S.trim() === "true";
24083
24083
  }
24084
24084
  if (d === "object" || d === "array") {
24085
- const w = JSON.parse(S);
24086
- if (d === "array" ? !Array.isArray(w) : !be(w)) throw new Error(`${m} 的 JSON 类型不正确`);
24087
- return w;
24085
+ const k = JSON.parse(S);
24086
+ if (d === "array" ? !Array.isArray(k) : !be(k)) throw new Error(`${m} 的 JSON 类型不正确`);
24087
+ return k;
24088
24088
  }
24089
24089
  return S;
24090
24090
  }
@@ -24095,7 +24095,7 @@ function eo(e, o) {
24095
24095
  }
24096
24096
  if (d === "object") {
24097
24097
  const S = new Set(Array.isArray(C.required) ? C.required : []);
24098
- return Object.fromEntries(Object.entries(be(C.properties) ?? {}).map(([w, u]) => [w, n(u, w, S.has(w))]).filter(([, w]) => w !== void 0));
24098
+ return Object.fromEntries(Object.entries(be(C.properties) ?? {}).map(([k, u]) => [k, n(u, k, S.has(k))]).filter(([, k]) => k !== void 0));
24099
24099
  }
24100
24100
  }
24101
24101
  const l = be(n(e.metaHeader)), s = be(n(e.metaQuery)), f = be(n(e.metaUri));
@@ -24292,12 +24292,12 @@ function Jd(e) {
24292
24292
  if (typeof h != "string" || !o.has(h)) throw new Error(`未找到数源:${String(h)}`);
24293
24293
  if (d.includes(h)) throw new Error(`数源循环依赖:${[...d, h].join(" → ")}`);
24294
24294
  if (C !== void 0 && !bt(C)) throw new Error("覆盖参数必须是对象");
24295
- const S = o.get(h), w = Xd(S, C, t, a), u = [...d, h], g = (v, M) => i(v, M, u, m);
24295
+ const S = o.get(h), k = Xd(S, C, t, a), u = [...d, h], g = (v, R) => i(v, R, u, m);
24296
24296
  if (S.type !== "script") {
24297
24297
  var _e$adapters;
24298
24298
  const v = ((_e$adapters = e.adapters) === null || _e$adapters === void 0 ? void 0 : _e$adapters[S.type]) ?? (await Promise.resolve().then(() => Tc)).defaultQueryAdapters[S.type];
24299
24299
  if (!v) throw new Error(`未接入 ${S.type} 类型的查询适配器`);
24300
- const M = await v(structuredClone(S), structuredClone(w), {
24300
+ const R = await v(structuredClone(S), structuredClone(k), {
24301
24301
  ctx: structuredClone(t),
24302
24302
  form: structuredClone(a),
24303
24303
  signal: m,
@@ -24305,35 +24305,35 @@ function Jd(e) {
24305
24305
  instanceId: e.instanceId
24306
24306
  });
24307
24307
  if (m.aborted) throw m.reason ?? new ze("cancelled", "数源执行已取消");
24308
- return Sa(S, M);
24308
+ return Sa(S, R);
24309
24309
  }
24310
- const k = (_S$config = S.config) === null || _S$config === void 0 ? void 0 : _S$config.script;
24311
- if (typeof k != "string" || !k.trim()) throw new Error(`数源 ${h} 缺少 JavaScript 脚本`);
24312
- return Sa(S, await Qd(k, t, a, g, m));
24310
+ const w = (_S$config = S.config) === null || _S$config === void 0 ? void 0 : _S$config.script;
24311
+ if (typeof w != "string" || !w.trim()) throw new Error(`数源 ${h} 缺少 JavaScript 脚本`);
24312
+ return Sa(S, await Qd(w, t, a, g, m));
24313
24313
  }
24314
24314
  async function i(h, C, d, m) {
24315
24315
  var _e$observeQuery;
24316
- const S = (_e$observeQuery = e.observeQuery) === null || _e$observeQuery === void 0 ? void 0 : _e$observeQuery.call(e, h), w = new AbortController(), u = () => m.reason instanceof ze ? m.reason : new ze("cancelled", "数源执行已取消"), g = () => w.abort(u());
24317
- let k, v;
24316
+ const S = (_e$observeQuery = e.observeQuery) === null || _e$observeQuery === void 0 ? void 0 : _e$observeQuery.call(e, h), k = new AbortController(), u = () => m.reason instanceof ze ? m.reason : new ze("cancelled", "数源执行已取消"), g = () => k.abort(u());
24317
+ let w, v;
24318
24318
  m.addEventListener("abort", g, { once: !0 });
24319
24319
  try {
24320
- var _M$config;
24321
- const M = o.get(h), q = (M === null || M === void 0 ? void 0 : M.type) === "ipaas" ? (_M$config = M.config) === null || _M$config === void 0 ? void 0 : _M$config.timeout : void 0, B = q === void 0 ? n : typeof q == "number" ? q * 1e3 : NaN;
24320
+ var _R$config;
24321
+ const R = o.get(h), q = (R === null || R === void 0 ? void 0 : R.type) === "ipaas" ? (_R$config = R.config) === null || _R$config === void 0 ? void 0 : _R$config.timeout : void 0, B = q === void 0 ? n : typeof q == "number" ? q * 1e3 : NaN;
24322
24322
  if (!Number.isFinite(B) || B <= 0 || q !== void 0 && (B < 1e3 || B > 6e5)) throw new Error(`数源 ${h} 超时时间无效`);
24323
24323
  (m.aborted || s) && g();
24324
- const O = await new Promise((L, A) => {
24325
- const T = () => A(w.signal.reason);
24326
- if (w.signal.addEventListener("abort", T, { once: !0 }), v = () => w.signal.removeEventListener("abort", T), w.signal.aborted) {
24327
- T();
24324
+ const T = await new Promise((L, A) => {
24325
+ const O = () => A(k.signal.reason);
24326
+ if (k.signal.addEventListener("abort", O, { once: !0 }), v = () => k.signal.removeEventListener("abort", O), k.signal.aborted) {
24327
+ O();
24328
24328
  return;
24329
24329
  }
24330
- k = setTimeout(() => w.abort(new ze("timeout", `数源 ${h} 执行超时(${B}ms)`)), B), f(h, C, d, w.signal).then(L, A);
24330
+ w = setTimeout(() => k.abort(new ze("timeout", `数源 ${h} 执行超时(${B}ms)`)), B), f(h, C, d, k.signal).then(L, A);
24331
24331
  });
24332
- return S === null || S === void 0 || S.success(O), O;
24333
- } catch (M) {
24334
- throw S === null || S === void 0 || S.error(M), M;
24332
+ return S === null || S === void 0 || S.success(T), T;
24333
+ } catch (R) {
24334
+ throw S === null || S === void 0 || S.error(R), R;
24335
24335
  } finally {
24336
- clearTimeout(k), v === null || v === void 0 || v(), m.removeEventListener("abort", g), w.abort(new ze("cancelled", "数源执行已结束"));
24336
+ clearTimeout(w), v === null || v === void 0 || v(), m.removeEventListener("abort", g), k.abort(new ze("cancelled", "数源执行已结束"));
24337
24337
  }
24338
24338
  }
24339
24339
  function r(h, C) {
@@ -24439,19 +24439,19 @@ function Dp(e) {
24439
24439
  const g = (l.get(u) ?? 0) + 1;
24440
24440
  return l.set(u, g), g;
24441
24441
  }
24442
- function r(u, g, k) {
24443
- s || l.get(u) !== g || (n.delete(u), o[u] = k);
24442
+ function r(u, g, w) {
24443
+ s || l.get(u) !== g || (n.delete(u), o[u] = w);
24444
24444
  }
24445
24445
  function h(u) {
24446
24446
  const g = a.get(u);
24447
24447
  if (!g) return !1;
24448
24448
  a.delete(u);
24449
- const k = [...n].map(([v, M]) => ({
24449
+ const w = [...n].map(([v, R]) => ({
24450
24450
  current: v,
24451
- owner: M,
24451
+ owner: R,
24452
24452
  version: l.get(v)
24453
24453
  }));
24454
- for (const { current: v, owner: M, version: q } of k) M !== u || l.get(v) !== q || (i(v), n.delete(v), o[v] = {
24454
+ for (const { current: v, owner: R, version: q } of w) R !== u || l.get(v) !== q || (i(v), n.delete(v), o[v] = {
24455
24455
  status: "cancelled",
24456
24456
  error: "数源查询已取消"
24457
24457
  });
@@ -24464,7 +24464,7 @@ function Dp(e) {
24464
24464
  if (s) throw new Error("数源管理器已释放");
24465
24465
  if (e.canExecute && !e.canExecute()) throw new Error("当前模式不允许数源取数");
24466
24466
  a.has(u) && h(u);
24467
- const k = i(u);
24467
+ const w = i(u);
24468
24468
  o[u] = { status: "loading" }, n.set(u, u);
24469
24469
  let v;
24470
24470
  try {
@@ -24477,22 +24477,22 @@ function Dp(e) {
24477
24477
  instanceId: (_e$getInstanceId = e.getInstanceId) === null || _e$getInstanceId === void 0 ? void 0 : _e$getInstanceId.call(e),
24478
24478
  timeoutMs: e.timeoutMs,
24479
24479
  observeQuery: (q) => {
24480
- if (typeof q != "string" || q === u || s || l.get(u) !== k) return;
24480
+ if (typeof q != "string" || q === u || s || l.get(u) !== w) return;
24481
24481
  const B = i(q);
24482
24482
  o[q] = { status: "loading" }, n.set(q, u);
24483
- const O = (L) => {
24484
- l.get(u) === k && r(q, B, L);
24483
+ const T = (L) => {
24484
+ l.get(u) === w && r(q, B, L);
24485
24485
  };
24486
24486
  return {
24487
- success: (L) => O(Ma(L)),
24488
- error: (L) => O(Ra(L))
24487
+ success: (L) => T(Ma(L)),
24488
+ error: (L) => T(Ra(L))
24489
24489
  };
24490
24490
  }
24491
24491
  }), a.set(u, v);
24492
- const M = await v.query(u, g);
24493
- return r(u, k, Ma(M)), M;
24494
- } catch (M) {
24495
- throw r(u, k, Ra(M)), M;
24492
+ const R = await v.query(u, g);
24493
+ return r(u, w, Ma(R)), R;
24494
+ } catch (R) {
24495
+ throw r(u, w, Ra(R)), R;
24496
24496
  } finally {
24497
24497
  v === null || v === void 0 || v.dispose(), v && a.get(u) === v && a.delete(u);
24498
24498
  }
@@ -24507,7 +24507,7 @@ function Dp(e) {
24507
24507
  if (u) e.initializeOnEnable && !f && m();
24508
24508
  else for (const g of [...a.keys()]) h(g);
24509
24509
  }, { flush: "sync" });
24510
- async function w(u) {
24510
+ async function k(u) {
24511
24511
  var _e$onManualLoad;
24512
24512
  const g = await d(u);
24513
24513
  return s || (_e$onManualLoad = e.onManualLoad) === null || _e$onManualLoad === void 0 || _e$onManualLoad.call(e, u), g;
@@ -24520,8 +24520,8 @@ function Dp(e) {
24520
24520
  var _e$canExecute2;
24521
24521
  return !s && (((_e$canExecute2 = e.canExecute) === null || _e$canExecute2 === void 0 ? void 0 : _e$canExecute2.call(e)) ?? !0);
24522
24522
  },
24523
- reload: w,
24524
- reloadAll: () => Promise.allSettled(e.sources.map((u) => w(u.key))),
24523
+ reload: k,
24524
+ reloadAll: () => Promise.allSettled(e.sources.map((u) => k(u.key))),
24525
24525
  states: t,
24526
24526
  query: d,
24527
24527
  cancel: C,
@@ -24533,8 +24533,8 @@ function Dp(e) {
24533
24533
  initialize: m,
24534
24534
  queryOnValueChange(u) {
24535
24535
  return s ? Promise.allSettled([...new Set(u)].map(() => Promise.reject(/* @__PURE__ */ new Error("数源管理器已释放")))) : e.canExecute && !e.canExecute() ? Promise.allSettled([...new Set(u)].map(() => Promise.reject(/* @__PURE__ */ new Error("当前模式不允许数源取数")))) : Promise.allSettled([...new Set(u)].map((g) => {
24536
- const k = e.sources.find((v) => v.key === g);
24537
- if (!k || !po(k)) {
24536
+ const w = e.sources.find((v) => v.key === g);
24537
+ if (!w || !po(w)) {
24538
24538
  C(g), i(g);
24539
24539
  const v = `数源 ${g} 不存在或取数时机不支持值变化`;
24540
24540
  return o[g] = {
@@ -24661,9 +24661,9 @@ function Hp(e) {
24661
24661
  error: S.error || `数源 ${m} 查询失败`
24662
24662
  };
24663
24663
  if (S.status !== "success") return { ready: !1 };
24664
- const w = e.manager.getResult(m);
24665
- if (w === void 0) return { ready: !1 };
24666
- const u = Aa(w, d.source.fieldKey);
24664
+ const k = e.manager.getResult(m);
24665
+ if (k === void 0) return { ready: !1 };
24666
+ const u = Aa(k, d.source.fieldKey);
24667
24667
  return u === void 0 ? {
24668
24668
  ready: !1,
24669
24669
  error: `数源 ${m} 返回结果缺少字段:${d.source.fieldKey}`
@@ -24677,10 +24677,10 @@ function Hp(e) {
24677
24677
  error: m instanceof Error ? m.message : String(m)
24678
24678
  };
24679
24679
  }
24680
- }, ({ ready: m, value: S, error: w }) => {
24680
+ }, ({ ready: m, value: S, error: k }) => {
24681
24681
  if (!(l || d.trigger === "formInit" && a.has(d))) {
24682
- if (w) {
24683
- o[d.id] = w;
24682
+ if (k) {
24683
+ o[d.id] = k;
24684
24684
  return;
24685
24685
  }
24686
24686
  if (!(!m || S === void 0) && e.canWrite(d.targetFieldKey)) {
@@ -24724,8 +24724,8 @@ function Hp(e) {
24724
24724
  if (!(l || ((_e$manager$states$d = e.manager.states[d]) === null || _e$manager$states$d === void 0 ? void 0 : _e$manager$states$d.status) !== "success")) {
24725
24725
  for (const m of e.fills) {
24726
24726
  if (m.source.type !== "dataSource" || m.source.dataSourceKey !== d) continue;
24727
- const S = Aa(e.manager.getResult(d), m.source.fieldKey), w = e.getFormField ? e.getFormField(m.targetFieldKey) : get(e.getForm(), m.targetFieldKey);
24728
- S === void 0 || isEqual(w, S) || (t.delete(m), a.delete(m));
24727
+ const S = Aa(e.manager.getResult(d), m.source.fieldKey), k = e.getFormField ? e.getFormField(m.targetFieldKey) : get(e.getForm(), m.targetFieldKey);
24728
+ S === void 0 || isEqual(k, S) || (t.delete(m), a.delete(m));
24729
24729
  }
24730
24730
  r();
24731
24731
  }
@@ -25223,14 +25223,14 @@ var init_index_es = __esmMin((() => {
25223
25223
  l.fillStyle = "#ffffff", l.fillRect(0, 0, t, a);
25224
25224
  let s = Math.floor(a / 3);
25225
25225
  l.font = `${s}px Arial`;
25226
- const f = (m, S, w) => {
25226
+ const f = (m, S, k) => {
25227
25227
  const u = m.split(""), g = [];
25228
- let k = "";
25228
+ let w = "";
25229
25229
  for (const v of u) {
25230
- const M = k + v;
25231
- w.measureText(M).width > S && k ? (g.push(k), k = v) : k = M;
25230
+ const R = w + v;
25231
+ k.measureText(R).width > S && w ? (g.push(w), w = v) : w = R;
25232
25232
  }
25233
- return k && g.push(k), g;
25233
+ return w && g.push(w), g;
25234
25234
  }, i = t * .9;
25235
25235
  let r = f(o, i, l), h = s * 1.2;
25236
25236
  for (; r.length * h > a && s > 10;) s--, h = s * 1.2, l.font = `${s}px Arial`, r = f(o, i, l);
@@ -25407,8 +25407,8 @@ var init_index_es = __esmMin((() => {
25407
25407
  d.ctrlKey || d.button === 2 || ((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 || _window$getSelection.removeAllRanges(), r(d), l.value[n.value.axis] = d.currentTarget[n.value.offset] - (d[n.value.client] - d.currentTarget.getBoundingClientRect()[n.value.direction]));
25408
25408
  }, i = (d) => {
25409
25409
  var _o$vnode$el;
25410
- const w = (Math.abs(d.target.getBoundingClientRect()[n.value.direction] - d[n.value.client]) - t.value[n.value.offset] / 2) * 100 / (o === null || o === void 0 || (_o$vnode$el = o.vnode.el) === null || _o$vnode$el === void 0 ? void 0 : _o$vnode$el[n.value.offset]);
25411
- a.value[n.value.scroll] = w * a.value[n.value.scrollSize] / 100;
25410
+ const k = (Math.abs(d.target.getBoundingClientRect()[n.value.direction] - d[n.value.client]) - t.value[n.value.offset] / 2) * 100 / (o === null || o === void 0 || (_o$vnode$el = o.vnode.el) === null || _o$vnode$el === void 0 ? void 0 : _o$vnode$el[n.value.offset]);
25411
+ a.value[n.value.scroll] = k * a.value[n.value.scrollSize] / 100;
25412
25412
  }, r = (d) => {
25413
25413
  d.stopImmediatePropagation(), s.value = !0, ha(document, "mousemove", h$2), ha(document, "mouseup", C), document.onselectstart = () => !1;
25414
25414
  }, h$2 = (d) => {
@@ -25881,11 +25881,11 @@ var init_index_es = __esmMin((() => {
25881
25881
  "change"
25882
25882
  ],
25883
25883
  setup(e, { emit: o }) {
25884
- const t = e, a = o, n = ref(), l = ref(), s = ref(), f = ref(), i = ref(!1), r = ref(!1), h = ref(!1), C = ref({}), d = ref(!1), m = ref([]), S = ref(1), w = ref(""), u = ref(""), g = ref({ text: "" }), { treeData: k, loadOptions: v, ensureSelectedNode: M, getNodeDisplay: q, initByValue: B, findChildNode: O, findParentNode: L, resetTreeData: A } = Pr({
25884
+ const t = e, a = o, n = ref(), l = ref(), s = ref(), f = ref(), i = ref(!1), r = ref(!1), h = ref(!1), C = ref({}), d = ref(!1), m = ref([]), S = ref(1), k = ref(""), u = ref(""), g = ref({ text: "" }), { treeData: w, loadOptions: v, ensureSelectedNode: R, getNodeDisplay: q, initByValue: B, findChildNode: T, findParentNode: L, resetTreeData: A } = Pr({
25885
25885
  modelKey: t.modelKey,
25886
25886
  modelCategory: t.modelCategory,
25887
25887
  getQueryData: () => t.queryData
25888
- }), T = computed(() => t.modelValue || void 0), R = computed(() => g.value.text || ""), V = computed(() => t.allowClear && !t.disabled && !i.value && R.value && h.value ? "clear" : i.value ? "search" : "arrow"), U = computed(() => t.allowClear && !t.disabled && T.value && h.value ? "clear" : "arrow"), J = computed(() => t.disabledParent ? k.value : k.value.map((Y) => ({
25888
+ }), O = computed(() => t.modelValue || void 0), M = computed(() => g.value.text || ""), V = computed(() => t.allowClear && !t.disabled && !i.value && M.value && h.value ? "clear" : i.value ? "search" : "arrow"), U = computed(() => t.allowClear && !t.disabled && O.value && h.value ? "clear" : "arrow"), J = computed(() => t.disabledParent ? w.value : w.value.map((Y) => ({
25889
25889
  ...Y,
25890
25890
  disabled: !1
25891
25891
  })));
@@ -25893,14 +25893,14 @@ var init_index_es = __esmMin((() => {
25893
25893
  g.value = Y;
25894
25894
  }
25895
25895
  function E() {
25896
- if (!T.value) {
25896
+ if (!O.value) {
25897
25897
  oe({
25898
25898
  text: "",
25899
25899
  showDefaultTag: !1
25900
25900
  });
25901
25901
  return;
25902
25902
  }
25903
- const Y = q(T.value, t.parentToDefault);
25903
+ const Y = q(O.value, t.parentToDefault);
25904
25904
  Y.text && oe({
25905
25905
  text: Y.text,
25906
25906
  showDefaultTag: Y.showDefaultTag ?? !1
@@ -25909,15 +25909,15 @@ var init_index_es = __esmMin((() => {
25909
25909
  function X() {
25910
25910
  m.value = J.value.filter((Y) => !Y.isLoadMore).map((Y) => Y.key);
25911
25911
  }
25912
- async function le() {
25913
- if (!T.value) {
25912
+ async function ne() {
25913
+ if (!O.value) {
25914
25914
  oe({
25915
25915
  text: "",
25916
25916
  showDefaultTag: !1
25917
25917
  });
25918
25918
  return;
25919
25919
  }
25920
- const Y = await B(T.value, t.pageSize, t.parentToDefault);
25920
+ const Y = await B(O.value, t.pageSize, t.parentToDefault);
25921
25921
  if (Y === null || Y === void 0 ? void 0 : Y.text) {
25922
25922
  oe(Y);
25923
25923
  return;
@@ -25937,7 +25937,7 @@ var init_index_es = __esmMin((() => {
25937
25937
  }
25938
25938
  }
25939
25939
  const ue = debounce(() => {
25940
- u.value = w.value.trim(), me(!0);
25940
+ u.value = k.value.trim(), me(!0);
25941
25941
  }, 300);
25942
25942
  function Q() {
25943
25943
  if (!n.value) return;
@@ -25953,31 +25953,31 @@ var init_index_es = __esmMin((() => {
25953
25953
  async function Se(Y = {}) {
25954
25954
  const { forceRefresh: se = !1 } = Y;
25955
25955
  if (u.value) {
25956
- await me(!0), await M(T.value), E();
25956
+ await me(!0), await R(O.value), E();
25957
25957
  return;
25958
25958
  }
25959
25959
  if (se) {
25960
- A(), await me(!0), await M(T.value), E();
25960
+ A(), await me(!0), await R(O.value), E();
25961
25961
  return;
25962
25962
  }
25963
- if (!k.value.length) {
25964
- await me(!0), await M(T.value), E();
25963
+ if (!w.value.length) {
25964
+ await me(!0), await R(O.value), E();
25965
25965
  return;
25966
25966
  }
25967
- X(), E(), await M(T.value), E();
25967
+ X(), E(), await R(O.value), E();
25968
25968
  }
25969
25969
  async function ce() {
25970
25970
  var _l$value8;
25971
- t.disabled || (Q(), i.value = !0, w.value = "", u.value = "", await Se({ forceRefresh: !0 }), await nextTick(), (_l$value8 = l.value) === null || _l$value8 === void 0 || _l$value8.focus());
25971
+ t.disabled || (Q(), i.value = !0, k.value = "", u.value = "", await Se({ forceRefresh: !0 }), await nextTick(), (_l$value8 = l.value) === null || _l$value8 === void 0 || _l$value8.focus());
25972
25972
  }
25973
25973
  function Ie() {
25974
- ue.cancel(), i.value = !1, w.value = "", u.value = "";
25974
+ ue.cancel(), i.value = !1, k.value = "", u.value = "";
25975
25975
  }
25976
25976
  function kt() {
25977
25977
  t.disabled || i.value || ce();
25978
25978
  }
25979
25979
  function Lt(Y) {
25980
- w.value = Y.target.value, ue();
25980
+ k.value = Y.target.value, ue();
25981
25981
  }
25982
25982
  function Bt() {
25983
25983
  St(), Ie();
@@ -26018,11 +26018,11 @@ var init_index_es = __esmMin((() => {
26018
26018
  if (Y.disabled && t.disabledParent) return;
26019
26019
  const se = Nt(Y);
26020
26020
  if (!se.includes(":") && t.disabledParent) return;
26021
- const Ve = Mr(se, Y, O, L, t.parentToDefault);
26021
+ const Ve = Mr(se, Y, T, L, t.parentToDefault);
26022
26022
  oe(Ve), a("update:modelValue", se), a("update:fullPathValue", se), a("change", se, Y, Ve), t.showSearch ? Ie() : (_f$value = f.value) === null || _f$value === void 0 || (_f$value$hide = _f$value.hide) === null || _f$value$hide === void 0 || _f$value$hide.call(_f$value);
26023
26023
  }
26024
26024
  function St() {
26025
- ue.cancel(), w.value = "", u.value = "", oe({
26025
+ ue.cancel(), k.value = "", u.value = "", oe({
26026
26026
  text: "",
26027
26027
  showDefaultTag: !1
26028
26028
  }), a("update:modelValue", null), a("update:fullPathValue", null), a("change", null);
@@ -26032,12 +26032,12 @@ var init_index_es = __esmMin((() => {
26032
26032
  oe({
26033
26033
  text: "",
26034
26034
  showDefaultTag: !1
26035
- }), w.value = "";
26035
+ }), k.value = "";
26036
26036
  return;
26037
26037
  }
26038
- (t.showSearch ? i.value : r.value) || le();
26038
+ (t.showSearch ? i.value : r.value) || ne();
26039
26039
  }), onMounted(() => {
26040
- T.value && le(), t.showSearch && (document.addEventListener("click", tt, !0), window.addEventListener("resize", at), window.addEventListener("scroll", at, !0));
26040
+ O.value && ne(), t.showSearch && (document.addEventListener("click", tt, !0), window.addEventListener("resize", at), window.addEventListener("scroll", at, !0));
26041
26041
  }), onBeforeUnmount(() => {
26042
26042
  t.showSearch && (document.removeEventListener("click", tt, !0), window.removeEventListener("resize", at), window.removeEventListener("scroll", at, !0));
26043
26043
  }), (Y, se) => e.showSearch ? (openBlock(), createElementBlock("div", {
@@ -26050,17 +26050,17 @@ var init_index_es = __esmMin((() => {
26050
26050
  onClick: kt,
26051
26051
  onMouseenter: se[1] || (se[1] = (Ve) => h.value = !0),
26052
26052
  onMouseleave: se[2] || (se[2] = (Ve) => h.value = !1)
26053
- }, [createElementVNode("div", { class: normalizeClass(["rdo-tree-select__field", { "is-open": i.value }]) }, [i.value ? (openBlock(), createElementBlock("div", Hr, [R.value && !w.value ? (openBlock(), createElementBlock("div", jr, [createElementVNode("span", Wr, toDisplayString(R.value), 1), g.value.showDefaultTag ? (openBlock(), createElementBlock("span", Zr, "默认")) : createCommentVNode("", !0)])) : createCommentVNode("", !0), createElementVNode("input", {
26053
+ }, [createElementVNode("div", { class: normalizeClass(["rdo-tree-select__field", { "is-open": i.value }]) }, [i.value ? (openBlock(), createElementBlock("div", Hr, [M.value && !k.value ? (openBlock(), createElementBlock("div", jr, [createElementVNode("span", Wr, toDisplayString(M.value), 1), g.value.showDefaultTag ? (openBlock(), createElementBlock("span", Zr, "默认")) : createCommentVNode("", !0)])) : createCommentVNode("", !0), createElementVNode("input", {
26054
26054
  ref_key: "inputRef",
26055
26055
  ref: l,
26056
- class: normalizeClass(["rdo-tree-select__input", { "has-mirror": !!R.value && !w.value }]),
26056
+ class: normalizeClass(["rdo-tree-select__input", { "has-mirror": !!M.value && !k.value }]),
26057
26057
  type: "text",
26058
- value: w.value,
26059
- placeholder: R.value ? "" : e.placeholder,
26058
+ value: k.value,
26059
+ placeholder: M.value ? "" : e.placeholder,
26060
26060
  disabled: e.disabled,
26061
26061
  onInput: Lt,
26062
26062
  onKeydown: [withKeys(withModifiers(Ie, ["stop"]), ["esc"]), withKeys(Ie, ["tab"])]
26063
- }, null, 42, Gr)])) : (openBlock(), createElementBlock("span", Xr, [createElementVNode("span", { class: normalizeClass(["rdo-tree-select__value-text", { "is-placeholder": !R.value }]) }, toDisplayString(R.value || e.placeholder), 3), g.value.showDefaultTag ? (openBlock(), createElementBlock("span", Jr, "默认")) : createCommentVNode("", !0)]))], 2), V.value === "clear" ? (openBlock(), createElementBlock("span", {
26063
+ }, null, 42, Gr)])) : (openBlock(), createElementBlock("span", Xr, [createElementVNode("span", { class: normalizeClass(["rdo-tree-select__value-text", { "is-placeholder": !M.value }]) }, toDisplayString(M.value || e.placeholder), 3), g.value.showDefaultTag ? (openBlock(), createElementBlock("span", Jr, "默认")) : createCommentVNode("", !0)]))], 2), V.value === "clear" ? (openBlock(), createElementBlock("span", {
26064
26064
  key: 0,
26065
26065
  class: "rdo-tree-select__clear",
26066
26066
  onMousedown: se[0] || (se[0] = withModifiers(() => {}, ["prevent"])),
@@ -26087,7 +26087,7 @@ var init_index_es = __esmMin((() => {
26087
26087
  }, [createVNode(wa, {
26088
26088
  "display-tree-data": J.value,
26089
26089
  "expanded-keys": m.value,
26090
- "inner-value": T.value,
26090
+ "inner-value": O.value,
26091
26091
  loading: d.value,
26092
26092
  "disabled-parent": e.disabledParent,
26093
26093
  "parent-to-default": e.parentToDefault,
@@ -26121,7 +26121,7 @@ var init_index_es = __esmMin((() => {
26121
26121
  }, [createVNode(wa, {
26122
26122
  "display-tree-data": J.value,
26123
26123
  "expanded-keys": m.value,
26124
- "inner-value": T.value,
26124
+ "inner-value": O.value,
26125
26125
  loading: d.value,
26126
26126
  "disabled-parent": e.disabledParent,
26127
26127
  "parent-to-default": e.parentToDefault,
@@ -26450,8 +26450,8 @@ var init_index_es = __esmMin((() => {
26450
26450
  a("confirm", d);
26451
26451
  }
26452
26452
  return (d, m) => {
26453
- const S = resolveComponent("a-tooltip"), w = resolveComponent("a-input"), u = resolveComponent("a-checkbox"), g = resolveComponent("a-button"), k = resolveComponent("a-modal");
26454
- return openBlock(), createBlock(k, {
26453
+ const S = resolveComponent("a-tooltip"), k = resolveComponent("a-input"), u = resolveComponent("a-checkbox"), g = resolveComponent("a-button"), w = resolveComponent("a-modal");
26454
+ return openBlock(), createBlock(w, {
26455
26455
  visible: e.visible,
26456
26456
  title: null,
26457
26457
  centered: !0,
@@ -26476,7 +26476,7 @@ var init_index_es = __esmMin((() => {
26476
26476
  "aria-label": "关闭",
26477
26477
  onClick: m[1] || (m[1] = (v) => a("cancel"))
26478
26478
  }, [createVNode(unref(CloseOutlined))])])]),
26479
- createElementVNode("div", cu, [createVNode(w, {
26479
+ createElementVNode("div", cu, [createVNode(k, {
26480
26480
  value: n.value,
26481
26481
  "onUpdate:value": m[2] || (m[2] = (v) => n.value = v),
26482
26482
  class: "form-query-field-modal__search",
@@ -26491,12 +26491,12 @@ var init_index_es = __esmMin((() => {
26491
26491
  "aria-checked": r(v.value),
26492
26492
  "aria-label": `${v.label} ${v.value}`,
26493
26493
  tabindex: "0",
26494
- onClick: (M) => h(v.value),
26495
- onKeydown: [withKeys(withModifiers((M) => h(v.value), ["prevent"]), ["enter"]), withKeys(withModifiers((M) => h(v.value), ["prevent"]), ["space"])]
26494
+ onClick: (R) => h(v.value),
26495
+ onKeydown: [withKeys(withModifiers((R) => h(v.value), ["prevent"]), ["enter"]), withKeys(withModifiers((R) => h(v.value), ["prevent"]), ["space"])]
26496
26496
  }, [createVNode(u, {
26497
26497
  checked: r(v.value),
26498
26498
  onClick: m[3] || (m[3] = withModifiers(() => {}, ["stop"])),
26499
- onChange: (M) => h(v.value)
26499
+ onChange: (R) => h(v.value)
26500
26500
  }, null, 8, ["checked", "onChange"]), createElementVNode("div", pu, [createElementVNode("span", mu, toDisplayString(v.label), 1), createElementVNode("span", vu, [
26501
26501
  createTextVNode(toDisplayString(v.value), 1),
26502
26502
  m[7] || (m[7] = createElementVNode("i", null, null, -1)),
@@ -26558,7 +26558,7 @@ var init_index_es = __esmMin((() => {
26558
26558
  } catch {
26559
26559
  message.error("加载表单分类失败,请重新打开配置");
26560
26560
  }
26561
- await w(a.sourceType);
26561
+ await k(a.sourceType);
26562
26562
  });
26563
26563
  const i = ref([]), r = ref(!1);
26564
26564
  let h = 0;
@@ -26566,16 +26566,16 @@ var init_index_es = __esmMin((() => {
26566
26566
  return String((U === null || U === void 0 ? void 0 : U.label) ?? "").toLowerCase().includes(V.toLowerCase());
26567
26567
  }
26568
26568
  function d(V) {
26569
- return a.templateId = void 0, m(), w(V);
26569
+ return a.templateId = void 0, m(), k(V);
26570
26570
  }
26571
26571
  function m() {
26572
26572
  t.source.returnFields = [], q.value = !1;
26573
26573
  }
26574
26574
  function S(V) {
26575
26575
  function U(X) {
26576
- for (const le of X) {
26577
- if (le.id === V) return le;
26578
- const me = U(le.child ?? []);
26576
+ for (const ne of X) {
26577
+ if (ne.id === V) return ne;
26578
+ const me = U(ne.child ?? []);
26579
26579
  if (me) return me;
26580
26580
  }
26581
26581
  }
@@ -26587,7 +26587,7 @@ var init_index_es = __esmMin((() => {
26587
26587
  const E = U(f.value);
26588
26588
  return E && oe(E), [...J];
26589
26589
  }
26590
- async function w(V) {
26590
+ async function k(V) {
26591
26591
  const U = ++h;
26592
26592
  if (i.value = [], !V || typeof V != "string") {
26593
26593
  r.value = !1;
@@ -26610,47 +26610,47 @@ var init_index_es = __esmMin((() => {
26610
26610
  }
26611
26611
  }
26612
26612
  const u = ref([]), g = ref(!1);
26613
- let k = 0;
26614
- const v = computed(() => a.conditions), M = computed(() => t.source.returnFields), q = ref(!1);
26613
+ let w = 0;
26614
+ const v = computed(() => a.conditions), R = computed(() => t.source.returnFields), q = ref(!1);
26615
26615
  watch(() => [a.sourceType, a.templateId], async () => {
26616
- const V = ++k;
26616
+ const V = ++w;
26617
26617
  u.value = [], g.value = !1;
26618
26618
  const U = a.templateId;
26619
26619
  if (!(typeof U != "string" || !U)) {
26620
26620
  g.value = !0;
26621
26621
  try {
26622
26622
  const J = await ie.apaas.onlineFormTmpl.getGetVersionById({ id: U });
26623
- if (V !== k) return;
26623
+ if (V !== w) return;
26624
26624
  if (!J.modelKey) {
26625
26625
  message.error("来源表单模板未配置主表模型");
26626
26626
  return;
26627
26627
  }
26628
26628
  const oe = await ie.apaas.fieldMeta.getList({ modelKey: J.modelKey });
26629
- if (V !== k) return;
26629
+ if (V !== w) return;
26630
26630
  const E = await Promise.all((oe ?? []).map(async (X) => {
26631
26631
  if (!X.key) return [];
26632
- const le = {
26632
+ const ne = {
26633
26633
  label: X.name || X.key,
26634
26634
  value: X.key,
26635
26635
  type: X.type
26636
26636
  };
26637
- if (X.type !== oa.MASTERSLAVE || !X.bindInfo) return [le];
26638
- return [le, ...(await ie.apaas.fieldMeta.getList({ modelKey: X.bindInfo }) ?? []).flatMap((ue) => ue.key ? [{
26639
- label: `${le.label} / ${ue.name || ue.key}`,
26637
+ if (X.type !== oa.MASTERSLAVE || !X.bindInfo) return [ne];
26638
+ return [ne, ...(await ie.apaas.fieldMeta.getList({ modelKey: X.bindInfo }) ?? []).flatMap((ue) => ue.key ? [{
26639
+ label: `${ne.label} / ${ue.name || ue.key}`,
26640
26640
  value: `${X.key}[].${ue.key}`,
26641
26641
  type: ue.type
26642
26642
  }] : [])];
26643
26643
  }));
26644
- if (V !== k) return;
26644
+ if (V !== w) return;
26645
26645
  u.value = E.flat();
26646
26646
  } catch {
26647
- V === k && message.error("加载来源表单字段失败,请重新选择来源表单模板");
26647
+ V === w && message.error("加载来源表单字段失败,请重新选择来源表单模板");
26648
26648
  } finally {
26649
- V === k && (g.value = !1);
26649
+ V === w && (g.value = !1);
26650
26650
  }
26651
26651
  }
26652
26652
  }, { immediate: !0 });
26653
- const B = computed(() => u.value.filter((V) => !M.value.some((U) => U.key === V.value))), O = computed(() => M.value.length > 0 && M.value.every((V) => {
26653
+ const B = computed(() => u.value.filter((V) => !R.value.some((U) => U.key === V.value))), T = computed(() => R.value.length > 0 && R.value.every((V) => {
26654
26654
  var _V$name, _V$key;
26655
26655
  return ((_V$name = V.name) === null || _V$name === void 0 ? void 0 : _V$name.trim()) && ((_V$key = V.key) === null || _V$key === void 0 ? void 0 : _V$key.trim()) && V.type;
26656
26656
  }));
@@ -26659,18 +26659,18 @@ var init_index_es = __esmMin((() => {
26659
26659
  q.value = !0;
26660
26660
  }
26661
26661
  function A(V) {
26662
- const U = new Set(M.value.map((J) => J.key));
26663
- t.source.returnFields = [...M.value, ...V.filter((J) => !U.has(J.key))], q.value = !1;
26662
+ const U = new Set(R.value.map((J) => J.key));
26663
+ t.source.returnFields = [...R.value, ...V.filter((J) => !U.has(J.key))], q.value = !1;
26664
26664
  }
26665
- function T(V) {
26666
- t.source.returnFields = M.value.filter((U, J) => J !== V);
26665
+ function O(V) {
26666
+ t.source.returnFields = R.value.filter((U, J) => J !== V);
26667
26667
  }
26668
- async function R() {
26668
+ async function M() {
26669
26669
  var _s$value3;
26670
- return l.value = !0, (await ((_s$value3 = s.value) === null || _s$value3 === void 0 ? void 0 : _s$value3.validate().then(() => !0).catch(() => !1)) ?? !1) && O.value;
26670
+ return l.value = !0, (await ((_s$value3 = s.value) === null || _s$value3 === void 0 ? void 0 : _s$value3.validate().then(() => !0).catch(() => !1)) ?? !1) && T.value;
26671
26671
  }
26672
- return o({ validate: R }), (V, U) => {
26673
- const J = resolveComponent("a-input"), oe = resolveComponent("a-form-item"), E = resolveComponent("a-tree-select"), X = resolveComponent("a-select"), le = resolveComponent("a-button"), me = resolveComponent("a-form");
26672
+ return o({ validate: M }), (V, U) => {
26673
+ const J = resolveComponent("a-input"), oe = resolveComponent("a-form-item"), E = resolveComponent("a-tree-select"), X = resolveComponent("a-select"), ne = resolveComponent("a-button"), me = resolveComponent("a-form");
26674
26674
  return openBlock(), createElementBlock(Fragment, null, [createVNode(me, {
26675
26675
  ref_key: "formRef",
26676
26676
  ref: s,
@@ -26840,7 +26840,7 @@ var init_index_es = __esmMin((() => {
26840
26840
  ]))), 128))]),
26841
26841
  createElementVNode("section", Su, [
26842
26842
  createVNode(unref(ve), { description: "(必填)" }, {
26843
- right: withCtx(() => [createVNode(le, {
26843
+ right: withCtx(() => [createVNode(ne, {
26844
26844
  type: "primary",
26845
26845
  loading: g.value,
26846
26846
  disabled: !unref(a).templateId || g.value,
@@ -26853,11 +26853,11 @@ var init_index_es = __esmMin((() => {
26853
26853
  _: 1
26854
26854
  }),
26855
26855
  createVNode(ct, {
26856
- fields: M.value,
26856
+ fields: R.value,
26857
26857
  deletable: "",
26858
- onRemove: T
26858
+ onRemove: O
26859
26859
  }, null, 8, ["fields"]),
26860
- l.value && !O.value ? (openBlock(), createElementBlock("span", Mu, "请至少添加一条完整的取数字段映射")) : createCommentVNode("", !0)
26860
+ l.value && !T.value ? (openBlock(), createElementBlock("span", Mu, "请至少添加一条完整的取数字段映射")) : createCommentVNode("", !0)
26861
26861
  ]),
26862
26862
  createElementVNode("section", Ru, [createVNode(unref(ve), null, {
26863
26863
  default: withCtx(() => [...U[12] || (U[12] = [createTextVNode("取数策略", -1)])]),
@@ -26900,8 +26900,8 @@ var init_index_es = __esmMin((() => {
26900
26900
  },
26901
26901
  setup(e, { expose: o }) {
26902
26902
  const t = e, a = t.source.config, n = computed(() => a.parameters ?? []);
26903
- async function l(M) {
26904
- return (await ie.apaas.edhr.getOnlineFormDataInitProtocolParamMeta({ protocolKey: M })).flatMap((B) => B.key ? [{
26903
+ async function l(R) {
26904
+ return (await ie.apaas.edhr.getOnlineFormDataInitProtocolParamMeta({ protocolKey: R })).flatMap((B) => B.key ? [{
26905
26905
  name: B.key,
26906
26906
  label: B.name || B.key,
26907
26907
  required: B.required ?? !1
@@ -26911,17 +26911,17 @@ var init_index_es = __esmMin((() => {
26911
26911
  s.timing ??= "init", t.source.returnType ??= "object";
26912
26912
  const f = ref(), i = ref([]), r = ref(!1), h = ref(!1), C = ref(""), d = ref("");
26913
26913
  let m = 0, S = !0;
26914
- async function w() {
26915
- const M = typeof a.serviceId == "string" ? a.serviceId : "", q = ++m;
26916
- if (d.value = "", C.value = "", !M) {
26914
+ async function k() {
26915
+ const R = typeof a.serviceId == "string" ? a.serviceId : "", q = ++m;
26916
+ if (d.value = "", C.value = "", !R) {
26917
26917
  h.value = !1;
26918
26918
  return;
26919
26919
  }
26920
26920
  h.value = !0;
26921
26921
  try {
26922
- const [B, O] = await Promise.all([ie.apaas.onlineForm.getDataInitProtocolFieldMeta({ protocolKey: M }), l(M)]);
26922
+ const [B, T] = await Promise.all([ie.apaas.onlineForm.getDataInitProtocolFieldMeta({ protocolKey: R }), l(R)]);
26923
26923
  if (!S || q !== m) return;
26924
- a.parameters = O.map((L) => {
26924
+ a.parameters = T.map((L) => {
26925
26925
  var _n$value$find;
26926
26926
  return {
26927
26927
  ...L,
@@ -26931,7 +26931,7 @@ var init_index_es = __esmMin((() => {
26931
26931
  key: L.key,
26932
26932
  name: L.name || L.key,
26933
26933
  type: L.type
26934
- }] : []), d.value = M;
26934
+ }] : []), d.value = R;
26935
26935
  } catch (B) {
26936
26936
  S && q === m && (C.value = B instanceof Error ? B.message : "加载业务服务元数据失败,请重新加载");
26937
26937
  } finally {
@@ -26939,20 +26939,20 @@ var init_index_es = __esmMin((() => {
26939
26939
  }
26940
26940
  }
26941
26941
  function u() {
26942
- a.parameters = [], t.source.returnFields = [], t.source.returnType = "object", delete a.testBindings, w();
26942
+ a.parameters = [], t.source.returnFields = [], t.source.returnType = "object", delete a.testBindings, k();
26943
26943
  }
26944
26944
  onBeforeUnmount(() => {
26945
26945
  S = !1, m++;
26946
26946
  });
26947
- function g(M, q) {
26948
- return String((q === null || q === void 0 ? void 0 : q.label) ?? "").toLowerCase().includes(M.toLowerCase());
26947
+ function g(R, q) {
26948
+ return String((q === null || q === void 0 ? void 0 : q.label) ?? "").toLowerCase().includes(R.toLowerCase());
26949
26949
  }
26950
26950
  onMounted(async () => {
26951
26951
  r.value = !0;
26952
26952
  try {
26953
- const M = await ie.apaas.onlineForm.getDataInitProtocolList();
26953
+ const R = await ie.apaas.onlineForm.getDataInitProtocolList();
26954
26954
  if (!S) return;
26955
- i.value = (M ?? []).flatMap((q) => q.key && q.key !== "M08" ? [{
26955
+ i.value = (R ?? []).flatMap((q) => q.key && q.key !== "M08" ? [{
26956
26956
  label: q.name ?? q.key,
26957
26957
  value: q.key
26958
26958
  }] : []);
@@ -26961,16 +26961,16 @@ var init_index_es = __esmMin((() => {
26961
26961
  } finally {
26962
26962
  r.value = !1;
26963
26963
  }
26964
- }), w();
26965
- const k = computed(() => t.source.returnFields);
26964
+ }), k();
26965
+ const w = computed(() => t.source.returnFields);
26966
26966
  async function v() {
26967
26967
  var _f$value3;
26968
- const M = await ((_f$value3 = f.value) === null || _f$value3 === void 0 ? void 0 : _f$value3.validate().then(() => !0).catch(() => !1)) ?? !1;
26969
- return h.value || r.value ? (message.warning("业务服务元数据加载中,请稍候"), !1) : d.value !== a.serviceId || C.value ? (message.warning("请先成功加载业务服务返回字段"), !1) : i.value.some((q) => q.value === a.serviceId) ? M : (message.warning("请选择有效的业务服务"), !1);
26968
+ const R = await ((_f$value3 = f.value) === null || _f$value3 === void 0 ? void 0 : _f$value3.validate().then(() => !0).catch(() => !1)) ?? !1;
26969
+ return h.value || r.value ? (message.warning("业务服务元数据加载中,请稍候"), !1) : d.value !== a.serviceId || C.value ? (message.warning("请先成功加载业务服务返回字段"), !1) : i.value.some((q) => q.value === a.serviceId) ? R : (message.warning("请选择有效的业务服务"), !1);
26970
26970
  }
26971
- return o({ validate: v }), (M, q) => {
26972
- const B = resolveComponent("a-input"), O = resolveComponent("a-form-item"), L = resolveComponent("a-select"), A = resolveComponent("a-alert"), T = resolveComponent("a-spin"), R = resolveComponent("a-form");
26973
- return openBlock(), createBlock(R, {
26971
+ return o({ validate: v }), (R, q) => {
26972
+ const B = resolveComponent("a-input"), T = resolveComponent("a-form-item"), L = resolveComponent("a-select"), A = resolveComponent("a-alert"), O = resolveComponent("a-spin"), M = resolveComponent("a-form");
26973
+ return openBlock(), createBlock(M, {
26974
26974
  ref_key: "formRef",
26975
26975
  ref: f,
26976
26976
  model: e.source,
@@ -26982,7 +26982,7 @@ var init_index_es = __esmMin((() => {
26982
26982
  default: withCtx(() => [...q[5] || (q[5] = [createTextVNode("基本信息", -1)])]),
26983
26983
  _: 1
26984
26984
  }),
26985
- createElementVNode("div", Vu, [createVNode(O, {
26985
+ createElementVNode("div", Vu, [createVNode(T, {
26986
26986
  label: "数源名称",
26987
26987
  name: "name",
26988
26988
  rules: [{
@@ -26999,7 +26999,7 @@ var init_index_es = __esmMin((() => {
26999
26999
  placeholder: "请输入"
27000
27000
  }, null, 8, ["value"])]),
27001
27001
  _: 1
27002
- }), createVNode(O, {
27002
+ }), createVNode(T, {
27003
27003
  label: "数源 KEY",
27004
27004
  name: "key",
27005
27005
  rules: e.keyRules
@@ -27012,7 +27012,7 @@ var init_index_es = __esmMin((() => {
27012
27012
  }, null, 8, ["value"])]),
27013
27013
  _: 1
27014
27014
  }, 8, ["rules"])]),
27015
- createElementVNode("div", Lu, [createVNode(O, {
27015
+ createElementVNode("div", Lu, [createVNode(T, {
27016
27016
  label: "业务服务",
27017
27017
  name: ["config", "serviceId"],
27018
27018
  rules: [{
@@ -27056,7 +27056,7 @@ var init_index_es = __esmMin((() => {
27056
27056
  readonly: ""
27057
27057
  }, null, 8, ["value"]),
27058
27058
  q[7] || (q[7] = createElementVNode("span", null, "=", -1)),
27059
- createVNode(O, {
27059
+ createVNode(T, {
27060
27060
  name: [
27061
27061
  "config",
27062
27062
  "parameters",
@@ -27090,13 +27090,13 @@ var init_index_es = __esmMin((() => {
27090
27090
  createElementVNode("section", Nu, [createVNode(unref(ve), null, {
27091
27091
  default: withCtx(() => [...q[9] || (q[9] = [createTextVNode("返回字段", -1)])]),
27092
27092
  _: 1
27093
- }), createVNode(T, { spinning: h.value }, {
27093
+ }), createVNode(O, { spinning: h.value }, {
27094
27094
  default: withCtx(() => [C.value ? (openBlock(), createBlock(A, {
27095
27095
  key: 0,
27096
27096
  type: "error",
27097
27097
  message: C.value,
27098
27098
  "show-icon": ""
27099
- }, null, 8, ["message"])) : createCommentVNode("", !0), createVNode(ct, { fields: k.value }, null, 8, ["fields"])]),
27099
+ }, null, 8, ["message"])) : createCommentVNode("", !0), createVNode(ct, { fields: w.value }, null, 8, ["fields"])]),
27100
27100
  _: 1
27101
27101
  }, 8, ["spinning"])]),
27102
27102
  createElementVNode("section", Du, [createVNode(unref(ve), null, {
@@ -27147,12 +27147,12 @@ var init_index_es = __esmMin((() => {
27147
27147
  i.value = !0;
27148
27148
  try {
27149
27149
  const v = await ie.apaas.category.getGetListRdoOrNdo({ type: "RDO,NDO,BASE,TREE,DYNAMIC_FORM" });
27150
- f.value = (v ?? []).filter((M) => {
27151
- var _M$children;
27152
- return (_M$children = M.children) === null || _M$children === void 0 ? void 0 : _M$children.length;
27153
- }).map((M) => ({
27154
- label: M.name ?? "",
27155
- options: (M.children ?? []).flatMap((q) => q.key ? [{
27150
+ f.value = (v ?? []).filter((R) => {
27151
+ var _R$children;
27152
+ return (_R$children = R.children) === null || _R$children === void 0 ? void 0 : _R$children.length;
27153
+ }).map((R) => ({
27154
+ label: R.name ?? "",
27155
+ options: (R.children ?? []).flatMap((q) => q.key ? [{
27156
27156
  label: q.name ?? q.key,
27157
27157
  value: q.key
27158
27158
  }] : [])
@@ -27175,12 +27175,12 @@ var init_index_es = __esmMin((() => {
27175
27175
  }], m(v);
27176
27176
  }
27177
27177
  async function m(v) {
27178
- const M = ++C;
27178
+ const R = ++C;
27179
27179
  if (a.entityFields = [], t.source.returnFields = [], h.value = !1, !(typeof v != "string" || !v)) {
27180
27180
  h.value = !0;
27181
27181
  try {
27182
27182
  const q = await ie.apaas.fieldMeta.getList({ modelKey: v });
27183
- if (M !== C) return;
27183
+ if (R !== C) return;
27184
27184
  a.entityFields = (q ?? []).flatMap((B) => B.key ? [{
27185
27185
  label: `${B.name || B.key} (${B.key})`,
27186
27186
  value: B.key
@@ -27190,13 +27190,13 @@ var init_index_es = __esmMin((() => {
27190
27190
  type: B.type
27191
27191
  }] : []);
27192
27192
  } catch {
27193
- M === C && message.error("加载实体模型字段失败,请重新选择实体模型");
27193
+ R === C && message.error("加载实体模型字段失败,请重新选择实体模型");
27194
27194
  } finally {
27195
- M === C && (h.value = !1);
27195
+ R === C && (h.value = !1);
27196
27196
  }
27197
27197
  }
27198
27198
  }
27199
- const S = computed(() => Array.isArray(a.conditions) ? a.conditions : []), w = computed(() => t.source.returnFields);
27199
+ const S = computed(() => Array.isArray(a.conditions) ? a.conditions : []), k = computed(() => t.source.returnFields);
27200
27200
  function u() {
27201
27201
  a.conditions = [...S.value, {
27202
27202
  operator: "eq",
@@ -27204,14 +27204,14 @@ var init_index_es = __esmMin((() => {
27204
27204
  }];
27205
27205
  }
27206
27206
  function g(v) {
27207
- a.conditions = S.value.filter((M, q) => q !== v);
27207
+ a.conditions = S.value.filter((R, q) => q !== v);
27208
27208
  }
27209
- async function k() {
27209
+ async function w() {
27210
27210
  var _s$value4;
27211
27211
  return (await ((_s$value4 = s.value) === null || _s$value4 === void 0 ? void 0 : _s$value4.validate().then(() => !0).catch(() => !1)) ?? !1) && !h.value;
27212
27212
  }
27213
- return o({ validate: k }), (v, M) => {
27214
- const q = resolveComponent("a-input"), B = resolveComponent("a-form-item"), O = resolveComponent("a-select"), L = resolveComponent("a-button"), A = resolveComponent("a-form");
27213
+ return o({ validate: w }), (v, R) => {
27214
+ const q = resolveComponent("a-input"), B = resolveComponent("a-form-item"), T = resolveComponent("a-select"), L = resolveComponent("a-button"), A = resolveComponent("a-form");
27215
27215
  return openBlock(), createBlock(A, {
27216
27216
  ref_key: "formRef",
27217
27217
  ref: s,
@@ -27221,7 +27221,7 @@ var init_index_es = __esmMin((() => {
27221
27221
  default: withCtx(() => [
27222
27222
  createElementVNode("section", Ku, [
27223
27223
  createVNode(unref(ve), null, {
27224
- default: withCtx(() => [...M[5] || (M[5] = [createTextVNode("基本信息", -1)])]),
27224
+ default: withCtx(() => [...R[5] || (R[5] = [createTextVNode("基本信息", -1)])]),
27225
27225
  _: 1
27226
27226
  }),
27227
27227
  createElementVNode("div", Eu, [createVNode(B, {
@@ -27236,7 +27236,7 @@ var init_index_es = __esmMin((() => {
27236
27236
  }, {
27237
27237
  default: withCtx(() => [createVNode(q, {
27238
27238
  value: e.source.name,
27239
- "onUpdate:value": M[0] || (M[0] = (T) => e.source.name = T),
27239
+ "onUpdate:value": R[0] || (R[0] = (O) => e.source.name = O),
27240
27240
  maxlength: 80,
27241
27241
  placeholder: "请输入"
27242
27242
  }, null, 8, ["value"])]),
@@ -27248,7 +27248,7 @@ var init_index_es = __esmMin((() => {
27248
27248
  }, {
27249
27249
  default: withCtx(() => [createVNode(q, {
27250
27250
  value: e.source.key,
27251
- "onUpdate:value": M[1] || (M[1] = (T) => e.source.key = T),
27251
+ "onUpdate:value": R[1] || (R[1] = (O) => e.source.key = O),
27252
27252
  maxlength: 80,
27253
27253
  placeholder: "请输入"
27254
27254
  }, null, 8, ["value"])]),
@@ -27264,10 +27264,10 @@ var init_index_es = __esmMin((() => {
27264
27264
  trigger: "change"
27265
27265
  }]
27266
27266
  }, {
27267
- default: withCtx(() => [createVNode(O, {
27267
+ default: withCtx(() => [createVNode(T, {
27268
27268
  "get-popup-container": unref(Ne),
27269
27269
  value: unref(a).modelKey,
27270
- "onUpdate:value": M[2] || (M[2] = (T) => unref(a).modelKey = T),
27270
+ "onUpdate:value": R[2] || (R[2] = (O) => unref(a).modelKey = O),
27271
27271
  placeholder: "请选择实体模型",
27272
27272
  "show-search": "",
27273
27273
  options: f.value,
@@ -27285,18 +27285,18 @@ var init_index_es = __esmMin((() => {
27285
27285
  ]),
27286
27286
  createElementVNode("section", Hu, [
27287
27287
  createVNode(unref(ve), { description: "(入参支持表达式引用 $ctx / 其他数源)" }, {
27288
- default: withCtx(() => [...M[6] || (M[6] = [createTextVNode("筛选条件", -1)])]),
27288
+ default: withCtx(() => [...R[6] || (R[6] = [createTextVNode("筛选条件", -1)])]),
27289
27289
  _: 1
27290
27290
  }),
27291
- (openBlock(!0), createElementBlock(Fragment, null, renderList(S.value, (T, R) => (openBlock(), createElementBlock("div", {
27292
- key: R,
27291
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(S.value, (O, M) => (openBlock(), createElementBlock("div", {
27292
+ key: M,
27293
27293
  class: "data-source-config-step__condition"
27294
27294
  }, [
27295
27295
  createVNode(B, {
27296
27296
  name: [
27297
27297
  "config",
27298
27298
  "conditions",
27299
- R,
27299
+ M,
27300
27300
  "field"
27301
27301
  ],
27302
27302
  rules: [{
@@ -27305,10 +27305,10 @@ var init_index_es = __esmMin((() => {
27305
27305
  trigger: "change"
27306
27306
  }]
27307
27307
  }, {
27308
- default: withCtx(() => [createVNode(O, {
27308
+ default: withCtx(() => [createVNode(T, {
27309
27309
  "get-popup-container": unref(Ne),
27310
- value: T.field,
27311
- "onUpdate:value": (V) => T.field = V,
27310
+ value: O.field,
27311
+ "onUpdate:value": (V) => O.field = V,
27312
27312
  placeholder: "请选择字段",
27313
27313
  "show-search": "",
27314
27314
  "option-filter-prop": "label",
@@ -27325,12 +27325,12 @@ var init_index_es = __esmMin((() => {
27325
27325
  ])]),
27326
27326
  _: 2
27327
27327
  }, 1032, ["name"]),
27328
- M[7] || (M[7] = createElementVNode("span", { class: "data-source-config-step__operator" }, "=", -1)),
27328
+ R[7] || (R[7] = createElementVNode("span", { class: "data-source-config-step__operator" }, "=", -1)),
27329
27329
  createVNode(B, {
27330
27330
  name: [
27331
27331
  "config",
27332
27332
  "conditions",
27333
- R,
27333
+ M,
27334
27334
  "value"
27335
27335
  ],
27336
27336
  rules: [{
@@ -27341,8 +27341,8 @@ var init_index_es = __esmMin((() => {
27341
27341
  }]
27342
27342
  }, {
27343
27343
  default: withCtx(() => [createVNode(q, {
27344
- value: T.value,
27345
- "onUpdate:value": (V) => T.value = V,
27344
+ value: O.value,
27345
+ "onUpdate:value": (V) => O.value = V,
27346
27346
  placeholder: "请输入"
27347
27347
  }, null, 8, ["value", "onUpdate:value"])]),
27348
27348
  _: 2
@@ -27353,7 +27353,7 @@ var init_index_es = __esmMin((() => {
27353
27353
  class: "data-source-config-step__delete",
27354
27354
  title: "删除条件",
27355
27355
  "aria-label": "删除条件",
27356
- onClick: (V) => g(R)
27356
+ onClick: (V) => g(M)
27357
27357
  }, {
27358
27358
  default: withCtx(() => [createVNode(unref(DeleteOutlined))]),
27359
27359
  _: 1
@@ -27364,29 +27364,29 @@ var init_index_es = __esmMin((() => {
27364
27364
  class: "data-source-config-step__add-condition",
27365
27365
  onClick: u
27366
27366
  }, {
27367
- default: withCtx(() => [createVNode(unref(PlusOutlined)), M[8] || (M[8] = createTextVNode("添加条件", -1))]),
27367
+ default: withCtx(() => [createVNode(unref(PlusOutlined)), R[8] || (R[8] = createTextVNode("添加条件", -1))]),
27368
27368
  _: 1
27369
27369
  })
27370
27370
  ]),
27371
27371
  createElementVNode("section", ju, [createVNode(unref(ve), null, {
27372
- default: withCtx(() => [...M[9] || (M[9] = [createTextVNode("数据返回", -1)])]),
27372
+ default: withCtx(() => [...R[9] || (R[9] = [createTextVNode("数据返回", -1)])]),
27373
27373
  _: 1
27374
27374
  }), createVNode(We, {
27375
27375
  type: "returnType",
27376
27376
  value: t.source.returnType,
27377
- "onUpdate:value": M[3] || (M[3] = (T) => t.source.returnType = T)
27377
+ "onUpdate:value": R[3] || (R[3] = (O) => t.source.returnType = O)
27378
27378
  }, null, 8, ["value"])]),
27379
27379
  createElementVNode("section", Wu, [createVNode(unref(ve), null, {
27380
- default: withCtx(() => [...M[10] || (M[10] = [createTextVNode("返回字段", -1)])]),
27380
+ default: withCtx(() => [...R[10] || (R[10] = [createTextVNode("返回字段", -1)])]),
27381
27381
  _: 1
27382
- }), createVNode(ct, { fields: w.value }, null, 8, ["fields"])]),
27382
+ }), createVNode(ct, { fields: k.value }, null, 8, ["fields"])]),
27383
27383
  createElementVNode("section", Zu, [createVNode(unref(ve), null, {
27384
- default: withCtx(() => [...M[11] || (M[11] = [createTextVNode("取数策略", -1)])]),
27384
+ default: withCtx(() => [...R[11] || (R[11] = [createTextVNode("取数策略", -1)])]),
27385
27385
  _: 1
27386
27386
  }), createVNode(We, {
27387
27387
  type: "timing",
27388
27388
  value: unref(l).timing,
27389
- "onUpdate:value": M[4] || (M[4] = (T) => unref(l).timing = T)
27389
+ "onUpdate:value": R[4] || (R[4] = (O) => unref(l).timing = O)
27390
27390
  }, null, 8, ["value"])])
27391
27391
  ]),
27392
27392
  _: 1
@@ -27418,17 +27418,17 @@ var init_index_es = __esmMin((() => {
27418
27418
  const n = ref(!1), l = ref(), s = ref(!1);
27419
27419
  a.connectionMode || (a.connectionMode = "current");
27420
27420
  const f = ref([]), i = ref(!1);
27421
- function r(w, u) {
27422
- return String((u === null || u === void 0 ? void 0 : u.label) ?? "").toLowerCase().includes(w.toLowerCase());
27421
+ function r(k, u) {
27422
+ return String((u === null || u === void 0 ? void 0 : u.label) ?? "").toLowerCase().includes(k.toLowerCase());
27423
27423
  }
27424
27424
  onMounted(async () => {
27425
27425
  i.value = !0;
27426
27426
  try {
27427
- const w = await ie.apaas.dataSource.getPageList({
27427
+ const k = await ie.apaas.dataSource.getPageList({
27428
27428
  pageNo: 1,
27429
27429
  pageSize: 999
27430
27430
  });
27431
- f.value = ((w === null || w === void 0 ? void 0 : w.data) ?? []).flatMap((u) => u.key ? [{
27431
+ f.value = ((k === null || k === void 0 ? void 0 : k.data) ?? []).flatMap((u) => u.key ? [{
27432
27432
  label: u.name ?? u.dbName ?? u.key,
27433
27433
  value: u.key
27434
27434
  }] : []);
@@ -27443,17 +27443,17 @@ var init_index_es = __esmMin((() => {
27443
27443
  if (!(s.value || !d.value)) {
27444
27444
  s.value = !0;
27445
27445
  try {
27446
- const { fields: w, parameters: u } = await Ju(String(a.sql ?? "")), g = new Map(h.value.map((k) => [k.name, k]));
27447
- a.parameters = u.map((k) => ({
27448
- ...g.get(k),
27449
- name: k
27450
- })), t.source.returnFields = w.map((k) => ({
27446
+ const { fields: k, parameters: u } = await Ju(String(a.sql ?? "")), g = new Map(h.value.map((w) => [w.name, w]));
27447
+ a.parameters = u.map((w) => ({
27448
+ ...g.get(w),
27449
+ name: w
27450
+ })), t.source.returnFields = k.map((w) => ({
27451
27451
  name: "",
27452
27452
  type: "na",
27453
- key: k
27453
+ key: w
27454
27454
  })), message.success("SQL 字段与参数解析成功");
27455
- } catch (w) {
27456
- message.error(w instanceof Error ? w.message : "SQL 解析失败,请检查语句");
27455
+ } catch (k) {
27456
+ message.error(k instanceof Error ? k.message : "SQL 解析失败,请检查语句");
27457
27457
  } finally {
27458
27458
  s.value = !1;
27459
27459
  }
@@ -27469,8 +27469,8 @@ var init_index_es = __esmMin((() => {
27469
27469
  return !!((_u$name2 = u.name) === null || _u$name2 === void 0 ? void 0 : _u$name2.trim());
27470
27470
  });
27471
27471
  }
27472
- return o({ validate: S }), (w, u) => {
27473
- const g = resolveComponent("a-input"), k = resolveComponent("a-form-item"), v = resolveComponent("a-radio"), M = resolveComponent("a-radio-group"), q = resolveComponent("a-select"), B = resolveComponent("a-textarea"), O = resolveComponent("a-button"), L = resolveComponent("a-form");
27472
+ return o({ validate: S }), (k, u) => {
27473
+ const g = resolveComponent("a-input"), w = resolveComponent("a-form-item"), v = resolveComponent("a-radio"), R = resolveComponent("a-radio-group"), q = resolveComponent("a-select"), B = resolveComponent("a-textarea"), T = resolveComponent("a-button"), L = resolveComponent("a-form");
27474
27474
  return openBlock(), createBlock(L, {
27475
27475
  ref_key: "formRef",
27476
27476
  ref: l,
@@ -27483,7 +27483,7 @@ var init_index_es = __esmMin((() => {
27483
27483
  default: withCtx(() => [...u[6] || (u[6] = [createTextVNode("基本信息", -1)])]),
27484
27484
  _: 1
27485
27485
  }),
27486
- createElementVNode("div", Yu, [createVNode(k, {
27486
+ createElementVNode("div", Yu, [createVNode(w, {
27487
27487
  label: "数源名称",
27488
27488
  name: "name",
27489
27489
  rules: [{
@@ -27500,7 +27500,7 @@ var init_index_es = __esmMin((() => {
27500
27500
  placeholder: "请输入"
27501
27501
  }, null, 8, ["value"])]),
27502
27502
  _: 1
27503
- }), createVNode(k, {
27503
+ }), createVNode(w, {
27504
27504
  label: "数源 KEY",
27505
27505
  name: "key",
27506
27506
  rules: e.keyRules
@@ -27513,7 +27513,7 @@ var init_index_es = __esmMin((() => {
27513
27513
  }, null, 8, ["value"])]),
27514
27514
  _: 1
27515
27515
  }, 8, ["rules"])]),
27516
- createElementVNode("div", ec, [createVNode(k, {
27516
+ createElementVNode("div", ec, [createVNode(w, {
27517
27517
  label: "数据源类型",
27518
27518
  name: ["config", "connectionMode"],
27519
27519
  rules: [{
@@ -27523,7 +27523,7 @@ var init_index_es = __esmMin((() => {
27523
27523
  trigger: "change"
27524
27524
  }]
27525
27525
  }, {
27526
- default: withCtx(() => [createVNode(M, {
27526
+ default: withCtx(() => [createVNode(R, {
27527
27527
  value: unref(a).connectionMode,
27528
27528
  "onUpdate:value": u[2] || (u[2] = (A) => unref(a).connectionMode = A)
27529
27529
  }, {
@@ -27537,7 +27537,7 @@ var init_index_es = __esmMin((() => {
27537
27537
  _: 1
27538
27538
  }, 8, ["value"])]),
27539
27539
  _: 1
27540
- }), unref(a).connectionMode === "external" ? (openBlock(), createBlock(k, {
27540
+ }), unref(a).connectionMode === "external" ? (openBlock(), createBlock(w, {
27541
27541
  key: 0,
27542
27542
  label: "数据连接",
27543
27543
  name: ["config", "connectionKey"],
@@ -27565,7 +27565,7 @@ var init_index_es = __esmMin((() => {
27565
27565
  ])]),
27566
27566
  _: 1
27567
27567
  })) : createCommentVNode("", !0)]),
27568
- createVNode(k, {
27568
+ createVNode(w, {
27569
27569
  label: "SQL 语句",
27570
27570
  name: ["config", "sql"],
27571
27571
  rules: [{
@@ -27584,7 +27584,7 @@ var init_index_es = __esmMin((() => {
27584
27584
  }, null, 8, ["value"])]),
27585
27585
  _: 1
27586
27586
  }),
27587
- createElementVNode("div", tc, [createVNode(O, {
27587
+ createElementVNode("div", tc, [createVNode(T, {
27588
27588
  type: "primary",
27589
27589
  disabled: !d.value,
27590
27590
  loading: s.value,
@@ -27599,15 +27599,15 @@ var init_index_es = __esmMin((() => {
27599
27599
  default: withCtx(() => [...u[10] || (u[10] = [createTextVNode("参数绑定", -1)])]),
27600
27600
  _: 1
27601
27601
  }),
27602
- (openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (A, T) => (openBlock(), createElementBlock("div", {
27603
- key: T,
27602
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (A, O) => (openBlock(), createElementBlock("div", {
27603
+ key: O,
27604
27604
  class: "data-source-sql-config__condition"
27605
27605
  }, [
27606
- createVNode(k, {
27606
+ createVNode(w, {
27607
27607
  name: [
27608
27608
  "config",
27609
27609
  "parameters",
27610
- T,
27610
+ O,
27611
27611
  "name"
27612
27612
  ],
27613
27613
  rules: [{
@@ -27619,18 +27619,18 @@ var init_index_es = __esmMin((() => {
27619
27619
  }, {
27620
27620
  default: withCtx(() => [createVNode(g, {
27621
27621
  value: A.name,
27622
- "onUpdate:value": (R) => A.name = R,
27622
+ "onUpdate:value": (M) => A.name = M,
27623
27623
  placeholder: "请输入参数名",
27624
27624
  readonly: ""
27625
27625
  }, null, 8, ["value", "onUpdate:value"])]),
27626
27626
  _: 2
27627
27627
  }, 1032, ["name"]),
27628
27628
  u[11] || (u[11] = createElementVNode("span", { class: "data-source-sql-config__operator" }, "=", -1)),
27629
- createVNode(k, {
27629
+ createVNode(w, {
27630
27630
  name: [
27631
27631
  "config",
27632
27632
  "parameters",
27633
- T,
27633
+ O,
27634
27634
  "value"
27635
27635
  ],
27636
27636
  rules: [{
@@ -27642,7 +27642,7 @@ var init_index_es = __esmMin((() => {
27642
27642
  }, {
27643
27643
  default: withCtx(() => [createVNode(g, {
27644
27644
  value: A.value,
27645
- "onUpdate:value": (R) => A.value = R,
27645
+ "onUpdate:value": (M) => A.value = M,
27646
27646
  placeholder: "绑定上下文字段"
27647
27647
  }, null, 8, ["value", "onUpdate:value"])]),
27648
27648
  _: 2
@@ -27703,15 +27703,15 @@ var init_index_es = __esmMin((() => {
27703
27703
  onMounted(async () => {
27704
27704
  C.value = !0;
27705
27705
  try {
27706
- const u = { transformRequest: [(v, M) => {
27707
- for (const q of Object.keys(M)) (q.toLowerCase() === "env" || q.toLowerCase() === "app-tag") && delete M[q];
27708
- return M["App-Tag"] = "__platform__", v;
27706
+ const u = { transformRequest: [(v, R) => {
27707
+ for (const q of Object.keys(R)) (q.toLowerCase() === "env" || q.toLowerCase() === "app-tag") && delete R[q];
27708
+ return R["App-Tag"] = "__platform__", v;
27709
27709
  }] }, g = {
27710
27710
  ...u,
27711
27711
  transferToConfig: u
27712
- }, k = await ie.ipaas.flow.getListOnline({}, g);
27712
+ }, w = await ie.ipaas.flow.getListOnline({}, g);
27713
27713
  if (!f) return;
27714
- h.value = (k ?? []).flatMap((v) => v.fuuid ? [{
27714
+ h.value = (w ?? []).flatMap((v) => v.fuuid ? [{
27715
27715
  label: v.name ?? v.fuuid,
27716
27716
  value: v.fuuid
27717
27717
  }] : []);
@@ -27722,41 +27722,41 @@ var init_index_es = __esmMin((() => {
27722
27722
  }
27723
27723
  });
27724
27724
  const m = computed(() => Array.isArray(a.parameters) ? a.parameters : []), S = computed(() => t.source.returnFields);
27725
- watch(() => [a.flowId], async ([u], g, k) => {
27725
+ watch(() => [a.flowId], async ([u], g, w) => {
27726
27726
  let v = !0;
27727
- k(() => {
27727
+ w(() => {
27728
27728
  v = !1;
27729
27729
  });
27730
- const M = !g || g[0] === u, q = M ? S.value : [], B = M ? m.value : [];
27731
- if (M || (t.source.returnFields = [], a.parameters = [], delete a.testBindings), l.value = !1, s.value = "", n.value = !1, !(typeof u != "string" || !u)) {
27730
+ const R = !g || g[0] === u, q = R ? S.value : [], B = R ? m.value : [];
27731
+ if (R || (t.source.returnFields = [], a.parameters = [], delete a.testBindings), l.value = !1, s.value = "", n.value = !1, !(typeof u != "string" || !u)) {
27732
27732
  n.value = !0;
27733
27733
  try {
27734
- const O = await ie.ipaas.flowExt.getFindByFuuid({ fuuid: u });
27735
- if (!(O === null || O === void 0 ? void 0 : O.definitionJson)) throw new Error("连接流缺少定义信息");
27736
- const A = Ya(la(O.definitionJson)), T = ic(O.definitionJson);
27734
+ const T = await ie.ipaas.flowExt.getFindByFuuid({ fuuid: u });
27735
+ if (!(T === null || T === void 0 ? void 0 : T.definitionJson)) throw new Error("连接流缺少定义信息");
27736
+ const A = Ya(la(T.definitionJson)), O = ic(T.definitionJson);
27737
27737
  if (!v) return;
27738
- a.parameters = A.map((R) => {
27738
+ a.parameters = A.map((M) => {
27739
27739
  var _B$find;
27740
27740
  return {
27741
- ...R,
27742
- source: ((_B$find = B.find((V) => V.name === R.name)) === null || _B$find === void 0 ? void 0 : _B$find.source) ?? ""
27741
+ ...M,
27742
+ source: ((_B$find = B.find((V) => V.name === M.name)) === null || _B$find === void 0 ? void 0 : _B$find.source) ?? ""
27743
27743
  };
27744
- }), t.source.returnFields = T.map((R) => {
27744
+ }), t.source.returnFields = O.map((M) => {
27745
27745
  var _q$find;
27746
27746
  return {
27747
- ...R,
27748
- name: ((_q$find = q.find((V) => V.key === R.key)) === null || _q$find === void 0 ? void 0 : _q$find.name) ?? R.name
27747
+ ...M,
27748
+ name: ((_q$find = q.find((V) => V.key === M.key)) === null || _q$find === void 0 ? void 0 : _q$find.name) ?? M.name
27749
27749
  };
27750
27750
  });
27751
- } catch (O) {
27751
+ } catch (T) {
27752
27752
  if (!v) return;
27753
- l.value = !0, s.value = O instanceof Error ? O.message : "加载连接流元数据失败", message.error(s.value);
27753
+ l.value = !0, s.value = T instanceof Error ? T.message : "加载连接流元数据失败", message.error(s.value);
27754
27754
  } finally {
27755
27755
  v && (n.value = !1);
27756
27756
  }
27757
27757
  }
27758
27758
  }, { immediate: !0 });
27759
- async function w() {
27759
+ async function k() {
27760
27760
  var _i$value8;
27761
27761
  return n.value || l.value ? (message.error(n.value ? "连接流元数据加载中,请稍后重试" : "连接流元数据加载失败,请重新加载"), !1) : (r.value = !0, (await ((_i$value8 = i.value) === null || _i$value8 === void 0 ? void 0 : _i$value8.validate().then(() => !0).catch(() => !1)) ?? !1) && m.value.every((g) => {
27762
27762
  var _g$source;
@@ -27766,8 +27766,8 @@ var init_index_es = __esmMin((() => {
27766
27766
  return !!((_g$name = g.name) === null || _g$name === void 0 ? void 0 : _g$name.trim());
27767
27767
  }));
27768
27768
  }
27769
- return o({ validate: w }), (u, g) => {
27770
- const k = resolveComponent("a-input"), v = resolveComponent("a-form-item"), M = resolveComponent("a-select"), q = resolveComponent("a-input-number"), B = resolveComponent("a-alert"), O = resolveComponent("a-spin"), L = resolveComponent("a-form");
27769
+ return o({ validate: k }), (u, g) => {
27770
+ const w = resolveComponent("a-input"), v = resolveComponent("a-form-item"), R = resolveComponent("a-select"), q = resolveComponent("a-input-number"), B = resolveComponent("a-alert"), T = resolveComponent("a-spin"), L = resolveComponent("a-form");
27771
27771
  return openBlock(), createBlock(L, {
27772
27772
  ref_key: "formRef",
27773
27773
  ref: i,
@@ -27790,7 +27790,7 @@ var init_index_es = __esmMin((() => {
27790
27790
  trigger: "change"
27791
27791
  }]
27792
27792
  }, {
27793
- default: withCtx(() => [createVNode(k, {
27793
+ default: withCtx(() => [createVNode(w, {
27794
27794
  value: e.source.name,
27795
27795
  "onUpdate:value": g[0] || (g[0] = (A) => e.source.name = A),
27796
27796
  maxlength: 80,
@@ -27802,7 +27802,7 @@ var init_index_es = __esmMin((() => {
27802
27802
  name: "key",
27803
27803
  rules: e.keyRules
27804
27804
  }, {
27805
- default: withCtx(() => [createVNode(k, {
27805
+ default: withCtx(() => [createVNode(w, {
27806
27806
  value: e.source.key,
27807
27807
  "onUpdate:value": g[1] || (g[1] = (A) => e.source.key = A),
27808
27808
  maxlength: 80,
@@ -27820,7 +27820,7 @@ var init_index_es = __esmMin((() => {
27820
27820
  trigger: "change"
27821
27821
  }]
27822
27822
  }, {
27823
- default: withCtx(() => [createVNode(M, {
27823
+ default: withCtx(() => [createVNode(R, {
27824
27824
  "get-popup-container": unref(Ne),
27825
27825
  value: unref(a).flowId,
27826
27826
  "onUpdate:value": g[2] || (g[2] = (A) => unref(a).flowId = A),
@@ -27871,7 +27871,7 @@ var init_index_es = __esmMin((() => {
27871
27871
  "show-icon": ""
27872
27872
  }, null, 8, ["message"])) : createCommentVNode("", !0),
27873
27873
  unref(a).flowId ? !m.value.length && !n.value && !s.value ? (openBlock(), createElementBlock("p", mc, " 暂无需要映射的 Query 入参 ")) : createCommentVNode("", !0) : (openBlock(), createElementBlock("p", pc, "请选择连接流后配置 Query 入参")),
27874
- (openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (A, T) => (openBlock(), createElementBlock("div", {
27874
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (A, O) => (openBlock(), createElementBlock("div", {
27875
27875
  key: A.name,
27876
27876
  class: "data-source-ipaas-config__condition"
27877
27877
  }, [
@@ -27881,7 +27881,7 @@ var init_index_es = __esmMin((() => {
27881
27881
  name: [
27882
27882
  "config",
27883
27883
  "parameters",
27884
- T,
27884
+ O,
27885
27885
  "source"
27886
27886
  ],
27887
27887
  rules: [{
@@ -27891,9 +27891,9 @@ var init_index_es = __esmMin((() => {
27891
27891
  trigger: "change"
27892
27892
  }]
27893
27893
  }, {
27894
- default: withCtx(() => [createVNode(k, {
27894
+ default: withCtx(() => [createVNode(w, {
27895
27895
  value: A.source,
27896
- "onUpdate:value": (R) => A.source = R,
27896
+ "onUpdate:value": (M) => A.source = M,
27897
27897
  placeholder: "$ctx.字段KEY 或 $form.字段KEY,也可输入固定值"
27898
27898
  }, null, 8, ["value", "onUpdate:value"])]),
27899
27899
  _: 2
@@ -27903,7 +27903,7 @@ var init_index_es = __esmMin((() => {
27903
27903
  createElementVNode("section", gc, [createVNode(unref(ve), null, {
27904
27904
  default: withCtx(() => [...g[7] || (g[7] = [createTextVNode("返回字段", -1)])]),
27905
27905
  _: 1
27906
- }), createVNode(O, { spinning: n.value }, {
27906
+ }), createVNode(T, { spinning: n.value }, {
27907
27907
  default: withCtx(() => [createVNode(ct, {
27908
27908
  fields: S.value,
27909
27909
  renamable: "",
@@ -27941,15 +27941,15 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
27941
27941
  const S = d;
27942
27942
  if ((d instanceof SyntaxError || d instanceof ReferenceError) && (S === null || S === void 0 ? void 0 : S.loc) && typeof S.pos == "number") {
27943
27943
  var _s$value5, _v;
27944
- const { line: w, column: u } = S.loc, g = d instanceof ReferenceError ? d.message : "脚本语法错误";
27945
- message.error(`${g}:第 ${w} 行,第 ${u + 1} 列,请检查高亮代码`), await nextTick();
27946
- const k = (_s$value5 = s.value) === null || _s$value5 === void 0 || (_s$value5 = _s$value5.resizableTextArea) === null || _s$value5 === void 0 ? void 0 : _s$value5.textArea;
27947
- if (!k) return;
27948
- const v = k.value.split(`
27949
- `), M = v.slice(0, w - 1).reduce((O, L) => O + L.length + 1, 0), q = M + (((_v = v[w - 1]) === null || _v === void 0 ? void 0 : _v.length) ?? 0);
27950
- k.focus(), k.setSelectionRange(M, q);
27951
- const B = Number.parseFloat(getComputedStyle(k).lineHeight) || 22;
27952
- k.scrollTop = Math.max(0, (w - 1) * B - k.clientHeight / 2), k.scrollIntoView({ block: "nearest" });
27944
+ const { line: k, column: u } = S.loc, g = d instanceof ReferenceError ? d.message : "脚本语法错误";
27945
+ message.error(`${g}:第 ${k} 行,第 ${u + 1} 列,请检查高亮代码`), await nextTick();
27946
+ const w = (_s$value5 = s.value) === null || _s$value5 === void 0 || (_s$value5 = _s$value5.resizableTextArea) === null || _s$value5 === void 0 ? void 0 : _s$value5.textArea;
27947
+ if (!w) return;
27948
+ const v = w.value.split(`
27949
+ `), R = v.slice(0, k - 1).reduce((T, L) => T + L.length + 1, 0), q = R + (((_v = v[k - 1]) === null || _v === void 0 ? void 0 : _v.length) ?? 0);
27950
+ w.focus(), w.setSelectionRange(R, q);
27951
+ const B = Number.parseFloat(getComputedStyle(w).lineHeight) || 22;
27952
+ w.scrollTop = Math.max(0, (k - 1) * B - w.clientHeight / 2), w.scrollIntoView({ block: "nearest" });
27953
27953
  return;
27954
27954
  }
27955
27955
  message.error(d instanceof Error ? d.message : m);
@@ -27968,7 +27968,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
27968
27968
  m.returnType && (t.source.returnType = m.returnType), message.warning("未解析到可确定的返回字段,原字段配置已保留");
27969
27969
  return;
27970
27970
  }
27971
- const S = new Map(r.value.map((u) => [u.key, u])), w = m.fields.map((u) => {
27971
+ const S = new Map(r.value.map((u) => [u.key, u])), k = m.fields.map((u) => {
27972
27972
  var _S$get, _S$get2;
27973
27973
  return {
27974
27974
  ...u,
@@ -27976,7 +27976,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
27976
27976
  type: u.type ?? ((_S$get2 = S.get(u.key)) === null || _S$get2 === void 0 ? void 0 : _S$get2.type)
27977
27977
  };
27978
27978
  });
27979
- t.source.returnFields = w, m.returnType && (t.source.returnType = m.returnType), m.incomplete ? message.warning("部分返回结构无法静态确定,请调整脚本后重新解析") : message.success("返回字段解析完成");
27979
+ t.source.returnFields = k, m.returnType && (t.source.returnType = m.returnType), m.incomplete ? message.warning("部分返回结构无法静态确定,请调整脚本后重新解析") : message.success("返回字段解析完成");
27980
27980
  } catch (d) {
27981
27981
  await f(d, "脚本解析失败");
27982
27982
  } finally {
@@ -27998,8 +27998,8 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
27998
27998
  });
27999
27999
  }
28000
28000
  return o({ validate: C }), (d, m) => {
28001
- const S = resolveComponent("a-input"), w = resolveComponent("a-form-item"), u = resolveComponent("a-textarea"), g = resolveComponent("a-button"), k = resolveComponent("a-form");
28002
- return openBlock(), createBlock(k, {
28001
+ const S = resolveComponent("a-input"), k = resolveComponent("a-form-item"), u = resolveComponent("a-textarea"), g = resolveComponent("a-button"), w = resolveComponent("a-form");
28002
+ return openBlock(), createBlock(w, {
28003
28003
  ref_key: "formRef",
28004
28004
  ref: l,
28005
28005
  model: e.source,
@@ -28011,7 +28011,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28011
28011
  default: withCtx(() => [...m[4] || (m[4] = [createTextVNode("基本信息", -1)])]),
28012
28012
  _: 1
28013
28013
  }),
28014
- createElementVNode("div", wc, [createVNode(w, {
28014
+ createElementVNode("div", wc, [createVNode(k, {
28015
28015
  label: "数源名称",
28016
28016
  name: "name",
28017
28017
  rules: [{
@@ -28028,7 +28028,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28028
28028
  placeholder: "请输入"
28029
28029
  }, null, 8, ["value"])]),
28030
28030
  _: 1
28031
- }), createVNode(w, {
28031
+ }), createVNode(k, {
28032
28032
  label: "数源 KEY",
28033
28033
  name: "key",
28034
28034
  rules: e.keyRules
@@ -28041,7 +28041,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28041
28041
  }, null, 8, ["value"])]),
28042
28042
  _: 1
28043
28043
  }, 8, ["rules"])]),
28044
- createVNode(w, {
28044
+ createVNode(k, {
28045
28045
  label: "JavaScript 脚本",
28046
28046
  name: ["config", "script"],
28047
28047
  rules: [{
@@ -28692,31 +28692,31 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28692
28692
  trigger: "change"
28693
28693
  },
28694
28694
  {
28695
- validator: (O, L) => L === "$ctx" ? Promise.reject(/* @__PURE__ */ new Error("$ctx 为内置上下文保留 KEY")) : Promise.resolve(),
28695
+ validator: (T, L) => L === "$ctx" ? Promise.reject(/* @__PURE__ */ new Error("$ctx 为内置上下文保留 KEY")) : Promise.resolve(),
28696
28696
  trigger: "change"
28697
28697
  },
28698
28698
  {
28699
- validator: (O, L) => m(L) ? Promise.reject(/* @__PURE__ */ new Error("数源 KEY 不能重复")) : Promise.resolve(),
28699
+ validator: (T, L) => m(L) ? Promise.reject(/* @__PURE__ */ new Error("数源 KEY 不能重复")) : Promise.resolve(),
28700
28700
  trigger: "change"
28701
28701
  }
28702
28702
  ];
28703
- function m(O) {
28703
+ function m(T) {
28704
28704
  return t.list.some((L) => {
28705
28705
  var _t$value3;
28706
- return L.key === O && !(t.mode === "edit" && L.key === ((_t$value3 = t.value) === null || _t$value3 === void 0 ? void 0 : _t$value3.key));
28706
+ return L.key === T && !(t.mode === "edit" && L.key === ((_t$value3 = t.value) === null || _t$value3 === void 0 ? void 0 : _t$value3.key));
28707
28707
  });
28708
28708
  }
28709
- function S(O) {
28709
+ function S(T) {
28710
28710
  let L;
28711
28711
  do
28712
- L = `ds_${O}_${Math.random().toString(36).slice(-6)}`;
28712
+ L = `ds_${T}_${Math.random().toString(36).slice(-6)}`;
28713
28713
  while (m(L));
28714
28714
  return L;
28715
28715
  }
28716
- function w(O) {
28717
- r.type !== O && (Object.assign(r, i(), { type: O }), s.value++);
28716
+ function k(T) {
28717
+ r.type !== T && (Object.assign(r, i(), { type: T }), s.value++);
28718
28718
  }
28719
- function u(O) {
28719
+ function u(T) {
28720
28720
  return {
28721
28721
  form: Ni,
28722
28722
  biz: Di,
@@ -28724,24 +28724,24 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28724
28724
  sql: Ii,
28725
28725
  ipaas: Ki,
28726
28726
  script: Ei
28727
- }[O];
28727
+ }[T];
28728
28728
  }
28729
- function g(O) {
28730
- return O === "sql" || O === "ipaas" ? "需预配置" : "";
28729
+ function g(T) {
28730
+ return T === "sql" || T === "ipaas" ? "需预配置" : "";
28731
28731
  }
28732
- function k(O) {
28732
+ function w(T) {
28733
28733
  return ["data-source-editor__step", {
28734
- "is-current": l.value === O,
28735
- "is-done": l.value > O
28734
+ "is-current": l.value === T,
28735
+ "is-done": l.value > T
28736
28736
  }];
28737
28737
  }
28738
28738
  watch(() => [
28739
28739
  t.visible,
28740
28740
  t.value,
28741
28741
  t.mode
28742
- ], ([O, L, A]) => {
28742
+ ], ([T, L, A]) => {
28743
28743
  var _r$fetchPolicy, _r$fetchPolicy2;
28744
- O && (Object.assign(r, i(), L ? cloneDeep(L) : {}), r.config = { ...r.config }, r.fetchPolicy = {
28744
+ T && (Object.assign(r, i(), L ? cloneDeep(L) : {}), r.config = { ...r.config }, r.fetchPolicy = {
28745
28745
  mode: ((_r$fetchPolicy = r.fetchPolicy) === null || _r$fetchPolicy === void 0 ? void 0 : _r$fetchPolicy.mode) ?? "latest",
28746
28746
  timing: ((_r$fetchPolicy2 = r.fetchPolicy) === null || _r$fetchPolicy2 === void 0 ? void 0 : _r$fetchPolicy2.timing) ?? "init"
28747
28747
  }, l.value = A === "create" ? 0 : 1, s.value++);
@@ -28753,7 +28753,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28753
28753
  }
28754
28754
  l.value === 1 && await B() && (Jc(r), l.value = 2);
28755
28755
  }
28756
- function M() {
28756
+ function R() {
28757
28757
  l.value--;
28758
28758
  }
28759
28759
  async function q() {
@@ -28767,36 +28767,36 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28767
28767
  var _f$value4, _f$value4$validate;
28768
28768
  return await ((_f$value4 = f.value) === null || _f$value4 === void 0 || (_f$value4$validate = _f$value4.validate) === null || _f$value4$validate === void 0 ? void 0 : _f$value4$validate.call(_f$value4)) ?? !1;
28769
28769
  }
28770
- return (O, L) => {
28771
- const A = resolveComponent("a-button"), T = resolveComponent("a-drawer");
28772
- return openBlock(), createBlock(T, {
28770
+ return (T, L) => {
28771
+ const A = resolveComponent("a-button"), O = resolveComponent("a-drawer");
28772
+ return openBlock(), createBlock(O, {
28773
28773
  visible: e.visible,
28774
28774
  width: 720,
28775
28775
  placement: "right",
28776
28776
  closable: !1,
28777
28777
  class: "data-source-editor-drawer",
28778
- onClose: L[2] || (L[2] = (R) => n("cancel"))
28778
+ onClose: L[2] || (L[2] = (M) => n("cancel"))
28779
28779
  }, {
28780
28780
  title: withCtx(() => [createElementVNode("div", ad, [createElementVNode("span", null, toDisplayString(h.value), 1), createElementVNode("button", {
28781
28781
  type: "button",
28782
28782
  class: "data-source-editor__close",
28783
28783
  "aria-label": "关闭",
28784
- onClick: L[0] || (L[0] = (R) => n("cancel"))
28784
+ onClick: L[0] || (L[0] = (M) => n("cancel"))
28785
28785
  }, [createVNode(unref(CloseOutlined))])])]),
28786
28786
  default: withCtx(() => [createElementVNode("div", od, [
28787
- createElementVNode("div", nd, [(openBlock(!0), createElementBlock(Fragment, null, renderList(C.value, (R, V) => (openBlock(), createElementBlock(Fragment, { key: R }, [createElementVNode("div", { class: normalizeClass(k(V)) }, [createElementVNode("span", null, [V < l.value ? (openBlock(), createElementBlock("i", ld)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(V + 1), 1)], 64))]), createElementVNode("i", null, toDisplayString(R), 1)], 2), V < C.value.length - 1 ? (openBlock(), createElementBlock("span", sd)) : createCommentVNode("", !0)], 64))), 128))]),
28788
- l.value === 0 ? (openBlock(), createElementBlock("div", rd, [(openBlock(), createElementBlock(Fragment, null, renderList(a, (R) => createElementVNode("button", {
28789
- key: R.value,
28787
+ createElementVNode("div", nd, [(openBlock(!0), createElementBlock(Fragment, null, renderList(C.value, (M, V) => (openBlock(), createElementBlock(Fragment, { key: M }, [createElementVNode("div", { class: normalizeClass(w(V)) }, [createElementVNode("span", null, [V < l.value ? (openBlock(), createElementBlock("i", ld)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(V + 1), 1)], 64))]), createElementVNode("i", null, toDisplayString(M), 1)], 2), V < C.value.length - 1 ? (openBlock(), createElementBlock("span", sd)) : createCommentVNode("", !0)], 64))), 128))]),
28788
+ l.value === 0 ? (openBlock(), createElementBlock("div", rd, [(openBlock(), createElementBlock(Fragment, null, renderList(a, (M) => createElementVNode("button", {
28789
+ key: M.value,
28790
28790
  type: "button",
28791
- class: normalizeClass(["data-source-editor__type", { "is-active": r.type === R.value }]),
28792
- onClick: (V) => w(R.value)
28791
+ class: normalizeClass(["data-source-editor__type", { "is-active": r.type === M.value }]),
28792
+ onClick: (V) => k(M.value)
28793
28793
  }, [
28794
28794
  createElementVNode("span", ud, [createElementVNode("img", {
28795
- src: u(R.value),
28795
+ src: u(M.value),
28796
28796
  alt: ""
28797
28797
  }, null, 8, cd)]),
28798
- createElementVNode("span", dd, [createElementVNode("span", fd, toDisplayString(R.label), 1), R.tag ?? g(R.value) ? (openBlock(), createElementBlock("span", pd, toDisplayString(R.tag ?? g(R.value)), 1)) : createCommentVNode("", !0)]),
28799
- createElementVNode("span", md, toDisplayString(R.description), 1)
28798
+ createElementVNode("span", dd, [createElementVNode("span", fd, toDisplayString(M.label), 1), M.tag ?? g(M.value) ? (openBlock(), createElementBlock("span", pd, toDisplayString(M.tag ?? g(M.value)), 1)) : createCommentVNode("", !0)]),
28799
+ createElementVNode("span", md, toDisplayString(M.description), 1)
28800
28800
  ], 10, id)), 64))])) : l.value === 1 ? (openBlock(), createElementBlock("div", vd, [(openBlock(), createBlock(Ac, {
28801
28801
  key: s.value,
28802
28802
  ref_key: "configStepRef",
@@ -28810,14 +28810,14 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
28810
28810
  visible: e.visible
28811
28811
  }, null, 8, ["source", "visible"]))])),
28812
28812
  createElementVNode("div", gd, [
28813
- createVNode(A, { onClick: L[1] || (L[1] = (R) => n("cancel")) }, {
28813
+ createVNode(A, { onClick: L[1] || (L[1] = (M) => n("cancel")) }, {
28814
28814
  default: withCtx(() => [...L[3] || (L[3] = [createTextVNode("取消", -1)])]),
28815
28815
  _: 1
28816
28816
  }),
28817
28817
  l.value > 0 ? (openBlock(), createBlock(A, {
28818
28818
  key: 0,
28819
28819
  disabled: e.mode === "edit" && l.value === 1,
28820
- onClick: M
28820
+ onClick: R
28821
28821
  }, {
28822
28822
  default: withCtx(() => [...L[4] || (L[4] = [createTextVNode("上一步", -1)])]),
28823
28823
  _: 1
@@ -29064,10 +29064,10 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29064
29064
  "cancelled"
29065
29065
  ].includes(((_a$runtimeManager3 = a.runtimeManager) === null || _a$runtimeManager3 === void 0 || (_a$runtimeManager3 = _a$runtimeManager3.states[E]) === null || _a$runtimeManager3 === void 0 ? void 0 : _a$runtimeManager3.status) ?? "");
29066
29066
  }
29067
- function w(E) {
29067
+ function k(E) {
29068
29068
  var _a$runtimeManager4;
29069
29069
  const X = (_a$runtimeManager4 = a.runtimeManager) === null || _a$runtimeManager4 === void 0 ? void 0 : _a$runtimeManager4.states[E.key];
29070
- return (X === null || X === void 0 ? void 0 : X.status) === "success" ? `✓ 已返回 ${R(E).filter((me) => get(X.data, me.key) !== void 0).length} 个参数` : {
29070
+ return (X === null || X === void 0 ? void 0 : X.status) === "success" ? `✓ 已返回 ${M(E).filter((me) => get(X.data, me.key) !== void 0).length} 个参数` : {
29071
29071
  loading: "加载中",
29072
29072
  empty: "无数据",
29073
29073
  error: "加载失败",
@@ -29078,35 +29078,36 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29078
29078
  }
29079
29079
  function u(E, X) {
29080
29080
  var _a$runtimeManager5;
29081
- const le = (_a$runtimeManager5 = a.runtimeManager) === null || _a$runtimeManager5 === void 0 ? void 0 : _a$runtimeManager5.states[E.key];
29082
- if ((le === null || le === void 0 ? void 0 : le.status) !== "success") return {
29081
+ const ne = (_a$runtimeManager5 = a.runtimeManager) === null || _a$runtimeManager5 === void 0 ? void 0 : _a$runtimeManager5.states[E.key];
29082
+ if ((ne === null || ne === void 0 ? void 0 : ne.status) !== "success") return {
29083
29083
  loading: "加载中",
29084
29084
  empty: "无数据",
29085
29085
  error: "加载失败",
29086
29086
  timeout: "加载超时",
29087
29087
  cancelled: "已取消",
29088
29088
  idle: "未加载"
29089
- }[(le === null || le === void 0 ? void 0 : le.status) ?? "idle"];
29090
- const me = get(le.data, X);
29089
+ }[(ne === null || ne === void 0 ? void 0 : ne.status) ?? "idle"];
29090
+ const me = get(ne.data, X);
29091
29091
  return E.returnType === "array" && Array.isArray(me) ? `${me.length} 条数据` : m(me);
29092
29092
  }
29093
29093
  function g(E) {
29094
29094
  var _a$runtimeManager6;
29095
29095
  const X = get((_a$runtimeManager6 = a.runtimeManager) === null || _a$runtimeManager6 === void 0 ? void 0 : _a$runtimeManager6.getResult(E.key), "DATA");
29096
- return Array.isArray(X) ? X.map((le, me) => ({
29096
+ return Array.isArray(X) ? X.map((ne, me) => ({
29097
29097
  __rowKey: me,
29098
- value: le
29098
+ value: ne
29099
29099
  })) : [];
29100
29100
  }
29101
- function k(E) {
29101
+ function w(E) {
29102
29102
  var _g$;
29103
- return (E.returnFields.length ? E.returnFields : Object.keys(Object(((_g$ = g(E)[0]) === null || _g$ === void 0 ? void 0 : _g$.value) ?? {})).map((le) => ({
29104
- key: le,
29105
- name: le
29106
- }))).map((le) => ({
29107
- key: le.key,
29108
- dataIndex: ["value", le.key],
29109
- title: le.name || le.key
29103
+ return (E.returnFields.length ? E.returnFields : Object.keys(Object(((_g$ = g(E)[0]) === null || _g$ === void 0 ? void 0 : _g$.value) ?? {})).map((ne) => ({
29104
+ key: ne,
29105
+ name: ne
29106
+ }))).map((ne) => ({
29107
+ key: ne.key,
29108
+ dataIndex: ["value", ne.key],
29109
+ title: ne.name || ne.key,
29110
+ customCell: () => ({ style: { minWidth: `${(ne.name || ne.key).length * 14 + 16}px` } })
29110
29111
  }));
29111
29112
  }
29112
29113
  async function v(E) {
@@ -29115,11 +29116,11 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29115
29116
  await ((_a$runtimeManager7 = a.runtimeManager) === null || _a$runtimeManager7 === void 0 ? void 0 : _a$runtimeManager7.reload(E));
29116
29117
  } catch {}
29117
29118
  }
29118
- function M() {
29119
+ function R() {
29119
29120
  var _a$runtimeManager8;
29120
29121
  return ((_a$runtimeManager8 = a.runtimeManager) === null || _a$runtimeManager8 === void 0 ? void 0 : _a$runtimeManager8.reloadAll()) ?? Promise.resolve([]);
29121
29122
  }
29122
- o({ refreshAll: M });
29123
+ o({ refreshAll: R });
29123
29124
  function q(E) {
29124
29125
  const X = new Set(d.value);
29125
29126
  X.has(E) ? X.delete(E) : X.add(E), d.value = X;
@@ -29127,7 +29128,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29127
29128
  function B(E) {
29128
29129
  E.style.height = "0";
29129
29130
  }
29130
- function O(E) {
29131
+ function T(E) {
29131
29132
  const X = E;
29132
29133
  X.style.height = `${X.scrollHeight}px`;
29133
29134
  }
@@ -29137,11 +29138,11 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29137
29138
  function A(E) {
29138
29139
  E.style.height = `${E.scrollHeight}px`;
29139
29140
  }
29140
- function T(E) {
29141
+ function O(E) {
29141
29142
  const X = E;
29142
29143
  X.offsetHeight, X.style.height = "0";
29143
29144
  }
29144
- function R(E) {
29145
+ function M(E) {
29145
29146
  return co(E);
29146
29147
  }
29147
29148
  function V() {
@@ -29153,13 +29154,13 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29153
29154
  function J(E) {
29154
29155
  const X = i.value.slice();
29155
29156
  if (h.value === "edit") {
29156
- const le = X.findIndex((me) => {
29157
+ const ne = X.findIndex((me) => {
29157
29158
  var _C$value3;
29158
29159
  return me.key === ((_C$value3 = C.value) === null || _C$value3 === void 0 ? void 0 : _C$value3.key);
29159
29160
  });
29160
- if (le >= 0) {
29161
- const me = X[le].key;
29162
- if (X.splice(le, 1, E), me !== E.key && d.value.has(me)) {
29161
+ if (ne >= 0) {
29162
+ const me = X[ne].key;
29163
+ if (X.splice(ne, 1, E), me !== E.key && d.value.has(me)) {
29163
29164
  const ue = new Set(d.value);
29164
29165
  ue.delete(me), ue.add(E.key), d.value = ue;
29165
29166
  }
@@ -29169,10 +29170,10 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29169
29170
  }
29170
29171
  function oe(E) {
29171
29172
  const X = new Set(d.value);
29172
- X.delete(E), d.value = X, n("update:modelValue", i.value.filter((le) => le.key !== E));
29173
+ X.delete(E), d.value = X, n("update:modelValue", i.value.filter((ne) => ne.key !== E));
29173
29174
  }
29174
29175
  return (E, X) => {
29175
- const le = resolveComponent("a-button"), me = resolveComponent("a-popconfirm"), ue = resolveComponent("a-table");
29176
+ const ne = resolveComponent("a-button"), me = resolveComponent("a-popconfirm"), ue = resolveComponent("a-table");
29176
29177
  return openBlock(), createElementBlock("div", { class: normalizeClass({ "data-sources--runtime": l.value }) }, [
29177
29178
  createElementVNode("div", wd, [createElementVNode("div", kd, [createElementVNode("button", {
29178
29179
  type: "button",
@@ -29218,7 +29219,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29218
29219
  ], 8, Td), l.value ? (openBlock(), createElementBlock("div", Vd, [createElementVNode("span", {
29219
29220
  class: normalizeClass(["data-sources__status", { "data-sources__status--error": S(Q.key) }]),
29220
29221
  title: (_e$runtimeManager = e.runtimeManager) === null || _e$runtimeManager === void 0 || (_e$runtimeManager = _e$runtimeManager.states[Q.key]) === null || _e$runtimeManager === void 0 ? void 0 : _e$runtimeManager.error
29221
- }, toDisplayString(w(Q)), 11, Ld), createVNode(le, {
29222
+ }, toDisplayString(k(Q)), 11, Ld), createVNode(ne, {
29222
29223
  type: "link",
29223
29224
  size: "small",
29224
29225
  loading: ((_e$runtimeManager2 = e.runtimeManager) === null || _e$runtimeManager2 === void 0 || (_e$runtimeManager2 = _e$runtimeManager2.states[Q.key]) === null || _e$runtimeManager2 === void 0 ? void 0 : _e$runtimeManager2.status) === "loading",
@@ -29246,13 +29247,13 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29246
29247
  }, 8, ["onConfirm"])]))]), createVNode(Transition, {
29247
29248
  name: "data-sources-collapse",
29248
29249
  onBeforeEnter: B,
29249
- onEnter: O,
29250
+ onEnter: T,
29250
29251
  onAfterEnter: L,
29251
29252
  onBeforeLeave: A,
29252
- onLeave: T
29253
+ onLeave: O
29253
29254
  }, {
29254
29255
  default: withCtx(() => [d.value.has(Q.key) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", Fd, [l.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
29255
- (openBlock(!0), createElementBlock(Fragment, null, renderList(R(Q), (ce) => {
29256
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(M(Q), (ce) => {
29256
29257
  var _e$runtimeManager4;
29257
29258
  return openBlock(), createElementBlock("div", {
29258
29259
  key: ce.key,
@@ -29274,8 +29275,10 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29274
29275
  }), 128)),
29275
29276
  Q.returnType === "array" && g(Q).length ? (openBlock(), createBlock(ue, {
29276
29277
  key: 0,
29278
+ class: "data-sources__dataset",
29279
+ "table-layout": "auto",
29277
29280
  size: "small",
29278
- columns: k(Q),
29281
+ columns: w(Q),
29279
29282
  "data-source": g(Q),
29280
29283
  "row-key": "__rowKey",
29281
29284
  pagination: !1,
@@ -29287,12 +29290,12 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29287
29290
  bodyCell: withCtx(({ text: ce }) => [createTextVNode(toDisplayString(m(ce)), 1)]),
29288
29291
  _: 1
29289
29292
  }, 8, ["columns", "data-source"])) : createCommentVNode("", !0),
29290
- R(Q).length ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", Id, "暂无返回字段"))
29293
+ M(Q).length ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", Id, "暂无返回字段"))
29291
29294
  ], 64)) : renderSlot(E.$slots, "item", {
29292
29295
  item: Q,
29293
29296
  index: Se
29294
29297
  }, () => [
29295
- (openBlock(!0), createElementBlock(Fragment, null, renderList(R(Q), (ce) => (openBlock(), createElementBlock("div", {
29298
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(M(Q), (ce) => (openBlock(), createElementBlock("div", {
29296
29299
  key: ce.key,
29297
29300
  class: "data-sources__field"
29298
29301
  }, [createElementVNode("span", {
@@ -29312,12 +29315,12 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29312
29315
  class: "data-sources__field-name",
29313
29316
  title: ce.name || ce.key
29314
29317
  }, toDisplayString(ce.name || ce.key), 9, Hd)]))), 128))], 64)) : createCommentVNode("", !0),
29315
- R(Q).length ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", jd, "暂无返回字段"))
29318
+ M(Q).length ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", jd, "暂无返回字段"))
29316
29319
  ], !0, 1)]))]),
29317
29320
  _: 2
29318
29321
  }, 1024)]);
29319
29322
  }), 128))])) : createCommentVNode("", !0),
29320
- l.value ? createCommentVNode("", !0) : (openBlock(), createBlock(le, {
29323
+ l.value ? createCommentVNode("", !0) : (openBlock(), createBlock(ne, {
29321
29324
  key: 1,
29322
29325
  block: "",
29323
29326
  class: "data-sources__add",
@@ -29343,7 +29346,7 @@ return { batchNo: $ctx.batchNo, equipName: equip.equipName };`;
29343
29346
  ], 2);
29344
29347
  };
29345
29348
  }
29346
- }), [["__scopeId", "data-v-ba2895ec"]]);
29349
+ }), [["__scopeId", "data-v-d2e8614f"]]);
29347
29350
  Zd = `
29348
29351
  const send = postMessage.bind(globalThis);
29349
29352
  const AsyncFunction = Object.getPrototypeOf(async function () {}).constructor;
@@ -29460,11 +29463,11 @@ onmessage = async ({ data }) => {
29460
29463
  },
29461
29464
  emits: ["confirm", "cancel"],
29462
29465
  setup(e, { emit: o }) {
29463
- function t(k) {
29464
- const v = co(k);
29465
- return k.returnType === "array" ? [...v, ...k.returnFields.map((M) => ({
29466
- ...M,
29467
- key: `DATA[].${M.key}`
29466
+ function t(w) {
29467
+ const v = co(w);
29468
+ return w.returnType === "array" ? [...v, ...w.returnFields.map((R) => ({
29469
+ ...R,
29470
+ key: `DATA[].${R.key}`
29468
29471
  }))] : v;
29469
29472
  }
29470
29473
  const a = e, n = o, l = reactive({
@@ -29476,28 +29479,44 @@ onmessage = async ({ data }) => {
29476
29479
  targetFieldKey: "",
29477
29480
  trigger: "sourceChange"
29478
29481
  }), s = computed(() => a.mode === "create" ? "新建字段填充" : "编辑填充"), f = ref(!1), i = ref(), r = computed(() => f.value ? "field-fill-editor-modal field-fill-editor-modal--fullscreen" : "field-fill-editor-modal");
29479
- function h(k, v = [], M = !1) {
29480
- return [...k].sort((q, B) => +!!q.children - +!!B.children).map((q) => {
29481
- const B = [...v, q.value], O = M || !!q.disabled, L = q.children ? h(q.children, B, O) : void 0;
29482
+ function h(w, v = [], R = !1) {
29483
+ const q = [...w].sort((A, O) => +!!A.children - +!!O.children).map((A) => {
29484
+ const O = [...v, A.value], M = R || !!A.disabled, V = A.children ? h(A.children, O, M) : void 0;
29482
29485
  return {
29483
- title: q.label,
29484
- value: B.join("."),
29486
+ title: A.label,
29487
+ value: O.join("."),
29485
29488
  selectable: !0,
29486
- disabled: O,
29487
- isLeaf: !L,
29488
- children: L
29489
+ disabled: M,
29490
+ isLeaf: !V,
29491
+ children: V
29489
29492
  };
29490
29493
  });
29494
+ if (v.length) return q;
29495
+ const B = new Set(w.filter((A) => A.objectField).map((A) => A.value)), T = q.filter((A) => B.has(A.value));
29496
+ if (!T.length) return q;
29497
+ const L = q.filter((A) => !B.has(A.value));
29498
+ return [
29499
+ ...L.filter((A) => !A.children),
29500
+ {
29501
+ title: "对象字段",
29502
+ value: "__field_fill_object_group__",
29503
+ selectable: !1,
29504
+ disabled: !1,
29505
+ isLeaf: !1,
29506
+ children: T
29507
+ },
29508
+ ...L.filter((A) => A.children)
29509
+ ];
29491
29510
  }
29492
29511
  const C = computed({
29493
29512
  get: () => l.targetFieldKey || void 0,
29494
- set: (k) => {
29495
- l.targetFieldKey = k;
29496
- const v = (M, q) => {
29497
- const B = M.find((O) => O.value === q[0]);
29513
+ set: (w) => {
29514
+ l.targetFieldKey = w;
29515
+ const v = (R, q) => {
29516
+ const B = R.find((T) => T.value === q[0]);
29498
29517
  return B ? [B.label, ...v(B.children ?? [], q.slice(1))] : [];
29499
29518
  };
29500
- l.targetFieldName = v(a.targetFieldOptions, k.split(".")).join(" / ");
29519
+ l.targetFieldName = v(a.targetFieldOptions, w.split(".")).join(" / ");
29501
29520
  }
29502
29521
  }), d = computed(() => h(a.targetFieldOptions)), m = [{
29503
29522
  required: !0,
@@ -29506,18 +29525,18 @@ onmessage = async ({ data }) => {
29506
29525
  }], S = computed(() => [{
29507
29526
  label: "内置上下文",
29508
29527
  key: "$ctx",
29509
- options: a.contextFields.map((k) => ({
29510
- label: `$ctx.${k.key}`,
29511
- value: JSON.stringify(["$ctx", k.key])
29528
+ options: a.contextFields.map((w) => ({
29529
+ label: `$ctx.${w.key}`,
29530
+ value: JSON.stringify(["$ctx", w.key])
29512
29531
  }))
29513
- }, ...a.dataSources.filter((k) => t(k).length).map((k) => ({
29514
- label: k.name || k.key,
29515
- key: k.key,
29516
- options: t(k).map((v) => ({
29517
- label: `${k.key}.${v.key}`,
29518
- value: JSON.stringify([k.key, ...v.key.split(".")])
29532
+ }, ...a.dataSources.filter((w) => t(w).length).map((w) => ({
29533
+ label: w.name || w.key,
29534
+ key: w.key,
29535
+ options: t(w).map((v) => ({
29536
+ label: `${w.key}.${v.key}`,
29537
+ value: JSON.stringify([w.key, ...v.key.split(".")])
29519
29538
  }))
29520
- }))]), w = [{
29539
+ }))]), k = [{
29521
29540
  required: !0,
29522
29541
  message: "请选择数源字段",
29523
29542
  trigger: "change"
@@ -29525,17 +29544,17 @@ onmessage = async ({ data }) => {
29525
29544
  get: () => {
29526
29545
  if (!l.source.fieldKey) return;
29527
29546
  if (l.source.type === "context") return JSON.stringify(["$ctx", l.source.fieldKey]);
29528
- const k = l.source.dataSourceKey ? [l.source.dataSourceKey, ...l.source.fieldKey.split(".")] : l.source.fieldKey.split(".");
29529
- return JSON.stringify(k);
29547
+ const w = l.source.dataSourceKey ? [l.source.dataSourceKey, ...l.source.fieldKey.split(".")] : l.source.fieldKey.split(".");
29548
+ return JSON.stringify(w);
29530
29549
  },
29531
- set: (k) => {
29532
- const v = JSON.parse(k), M = v.shift();
29533
- l.source.type = M === "$ctx" ? "context" : "dataSource", l.source.dataSourceKey = M === "$ctx" ? void 0 : M, l.source.fieldKey = v.join(".");
29550
+ set: (w) => {
29551
+ const v = JSON.parse(w), R = v.shift();
29552
+ l.source.type = R === "$ctx" ? "context" : "dataSource", l.source.dataSourceKey = R === "$ctx" ? void 0 : R, l.source.fieldKey = v.join(".");
29534
29553
  }
29535
29554
  });
29536
- watch(() => [a.visible, a.value], async ([k, v]) => {
29555
+ watch(() => [a.visible, a.value], async ([w, v]) => {
29537
29556
  var _i$value10;
29538
- k && (f.value = !1, Object.assign(l, {
29557
+ w && (f.value = !1, Object.assign(l, {
29539
29558
  id: "",
29540
29559
  source: {
29541
29560
  type: "dataSource",
@@ -29549,8 +29568,8 @@ onmessage = async ({ data }) => {
29549
29568
  var _i$value11;
29550
29569
  await ((_i$value11 = i.value) === null || _i$value11 === void 0 ? void 0 : _i$value11.validate().then(() => !0).catch(() => !1)) && n("confirm", cloneDeep(l));
29551
29570
  }
29552
- return (k, v) => {
29553
- const M = resolveComponent("a-tooltip"), q = resolveComponent("a-tree-select"), B = resolveComponent("a-form-item"), O = resolveComponent("a-select"), L = resolveComponent("a-radio"), A = resolveComponent("a-radio-group"), T = resolveComponent("a-form"), R = resolveComponent("a-button"), V = resolveComponent("a-modal");
29571
+ return (w, v) => {
29572
+ const R = resolveComponent("a-tooltip"), q = resolveComponent("a-tree-select"), B = resolveComponent("a-form-item"), T = resolveComponent("a-select"), L = resolveComponent("a-radio"), A = resolveComponent("a-radio-group"), O = resolveComponent("a-form"), M = resolveComponent("a-button"), V = resolveComponent("a-modal");
29554
29573
  return openBlock(), createBlock(V, {
29555
29574
  visible: e.visible,
29556
29575
  title: null,
@@ -29562,7 +29581,7 @@ onmessage = async ({ data }) => {
29562
29581
  onCancel: v[6] || (v[6] = (U) => n("cancel"))
29563
29582
  }, {
29564
29583
  default: withCtx(() => [createElementVNode("div", nf, [
29565
- createElementVNode("div", lf, [createElementVNode("span", null, toDisplayString(s.value), 1), createElementVNode("div", sf, [createVNode(M, { title: f.value ? "还原" : "最大化" }, {
29584
+ createElementVNode("div", lf, [createElementVNode("span", null, toDisplayString(s.value), 1), createElementVNode("div", sf, [createVNode(R, { title: f.value ? "还原" : "最大化" }, {
29566
29585
  default: withCtx(() => [createElementVNode("button", {
29567
29586
  type: "button",
29568
29587
  class: "field-fill-editor__icon-button",
@@ -29576,7 +29595,7 @@ onmessage = async ({ data }) => {
29576
29595
  "aria-label": "关闭",
29577
29596
  onClick: v[1] || (v[1] = (U) => n("cancel"))
29578
29597
  }, [createVNode(unref(CloseOutlined))])])]),
29579
- createVNode(T, {
29598
+ createVNode(O, {
29580
29599
  ref_key: "formRef",
29581
29600
  ref: i,
29582
29601
  class: "field-fill-editor__body",
@@ -29608,9 +29627,9 @@ onmessage = async ({ data }) => {
29608
29627
  createVNode(B, {
29609
29628
  label: "数源字段",
29610
29629
  name: ["source", "fieldKey"],
29611
- rules: w
29630
+ rules: k
29612
29631
  }, {
29613
- default: withCtx(() => [createVNode(O, {
29632
+ default: withCtx(() => [createVNode(T, {
29614
29633
  value: u.value,
29615
29634
  "onUpdate:value": v[3] || (v[3] = (U) => u.value = U),
29616
29635
  options: S.value,
@@ -29640,17 +29659,17 @@ onmessage = async ({ data }) => {
29640
29659
  }, 8, ["value"])]),
29641
29660
  _: 1
29642
29661
  }),
29643
- renderSlot(k.$slots, "extra", { value: l })
29662
+ renderSlot(w.$slots, "extra", { value: l })
29644
29663
  ]),
29645
29664
  _: 3
29646
29665
  }, 8, ["model"]),
29647
- createElementVNode("div", uf, [createVNode(R, {
29666
+ createElementVNode("div", uf, [createVNode(M, {
29648
29667
  size: "middle",
29649
29668
  onClick: v[5] || (v[5] = (U) => n("cancel"))
29650
29669
  }, {
29651
29670
  default: withCtx(() => [...v[9] || (v[9] = [createTextVNode("取消", -1)])]),
29652
29671
  _: 1
29653
- }), createVNode(R, {
29672
+ }), createVNode(M, {
29654
29673
  type: "primary",
29655
29674
  size: "middle",
29656
29675
  onClick: g
@@ -29700,7 +29719,7 @@ onmessage = async ({ data }) => {
29700
29719
  }
29701
29720
  function r(S) {
29702
29721
  var _t$dataSources$find;
29703
- return S.source.type === "context" ? "context" : S.source.type === "form" ? "form" : (_t$dataSources$find = t.dataSources.find((w) => w.key === S.source.dataSourceKey)) === null || _t$dataSources$find === void 0 ? void 0 : _t$dataSources$find.type;
29722
+ return S.source.type === "context" ? "context" : S.source.type === "form" ? "form" : (_t$dataSources$find = t.dataSources.find((k) => k.key === S.source.dataSourceKey)) === null || _t$dataSources$find === void 0 ? void 0 : _t$dataSources$find.type;
29704
29723
  }
29705
29724
  function h() {
29706
29725
  s.value = "create", f.value = void 0, l.value = !0;
@@ -29709,39 +29728,39 @@ onmessage = async ({ data }) => {
29709
29728
  s.value = "edit", f.value = cloneDeep(S), l.value = !0;
29710
29729
  }
29711
29730
  function d(S) {
29712
- const w = n.value.slice();
29731
+ const k = n.value.slice();
29713
29732
  if (s.value === "edit") {
29714
- const u = w.findIndex((g) => g.id === S.id);
29715
- u >= 0 && w.splice(u, 1, S);
29716
- } else S.id = `ff_${Date.now()}_${Math.random().toString(36).slice(-6)}`, w.push(S);
29717
- a("update:modelValue", w), l.value = !1;
29733
+ const u = k.findIndex((g) => g.id === S.id);
29734
+ u >= 0 && k.splice(u, 1, S);
29735
+ } else S.id = `ff_${Date.now()}_${Math.random().toString(36).slice(-6)}`, k.push(S);
29736
+ a("update:modelValue", k), l.value = !1;
29718
29737
  }
29719
29738
  function m(S) {
29720
- a("update:modelValue", n.value.filter((w) => w.id !== S));
29739
+ a("update:modelValue", n.value.filter((k) => k.id !== S));
29721
29740
  }
29722
- return (S, w) => {
29741
+ return (S, k) => {
29723
29742
  const u = resolveComponent("a-popconfirm"), g = resolveComponent("a-button");
29724
29743
  return openBlock(), createElementBlock("div", df, [
29725
- n.value.length ? (openBlock(), createElementBlock("div", ff, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (k) => (openBlock(), createElementBlock("div", {
29726
- key: k.id,
29744
+ n.value.length ? (openBlock(), createElementBlock("div", ff, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (w) => (openBlock(), createElementBlock("div", {
29745
+ key: w.id,
29727
29746
  class: "field-fills__item"
29728
29747
  }, [createElementVNode("div", pf, [
29729
- createElementVNode("strong", null, toDisplayString(k.targetFieldName || k.targetFieldKey), 1),
29730
- w[1] || (w[1] = createElementVNode("span", {
29748
+ createElementVNode("strong", null, toDisplayString(w.targetFieldName || w.targetFieldKey), 1),
29749
+ k[1] || (k[1] = createElementVNode("span", {
29731
29750
  class: "field-fills__arrow",
29732
29751
  "aria-hidden": "true"
29733
29752
  }, "←", -1)),
29734
- createElementVNode("span", mf, toDisplayString(i(k)), 1),
29735
- createVNode(Gt, { type: r(k) }, null, 8, ["type"])
29736
- ]), createElementVNode("div", vf, [createElementVNode("small", null, "触发:" + toDisplayString(k.trigger === "sourceChange" ? "数源字段变化时填充" : "打开表单时填充一次"), 1), createElementVNode("div", yf, [createElementVNode("button", {
29753
+ createElementVNode("span", mf, toDisplayString(i(w)), 1),
29754
+ createVNode(Gt, { type: r(w) }, null, 8, ["type"])
29755
+ ]), createElementVNode("div", vf, [createElementVNode("small", null, "触发:" + toDisplayString(w.trigger === "sourceChange" ? "数源字段变化时填充" : "打开表单时填充一次"), 1), createElementVNode("div", yf, [createElementVNode("button", {
29737
29756
  type: "button",
29738
29757
  class: "field-fills__action field-fills__action--edit",
29739
29758
  title: "编辑填充",
29740
29759
  "aria-label": "编辑填充",
29741
- onClick: (v) => C(k)
29760
+ onClick: (v) => C(w)
29742
29761
  }, [createVNode(unref(EditOutlined))], 8, gf), createVNode(u, {
29743
29762
  title: "确认删除该字段填充?",
29744
- onConfirm: (v) => m(k.id)
29763
+ onConfirm: (v) => m(w.id)
29745
29764
  }, {
29746
29765
  default: withCtx(() => [createElementVNode("button", _f, [createVNode(unref(DeleteOutlined))])]),
29747
29766
  _: 1
@@ -29751,7 +29770,7 @@ onmessage = async ({ data }) => {
29751
29770
  class: "field-fills__add",
29752
29771
  onClick: h
29753
29772
  }, {
29754
- default: withCtx(() => [...w[2] || (w[2] = [createTextVNode(" 新建字段填充 ", -1)])]),
29773
+ default: withCtx(() => [...k[2] || (k[2] = [createTextVNode(" 新建字段填充 ", -1)])]),
29755
29774
  _: 1
29756
29775
  }),
29757
29776
  createVNode(cf, {
@@ -29762,9 +29781,9 @@ onmessage = async ({ data }) => {
29762
29781
  "data-sources": e.dataSources,
29763
29782
  "context-fields": e.contextFields,
29764
29783
  onConfirm: d,
29765
- onCancel: w[0] || (w[0] = (k) => l.value = !1)
29784
+ onCancel: k[0] || (k[0] = (w) => l.value = !1)
29766
29785
  }, {
29767
- extra: withCtx((k) => [renderSlot(S.$slots, "extra", normalizeProps(guardReactiveProps(k)), void 0, !0)]),
29786
+ extra: withCtx((w) => [renderSlot(S.$slots, "extra", normalizeProps(guardReactiveProps(w)), void 0, !0)]),
29768
29787
  _: 3
29769
29788
  }, 8, [
29770
29789
  "visible",
@@ -29844,7 +29863,7 @@ onmessage = async ({ data }) => {
29844
29863
  t.mask ? "" : "gct-form-base-modal--maskless",
29845
29864
  l.value ? "gct-form-base-modal--fullscreen" : ""
29846
29865
  ].filter(Boolean).join(" ")), d = computed(() => {
29847
- const { title: v, wrapClassName: M, ...q } = n;
29866
+ const { title: v, wrapClassName: R, ...q } = n;
29848
29867
  return q;
29849
29868
  }), m = computed(() => {
29850
29869
  if (!(!t.draggable || l.value) && !(s.x === 0 && s.y === 0)) return { transform: `translate(${s.x}px, ${s.y}px)` };
@@ -29852,7 +29871,7 @@ onmessage = async ({ data }) => {
29852
29871
  function S() {
29853
29872
  s.x = 0, s.y = 0;
29854
29873
  }
29855
- function w() {
29874
+ function k() {
29856
29875
  t.fullscreen && (l.value = !l.value, S());
29857
29876
  }
29858
29877
  function u(v) {
@@ -29861,10 +29880,10 @@ onmessage = async ({ data }) => {
29861
29880
  function g() {
29862
29881
  document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", g);
29863
29882
  }
29864
- function k(v) {
29883
+ function w(v) {
29865
29884
  if (!t.draggable || l.value || v.button !== 0) return;
29866
- const M = v.target;
29867
- M.closest(".ant-modal-header") && (M.closest([
29885
+ const R = v.target;
29886
+ R.closest(".ant-modal-header") && (R.closest([
29868
29887
  "button",
29869
29888
  "a",
29870
29889
  "input",
@@ -29879,7 +29898,7 @@ onmessage = async ({ data }) => {
29879
29898
  v && (l.value = !1, S());
29880
29899
  }), onBeforeUnmount(() => {
29881
29900
  g();
29882
- }), (v, M) => (openBlock(), createBlock(unref(Modal), mergeProps({
29901
+ }), (v, R) => (openBlock(), createBlock(unref(Modal), mergeProps({
29883
29902
  centered: "",
29884
29903
  "ok-text": "确定",
29885
29904
  "cancel-text": "取消",
@@ -29888,9 +29907,9 @@ onmessage = async ({ data }) => {
29888
29907
  visible: e.visible,
29889
29908
  mask: e.mask,
29890
29909
  "wrap-class-name": C.value,
29891
- onCancel: M[1] || (M[1] = (q) => a("cancel", q)),
29892
- onOk: M[2] || (M[2] = (q) => a("ok", q)),
29893
- onAfterClose: M[3] || (M[3] = (q) => a("afterClose"))
29910
+ onCancel: R[1] || (R[1] = (q) => a("cancel", q)),
29911
+ onOk: R[2] || (R[2] = (q) => a("ok", q)),
29912
+ onAfterClose: R[3] || (R[3] = (q) => a("afterClose"))
29894
29913
  }), createSlots({
29895
29914
  title: withCtx(() => [createElementVNode("div", Rf, [
29896
29915
  e.draggable ? (openBlock(), createElementBlock("img", {
@@ -29904,8 +29923,8 @@ onmessage = async ({ data }) => {
29904
29923
  type: "button",
29905
29924
  class: "form-base-modal__fullscreen",
29906
29925
  title: l.value ? "退出全屏" : "全屏",
29907
- onMousedown: M[0] || (M[0] = withModifiers(() => {}, ["stop"])),
29908
- onClick: withModifiers(w, ["stop"])
29926
+ onMousedown: R[0] || (R[0] = withModifiers(() => {}, ["stop"])),
29927
+ onClick: withModifiers(k, ["stop"])
29909
29928
  }, [createElementVNode("img", {
29910
29929
  src: l.value ? unref(Sf) : unref(xf),
29911
29930
  alt: ""
@@ -29914,7 +29933,7 @@ onmessage = async ({ data }) => {
29914
29933
  modalRender: withCtx(({ originVNode: q }) => [createElementVNode("div", {
29915
29934
  class: normalizeClass(["form-base-modal__render", { "form-base-modal__render--draggable": e.draggable && !l.value }]),
29916
29935
  style: normalizeStyle(m.value),
29917
- onMousedown: k
29936
+ onMousedown: w
29918
29937
  }, [(openBlock(), createBlock(resolveDynamicComponent(q)))], 38)]),
29919
29938
  default: withCtx(() => [renderSlot(v.$slots, "default")]),
29920
29939
  _: 2
@@ -29953,14 +29972,14 @@ onmessage = async ({ data }) => {
29953
29972
  emits: ["update:formState"],
29954
29973
  setup(e) {
29955
29974
  const o = e, t = useModel(e, "formState"), a = ref([]), n = ref([]), l = ref([]), s = ref(!1), f = ref({}), i = /* @__PURE__ */ new WeakMap(), r = ref({}), h = ref(!1), C = ref(!1), d = ref(!1), m = ref({}), S = ref({});
29956
- let w = !1, u, g = !1, k, v = !1;
29957
- function M(I) {
29975
+ let k = !1, u, g = !1, w, v = !1;
29976
+ function R(I) {
29958
29977
  return [...new Set((I ?? "").split(",").map((H) => H.trim()).filter(Boolean))];
29959
29978
  }
29960
29979
  const q = computed(() => l.value.map((I) => ({
29961
29980
  ...I,
29962
- shopfloorIds: M(I.shopfloor_ids_)
29963
- }))), B = computed(() => new Map(q.value.map((I) => [I.id_, I]))), O = computed(() => q.value.filter((I) => I.operating_state_ === !0));
29981
+ shopfloorIds: R(I.shopfloor_ids_)
29982
+ }))), B = computed(() => new Map(q.value.map((I) => [I.id_, I]))), T = computed(() => q.value.filter((I) => I.operating_state_ === !0));
29964
29983
  function L(I) {
29965
29984
  return {
29966
29985
  label: I.name_ || I.code_ || I.id_,
@@ -29971,28 +29990,28 @@ onmessage = async ({ data }) => {
29971
29990
  function A(I, H) {
29972
29991
  return (H.searchText ?? H.label).toLowerCase().includes(I.trim().toLowerCase());
29973
29992
  }
29974
- function T(I) {
29975
- const H = O.value;
29976
- let ne;
29977
- if (!I.shopfloor_id_) ne = H.map(L);
29993
+ function O(I) {
29994
+ const H = T.value;
29995
+ let le;
29996
+ if (!I.shopfloor_id_) le = H.map(L);
29978
29997
  else {
29979
29998
  const we = f.value[I.__key], _e = (we === null || we === void 0 ? void 0 : we.shopfloorId) === I.shopfloor_id_ ? we.warehouses : H.filter((Ke) => Ke.shopfloorIds.includes(I.shopfloor_id_)), Je = H.filter((Ke) => !Ke.shopfloorIds.length);
29980
- ne = [...new Map([..._e, ...Je].map((Ke) => [Ke.id_, Ke])).values()].map(L);
29999
+ le = [...new Map([..._e, ...Je].map((Ke) => [Ke.id_, Ke])).values()].map(L);
29981
30000
  }
29982
30001
  const ge = B.value.get(I.warehouse_id_), de = ge ? L(ge) : a.value.find((we) => we.value === I.warehouse_id_);
29983
- return de ? E(ne, [de]) : ne;
30002
+ return de ? E(le, [de]) : le;
29984
30003
  }
29985
- function R(I) {
30004
+ function M(I) {
29986
30005
  var _B$value$get;
29987
- const H = ((_B$value$get = B.value.get(I.warehouse_id_)) === null || _B$value$get === void 0 ? void 0 : _B$value$get.shopfloorIds) ?? [], ne = n.value.filter((de) => de.enabled && (!H.length || H.includes(de.value))), ge = n.value.find((de) => de.value === I.shopfloor_id_);
29988
- return ge ? E(ne, [ge]) : ne;
30006
+ const H = ((_B$value$get = B.value.get(I.warehouse_id_)) === null || _B$value$get === void 0 ? void 0 : _B$value$get.shopfloorIds) ?? [], le = n.value.filter((de) => de.enabled && (!H.length || H.includes(de.value))), ge = n.value.find((de) => de.value === I.shopfloor_id_);
30007
+ return ge ? E(le, [ge]) : le;
29989
30008
  }
29990
30009
  function V(I) {
29991
30010
  const H = (i.get(I) ?? 0) + 1;
29992
30011
  return i.set(I, H), delete f.value[I.__key], () => !v && i.get(I) === H && t.value.consume_storage_entries_.includes(I) && t.value.consume_enabled_ !== !1 && t.value.consume_source_config_ !== "follow_common_policy";
29993
30012
  }
29994
- async function U(I, H, ne) {
29995
- if (await nextTick(), v || !ne()) return;
30013
+ async function U(I, H, le) {
30014
+ if (await nextTick(), v || !le()) return;
29996
30015
  const ge = t.value.consume_storage_entries_.indexOf(I), de = o.form;
29997
30016
  if (ge < 0 || !de || !H.length) return;
29998
30017
  const we = H.map((_e) => [
@@ -30004,8 +30023,8 @@ onmessage = async ({ data }) => {
30004
30023
  }
30005
30024
  async function J(I) {
30006
30025
  var _I$keyword, _ref;
30007
- const H = (_I$keyword = I.keyword) === null || _I$keyword === void 0 ? void 0 : _I$keyword.trim(), ne = { ...I.extraQuery ?? {} };
30008
- return H && (ne["name_.like"] = H, ne["code_.like"] = H), (((_ref = await ie.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
30026
+ const H = (_I$keyword = I.keyword) === null || _I$keyword === void 0 ? void 0 : _I$keyword.trim(), le = { ...I.extraQuery ?? {} };
30027
+ return H && (le["name_.like"] = H, le["code_.like"] = H), (((_ref = await ie.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
30009
30028
  modelCategory: lt,
30010
30029
  modelKey: I.modelKey,
30011
30030
  bsKey: "listByPage"
@@ -30014,7 +30033,7 @@ onmessage = async ({ data }) => {
30014
30033
  pageSize: 99,
30015
30034
  ...H ? { exp: "OR(name_.like,code_.like)" } : {},
30016
30035
  query: {
30017
- ...ne,
30036
+ ...le,
30018
30037
  "operating_state_.eq": !0
30019
30038
  }
30020
30039
  }) || {}) === null || _ref === void 0 ? void 0 : _ref.data) ?? []).map((de) => ({
@@ -30024,34 +30043,34 @@ onmessage = async ({ data }) => {
30024
30043
  }
30025
30044
  async function oe(I, H) {
30026
30045
  var _ref2;
30027
- const ne = [...new Set(H.filter(Boolean))];
30028
- return ne.length ? (((_ref2 = await ie.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey({
30046
+ const le = [...new Set(H.filter(Boolean))];
30047
+ return le.length ? (((_ref2 = await ie.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey({
30029
30048
  modelCategory: lt,
30030
30049
  modelKey: I,
30031
30050
  bsKey: "listByIds"
30032
- }, { ids: ne.join(",") }) || {}) === null || _ref2 === void 0 ? void 0 : _ref2.data) ?? []).map((de) => ({
30051
+ }, { ids: le.join(",") }) || {}) === null || _ref2 === void 0 ? void 0 : _ref2.data) ?? []).map((de) => ({
30033
30052
  label: de.name_ || de.code_,
30034
30053
  value: de.id_
30035
30054
  })) : [];
30036
30055
  }
30037
30056
  function E(I, H) {
30038
- const ne = /* @__PURE__ */ new Map();
30057
+ const le = /* @__PURE__ */ new Map();
30039
30058
  return [...I, ...H].forEach((ge) => {
30040
- (ge === null || ge === void 0 ? void 0 : ge.value) != null && ne.set(String(ge.value), ge);
30041
- }), Array.from(ne.values());
30059
+ (ge === null || ge === void 0 ? void 0 : ge.value) != null && le.set(String(ge.value), ge);
30060
+ }), Array.from(le.values());
30042
30061
  }
30043
- async function X(I, H, ne) {
30044
- const ge = [...new Set(ne.filter(Boolean))].filter((we) => !H.some((_e) => _e.value === we));
30062
+ async function X(I, H, le) {
30063
+ const ge = [...new Set(le.filter(Boolean))].filter((we) => !H.some((_e) => _e.value === we));
30045
30064
  if (!ge.length) return H;
30046
30065
  return E(H, await oe(I, ge));
30047
30066
  }
30048
- function le() {
30067
+ function ne() {
30049
30068
  return [t.value.default_warehouse_id_, ...(t.value.consume_storage_entries_ ?? []).map((I) => I.warehouse_id_)];
30050
30069
  }
30051
30070
  function me(I) {
30052
30071
  const H = [];
30053
- return t.value.default_warehouse_id_ === I && H.push(t.value.default_location_id_), (t.value.consume_storage_entries_ ?? []).forEach((ne) => {
30054
- ne.warehouse_id_ === I && H.push(ne.location_id_);
30072
+ return t.value.default_warehouse_id_ === I && H.push(t.value.default_location_id_), (t.value.consume_storage_entries_ ?? []).forEach((le) => {
30073
+ le.warehouse_id_ === I && H.push(le.location_id_);
30055
30074
  }), H;
30056
30075
  }
30057
30076
  async function ue(I) {
@@ -30061,15 +30080,15 @@ onmessage = async ({ data }) => {
30061
30080
  modelKey: "em_warehouse",
30062
30081
  keyword: I
30063
30082
  });
30064
- a.value = await X("em_warehouse", H, le());
30083
+ a.value = await X("em_warehouse", H, ne());
30065
30084
  } finally {
30066
30085
  h.value = !1;
30067
30086
  }
30068
30087
  }
30069
30088
  async function Q() {
30070
- if (k) return k;
30089
+ if (w) return w;
30071
30090
  if (!g) {
30072
- C.value = !0, k = (async () => {
30091
+ C.value = !0, w = (async () => {
30073
30092
  const I = await ie.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
30074
30093
  modelCategory: lt,
30075
30094
  modelKey: "em_shopfloor",
@@ -30083,9 +30102,9 @@ onmessage = async ({ data }) => {
30083
30102
  })), g = !0);
30084
30103
  })();
30085
30104
  try {
30086
- await k;
30105
+ await w;
30087
30106
  } finally {
30088
- k = void 0, C.value = !1;
30107
+ w = void 0, C.value = !1;
30089
30108
  }
30090
30109
  }
30091
30110
  }
@@ -30093,14 +30112,14 @@ onmessage = async ({ data }) => {
30093
30112
  if (H) {
30094
30113
  d.value = !0;
30095
30114
  try {
30096
- const ne = await J({
30115
+ const le = await J({
30097
30116
  modelKey: "em_location",
30098
30117
  keyword: I,
30099
30118
  extraQuery: { "warehouse_id_.eq": H }
30100
30119
  });
30101
30120
  r.value = {
30102
30121
  ...r.value,
30103
- [H]: await X("em_location", ne, me(H))
30122
+ [H]: await X("em_location", le, me(H))
30104
30123
  };
30105
30124
  } finally {
30106
30125
  d.value = !1;
@@ -30114,7 +30133,7 @@ onmessage = async ({ data }) => {
30114
30133
  Q(),
30115
30134
  Mt()
30116
30135
  ]), v) return;
30117
- const I = [...new Set(le().filter(Boolean))];
30136
+ const I = [...new Set(ne().filter(Boolean))];
30118
30137
  await Promise.all(I.map((H) => Se("", H)));
30119
30138
  } catch {
30120
30139
  v || message.error("消耗库存选项加载失败,请重试");
@@ -30172,20 +30191,20 @@ onmessage = async ({ data }) => {
30172
30191
  t.value.default_location_id_ = void 0, t.value.default_warehouse_id_ && Se("", t.value.default_warehouse_id_);
30173
30192
  }
30174
30193
  async function Ct(I) {
30175
- const H = V(I), ne = I.shopfloor_id_;
30176
- if (ne) try {
30194
+ const H = V(I), le = I.shopfloor_id_;
30195
+ if (le) try {
30177
30196
  const [, ge] = await Promise.all([Mt(), ie.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
30178
30197
  modelCategory: lt,
30179
30198
  modelKey: "em_warehouse",
30180
30199
  bsKey: "listAll"
30181
30200
  }, {}, { query: {
30182
30201
  "operating_state_.eq": !0,
30183
- "shopfloor_ids_.containAny": [ne]
30202
+ "shopfloor_ids_.containAny": [le]
30184
30203
  } })]);
30185
30204
  if (!H()) return;
30186
- const de = ((ge === null || ge === void 0 ? void 0 : ge.data) ?? []).filter((_e) => _e.operating_state_ === !0 && M(_e.shopfloor_ids_).includes(ne));
30205
+ const de = ((ge === null || ge === void 0 ? void 0 : ge.data) ?? []).filter((_e) => _e.operating_state_ === !0 && R(_e.shopfloor_ids_).includes(le));
30187
30206
  f.value[I.__key] = {
30188
- shopfloorId: ne,
30207
+ shopfloorId: le,
30189
30208
  warehouses: de
30190
30209
  };
30191
30210
  const we = new Map(l.value.map((_e) => [_e.id_, _e]));
@@ -30209,14 +30228,14 @@ onmessage = async ({ data }) => {
30209
30228
  }
30210
30229
  }
30211
30230
  async function Nt(I) {
30212
- const H = V(I), ne = I.warehouse_id_;
30231
+ const H = V(I), le = I.warehouse_id_;
30213
30232
  I.location_id_ = void 0;
30214
30233
  try {
30215
30234
  var _B$value$get2;
30216
30235
  if (await Promise.all([Mt(), Q()]), !H()) return;
30217
- const ge = ((_B$value$get2 = B.value.get(ne)) === null || _B$value$get2 === void 0 ? void 0 : _B$value$get2.shopfloorIds) ?? [];
30236
+ const ge = ((_B$value$get2 = B.value.get(le)) === null || _B$value$get2 === void 0 ? void 0 : _B$value$get2.shopfloorIds) ?? [];
30218
30237
  if (ge.length && (ge.includes(I.shopfloor_id_) || (I.shopfloor_id_ = ge[0]), await U(I, ["shopfloor_id_"], H), !H())) return;
30219
- ne && await Se("", ne);
30238
+ le && await Se("", le);
30220
30239
  } catch {
30221
30240
  H() && message.error("加载仓库关联数据失败,请重试");
30222
30241
  }
@@ -30273,14 +30292,14 @@ onmessage = async ({ data }) => {
30273
30292
  }
30274
30293
  async function Mt(I = !1) {
30275
30294
  if (u) return u;
30276
- if (!(w && !I)) {
30295
+ if (!(k && !I)) {
30277
30296
  s.value = !0, u = (async () => {
30278
30297
  const H = await ie.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({
30279
30298
  modelCategory: lt,
30280
30299
  modelKey: "em_warehouse",
30281
30300
  bsKey: "listAll"
30282
30301
  }, {}, {});
30283
- v || (l.value = (H === null || H === void 0 ? void 0 : H.data) ?? [], S.value = Object.fromEntries(l.value.map((ne) => [ne.id_, ne.location_management_enabled_])), f.value = {}, w = !0);
30302
+ v || (l.value = (H === null || H === void 0 ? void 0 : H.data) ?? [], S.value = Object.fromEntries(l.value.map((le) => [le.id_, le.location_management_enabled_])), f.value = {}, k = !0);
30284
30303
  })();
30285
30304
  try {
30286
30305
  await u;
@@ -30294,7 +30313,7 @@ onmessage = async ({ data }) => {
30294
30313
  }), onBeforeUnmount(() => {
30295
30314
  v = !0, Ie.cancel(), kt.cancel();
30296
30315
  }), (I, H) => {
30297
- const ne = resolveComponent("a-radio"), ge = resolveComponent("a-radio-group"), de = resolveComponent("a-form-item"), we = resolveComponent("a-select"), _e = resolveComponent("a-col"), Je = resolveComponent("a-row"), da = resolveComponent("a-button"), Ke = resolveComponent("a-table");
30316
+ const le = resolveComponent("a-radio"), ge = resolveComponent("a-radio-group"), de = resolveComponent("a-form-item"), we = resolveComponent("a-select"), _e = resolveComponent("a-col"), Je = resolveComponent("a-row"), da = resolveComponent("a-button"), Ke = resolveComponent("a-table");
30298
30317
  return openBlock(), createElementBlock(Fragment, null, [createVNode(de, {
30299
30318
  label: I.$t("sys.edhr.mcTable.consumeEnabled"),
30300
30319
  name: "consume_enabled_",
@@ -30305,10 +30324,10 @@ onmessage = async ({ data }) => {
30305
30324
  "onUpdate:value": H[0] || (H[0] = (ke) => t.value.consume_enabled_ = ke),
30306
30325
  onChange: Ro
30307
30326
  }, {
30308
- default: withCtx(() => [createVNode(ne, { value: !0 }, {
30327
+ default: withCtx(() => [createVNode(le, { value: !0 }, {
30309
30328
  default: withCtx(() => [createTextVNode(toDisplayString(I.$t("sys.true")), 1)]),
30310
30329
  _: 1
30311
- }), createVNode(ne, { value: !1 }, {
30330
+ }), createVNode(le, { value: !1 }, {
30312
30331
  default: withCtx(() => [createTextVNode(toDisplayString(I.$t("sys.false")), 1)]),
30313
30332
  _: 1
30314
30333
  })]),
@@ -30433,7 +30452,7 @@ onmessage = async ({ data }) => {
30433
30452
  "allow-clear": "",
30434
30453
  "filter-option": A,
30435
30454
  placeholder: I.$t("sys.chooseText"),
30436
- options: R(Me),
30455
+ options: M(Me),
30437
30456
  loading: C.value,
30438
30457
  disabled: t.value.consume_source_config_ === "follow_common_policy",
30439
30458
  onFocus: St,
@@ -30466,7 +30485,7 @@ onmessage = async ({ data }) => {
30466
30485
  "allow-clear": "",
30467
30486
  "filter-option": A,
30468
30487
  placeholder: I.$t("sys.chooseText"),
30469
- options: T(Me),
30488
+ options: O(Me),
30470
30489
  loading: s.value,
30471
30490
  disabled: t.value.consume_source_config_ === "follow_common_policy",
30472
30491
  onFocus: xt,
@@ -30769,11 +30788,11 @@ onmessage = async ({ data }) => {
30769
30788
  await ((_n$value9 = n.value) === null || _n$value9 === void 0 ? void 0 : _n$value9.validate());
30770
30789
  }
30771
30790
  return o({ validate: f }), (i, r) => {
30772
- const h = resolveComponent("a-select"), C = resolveComponent("a-form-item"), d = resolveComponent("a-switch"), m = resolveComponent("a-radio"), S = resolveComponent("a-radio-group"), w = resolveComponent("a-form");
30791
+ const h = resolveComponent("a-select"), C = resolveComponent("a-form-item"), d = resolveComponent("a-switch"), m = resolveComponent("a-radio"), S = resolveComponent("a-radio-group"), k = resolveComponent("a-form");
30773
30792
  return openBlock(), createElementBlock("div", null, [createVNode(unref(ve), null, {
30774
30793
  default: withCtx(() => [...r[5] || (r[5] = [createTextVNode("用料策略", -1)])]),
30775
30794
  _: 1
30776
- }), createVNode(w, {
30795
+ }), createVNode(k, {
30777
30796
  ref_key: "formRef",
30778
30797
  ref: n,
30779
30798
  model: a.value,
@@ -30911,43 +30930,43 @@ onmessage = async ({ data }) => {
30911
30930
  }]
30912
30931
  }), h = computed(() => !!t.bizOptions.editingItem), C = computed(() => !!Object.keys(i.value.parseRuleProps || {}).length), d = computed(() => t.bizOptions.objectFields.filter((v) => {
30913
30932
  var _t$bizOptions$configu, _t$bizOptions$configu2;
30914
- return h.value || !((_t$bizOptions$configu = t.bizOptions.configuredItems) === null || _t$bizOptions$configu === void 0 ? void 0 : _t$bizOptions$configu.length) ? !0 : !((_t$bizOptions$configu2 = t.bizOptions.configuredItems) === null || _t$bizOptions$configu2 === void 0 ? void 0 : _t$bizOptions$configu2.find((M) => M.objectField === v.key));
30933
+ return h.value || !((_t$bizOptions$configu = t.bizOptions.configuredItems) === null || _t$bizOptions$configu === void 0 ? void 0 : _t$bizOptions$configu.length) ? !0 : !((_t$bizOptions$configu2 = t.bizOptions.configuredItems) === null || _t$bizOptions$configu2 === void 0 ? void 0 : _t$bizOptions$configu2.find((R) => R.objectField === v.key));
30915
30934
  }).map((v) => ({
30916
30935
  label: v.name,
30917
30936
  value: v.key
30918
- }))), m = computed(() => i.value.objectField ? t.bizOptions.allFields.filter((k) => k.type === oa.REF && k.bizType === Ha.BOM_ENTRY_ID ? !1 : k.belongingObject === i.value.objectField) : []), S = computed(() => m.value.map((k) => ({
30919
- key: k.key,
30920
- name: k.name,
30921
- field: k
30922
- }))), w = (k, v) => {
30937
+ }))), m = computed(() => i.value.objectField ? t.bizOptions.allFields.filter((w) => w.type === oa.REF && w.bizType === Ha.BOM_ENTRY_ID ? !1 : w.belongingObject === i.value.objectField) : []), S = computed(() => m.value.map((w) => ({
30938
+ key: w.key,
30939
+ name: w.name,
30940
+ field: w
30941
+ }))), k = (w, v) => {
30923
30942
  i.value.values = {
30924
30943
  ...i.value.values,
30925
- [k]: v
30944
+ [w]: v
30926
30945
  };
30927
30946
  }, u = () => {
30928
30947
  G2("PARSE_RULE_MODAL", {
30929
30948
  config: i.value.parseRuleProps,
30930
- formFieldOptions: m.value.map((k) => ({
30931
- label: k.name,
30932
- value: k.key
30949
+ formFieldOptions: m.value.map((w) => ({
30950
+ label: w.name,
30951
+ value: w.key
30933
30952
  })),
30934
30953
  formFieldsLabel: "对象字段",
30935
30954
  ruleTip: "默认条码映射字段:条码批次映射批次字段,条码物料编码映射物料编码字段,条码有效期映射有效期字段"
30936
- }).then((k) => {
30937
- k.success && (i.value.parseRuleProps = k.result ?? {});
30955
+ }).then((w) => {
30956
+ w.success && (i.value.parseRuleProps = w.result ?? {});
30938
30957
  });
30939
30958
  };
30940
- watch(() => t.bizOptions.editingItem, (k) => {
30941
- if (!k) return;
30942
- const v = f(), M = cloneDeep(k);
30959
+ watch(() => t.bizOptions.editingItem, (w) => {
30960
+ if (!w) return;
30961
+ const v = f(), R = cloneDeep(w);
30943
30962
  i.value = {
30944
30963
  ...v,
30945
- ...M,
30946
- values: M.values ?? v.values,
30947
- parseRuleProps: M.parseRuleProps ?? v.parseRuleProps,
30948
- consume_source_config_: M.consume_source_config_ ?? v.consume_source_config_,
30949
- qty_validation_rule_: M.qty_validation_rule_ ?? v.qty_validation_rule_,
30950
- consume_storage_entries_: (M.consume_storage_entries_ ?? []).map((q) => ({
30964
+ ...R,
30965
+ values: R.values ?? v.values,
30966
+ parseRuleProps: R.parseRuleProps ?? v.parseRuleProps,
30967
+ consume_source_config_: R.consume_source_config_ ?? v.consume_source_config_,
30968
+ qty_validation_rule_: R.qty_validation_rule_ ?? v.qty_validation_rule_,
30969
+ consume_storage_entries_: (R.consume_storage_entries_ ?? []).map((q) => ({
30951
30970
  ...q,
30952
30971
  __key: q.__key || Ze(8)
30953
30972
  }))
@@ -30960,16 +30979,16 @@ onmessage = async ({ data }) => {
30960
30979
  } catch {
30961
30980
  return;
30962
30981
  }
30963
- const k = t.bizOptions.objectFields.find((v) => v.key === i.value.objectField);
30964
- i.value.objectFieldName = k === null || k === void 0 ? void 0 : k.name, i.value.objectBizType = k === null || k === void 0 ? void 0 : k.bizType, t.modalInst.confirm(i.value);
30982
+ const w = t.bizOptions.objectFields.find((v) => v.key === i.value.objectField);
30983
+ i.value.objectFieldName = w === null || w === void 0 ? void 0 : w.name, i.value.objectBizType = w === null || w === void 0 ? void 0 : w.bizType, t.modalInst.confirm(i.value);
30965
30984
  };
30966
- return (k, v) => {
30967
- const M = resolveComponent("a-select"), q = resolveComponent("a-form-item"), B = resolveComponent("a-form"), O = resolveComponent("a-switch"), L = resolveComponent("a-button"), A = resolveComponent("a-select-option");
30985
+ return (w, v) => {
30986
+ const R = resolveComponent("a-select"), q = resolveComponent("a-form-item"), B = resolveComponent("a-form"), T = resolveComponent("a-switch"), L = resolveComponent("a-button"), A = resolveComponent("a-select-option");
30968
30987
  return openBlock(), createBlock(wt, mergeProps(e.modalProps, {
30969
30988
  visible: e.modalVisible,
30970
30989
  onCancel: e.modalInst.cancel,
30971
30990
  onOk: g,
30972
- onAfterClose: v[4] || (v[4] = (T) => a("afterClose"))
30991
+ onAfterClose: v[4] || (v[4] = (O) => a("afterClose"))
30973
30992
  }), {
30974
30993
  default: withCtx(() => [
30975
30994
  createVNode(B, {
@@ -30984,9 +31003,9 @@ onmessage = async ({ data }) => {
30984
31003
  name: "objectField",
30985
31004
  required: ""
30986
31005
  }, {
30987
- default: withCtx(() => [createVNode(M, {
31006
+ default: withCtx(() => [createVNode(R, {
30988
31007
  value: i.value.objectField,
30989
- "onUpdate:value": v[0] || (v[0] = (T) => i.value.objectField = T),
31008
+ "onUpdate:value": v[0] || (v[0] = (O) => i.value.objectField = O),
30990
31009
  placeholder: "请选择",
30991
31010
  options: d.value,
30992
31011
  disabled: h.value
@@ -31006,11 +31025,11 @@ onmessage = async ({ data }) => {
31006
31025
  class: "object-table",
31007
31026
  data: S.value
31008
31027
  }, r.value), {
31009
- value_default: withCtx(({ row: T }) => [e.bizOptions.RenderFieldWrapper ? (openBlock(), createBlock(resolveDynamicComponent(e.bizOptions.RenderFieldWrapper), {
31028
+ value_default: withCtx(({ row: O }) => [e.bizOptions.RenderFieldWrapper ? (openBlock(), createBlock(resolveDynamicComponent(e.bizOptions.RenderFieldWrapper), {
31010
31029
  key: 0,
31011
- field: T.field,
31012
- modelValue: i.value.values[T.key],
31013
- "onUpdate:modelValue": (R) => w(T.key, R)
31030
+ field: O.field,
31031
+ modelValue: i.value.values[O.key],
31032
+ "onUpdate:modelValue": (M) => k(O.key, M)
31014
31033
  }, null, 8, [
31015
31034
  "field",
31016
31035
  "modelValue",
@@ -31030,10 +31049,10 @@ onmessage = async ({ data }) => {
31030
31049
  label: "是否启用条码解析规则",
31031
31050
  name: "disableBarcodeParsing"
31032
31051
  }, {
31033
- default: withCtx(() => [createVNode(O, {
31052
+ default: withCtx(() => [createVNode(T, {
31034
31053
  size: "small",
31035
31054
  checked: !i.value.disableBarcodeParsing,
31036
- onChange: v[1] || (v[1] = (T) => i.value.disableBarcodeParsing = !i.value.disableBarcodeParsing)
31055
+ onChange: v[1] || (v[1] = (O) => i.value.disableBarcodeParsing = !i.value.disableBarcodeParsing)
31037
31056
  }, null, 8, ["checked"])]),
31038
31057
  _: 1
31039
31058
  }), i.value.disableBarcodeParsing ? (openBlock(), createBlock(q, {
@@ -31045,16 +31064,16 @@ onmessage = async ({ data }) => {
31045
31064
  message: "请选择参数"
31046
31065
  }]
31047
31066
  }, {
31048
- default: withCtx(() => [createVNode(M, {
31067
+ default: withCtx(() => [createVNode(R, {
31049
31068
  value: i.value.scanParamType,
31050
- "onUpdate:value": v[2] || (v[2] = (T) => i.value.scanParamType = T),
31051
- placeholder: k.$t("sys.chooseText")
31069
+ "onUpdate:value": v[2] || (v[2] = (O) => i.value.scanParamType = O),
31070
+ placeholder: w.$t("sys.chooseText")
31052
31071
  }, {
31053
- default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(Xt)), (T) => (openBlock(), createBlock(A, {
31054
- key: T,
31055
- value: T
31072
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(Object.values(unref(Xt)), (O) => (openBlock(), createBlock(A, {
31073
+ key: O,
31074
+ value: O
31056
31075
  }, {
31057
- default: withCtx(() => [createTextVNode(toDisplayString(k.$t(`sys.ScanParamType.${T}`)), 1)]),
31076
+ default: withCtx(() => [createTextVNode(toDisplayString(w.$t(`sys.ScanParamType.${O}`)), 1)]),
31058
31077
  _: 2
31059
31078
  }, 1032, ["value"]))), 128))]),
31060
31079
  _: 1
@@ -31076,7 +31095,7 @@ onmessage = async ({ data }) => {
31076
31095
  ref_key: "materialStrategyRef",
31077
31096
  ref: l,
31078
31097
  "form-state": i.value,
31079
- "onUpdate:formState": v[3] || (v[3] = (T) => i.value = T),
31098
+ "onUpdate:formState": v[3] || (v[3] = (O) => i.value = O),
31080
31099
  showConsumePolicy: e.bizOptions.showConsumePolicy,
31081
31100
  hasBomCofig: e.bizOptions.showMaterialStrategy
31082
31101
  }, null, 8, [
@@ -31178,9 +31197,9 @@ onmessage = async ({ data }) => {
31178
31197
  i.value = [], n("ruleConfigChange", void 0);
31179
31198
  return;
31180
31199
  }
31181
- i.value = g.fieldList.map((k) => ({
31182
- label: k.alias ?? $t(`sys.edhr.labelConfigFields.${k.type}`),
31183
- value: k.key
31200
+ i.value = g.fieldList.map((w) => ({
31201
+ label: w.alias ?? $t(`sys.edhr.labelConfigFields.${w.type}`),
31202
+ value: w.key
31184
31203
  })), n("ruleConfigChange", g);
31185
31204
  }, d = (u) => {
31186
31205
  if (a.disabled) return;
@@ -31190,9 +31209,9 @@ onmessage = async ({ data }) => {
31190
31209
  a.disabled || (r.fillMapArr.push({ formFields: [] }), h());
31191
31210
  }, S = (u) => {
31192
31211
  a.disabled || (r.fillMapArr.splice(u, 1), h());
31193
- }, w = (u, g) => {
31194
- const k = u.trim().toLowerCase();
31195
- return k ? g.label.toLowerCase().includes(k) || String(g.value ?? "").toLowerCase().includes(k) : !0;
31212
+ }, k = (u, g) => {
31213
+ const w = u.trim().toLowerCase();
31214
+ return w ? g.label.toLowerCase().includes(w) || String(g.value ?? "").toLowerCase().includes(w) : !0;
31196
31215
  };
31197
31216
  return onMounted(() => {
31198
31217
  r.parsingRuleId && C(r.parsingRuleId);
@@ -31200,14 +31219,14 @@ onmessage = async ({ data }) => {
31200
31219
  var _s$value6;
31201
31220
  return (_s$value6 = s.value) === null || _s$value6 === void 0 ? void 0 : _s$value6.validate();
31202
31221
  } }), (u, g) => {
31203
- const k = resolveComponent("a-form-item"), v = resolveComponent("a-alert"), M = resolveComponent("a-select"), q = resolveComponent("a-button"), B = resolveComponent("a-form");
31222
+ const w = resolveComponent("a-form-item"), v = resolveComponent("a-alert"), R = resolveComponent("a-select"), q = resolveComponent("a-button"), B = resolveComponent("a-form");
31204
31223
  return openBlock(), createElementBlock("div", { class: normalizeClass(["field-mapping", { "field-mapping--bordered": e.bordered }]) }, [createVNode(B, {
31205
31224
  ref_key: "formRef",
31206
31225
  ref: s,
31207
31226
  model: r,
31208
31227
  layout: "horizontal"
31209
31228
  }, {
31210
- default: withCtx(() => [createVNode(k, {
31229
+ default: withCtx(() => [createVNode(w, {
31211
31230
  class: "field-mapping__rule",
31212
31231
  label: u.$t("sys.edhr.mcTable.parseRule") + ":",
31213
31232
  name: "parsingRuleId"
@@ -31223,7 +31242,7 @@ onmessage = async ({ data }) => {
31223
31242
  }, null, 8, ["model-value", "disabled"]), e.collapsible ? (openBlock(), createElementBlock("div", {
31224
31243
  key: 0,
31225
31244
  class: "field-mapping__expand primary-gct",
31226
- onClick: g[0] || (g[0] = (O) => f.value = !f.value)
31245
+ onClick: g[0] || (g[0] = (T) => f.value = !f.value)
31227
31246
  }, [createTextVNode(toDisplayString(f.value ? u.$t("sys.collapseConfig") : u.$t("sys.expandConfig")) + " ", 1), createElementVNode("i", { class: normalizeClass(["iconfont ml4px", f.value ? "icon-arrow_up_pad" : "icon-arrow_down_pad"]) }, null, 2)])) : createCommentVNode("", !0)])]),
31228
31247
  _: 1
31229
31248
  }, 8, ["label"]), withDirectives(createElementVNode("div", null, [
@@ -31240,11 +31259,11 @@ onmessage = async ({ data }) => {
31240
31259
  }, null, 8, ["message"])])) : createCommentVNode("", !0),
31241
31260
  createElementVNode("div", s2, [
31242
31261
  r.fillMapArr.length ? (openBlock(), createElementBlock("div", r2, [createElementVNode("div", i2, toDisplayString(u.$t("sys.onlineForm.barcodeField")), 1), createElementVNode("div", u2, toDisplayString(e.formFieldsLabel || u.$t("sys.onlineForm.formFields")), 1)])) : createCommentVNode("", !0),
31243
- createElementVNode("div", c2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.fillMapArr, (O, L) => (openBlock(), createElementBlock("div", {
31262
+ createElementVNode("div", c2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.fillMapArr, (T, L) => (openBlock(), createElementBlock("div", {
31244
31263
  key: L,
31245
31264
  class: "field-mapping__row"
31246
31265
  }, [
31247
- createVNode(k, {
31266
+ createVNode(w, {
31248
31267
  class: "field-mapping__barcodeField",
31249
31268
  name: [
31250
31269
  "fillMapArr",
@@ -31256,9 +31275,9 @@ onmessage = async ({ data }) => {
31256
31275
  message: u.$t("sys.chooseText")
31257
31276
  }]
31258
31277
  }, {
31259
- default: withCtx(() => [createVNode(M, {
31260
- value: O.barcodeField,
31261
- "onUpdate:value": (A) => O.barcodeField = A,
31278
+ default: withCtx(() => [createVNode(R, {
31279
+ value: T.barcodeField,
31280
+ "onUpdate:value": (A) => T.barcodeField = A,
31262
31281
  placeholder: u.$t("sys.chooseText"),
31263
31282
  options: i.value,
31264
31283
  disabled: e.disabled,
@@ -31273,7 +31292,7 @@ onmessage = async ({ data }) => {
31273
31292
  _: 2
31274
31293
  }, 1032, ["name", "rules"]),
31275
31294
  g[1] || (g[1] = createElementVNode("div", { class: "field-mapping__divider" }, [createElementVNode("i", { class: "gct-iconfont icon-lianjie field-mapping__link-icon" })], -1)),
31276
- createVNode(k, {
31295
+ createVNode(w, {
31277
31296
  class: "field-mapping__formFields",
31278
31297
  name: [
31279
31298
  "fillMapArr",
@@ -31287,15 +31306,15 @@ onmessage = async ({ data }) => {
31287
31306
  message: u.$t("sys.chooseText")
31288
31307
  }]
31289
31308
  }, {
31290
- default: withCtx(() => [createVNode(M, {
31291
- value: O.formFields,
31292
- "onUpdate:value": (A) => O.formFields = A,
31309
+ default: withCtx(() => [createVNode(R, {
31310
+ value: T.formFields,
31311
+ "onUpdate:value": (A) => T.formFields = A,
31293
31312
  mode: "multiple",
31294
31313
  "allow-clear": "",
31295
31314
  "show-search": "",
31296
31315
  placeholder: u.$t("sys.chooseText"),
31297
31316
  options: e.formFieldOptions,
31298
- "filter-option": w,
31317
+ "filter-option": k,
31299
31318
  disabled: e.disabled,
31300
31319
  onChange: h
31301
31320
  }, null, 8, [
@@ -31369,11 +31388,11 @@ onmessage = async ({ data }) => {
31369
31388
  parsedValue: C,
31370
31389
  transformedData: d,
31371
31390
  type: t.bizOptions.showScanAdjustBtn ? n.value : void 0
31372
- }, w = await t.bizOptions.onScan(S);
31373
- s.value.str = "", w && t.modalInst.cancel();
31391
+ }, k = await t.bizOptions.onScan(S);
31392
+ s.value.str = "", k && t.modalInst.cancel();
31374
31393
  };
31375
31394
  return (C, d) => {
31376
- const m = resolveComponent("a-input"), S = resolveComponent("a-form-item"), w = resolveComponent("a-form"), u = resolveComponent("a-divider");
31395
+ const m = resolveComponent("a-input"), S = resolveComponent("a-form-item"), k = resolveComponent("a-form"), u = resolveComponent("a-divider");
31377
31396
  return openBlock(), createBlock(wt, mergeProps(t.modalProps, {
31378
31397
  class: "gct-form-base-modal-common-scan",
31379
31398
  visible: t.modalVisible,
@@ -31394,7 +31413,7 @@ onmessage = async ({ data }) => {
31394
31413
  class: normalizeClass(["bg-radio-item", [n.value === "minus" && "active"]]),
31395
31414
  onClick: d[1] || (d[1] = (g) => i("minus"))
31396
31415
  }, [...d[7] || (d[7] = [createElementVNode("i", { class: "iconfont icon-jiantouxia_arrow-down" }, null, -1), createTextVNode(" " + toDisplayString("减去实盘数量"), -1)])], 2)])) : createCommentVNode("", !0),
31397
- createVNode(w, {
31416
+ createVNode(k, {
31398
31417
  ref: "formRef",
31399
31418
  model: s.value,
31400
31419
  layout: "horizontal"
@@ -31492,38 +31511,38 @@ onmessage = async ({ data }) => {
31492
31511
  width: 88
31493
31512
  }
31494
31513
  ];
31495
- function l(w) {
31496
- return w ? w.split(":")[0] : "";
31514
+ function l(k) {
31515
+ return k ? k.split(":")[0] : "";
31497
31516
  }
31498
- function s(w, u) {
31499
- return !w || !u ? !1 : w === u ? !0 : l(w) === l(u);
31517
+ function s(k, u) {
31518
+ return !k || !u ? !1 : k === u ? !0 : l(k) === l(u);
31500
31519
  }
31501
- function f(w, u) {
31520
+ function f(k, u) {
31502
31521
  var _o$hasIds;
31503
- const g = u ?? w.product_id_;
31504
- return g ? ((_o$hasIds = o.hasIds) === null || _o$hasIds === void 0 ? void 0 : _o$hasIds.includes(g)) ? $t("sys.edhr.mcTable.materialAlreadyExists") : s(g, t.value.product_id_) ? $t("sys.edhr.mcTable.substituteContainsMainMaterial") : (t.value.substitute_material_entries_ ?? []).some((v) => v.__key !== w.__key && s(v.product_id_, g)) ? $t("sys.edhr.mcTable.substituteMaterialDuplicated") : "" : "";
31522
+ const g = u ?? k.product_id_;
31523
+ return g ? ((_o$hasIds = o.hasIds) === null || _o$hasIds === void 0 ? void 0 : _o$hasIds.includes(g)) ? $t("sys.edhr.mcTable.materialAlreadyExists") : s(g, t.value.product_id_) ? $t("sys.edhr.mcTable.substituteContainsMainMaterial") : (t.value.substitute_material_entries_ ?? []).some((v) => v.__key !== k.__key && s(v.product_id_, g)) ? $t("sys.edhr.mcTable.substituteMaterialDuplicated") : "" : "";
31505
31524
  }
31506
- function i(w) {
31525
+ function i(k) {
31507
31526
  return [{
31508
31527
  required: !0,
31509
31528
  message: $t("sys.pleaseSelectSth", { sth: $t("sys.material") })
31510
31529
  }, { validator: async (u, g) => {
31511
- const k = f(w, g);
31512
- if (k) return Promise.reject(k);
31530
+ const w = f(k, g);
31531
+ if (w) return Promise.reject(w);
31513
31532
  } }];
31514
31533
  }
31515
- function r(w) {
31516
- const u = (w === null || w === void 0 ? void 0 : w._info) ?? {}, g = ((w === null || w === void 0 ? void 0 : w.displayLabel) || "").split(":"), k = g.length > 1 ? g[0] : typeof (w === null || w === void 0 ? void 0 : w.title) == "string" ? w.title : "";
31534
+ function r(k) {
31535
+ const u = (k === null || k === void 0 ? void 0 : k._info) ?? {}, g = ((k === null || k === void 0 ? void 0 : k.displayLabel) || "").split(":"), w = g.length > 1 ? g[0] : typeof (k === null || k === void 0 ? void 0 : k.title) == "string" ? k.title : "";
31517
31536
  return {
31518
31537
  product_code_: u.code_ ?? "",
31519
- product_name_: u.name_ ?? k ?? "",
31538
+ product_name_: u.name_ ?? w ?? "",
31520
31539
  product_version_: u.version_ ?? u.__LABEL__ ?? "",
31521
31540
  product_spec_: u.spec_ ?? u.specification_ ?? ""
31522
31541
  };
31523
31542
  }
31524
- function h(w, u) {
31525
- return w ? {
31526
- product_id_: w,
31543
+ function h(k, u) {
31544
+ return k ? {
31545
+ product_id_: k,
31527
31546
  ...r(u)
31528
31547
  } : {
31529
31548
  product_id_: void 0,
@@ -31535,15 +31554,15 @@ onmessage = async ({ data }) => {
31535
31554
  }
31536
31555
  function C() {
31537
31556
  var _o$form;
31538
- const w = (t.value.substitute_material_entries_ ?? []).map((u, g) => [
31557
+ const k = (t.value.substitute_material_entries_ ?? []).map((u, g) => [
31539
31558
  "substitute_material_entries_",
31540
31559
  g,
31541
31560
  "product_id_"
31542
31561
  ]);
31543
- if (w.length) return (_o$form = o.form) === null || _o$form === void 0 ? void 0 : _o$form.validateFields(w).catch(() => {});
31562
+ if (k.length) return (_o$form = o.form) === null || _o$form === void 0 ? void 0 : _o$form.validateFields(k).catch(() => {});
31544
31563
  }
31545
- function d(w, u, g) {
31546
- Object.assign(w, h(u ?? null, g)), nextTick(() => C());
31564
+ function d(k, u, g) {
31565
+ Object.assign(k, h(u ?? null, g)), nextTick(() => C());
31547
31566
  }
31548
31567
  function m() {
31549
31568
  t.value.substitute_material_entries_.push({
@@ -31556,27 +31575,27 @@ onmessage = async ({ data }) => {
31556
31575
  qty_required_: t.value.qty_required_ ?? 0
31557
31576
  });
31558
31577
  }
31559
- function S(w) {
31560
- t.value.substitute_material_entries_.splice(w, 1), nextTick(() => C());
31578
+ function S(k) {
31579
+ t.value.substitute_material_entries_.splice(k, 1), nextTick(() => C());
31561
31580
  }
31562
31581
  return watch(() => t.value.product_id_, () => {
31563
31582
  nextTick(() => C());
31564
- }), (w, u) => {
31565
- const g = resolveComponent("a-radio"), k = resolveComponent("a-radio-group"), v = resolveComponent("a-form-item"), M = resolveComponent("a-select"), q = resolveComponent("a-col"), B = resolveComponent("a-row"), O = resolveComponent("a-button"), L = resolveComponent("a-table");
31583
+ }), (k, u) => {
31584
+ const g = resolveComponent("a-radio"), w = resolveComponent("a-radio-group"), v = resolveComponent("a-form-item"), R = resolveComponent("a-select"), q = resolveComponent("a-col"), B = resolveComponent("a-row"), T = resolveComponent("a-button"), L = resolveComponent("a-table");
31566
31585
  return openBlock(), createElementBlock(Fragment, null, [createVNode(v, {
31567
- label: w.$t("sys.edhr.mcTable.substituteMaterialEnabled"),
31586
+ label: k.$t("sys.edhr.mcTable.substituteMaterialEnabled"),
31568
31587
  name: "substitute_material_enabled_",
31569
- rules: [unref(Te)(w.$t("sys.edhr.mcTable.substituteMaterialEnabled"))]
31588
+ rules: [unref(Te)(k.$t("sys.edhr.mcTable.substituteMaterialEnabled"))]
31570
31589
  }, {
31571
- default: withCtx(() => [createVNode(k, {
31590
+ default: withCtx(() => [createVNode(w, {
31572
31591
  value: t.value.substitute_material_enabled_,
31573
31592
  "onUpdate:value": u[0] || (u[0] = (A) => t.value.substitute_material_enabled_ = A)
31574
31593
  }, {
31575
31594
  default: withCtx(() => [createVNode(g, { value: !0 }, {
31576
- default: withCtx(() => [createTextVNode(toDisplayString(w.$t("sys.true")), 1)]),
31595
+ default: withCtx(() => [createTextVNode(toDisplayString(k.$t("sys.true")), 1)]),
31577
31596
  _: 1
31578
31597
  }), createVNode(g, { value: !1 }, {
31579
- default: withCtx(() => [createTextVNode(toDisplayString(w.$t("sys.false")), 1)]),
31598
+ default: withCtx(() => [createTextVNode(toDisplayString(k.$t("sys.false")), 1)]),
31580
31599
  _: 1
31581
31600
  })]),
31582
31601
  _: 1
@@ -31586,14 +31605,14 @@ onmessage = async ({ data }) => {
31586
31605
  createVNode(B, { gutter: 16 }, {
31587
31606
  default: withCtx(() => [createVNode(q, { span: 12 }, {
31588
31607
  default: withCtx(() => [createVNode(v, {
31589
- label: w.$t("sys.edhr.mcTable.substitutePolicy"),
31608
+ label: k.$t("sys.edhr.mcTable.substitutePolicy"),
31590
31609
  name: "substitute_policy_",
31591
31610
  required: ""
31592
31611
  }, {
31593
- default: withCtx(() => [createVNode(M, {
31612
+ default: withCtx(() => [createVNode(R, {
31594
31613
  value: t.value.substitute_policy_,
31595
31614
  "onUpdate:value": u[1] || (u[1] = (A) => t.value.substitute_policy_ = A),
31596
- placeholder: w.$t("sys.chooseText"),
31615
+ placeholder: k.$t("sys.chooseText"),
31597
31616
  options: a
31598
31617
  }, null, 8, ["value", "placeholder"])]),
31599
31618
  _: 1
@@ -31602,12 +31621,12 @@ onmessage = async ({ data }) => {
31602
31621
  })]),
31603
31622
  _: 1
31604
31623
  }),
31605
- createElementVNode("div", w2, [createVNode(O, {
31624
+ createElementVNode("div", w2, [createVNode(T, {
31606
31625
  type: "link",
31607
31626
  class: "substitute-policy-item__add-row",
31608
31627
  onClick: m
31609
31628
  }, {
31610
- default: withCtx(() => [createVNode(unref(PlusOutlined)), createTextVNode(" " + toDisplayString(w.$t("sys.edhr.addRow")), 1)]),
31629
+ default: withCtx(() => [createVNode(unref(PlusOutlined)), createTextVNode(" " + toDisplayString(k.$t("sys.edhr.addRow")), 1)]),
31611
31630
  _: 1
31612
31631
  })]),
31613
31632
  createVNode(L, {
@@ -31616,41 +31635,41 @@ onmessage = async ({ data }) => {
31616
31635
  pagination: !1,
31617
31636
  size: "small",
31618
31637
  "row-key": "__key",
31619
- locale: { emptyText: w.$t("sys.noData") }
31638
+ locale: { emptyText: k.$t("sys.noData") }
31620
31639
  }, {
31621
31640
  headerCell: withCtx(({ column: A }) => [A.key === "product_id_" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [u[2] || (u[2] = createElementVNode("span", { class: "substitute-policy-item__required-mark" }, "*", -1)), createTextVNode(" " + toDisplayString(A.title), 1)], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(A.title), 1)], 64))]),
31622
- bodyCell: withCtx(({ column: A, record: T, index: R }) => [A.key === "index" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(R + 1), 1)], 64)) : A.key === "product_id_" ? (openBlock(), createBlock(v, {
31641
+ bodyCell: withCtx(({ column: A, record: O, index: M }) => [A.key === "index" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(M + 1), 1)], 64)) : A.key === "product_id_" ? (openBlock(), createBlock(v, {
31623
31642
  key: 1,
31624
31643
  class: "substitute-policy-item__table-item",
31625
31644
  name: [
31626
31645
  "substitute_material_entries_",
31627
- R,
31646
+ M,
31628
31647
  "product_id_"
31629
31648
  ],
31630
- rules: i(T)
31649
+ rules: i(O)
31631
31650
  }, {
31632
31651
  default: withCtx(() => [createVNode(unref(na), {
31633
- "model-value": T.product_id_ || void 0,
31652
+ "model-value": O.product_id_ || void 0,
31634
31653
  "model-key": "em_product",
31635
- placeholder: w.$t("sys.chooseText"),
31654
+ placeholder: k.$t("sys.chooseText"),
31636
31655
  "parent-to-default": !1,
31637
31656
  "disabled-parent": !1,
31638
31657
  "show-search": !0,
31639
31658
  "query-data": { "product_type_.ne": "finishedProduct" },
31640
- onChange: (V, U) => d(T, V, U)
31659
+ onChange: (V, U) => d(O, V, U)
31641
31660
  }, null, 8, [
31642
31661
  "model-value",
31643
31662
  "placeholder",
31644
31663
  "onChange"
31645
31664
  ])]),
31646
31665
  _: 2
31647
- }, 1032, ["name", "rules"])) : A.key === "action" ? (openBlock(), createBlock(O, {
31666
+ }, 1032, ["name", "rules"])) : A.key === "action" ? (openBlock(), createBlock(T, {
31648
31667
  key: 2,
31649
31668
  type: "link",
31650
31669
  danger: "",
31651
- onClick: (V) => S(R)
31670
+ onClick: (V) => S(M)
31652
31671
  }, {
31653
- default: withCtx(() => [createTextVNode(toDisplayString(w.$t("sys.delete")), 1)]),
31672
+ default: withCtx(() => [createTextVNode(toDisplayString(k.$t("sys.delete")), 1)]),
31654
31673
  _: 1
31655
31674
  }, 8, ["onClick"])) : createCommentVNode("", !0)]),
31656
31675
  _: 1
@@ -31706,14 +31725,14 @@ onmessage = async ({ data }) => {
31706
31725
  force_loading_enabled_: !0
31707
31726
  };
31708
31727
  }
31709
- function f(O) {
31710
- return (O ?? []).map((L) => ({
31728
+ function f(T) {
31729
+ return (T ?? []).map((L) => ({
31711
31730
  ...cloneDeep(L),
31712
31731
  __key: Ze(8)
31713
31732
  }));
31714
31733
  }
31715
- function i(O) {
31716
- return (O ?? []).map((L) => ({
31734
+ function i(T) {
31735
+ return (T ?? []).map((L) => ({
31717
31736
  ...cloneDeep(L),
31718
31737
  __key: Ze(8)
31719
31738
  }));
@@ -31725,13 +31744,13 @@ onmessage = async ({ data }) => {
31725
31744
  consume_storage_entries_: i((_t$bizOptions$data2 = t.bizOptions.data) === null || _t$bizOptions$data2 === void 0 ? void 0 : _t$bizOptions$data2.consume_storage_entries_)
31726
31745
  });
31727
31746
  const h = computed(() => {
31728
- const O = {
31747
+ const T = {
31729
31748
  product_id_: [{
31730
31749
  required: !0,
31731
31750
  message: $t("sys.pleaseSelectSth", { sth: $t("sys.material") })
31732
31751
  }, { validator: async (L, A) => {
31733
- const T = u(A);
31734
- if (T) return Promise.reject(T);
31752
+ const O = u(A);
31753
+ if (O) return Promise.reject(O);
31735
31754
  } }],
31736
31755
  qty_required_: [{
31737
31756
  required: !0,
@@ -31743,41 +31762,41 @@ onmessage = async ({ data }) => {
31743
31762
  }],
31744
31763
  force_loading_enabled_: [Te($t("sys.edhr.mcTable.forceLoadingEnabled"))]
31745
31764
  };
31746
- return r.type_ !== "view" && (O.consume_enabled_ = [Te($t("sys.edhr.mcTable.consumeEnabled"))], r.consume_enabled_ && (O.consume_source_config_ = [{
31765
+ return r.type_ !== "view" && (T.consume_enabled_ = [Te($t("sys.edhr.mcTable.consumeEnabled"))], r.consume_enabled_ && (T.consume_source_config_ = [{
31747
31766
  required: !0,
31748
31767
  message: $t("sys.pleaseSelectSth", { sth: $t("sys.edhr.mcTable.consumeSourceConfig") })
31749
- }], r.consume_source_config_ === "custom" && (O.default_warehouse_id_ = [{
31768
+ }], r.consume_source_config_ === "custom" && (T.default_warehouse_id_ = [{
31750
31769
  required: !0,
31751
31770
  message: $t("sys.pleaseSelectSth", { sth: $t("sys.edhr.mcTable.defaultWarehouse") })
31752
- }])), O.qty_validation_enabled_ = [Te($t("sys.edhr.mcTable.qtyValidationEnabled"))], r.qty_validation_enabled_ && (O.qty_validation_rule_ = [{
31771
+ }])), T.qty_validation_enabled_ = [Te($t("sys.edhr.mcTable.qtyValidationEnabled"))], r.qty_validation_enabled_ && (T.qty_validation_rule_ = [{
31753
31772
  required: !0,
31754
31773
  message: $t("sys.pleaseSelectSth", { sth: $t("sys.edhr.mcTable.qtyValidationRule") })
31755
- }], r.qty_validation_rule_ === "bounds" && (O.max_value_ = [{
31774
+ }], r.qty_validation_rule_ === "bounds" && (T.max_value_ = [{
31756
31775
  required: !0,
31757
31776
  message: $t("sys.pleaseInputSth", { sth: $t("sys.edhr.mcTable.qtyValidationMax") })
31758
- }], O.min_value_ = [{
31777
+ }], T.min_value_ = [{
31759
31778
  required: !0,
31760
31779
  message: $t("sys.pleaseInputSth", { sth: $t("sys.edhr.mcTable.qtyValidationMin") })
31761
- }])), O.substitute_material_enabled_ = [Te($t("sys.edhr.mcTable.substituteMaterialEnabled"))], r.substitute_material_enabled_ && (O.substitute_policy_ = [{
31780
+ }])), T.substitute_material_enabled_ = [Te($t("sys.edhr.mcTable.substituteMaterialEnabled"))], r.substitute_material_enabled_ && (T.substitute_policy_ = [{
31762
31781
  required: !0,
31763
31782
  message: $t("sys.pleaseSelectSth", { sth: $t("sys.edhr.mcTable.substitutePolicy") })
31764
- }])), r.type_ === "by_lot" && (O.lot_mixing_enabled_ = [Te($t("sys.edhr.mcTable.lotMixingEnabled"))], r.lot_mixing_enabled_ && (O.lot_mixing_times_ = [{
31783
+ }])), r.type_ === "by_lot" && (T.lot_mixing_enabled_ = [Te($t("sys.edhr.mcTable.lotMixingEnabled"))], r.lot_mixing_enabled_ && (T.lot_mixing_times_ = [{
31765
31784
  required: !0,
31766
31785
  message: $t("sys.pleaseInputSth", { sth: $t("sys.edhr.mcTable.lotMixingTimes") })
31767
- }])), O;
31786
+ }])), T;
31768
31787
  });
31769
- function C(O) {
31770
- const L = (O === null || O === void 0 ? void 0 : O._info) ?? {}, A = ((O === null || O === void 0 ? void 0 : O.displayLabel) || "").split(":"), T = A.length > 1 ? A[0] : typeof (O === null || O === void 0 ? void 0 : O.title) == "string" ? O.title : "";
31788
+ function C(T) {
31789
+ const L = (T === null || T === void 0 ? void 0 : T._info) ?? {}, A = ((T === null || T === void 0 ? void 0 : T.displayLabel) || "").split(":"), O = A.length > 1 ? A[0] : typeof (T === null || T === void 0 ? void 0 : T.title) == "string" ? T.title : "";
31771
31790
  return {
31772
31791
  product_code_: L.code_ ?? "",
31773
- product_name_: L.name_ ?? T ?? "",
31792
+ product_name_: L.name_ ?? O ?? "",
31774
31793
  product_version_: L.version_ ?? L.__LABEL__ ?? "",
31775
31794
  product_spec_: L.spec_ ?? L.specification_ ?? ""
31776
31795
  };
31777
31796
  }
31778
- function d(O, L) {
31779
- return O ? {
31780
- product_id_: O,
31797
+ function d(T, L) {
31798
+ return T ? {
31799
+ product_id_: T,
31781
31800
  ...C(L)
31782
31801
  } : {
31783
31802
  product_id_: void 0,
@@ -31787,47 +31806,47 @@ onmessage = async ({ data }) => {
31787
31806
  product_spec_: void 0
31788
31807
  };
31789
31808
  }
31790
- function m(O) {
31791
- return O ? O.split(":")[0] : "";
31809
+ function m(T) {
31810
+ return T ? T.split(":")[0] : "";
31792
31811
  }
31793
- function S(O, L) {
31794
- return !O || !L ? !1 : O === L ? !0 : m(O) === m(L);
31812
+ function S(T, L) {
31813
+ return !T || !L ? !1 : T === L ? !0 : m(T) === m(L);
31795
31814
  }
31796
- function w(O) {
31797
- return O ? (t.bizOptions.hasIds ?? []).some((L) => S(L, O)) : !1;
31815
+ function k(T) {
31816
+ return T ? (t.bizOptions.hasIds ?? []).some((L) => S(L, T)) : !1;
31798
31817
  }
31799
- function u(O) {
31800
- const L = O ?? r.product_id_;
31801
- return L && w(L) ? $t("sys.edhr.mcTable.materialAlreadyExists") : "";
31818
+ function u(T) {
31819
+ const L = T ?? r.product_id_;
31820
+ return L && k(L) ? $t("sys.edhr.mcTable.materialAlreadyExists") : "";
31802
31821
  }
31803
- function g(O, L) {
31804
- Object.assign(r, d(O ?? null, L));
31822
+ function g(T, L) {
31823
+ Object.assign(r, d(T ?? null, L));
31805
31824
  }
31806
- function k(O = []) {
31807
- return O.map((L) => {
31808
- const { __key: A, ...T } = L;
31825
+ function w(T = []) {
31826
+ return T.map((L) => {
31827
+ const { __key: A, ...O } = L;
31809
31828
  return {
31810
- ...T,
31811
- qty_required_: r.qty_required_ ?? T.qty_required_ ?? 0
31829
+ ...O,
31830
+ qty_required_: r.qty_required_ ?? O.qty_required_ ?? 0
31812
31831
  };
31813
31832
  });
31814
31833
  }
31815
- function v(O = []) {
31816
- return O.map((L) => {
31817
- const { __key: A, ...T } = L;
31818
- return T;
31834
+ function v(T = []) {
31835
+ return T.map((L) => {
31836
+ const { __key: A, ...O } = L;
31837
+ return O;
31819
31838
  });
31820
31839
  }
31821
- function M(O) {
31822
- O.consume_enabled_ = !1, O.consume_source_config_ = void 0, O.default_warehouse_id_ = void 0, O.default_location_id_ = void 0, O.consume_storage_entries_ = [];
31840
+ function R(T) {
31841
+ T.consume_enabled_ = !1, T.consume_source_config_ = void 0, T.default_warehouse_id_ = void 0, T.default_location_id_ = void 0, T.consume_storage_entries_ = [];
31823
31842
  }
31824
31843
  function q() {
31825
- const { substitute_material_entries_: L = [], consume_storage_entries_: A = [], ...T } = cloneDeep(r), R = {
31826
- ...T,
31844
+ const { substitute_material_entries_: L = [], consume_storage_entries_: A = [], ...O } = cloneDeep(r), M = {
31845
+ ...O,
31827
31846
  substitute_material_entries_: [],
31828
31847
  consume_storage_entries_: []
31829
31848
  };
31830
- return R.type_ === "view" ? (R.qty_validation_enabled_ = !1, R.qty_validation_rule_ = "eq", R.max_value_ = void 0, R.min_value_ = void 0, R.lot_mixing_enabled_ = !1, R.lot_mixing_times_ = 1, R.substitute_material_enabled_ = !1, R.substitute_policy_ = "only_one", R.substitute_material_entries_ = [], M(R), R) : (R.consume_enabled_ ? R.consume_source_config_ !== "custom" ? (R.default_warehouse_id_ = void 0, R.default_location_id_ = void 0, R.consume_storage_entries_ = []) : R.consume_storage_entries_ = v(A) : (M(R), R.consume_enabled_ = !1), R.qty_validation_enabled_ ? R.qty_validation_rule_ !== "bounds" && (R.max_value_ = void 0, R.min_value_ = void 0) : (R.qty_validation_rule_ = "eq", R.max_value_ = void 0, R.min_value_ = void 0), R.substitute_material_enabled_ ? R.substitute_material_entries_ = k(L) : (R.substitute_policy_ = "only_one", R.substitute_material_entries_ = []), R.type_ !== "by_lot" ? (R.lot_mixing_enabled_ = !1, R.lot_mixing_times_ = 1) : R.lot_mixing_enabled_ || (R.lot_mixing_times_ = 1), R);
31849
+ return M.type_ === "view" ? (M.qty_validation_enabled_ = !1, M.qty_validation_rule_ = "eq", M.max_value_ = void 0, M.min_value_ = void 0, M.lot_mixing_enabled_ = !1, M.lot_mixing_times_ = 1, M.substitute_material_enabled_ = !1, M.substitute_policy_ = "only_one", M.substitute_material_entries_ = [], R(M), M) : (M.consume_enabled_ ? M.consume_source_config_ !== "custom" ? (M.default_warehouse_id_ = void 0, M.default_location_id_ = void 0, M.consume_storage_entries_ = []) : M.consume_storage_entries_ = v(A) : (R(M), M.consume_enabled_ = !1), M.qty_validation_enabled_ ? M.qty_validation_rule_ !== "bounds" && (M.max_value_ = void 0, M.min_value_ = void 0) : (M.qty_validation_rule_ = "eq", M.max_value_ = void 0, M.min_value_ = void 0), M.substitute_material_enabled_ ? M.substitute_material_entries_ = w(L) : (M.substitute_policy_ = "only_one", M.substitute_material_entries_ = []), M.type_ !== "by_lot" ? (M.lot_mixing_enabled_ = !1, M.lot_mixing_times_ = 1) : M.lot_mixing_enabled_ || (M.lot_mixing_times_ = 1), M);
31831
31850
  }
31832
31851
  const B = async () => {
31833
31852
  var _r$substitute_materia;
@@ -31843,8 +31862,8 @@ onmessage = async ({ data }) => {
31843
31862
  }
31844
31863
  t.modalInst.confirm(q());
31845
31864
  };
31846
- return (O, L) => {
31847
- const A = resolveComponent("a-form-item"), T = resolveComponent("a-col"), R = resolveComponent("a-input-number"), V = resolveComponent("a-row"), U = resolveComponent("a-radio"), J = resolveComponent("a-radio-group"), oe = resolveComponent("a-form");
31865
+ return (T, L) => {
31866
+ const A = resolveComponent("a-form-item"), O = resolveComponent("a-col"), M = resolveComponent("a-input-number"), V = resolveComponent("a-row"), U = resolveComponent("a-radio"), J = resolveComponent("a-radio-group"), oe = resolveComponent("a-form");
31848
31867
  return openBlock(), createBlock(wt, mergeProps(t.modalProps, {
31849
31868
  class: "gct-form-base-modal-bom-entry-modal",
31850
31869
  visible: t.modalVisible,
@@ -31866,11 +31885,11 @@ onmessage = async ({ data }) => {
31866
31885
  rules: h.value
31867
31886
  }, {
31868
31887
  default: withCtx(() => [
31869
- createElementVNode("div", S2, toDisplayString(O.$t("sys.appDesigner.basicInformation")), 1),
31888
+ createElementVNode("div", S2, toDisplayString(T.$t("sys.appDesigner.basicInformation")), 1),
31870
31889
  createVNode(V, { gutter: 16 }, {
31871
- default: withCtx(() => [createVNode(T, { span: 12 }, {
31890
+ default: withCtx(() => [createVNode(O, { span: 12 }, {
31872
31891
  default: withCtx(() => [createVNode(A, {
31873
- label: O.$t("sys.material"),
31892
+ label: T.$t("sys.material"),
31874
31893
  name: "product_id_",
31875
31894
  required: "",
31876
31895
  "validate-status": u() ? "error" : void 0,
@@ -31879,7 +31898,7 @@ onmessage = async ({ data }) => {
31879
31898
  default: withCtx(() => [createVNode(unref(na), {
31880
31899
  "model-value": unref(r).product_id_ || void 0,
31881
31900
  "model-key": "em_product",
31882
- placeholder: O.$t("sys.chooseText"),
31901
+ placeholder: T.$t("sys.chooseText"),
31883
31902
  "parent-to-default": !1,
31884
31903
  "disabled-parent": !1,
31885
31904
  "show-search": !0,
@@ -31893,17 +31912,17 @@ onmessage = async ({ data }) => {
31893
31912
  "help"
31894
31913
  ])]),
31895
31914
  _: 1
31896
- }), createVNode(T, { span: 12 }, {
31915
+ }), createVNode(O, { span: 12 }, {
31897
31916
  default: withCtx(() => [createVNode(A, {
31898
- label: O.$t("sys.edhr.unitQty"),
31917
+ label: T.$t("sys.edhr.unitQty"),
31899
31918
  name: "qty_required_",
31900
31919
  required: ""
31901
31920
  }, {
31902
- default: withCtx(() => [createVNode(R, {
31921
+ default: withCtx(() => [createVNode(M, {
31903
31922
  value: unref(r).qty_required_,
31904
31923
  "onUpdate:value": L[0] || (L[0] = (E) => unref(r).qty_required_ = E),
31905
31924
  style: { width: "100%" },
31906
- placeholder: O.$t("sys.inputText"),
31925
+ placeholder: T.$t("sys.inputText"),
31907
31926
  min: 0
31908
31927
  }, null, 8, ["value", "placeholder"])]),
31909
31928
  _: 1
@@ -31912,14 +31931,14 @@ onmessage = async ({ data }) => {
31912
31931
  })]),
31913
31932
  _: 1
31914
31933
  }),
31915
- createElementVNode("div", M2, toDisplayString(O.$t("sys.edhr.mcTable.materialStrategyConfig")), 1),
31934
+ createElementVNode("div", M2, toDisplayString(T.$t("sys.edhr.mcTable.materialStrategyConfig")), 1),
31916
31935
  createVNode(A, {
31917
31936
  name: "type_",
31918
31937
  required: ""
31919
31938
  }, {
31920
- label: withCtx(() => [createElementVNode("span", null, toDisplayString(O.$t("sys.edhr.mcTable.loadingType")), 1), createVNode(unref(Zt), {
31939
+ label: withCtx(() => [createElementVNode("span", null, toDisplayString(T.$t("sys.edhr.mcTable.loadingType")), 1), createVNode(unref(Zt), {
31921
31940
  class: "bom-entry-modal__label-tip",
31922
- info: O.$t("sys.edhr.mcTable.loadingTypeTip")
31941
+ info: T.$t("sys.edhr.mcTable.loadingTypeTip")
31923
31942
  }, null, 8, ["info"])]),
31924
31943
  default: withCtx(() => [createVNode(J, {
31925
31944
  value: unref(r).type_,
@@ -31927,15 +31946,15 @@ onmessage = async ({ data }) => {
31927
31946
  }, {
31928
31947
  default: withCtx(() => [
31929
31948
  createVNode(U, { value: "view" }, {
31930
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.edhr.mcTable.loadingTypeView")), 1)]),
31949
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.edhr.mcTable.loadingTypeView")), 1)]),
31931
31950
  _: 1
31932
31951
  }),
31933
31952
  createVNode(U, { value: "by_number" }, {
31934
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.edhr.mcTable.loadingTypeByNumber")), 1)]),
31953
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.edhr.mcTable.loadingTypeByNumber")), 1)]),
31935
31954
  _: 1
31936
31955
  }),
31937
31956
  createVNode(U, { value: "by_lot" }, {
31938
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.edhr.mcTable.loadingTypeByLot")), 1)]),
31957
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.edhr.mcTable.loadingTypeByLot")), 1)]),
31939
31958
  _: 1
31940
31959
  })
31941
31960
  ]),
@@ -31955,7 +31974,7 @@ onmessage = async ({ data }) => {
31955
31974
  "onUpdate:formState": L[3] || (L[3] = (E) => isRef(r) ? r.value = E : r = E)
31956
31975
  }, null, 8, ["form-state"])) : createCommentVNode("", !0),
31957
31976
  unref(r).type_ === "by_lot" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createVNode(A, {
31958
- label: O.$t("sys.edhr.mcTable.lotMixingEnabled"),
31977
+ label: T.$t("sys.edhr.mcTable.lotMixingEnabled"),
31959
31978
  name: "lot_mixing_enabled_"
31960
31979
  }, {
31961
31980
  default: withCtx(() => [createVNode(J, {
@@ -31963,27 +31982,27 @@ onmessage = async ({ data }) => {
31963
31982
  "onUpdate:value": L[4] || (L[4] = (E) => unref(r).lot_mixing_enabled_ = E)
31964
31983
  }, {
31965
31984
  default: withCtx(() => [createVNode(U, { value: !0 }, {
31966
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.true")), 1)]),
31985
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.true")), 1)]),
31967
31986
  _: 1
31968
31987
  }), createVNode(U, { value: !1 }, {
31969
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.false")), 1)]),
31988
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.false")), 1)]),
31970
31989
  _: 1
31971
31990
  })]),
31972
31991
  _: 1
31973
31992
  }, 8, ["value"])]),
31974
31993
  _: 1
31975
31994
  }, 8, ["label"]), unref(r).lot_mixing_enabled_ ? (openBlock(), createElementBlock("div", R2, [createVNode(V, { gutter: 16 }, {
31976
- default: withCtx(() => [createVNode(T, { span: 12 }, {
31995
+ default: withCtx(() => [createVNode(O, { span: 12 }, {
31977
31996
  default: withCtx(() => [createVNode(A, {
31978
- label: O.$t("sys.edhr.mcTable.lotMixingTimes"),
31997
+ label: T.$t("sys.edhr.mcTable.lotMixingTimes"),
31979
31998
  name: "lot_mixing_times_",
31980
31999
  required: ""
31981
32000
  }, {
31982
- default: withCtx(() => [createVNode(R, {
32001
+ default: withCtx(() => [createVNode(M, {
31983
32002
  value: unref(r).lot_mixing_times_,
31984
32003
  "onUpdate:value": L[5] || (L[5] = (E) => unref(r).lot_mixing_times_ = E),
31985
32004
  style: { width: "100%" },
31986
- placeholder: O.$t("sys.inputText"),
32005
+ placeholder: T.$t("sys.inputText"),
31987
32006
  min: 1,
31988
32007
  precision: 0
31989
32008
  }, null, 8, ["value", "placeholder"])]),
@@ -32005,7 +32024,7 @@ onmessage = async ({ data }) => {
32005
32024
  "hasIds"
32006
32025
  ])) : createCommentVNode("", !0),
32007
32026
  createVNode(A, {
32008
- label: O.$t("sys.edhr.mcTable.forceLoadingEnabled"),
32027
+ label: T.$t("sys.edhr.mcTable.forceLoadingEnabled"),
32009
32028
  name: "force_loading_enabled_"
32010
32029
  }, {
32011
32030
  default: withCtx(() => [createVNode(J, {
@@ -32013,10 +32032,10 @@ onmessage = async ({ data }) => {
32013
32032
  "onUpdate:value": L[7] || (L[7] = (E) => unref(r).force_loading_enabled_ = E)
32014
32033
  }, {
32015
32034
  default: withCtx(() => [createVNode(U, { value: !0 }, {
32016
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.true")), 1)]),
32035
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.true")), 1)]),
32017
32036
  _: 1
32018
32037
  }), createVNode(U, { value: !1 }, {
32019
- default: withCtx(() => [createTextVNode(toDisplayString(O.$t("sys.false")), 1)]),
32038
+ default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.false")), 1)]),
32020
32039
  _: 1
32021
32040
  })]),
32022
32041
  _: 1
@@ -32177,13 +32196,13 @@ onmessage = async ({ data }) => {
32177
32196
  message.error("请选择一条数据");
32178
32197
  return;
32179
32198
  }
32180
- const { _rowKey: d, productionIdentificationIsLocked: m, productionIdentificationId: S, ...w } = s.value;
32199
+ const { _rowKey: d, productionIdentificationIsLocked: m, productionIdentificationId: S, ...k } = s.value;
32181
32200
  if (m) {
32182
32201
  const u = await h(S);
32183
32202
  message.error(u);
32184
32203
  return;
32185
32204
  }
32186
- n.modalInst.confirm(w);
32205
+ n.modalInst.confirm(k);
32187
32206
  };
32188
32207
  return (d, m) => (openBlock(), createBlock(wt, mergeProps(n.modalProps, {
32189
32208
  class: "gct-form-base-modal-scan-multi-rows",
@@ -32426,7 +32445,7 @@ onmessage = async ({ data }) => {
32426
32445
  let h$3 = !1, C = !1, d = !1, m;
32427
32446
  const S = (v) => {
32428
32447
  h$3 || (h$3 = !0, C = !0, s.visible = !1, i(v));
32429
- }, w = {
32448
+ }, k = {
32430
32449
  id: l,
32431
32450
  confirm(v) {
32432
32451
  S({
@@ -32445,13 +32464,13 @@ onmessage = async ({ data }) => {
32445
32464
  d = !0, this.modalMap.delete(l);
32446
32465
  const v = m;
32447
32466
  m = void 0, v && await v.destroy();
32448
- }, g = () => this.resolveAntdConfig(), k = defineComponent({
32467
+ }, g = () => this.resolveAntdConfig(), w = defineComponent({
32449
32468
  name: "FormBaseModalRoot",
32450
32469
  setup() {
32451
32470
  return () => h(ConfigProvider, g(), { default: () => h(n, {
32452
32471
  modalVisible: s.visible,
32453
32472
  modalProps: f,
32454
- modalInst: w,
32473
+ modalInst: k,
32455
32474
  bizOptions: t,
32456
32475
  onAfterClose: u
32457
32476
  }) });
@@ -32459,11 +32478,11 @@ onmessage = async ({ data }) => {
32459
32478
  });
32460
32479
  this.modalMap.set(l, {
32461
32480
  id: l,
32462
- cancel: w.cancel,
32481
+ cancel: k.cancel,
32463
32482
  isClosing: () => C
32464
32483
  });
32465
32484
  try {
32466
- m = W2(k, this.appContext, l);
32485
+ m = W2(w, this.appContext, l);
32467
32486
  } catch (v) {
32468
32487
  this.modalMap.delete(l), r(v);
32469
32488
  }
@@ -32490,7 +32509,7 @@ onmessage = async ({ data }) => {
32490
32509
  } };
32491
32510
  }));
32492
32511
  //#endregion
32493
- //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.0_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_39aa7150ab8d68a2beeeb294d75bf9b7/node_modules/@gct-paas/form-base/dist/form-base.css
32512
+ //#region ../../node_modules/.pnpm/@gct-paas+form-base@0.1.7-beta.1_@gct-paas+api@6.2.0-dev.2_axios@1.13.2__@vueuse+core@1_22b44e53706d5f9862124f6441dde5d2/node_modules/@gct-paas/form-base/dist/form-base.css
32494
32513
  init_TriggerUtil();
32495
32514
  init_index_es();
32496
32515
  //#endregion
@@ -148344,7 +148363,7 @@ var init_bom_validator$1 = __esmMin((() => {
148344
148363
  this.productIds.push(i.product_id_);
148345
148364
  this.productCodes[i.product_id_] = i.product_code_;
148346
148365
  });
148347
- this.hasConsumed = this.calcQtyConsumed(this.historyData);
148366
+ this.hasConsumed = this.calcQtyConsumed(this.historyData, "history");
148348
148367
  }
148349
148368
  /**
148350
148369
  * 翻译物料的code
@@ -148359,13 +148378,15 @@ var init_bom_validator$1 = __esmMin((() => {
148359
148378
  * @param arr
148360
148379
  * @return {*}
148361
148380
  */
148362
- filterGroupData(arr) {
148363
- return arr.filter((i) => this.isRowInGroup(i) && i.product_id_);
148381
+ filterGroupData(arr, source = "current") {
148382
+ return arr.filter((i) => this.isRowInGroup(i, source) && i.product_id_);
148364
148383
  }
148365
- /** 行是否属于本 BOM 组(优先 bom_entry_id_,避免跨组 product_id_ 误判) */
148366
- isRowInGroup(row) {
148384
+ /** 历史数据按父级标识归组;当前表格数据按明细 ID 归组。 */
148385
+ isRowInGroup(row, source = "current") {
148367
148386
  if (row.deleted_) return false;
148368
- if (row.bom_entry_id_) return row.bom_entry_id_ === this.bomEntry.id_;
148387
+ const rowEntryId = source === "history" ? row.bom_entry_parent_id_ : row.bom_entry_id_;
148388
+ const entryId = source === "history" ? this.bomEntry.parent_id_ : this.bomEntry.id_;
148389
+ if (rowEntryId) return rowEntryId === entryId;
148369
148390
  if (row.product_id_) return this.productIds.includes(row.product_id_);
148370
148391
  return false;
148371
148392
  }
@@ -148461,7 +148482,7 @@ var init_bom_validator$1 = __esmMin((() => {
148461
148482
  if (["eq", "lte"].includes(this.bomEntry.qty_validation_rule_) && consumeNum > this.remainingNum) throw new Error("当前物料上料总消耗不能大于需求数量");
148462
148483
  if (this.bomEntry.qty_validation_rule_ === "bounds") {
148463
148484
  const groupData = this.filterGroupData(arr);
148464
- const consumeSum = this.calcQtyForBounds(arr) + this.calcQtyForBounds(this.historyData);
148485
+ const consumeSum = this.calcQtyForBounds(arr) + this.calcQtyForBounds(this.historyData, "history");
148465
148486
  const { max } = await this.calcCustomNumberLimit(groupData[0]);
148466
148487
  if (consumeSum > max) throw new Error(`当前物料的上料总消耗不能大于 ${max}`);
148467
148488
  }
@@ -148482,12 +148503,12 @@ var init_bom_validator$1 = __esmMin((() => {
148482
148503
  * @param arr
148483
148504
  * @return {*}
148484
148505
  */
148485
- calcQtyConsumed(arr = this.historyData) {
148486
- return this.filterGroupData(arr).reduce((acc, cur) => acc + Number(cur.qty_ ?? 0), 0);
148506
+ calcQtyConsumed(arr, source = "current") {
148507
+ return this.filterGroupData(arr, source).reduce((acc, cur) => acc + Number(cur.qty_ ?? 0), 0);
148487
148508
  }
148488
148509
  /** 上下限校验优先使用单位转换后的数量,历史数据未转换时兼容原数量。 */
148489
- calcQtyForBounds(arr) {
148490
- return this.filterGroupData(arr).reduce((acc, cur) => acc + Number(cur.qty_transfer_ ?? cur.qty_ ?? 0), 0);
148510
+ calcQtyForBounds(arr, source = "current") {
148511
+ return this.filterGroupData(arr, source).reduce((acc, cur) => acc + Number(cur.qty_transfer_ ?? cur.qty_ ?? 0), 0);
148491
148512
  }
148492
148513
  /**
148493
148514
  * 计算自定义的数量校验的最大值和最小值
@@ -148548,7 +148569,7 @@ var init_bom_validator$1 = __esmMin((() => {
148548
148569
  break;
148549
148570
  case "bounds": {
148550
148571
  const groupData = this.filterGroupData(arr);
148551
- const consumeSum = this.calcQtyForBounds(arr) + this.calcQtyForBounds(this.historyData);
148572
+ const consumeSum = this.calcQtyForBounds(arr) + this.calcQtyForBounds(this.historyData, "history");
148552
148573
  const { min, max } = await this.calcCustomNumberLimit(groupData[0]);
148553
148574
  if (min !== void 0 && consumeSum < min || max !== void 0 && consumeSum > max) fail(`上料数量必须在[${min}, ${max}]范围内`);
148554
148575
  break;
@@ -192779,7 +192800,8 @@ var DataInitPanel_vue_vue_type_script_setup_true_name_panel_data_init_lang_defau
192779
192800
  const fields = designCtx.runtime.getFieldList(mainModelKey) ?? [];
192780
192801
  return [...fields.filter((field) => usedFieldKeys.has(field.key) && field.type !== FIELD_TYPE.MASTERSLAVE).map((field) => ({
192781
192802
  label: field.name || field.key,
192782
- value: field.key
192803
+ value: field.key,
192804
+ objectField: !!field.belongingObject
192783
192805
  })), ...fields.filter((field) => subFields.has(field.key)).map((field) => ({
192784
192806
  label: field.name || field.key,
192785
192807
  value: field.key,
@@ -193130,7 +193152,7 @@ init__plugin_vue_export_helper();
193130
193152
  var schema$9 = {
193131
193153
  key: "data-init.basic",
193132
193154
  title: "数据",
193133
- render: /* @__PURE__ */ _plugin_vue_export_helper_default(DataInitPanel_vue_vue_type_script_setup_true_name_panel_data_init_lang_default, [["__scopeId", "data-v-8c424f6e"]])
193155
+ render: /* @__PURE__ */ _plugin_vue_export_helper_default(DataInitPanel_vue_vue_type_script_setup_true_name_panel_data_init_lang_default, [["__scopeId", "data-v-22f994ed"]])
193134
193156
  };
193135
193157
  //#endregion
193136
193158
  //#region src/suites/edhr/panel-schema/rule/utils/decision-rule.ts