Implement admin Excel import settings and chat preview

This commit is contained in:
2026-07-07 19:05:52 +08:00
parent d18d9fe9d8
commit cd01e45fbd
6 changed files with 746 additions and 78 deletions

View File

@@ -204,6 +204,13 @@ textarea {
font-size: 16px;
}
.tool-help {
margin: -4px 0 12px;
color: #667a73;
font-size: 13px;
line-height: 1.6;
}
.student-form-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
@@ -224,6 +231,30 @@ textarea {
align-items: center;
}
.student-file-import {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 8px;
margin-bottom: 12px;
}
.file-input {
width: 100%;
padding: 10px;
border: 1px dashed #b9c9c4;
border-radius: 8px;
background: #f8fbfa;
color: #40524b;
}
.file-name {
overflow: hidden;
color: #40524b;
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
}
.import-result {
color: #40524b;
font-size: 13px;
@@ -334,9 +365,11 @@ textarea {
}
.agent-preview-panel {
height: clamp(520px, calc(100vh - 170px), 680px);
height: clamp(560px, calc(100vh - 170px), 760px);
display: flex;
flex-direction: column;
padding: 0;
overflow: hidden;
}
.agent-config-grid {
@@ -356,7 +389,9 @@ textarea {
align-items: center;
justify-content: space-between;
gap: 10px;
margin-bottom: 12px;
padding: 16px 18px;
border-bottom: 1px solid #e4ece9;
background: #ffffff;
}
.agent-preview-head h3 {
@@ -378,37 +413,95 @@ textarea {
overflow: auto;
display: flex;
flex-direction: column;
gap: 10px;
padding-right: 4px;
gap: 18px;
padding: 18px;
background: #f6f8f7;
}
.agent-preview-message {
max-width: 92%;
padding: 10px 12px;
.agent-preview-message-row {
display: grid;
grid-template-columns: 32px minmax(0, 1fr);
gap: 10px;
align-items: start;
max-width: 96%;
}
.agent-preview-message-row.user {
align-self: flex-end;
grid-template-columns: minmax(0, 1fr) 32px;
}
.agent-preview-message-row.user .agent-preview-avatar {
grid-column: 2;
grid-row: 1;
background: #0f735d;
color: #ffffff;
}
.agent-preview-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
display: grid;
place-items: center;
background: #e0ebe7;
color: #0f735d;
font-size: 12px;
font-weight: 700;
}
.agent-preview-bubble {
min-width: 0;
padding: 12px 14px;
border: 1px solid #dfe8e5;
border-radius: 8px;
background: #f8fbfa;
background: #ffffff;
box-shadow: 0 8px 24px rgba(21, 43, 36, 0.05);
}
.agent-preview-message.user {
align-self: flex-end;
.agent-preview-message-row.user .agent-preview-bubble {
grid-column: 1;
grid-row: 1;
border-color: #cde7df;
background: #e9f5f1;
}
.agent-preview-message strong {
.agent-preview-message-row.thinking .agent-preview-bubble {
color: #667a73;
}
.agent-preview-bubble strong {
display: block;
margin-bottom: 6px;
color: #0f735d;
font-size: 12px;
}
.agent-preview-message pre {
.agent-preview-bubble pre {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
font-family: inherit;
line-height: 1.6;
line-height: 1.75;
}
.agent-preview-thinking {
margin-bottom: 10px;
padding: 9px 10px;
border-radius: 8px;
background: #f3f6f5;
color: #5f6f69;
}
.agent-preview-thinking summary {
cursor: pointer;
font-size: 12px;
font-weight: 600;
}
.agent-preview-thinking pre {
margin-top: 8px;
font-size: 13px;
}
.agent-preview-composer {
@@ -416,9 +509,9 @@ textarea {
grid-template-columns: minmax(0, 1fr) 76px;
gap: 10px;
align-items: end;
margin-top: 12px;
padding-top: 12px;
padding: 14px 18px 16px;
border-top: 1px solid #e4ece9;
background: #ffffff;
}
.agent-preview-composer .el-button {
@@ -429,6 +522,68 @@ textarea {
margin-top: 12px;
}
.settings-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
margin-bottom: 16px;
}
.settings-section,
.advanced-config-panel {
padding: 18px;
border: 1px solid #dfe8e5;
border-radius: 8px;
background: #ffffff;
}
.settings-section-head h3,
.advanced-config-head h3 {
margin: 0;
font-size: 17px;
}
.settings-section-head p,
.advanced-config-head p {
margin: 6px 0 0;
color: #667a73;
font-size: 13px;
line-height: 1.6;
}
.settings-fields {
display: grid;
gap: 14px;
margin-top: 16px;
}
.setting-field {
display: grid;
gap: 7px;
}
.setting-field span {
color: #223631;
font-weight: 600;
}
.setting-field small {
color: #667a73;
line-height: 1.5;
}
.setting-field .el-input-number {
width: 100%;
}
.advanced-config-panel {
margin-bottom: 16px;
}
.advanced-config-head {
margin-bottom: 12px;
}
.el-drawer .el-date-editor.el-input {
width: 100%;
}
@@ -563,3 +718,96 @@ textarea {
.error-text {
color: #b42318;
}
@media (max-width: 1120px) {
.student-tools,
.agent-workbench,
.settings-grid {
grid-template-columns: 1fr;
}
.agent-preview-panel {
height: 620px;
}
}
@media (max-width: 860px) {
body {
min-width: 0;
}
.login-box {
width: min(380px, calc(100vw - 32px));
padding: 24px;
}
.admin-shell {
display: block;
}
.sidebar {
position: sticky;
top: 0;
z-index: 10;
display: flex;
gap: 6px;
align-items: center;
overflow-x: auto;
padding: 10px 12px;
border-right: 0;
border-bottom: 1px solid #dfe8e5;
}
.sidebar-title {
flex: 0 0 auto;
padding: 0 8px 0 0;
}
.sidebar button {
flex: 0 0 auto;
width: auto;
margin-bottom: 0;
white-space: nowrap;
}
.workspace {
display: block;
}
.topbar {
padding: 12px 16px;
}
.content {
padding: 16px;
}
.page-head.inline {
flex-direction: column;
align-items: stretch;
}
.page-head.inline .el-input {
width: 100%;
}
.stats-grid,
.chat-summary {
grid-template-columns: 1fr;
}
.student-form-grid,
.knowledge-form,
.model-config-grid,
.quick-model-grid,
.agent-config-grid,
.inline-form,
.model-form {
grid-template-columns: 1fr;
}
.agent-preview-message-row,
.agent-preview-message-row.user {
max-width: 100%;
}
}