gds-plus-design-vue 1.2.72 → 1.2.74

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 (165) hide show
  1. package/lib/addPermission.4a553cd8.js +1 -0
  2. package/lib/{addPermission.f2eb7564.mjs → addPermission.78068c52.mjs} +45 -43
  3. package/lib/{approvalModel.7b3cb5c5.mjs → approvalModel.1d109493.mjs} +2 -2
  4. package/lib/{approvalModel.2b97fdf8.js → approvalModel.e0e5738f.js} +1 -1
  5. package/lib/{attribute.4f814780.mjs → attribute.9dfa6953.mjs} +46 -44
  6. package/lib/attribute.f97b41ad.js +1 -0
  7. package/lib/{components.globalheader.5418b5ec.js → components.globalheader.c7bf862b.js} +1 -1
  8. package/lib/{components.globalheader.bc91e6fe.mjs → components.globalheader.f0b8aab7.mjs} +1 -1
  9. package/lib/components.middleware.216e1574.js +1 -0
  10. package/lib/components.middleware.d7dc078d.mjs +148 -0
  11. package/lib/{components.modaltitle.d7ef34cb.js → components.modaltitle.0d3db44e.js} +1 -1
  12. package/lib/{components.modaltitle.4f454200.mjs → components.modaltitle.517bc660.mjs} +2 -2
  13. package/lib/{components.sidenavmenu.1f0bbfca.js → components.sidenavmenu.364a8b26.js} +1 -1
  14. package/lib/{components.sidenavmenu.47d7f44a.mjs → components.sidenavmenu.3f4d259f.mjs} +8 -8
  15. package/lib/components.table.5d1336dd.js +8 -0
  16. package/lib/components.table.a50270a9.mjs +3591 -0
  17. package/lib/components.table.childheader.7e9b960f.mjs +325 -0
  18. package/lib/components.table.childheader.cee3be75.js +1 -0
  19. package/lib/components.table.queriesfield.eb795212.js +1 -0
  20. package/lib/components.table.queriesfield.f16322dc.mjs +748 -0
  21. package/lib/components.viewformdetails.513f0dbe.js +1 -0
  22. package/lib/{components.viewformdetails.1236a66e.mjs → components.viewformdetails.cb86a01d.mjs} +60 -37
  23. package/lib/{createFile.c8d65b52.mjs → createFile.44667f20.mjs} +45 -43
  24. package/lib/createFile.6389354d.js +1 -0
  25. package/lib/{editForm.83d10fae.mjs → editForm.54f33a47.mjs} +5 -2
  26. package/lib/editForm.a5fd3180.js +1 -0
  27. package/lib/extendedAttributes.3ed8fe2a.js +1 -0
  28. package/lib/{extendedAttributes.e6b11c68.mjs → extendedAttributes.b2c2ab6c.mjs} +45 -43
  29. package/lib/{fileSearch.423b64a3.mjs → fileSearch.203b9423.mjs} +45 -43
  30. package/lib/fileSearch.3513b55b.js +1 -0
  31. package/lib/{flow.designer.85d0054b.js → flow.designer.362f5f66.js} +1 -1
  32. package/lib/{flow.designer.5feba43c.mjs → flow.designer.e087cd9b.mjs} +1 -1
  33. package/lib/{flow.list.82131d80.mjs → flow.list.3c2df716.mjs} +2 -2
  34. package/lib/{flow.list.e001d91a.js → flow.list.dea8996a.js} +1 -1
  35. package/lib/{form.build.33cc213e.mjs → form.build.69803596.mjs} +32 -21
  36. package/lib/form.build.6a1bcad5.js +1 -0
  37. package/lib/{form.designer.build.7dc12e87.mjs → form.designer.build.12c673f0.mjs} +195 -171
  38. package/lib/form.designer.build.89af4d24.js +1 -0
  39. package/lib/{formFiled.5a1c8f7f.mjs → formFiled.593b5a25.mjs} +7 -6
  40. package/lib/formFiled.d63e97d3.js +1 -0
  41. package/lib/gd-initial.js +1 -1
  42. package/lib/gd-initial.mjs +148 -146
  43. package/lib/{http.message.ceb0a1c6.mjs → http.message.00e72e09.mjs} +29 -21
  44. package/lib/{http.message.87f319d7.js → http.message.73c3ed85.js} +1 -1
  45. package/lib/index.4f1635c8.js +8 -0
  46. package/lib/{index.340d6f00.mjs → index.9ecf4818.mjs} +3097 -2409
  47. package/lib/layoutBlocks.97713647.mjs +583 -0
  48. package/lib/layoutBlocks.d26f79f2.js +1 -0
  49. package/lib/layouts.0e66a0bc.js +2 -0
  50. package/lib/{layouts.1852e8e4.mjs → layouts.ddf507fa.mjs} +29 -21
  51. package/lib/{main.1551de4d.js → main.22cae2bb.js} +1 -1
  52. package/lib/{main.48dc325f.mjs → main.37ae02bc.mjs} +1 -1
  53. package/lib/main.44750095.js +1 -0
  54. package/lib/{main.b2314767.mjs → main.55c9f109.mjs} +5 -8
  55. package/lib/{main.12118407.mjs → main.5bf89f06.mjs} +54 -55
  56. package/lib/main.f0805dab.js +1 -0
  57. package/lib/manage.91e76379.js +1 -0
  58. package/lib/{manage.1bc511ff.mjs → manage.b3462cce.mjs} +46 -44
  59. package/lib/{messages.messagetemplate.0935e5a3.mjs → messages.messagetemplate.ceeb3f47.mjs} +2 -2
  60. package/lib/{messages.messagetemplate.50334e5f.js → messages.messagetemplate.e52ab470.js} +1 -1
  61. package/lib/messages.sendplan.18bda3c5.js +1 -0
  62. package/lib/{messages.sendplan.61edcc7f.mjs → messages.sendplan.c6821911.mjs} +97 -25
  63. package/lib/{messages.sendrecord.09a1d1cd.js → messages.sendrecord.12028921.js} +2 -2
  64. package/lib/{messages.sendrecord.1c48aa6e.mjs → messages.sendrecord.f7630ebd.mjs} +3 -3
  65. package/lib/{messages.templatelibrary.f31e8d58.mjs → messages.templatelibrary.4654886e.mjs} +1 -1
  66. package/lib/{messages.templatelibrary.f5952edd.js → messages.templatelibrary.cd20c05b.js} +1 -1
  67. package/lib/{mobile.designer.componentstree.9439895e.mjs → mobile.designer.componentstree.5a329caa.mjs} +1 -1
  68. package/lib/{mobile.designer.componentstree.365945a3.js → mobile.designer.componentstree.888d8646.js} +1 -1
  69. package/lib/{mobile.designer.menutree.4d4e059b.js → mobile.designer.menutree.646ebcdd.js} +1 -1
  70. package/lib/{mobile.designer.menutree.7d3b783d.mjs → mobile.designer.menutree.da4c05f4.mjs} +1 -1
  71. package/lib/moveFile.345aee1d.js +1 -0
  72. package/lib/{moveFile.3dc1dc37.mjs → moveFile.864ea48f.mjs} +48 -46
  73. package/lib/{page.build.ae61a39b.mjs → page.build.39202359.mjs} +674 -668
  74. package/lib/{page.build.7ac1ee9b.js → page.build.66e190a5.js} +3 -3
  75. package/lib/{page.designer.componentstree.cdabec2d.mjs → page.designer.componentstree.2d5a887a.mjs} +1 -1
  76. package/lib/{page.designer.componentstree.74a3a114.js → page.designer.componentstree.ec3dcbc1.js} +1 -1
  77. package/lib/{page.designer.menutree.e4ce1e90.mjs → page.designer.menutree.1e642711.mjs} +2 -2
  78. package/lib/{page.designer.menutree.71c18258.js → page.designer.menutree.6368c636.js} +1 -1
  79. package/lib/page.designer.page.2dac64ca.js +1 -0
  80. package/lib/{page.designer.page.821f8994.mjs → page.designer.page.4cf4b1bf.mjs} +39 -35
  81. package/lib/{result.a87217ae.mjs → result.3c1fc8b7.mjs} +45 -43
  82. package/lib/result.cf75c6c3.js +1 -0
  83. package/lib/{router.config.f0ad16fd.mjs → router.config.b78ec9f8.mjs} +5 -5
  84. package/lib/{router.config.a09f29e7.js → router.config.d746d115.js} +1 -1
  85. package/lib/{solution.application.8d6c84e8.js → solution.application.15e813b4.js} +1 -1
  86. package/lib/{solution.application.e6b5dc4f.mjs → solution.application.5d02d1cd.mjs} +16 -10
  87. package/lib/solution.approvalflow.1f11ad8f.js +1 -0
  88. package/lib/{solution.approvalflow.eb1c0607.mjs → solution.approvalflow.24a50af0.mjs} +20 -14
  89. package/lib/solution.dict.28214a3e.js +1 -0
  90. package/lib/{solution.dict.088a1e72.mjs → solution.dict.77cb1ad2.mjs} +41 -37
  91. package/lib/{solution.menu.fa48a7e8.js → solution.menu.12b9f56d.js} +1 -1
  92. package/lib/{solution.menu.e58922fe.mjs → solution.menu.72498250.mjs} +1 -1
  93. package/lib/{solution.plugin.ae6df926.mjs → solution.plugin.76b603be.mjs} +18 -12
  94. package/lib/solution.plugin.e7b31aff.js +1 -0
  95. package/lib/solution.processflow.aa84ec06.js +1 -0
  96. package/lib/{solution.processflow.62936f1c.mjs → solution.processflow.d336bd7b.mjs} +15 -9
  97. package/lib/{solution.role.7b3e7030.mjs → solution.role.05efb1b4.mjs} +18 -12
  98. package/lib/solution.role.d07e1813.js +1 -0
  99. package/lib/{solution.webresources.88c4483b.mjs → solution.webresources.1b0f8550.mjs} +247 -79
  100. package/lib/solution.webresources.5b4abeb5.js +2 -0
  101. package/lib/{solution.workflow.85de0ae5.mjs → solution.workflow.6d081d1f.mjs} +18 -12
  102. package/lib/solution.workflow.91b42158.js +1 -0
  103. package/lib/style.css +2 -2
  104. package/lib/{system.duplicatechecking.a217fc52.js → system.duplicatechecking.719ddda1.js} +1 -1
  105. package/lib/{system.duplicatechecking.46e182d7.mjs → system.duplicatechecking.af9318aa.mjs} +1 -1
  106. package/lib/{system.notice.51880df6.mjs → system.notice.12fa4d1c.mjs} +220 -217
  107. package/lib/system.notice.9385577f.js +1 -0
  108. package/lib/{system.noticereceived.0b79642e.js → system.noticereceived.3dec9e12.js} +1 -1
  109. package/lib/{system.noticereceived.55f276ab.mjs → system.noticereceived.7cfcceb4.mjs} +1 -1
  110. package/lib/{system.team.367bf5e7.mjs → system.team.3b0fcc60.mjs} +1 -1
  111. package/lib/{system.team.cf1c1558.js → system.team.c0d623a5.js} +1 -1
  112. package/lib/{system.teammembers.63f21557.js → system.teammembers.c99ef01b.js} +1 -1
  113. package/lib/{system.teammembers.851ce63b.mjs → system.teammembers.d0dc3f12.mjs} +2 -2
  114. package/lib/{system.user.475d7391.js → system.user.75fa57c3.js} +1 -1
  115. package/lib/{system.user.254bbe85.mjs → system.user.78a45735.mjs} +1 -1
  116. package/lib/versionControl.c39356b7.js +1 -0
  117. package/lib/{versionControl.d1b2b0da.mjs → versionControl.d572bc44.mjs} +51 -49
  118. package/lib/{versionEdit.c51606e4.mjs → versionEdit.8b059461.mjs} +45 -43
  119. package/lib/versionEdit.d56cde69.js +1 -0
  120. package/lib/view.build.14c0d411.js +1 -0
  121. package/lib/{view.build.9976c958.mjs → view.build.5b9241fd.mjs} +193 -190
  122. package/lib/viewList.215afeb2.js +1 -0
  123. package/lib/{viewList.3ca52f0c.mjs → viewList.b090d62f.mjs} +11 -12
  124. package/package.json +1 -1
  125. package/lib/addPermission.e559c495.js +0 -1
  126. package/lib/attribute.7b4971f5.js +0 -1
  127. package/lib/components.middleware.24511f17.mjs +0 -148
  128. package/lib/components.middleware.64b6a988.js +0 -1
  129. package/lib/components.table.389ab22a.mjs +0 -4650
  130. package/lib/components.table.d016f609.js +0 -8
  131. package/lib/components.viewformdetails.328c8642.js +0 -1
  132. package/lib/copy.3b06d60f.mjs +0 -572
  133. package/lib/copy.fa2fcb22.js +0 -1
  134. package/lib/createFile.526dd6db.js +0 -1
  135. package/lib/drawerContainer.790b0ee6.mjs +0 -163
  136. package/lib/drawerContainer.c971d22d.js +0 -1
  137. package/lib/editForm.e284e5ec.js +0 -1
  138. package/lib/extendedAttributes.bfff1926.js +0 -1
  139. package/lib/fileSearch.e849491c.js +0 -1
  140. package/lib/form.build.19f0c882.js +0 -1
  141. package/lib/form.designer.build.2bcc355d.js +0 -1
  142. package/lib/formFiled.40284ed9.js +0 -1
  143. package/lib/index.07adebf0.js +0 -8
  144. package/lib/layoutBlocks.756e4b57.js +0 -1
  145. package/lib/layoutBlocks.816b49a7.mjs +0 -413
  146. package/lib/layouts.2030bf01.js +0 -2
  147. package/lib/main.1611bb43.js +0 -1
  148. package/lib/main.fcb67463.js +0 -1
  149. package/lib/manage.eb0a6c8c.js +0 -1
  150. package/lib/messages.sendplan.60929f46.js +0 -1
  151. package/lib/moveFile.f70bbff7.js +0 -1
  152. package/lib/page.designer.page.654634aa.js +0 -1
  153. package/lib/result.4d4039ea.js +0 -1
  154. package/lib/solution.approvalflow.79da028c.js +0 -1
  155. package/lib/solution.dict.1d5195d0.js +0 -1
  156. package/lib/solution.plugin.5d6d29cf.js +0 -1
  157. package/lib/solution.processflow.aa1e808b.js +0 -1
  158. package/lib/solution.role.2eff83a1.js +0 -1
  159. package/lib/solution.webresources.bc00603d.js +0 -1
  160. package/lib/solution.workflow.0ed2cb24.js +0 -1
  161. package/lib/system.notice.2090c130.js +0 -1
  162. package/lib/versionControl.97590ce8.js +0 -1
  163. package/lib/versionEdit.f710d0bb.js +0 -1
  164. package/lib/view.build.5789a6eb.js +0 -1
  165. package/lib/viewList.6e181715.js +0 -1
