@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.10

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 (140) hide show
  1. package/build/plugins.ts +39 -32
  2. package/dist/{403-Dp617CWX.js → 403-Ctxjn4q8.js} +1 -1
  3. package/dist/{404-Cz_Axb6Y.js → 404-W5yzyiZ9.js} +1 -1
  4. package/dist/{500-BGCtRNse.js → 500-DXuGEOm4.js} +1 -1
  5. package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-C2tflCt8.js} +1 -1
  6. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js +100 -0
  7. package/dist/{Company-IV3GTnzY.js → Company-PLez5GoH.js} +3 -3
  8. package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-CIGaQooL.js} +16 -16
  9. package/dist/{Department-B3W-OxW8.js → Department-B9wLsXFm.js} +3 -3
  10. package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-DSM4lTaz.js} +1 -1
  11. package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-B6a9wW_A.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js} +24 -26
  13. package/dist/DictView-DhFbQxdJ.js +110 -0
  14. package/dist/InvOrganization-D90AbR3b.js +66 -0
  15. package/dist/Org-DxBkYabD.js +39 -0
  16. package/dist/{Preview-BlDMmpdR.js → Preview-BFtRpBxw.js} +1 -1
  17. package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-BIa2QryC.js} +1 -1
  18. package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CnyjI-WD.js} +43 -43
  19. package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-BiK7yEhV.js} +1 -1
  20. package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-C2rqdFTm.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js} +1 -1
  22. package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DdkLscP3.js} +28 -28
  23. package/dist/{Role-_q3lQ8CZ.js → Role-BrsxgK8D.js} +6 -6
  24. package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DiqwJqDa.js} +8 -8
  25. package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-BDusGyo7.js} +1 -1
  26. package/dist/{RolePanel-BQb1LlhD.js → RolePanel-Dqx5dI3f.js} +1 -1
  27. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js +132 -0
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js} +44 -38
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js} +21 -21
  30. package/dist/{Staff-BSf9Ypbk.js → Staff-Cwi9LQiZ.js} +3 -3
  31. package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-XjVtyaMv.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js} +11 -11
  33. package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-C-wYcFdv.js} +1 -1
  34. package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js} +2 -2
  35. package/dist/{SysUser-FAABuNti.js → SysUser-O4tvr-Ur.js} +2 -2
  36. package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-B853docZ.js} +1 -1
  37. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js +294 -0
  38. package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-CXR6mrXr.js} +26 -26
  39. package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BkP8pE2a.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js} +39 -37
  41. package/dist/{childView-C_HmDQNd.js → childView-D0HwbgDT.js} +1 -1
  42. package/dist/{childView-uUlBcTza.js → childView-TRqUkSDC.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js} +40 -40
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js} +1 -1
  45. package/dist/{code-rule-AgCVDKFy.js → code-rule-BV7PQWhK.js} +9 -10
  46. package/dist/core.es.js +14 -11
  47. package/dist/{cron-task-C6FgQxTi.js → cron-task-9ZS9bi7K.js} +1 -1
  48. package/dist/{frameView-BDgISK7N.js → frameView-DE83AN50.js} +1 -1
  49. package/dist/img/l_img.svg +1 -1
  50. package/dist/img/minicolors.png +0 -0
  51. package/dist/img/v_img.svg +1 -1
  52. package/dist/index-DVARtten.js +2623 -0
  53. package/dist/{layoutView-yb3DV2DQ.js → layoutView-D1U-c4By.js} +111 -110
  54. package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
  55. package/dist/{login-RRpljbkm.js → login-sPCEiTGT.js} +106 -113
  56. package/dist/{lov-view-C9-rjzZR.js → lov-view-76NcYTYl.js} +2 -2
  57. package/dist/{menuInfo-CzPQyFhp.js → menuInfo-CxjfjFpm.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js} +100 -97
  59. package/dist/{pda-app-Dvy3U-b6.js → pda-app-BUH16bLj.js} +211 -197
  60. package/dist/{resource-Fy0lFkSV.js → resource-CCuHzoA6.js} +15 -15
  61. package/dist/{su-welcome-DYvSCUST.js → su-welcome-mRArONsd.js} +109 -110
  62. package/dist/{sys-config-DJ1vNQTy.js → sys-config-Cvt05yF6.js} +7 -7
  63. package/dist/udp-core.css +2 -2
  64. package/dist/{utogether-CjmJiHoE.js → utogether-Dm_VBQHR.js} +1 -1
  65. package/index.ts +40 -36
  66. package/package.json +1 -1
  67. package/src/App.vue +65 -70
  68. package/src/api/index.ts +1 -1
  69. package/src/components/SuCharts/src/UserInfo.vue +78 -78
  70. package/src/components/SuScrollTree/ScrollPanel.vue +3 -3
  71. package/src/components/udp/count-down.vue +536 -0
  72. package/src/components/udp/flip-down/FlipCard/flip-card.vue +251 -0
  73. package/src/components/udp/flip-down/FlipCard/interfaces.ts +4 -0
  74. package/src/components/udp/flip-down/FlipClock/flip-clock.vue +113 -0
  75. package/src/components/udp/form-upload.vue +414 -64
  76. package/src/components/udp/form.vue +112 -0
  77. package/src/components/udp/grid.vue +495 -0
  78. package/src/components/udp/index.ts +10 -4
  79. package/src/components/udp/lov.vue +388 -0
  80. package/src/components/udp/modal-form.vue +11 -2
  81. package/src/components/udp/modal-grid.vue +288 -0
  82. package/src/components/udp/upload.vue +423 -0
  83. package/src/components/udp/utils.ts +447 -40
  84. package/src/directives/permission/index.ts +1 -1
  85. package/src/layout/components/lay-navbar/index.vue +1 -1
  86. package/src/layout/components/lay-panel/index.vue +150 -150
  87. package/src/layout/components/lay-search/index.vue +25 -25
  88. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  89. package/src/layout/components/lay-tag/index.vue +625 -625
  90. package/src/layout/layoutView.vue +215 -215
  91. package/src/main.ts +23 -13
  92. package/src/plugins/i18n/en.ts +302 -289
  93. package/src/plugins/i18n/zh.ts +348 -337
  94. package/src/plugins/vxe-table/index.ts +53 -46
  95. package/src/plugins/vxe-table/render.tsx +956 -817
  96. package/src/router/index.ts +187 -183
  97. package/src/router/modules/remaining.ts +58 -83
  98. package/src/style/button.scss +85 -78
  99. package/src/style/tailwind.css +1 -68
  100. package/src/style/vxetable.scss +44 -11
  101. package/src/utils/authority/index.ts +1 -1
  102. package/src/utils/{http → udp/http}/index.ts +8 -24
  103. package/src/utils/{http → udp/http}/types.d.ts +8 -5
  104. package/src/utils/udp/useRender.ts +17 -6
  105. package/src/views/login/login-view.vue +2 -2
  106. package/src/views/organization/company/CompanyPanel.vue +259 -259
  107. package/src/views/organization/inv-org/InvOrganization.vue +2 -3
  108. package/src/views/organization/org/Org.vue +9 -5
  109. package/src/views/system/menu/SystemMenu.vue +183 -197
  110. package/src/views/system/menu/menuInfo.vue +363 -371
  111. package/src/views/system/role/AuthorityInfo.vue +19 -15
  112. package/src/views/system/role/Role.vue +1 -5
  113. package/src/views/system/role/RolePanel.vue +11 -2
  114. package/src/views/system/role/UserInfo.vue +195 -193
  115. package/src/views/system/role-assign/RoleAssign.vue +57 -57
  116. package/src/views/system/role-assign/RolePanel.vue +139 -136
  117. package/src/views/system/sys/sys-config.vue +1 -1
  118. package/src/views/system/sysUser/SysUserPanel.vue +278 -278
  119. package/src/views/uapp/pda/pda-app.vue +208 -176
  120. package/src/views/udev/dict/DictView.vue +118 -106
  121. package/src/views/udev/dict/childView.vue +7 -7
  122. package/src/views/udev/lov/lov-view.vue +91 -91
  123. package/src/views/ufile/aggregation/File.vue +5 -5
  124. package/src/views/ufile/file/water-mark.vue +14 -14
  125. package/src/views/uhome/su-welcome.vue +3 -3
  126. package/src/views/ulogin/login.vue +14 -9
  127. package/src/views/upms/user/login-log.vue +1 -1
  128. package/src/views/urpt/design/DesignPanel.vue +507 -526
  129. package/src/views/urpt/design/ReportDesign.vue +15 -19
  130. package/src/views/urpt/static-resource/resource.vue +3 -3
  131. package/src/views/urpt/template/ReportTemplate.vue +7 -7
  132. package/types/global.d.ts +2 -1
  133. package/vite.config.ts +6 -2
  134. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
  135. package/dist/DictView-C-i7e4hZ.js +0 -95
  136. package/dist/InvOrganization-cfT6riGU.js +0 -260
  137. package/dist/Org-CA7vTDIF.js +0 -35
  138. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
  139. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
  140. package/dist/index-DzOzUkf6.js +0 -3388
