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

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 (147) hide show
  1. package/build/plugins.ts +39 -32
  2. package/dist/{403-Dp617CWX.js → 403-Dsgsr2M-.js} +1 -1
  3. package/dist/{404-Cz_Axb6Y.js → 404-DmPHEfqM.js} +1 -1
  4. package/dist/{500-BGCtRNse.js → 500-OYEgHR2a.js} +1 -1
  5. package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-B1H1txG-.js} +1 -1
  6. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BUlmQtjQ.js +100 -0
  7. package/dist/{Company-IV3GTnzY.js → Company-C8ojgx93.js} +3 -3
  8. package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-Dageer1t.js} +16 -16
  9. package/dist/{Department-B3W-OxW8.js → Department-Dr94_85I.js} +3 -3
  10. package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-Bc5r1HpT.js} +1 -1
  11. package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-CcWt1Myp.js} +1 -1
  12. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-CKA6nx1l.js} +24 -26
  13. package/dist/DictView-BHj6wexC.js +110 -0
  14. package/dist/InvOrganization-DP3Le9g-.js +72 -0
  15. package/dist/Org-BRGHTwsw.js +39 -0
  16. package/dist/{Preview-BlDMmpdR.js → Preview-CqMaUD_3.js} +1 -1
  17. package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-PEQdTCOY.js} +1 -1
  18. package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CB4bv8ba.js} +43 -43
  19. package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-B7t4lMK0.js} +1 -1
  20. package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-VBxUIMRJ.js} +1 -1
  21. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-HeLA4Qs5.js} +1 -1
  22. package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DNkv7F5p.js} +28 -28
  23. package/dist/{Role-_q3lQ8CZ.js → Role-BGfTpZK4.js} +6 -6
  24. package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DrKFWZzA.js} +8 -8
  25. package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-3lvRh7aS.js} +1 -1
  26. package/dist/{RolePanel-BQb1LlhD.js → RolePanel-BRI5QYe4.js} +1 -1
  27. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-BXKZb7yt.js +132 -0
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-Cci_Ysty.js} +44 -38
  29. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-BmId6zzA.js} +21 -21
  30. package/dist/{Staff-BSf9Ypbk.js → Staff-Dr0dq3fW.js} +3 -3
  31. package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-_N9g2hPa.js} +1 -1
  32. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-DiTJY2ug.js} +11 -11
  33. package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-mxJQiW3G.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-GRGn-5t6.js} +2 -2
  35. package/dist/{SysUser-FAABuNti.js → SysUser-DgA19hZE.js} +2 -2
  36. package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-Bc85z5_K.js} +1 -1
  37. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BHDrP1Pk.js +294 -0
  38. package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-Be-gFIie.js} +26 -26
  39. package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BCYuwFmr.js} +1 -1
  40. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-B1lgokO6.js} +39 -37
  41. package/dist/{childView-C_HmDQNd.js → childView-DhcBr1UA.js} +1 -1
  42. package/dist/{childView-uUlBcTza.js → childView-Dk4zZoXd.js} +1 -1
  43. package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-CVnLnl03.js} +40 -40
  44. package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-D4GYVhOc.js} +1 -1
  45. package/dist/{code-rule-AgCVDKFy.js → code-rule-BSwPwuAL.js} +9 -10
  46. package/dist/core.es.js +14 -11
  47. package/dist/{cron-task-C6FgQxTi.js → cron-task-T1ztyra7.js} +1 -1
  48. package/dist/{frameView-BDgISK7N.js → frameView-BDgngiBq.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-BSj2AtVL.js +4468 -0
  53. package/dist/{layoutView-yb3DV2DQ.js → layoutView-i7dLLBzJ.js} +1181 -1176
  54. package/dist/{login-RRpljbkm.js → login-K5Ludp8x.js} +105 -113
  55. package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
  56. package/dist/{lov-view-C9-rjzZR.js → lov-view-lAexiucu.js} +2 -2
  57. package/dist/{menuInfo-CzPQyFhp.js → menuInfo-BaN5YZPp.js} +1 -1
  58. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-yI4QOYxG.js} +100 -97
  59. package/dist/{pda-app-Dvy3U-b6.js → pda-app-DEtDXFvM.js} +211 -197
  60. package/dist/{resource-Fy0lFkSV.js → resource-Bztmz7pn.js} +15 -15
  61. package/dist/{su-welcome-DYvSCUST.js → su-welcome-Bx8nBPi9.js} +109 -110
  62. package/dist/sys-config-nvrtYGgi.js +290 -0
  63. package/dist/udp-core.css +2 -2
  64. package/dist/{utogether-CjmJiHoE.js → utogether-yPnwDAIH.js} +1 -1
  65. package/index.ts +40 -36
  66. package/package.json +18 -18
  67. package/src/App.vue +65 -70
  68. package/src/api/index.ts +31 -31
  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 +13 -3
  81. package/src/components/udp/modal-grid.vue +298 -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 +239 -237
  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-select-org/index.vue +64 -69
  89. package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
  90. package/src/layout/components/lay-sidebar/horizontal.vue +190 -191
  91. package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
  92. package/src/layout/components/lay-sidebar/sidebar-logo.vue +92 -98
  93. package/src/layout/components/lay-tag/index.vue +625 -625
  94. package/src/layout/hooks/useNav.ts +173 -173
  95. package/src/layout/layoutView.vue +215 -215
  96. package/src/main.ts +119 -109
  97. package/src/plugins/i18n/en.ts +302 -289
  98. package/src/plugins/i18n/zh.ts +349 -337
  99. package/src/plugins/vxe-table/index.ts +53 -46
  100. package/src/plugins/vxe-table/render.tsx +956 -817
  101. package/src/router/index.ts +177 -183
  102. package/src/router/modules/remaining.ts +58 -83
  103. package/src/store/modules/permission.ts +1 -4
  104. package/src/style/button.scss +85 -78
  105. package/src/style/tailwind.css +1 -68
  106. package/src/style/vxetable.scss +44 -11
  107. package/src/utils/authority/index.ts +1 -1
  108. package/src/utils/{http → udp/http}/index.ts +283 -297
  109. package/src/utils/{http → udp/http}/types.d.ts +8 -5
  110. package/src/utils/udp/useRender.ts +17 -6
  111. package/src/views/login/login-view.vue +300 -314
  112. package/src/views/organization/company/CompanyPanel.vue +259 -259
  113. package/src/views/organization/inv-org/InvOrganization.vue +68 -54
  114. package/src/views/organization/org/Org.vue +9 -5
  115. package/src/views/system/menu/SystemMenu.vue +183 -197
  116. package/src/views/system/menu/menuInfo.vue +363 -371
  117. package/src/views/system/role/AuthorityInfo.vue +19 -15
  118. package/src/views/system/role/Role.vue +1 -5
  119. package/src/views/system/role/RolePanel.vue +11 -2
  120. package/src/views/system/role/UserInfo.vue +195 -193
  121. package/src/views/system/role-assign/RoleAssign.vue +57 -57
  122. package/src/views/system/role-assign/RolePanel.vue +139 -136
  123. package/src/views/system/sys/sys-config.vue +287 -291
  124. package/src/views/system/sysUser/SysUserPanel.vue +278 -278
  125. package/src/views/uapp/pda/pda-app.vue +208 -176
  126. package/src/views/udev/dict/DictView.vue +118 -106
  127. package/src/views/udev/dict/childView.vue +7 -7
  128. package/src/views/udev/lov/lov-view.vue +91 -91
  129. package/src/views/ufile/aggregation/File.vue +5 -5
  130. package/src/views/ufile/file/water-mark.vue +14 -14
  131. package/src/views/uhome/su-welcome.vue +3 -3
  132. package/src/views/ulogin/login.vue +12 -8
  133. package/src/views/upms/user/login-log.vue +1 -1
  134. package/src/views/urpt/design/DesignPanel.vue +507 -526
  135. package/src/views/urpt/design/ReportDesign.vue +15 -19
  136. package/src/views/urpt/static-resource/resource.vue +3 -3
  137. package/src/views/urpt/template/ReportTemplate.vue +7 -7
  138. package/types/global.d.ts +2 -1
  139. package/vite.config.ts +6 -2
  140. package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
  141. package/dist/DictView-C-i7e4hZ.js +0 -95
  142. package/dist/InvOrganization-cfT6riGU.js +0 -260
  143. package/dist/Org-CA7vTDIF.js +0 -35
  144. package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
  145. package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
  146. package/dist/index-DzOzUkf6.js +0 -3388
  147. package/dist/sys-config-DJ1vNQTy.js +0 -277
