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
@@ -1,572 +0,0 @@
1
- import { m as g, n as K } from "./components.chartbi.7356b244.mjs";
2
- import { s as b, J as h, b as x, K as m, L as w } from "./http.tabledevelopment.3dcb3e97.mjs";
3
- import { c as $ } from "./http.codegeneratemanage.b123bab3.mjs";
4
- import { u as f, p as u } from "./utils.util.js.333daba2.mjs";
5
- import { G as T, a as D } from "./http.translationmanage.f8694b51.mjs";
6
- import "./utils.echarts.js.d1bb8ac6.mjs";
7
- const v = {
8
- props: {
9
- type: {
10
- type: [String, Number],
11
- default: 1
12
- },
13
- prefixKey: {
14
- type: String,
15
- default: ""
16
- },
17
- suffixKey: {
18
- type: String,
19
- default: ""
20
- }
21
- },
22
- data() {
23
- return {
24
- sysViewButtons: [
25
- {
26
- displayName: "\u786E\u5B9A",
27
- functionName: "handleSubmit",
28
- show: !0,
29
- transKey: "gd.btn.confirm",
30
- icon: "el-icon-document-checked"
31
- }
32
- ],
33
- visible: !1,
34
- confirmLoading: !1,
35
- spinning: !1,
36
- loadData: [],
37
- viewData: [],
38
- formData: [],
39
- detail: null,
40
- record: null,
41
- fullscreen: !1,
42
- width: "600px",
43
- arrTransKey: [],
44
- allTableData: [],
45
- langsAll: [],
46
- httpNumbe: 0,
47
- ruleFormData: {},
48
- pattern: "/^[a-zA-Z]+$/",
49
- contentTransKey: [],
50
- translationLangs: [],
51
- menusId: ""
52
- };
53
- },
54
- computed: {
55
- modalStyle() {
56
- return this.fullscreen ? {
57
- width: "100%",
58
- dialogStyle: {
59
- top: "0px"
60
- }
61
- } : {
62
- width: this.width,
63
- dialogStyle: {
64
- top: "80px"
65
- }
66
- };
67
- },
68
- ...g(["tableLists"])
69
- },
70
- methods: {
71
- togglefullscreen() {
72
- this.fullscreen = !this.fullscreen;
73
- },
74
- open(s) {
75
- this.httpNumbe = 0, this.fullscreen = !1, this.record = s, this.visible = !0, this.spinning = !0, this.type == 1 ? this.getViewDetail() : this.getFormDetail();
76
- },
77
- getViewDetail() {
78
- return b({
79
- id: this.record
80
- }).then((s) => (s.success ? (this.detail = Object.assign(s.data, {
81
- viewname: s.data.viewname + f(2, !1, !1)
82
- }), this.spinning = !1, this.$nextTick(() => {
83
- setTimeout(() => {
84
- this.ruleFormData = {
85
- name: this.detail.viewname,
86
- displayName: this.detail.name,
87
- type: String(this.detail.type),
88
- explain: this.detail.explain
89
- };
90
- }, 0);
91
- })) : this.$message.error(s.message), s.data));
92
- },
93
- getFormDetail() {
94
- return h({
95
- id: this.record
96
- }).then((s) => (s.success ? (this.detail = Object.assign(s.data, {
97
- name: s.data.name + f(2, !1, !1)
98
- }), this.spinning = !1, this.$nextTick(() => {
99
- setTimeout(() => {
100
- this.ruleFormData = {
101
- name: this.detail.name,
102
- displayName: this.detail.displayname,
103
- type: "4",
104
- explain: this.detail.explain
105
- };
106
- }, 0);
107
- })) : this.$message.error(s.message), s.data));
108
- },
109
- handleSubmit() {
110
- this.$refs.ruleForm.validate((s) => {
111
- s && (this.type == 1 ? this.addView(this.ruleFormData) : (this.spinning = !0, this.confirmLoading = !0, this.addForm(this.ruleFormData)));
112
- });
113
- },
114
- addView(s) {
115
- let t = [], a = [];
116
- this.detail.sysviewfields.forEach((i, n) => {
117
- let p = {
118
- name: i.name,
119
- width: i.width,
120
- order: n,
121
- type: i.type,
122
- fieldId: i.fieldid,
123
- joinTableId: i.jointableid,
124
- joinFieldId: i.joinfieldid,
125
- orderConfig: i.orderconfig,
126
- gatherConfig: i.gatherconfig,
127
- maxTagCount: i.maxtagcount,
128
- align: i.align ? i.align : "left&1&none&none"
129
- };
130
- t.push(p);
131
- }), this.detail.sysviewqueries.forEach((i, n) => {
132
- if (i.field) {
133
- let p = {
134
- queryType: i.querytype,
135
- name: i.field.columncomment,
136
- fieldId: i.fieldid,
137
- joinTableId: i.jointableid,
138
- joinFieldId: i.joinfieldid,
139
- order: n,
140
- displayStyle: i.displaystyle,
141
- options: i.options
142
- };
143
- a.push(p);
144
- }
145
- });
146
- let r = {
147
- syscodegenid: this.detail.syscodegenid,
148
- name: s.displayName,
149
- type: s.type,
150
- explain: s.explain,
151
- frozenColumn: this.detail.frozencolumn,
152
- isDefault: 0,
153
- viewName: s.name,
154
- order: this.detail.order,
155
- sysViewFields: t,
156
- filterConfig: this.detail.filterconfig,
157
- sysViewQueries: a,
158
- defaultSort: this.detail.defaultsort,
159
- viewTree: this.detail.viewtree,
160
- isViewTree: this.detail.isviewtree,
161
- ruleConfig: this.detail.ruleconfig,
162
- buttonRule: this.detail.buttonrule
163
- };
164
- this.spinning = !0, this.confirmLoading = !0, x(r).then((i) => {
165
- i.success ? (this.$message.success(this.$i18nt("gd.https.addSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.handleCancel()) : this.$message.error(this.$i18nt("gd.https.addFail", "\u64CD\u4F5C\u5931\u8D25") + i.message), this.spinning = !1, this.confirmLoading = !1;
166
- });
167
- },
168
- regenerateKey(s, t) {
169
- if (!s || s.startsWith("gd."))
170
- return s;
171
- let a = this.prefixKey.split("_"), r = u(a[0], "0");
172
- const i = s.replace(this.suffixKey, ""), n = i.substr(i.lastIndexOf("_") + 1).toLowerCase();
173
- let p = `${r}${t.toLowerCase()}_${n}${f(2)}${this.suffixKey}`;
174
- return n.length > 18 && (p = `${r}${t.toLowerCase()}_${f(8)}${this.suffixKey}`), p;
175
- },
176
- async addForm(s) {
177
- let t = JSON.parse(this.detail.formconfig), a = [], r = [], i = {}, n = { titlePrefix: "", prefixTransKey: null };
178
- if (t.config.options && t.config.options.prefixTransKey) {
179
- const o = this.$i18nt(`Dynamics.${t.config.options.prefixTransKey}`, t.config.options.titlePrefix);
180
- i = { transKey: this.regenerateKey(item.transKey, "prefix") }, Object.assign({ titlePrefix: o, prefixTransKey: i.transKey }), a = a.concat([
181
- {
182
- oldKey: item.transKey,
183
- newKey: i.transKey,
184
- name: o
185
- }
186
- ]);
187
- }
188
- t.config = Object.assign(
189
- {
190
- ...t.config
191
- },
192
- {
193
- name: s.name,
194
- displayName: s.displayName,
195
- type: s.type,
196
- explain: s.explain,
197
- transKey: null,
198
- titlePrefix: n.titlePrefix,
199
- prefixTransKey: n.prefixTransKey
200
- }
201
- );
202
- const p = (o) => (o = o.filter((e, c) => {
203
- if (e.langs !== void 0 && delete e.langs, e.options)
204
- for (let d in e.options)
205
- ["transKey", "subtransKey", "suffixTransKey", "prefixTransKey", "placeholderTransKey"].includes(d) && e.options[d] && !e.options[d].startsWith("gd.") && r.push(e.options[d]);
206
- if (["title"].includes(e.type))
207
- i = {
208
- transKey: this.regenerateKey(e.options.transKey, e.type),
209
- subtransKey: this.regenerateKey(e.options.subtransKey, "describe")
210
- }, a = a.concat([
211
- {
212
- oldKey: e.options.transKey,
213
- newKey: i.transKey,
214
- name: this.$i18nt(`Dynamics.${e.options.transKey}`, e.options.title)
215
- },
216
- {
217
- oldKey: e.options.subtransKey,
218
- newKey: i.subtransKey,
219
- name: this.$i18nt(`Dynamics.${e.options.subtransKey}`, e.options.subtitle)
220
- }
221
- ]), e.options = Object.assign({ ...e.options }, i);
222
- else if (["btnGroup"].includes(e.type))
223
- e.btnList = e.btnList.map((d) => d.transKey && !d.transKey.startsWith("gd.") ? (i = { transKey: this.regenerateKey(d.transKey, e.type) }, a.push({
224
- oldKey: d.transKey,
225
- newKey: i.transKey,
226
- name: this.$i18nt(`Dynamics.${d.transKey}`, d.displayName)
227
- }), Object.assign({ ...d }, i)) : d);
228
- else if (["textSearch"].includes(e.type))
229
- i = { placeholderTransKey: this.regenerateKey(e.options.placeholderTransKey, "placeholder") }, a.push({
230
- oldKey: e.options.placeholderTransKey,
231
- newKey: i.placeholderTransKey,
232
- name: this.$i18nt(`Dynamics.${e.options.placeholderTransKey}`, e.options.placeholder)
233
- }), e.options = Object.assign({ ...e.options }, i);
234
- else if (["divider", "textContent", "tag", "link", "card", "approval", "approvalHistory", "auditLog"].includes(e.type)) {
235
- i = { transKey: this.regenerateKey(e.options.transKey, e.type) };
236
- const d = ["card"].includes(e.type) ? e.options.header : ["approval", "approvalHistory", "auditLog"].includes(e.type) ? e.label : e.options.title;
237
- a.push({
238
- oldKey: e.options.transKey,
239
- newKey: i.transKey,
240
- name: this.$i18nt(`Dynamics.${e.options.transKey}`, d)
241
- }), e.options = Object.assign({ ...e.options }, i);
242
- } else
243
- ["statistic"].includes(e.type) ? (e.options = Object.assign(e.options, {
244
- titlePrefix: e.options.titlePrefix ? e.options.titlePrefix : {
245
- name: "",
246
- transKey: null,
247
- type: "text",
248
- icon: "",
249
- open: !1,
250
- color: "#333",
251
- fontSize: "14",
252
- fontWeight: "normal"
253
- },
254
- titleSuffix: e.options.titlePrefix ? e.options.titlePrefix : {
255
- name: "",
256
- transKey: null,
257
- type: "text",
258
- icon: "",
259
- open: !1,
260
- color: "#333",
261
- fontSize: "14",
262
- fontWeight: "normal"
263
- }
264
- }), i = {
265
- transKey: this.regenerateKey(e.options.transKey, e.type),
266
- prefixTransKey: this.regenerateKey(e.options.titlePrefix.transKey, "prefix"),
267
- suffixTransKey: this.regenerateKey(e.options.titleSuffix.transKey, "suffix")
268
- }, a = a.concat([
269
- {
270
- oldKey: e.options.transKey,
271
- newKey: i.transKey,
272
- name: this.$i18nt(`Dynamics.${e.options.transKey}`, e.options.statisticTitle)
273
- },
274
- {
275
- oldKey: e.options.titlePrefix.transKey,
276
- newKey: i.prefixTransKey,
277
- name: this.$i18nt(`Dynamics.${e.options.titlePrefix.transKey}`, e.options.titlePrefix.name)
278
- },
279
- {
280
- oldKey: e.options.titleSuffix.transKey,
281
- newKey: i.suffixTransKey,
282
- name: this.$i18nt(`Dynamics.${e.options.titleSuffix.transKey}`, e.options.titleSuffix.name)
283
- }
284
- ]), e.options = Object.assign(
285
- { ...e.options },
286
- {
287
- transKey: i.transKey,
288
- titlePrefix: Object.assign(
289
- { ...e.titlePrefix },
290
- {
291
- transKey: i.prefixTransKey
292
- }
293
- ),
294
- titleSuffix: Object.assign(
295
- { ...e.titleSuffix },
296
- {
297
- transKey: i.suffixTransKey
298
- }
299
- )
300
- }
301
- )) : [
302
- "input",
303
- "textarea",
304
- "editor",
305
- "inputNumber",
306
- "switch",
307
- "radio",
308
- "checkbox",
309
- "select",
310
- "selectMultiple",
311
- "uploadImg",
312
- "uploadFile",
313
- "datePicker",
314
- "timePicker"
315
- ].includes(e.type) && (i = {
316
- transKey: this.regenerateKey(e.options.transKey, e.type),
317
- placeholderTransKey: this.regenerateKey(e.options.placeholderTransKey, "placeholder")
318
- }, a = a.concat([
319
- {
320
- oldKey: e.options.transKey,
321
- newKey: i.transKey,
322
- name: this.$i18nt(`Dynamics.${e.options.transKey}`, e.label)
323
- },
324
- {
325
- oldKey: e.options.placeholderTransKey,
326
- newKey: i.placeholderTransKey,
327
- name: this.$i18nt(`Dynamics.${e.options.placeholderTransKey}`, e.options.placeholder)
328
- }
329
- ]), e.options = Object.assign({ ...e.options }, i));
330
- return ["grid", "tabs", "collapse", "drawer", "dialog"].includes(e.type) ? e.columns.forEach((d, y) => {
331
- ["collapse", "tabs"].includes(e.type) && (i = { transKey: this.regenerateKey(d.transKey, `${e.type}item`) }, a.push({
332
- oldKey: d.transKey,
333
- newKey: i.transKey,
334
- name: this.$i18nt(`Dynamics.${d.transKey}`, d.label)
335
- }), e.columns[y].transKey = i.transKey), d.transKey && r.push(d.transKey), d.list = p(d.list);
336
- }) : ["card", "batch", "form", "containerPanel", "drawerContainer", "flexLayout", "dataList"].includes(e.type) ? e.list = p(e.list) : e.type === "table" && e.trs.forEach((d) => {
337
- d.tds.forEach((y) => {
338
- y.list = p(y.list);
339
- });
340
- }), !0;
341
- }), o);
342
- t.list = await p(t.list);
343
- let l = {
344
- name: s.name,
345
- displayName: s.displayName,
346
- type: s.type,
347
- explain: s.explain,
348
- sysCodeGenId: this.detail.syscodegenid,
349
- changeName: this.detail.changename,
350
- changeWeb: this.detail.changeweb,
351
- initName: this.detail.initname,
352
- initWeb: this.detail.initweb,
353
- width: this.detail.width,
354
- formConfig: JSON.stringify(
355
- Object.assign(t, {
356
- addTransKey: [],
357
- allTransKey: r
358
- })
359
- ),
360
- businessConfig: this.detail.businessconfig
361
- };
362
- this.contentTransKey = a, this.spinning = !0, this.confirmLoading = !0, m(l).then((o) => {
363
- o.success ? (this.menusId = o.data, this.batchAddTransKey()) : (this.spinning = !1, this.confirmLoading = !1, this.$message.error(this.$i18nt("gd.https.addFail", "\u64CD\u4F5C\u5931\u8D25") + o.message));
364
- });
365
- },
366
- async subContentTransKey(s, t) {
367
- const a = (i) => (i = i.filter((n, p) => {
368
- if (["btnGroup"].includes(n.type))
369
- n.btnList = n.btnList.map((l) => {
370
- const o = t.filter((e) => e.newKey === l.transKey)[0];
371
- if (o)
372
- return Object.assign(l, { transKey: o.newKeyId });
373
- });
374
- else if (["textSearch"].includes(n.type)) {
375
- const l = t.filter((o) => o.newKey === n.options.placeholderTransKey)[0];
376
- l && (n.options = Object.assign({ ...n.options }, { placeholderTransKey: l.newKeyId }));
377
- } else if (["divider", "textContent", "tag", "link", "card", "approval", "approvalHistory", "auditLog"].includes(n.type)) {
378
- const l = t.filter((o) => o.newKey === n.options.transKey)[0];
379
- l && (n.options = Object.assign({ ...n.options }, { transKey: l.newKeyId }));
380
- } else if (["title"].includes(n.type)) {
381
- let l = {};
382
- const o = t.filter((c) => c.newKey === n.options.transKey)[0], e = t.filter((c) => c.newKey === n.options.subtransKey)[0];
383
- o && Object.assign(l, { transKey: o.newKeyId }), e && Object.assign(l, { subtransKey: o.newKeyId }), n.options = Object.assign({ ...n.options }, l);
384
- } else if (["statistic"].includes(n.type)) {
385
- let l = {
386
- transKey: n.options.transKey,
387
- prefixTransKey: n.options.titlePrefix.transKey,
388
- suffixTransKey: n.options.titleSuffix.transKey
389
- };
390
- t.filter((o) => o.newKey === l.transKey)[0], t.filter((o) => o.newKey === l.prefixTransKey)[0], t.filter((o) => o.newKey === l.suffixTransKey)[0], n.options = Object.assign(
391
- { ...n.options },
392
- {
393
- transKey: l.transKey,
394
- titlePrefix: Object.assign(
395
- { ...n.titlePrefix },
396
- {
397
- transKey: l.prefixTransKey
398
- }
399
- ),
400
- titleSuffix: Object.assign(
401
- { ...n.titleSuffix },
402
- {
403
- transKey: l.suffixTransKey
404
- }
405
- )
406
- }
407
- );
408
- } else if ([
409
- "input",
410
- "textarea",
411
- "editor",
412
- "inputNumber",
413
- "switch",
414
- "radio",
415
- "checkbox",
416
- "select",
417
- "selectMultiple",
418
- "uploadImg",
419
- "uploadFile",
420
- "datePicker",
421
- "timePicker"
422
- ].includes(n.type)) {
423
- let l = {};
424
- const o = t.filter((c) => c.newKey === n.options.transKey)[0], e = t.filter((c) => c.newKey === n.options.placeholderTransKey)[0];
425
- o && Object.assign(l, { transKey: o.newKeyId }), e && Object.assign(l, { placeholderTransKey: o.newKeyId }), n.options = Object.assign({ ...n.options }, l);
426
- }
427
- return ["grid", "tabs", "collapse", "drawer", "dialog"].includes(n.type) ? n.columns.forEach((l) => {
428
- if (["collapse", "tabs"].includes(n.type)) {
429
- const o = t.filter((e) => e.newKey === l.transKey)[0];
430
- o && (n.columns[p].transKey = o.newKeyId);
431
- }
432
- l.list = a(l.list);
433
- }) : ["card", "batch", "form", "containerPanel", "drawerContainer", "flexLayout", "dataList"].includes(n.type) && (n.list = a(n.list)), !0;
434
- }), i);
435
- await a(s.list);
436
- const r = t.filter((i) => i.newKey === s.config.prefixTransKey)[0];
437
- return Object.assign(s, {
438
- addTransKey: [],
439
- config: Object.assign(s.config, {
440
- prefixTransKey: r ? r.newKeyId : s.config.prefixTransKey
441
- })
442
- });
443
- },
444
- getAllLanguage() {
445
- T().then((s) => {
446
- s.code === 200 && (this.translationLangs = s.data);
447
- });
448
- },
449
- regenerateKeyId(s) {
450
- let t = this.prefixKey.split("_"), a = u(t[0], "0"), r = u(t[0], this.menusId);
451
- return s.replace(a, r);
452
- },
453
- async batchAddTransKey() {
454
- let s = this.contentTransKey.filter((r) => r.oldKey && !r.oldKey.startsWith("gd."));
455
- if (s.length === 0) {
456
- this.$message.success(this.$i18nt("gd.https.addSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.handleCancel(), this.spinning = !1, this.confirmLoading = !1;
457
- return;
458
- }
459
- s = s.map((r) => Object.assign(r, {
460
- newKeyId: this.regenerateKeyId(r.newKey)
461
- }));
462
- let t = await this.sysMenuDetail();
463
- const a = await this.subContentTransKey(
464
- t.formconfig ? JSON.parse(t.formconfig) : {
465
- list: [],
466
- addTransKey: []
467
- },
468
- s
469
- );
470
- Promise.all([this.addTranslationKey(s), this.editFormDetail(Object.assign(t, { formconfig: JSON.stringify(a) }))]).then((r) => {
471
- this.$message.success(this.$i18nt("gd.https.addSucc", "\u64CD\u4F5C\u6210\u529F")), this.$emit("ok"), this.handleCancel(), this.spinning = !1, this.confirmLoading = !1;
472
- });
473
- },
474
- editFormDetail(s) {
475
- return w(s).then((t) => t);
476
- },
477
- sysMenuDetail() {
478
- return h({ id: this.menusId }).then((s) => s.data);
479
- },
480
- addTranslationKey(s) {
481
- let t = [];
482
- return s.forEach((a) => {
483
- t.push(this.batchAddTranslation(a));
484
- }), D(t).then((a) => a);
485
- },
486
- batchAddTranslation(s) {
487
- let t = [];
488
- return this.translationLangs.forEach((a) => {
489
- const r = translateLanguageName(a.languagecode, `Dynamics.${s.oldKey}`, s.name);
490
- t.push(
491
- Object.assign(
492
- { ...a },
493
- {
494
- description: r
495
- }
496
- )
497
- );
498
- }), {
499
- defaulttext: s.name,
500
- hintcatalogid: "",
501
- name: s.newKeyId,
502
- type: "3",
503
- langs: t
504
- };
505
- },
506
- getAllTableData() {
507
- if (this.tableLists.length > 0) {
508
- this.allTableData = [...this.tableLists];
509
- return;
510
- }
511
- $({
512
- busName: ""
513
- }).then((s) => {
514
- s.success && (this.allTableData = [...s.data]);
515
- });
516
- },
517
- addTranslation(s) {
518
- return sysTranslationAdd(s).then((t) => t);
519
- },
520
- handleCancel() {
521
- this.visible = !1, this.$refs.ruleForm.resetFields();
522
- },
523
- getDictionary(s) {
524
- return this.$options.filters.dictData(s);
525
- },
526
- doEvent(s) {
527
- let t = s.item.functionName;
528
- this[t] && this[t]();
529
- }
530
- },
531
- created() {
532
- this.getAllTableData();
533
- }
534
- };
535
- var F = function() {
536
- var t = this, a = t._self._c;
537
- return a("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: t.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: t.fullscreen, visible: t.visible, width: t.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(r) {
538
- t.visible = r;
539
- }, closed: t.handleCancel } }, [a("gd-modal-title", { attrs: { slot: "title", title: t.$i18nt("gd.btn.copy"), fullscreen: t.fullscreen, buttons: t.sysViewButtons, confirmLoading: t.confirmLoading, showClose: !0, emitFun: !0 }, on: { changeEvent: t.doEvent, toggleFullscreen: t.togglefullscreen, close: t.handleCancel }, slot: "title" }), a("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.spinning, expression: "spinning" }] }, [a("div", { class: t.fullscreen ? "modal-bodyq" : "modal-body" }, [a("el-form", { ref: "ruleForm", attrs: { "label-width": "110px", "label-position": "right", model: t.ruleFormData }, nativeOn: { submit: function(r) {
540
- r.preventDefault();
541
- } } }, [a("el-row", { attrs: { gutter: 24 } }, [a("el-col", { attrs: { span: 24 } }, [a("el-form-item", { staticStyle: { "margin-bottom": "0px" }, attrs: { label: t.$i18nt("gd.view.displayName"), prop: "displayName", rules: [{ required: !0, message: t.$i18nt("gd.placeholder.input") }] } }, [a("el-input", { attrs: { placeholder: t.$i18nt("gd.placeholder.input"), clearable: "" }, model: { value: t.ruleFormData.displayName, callback: function(r) {
542
- t.$set(t.ruleFormData, "displayName", r);
543
- }, expression: "ruleFormData.displayName" } })], 1)], 1), a("el-col", { attrs: { span: 24 } }, [a("el-form-item", { staticStyle: { "margin-bottom": "0px" }, attrs: { label: t.type == 1 ? t.$i18nt("gd.view.viewName") : t.$i18nt("gd.form.formName"), prop: "name", rules: [
544
- { required: !0, message: t.$i18nt("gd.placeholder.input") },
545
- { pattern: /^[a-zA-Z]+$/, message: t.$i18nt("gd.view.viewNameTip") }
546
- ] } }, [a("el-input", { attrs: { placeholder: t.$i18nt("gd.placeholder.input"), clearable: "" }, model: { value: t.ruleFormData.name, callback: function(r) {
547
- t.$set(t.ruleFormData, "name", r);
548
- }, expression: "ruleFormData.name" } })], 1)], 1), t.type == 1 ? a("el-col", { attrs: { span: 24 } }, [a("el-form-item", { staticStyle: { "margin-bottom": "0px" }, attrs: { label: t.$i18nt("gd.view.type"), prop: "type", rules: [{ required: !0, message: t.$i18nt("gd.placeholder.select") }] } }, [a("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: t.$i18nt("gd.placeholder.select"), clearable: "" }, model: { value: t.ruleFormData.type, callback: function(r) {
549
- t.$set(t.ruleFormData, "type", r);
550
- }, expression: "ruleFormData.type" } }, t._l(t.getDictionary("view_type"), function(r, i) {
551
- return a("el-option", { key: i, attrs: { value: r.code, label: r.name } });
552
- }), 1)], 1)], 1) : t._e(), t.type == 2 ? a("el-col", { attrs: { span: 24 } }, [a("el-form-item", { staticStyle: { "margin-bottom": "0px" }, attrs: { label: t.$i18nt("gd.form.type"), prop: "type", rules: [{ required: !0, message: t.$i18nt("gd.placeholder.select") }] } }, [a("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: t.$i18nt("gd.placeholder.select"), clearable: "", disabled: "" }, model: { value: t.ruleFormData.type, callback: function(r) {
553
- t.$set(t.ruleFormData, "type", r);
554
- }, expression: "ruleFormData.type" } }, t._l(t.getDictionary("table_form_type"), function(r, i) {
555
- return a("el-option", { key: i, attrs: { value: r.code, label: r.name } });
556
- }), 1)], 1)], 1) : t._e(), a("el-col", { attrs: { span: 24 } }, [a("el-form-item", { staticStyle: { "margin-bottom": "0px" }, attrs: { label: t.$i18nt("gd.view.explain") } }, [a("el-input", { attrs: { type: "textarea" }, model: { value: t.ruleFormData.explain, callback: function(r) {
557
- t.$set(t.ruleFormData, "explain", r);
558
- }, expression: "ruleFormData.explain" } })], 1)], 1)], 1)], 1)], 1)])], 1);
559
- }, j = [], S = /* @__PURE__ */ K(
560
- v,
561
- F,
562
- j,
563
- !1,
564
- null,
565
- "5cfc95b1",
566
- null,
567
- null
568
- );
569
- const P = S.exports;
570
- export {
571
- P as default
572
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./components.chartbi.13a8a7b5.js"),f=require("./http.tabledevelopment.a880bb76.js"),K=require("./http.codegeneratemanage.e3db2f09.js"),y=require("./utils.util.js.c0ba699b.js"),h=require("./http.translationmanage.1f9dce46.js");require("./utils.echarts.js.461a74e7.js");const b={props:{type:{type:[String,Number],default:1},prefixKey:{type:String,default:""},suffixKey:{type:String,default:""}},data(){return{sysViewButtons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],visible:!1,confirmLoading:!1,spinning:!1,loadData:[],viewData:[],formData:[],detail:null,record:null,fullscreen:!1,width:"600px",arrTransKey:[],allTableData:[],langsAll:[],httpNumbe:0,ruleFormData:{},pattern:"/^[a-zA-Z]+$/",contentTransKey:[],translationLangs:[],menusId:""}},computed:{modalStyle(){return this.fullscreen?{width:"100%",dialogStyle:{top:"0px"}}:{width:this.width,dialogStyle:{top:"80px"}}},...g.mapGetters(["tableLists"])},methods:{togglefullscreen(){this.fullscreen=!this.fullscreen},open(s){this.httpNumbe=0,this.fullscreen=!1,this.record=s,this.visible=!0,this.spinning=!0,this.type==1?this.getViewDetail():this.getFormDetail()},getViewDetail(){return f.sysViewDetails({id:this.record}).then(s=>(s.success?(this.detail=Object.assign(s.data,{viewname:s.data.viewname+y.uuid(2,!1,!1)}),this.spinning=!1,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData={name:this.detail.viewname,displayName:this.detail.name,type:String(this.detail.type),explain:this.detail.explain}},0)})):this.$message.error(s.message),s.data))},getFormDetail(){return f.sysFormDetails({id:this.record}).then(s=>(s.success?(this.detail=Object.assign(s.data,{name:s.data.name+y.uuid(2,!1,!1)}),this.spinning=!1,this.$nextTick(()=>{setTimeout(()=>{this.ruleFormData={name:this.detail.name,displayName:this.detail.displayname,type:"4",explain:this.detail.explain}},0)})):this.$message.error(s.message),s.data))},handleSubmit(){this.$refs.ruleForm.validate(s=>{s&&(this.type==1?this.addView(this.ruleFormData):(this.spinning=!0,this.confirmLoading=!0,this.addForm(this.ruleFormData)))})},addView(s){let e=[],a=[];this.detail.sysviewfields.forEach((i,n)=>{let c={name:i.name,width:i.width,order:n,type:i.type,fieldId:i.fieldid,joinTableId:i.jointableid,joinFieldId:i.joinfieldid,orderConfig:i.orderconfig,gatherConfig:i.gatherconfig,maxTagCount:i.maxtagcount,align:i.align?i.align:"left&1&none&none"};e.push(c)}),this.detail.sysviewqueries.forEach((i,n)=>{if(i.field){let c={queryType:i.querytype,name:i.field.columncomment,fieldId:i.fieldid,joinTableId:i.jointableid,joinFieldId:i.joinfieldid,order:n,displayStyle:i.displaystyle,options:i.options};a.push(c)}});let r={syscodegenid:this.detail.syscodegenid,name:s.displayName,type:s.type,explain:s.explain,frozenColumn:this.detail.frozencolumn,isDefault:0,viewName:s.name,order:this.detail.order,sysViewFields:e,filterConfig:this.detail.filterconfig,sysViewQueries:a,defaultSort:this.detail.defaultsort,viewTree:this.detail.viewtree,isViewTree:this.detail.isviewtree,ruleConfig:this.detail.ruleconfig,buttonRule:this.detail.buttonrule};this.spinning=!0,this.confirmLoading=!0,f.sysViewAdd(r).then(i=>{i.success?(this.$message.success(this.$i18nt("gd.https.addSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.handleCancel()):this.$message.error(this.$i18nt("gd.https.addFail","\u64CD\u4F5C\u5931\u8D25")+i.message),this.spinning=!1,this.confirmLoading=!1})},regenerateKey(s,e){if(!s||s.startsWith("gd."))return s;let a=this.prefixKey.split("_"),r=y.prefixTransKey(a[0],"0");const i=s.replace(this.suffixKey,""),n=i.substr(i.lastIndexOf("_")+1).toLowerCase();let c=`${r}${e.toLowerCase()}_${n}${y.uuid(2)}${this.suffixKey}`;return n.length>18&&(c=`${r}${e.toLowerCase()}_${y.uuid(8)}${this.suffixKey}`),c},async addForm(s){let e=JSON.parse(this.detail.formconfig),a=[],r=[],i={},n={titlePrefix:"",prefixTransKey:null};if(e.config.options&&e.config.options.prefixTransKey){const o=this.$i18nt(`Dynamics.${e.config.options.prefixTransKey}`,e.config.options.titlePrefix);i={transKey:this.regenerateKey(item.transKey,"prefix")},Object.assign({titlePrefix:o,prefixTransKey:i.transKey}),a=a.concat([{oldKey:item.transKey,newKey:i.transKey,name:o}])}e.config=Object.assign({...e.config},{name:s.name,displayName:s.displayName,type:s.type,explain:s.explain,transKey:null,titlePrefix:n.titlePrefix,prefixTransKey:n.prefixTransKey});const c=o=>(o=o.filter((t,p)=>{if(t.langs!==void 0&&delete t.langs,t.options)for(let d in t.options)["transKey","subtransKey","suffixTransKey","prefixTransKey","placeholderTransKey"].includes(d)&&t.options[d]&&!t.options[d].startsWith("gd.")&&r.push(t.options[d]);if(["title"].includes(t.type))i={transKey:this.regenerateKey(t.options.transKey,t.type),subtransKey:this.regenerateKey(t.options.subtransKey,"describe")},a=a.concat([{oldKey:t.options.transKey,newKey:i.transKey,name:this.$i18nt(`Dynamics.${t.options.transKey}`,t.options.title)},{oldKey:t.options.subtransKey,newKey:i.subtransKey,name:this.$i18nt(`Dynamics.${t.options.subtransKey}`,t.options.subtitle)}]),t.options=Object.assign({...t.options},i);else if(["btnGroup"].includes(t.type))t.btnList=t.btnList.map(d=>d.transKey&&!d.transKey.startsWith("gd.")?(i={transKey:this.regenerateKey(d.transKey,t.type)},a.push({oldKey:d.transKey,newKey:i.transKey,name:this.$i18nt(`Dynamics.${d.transKey}`,d.displayName)}),Object.assign({...d},i)):d);else if(["textSearch"].includes(t.type))i={placeholderTransKey:this.regenerateKey(t.options.placeholderTransKey,"placeholder")},a.push({oldKey:t.options.placeholderTransKey,newKey:i.placeholderTransKey,name:this.$i18nt(`Dynamics.${t.options.placeholderTransKey}`,t.options.placeholder)}),t.options=Object.assign({...t.options},i);else if(["divider","textContent","tag","link","card","approval","approvalHistory","auditLog"].includes(t.type)){i={transKey:this.regenerateKey(t.options.transKey,t.type)};const d=["card"].includes(t.type)?t.options.header:["approval","approvalHistory","auditLog"].includes(t.type)?t.label:t.options.title;a.push({oldKey:t.options.transKey,newKey:i.transKey,name:this.$i18nt(`Dynamics.${t.options.transKey}`,d)}),t.options=Object.assign({...t.options},i)}else["statistic"].includes(t.type)?(t.options=Object.assign(t.options,{titlePrefix:t.options.titlePrefix?t.options.titlePrefix:{name:"",transKey:null,type:"text",icon:"",open:!1,color:"#333",fontSize:"14",fontWeight:"normal"},titleSuffix:t.options.titlePrefix?t.options.titlePrefix:{name:"",transKey:null,type:"text",icon:"",open:!1,color:"#333",fontSize:"14",fontWeight:"normal"}}),i={transKey:this.regenerateKey(t.options.transKey,t.type),prefixTransKey:this.regenerateKey(t.options.titlePrefix.transKey,"prefix"),suffixTransKey:this.regenerateKey(t.options.titleSuffix.transKey,"suffix")},a=a.concat([{oldKey:t.options.transKey,newKey:i.transKey,name:this.$i18nt(`Dynamics.${t.options.transKey}`,t.options.statisticTitle)},{oldKey:t.options.titlePrefix.transKey,newKey:i.prefixTransKey,name:this.$i18nt(`Dynamics.${t.options.titlePrefix.transKey}`,t.options.titlePrefix.name)},{oldKey:t.options.titleSuffix.transKey,newKey:i.suffixTransKey,name:this.$i18nt(`Dynamics.${t.options.titleSuffix.transKey}`,t.options.titleSuffix.name)}]),t.options=Object.assign({...t.options},{transKey:i.transKey,titlePrefix:Object.assign({...t.titlePrefix},{transKey:i.prefixTransKey}),titleSuffix:Object.assign({...t.titleSuffix},{transKey:i.suffixTransKey})})):["input","textarea","editor","inputNumber","switch","radio","checkbox","select","selectMultiple","uploadImg","uploadFile","datePicker","timePicker"].includes(t.type)&&(i={transKey:this.regenerateKey(t.options.transKey,t.type),placeholderTransKey:this.regenerateKey(t.options.placeholderTransKey,"placeholder")},a=a.concat([{oldKey:t.options.transKey,newKey:i.transKey,name:this.$i18nt(`Dynamics.${t.options.transKey}`,t.label)},{oldKey:t.options.placeholderTransKey,newKey:i.placeholderTransKey,name:this.$i18nt(`Dynamics.${t.options.placeholderTransKey}`,t.options.placeholder)}]),t.options=Object.assign({...t.options},i));return["grid","tabs","collapse","drawer","dialog"].includes(t.type)?t.columns.forEach((d,u)=>{["collapse","tabs"].includes(t.type)&&(i={transKey:this.regenerateKey(d.transKey,`${t.type}item`)},a.push({oldKey:d.transKey,newKey:i.transKey,name:this.$i18nt(`Dynamics.${d.transKey}`,d.label)}),t.columns[u].transKey=i.transKey),d.transKey&&r.push(d.transKey),d.list=c(d.list)}):["card","batch","form","containerPanel","drawerContainer","flexLayout","dataList"].includes(t.type)?t.list=c(t.list):t.type==="table"&&t.trs.forEach(d=>{d.tds.forEach(u=>{u.list=c(u.list)})}),!0}),o);e.list=await c(e.list);let l={name:s.name,displayName:s.displayName,type:s.type,explain:s.explain,sysCodeGenId:this.detail.syscodegenid,changeName:this.detail.changename,changeWeb:this.detail.changeweb,initName:this.detail.initname,initWeb:this.detail.initweb,width:this.detail.width,formConfig:JSON.stringify(Object.assign(e,{addTransKey:[],allTransKey:r})),businessConfig:this.detail.businessconfig};this.contentTransKey=a,this.spinning=!0,this.confirmLoading=!0,f.sysFormAdd(l).then(o=>{o.success?(this.menusId=o.data,this.batchAddTransKey()):(this.spinning=!1,this.confirmLoading=!1,this.$message.error(this.$i18nt("gd.https.addFail","\u64CD\u4F5C\u5931\u8D25")+o.message))})},async subContentTransKey(s,e){const a=i=>(i=i.filter((n,c)=>{if(["btnGroup"].includes(n.type))n.btnList=n.btnList.map(l=>{const o=e.filter(t=>t.newKey===l.transKey)[0];if(o)return Object.assign(l,{transKey:o.newKeyId})});else if(["textSearch"].includes(n.type)){const l=e.filter(o=>o.newKey===n.options.placeholderTransKey)[0];l&&(n.options=Object.assign({...n.options},{placeholderTransKey:l.newKeyId}))}else if(["divider","textContent","tag","link","card","approval","approvalHistory","auditLog"].includes(n.type)){const l=e.filter(o=>o.newKey===n.options.transKey)[0];l&&(n.options=Object.assign({...n.options},{transKey:l.newKeyId}))}else if(["title"].includes(n.type)){let l={};const o=e.filter(p=>p.newKey===n.options.transKey)[0],t=e.filter(p=>p.newKey===n.options.subtransKey)[0];o&&Object.assign(l,{transKey:o.newKeyId}),t&&Object.assign(l,{subtransKey:o.newKeyId}),n.options=Object.assign({...n.options},l)}else if(["statistic"].includes(n.type)){let l={transKey:n.options.transKey,prefixTransKey:n.options.titlePrefix.transKey,suffixTransKey:n.options.titleSuffix.transKey};e.filter(o=>o.newKey===l.transKey)[0],e.filter(o=>o.newKey===l.prefixTransKey)[0],e.filter(o=>o.newKey===l.suffixTransKey)[0],n.options=Object.assign({...n.options},{transKey:l.transKey,titlePrefix:Object.assign({...n.titlePrefix},{transKey:l.prefixTransKey}),titleSuffix:Object.assign({...n.titleSuffix},{transKey:l.suffixTransKey})})}else if(["input","textarea","editor","inputNumber","switch","radio","checkbox","select","selectMultiple","uploadImg","uploadFile","datePicker","timePicker"].includes(n.type)){let l={};const o=e.filter(p=>p.newKey===n.options.transKey)[0],t=e.filter(p=>p.newKey===n.options.placeholderTransKey)[0];o&&Object.assign(l,{transKey:o.newKeyId}),t&&Object.assign(l,{placeholderTransKey:o.newKeyId}),n.options=Object.assign({...n.options},l)}return["grid","tabs","collapse","drawer","dialog"].includes(n.type)?n.columns.forEach(l=>{if(["collapse","tabs"].includes(n.type)){const o=e.filter(t=>t.newKey===l.transKey)[0];o&&(n.columns[c].transKey=o.newKeyId)}l.list=a(l.list)}):["card","batch","form","containerPanel","drawerContainer","flexLayout","dataList"].includes(n.type)&&(n.list=a(n.list)),!0}),i);await a(s.list);const r=e.filter(i=>i.newKey===s.config.prefixTransKey)[0];return Object.assign(s,{addTransKey:[],config:Object.assign(s.config,{prefixTransKey:r?r.newKeyId:s.config.prefixTransKey})})},getAllLanguage(){h.GetAllLanguage().then(s=>{s.code===200&&(this.translationLangs=s.data)})},regenerateKeyId(s){let e=this.prefixKey.split("_"),a=y.prefixTransKey(e[0],"0"),r=y.prefixTransKey(e[0],this.menusId);return s.replace(a,r)},async batchAddTransKey(){let s=this.contentTransKey.filter(r=>r.oldKey&&!r.oldKey.startsWith("gd."));if(s.length===0){this.$message.success(this.$i18nt("gd.https.addSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.handleCancel(),this.spinning=!1,this.confirmLoading=!1;return}s=s.map(r=>Object.assign(r,{newKeyId:this.regenerateKeyId(r.newKey)}));let e=await this.sysMenuDetail();const a=await this.subContentTransKey(e.formconfig?JSON.parse(e.formconfig):{list:[],addTransKey:[]},s);Promise.all([this.addTranslationKey(s),this.editFormDetail(Object.assign(e,{formconfig:JSON.stringify(a)}))]).then(r=>{this.$message.success(this.$i18nt("gd.https.addSucc","\u64CD\u4F5C\u6210\u529F")),this.$emit("ok"),this.handleCancel(),this.spinning=!1,this.confirmLoading=!1})},editFormDetail(s){return f.sysFormEdit(s).then(e=>e)},sysMenuDetail(){return f.sysFormDetails({id:this.menusId}).then(s=>s.data)},addTranslationKey(s){let e=[];return s.forEach(a=>{e.push(this.batchAddTranslation(a))}),h.sysTranslationBatchAdd(e).then(a=>a)},batchAddTranslation(s){let e=[];return this.translationLangs.forEach(a=>{const r=translateLanguageName(a.languagecode,`Dynamics.${s.oldKey}`,s.name);e.push(Object.assign({...a},{description:r}))}),{defaulttext:s.name,hintcatalogid:"",name:s.newKeyId,type:"3",langs:e}},getAllTableData(){if(this.tableLists.length>0){this.allTableData=[...this.tableLists];return}K.codeGenerateInformationList({busName:""}).then(s=>{s.success&&(this.allTableData=[...s.data])})},addTranslation(s){return sysTranslationAdd(s).then(e=>e)},handleCancel(){this.visible=!1,this.$refs.ruleForm.resetFields()},getDictionary(s){return this.$options.filters.dictData(s)},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}},created(){this.getAllTableData()}};var x=function(){var e=this,a=e._self._c;return a("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(r){e.visible=r},closed:e.handleCancel}},[a("gd-modal-title",{attrs:{slot:"title",title:e.$i18nt("gd.btn.copy"),fullscreen:e.fullscreen,buttons:e.sysViewButtons,confirmLoading:e.confirmLoading,showClose:!0,emitFun:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.togglefullscreen,close:e.handleCancel},slot:"title"}),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.spinning,expression:"spinning"}]},[a("div",{class:e.fullscreen?"modal-bodyq":"modal-body"},[a("el-form",{ref:"ruleForm",attrs:{"label-width":"110px","label-position":"right",model:e.ruleFormData},nativeOn:{submit:function(r){r.preventDefault()}}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:e.$i18nt("gd.view.displayName"),prop:"displayName",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input")}]}},[a("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input"),clearable:""},model:{value:e.ruleFormData.displayName,callback:function(r){e.$set(e.ruleFormData,"displayName",r)},expression:"ruleFormData.displayName"}})],1)],1),a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:e.type==1?e.$i18nt("gd.view.viewName"):e.$i18nt("gd.form.formName"),prop:"name",rules:[{required:!0,message:e.$i18nt("gd.placeholder.input")},{pattern:/^[a-zA-Z]+$/,message:e.$i18nt("gd.view.viewNameTip")}]}},[a("el-input",{attrs:{placeholder:e.$i18nt("gd.placeholder.input"),clearable:""},model:{value:e.ruleFormData.name,callback:function(r){e.$set(e.ruleFormData,"name",r)},expression:"ruleFormData.name"}})],1)],1),e.type==1?a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:e.$i18nt("gd.view.type"),prop:"type",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select")}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:""},model:{value:e.ruleFormData.type,callback:function(r){e.$set(e.ruleFormData,"type",r)},expression:"ruleFormData.type"}},e._l(e.getDictionary("view_type"),function(r,i){return a("el-option",{key:i,attrs:{value:r.code,label:r.name}})}),1)],1)],1):e._e(),e.type==2?a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:e.$i18nt("gd.form.type"),prop:"type",rules:[{required:!0,message:e.$i18nt("gd.placeholder.select")}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select"),clearable:"",disabled:""},model:{value:e.ruleFormData.type,callback:function(r){e.$set(e.ruleFormData,"type",r)},expression:"ruleFormData.type"}},e._l(e.getDictionary("table_form_type"),function(r,i){return a("el-option",{key:i,attrs:{value:r.code,label:r.name}})}),1)],1)],1):e._e(),a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"0px"},attrs:{label:e.$i18nt("gd.view.explain")}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.ruleFormData.explain,callback:function(r){e.$set(e.ruleFormData,"explain",r)},expression:"ruleFormData.explain"}})],1)],1)],1)],1)],1)])],1)},m=[],w=g.normalizeComponent(b,x,m,!1,null,"5cfc95b1",null,null);const T=w.exports;exports.default=T;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./http.filedocument.6fdfc693.js"),p=require("./components.uploadfile.586aca36.js"),l=require("./index.07adebf0.js"),d=require("./components.chartbi.13a8a7b5.js");require("./http.filemanage.7e6e3e1a.js");require("./utils.util.js.c0ba699b.js");require("./router.config.a09f29e7.js");require("./layouts.2030bf01.js");require("vue");require("./components.sidenavmenu.1f0bbfca.js");require("./http.loginmanage.326984c3.js");require("./http.main.2f8a6936.js");require("./http.noticemanage.2507d094.js");require("./components.globalheader.5418b5ec.js");require("./components.multitab.92eb4b1e.js");require("./components.sidemenu.cd6d0301.js");require("./system.account.93ad722e.js");require("./http.usermanage.6dcbc7de.js");require("./http.languagemanage.e2c098ec.js");require("./http.currencymanage.37ab5ced.js");require("./http.timezonemanage.e0aa212f.js");require("./components.settingdrawer.4581f5b1.js");require("./http.appmanage.b998818f.js");require("./http.menumanage.6d740f2c.js");require("./system.welcome.d86a3cdb.js");require("./flow.designer.85d0054b.js");require("./http.syscodegenerateconfigmanage.840f1136.js");require("./http.codegeneratemanage.e3db2f09.js");require("./http.useraffiliation.af2013ad.js");require("./components.xlsximport.c53c50f6.js");require("./components.table.d016f609.js");require("./utils.datepicker.js.0a5a699e.js");require("./components.form.14ed3374.js");require("./http.tabledevelopment.a880bb76.js");require("./http.promptmanagement.d115c4b0.js");require("./utils.plug.js.f62510ce.js");require("./components.coloreditor.8afc4731.js");require("./page.designer.page.654634aa.js");require("./page.designer.componentstree.74a3a114.js");require("./mobile.designer.componentstree.365945a3.js");require("./page.designer.fieldfiltering.f2d1b6e4.js");require("./components.iconselector.4b5b7901.js");require("./utils.echarts.js.461a74e7.js");require("./table.definition..echartsconfig.4310b5a2.js");require("./utils.mixins.js.750ca50e.js");require("./personal.echarts.e5915542.js");require("./components.teamsharing.efe58448.js");require("./store.config.556bd56b.js");require("./form.build.19f0c882.js");require("./components.viewformdetails.328c8642.js");require("./system.notice.2090c130.js");require("./http.orgmanage.5162fd7a.js");require("./http.rolemanage.4d1101dd.js");require("./http.sysapps.469d47f7.js");require("./components.tablevirtual.879ff28f.js");require("./components.tableumy.aa73378d.js");require("./components.tooltip.edf8e4ca.js");require("./components.selecttree.ce4fbb44.js");require("./components.imgpreview.5fe318f7.js");require("./components.modaltitle.d7ef34cb.js");require("./components.dataassign.59a87bfd.js");require("./components.middleware.64b6a988.js");require("./components.echarts.5dea23f6.js");require("./components.viewloading.5b9c8fee.js");require("./components.exception.b4ddeaba.js");require("./components.uploadimg.2324089d.js");require("./components.lunccalendar.f18b2da3.js");require("./components.watermark.af8b5718.js");require("./system.org.f6d58d0f.js");require("./system.pos.71f3eba7.js");require("./http.posmanage.c0f80aec.js");require("./system.dict.ab148847.js");require("./http.dictmanage.3dc07b5d.js");require("./http.dictdatamanage.70545d8a.js");require("./system.user.475d7391.js");require("./system.role.321c48d3.js");require("./system.log.9d394678.js");require("./http.logmanage.1e12a9bd.js");require("./system.machine.d33b0b6e.js");require("./http.machinemanage.29d72a65.js");require("./system.onlineuser.e74f010d.js");require("./http.onlineusermanage.3893f897.js");require("./system.config.9520e7f9.js");require("./http.configmanage.6cfb8ae7.js");require("./system.noticereceived.0b79642e.js");require("./http.noticereceivedmanage.e8ec9c9d.js");require("./system.webresource.81cfa690.js");require("./http.webresource.7c01b9cd.js");require("./system.fieldsecurity.40b4f48a.js");require("./system.file.6a6bd77c.js");require("./system.timers.51bedf97.js");require("./http.timersmanage.6e894942.js");require("./http.solution.c6b2634f.js");require("./http.translationmanage.1f9dce46.js");require("./page.designer.operation.1d435e6e.js");require("./page.build.7ac1ee9b.js");require("./form.designer.build.2bcc355d.js");require("./http.duplicatechecking.ee5c414c.js");require("./view.build.5789a6eb.js");require("./table.definition..btnconfig.add3d840.js");require("./flow.list.e001d91a.js");require("./solution.dict.1d5195d0.js");require("./solution.processflow.aa1e808b.js");require("./solution.workflow.0ed2cb24.js");require("./solution.approvalflow.79da028c.js");require("./solution.webresources.bc00603d.js");require("./solution.plugin.5d6d29cf.js");require("./http.pluginmanage.6a876040.js");require("./system.plugin.a0f25733.js");require("./solution.role.2eff83a1.js");require("./solution.application.8d6c84e8.js");require("./solution.applicationmenu.c6cd2b59.js");require("./solution.menu.fa48a7e8.js");require("./page.designer.menutree.71c18258.js");require("./system.translation.c9f1b505.js");require("./system.duplicatechecking.a217fc52.js");require("./system.promptmanagement.9718aa24.js");require("./system.useraffiliation.fe1e1d39.js");require("./system.email.1db14214.js");require("./http.emailmanage.1ddaa8b5.js");require("./system.permissions.fdb64929.js");require("./system.datasource.76c0ccdb.js");require("./http.datasource.294b01e2.js");require("./system.sumberrules.6e8d208e.js");require("./http.sumberrules.0b68ce6d.js");require("./system.team.cf1c1558.js");require("./http.team.e45400d5.js");require("./system.teammembers.63f21557.js");require("./system.document.0e46ff8c.js");require("./mobile.designer.menutree.4d4e059b.js");require("./messages.messagetemplate.50334e5f.js");require("./http.message.87f319d7.js");require("./messages.fieldconfiguration.092bb027.js");require("./messages.sendplan.60929f46.js");require("./messages.sendrecord.09a1d1cd.js");require("./messages.templatelibrary.f5952edd.js");require("./translation.mains.6f941967.js");const m={props:{limit:{type:Number,default:12},fileAccept:{type:String,default:""},fileSize:{type:Number,default:1024}},data(){return{ruleFormRecord:{options:{fileName:"file",drag:!0}},record:null,width:"80%",confirmLoading:!1,visible:!1,fullscreen:!1,parentId:0,parentList:[],docTypeList:[],buttons:[{displayName:"\u786E\u5B9A",functionName:"handleSubmit",show:!0,transKey:"gd.btn.confirm",icon:"el-icon-document-checked"}],ruleForm:{file:"",fileList:[]},rules:{name:[{required:!0,message:this.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),trigger:["change","blur"]},{pattern:/^((?!\\|\/|:|\*|\?|<|>|\||'|%|\!|"|').){1,50}$/,message:this.$i18nt("gd.fileDocument.addNameTip",'\u540D\u79F0\u4E0D\u80FD\u5305\u542B\u4EE5\u4E0B\u5B57\u7B26\uFF1A<>:"/|?*%!')}],file:[{required:!0,message:this.$i18nt("gd.web.selectFileTip","\u8BF7\u9009\u62E9\u6587\u4EF6!"),trigger:["change","blur"]}]},rulesName:[{required:!0,message:this.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),trigger:["change","blur"]},{pattern:/^((?!\\|\/|:|\*|\?|<|>|\||'|%|\!|"|').){1,50}$/,message:this.$i18nt("gd.fileDocument.addNameTip",'\u540D\u79F0\u4E0D\u80FD\u5305\u542B\u4EE5\u4E0B\u5B57\u7B26\uFF1A<>:"/|?*%!')}],fileList:[],fileData:[]}},components:{UploadFile:p.UploadFile,LayoutItemColumn:()=>Promise.resolve().then(()=>require("./layoutItem.6f6017a5.js"))},computed:{rulesInput(){return[{required:!0,message:this.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),trigger:["change","blur"]}]},rulesSelect(){return[{required:!0,message:this.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),trigger:["change","blur"]}]},timeLongshort(){return this.getDictionary("time_longshort")},title(){const s=this.$i18nt("gd.btn.createfile","\u521B\u5EFA\u6587\u4EF6"),e=this.parentList.filter(r=>r.id===this.parentId)[0],t=e?` (${e.name})`:"";return`${s}${t}`},...d.mapGetters(["primaryColor"])},methods:{saveFail(s){s.forEach(e=>{e.res.success&&this.delItem(e.data)}),this.$nextTick(()=>{setTimeout(()=>{this.ruleForm.fileList=this.ruleForm.fileList.map(e=>{const t=s.filter(r=>r.data.fileId===e.fileId)[0];return Object.assign({...e},{tip:t?t.res.message:""})})},0)})},changeDocType(s,e){const t=this.docTypeList.filter(a=>a.code===s)[0];if(!t){Object.assign(e,{attributes:[]});return}this.confirmLoading=!0;let r=[],n=new Map;t.sysdoctypeattributes.forEach(a=>{if(a.ishidden!==1){const c=JSON.parse(a.reserve1);r.push({label:a.name,transKey:a.transkey?`Dynamics.${a.transkey}`:null,prop:a.attrcode,dictTypeCode:a.dicttypecode,effectType:a.datatype,rules:a.statecodes!==1?[]:a.isrequired===1?l.getRequired(a,{rulesInput:this.rulesInput,rulesSelect:this.rulesSelect}):[],pickerType:l.getPickerType(a,this.timeLongshort),fieldFormat:l.getFieldFormat(a,this.timeLongshort),fkEntityName:a.fkentity,fieldsize:a.datatype==="inputnumber"?0:a.fieldsize,isDatePicker:l.getDatePicker(a,this.timeLongshort),viewId:c.viewId?c.viewId:"",disabled:a.statecodes!==1}),n.set(a.attrcode,l.getDefaultValue(a))}});const i=this.ruleForm.fileList.map(a=>a.fileId===e.fileId?Object.assign(a,Object.assign({},a,Object.fromEntries(n),{attributes:r})):Object.assign({},a)),o=Object.assign({},this.ruleForm,{fileList:[...i]});this.ruleForm=JSON.parse(JSON.stringify(o)),setTimeout(()=>{this.confirmLoading=!1},300)},inputName(s,e){e.name=s.replace(/\s+/g,"")},save(){this.confirmLoading=!0;let s=[];this.ruleForm.fileList.forEach((e,t)=>{let r=this.add(e,t).then(n=>({data:e,res:n}));s.push(r)}),Promise.all(s).then(e=>{this.confirmLoading=!1;const t=e.filter(n=>!n.res.success);if(t.length===0){this.$message.success(this.$i18nt("gd.https.operateSucc","\u64CD\u4F5C\u6210\u529F")),this.closed(),this.$emit("ok");return}t.length<e.length&&this.$emit("ok");let r="";t.forEach(n=>{r+=`<p>${n.data.name} ${n.res.message}</p>`}),this.saveFail(e),this.$message({message:`${this.$i18nt("gd.https.operateFail","\u64CD\u4F5C\u5931\u8D25")}${r}`,type:"error",dangerouslyUseHTMLString:!0})})},add(s){let e=[];s.attributes.forEach(n=>{e.push({attrCode:n.prop,attrValue:["checkbox"].includes(n.effectType)?s[n.prop].join(","):s[n.prop]})});const t=this.docTypeList.filter(n=>n.code===s.sysdoctypeid)[0],r={name:s.name,parentid:this.ruleForm.parentid,type:2,inheritpermissions:s.inheritpermissions,filetype:s.filetype,filesize:s.filesize,file:s.fileId,version:s.version,description:s.description,sysdoctypeid:t.id,attributes:e};return u.sysDocObjectsAdd(r).then(n=>n)},handleSubmit(){if((this.ruleFormRecord.uidUploading?this.ruleFormRecord.uidUploading:[]).length>0){this.$message.error(`${this.$i18nt("gd.https.uidUploading","\u6587\u4EF6\u6B63\u5728\u4E0A\u4F20\u4E2D,\u8BF7\u7B49\u5F85..")}`);return}this.$refs.ruleForm.validate(e=>{e&&this.save()})},delItem(s){this.ruleForm.fileList=this.ruleForm.fileList.filter(e=>e.fileId!==s.fileId),this.$refs.uploadFile.removeFileManual(s.fileId)},handleChange(s){this.confirmLoading=!0;const e=JSON.parse(s.sourceData);let t=[];e.forEach(r=>{const n=r.name.substr(r.name.lastIndexOf(".")+1),i=this.fileData.filter(a=>a.uid===r.ouid)[0],o=this.ruleForm.fileList.filter(a=>a.fileId===r.fileId)[0];t.push({fileoriginname:r.fileoriginname,name:r.name,filetype:n,filesize:i?i.size:0,inheritpermissions:1,fileId:r.fileId,ouid:r.ouid,tip:"",version:"",description:"",sysdoctypeid:"",attributes:o?o.attributes:[]})}),this.ruleForm.fileList=t,setTimeout(()=>{this.confirmLoading=!1},100)},uploadFile(s){const e=this.fileData.filter(t=>t.uid!==s.file.uid);this.fileData=e.concat([s.file])},getDocTypePage(){this.confirmLoading=!0,u.sysDocTypePage({pageno:this.pageno,pagesize:this.pagesize}).then(s=>{s.code===200&&(this.docTypeList=s.data.rows.filter(e=>e.statecodes===1)),this.confirmLoading=!1})},open(s){this.parentId=s?s.id:"0",this.parentList=[{name:s.name?s.name:"root",id:s.id}],this.record=s,this.ruleForm={parentid:s.id,file:"",fileList:[]},this.visible=!0,this.getDocTypePage(),this.$nextTick(()=>{setTimeout(()=>{this.$refs.ruleForm&&this.$refs.ruleForm.clearValidate()},100)})},closed(){this.fileData=[],this.ruleForm={fileList:[]},this.fullscreen=!1,this.visible=!1},getDictionary(s){return this.$options.filters.dictData(s)},toggleFullscreen(){this.fullscreen=!this.fullscreen},doEvent(s){let e=s.item.functionName;this[e]&&this[e]()}}};var f=function(){var e=this,t=e._self._c;return t("div",[t("el-dialog",{directives:[{name:"drag",rawName:"v-drag"}],ref:"dialog",class:e.fullscreen?"gd-dialog gd-dialog-fangda":"gd-dialog",attrs:{fullscreen:e.fullscreen,visible:e.visible,width:e.width,center:!0,"close-on-click-modal":!1,"append-to-body":!0,"modal-append-to-body":!1,top:"80px","show-close":!1},on:{"update:visible":function(r){e.visible=r},closed:e.closed}},[t("gd-modal-title",{attrs:{slot:"title",title:e.title,fullscreen:e.fullscreen,buttons:e.buttons,confirmLoading:e.confirmLoading,showClose:!0},on:{changeEvent:e.doEvent,toggleFullscreen:e.toggleFullscreen},slot:"title"}),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.confirmLoading,expression:"confirmLoading"}]},[e.visible?t("el-form",{ref:"ruleForm",staticClass:"gd-form",staticStyle:{width:"100%",margin:"0 auto"},attrs:{model:e.ruleForm,"label-width":"160px",rules:e.rules},nativeOn:{submit:function(r){r.preventDefault()}}},[t("el-form-item",{staticStyle:{width:"90%"},attrs:{label:e.$i18nt("gd.page.uploadFile","\u4E0A\u4F20\u6587\u4EF6"),prop:"file"}},[t("UploadFile",{ref:"uploadFile",attrs:{record:e.ruleFormRecord,model:e.ruleForm,limit:e.limit,prop:"file",accept:e.fileAccept,size:e.fileSize},on:{change:e.handleChange,uploadFile:e.uploadFile}})],1),e._l(e.ruleForm.fileList,function(r,n){return[t("div",{staticClass:"list"},[t("el-alert",{staticStyle:{"margin-bottom":"12px"},attrs:{title:r.fileoriginname,type:"info",closable:!1}}),t("el-row",{attrs:{gutter:24}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{key:`${r.fileId}_name`,attrs:{label:e.$i18nt("gd.translation.name","\u540D\u79F0"),prop:"fileList."+n+".name",rules:e.rulesName}},[t("el-input",{attrs:{clearable:"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),maxlength:50},on:{input:i=>e.inputName(i,r)},model:{value:r.name,callback:function(i){e.$set(r,"name",i)},expression:"item.name"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.fileDocument.inheritedPermissions","\u7EE7\u627F\u6743\u9650"),title:e.$i18nt("gd.fileDocument.inheritedPermissions","\u7EE7\u627F\u6743\u9650")}},[t("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":e.primaryColor},model:{value:r.inheritpermissions,callback:function(i){e.$set(r,"inheritpermissions",i)},expression:"item.inheritpermissions"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{key:`${r.fileId}_sysdoctypeid`,attrs:{label:e.$i18nt("gd.fileDocument.classification","\u6587\u6863\u5206\u7C7B"),rules:e.rulesSelect,prop:"fileList."+n+".sysdoctypeid",title:e.$i18nt("gd.fileDocument.classification","\u6587\u6863\u5206\u7C7B")}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.select","\u8BF7\u9009\u62E9"),clearable:"",remote:"",filterable:""},on:{change:i=>e.changeDocType(i,r)},model:{value:r.sysdoctypeid,callback:function(i){e.$set(r,"sysdoctypeid",i)},expression:"item.sysdoctypeid"}},e._l(e.docTypeList,function(i){return t("el-option",{key:i.code,attrs:{label:e.$i18nt(`Dynamics.${i.transkey}`,i.name),value:i.code}})}),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.solution.version","\u7248\u672C"),title:e.$i18nt("gd.solution.version","\u7248\u672C")}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165")},model:{value:r.version,callback:function(i){e.$set(r,"version",i)},expression:"item.version"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:e.$i18nt("gd.directory.remark","\u5907\u6CE8"),title:e.$i18nt("gd.directory.remark","\u5907\u6CE8")}},[t("el-input",{attrs:{clearable:"",placeholder:e.$i18nt("gd.placeholder.input","\u8BF7\u8F93\u5165"),type:"textarea",rows:1},model:{value:r.description,callback:function(i){e.$set(r,"description",i)},expression:"item.description"}})],1)],1),e._l(r.attributes,function(i){return[t("el-col",{attrs:{span:12}},[t("el-form-item",{key:`${i.fileId}_${i.prop}`,attrs:{label:e.$i18nt(i.transKey,i.label),prop:`fileList.${n}.${i.prop}`,rules:i.rules,title:e.$i18nt(i.transKey,i.label)}},[t("LayoutItemColumn",{attrs:{record:i,ruleFormData:r}})],1)],1)]})],2),t("div",{staticClass:"item-del"},[t("i",{staticClass:"el-icon-close",on:{click:function(i){return e.delItem(r)}}})]),r.tip?t("el-tooltip",{staticClass:"item-tooltip",attrs:{effect:"dark",placement:"top-start"}},[t("i",{staticClass:"el-icon-warning",staticStyle:{color:"red"}}),t("div",{staticClass:"list-tip",attrs:{slot:"content"},slot:"content"},[e._v(e._s(r.tip))])]):e._e()],1)]})],2):e._e()],1)],1)],1)},g=[],h=d.normalizeComponent(m,f,g,!1,null,"3f9cc7b9",null,null);const b=h.exports;exports.default=b;