vue2-client 1.12.84 → 1.12.88
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.
- package/package.json +1 -1
- package/src/base-client/components/common/XCalendar/XCalendar.vue +351 -0
- package/src/base-client/components/common/XCollapse/XCollapse.vue +48 -35
- package/src/base-client/components/common/XReportGrid/XReport.vue +4 -0
- package/src/base-client/components/common/XReportGrid/XReportDesign.vue +4 -0
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +8 -8
- package/src/base-client/components/his/XList/XList.vue +3 -3
- package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +130 -130
- package/src/router/async/router.map.js +2 -2
package/package.json
CHANGED
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="calendar-wrapper" :style="config.styles?.wrapper">
|
|
3
|
+
<!-- 顶部标题栏 -->
|
|
4
|
+
<div v-if="config.header.show" class="header-bar" :style="config.styles?.header">
|
|
5
|
+
<div class="left">
|
|
6
|
+
<i v-if="config.header.showIcon" class="icon-menu"></i>
|
|
7
|
+
<input type="text" :value="config.header.title" class="title-input" :style="config.styles?.titleInput"/>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="right">
|
|
10
|
+
<a-button v-if="config.header.showBackToToday" type="link" @click="backToToday">{{
|
|
11
|
+
config.header.backToTodayText
|
|
12
|
+
}}
|
|
13
|
+
</a-button>
|
|
14
|
+
<a-button v-if="config.header.showMonth" type="link" :disabled="!config.header.monthClickable">{{
|
|
15
|
+
todayMonth
|
|
16
|
+
}}
|
|
17
|
+
</a-button>
|
|
18
|
+
<a-button v-if="config.header.showDay" type="link" :disabled="!config.header.dayClickable">{{
|
|
19
|
+
todayDay
|
|
20
|
+
}}
|
|
21
|
+
</a-button>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<!-- 子标题栏 -->
|
|
26
|
+
<div v-if="config.subHeader.show" class="sub-header" :style="config.styles?.subHeader">
|
|
27
|
+
<div class="title">
|
|
28
|
+
<span class="current-date" :style="config.styles?.currentDate">{{ currentDateText }}</span>
|
|
29
|
+
<span class="year" :style="config.styles?.year">{{ currentYearText }}</span>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="actions">
|
|
32
|
+
<span
|
|
33
|
+
v-for="(action, index) in config.actions"
|
|
34
|
+
:key="index"
|
|
35
|
+
class="action-item"
|
|
36
|
+
:style="config.styles?.actionItem"
|
|
37
|
+
@click="handleAction(action)">
|
|
38
|
+
{{ action.text }}
|
|
39
|
+
</span>
|
|
40
|
+
<a-button v-if="config.subHeader.showNavigation" type="link" @click="prevMonth">
|
|
41
|
+
{{ config.subHeader.prevMonthText }}
|
|
42
|
+
</a-button>
|
|
43
|
+
<a-button v-if="config.subHeader.showNavigation" type="link" @click="nextMonth">
|
|
44
|
+
{{ config.subHeader.nextMonthText }}
|
|
45
|
+
</a-button>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- 日历内容 -->
|
|
50
|
+
<div class="calendar-content" :style="config.styles?.calendarContent">
|
|
51
|
+
<a-calendar
|
|
52
|
+
ref="calendar"
|
|
53
|
+
:value="currentDate"
|
|
54
|
+
:fullscreen="config.calendar.fullscreen"
|
|
55
|
+
@select="handleSelect"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
import { Calendar, Button } from 'ant-design-vue'
|
|
63
|
+
import moment from 'moment'
|
|
64
|
+
import 'moment/locale/zh-cn'
|
|
65
|
+
|
|
66
|
+
// 设置中文
|
|
67
|
+
moment.locale('zh-cn')
|
|
68
|
+
|
|
69
|
+
// 默认配置
|
|
70
|
+
const defaultConfig = {
|
|
71
|
+
header: {
|
|
72
|
+
show: true,
|
|
73
|
+
title: '我的日程',
|
|
74
|
+
showIcon: true,
|
|
75
|
+
showBackToToday: true,
|
|
76
|
+
backToTodayText: '返回当天',
|
|
77
|
+
showMonth: true,
|
|
78
|
+
showDay: true,
|
|
79
|
+
monthClickable: false,
|
|
80
|
+
dayClickable: false
|
|
81
|
+
},
|
|
82
|
+
subHeader: {
|
|
83
|
+
show: true,
|
|
84
|
+
showNavigation: true,
|
|
85
|
+
prevMonthText: '←',
|
|
86
|
+
nextMonthText: '→'
|
|
87
|
+
},
|
|
88
|
+
calendar: {
|
|
89
|
+
fullscreen: false,
|
|
90
|
+
locale: 'zh-cn'
|
|
91
|
+
},
|
|
92
|
+
// 操作按钮
|
|
93
|
+
actions: [
|
|
94
|
+
{
|
|
95
|
+
text: '+ 新增日程',
|
|
96
|
+
type: 'add',
|
|
97
|
+
handler: 'handleAdd'
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
// 自定义样式
|
|
101
|
+
styles: {
|
|
102
|
+
wrapper: {},
|
|
103
|
+
header: {},
|
|
104
|
+
titleInput: {},
|
|
105
|
+
subHeader: {},
|
|
106
|
+
currentDate: {},
|
|
107
|
+
year: {},
|
|
108
|
+
actionItem: {},
|
|
109
|
+
calendarContent: {}
|
|
110
|
+
},
|
|
111
|
+
// 事件配置
|
|
112
|
+
events: {
|
|
113
|
+
select: 'select',
|
|
114
|
+
backToToday: 'back-to-today',
|
|
115
|
+
action: 'action',
|
|
116
|
+
add: 'add',
|
|
117
|
+
monthChange: 'month-change'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export default {
|
|
122
|
+
name: 'XCalendar',
|
|
123
|
+
components: {
|
|
124
|
+
ACalendar: Calendar,
|
|
125
|
+
AButton: Button
|
|
126
|
+
},
|
|
127
|
+
props: {
|
|
128
|
+
// 接收配置
|
|
129
|
+
config: {
|
|
130
|
+
type: Object,
|
|
131
|
+
default: () => ({})
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
data () {
|
|
135
|
+
const today = moment()
|
|
136
|
+
return {
|
|
137
|
+
currentDate: moment(),
|
|
138
|
+
todayMonth: today.month() + 1,
|
|
139
|
+
todayDay: today.date(),
|
|
140
|
+
// 合并默认配置和传入的配置
|
|
141
|
+
mergedConfig: {}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
created () {
|
|
145
|
+
// 深度合并配置
|
|
146
|
+
this.mergedConfig = this.mergeConfig(defaultConfig, this.config)
|
|
147
|
+
},
|
|
148
|
+
computed: {
|
|
149
|
+
// 使用计算属性访问合并后的配置
|
|
150
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
151
|
+
config () {
|
|
152
|
+
return this.mergedConfig
|
|
153
|
+
},
|
|
154
|
+
currentDateText () {
|
|
155
|
+
const month = this.currentDate.month() + 1
|
|
156
|
+
const day = this.currentDate.date()
|
|
157
|
+
return `${this.numberToChinese(month)}月${this.numberToChinese(day)}日`
|
|
158
|
+
},
|
|
159
|
+
currentYearText () {
|
|
160
|
+
return this.currentDate.format('YYYY')
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
methods: {
|
|
164
|
+
// 深度合并配置
|
|
165
|
+
mergeConfig (defaultConfig, userConfig) {
|
|
166
|
+
const result = { ...defaultConfig }
|
|
167
|
+
|
|
168
|
+
for (const key in userConfig) {
|
|
169
|
+
if (typeof userConfig[key] === 'object' && userConfig[key] !== null &&
|
|
170
|
+
typeof defaultConfig[key] === 'object' && defaultConfig[key] !== null) {
|
|
171
|
+
result[key] = this.mergeConfig(defaultConfig[key], userConfig[key])
|
|
172
|
+
} else if (userConfig[key] !== undefined) {
|
|
173
|
+
result[key] = userConfig[key]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return result
|
|
178
|
+
},
|
|
179
|
+
numberToChinese (num) {
|
|
180
|
+
const chineseNums = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
|
|
181
|
+
if (num <= 10) return chineseNums[num]
|
|
182
|
+
if (num < 20) return '十' + (num % 10 === 0 ? '' : chineseNums[num % 10])
|
|
183
|
+
return chineseNums[Math.floor(num / 10)] + '十' + (num % 10 === 0 ? '' : chineseNums[num % 10])
|
|
184
|
+
},
|
|
185
|
+
handleSelect (date) {
|
|
186
|
+
this.currentDate = date
|
|
187
|
+
// 触发选择事件,使用配置的事件名
|
|
188
|
+
this.$emit(this.config.events.select, date)
|
|
189
|
+
},
|
|
190
|
+
prevMonth () {
|
|
191
|
+
// 使用moment API直接操作日期
|
|
192
|
+
this.currentDate = moment(this.currentDate).subtract(1, 'month')
|
|
193
|
+
// 触发月份变化事件
|
|
194
|
+
this.$emit(this.config.events.monthChange, this.currentDate)
|
|
195
|
+
},
|
|
196
|
+
nextMonth () {
|
|
197
|
+
// 使用moment API直接操作日期
|
|
198
|
+
this.currentDate = moment(this.currentDate).add(1, 'month')
|
|
199
|
+
// 触发月份变化事件
|
|
200
|
+
this.$emit(this.config.events.monthChange, this.currentDate)
|
|
201
|
+
},
|
|
202
|
+
backToToday () {
|
|
203
|
+
// 返回当天
|
|
204
|
+
this.currentDate = moment()
|
|
205
|
+
// 触发返回今天事件
|
|
206
|
+
this.$emit(this.config.events.backToToday, this.currentDate)
|
|
207
|
+
},
|
|
208
|
+
// 处理操作按钮点击
|
|
209
|
+
handleAction (action) {
|
|
210
|
+
// 检查是否有注册的处理方法
|
|
211
|
+
if (action.type && typeof this[`handle${action.type.charAt(0).toUpperCase() + action.type.slice(1)}`] === 'function') {
|
|
212
|
+
// 调用对应的处理方法
|
|
213
|
+
this[`handle${action.type.charAt(0).toUpperCase() + action.type.slice(1)}`](action)
|
|
214
|
+
} else if (action.handler && typeof this.$parent[action.handler] === 'function') {
|
|
215
|
+
// 调用父组件的方法
|
|
216
|
+
this.$parent[action.handler](this.currentDate, action)
|
|
217
|
+
}
|
|
218
|
+
// 触发点击事件
|
|
219
|
+
this.$emit(this.config.events.action, this.currentDate)
|
|
220
|
+
},
|
|
221
|
+
// 默认的新增处理方法
|
|
222
|
+
handleAdd (action) {
|
|
223
|
+
this.$emit(this.config.events.add, this.currentDate)
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
</script>
|
|
228
|
+
|
|
229
|
+
<style scoped>
|
|
230
|
+
.calendar-wrapper {
|
|
231
|
+
background: #fff;
|
|
232
|
+
border-radius: 4px;
|
|
233
|
+
padding: 20px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* 顶部标题栏样式 */
|
|
237
|
+
.header-bar {
|
|
238
|
+
display: flex;
|
|
239
|
+
justify-content: space-between;
|
|
240
|
+
align-items: center;
|
|
241
|
+
padding-bottom: 16px;
|
|
242
|
+
border-bottom: 1px solid #f0f0f0;
|
|
243
|
+
margin-bottom: 16px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.header-bar .left {
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.icon-menu {
|
|
252
|
+
display: inline-block;
|
|
253
|
+
width: 20px;
|
|
254
|
+
height: 20px;
|
|
255
|
+
background-color: #ccc;
|
|
256
|
+
margin-right: 8px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.title-input {
|
|
260
|
+
border: none;
|
|
261
|
+
font-size: 16px;
|
|
262
|
+
font-weight: 500;
|
|
263
|
+
outline: none;
|
|
264
|
+
color: #000;
|
|
265
|
+
background-color: transparent;
|
|
266
|
+
width: 200px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.header-bar .right {
|
|
270
|
+
display: flex;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.sub-header {
|
|
274
|
+
display: flex;
|
|
275
|
+
justify-content: space-between;
|
|
276
|
+
align-items: center;
|
|
277
|
+
margin-bottom: 20px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.title {
|
|
281
|
+
display: flex;
|
|
282
|
+
gap: 8px;
|
|
283
|
+
align-items: baseline;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.current-date {
|
|
287
|
+
font-size: 24px;
|
|
288
|
+
font-weight: 500;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.year {
|
|
292
|
+
color: #999;
|
|
293
|
+
font-size: 16px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.actions {
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
gap: 16px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.action-item {
|
|
303
|
+
color: #666;
|
|
304
|
+
cursor: pointer;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.calendar-content {
|
|
308
|
+
:deep(.ant-fullcalendar-header) {
|
|
309
|
+
display: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
:deep(.ant-fullcalendar) {
|
|
313
|
+
border: 1px solid #f0f0f0;
|
|
314
|
+
border-radius: 2px;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
:deep(.ant-fullcalendar-calendar-body) {
|
|
318
|
+
padding: 8px 12px;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
:deep(.ant-fullcalendar-column-header) {
|
|
322
|
+
text-align: center;
|
|
323
|
+
padding: 12px 0;
|
|
324
|
+
|
|
325
|
+
.ant-fullcalendar-column-header-inner {
|
|
326
|
+
display: inline-block;
|
|
327
|
+
font-weight: normal;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
:deep(.ant-fullcalendar-cell) {
|
|
332
|
+
padding: 4px 0;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
:deep(.ant-fullcalendar-date) {
|
|
336
|
+
height: 24px;
|
|
337
|
+
margin: 0 4px;
|
|
338
|
+
padding: 4px;
|
|
339
|
+
border-radius: 2px;
|
|
340
|
+
border: none;
|
|
341
|
+
width: auto;
|
|
342
|
+
text-align: center;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:deep(.ant-fullcalendar-selected-day .ant-fullcalendar-value) {
|
|
346
|
+
background: #000;
|
|
347
|
+
color: #fff;
|
|
348
|
+
border-radius: 50%;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
</style>
|
|
@@ -54,18 +54,16 @@
|
|
|
54
54
|
<template v-if="panel.type === 'picture'">
|
|
55
55
|
<img :src="panel.configName" alt="图片" style="width: 100%; max-width: 500px;"/>
|
|
56
56
|
</template>
|
|
57
|
-
<template v-else-if="
|
|
58
|
-
<
|
|
59
|
-
:
|
|
60
|
-
:
|
|
61
|
-
|
|
62
|
-
:
|
|
63
|
-
:
|
|
64
|
-
:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
:dont-format="true">
|
|
68
|
-
</x-report>
|
|
57
|
+
<template v-else-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio'].includes(panel.type)">
|
|
58
|
+
<component
|
|
59
|
+
:is="getComponentName(panel.type)"
|
|
60
|
+
:ref="`dynamicComponent_${ panel.type }`"
|
|
61
|
+
serverName="af-his"
|
|
62
|
+
:queryParamsName="panel.configName"
|
|
63
|
+
:countVisible="false"
|
|
64
|
+
:env="env"
|
|
65
|
+
@listClick="listClick"
|
|
66
|
+
/>
|
|
69
67
|
</template>
|
|
70
68
|
</a-collapse-panel>
|
|
71
69
|
</a-collapse>
|
|
@@ -73,15 +71,31 @@
|
|
|
73
71
|
</template>
|
|
74
72
|
|
|
75
73
|
<script>
|
|
76
|
-
import XReport from '@vue2-client/base-client/components/common/XReportGrid'
|
|
77
74
|
import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
|
|
78
75
|
|
|
79
76
|
export default {
|
|
80
77
|
name: 'XCollapse',
|
|
81
78
|
components: {
|
|
82
|
-
|
|
79
|
+
XFormTable: () => import('@vue2-client/base-client/components/common/XFormTable/XFormTable.vue'),
|
|
80
|
+
XAddNativeForm: () => import('@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'),
|
|
81
|
+
XFormGroup: () => import('@vue2-client/base-client/components/common/XFormGroup/XFormGroup.vue'),
|
|
82
|
+
XTreePro: () => import('@vue2-client/base-client/components/common/XTree/XTreePro.vue'),
|
|
83
|
+
XHisEditor: () => import('@vue2-client/base-client/components/his/XHisEditor/XHisEditor.vue'),
|
|
84
|
+
XTab: () => import('@vue2-client/base-client/components/common/XTab/XTab.vue'),
|
|
85
|
+
XReport: () => import('@vue2-client/base-client/components/common/XReport/XReport.vue'),
|
|
86
|
+
XButtons: () => import('@vue2-client/base-client/components/common/XButtons/XButtons.vue'),
|
|
87
|
+
XLabelSelect: () => import('@vue2-client/base-client/components/common/XLabelSelect/XLabelSelect.vue'),
|
|
88
|
+
XConversation: () => import('@vue2-client/base-client/components/common/XConversation/XConversation.vue'),
|
|
89
|
+
XCheckList: () => import('@vue2-client/base-client/components/common/XCheckList/XCheckList.vue'),
|
|
90
|
+
XCardSet: () => import('@vue2-client/base-client/components/common/XCardSet/XCardSet.vue'),
|
|
91
|
+
XCollapse: () => import('@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'),
|
|
92
|
+
XHDescriptions: () => import('@vue2-client/base-client/components/his/XHDescriptions/XHDescriptions.vue'),
|
|
93
|
+
XSidebar: () => import('@vue2-client/base-client/components/his/XSidebar/XSidebar.vue'),
|
|
94
|
+
XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
|
|
95
|
+
XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
|
|
96
|
+
XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
|
|
97
|
+
XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue')
|
|
83
98
|
},
|
|
84
|
-
inject: ['getConfigByName', 'getComponentByName'],
|
|
85
99
|
data () {
|
|
86
100
|
return {
|
|
87
101
|
activeKey: [],
|
|
@@ -91,6 +105,11 @@ export default {
|
|
|
91
105
|
}
|
|
92
106
|
},
|
|
93
107
|
props: {
|
|
108
|
+
// 环境
|
|
109
|
+
env: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: 'prod'
|
|
112
|
+
},
|
|
94
113
|
// json名
|
|
95
114
|
queryParamsName: {
|
|
96
115
|
type: Object,
|
|
@@ -98,34 +117,28 @@ export default {
|
|
|
98
117
|
},
|
|
99
118
|
parameter: {
|
|
100
119
|
type: Object,
|
|
120
|
+
default: () => {
|
|
121
|
+
return {}
|
|
122
|
+
}
|
|
101
123
|
}
|
|
102
124
|
},
|
|
103
125
|
created () {
|
|
104
|
-
this.searchTexts = {} // 初始化对象
|
|
105
|
-
|
|
106
126
|
this.getData(this.queryParamsName)
|
|
107
|
-
window.addEventListener('setItem', (e) => {
|
|
108
|
-
console.log('监听到sessionStorage的变化:', e)
|
|
109
|
-
if (e.key === 'klcf_id') {
|
|
110
|
-
this.newVal = sessionStorage.getItem('klcf_id')
|
|
111
|
-
// 进行业务处理
|
|
112
|
-
console.log('sessionStorage中的值发生了变化:', this.newVal)
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
127
|
},
|
|
116
128
|
beforeDestroy () {
|
|
117
|
-
window.removeEventListener('setItem', this.handleStorageChange)
|
|
118
129
|
},
|
|
119
130
|
methods: {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
getComponentName(componentName) {
|
|
132
|
+
return componentName
|
|
133
|
+
},
|
|
134
|
+
listClick (data) {
|
|
135
|
+
this.$emit('listClick', data)
|
|
136
|
+
},
|
|
137
|
+
getConfigByName (componentName) {
|
|
138
|
+
const refKey = `dynamicComponent_${componentName}`
|
|
139
|
+
return this.$refs[refKey]
|
|
127
140
|
},
|
|
128
|
-
async getData (config
|
|
141
|
+
async getData (config) {
|
|
129
142
|
this.configName = config
|
|
130
143
|
getConfigByName(config, 'af-his', res => {
|
|
131
144
|
this.config = res
|
|
@@ -162,7 +175,7 @@ export default {
|
|
|
162
175
|
this.activeKey = keys
|
|
163
176
|
},
|
|
164
177
|
onSearch (value, panelIndex) {
|
|
165
|
-
|
|
178
|
+
console.log('搜索内容:', value, '面板索引:', panelIndex)
|
|
166
179
|
},
|
|
167
180
|
},
|
|
168
181
|
watch: {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:server-name="serverName"
|
|
18
18
|
:env="env"
|
|
19
19
|
:show-title="showTitle"
|
|
20
|
+
@listClick="listClick"
|
|
20
21
|
>
|
|
21
22
|
</XReportDesign>
|
|
22
23
|
<a-row
|
|
@@ -246,6 +247,9 @@ export default {
|
|
|
246
247
|
}
|
|
247
248
|
},
|
|
248
249
|
methods: {
|
|
250
|
+
listClick (data) {
|
|
251
|
+
this.$emit('listClick', data)
|
|
252
|
+
},
|
|
249
253
|
slotRendered () {
|
|
250
254
|
if (this.config?.mountedFunction) {
|
|
251
255
|
let func = this.config.mountedFunction
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
:columns="row"
|
|
36
36
|
:config-data="activatedConfig.data"
|
|
37
37
|
:config="activatedConfig"
|
|
38
|
+
@listClick="listClick"
|
|
38
39
|
:display="true">
|
|
39
40
|
</x-report-tr-group>
|
|
40
41
|
</tbody>
|
|
@@ -122,6 +123,9 @@ export default {
|
|
|
122
123
|
}
|
|
123
124
|
},
|
|
124
125
|
methods: {
|
|
126
|
+
listClick (data) {
|
|
127
|
+
this.$emit('listClick', data)
|
|
128
|
+
},
|
|
125
129
|
slotRendered () {
|
|
126
130
|
this.$emit('slotRendered')
|
|
127
131
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
<template v-else-if="cell.type === 'slot'">
|
|
27
27
|
<template
|
|
28
|
-
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio'].includes(cell.slotType)">
|
|
28
|
+
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse','x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar'].includes(cell.slotType)">
|
|
29
29
|
<component
|
|
30
30
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
31
31
|
:key="cellIndex"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
<template v-else-if="cell.type === 'slot'">
|
|
62
62
|
<template
|
|
63
|
-
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio'].includes(cell.slotType)">
|
|
63
|
+
v-if="['x-form-table','x-add-native-form','x-tree-pro', 'x-his-editor', 'x-tab', 'x-form-group', 'x-report', 'x-buttons', 'x-label-select', 'x-conversation', 'x-check-list', 'x-cardSet', 'x-collapse', 'x-h-descriptions', 'x-sidebar', 'x-list','x-input','x-time-line', 'x-radio','x-calendar'].includes(cell.slotType)">
|
|
64
64
|
<component
|
|
65
65
|
:is="getComponentName(cell.slotConfig, cell.serviceName, cell.slotType)"
|
|
66
66
|
:key="cellIndex"
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
@hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
|
|
72
72
|
:queryParamsName="cell.slotConfig"
|
|
73
73
|
:configName="cell.slotConfig"
|
|
74
|
+
@listClick="listClick"
|
|
74
75
|
:countVisible="false"
|
|
75
76
|
:env="env"
|
|
76
77
|
/>
|
|
@@ -111,7 +112,8 @@ export default {
|
|
|
111
112
|
XList: () => import('@vue2-client/base-client/components/his/XList/XList.vue'),
|
|
112
113
|
XInput: () => import('@vue2-client/base-client/components/common/XInput/XInput.vue'),
|
|
113
114
|
XTimeLine: () => import('@vue2-client/base-client/components/common/XTimeline/XTimeline.vue'),
|
|
114
|
-
XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue')
|
|
115
|
+
XRadio: () => import('@vue2-client/base-client/components/his/XRadio/XRadio.vue'),
|
|
116
|
+
XCalendar: () => import('@vue2-client/base-client/components/common/XCalendar/XCalendar.vue')
|
|
115
117
|
},
|
|
116
118
|
props: {
|
|
117
119
|
// 每一行的配置
|
|
@@ -201,17 +203,15 @@ export default {
|
|
|
201
203
|
}
|
|
202
204
|
},
|
|
203
205
|
inject: ['openDialog', 'emitEvent', 'registerComponent', 'setColSpanByName', 'setGlobalData', 'getGlobalData', 'getComponentByName', 'runLogic', 'getMixinData', 'getSelectedId', 'isInAModal', 'getConfigByName', 'getSelectedData', 'getOutEnv', 'currUser', 'isWidget'],
|
|
204
|
-
provide () {
|
|
205
|
-
return {
|
|
206
|
-
getComponentByName: this.getComponentByName
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
206
|
methods: {
|
|
210
207
|
getWindow,
|
|
211
208
|
isMicroAppEnv,
|
|
212
209
|
microDispatch,
|
|
213
210
|
getMicroData,
|
|
214
211
|
getRealKeyData,
|
|
212
|
+
listClick (data) {
|
|
213
|
+
this.$emit('listClick', data)
|
|
214
|
+
},
|
|
215
215
|
calculateColSpan (cell) {
|
|
216
216
|
return Array.isArray(cell)
|
|
217
217
|
? cell[0][0]?.colSpan * 2
|
|
@@ -31,9 +31,9 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
methods: {
|
|
33
33
|
async getData (config) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
runLogic(config, {}, 'af-his').then(res => {
|
|
35
|
+
this.data = res
|
|
36
|
+
})
|
|
37
37
|
},
|
|
38
38
|
handleClick (index) {
|
|
39
39
|
this.$emit('listClick', this.data[index])
|
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="filter-bar">
|
|
4
|
-
<a-date-picker v-model="upload_date" placeholder="上传日期" @change="selfSearch" />
|
|
5
|
-
<a-select
|
|
6
|
-
style="width: 200px;"
|
|
7
|
-
v-model="fusetype"
|
|
8
|
-
:options="fusetypes"
|
|
9
|
-
placeholder="分类"
|
|
10
|
-
@change="selfSearch"
|
|
11
|
-
allow-clear />
|
|
12
|
-
<a-button type="primary" @click="selfSearch">查询</a-button>
|
|
13
|
-
</div>
|
|
14
|
-
<a-list bordered>
|
|
15
|
-
<a-list-item v-for="item in files" :key="item.days">
|
|
16
|
-
<div class="file-group">
|
|
17
|
-
<h4>{{ item.days }}</h4>
|
|
18
|
-
<div class="file-items">
|
|
19
|
-
<div v-for="file in item.arrays" :key="file.id" class="file-card">
|
|
20
|
-
<img :src="file.f_downloadpath" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" />
|
|
21
|
-
<p>上传时间: {{ file.f_uploaddate }}</p>
|
|
22
|
-
<p>操作员: {{ file.f_username }}</p>
|
|
23
|
-
<p>分类: {{ file.fusetype }}</p>
|
|
24
|
-
<p>说明: {{ file.fremarks }}</p>
|
|
25
|
-
<a :href="file.f_downloadpath" target="_blank">预览</a>
|
|
26
|
-
<a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</a-list-item>
|
|
31
|
-
</a-list>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
import { post } from '@vue2-client/services/api'
|
|
37
|
-
export default {
|
|
38
|
-
props: {
|
|
39
|
-
currUserInfo: {
|
|
40
|
-
type: Object,
|
|
41
|
-
default: () => undefined
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
data () {
|
|
45
|
-
return {
|
|
46
|
-
upload_date: null,
|
|
47
|
-
fusetype: null,
|
|
48
|
-
files: [],
|
|
49
|
-
fusetypes: [],
|
|
50
|
-
isDelete: '0'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
methods: {
|
|
54
|
-
async getfusetypes () {
|
|
55
|
-
this.fusetypes = [{ label: '全部', value: '' }]
|
|
56
|
-
const res = await post('rs/sql/singleTable_OrderBy', {
|
|
57
|
-
data: {
|
|
58
|
-
items: 'fusetype',
|
|
59
|
-
tablename: 't_files',
|
|
60
|
-
condition: `fusetype is not null GROUP BY fusetype`,
|
|
61
|
-
orderitem: 'fusetype'
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
this.fusetypes.push(...res.map(item => ({ label: item.fusetype, value: item.fusetype })))
|
|
65
|
-
console.log('123456', this.fusetypes)
|
|
66
|
-
},
|
|
67
|
-
async getFiles () {
|
|
68
|
-
console.log('999', this.currUserInfo)
|
|
69
|
-
if (!this.currUserInfo) return
|
|
70
|
-
this.files = []
|
|
71
|
-
let condition = `CONVERT(varchar(200),f_blobid) = '${this.currUserInfo.f_userinfo_id}'`
|
|
72
|
-
if (this.upload_date) {
|
|
73
|
-
condition += ` and CONVERT(VARCHAR(100), f_uploaddate, 23) = '${this.upload_date}'`
|
|
74
|
-
}
|
|
75
|
-
if (this.fusetype) {
|
|
76
|
-
condition += ` and fusetype = '${this.fusetype}'`
|
|
77
|
-
}
|
|
78
|
-
const res = await post('/api/af-revenue/logic/getAllFiles', { data: { condition } })
|
|
79
|
-
console.log('7777', res)
|
|
80
|
-
console.log('7777', res.days)
|
|
81
|
-
this.files = res.days.map(day => ({
|
|
82
|
-
days: day.uploadday,
|
|
83
|
-
arrays: res.array.filter(file => file.uploadday === day.uploadday)
|
|
84
|
-
}))
|
|
85
|
-
},
|
|
86
|
-
async delet (fileId) {
|
|
87
|
-
await this.$resetdelete('rs/entity/t_files', { id: fileId }, { resolveMsg: '删除成功', rejectMsg: '删除失败' })
|
|
88
|
-
this.getFiles()
|
|
89
|
-
},
|
|
90
|
-
selfSearch () {
|
|
91
|
-
this.getFiles()
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
mounted () {
|
|
95
|
-
if (this.$login.r.includes('上传附件删除')) {
|
|
96
|
-
this.isDelete = '1'
|
|
97
|
-
}
|
|
98
|
-
this.getFiles()
|
|
99
|
-
this.getfusetypes()
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
</script>
|
|
103
|
-
|
|
104
|
-
<style scoped>
|
|
105
|
-
.filter-bar {
|
|
106
|
-
display: flex;
|
|
107
|
-
gap: 10px;
|
|
108
|
-
margin-bottom: 15px;
|
|
109
|
-
}
|
|
110
|
-
.file-group {
|
|
111
|
-
margin-bottom: 15px;
|
|
112
|
-
}
|
|
113
|
-
.file-items {
|
|
114
|
-
display: flex;
|
|
115
|
-
flex-wrap: wrap;
|
|
116
|
-
gap: 10px;
|
|
117
|
-
}
|
|
118
|
-
.file-card {
|
|
119
|
-
border: 1px solid #ddd;
|
|
120
|
-
padding: 10px;
|
|
121
|
-
border-radius: 5px;
|
|
122
|
-
width: 200px;
|
|
123
|
-
}
|
|
124
|
-
.file-image {
|
|
125
|
-
width: 100%; /* 让图片填充整个容器 */
|
|
126
|
-
height: 150px; /* 调整高度 */
|
|
127
|
-
object-fit: cover; /* 保持图片比例,填充整个区域 */
|
|
128
|
-
border-radius: 5px; /* 圆角边框 */
|
|
129
|
-
}
|
|
130
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="filter-bar">
|
|
4
|
+
<a-date-picker v-model="upload_date" placeholder="上传日期" @change="selfSearch" />
|
|
5
|
+
<a-select
|
|
6
|
+
style="width: 200px;"
|
|
7
|
+
v-model="fusetype"
|
|
8
|
+
:options="fusetypes"
|
|
9
|
+
placeholder="分类"
|
|
10
|
+
@change="selfSearch"
|
|
11
|
+
allow-clear />
|
|
12
|
+
<a-button type="primary" @click="selfSearch">查询</a-button>
|
|
13
|
+
</div>
|
|
14
|
+
<a-list bordered>
|
|
15
|
+
<a-list-item v-for="item in files" :key="item.days">
|
|
16
|
+
<div class="file-group">
|
|
17
|
+
<h4>{{ item.days }}</h4>
|
|
18
|
+
<div class="file-items">
|
|
19
|
+
<div v-for="file in item.arrays" :key="file.id" class="file-card">
|
|
20
|
+
<img :src="file.f_downloadpath" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" />
|
|
21
|
+
<p>上传时间: {{ file.f_uploaddate }}</p>
|
|
22
|
+
<p>操作员: {{ file.f_username }}</p>
|
|
23
|
+
<p>分类: {{ file.fusetype }}</p>
|
|
24
|
+
<p>说明: {{ file.fremarks }}</p>
|
|
25
|
+
<a :href="file.f_downloadpath" target="_blank">预览</a>
|
|
26
|
+
<a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</a-list-item>
|
|
31
|
+
</a-list>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import { post } from '@vue2-client/services/api'
|
|
37
|
+
export default {
|
|
38
|
+
props: {
|
|
39
|
+
currUserInfo: {
|
|
40
|
+
type: Object,
|
|
41
|
+
default: () => undefined
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
data () {
|
|
45
|
+
return {
|
|
46
|
+
upload_date: null,
|
|
47
|
+
fusetype: null,
|
|
48
|
+
files: [],
|
|
49
|
+
fusetypes: [],
|
|
50
|
+
isDelete: '0'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
async getfusetypes () {
|
|
55
|
+
this.fusetypes = [{ label: '全部', value: '' }]
|
|
56
|
+
const res = await post('rs/sql/singleTable_OrderBy', {
|
|
57
|
+
data: {
|
|
58
|
+
items: 'fusetype',
|
|
59
|
+
tablename: 't_files',
|
|
60
|
+
condition: `fusetype is not null GROUP BY fusetype`,
|
|
61
|
+
orderitem: 'fusetype'
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
this.fusetypes.push(...res.map(item => ({ label: item.fusetype, value: item.fusetype })))
|
|
65
|
+
console.log('123456', this.fusetypes)
|
|
66
|
+
},
|
|
67
|
+
async getFiles () {
|
|
68
|
+
console.log('999', this.currUserInfo)
|
|
69
|
+
if (!this.currUserInfo) return
|
|
70
|
+
this.files = []
|
|
71
|
+
let condition = `CONVERT(varchar(200),f_blobid) = '${this.currUserInfo.f_userinfo_id}'`
|
|
72
|
+
if (this.upload_date) {
|
|
73
|
+
condition += ` and CONVERT(VARCHAR(100), f_uploaddate, 23) = '${this.upload_date}'`
|
|
74
|
+
}
|
|
75
|
+
if (this.fusetype) {
|
|
76
|
+
condition += ` and fusetype = '${this.fusetype}'`
|
|
77
|
+
}
|
|
78
|
+
const res = await post('/api/af-revenue/logic/getAllFiles', { data: { condition } })
|
|
79
|
+
console.log('7777', res)
|
|
80
|
+
console.log('7777', res.days)
|
|
81
|
+
this.files = res.days.map(day => ({
|
|
82
|
+
days: day.uploadday,
|
|
83
|
+
arrays: res.array.filter(file => file.uploadday === day.uploadday)
|
|
84
|
+
}))
|
|
85
|
+
},
|
|
86
|
+
async delet (fileId) {
|
|
87
|
+
await this.$resetdelete('rs/entity/t_files', { id: fileId }, { resolveMsg: '删除成功', rejectMsg: '删除失败' })
|
|
88
|
+
this.getFiles()
|
|
89
|
+
},
|
|
90
|
+
selfSearch () {
|
|
91
|
+
this.getFiles()
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
mounted () {
|
|
95
|
+
if (this.$login.r.includes('上传附件删除')) {
|
|
96
|
+
this.isDelete = '1'
|
|
97
|
+
}
|
|
98
|
+
this.getFiles()
|
|
99
|
+
this.getfusetypes()
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style scoped>
|
|
105
|
+
.filter-bar {
|
|
106
|
+
display: flex;
|
|
107
|
+
gap: 10px;
|
|
108
|
+
margin-bottom: 15px;
|
|
109
|
+
}
|
|
110
|
+
.file-group {
|
|
111
|
+
margin-bottom: 15px;
|
|
112
|
+
}
|
|
113
|
+
.file-items {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-wrap: wrap;
|
|
116
|
+
gap: 10px;
|
|
117
|
+
}
|
|
118
|
+
.file-card {
|
|
119
|
+
border: 1px solid #ddd;
|
|
120
|
+
padding: 10px;
|
|
121
|
+
border-radius: 5px;
|
|
122
|
+
width: 200px;
|
|
123
|
+
}
|
|
124
|
+
.file-image {
|
|
125
|
+
width: 100%; /* 让图片填充整个容器 */
|
|
126
|
+
height: 150px; /* 调整高度 */
|
|
127
|
+
object-fit: cover; /* 保持图片比例,填充整个区域 */
|
|
128
|
+
border-radius: 5px; /* 圆角边框 */
|
|
129
|
+
}
|
|
130
|
+
</style>
|
|
@@ -55,7 +55,7 @@ routerResource.example = {
|
|
|
55
55
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
56
56
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
57
57
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
58
|
-
|
|
58
|
+
component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
59
59
|
// component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
60
60
|
// component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
|
|
61
61
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|
|
@@ -71,7 +71,7 @@ routerResource.example = {
|
|
|
71
71
|
// component: () => import('@vue2-client/components/g2Charts/demo.vue'),
|
|
72
72
|
// component: () => import('@vue2-client/pages/LogicCallExample/index.vue'),
|
|
73
73
|
// component: () => import('@vue2-client/components/FilePreview/FilePreviewDemo.vue'),
|
|
74
|
-
component: () => import('@vue2-client/pages/ReportGrid/index.vue'),
|
|
74
|
+
// component: () => import('@vue2-client/pages/ReportGrid/index.vue'),
|
|
75
75
|
}
|
|
76
76
|
// routerResource.example = () =>
|
|
77
77
|
// import('@vue2-client/pages/Example')
|