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

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 (93) hide show
  1. package/build/plugins.ts +6 -1
  2. package/dist/{403-Dp617CWX.js → 403-BuP9jvH9.js} +1 -1
  3. package/dist/{404-Cz_Axb6Y.js → 404-DfQk8kKl.js} +1 -1
  4. package/dist/{500-BGCtRNse.js → 500-OgROWdiZ.js} +1 -1
  5. package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-q2ksfkWH.js} +1 -1
  6. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js → AuthorityInfo.vue_vue_type_style_index_0_lang-Bwsf6lMH.js} +1 -1
  7. package/dist/{Company-IV3GTnzY.js → Company-DgqowAxc.js} +3 -3
  8. package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-BNb1rUhD.js} +16 -16
  9. package/dist/{Department-B3W-OxW8.js → Department-Cl8CROSU.js} +3 -3
  10. package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-D5VkqKeP.js} +1 -1
  11. package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-BGvEusHC.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-BQF1uQ7w.js} +2 -2
  13. package/dist/{DictView-C-i7e4hZ.js → DictView-BnxfaOBv.js} +13 -12
  14. package/dist/InvOrganization-5y79ZLdY.js +66 -0
  15. package/dist/{Org-CA7vTDIF.js → Org-2oBAXN2r.js} +1 -1
  16. package/dist/{Preview-BlDMmpdR.js → Preview-BaGmXH7r.js} +1 -1
  17. package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-DkQdBErt.js} +1 -1
  18. package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-DzB_A_G6.js} +2 -2
  19. package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-DRcMb6ya.js} +1 -1
  20. package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-CeA9xhR4.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CgGtcs5V.js} +1 -1
  22. package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-qaiTMQuT.js} +1 -1
  23. package/dist/{Role-_q3lQ8CZ.js → Role-DsFulAjq.js} +3 -3
  24. package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DMRdocpa.js} +3 -3
  25. package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-B9POS_pg.js} +1 -1
  26. package/dist/{RolePanel-BQb1LlhD.js → RolePanel-wXVysDHM.js} +1 -1
  27. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-CleVvkcY.js} +3 -3
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js → RolePanel.vue_vue_type_script_setup_true_lang-t6S_0zmJ.js} +1 -1
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-DlXUs0j9.js} +1 -1
  30. package/dist/{Staff-BSf9Ypbk.js → Staff-Cq4V7ruC.js} +3 -3
  31. package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-CJDKMbud.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-DQ4DL1KY.js} +1 -1
  33. package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-CG-uggdr.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-DAgN7zN2.js} +2 -2
  35. package/dist/{SysUser-FAABuNti.js → SysUser-kwnzRNdD.js} +2 -2
  36. package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-DTlZf3vk.js} +1 -1
  37. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BW6PlGjM.js} +1 -1
  38. package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-BVT0n-L2.js} +21 -21
  39. package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BbTQ9Zat.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-D_bpYDmI.js} +1 -1
  41. package/dist/{childView-C_HmDQNd.js → childView-BJbIhjmf.js} +1 -1
  42. package/dist/{childView-uUlBcTza.js → childView-DCsGFrG-.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-BCDxpVoD.js} +1 -1
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-CDtsalCm.js} +1 -1
  45. package/dist/{code-rule-AgCVDKFy.js → code-rule-DePU6cdp.js} +1 -1
  46. package/dist/core.es.js +1 -1
  47. package/dist/{cron-task-C6FgQxTi.js → cron-task-DUM1SIGL.js} +1 -1
  48. package/dist/{frameView-BDgISK7N.js → frameView-CEUTDtSm.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-DzOzUkf6.js → index-ZdgOD7cF.js} +59 -48
  53. package/dist/{layoutView-yb3DV2DQ.js → layoutView-PCjwVwkX.js} +109 -108
  54. package/dist/{login-RRpljbkm.js → login-B1CjWVKu.js} +2 -2
  55. package/dist/{lov-view-C9-rjzZR.js → lov-view-D8wwkxFJ.js} +2 -2
  56. package/dist/{menuInfo-CzPQyFhp.js → menuInfo-B5JKVwrB.js} +1 -1
  57. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-CcM9WX4n.js} +97 -96
  58. package/dist/{pda-app-Dvy3U-b6.js → pda-app-DIa1p1Ww.js} +1 -1
  59. package/dist/{resource-Fy0lFkSV.js → resource-CCQ7Dd-5.js} +1 -1
  60. package/dist/{su-welcome-DYvSCUST.js → su-welcome-CLp9YaJa.js} +1 -1
  61. package/dist/{sys-config-DJ1vNQTy.js → sys-config-BBmf_SqF.js} +1 -1
  62. package/dist/udp-core.css +2 -2
  63. package/dist/{utogether-CjmJiHoE.js → utogether-Bkptx2lB.js} +1 -1
  64. package/package.json +18 -18
  65. package/src/App.vue +70 -70
  66. package/src/components/udp/form-upload.vue +71 -20
  67. package/src/components/udp/grid.vue +500 -0
  68. package/src/components/udp/index.ts +7 -4
  69. package/src/components/udp/lov.vue +410 -0
  70. package/src/components/udp/modal-form.vue +2 -2
  71. package/src/components/udp/modal-grid.vue +297 -0
  72. package/src/components/udp/utils.ts +379 -40
  73. package/src/layout/components/lay-navbar/index.vue +1 -1
  74. package/src/layout/components/lay-panel/index.vue +150 -150
  75. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  76. package/src/layout/components/lay-tag/index.vue +625 -625
  77. package/src/layout/layoutView.vue +215 -215
  78. package/src/main.ts +4 -3
  79. package/src/plugins/i18n/en.ts +291 -289
  80. package/src/plugins/i18n/zh.ts +338 -337
  81. package/src/plugins/vxe-table/index.ts +53 -46
  82. package/src/plugins/vxe-table/render.tsx +4 -2
  83. package/src/style/button.scss +85 -78
  84. package/src/style/tailwind.css +1 -68
  85. package/src/style/vxetable.scss +258 -256
  86. package/src/views/organization/company/CompanyPanel.vue +259 -259
  87. package/src/views/organization/inv-org/InvOrganization.vue +2 -3
  88. package/src/views/system/menu/SystemMenu.vue +197 -197
  89. package/src/views/system/menu/menuInfo.vue +372 -371
  90. package/src/views/udev/dict/DictView.vue +106 -106
  91. package/src/views/udev/lov/lov-view.vue +91 -91
  92. package/vite.config.ts +4 -1
  93. package/dist/InvOrganization-cfT6riGU.js +0 -260
