ai-read-over-mobile 0.0.1

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.
Files changed (44) hide show
  1. package/README.md +33 -0
  2. package/components/demo/api/index.js +104 -0
  3. package/components/demo/index.js +7 -0
  4. package/components/demo/plugins/cache.js +77 -0
  5. package/components/demo/src/chat-tools.vue +420 -0
  6. package/components/demo/src/main.vue +783 -0
  7. package/components/demo/src/member-table.vue +298 -0
  8. package/components/demo/src/read-over.vue +398 -0
  9. package/components/demo/src/tab-filter.vue +313 -0
  10. package/components/demo/static/bg-img.svg +10 -0
  11. package/components/demo/static/cai-active.png +0 -0
  12. package/components/demo/static/cai.png +0 -0
  13. package/components/demo/static/correct.png +0 -0
  14. package/components/demo/static/error.png +0 -0
  15. package/components/demo/static/filter-block.svg +23 -0
  16. package/components/demo/static/filter-block_hover.svg +23 -0
  17. package/components/demo/static/filter-block_selected.svg +23 -0
  18. package/components/demo/static/filter.png +0 -0
  19. package/components/demo/static/iconfont/iconfont.css +29 -0
  20. package/components/demo/static/iconfont/iconfont.js +1 -0
  21. package/components/demo/static/iconfont/iconfont.json +37 -0
  22. package/components/demo/static/iconfont/iconfont.ttf +0 -0
  23. package/components/demo/static/logo.png +0 -0
  24. package/components/demo/static/robot.png +0 -0
  25. package/components/demo/static/send-icon.png +0 -0
  26. package/components/demo/static/zan-active.png +0 -0
  27. package/components/demo/static/zan.png +0 -0
  28. package/components/demo/utils/aes-utils.js +35 -0
  29. package/components/demo/utils/config.js +46 -0
  30. package/components/demo/utils/constants.js +15 -0
  31. package/components/demo/utils/request.js +74 -0
  32. package/components/index.js +15 -0
  33. package/dist/ai-read-over-mobile.common.js +12129 -0
  34. package/dist/ai-read-over-mobile.common.js.map +1 -0
  35. package/dist/ai-read-over-mobile.css +1 -0
  36. package/dist/ai-read-over-mobile.umd.js +12148 -0
  37. package/dist/ai-read-over-mobile.umd.js.map +1 -0
  38. package/dist/ai-read-over-mobile.umd.min.js +18 -0
  39. package/dist/ai-read-over-mobile.umd.min.js.map +1 -0
  40. package/dist/demo.html +1 -0
  41. package/dist/img/filter-block.6f369747.svg +23 -0
  42. package/dist/img/filter-block_hover.5314be0a.svg +23 -0
  43. package/dist/img/filter-block_selected.f523d7f3.svg +23 -0
  44. package/package.json +44 -0
