olp-table 5.3.4 → 5.3.5

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 (171) hide show
  1. package/package.json +12 -92
  2. package/.env.build +0 -1
  3. package/README.md +0 -26
  4. package/babel.config.js +0 -5
  5. package/jsconfig.json +0 -22
  6. package/public/favicon.ico +0 -0
  7. package/public/index.html +0 -17
  8. package/rmMode.bat +0 -1
  9. package/src/App.vue +0 -199
  10. package/src/api/crud.js +0 -22
  11. package/src/api/dist.js +0 -6
  12. package/src/assets/iconfont/iconfont.css +0 -20
  13. package/src/assets/iconfont/iconfont.json +0 -16
  14. package/src/assets/iconfont/iconfont.ttf +0 -0
  15. package/src/assets/iconfont/iconfont.woff +0 -0
  16. package/src/assets/iconfont/iconfont.woff2 +0 -0
  17. package/src/assets/logo.png +0 -0
  18. package/src/components/auto-height/index.vue +0 -75
  19. package/src/components/codemirror-tag.vue +0 -100
  20. package/src/components/lazy-load-select.vue +0 -107
  21. package/src/components/ol-dialog-excel.vue +0 -112
  22. package/src/components/ol-dialog-import.vue +0 -304
  23. package/src/components/ol-dialog-json.vue +0 -82
  24. package/src/components/ol-dialog-table.vue +0 -81
  25. package/src/components/ol-dialog-upload-file.vue +0 -208
  26. package/src/components/ol-dict-tag.vue +0 -271
  27. package/src/components/ol-select-dom.vue +0 -71
  28. package/src/components/ol-table-filter.vue +0 -28
  29. package/src/components/ol-table-render.vue +0 -44
  30. package/src/components/ol-table-select.vue +0 -150
  31. package/src/components/pinia-init.vue +0 -18
  32. package/src/components/table/model/ModelMixins.js +0 -43
  33. package/src/components/table/model/model-index.vue +0 -121
  34. package/src/components/table/model/ot-left-right.vue +0 -18
  35. package/src/components/table/model/ot-left-tree-right-table.scss +0 -14
  36. package/src/components/table/model/ot-left-tree-right-table.vue +0 -41
  37. package/src/components/table/model/ot-top-1-bottom-2.vue +0 -39
  38. package/src/components/table/model/ot-top-2-bottom-1.vue +0 -38
  39. package/src/components/table/model/ot-top-2-bottom-2.vue +0 -38
  40. package/src/components/table/model/ot-top-bottom.vue +0 -18
  41. package/src/components/table/model/splitpanesModel.css +0 -22
  42. package/src/components/table/model/splitpanesModel.vue +0 -54
  43. package/src/components/table/ol-form/index.vue +0 -537
  44. package/src/components/table/ol-form-v3/index.vue +0 -455
  45. package/src/components/table/ol-main-form-sub-table/index.vue +0 -601
  46. package/src/components/table/ol-pager/index.vue +0 -46
  47. package/src/components/table/ol-table/components/ol-table-column-config/columnIndex.vue +0 -233
  48. package/src/components/table/ol-table/components/ol-table-column-config/index.vue +0 -145
  49. package/src/components/table/ol-table/components/ol-table-column-dict-color/index.vue +0 -88
  50. package/src/components/table/ol-table/index.vue +0 -232
  51. package/src/components/table/ol-table-operate/index.vue +0 -61
  52. package/src/components/table/ol-table-search/index.vue +0 -17
  53. package/src/components/table/ol-table-tool-btn/index.vue +0 -60
  54. package/src/components/tree/components/o-tree.vue +0 -289
  55. package/src/components/tree/index.vue +0 -46
  56. package/src/components/v-component/index.vue +0 -43
  57. package/src/config/dev-config.js +0 -5
  58. package/src/config/prod-config.js +0 -5
  59. package/src/config/shared-config.js +0 -20
  60. package/src/data.js +0 -9378
  61. package/src/directives/permission/hasPermi.js +0 -63
  62. package/src/directives/permission/hasRole.js +0 -30
  63. package/src/main.js +0 -55
  64. package/src/mixins/VTMixin/DefaultMethods.js +0 -749
  65. package/src/mixins/VTMixin/OTMixinBody.js +0 -105
  66. package/src/mixins/VTMixin/OTMixinBodyFooter.js +0 -93
  67. package/src/mixins/VTMixin/OTMixinBodyMethods.js +0 -420
  68. package/src/mixins/VTMixin/OTMixinColumnMethod.js +0 -450
  69. package/src/mixins/VTMixin/OTMixinInitMethod.js +0 -130
  70. package/src/mixins/VTMixin/OTMixinPager.js +0 -38
  71. package/src/mixins/VTMixin/OTMixinSortable.js +0 -43
  72. package/src/mixins/VTMixin/index.js +0 -18
  73. package/src/package/index.js +0 -20
  74. package/src/plugins/axios.js +0 -61
  75. package/src/store/dict.js +0 -76
  76. package/src/store/dictType.js +0 -52
  77. package/src/store/permi.js +0 -45
  78. package/src/styles/common.scss +0 -37
  79. package/src/styles/index.scss +0 -48
  80. package/src/styles/theme.scss +0 -32
  81. package/src/utils/AESCRUDUtils.js +0 -87
  82. package/src/utils/DateUtils.js +0 -35
  83. package/src/utils/ExcelUtil.js +0 -159
  84. package/src/utils/TableSortUtil.js +0 -91
  85. package/src/utils/columnProp.js +0 -3
  86. package/src/utils/groupCompute.js +0 -68
  87. package/src/utils/http/httpFactory.js +0 -92
  88. package/src/utils/http/httpFactory2.js +0 -79
  89. package/src/utils/http/httpUtil.js +0 -123
  90. package/src/utils/http/httpUtils.js +0 -38
  91. package/src/utils/loadStyle.js +0 -14
  92. package/src/utils/message.js +0 -56
  93. package/src/utils/object.js +0 -80
  94. package/src/utils/security/TokenUtil.js +0 -19
  95. package/src/utils/tree.js +0 -54
  96. package/src/utils/util.js +0 -127
  97. package/src/views/Test/index.vue +0 -77
  98. package/src/views/Test/index2.vue +0 -33
  99. package/src/views/components/btn-config/index.vue +0 -202
  100. package/src/views/components/option-config/index.vue +0 -192
  101. package/src/views/db/chineseToEnglish.vue +0 -127
  102. package/src/views/db/filed.vue +0 -395
  103. package/src/views/db/index.vue +0 -192
  104. package/src/views/db/preview/index.vue +0 -139
  105. package/src/views/db/preview/left.vue +0 -204
  106. package/src/views/db/preview/right.vue +0 -466
  107. package/src/views/groupTable/index.vue +0 -137
  108. package/src/views/groupTable/ol-table-column-config/columnIndex.vue +0 -194
  109. package/src/views/groupTable/ol-table-column-config/index.vue +0 -92
  110. package/src/views/table/add-or-edit/config/base-config/index.vue +0 -539
  111. package/src/views/table/add-or-edit/config/base-config/table-form.vue +0 -333
  112. package/src/views/table/add-or-edit/config/column-config/header-config.vue +0 -475
  113. package/src/views/table/add-or-edit/config/column-config/index.vue +0 -790
  114. package/src/views/table/add-or-edit/config/data/column.js +0 -218
  115. package/src/views/table/add-or-edit/config/data/crud.js +0 -122
  116. package/src/views/table/add-or-edit/config/data/events.js +0 -109
  117. package/src/views/table/add-or-edit/config/data/method.js +0 -127
  118. package/src/views/table/add-or-edit/config/data/option.js +0 -725
  119. package/src/views/table/add-or-edit/config/data/page.js +0 -79
  120. package/src/views/table/add-or-edit/config/field-config/filed-config-table.vue +0 -42
  121. package/src/views/table/add-or-edit/config/field-config/index.vue +0 -91
  122. package/src/views/table/add-or-edit/config/form-config/index.vue +0 -1179
  123. package/src/views/table/add-or-edit/config/index.vue +0 -376
  124. package/src/views/table/add-or-edit/config/initFormObject.js +0 -25
  125. package/src/views/table/add-or-edit/config/script-config/LeftMeun.vue +0 -71
  126. package/src/views/table/add-or-edit/config/script-config/index.vue +0 -70
  127. package/src/views/table/add-or-edit/config/table-config/btn-config.vue +0 -340
  128. package/src/views/table/add-or-edit/config/table-config/btn-sort.vue +0 -132
  129. package/src/views/table/add-or-edit/config/table-config/index.vue +0 -446
  130. package/src/views/table/add-or-edit/configOld/dataTags/filed-config-table-model.vue +0 -41
  131. package/src/views/table/add-or-edit/configOld/dataTags/filed-config.vue +0 -74
  132. package/src/views/table/add-or-edit/configOld/dataTags/index.vue +0 -439
  133. package/src/views/table/add-or-edit/configOld/dataTags/set-table-sql.vue +0 -79
  134. package/src/views/table/add-or-edit/configOld/dataTags/table-on-config.vue +0 -74
  135. package/src/views/table/add-or-edit/configOld/index.vue +0 -127
  136. package/src/views/table/add-or-edit/configOld/tableTags/columnConfig.js +0 -5
  137. package/src/views/table/add-or-edit/configOld/tableTags/index.vue +0 -353
  138. package/src/views/table/add-or-edit/configOld/tableTags/operation-but-config.vue +0 -75
  139. package/src/views/table/add-or-edit/configOld/tableTags/tool-but-config.vue +0 -92
  140. package/src/views/table/add-or-edit/index.vue +0 -201
  141. package/src/views/table/add-or-edit/themeModel/index.vue +0 -53
  142. package/src/views/table/add-or-edit/themeModel/init-model-table.vue +0 -48
  143. package/src/views/table/add-or-edit/themeModel/init-model.vue +0 -81
  144. package/src/views/table/add-or-edit/themeModel/left-right.vue +0 -24
  145. package/src/views/table/add-or-edit/themeModel/left-tree-right-table.vue +0 -75
  146. package/src/views/table/add-or-edit/themeModel/olTableSearchModelMixins.js +0 -42
  147. package/src/views/table/add-or-edit/themeModel/splitpanesThemeModel.vue +0 -49
  148. package/src/views/table/add-or-edit/themeModel/top-1-bottom-2.vue +0 -29
  149. package/src/views/table/add-or-edit/themeModel/top-2-bottom-1.vue +0 -32
  150. package/src/views/table/add-or-edit/themeModel/top-2-bottom-2.vue +0 -32
  151. package/src/views/table/add-or-edit/themeModel/top-bottom.vue +0 -14
  152. package/src/views/table/index.vue +0 -43
  153. package/src/views/table/index2.vue +0 -199
  154. package/src/views/table/preview/index.vue +0 -29
  155. package/src/views/tree/components/config-core-data.vue +0 -85
  156. package/src/views/tree/components/config-core-table.vue +0 -362
  157. package/src/views/tree/components/config-core-tree/data/events.js +0 -95
  158. package/src/views/tree/components/config-core-tree/data/option.js +0 -88
  159. package/src/views/tree/components/config-core-tree/data/prop.js +0 -28
  160. package/src/views/tree/components/config-core-tree/index.vue +0 -181
  161. package/src/views/tree/components/config-core.vue +0 -42
  162. package/src/views/tree/components/form-config/index.vue +0 -967
  163. package/src/views/tree/index.vue +0 -424
  164. package/vue.config.js +0 -44
  165. /package/{olp-table/demo.html → demo.html} +0 -0
  166. /package/{olp-table/fonts → fonts}/iconfont.1720006583309.7e4906d9.woff +0 -0
  167. /package/{olp-table/fonts → fonts}/iconfont.1720006583309.947a27f0.ttf +0 -0
  168. /package/{olp-table/olp-table.common.js → olp-table.common.js} +0 -0
  169. /package/{olp-table/olp-table.css → olp-table.css} +0 -0
  170. /package/{olp-table/olp-table.umd.js → olp-table.umd.js} +0 -0
  171. /package/{olp-table/olp-table.umd.min.js → olp-table.umd.min.js} +0 -0