@@ -0,0 +1,748 @@
1
+ import { m as T, n as N } from "./components.chartbi.7356b244.mjs";
2
+ import { c as E, l as S, n as L, a as O, b as I, d as j, e as R, f as Q, g as P, y as m } from "./utils.datepicker.js.5549a741.mjs";
3
+ import { a as $ } from "./http.main.aefea27d.mjs";
4
+ function F({
5
+ rules: i,
6
+ data: e,
7
+ field: a,
8
+ source: t,
9
+ done: s,
10
+ statu: r
11
+ }) {
12
+ const n = a.options.columnName.toLowerCase(), l = a.options.effectType, o = e[n], u = t || "form", c = r === void 0 ? !0 : r;
13
+ let h = [];
14
+ return i.forEach((p, Z) => {
15
+ let g = [];
16
+ p.list.forEach((d, v) => {
17
+ let b = [];
18
+ d.condition.list.forEach((D) => {
19
+ let M = q({
20
+ data: D,
21
+ val: u === "form" ? e[D.columnComment] : o,
22
+ type: l
23
+ });
24
+ b.push(M);
25
+ }), g.push(A(b, d));
26
+ });
27
+ let k = g.indexOf(!0);
28
+ if (k !== -1) {
29
+ const d = p.adapted === void 0 ? ["form", "flowsProcess"] : [
30
+ ...p.adapted
31
+ ];
32
+ p.list[k].operation.list.forEach((v) => {
33
+ typeof s == "function" && s(Object.assign({}, {
34
+ ...v
35
+ }), c, u === "form" ? d : [], Object.assign({}, {
36
+ ...p
37
+ }));
38
+ });
39
+ }
40
+ }), h;
41
+ }
42
+ function q(i) {
43
+ switch (i.data.rules) {
44
+ case "1":
45
+ return x(i);
46
+ case "2":
47
+ return x(i);
48
+ case "3":
49
+ return w(i);
50
+ case "4":
51
+ return w(i);
52
+ case "5":
53
+ return _(i);
54
+ case "6":
55
+ return _(i);
56
+ case "7":
57
+ return f(i);
58
+ case "8":
59
+ return f(i);
60
+ case "9":
61
+ return f(i);
62
+ case "10":
63
+ return f(i);
64
+ }
65
+ }
66
+ function x({
67
+ data: i,
68
+ val: e,
69
+ type: a
70
+ }) {
71
+ if (e === "" || e === void 0)
72
+ return !1;
73
+ let t = Array.isArray(e) ? e.join(",") : e, s = i.val;
74
+ return ["currency", "double", "inputnumber"].includes(a) && (t = Number(t), s = Number(s)), ["switch", "select", "radiobox"].includes(a) && (t = String(t), s = String(s)), i.rules === "1" ? t === s : t !== s;
75
+ }
76
+ function w({
77
+ data: i,
78
+ val: e
79
+ }) {
80
+ let a = e === void 0 ? "" : String(e), t = String(i.val);
81
+ return i.rules === "3" ? a.indexOf(t) !== -1 : a.indexOf(t) === -1;
82
+ }
83
+ function _({
84
+ data: i,
85
+ val: e
86
+ }) {
87
+ let a = !0;
88
+ return (e === null || e === "" || e === void 0) && (a = !1), i.rules === "5" ? a : !a;
89
+ }
90
+ function f({
91
+ data: i,
92
+ val: e,
93
+ type: a
94
+ }) {
95
+ if (e === "" || e === void 0)
96
+ return !1;
97
+ let t = C(a, {
98
+ val: e
99
+ }), s = C(a, i);
100
+ if (i.rules === "7")
101
+ return t > s;
102
+ if (i.rules === "8")
103
+ return t >= s;
104
+ if (i.rules === "9")
105
+ return t < s;
106
+ if (i.rules === "10")
107
+ return t <= s;
108
+ }
109
+ function C(i, e) {
110
+ let a = 0;
111
+ return i === "inputnumber" ? a = Number(e.val) : a = new Date(String(e.val)).getTime(), a;
112
+ }
113
+ function A(i, e) {
114
+ let a = e.condition.list.length;
115
+ if (a === 0)
116
+ return !0;
117
+ let t = a === 0 ? "1" : e.condition.list[a - 1].type, s = W(i, t);
118
+ return t === "2" && !s ? !0 : !!(t !== "2" && s);
119
+ }
120
+ function W(i, e) {
121
+ return e === "2" ? i.every((a, t, s) => !a) : i.every((a, t, s) => !!a);
122
+ }
123
+ const B = {
124
+ name: "GdTableQueriesField",
125
+ props: {
126
+ height: {
127
+ type: Number,
128
+ default: 0
129
+ },
130
+ columns: {
131
+ type: Array,
132
+ default: () => []
133
+ },
134
+ queryParam: {
135
+ type: Object,
136
+ default: () => ({})
137
+ },
138
+ colse: {
139
+ type: Function
140
+ },
141
+ visible: {
142
+ type: Boolean,
143
+ default: !1
144
+ },
145
+ openMode: {
146
+ type: [String, Number],
147
+ default: 1
148
+ },
149
+ recordRelation: {
150
+ type: Object,
151
+ default: () => ({})
152
+ },
153
+ viewRecord: {
154
+ type: Object,
155
+ default: () => ({})
156
+ },
157
+ openRules: {
158
+ type: Boolean,
159
+ default: !1
160
+ },
161
+ changeTrigger: {
162
+ type: Function
163
+ },
164
+ queriesMode: {
165
+ type: String,
166
+ default: "popover"
167
+ }
168
+ },
169
+ data() {
170
+ return {
171
+ ruleFormData: {},
172
+ ruleConfig: [],
173
+ hideItem: [],
174
+ viewQueries: [],
175
+ oldvalue: {}
176
+ };
177
+ },
178
+ components: {
179
+ SelectFkMultiple: () => Promise.resolve().then(() => X)
180
+ },
181
+ computed: {
182
+ pickerIntervalOptions() {
183
+ return {
184
+ shortcuts: [
185
+ {
186
+ text: this.$i18nt("gd.view.lastWeek", "\u6700\u8FD1\u4E00\u5468"),
187
+ onClick(i) {
188
+ const e = new Date(), a = new Date();
189
+ a.setTime(a.getTime() - 3600 * 1e3 * 24 * 6), i.$emit("pick", [a, e]);
190
+ }
191
+ },
192
+ {
193
+ text: this.$i18nt("gd.view.lastMonth", "\u6700\u8FD1\u4E00\u4E2A\u6708"),
194
+ onClick(i) {
195
+ const e = new Date(), a = new Date();
196
+ a.setTime(a.getTime() - 3600 * 1e3 * 24 * 30), i.$emit("pick", [a, e]);
197
+ }
198
+ },
199
+ {
200
+ text: this.$i18nt("gd.view.pastThreeMonths", "\u6700\u8FD1\u4E09\u4E2A\u6708"),
201
+ onClick(i) {
202
+ const e = new Date(), a = new Date();
203
+ a.setTime(a.getTime() - 3600 * 1e3 * 24 * 90), i.$emit("pick", [a, e]);
204
+ }
205
+ },
206
+ {
207
+ text: this.$i18nt("gd.view.currentWeek", "\u672C\u5468"),
208
+ onClick(i) {
209
+ E(i);
210
+ }
211
+ },
212
+ {
213
+ text: this.$i18nt("gd.view.lastWeeks", "\u4E0A\u4E00\u5468"),
214
+ onClick(i) {
215
+ S(i);
216
+ }
217
+ },
218
+ {
219
+ text: this.$i18nt("gd.view.nextWeeks", "\u4E0B\u4E00\u5468"),
220
+ onClick(i) {
221
+ L(i);
222
+ }
223
+ },
224
+ {
225
+ text: this.$i18nt("gd.view.thisMonth", "\u672C\u6708"),
226
+ onClick(i) {
227
+ O(i);
228
+ }
229
+ },
230
+ {
231
+ text: this.$i18nt("gd.view.lastMonths", "\u4E0A\u4E2A\u6708"),
232
+ onClick(i) {
233
+ I(i);
234
+ }
235
+ },
236
+ {
237
+ text: this.$i18nt("gd.view.nextMonths", "\u4E0B\u4E2A\u6708"),
238
+ onClick(i) {
239
+ j(i);
240
+ }
241
+ },
242
+ {
243
+ text: this.$i18nt("gd.view.currentQuarter", "\u672C\u5B63\u5EA6"),
244
+ onClick(i) {
245
+ R(i);
246
+ }
247
+ },
248
+ {
249
+ text: this.$i18nt("gd.view.lastQuarter", "\u4E0A\u5B63\u5EA6"),
250
+ onClick(i) {
251
+ Q(i);
252
+ }
253
+ },
254
+ {
255
+ text: this.$i18nt("gd.view.nextQuarter", "\u4E0B\u5B63\u5EA6"),
256
+ onClick(i) {
257
+ P(i);
258
+ }
259
+ },
260
+ {
261
+ text: this.$i18nt("gd.view.currentYear", "\u672C\u5E74"),
262
+ onClick(i) {
263
+ m(i);
264
+ }
265
+ },
266
+ {
267
+ text: this.$i18nt("gd.view.lastYear", "\u53BB\u5E74"),
268
+ onClick(i) {
269
+ m(i, -1);
270
+ }
271
+ },
272
+ {
273
+ text: this.$i18nt("gd.view.nextYear", "\u660E\u5E74"),
274
+ onClick(i) {
275
+ m(i, 1);
276
+ }
277
+ }
278
+ ]
279
+ };
280
+ },
281
+ pickerOptions() {
282
+ return {
283
+ shortcuts: [
284
+ {
285
+ text: this.$i18nt("gd.view.today", "\u4ECA\u5929"),
286
+ onClick(i) {
287
+ i.$emit("pick", new Date());
288
+ }
289
+ },
290
+ {
291
+ text: this.$i18nt("gd.view.yesterday", "\u6628\u5929"),
292
+ onClick(i) {
293
+ const e = new Date();
294
+ e.setTime(e.getTime() - 3600 * 1e3 * 24), i.$emit("pick", e);
295
+ }
296
+ },
297
+ {
298
+ text: this.$i18nt("gd.view.daysAgo3", "3\u5929\u4E4B\u524D"),
299
+ onClick(i) {
300
+ const e = new Date();
301
+ e.setTime(e.getTime() - 3600 * 1e3 * 24 * 3), i.$emit("pick", e);
302
+ }
303
+ },
304
+ {
305
+ text: this.$i18nt("gd.view.daysAgo5", "5\u5929\u4E4B\u524D"),
306
+ onClick(i) {
307
+ const e = new Date();
308
+ e.setTime(e.getTime() - 3600 * 1e3 * 24 * 5), i.$emit("pick", e);
309
+ }
310
+ },
311
+ {
312
+ text: this.$i18nt("gd.view.daysAgo7", "7\u5929\u4E4B\u524D"),
313
+ onClick(i) {
314
+ const e = new Date();
315
+ e.setTime(e.getTime() - 3600 * 1e3 * 24 * 7), i.$emit("pick", e);
316
+ }
317
+ }
318
+ ]
319
+ };
320
+ },
321
+ style() {
322
+ return this.queriesMode === "popover" ? `max-height:${this.height}px;min-height:${this.height / 3 * 2}px` : `height:${this.height}px;`;
323
+ },
324
+ istyle() {
325
+ return "margin: 0 auto;";
326
+ },
327
+ getColumns() {
328
+ return (this.openRules ? this.viewQueries : this.columns).filter((e) => (e.rules = e.rules ? e.rules : [], e.show === void 0 ? !0 : e.show));
329
+ },
330
+ ...T(["tableLists"])
331
+ },
332
+ watch: {
333
+ visible(i, e) {
334
+ i && this.init();
335
+ }
336
+ },
337
+ methods: {
338
+ columnFkData(i, e) {
339
+ this.viewQueries = this.viewQueries.map((a) => Object.assign({ ...a }, { fkData: a.prop === i.prop ? i.fkData : a.fkData }));
340
+ },
341
+ fkNotice(i) {
342
+ this.viewQueries.filter((a) => a.effectType === "selectFkMultiple").filter((a) => a.filterList && a.filterList.length > 0).forEach((a) => {
343
+ const t = a.filterList.filter((s) => s.columnName === i.prop)[0];
344
+ t && this.changeEmptying(t, a);
345
+ });
346
+ },
347
+ changeEmptying(i, e) {
348
+ if (!(i.changeEmpty === void 0 ? !0 : i.changeEmpty))
349
+ return;
350
+ let t = /* @__PURE__ */ new Map();
351
+ t.set(e.prop, []), this.setData(Object.fromEntries(t), e), !this.hideItem.includes(e.prop) && this.$nextTick(() => {
352
+ setTimeout(() => {
353
+ let s = this.$refs[`fk_${e.prop}`];
354
+ s && s[0].fkNotice();
355
+ }, 20);
356
+ });
357
+ },
358
+ handleChange(i) {
359
+ const e = i.rulesList && i.rulesList.length > 0 ? i.rulesList : [];
360
+ e.length > 0 && F({
361
+ data: this.ruleFormData,
362
+ rules: [{ list: e }],
363
+ field: { options: { columnName: i.prop, effectType: i.effectType } },
364
+ source: "queries",
365
+ done: this.hitRules
366
+ }), setTimeout(() => {
367
+ this.fkNotice(i);
368
+ }, 20);
369
+ },
370
+ setData(i, e) {
371
+ this.ruleFormData = Object.assign({ ...this.ruleFormData }, i), this.handleChange(e);
372
+ },
373
+ usageAllRulesReset() {
374
+ this.ruleConfig.length !== 0 && this.viewQueries.forEach((i) => {
375
+ i.rulesList && i.rulesList.length > 0 && F({
376
+ data: this.ruleFormData,
377
+ rules: [{ list: i.rulesList }],
378
+ field: { options: { columnName: i.prop, effectType: i.effectType } },
379
+ done: this.hitRules
380
+ });
381
+ });
382
+ },
383
+ hitRules(i) {
384
+ let e = this.viewQueries.filter((s) => s.id == i.columnComment)[0];
385
+ if (!e)
386
+ return;
387
+ let a = this.hideItem.filter((s) => s !== e.prop);
388
+ this.hideItem = i.val === "1" ? [...a] : a.concat([e.prop]), this.$emit("hideQueryParam", this.hideItem);
389
+ let t = /* @__PURE__ */ new Map();
390
+ t.set(e.prop, this.getTypeVal(e));
391
+ for (let s in this.ruleFormData)
392
+ this.hideItem.includes(s) || t.set(s, this.ruleFormData[s]);
393
+ this.ruleFormData = Object.assign({ ...this.ruleFormData }, Object.fromEntries(t));
394
+ },
395
+ getTypeVal(i) {
396
+ return ["selectMultiple", "selectFkMultiple"].includes(i.effectType) ? [] : ["datepicker"].includes(i.effectType) && i.options.displayStyle !== 1 ? [] : "";
397
+ },
398
+ init(i = "init") {
399
+ let e = /* @__PURE__ */ new Map();
400
+ this.columns.filter((n) => n.effectType === "checkbox").forEach((n) => {
401
+ e.set(n.prop, []);
402
+ });
403
+ let a = /* @__PURE__ */ new Map();
404
+ for (let n in this.queryParam) {
405
+ let l = this.columns.filter((o) => o.prop === n)[0];
406
+ l && ["checkbox", "selectMultiple"].includes(l.effectType) ? a.set(n, i === "init" ? Array.isArray(this.queryParam[n]) ? this.queryParam[n] : this.queryParam[n].split(",") : []) : l && ["inputnumber", "double", "currency"].includes(l.effectType) ? a.set(n, i === "init" ? this.queryParam[n] : void 0) : Array.isArray(this.queryParam[n]) ? a.set(n, i === "init" ? this.queryParam[n] : []) : a.set(n, i === "init" ? this.queryParam[n] : "");
407
+ }
408
+ if (this.ruleFormData = Object.assign(Object.fromEntries(e), Object.fromEntries(a)), setTimeout(() => {
409
+ this.oldvalue = {}, this.oldvalue = JSON.stringify(this.ruleFormData);
410
+ }, 100), !this.openRules)
411
+ return;
412
+ let t = [], s = [];
413
+ return this.ruleConfig = this.viewRecord.ruleconfig ? JSON.parse(this.viewRecord.ruleconfig) : [], this.columns.forEach((n) => {
414
+ t.push(
415
+ Object.assign(
416
+ { ...n },
417
+ {
418
+ rulesList: this.hitItem(n)
419
+ }
420
+ )
421
+ ), n.options.hidden && s.push(n.prop);
422
+ }), this.columns.filter((n) => n.options.filter !== void 0 && n.options.filter.length > 0).forEach((n) => {
423
+ let l = [];
424
+ n.options.filter.forEach((o) => {
425
+ let u = this.columns.filter((c) => c.prop == o.columnName)[0];
426
+ if (u) {
427
+ let c = this.ruleFormData[u.prop];
428
+ l.push({
429
+ fieldName: o.fieldName,
430
+ fieldValue: c,
431
+ operator: o.operator,
432
+ columnName: o.columnName,
433
+ changeEmpty: o.changeEmpty === void 0 ? !0 : o.changeEmpty
434
+ });
435
+ }
436
+ if (l.length > 0) {
437
+ let c = t.findIndex((h) => h.prop === n.prop);
438
+ t[c].filterList = l;
439
+ }
440
+ });
441
+ }), this.viewQueries = t, this.hideItem = [...s], this.usageAllRulesReset(), new Promise((n) => {
442
+ setTimeout(() => {
443
+ n();
444
+ }, 10);
445
+ });
446
+ },
447
+ hitItem(i) {
448
+ if (this.ruleConfig.length == 0)
449
+ return [];
450
+ let e = [];
451
+ return this.ruleConfig.forEach((a, t) => {
452
+ a.condition.list.filter((r) => r.columnComment === i.id)[0] && e.push(a);
453
+ }), e;
454
+ },
455
+ isHitItemChecked(i, e) {
456
+ return i.every((a, t, s) => a.columnComment !== e.id);
457
+ },
458
+ save() {
459
+ this.$refs.ruleForm.validate((i, e) => {
460
+ if (i) {
461
+ let a = /* @__PURE__ */ new Map();
462
+ for (let t in this.ruleFormData) {
463
+ let s = this.columns.filter((r) => r.prop === t)[0];
464
+ ["checkbox"].includes(s.effectType) ? a.set(t, this.ruleFormData[t].join(",")) : a.set(t, this.ruleFormData[t]);
465
+ }
466
+ this.$emit("save", Object.fromEntries(a), this.openRules ? this.viewQueries : this.columns), this.cancel();
467
+ } else {
468
+ let a = new Map(Object.entries(e)), t = [];
469
+ for (let l of a.keys())
470
+ t.push(l);
471
+ const s = e[t[0]][0], r = this.columns.filter((l) => l.prop === s.field)[0], n = r ? `${this.$i18nt(`Dynamics.${r.transKey}`, r.label)} ` : s.field;
472
+ this.$message.error(`${this.$i18nt("gd.https.errors", "\u6821\u9A8C\u5931\u8D25")}: ${n} ${s.message}!`);
473
+ }
474
+ });
475
+ },
476
+ cancel() {
477
+ this.colse();
478
+ },
479
+ close() {
480
+ },
481
+ reset() {
482
+ this.init("reset"), this.$emit("reset");
483
+ },
484
+ getDict(i) {
485
+ return i.dictData ? i.dictData : this.getDictionary(i);
486
+ },
487
+ getDictionary(i) {
488
+ return this.$options.filters.dictData(i.dictTypeCode);
489
+ }
490
+ }
491
+ };
492
+ var V = function() {
493
+ var e = this, a = e._self._c;
494
+ return a("div", { staticClass: "gd-table-queries", style: e.style }, [a("el-form", { ref: "ruleForm", staticClass: "gd-form table-queries-form", attrs: { model: e.ruleFormData, size: "small", labelPosition: "top" }, nativeOn: { submit: function(t) {
495
+ t.preventDefault();
496
+ } } }, [e._l(e.getColumns, function(t, s) {
497
+ return [e.hideItem.includes(t.prop) ? e._e() : a("el-form-item", { style: e.istyle, attrs: { label: e.$i18nt(t.transKey, t.label), prop: t.prop, rules: t.rules }, nativeOn: { submit: function(r) {
498
+ r.preventDefault();
499
+ } } }, [["inputnumber", "double", "currency"].includes(t.effectType) ? [a("el-input-number", { staticStyle: { width: "100%", "text-align": "left" }, attrs: { placeholder: e.$i18nt("gd.placeholder.input"), clearable: "", min: t.min || t.min === 0 ? t.min : -1 / 0, max: t.max || t.max === 0 ? t.max : 1 / 0, disabled: t.disabled === void 0 ? !1 : t.disabled, "controls-position": "right" }, on: { change: function(r) {
500
+ return e.handleChange(t);
501
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
502
+ e.$set(e.ruleFormData, t.prop, r);
503
+ }, expression: "ruleFormData[column.prop]" } })] : t.effectType === "checkbox" ? [e.ruleFormData[t.prop] ? a("el-checkbox-group", { attrs: { disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
504
+ return e.handleChange(t);
505
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
506
+ e.$set(e.ruleFormData, t.prop, r);
507
+ }, expression: "ruleFormData[column.prop]" } }, e._l(e.getDict(t), function(r) {
508
+ return a("el-checkbox", { key: r.code, attrs: { label: r.code, name: e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name) } }, [e._v(" " + e._s(e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name)) + " ")]);
509
+ }), 1) : e._e()] : t.effectType === "radio" ? [a("el-radio-group", { attrs: { disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { input: function(r) {
510
+ return e.handleChange(t);
511
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
512
+ e.$set(e.ruleFormData, t.prop, r);
513
+ }, expression: "ruleFormData[column.prop]" } }, e._l(e.getDict(t), function(r) {
514
+ return a("el-radio", { key: r.code, attrs: { label: r.code, name: e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name) } }, [e._v(" " + e._s(e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name)) + " ")]);
515
+ }), 1)] : t.effectType === "selectMultiple" ? [a("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), "reserve-keyword": "", clearable: "", multiple: "", filterable: "", "collapse-tags": !0, "popper-append-to-body": !0, disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
516
+ return e.handleChange(t);
517
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
518
+ e.$set(e.ruleFormData, t.prop, r);
519
+ }, expression: "ruleFormData[column.prop]" } }, e._l(e.getDict(t), function(r) {
520
+ return a("el-option", { key: r.code, attrs: { value: r.code, label: e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name) } }, [e._v(" " + e._s(e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name)) + " ")]);
521
+ }), 1)] : t.effectType === "select" ? [a("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), "reserve-keyword": "", clearable: "", "collapse-tags": !0, "popper-append-to-body": !0, disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
522
+ return e.handleChange(t);
523
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
524
+ e.$set(e.ruleFormData, t.prop, r);
525
+ }, expression: "ruleFormData[column.prop]" } }, e._l(e.getDict(t), function(r) {
526
+ return a("el-option", { key: r.code, attrs: { value: r.code, label: e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name) } }, [e._v(" " + e._s(e.$i18nt(r.prefix ? `${r.prefix}.${r.transkey}` : `Dynamics.${r.transkey}`, r.name)) + " ")]);
527
+ }), 1)] : t.effectType === "selectTable" ? [a("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), "reserve-keyword": "", clearable: "", "collapse-tags": !0, "popper-append-to-body": !0, disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
528
+ return e.handleChange(t);
529
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
530
+ e.$set(e.ruleFormData, t.prop, r);
531
+ }, expression: "ruleFormData[column.prop]" } }, e._l(e.tableLists, function(r) {
532
+ return a("el-option", { key: r.id, attrs: { label: e.$i18nt(`Dynamics.${r.transkey}`, r.busname), value: r.id } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${r.transkey}`, r.busname)) + " " + e._s(r.tablename) + " ")]);
533
+ }), 1)] : t.effectType === "selectFkMultiple" ? [a("SelectFkMultiple", { ref: `fk_${t.prop}`, refInFor: !0, attrs: { column: t, ruleFormData: e.ruleFormData, visible: e.visible, recordRelation: e.recordRelation, openMode: e.openMode, changeTrigger: e.changeTrigger }, on: { change: function(r) {
534
+ return e.handleChange(t);
535
+ }, setFkData: e.columnFkData } })] : t.effectType == "datepicker" ? [t.options.displayStyle === 1 ? [t.hasTimePicker ? a("el-time-picker", { staticStyle: { width: "100%" }, attrs: { "value-format": t.valueFormat, format: t.valueFormat, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
536
+ return e.handleChange(t);
537
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
538
+ e.$set(e.ruleFormData, t.prop, r);
539
+ }, expression: "ruleFormData[column.prop]" } }) : [t.pickerType === "date" ? a("el-date-picker", { staticStyle: { width: "100%" }, attrs: { type: t.pickerType, "value-format": t.valueFormat, format: t.valueFormat, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: t.disabled === void 0 ? !1 : t.disabled, "picker-options": e.pickerOptions }, on: { change: function(r) {
540
+ return e.handleChange(t);
541
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
542
+ e.$set(e.ruleFormData, t.prop, r);
543
+ }, expression: "ruleFormData[column.prop]" } }) : a("el-date-picker", { staticStyle: { width: "100%" }, attrs: { type: t.pickerType, "value-format": t.valueFormat, format: t.valueFormat, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
544
+ return e.handleChange(t);
545
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
546
+ e.$set(e.ruleFormData, t.prop, r);
547
+ }, expression: "ruleFormData[column.prop]" } })]] : [t.pickerType === "month" ? a("el-date-picker", { staticStyle: { width: "100%" }, attrs: { type: "monthrange", format: "yyyy-MM", "value-format": "yyyy-MM", "range-separator": "~", "start-placeholder": e.$i18nt("el.datepicker.startDate", "\u5F00\u59CB\u65E5\u671F"), "end-placeholder": e.$i18nt("el.datepicker.endDate", "\u7ED3\u675F\u65E5\u671F"), disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
548
+ return e.handleChange(t);
549
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
550
+ e.$set(e.ruleFormData, t.prop, r);
551
+ }, expression: "ruleFormData[column.prop]" } }) : a("el-date-picker", { staticStyle: { width: "100%" }, attrs: { type: "daterange", format: "yyyy-MM-dd", "value-format": "yyyy-MM-dd", "range-separator": "~", "start-placeholder": e.$i18nt("el.datepicker.startDate", "\u5F00\u59CB\u65E5\u671F"), "end-placeholder": e.$i18nt("el.datepicker.endDate", "\u7ED3\u675F\u65E5\u671F"), disabled: t.disabled === void 0 ? !1 : t.disabled, "picker-options": e.pickerIntervalOptions }, on: { change: function(r) {
552
+ return e.handleChange(t);
553
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
554
+ e.$set(e.ruleFormData, t.prop, r);
555
+ }, expression: "ruleFormData[column.prop]" } })]] : [a("el-input", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.input"), clearable: "", disabled: t.disabled === void 0 ? !1 : t.disabled }, on: { change: function(r) {
556
+ return e.handleChange(t);
557
+ } }, model: { value: e.ruleFormData[t.prop], callback: function(r) {
558
+ e.$set(e.ruleFormData, t.prop, r);
559
+ }, expression: "ruleFormData[column.prop]" } })]], 2)];
560
+ })], 2), a("div", { staticClass: "gd-table-btom" }, [a("div", { staticClass: "active-color btom-reset", on: { click: e.reset } }, [a("i", { staticClass: "el-icon-brush" }), e._v(" " + e._s(e.$i18nt("gd.btn.reset", "\u91CD\u7F6E")) + " ")]), a("el-button", { attrs: { type: "primary", size: "mini", icon: "el-icon-document-checked" }, on: { click: e.save } }, [e._v(" " + e._s(e.$i18nt("gd.btn.confirm", "\u786E\u8BA4")) + " ")]), a("el-button", { attrs: { type: "info", size: "mini", icon: "el-icon-error" }, on: { click: e.cancel } }, [e._v(e._s(e.$i18nt("gd.btn.cancel", "\u53D6\u6D88")))])], 1)], 1);
561
+ }, z = [], G = /* @__PURE__ */ N(
562
+ B,
563
+ V,
564
+ z,
565
+ !1,
566
+ null,
567
+ "fbffca94",
568
+ null,
569
+ null
570
+ );
571
+ const y = G.exports;
572
+ y.install = function(i) {
573
+ i.component(y.name, y);
574
+ };
575
+ const Y = {
576
+ props: {
577
+ column: {
578
+ type: Object,
579
+ default: () => []
580
+ },
581
+ ruleFormData: {
582
+ type: Object,
583
+ required: !0
584
+ },
585
+ visible: {
586
+ type: Boolean,
587
+ default: !1
588
+ },
589
+ openMode: {
590
+ type: [String, Number],
591
+ default: 1
592
+ },
593
+ recordRelation: {
594
+ type: Object,
595
+ default: () => ({})
596
+ },
597
+ changeTrigger: {
598
+ type: Function
599
+ },
600
+ tagWidth: {
601
+ type: String,
602
+ default: "50%"
603
+ }
604
+ },
605
+ data() {
606
+ return {
607
+ fkData: [],
608
+ loading: !1,
609
+ firstLoading: !1
610
+ };
611
+ },
612
+ watch: {
613
+ visible(i, e) {
614
+ i && this.init();
615
+ }
616
+ },
617
+ computed: { ...T(["userInfo", "tableLists"]) },
618
+ methods: {
619
+ fkNotice() {
620
+ this.$nextTick(() => {
621
+ setTimeout(() => {
622
+ this.fkData = [], this.firstLoading = !1;
623
+ }, 10);
624
+ });
625
+ },
626
+ handleChange(i) {
627
+ this.$emit("change", i);
628
+ },
629
+ init() {
630
+ if (this.column.fkData && this.column.fkData.length > 0 && (this.fkData = this.column.fkData, this.firstLoading = !1), this.openMode != 2)
631
+ return;
632
+ const i = this.recordRelation.options && this.recordRelation.options.filterList ? this.recordRelation.options.filterList : [], e = this.ruleFormData[this.column.prop];
633
+ e === void 0 || e === "" || e.length === 0 || !i.filter((s) => s.fieldName === this.column.prop)[0] || this.fkData.filter((s) => e.includes(s.id))[0] || (Array.isArray(e) || (this.ruleFormData[this.column.prop] = [this.ruleFormData[this.column.prop]]), this.searchDataId());
634
+ },
635
+ lookup() {
636
+ let i = [];
637
+ this.column.filterList.forEach((e) => {
638
+ let a = e.columnName === "&user&" ? this.userInfo.id : this.ruleFormData[e.columnName];
639
+ a !== "" && a !== void 0 && i.push({
640
+ fieldName: e.fieldName,
641
+ fieldValue: a,
642
+ operator: e.operator,
643
+ columnName: e.columnName
644
+ });
645
+ }), this.$nextTick(() => {
646
+ setTimeout(() => {
647
+ const e = this.ruleFormData[this.column.prop], a = this.column.options.openWidth !== void 0 ? this.column.options.openWidth : "90", t = this.column.options.widthUnit !== void 0 ? this.column.options.widthUnit : "%", s = this.column.viewId !== void 0 ? this.column.viewId : "";
648
+ let r = {
649
+ fkEntityName: this.column.fkEntityName,
650
+ effectType: "participants",
651
+ val: e || [],
652
+ column: this.column,
653
+ filterList: i,
654
+ width: `${a}${t}`
655
+ };
656
+ s && Object.assign(r, {
657
+ viewId: s
658
+ }), this.$refs.viewSearch.open(r);
659
+ }, 0);
660
+ });
661
+ },
662
+ lookupSeled(i) {
663
+ this.fkData = [...i.fkData], this.ruleFormData[this.column.prop] = i.data, this.$emit("change", i);
664
+ },
665
+ fkSearch() {
666
+ this.column.prop !== "baseRecordTable" && this.column.prop !== "matchingRecordTable" && (this.firstLoading || (this.searchData(""), this.firstLoading = !0));
667
+ },
668
+ getFilterList(i, e) {
669
+ let a = [];
670
+ return e === "" || e === void 0 || e === null ? [] : (Object.prototype.toString.call(e) === "[object Array]" ? a.push({
671
+ fieldName: i.fieldName,
672
+ fieldValue: e.join(","),
673
+ operator: i.operator,
674
+ columnName: i.columnName
675
+ }) : a.push({
676
+ fieldName: i.fieldName,
677
+ fieldValue: e,
678
+ operator: i.operator,
679
+ columnName: i.columnName
680
+ }), a);
681
+ },
682
+ searchData(i) {
683
+ this.loading = !0;
684
+ const e = this.ruleFormData[this.column.prop] ? this.ruleFormData[this.column.prop] : [], a = this.column.fkEntityName.split(",")[0];
685
+ let t = { name: i, fkEntityName: a };
686
+ if (this.column.filterList && this.column.filterList.length > 0) {
687
+ let r = [];
688
+ this.column.filterList.forEach((n) => {
689
+ let l = n.columnName === "&user&" ? this.userInfo.id : this.ruleFormData[n.columnName];
690
+ const o = this.getFilterList(n, l);
691
+ r = r.concat(o);
692
+ }), r.length > 0 && Object.assign(t, { filter: r });
693
+ }
694
+ const s = this.fkData.filter((r) => e.includes(r.id));
695
+ this.column.filterConfig && this.column.filterConfig.tablename && Object.assign(t, {
696
+ filterConfig: this.column.filterConfig
697
+ }), $(t).then((r) => {
698
+ if (this.loading = !1, r.code === 200) {
699
+ const n = r.data.filter((l) => !e.includes(l.id));
700
+ this.fkData = s.concat(n), this.column.fkData = this.fkData, this.$emit("setFkData", this.column, this.fkData);
701
+ }
702
+ });
703
+ },
704
+ searchDataId(i) {
705
+ this.loading = !0;
706
+ const e = this.column.fkEntityName.split(",")[0];
707
+ let a = this.ruleFormData[this.column.prop], t = [];
708
+ a.forEach((s) => {
709
+ let r = { id: s, fkEntityName: e }, n = this.getBaseFkList(r).then((l) => l);
710
+ t.push(n);
711
+ }), Promise.all(t).then((s) => {
712
+ let r = [];
713
+ s.forEach((n) => {
714
+ n.code === 200 && (r = r.concat(n.data));
715
+ }), this.fkData = r, this.column.fkData = r, this.loading = !1, this.$emit("setFkData", this.column, this.fkData);
716
+ });
717
+ },
718
+ getBaseFkList(i) {
719
+ return $(i).then((e) => e);
720
+ }
721
+ }
722
+ };
723
+ var J = function() {
724
+ var e = this, a = e._self._c;
725
+ return a("div", { staticClass: "cao_about", style: { "--fkwidth": e.tagWidth } }, [a("el-select", { staticClass: "cao_input", attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), loading: e.loading, "reserve-keyword": "", filterable: "", remote: "", clearable: "", "remote-method": e.searchData, multiple: "", "collapse-tags": !0, "popper-append-to-body": !0, disabled: e.column.disabled === void 0 ? !1 : e.column.disabled }, on: { focus: e.fkSearch, change: e.handleChange }, model: { value: e.ruleFormData[e.column.prop], callback: function(t) {
726
+ e.$set(e.ruleFormData, e.column.prop, t);
727
+ }, expression: "ruleFormData[column.prop]" } }, e._l(e.fkData, function(t) {
728
+ return a("el-option", { key: t.id, attrs: { label: t.transkey ? e.$i18nt(`Dynamics.${t.transkey}`, t.busname) : t.name, value: t.id } });
729
+ }), 1), a("div", { staticClass: "cao_setting", class: e.column.disabled ? "pointerevents" : "", on: { click: e.lookup } }, [a("i", { staticClass: "el-input__icon el-icon-search" })]), a("gd-search", { ref: "viewSearch", attrs: { appendToBody: !0, modalAppendToBody: !0 }, on: { lookupSeled: e.lookupSeled } })], 1);
730
+ }, K = [], U = /* @__PURE__ */ N(
731
+ Y,
732
+ J,
733
+ K,
734
+ !1,
735
+ null,
736
+ "45ca93b0",
737
+ null,
738
+ null
739
+ );
740
+ const H = U.exports, X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
741
+ __proto__: null,
742
+ default: H
743
+ }, Symbol.toStringTag, { value: "Module" }));
744
+ export {
745
+ y as G,
746
+ H as S,
747
+ F as u
748
+ };