@dazhicheng/ui 1.5.218 → 1.5.220
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as b, toValue as
|
|
1
|
+
import { defineComponent as Me, useSlots as Ee, ref as Oe, computed as b, toValue as S, getCurrentInstance as Ae, onMounted as U, watch as O, onUnmounted as _e, createElementBlock as q, openBlock as G, normalizeClass as B, unref as a, createCommentVNode as ke, createElementVNode as Re, createVNode as A, renderSlot as g, createSlots as J, renderList as Q, withCtx as M, normalizeProps as X, guardReactiveProps as Y, mergeProps as Z, toHandlers as $e, nextTick as Be } from "vue";
|
|
2
2
|
import "../../tt-button/index.js";
|
|
3
3
|
import "../../tt-checkbox/index.js";
|
|
4
4
|
import "../../tt-empty/index.js";
|
|
@@ -99,21 +99,21 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
99
99
|
const R = (N = t == null ? void 0 : t.useStore) == null ? void 0 : N.call(t), C = b(() => {
|
|
100
100
|
var o;
|
|
101
101
|
if (p.testId) return p.testId;
|
|
102
|
-
const e = (o =
|
|
102
|
+
const e = (o = S(R)) == null ? void 0 : o.table;
|
|
103
103
|
return e != null && e.api ? xe(e.api) : "table";
|
|
104
104
|
}), se = b(() => _(C.value, "tableform")), ae = b(() => _(C.value, "search-form-header")), ie = b(() => _(C.value, "search-btn-query")), le = b(() => _(C.value, "search-btn-reset")), ne = b(() => ({
|
|
105
105
|
submit: ie.value,
|
|
106
106
|
reset: le.value
|
|
107
107
|
}));
|
|
108
108
|
qe(ne);
|
|
109
|
-
const x = {}, u = Ae(),
|
|
109
|
+
const x = {}, u = Ae(), v = b(() => S(R)), { getFormSlotKeysFunc: me, getTableSlotKeysFunc: pe, replaceTableSlotKey: ue, replaceFormSlotKey: ce } = Ze(), {
|
|
110
110
|
tableData: de,
|
|
111
111
|
getFormProps: $,
|
|
112
112
|
getTableProps: c,
|
|
113
113
|
getTableToolProps: fe,
|
|
114
114
|
handleSearchInfoChange: K
|
|
115
115
|
} = Xe(
|
|
116
|
-
|
|
116
|
+
v,
|
|
117
117
|
t.tableApi.reload,
|
|
118
118
|
t.tableApi.getLoading,
|
|
119
119
|
t.tableApi.getPagination,
|
|
@@ -134,7 +134,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
134
134
|
200,
|
|
135
135
|
{ leading: !0 }
|
|
136
136
|
), [he, r] = De({
|
|
137
|
-
...
|
|
137
|
+
...S($),
|
|
138
138
|
handleSubmit: ge,
|
|
139
139
|
handleReset: be,
|
|
140
140
|
submitOnEnter: !0,
|
|
@@ -144,10 +144,10 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
144
144
|
showCollapseButton: !0,
|
|
145
145
|
collapsed: !0,
|
|
146
146
|
collapseTriggerResize: !0
|
|
147
|
-
}), { initCustomSetting: Ce, saveColumns:
|
|
147
|
+
}), { initCustomSetting: Ce, saveColumns: ve } = Ye({
|
|
148
148
|
getTableProps: c,
|
|
149
149
|
tableMethods: t.tableApi,
|
|
150
|
-
getProps:
|
|
150
|
+
getProps: v
|
|
151
151
|
}), j = async () => {
|
|
152
152
|
await Be(), t.tableApi && t.tableApi.redoHeight();
|
|
153
153
|
};
|
|
@@ -155,7 +155,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
155
155
|
const o = Ke.camelCase(e);
|
|
156
156
|
x[o] = (...s) => T(e, ...s);
|
|
157
157
|
});
|
|
158
|
-
const
|
|
158
|
+
const Se = {
|
|
159
159
|
...x
|
|
160
160
|
};
|
|
161
161
|
function Te(e) {
|
|
@@ -172,7 +172,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
172
172
|
}
|
|
173
173
|
const { run: we } = V(
|
|
174
174
|
async (e) => {
|
|
175
|
-
r.isMounted && a(
|
|
175
|
+
r.isMounted && a(v).useSearchForm ? r.validate().then(async (o) => {
|
|
176
176
|
if (o.valid) {
|
|
177
177
|
const s = await r.getValues();
|
|
178
178
|
await t.tableApi.reload({
|
|
@@ -199,22 +199,22 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
199
199
|
setFormProps: r.setState,
|
|
200
200
|
setProps: Te,
|
|
201
201
|
reload: we,
|
|
202
|
-
selectedKeys: b(() =>
|
|
202
|
+
selectedKeys: b(() => S(t.tableApi.selectedKeys))
|
|
203
203
|
};
|
|
204
204
|
async function ye() {
|
|
205
|
-
const { tableRefreshBefore: e } =
|
|
205
|
+
const { tableRefreshBefore: e } = v.value;
|
|
206
206
|
e && Le(e) && await e(), E.reload();
|
|
207
207
|
}
|
|
208
208
|
async function Fe(e) {
|
|
209
209
|
var d, m;
|
|
210
|
-
const o = ((m = (d =
|
|
210
|
+
const o = ((m = (d = v.value) == null ? void 0 : d.table) == null ? void 0 : m.columns) || [], s = new Map(o.map((n) => [n.field, n])), l = e.checkedModel.map((n) => s.get(n)).filter(Boolean);
|
|
211
211
|
if (e.isExport) {
|
|
212
212
|
T("export", e.checkedModel, e.modalApi);
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
e.modalApi.setModalProps({
|
|
216
216
|
confirmLoading: !0
|
|
217
|
-
}), c.value.useHttpCache && await
|
|
217
|
+
}), c.value.useHttpCache && await ve(JSON.stringify(e.checkedModel)), t.tableApi.setTableColumns(l), e.modalApi.setModalProps({
|
|
218
218
|
confirmLoading: !1
|
|
219
219
|
}), e.modalApi.closeModal(), T("set-columns", l);
|
|
220
220
|
}
|
|
@@ -222,7 +222,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
222
222
|
var m, n, h, f, y, F, P, I;
|
|
223
223
|
const { notSetColumnField: o, columns: s } = a(c), l = (f = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : f.filter(Boolean), d = ((F = (y = a(s)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
|
|
224
224
|
(P = w.value) == null || P.openModal({
|
|
225
|
-
columns:
|
|
225
|
+
columns: (S(s) || []).filter((i) => i.visible !== !1),
|
|
226
226
|
displayFields: e ? d : l,
|
|
227
227
|
disabledColumnField: o || []
|
|
228
228
|
}), (I = w.value) == null || I.setModalProps({
|
|
@@ -233,7 +233,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
233
233
|
var m, n, h, f, y, F, P, I;
|
|
234
234
|
const { notSetColumnField: o, columns: s } = a(c), l = (f = (h = (n = ((m = t.tableApi.getTableInstance()) == null ? void 0 : m.getTableColumn()) || []) == null ? void 0 : n.visibleColumn) == null ? void 0 : h.map((i) => i.field)) == null ? void 0 : f.filter(Boolean), d = ((F = (y = a(s)) == null ? void 0 : y.filter((i) => i.visible === !0 || i.visible === void 0)) == null ? void 0 : F.map((i) => i.field)) || [];
|
|
235
235
|
(P = w.value) == null || P.openModal({
|
|
236
|
-
columns:
|
|
236
|
+
columns: S(s) || [],
|
|
237
237
|
displayFields: e ? d : l,
|
|
238
238
|
disabledColumnField: o || [],
|
|
239
239
|
isExport: !0
|
|
@@ -294,7 +294,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
294
294
|
class: B(a(k)),
|
|
295
295
|
"data-testid": se.value
|
|
296
296
|
}, [
|
|
297
|
-
|
|
297
|
+
v.value.useSearchForm ? (G(), q("div", {
|
|
298
298
|
key: 0,
|
|
299
299
|
class: B(`${a(k)}-header`),
|
|
300
300
|
"data-testid": ae.value
|
|
@@ -325,7 +325,7 @@ const rt = ["data-testid"], st = ["data-testid"], Mo = /* @__PURE__ */ Me({
|
|
|
325
325
|
"table-id": C.value,
|
|
326
326
|
"form-api": a(r),
|
|
327
327
|
"table-api": a(t).tableApi
|
|
328
|
-
}, $e(
|
|
328
|
+
}, $e(Se)), J({ _: 2 }, [
|
|
329
329
|
Q(a(pe)(a(L)), (s) => ({
|
|
330
330
|
name: a(ue)(s),
|
|
331
331
|
fn: M((l) => [
|
|
@@ -50,6 +50,8 @@ export interface UseFormSchemasLinkFieldConfig {
|
|
|
50
50
|
onChange?: (values: unknown, context: FieldOnChangeContext) => void;
|
|
51
51
|
/** 是否展示全部选项 */
|
|
52
52
|
showAll?: boolean;
|
|
53
|
+
/** “全部”选项的值,默认为 "all"。用于自定义“全部”选项对应的 value,与 TtPanelSelect 的 showAllField 对齐 */
|
|
54
|
+
showAllField?: string | number;
|
|
53
55
|
/**
|
|
54
56
|
* @description 自定义过滤数据源
|
|
55
57
|
* @param values 表单对象
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useDataPermissionOptions as
|
|
1
|
+
import { useDataPermissionOptions as J } from "./useDataPermissionOptions.js";
|
|
2
2
|
import "axios";
|
|
3
|
-
import { ElSelectV2 as
|
|
3
|
+
import { ElSelectV2 as K } from "element-plus";
|
|
4
4
|
import { isFunction as x } from "../packages/utils/src/is.js";
|
|
5
5
|
import "vue";
|
|
6
6
|
import "xe-utils";
|
|
@@ -12,163 +12,173 @@ import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
|
12
12
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
13
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
14
|
import "../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
-
import { omit as
|
|
16
|
-
const
|
|
15
|
+
import { omit as Q } from "lodash-es";
|
|
16
|
+
const U = "all", W = { label: "全部", value: U }, R = [
|
|
17
17
|
"platformId",
|
|
18
18
|
"shopId",
|
|
19
19
|
"purchasePlaceId",
|
|
20
20
|
"businessType",
|
|
21
21
|
"lockUserId",
|
|
22
22
|
"userId"
|
|
23
|
-
],
|
|
23
|
+
], X = {
|
|
24
24
|
platformId: "platformIds",
|
|
25
25
|
shopId: "shopIds",
|
|
26
26
|
purchasePlaceId: "purchasePlaceId",
|
|
27
27
|
businessType: "businessType",
|
|
28
28
|
lockUserId: "lockUserId"
|
|
29
|
-
},
|
|
29
|
+
}, Y = {
|
|
30
30
|
platformId: "平台",
|
|
31
31
|
shopId: "店铺",
|
|
32
32
|
purchasePlaceId: "采购地",
|
|
33
33
|
businessType: "业务线",
|
|
34
34
|
lockUserId: "锁单人"
|
|
35
35
|
};
|
|
36
|
-
function M(
|
|
37
|
-
return typeof
|
|
36
|
+
function M(e) {
|
|
37
|
+
return typeof e == "string" && e.toLowerCase() === U.toLowerCase();
|
|
38
38
|
}
|
|
39
|
-
function _(
|
|
40
|
-
return Array.isArray(
|
|
39
|
+
function _(e) {
|
|
40
|
+
return Array.isArray(e) ? e : e == null || e === "" ? [] : [e];
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return [
|
|
42
|
+
function Z(e = []) {
|
|
43
|
+
return [W].concat(e);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
45
|
+
function $(e, l, c, A) {
|
|
46
|
+
return e ? x(e) ? e(l, c, A) : e : {};
|
|
47
47
|
}
|
|
48
|
-
function B(
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
48
|
+
function B(e, l, c, A) {
|
|
49
|
+
var C;
|
|
50
|
+
l == null || l(e);
|
|
51
|
+
const g = A(), u = (C = g.values) == null ? void 0 : C[g.fieldName];
|
|
52
|
+
c == null || c(u, g);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
const
|
|
56
|
-
(o, n) =>
|
|
54
|
+
function y(e = {}, l = R) {
|
|
55
|
+
const c = e.scene || "list", A = l.reduce(
|
|
56
|
+
(o, n) => {
|
|
57
|
+
if (n === "userId") return o;
|
|
58
|
+
const t = I(n), s = t.component === "TtPanelSelect";
|
|
59
|
+
return o[n] = s ? !1 : t.showAll ?? !1, o;
|
|
60
|
+
},
|
|
57
61
|
{}
|
|
58
|
-
), { dataSource:
|
|
59
|
-
codes:
|
|
60
|
-
dataSource:
|
|
61
|
-
showAll:
|
|
62
|
+
), { dataSource: g } = J({
|
|
63
|
+
codes: l,
|
|
64
|
+
dataSource: e.dataSource,
|
|
65
|
+
showAll: A
|
|
62
66
|
});
|
|
63
|
-
function
|
|
64
|
-
return
|
|
67
|
+
function u(o) {
|
|
68
|
+
return I(o).fieldName || X[o];
|
|
65
69
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
70
|
+
function C(o) {
|
|
71
|
+
return I(o).rules;
|
|
68
72
|
}
|
|
69
73
|
function F(o) {
|
|
70
|
-
return
|
|
74
|
+
return I(o).label || Y[o];
|
|
71
75
|
}
|
|
72
|
-
function
|
|
76
|
+
function I(o) {
|
|
73
77
|
var n;
|
|
74
|
-
return ((n =
|
|
78
|
+
return ((n = e.fieldConfigs) == null ? void 0 : n[o]) || {};
|
|
79
|
+
}
|
|
80
|
+
function b(o) {
|
|
81
|
+
return I(o).showAllField ?? U;
|
|
75
82
|
}
|
|
76
|
-
function
|
|
77
|
-
const
|
|
78
|
-
if (!n) return
|
|
79
|
-
if (!
|
|
83
|
+
function V(o, n) {
|
|
84
|
+
const t = I(o).dependencies;
|
|
85
|
+
if (!n) return t;
|
|
86
|
+
if (!t) return n;
|
|
80
87
|
const s = {
|
|
81
88
|
...n,
|
|
82
|
-
...
|
|
89
|
+
...t
|
|
83
90
|
};
|
|
84
|
-
if (n &&
|
|
85
|
-
const
|
|
86
|
-
s.triggerFields = r ??
|
|
91
|
+
if (n && t) {
|
|
92
|
+
const f = n.triggerFields, r = t.triggerFields;
|
|
93
|
+
s.triggerFields = r ?? f;
|
|
87
94
|
}
|
|
88
95
|
return s;
|
|
89
96
|
}
|
|
90
97
|
function O(o) {
|
|
91
|
-
return
|
|
98
|
+
return I(o).component || "TtApiComponent";
|
|
92
99
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
100
|
+
function S(o) {
|
|
101
|
+
return I(o).multiple ?? !0;
|
|
95
102
|
}
|
|
96
|
-
function
|
|
97
|
-
return
|
|
103
|
+
function w(o) {
|
|
104
|
+
return g.value[o] || [];
|
|
98
105
|
}
|
|
99
|
-
function
|
|
106
|
+
function j(o) {
|
|
100
107
|
return _(o).some((n) => M(n));
|
|
101
108
|
}
|
|
102
|
-
function
|
|
103
|
-
const n =
|
|
104
|
-
return
|
|
109
|
+
function N(o) {
|
|
110
|
+
const n = j(o), t = Array.isArray(o) ? o.length > 1 : !1;
|
|
111
|
+
return c === "action" && (n || t);
|
|
105
112
|
}
|
|
106
|
-
function
|
|
107
|
-
const n =
|
|
108
|
-
if (!
|
|
109
|
-
return
|
|
110
|
-
if (
|
|
111
|
-
const s = n.filter((r) =>
|
|
112
|
-
return !s.some((r) => M(r.value)) || s.length <= 1 ? s :
|
|
113
|
+
function q(o) {
|
|
114
|
+
const n = w("shopId"), t = _(o);
|
|
115
|
+
if (!t.length)
|
|
116
|
+
return c === "action" ? [] : n;
|
|
117
|
+
if (N(o)) return [];
|
|
118
|
+
const s = n.filter((r) => t.includes(r.platformId));
|
|
119
|
+
return !s.some((r) => M(r.value)) || s.length <= 1 ? s : Z(s.filter((r) => !M(r.value)));
|
|
113
120
|
}
|
|
114
|
-
function E(o, n,
|
|
115
|
-
const r =
|
|
116
|
-
var
|
|
117
|
-
return (
|
|
118
|
-
}) || [] : s.find((
|
|
121
|
+
function E(o, n, t, s, f) {
|
|
122
|
+
const r = u(o), P = f ? s.filter((i) => {
|
|
123
|
+
var m;
|
|
124
|
+
return (m = n[r]) == null ? void 0 : m.includes(i.value);
|
|
125
|
+
}) || [] : s.find((i) => i.value === n[r]);
|
|
119
126
|
return {
|
|
120
127
|
values: n,
|
|
121
|
-
actions:
|
|
128
|
+
actions: t,
|
|
122
129
|
fieldName: r,
|
|
123
130
|
dataType: o,
|
|
124
131
|
options: s,
|
|
125
|
-
currentOption:
|
|
132
|
+
currentOption: P
|
|
126
133
|
};
|
|
127
134
|
}
|
|
128
|
-
function
|
|
129
|
-
const r =
|
|
135
|
+
function L(o, n, t, s, f) {
|
|
136
|
+
const r = I(o), P = $(r.componentProps, n, t, s), i = S(o), { onChange: m, ...a } = P, p = x(r.customOptions) ? r.customOptions(n, s) : s;
|
|
130
137
|
return r.component === "TtPanelSelect" ? {
|
|
131
|
-
multiple:
|
|
138
|
+
multiple: i,
|
|
132
139
|
showAll: r.showAll ?? !1,
|
|
133
|
-
|
|
140
|
+
showAllField: b(o),
|
|
141
|
+
...a,
|
|
134
142
|
options: p,
|
|
135
|
-
onChange(
|
|
143
|
+
onChange(h) {
|
|
136
144
|
B(
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
h,
|
|
146
|
+
void 0,
|
|
139
147
|
r.onChange,
|
|
140
|
-
() => E(o, n,
|
|
148
|
+
() => E(o, n, t, p, i)
|
|
141
149
|
);
|
|
142
150
|
}
|
|
143
151
|
} : {
|
|
144
|
-
multiple:
|
|
145
|
-
component:
|
|
146
|
-
|
|
152
|
+
multiple: i,
|
|
153
|
+
component: K,
|
|
154
|
+
showOriginMode: !1,
|
|
155
|
+
showPinyinMode: !0,
|
|
156
|
+
...a,
|
|
147
157
|
options: p,
|
|
148
|
-
onChange(
|
|
158
|
+
onChange(h) {
|
|
149
159
|
B(
|
|
150
|
-
|
|
151
|
-
|
|
160
|
+
h,
|
|
161
|
+
f,
|
|
152
162
|
r.onChange,
|
|
153
|
-
() => E(o, n,
|
|
163
|
+
() => E(o, n, t, p, i)
|
|
154
164
|
);
|
|
155
165
|
}
|
|
156
166
|
};
|
|
157
167
|
}
|
|
158
|
-
function
|
|
159
|
-
const n =
|
|
168
|
+
function k(o) {
|
|
169
|
+
const n = u(o);
|
|
160
170
|
return {
|
|
161
171
|
component: O(o),
|
|
162
172
|
fieldName: n,
|
|
163
173
|
label: F(o),
|
|
164
|
-
rules:
|
|
165
|
-
dependencies:
|
|
166
|
-
componentProps: (
|
|
167
|
-
var
|
|
168
|
-
const
|
|
169
|
-
return
|
|
170
|
-
const
|
|
171
|
-
|
|
174
|
+
rules: C(o),
|
|
175
|
+
dependencies: V(o),
|
|
176
|
+
componentProps: (t, s) => {
|
|
177
|
+
var a;
|
|
178
|
+
const f = w(o), r = u(o), P = S(o), i = b(o), m = ((a = t[r]) == null ? void 0 : a.at(-1)) !== i;
|
|
179
|
+
return L(o, t, s, f, (p) => {
|
|
180
|
+
const d = t[r];
|
|
181
|
+
P && (m && (p == null ? void 0 : p.at(-1)) === i ? t[r] = [i] : t[r] = d == null ? void 0 : d.filter((h) => h !== i));
|
|
172
182
|
});
|
|
173
183
|
}
|
|
174
184
|
};
|
|
@@ -177,113 +187,113 @@ function Z(t = {}, c = R) {
|
|
|
177
187
|
// 平台
|
|
178
188
|
platformId: {
|
|
179
189
|
component: O("platformId"),
|
|
180
|
-
fieldName:
|
|
190
|
+
fieldName: u("platformId"),
|
|
181
191
|
label: F("platformId"),
|
|
182
|
-
rules:
|
|
192
|
+
rules: C("platformId"),
|
|
183
193
|
componentProps: (o, n) => {
|
|
184
|
-
var
|
|
185
|
-
const
|
|
186
|
-
return
|
|
187
|
-
const
|
|
188
|
-
r && (
|
|
194
|
+
var p;
|
|
195
|
+
const t = "platformId", s = u(t), f = u("shopId"), r = S(t), P = S("shopId"), i = w(t), m = b(t), a = ((p = o[s]) == null ? void 0 : p.at(-1)) !== m;
|
|
196
|
+
return L(t, o, n, i, (d) => {
|
|
197
|
+
const h = o[s];
|
|
198
|
+
r && (a && (d == null ? void 0 : d.at(-1)) === m ? o[s] = [m] : o[s] = h == null ? void 0 : h.filter((G) => G !== m)), o[f] = P ? [] : void 0;
|
|
189
199
|
});
|
|
190
200
|
}
|
|
191
201
|
},
|
|
192
202
|
// 店铺
|
|
193
203
|
shopId: {
|
|
194
204
|
component: O("shopId"),
|
|
195
|
-
fieldName:
|
|
205
|
+
fieldName: u("shopId"),
|
|
196
206
|
label: F("shopId"),
|
|
197
207
|
componentProps: (o, n) => {
|
|
198
|
-
var
|
|
199
|
-
const
|
|
200
|
-
return
|
|
201
|
-
const
|
|
202
|
-
|
|
208
|
+
var a;
|
|
209
|
+
const t = "shopId", s = u(t), f = o[u("platformId")], r = q(f), P = S(t), i = b(t), m = ((a = o[s]) == null ? void 0 : a.at(-1)) !== i;
|
|
210
|
+
return L(t, o, n, r, (p) => {
|
|
211
|
+
const d = o[s];
|
|
212
|
+
P && (m && (p == null ? void 0 : p.at(-1)) === i ? o[s] = [i] : o[s] = d == null ? void 0 : d.filter((h) => h !== i));
|
|
203
213
|
});
|
|
204
214
|
},
|
|
205
|
-
dependencies:
|
|
206
|
-
triggerFields: [
|
|
215
|
+
dependencies: V("shopId", {
|
|
216
|
+
triggerFields: [u("platformId")],
|
|
207
217
|
disabled(o) {
|
|
208
|
-
return
|
|
218
|
+
return N(o[u("platformId")]);
|
|
209
219
|
},
|
|
210
220
|
rules(o) {
|
|
211
|
-
return
|
|
221
|
+
return N(o[u("platformId")]) ? null : C("shopId") || null;
|
|
212
222
|
}
|
|
213
223
|
})
|
|
214
224
|
},
|
|
215
|
-
purchasePlaceId:
|
|
216
|
-
businessType:
|
|
217
|
-
lockUserId:
|
|
225
|
+
purchasePlaceId: k("purchasePlaceId"),
|
|
226
|
+
businessType: k("businessType"),
|
|
227
|
+
lockUserId: k("lockUserId")
|
|
218
228
|
};
|
|
219
|
-
function
|
|
229
|
+
function z() {
|
|
220
230
|
return Object.keys(D).reduce(
|
|
221
231
|
(o, n) => {
|
|
222
|
-
var
|
|
223
|
-
const
|
|
232
|
+
var f;
|
|
233
|
+
const t = D[n], s = (f = e.fieldConfigs) == null ? void 0 : f[n];
|
|
224
234
|
return o[n] = {
|
|
225
|
-
...
|
|
226
|
-
...
|
|
235
|
+
...t,
|
|
236
|
+
...Q(s, ["componentProps", "rules"])
|
|
227
237
|
}, o;
|
|
228
238
|
},
|
|
229
239
|
{}
|
|
230
240
|
);
|
|
231
241
|
}
|
|
232
242
|
return {
|
|
233
|
-
...
|
|
234
|
-
dataSource:
|
|
243
|
+
...z(),
|
|
244
|
+
dataSource: g
|
|
235
245
|
};
|
|
236
246
|
}
|
|
237
|
-
function
|
|
238
|
-
const
|
|
247
|
+
function mo() {
|
|
248
|
+
const e = {
|
|
239
249
|
options: {},
|
|
240
250
|
codes: [...R]
|
|
241
|
-
},
|
|
251
|
+
}, l = {
|
|
242
252
|
/**
|
|
243
253
|
* @description 渲染查询场景
|
|
244
254
|
*/
|
|
245
255
|
list() {
|
|
246
|
-
return
|
|
256
|
+
return e.options.scene = "list", l;
|
|
247
257
|
},
|
|
248
258
|
/**
|
|
249
259
|
* @description 渲染新增编辑场景
|
|
250
260
|
*/
|
|
251
261
|
action() {
|
|
252
|
-
return
|
|
262
|
+
return e.options.scene = "action", l;
|
|
253
263
|
},
|
|
254
264
|
/**
|
|
255
265
|
* @param scene 场景值 list为查询 action为新增编辑等操作
|
|
256
266
|
* @returns FormSchemasLinkBuilder
|
|
257
267
|
*/
|
|
258
|
-
scene(
|
|
259
|
-
return
|
|
268
|
+
scene(c) {
|
|
269
|
+
return e.options.scene = c, l;
|
|
260
270
|
},
|
|
261
271
|
/**
|
|
262
272
|
* @param codes 接口请求所需要的入参,需要什么数据源就传什么入参
|
|
263
273
|
* @returns FormSchemasLinkBuilder
|
|
264
274
|
*/
|
|
265
|
-
codes(
|
|
266
|
-
return
|
|
275
|
+
codes(c) {
|
|
276
|
+
return e.codes = [...c], l;
|
|
267
277
|
},
|
|
268
|
-
dataSource(
|
|
269
|
-
return
|
|
278
|
+
dataSource(c) {
|
|
279
|
+
return e.options.dataSource = c, l;
|
|
270
280
|
},
|
|
271
|
-
field(
|
|
272
|
-
var
|
|
273
|
-
return
|
|
274
|
-
...
|
|
275
|
-
[
|
|
276
|
-
...((
|
|
277
|
-
...
|
|
281
|
+
field(c, A) {
|
|
282
|
+
var g;
|
|
283
|
+
return e.options.fieldConfigs = {
|
|
284
|
+
...e.options.fieldConfigs,
|
|
285
|
+
[c]: {
|
|
286
|
+
...((g = e.options.fieldConfigs) == null ? void 0 : g[c]) || {},
|
|
287
|
+
...A
|
|
278
288
|
}
|
|
279
|
-
},
|
|
289
|
+
}, l;
|
|
280
290
|
},
|
|
281
291
|
build() {
|
|
282
|
-
return
|
|
292
|
+
return y(e.options, e.codes);
|
|
283
293
|
}
|
|
284
294
|
};
|
|
285
|
-
return
|
|
295
|
+
return l;
|
|
286
296
|
}
|
|
287
297
|
export {
|
|
288
|
-
|
|
298
|
+
mo as useFormSchemasLink
|
|
289
299
|
};
|