@@ -0,0 +1,423 @@
1
+ <!--
2
+ * @Author: wei.li
3
+ * @Date: 2022-06-21 14:50:52
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-08-03 16:01:16
6
+ * @Description: excel数据导入
7
+ -->
8
+ <template>
9
+ <vxe-modal v-model="visible" :show-header="false" fullscreen remember @close="onClose">
10
+ <template #default>
11
+ <vxe-grid ref="xgrid" v-bind="gridOptions" v-on="gridEvents">
12
+ <template v-for="col in columns" :key="col.field" #[col.field!]="{ row }">
13
+ <el-select v-if="col.dictCode && !col.disabled" v-model.trim="row[col.field!]" clearable>
14
+ <el-option
15
+ v-for="child in dict[col.dictCode]?.children"
16
+ :key="child.dictCode"
17
+ :value="child.dictCode"
18
+ :label="child.dictName"
19
+ />
20
+ </el-select>
21
+ <el-date-picker
22
+ v-else-if="['date', 'month', 'datetime'].includes(col.dataType) && !col.disabled"
23
+ v-model.trim="row[col.field!]"
24
+ :type="col.dataType"
25
+ value-format="YYYY-MM-DD hh:mm:ss"
26
+ />
27
+ <input v-else-if="!col.da && !col.disabled" v-model.trim="row[col.field!]" class="ut-input" />
28
+ <span v-else-if="!showErrorMsg">{{ row[col.field!] }}</span>
29
+ <span v-else>{{ row[col.field!] }}</span>
30
+ </template>
31
+ <template #pager>
32
+ <vxe-pager
33
+ v-model:current-page="listQuery.currentPage"
34
+ v-model:page-size="listQuery.pageSize"
35
+ :layouts="layouts"
36
+ :page-sizes="[200, 500, 1000, 2000, 5000, 10000]"
37
+ :total="listQuery.total"
38
+ @page-change="handlePageChange"
39
+ /></template>
40
+ </vxe-grid>
41
+ </template>
42
+ </vxe-modal>
43
+ </template>
44
+
45
+ <script lang="ts">
46
+ export default {
47
+ name: 'UtUpload'
48
+ };
49
+ </script>
50
+ <script setup lang="ts">
51
+ import { reactive, ref, watch, getCurrentInstance } from 'vue';
52
+ import { toDateString } from 'xe-utils';
53
+ import { storageLocal, cookies, warnMessage } from '@utogether/utils';
54
+ import Big from 'big.js';
55
+ import { useI18n } from 'vue-i18n';
56
+ // import type { IRecord, ITableColProps } from '../../types';
57
+ import { VxeTableInstance, VxeGridProps, VxeGridListeners } from 'vxe-table';
58
+ import { VxeUI } from 'vxe-pc-ui';
59
+ import type { VxePagerPropTypes, VxePagerEvents } from 'vxe-pc-ui';
60
+
61
+ export interface IProps {
62
+ defaultParams?: IRecord;
63
+ options?: IRecord;
64
+ columns: Array<ITableColProps>;
65
+ templateData?: Array<ITableColProps>;
66
+ serviceCode?: string;
67
+ url?: string;
68
+ sourceList?: string;
69
+ }
70
+
71
+ const props = withDefaults(defineProps<IProps>(), {
72
+ defaultParams: (): IRecord => {
73
+ return {};
74
+ },
75
+ options: (): IRecord => {
76
+ return {
77
+ filename: '数据模板',
78
+ errorField: 'errorMsg',
79
+ errListField: 'list'
80
+ };
81
+ },
82
+ columns: () => [],
83
+ templateData: () => [],
84
+ sourceList: 'list'
85
+ });
86
+
87
+ const instance = getCurrentInstance()!;
88
+ const serviceApi = instance.appContext.config.globalProperties.$serviceApi;
89
+ const visible = defineModel<boolean>('visible');
90
+
91
+ const { t } = useI18n();
92
+
93
+ const showErrorMsg = ref(false);
94
+
95
+ const dict = storageLocal.getItem('kLov');
96
+
97
+ watch(
98
+ () => visible.value,
99
+ nv => {
100
+ if (nv) {
101
+ gridOptions.data = [];
102
+ }
103
+ }
104
+ );
105
+
106
+ const getColumns = () => {
107
+ const columns = props.columns.map(col => {
108
+ col.slots = { default: col.field };
109
+ col.title = col.field;
110
+ return col;
111
+ });
112
+ const col: ITableColProps = {
113
+ type: 'checkbox',
114
+ width: 40,
115
+ align: 'center',
116
+ fixed: 'left'
117
+ };
118
+ columns.unshift(col);
119
+ return columns;
120
+ };
121
+
122
+ const listQuery = ref({ pageSize: 200, currentPage: 1, total: 0 });
123
+
124
+ const layouts: VxePagerPropTypes.Layouts = [
125
+ 'Sizes',
126
+ 'PrevJump',
127
+ 'PrevPage',
128
+ 'Number',
129
+ 'NextPage',
130
+ 'NextJump',
131
+ 'FullJump',
132
+ 'Total'
133
+ ];
134
+
135
+ const height = window.innerHeight - 25;
136
+
137
+ const xgrid = ref<VxeTableInstance>();
138
+ // 导入的所有数据
139
+ let dataList: ITableColProps[] = [];
140
+
141
+ const importConfig = {
142
+ mode: 'covering',
143
+ types: ['csv', 'xlsx'],
144
+ afterImportMethod: onImportMethod
145
+ };
146
+
147
+ const gridOptions = reactive<VxeGridProps>({
148
+ border: true,
149
+ height,
150
+ data: [],
151
+ importConfig,
152
+ showOverflow: true,
153
+ loading: false,
154
+ toolbarConfig: {
155
+ buttons: [
156
+ {
157
+ code: 'import_plus',
158
+ name: t('message.btn.upload'),
159
+ icon: 'ri-upload-2-line',
160
+ status: 'primary'
161
+ },
162
+ {
163
+ code: 'save_plus',
164
+ name: t('message.btn.save'),
165
+ icon: 'ri-save-3-line',
166
+ status: 'success'
167
+ },
168
+ {
169
+ code: 'del_plus',
170
+ name: t('message.btn.delete'),
171
+ icon: 'ri-delete-bin-line',
172
+ status: 'danger'
173
+ },
174
+ {
175
+ code: 'export_plus',
176
+ name: t('message.btn.downloadTemp'),
177
+ icon: 'ri-download-2-line',
178
+ status: 'warning'
179
+ }
180
+ ],
181
+ tools: [
182
+ {
183
+ code: 'question',
184
+ name: t('message.btn.FAQ'),
185
+ status: 'primary',
186
+ icon: 'vxe-icon-info-circle-fill'
187
+ },
188
+ {
189
+ code: 'replay',
190
+ name: t('message.btn.back'),
191
+ status: 'info',
192
+ icon: 'vxe-icon-undo'
193
+ }
194
+ ]
195
+ },
196
+ columns: getColumns()
197
+ });
198
+
199
+ const gridEvents: VxeGridListeners = {
200
+ toolbarButtonClick({ code }) {
201
+ // const $grid = xgrid.value;
202
+ switch (code) {
203
+ case 'import_plus': {
204
+ handleImport();
205
+ break;
206
+ }
207
+ case 'save_plus': {
208
+ handleSave();
209
+ break;
210
+ }
211
+ case 'del_plus': {
212
+ handleDelete();
213
+ break;
214
+ }
215
+ case 'export_plus': {
216
+ handleDownLoadFile();
217
+ break;
218
+ }
219
+ }
220
+ },
221
+ toolbarToolClick({ code }) {
222
+ // const $grid = xgrid.value;
223
+ switch (code) {
224
+ case 'replay': {
225
+ onClose();
226
+ break;
227
+ }
228
+ case 'question': {
229
+ showImportQuestion();
230
+ break;
231
+ }
232
+ }
233
+ }
234
+ };
235
+
236
+ const handleImport = () => {
237
+ dataList = [];
238
+ xgrid.value?.openImport();
239
+ };
240
+ // 导入后获取数据
241
+ function onImportMethod(options: any) {
242
+ dataList = options.$table.getTableData().fullData;
243
+ // 标题会默认导入,删除第一行
244
+ // dataList.splice(0, 1);
245
+ const columns = getColumns().filter(f => !f.type && f.mapField !== props.options.errorField);
246
+ columns.forEach(col => {
247
+ const idx = dataList.findIndex(data => data[col.field!] === col.field);
248
+ idx !== -1 && dataList.splice(idx, 1);
249
+ });
250
+ props.columns.forEach(col => {
251
+ if (col.dateFormatter || col.valueType === 'number') {
252
+ dataList.forEach(data => {
253
+ if (col.dateFormatter) {
254
+ data[col.field!] = toDateString(data[col.field!], col.dateFormatter || 'yyyy-MM-dd HH:mm:ss');
255
+ } else {
256
+ data[col.field!] = Big(data[col.field!]).toFixed(col.decimal || 6);
257
+ }
258
+ });
259
+ }
260
+ });
261
+ listQuery.value.total = dataList.length;
262
+ getDataList();
263
+ }
264
+
265
+ const getDataList = () => {
266
+ const { currentPage, pageSize } = listQuery.value;
267
+ gridOptions.data = dataList.filter(
268
+ (data, idx) => idx < pageSize * currentPage && idx >= pageSize * (currentPage - 1)
269
+ );
270
+ };
271
+ // 切换页数
272
+ const handlePageChange: VxePagerEvents.PageChange = ({ currentPage, pageSize }) => {
273
+ listQuery.value.currentPage = currentPage;
274
+ listQuery.value.pageSize = pageSize;
275
+ getDataList();
276
+ };
277
+ // 模板下载
278
+ const handleDownLoadFile = () => {
279
+ const data: ITableColProps[] = [];
280
+ if (props.templateData.length) {
281
+ data.push(...props.templateData);
282
+ } else {
283
+ const obj: ITableColProps = {};
284
+ getColumns()
285
+ .filter(f => f.type !== 'checkbox')
286
+ .forEach(col => {
287
+ obj[col.field!] = '案例';
288
+ });
289
+ data.push(obj);
290
+ }
291
+ const opt: IRecord = {
292
+ filename: props.options.filename,
293
+ type: 'xlsx',
294
+ columns: getColumns().filter(f => f.mapField !== props.options.errorField && f.type !== 'checkbox'),
295
+ data
296
+ };
297
+ xgrid.value?.exportData(opt);
298
+ };
299
+
300
+ const handleSave = async () => {
301
+ if (!dataList.length) {
302
+ return warnMessage(t('message.importEmpty'));
303
+ }
304
+ const type = await VxeUI.modal.confirm(t('message.importRecord'));
305
+ if (type === 'confirm') {
306
+ gridOptions.loading = true;
307
+ const { url } = props;
308
+ formatterData('toSave');
309
+ serviceApi
310
+ .post(url, dataList)
311
+ .then((res: any) => {
312
+ if (res?.status === 'error' || res?.length) {
313
+ showErrorMsg.value = true;
314
+ setErrorMessage(res?.length ? res : res[props.options.errListField || props.sourceList]);
315
+ VxeUI.modal.message({
316
+ content: t('message.importFailed'),
317
+ status: 'error'
318
+ });
319
+ } else {
320
+ VxeUI.modal.message({
321
+ content: t('message.importSuccess'),
322
+ status: 'success'
323
+ });
324
+ onClose();
325
+ }
326
+ })
327
+ .finally(() => {
328
+ showErrorMsg.value = false;
329
+ gridOptions.loading = false;
330
+ });
331
+ }
332
+ };
333
+
334
+ /**
335
+ * @description:删除行
336
+ */
337
+ const handleDelete = () => {
338
+ const checkboxRecords = xgrid.value?.getCheckboxRecords();
339
+ if (!checkboxRecords?.length) {
340
+ return VxeUI.modal.message({
341
+ content: t('message.selectedRecord'),
342
+ status: 'warning'
343
+ });
344
+ }
345
+ checkboxRecords.forEach(record => {
346
+ const idx = dataList.findIndex(data => data._X_ROW_KEY === record._X_ROW_KEY)!;
347
+ idx !== -1 && dataList.splice(idx, 1);
348
+ });
349
+ gridOptions.data = dataList;
350
+ };
351
+
352
+ const setErrorMessage = (array: ITableColProps[]) => {
353
+ listQuery.value.total = array.length;
354
+ dataList = array.map((item, idx) => {
355
+ item._X_ROW_KEY = idx;
356
+ return item;
357
+ });
358
+ formatterData('toShow');
359
+ getDataList();
360
+ };
361
+ const formatterData = (formatterType: string) => {
362
+ gridOptions.columns!.forEach((col: any) => {
363
+ if (formatterType === 'toSave') {
364
+ const commonParam = cookies.get('kCookies_param') ? JSON.parse(cookies.get('kCookies_param')!) : {};
365
+ dataList.forEach(data => {
366
+ data[col.mapField] = data[col.field];
367
+ Object.assign(data, commonParam, props.defaultParams);
368
+ });
369
+ } else {
370
+ dataList.forEach(data => {
371
+ data[col.field] = data[col.mapField];
372
+ });
373
+ }
374
+ });
375
+ };
376
+
377
+ const showImportQuestion = () => {
378
+ VxeUI.modal.alert(t('message.importTip'), t('message.udp.tip'));
379
+ };
380
+
381
+ const emit = defineEmits<{ (e: 'close'): void }>();
382
+
383
+ const onClose = () => {
384
+ visible.value = false;
385
+ emit('close');
386
+ };
387
+ </script>
388
+
389
+ <style lang="scss" scoped>
390
+ .ut-input {
391
+ box-sizing: border-box;
392
+ box-sizing: border-box;
393
+ display: inline-block;
394
+ width: 100%;
395
+ height: 28px;
396
+ padding: 0 15px;
397
+ font-size: 13px;
398
+ line-height: 28px;
399
+ color: #606266;
400
+ background-color: #fff;
401
+ background-image: none;
402
+ border: 1px solid #dcdfe6;
403
+ border-radius: 4px;
404
+ outline: 0;
405
+ transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
406
+ transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
407
+ appearance: none;
408
+
409
+ &:hover {
410
+ border-color: #c0c4cc;
411
+ }
412
+
413
+ &:focus {
414
+ border-color: #409eff;
415
+ outline: 0;
416
+ }
417
+
418
+ &:disabled {
419
+ background-color: #f5f7fa;
420
+ outline: none;
421
+ }
422
+ }
423
+ </style>