vue2-client 1.8.47 → 1.8.49
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 +4 -3
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/assets/svg/badtwo.svg +1 -0
- package/src/assets/svg/goodtwo.svg +1 -0
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/pages/DynamicStatistics/ChartSelector.vue +226 -155
- package/src/pages/DynamicStatistics/DataTabs.vue +63 -112
- package/src/pages/DynamicStatistics/DynamicTable.vue +76 -76
- package/src/pages/DynamicStatistics/EvaluationArea.vue +56 -54
- package/src/pages/DynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +279 -0
- package/src/pages/DynamicStatistics/SearchBar.vue +167 -130
- package/src/pages/DynamicStatistics/index.vue +203 -201
- package/src/pages/ServiceReview/index.vue +284 -284
- package/src/services/api/restTools.js +24 -24
- package/src/utils/waterMark.js +31 -31
- package/vue.config.js +6 -0
|
@@ -1,201 +1,203 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="dynamic-statistics">
|
|
3
|
-
<div class="data-nav-card-back">
|
|
4
|
-
<div class="data-nav-card">
|
|
5
|
-
<a-row type="flex" align="middle" class="search-title-card">
|
|
6
|
-
<img class="search-title-logo" src="@vue2-client/assets/img/logo.png"/>
|
|
7
|
-
<span class="search-title-text">数据检索平台</span>
|
|
8
|
-
</a-row>
|
|
9
|
-
<div class="search-card">
|
|
10
|
-
<div class="blue-overlay"></div>
|
|
11
|
-
<div class="search-card-main">
|
|
12
|
-
<!-- 搜索栏组件 -->
|
|
13
|
-
<search-bar ref="searchBar" @search="handleSearch"
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="data-main-card">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
this.$refs.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this.$refs.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
this.cacheSearchArray
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
width: 100%;
|
|
157
|
-
height:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
background-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.data-main-card {
|
|
187
|
-
width: 75%;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="dynamic-statistics">
|
|
3
|
+
<div class="data-nav-card-back">
|
|
4
|
+
<div class="data-nav-card">
|
|
5
|
+
<a-row type="flex" align="middle" class="search-title-card">
|
|
6
|
+
<img class="search-title-logo" src="@vue2-client/assets/img/logo.png"/>
|
|
7
|
+
<span class="search-title-text">数据检索平台</span>
|
|
8
|
+
</a-row>
|
|
9
|
+
<div class="search-card">
|
|
10
|
+
<div class="blue-overlay"></div>
|
|
11
|
+
<div class="search-card-main">
|
|
12
|
+
<!-- 搜索栏组件 -->
|
|
13
|
+
<search-bar ref="searchBar" @search="handleSearch"></search-bar>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="data-main-card">
|
|
19
|
+
<a-row style="height:100%">
|
|
20
|
+
<a-col :span="6" style="height:100%">
|
|
21
|
+
<question-history-and-favorites
|
|
22
|
+
ref="qhaf"
|
|
23
|
+
@handleOpenFavorite="handleOpenFavorite"
|
|
24
|
+
:currentuuid="currentuuid"
|
|
25
|
+
@handleSearch="handleSearch">
|
|
26
|
+
</question-history-and-favorites>
|
|
27
|
+
</a-col>
|
|
28
|
+
<a-col :span="18" style="height:100%">
|
|
29
|
+
<a-spin :spinning="loading" tip="正在努力加载...">
|
|
30
|
+
<!-- 数据展示Tabs -->
|
|
31
|
+
<data-tabs
|
|
32
|
+
ref="tabs"
|
|
33
|
+
@tab-change="handleTabChange"
|
|
34
|
+
@remove-cache="remove"
|
|
35
|
+
></data-tabs>
|
|
36
|
+
</a-spin>
|
|
37
|
+
</a-col>
|
|
38
|
+
</a-row>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import SearchBar from './SearchBar.vue'
|
|
45
|
+
import DataTabs from './DataTabs.vue'
|
|
46
|
+
// import { post } from '@vue2-client/services/api'
|
|
47
|
+
import { formatDate } from '@vue2-client/utils/util'
|
|
48
|
+
import QuestionHistoryAndFavorites from './QuestionHistoryAndFavorites.vue'
|
|
49
|
+
import { post } from '@/services/api'
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
name: 'DynamicStatistics',
|
|
53
|
+
components: {
|
|
54
|
+
SearchBar,
|
|
55
|
+
DataTabs,
|
|
56
|
+
QuestionHistoryAndFavorites
|
|
57
|
+
},
|
|
58
|
+
data () {
|
|
59
|
+
return {
|
|
60
|
+
cacheSearchArray: {},
|
|
61
|
+
loading: false,
|
|
62
|
+
// 当前选中的uuid
|
|
63
|
+
currentuuid: ''
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
methods: {
|
|
67
|
+
// 处理搜索逻辑,这里简化为直接赋值,实际应调用API
|
|
68
|
+
async handleSearch (value, callback, uuid) {
|
|
69
|
+
this.loading = true
|
|
70
|
+
if (!value) {
|
|
71
|
+
this.$message.warn('请先输入查询的数据')
|
|
72
|
+
callback()
|
|
73
|
+
return
|
|
74
|
+
}
|
|
75
|
+
if (!uuid) {
|
|
76
|
+
uuid = this.uuid()
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
this.$refs.qhaf.add({
|
|
80
|
+
uuid: uuid,
|
|
81
|
+
question: value,
|
|
82
|
+
isFavorite: false,
|
|
83
|
+
date: formatDate('now')
|
|
84
|
+
})
|
|
85
|
+
post('/ai/question/', {
|
|
86
|
+
messages: [{
|
|
87
|
+
content: value,
|
|
88
|
+
role: 'user'
|
|
89
|
+
}]
|
|
90
|
+
}).then(res => {
|
|
91
|
+
this.loading = false
|
|
92
|
+
if (Array.isArray(res)) {
|
|
93
|
+
this.addTab(uuid, value, res, false)
|
|
94
|
+
} else {
|
|
95
|
+
this.$message.warning(res)
|
|
96
|
+
}
|
|
97
|
+
}).finally(() => {
|
|
98
|
+
callback()
|
|
99
|
+
})
|
|
100
|
+
},
|
|
101
|
+
addTab (uuid, question, searchResults, isFavorite) {
|
|
102
|
+
this.cacheSearchArray[uuid] = {
|
|
103
|
+
uuid: uuid,
|
|
104
|
+
question: question,
|
|
105
|
+
data: searchResults,
|
|
106
|
+
isFavorite: isFavorite,
|
|
107
|
+
date: formatDate('now')
|
|
108
|
+
}
|
|
109
|
+
this.currentuuid = uuid
|
|
110
|
+
this.$refs.tabs.show(this.cacheSearchArray[uuid])
|
|
111
|
+
this.$refs.qhaf.add(this.cacheSearchArray[uuid])
|
|
112
|
+
this.$refs.searchBar.setObj(this.cacheSearchArray[uuid])
|
|
113
|
+
},
|
|
114
|
+
// 处理Tab变更,可以在这里进行额外的逻辑处理
|
|
115
|
+
handleTabChange (uuid) {
|
|
116
|
+
if (uuid) {
|
|
117
|
+
this.$refs.searchBar.setObj(this.cacheSearchArray[uuid])
|
|
118
|
+
} else {
|
|
119
|
+
this.cacheSearchArray = []
|
|
120
|
+
this.$refs.searchBar.init()
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
// 处理从对话历史/收藏夹打开收藏项
|
|
124
|
+
handleOpenFavorite (item) {
|
|
125
|
+
this.addTab(item.uuid, item.question, item.data, item.isFavorite)
|
|
126
|
+
},
|
|
127
|
+
uuid () {
|
|
128
|
+
const tempUrl = URL.createObjectURL(new Blob())
|
|
129
|
+
const uuid = tempUrl.toString() // blob:https://xxx.com/b250d159-e1b6-4a87-9002-885d90033be3
|
|
130
|
+
URL.revokeObjectURL(tempUrl)
|
|
131
|
+
return uuid.substr(uuid.lastIndexOf('/') + 1)
|
|
132
|
+
},
|
|
133
|
+
remove (uuid) {
|
|
134
|
+
delete this.cacheSearchArray[uuid]
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
</script>
|
|
139
|
+
|
|
140
|
+
<style lang="less" scoped>
|
|
141
|
+
.dynamic-statistics {
|
|
142
|
+
position: relative;
|
|
143
|
+
overflow: auto;
|
|
144
|
+
height: 100vh;
|
|
145
|
+
background-color: #f5f7fb;
|
|
146
|
+
margin: 0 auto;
|
|
147
|
+
|
|
148
|
+
.data-nav-card-back {
|
|
149
|
+
width: 100%;
|
|
150
|
+
height: 20%;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.data-nav-card {
|
|
154
|
+
z-index: 999;
|
|
155
|
+
position: fixed;
|
|
156
|
+
width: 100%;
|
|
157
|
+
height: 150px;
|
|
158
|
+
top: 0;
|
|
159
|
+
background: #fff;
|
|
160
|
+
|
|
161
|
+
.search-title-card {
|
|
162
|
+
height: 65px;
|
|
163
|
+
width: 75%;
|
|
164
|
+
margin: 0 auto;
|
|
165
|
+
|
|
166
|
+
.search-title-logo {
|
|
167
|
+
width: 60px;
|
|
168
|
+
margin-right: 8px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.search-title-text {
|
|
172
|
+
font-size: 20px;
|
|
173
|
+
font-weight: bold;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.search-card {
|
|
178
|
+
width: 100%;
|
|
179
|
+
//height: 200px;
|
|
180
|
+
background-image: url('/public/img/dynamicStatistics/dynamicStatisticsBack.jpg');
|
|
181
|
+
background-size: cover;
|
|
182
|
+
position: relative;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.data-main-card {
|
|
187
|
+
//width: 75%;
|
|
188
|
+
height: 79%;
|
|
189
|
+
padding: 20px;
|
|
190
|
+
margin: 0 auto;
|
|
191
|
+
background-color: #f5f7fb;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.blue-overlay {
|
|
195
|
+
position: absolute;
|
|
196
|
+
top: 0;
|
|
197
|
+
left: 0;
|
|
198
|
+
width: 100%;
|
|
199
|
+
height: 100%;
|
|
200
|
+
background-color: rgba(#4F93FE, 0.8) // 这里设置蓝色蒙版的颜色和透明度
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</style>
|