|
|
@@ -1,29 +1,406 @@
|
|
1
|
1
|
<template>
|
|
2
|
|
- <div class="screen-page screen-page--placeholder">
|
|
3
|
|
- <p class="placeholder__zh">畜牧资源大屏开发中</p>
|
|
4
|
|
- <p class="placeholder__bo">སྐྱེས་ཁམས་ཐོན་ཁུངས་ཆེ་ཙལ་གསར་སྤེལ་བཞིན་པ།</p>
|
|
|
2
|
+ <div class="screen-page ts-page" :class="{ 'is-loading': loading }">
|
|
|
3
|
+ <div v-if="loadError" class="ts-error">{{ loadError }}</div>
|
|
|
4
|
+
|
|
|
5
|
+ <!-- <div class="ts-year-bar">
|
|
|
6
|
+ <label class="ts-year-bar__label">统计年份</label>
|
|
|
7
|
+ <select
|
|
|
8
|
+ v-model="statYear"
|
|
|
9
|
+ class="ts-year-bar__select"
|
|
|
10
|
+ :disabled="loading"
|
|
|
11
|
+ @change="onYearChange"
|
|
|
12
|
+ >
|
|
|
13
|
+ <option v-for="y in availableYears" :key="y" :value="String(y)">{{ y }}年</option>
|
|
|
14
|
+ </select>
|
|
|
15
|
+ <span v-if="statDate" class="ts-year-bar__date">统计日 {{ statDate }}</span>
|
|
|
16
|
+ </div> -->
|
|
|
17
|
+
|
|
|
18
|
+ <!-- 左栏:核心数据总览( -->
|
|
|
19
|
+ <div class="screen-page--home-column">
|
|
|
20
|
+ <div class="screen-page--home-column-top">
|
|
|
21
|
+ <div class="top_title">核心数据总览 གཙོ་བོའི་གནས་ཚད་བསྡུས་གསལ།</div>
|
|
|
22
|
+ <div class="ts-overview-grid">
|
|
|
23
|
+ <div
|
|
|
24
|
+ v-for="item in liveStock"
|
|
|
25
|
+ :key="item.key"
|
|
|
26
|
+ class="ts-overview-cell"
|
|
|
27
|
+ :class="{ 'ts-overview-cell--placeholder': item.placeholder }"
|
|
|
28
|
+ >
|
|
|
29
|
+ <div class="content_title"><div>{{ item.label }}</div></div>
|
|
|
30
|
+ <div class="content_num">
|
|
|
31
|
+ <strong class="content_num__value">{{ item.value }}</strong>
|
|
|
32
|
+ <span v-if="item.unit" class="content_num__unit">{{ item.unit }}</span>
|
|
|
33
|
+ </div>
|
|
|
34
|
+ </div>
|
|
|
35
|
+ </div>
|
|
|
36
|
+ </div>
|
|
|
37
|
+
|
|
|
38
|
+ <div class="screen-page--home-column-flex">
|
|
|
39
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
40
|
+ <div class="flex_title">活跃度趋势 འགྲོ་འདུག་གོམ་སྟངས་རྒྱུན་སྟངས།</div>
|
|
|
41
|
+ <div class="flex_content flex_content--quote">
|
|
|
42
|
+
|
|
|
43
|
+ <div class="quote-chart">
|
|
|
44
|
+
|
|
|
45
|
+ </div>
|
|
|
46
|
+ </div>
|
|
|
47
|
+ </div>
|
|
|
48
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
49
|
+ <div class="flex_title">用户结构分析 སྤྱོད་མིའི་གོ་སྐབས་དཔྱད་པ།</div>
|
|
|
50
|
+ <div class="flex_content">
|
|
|
51
|
+
|
|
|
52
|
+ </div>
|
|
|
53
|
+ </div>
|
|
|
54
|
+ </div>
|
|
|
55
|
+
|
|
|
56
|
+ <div class="screen-page--home-column-flex">
|
|
|
57
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
58
|
+ <div class="flex_title">提问分类占比 དྲིས་ལན་དབྱེ་རྩིས་བགོ་སྟངས།</div>
|
|
|
59
|
+ <div class="flex_content">
|
|
|
60
|
+
|
|
|
61
|
+ </div>
|
|
|
62
|
+ </div>
|
|
|
63
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
64
|
+ <div class="flex_title">模型调用分析 དཔེ་གཞི་འབྲི་རྩོམ་དཔྱད་པ།</div>
|
|
|
65
|
+ <div class="flex_content">
|
|
|
66
|
+
|
|
|
67
|
+ </div>
|
|
|
68
|
+ </div>
|
|
|
69
|
+ </div>
|
|
|
70
|
+ </div>
|
|
|
71
|
+
|
|
|
72
|
+ <!-- 右栏:农资商城本期不实现,保留占位 -->
|
|
|
73
|
+ <div class="screen-page--home-column">
|
|
|
74
|
+ <div class="screen-page--home-column-right ts-mall-panel">
|
|
|
75
|
+ <div class="top_title">分时使用热度 དུས་སྐོར་སྤྱོད་སྟོབས་ཚད།</div>
|
|
|
76
|
+
|
|
|
77
|
+ </div>
|
|
|
78
|
+ <div class="screen-page--home-column-flex">
|
|
|
79
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
80
|
+ <div class="flex_title">会话提问数量分布 གོ་སྐབས་དྲིས་གྲངས་ཁྱབ་སྤེལ།</div>
|
|
|
81
|
+ <div class="flex_content flex_content--placeholder">
|
|
|
82
|
+
|
|
|
83
|
+ </div>
|
|
|
84
|
+ </div>
|
|
|
85
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
86
|
+ <div class="flex_title">会话状态分布 གོ་སྐབས་གནས་སྟངས་ཁྱབ་སྤེལ།</div>
|
|
|
87
|
+ <div class="flex_content flex_content--placeholder">
|
|
|
88
|
+
|
|
|
89
|
+ </div>
|
|
|
90
|
+ </div>
|
|
|
91
|
+ </div>
|
|
|
92
|
+ <div class="screen-page--home-column-flex">
|
|
|
93
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
94
|
+ <div class="flex_title">热门问题榜单 ཡོངས་གྲགས་དྲིས་ལན་གསལ་ཐོ།</div>
|
|
|
95
|
+ <div class="flex_content flex_content--placeholder">
|
|
|
96
|
+
|
|
|
97
|
+ </div>
|
|
|
98
|
+ </div>
|
|
|
99
|
+ <div class="screen-page--home-column-flex-item">
|
|
|
100
|
+ <div class="flex_title">高频关键词 མང་དུ་སྦྱོང་བའི་ཚིག་གཙོ།</div>
|
|
|
101
|
+ <div class="flex_content flex_content--placeholder">
|
|
|
102
|
+
|
|
|
103
|
+ </div>
|
|
|
104
|
+ </div>
|
|
|
105
|
+ </div>
|
|
|
106
|
+ </div>
|
|
5
|
107
|
</div>
|
|
6
|
108
|
</template>
|
|
7
|
109
|
|
|
|
110
|
+<script setup>
|
|
|
111
|
+import { computed, onMounted, ref } from 'vue'
|
|
|
112
|
+import ScreenChart from '@/components/ScreenChart.vue'
|
|
|
113
|
+
|
|
|
114
|
+const loading = ref(false)
|
|
|
115
|
+const loadError = ref('')
|
|
|
116
|
+const statYear = ref(String(new Date().getFullYear()))
|
|
|
117
|
+const statDate = ref('')
|
|
|
118
|
+
|
|
|
119
|
+const liveStock = ref([])
|
|
|
120
|
+
|
|
|
121
|
+
|
|
|
122
|
+</script>
|
|
|
123
|
+
|
|
8
|
124
|
<style scoped>
|
|
9
|
|
-.screen-page--placeholder {
|
|
|
125
|
+.ts-page {
|
|
|
126
|
+ position: relative;
|
|
|
127
|
+ width: 100%;
|
|
|
128
|
+ height: 100%;
|
|
|
129
|
+ box-sizing: border-box;
|
|
|
130
|
+ padding: 20px;
|
|
|
131
|
+ display: flex;
|
|
|
132
|
+ flex-direction: row;
|
|
|
133
|
+ justify-content: space-between;
|
|
|
134
|
+}
|
|
|
135
|
+
|
|
|
136
|
+.ts-page.is-loading {
|
|
|
137
|
+ opacity: 0.92;
|
|
|
138
|
+}
|
|
|
139
|
+
|
|
|
140
|
+.ts-error {
|
|
|
141
|
+ position: absolute;
|
|
|
142
|
+ top: 4px;
|
|
|
143
|
+ left: 50%;
|
|
|
144
|
+ transform: translateX(-50%);
|
|
|
145
|
+ z-index: 10;
|
|
|
146
|
+ padding: 4px 12px;
|
|
|
147
|
+ font-size: 12px;
|
|
|
148
|
+ color: #ffb4b4;
|
|
|
149
|
+ background: rgba(80, 20, 20, 0.75);
|
|
|
150
|
+ border-radius: 4px;
|
|
|
151
|
+}
|
|
|
152
|
+
|
|
|
153
|
+.ts-year-bar {
|
|
|
154
|
+ position: absolute;
|
|
|
155
|
+ top: 8px;
|
|
|
156
|
+ right: 24px;
|
|
|
157
|
+ z-index: 5;
|
|
|
158
|
+ display: flex;
|
|
|
159
|
+ align-items: center;
|
|
|
160
|
+ gap: 8px;
|
|
|
161
|
+}
|
|
|
162
|
+
|
|
|
163
|
+.ts-year-bar__label {
|
|
|
164
|
+ font-size: 12px;
|
|
|
165
|
+ color: var(--screen-text-secondary, #a8d4c8);
|
|
|
166
|
+}
|
|
|
167
|
+
|
|
|
168
|
+.ts-year-bar__select {
|
|
|
169
|
+ min-width: 88px;
|
|
|
170
|
+ height: 28px;
|
|
|
171
|
+ padding: 0 8px;
|
|
|
172
|
+ font-size: 13px;
|
|
|
173
|
+ color: #e8eef5;
|
|
|
174
|
+ background: rgba(4, 48, 40, 0.85);
|
|
|
175
|
+ border: 1px solid var(--screen-line-dim, rgba(61, 217, 176, 0.42));
|
|
|
176
|
+ border-radius: 4px;
|
|
|
177
|
+ outline: none;
|
|
|
178
|
+}
|
|
|
179
|
+
|
|
|
180
|
+.ts-year-bar__date {
|
|
|
181
|
+ font-size: 11px;
|
|
|
182
|
+ color: rgba(168, 212, 200, 0.75);
|
|
|
183
|
+}
|
|
|
184
|
+
|
|
|
185
|
+.screen-page--home-column {
|
|
|
186
|
+ width: 617px;
|
|
|
187
|
+ height: 100%;
|
|
|
188
|
+ display: flex;
|
|
|
189
|
+ flex-direction: column;
|
|
|
190
|
+ justify-content: space-between;
|
|
|
191
|
+}
|
|
|
192
|
+
|
|
|
193
|
+.screen-page--home-column-top {
|
|
|
194
|
+ width: 617px;
|
|
|
195
|
+ height: 201px;
|
|
|
196
|
+ display: flex;
|
|
|
197
|
+ flex-direction: column;
|
|
|
198
|
+ box-sizing: border-box;
|
|
|
199
|
+ background: url('../../assets/sale/sale.png') no-repeat center center;
|
|
|
200
|
+ background-size: 100% 100%;
|
|
|
201
|
+}
|
|
|
202
|
+
|
|
|
203
|
+.screen-page--home-column-right {
|
|
|
204
|
+ width: 617px;
|
|
|
205
|
+ height: 201px;
|
|
|
206
|
+ background: url('../../assets/pro/pro.png') no-repeat center center;
|
|
|
207
|
+ background-size: 100% 100%;
|
|
|
208
|
+}
|
|
|
209
|
+
|
|
|
210
|
+.ts-mall-panel {
|
|
|
211
|
+ display: flex;
|
|
|
212
|
+ flex-direction: column;
|
|
|
213
|
+}
|
|
|
214
|
+
|
|
|
215
|
+.ts-placeholder {
|
|
|
216
|
+ flex: 1;
|
|
|
217
|
+ display: flex;
|
|
|
218
|
+ align-items: center;
|
|
|
219
|
+ justify-content: center;
|
|
|
220
|
+ padding: 0 24px;
|
|
|
221
|
+ text-align: center;
|
|
|
222
|
+ font-size: 14px;
|
|
|
223
|
+ color: rgba(168, 212, 200, 0.75);
|
|
|
224
|
+}
|
|
|
225
|
+
|
|
|
226
|
+.ts-placeholder--sm {
|
|
|
227
|
+ font-size: 13px;
|
|
|
228
|
+}
|
|
|
229
|
+
|
|
|
230
|
+.screen-page--home-column-flex {
|
|
|
231
|
+ width: 617px;
|
|
|
232
|
+ height: 223px;
|
|
|
233
|
+ display: flex;
|
|
|
234
|
+ justify-content: space-between;
|
|
|
235
|
+}
|
|
|
236
|
+
|
|
|
237
|
+.screen-page--home-column-flex-item {
|
|
|
238
|
+ width: 304px;
|
|
|
239
|
+ height: 223px;
|
|
|
240
|
+ background: url('../../assets/home/mini_box.png') no-repeat center center;
|
|
|
241
|
+ background-size: 100% 100%;
|
|
|
242
|
+}
|
|
|
243
|
+
|
|
|
244
|
+.top_title {
|
|
|
245
|
+ width: 100%;
|
|
|
246
|
+ height: 35px;
|
|
|
247
|
+ box-sizing: border-box;
|
|
|
248
|
+ font-size: 18px;
|
|
|
249
|
+ color: #fff;
|
|
|
250
|
+ line-height: 35px;
|
|
|
251
|
+ padding-left: 100px;
|
|
|
252
|
+ margin-bottom: 8px;
|
|
|
253
|
+ flex-shrink: 0;
|
|
|
254
|
+}
|
|
|
255
|
+
|
|
|
256
|
+.ts-overview-grid {
|
|
|
257
|
+ flex: 1;
|
|
|
258
|
+ min-height: 0;
|
|
|
259
|
+ box-sizing: border-box;
|
|
|
260
|
+ padding: 6px 20px 14px 32px;
|
|
|
261
|
+ display: grid;
|
|
|
262
|
+ grid-template-columns: repeat(3, 1fr);
|
|
|
263
|
+ grid-template-rows: repeat(2, 1fr);
|
|
|
264
|
+ gap: 4px 40px;
|
|
|
265
|
+}
|
|
|
266
|
+
|
|
|
267
|
+.ts-overview-cell {
|
|
|
268
|
+ display: flex;
|
|
|
269
|
+ flex-direction: column;
|
|
|
270
|
+ align-items: flex-end;
|
|
|
271
|
+ justify-content: center;
|
|
|
272
|
+ min-height: 0;
|
|
|
273
|
+ width: 100%;
|
|
|
274
|
+ text-align: right;
|
|
|
275
|
+ box-sizing: border-box;
|
|
|
276
|
+ padding-right: 10px;
|
|
|
277
|
+}
|
|
|
278
|
+
|
|
|
279
|
+.ts-overview-cell .content_title {
|
|
|
280
|
+ width: 100%;
|
|
|
281
|
+ text-align: right;
|
|
|
282
|
+}
|
|
|
283
|
+
|
|
|
284
|
+.ts-overview-cell .content_num {
|
|
|
285
|
+ width: 100%;
|
|
|
286
|
+ display: flex;
|
|
|
287
|
+ align-items: baseline;
|
|
|
288
|
+ justify-content: flex-end;
|
|
|
289
|
+ gap: 6px;
|
|
|
290
|
+ margin: 4px 0 0;
|
|
|
291
|
+ line-height: 1.3;
|
|
|
292
|
+}
|
|
|
293
|
+
|
|
|
294
|
+.content_num__value {
|
|
|
295
|
+ flex: 1;
|
|
|
296
|
+ min-width: 0;
|
|
|
297
|
+ text-align: right;
|
|
|
298
|
+ font-size: 24px;
|
|
|
299
|
+ font-weight: 600;
|
|
|
300
|
+ background: linear-gradient(to bottom, #98e9aa, #ecd27b);
|
|
|
301
|
+ -webkit-background-clip: text;
|
|
|
302
|
+ background-clip: text;
|
|
|
303
|
+ color: transparent;
|
|
|
304
|
+}
|
|
|
305
|
+
|
|
|
306
|
+.content_num__unit {
|
|
|
307
|
+ flex-shrink: 0;
|
|
|
308
|
+ font-size: 12px;
|
|
|
309
|
+ color: #a8d4c8;
|
|
|
310
|
+ line-height: 1.2;
|
|
|
311
|
+ text-align: right;
|
|
|
312
|
+}
|
|
|
313
|
+
|
|
|
314
|
+.ts-overview-cell--placeholder .content_num__value {
|
|
|
315
|
+ font-size: 18px;
|
|
|
316
|
+ background: none;
|
|
|
317
|
+ -webkit-background-clip: unset;
|
|
|
318
|
+ background-clip: unset;
|
|
|
319
|
+ color: #6a9f90;
|
|
|
320
|
+}
|
|
|
321
|
+
|
|
|
322
|
+.content_title {
|
|
|
323
|
+
|
|
|
324
|
+ font-size: 11px;
|
|
|
325
|
+ color: #a8d4c8;
|
|
|
326
|
+ line-height: 1.3;
|
|
|
327
|
+}
|
|
|
328
|
+
|
|
|
329
|
+.flex_title {
|
|
|
330
|
+ width: 100%;
|
|
|
331
|
+ box-sizing: border-box;
|
|
|
332
|
+ height: 35px;
|
|
|
333
|
+ font-size: 16px;
|
|
|
334
|
+ color: #fff;
|
|
|
335
|
+ line-height: 35px;
|
|
|
336
|
+ padding-left: 45px;
|
|
|
337
|
+ margin-bottom: 5px;
|
|
|
338
|
+}
|
|
|
339
|
+
|
|
|
340
|
+.flex_content {
|
|
|
341
|
+ width: 100%;
|
|
|
342
|
+ height: 180px;
|
|
|
343
|
+ box-sizing: border-box;
|
|
|
344
|
+ padding: 5px;
|
|
|
345
|
+}
|
|
|
346
|
+
|
|
|
347
|
+.flex_content--quote {
|
|
|
348
|
+ display: flex;
|
|
|
349
|
+ flex-direction: column;
|
|
|
350
|
+ padding: 4px 6px;
|
|
|
351
|
+}
|
|
|
352
|
+
|
|
|
353
|
+.quote-summary {
|
|
|
354
|
+ display: flex;
|
|
|
355
|
+ flex-direction: row;
|
|
|
356
|
+ gap: 6px;
|
|
|
357
|
+ height: 42px;
|
|
|
358
|
+ flex-shrink: 0;
|
|
|
359
|
+}
|
|
|
360
|
+
|
|
|
361
|
+.quote-summary__item {
|
|
10
|
362
|
flex: 1;
|
|
11
|
363
|
display: flex;
|
|
12
|
364
|
flex-direction: column;
|
|
13
|
365
|
align-items: center;
|
|
14
|
366
|
justify-content: center;
|
|
15
|
|
- gap: 8px;
|
|
16
|
|
- color: #9aa8b4;
|
|
|
367
|
+ background: rgba(4, 48, 40, 0.45);
|
|
|
368
|
+ border-radius: 4px;
|
|
|
369
|
+ border: 1px solid rgba(61, 217, 176, 0.2);
|
|
17
|
370
|
}
|
|
18
|
371
|
|
|
19
|
|
-.placeholder__zh {
|
|
20
|
|
- margin: 0;
|
|
21
|
|
- font-size: 15px;
|
|
|
372
|
+.quote-summary__label {
|
|
|
373
|
+ font-size: 10px;
|
|
|
374
|
+ color: #a8d4c8;
|
|
22
|
375
|
}
|
|
23
|
376
|
|
|
24
|
|
-.placeholder__bo {
|
|
25
|
|
- margin: 0;
|
|
26
|
|
- font-size: 13px;
|
|
27
|
|
- color: #7d8fa3;
|
|
|
377
|
+.quote-summary__val {
|
|
|
378
|
+ font-size: 11px;
|
|
|
379
|
+ color: #fff;
|
|
|
380
|
+}
|
|
|
381
|
+
|
|
|
382
|
+.quote-summary__val strong {
|
|
|
383
|
+ font-size: 14px;
|
|
|
384
|
+ background: linear-gradient(to bottom, #98e9aa, #ecd27b);
|
|
|
385
|
+ -webkit-background-clip: text;
|
|
|
386
|
+ background-clip: text;
|
|
|
387
|
+ color: transparent;
|
|
|
388
|
+}
|
|
|
389
|
+
|
|
|
390
|
+.quote-summary__unit {
|
|
|
391
|
+ font-size: 10px;
|
|
|
392
|
+ color: #a8d4c8;
|
|
|
393
|
+ margin-left: 2px;
|
|
|
394
|
+}
|
|
|
395
|
+
|
|
|
396
|
+.quote-chart {
|
|
|
397
|
+ flex: 1;
|
|
|
398
|
+ min-height: 0;
|
|
|
399
|
+}
|
|
|
400
|
+
|
|
|
401
|
+.flex_content--placeholder {
|
|
|
402
|
+ display: flex;
|
|
|
403
|
+ align-items: center;
|
|
|
404
|
+ justify-content: center;
|
|
28
|
405
|
}
|
|
29
|
406
|
</style>
|