@@ -1,455 +0,0 @@
1
- <template>
2
- <el-dialog
3
- v-model="state.dialogVisible"
4
- :title="state.title"
5
- align-center
6
- destroy-on-close
7
- :width="state.width"
8
- v-loading="state.loading"
9
- :close-on-click-modal="false"
10
- >
11
- <el-scrollbar :max-height="state.maxHeight" style="padding-right: 10px">
12
- <avue-form v-if="state.type == '0'" :key="state.key" ref="formRef" :option="state.form"
13
- v-model="state.formData"></avue-form>
14
- <VFormRender v-else :form-json="state.form" :form-data="state.formData"
15
- :option-data="state.optionData"
16
- ref="formRef">
17
- </VFormRender>
18
- </el-scrollbar>
19
- <template #footer>
20
- <el-button @click="state.dialogVisible = false;">取 消</el-button>
21
- <el-button type="primary" :loading="state.loading" @click="doSave">保 存</el-button>
22
- </template>
23
- </el-dialog>
24
- </template>
25
- <script>
26
- export default {
27
- name: "olForm",
28
- };
29
- </script>
30
- <script scope setup>
31
- import {defineExpose, reactive, nextTick, defineEmits, ref, inject, onMounted} from "vue";
32
- import {storeDict} from "@/store/dict";
33
- import {pinyin} from "pinyin-pro";
34
- import {useMessage} from "@/utils/message";
35
- import {get, post, put} from "@/utils/http/httpUtils";
36
- import {handleTree} from "@/utils/tree";
37
- import {initDictTable} from "@/api/dist";
38
- import {setArrayObjectKeyValue} from "@/utils/object";
39
-
40
- const dict = storeDict();
41
- onMounted(() => {
42
- dict.init(http)
43
- })
44
- const events = ['change'];
45
- const olPinyin = pinyin;
46
- const http = inject("http")
47
- const olMsg = useMessage() // 消息弹窗
48
- const state = reactive({
49
- key: 1,
50
- loading: false,
51
- fullscreen: false,
52
- dialogVisible: false,
53
- title: "",
54
- width: '60%',
55
- comCommit: true,
56
- maxHeight: '400px',
57
- type: '0',
58
- edit: false,
59
- form: {
60
- column: []
61
- },
62
- saveUrl: '',
63
- formData: {},
64
- requestType: 'post',
65
- updateKey: '',
66
- theme: 't1',
67
- tableConfigId: '',
68
- optionData: {},
69
- })
70
- const formRef = ref()
71
-
72
- const hideColumn = (prop) => {
73
- setArrayObjectKeyValue(state.form.column, 'display', false, prop)
74
- }
75
- const showColumn = (prop) => {
76
- setArrayObjectKeyValue(state.form.column, 'display', true, prop)
77
- }
78
-
79
- function getParams() {
80
- let params = {
81
- tableConfigId: state.tableConfigId,
82
- columnAndValueMap: {},
83
- };
84
-
85
- if (state.type != '0') {
86
- let formData = formRef.value.getFormData(false);
87
- for (let prop of Object.keys(formData)) {
88
- let value = formData[prop];
89
- if (value instanceof String) {
90
- value = value.trim();
91
- }
92
- params.columnAndValueMap[prop] = value;
93
- }
94
- } else {
95
- for (let {prop} of state.form.column) {
96
- let value = state.formData[prop];
97
- if (value) {
98
- if (value instanceof String) {
99
- value = value.trim();
100
- }
101
- params.columnAndValueMap[prop] = value;
102
- }
103
- }
104
- }
105
-
106
- if (state.saveUrl) {
107
- return params.columnAndValueMap;
108
- }
109
- if (state.edit) {
110
- params.whereMap = {}
111
- if (state.updateKey) {
112
- let split = state.updateKey.split(',');
113
- for (let kv of split) {
114
- let kvs = kv.split("=");
115
- if (kvs.length == 2) {
116
- params.whereMap[kvs[0]] = params.columnAndValueMap[kvs[1]]
117
- delete params.columnAndValueMap[kvs[0]];
118
- } else {
119
- let val = params.columnAndValueMap[kvs];
120
- params.whereMap[kvs] = val != undefined ? val : state.formData[kvs];
121
- delete params.columnAndValueMap[kvs];
122
- }
123
- }
124
- } else {
125
- // 编辑时默认更新条件为id
126
- params.whereMap['id'] = state.formData['id'];
127
- if (!params.whereMap['id']) {
128
- params.whereMap['id'] = state.formData['t1_id'];
129
- }
130
- delete params.columnAndValueMap['id'];
131
- }
132
- }
133
- return params
134
- }
135
-
136
- async function doValidate() {
137
- let dom = undefined;
138
- let keys = [];
139
- let status = true;
140
- if (state.type != '0') {
141
- await formRef.value.getNativeForm().validate((valid, msg) => {
142
- if (!valid) {
143
- keys = Object.keys(msg);
144
- dom = formRef.value.getWidgetRef(keys[0]);
145
- status = false;
146
- }
147
- })
148
- } else {
149
- await formRef.value.validate((valid, done, msg) => {
150
- if (!valid) {
151
- keys = Object.keys(msg);
152
- dom = formRef.value.getPropRef(keys[0]);
153
- status = false;
154
- }
155
- done()
156
- })
157
- }
158
- if (dom) {
159
- // 定位代码
160
- dom.$el.scrollIntoView({
161
- block: "center",
162
- behavior: "smooth",
163
- });
164
- olMsg.error("您还有" + keys.length + "项信息未填写,请填写后再操作!");
165
- status = false;
166
- }
167
- return status
168
- }
169
-
170
- async function doSave() {
171
- let validate = await doValidate();
172
- if (!validate) {
173
- return
174
- }
175
- state.loading = true;
176
- try {
177
- let params = getParams()
178
- let url = state.saveUrl ? state.saveUrl : state.edit ? '/online/crud/modify' : '/online/crud/save'
179
- if (state.requestType.toLowerCase() == "put") {
180
- await put(http, url, params).then(status => {
181
- state.loading = false;
182
- if (status) {
183
- state.dialogVisible = false;
184
- emits('query')
185
- }
186
- })
187
- } else {
188
- await post(http, url, params).then(status => {
189
- state.loading = false;
190
- if (status) {
191
- state.dialogVisible = false;
192
- emits('query')
193
- }
194
- })
195
- }
196
- } catch (e) {
197
- console.error(e)
198
- } finally {
199
- state.loading = false;
200
- }
201
-
202
- }
203
-
204
- function init(data) {
205
- if (data.saveUrl) {
206
- state.saveUrl = data.saveUrl.trim();
207
- if (data.requestType) {
208
- state.requestType = data.requestType;
209
- }
210
- }
211
- state.key++;
212
- state.edit = data['code'] == 'edit' == true;
213
- state.title = data.title ? data.title : state.edit ? '编辑' : '新增';
214
- //赋值弹窗宽度和高度
215
- if (data.form.diaLogWidth) {
216
- state.width = data.form.diaLogWidth
217
- }
218
- if (data.form.diaLogHeight) {
219
- state.maxHeight = data.form.diaLogHeight + 'px'
220
- }
221
- if (data.form.title) {
222
- state.title = data.form.title
223
- }
224
- state.dialogVisible = true
225
- for (let key of Object.keys(state)) {
226
- if (data[key]) {
227
- state[key] = data[key]
228
- }
229
- }
230
- if (state.type == 0) {
231
- for (let column of state.form.column) {
232
- if (column.disabled == 1) {
233
- column.disabled = true;
234
- }
235
- initDict(column);
236
- parseJson(column);
237
- for (let event of events) {
238
- if (column[event] && !(column[event] instanceof Function)) {
239
- try {
240
- column[event] = getFunction(column[event])
241
- } catch (e) {
242
- console.error(e)
243
- }
244
- }
245
- }
246
- }
247
- }
248
- }
249
-
250
- function parseJson(column) {
251
- let attrs = column.attrs;
252
- if (attrs) {
253
- try {
254
- attrs = JSON.parse(attrs)
255
- for (let key of Object.keys(attrs)) {
256
- column[key] = attrs[key];
257
- }
258
- } catch (e) {
259
- console.error("解析attrs异常", attrs)
260
- }
261
- }
262
- }
263
-
264
- function initDict(column) {
265
- if (column.dictCode) {
266
- column.dicData = dict.val(column.dictCode)
267
- if (column.selectDom == 1) {
268
- column.type = "select";
269
- }
270
- if (state.edit) {
271
- return;
272
- }
273
- if (column.value != undefined) {
274
- state.formData[column.prop] = String(column.value)
275
- } else {
276
- //”number”、”string”、”boolean”、”object”、”function” 和 “undefined”
277
- let dataType = typeof (state.formData[column.prop]);
278
- // 数据字典与值类型不一致
279
- if (state.formData[column.prop] != undefined && state.formData[column.prop] != '' && ["number", "boolean"].indexOf(dataType) != -1) {
280
- state.formData[column.prop] = String(state.formData[column.prop])
281
- column.value = state.formData[column.prop];
282
- } else if (state.formData[column.prop] == undefined) {
283
- setTimeout(() => {
284
- if (column.dicData) {
285
- for (let dicDatum of column.dicData) {
286
- if (dicDatum.isDefault == 1) {
287
- state.formData[column.prop] = dicDatum.value;
288
- column.value = state.formData[column.prop];
289
- }
290
- }
291
- }
292
- }, 100)
293
- }
294
- }
295
- } else if (column.dictTable || column.dictUrl) {
296
- if (column.selectDom == 1) {
297
- column.type = "select";
298
- }
299
- column.filterable = true;
300
- column.dicData = [];
301
- setTimeout(() => {
302
- setDictTable(column, undefined);
303
- }, 10)
304
- if (column.type == 'tree') {
305
- column.filterable = column.filterable == undefined ? true : column.clearable;
306
- column.clearable = column.clearable == undefined ? true : column.clearable;
307
- } else {
308
- column.filterMethod = (e) => {
309
- nextTick(() => {
310
- setDictTable(column, e);
311
- })
312
- };
313
- }
314
- }
315
- }
316
-
317
- const doSetDictTable = (column, like) => {
318
- let value = state.formData[column.prop];
319
- /*String tableName;
320
- String dataBase;
321
- String label;
322
- String value;
323
- Map<String, Object> where;*/
324
- // olp-vue-pro,system_users,nickname,id,parentId
325
- let params = {}
326
- let dictTable = JSON.parse(JSON.stringify(column.dictTable));
327
- if (dictTable instanceof Object) {
328
- params = dictTable;
329
- } else {
330
- dictTable = column.dictTable.split(",");
331
- params["dbName"] = dictTable[0];
332
- params["tableName"] = dictTable[1];
333
- params["label"] = dictTable[2];
334
- params["value"] = dictTable[3];
335
- if (dictTable[4]) {
336
- params["parentValue"] = dictTable[4];
337
- }
338
- }
339
-
340
- if (like || value) {
341
- if (!params.where) {
342
- params.where = {};
343
- }
344
-
345
- }
346
- if (!params["parentValue"]) {
347
- if (like) {
348
- params.where['_like_' + params["label"]] = like;
349
- }
350
- if (value) {
351
- params.defaultValue = value;
352
- }
353
- }
354
-
355
- initDictTable(http, params).then((data) => {
356
- column.dicData.length = 0;
357
- if (params["parentValue"]) {
358
- column.dicData = handleTree(data, 'dictValue', 'parentValue');
359
- } else {
360
- data.forEach((d) => {
361
- column.dicData.push(d);
362
- })
363
- }
364
- })
365
- }
366
- const setDictUrl = (column, like) => {
367
- let dictUrl = column.dictUrl.split(",");
368
- let url;
369
- let label = 'label';
370
- let value = 'value';
371
- let parentId = 'parentId';
372
- // get,url,label,value,parent_id
373
- let doGet = true;
374
- if (dictUrl.length > 1
375
- ) {
376
- if (dictUrl[0].toString().toLowerCase() == 'post') {
377
- doGet = false;
378
- }
379
- url = dictUrl[1];
380
- label = dictUrl[2];
381
- value = dictUrl[3];
382
- parentId = dictUrl[4];
383
- } else {
384
- url = dictUrl[0];
385
- }
386
-
387
- if (doGet) {
388
- get(http, url + "?label=" + like).then((data) => {
389
- column.dicData.length = 0;
390
- if (column.type == 'tree') {
391
- for (let da of data) {
392
- da['label'] = da[label]
393
- da['value'] = da[value]
394
- }
395
- column.dicData = handleTree(data, value, parentId);
396
- } else {
397
- data.forEach((d) => {
398
- column.dicData.push(d);
399
- })
400
- }
401
- })
402
- } else {
403
- let params = {}
404
- if (like) {
405
- params['label'] = like;
406
- }
407
- post(http, column.dictUrl, params, false).then(({data}) => {
408
- column.dicData.length = 0;
409
- if (column.type == 'tree') {
410
- for (let da of data) {
411
- da['label'] = da[label]
412
- da['value'] = da[value]
413
- }
414
- column.dicData = handleTree(data, value, parentId);
415
- } else {
416
- data.forEach((da => {
417
- da['label'] = da[label];
418
- da['value'] = da[value];
419
- column.dicData.push(da);
420
- }))
421
- }
422
- })
423
- }
424
- }
425
- const setDictTable = (column, like) => {
426
- if (column.dictTable && column.dictTable.toString().trim() != '') {
427
- doSetDictTable(column, like);
428
- } else if (column.dictUrl) {
429
- setDictUrl(column, like);
430
- }
431
-
432
- }
433
- const aws = async () => {
434
- await nextTick()
435
- }
436
-
437
- function getFunction(v) {
438
- return eval(" async (params)=>{await aws();let {formData} = state;let {value} = params;" + replaceDollarBraces(v) + "}")
439
- }
440
-
441
- function replaceDollarBraces(str) {
442
- return str.toString().replace(/\$\{?([^{}]+)\}?/g, function (match, innerContent) {
443
- return innerContent ? `'${innerContent}'` : match;
444
- });
445
- }
446
-
447
-
448
- // 子组件调用父组件
449
- const emits = defineEmits(['emits']) //声明 emits
450
-
451
- // 对外暴露
452
- defineExpose({
453
- init,
454
- })
455
- </script>