@@ -0,0 +1,388 @@
1
+ <template>
2
+ <div class="ut-lov-wrapper">
3
+ <vxe-modal
4
+ v-if="mode === 'vxe'"
5
+ v-model="showLovModal"
6
+ :width="modalWidth"
7
+ :destroy-on-close="false"
8
+ :title="lovTitle"
9
+ :transfer="transfer"
10
+ height="66%"
11
+ resize
12
+ esc-closable
13
+ show-footer
14
+ :class-name="className"
15
+ :before-hide-method="beforeHideMethod"
16
+ >
17
+ <template #default>
18
+ <vxe-grid ref="xgrid" v-bind="data" resizable @cell-dblclick="onCellClick" />
19
+ </template>
20
+ <template #footer>
21
+ <vxe-button :content="$t('message.btn.cancel')" icon="ri-close-line" status="warning" @click="onClose" />
22
+ <vxe-button :content="$t('message.btn.confirm')" icon="ri-save-3-line" status="primary" @click="onConfirm" />
23
+ </template>
24
+ </vxe-modal>
25
+ <el-dialog
26
+ v-else
27
+ v-model="showLovModal"
28
+ :width="modalWidth"
29
+ :show-close="false"
30
+ :title="lovTitle"
31
+ :append-to-body="transfer"
32
+ draggable
33
+ destroy-on-close
34
+ close-on-press-escape
35
+ >
36
+ <template #default>
37
+ <div style="height: 360px">
38
+ <vxe-grid ref="xgrid" v-bind="data" resizable @cell-dblclick="onCellClick" />
39
+ </div>
40
+ </template>
41
+ <template #footer>
42
+ <vxe-button :content="$t('message.btn.cancel')" icon="ri-close-line" status="warning" @click="onClose" />
43
+ <vxe-button :content="$t('message.btn.confirm')" icon="ri-save-3-line" status="primary" @click="onConfirm" />
44
+ </template>
45
+ </el-dialog>
46
+ <vxe-input
47
+ v-model="record[displayName || field]"
48
+ :clearable="!disabled && clearable"
49
+ :disabled="disabled"
50
+ :readonly="readonly"
51
+ :placeholder="placeholder"
52
+ style="width: 100%"
53
+ type="search"
54
+ size="mini"
55
+ @search-click="onSeach"
56
+ @clear="onClear"
57
+ />
58
+ </div>
59
+ </template>
60
+
61
+ <script lang="ts">
62
+ export default {
63
+ name: 'UtLov'
64
+ };
65
+ </script>
66
+
67
+ <script setup lang="ts">
68
+ // @ts-nocheck
69
+ import { ref, reactive, getCurrentInstance } from 'vue';
70
+ import { VxeGridProps } from 'vxe-table';
71
+ import to from 'await-to-js';
72
+ import { clone, toDateString, isEmpty } from 'xe-utils';
73
+ import { useRender, cookies, delay } from '@utogether/utils';
74
+ // import type { IFormItemProps, IRecord } from '../../types';
75
+
76
+ export interface IProps {
77
+ record: object;
78
+ defaultParams?: object;
79
+ code: string;
80
+ field: string;
81
+ displayName?: string;
82
+ placeholder?: string;
83
+ mode?: string;
84
+ clearable?: boolean;
85
+ multiple?: boolean;
86
+ disabled?: boolean;
87
+ autoLoad?: boolean;
88
+ readonly?: boolean;
89
+ transfer?: boolean;
90
+ }
91
+ const props = withDefaults(defineProps<IProps>(), {
92
+ record: () => {
93
+ return {};
94
+ },
95
+ defaultParams: () => {
96
+ return {};
97
+ },
98
+ mode: 'vxe',
99
+ placeholder: '请选择',
100
+ clearable: true,
101
+ multiple: false,
102
+ disabled: false,
103
+ readonly: true,
104
+ autoLoad: true
105
+ });
106
+
107
+ const instance = getCurrentInstance()!;
108
+ const serviceApi = instance.appContext.config.globalProperties.$serviceApi;
109
+
110
+ const minWidth = 600;
111
+ const showLovModal = ref(false);
112
+ const modalWidth = ref(minWidth);
113
+ const lovTitle = ref('');
114
+ const className = ref('vxe-table--ignore-clear');
115
+
116
+ const data = reactive<VxeGridProps>({
117
+ loading: false,
118
+ border: true,
119
+ pagerConfig: {},
120
+ formConfig: { titleWidth: 90, titleAlign: 'right', items: [] },
121
+ height: 'auto',
122
+ editConfig: {},
123
+ rowConfig: { keyField: '_X_ROW_KEY' },
124
+ proxyConfig: {
125
+ form: true, // 查询是需要启用表单代理
126
+ autoLoad: false,
127
+ response: {
128
+ result: 'list',
129
+ total: 'total'
130
+ },
131
+ ajax: {
132
+ query: ({ page, form }) => {
133
+ const commonParam = cookies.get('kCookies_param') ? JSON.parse(cookies.get('kCookies_param')) : {};
134
+ let queryParams = Object.assign({}, form, commonParam, props.defaultParams);
135
+ queryParams.pageNum = page?.currentPage || 1;
136
+ queryParams.pageSize = page?.pageSize || 20;
137
+ if (!props.readonly) {
138
+ const { field, displayName } = props;
139
+ // 非只读时,意味着可录入文本,此时查询是需要加上录入的文本内容作为条件
140
+ queryParams[displayName || field] = props.record[displayName || field];
141
+ }
142
+ // console.log(queryParams);
143
+ queryParams = formatterParam(queryParams);
144
+ if (lovData.lovType !== 'url') {
145
+ queryParams.lovCode = props.code;
146
+ return serviceApi.get('/upfm/v1/lovViewHeader/listBySql', queryParams);
147
+ }
148
+ return serviceApi.get(lovData.lovUrl, queryParams);
149
+ }
150
+ }
151
+ },
152
+ checkboxConfig: {},
153
+ columns: []
154
+ });
155
+
156
+ // const displayName = ref(null);
157
+ let lovData = undefined;
158
+ let dataList = [];
159
+
160
+ const formatterParam = params => {
161
+ const columns = dataList.filter(col => ['date', 'month'].includes(col.fieldType) && col.isSearch);
162
+ columns.forEach(col => {
163
+ if (col.fieldType === 'date') {
164
+ params[col.field] = toDateString(params[col.field], 'yyyy-MM-dd 00:00:00');
165
+ } else if (col.fieldType === 'month') {
166
+ params[col.field] = toDateString(params[col.field], 'yyyy-MM');
167
+ }
168
+ });
169
+ return params;
170
+ };
171
+ // 查询字段
172
+ const getFormItem = () => {
173
+ const items = clone(dataList, true).filter(col => col.isSearch === 'Y');
174
+ if (!items.length) return;
175
+ // console.log(items);
176
+ const isCollapse = items.length > 2;
177
+ const forItems: IFormItemProps[] = items
178
+ .sort((a, b) => a.seqNo - b.seqNo)
179
+ .map((item: IRecord, idx) => {
180
+ return {
181
+ field: item.colField,
182
+ title: item.colTitle,
183
+ span: 8,
184
+ folding: idx > 1,
185
+ itemRender: getItemRender(item)
186
+ };
187
+ });
188
+ searchBtn.collapseNode = isCollapse;
189
+ if (isCollapse) {
190
+ // 按钮设置为 折叠节点并将搜索按钮插入到第一列的最后
191
+ forItems.splice(2, 0, searchBtn);
192
+ } else {
193
+ forItems.push(searchBtn);
194
+ }
195
+ data.formConfig.items = forItems;
196
+ };
197
+ const searchBtn: IFormItemProps = {
198
+ span: 8,
199
+ align: 'right',
200
+ collapseNode: false,
201
+ itemRender: {
202
+ name: 'VxeButtonGroup',
203
+ options: [
204
+ {
205
+ type: 'submit',
206
+ submit: 'submit',
207
+ content: 'message.btn.search',
208
+ status: 'primary',
209
+ icon: 'ri-search-line'
210
+ // props: {
211
+ // },
212
+ },
213
+ {
214
+ type: 'reset',
215
+ name: 'reset',
216
+ content: 'message.btn.reset',
217
+ status: 'info',
218
+ icon: 'ri-refresh-line'
219
+ // props: {
220
+ // },
221
+ }
222
+ ]
223
+ }
224
+ };
225
+
226
+ // console.log("useRender", useRender);
227
+ const renderHook = useRender();
228
+
229
+ const getItemRender = item => {
230
+ if (['date', 'month'].includes(item.fieldType)) {
231
+ const valueFormat = item.fieldType === 'date' ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM';
232
+ return renderHook.renderDate({ type: item.fieldType, valueFormat });
233
+ } else if (item.fieldType === 'dictCode') {
234
+ return renderHook.renderDict(item.dictCode);
235
+ }
236
+ return { name: 'VxeInput' };
237
+ };
238
+
239
+ // 获取columns
240
+ const getColumns = () => {
241
+ const columns = clone(dataList, true).filter((col: IRecord) => col.isCol === 'Y');
242
+ const colWidth = columns.reduce((curv, prev: IRecord) => curv + +prev.colWidth, 65);
243
+ modalWidth.value = colWidth < minWidth ? minWidth : colWidth > 900 ? 900 : colWidth;
244
+ data.columns = columns
245
+ .sort((a, b) => a.seqNo - b.seqNo)
246
+ .map(col => {
247
+ const fieldType = col.fieldType;
248
+ const dictCode = ['formatDict', col.dictCode];
249
+ return {
250
+ field: col.colField,
251
+ title: col.colTitle,
252
+ minWidth: col.colWidth,
253
+ formatter: fieldType === 'date' ? ['formatDate'] : col.fieldType === 'dictCode' ? dictCode : null
254
+ };
255
+ });
256
+ if (props.multiple) {
257
+ data.columns.unshift({ type: 'checkbox', width: 45, align: 'center' });
258
+ } else {
259
+ data.columns.unshift({ type: 'radio', width: 45, align: 'center' });
260
+ }
261
+ };
262
+
263
+ // 获取grid配置
264
+ const xgrid = ref(null);
265
+
266
+ const getGridConfig = async () => {
267
+ console.log('88888');
268
+ data.loading = true;
269
+ const url = '/upfm/v1/lovViewHeader/detailByViewCode';
270
+ const [err, res]: [Error, any] = await to(serviceApi.get(url, { lovCode: props.code }));
271
+ data.loading = false;
272
+ if (err) onClose();
273
+ lovTitle.value = res?.lovTitle || res.lovName;
274
+ dataList = res.lineList;
275
+ lovData = res;
276
+ props.autoLoad && xgrid.value.commitProxy('query');
277
+ getColumns();
278
+ getFormItem();
279
+ };
280
+
281
+ const onSeach = async () => {
282
+ if (props.disabled) return;
283
+ getGridConfig();
284
+ await delay(64);
285
+ showLovModal.value = true;
286
+ };
287
+
288
+ const onClear = () => {
289
+ emit('clear', '');
290
+ };
291
+
292
+ // 双击
293
+ const onCellClick = ({ row }) => {
294
+ const record = !props.multiple ? row : [row];
295
+ emit('change', record, lovData.valueField);
296
+ onClose();
297
+ };
298
+
299
+ const onConfirm = () => {
300
+ const grid = xgrid.value;
301
+ const record = !props.multiple ? grid.getRadioRecord() : grid.getCheckboxRecords();
302
+ !isEmpty(record) && emit('change', record, lovData.valueField);
303
+ onClose();
304
+ };
305
+ /** 输入框显示值 */
306
+ // const setDisplayLabel = row => {
307
+ // let value = row[lovData.valueField];
308
+ // if (props.multiple) {
309
+ // value = row.map(m => m[lovData.valueField]).join();
310
+ // }
311
+ // Object.assign(props.record, { [props.field]: value });
312
+ // };
313
+
314
+ // 关闭Lov
315
+ const onClose = () => {
316
+ dataList.length = 0;
317
+ showLovModal.value = false;
318
+ };
319
+
320
+ const beforeHideMethod = ({ type }) => {
321
+ // console.log("cccc", type);
322
+ };
323
+
324
+ const emit = defineEmits<{
325
+ (e: 'clear', str: ''): void;
326
+ (e: 'change', record: any, field: string): void;
327
+ }>();
328
+ </script>
329
+
330
+ <style lang="scss">
331
+ .ut-lov-wrapper {
332
+ .vxe-pager .vxe-pager--sizes {
333
+ display: inline-block;
334
+ width: 7em !important;
335
+ text-align: center;
336
+ cursor: pointer;
337
+ }
338
+
339
+ .el-dialog__header {
340
+ padding: 0.6em 4.6em 0.6em 1em;
341
+ margin-right: 0;
342
+ background-color: #f8f8f8;
343
+ border-bottom: 1px solid #ebeef5;
344
+
345
+ .el-dialog__title {
346
+ font-size: 1.1em;
347
+ font-weight: 600;
348
+ color: #000 !important;
349
+ }
350
+ }
351
+
352
+ .el-dialog__body {
353
+ padding: 5px 6px;
354
+ }
355
+
356
+ .el-dialog__footer {
357
+ padding: 5px 6px;
358
+ }
359
+
360
+ .vxe-grid {
361
+ .vxe-form {
362
+ .vxe-form--item {
363
+ .vxe-form--item-title-label {
364
+ font-weight: 500 !important;
365
+ color: #000 !important;
366
+ }
367
+
368
+ .vxe-input--date-picker-suffix {
369
+ color: #000 !important;
370
+ }
371
+ }
372
+ }
373
+
374
+ .vxe-cell {
375
+ .vxe-cell--label {
376
+ font-weight: 500 !important;
377
+ color: #000 !important;
378
+ }
379
+ }
380
+ }
381
+
382
+ .vxe-input {
383
+ i[class*='vxe-icon-'] {
384
+ color: #6a6a6a !important;
385
+ }
386
+ }
387
+ }
388
+ </style>
@@ -34,6 +34,14 @@
34
34
  />