@@ -1,40 +1,379 @@
1
- import { useRender } from '@utogether/utils';
2
-
3
- export const getAttrs = attrs => {
4
- const data = {};
5
- Object.keys(attrs).forEach(key => {
6
- const nKey = key.replace(/-(\w)/g, str => str.slice(1).toUpperCase());
7
- data[nKey] = attrs[key];
8
- });
9
- return data;
10
- };
11
-
12
- export const formatItems = (items, status, span = 24) => {
13
- const renderHook = useRender();
14
-
15
- if (!items.length) return items;
16
- return items.map(item => {
17
- item.title = item.title || `message.${item.field}`;
18
- item.span = item.span || span;
19
- let disabled = false;
20
- if (status === 'detail') {
21
- disabled = true;
22
- item.placeholder = null;
23
- } else {
24
- disabled =
25
- item.disabled === false ? item.disabled : item.disabled || item.itemRender?.props?.disabled;
26
- }
27
- let itemRender = {
28
- name: 'VxeInput',
29
- props: { disabled, placeholder: disabled ? '' : item.placeholder }
30
- };
31
- if (item.code && !item.itemRender) {
32
- itemRender = renderHook.renderDict(item.code);
33
- }
34
- item.itemRender = item.itemRender || itemRender;
35
- item.itemRender['props'] = Object.assign(item.itemRender.props || {}, {
36
- disabled
37
- });
38
- return item;
39
- });
40
- };
1
+ /*
2
+ * @Author: levi7754 levi7754@163.com
3
+ * @Date: 2025-07-14 17:38:38
4
+ * @LastEditors: levi7754 levi7754@163.com
5
+ * @LastEditTime: 2025-07-23 10:31:52
6
+ * @FilePath: \udp-front\packages\udp-core\src\components\udp\utils.ts
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ */
9
+ import { clone, isString, isEmpty, toDateString, isObject, isFunction } from 'xe-utils';
10
+ import { cookies, storageLocal } from '@utogether/utils';
11
+ /** 系统配置的key */
12
+ const kSYSCONFIG = 'kSysConfig';
13
+ const kCOOKIES = 'kCookies_param';
14
+
15
+ const sysConfig = storageLocal.getItem(kSYSCONFIG);
16
+
17
+ /** 工具栏按钮标准化 */
18
+ export const formatButton = (buttons, auth?) => {
19
+ buttons.forEach(btn => {
20
+ btn.auth = auth ? auth[btn.code] || btn.auth : btn.auth;
21
+ if (!btn.name) {
22
+ btn.name = `message.btn.${btn.code}`;
23
+ } else if (sysConfig?.i18nEnabled === 'Y' && !btn.name.startsWith('message.')) {
24
+ btn.name = `message.btn.${btn.name}`;
25
+ }
26
+ if (btn.dropdowns?.length) {
27
+ formatButton(btn.dropdowns, auth);
28
+ }
29
+ });
30
+ return buttons;
31
+ };
32
+
33
+ /**
34
+ * @description 查询10W数据,常用于Excel导出
35
+ * @param props 查询接口的路径
36
+ * @param http http实例
37
+ * @param form 查询条件
38
+ * @returns 查询返回的数据
39
+ */
40
+ export const queryAll = (props, http, form) => {
41
+ const params = { pageNum: 1, pageSize: 100000 };
42
+ const commonParam = getCookieParam();
43
+ Object.assign(params, form, commonParam, props.defaultParams || {});
44
+ const query = formatDateRange(params, props.items);
45
+
46
+ const { url } = props;
47
+ if (!url) return null;
48
+ const requestURL = isString(url) ? url : url.fetch || url.restful;
49
+ if (!requestURL) return null;
50
+ const method = url.fetch ? 'post' : 'get';
51
+ return new Promise((resolve, reject) => {
52
+ http[method](requestURL, query)
53
+ .then((response: IResponseData) => {
54
+ resolve(response.list);
55
+ })
56
+ .catch((e: any) => {
57
+ reject(e);
58
+ });
59
+ });
60
+ };
61
+
62
+ /**
63
+ * @description 查询服务
64
+ * @param props 查询接口的路径
65
+ * @param form 查询条件
66
+ * @param page 分页参数
67
+ * @param http http实例
68
+ * @param isDoc doc文档
69
+ * @returns Promise
70
+ */
71
+ export const query = (props, form, page, http, isDoc) => {
72
+ if (isDoc) return getDocData();
73
+ for (const key in form) {
74
+ if (form[key] && isString(form[key])) {
75
+ form[key] = form[key].trim();
76
+ }
77
+ }
78
+ const params = { pageNum: page.currentPage, pageSize: page.pageSize };
79
+ const commonParam = getCookieParam();
80
+ Object.assign(params, commonParam, props.defaultParams || {}, form);
81
+ const query = formatDateRange(params, props.items);
82
+ const { url } = props;
83
+ console.log(query);
84
+ if (!url) return null;
85
+ const requestURL = isString(url) ? url : url.fetch || url.restful;
86
+ const method = url.fetch ? 'post' : 'get';
87
+ if (!requestURL) return null;
88
+ return http[method](requestURL, query);
89
+ };
90
+
91
+ /**
92
+ * @description 表格删除方法
93
+ * @param http http实例
94
+ * @param records 记录行
95
+ * @param props 删除接口的路径
96
+ * @returns Promise
97
+ */
98
+ export const del = (http, records, props) => {
99
+ const { url } = props;
100
+ if (!url) return null;
101
+ const requestURL = isString(url) ? url : url.del || url.restful;
102
+ if (!requestURL) return null;
103
+ const method = url.del ? 'post' : 'delete';
104
+ return http[method](requestURL, records);
105
+ };
106
+
107
+ /** 更新服务 */
108
+ export const save = (http, body, props) => {
109
+ const allService = [];
110
+ const { url } = props;
111
+ if (!url) return null;
112
+
113
+ const { insertRecords, updateRecords } = body;
114
+ if (!isEmpty(insertRecords)) {
115
+ const commonParam = getCookieParam();
116
+ insertRecords.forEach(m => {
117
+ !isEmpty(props?.defaultValue) && Object.assign(m, props.defaultValue);
118
+ Object.keys(commonParam)?.forEach(key => {
119
+ m[key] = m[key] || commonParam[key];
120
+ });
121
+ });
122
+ const requestURL = isString(url) ? url : url.add || url.restful;
123
+ requestURL && allService.push(http.post(requestURL, insertRecords));
124
+ }
125
+ if (!isEmpty(updateRecords)) {
126
+ const requestURL = isString(url) ? url : url.save || url.restful;
127
+ const method = url.save ? 'post' : 'put';
128
+ requestURL && allService.push(http[method](requestURL, updateRecords));
129
+ }
130
+ return allService;
131
+ };
132
+
133
+ const startFormatter = 'yyyy-MM-dd 00:00:00';
134
+ const endFormatter = 'yyyy-MM-dd 23:59:59';
135
+ const formatDateRange = (listQuery: any, items) => {
136
+ const dateRanges = items.filter(
137
+ f => f.itemRender?.name === '#SuDateRange' || f.itemRender?.props?.multiple || f.multiple
138
+ );
139
+ if (isEmpty(dateRanges)) return listQuery;
140
+ const query = clone(listQuery, true);
141
+ dateRanges.forEach((element: any) => {
142
+ if (element.multiple || element.itemRender?.props?.multiple) {
143
+ query[element.field] = query[element.field]?.join(',');
144
+ } else {
145
+ const val = query[element.field];
146
+ if (val && element.toField) {
147
+ query[element.fromField] = toDateString(val[0], startFormatter);
148
+ query[element.toField] = toDateString(val[1], endFormatter);
149
+ } else if (val) {
150
+ query[`${element.field}From`] = toDateString(val[0], startFormatter);
151
+ query[`${element.field}To`] = toDateString(val[1], endFormatter);
152
+ }
153
+ delete query[element.field];
154
+ }
155
+ });
156
+ return query;
157
+ };
158
+
159
+ const getCookieParam = () => {
160
+ return cookies.get(kCOOKIES) ? JSON.parse(cookies.get(kCOOKIES)) : {};
161
+ };
162
+
163
+ /** 工具栏默认按钮组 */
164
+ export const inlineButtons = [
165
+ {
166
+ code: 'insert_actived',
167
+ name: 'add',
168
+ status: 'u-cyan',
169
+ icon: 'vxe-icon-add',
170
+ auth: 'add'
171
+ },
172
+ {
173
+ code: 'delete',
174
+ status: 'danger',
175
+ icon: 'vxe-icon-delete',
176
+ auth: 'del'
177
+ },
178
+ {
179
+ code: 'save',
180
+ status: 'primary',
181
+ icon: 'vxe-icon-save',
182
+ auth: 'edit'
183
+ }
184
+ ];
185
+ // form 模式按钮
186
+ export const dialogButtons = [
187
+ {
188
+ code: 'add',
189
+ status: 'u-cyan',
190
+ icon: 'vxe-icon-add',
191
+ auth: 'add'
192
+ },
193
+ {
194
+ code: 'delete',
195
+ status: 'danger',
196
+ icon: 'vxe-icon-delete',
197
+ auth: 'del'
198
+ }
199
+ ];
200
+
201
+ export const defaultColums = [
202
+ { field: 'createdByName', width: 90, visible: false },
203
+ { field: 'creationDate', width: 140, visible: false },
204
+ { field: 'lastUpdatedByName', width: 90, visible: false },
205
+ { field: 'lastUpdateDate', width: 140, visible: false }
206
+ ];
207
+
208
+ /** 导出配置 */
209
+ export const getExportConfig = attrs => {
210
+ if (isObject(attrs.exportConfig)) return attrs.exportConfig;
211
+ return {
212
+ filename: attrs.fileName || '导出明细',
213
+ type: 'xlsx',
214
+ types: ['xlsx', 'csv'],
215
+ modes: ['current', 'selected', 'all'],
216
+ useStyle: true,
217
+ sheetMethod: ({ worksheet }) =>
218
+ attrs.onSheetMethod ? attrs.onSheetMethod(worksheet) : onSheetMethod(worksheet),
219
+ columnFilterMethod: ({ column }) =>
220
+ attrs.columnFilter
221
+ ? !!attrs.columnFilter(column)
222
+ : !['operate'].includes(column.field) && column.type !== 'checkbox'
223
+ };
224
+ };
225
+
226
+ export const getToolBarConfig = (data, props, attrs, hasAuthority) => {
227
+ const refresh = {
228
+ icon: 'ri-refresh-line',
229
+ iconLoading: 'vxe-icon-spinner roll vxe-loading--default-icon'
230
+ };
231
+ // 不可编辑时
232
+ if (!props.editable) {
233
+ data.editConfig.editable = props.editable;
234
+ const hasExport = props.needExport && hasAuthority('export');
235
+ if (hasExport) {
236
+ data.exportConfig = getExportConfig(attrs);
237
+ }
238
+ data.toolbarConfig = {
239
+ buttons: [],
240
+ enabled: hasExport,
241
+ refresh,
242
+ export: { icon: 'ri-download-2-line', code: 'export' },
243
+ custom: !!attrs.gridId,
244
+ perfect: true
245
+ };
246
+ return data;
247
+ }
248
+
249
+ // 先设置传入的按钮
250
+ let buttons = clone(attrs.buttons || [], true);
251
+
252
+ // 获取默认的按钮
253
+ const toolButtons = attrs.mode !== 'form' ? clone(inlineButtons, true) : clone(dialogButtons, true);
254
+ // 判断传入的按钮是否有默认按钮的auth,有就不加入按钮组中,相当于重写了默认的按钮
255
+ // reverse的原因是: 保持现有按钮顺序, 新增,保存,删除
256
+ toolButtons.reverse().forEach(btn => {
257
+ !buttons.some(s => s.code === btn.code) && buttons.unshift(btn);
258
+ if (attrs.authPrefix && !['print', 'export'].includes(btn.auth)) {
259
+ btn.auth =
260
+ attrs.authPrefix +
261
+ btn.auth.slice(0, 1).toLocaleUpperCase() +
262
+ btn.auth.slice(1).toLocaleLowerCase();
263
+ }
264
+ });
265
+
266
+ buttons = formatButton(buttons, props.auth).filter(button => {
267
+ const flag = button.auth ? hasAuthority(button.auth) : true;
268
+ if (button.dropdowns?.length) {
269
+ button.dropdowns = button.dropdowns.filter(
270
+ btn => !btn.auth || (btn.auth && hasAuthority(btn.auth))
271
+ );
272
+ }
273
+ return flag;
274
+ });
275
+ // inline 行内模式,单击行模式
276
+ const editConfig = { trigger: 'dblclick', mode: 'row', showStatus: true };
277
+ data.editConfig = attrs.mode !== 'form' ? editConfig : { enabled: false };
278
+ // 导出权限
279
+ const hasExport = props.needExport && hasAuthority('export');
280
+ let exportBtn = null;
281
+ if (hasExport) {
282
+ data.exportConfig = getExportConfig(attrs);
283
+ exportBtn = { icon: 'ri-download-2-line', code: 'export' };
284
+ }
285
+ data.toolbarConfig = {
286
+ buttons,
287
+ enabled: true,
288
+ refresh,
289
+ custom: !!attrs.gridId,
290
+ export: exportBtn,
291
+ perfect: true
292
+ };
293
+ return data;
294
+ };
295
+
296
+ /**
297
+ * @description: 表格脚合并方法
298
+ * @param {*} columns 列数据
299
+ * @param {*} data 数据源
300
+ * @param {*} sum 合并属性
301
+ * @return {*} 合并脚方法
302
+ */
303
+ export const footerSumMethod = ({ columns, data }, sum) => {
304
+ return [
305
+ columns.map((column, columnIdx) => {
306
+ if (columnIdx === (sum.index || 0)) {
307
+ return sum.label || '合计';
308
+ }
309
+ if (sum.fields?.includes(column.property)) {
310
+ const total = data.reduce((prev, cur) => {
311
+ return prev + Number(cur[column.property] || 0);
312
+ }, 0);
313
+ return total ? Number(total.toFixed(sum.decimal || 2)) : total;
314
+ }
315
+ return '';
316
+ })
317
+ ];
318
+ };
319
+
320
+ /**
321
+ * @description: checkbox是否可选
322
+ */
323
+ export const onCheckMethod = (row, props) => {
324
+ if (isFunction(props.checkMethod)) {
325
+ return props.checkMethod(row);
326
+ }
327
+ return true;
328
+ };
329
+
330
+ /*** excel样式重置 */
331
+ const onSheetMethod = ws => {
332
+ ws.eachRow((row, rowNumber) => {
333
+ row.font = { name: '微软雅黑', size: 9 };
334
+ row.border = {
335
+ top: { style: 'thin' },
336
+ left: { style: 'thin' },
337
+ bottom: { style: 'thin' },
338
+ right: { style: 'thin' }
339
+ };
340
+
341
+ if (rowNumber === 1) {
342
+ row.fill = {
343
+ type: 'pattern',
344
+ pattern: 'solid',
345
+ fgColor: { argb: '4F81BD' }
346
+ };
347
+ row.font = {
348
+ name: '微软雅黑',
349
+ size: 10,
350
+ bold: true,
351
+ color: { argb: 'FFFFFFFF' }
352
+ };
353
+ }
354
+ });
355
+ };
356
+
357
+ const getDocData = () => {
358
+ return new Promise(resolve => {
359
+ setTimeout(() => {
360
+ const list = [
361
+ { id: 1, name: 'Test1', sex: 'Man', age: 28, address: 'Shenzhen' },
362
+ { id: 2, name: 'Test2', sex: 'Women', age: 22, address: 'Guangzhou' },
363
+ { id: 3, name: 'Test3', sex: 'Man', age: 32, address: 'Shanghai' },
364
+ { id: 4, name: 'Test4', sex: 'Women', age: 23, address: 'test abc' },
365
+ { id: 5, name: 'Test5', sex: 'Women', age: 30, address: 'Shanghai' }
366
+ ];
367
+ resolve({ list, total: 5 });
368
+ }, 100);
369
+ });
370
+ };
371
+
372
+ export const getAttrs = attrs => {
373
+ const data = {};
374
+ Object.keys(attrs).forEach(key => {
375
+ const nKey = key.replace(/-(\w)/g, str => str.slice(1).toUpperCase());
376
+ data[nKey] = attrs[key];
377
+ });
378
+ return data;
379
+ };
@@ -6,7 +6,7 @@
6
6
  * @Description: file content
7
7
  -->
8
8
  <template>
9
- <div class="system-navbar bg-[#fff] shadow-sm shadow-[rgba(0, 21, 41, 0.08)] dark:shadow-[#0d0d0d]">
9
+ <div class="system-navbar bg-white shadow-sm shadow-[rgba(0, 21, 41, 0.08)] dark:shadow-[#0d0d0d]">
10
10
  <Hamburger
11
11
  v-if="layout !== 'mix'"
12
12
  :is-active="appHook.sidebar.opened"