@dazhicheng/ui 1.6.79 → 1.6.81
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/api/supplier.d.ts +16 -0
- package/dist/api/supplier.js +39 -12
- package/dist/assets/svg/download.svg.js +1 -1
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/index.d.ts +28 -28
- package/dist/components/tt-button/index.vue.d.ts +16 -16
- package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
- package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
- package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
- package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
- package/dist/components/tt-drawer/index.d.ts +109 -109
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-empty/index.d.ts +4 -4
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-image/index.d.ts +29 -29
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
- package/dist/components/tt-image/tt-image.d.ts +29 -29
- package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-modal/index.d.ts +150 -150
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +133 -122
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +77 -66
- package/dist/components/tt-panel-select/src/hooks/usePanelData.d.ts +2 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +14 -14
- package/dist/components/tt-panel-select/src/index.vue.d.ts +7 -5
- package/dist/components/tt-panel-select/src/index.vue.js +300 -219
- package/dist/components/tt-panel-select/src/types.d.ts +12 -0
- package/dist/components/tt-table/index.js +6 -5
- package/dist/components/tt-table/src/TableForm.vue.js +3 -2
- package/dist/components/tt-table/src/hooks/useQuery.js +52 -50
- package/dist/components/tt-upload/index.d.ts +60 -60
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/hooks/basicDataCodes.d.ts +5 -0
- package/dist/hooks/basicDataCodes.js +61 -60
- package/dist/hooks/missingOptionsCache.d.ts +53 -0
- package/dist/hooks/missingOptionsCache.js +133 -0
- package/dist/hooks/panelSelectEchoFields.d.ts +12 -0
- package/dist/hooks/panelSelectEchoFields.js +46 -0
- package/dist/hooks/useBasicDataOptions.d.ts +2 -0
- package/dist/hooks/useBasicDataOptions.js +85 -78
- package/dist/hooks/useDataPermissionOptions.d.ts +10 -0
- package/dist/hooks/useDataPermissionOptions.js +83 -66
- package/dist/hooks/useFormSchemasLink.js +240 -194
- package/dist/hooks/usePanelSelectSchemas.d.ts +11 -0
- package/dist/hooks/usePanelSelectSchemas.js +158 -122
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useDataPermissionOptions as
|
|
1
|
+
import { useDataPermissionOptions as me } from "./useDataPermissionOptions.js";
|
|
2
2
|
import "axios";
|
|
3
|
-
import { ElSelectV2 as
|
|
4
|
-
import { isArray as
|
|
5
|
-
import "vue";
|
|
3
|
+
import { ElSelectV2 as he } from "element-plus";
|
|
4
|
+
import { isArray as O, isFunction as K, isString as ge } from "../packages/utils/src/is.js";
|
|
5
|
+
import { computed as Ie, unref as T } from "vue";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
import "numeral";
|
|
8
8
|
import "xe-utils";
|
|
@@ -14,327 +14,373 @@ import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
|
14
14
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
15
15
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
16
16
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
17
|
-
import { get as h, set as
|
|
18
|
-
|
|
17
|
+
import { get as h, set as C, omit as Pe } from "lodash-es";
|
|
18
|
+
import { CODES as G } from "./basicDataCodes.js";
|
|
19
|
+
import { registerPanelSelectEchoField as be } from "./panelSelectEchoFields.js";
|
|
20
|
+
import { missingOptionsEchoVersion as Se, withMissingOptionDisabled as y, getMergedOptions as Ce, ensureMissingOptions as Oe } from "./missingOptionsCache.js";
|
|
21
|
+
import { useOwnerRoutePath as Ae } from "./useOwnerRoutePath.js";
|
|
22
|
+
const Q = "all", we = { label: "全部", value: Q }, te = [
|
|
19
23
|
"platformId",
|
|
20
24
|
"shopId",
|
|
21
25
|
"purchasePlaceId",
|
|
22
26
|
"businessType",
|
|
23
27
|
"lockUserId",
|
|
24
28
|
"userId"
|
|
25
|
-
],
|
|
29
|
+
], ee = {
|
|
26
30
|
platformId: "platformIds",
|
|
27
31
|
shopId: "shopIds",
|
|
28
32
|
purchasePlaceId: "purchasePlaceId",
|
|
29
33
|
businessType: "businessType",
|
|
30
34
|
lockUserId: "lockUserId"
|
|
31
|
-
},
|
|
35
|
+
}, Fe = {
|
|
32
36
|
platformId: "平台",
|
|
33
37
|
shopId: "店铺",
|
|
34
38
|
purchasePlaceId: "采购地",
|
|
35
39
|
businessType: "业务线",
|
|
36
40
|
lockUserId: "锁单人"
|
|
37
41
|
};
|
|
38
|
-
function
|
|
39
|
-
return
|
|
42
|
+
function Me(r, l) {
|
|
43
|
+
return l ? r ? `${r}.${l}` : l : "";
|
|
40
44
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
45
|
+
function J(r) {
|
|
46
|
+
return ge(r) && r.toLowerCase() === Q.toLowerCase();
|
|
43
47
|
}
|
|
44
48
|
function V(r) {
|
|
45
|
-
return
|
|
49
|
+
return O(r) ? r : r == null || r === "" ? [] : [r];
|
|
46
50
|
}
|
|
47
|
-
function
|
|
48
|
-
return [
|
|
51
|
+
function Ve(r = []) {
|
|
52
|
+
return [we].concat(r);
|
|
49
53
|
}
|
|
50
|
-
function
|
|
51
|
-
return r ?
|
|
54
|
+
function Ee(r, l, c, g) {
|
|
55
|
+
return r ? K(r) ? r(l, c, g) : r : {};
|
|
52
56
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
+
function ne(r, l, c, g) {
|
|
58
|
+
l == null || l(r);
|
|
59
|
+
const P = g(), R = h(P.values, P.fieldName);
|
|
60
|
+
c == null || c(R, P);
|
|
57
61
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
62
|
+
function oe(r = {}, l = te, c) {
|
|
63
|
+
var Z, H;
|
|
64
|
+
const g = r.scene || "list", P = Ae(), R = l.includes("purchasePlaceId"), W = g === "action", re = l.reduce(
|
|
60
65
|
(e, t) => {
|
|
61
66
|
if (t === "userId") return e;
|
|
62
|
-
const n =
|
|
67
|
+
const n = b(t), o = w(t) === "TtPanelSelect";
|
|
63
68
|
return e[t] = o ? !1 : n.showAll ?? !1, e;
|
|
64
69
|
},
|
|
65
70
|
{}
|
|
66
|
-
), { dataSource:
|
|
67
|
-
codes:
|
|
71
|
+
), { dataSource: _ } = c ? { dataSource: c } : me({
|
|
72
|
+
codes: l,
|
|
68
73
|
dataSource: r.dataSource,
|
|
69
|
-
showAll:
|
|
74
|
+
showAll: re
|
|
70
75
|
});
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
76
|
+
if (R && !c) {
|
|
77
|
+
const e = String(((H = (Z = r.fieldConfigs) == null ? void 0 : Z.purchasePlaceId) == null ? void 0 : H.fieldName) || ee.purchasePlaceId);
|
|
78
|
+
be(P, G.PURCHASE_PLACE, e);
|
|
74
79
|
}
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
const D = R && !c ? Ie(() => {
|
|
81
|
+
Se.value;
|
|
82
|
+
const e = T(_);
|
|
83
|
+
return new Proxy(e, {
|
|
84
|
+
get(t, n, o) {
|
|
85
|
+
if (typeof n == "symbol")
|
|
86
|
+
return Reflect.get(t, n, o);
|
|
87
|
+
if (n === "purchasePlaceId") {
|
|
88
|
+
const i = Reflect.get(t, n, o) || [];
|
|
89
|
+
return y(
|
|
90
|
+
Ce(P, G.PURCHASE_PLACE, i),
|
|
91
|
+
W
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return Reflect.get(t, n, o);
|
|
95
|
+
},
|
|
96
|
+
set(t, n) {
|
|
97
|
+
return !0;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}) : _;
|
|
101
|
+
function p(e, t = r.basePath) {
|
|
102
|
+
const n = b(e).fieldName || ee[e];
|
|
103
|
+
return Me(t, n);
|
|
77
104
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
105
|
+
function x(e) {
|
|
106
|
+
return b(e).rules;
|
|
80
107
|
}
|
|
81
|
-
function
|
|
108
|
+
function B(e) {
|
|
109
|
+
return b(e).label || Fe[e];
|
|
110
|
+
}
|
|
111
|
+
function b(e) {
|
|
82
112
|
var t;
|
|
83
113
|
return ((t = r.fieldConfigs) == null ? void 0 : t[e]) || {};
|
|
84
114
|
}
|
|
85
115
|
function A(e) {
|
|
86
|
-
return
|
|
116
|
+
return b(e).showAllField ?? Q;
|
|
87
117
|
}
|
|
88
118
|
function U(e, t, n) {
|
|
89
|
-
return
|
|
119
|
+
return K(e) ? e(t, n) : e;
|
|
90
120
|
}
|
|
91
|
-
function
|
|
92
|
-
const n =
|
|
121
|
+
function j(e, t) {
|
|
122
|
+
const n = b(e).dependencies;
|
|
93
123
|
if (!t) return n;
|
|
94
124
|
if (!n) return t;
|
|
95
125
|
const o = {
|
|
96
126
|
...t,
|
|
97
127
|
...n
|
|
98
|
-
},
|
|
99
|
-
(
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
return
|
|
128
|
+
}, i = t.triggerFields || [], s = n.triggerFields || [];
|
|
129
|
+
(i.length || s.length) && (o.triggerFields = Array.from(/* @__PURE__ */ new Set([...i, ...s])));
|
|
130
|
+
const u = t.disabled, f = n.disabled;
|
|
131
|
+
u !== void 0 && f !== void 0 && (o.disabled = (m, d) => U(u, m, d) ? !0 : U(f, m, d));
|
|
132
|
+
const a = t.rules, S = n.rules;
|
|
133
|
+
return a !== void 0 && S !== void 0 && (o.rules = (m, d) => u !== void 0 && U(u, m, d) ? null : U(S ?? a, m, d)), o;
|
|
104
134
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
135
|
+
function w(e) {
|
|
136
|
+
return b(e).component || (e === "platformId" || e === "shopId" || e === "purchasePlaceId" ? "TtPanelSelect" : "TtApiComponent");
|
|
107
137
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
138
|
+
function E(e) {
|
|
139
|
+
return b(e).multiple ?? !0;
|
|
110
140
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
141
|
+
function $(e) {
|
|
142
|
+
return D.value[e] || [];
|
|
113
143
|
}
|
|
114
|
-
function
|
|
144
|
+
function se(e) {
|
|
115
145
|
const t = /* @__PURE__ */ new Map();
|
|
116
146
|
return e.forEach((n) => {
|
|
117
|
-
const o = n.purchaseInfo,
|
|
118
|
-
let s = t.get(
|
|
147
|
+
const o = n.purchaseInfo, i = (o == null ? void 0 : o.supplierSubType) ?? "其他";
|
|
148
|
+
let s = t.get(i);
|
|
119
149
|
s || (s = {
|
|
120
|
-
label: String(
|
|
121
|
-
value:
|
|
150
|
+
label: String(i),
|
|
151
|
+
value: i,
|
|
122
152
|
children: []
|
|
123
|
-
}, t.set(
|
|
153
|
+
}, t.set(i, s)), s.children.push(n);
|
|
124
154
|
}), Array.from(t.values());
|
|
125
155
|
}
|
|
126
|
-
function
|
|
156
|
+
function ie(e) {
|
|
127
157
|
const t = /* @__PURE__ */ new Map();
|
|
128
158
|
return e.forEach((n) => {
|
|
129
159
|
const o = n.platformId;
|
|
130
160
|
if (o == null) return;
|
|
131
|
-
let
|
|
132
|
-
|
|
161
|
+
let i = t.get(o);
|
|
162
|
+
i || (i = {
|
|
133
163
|
label: String(n.platformName ?? n.platformId),
|
|
134
164
|
value: o,
|
|
135
165
|
children: []
|
|
136
|
-
}, t.set(o,
|
|
166
|
+
}, t.set(o, i)), i.children.push(n);
|
|
137
167
|
}), Array.from(t.values());
|
|
138
168
|
}
|
|
139
|
-
function
|
|
169
|
+
function X(e) {
|
|
140
170
|
return e.flatMap((t) => {
|
|
141
171
|
const n = t.children;
|
|
142
|
-
return n != null && n.length ?
|
|
172
|
+
return n != null && n.length ? X(n) : [t];
|
|
143
173
|
});
|
|
144
174
|
}
|
|
145
|
-
function
|
|
146
|
-
return V(e).some((n) => n === t ||
|
|
175
|
+
function le(e, t) {
|
|
176
|
+
return V(e).some((n) => n === t || J(n));
|
|
147
177
|
}
|
|
148
|
-
function
|
|
149
|
-
const n =
|
|
150
|
-
if (
|
|
151
|
-
|
|
178
|
+
function ce(e, t) {
|
|
179
|
+
const n = p("shopId"), o = E("shopId"), i = A("shopId");
|
|
180
|
+
if (g === "action" && L(t)) {
|
|
181
|
+
C(e, n, o ? [i] : i);
|
|
152
182
|
return;
|
|
153
183
|
}
|
|
154
|
-
|
|
184
|
+
C(e, n, o ? [] : void 0);
|
|
155
185
|
}
|
|
156
186
|
function L(e) {
|
|
157
|
-
const t =
|
|
158
|
-
return
|
|
187
|
+
const t = le(e, A("platformId")), n = O(e) ? e.length > 1 : !1;
|
|
188
|
+
return g === "action" && (t || n);
|
|
159
189
|
}
|
|
160
|
-
function
|
|
161
|
-
const t =
|
|
190
|
+
function ue(e) {
|
|
191
|
+
const t = $("shopId"), n = V(e);
|
|
162
192
|
if (!n.length)
|
|
163
|
-
return
|
|
193
|
+
return g === "action" ? [] : t;
|
|
164
194
|
if (L(e)) return [];
|
|
165
195
|
const o = t.filter((s) => n.includes(s.platformId));
|
|
166
|
-
return !o.some((s) => s.value === A("shopId") ||
|
|
196
|
+
return !o.some((s) => s.value === A("shopId") || J(s.value)) || o.length <= 1 ? o : Ve(o.filter((s) => s.value !== A("shopId") && !J(s.value)));
|
|
167
197
|
}
|
|
168
|
-
function
|
|
169
|
-
const s =
|
|
198
|
+
function Y(e, t, n, o, i) {
|
|
199
|
+
const s = p(e), u = h(t, s), f = i ? o.filter((a) => O(u) && u.includes(a.value)) : o.find((a) => a.value === u);
|
|
170
200
|
return {
|
|
171
201
|
values: t,
|
|
172
202
|
actions: n,
|
|
173
203
|
fieldName: s,
|
|
174
204
|
dataType: e,
|
|
175
205
|
options: o,
|
|
176
|
-
currentOption:
|
|
206
|
+
currentOption: f
|
|
177
207
|
};
|
|
178
208
|
}
|
|
179
|
-
function
|
|
180
|
-
const s =
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
209
|
+
function q(e, t, n, o, i) {
|
|
210
|
+
const s = b(e), u = Ee(s.componentProps, t, n, o), f = E(e), {
|
|
211
|
+
onChange: a,
|
|
212
|
+
resolveMissingOptions: S,
|
|
213
|
+
...m
|
|
214
|
+
} = u, d = K(s.customOptions) ? s.customOptions(t, o) : o, I = w(e) === "TtPanelSelect", F = I && e === "shopId" ? ie(d) : I && e === "purchasePlaceId" ? se(d) : d, v = I ? X(F) : d, ae = I && e === "purchasePlaceId";
|
|
215
|
+
return I ? {
|
|
216
|
+
multiple: f,
|
|
217
|
+
showAll: s.showAll ?? (e === "shopId" && g === "action" ? V(h(t, p("platformId"))).length > 0 : !0),
|
|
184
218
|
showAllField: A(e),
|
|
185
219
|
showNav: e !== "platformId" && e !== "purchasePlaceId",
|
|
186
220
|
showOriginMode: e === "platformId",
|
|
187
221
|
showPinyinMode: e !== "shopId" && e !== "purchasePlaceId",
|
|
188
|
-
...
|
|
189
|
-
options:
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
222
|
+
...m,
|
|
223
|
+
options: F,
|
|
224
|
+
...ae ? {
|
|
225
|
+
resolveMissingOptions: async (M) => {
|
|
226
|
+
const k = await Oe(
|
|
227
|
+
P,
|
|
228
|
+
G.PURCHASE_PLACE,
|
|
229
|
+
M,
|
|
230
|
+
// 差集相对数据权限主列表(不含 echo),避免把已回显项再当缺码
|
|
231
|
+
T(_).purchasePlaceId || []
|
|
232
|
+
);
|
|
233
|
+
return y(k, W);
|
|
234
|
+
}
|
|
235
|
+
} : {},
|
|
236
|
+
onChange(M) {
|
|
237
|
+
const k = M !== void 0 ? M : h(t, p(e));
|
|
238
|
+
C(t, p(e), k), ne(
|
|
239
|
+
k,
|
|
240
|
+
i,
|
|
195
241
|
s.onChange,
|
|
196
|
-
() =>
|
|
242
|
+
() => Y(e, t, n, v, f)
|
|
197
243
|
);
|
|
198
244
|
}
|
|
199
245
|
} : {
|
|
200
|
-
multiple:
|
|
201
|
-
component:
|
|
246
|
+
multiple: f,
|
|
247
|
+
component: he,
|
|
202
248
|
showOriginMode: !1,
|
|
203
249
|
showPinyinMode: !0,
|
|
204
|
-
...
|
|
250
|
+
...m,
|
|
205
251
|
options: d,
|
|
206
|
-
onChange(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
252
|
+
onChange(M) {
|
|
253
|
+
ne(
|
|
254
|
+
M,
|
|
255
|
+
i,
|
|
210
256
|
s.onChange,
|
|
211
|
-
() =>
|
|
257
|
+
() => Y(e, t, n, v, f)
|
|
212
258
|
);
|
|
213
259
|
}
|
|
214
260
|
};
|
|
215
261
|
}
|
|
216
|
-
function
|
|
217
|
-
const t =
|
|
262
|
+
function z(e) {
|
|
263
|
+
const t = p(e);
|
|
218
264
|
return {
|
|
219
|
-
component:
|
|
265
|
+
component: w(e),
|
|
220
266
|
fieldName: t,
|
|
221
|
-
label:
|
|
222
|
-
rules:
|
|
223
|
-
dependencies:
|
|
267
|
+
label: B(e),
|
|
268
|
+
rules: x(e),
|
|
269
|
+
dependencies: j(e),
|
|
224
270
|
componentProps: (n, o) => {
|
|
225
|
-
const
|
|
226
|
-
return
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
if (
|
|
231
|
-
|
|
271
|
+
const i = $(e), s = p(e), u = E(e), f = A(e), a = h(n, s), S = O(a) ? a.at(-1) !== f : !0;
|
|
272
|
+
return q(e, n, o, i, (m) => {
|
|
273
|
+
if (w(e) !== "TtPanelSelect") {
|
|
274
|
+
const d = h(n, s);
|
|
275
|
+
if (u)
|
|
276
|
+
if (S && V(m).at(-1) === f)
|
|
277
|
+
C(n, s, [f]);
|
|
232
278
|
else {
|
|
233
|
-
const
|
|
234
|
-
|
|
279
|
+
const I = O(d) ? d.filter((F) => F !== f) : [];
|
|
280
|
+
C(n, s, I);
|
|
235
281
|
}
|
|
236
282
|
}
|
|
237
283
|
});
|
|
238
284
|
}
|
|
239
285
|
};
|
|
240
286
|
}
|
|
241
|
-
const
|
|
287
|
+
const fe = {
|
|
242
288
|
// 平台
|
|
243
289
|
platformId: {
|
|
244
|
-
component:
|
|
245
|
-
fieldName:
|
|
246
|
-
label:
|
|
247
|
-
rules:
|
|
248
|
-
dependencies:
|
|
290
|
+
component: w("platformId"),
|
|
291
|
+
fieldName: p("platformId"),
|
|
292
|
+
label: B("platformId"),
|
|
293
|
+
rules: x("platformId"),
|
|
294
|
+
dependencies: j("platformId"),
|
|
249
295
|
componentProps: (e, t) => {
|
|
250
|
-
const n = "platformId", o =
|
|
251
|
-
return
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
if (
|
|
256
|
-
|
|
296
|
+
const n = "platformId", o = p(n), i = E(n), s = $(n), u = A(n), f = h(e, o), a = O(f) ? f.at(-1) !== u : !0;
|
|
297
|
+
return q(n, e, t, s, (S) => {
|
|
298
|
+
if (w(n) !== "TtPanelSelect") {
|
|
299
|
+
const m = h(e, o);
|
|
300
|
+
if (i)
|
|
301
|
+
if (a && V(S).at(-1) === u)
|
|
302
|
+
C(e, o, [u]);
|
|
257
303
|
else {
|
|
258
|
-
const
|
|
259
|
-
|
|
304
|
+
const d = O(m) ? m.filter((I) => I !== u) : [];
|
|
305
|
+
C(e, o, d);
|
|
260
306
|
}
|
|
261
307
|
}
|
|
262
|
-
|
|
308
|
+
ce(e, h(e, o));
|
|
263
309
|
});
|
|
264
310
|
}
|
|
265
311
|
},
|
|
266
312
|
// 店铺
|
|
267
313
|
shopId: {
|
|
268
|
-
component:
|
|
269
|
-
fieldName:
|
|
270
|
-
label:
|
|
314
|
+
component: w("shopId"),
|
|
315
|
+
fieldName: p("shopId"),
|
|
316
|
+
label: B("shopId"),
|
|
271
317
|
componentProps: (e, t) => {
|
|
272
|
-
const n = "shopId", o =
|
|
273
|
-
return
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
277
|
-
if (
|
|
278
|
-
|
|
318
|
+
const n = "shopId", o = p(n), i = h(e, p("platformId")), s = ue(i), u = E(n), f = A(n), a = h(e, o), S = O(a) ? a.at(-1) !== f : !0;
|
|
319
|
+
return q(n, e, t, s, (m) => {
|
|
320
|
+
if (w(n) !== "TtPanelSelect") {
|
|
321
|
+
const d = h(e, o);
|
|
322
|
+
if (u)
|
|
323
|
+
if (S && V(m).at(-1) === f)
|
|
324
|
+
C(e, o, [f]);
|
|
279
325
|
else {
|
|
280
|
-
const
|
|
281
|
-
|
|
326
|
+
const I = O(d) ? d.filter((F) => F !== f) : [];
|
|
327
|
+
C(e, o, I);
|
|
282
328
|
}
|
|
283
329
|
}
|
|
284
330
|
});
|
|
285
331
|
},
|
|
286
|
-
dependencies:
|
|
287
|
-
triggerFields: [
|
|
332
|
+
dependencies: j("shopId", {
|
|
333
|
+
triggerFields: [p("platformId")],
|
|
288
334
|
disabled(e) {
|
|
289
|
-
return L(h(e,
|
|
335
|
+
return L(h(e, p("platformId")));
|
|
290
336
|
},
|
|
291
337
|
rules(e) {
|
|
292
|
-
return L(h(e,
|
|
338
|
+
return L(h(e, p("platformId"))) ? null : x("shopId") || null;
|
|
293
339
|
}
|
|
294
340
|
})
|
|
295
341
|
},
|
|
296
|
-
purchasePlaceId:
|
|
297
|
-
businessType:
|
|
298
|
-
lockUserId:
|
|
342
|
+
purchasePlaceId: z("purchasePlaceId"),
|
|
343
|
+
businessType: z("businessType"),
|
|
344
|
+
lockUserId: z("lockUserId")
|
|
299
345
|
};
|
|
300
|
-
function
|
|
346
|
+
function N(e) {
|
|
301
347
|
var o;
|
|
302
|
-
const t =
|
|
348
|
+
const t = fe[e], n = (o = r.fieldConfigs) == null ? void 0 : o[e];
|
|
303
349
|
return {
|
|
304
350
|
...t,
|
|
305
|
-
...
|
|
351
|
+
...Pe(n, ["componentProps", "rules", "fieldName", "dependencies"]),
|
|
306
352
|
fieldName: t.fieldName
|
|
307
353
|
};
|
|
308
354
|
}
|
|
309
|
-
function
|
|
355
|
+
function de() {
|
|
310
356
|
return {
|
|
311
|
-
platformId:
|
|
312
|
-
shopId:
|
|
313
|
-
purchasePlaceId:
|
|
314
|
-
businessType:
|
|
315
|
-
lockUserId:
|
|
357
|
+
platformId: N("platformId"),
|
|
358
|
+
shopId: N("shopId"),
|
|
359
|
+
purchasePlaceId: N("purchasePlaceId"),
|
|
360
|
+
businessType: N("businessType"),
|
|
361
|
+
lockUserId: N("lockUserId")
|
|
316
362
|
};
|
|
317
363
|
}
|
|
318
|
-
function
|
|
364
|
+
function pe(e, t) {
|
|
319
365
|
const n = t ? {
|
|
320
366
|
...r.fieldConfigs,
|
|
321
367
|
...Object.fromEntries(
|
|
322
|
-
Object.entries(t).map(([
|
|
323
|
-
var
|
|
368
|
+
Object.entries(t).map(([i, s]) => {
|
|
369
|
+
var u;
|
|
324
370
|
return [
|
|
325
|
-
|
|
326
|
-
{ ...((
|
|
371
|
+
i,
|
|
372
|
+
{ ...((u = r.fieldConfigs) == null ? void 0 : u[i]) || {}, ...s }
|
|
327
373
|
];
|
|
328
374
|
})
|
|
329
375
|
)
|
|
330
|
-
} : r.fieldConfigs, o =
|
|
376
|
+
} : r.fieldConfigs, o = oe(
|
|
331
377
|
{
|
|
332
378
|
...r,
|
|
333
379
|
basePath: e,
|
|
334
380
|
fieldConfigs: n
|
|
335
381
|
},
|
|
336
|
-
|
|
337
|
-
|
|
382
|
+
l,
|
|
383
|
+
D
|
|
338
384
|
);
|
|
339
385
|
return {
|
|
340
386
|
platformId: o.platformId,
|
|
@@ -345,89 +391,89 @@ function X(r = {}, i = W, f) {
|
|
|
345
391
|
};
|
|
346
392
|
}
|
|
347
393
|
return {
|
|
348
|
-
...
|
|
349
|
-
dataSource:
|
|
350
|
-
createRowSchemas:
|
|
394
|
+
...de(),
|
|
395
|
+
dataSource: D,
|
|
396
|
+
createRowSchemas: pe
|
|
351
397
|
};
|
|
352
398
|
}
|
|
353
|
-
function
|
|
399
|
+
function He() {
|
|
354
400
|
const r = {
|
|
355
401
|
options: {},
|
|
356
|
-
codes: [...
|
|
357
|
-
},
|
|
402
|
+
codes: [...te]
|
|
403
|
+
}, l = {
|
|
358
404
|
/**
|
|
359
405
|
* @description 渲染查询场景
|
|
360
406
|
*/
|
|
361
407
|
list() {
|
|
362
|
-
return r.options.scene = "list",
|
|
408
|
+
return r.options.scene = "list", l;
|
|
363
409
|
},
|
|
364
410
|
/**
|
|
365
411
|
* @description 渲染新增编辑场景
|
|
366
412
|
*/
|
|
367
413
|
action() {
|
|
368
|
-
return r.options.scene = "action",
|
|
414
|
+
return r.options.scene = "action", l;
|
|
369
415
|
},
|
|
370
416
|
/**
|
|
371
417
|
* @param scene - 场景值,list 为查询筛选,action 为新增编辑等操作
|
|
372
418
|
* @returns FormSchemasLinkBuilder
|
|
373
419
|
*/
|
|
374
|
-
scene(
|
|
375
|
-
return r.options.scene =
|
|
420
|
+
scene(c) {
|
|
421
|
+
return r.options.scene = c, l;
|
|
376
422
|
},
|
|
377
423
|
/**
|
|
378
424
|
* @param basePath - 字段路径前缀,例如 "items[0]" 或 "condition"
|
|
379
425
|
* @returns FormSchemasLinkBuilder
|
|
380
426
|
*/
|
|
381
|
-
basePath(
|
|
382
|
-
return r.options.basePath =
|
|
427
|
+
basePath(c) {
|
|
428
|
+
return r.options.basePath = c, l;
|
|
383
429
|
},
|
|
384
430
|
/**
|
|
385
431
|
* @param codes - 接口请求所需要的数据权限维度 code 列表
|
|
386
432
|
* @returns FormSchemasLinkBuilder
|
|
387
433
|
*/
|
|
388
|
-
codes(
|
|
389
|
-
return r.codes = [...
|
|
434
|
+
codes(c) {
|
|
435
|
+
return r.codes = [...c], l;
|
|
390
436
|
},
|
|
391
437
|
/**
|
|
392
438
|
* @param dataSource - 外部自定义数据源
|
|
393
439
|
* @returns FormSchemasLinkBuilder
|
|
394
440
|
*/
|
|
395
|
-
dataSource(
|
|
396
|
-
return r.options.dataSource =
|
|
441
|
+
dataSource(c) {
|
|
442
|
+
return r.options.dataSource = c, l;
|
|
397
443
|
},
|
|
398
444
|
/**
|
|
399
445
|
* @param dataType - 待配置的数据类型维度
|
|
400
446
|
* @param config - 字段自定义配置
|
|
401
447
|
* @returns FormSchemasLinkBuilder
|
|
402
448
|
*/
|
|
403
|
-
field(
|
|
404
|
-
var
|
|
449
|
+
field(c, g) {
|
|
450
|
+
var P;
|
|
405
451
|
return r.options.fieldConfigs = {
|
|
406
452
|
...r.options.fieldConfigs,
|
|
407
|
-
[
|
|
408
|
-
...((
|
|
409
|
-
...
|
|
453
|
+
[c]: {
|
|
454
|
+
...((P = r.options.fieldConfigs) == null ? void 0 : P[c]) || {},
|
|
455
|
+
...g
|
|
410
456
|
}
|
|
411
|
-
},
|
|
457
|
+
}, l;
|
|
412
458
|
},
|
|
413
459
|
/**
|
|
414
460
|
* @description 执行构建并返回字段 schema 映射及数据源
|
|
415
461
|
* @returns UseFormSchemasLinkResult
|
|
416
462
|
*/
|
|
417
463
|
build() {
|
|
418
|
-
return
|
|
464
|
+
return oe(r.options, r.codes);
|
|
419
465
|
},
|
|
420
466
|
/**
|
|
421
467
|
* @param itemPath - 数组行路径(如 "tableData[0]")
|
|
422
468
|
* @param rowFieldConfigs - 可选,针对当前行的字段覆盖配置
|
|
423
469
|
* @returns 该行对应的表单 schema 映射
|
|
424
470
|
*/
|
|
425
|
-
createRowSchemas(
|
|
426
|
-
return
|
|
471
|
+
createRowSchemas(c, g) {
|
|
472
|
+
return l.build().createRowSchemas(c, g);
|
|
427
473
|
}
|
|
428
474
|
};
|
|
429
|
-
return
|
|
475
|
+
return l;
|
|
430
476
|
}
|
|
431
477
|
export {
|
|
432
|
-
|
|
478
|
+
He as useFormSchemasLink
|
|
433
479
|
};
|