35
35
  </template>
36
36
  <template #footer>
37
+ <vxe-checkbox
38
+ v-if="!url && dataStatus === 'add'"
39
+ v-model="continuous"
40
+ content="连续添加"
41
+ unchecked-value="0"
42
+ checked-value="1"
43
+ style="margin-right: 12px"
44
+ />
37
45
  <ut-button status="warning" content="cancel" icon="ri-close-line" @tap="onClose" />
38
46
  <ut-button status="u-cyan" content="confirm" icon="ri-save-3-line" @tap="onConfirm" />
39
47
  </template>
@@ -49,9 +57,10 @@ export default {
49
57
  <script lang="ts" setup>
50
58
  import { onBeforeMount, ref, computed, getCurrentInstance, useAttrs } from 'vue';
51
59
  import { useI18n } from 'vue-i18n';
52
- import { getAttrs, formatItems } from './utils';
60
+ import { getAttrs } from './utils';
53
61
  import to from 'await-to-js';
54
- import { formatRules, successMessage } from '@utogether/utils';
62
+ import { formatRules, successMessage, formatItems } from '@utogether/utils';
63
+ import { clone } from 'xe-utils';
55
64
 
56
65
  // import type { IRecord, IFormItemProps } from '../../types';
57
66
 
@@ -86,6 +95,7 @@ const props = withDefaults(defineProps<IProps>(), {
86
95
 
87
96
  const attrs: IRecord = getAttrs(useAttrs());
88
97
 
98
+ const continuous = ref('0');
89
99
  const loading = ref(false);
90
100
  const instance = getCurrentInstance()!;
91
101
 
@@ -101,7 +111,7 @@ const rules = computed(() => {
101
111
 
102
112
  const formItems = computed(() => {
103
113
  if (!props.items.length) return props.items;
104
- return formatItems(props.items, props.dataStatus);
114
+ return formatItems(clone(props.items, true), props.dataStatus);
105
115
  });
106
116
 
107
117
  const { t } = useI18n();