vue2-client 1.12.99 → 1.12.101
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/XDatePicker/index.vue +3 -0
- package/src/base-client/components/common/XTimeline/XTimeline.vue +19 -18
- package/src/base-client/components/his/XRadio/XRadio.vue +1 -0
- package/src/base-client/components/his/XSidebar/XSidebar.vue +30 -5
- package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +130 -130
- package/src/router/async/router.map.js +2 -2
package/package.json
CHANGED
|
@@ -175,6 +175,9 @@ export default {
|
|
|
175
175
|
this.yearShowOne = status
|
|
176
176
|
},
|
|
177
177
|
RangePanelChange (value, mode) {
|
|
178
|
+
if (value.length === 0) {
|
|
179
|
+
return
|
|
180
|
+
}
|
|
178
181
|
this.localValue = [
|
|
179
182
|
moment(value[0]).format(this.formatType),
|
|
180
183
|
moment(value[1]).format(this.formatType),
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- 时间轴主容器 -->
|
|
3
|
-
<div class=
|
|
3
|
+
<div class="x-timeline">
|
|
4
4
|
<!-- 时间轴导航栏 -->
|
|
5
|
-
<div class=
|
|
5
|
+
<div class="x-timeline-nav">
|
|
6
6
|
<!-- 导航按钮:前一周、前一天 -->
|
|
7
|
-
<a-button type="link" @click=
|
|
7
|
+
<a-button type="link" @click="goToPrevWeek">
|
|
8
8
|
<a-icon type="double-left" />
|
|
9
9
|
{{ config?.prevWeekText || '前一周' }}
|
|
10
10
|
</a-button>
|
|
11
|
-
<a-button type="link" @click=
|
|
11
|
+
<a-button type="link" @click="goToPrevDay">
|
|
12
12
|
<a-icon type="left" />
|
|
13
13
|
{{ config?.prevDayText || '前一天' }}
|
|
14
14
|
</a-button>
|
|
15
15
|
<!-- 日期显示区域 -->
|
|
16
|
-
<div class=
|
|
17
|
-
<div
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
<div class="timeline-dates">
|
|
17
|
+
<div
|
|
18
|
+
v-for="(date, index) in displayDates"
|
|
19
|
+
:key="index"
|
|
20
|
+
class="date-item"
|
|
21
|
+
:class="{
|
|
22
|
+
"ant-btn-primary": isCurrentDate(date),
|
|
23
|
+
"date-weekend": isWeekend(date),
|
|
24
|
+
"ant-btn-disabled": isDisabled(date)
|
|
25
|
+
}"
|
|
26
|
+
@click="selectDate(date)"
|
|
26
27
|
>
|
|
27
|
-
<div class=
|
|
28
|
-
<div class=
|
|
28
|
+
<div class="weekday">{{ getWeekDay(date) }}</div>
|
|
29
|
+
<div class="date">{{ formatDate(date) }}</div>
|
|
29
30
|
</div>
|
|
30
31
|
</div>
|
|
31
32
|
<!-- 导航按钮:后一天、后一周 -->
|
|
32
|
-
<a-button type="link" @click=
|
|
33
|
+
<a-button type="link" @click="goToNextDay">
|
|
33
34
|
{{ config?.nextDayText || '后一天' }}
|
|
34
35
|
<a-icon type="right" />
|
|
35
36
|
</a-button>
|
|
36
|
-
<a-button type="link" @click=
|
|
37
|
+
<a-button type="link" @click="goToNextWeek">
|
|
37
38
|
{{ config?.nextWeekText || '后一周' }}
|
|
38
39
|
<a-icon type="double-right" />
|
|
39
40
|
</a-button>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{{ isOpen ? '›' : '‹' }}
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
13
|
-
<div class="drawer-content" v-
|
|
13
|
+
<div class="drawer-content" v-show="isOpen">
|
|
14
14
|
<x-report
|
|
15
15
|
ref="x_report"
|
|
16
16
|
:configName="queryParamsName"
|
|
@@ -56,12 +56,38 @@ export default {
|
|
|
56
56
|
mounted () {
|
|
57
57
|
// 在挂载后调整父元素宽度
|
|
58
58
|
this.updateLayout(this.isOpen)
|
|
59
|
+
// 如果抽屉初始状态为打开,设置padding
|
|
60
|
+
if (this.isOpen) {
|
|
61
|
+
this.updateCardBodyPadding()
|
|
62
|
+
}
|
|
59
63
|
},
|
|
60
64
|
methods: {
|
|
61
65
|
toggleDrawer () {
|
|
62
66
|
this.isOpen = !this.isOpen
|
|
63
67
|
this.$emit('on-drawer-change', this.isOpen)
|
|
64
68
|
this.updateLayout(this.isOpen)
|
|
69
|
+
if (this.isOpen) {
|
|
70
|
+
this.$nextTick(() => {
|
|
71
|
+
this.updateCardBodyPadding()
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
// 更新card-body的padding
|
|
76
|
+
updateCardBodyPadding () {
|
|
77
|
+
this.$nextTick(() => {
|
|
78
|
+
const cardBody = this.$el.querySelector('.ant-card-body')
|
|
79
|
+
if (cardBody) {
|
|
80
|
+
cardBody.style.padding = '3%'
|
|
81
|
+
} else {
|
|
82
|
+
// 如果找不到元素,可能需要等待XReport完全渲染
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
const cardBody = this.$el.querySelector('.ant-card-body')
|
|
85
|
+
if (cardBody) {
|
|
86
|
+
cardBody.style.padding = '3%'
|
|
87
|
+
}
|
|
88
|
+
}, 500)
|
|
89
|
+
}
|
|
90
|
+
})
|
|
65
91
|
},
|
|
66
92
|
// 获取同级的其他所有a-col元素
|
|
67
93
|
getSiblingCols () {
|
|
@@ -101,14 +127,14 @@ export default {
|
|
|
101
127
|
currentCol = currentCol.parentNode
|
|
102
128
|
}
|
|
103
129
|
if (currentCol) {
|
|
104
|
-
//
|
|
130
|
+
// 更新当前列的宽度
|
|
105
131
|
const drawerWidth = isOpen ? 33.3 : 2
|
|
106
132
|
// 强制更新样式
|
|
107
133
|
currentCol.style.cssText = `
|
|
108
134
|
flex: 0 0 ${drawerWidth}% !important;
|
|
109
135
|
max-width: ${drawerWidth}% !important;
|
|
110
136
|
transition: all 0.3s;`
|
|
111
|
-
//
|
|
137
|
+
// 触发XTab组件重新计算宽度
|
|
112
138
|
this.$nextTick(() => {
|
|
113
139
|
const tabComponent = this.$el.querySelector('.ant-tabs')
|
|
114
140
|
if (tabComponent) {
|
|
@@ -116,7 +142,7 @@ export default {
|
|
|
116
142
|
window.dispatchEvent(new Event('resize'))
|
|
117
143
|
}
|
|
118
144
|
})
|
|
119
|
-
//
|
|
145
|
+
// 更新其他列宽度
|
|
120
146
|
otherCols.forEach((col, index) => {
|
|
121
147
|
if (index < this.mainWithData.length) {
|
|
122
148
|
const widthValue = isOpen ? this.mainWithData[index].min : this.mainWithData[index].max
|
|
@@ -138,7 +164,6 @@ export default {
|
|
|
138
164
|
configData: {
|
|
139
165
|
handler (newValue) {
|
|
140
166
|
console.log('configData changed:', newValue)
|
|
141
|
-
this.renderingComponent(newValue)
|
|
142
167
|
},
|
|
143
168
|
immediate: true
|
|
144
169
|
}
|
|
@@ -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('/api/af-revenue/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('/api/af-revenue/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>
|
|
@@ -56,7 +56,7 @@ routerResource.example = {
|
|
|
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
|
-
component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
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'),
|
|
62
62
|
// component: () => import('@vue2-client/base-client/components/common/XRate/demo.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
|
-
|
|
74
|
+
component: () => import('@vue2-client/pages/ReportGrid/index.vue'),
|
|
75
75
|
}
|
|
76
76
|
// routerResource.example = () =>
|
|
77
77
|
// import('@vue2-client/pages/Example')
|