vue2-client 1.8.54 → 1.8.56
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/public/img/dynamicStatistics/1080.jpg +0 -0
- package/src/pages/DynamicStatistics/DataTabs.vue +10 -11
- package/src/pages/DynamicStatistics/DynamicTable.vue +1 -1
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +4 -4
- package/src/pages/DynamicStatistics/SearchBar.vue +17 -35
- package/src/pages/DynamicStatistics/index.vue +44 -9
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<a-row class="data-content">
|
|
3
|
-
<a-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
<ChartSelector :rawData="pane.content"/>
|
|
10
|
-
</div>
|
|
11
|
-
</a-tab-pane>
|
|
12
|
-
</a-tabs>
|
|
3
|
+
<a-row>
|
|
4
|
+
<DynamicTable :table-data="pane.content"></DynamicTable>
|
|
5
|
+
</a-row>
|
|
6
|
+
<a-row>
|
|
7
|
+
<ChartSelector :rawData="pane.content" v-if="pane?.content?.length"/>
|
|
8
|
+
</a-row>
|
|
13
9
|
<EvaluationArea :uuid="pane.key" v-if="pane.key"/>
|
|
14
10
|
</a-row>
|
|
15
11
|
</template>
|
|
@@ -49,15 +45,18 @@ export default {
|
|
|
49
45
|
font-weight: bold;
|
|
50
46
|
color: #333;
|
|
51
47
|
}
|
|
48
|
+
|
|
52
49
|
.chart-card {
|
|
53
50
|
margin-top: 20px;
|
|
54
51
|
}
|
|
52
|
+
|
|
55
53
|
.data-content {
|
|
56
|
-
height: 100%;
|
|
54
|
+
min-height: 100%;
|
|
57
55
|
background-color: #fff;
|
|
58
56
|
padding: 20px;
|
|
59
57
|
border-radius: 8px;
|
|
60
58
|
}
|
|
59
|
+
|
|
61
60
|
:deep(.ant-tabs-bar) {
|
|
62
61
|
margin-bottom: 0px;
|
|
63
62
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a-card class="question-history" id="question-history" size="small" :bordered="false">
|
|
3
|
-
<a-tabs v-model="activeKey" :tabBarStyle="{ textAlign: 'center' }">
|
|
2
|
+
<a-card class="question-history" id="question-history" size="small" :bordered="false" :bodyStyle="{ height:'100%', overflowY: 'scroll'}">
|
|
3
|
+
<a-tabs v-model="activeKey" :tabBarStyle="{ textAlign: 'center',height:'100%',postion:'' }" tabPosition="top">
|
|
4
4
|
<a-tab-pane key="1" tab="对话历史">
|
|
5
5
|
<a-list item-layout="horizontal" :data-source="questions">
|
|
6
6
|
<a-list-item
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
</template>
|
|
65
65
|
|
|
66
66
|
<script>
|
|
67
|
-
import { indexedDB } from '
|
|
68
|
-
import { formatDate } from '
|
|
67
|
+
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
68
|
+
import { formatDate } from '@vue2-client/utils/util'
|
|
69
69
|
|
|
70
70
|
export default {
|
|
71
71
|
props: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="search-bar">
|
|
3
3
|
<a-auto-complete
|
|
4
|
+
v-model="searchInput"
|
|
4
5
|
class="search-input"
|
|
5
6
|
placeholder="请输入查询的内容"
|
|
6
7
|
option-label-prop="title"
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
</a-select-option>
|
|
16
17
|
</template>
|
|
17
18
|
<a-input
|
|
19
|
+
class="contentInput"
|
|
18
20
|
v-model="searchInput"
|
|
19
21
|
placeholder="请输入查询的内容"
|
|
20
22
|
@pressEnter="onSearch(searchInput)">
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
|
|
32
34
|
<script>
|
|
33
35
|
import FavoriteList from './FavoriteList.vue'
|
|
34
|
-
import { post } from '
|
|
36
|
+
import { post } from '@vue2-client/services/api'
|
|
35
37
|
|
|
36
38
|
export default {
|
|
37
39
|
name: 'SearchBar',
|
|
@@ -85,29 +87,8 @@ export default {
|
|
|
85
87
|
type: 'ai-evaluation',
|
|
86
88
|
content: '11'
|
|
87
89
|
}).then(res => {
|
|
88
|
-
// todo docker 接口没更新 模拟数据
|
|
89
|
-
res.data = [
|
|
90
|
-
{
|
|
91
|
-
f_input_date: '2024-02-27 20:22:54',
|
|
92
|
-
id: 1,
|
|
93
|
-
f_json: '{"date":"2024-02-27 20:21:51","evaluation":true,"question":"查询近三个月各销售人员的销售情况","data":[],"uuid":"461fb4d7-1cc3-4959-82b7-899c6b66a25a","isFavorite":true}',
|
|
94
|
-
f_type: 'ai-evaluation'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
f_input_date: '2024-02-27 20:22:54',
|
|
98
|
-
id: 1,
|
|
99
|
-
f_json: '{"date":"2024-02-27 20:21:51","evaluation":true,"question":"查询近三个月各销售人员的销售情况","data":[],"uuid":"461fb4d7-1cc3-4959-82b7-899c6b66a25a","isFavorite":true}',
|
|
100
|
-
f_type: 'ai-evaluation'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
f_input_date: '2024-02-27 20:22:54',
|
|
104
|
-
id: 1,
|
|
105
|
-
f_json: '{"date":"2024-02-27 20:21:51","evaluation":true,"question":"查询近三个月各销售人员的销售情况","data":[],"uuid":"461fb4d7-1cc3-4959-82b7-899c6b66a25a","isFavorite":true}',
|
|
106
|
-
f_type: 'ai-evaluation'
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
90
|
// 提取 json 中的 question, 并去重
|
|
110
|
-
this.dataSource = res.
|
|
91
|
+
this.dataSource = res.map(item => JSON.parse(item.f_json).question)
|
|
111
92
|
.filter((item, index, arr) => arr.indexOf(item) === index)
|
|
112
93
|
.map(item => ({ category: item }))
|
|
113
94
|
})
|
|
@@ -134,20 +115,14 @@ export default {
|
|
|
134
115
|
.search-bar {
|
|
135
116
|
display: flex;
|
|
136
117
|
justify-content: center;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
:deep(.ant-input) {
|
|
141
|
-
padding: 4px 80px 4px 40px;
|
|
142
|
-
height: 48px;
|
|
143
|
-
font-size: 16px;
|
|
144
|
-
}
|
|
118
|
+
align-items: center; /* 添加这一行来实现垂直居中 */
|
|
119
|
+
height:100%;
|
|
145
120
|
|
|
146
121
|
.btn_group {
|
|
147
122
|
padding-left: 6px;
|
|
148
123
|
|
|
149
124
|
:deep(.ant-btn) {
|
|
150
|
-
height:
|
|
125
|
+
height: 3rem;
|
|
151
126
|
color: #4F93FE;
|
|
152
127
|
}
|
|
153
128
|
|
|
@@ -159,9 +134,16 @@ export default {
|
|
|
159
134
|
:deep(.ant-select-selection--single) {
|
|
160
135
|
height: 100%;
|
|
161
136
|
}
|
|
137
|
+
:deep(.search__field__mirror) {
|
|
138
|
+
height: 100%;
|
|
139
|
+
}
|
|
140
|
+
.contentInput{
|
|
141
|
+
height: 48px;
|
|
142
|
+
width: 35rem;
|
|
143
|
+
background-color: #fff;
|
|
144
|
+
padding: 4px 80px 4px 40px;
|
|
145
|
+
font-size: 16px;
|
|
146
|
+
}
|
|
162
147
|
}
|
|
163
148
|
|
|
164
|
-
.search-input {
|
|
165
|
-
width: 40%;
|
|
166
|
-
}
|
|
167
149
|
</style>
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="dynamic-statistics">
|
|
3
3
|
<div class="data-nav-card-back">
|
|
4
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
5
|
<div class="search-card">
|
|
6
|
+
<div class="search-title-card">
|
|
7
|
+
<img class="search-title-logo" src="@vue2-client/assets/img/logo.png"/>
|
|
8
|
+
<span class="search-title-text">数据检索平台</span>
|
|
9
|
+
</div>
|
|
10
10
|
<div class="blue-overlay"></div>
|
|
11
11
|
<div class="search-card-main">
|
|
12
12
|
<!-- 搜索栏组件 -->
|
|
@@ -46,7 +46,7 @@ import DataTabs from './DataTabs.vue'
|
|
|
46
46
|
// import { post } from '@vue2-client/services/api'
|
|
47
47
|
import { formatDate } from '@vue2-client/utils/util'
|
|
48
48
|
import QuestionHistoryAndFavorites from './QuestionHistoryAndFavorites.vue'
|
|
49
|
-
import { post } from '
|
|
49
|
+
import { post } from '@vue2-client/services/api'
|
|
50
50
|
|
|
51
51
|
export default {
|
|
52
52
|
name: 'DynamicStatistics',
|
|
@@ -89,6 +89,33 @@ export default {
|
|
|
89
89
|
}]
|
|
90
90
|
}).then(res => {
|
|
91
91
|
this.loading = false
|
|
92
|
+
// res = [
|
|
93
|
+
// {
|
|
94
|
+
// name: '张三',
|
|
95
|
+
// money: Math.floor(Math.random() * 100) + 1,
|
|
96
|
+
// age: Math.floor(Math.random() * 100) + 1
|
|
97
|
+
// },
|
|
98
|
+
// {
|
|
99
|
+
// name: '张三2',
|
|
100
|
+
// money: Math.floor(Math.random() * 100) + 1,
|
|
101
|
+
// age: Math.floor(Math.random() * 100) + 1
|
|
102
|
+
// },
|
|
103
|
+
// {
|
|
104
|
+
// name: '张三3',
|
|
105
|
+
// money: Math.floor(Math.random() * 100) + 1,
|
|
106
|
+
// age: Math.floor(Math.random() * 100) + 1
|
|
107
|
+
// },
|
|
108
|
+
// {
|
|
109
|
+
// name: '张三3',
|
|
110
|
+
// money: Math.floor(Math.random() * 100) + 1,
|
|
111
|
+
// age: Math.floor(Math.random() * 100) + 1
|
|
112
|
+
// },
|
|
113
|
+
// {
|
|
114
|
+
// name: '张三3',
|
|
115
|
+
// money: Math.floor(Math.random() * 100) + 1,
|
|
116
|
+
// age: Math.floor(Math.random() * 100) + 1
|
|
117
|
+
// }
|
|
118
|
+
// ]
|
|
92
119
|
if (Array.isArray(res)) {
|
|
93
120
|
this.addTab(uuid, value, res, false)
|
|
94
121
|
} else {
|
|
@@ -162,6 +189,9 @@ export default {
|
|
|
162
189
|
height: 65px;
|
|
163
190
|
width: 94%;
|
|
164
191
|
margin: 0 auto;
|
|
192
|
+
position: absolute;
|
|
193
|
+
top: 30%;
|
|
194
|
+
left:5%;
|
|
165
195
|
|
|
166
196
|
.search-title-logo {
|
|
167
197
|
width: 60px;
|
|
@@ -175,9 +205,10 @@ export default {
|
|
|
175
205
|
}
|
|
176
206
|
|
|
177
207
|
.search-card {
|
|
208
|
+
|
|
178
209
|
width: 100%;
|
|
179
|
-
|
|
180
|
-
background-image: url('/public/img/dynamicStatistics/
|
|
210
|
+
height: 100%;
|
|
211
|
+
background-image: url('/public/img/dynamicStatistics/1080.jpg');
|
|
181
212
|
background-size: cover;
|
|
182
213
|
position: relative;
|
|
183
214
|
}
|
|
@@ -186,7 +217,7 @@ export default {
|
|
|
186
217
|
.data-main-card {
|
|
187
218
|
//width: 75%;
|
|
188
219
|
height: 79%;
|
|
189
|
-
padding:
|
|
220
|
+
padding: 15px 15px 15px 15px;
|
|
190
221
|
background-color: #f5f7fb;
|
|
191
222
|
}
|
|
192
223
|
|
|
@@ -196,7 +227,11 @@ export default {
|
|
|
196
227
|
left: 0;
|
|
197
228
|
width: 100%;
|
|
198
229
|
height: 100%;
|
|
199
|
-
background-color: rgba(#4F93FE, 0.8) // 这里设置蓝色蒙版的颜色和透明度
|
|
230
|
+
//background-color: rgba(#4F93FE, 0.8) // 这里设置蓝色蒙版的颜色和透明度
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.search-card-main{
|
|
234
|
+
height: 100%;
|
|
200
235
|
}
|
|
201
236
|
}
|
|
202
237
|
.spingclass {
|