vue2-client 1.8.48 → 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,130 +1,167 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="search-bar">
|
|
3
|
-
<a-
|
|
4
|
-
class="search-input"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
<a-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</a-
|
|
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
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
.
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="search-bar">
|
|
3
|
+
<a-auto-complete
|
|
4
|
+
class="search-input"
|
|
5
|
+
placeholder="请输入查询的内容"
|
|
6
|
+
option-label-prop="title"
|
|
7
|
+
@select="onSearch"
|
|
8
|
+
@search="handleSearch"
|
|
9
|
+
>
|
|
10
|
+
<template slot="dataSource">
|
|
11
|
+
<a-select-option v-for="item in dataSourceResults" :key="item.category" :title="item.category">
|
|
12
|
+
<span>{{ item.category.substr(0,item.category.indexOf(searchInput)) }}</span>
|
|
13
|
+
<span style="color: red">{{ searchInput }}</span>
|
|
14
|
+
<span>{{ item.category.substr(item.category.indexOf(searchInput)+searchInput.length) }}</span>
|
|
15
|
+
</a-select-option>
|
|
16
|
+
</template>
|
|
17
|
+
<a-input
|
|
18
|
+
v-model="searchInput"
|
|
19
|
+
placeholder="请输入查询的内容"
|
|
20
|
+
@pressEnter="onSearch(searchInput)">
|
|
21
|
+
</a-input>
|
|
22
|
+
</a-auto-complete>
|
|
23
|
+
<a-button-group size="large" class="btn_group">
|
|
24
|
+
<a-button @click="onSearch(searchInput)" :loading="loading">
|
|
25
|
+
<a-icon type="search"/>
|
|
26
|
+
搜索
|
|
27
|
+
</a-button>
|
|
28
|
+
</a-button-group>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import FavoriteList from './FavoriteList.vue'
|
|
34
|
+
import { post } from '@/services/api'
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'SearchBar',
|
|
38
|
+
components: { FavoriteList },
|
|
39
|
+
data () {
|
|
40
|
+
return {
|
|
41
|
+
searchInput: '', // 绑定搜索输入框的数据,
|
|
42
|
+
favoriteState: false, // 是否收藏
|
|
43
|
+
obj: undefined,
|
|
44
|
+
favoriteListVisible: false,
|
|
45
|
+
loading: false,
|
|
46
|
+
dataSource: [],
|
|
47
|
+
dataSourceResults: [],
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
},
|
|
52
|
+
mounted () {
|
|
53
|
+
this.init()
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
handleSearch (value) {
|
|
57
|
+
if (value) {
|
|
58
|
+
this.dataSourceResults = this.dataSource.filter(
|
|
59
|
+
item => item.category.indexOf(value) !== -1
|
|
60
|
+
)
|
|
61
|
+
} else {
|
|
62
|
+
this.dataSourceResults = []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
// 处理搜索操作
|
|
66
|
+
onSearch (value) {
|
|
67
|
+
this.loading = true
|
|
68
|
+
// 触发父组件的搜索事件,传递搜索输入的值
|
|
69
|
+
this.$emit('search', value, () => {
|
|
70
|
+
this.loading = false
|
|
71
|
+
})
|
|
72
|
+
},
|
|
73
|
+
// // 处理打开收藏操作
|
|
74
|
+
// openFavorites (uuid) {
|
|
75
|
+
// this.$emit('openFavorites', uuid)
|
|
76
|
+
// },
|
|
77
|
+
// 收藏夹显示隐藏的回调
|
|
78
|
+
favoriteListVisibleAction (visible) {
|
|
79
|
+
if (this.$refs.favoriteList && visible) {
|
|
80
|
+
this.$refs.favoriteList.loadData()
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
init () {
|
|
84
|
+
post('/api/af-system/logic/openapi/getCommonData', {
|
|
85
|
+
type: 'ai-evaluation',
|
|
86
|
+
content: '11'
|
|
87
|
+
}).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
|
+
// 提取 json 中的 question, 并去重
|
|
110
|
+
this.dataSource = res.data.map(item => JSON.parse(item.f_json).question)
|
|
111
|
+
.filter((item, index, arr) => arr.indexOf(item) === index)
|
|
112
|
+
.map(item => ({ category: item }))
|
|
113
|
+
})
|
|
114
|
+
this.searchInput = ''
|
|
115
|
+
this.obj = undefined
|
|
116
|
+
this.favoriteState = false
|
|
117
|
+
},
|
|
118
|
+
setObj (obj) {
|
|
119
|
+
this.obj = obj
|
|
120
|
+
this.searchInput = obj.question
|
|
121
|
+
this.favoriteState = obj.isFavorite
|
|
122
|
+
},
|
|
123
|
+
setFavorite (uuid, isFavorite) {
|
|
124
|
+
if (this.obj && uuid === this.obj.uuid) {
|
|
125
|
+
this.favoriteState = isFavorite
|
|
126
|
+
}
|
|
127
|
+
this.favoriteListVisibleAction(true)
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<style lang="less" scoped>
|
|
134
|
+
.search-bar {
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
padding: 25px 0;
|
|
138
|
+
margin-bottom: 20px;
|
|
139
|
+
|
|
140
|
+
:deep(.ant-input) {
|
|
141
|
+
padding: 4px 80px 4px 40px;
|
|
142
|
+
height: 48px;
|
|
143
|
+
font-size: 16px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.btn_group {
|
|
147
|
+
padding-left: 6px;
|
|
148
|
+
|
|
149
|
+
:deep(.ant-btn) {
|
|
150
|
+
height: 100%;
|
|
151
|
+
color: #4F93FE;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.star_button {
|
|
155
|
+
color: #ffba00;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:deep(.ant-select-selection--single) {
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.search-input {
|
|
165
|
+
width: 40%;
|
|
166
|
+
}
|
|
167
|
+
</style>
|