@bytenew/bn-bus-ui 1.1.399

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +637 -0
  2. package/common.scss +715 -0
  3. package/dist/assocTableSearch-C9KUFIpd.js +349 -0
  4. package/dist/assocTableSearch.css +1 -0
  5. package/dist/bn-bus-ui.es.js +58 -0
  6. package/dist/bn-bus-ui.umd.js +42 -0
  7. package/dist/chooseIPaasData-Bfm58C-0.js +391 -0
  8. package/dist/chooseIPaasData.css +1 -0
  9. package/dist/defaultSet-BA11k622.js +322 -0
  10. package/dist/defaultSet.css +1 -0
  11. package/dist/fileFormData-D_Q1vylE.js +53 -0
  12. package/dist/formItemFooter-B3nlSwnS.js +108 -0
  13. package/dist/formItemFooter.css +1 -0
  14. package/dist/funcExprDialog-DeHPFa-L.js +139 -0
  15. package/dist/funcExprDialog.css +1 -0
  16. package/dist/index-B8KbssVN.js +45 -0
  17. package/dist/index-CTZ-0Tyh.js +45 -0
  18. package/dist/index-CZOFm8wK.js +135 -0
  19. package/dist/index-C_ix9-hS.js +44 -0
  20. package/dist/index-Cov88CtD.js +221 -0
  21. package/dist/index-DAtLc2a1.js +89 -0
  22. package/dist/index-DCbIfKgk.js +66 -0
  23. package/dist/index-DDy1d3BS.js +178 -0
  24. package/dist/index-DJ15iYPg.js +89 -0
  25. package/dist/index-DNHXG3dr.js +62 -0
  26. package/dist/index-Dg5V1uNO.js +740 -0
  27. package/dist/index-Dme97Hra.js +118 -0
  28. package/dist/index-DnzoAsk8.js +109 -0
  29. package/dist/index-DrngruPb.js +64 -0
  30. package/dist/index-Q08paoUN.js +51 -0
  31. package/dist/index-VbL1cqCu.js +58 -0
  32. package/dist/index-aooX1QXm.js +183 -0
  33. package/dist/index.css +1 -0
  34. package/dist/index2.css +1 -0
  35. package/dist/index3.css +1 -0
  36. package/dist/index4.css +1 -0
  37. package/dist/index5.css +1 -0
  38. package/dist/index6.css +1 -0
  39. package/dist/index7.css +1 -0
  40. package/dist/install-DSQCBsd_.js +19155 -0
  41. package/dist/install.css +1 -0
  42. package/dist/setOption-BOD7nAuG.js +329 -0
  43. package/dist/setOption.css +1 -0
  44. package/dist/setRelationOption-D7FqiLWj.js +5217 -0
  45. package/dist/setRelationOption.css +1 -0
  46. package/package.json +57 -0
