-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtalk.html
More file actions
1527 lines (1402 loc) · 64.9 KB
/
talk.html
File metadata and controls
1527 lines (1402 loc) · 64.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI学工 - 谈心谈话管理</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/css/all.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
background-color: #f6f8fa;
font-size: 1rem; /* 统一字体大小 */
}
/* 统一字体大小规范 */
.text-xs, .text-sm, .quick-question, .student-tag, .knowledge-tag {
font-size: 0.875rem !important; /* 统一小号字体大小 */
}
h1, h2, h3, h4, h5, h6, .text-lg, .text-xl, .text-2xl {
font-size: 1rem !important; /* 统一标题字体大小 */
}
.text-2xl {
font-size: 1.25rem !important; /* 允许大号字体稍大一些 */
}
.sidebar {
background-color: #fff;
width: 220px;
transition: all 0.3s;
}
.sidebar.collapsed {
width: 70px;
}
.menu-item {
border-radius: 8px;
margin: 5px 10px;
transition: all 0.2s;
}
.menu-item:hover {
background-color: #f0f7ff;
}
.menu-item.active {
background-color: #e6f2ff;
color: #3b82f6;
}
.data-card {
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
transition: all 0.3s;
}
.data-card:hover {
transform: translateY(-3px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.assistant-area {
width: 400px; /* 宽度增加到400px */
background-color: #fff; /* 与菜单区域一致的背景色 */
}
.system-logo {
height: 40px;
margin: 10px 0;
}
.chat-bubble {
border-radius: 14px;
max-width: 85%;
}
.chat-bubble.user {
background-color: #3b82f6;
color: white;
margin-left: auto;
}
.chat-bubble.assistant {
background-color: #f0f7ff;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.quick-question {
cursor: pointer;
transition: all 0.2s;
}
.quick-question:hover {
background-color: #f0f7ff;
color: #3b82f6;
}
.assistant-dialog {
height: 70%; /* 对话区域占据更多空间 */
}
.common-questions {
margin-bottom: 0.5rem;
}
.dimension-tabs {
display: flex;
border-bottom: 1px solid #e5e7eb;
margin-bottom: 1rem;
}
.dimension-tab {
padding: 0.5rem 1rem;
cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.2s;
}
.dimension-tab.active {
border-bottom-color: #3b82f6;
color: #3b82f6;
font-weight: 500;
}
.role-selector {
margin-bottom: 1rem;
}
.role-btn {
padding: 0.5rem 1rem;
border-radius: 6px;
background-color: #f3f4f6;
cursor: pointer;
margin-right: 0.5rem;
transition: all 0.2s;
}
.role-btn.active {
background-color: #3b82f6;
color: white;
}
.trend-indicator {
display: flex;
align-items: center;
font-size: 12px;
}
.trend-up {
color: #10b981;
}
.trend-down {
color: #ef4444;
}
.trend-neutral {
color: #9ca3af;
}
/* 添加指标趋势图样式 */
.trend-chart {
height: 40px;
margin-top: 8px;
}
/* 分布图样式 */
.mini-distribution-chart {
height: 35px;
margin-top: 4px;
}
/* 日程日历样式 */
.calendar-wrapper {
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
padding: 16px;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 4px;
}
.calendar-weekday {
text-align: center;
font-size: 12px;
color: #6b7280;
padding: 4px;
}
.calendar-day {
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
cursor: pointer;
position: relative;
}
.calendar-day:hover {
background-color: #f3f4f6;
}
.calendar-day.today {
background-color: #e6f2ff;
font-weight: 600;
color: #3b82f6;
}
.calendar-day.has-event:after {
content: '';
position: absolute;
bottom: 4px;
width: 4px;
height: 4px;
background: #3b82f6;
border-radius: 50%;
}
.calendar-day.has-urgent:after {
background: #ef4444;
}
</style>
</head>
<body>
<!-- 主容器 -->
<div class="flex h-screen overflow-hidden">
<!-- 左侧菜单 -->
<div class="sidebar flex flex-col shadow-sm">
<!-- Logo -->
<div class="flex items-center justify-center py-4">
<div class="flex items-center">
<i class="fas fa-robot text-blue-500 text-2xl mr-2"></i>
<span class="font-bold text-lg text-blue-600">AI学工</span>
</div>
</div>
<!-- 菜单栏 -->
<div class="flex-1 overflow-y-auto px-3 py-4">
<ul>
<li class="menu-item px-4 py-3">
<a href="index.html" class="flex items-center">
<i class="fas fa-home text-lg w-6"></i>
<span class="ml-3">首页</span>
</a>
</li>
<!-- 学生信息一级菜单,可展开下拉菜单 -->
<li class="menu-item px-4 py-2">
<div class="flex items-center justify-between cursor-pointer" onclick="toggleSubmenu('studentInfoSubmenu')">
<div class="flex items-center">
<i class="fas fa-user-graduate text-lg w-6"></i>
<span class="ml-3">学生信息</span>
</div>
<i class="fas fa-chevron-down text-sm text-gray-500" id="studentInfoArrow"></i>
</div>
<!-- 子菜单 -->
<ul id="studentInfoSubmenu" class="ml-8 mt-2 space-y-1">
<li class="py-2 px-2 rounded-md hover:bg-gray-100">
<a href="student-info.html" class="block">
<i class="fas fa-search text-sm mr-2"></i>学生查询
</a>
</li>
<li class="py-2 px-2 rounded-md hover:bg-gray-100">
<a href="student-statistics.html" class="block">
<i class="fas fa-chart-pie text-sm mr-2"></i>学生统计
</a>
</li>
</ul>
</li>
<li class="menu-item active px-4 py-3">
<a href="talk.html" class="flex items-center">
<i class="fas fa-comments text-lg w-6"></i>
<span class="ml-3">谈心谈话</span>
</a>
</li>
<li class="menu-item px-4 py-3">
<a href="early-warning.html" class="flex items-center">
<i class="fas fa-exclamation-triangle text-lg w-6"></i>
<span class="ml-3">预警管理</span>
</a>
</li>
<li class="menu-item px-4 py-3">
<a href="knowledge-base.html" class="flex items-center">
<i class="fas fa-book text-lg w-6"></i>
<span class="ml-3">知识库管理</span>
</a>
</li>
<li class="menu-item px-4 py-3">
<a href="settings.html" class="flex items-center">
<i class="fas fa-cog text-lg w-6"></i>
<span class="ml-3">系统设置</span>
</a>
</li>
</ul>
</div>
</div>
<!-- 主内容区 -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- 顶部导航栏 -->
<header class="bg-white shadow-sm">
<div class="flex items-center px-6 py-3">
<!-- 左侧页面标题 -->
<div>
<h1 class="text-lg font-medium">谈心谈话管理</h1>
</div>
</div>
</header>
<!-- 主内容和助手区域的容器 -->
<div class="flex flex-1 overflow-hidden">
<!-- 内容区域 -->
<main class="flex-1 overflow-y-auto p-6 bg-gray-50">
<!-- 页面标题 -->
<div class="flex justify-between items-center mb-6">
<div>
<h1 class="text-xl font-bold text-gray-800">谈心谈话管理</h1>
<p class="text-gray-500 mt-1">集中管理谈心谈话日程与记录</p>
</div>
</div>
<!-- 谈心谈话日程待办 -->
<div class="mb-10">
<div class="flex justify-between items-center mb-4">
<h2 class="text-base font-semibold text-gray-800">谈心谈话日程待办</h2>
<div class="flex items-center">
<span class="text-gray-500 mr-2">完成率 42%</span>
<span class="text-gray-500">本周</span>
<i class="fas fa-chevron-down ml-2 text-gray-500"></i>
</div>
</div>
<div class="grid grid-cols-2 gap-6">
<!-- 日程日历 -->
<div class="calendar-wrapper">
<div class="calendar-header">
<button class="text-gray-500"><i class="fas fa-chevron-left"></i></button>
<h3 class="font-medium">2024年7月</h3>
<button class="text-gray-500"><i class="fas fa-chevron-right"></i></button>
</div>
<div class="calendar-grid">
<div class="calendar-weekday">日</div>
<div class="calendar-weekday">一</div>
<div class="calendar-weekday">二</div>
<div class="calendar-weekday">三</div>
<div class="calendar-weekday">四</div>
<div class="calendar-weekday">五</div>
<div class="calendar-weekday">六</div>
<div class="calendar-day text-gray-300">30</div>
<div class="calendar-day">1</div>
<div class="calendar-day">2</div>
<div class="calendar-day">3</div>
<div class="calendar-day">4</div>
<div class="calendar-day">5</div>
<div class="calendar-day">6</div>
<div class="calendar-day">7</div>
<div class="calendar-day">8</div>
<div class="calendar-day">9</div>
<div class="calendar-day has-event">10</div>
<div class="calendar-day">11</div>
<div class="calendar-day has-urgent">12</div>
<div class="calendar-day">13</div>
<div class="calendar-day">14</div>
<div class="calendar-day today">15</div>
<div class="calendar-day has-event">16</div>
<div class="calendar-day">17</div>
<div class="calendar-day has-event">18</div>
<div class="calendar-day">19</div>
<div class="calendar-day">20</div>
<div class="calendar-day">21</div>
<div class="calendar-day">22</div>
<div class="calendar-day">23</div>
<div class="calendar-day">24</div>
<div class="calendar-day">25</div>
<div class="calendar-day">26</div>
<div class="calendar-day">27</div>
<div class="calendar-day">28</div>
<div class="calendar-day">29</div>
<div class="calendar-day">30</div>
<div class="calendar-day">31</div>
<div class="calendar-day text-gray-300">1</div>
<div class="calendar-day text-gray-300">2</div>
<div class="calendar-day text-gray-300">3</div>
</div>
</div>
<!-- 待办列表 -->
<div class="data-card bg-white p-0 overflow-hidden">
<div class="px-4 py-3 border-b border-gray-100 flex items-center justify-between">
<div class="flex items-center">
<h3 class="font-medium">谈话待办</h3>
<div class="flex ml-4">
<button class="px-3 py-1 text-sm rounded-md bg-blue-50 text-blue-500 mr-2">全部</button>
<button class="px-3 py-1 text-sm rounded-md text-gray-500 mr-2">未完成</button>
<button class="px-3 py-1 text-sm rounded-md text-gray-500">已完成</button>
</div>
</div>
<button class="text-blue-500 text-sm flex items-center" onclick="showAddTodoDialog()">
<i class="fas fa-plus mr-1"></i>添加待办
</button>
</div>
<ul>
<!-- 谈话待办1 -->
<li class="border-b border-gray-100 p-4 flex items-center">
<div class="w-8 h-8 flex items-center justify-center mr-3">
<i class="far fa-clock text-red-500"></i>
</div>
<div class="flex-1">
<div class="flex items-center">
<h4 class="text-gray-800 font-medium">与张明同学谈心交流</h4>
<span class="ml-2 text-xs bg-red-100 text-red-600 px-2 py-0.5 rounded">紧急</span>
</div>
<p class="text-gray-500 text-sm mt-1">2024-07-16 14:00 计算机学院 大三 学业问题</p>
</div>
<div class="flex items-center">
<button class="mr-2 text-blue-500 text-sm">完成</button>
<button class="mr-2 text-gray-500 text-sm">编辑</button>
<button class="text-gray-500 text-sm">删除</button>
</div>
</li>
<!-- 谈话待办2 -->
<li class="border-b border-gray-100 p-4 flex items-center">
<div class="w-8 h-8 flex items-center justify-center mr-3">
<i class="fas fa-check-circle text-green-500"></i>
</div>
<div class="flex-1">
<div class="flex items-center">
<h4 class="text-gray-800 font-medium">李华同学入党动机交流</h4>
</div>
<p class="text-gray-500 text-sm mt-1">2024-07-18 15:30 哲学院 大二 思想交流</p>
</div>
<div class="flex items-center">
<button class="mr-2 text-blue-500 text-sm">完成</button>
<button class="mr-2 text-gray-500 text-sm">编辑</button>
<button class="text-gray-500 text-sm">删除</button>
</div>
</li>
<!-- 谈话待办3 -->
<li class="border-b border-gray-100 p-4 flex items-center">
<div class="w-8 h-8 flex items-center justify-center mr-3">
<i class="fas fa-check-circle text-green-500"></i>
</div>
<div class="flex-1">
<div class="flex items-center">
<h4 class="text-gray-800 font-medium">王敏同学心理疏导</h4>
<span class="ml-2 text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded">已完成</span>
</div>
<p class="text-gray-500 text-sm mt-1">2024-07-12 10:00 外国语学院 大一 心理问题</p>
</div>
<div class="flex items-center">
<button class="mr-2 text-gray-400 text-sm">完成</button>
<button class="mr-2 text-gray-500 text-sm">编辑</button>
<button class="text-gray-500 text-sm">删除</button>
</div>
</li>
</ul>
</div>
</div>
</div>
<!-- 谈心谈话查询和列表 -->
<div>
<div class="flex justify-between items-center mb-4">
<h2 class="text-base font-semibold text-gray-800">谈心谈话查询</h2>
<div class="flex items-center">
<button class="flex items-center px-3 py-1 bg-blue-50 text-blue-500 rounded-md mr-3 text-sm">
<i class="fas fa-star mr-1"></i>
<span>重点关注</span>
</button>
<button class="flex items-center px-3 py-1 bg-gray-100 text-gray-500 rounded-md text-sm">
<i class="fas fa-download mr-1"></i>
<span>导出</span>
</button>
</div>
</div>
<!-- 查询条件 -->
<div class="bg-white p-4 rounded-lg shadow-sm mb-4">
<div class="grid grid-cols-4 gap-4">
<div>
<label class="block text-sm text-gray-600 mb-1">学号/姓名</label>
<input type="text" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm" placeholder="输入学号或姓名">
</div>
<div>
<label class="block text-sm text-gray-600 mb-1">院系</label>
<select class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm">
<option value="">全部院系</option>
<option value="计算机学院">计算机学院</option>
<option value="文学院">文学院</option>
<option value="医学院">医学院</option>
</select>
</div>
<div>
<label class="block text-sm text-gray-600 mb-1">班级</label>
<select class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm">
<option value="">全部班级</option>
<option value="计算机2101">计算机2101</option>
<option value="计算机2102">计算机2102</option>
<option value="计算机2103">计算机2103</option>
</select>
</div>
<div class="flex items-end justify-end">
<button class="bg-blue-500 text-white px-4 py-2 rounded-md mr-2 whitespace-nowrap text-sm">
<i class="fas fa-search mr-1"></i>查询
</button>
<button class="border border-gray-300 text-gray-600 px-3 py-2 rounded-md mr-2 whitespace-nowrap text-sm">
重置
</button>
<button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md flex items-center whitespace-nowrap text-sm" onclick="showNewTalkDialog()">
<i class="fas fa-plus mr-1"></i>新建谈话
</button>
</div>
</div>
</div>
<!-- 学生列表 -->
<div class="bg-white rounded-lg shadow-sm overflow-hidden">
<table class="w-full">
<thead>
<tr class="bg-gray-50 text-left">
<th class="px-4 py-3 text-sm font-medium text-gray-600">学号</th>
<th class="px-4 py-3 text-sm font-medium text-gray-600">姓名</th>
<th class="px-4 py-3 text-sm font-medium text-gray-600">院系</th>
<th class="px-4 py-3 text-sm font-medium text-gray-600">班级</th>
<th class="px-4 py-3 text-sm font-medium text-gray-600">最近谈话</th>
<th class="px-4 py-3 text-sm font-medium text-gray-600">谈话次数</th>
<th class="px-4 py-3 text-sm font-medium text-gray-600 text-right">操作</th>
</tr>
</thead>
<tbody>
<!-- 学生1 -->
<tr class="border-b border-gray-100">
<td class="px-4 py-3 text-sm">20210001</td>
<td class="px-4 py-3 text-sm font-medium">张明</td>
<td class="px-4 py-3 text-sm">计算机学院</td>
<td class="px-4 py-3 text-sm">计算机2101</td>
<td class="px-4 py-3 text-sm">2024-07-01</td>
<td class="px-4 py-3 text-sm">3</td>
<td class="px-4 py-3 text-sm">
<div class="flex items-center justify-end">
<button class="text-blue-500 mr-3 whitespace-nowrap" onclick="toggleHistory(this)">
<i class="fas fa-history mr-1"></i>历史
</button>
<button class="text-blue-500 mr-3 whitespace-nowrap" onclick="viewStudentDetail(20210001)">
<i class="far fa-eye mr-1"></i>查看
</button>
<button class="text-green-500 mr-3 whitespace-nowrap" onclick="showNewTalkDialog(20210001, '张明')">
<i class="fas fa-plus mr-1"></i>新增
</button>
<button class="text-gray-400 whitespace-nowrap" onclick="toggleFavorite(this, 20210001)">
<i class="far fa-star"></i>
</button>
</div>
</td>
</tr>
<!-- 学生1的谈话历史 - 默认隐藏 -->
<tr class="bg-blue-50" style="display: none;">
<td colspan="7" class="px-8 py-4">
<div class="bg-white p-4 rounded-lg shadow-sm">
<div class="divide-y divide-gray-100">
<!-- 记录1 -->
<div class="py-3">
<div class="flex justify-end mb-2">
<span class="text-sm text-gray-500">2024-07-01 10:30</span>
</div>
<p class="text-sm text-gray-600 mb-2">学生反映对算法课程学习吃力,讨论了学习方法和辅导资源。</p>
<div class="flex justify-end">
<button class="text-blue-500 text-sm" onclick="showTalkDetail()">查看详情</button>
</div>
</div>
<!-- 记录2 -->
<div class="py-3">
<div class="flex justify-end mb-2">
<span class="text-sm text-gray-500">2024-06-15 14:20</span>
</div>
<p class="text-sm text-gray-600 mb-2">讨论了学生未来的职业规划,推荐了相关实习和项目经验积累方向。</p>
<div class="flex justify-end">
<button class="text-blue-500 text-sm" onclick="showTalkDetail()">查看详情</button>
</div>
</div>
<!-- 记录3 -->
<div class="py-3">
<div class="flex justify-end mb-2">
<span class="text-sm text-gray-500">2024-03-10 09:00</span>
</div>
<p class="text-sm text-gray-600 mb-2">新学期入学适应情况交流,学生反映宿舍关系良好,已适应大学学习节奏。</p>
<div class="flex justify-end">
<button class="text-blue-500 text-sm" onclick="showTalkDetail()">查看详情</button>
</div>
</div>
</div>
</div>
</td>
</tr>
<!-- 学生2 -->
<tr class="border-b border-gray-100">
<td class="px-4 py-3 text-sm">20210015</td>
<td class="px-4 py-3 text-sm font-medium">李华</td>
<td class="px-4 py-3 text-sm">哲学院</td>
<td class="px-4 py-3 text-sm">哲学2102</td>
<td class="px-4 py-3 text-sm">2024-06-20</td>
<td class="px-4 py-3 text-sm">2</td>
<td class="px-4 py-3 text-sm">
<div class="flex items-center justify-end">
<button class="text-blue-500 mr-3 whitespace-nowrap" onclick="toggleHistory(this)">
<i class="fas fa-history mr-1"></i>历史
</button>
<button class="text-blue-500 mr-3 whitespace-nowrap" onclick="viewStudentDetail(20210015)">
<i class="far fa-eye mr-1"></i>查看
</button>
<button class="text-green-500 mr-3 whitespace-nowrap" onclick="showNewTalkDialog(20210015, '李华')">
<i class="fas fa-plus mr-1"></i>新增
</button>
<button class="text-yellow-400 whitespace-nowrap" onclick="toggleFavorite(this, 20210015)">
<i class="fas fa-star"></i>
</button>
</div>
</td>
</tr>
<!-- 学生3 -->
<tr class="border-b border-gray-100">
<td class="px-4 py-3 text-sm">20220042</td>
<td class="px-4 py-3 text-sm font-medium">王敏</td>
<td class="px-4 py-3 text-sm">外国语学院</td>
<td class="px-4 py-3 text-sm">英语2201</td>
<td class="px-4 py-3 text-sm">2024-07-12</td>
<td class="px-4 py-3 text-sm">5</td>
<td class="px-4 py-3 text-sm">
<div class="flex items-center justify-end">
<button class="text-blue-500 mr-3 whitespace-nowrap" onclick="toggleHistory(this)">
<i class="fas fa-history mr-1"></i>历史
</button>
<button class="text-blue-500 mr-3 whitespace-nowrap" onclick="viewStudentDetail(20220042)">
<i class="far fa-eye mr-1"></i>查看
</button>
<button class="text-green-500 mr-3 whitespace-nowrap" onclick="showNewTalkDialog(20220042, '王敏')">
<i class="fas fa-plus mr-1"></i>新增
</button>
<button class="text-yellow-400 whitespace-nowrap" onclick="toggleFavorite(this, 20220042)">
<i class="fas fa-star"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<div class="flex justify-between items-center px-4 py-3 border-t border-gray-100">
<div class="text-sm text-gray-500">
共 42 条记录,每页显示 10 条
</div>
<div class="flex items-center">
<button class="w-8 h-8 border border-gray-300 rounded-l-md flex items-center justify-center">
<i class="fas fa-chevron-left text-gray-400"></i>
</button>
<button class="w-8 h-8 border-t border-b border-gray-300 flex items-center justify-center bg-blue-50 text-blue-500">1</button>
<button class="w-8 h-8 border-t border-b border-gray-300 flex items-center justify-center text-gray-500">2</button>
<button class="w-8 h-8 border-t border-b border-gray-300 flex items-center justify-center text-gray-500">3</button>
<button class="w-8 h-8 border-t border-b border-gray-300 flex items-center justify-center text-gray-500">4</button>
<button class="w-8 h-8 border border-gray-300 rounded-r-md flex items-center justify-center">
<i class="fas fa-chevron-right text-gray-500"></i>
</button>
</div>
</div>
</div>
</div>
<!-- 谈心谈话统计 - 删除此标题 -->
<!-- 删除以下所有统计指标卡片,保留上面的学生列表和下面的功能区内容 -->
<!-- 预警统计 - 删除此标题 -->
</main>
<!-- 右侧智能助手区域 - 保留原有实现 -->
<div class="assistant-area p-6 overflow-hidden flex flex-col h-full">
<div class="flex items-center mb-4">
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
<i class="fas fa-robot text-blue-500"></i>
</div>
<h3 class="ml-2 font-medium text-gray-800">智能助手</h3>
</div>
<!-- 工作建议区域 -->
<div class="assistant-dialog space-y-4 mb-2 flex-1 overflow-y-auto">
<div class="p-4 bg-blue-50 rounded-lg mb-4">
<h4 class="font-medium text-blue-800 mb-2">工作建议</h4>
<p class="text-sm text-gray-700">根据您的工作面板,我为您提供以下建议:</p>
<ul class="text-sm text-gray-700 mt-2 space-y-2">
<li>• 您有2项正在进行中的任务,建议优先处理"高年级学生就业指导座谈会准备"</li>
<li>• 本周预计有5名学生需要谈心谈话,可以安排在明后两天进行</li>
<li>• 有3名学生出现学业预警,建议及时干预</li>
<li>• 周报需要在周五前完成撰写,可以使用助手帮您生成初稿</li>
</ul>
</div>
<div class="flex">
<div class="chat-bubble user p-3">
<p class="text-sm">我最近的工作计划是什么?</p>
</div>
</div>
<div class="flex">
<div class="chat-bubble assistant p-3">
<p class="text-sm text-gray-700">您近期有3项待办任务:<br>1. 高年级学生就业指导座谈会准备<br>2. 新生入学教育方案制定(已完成)<br>3. 学业预警学生干预计划制定<br><br>此外,您还有5个学生需要进行谈心谈话,建议本周安排时间完成。</p>
</div>
</div>
</div>
<!-- 输入框 -->
<div class="mt-auto">
<!-- 常见问题区域 -->
<div class="common-questions">
<div class="flex flex-wrap gap-1 mb-2">
<div class="quick-question bg-gray-50 px-2 py-1 rounded text-xs text-gray-700">我今天有哪些工作?</div>
<div class="quick-question bg-gray-50 px-2 py-1 rounded text-xs text-gray-700">本周谈心谈话?</div>
<div class="quick-question bg-gray-50 px-2 py-1 rounded text-xs text-gray-700">预警分析</div>
<div class="quick-question bg-gray-50 px-2 py-1 rounded text-xs text-gray-700">生成报告</div>
</div>
</div>
<div class="bg-gray-50 rounded-lg border border-gray-200 overflow-hidden flex items-center pl-4 pr-1 py-1">
<input type="text" placeholder="请输入您的问题..." class="flex-1 text-sm bg-gray-50 outline-none">
<button class="p-2 rounded-full text-blue-500 hover:bg-blue-50">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 谈话记录详情弹窗 -->
<div id="talkDetailModal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center">
<div class="bg-white rounded-lg shadow-xl w-1/2 max-h-[90vh] overflow-hidden flex flex-col">
<!-- 弹窗头部 -->
<div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
<h3 class="font-semibold text-lg">谈话记录详情</h3>
<button class="text-gray-400 hover:text-gray-600">
<i class="fas fa-times"></i>
</button>
</div>
<!-- 弹窗内容 -->
<div class="flex-1 overflow-y-auto p-6">
<!-- 学生基本信息 -->
<div class="flex items-start mb-6">
<div class="w-16 h-16 rounded-full bg-gray-200 overflow-hidden mr-4">
<img src="img/avatar-placeholder.jpg" alt="学生头像" class="w-full h-full object-cover">
</div>
<div>
<h4 class="text-lg font-medium">张明</h4>
<p class="text-gray-500 text-sm mb-1">学号:20210001 | 计算机学院 | 计算机2101班</p>
<div class="flex items-center">
<span class="bg-blue-100 text-blue-500 text-xs px-2 py-0.5 rounded mr-2">班长</span>
<span class="bg-green-100 text-green-500 text-xs px-2 py-0.5 rounded mr-2">成绩优异</span>
<span class="bg-purple-100 text-purple-500 text-xs px-2 py-0.5 rounded">学科竞赛</span>
</div>
</div>
</div>
<!-- 谈话信息 -->
<div class="bg-gray-50 p-4 rounded-lg mb-6">
<div class="grid grid-cols-3 gap-4 mb-4">
<div>
<p class="text-sm text-gray-500 mb-1">谈话日期</p>
<p class="font-medium">2024-07-01 10:30</p>
</div>
<div>
<p class="text-sm text-gray-500 mb-1">谈话地点</p>
<p class="font-medium">计算机学院辅导员办公室</p>
</div>
<div>
<p class="text-sm text-gray-500 mb-1">时长</p>
<p class="font-medium">45分钟</p>
</div>
</div>
</div>
<!-- 谈话内容 -->
<div class="mb-6">
<h4 class="font-medium mb-3">谈话内容</h4>
<div class="bg-white border border-gray-200 rounded-lg p-4">
<p class="text-gray-700 mb-3">
张明同学反映最近对算法课程学习感到吃力,尤其是动态规划和图论算法部分,虽然能理解课堂内容,但作业和实践环节遇到困难。
</p>
<p class="text-gray-700 mb-3">
通过交流了解到,主要问题是缺乏系统性学习和实践不足。我向他推荐了额外的学习资源,包括王道算法课程和力扣平台上的相关题目。
</p>
<p class="text-gray-700">
同时建议他参加算法学习小组,与同学互相讨论,共同解决问题。学生表示会按照建议调整学习方法,并与我保持反馈。
</p>
</div>
</div>
<!-- 谈话总结 -->
<div>
<h4 class="font-medium mb-3">谈话总结</h4>
<div class="bg-white border border-gray-200 rounded-lg p-4">
<p class="text-gray-700">
学生学习态度积极,但存在学习方法不当问题。通过提供学习资源和引导参与小组学习,帮助其建立更有效的学习策略。需要两周后跟进效果。
</p>
</div>
</div>
</div>
<!-- 弹窗底部 -->
<div class="px-6 py-4 border-t border-gray-100 flex justify-end">
<button class="bg-gray-100 text-gray-600 px-4 py-2 rounded-md" onclick="closeTalkDetailModal()">关闭</button>
</div>
</div>
</div>
<!-- 新增谈话记录弹窗 -->
<div id="newTalkDialog" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center overflow-auto py-8">
<div class="bg-white rounded-lg shadow-xl w-3/5 max-w-3xl overflow-hidden flex flex-col">
<!-- 弹窗头部 -->
<div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
<h3 class="font-semibold text-lg">新增谈心谈话记录</h3>
<button class="text-gray-400 hover:text-gray-600" onclick="closeNewTalkDialog()">
<i class="fas fa-times"></i>
</button>
</div>
<!-- 弹窗内容 -->
<div class="flex-1 overflow-y-auto p-6" style="max-height: 70vh;">
<!-- 学生选择区域 - 当从查询页面新建时显示 -->
<div id="studentSearchSection" class="mb-6">
<label class="block text-sm text-gray-600 mb-2">学生信息 <span class="text-red-500">*</span></label>
<div class="relative">
<input type="text" class="w-full border border-gray-300 rounded-md px-3 py-2" placeholder="请输入学号或姓名搜索学生">
<button class="absolute right-1 top-1 bg-blue-50 text-blue-500 px-3 py-1 rounded">
<i class="fas fa-search mr-1"></i>搜索
</button>
</div>
</div>
<!-- 学生信息 - 当从学生行点击新增或从学生详情页点击时显示 -->
<div id="studentInfoSection" class="flex items-center mb-6 bg-gray-50 p-4 rounded-lg">
<div class="w-12 h-12 rounded-full bg-gray-200 overflow-hidden mr-4">
<img src="https://randomuser.me/api/portraits/men/75.jpg" alt="学生头像" class="w-full h-full object-cover">
</div>
<div>
<h4 class="font-medium" id="dialogStudentName">张明</h4>
<p class="text-gray-500 text-sm">学号:<span id="dialogStudentId">20210001</span> | 计算机学院 | 计算机2101班</p>
</div>
</div>
<!-- 分割线 -->
<div class="relative mb-6">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-200"></div>
</div>
<div class="relative flex justify-center">
<span class="bg-white px-4 text-sm text-gray-500">基本信息</span>
</div>
</div>
<!-- 基本信息 -->
<div class="grid grid-cols-2 gap-6 mb-6">
<div class="group">
<label class="block text-sm text-gray-600 mb-2">谈话日期时间 <span class="text-red-500">*</span></label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="far fa-calendar-alt text-gray-400"></i>
</div>
<input type="datetime-local" class="w-full border border-gray-300 rounded-md px-3 py-2 pl-10 focus:border-blue-500 focus:ring-1 focus:ring-blue-200 outline-none transition-all duration-200">
</div>
</div>
<div class="group">
<label class="block text-sm text-gray-600 mb-2">谈话地点 <span class="text-red-500">*</span></label>
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<i class="fas fa-map-marker-alt text-gray-400"></i>
</div>
<input type="text" class="w-full border border-gray-300 rounded-md px-3 py-2 pl-10 focus:border-blue-500 focus:ring-1 focus:ring-blue-200 outline-none transition-all duration-200" placeholder="输入谈话地点">
</div>
</div>
</div>
<!-- 分割线 -->
<div class="relative mb-6">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-200"></div>
</div>
<div class="relative flex justify-center">
<span class="bg-white px-4 text-sm text-gray-500">谈话内容</span>
</div>
</div>
<!-- 文件上传和语音转文字 -->
<div class="mb-6">
<label class="block text-sm text-gray-600 mb-2">文件上传</label>
<div class="border border-dashed border-gray-300 rounded-md p-4 text-center bg-gray-50">
<i class="fas fa-file-upload text-gray-400 text-xl mb-2"></i>
<p class="text-gray-500 mb-3">上传文件(支持语音文件和文本文件)</p>
<div class="flex justify-center">
<button class="bg-white text-blue-500 border border-blue-300 px-3 py-1.5 rounded-md text-sm hover:bg-blue-50 transition-all duration-200">
<i class="fas fa-upload mr-2"></i>上传文件
</button>
</div>
<p class="text-xs text-gray-400 mt-2">支持格式:.mp3, .wav, .txt, .docx等</p>
</div>
</div>
<!-- 转换按钮 -->
<div class="mb-6 flex justify-center">
<button id="convertToText" class="bg-green-50 text-green-600 px-4 py-2 rounded-md text-sm hover:bg-green-100 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200" disabled>
<i class="fas fa-file-alt mr-2"></i>将语音转换为文字
</button>
</div>
<!-- 谈话内容 -->
<div class="mb-6">
<label class="block text-sm text-gray-600 mb-2">谈话内容 <span class="text-red-500">*</span></label>
<div class="relative">
<textarea id="talkContent" class="w-full border border-gray-300 rounded-md px-3 py-2 h-40 focus:border-blue-500 focus:ring-1 focus:ring-blue-200 outline-none transition-all duration-200" placeholder="输入或从文件导入谈话内容"></textarea>
<div class="absolute bottom-2 right-2 text-xs text-gray-500 bg-white px-2 py-1 rounded-md">
<i class="fas fa-keyboard mr-1"></i><span id="charCount">0</span> 字
</div>
</div>
</div>
<!-- AI分析按钮 -->
<div class="mb-6 flex justify-center">
<button id="generateAISummary" class="bg-blue-500 text-white px-4 py-2 rounded-md text-sm hover:bg-blue-600 transition-all duration-200" onclick="generateAISummary()">
<i class="fas fa-robot mr-2"></i>生成AI总结和建议
</button>
</div>
<!-- AI总结结果 -->
<div id="aiSummaryResult" class="mb-6 bg-blue-50 p-4 rounded-md border border-blue-200 hidden">
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-white flex items-center justify-center mr-3 flex-shrink-0 border border-blue-200">
<i class="fas fa-robot text-blue-500"></i>
</div>
<div class="flex-1">
<h4 class="text-blue-800 font-medium mb-3">AI 分析与建议</h4>
<div id="aiSummaryContent" class="text-gray-700 bg-white p-4 rounded-md border border-blue-100">
<!-- AI生成的内容将在这里显示 -->
</div>
</div>
</div>
</div>
<!-- 谈话总结 -->
<div class="mb-6">
<label class="block text-sm text-gray-600 mb-2">谈话总结 <span class="text-red-500">*</span></label>
<textarea id="talkSummary" class="w-full border border-gray-300 rounded-md px-3 py-2 h-32 focus:border-blue-500 focus:ring-1 focus:ring-blue-200 outline-none transition-all duration-200" placeholder="输入谈话总结或使用AI生成的总结"></textarea>
</div>
</div>
<!-- 弹窗底部 -->
<div class="px-6 py-4 border-t border-gray-100 flex justify-end bg-gray-50">
<button class="bg-gray-100 text-gray-600 px-4 py-2 rounded-md mr-3 hover:bg-gray-200 transition-all duration-200" onclick="closeNewTalkDialog()">
取消
</button>
<button class="bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 transition-all duration-200" onclick="submitNewTalk()">
保存
</button>
</div>
</div>
</div>
<script>
// 初始化图表
document.addEventListener('DOMContentLoaded', function() {
// 初始化所有月度趋势图表
initMonthlyChart('talkTotalTimeMonthly', '谈心谈话总时长', '#3b82f6');
initMonthlyChart('talkCoverageMonthly', '谈心谈话覆盖率', '#10b981');
initMonthlyChart('talkAvgTimeMonthly', '谈话平均时间', '#3b82f6');
initMonthlyChart('perStudentTimeMonthly', '生均谈话时长', '#3b82f6');
initMonthlyChart('avgTalkCountMonthly', '平均谈话次数', '#3b82f6');
initMonthlyChart('warningTotalMonthly', '预警总量', '#ef4444');
initMonthlyChart('pendingWarningMonthly', '待处理预警', '#ef4444');
initMonthlyChart('warningProcessRateMonthly', '预警处理率', '#10b981');
initMonthlyChart('warningResolveRateMonthly', '预警解决率', '#10b981');
// 初始化所有分布图表
initDistributionChart('talkTotalTimeDistribution', '谈心谈话总时长', '#3b82f6');
initDistributionChart('talkCoverageDistribution', '谈心谈话覆盖率', '#10b981');
initDistributionChart('talkAvgTimeDistribution', '谈话平均时间', '#3b82f6');
initDistributionChart('perStudentTimeDistribution', '生均谈话时长', '#3b82f6');
initDistributionChart('avgTalkCountDistribution', '平均谈话次数', '#3b82f6');
initDistributionChart('warningTotalDistribution', '预警总量', '#ef4444');
initDistributionChart('pendingWarningDistribution', '待处理预警', '#ef4444');
initDistributionChart('warningProcessRateDistribution', '预警处理率', '#10b981');
initDistributionChart('warningResolveRateDistribution', '预警解决率', '#10b981');
// 月度趋势图表初始化函数
function initMonthlyChart(elementId, title, color) {
const ctx = document.getElementById(elementId).getContext('2d');
const months = ['2月', '3月', '4月', '5月', '6月', '7月'];
let currentData = [];
let lastYearData = [];
// 根据指标生成示例数据
if (title.includes('覆盖率') || title.includes('处理率') || title.includes('解决率')) {