@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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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,
|
|
23794
|
-
const v =
|
|
23795
|
-
key:
|
|
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:
|
|
23799
|
-
_info:
|
|
23800
|
-
isDefault: !!
|
|
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
|
|
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:
|
|
23810
|
-
displayLabel:
|
|
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(
|
|
23815
|
+
children: (g.__CHILDREN__ || []).map((q) => l(w, g.id_, q))
|
|
23816
23816
|
};
|
|
23817
|
-
return n(
|
|
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,
|
|
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:
|
|
23824
|
+
pageSize: w,
|
|
23825
23825
|
modelCategory: o,
|
|
23826
23826
|
keyword: v,
|
|
23827
|
-
queryData:
|
|
23827
|
+
queryData: R
|
|
23828
23828
|
}, () => Er(e.modelKey, o, {
|
|
23829
23829
|
pageNo: g,
|
|
23830
|
-
pageSize:
|
|
23830
|
+
pageSize: w,
|
|
23831
23831
|
keyword: v,
|
|
23832
|
-
queryData:
|
|
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
|
|
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(
|
|
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),
|
|
23856
|
+
const B = q.find((L) => L.isDefault), T = {
|
|
23857
23857
|
key: g,
|
|
23858
|
-
title:
|
|
23859
|
-
displayLabel:
|
|
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(
|
|
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:
|
|
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,
|
|
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((
|
|
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
|
|
23890
|
-
const [g] = u.split(":"),
|
|
23891
|
-
return a.value.get(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 [
|
|
23896
|
-
if (
|
|
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 (
|
|
23901
|
-
const q = C(
|
|
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
|
|
23908
|
-
return (
|
|
23909
|
-
text:
|
|
23910
|
-
showDefaultTag: !g && !!
|
|
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,
|
|
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,
|
|
23920
|
+
}), await h(u), m(u, w);
|
|
23921
23921
|
}
|
|
23922
|
-
function
|
|
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:
|
|
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
|
|
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
|
|
24077
|
-
if (!Number.isFinite(
|
|
24078
|
-
return
|
|
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
|
|
24086
|
-
if (d === "array" ? !Array.isArray(
|
|
24087
|
-
return
|
|
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(([
|
|
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),
|
|
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
|
|
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,
|
|
24308
|
+
return Sa(S, R);
|
|
24309
24309
|
}
|
|
24310
|
-
const
|
|
24311
|
-
if (typeof
|
|
24312
|
-
return Sa(S, await Qd(
|
|
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),
|
|
24317
|
-
let
|
|
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
|
|
24321
|
-
const
|
|
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
|
|
24325
|
-
const
|
|
24326
|
-
if (
|
|
24327
|
-
|
|
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
|
-
|
|
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(
|
|
24333
|
-
} catch (
|
|
24334
|
-
throw S === null || S === void 0 || S.error(
|
|
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(
|
|
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,
|
|
24443
|
-
s || l.get(u) !== g || (n.delete(u), o[u] =
|
|
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
|
|
24449
|
+
const w = [...n].map(([v, R]) => ({
|
|
24450
24450
|
current: v,
|
|
24451
|
-
owner:
|
|
24451
|
+
owner: R,
|
|
24452
24452
|
version: l.get(v)
|
|
24453
24453
|
}));
|
|
24454
|
-
for (const { current: v, owner:
|
|
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
|
|
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) !==
|
|
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
|
|
24484
|
-
l.get(u) ===
|
|
24483
|
+
const T = (L) => {
|
|
24484
|
+
l.get(u) === w && r(q, B, L);
|
|
24485
24485
|
};
|
|
24486
24486
|
return {
|
|
24487
|
-
success: (L) =>
|
|
24488
|
-
error: (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
|
|
24493
|
-
return r(u,
|
|
24494
|
-
} catch (
|
|
24495
|
-
throw r(u,
|
|
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
|
|
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:
|
|
24524
|
-
reloadAll: () => Promise.allSettled(e.sources.map((u) =>
|
|
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
|
|
24537
|
-
if (!
|
|
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
|
|
24665
|
-
if (
|
|
24666
|
-
const u = Aa(
|
|
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:
|
|
24680
|
+
}, ({ ready: m, value: S, error: k }) => {
|
|
24681
24681
|
if (!(l || d.trigger === "formInit" && a.has(d))) {
|
|
24682
|
-
if (
|
|
24683
|
-
o[d.id] =
|
|
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),
|
|
24728
|
-
S === void 0 || isEqual(
|
|
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,
|
|
25226
|
+
const f = (m, S, k) => {
|
|
25227
25227
|
const u = m.split(""), g = [];
|
|
25228
|
-
let
|
|
25228
|
+
let w = "";
|
|
25229
25229
|
for (const v of u) {
|
|
25230
|
-
const
|
|
25231
|
-
|
|
25230
|
+
const R = w + v;
|
|
25231
|
+
k.measureText(R).width > S && w ? (g.push(w), w = v) : w = R;
|
|
25232
25232
|
}
|
|
25233
|
-
return
|
|
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
|
|
25411
|
-
a.value[n.value.scroll] =
|
|
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),
|
|
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
|
-
}),
|
|
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 (!
|
|
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(
|
|
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
|
|
25913
|
-
if (!
|
|
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(
|
|
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 =
|
|
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
|
|
25956
|
+
await me(!0), await R(O.value), E();
|
|
25957
25957
|
return;
|
|
25958
25958
|
}
|
|
25959
25959
|
if (se) {
|
|
25960
|
-
A(), await me(!0), await
|
|
25960
|
+
A(), await me(!0), await R(O.value), E();
|
|
25961
25961
|
return;
|
|
25962
25962
|
}
|
|
25963
|
-
if (!
|
|
25964
|
-
await me(!0), await
|
|
25963
|
+
if (!w.value.length) {
|
|
25964
|
+
await me(!0), await R(O.value), E();
|
|
25965
25965
|
return;
|
|
25966
25966
|
}
|
|
25967
|
-
X(), E(), await
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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(),
|
|
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
|
-
}),
|
|
26035
|
+
}), k.value = "";
|
|
26036
26036
|
return;
|
|
26037
26037
|
}
|
|
26038
|
-
(t.showSearch ? i.value : r.value) ||
|
|
26038
|
+
(t.showSearch ? i.value : r.value) || ne();
|
|
26039
26039
|
}), onMounted(() => {
|
|
26040
|
-
|
|
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, [
|
|
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": !!
|
|
26056
|
+
class: normalizeClass(["rdo-tree-select__input", { "has-mirror": !!M.value && !k.value }]),
|
|
26057
26057
|
type: "text",
|
|
26058
|
-
value:
|
|
26059
|
-
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": !
|
|
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":
|
|
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":
|
|
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"),
|
|
26454
|
-
return openBlock(), createBlock(
|
|
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(
|
|
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: (
|
|
26495
|
-
onKeydown: [withKeys(withModifiers((
|
|
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: (
|
|
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
|
|
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(),
|
|
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
|
|
26577
|
-
if (
|
|
26578
|
-
const me = U(
|
|
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
|
|
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
|
|
26614
|
-
const v = computed(() => a.conditions),
|
|
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 = ++
|
|
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 !==
|
|
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 !==
|
|
26629
|
+
if (V !== w) return;
|
|
26630
26630
|
const E = await Promise.all((oe ?? []).map(async (X) => {
|
|
26631
26631
|
if (!X.key) return [];
|
|
26632
|
-
const
|
|
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 [
|
|
26638
|
-
return [
|
|
26639
|
-
label: `${
|
|
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 !==
|
|
26644
|
+
if (V !== w) return;
|
|
26645
26645
|
u.value = E.flat();
|
|
26646
26646
|
} catch {
|
|
26647
|
-
V ===
|
|
26647
|
+
V === w && message.error("加载来源表单字段失败,请重新选择来源表单模板");
|
|
26648
26648
|
} finally {
|
|
26649
|
-
V ===
|
|
26649
|
+
V === w && (g.value = !1);
|
|
26650
26650
|
}
|
|
26651
26651
|
}
|
|
26652
26652
|
}, { immediate: !0 });
|
|
26653
|
-
const B = computed(() => u.value.filter((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(
|
|
26663
|
-
t.source.returnFields = [...
|
|
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
|
|
26666
|
-
t.source.returnFields =
|
|
26665
|
+
function O(V) {
|
|
26666
|
+
t.source.returnFields = R.value.filter((U, J) => J !== V);
|
|
26667
26667
|
}
|
|
26668
|
-
async function
|
|
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) &&
|
|
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:
|
|
26673
|
-
const J = resolveComponent("a-input"), oe = resolveComponent("a-form-item"), E = resolveComponent("a-tree-select"), X = resolveComponent("a-select"),
|
|
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(
|
|
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:
|
|
26856
|
+
fields: R.value,
|
|
26857
26857
|
deletable: "",
|
|
26858
|
-
onRemove:
|
|
26858
|
+
onRemove: O
|
|
26859
26859
|
}, null, 8, ["fields"]),
|
|
26860
|
-
l.value && !
|
|
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(
|
|
26904
|
-
return (await ie.apaas.edhr.getOnlineFormDataInitProtocolParamMeta({ protocolKey:
|
|
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
|
|
26915
|
-
const
|
|
26916
|
-
if (d.value = "", C.value = "", !
|
|
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,
|
|
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 =
|
|
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 =
|
|
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,
|
|
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(
|
|
26948
|
-
return String((q === null || q === void 0 ? void 0 : q.label) ?? "").toLowerCase().includes(
|
|
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
|
|
26953
|
+
const R = await ie.apaas.onlineForm.getDataInitProtocolList();
|
|
26954
26954
|
if (!S) return;
|
|
26955
|
-
i.value = (
|
|
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
|
-
}),
|
|
26965
|
-
const
|
|
26964
|
+
}), k();
|
|
26965
|
+
const w = computed(() => t.source.returnFields);
|
|
26966
26966
|
async function v() {
|
|
26967
26967
|
var _f$value3;
|
|
26968
|
-
const
|
|
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) ?
|
|
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 }), (
|
|
26972
|
-
const B = resolveComponent("a-input"),
|
|
26973
|
-
return openBlock(), createBlock(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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:
|
|
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((
|
|
27151
|
-
var
|
|
27152
|
-
return (
|
|
27153
|
-
}).map((
|
|
27154
|
-
label:
|
|
27155
|
-
options: (
|
|
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
|
|
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 (
|
|
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
|
-
|
|
27193
|
+
R === C && message.error("加载实体模型字段失败,请重新选择实体模型");
|
|
27194
27194
|
} finally {
|
|
27195
|
-
|
|
27195
|
+
R === C && (h.value = !1);
|
|
27196
27196
|
}
|
|
27197
27197
|
}
|
|
27198
27198
|
}
|
|
27199
|
-
const S = computed(() => Array.isArray(a.conditions) ? a.conditions : []),
|
|
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((
|
|
27207
|
+
a.conditions = S.value.filter((R, q) => q !== v);
|
|
27208
27208
|
}
|
|
27209
|
-
async function
|
|
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:
|
|
27214
|
-
const q = resolveComponent("a-input"), B = resolveComponent("a-form-item"),
|
|
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(() => [...
|
|
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":
|
|
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":
|
|
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(
|
|
27267
|
+
default: withCtx(() => [createVNode(T, {
|
|
27268
27268
|
"get-popup-container": unref(Ne),
|
|
27269
27269
|
value: unref(a).modelKey,
|
|
27270
|
-
"onUpdate:value":
|
|
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(() => [...
|
|
27288
|
+
default: withCtx(() => [...R[6] || (R[6] = [createTextVNode("筛选条件", -1)])]),
|
|
27289
27289
|
_: 1
|
|
27290
27290
|
}),
|
|
27291
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(S.value, (
|
|
27292
|
-
key:
|
|
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
|
-
|
|
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(
|
|
27308
|
+
default: withCtx(() => [createVNode(T, {
|
|
27309
27309
|
"get-popup-container": unref(Ne),
|
|
27310
|
-
value:
|
|
27311
|
-
"onUpdate:value": (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
|
-
|
|
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
|
-
|
|
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:
|
|
27345
|
-
"onUpdate: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(
|
|
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)),
|
|
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(() => [...
|
|
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":
|
|
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(() => [...
|
|
27380
|
+
default: withCtx(() => [...R[10] || (R[10] = [createTextVNode("返回字段", -1)])]),
|
|
27381
27381
|
_: 1
|
|
27382
|
-
}), createVNode(ct, { fields:
|
|
27382
|
+
}), createVNode(ct, { fields: k.value }, null, 8, ["fields"])]),
|
|
27383
27383
|
createElementVNode("section", Zu, [createVNode(unref(ve), null, {
|
|
27384
|
-
default: withCtx(() => [...
|
|
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":
|
|
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(
|
|
27422
|
-
return String((u === null || u === void 0 ? void 0 : u.label) ?? "").toLowerCase().includes(
|
|
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
|
|
27427
|
+
const k = await ie.apaas.dataSource.getPageList({
|
|
27428
27428
|
pageNo: 1,
|
|
27429
27429
|
pageSize: 999
|
|
27430
27430
|
});
|
|
27431
|
-
f.value = ((
|
|
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:
|
|
27447
|
-
a.parameters = u.map((
|
|
27448
|
-
...g.get(
|
|
27449
|
-
name:
|
|
27450
|
-
})), t.source.returnFields =
|
|
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:
|
|
27453
|
+
key: w
|
|
27454
27454
|
})), message.success("SQL 字段与参数解析成功");
|
|
27455
|
-
} catch (
|
|
27456
|
-
message.error(
|
|
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 }), (
|
|
27473
|
-
const g = resolveComponent("a-input"),
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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,
|
|
27603
|
-
key:
|
|
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(
|
|
27606
|
+
createVNode(w, {
|
|
27607
27607
|
name: [
|
|
27608
27608
|
"config",
|
|
27609
27609
|
"parameters",
|
|
27610
|
-
|
|
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": (
|
|
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(
|
|
27629
|
+
createVNode(w, {
|
|
27630
27630
|
name: [
|
|
27631
27631
|
"config",
|
|
27632
27632
|
"parameters",
|
|
27633
|
-
|
|
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": (
|
|
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,
|
|
27707
|
-
for (const q of Object.keys(
|
|
27708
|
-
return
|
|
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
|
-
},
|
|
27712
|
+
}, w = await ie.ipaas.flow.getListOnline({}, g);
|
|
27713
27713
|
if (!f) return;
|
|
27714
|
-
h.value = (
|
|
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,
|
|
27725
|
+
watch(() => [a.flowId], async ([u], g, w) => {
|
|
27726
27726
|
let v = !0;
|
|
27727
|
-
|
|
27727
|
+
w(() => {
|
|
27728
27728
|
v = !1;
|
|
27729
27729
|
});
|
|
27730
|
-
const
|
|
27731
|
-
if (
|
|
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
|
|
27735
|
-
if (!(
|
|
27736
|
-
const A = Ya(la(
|
|
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((
|
|
27738
|
+
a.parameters = A.map((M) => {
|
|
27739
27739
|
var _B$find;
|
|
27740
27740
|
return {
|
|
27741
|
-
...
|
|
27742
|
-
source: ((_B$find = B.find((V) => V.name ===
|
|
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 =
|
|
27744
|
+
}), t.source.returnFields = O.map((M) => {
|
|
27745
27745
|
var _q$find;
|
|
27746
27746
|
return {
|
|
27747
|
-
...
|
|
27748
|
-
name: ((_q$find = q.find((V) => V.key ===
|
|
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 (
|
|
27751
|
+
} catch (T) {
|
|
27752
27752
|
if (!v) return;
|
|
27753
|
-
l.value = !0, 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
|
|
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:
|
|
27770
|
-
const
|
|
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(
|
|
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(
|
|
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(
|
|
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,
|
|
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
|
-
|
|
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(
|
|
27894
|
+
default: withCtx(() => [createVNode(w, {
|
|
27895
27895
|
value: A.source,
|
|
27896
|
-
"onUpdate:value": (
|
|
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(
|
|
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:
|
|
27945
|
-
message.error(`${g}:第 ${
|
|
27946
|
-
const
|
|
27947
|
-
if (!
|
|
27948
|
-
const v =
|
|
27949
|
-
`),
|
|
27950
|
-
|
|
27951
|
-
const B = Number.parseFloat(getComputedStyle(
|
|
27952
|
-
|
|
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])),
|
|
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 =
|
|
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"),
|
|
28002
|
-
return openBlock(), createBlock(
|
|
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(
|
|
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(
|
|
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(
|
|
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: (
|
|
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: (
|
|
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(
|
|
28703
|
+
function m(T) {
|
|
28704
28704
|
return t.list.some((L) => {
|
|
28705
28705
|
var _t$value3;
|
|
28706
|
-
return L.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(
|
|
28709
|
+
function S(T) {
|
|
28710
28710
|
let L;
|
|
28711
28711
|
do
|
|
28712
|
-
L = `ds_${
|
|
28712
|
+
L = `ds_${T}_${Math.random().toString(36).slice(-6)}`;
|
|
28713
28713
|
while (m(L));
|
|
28714
28714
|
return L;
|
|
28715
28715
|
}
|
|
28716
|
-
function
|
|
28717
|
-
r.type !==
|
|
28716
|
+
function k(T) {
|
|
28717
|
+
r.type !== T && (Object.assign(r, i(), { type: T }), s.value++);
|
|
28718
28718
|
}
|
|
28719
|
-
function u(
|
|
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
|
-
}[
|
|
28727
|
+
}[T];
|
|
28728
28728
|
}
|
|
28729
|
-
function g(
|
|
28730
|
-
return
|
|
28729
|
+
function g(T) {
|
|
28730
|
+
return T === "sql" || T === "ipaas" ? "需预配置" : "";
|
|
28731
28731
|
}
|
|
28732
|
-
function
|
|
28732
|
+
function w(T) {
|
|
28733
28733
|
return ["data-source-editor__step", {
|
|
28734
|
-
"is-current": l.value ===
|
|
28735
|
-
"is-done": l.value >
|
|
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
|
-
], ([
|
|
28742
|
+
], ([T, L, A]) => {
|
|
28743
28743
|
var _r$fetchPolicy, _r$fetchPolicy2;
|
|
28744
|
-
|
|
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
|
|
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 (
|
|
28771
|
-
const A = resolveComponent("a-button"),
|
|
28772
|
-
return openBlock(), createBlock(
|
|
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] = (
|
|
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] = (
|
|
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, (
|
|
28788
|
-
l.value === 0 ? (openBlock(), createElementBlock("div", rd, [(openBlock(), createElementBlock(Fragment, null, renderList(a, (
|
|
28789
|
-
key:
|
|
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 ===
|
|
28792
|
-
onClick: (V) =>
|
|
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(
|
|
28795
|
+
src: u(M.value),
|
|
28796
28796
|
alt: ""
|
|
28797
28797
|
}, null, 8, cd)]),
|
|
28798
|
-
createElementVNode("span", dd, [createElementVNode("span", fd, toDisplayString(
|
|
28799
|
-
createElementVNode("span", md, toDisplayString(
|
|
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] = (
|
|
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:
|
|
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
|
|
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" ? `✓ 已返回 ${
|
|
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
|
|
29082
|
-
if ((
|
|
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
|
-
}[(
|
|
29090
|
-
const me = get(
|
|
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((
|
|
29096
|
+
return Array.isArray(X) ? X.map((ne, me) => ({
|
|
29097
29097
|
__rowKey: me,
|
|
29098
|
-
value:
|
|
29098
|
+
value: ne
|
|
29099
29099
|
})) : [];
|
|
29100
29100
|
}
|
|
29101
|
-
function
|
|
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((
|
|
29104
|
-
key:
|
|
29105
|
-
name:
|
|
29106
|
-
}))).map((
|
|
29107
|
-
key:
|
|
29108
|
-
dataIndex: ["value",
|
|
29109
|
-
title:
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
29141
|
+
function O(E) {
|
|
29141
29142
|
const X = E;
|
|
29142
29143
|
X.offsetHeight, X.style.height = "0";
|
|
29143
29144
|
}
|
|
29144
|
-
function
|
|
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
|
|
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 (
|
|
29161
|
-
const me = X[
|
|
29162
|
-
if (X.splice(
|
|
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((
|
|
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
|
|
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(
|
|
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:
|
|
29250
|
+
onEnter: T,
|
|
29250
29251
|
onAfterEnter: L,
|
|
29251
29252
|
onBeforeLeave: A,
|
|
29252
|
-
onLeave:
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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-
|
|
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(
|
|
29464
|
-
const v = co(
|
|
29465
|
-
return
|
|
29466
|
-
...
|
|
29467
|
-
key: `DATA[].${
|
|
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(
|
|
29480
|
-
|
|
29481
|
-
const
|
|
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:
|
|
29484
|
-
value:
|
|
29486
|
+
title: A.label,
|
|
29487
|
+
value: O.join("."),
|
|
29485
29488
|
selectable: !0,
|
|
29486
|
-
disabled:
|
|
29487
|
-
isLeaf: !
|
|
29488
|
-
children:
|
|
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: (
|
|
29495
|
-
l.targetFieldKey =
|
|
29496
|
-
const v = (
|
|
29497
|
-
const B =
|
|
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,
|
|
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((
|
|
29510
|
-
label: `$ctx.${
|
|
29511
|
-
value: JSON.stringify(["$ctx",
|
|
29528
|
+
options: a.contextFields.map((w) => ({
|
|
29529
|
+
label: `$ctx.${w.key}`,
|
|
29530
|
+
value: JSON.stringify(["$ctx", w.key])
|
|
29512
29531
|
}))
|
|
29513
|
-
}, ...a.dataSources.filter((
|
|
29514
|
-
label:
|
|
29515
|
-
key:
|
|
29516
|
-
options: t(
|
|
29517
|
-
label: `${
|
|
29518
|
-
value: JSON.stringify([
|
|
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
|
-
}))]),
|
|
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
|
|
29529
|
-
return JSON.stringify(
|
|
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: (
|
|
29532
|
-
const v = JSON.parse(
|
|
29533
|
-
l.source.type =
|
|
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 ([
|
|
29555
|
+
watch(() => [a.visible, a.value], async ([w, v]) => {
|
|
29537
29556
|
var _i$value10;
|
|
29538
|
-
|
|
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 (
|
|
29553
|
-
const
|
|
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(
|
|
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(
|
|
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:
|
|
29630
|
+
rules: k
|
|
29612
29631
|
}, {
|
|
29613
|
-
default: withCtx(() => [createVNode(
|
|
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(
|
|
29662
|
+
renderSlot(w.$slots, "extra", { value: l })
|
|
29644
29663
|
]),
|
|
29645
29664
|
_: 3
|
|
29646
29665
|
}, 8, ["model"]),
|
|
29647
|
-
createElementVNode("div", uf, [createVNode(
|
|
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(
|
|
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((
|
|
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
|
|
29731
|
+
const k = n.value.slice();
|
|
29713
29732
|
if (s.value === "edit") {
|
|
29714
|
-
const u =
|
|
29715
|
-
u >= 0 &&
|
|
29716
|
-
} else S.id = `ff_${Date.now()}_${Math.random().toString(36).slice(-6)}`,
|
|
29717
|
-
a("update:modelValue",
|
|
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((
|
|
29739
|
+
a("update:modelValue", n.value.filter((k) => k.id !== S));
|
|
29721
29740
|
}
|
|
29722
|
-
return (S,
|
|
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, (
|
|
29726
|
-
key:
|
|
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(
|
|
29730
|
-
|
|
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(
|
|
29735
|
-
createVNode(Gt, { type: r(
|
|
29736
|
-
]), createElementVNode("div", vf, [createElementVNode("small", null, "触发:" + toDisplayString(
|
|
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(
|
|
29760
|
+
onClick: (v) => C(w)
|
|
29742
29761
|
}, [createVNode(unref(EditOutlined))], 8, gf), createVNode(u, {
|
|
29743
29762
|
title: "确认删除该字段填充?",
|
|
29744
|
-
onConfirm: (v) => m(
|
|
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(() => [...
|
|
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:
|
|
29784
|
+
onCancel: k[0] || (k[0] = (w) => l.value = !1)
|
|
29766
29785
|
}, {
|
|
29767
|
-
extra: withCtx((
|
|
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:
|
|
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
|
|
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
|
|
29883
|
+
function w(v) {
|
|
29865
29884
|
if (!t.draggable || l.value || v.button !== 0) return;
|
|
29866
|
-
const
|
|
29867
|
-
|
|
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,
|
|
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:
|
|
29892
|
-
onOk:
|
|
29893
|
-
onAfterClose:
|
|
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:
|
|
29908
|
-
onClick: withModifiers(
|
|
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:
|
|
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
|
|
29957
|
-
function
|
|
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:
|
|
29963
|
-
}))), B = computed(() => new Map(q.value.map((I) => [I.id_, I]))),
|
|
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
|
|
29975
|
-
const H =
|
|
29976
|
-
let
|
|
29977
|
-
if (!I.shopfloor_id_)
|
|
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
|
-
|
|
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(
|
|
30002
|
+
return de ? E(le, [de]) : le;
|
|
29984
30003
|
}
|
|
29985
|
-
function
|
|
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) ?? [],
|
|
29988
|
-
return ge ? E(
|
|
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,
|
|
29995
|
-
if (await nextTick(), v || !
|
|
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(),
|
|
30008
|
-
return H && (
|
|
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
|
-
...
|
|
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
|
|
30028
|
-
return
|
|
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:
|
|
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
|
|
30057
|
+
const le = /* @__PURE__ */ new Map();
|
|
30039
30058
|
return [...I, ...H].forEach((ge) => {
|
|
30040
|
-
(ge === null || ge === void 0 ? void 0 : ge.value) != null &&
|
|
30041
|
-
}), Array.from(
|
|
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,
|
|
30044
|
-
const ge = [...new Set(
|
|
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
|
|
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((
|
|
30054
|
-
|
|
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,
|
|
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 (
|
|
30089
|
+
if (w) return w;
|
|
30071
30090
|
if (!g) {
|
|
30072
|
-
C.value = !0,
|
|
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
|
|
30105
|
+
await w;
|
|
30087
30106
|
} finally {
|
|
30088
|
-
|
|
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
|
|
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",
|
|
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(
|
|
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),
|
|
30176
|
-
if (
|
|
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": [
|
|
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 &&
|
|
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:
|
|
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),
|
|
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(
|
|
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
|
-
|
|
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 (!(
|
|
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((
|
|
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
|
|
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(
|
|
30327
|
+
default: withCtx(() => [createVNode(le, { value: !0 }, {
|
|
30309
30328
|
default: withCtx(() => [createTextVNode(toDisplayString(I.$t("sys.true")), 1)]),
|
|
30310
30329
|
_: 1
|
|
30311
|
-
}), createVNode(
|
|
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:
|
|
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:
|
|
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"),
|
|
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(
|
|
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((
|
|
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((
|
|
30919
|
-
key:
|
|
30920
|
-
name:
|
|
30921
|
-
field:
|
|
30922
|
-
}))),
|
|
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
|
-
[
|
|
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((
|
|
30931
|
-
label:
|
|
30932
|
-
value:
|
|
30949
|
+
formFieldOptions: m.value.map((w) => ({
|
|
30950
|
+
label: w.name,
|
|
30951
|
+
value: w.key
|
|
30933
30952
|
})),
|
|
30934
30953
|
formFieldsLabel: "对象字段",
|
|
30935
30954
|
ruleTip: "默认条码映射字段:条码批次映射批次字段,条码物料编码映射物料编码字段,条码有效期映射有效期字段"
|
|
30936
|
-
}).then((
|
|
30937
|
-
|
|
30955
|
+
}).then((w) => {
|
|
30956
|
+
w.success && (i.value.parseRuleProps = w.result ?? {});
|
|
30938
30957
|
});
|
|
30939
30958
|
};
|
|
30940
|
-
watch(() => t.bizOptions.editingItem, (
|
|
30941
|
-
if (!
|
|
30942
|
-
const v = f(),
|
|
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
|
-
...
|
|
30946
|
-
values:
|
|
30947
|
-
parseRuleProps:
|
|
30948
|
-
consume_source_config_:
|
|
30949
|
-
qty_validation_rule_:
|
|
30950
|
-
consume_storage_entries_: (
|
|
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
|
|
30964
|
-
i.value.objectFieldName =
|
|
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 (
|
|
30967
|
-
const
|
|
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] = (
|
|
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(
|
|
31006
|
+
default: withCtx(() => [createVNode(R, {
|
|
30988
31007
|
value: i.value.objectField,
|
|
30989
|
-
"onUpdate:value": v[0] || (v[0] = (
|
|
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:
|
|
31028
|
+
value_default: withCtx(({ row: O }) => [e.bizOptions.RenderFieldWrapper ? (openBlock(), createBlock(resolveDynamicComponent(e.bizOptions.RenderFieldWrapper), {
|
|
31010
31029
|
key: 0,
|
|
31011
|
-
field:
|
|
31012
|
-
modelValue: i.value.values[
|
|
31013
|
-
"onUpdate:modelValue": (
|
|
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(
|
|
31052
|
+
default: withCtx(() => [createVNode(T, {
|
|
31034
31053
|
size: "small",
|
|
31035
31054
|
checked: !i.value.disableBarcodeParsing,
|
|
31036
|
-
onChange: v[1] || (v[1] = (
|
|
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(
|
|
31067
|
+
default: withCtx(() => [createVNode(R, {
|
|
31049
31068
|
value: i.value.scanParamType,
|
|
31050
|
-
"onUpdate:value": v[2] || (v[2] = (
|
|
31051
|
-
placeholder:
|
|
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)), (
|
|
31054
|
-
key:
|
|
31055
|
-
value:
|
|
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(
|
|
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] = (
|
|
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((
|
|
31182
|
-
label:
|
|
31183
|
-
value:
|
|
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
|
-
},
|
|
31194
|
-
const
|
|
31195
|
-
return
|
|
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
|
|
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(
|
|
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] = (
|
|
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, (
|
|
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(
|
|
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(
|
|
31260
|
-
value:
|
|
31261
|
-
"onUpdate:value": (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(
|
|
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(
|
|
31291
|
-
value:
|
|
31292
|
-
"onUpdate:value": (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":
|
|
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
|
-
},
|
|
31373
|
-
s.value.str = "",
|
|
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"),
|
|
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(
|
|
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(
|
|
31496
|
-
return
|
|
31514
|
+
function l(k) {
|
|
31515
|
+
return k ? k.split(":")[0] : "";
|
|
31497
31516
|
}
|
|
31498
|
-
function s(
|
|
31499
|
-
return !
|
|
31517
|
+
function s(k, u) {
|
|
31518
|
+
return !k || !u ? !1 : k === u ? !0 : l(k) === l(u);
|
|
31500
31519
|
}
|
|
31501
|
-
function f(
|
|
31520
|
+
function f(k, u) {
|
|
31502
31521
|
var _o$hasIds;
|
|
31503
|
-
const g = u ??
|
|
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 !==
|
|
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(
|
|
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
|
|
31512
|
-
if (
|
|
31530
|
+
const w = f(k, g);
|
|
31531
|
+
if (w) return Promise.reject(w);
|
|
31513
31532
|
} }];
|
|
31514
31533
|
}
|
|
31515
|
-
function r(
|
|
31516
|
-
const u = (
|
|
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_ ??
|
|
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(
|
|
31525
|
-
return
|
|
31526
|
-
product_id_:
|
|
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
|
|
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 (
|
|
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(
|
|
31546
|
-
Object.assign(
|
|
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(
|
|
31560
|
-
t.value.substitute_material_entries_.splice(
|
|
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
|
-
}), (
|
|
31565
|
-
const g = resolveComponent("a-radio"),
|
|
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:
|
|
31586
|
+
label: k.$t("sys.edhr.mcTable.substituteMaterialEnabled"),
|
|
31568
31587
|
name: "substitute_material_enabled_",
|
|
31569
|
-
rules: [unref(Te)(
|
|
31588
|
+
rules: [unref(Te)(k.$t("sys.edhr.mcTable.substituteMaterialEnabled"))]
|
|
31570
31589
|
}, {
|
|
31571
|
-
default: withCtx(() => [createVNode(
|
|
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(
|
|
31595
|
+
default: withCtx(() => [createTextVNode(toDisplayString(k.$t("sys.true")), 1)]),
|
|
31577
31596
|
_: 1
|
|
31578
31597
|
}), createVNode(g, { value: !1 }, {
|
|
31579
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
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:
|
|
31608
|
+
label: k.$t("sys.edhr.mcTable.substitutePolicy"),
|
|
31590
31609
|
name: "substitute_policy_",
|
|
31591
31610
|
required: ""
|
|
31592
31611
|
}, {
|
|
31593
|
-
default: withCtx(() => [createVNode(
|
|
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:
|
|
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(
|
|
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(
|
|
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:
|
|
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:
|
|
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
|
-
|
|
31646
|
+
M,
|
|
31628
31647
|
"product_id_"
|
|
31629
31648
|
],
|
|
31630
|
-
rules: i(
|
|
31649
|
+
rules: i(O)
|
|
31631
31650
|
}, {
|
|
31632
31651
|
default: withCtx(() => [createVNode(unref(na), {
|
|
31633
|
-
"model-value":
|
|
31652
|
+
"model-value": O.product_id_ || void 0,
|
|
31634
31653
|
"model-key": "em_product",
|
|
31635
|
-
placeholder:
|
|
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(
|
|
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(
|
|
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(
|
|
31670
|
+
onClick: (V) => S(M)
|
|
31652
31671
|
}, {
|
|
31653
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
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(
|
|
31710
|
-
return (
|
|
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(
|
|
31716
|
-
return (
|
|
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
|
|
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
|
|
31734
|
-
if (
|
|
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" && (
|
|
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" && (
|
|
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
|
-
}])),
|
|
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" && (
|
|
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
|
-
}],
|
|
31777
|
+
}], T.min_value_ = [{
|
|
31759
31778
|
required: !0,
|
|
31760
31779
|
message: $t("sys.pleaseInputSth", { sth: $t("sys.edhr.mcTable.qtyValidationMin") })
|
|
31761
|
-
}])),
|
|
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" && (
|
|
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
|
-
}])),
|
|
31786
|
+
}])), T;
|
|
31768
31787
|
});
|
|
31769
|
-
function C(
|
|
31770
|
-
const L = (
|
|
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_ ??
|
|
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(
|
|
31779
|
-
return
|
|
31780
|
-
product_id_:
|
|
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(
|
|
31791
|
-
return
|
|
31809
|
+
function m(T) {
|
|
31810
|
+
return T ? T.split(":")[0] : "";
|
|
31792
31811
|
}
|
|
31793
|
-
function S(
|
|
31794
|
-
return !
|
|
31812
|
+
function S(T, L) {
|
|
31813
|
+
return !T || !L ? !1 : T === L ? !0 : m(T) === m(L);
|
|
31795
31814
|
}
|
|
31796
|
-
function
|
|
31797
|
-
return
|
|
31815
|
+
function k(T) {
|
|
31816
|
+
return T ? (t.bizOptions.hasIds ?? []).some((L) => S(L, T)) : !1;
|
|
31798
31817
|
}
|
|
31799
|
-
function u(
|
|
31800
|
-
const L =
|
|
31801
|
-
return L &&
|
|
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(
|
|
31804
|
-
Object.assign(r, d(
|
|
31822
|
+
function g(T, L) {
|
|
31823
|
+
Object.assign(r, d(T ?? null, L));
|
|
31805
31824
|
}
|
|
31806
|
-
function
|
|
31807
|
-
return
|
|
31808
|
-
const { __key: A, ...
|
|
31825
|
+
function w(T = []) {
|
|
31826
|
+
return T.map((L) => {
|
|
31827
|
+
const { __key: A, ...O } = L;
|
|
31809
31828
|
return {
|
|
31810
|
-
...
|
|
31811
|
-
qty_required_: r.qty_required_ ??
|
|
31829
|
+
...O,
|
|
31830
|
+
qty_required_: r.qty_required_ ?? O.qty_required_ ?? 0
|
|
31812
31831
|
};
|
|
31813
31832
|
});
|
|
31814
31833
|
}
|
|
31815
|
-
function v(
|
|
31816
|
-
return
|
|
31817
|
-
const { __key: A, ...
|
|
31818
|
-
return
|
|
31834
|
+
function v(T = []) {
|
|
31835
|
+
return T.map((L) => {
|
|
31836
|
+
const { __key: A, ...O } = L;
|
|
31837
|
+
return O;
|
|
31819
31838
|
});
|
|
31820
31839
|
}
|
|
31821
|
-
function
|
|
31822
|
-
|
|
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 = [], ...
|
|
31826
|
-
...
|
|
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
|
|
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 (
|
|
31847
|
-
const A = resolveComponent("a-form-item"),
|
|
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(
|
|
31888
|
+
createElementVNode("div", S2, toDisplayString(T.$t("sys.appDesigner.basicInformation")), 1),
|
|
31870
31889
|
createVNode(V, { gutter: 16 }, {
|
|
31871
|
-
default: withCtx(() => [createVNode(
|
|
31890
|
+
default: withCtx(() => [createVNode(O, { span: 12 }, {
|
|
31872
31891
|
default: withCtx(() => [createVNode(A, {
|
|
31873
|
-
label:
|
|
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:
|
|
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(
|
|
31915
|
+
}), createVNode(O, { span: 12 }, {
|
|
31897
31916
|
default: withCtx(() => [createVNode(A, {
|
|
31898
|
-
label:
|
|
31917
|
+
label: T.$t("sys.edhr.unitQty"),
|
|
31899
31918
|
name: "qty_required_",
|
|
31900
31919
|
required: ""
|
|
31901
31920
|
}, {
|
|
31902
|
-
default: withCtx(() => [createVNode(
|
|
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:
|
|
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(
|
|
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(
|
|
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:
|
|
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(
|
|
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(
|
|
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(
|
|
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:
|
|
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(
|
|
31985
|
+
default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.true")), 1)]),
|
|
31967
31986
|
_: 1
|
|
31968
31987
|
}), createVNode(U, { value: !1 }, {
|
|
31969
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
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(
|
|
31995
|
+
default: withCtx(() => [createVNode(O, { span: 12 }, {
|
|
31977
31996
|
default: withCtx(() => [createVNode(A, {
|
|
31978
|
-
label:
|
|
31997
|
+
label: T.$t("sys.edhr.mcTable.lotMixingTimes"),
|
|
31979
31998
|
name: "lot_mixing_times_",
|
|
31980
31999
|
required: ""
|
|
31981
32000
|
}, {
|
|
31982
|
-
default: withCtx(() => [createVNode(
|
|
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:
|
|
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:
|
|
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(
|
|
32035
|
+
default: withCtx(() => [createTextVNode(toDisplayString(T.$t("sys.true")), 1)]),
|
|
32017
32036
|
_: 1
|
|
32018
32037
|
}), createVNode(U, { value: !1 }, {
|
|
32019
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
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, ...
|
|
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(
|
|
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
|
-
},
|
|
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(),
|
|
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:
|
|
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:
|
|
32481
|
+
cancel: k.cancel,
|
|
32463
32482
|
isClosing: () => C
|
|
32464
32483
|
});
|
|
32465
32484
|
try {
|
|
32466
|
-
m = W2(
|
|
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.
|
|
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
|
-
/**
|
|
148366
|
-
isRowInGroup(row) {
|
|
148384
|
+
/** 历史数据按父级标识归组;当前表格数据按明细 ID 归组。 */
|
|
148385
|
+
isRowInGroup(row, source = "current") {
|
|
148367
148386
|
if (row.deleted_) return false;
|
|
148368
|
-
|
|
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 =
|
|
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-
|
|
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
|