@@ -0,0 +1,349 @@
1
+ import { cloneDeep as w } from "lodash";
2
+ import { _ as R, t as T } from "./install-DSQCBsd_.js";
3
+ import { resolveComponent as h, resolveDirective as I, openBlock as b, createBlock as _, withCtx as c, withDirectives as V, createElementBlock as v, createElementVNode as t, createVNode as i, createTextVNode as D, Fragment as x, renderList as U, createCommentVNode as k } from "vue";
4
+ const F = {
5
+ id: "",
6
+ //规则id
7
+ type: 13,
8
+ //规则类型
9
+ status: 1,
10
+ //开启
11
+ ruleSense: "",
12
+ //组件id
13
+ subType: 0,
14
+ // 筛选出单条数据时是否自动填充 1是 0否
15
+ dataForceFill: 0,
16
+ // 数据强制填充
17
+ dataForceClear: 0,
18
+ // 子表单筛选条件查询无数据清空 1:是 0:否 没有查询到数据,会重置筛选结果
19
+ columnRules: []
20
+ }, S = {
21
+ name: "assocTableSearch",
22
+ props: {
23
+ columnData: {
24
+ type: Object,
25
+ default: () => ({})
26
+ },
27
+ columnList: {
28
+ type: Object,
29
+ default: () => ({})
30
+ },
31
+ postFunc: Function,
32
+ extendPost: Object
33
+ },
34
+ data() {
35
+ return {
36
+ visible: !1,
37
+ rulePost: {
38
+ appId: "",
39
+ tableId: "",
40
+ columnRuleList: [
41
+ {
42
+ id: "",
43
+ //规则id
44
+ type: 13,
45
+ //规则类型
46
+ status: 1,
47
+ //开启
48
+ ruleSense: "",
49
+ //组件id
50
+ subType: 0,
51
+ // 筛选出单条数据时是否自动填充 1是 0否
52
+ dataForceFill: 0,
53
+ // 数据强制填充
54
+ dataForceClear: 0,
55
+ // 子表单筛选条件查询无数据清空 1:是 0:否 没有查询到数据,会重置筛选结果
56
+ columnRules: []
57
+ }
58
+ ]
59
+ },
60
+ ruleData: w(F),
61
+ loading: !1,
62
+ // 关联表的组件列表
63
+ assocTableColumns: [],
64
+ // 规则中,选择其他组件时,使用当前子表单所在的表的组件
65
+ otherColumns: []
66
+ };
67
+ },
68
+ methods: {
69
+ async open() {
70
+ this.ruleData = w(F), this.ruleData.ruleSense = this.columnData.id, this.visible = !0, this.loading = !0, this.otherColumns = T(this.columnList), await this.getRuleData(), this.assocTableColumns.length == 0 && await this.getComList(), this.loading = !1;
71
+ },
72
+ /**
73
+ * 获取表下的组件
74
+ * */
75
+ async getComList() {
76
+ let s = await this.postFunc(`/biztable/definition/table?tableCode=${this.columnData.insideDataSourceInfo.tableCode}&columns=1`, null, "get");
77
+ !s.code && s.data && (this.assocTableColumns = T(s.data.columns, s.data.appId, s.data.tableId));
78
+ },
79
+ /**
80
+ * 获取规则
81
+ * */
82
+ async getRuleData() {
83
+ var e;
84
+ let s = await this.postFunc("/v2/columnRule/getColumnRule", {
85
+ appId: this.extendPost.appId,
86
+ projectId: this.extendPost.tableId,
87
+ ruleSense: this.columnData.id,
88
+ type: 13
89
+ });
90
+ if (!s.code && s.data && ((e = s.data.columnRuleList) != null && e.length)) {
91
+ let r = s.data.columnRuleList[0] || {};
92
+ this.ruleData = {
93
+ id: r.id,
94
+ //规则id
95
+ type: 13,
96
+ //规则类型
97
+ status: 1,
98
+ //开启
99
+ ruleSense: r.ruleSense,
100
+ //组件id
101
+ subType: r.subType,
102
+ // 筛选出单条数据时是否自动填充 1是 0否
103
+ dataForceFill: r.dataForceFill,
104
+ // 数据强制填充
105
+ dataForceClear: r.dataForceClear,
106
+ // 子表单筛选条件查询无数据清空 1:是 0:否 没有查询到数据,会重置筛选结果
107
+ columnRules: r.columnRules || []
108
+ };
109
+ }
110
+ },
111
+ /**
112
+ * 添加规则
113
+ * */
114
+ addRule() {
115
+ this.ruleData.columnRules.length >= 10 ? (this.$message.closeAll(), this.$message.warning("最多只能添加十条规则")) : this.ruleData.columnRules.push({
116
+ columnCode: "",
117
+ parentCode: "",
118
+ id: "",
119
+ // 组件Id
120
+ behaviorType: "",
121
+ // 组件类型
122
+ searchType: "",
123
+ //比较类型
124
+ parentId: "",
125
+ //当是子表单组件时,这里写子表单的组件id
126
+ toColumnType: "",
127
+ //对比组件类型 0自定义填写 1.其他组件 2.当前组件选项
128
+ value: ""
129
+ // 匹配值,
130
+ });
131
+ },
132
+ /**
133
+ * 保存规则
134
+ * */
135
+ saveRule() {
136
+ this.loading = !0;
137
+ const s = ["9", "10", "14", "15"], e = "0", r = 10, C = (o) => !s.includes(o), l = (o) => !o || typeof o == "string" && (o === "{}" || o === "[]"), g = (o) => {
138
+ const { toColumnType: n, searchType: a, behaviorType: f, value: u } = o;
139
+ return f === r ? typeof u == "object" ? JSON.stringify(u) : u : C(a) && typeof u == "object" ? JSON.stringify(u) : u;
140
+ };
141
+ let d = "", y = [], p = w(this.ruleData.columnRules);
142
+ for (let o = 0; o < p.length; o++) {
143
+ let n = p[o], a = o + 1;
144
+ if (!n.id || !n.searchType || !n.toColumnType) {
145
+ d = `请设置第${a}个条件选项不能为空`;
146
+ break;
147
+ }
148
+ if (C(n.searchType) && l(n.value)) {
149
+ d = `请设置${n.name || "第" + a + "个条件"}组件的值`;
150
+ break;
151
+ }
152
+ n.value = g(n), y.push(n);
153
+ }
154
+ if (d)
155
+ return this.$message.warning(d), this.loading = !1, !1;
156
+ let m = {
157
+ projectId: this.extendPost.tableId,
158
+ // 工作表ID
159
+ appId: this.extendPost.appId,
160
+ // 小程序ID
161
+ columnRuleList: JSON.stringify([{
162
+ ...this.ruleData,
163
+ columnRules: JSON.stringify(y)
164
+ }])
165
+ };
166
+ this.postFunc("/v2/columnRule/operationColumnRule", m).then((o) => {
167
+ this.loading = !1, o.code || (this.columnData.extraInfo.subSearchColumns = [], this.columnData.extraInfo.dataForceFill = this.ruleData.dataForceFill, this.columnData.extraInfo.dataForceClear = this.ruleData.dataForceClear, this.$message.success("保存成功"), this.visible = !1);
168
+ });
169
+ }
170
+ }
171
+ }, L = { class: "assocTableSearch" }, O = { class: "w-flex-between w-flex-center" }, E = { class: "w-flex-center w-flex-column-gap10" }, N = { class: "w-margin-top10" }, B = {
172
+ key: 0,
173
+ class: "w-empty"
174
+ }, P = { class: "w-flex-center w-flex-wrap w-flex-column-gap25 w-margin-top10" }, j = { class: "w-flex-center" }, A = { class: "w-flex-center" }, J = { class: "w-flex-center" }, M = { class: "w-flex-center w-margin-top10" }, q = { class: "w-flex-right" };
175
+ function H(s, e, r, C, l, g) {
176
+ const d = h("el-button"), y = h("BnCondition"), p = h("BnCheck"), m = h("el-tooltip"), o = h("el-dialog"), n = I("loading");
177
+ return b(), _(o, {
178
+ modelValue: l.visible,
179
+ "onUpdate:modelValue": e[5] || (e[5] = (a) => l.visible = a),
180
+ title: "设置数据筛选",
181
+ top: "20px",
182
+ "close-on-click-modal": !1,
183
+ width: "720",
184
+ "destroy-on-close": !0,
185
+ "append-to-body": ""
186
+ }, {
187
+ footer: c(() => [
188
+ t("div", q, [
189
+ i(d, {
190
+ onClick: e[4] || (e[4] = (a) => l.visible = !1)
191
+ }, {
192
+ default: c(() => [...e[13] || (e[13] = [
193
+ D("取消", -1)
194
+ ])]),
195
+ _: 1
196
+ }),
197
+ i(d, {
198
+ type: "primary",
199
+ loading: l.loading,
200
+ onClick: g.saveRule
201
+ }, {
202
+ default: c(() => [...e[14] || (e[14] = [
203
+ D("确认", -1)
204
+ ])]),
205
+ _: 1
206
+ }, 8, ["loading", "onClick"])
207
+ ])
208
+ ]),
209
+ default: c(() => [
210
+ V((b(), v("div", L, [
211
+ t("div", O, [
212
+ e[7] || (e[7] = t("div", { class: "w-flex-center w-flex-column-gap4" }, [
213
+ t("div", { class: "w-line-height20" }, "设置筛选条件"),
214
+ t("div", { class: "w-color-gray w-line-height20" }, " (满足以下所有筛选条件时,触发) ")
215
+ ], -1)),
216
+ t("div", E, [
217
+ i(d, {
218
+ link: "",
219
+ type: "primary",
220
+ onClick: g.addRule
221
+ }, {
222
+ default: c(() => [...e[6] || (e[6] = [
223
+ t("span", { class: "bnUIcon bnUIcon-add w-padding-right2 w-font14" }, null, -1),
224
+ D("添加条件 ", -1)
225
+ ])]),
226
+ _: 1
227
+ }, 8, ["onClick"])
228
+ ])
229
+ ]),
230
+ t("div", N, [
231
+ (b(!0), v(x, null, U(l.ruleData.columnRules, (a, f) => (b(), _(y, {
232
+ key: f,
233
+ modelValue: l.ruleData.columnRules[f],
234
+ "onUpdate:modelValue": (u) => l.ruleData.columnRules[f] = u,
235
+ columnList: l.assocTableColumns,
236
+ "option-props": {
237
+ id: "columnCode",
238
+ name: "name",
239
+ parentCode: "parentCode",
240
+ valueType: "toColumnType",
241
+ subType: "subType",
242
+ searchType: "searchType",
243
+ value: "value"
244
+ },
245
+ "other-column-list": l.otherColumns,
246
+ allowDel: "",
247
+ postFunc: r.postFunc,
248
+ allowSelectColumn: "",
249
+ onDel: (u) => l.ruleData.columnRules.splice(f, 1)
250
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "columnList", "other-column-list", "postFunc", "onDel"]))), 128)),
251
+ l.ruleData.columnRules.length == 0 ? (b(), v("div", B, " 请设置筛选条件 ")) : k("", !0)
252
+ ]),
253
+ e[12] || (e[12] = t("div", { class: "w-flex-center w-flex-column-gap4 w-margin-top10" }, [
254
+ t("div", { class: "w-line-height20" }, "筛选结果"),
255
+ t("div", { class: "w-color-gray w-line-height20" }, " (当筛选出来数据后,如何处理) ")
256
+ ], -1)),
257
+ t("div", P, [
258
+ t("div", j, [
259
+ i(p, {
260
+ modelValue: l.ruleData.subType,
261
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => l.ruleData.subType = a),
262
+ label: "单条数据时自动填充",
263
+ "true-data": 0,
264
+ "false-data": 1
265
+ }, null, 8, ["modelValue"]),
266
+ i(m, {
267
+ class: "item",
268
+ effect: "dark",
269
+ content: "当筛选结果只有一条数据的时候,才进行填充数据到子表单中。",
270
+ placement: "top"
271
+ }, {
272
+ default: c(() => [...e[8] || (e[8] = [
273
+ t("span", { class: "bnUIcon bnUIcon-question w-color-orange" }, null, -1)
274
+ ])]),
275
+ _: 1
276
+ })
277
+ ]),
278
+ t("div", A, [
279
+ i(p, {
280
+ modelValue: l.ruleData.subType,
281
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => l.ruleData.subType = a),
282
+ label: "多条数据时自动填充",
283
+ "true-data": 1,
284
+ "false-data": 0
285
+ }, null, 8, ["modelValue"]),
286
+ i(m, {
287
+ class: "item",
288
+ effect: "dark",
289
+ content: "当筛选结果不止一条数据的时候,才进行填充数据到子表单中。",
290
+ placement: "top"
291
+ }, {
292
+ default: c(() => [...e[9] || (e[9] = [
293
+ t("span", { class: "bnUIcon bnUIcon-question w-color-orange" }, null, -1)
294
+ ])]),
295
+ _: 1
296
+ })
297
+ ]),
298
+ t("div", J, [
299
+ i(p, {
300
+ modelValue: l.ruleData.dataForceFill,
301
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => l.ruleData.dataForceFill = a),
302
+ label: "数据强制填充",
303
+ "true-data": 1,
304
+ "false-data": 0
305
+ }, null, 8, ["modelValue"]),
306
+ i(m, {
307
+ class: "item",
308
+ effect: "dark",
309
+ content: "如果筛选出来数据后,子表单已经有数据存在,则覆盖子表单的原始数据。如果不勾选,则不覆盖。",
310
+ placement: "top"
311
+ }, {
312
+ default: c(() => [...e[10] || (e[10] = [
313
+ t("span", { class: "bnUIcon bnUIcon-question w-color-orange" }, null, -1)
314
+ ])]),
315
+ _: 1
316
+ })
317
+ ]),
318
+ t("div", M, [
319
+ i(p, {
320
+ modelValue: l.ruleData.dataForceClear,
321
+ "onUpdate:modelValue": e[3] || (e[3] = (a) => l.ruleData.dataForceClear = a),
322
+ label: "筛选结果为空时,清空子表单",
323
+ "true-data": 1,
324
+ "false-data": 0
325
+ }, null, 8, ["modelValue"]),
326
+ i(m, {
327
+ class: "item",
328
+ effect: "dark",
329
+ content: "如果筛选时没有数据,子表单本身却有数据存在,则清空子表单的原始数据。",
330
+ placement: "top"
331
+ }, {
332
+ default: c(() => [...e[11] || (e[11] = [
333
+ t("span", { class: "bnUIcon bnUIcon-question w-color-orange" }, null, -1)
334
+ ])]),
335
+ _: 1
336
+ })
337
+ ])
338
+ ])
339
+ ])), [
340
+ [n, l.loading]
341
+ ])
342
+ ]),
343
+ _: 1
344
+ }, 8, ["modelValue"]);
345
+ }
346
+ const G = /* @__PURE__ */ R(S, [["render", H], ["__scopeId", "data-v-e8dd60c5"]]);
347
+ export {
348
+ G as default
349
+ };
@@ -0,0 +1 @@
1
+ .assocTableSearch[data-v-e8dd60c5]{max-height:calc(100vh - 200px);overflow-y:auto}
@@ -0,0 +1,58 @@
1
+ import { B as e, d as o, e as r, f as t, h as B, j as i, k as m, l, m as d, n as F, o as p, q as C, r as c, s as u, u as g, v as h, w as D, x as S, y as b, z as f, A as x, C as O, D as R, E as y, F as A, G as T, H as V, I as k, J as v, K as w, L as E, M as I, N as P, O as G, P as J, Q as L, R as N, S as W, T as M, U, V as j, b as q, W as z, a as H, X as K, Y as Q, Z as X, $ as Y, a0 as Z, a1 as $, a2 as _, a3 as aa, t as sa, a4 as na } from "./install-DSQCBsd_.js";
2
+ import "vue";
3
+ export {
4
+ e as BnAddress,
5
+ o as BnAddressForm,
6
+ r as BnAdvancedFilter,
7
+ t as BnBatchForm,
8
+ B as BnCheck,
9
+ i as BnCheckboxForm,
10
+ m as BnChildrenForm,
11
+ l as BnChooseIPaasData,
12
+ d as BnColumnConfig,
13
+ F as BnColumnConfigDialog,
14
+ p as BnCondition,
15
+ C as BnDateDualForm,
16
+ c as BnDateForm,
17
+ u as BnDatePicker,
18
+ g as BnDrop,
19
+ h as BnEmptyTip,
20
+ D as BnExportOrder,
21
+ S as BnFileForm,
22
+ b as BnFileView,
23
+ f as BnFilterOption,
24
+ x as BnFilterView,
25
+ O as BnFunExpr,
26
+ R as BnImportOrder,
27
+ y as BnInpNum,
28
+ A as BnMenus,
29
+ T as BnNumberForm,
30
+ V as BnOrderCard,
31
+ k as BnOrderDetail,
32
+ v as BnOrderShare,
33
+ w as BnRadio,
34
+ E as BnRadioForm,
35
+ I as BnReceiveForm,
36
+ P as BnRelation,
37
+ G as BnRelationForm,
38
+ J as BnSelect,
39
+ L as BnSelectForm,
40
+ N as BnSmartForm,
41
+ W as BnStringForm,
42
+ M as BnVirtPopover,
43
+ U as BnWebLog,
44
+ j as default,
45
+ q as getApiBaseUrl,
46
+ z as getGlobalConfig,
47
+ H as getSearchComponents,
48
+ K as getWatchComponents,
49
+ Q as idsToTexts,
50
+ X as insertText,
51
+ Y as recordApiLog,
52
+ Z as searchValueToJson,
53
+ $ as setGlobalConfig,
54
+ _ as tidyComponents,
55
+ aa as tidyJumpSearchData,
56
+ sa as tidyRuleComponents,
57
+ na as tidyShowSubDataFile
58
+ };