@@ -0,0 +1,783 @@
1
+ <template>
2
+ <div class="ai-contain" v-if="visible">
3
+ <div class="ai-contain-header">
4
+ <div class="header-left">
5
+ <i class="el-icon-back" @click="closeMessage"></i>
6
+ <span class="title-font">智能批阅</span>
7
+ </div>
8
+ </div>
9
+ <div class="message-wrap" v-if="sr_error_code">
10
+ <div class="message-line">{{ sr_error_code }}</div>
11
+ </div>
12
+ <template v-else>
13
+ <div class="score-filter-row">
14
+ <div class="score-item"
15
+ v-for="item in filterData"
16
+ :key="item.key"
17
+ :class="{'active': item.active}"
18
+ @click="filterClick(item)">
19
+ <p>
20
+ <span class="number">{{ item.title }}</span><span class="unit">分</span>
21
+ </p>
22
+ <p>({{ item.count }})</p>
23
+ </div>
24
+ </div>
25
+ <div class="wrap" v-if="showFilter">
26
+
27
+ <div class="normal-wrap" :class="{'full-width': !showFilter }">
28
+ <div class="label-wrap" ref="labelContainer">
29
+ <div class="label-container">
30
+ <div class="label-item"
31
+ v-if="isPerson && !showFilter && showTableList.length > 10"
32
+ @click="showFilterMethod"
33
+ style="width: 32px; padding: 0; line-height: 42px">
34
+ <img src="../static/filter.png" style="width: 24px; height: 24px"/>
35
+ </div>
36
+ <div class="label-item" v-for="item in showTableList"
37
+ :key="item.id"
38
+ :title="item.title"
39
+ :class="{'label-item-active': item.active}"
40
+ @click="tabClick(item)">
41
+ {{ item.title }}
42
+ <div class="loading-block" v-if="!replyCache[item.id]">
43
+ <i class="el-icon-loading"></i>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <div class="label-item label-down"
48
+ v-if="showMoreButton"
49
+ @click="stretchContainer"
50
+ style="width: 32px">
51
+ <span v-if="!stretch">...</span>
52
+ <i class="el-icon-d-arrow-left" style="transform: rotate(90deg)" v-else></i>
53
+ </div>
54
+ </div>
55
+ <div class="ai-main-content">
56
+ <read-over :exercises-data="activeItem"
57
+ :analyze-data="analyzeData"
58
+ :is-reanswering="isReanswering"
59
+ @on-reanswer="onReanswer"
60
+ @on-noty-apply="notyApply"/>
61
+ <div class="member-table" v-if="stretch">
62
+ <member-table :check-data="showTableList"
63
+ :show-data="tabList"
64
+ :replyCache="replyCache"
65
+ @on-select-member="selectMember"/>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </template>
71
+ </div>
72
+ </template>
73
+ <script>
74
+ import ReadOver from './read-over.vue';
75
+ import {getUserInfo} from '../utils/config';
76
+ // import {generateReview, registerSse, criticismApply, reanswerReview} from '../api/index';
77
+ import {generateReview, loopPoll, criticismApply, reanswerReview} from '../api/index';
78
+ import Cookies from "js-cookie";
79
+ import TabFilter from './tab-filter.vue';
80
+ import MemberTable from './member-table.vue';
81
+ import cache from "../plugins/cache";
82
+
83
+ export default {
84
+ name: 'AiReadOverMobile',
85
+ components: {
86
+ ReadOver,
87
+ TabFilter,
88
+ MemberTable
89
+ },
90
+ props: {
91
+ visible: {
92
+ type: Boolean,
93
+ default: false,
94
+ },
95
+ listData: {
96
+ type: Array,
97
+ default: () => []
98
+ },
99
+ courseId: {
100
+ type: String,
101
+ default: '',
102
+ },
103
+ isPerson: {
104
+ type: Boolean,
105
+ default: false,
106
+ },
107
+ autoApply: {
108
+ type: Boolean,
109
+ default: false,
110
+ },
111
+ businessSource: {
112
+ type: String,
113
+ default: ''
114
+ }
115
+ },
116
+ data() {
117
+ return {
118
+ stretch: false,
119
+ showFilter: true,
120
+ showMoreButton: false,
121
+ replyCache: {},
122
+ activeItem: {},
123
+ analyzeData: {},
124
+ sseSessionId: '',
125
+ tabList: [],
126
+ showTableList: [],
127
+ cacheUserId: [],
128
+ loopFlag: 0,
129
+ replayId: {},
130
+ sr_error_code: undefined,
131
+ replayedCache: {},
132
+ filterData: [],
133
+ scoreMap: {},
134
+ keys: [],
135
+ isReanswering: false
136
+ }
137
+ },
138
+ watch: {
139
+ visible() {
140
+ if (this.visible) {
141
+ this.listDataError();
142
+ this.sseSessionId = new Date().getTime().toString();
143
+ this.tabList = this.listData;
144
+ this.showFilter = true;
145
+ this.makeBaseData();
146
+ this.updateFilterData();
147
+ setTimeout(() => {
148
+ this.dealTableList();
149
+ this.sendAiInfo();
150
+ })
151
+ } else {
152
+ this.showFilter = false;
153
+ this.cacheUserId = [];
154
+ this.replayId = {};
155
+ this.replayedCache = {};
156
+ clearInterval(this.loopFlag);
157
+ }
158
+ },
159
+ listData: {
160
+ handler() {
161
+ if (this.listData && this.listData.length > 0) {
162
+ this.tabList = this.listData;
163
+ this.makeBaseData();
164
+ this.updateFilterData();
165
+ }
166
+ },
167
+ immediate: true
168
+ },
169
+ replyCache: {
170
+ handler() {
171
+ this.updateFilterData();
172
+ },
173
+ deep: true
174
+ }
175
+ },
176
+ mounted() {
177
+ if (!Cookies.get("token")) {
178
+ return this.$message.warning('未获取到登录信息,请重新登录');
179
+ }
180
+ this.messageList = [];
181
+ getUserInfo(Cookies.get("token"), this.businessSource);
182
+ },
183
+ methods: {
184
+ resizeFirstActive() {
185
+ if (!this.showTableList || this.showTableList.length < 1) {
186
+ this.analyzeData = null;
187
+ return;
188
+ }
189
+ this.showTableList.map((item) => item.active = false);
190
+ this.showTableList[0].active = true;
191
+ this.activeItem = this.showTableList[0];
192
+ this.analyzeData = this.replyCache[this.showTableList[0].id];
193
+ },
194
+ closeMessage() {
195
+ this.$emit('close');
196
+ },
197
+ tabClick(tab) {
198
+ this.tabList.map((item) => item.active = false);
199
+ tab.active = true;
200
+ this.$forceUpdate();
201
+ this.activeItem = tab;
202
+ this.analyzeData = this.replyCache[tab.id];
203
+ },
204
+ async sendAiInfo() {
205
+ const paramsData = [];
206
+ this.listData.map((item) => {
207
+ paramsData.push({
208
+ bizId: item.id,
209
+ question: item.question,
210
+ score: item.score,
211
+ answer: item.answer,
212
+ answerer: item.title,
213
+ rightAnswer: item.rightAnswer,
214
+ })
215
+ this.cacheUserId.push(item.id);
216
+ });
217
+ // this.sseState = await registerSse(this.sseSessionId, this.messageBack, ()=> {
218
+ // generateReview(paramsData, this.sseSessionId, this.courseId);
219
+ // });
220
+ await generateReview(paramsData, this.sseSessionId, this.courseId);
221
+ this.sr_error_code = cache.session.getJSON('ERROR_SR_CODE')
222
+ this.loopFlag = setInterval(async () => {
223
+ this.loopInfo();
224
+ }, 3000);
225
+ this.loopInfo();
226
+ },
227
+ async loopInfo() {
228
+ const loopRes = await loopPoll(this.cacheUserId);
229
+ if (loopRes) {
230
+ for (let message of loopRes) {
231
+ const {bizId, comments: [backData]} = message;
232
+ const {content, id} = backData;
233
+ const currentId = bizId;
234
+ // 说明是重新回答
235
+ if (this.replayId[currentId] && this.replayId[currentId] === id) {
236
+ continue;
237
+ }
238
+ backData.jsonContent = JSON.parse(content);
239
+ this.$set(this.replyCache, currentId, backData);
240
+ // 更新当前值
241
+ this.analyzeData = this.replyCache[this.activeItem.id] || {};
242
+ delete this.replayId[currentId];
243
+ if (!this.replayedCache[id] && this.autoApply) {
244
+ this.autoNotyApply(message, backData);
245
+ this.replayedCache[id] = true;
246
+ }
247
+ }
248
+ return;
249
+ }
250
+ throw new Error('--loopRes--返回值为空');
251
+ },
252
+ autoNotyApply(message, backData) {
253
+ const currentOrgData = this.listData.filter((item) => item.id === message.bizId)[0];
254
+ this.notyApply(backData, currentOrgData);
255
+ },
256
+ async notyApply(data, orgData) {
257
+ console.log(data)
258
+ const {id} = data;
259
+ await criticismApply(id);
260
+ this.analyzeData.accepted = true;
261
+ this.$emit('on-noty-apply', data, orgData);
262
+ },
263
+ async onReanswer(list) {
264
+ // 使用当前答案对象中的 id
265
+ const currentAnswer = this.replyCache[this.activeItem.id];
266
+ if (!currentAnswer || !currentAnswer.id) {
267
+ this.$message.error('无效的答案数据');
268
+ return;
269
+ }
270
+
271
+ this.isReanswering = true;
272
+ this.replayId[this.activeItem.id] = currentAnswer.id;
273
+
274
+ // 保持当前内容显示,只清空分析数据
275
+ const currentAnalyzeData = {...this.analyzeData};
276
+ this.analyzeData = {
277
+ ...currentAnalyzeData,
278
+ jsonContent: [],
279
+ score: null
280
+ };
281
+
282
+ try {
283
+ await reanswerReview(this.sseSessionId, currentAnswer.id);
284
+ // 开始轮询获取新的批阅结果
285
+ this.loopInfo();
286
+ } catch (error) {
287
+ console.error('重新批阅失败:', error);
288
+ this.$message.error('重新批阅失败,请稍后重试');
289
+ // 恢复之前的状态
290
+ this.analyzeData = currentAnalyzeData;
291
+ } finally {
292
+ this.isReanswering = false;
293
+ }
294
+ },
295
+ filterChange(selectedFilter) {
296
+ const filteredList = this.scoreMap[selectedFilter.key];
297
+ this.showTableList = filteredList;
298
+ this.filterData.forEach(item => {
299
+ item.active = item.key === selectedFilter.key;
300
+ });
301
+ this.resizeFirstActive();
302
+ },
303
+ showFilterMethod() {
304
+ this.showFilter = true;
305
+ this.stretch = false;
306
+ setTimeout(() => {
307
+ this.dealTableList();
308
+ });
309
+ },
310
+ dealTableList() {
311
+ const labelContainer = this.$refs.labelContainer;
312
+ if (!labelContainer) return;
313
+ this.showTableList = [...this.tabList];
314
+ this.resizeFirstActive();
315
+ },
316
+ selectMember(data) {
317
+ this.showTableList = data;
318
+ this.resizeFirstActive();
319
+ },
320
+ listDataError() {
321
+ if (!this.listData || this.listData.length < 1) {
322
+ throw new Error('list-data 不能为空或者长度不能为0');
323
+ }
324
+ },
325
+ makeBaseData() {
326
+ const maxScore = this.listData[0].score;
327
+ if (maxScore === undefined || maxScore === null) {
328
+ console.warn('Max score not available in listData[0]');
329
+ this.keys = [100, 90, 80, 70, 60, 50];
330
+ } else {
331
+ this.keys = [maxScore, maxScore * 0.9, maxScore * 0.8, maxScore * 0.7, maxScore * 0.6, maxScore * 0.5];
332
+ }
333
+ this.filterData = [
334
+ {
335
+ title: `${this.makeFloatRight(this.keys[0])}`,
336
+ key: '>90',
337
+ unit: '>',
338
+ count: 0,
339
+ active: true // 默认选中第一个
340
+ },
341
+ {
342
+ title: `${this.makeFloatRight(this.keys[1])}`,
343
+ key: '>=90',
344
+ unit: '>=',
345
+ count: 0,
346
+ active: false
347
+ },
348
+ {
349
+ title: `${this.makeFloatRight(this.keys[2])}`,
350
+ key: '>=80',
351
+ unit: '>=',
352
+ count: 0,
353
+ active: false
354
+ },
355
+ {
356
+ title: `${this.makeFloatRight(this.keys[3])}`,
357
+ key: '>=70',
358
+ unit: '>=',
359
+ count: 0,
360
+ active: false
361
+ },
362
+ {
363
+ title: `${this.makeFloatRight(this.keys[4])}`,
364
+ key: '>=60',
365
+ unit: '>=',
366
+ count: 0,
367
+ active: false
368
+ },
369
+ {
370
+ title: `≤${this.makeFloatRight(this.keys[5])}`,
371
+ key: '<60',
372
+ unit: '≤',
373
+ count: 0,
374
+ active: false
375
+ }
376
+ ];
377
+ // 直接调用 filterClick 选中第一个
378
+ if (this.filterData.length > 0) {
379
+ this.filterClick(this.filterData[0]);
380
+ }
381
+ },
382
+ makeFloatRight(score) {
383
+ return Number.isInteger(score) ? score : parseFloat(score).toFixed(1);
384
+ },
385
+ updateFilterData() {
386
+ this.resizeScoreMap();
387
+ if (!this.replyCache || Object.keys(this.replyCache).length === 0) {
388
+ this.filterData.forEach(item => item.count = 0);
389
+ this.showTableList = [...this.tabList];
390
+ this.resizeFirstActive();
391
+ return;
392
+ }
393
+
394
+ // 保存当前选中的题号ID
395
+ const currentActiveId = this.activeItem ? this.activeItem.id : null;
396
+
397
+ this.tabList.map((list) => {
398
+ const {id} = list;
399
+ if (this.replyCache[id]) {
400
+ const {score} = this.replyCache[id];
401
+ if (score >= this.keys[0]) {
402
+ this.scoreMap['>90'].push(list);
403
+ } else if (score >= this.keys[1] && score < this.keys[0]) {
404
+ this.scoreMap['>=90'].push(list);
405
+ } else if (score >= this.keys[2] && score < this.keys[1]) {
406
+ this.scoreMap['>=80'].push(list);
407
+ } else if (score >= this.keys[3] && score < this.keys[2]) {
408
+ this.scoreMap['>=70'].push(list);
409
+ } else if (score >= this.keys[4] && score < this.keys[3]) {
410
+ this.scoreMap['>=60'].push(list);
411
+ } else if (score < this.keys[4]) {
412
+ this.scoreMap['<60'].push(list);
413
+ }
414
+ }
415
+ });
416
+
417
+ this.filterData.map((item) => {
418
+ item.count = this.scoreMap[item.key] ? this.scoreMap[item.key].length : 0;
419
+ });
420
+
421
+ const activeFilter = this.filterData.find(item => item.active);
422
+ if (activeFilter) {
423
+ const currentFilteredList = this.scoreMap[activeFilter.key] || [];
424
+ this.showTableList = currentFilteredList;
425
+
426
+ // 如果之前有选中的题号,尝试保持选中状态
427
+ if (currentActiveId) {
428
+ const activeItem = this.showTableList.find(item => item.id === currentActiveId);
429
+ if (activeItem) {
430
+ this.showTableList.forEach(item => item.active = false);
431
+ activeItem.active = true;
432
+ this.activeItem = activeItem;
433
+ this.analyzeData = this.replyCache[activeItem.id];
434
+ } else {
435
+ this.resizeFirstActive();
436
+ }
437
+ } else {
438
+ this.resizeFirstActive();
439
+ }
440
+ } else {
441
+ this.showTableList = [...this.tabList];
442
+ this.resizeFirstActive();
443
+ }
444
+ this.$forceUpdate();
445
+ },
446
+ resizeScoreMap() {
447
+ this.scoreMap = {'>90': [], '>=90': [], '>=80': [], '>=70': [], '>=60': [], '<60': []};
448
+ },
449
+ filterClick(selectedFilter) {
450
+ this.filterData.forEach(item => {
451
+ item.active = item.key === selectedFilter.key;
452
+ });
453
+ const filteredList = this.scoreMap[selectedFilter.key];
454
+ this.showTableList = filteredList;
455
+ this.resizeFirstActive();
456
+ this.$forceUpdate();
457
+ }
458
+ }
459
+ }
460
+ </script>
461
+ <style lang="scss" scoped>
462
+ .ai-contain {
463
+ position: fixed;
464
+ top: 0;
465
+ left: 0;
466
+ width: 100%;
467
+ height: 100%;
468
+ background: #F3F5FE;
469
+ z-index: 999;
470
+ display: flex;
471
+ flex-direction: column;
472
+ overflow: hidden;
473
+
474
+ .bg-image {
475
+ position: absolute;
476
+ top: 0;
477
+ left: 0;
478
+ width: 100%;
479
+ height: 100%;
480
+ background: linear-gradient(55.6deg, rgb(255, 255, 255) 41%, rgb(224, 224, 255) 100%);
481
+ background-size: cover;
482
+ opacity: 0.1;
483
+ }
484
+
485
+ .ai-contain-header {
486
+ position: relative;
487
+ display: flex;
488
+ justify-content: space-between;
489
+ align-items: center;
490
+ padding: 16px;
491
+ background: #F3F5FE;
492
+ z-index: 1;
493
+
494
+ .header-left {
495
+ display: flex;
496
+ align-items: center;
497
+ gap: 12px;
498
+
499
+ .el-icon-arrow-left {
500
+ font-size: 24px;
501
+ cursor: pointer;
502
+ padding: 4px;
503
+ border-radius: 50%;
504
+ transition: background-color 0.3s;
505
+
506
+ &:hover {
507
+ background-color: rgba(0, 0, 0, 0.05);
508
+ }
509
+ }
510
+
511
+ .title-font {
512
+ font-size: 20px;
513
+ font-weight: 600;
514
+ color: #333;
515
+ }
516
+ }
517
+ }
518
+
519
+ .score-filter-row {
520
+ display: flex;
521
+ overflow-x: auto;
522
+ padding: 8px 16px;
523
+ background: linear-gradient(90deg, #8B76F1 0%, #B1A6F5 100%); /* Gradient background */
524
+ gap: 12px; /* Space between score items */
525
+ flex-shrink: 0;
526
+ width: 100%;
527
+ box-sizing: border-box;
528
+ align-items: center;
529
+
530
+ scrollbar-width: none;
531
+ -ms-overflow-style: none;
532
+
533
+ &::-webkit-scrollbar {
534
+ display: none;
535
+ }
536
+
537
+ .score-item {
538
+ flex-shrink: 0;
539
+ flex-grow: 1;
540
+ flex-basis: 0;
541
+ min-width: 60px;
542
+ padding: 8px 16px;
543
+ border-radius: 8px;
544
+ text-align: center;
545
+ color: #fff;
546
+ cursor: pointer;
547
+ transition: all 0.3s ease;
548
+ opacity: 0.8;
549
+
550
+ &:hover {
551
+ opacity: 1;
552
+ transform: translateY(-2px);
553
+ }
554
+
555
+ &.active {
556
+ background: linear-gradient(to bottom right, #FF8686, #FF4242); /* Red gradient background for active state */
557
+ opacity: 1;
558
+ font-weight: bold;
559
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
560
+ border: 1px solid white;
561
+ }
562
+
563
+ p {
564
+ margin: 0;
565
+ line-height: 1.3;
566
+ font-size: 12px;
567
+ }
568
+
569
+ .number {
570
+ font-size: 18px;
571
+ font-weight: bold;
572
+ }
573
+
574
+ .unit {
575
+ font-size: 12px; /* Smaller font size for the unit */
576
+ }
577
+ }
578
+ }
579
+
580
+ .wrap {
581
+ flex: 1;
582
+ display: flex;
583
+ overflow: hidden;
584
+ position: relative;
585
+
586
+ .filter-wrap {
587
+ width: 300px;
588
+ background: #fff;
589
+ border-right: 1px solid #eee;
590
+ transition: transform 0.3s ease;
591
+ }
592
+
593
+ .normal-wrap {
594
+ flex: 1;
595
+ display: flex;
596
+ flex-direction: column;
597
+ overflow: hidden;
598
+ transition: margin-left 0.3s ease;
599
+ background: #F3F5FE;
600
+
601
+ &.full-width {
602
+ margin-left: 0;
603
+ }
604
+
605
+ .label-wrap {
606
+ padding: 0 16px;
607
+ flex-shrink: 0;
608
+
609
+ .label-container {
610
+ display: flex;
611
+ flex-wrap: nowrap;
612
+ gap: 8px;
613
+ padding: 8px 0;
614
+ overflow-x: auto;
615
+ -webkit-overflow-scrolling: touch;
616
+ scrollbar-width: none;
617
+ -ms-overflow-style: none;
618
+
619
+ &::-webkit-scrollbar {
620
+ display: none;
621
+ }
622
+ }
623
+
624
+ .label-item {
625
+ padding: 8px 16px;
626
+ background: #fff;
627
+ border-radius: 25px;
628
+ cursor: pointer;
629
+ white-space: nowrap;
630
+ transition: all 0.3s;
631
+ position: relative;
632
+
633
+ &-active {
634
+ background: #8080F0;
635
+ color: #fff;
636
+ }
637
+
638
+ .loading-block {
639
+ position: absolute;
640
+ right: 4px;
641
+ top: 50%;
642
+ transform: translateY(-50%);
643
+ }
644
+ }
645
+ }
646
+
647
+ .ai-main-content {
648
+ flex: 1;
649
+ display: flex;
650
+ flex-direction: column;
651
+ overflow-y: auto;
652
+ overflow-x: hidden;
653
+ position: relative;
654
+ box-sizing: border-box;
655
+
656
+ .member-table {
657
+ width: 300px;
658
+ background: #fff;
659
+ border-left: 1px solid #eee;
660
+ transition: transform 0.3s ease;
661
+ }
662
+ }
663
+ }
664
+ }
665
+ }
666
+
667
+ // 响应式设计
668
+ @media screen and (max-width: 768px) {
669
+ .ai-contain {
670
+ .wrap {
671
+ .filter-wrap {
672
+ position: absolute;
673
+ left: 0;
674
+ top: 0;
675
+ bottom: 0;
676
+ transform: translateX(-100%);
677
+ z-index: 2;
678
+
679
+ &.show {
680
+ transform: translateX(0);
681
+ }
682
+ }
683
+
684
+ .normal-wrap {
685
+ .ai-main-content {
686
+ .member-table {
687
+ position: absolute;
688
+ right: 0;
689
+ top: 0;
690
+ bottom: 0;
691
+ transform: translateX(100%);
692
+ z-index: 2;
693
+
694
+ &.show {
695
+ transform: translateX(0);
696
+ }
697
+ }
698
+ }
699
+ }
700
+ }
701
+
702
+ .ai-contain-header {
703
+ padding: 15px;
704
+
705
+ .header-left {
706
+ gap: 8px;
707
+
708
+ .el-icon-back {
709
+ font-size: 20px;
710
+ padding: 2px;
711
+ }
712
+
713
+ .title-font {
714
+ font-size: 16px;
715
+ }
716
+ }
717
+ }
718
+
719
+ .score-filter-row {
720
+ padding: 15px 12px;
721
+ gap: 8px;
722
+
723
+ .score-item {
724
+ flex-grow: 1;
725
+ flex-basis: auto;
726
+ min-width: unset;
727
+ padding: 6px 8px;
728
+
729
+ .number {
730
+ font-size: 16px;
731
+ }
732
+
733
+
734
+ &.active {
735
+ background: linear-gradient(to bottom right, #FF8686, #FF4242); /* Red gradient background for active state */
736
+ opacity: 1;
737
+ font-weight: bold;
738
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
739
+ border: 1px solid white;
740
+ }
741
+ }
742
+ }
743
+ }
744
+ }
745
+
746
+ // Add a media query for larger screens to distribute space
747
+ @media screen and (min-width: 769px) {
748
+ .ai-contain {
749
+ .wrap {
750
+ .filter-wrap {
751
+ width: 250px;
752
+ }
753
+
754
+ .normal-wrap {
755
+ .ai-main-content {
756
+ .member-table {
757
+ width: 250px;
758
+ }
759
+ }
760
+ }
761
+ }
762
+ }
763
+ }
764
+
765
+ // 大屏幕设备
766
+ @media screen and (min-width: 1025px) {
767
+ .ai-contain {
768
+ .wrap {
769
+ .filter-wrap {
770
+ width: 300px;
771
+ }
772
+
773
+ .normal-wrap {
774
+ .ai-main-content {
775
+ .member-table {
776
+ width: 300px;
777
+ }
778
+ }
779
+ }
780
+ }
781
+ }
782
+ }
783
+ </style>