From 17505b5c22a8052ea8fbdc528513a19734bf6e6c Mon Sep 17 00:00:00 2001 From: GiveMePast <1248298477@qq.com> Date: Tue, 28 Jul 2026 16:24:31 +0800 Subject: [PATCH] wip --- .../design-system.json | 4 + src/components/common/SearchInput.vue | 54 ++ src/components/ticket/TicketFilter.vue | 15 +- src/components/ticket/TicketForm.vue | 26 + src/components/ticket/TicketList.vue | 34 +- src/utils/request.js | 1 - src/views/LoginView.vue | 39 +- src/views/TicketManagement.vue | 29 + src/views/UserView.vue | 848 ++++++++++-------- 9 files changed, 617 insertions(+), 433 deletions(-) create mode 100644 .kun-canvas/code-thr_193309e7eaa14e82997b674c3c38ef1a/design-system.json create mode 100644 src/components/common/SearchInput.vue diff --git a/.kun-canvas/code-thr_193309e7eaa14e82997b674c3c38ef1a/design-system.json b/.kun-canvas/code-thr_193309e7eaa14e82997b674c3c38ef1a/design-system.json new file mode 100644 index 0000000..c1476a3 --- /dev/null +++ b/.kun-canvas/code-thr_193309e7eaa14e82997b674c3c38ef1a/design-system.json @@ -0,0 +1,4 @@ +{ + "tokens": {}, + "components": {} +} \ No newline at end of file diff --git a/src/components/common/SearchInput.vue b/src/components/common/SearchInput.vue new file mode 100644 index 0000000..3a024dc --- /dev/null +++ b/src/components/common/SearchInput.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/src/components/ticket/TicketFilter.vue b/src/components/ticket/TicketFilter.vue index cb643e4..693f21d 100644 --- a/src/components/ticket/TicketFilter.vue +++ b/src/components/ticket/TicketFilter.vue @@ -34,14 +34,7 @@ - - - + @@ -70,6 +63,7 @@ @@ -554,9 +467,9 @@ onMounted(async () => { min-height: 0; background: none; --glow-indigo: rgba(99, 102, 241, 0.35); - --glow-amber: rgba(245, 158, 11, 0.3); - --glow-green: rgba(34, 197, 94, 0.3); - --glow-rose: rgba(244, 63, 94, 0.25); + --glow-amber: rgba(245, 158, 11, 0.3); + --glow-green: rgba(34, 197, 94, 0.3); + --glow-rose: rgba(244, 63, 94, 0.25); } /* ---- Header Card (Gradient Hero) ---- */ @@ -565,7 +478,9 @@ onMounted(async () => { border: none; border-radius: 16px; padding: 28px 32px; - display: flex; justify-content: space-between; align-items: center; + display: flex; + justify-content: space-between; + align-items: center; margin-bottom: 20px; box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2), @@ -579,13 +494,24 @@ onMounted(async () => { position: absolute; inset: 0; background: - radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%), - radial-gradient(circle at 80% 50%, rgba(255,255,255,0.04) 0%, transparent 50%); + radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%), + radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.04) 0%, transparent 50%); pointer-events: none; } -.header-main { display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; } -.welcome-container { display: flex; flex-direction: column; gap: 8px; } +.header-main { + display: flex; + flex-direction: column; + justify-content: center; + position: relative; + z-index: 1; +} + +.welcome-container { + display: flex; + flex-direction: column; + gap: 8px; +} .greeting { margin: 0; @@ -594,54 +520,87 @@ onMounted(async () => { line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; - text-shadow: 0 1px 3px rgba(0,0,0,0.1); + text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .sub-text { margin: 4px 0 0; - color: rgba(255,255,255,0.75); + color: rgba(255, 255, 255, 0.75); font-size: 13px; font-weight: 400; letter-spacing: 0.01em; } -.identity-badges { margin-top: 8px; display: flex; align-items: center; position: relative; z-index: 1; } +.identity-badges { + margin-top: 8px; + display: flex; + align-items: center; + position: relative; + z-index: 1; +} + :deep(.identity-badges .el-tag) { display: inline-flex !important; align-items: center !important; gap: 5px !important; - background: rgba(255,255,255,0.18) !important; + background: rgba(255, 255, 255, 0.18) !important; backdrop-filter: blur(8px); - border: 1px solid rgba(255,255,255,0.25) !important; + border: 1px solid rgba(255, 255, 255, 0.25) !important; color: #fff !important; font-weight: 600 !important; padding: 4px 14px !important; border-radius: 20px !important; } -:deep(.identity-badges .el-tag .el-icon) { color: #fbbf24 !important; } -.header-action { position: relative; z-index: 1; } +:deep(.identity-badges .el-tag .el-icon) { + color: #fbbf24 !important; +} + +.header-action { + position: relative; + z-index: 1; +} + .header-action :deep(.el-button) { - background: rgba(255,255,255,0.15) !important; - border: 1px solid rgba(255,255,255,0.25) !important; + background: rgba(255, 255, 255, 0.15) !important; + border: 1px solid rgba(255, 255, 255, 0.25) !important; color: #fff !important; backdrop-filter: blur(8px); border-radius: 24px !important; padding: 8px 18px !important; } + .header-action :deep(.el-button:hover) { - background: rgba(255,255,255,0.25) !important; + background: rgba(255, 255, 255, 0.25) !important; +} + +/* ---- Tabs + Search Row ---- */ +.tabs-toolbar-row { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 18px; + gap: 16px; +} + +.search-row { + display: flex; + align-items: center; + gap: 8px; +} + +.search-row :deep(.search-input) { + width: 200px; } /* ---- Tab Switcher ---- */ .status-tabs-wrapper { background: #fff; - border: 1px solid rgba(0,0,0,0.06); + border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 14px; padding: 5px; display: inline-block; - margin-bottom: 18px; - box-shadow: 0 2px 8px rgba(0,0,0,0.04); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } .custom-radio-group :deep(.el-radio-button__inner) { @@ -649,7 +608,9 @@ onMounted(async () => { border-radius: 10px !important; margin: 0 1px; padding: 10px 18px; - display: flex; align-items: center; gap: 6px; + display: flex; + align-items: center; + gap: 6px; font-weight: 500; font-size: 13px; color: #6b6d7a; @@ -670,15 +631,18 @@ onMounted(async () => { /* ---- Table Card ---- */ .table-card { background: #fff; - border: 1px solid rgba(0,0,0,0.06); + border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 16px; padding: 20px 24px; box-shadow: - 0 2px 8px rgba(0,0,0,0.03), - 0 4px 20px rgba(0,0,0,0.04); + 0 2px 8px rgba(0, 0, 0, 0.03), + 0 4px 20px rgba(0, 0, 0, 0.04); } -.custom-table { overflow: hidden; border-radius: var(--radius-md); } +.custom-table { + overflow: hidden; + border-radius: var(--radius-md); +} :deep(.el-table__header th) { background: #f8f9fc; @@ -690,66 +654,158 @@ onMounted(async () => { border-bottom: 2px solid #eef0f4 !important; } -:deep(.el-table__body tr) { transition: all 0.15s; } -:deep(.el-table__body tr:hover > td) { - background: linear-gradient(90deg, rgba(102,126,234,0.03), rgba(118,75,162,0.02)) !important; +:deep(.el-table__body tr) { + transition: all 0.15s; +} + +:deep(.el-table__body tr:hover > td) { + background: linear-gradient(90deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.02)) !important; +} + +:deep(.el-table__body tr) { + border-bottom: 1px solid #f5f5f8; } -:deep(.el-table__body tr) { border-bottom: 1px solid #f5f5f8; } /* Staggered row tints */ -:deep(.el-table__body tr:nth-child(odd) td) { background: #fdfdfe; } -:deep(.el-table__body tr:nth-child(even) td) { background: #fafbfd; } - -.cell-content-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 60px; } -.data-display-area { min-height: 24px; display: flex; align-items: center; justify-content: center; width: 100%; } -.display-val { font-weight: 700; color: #667eea; font-size: 15px; font-family: "Courier New", monospace; } -.display-remark { - font-size: 12px; color: #5b5d68; max-width: 180px; line-height: 1.4; - background: #f8f9fc; padding: 4px 12px; border-radius: 6px; text-align: center; +:deep(.el-table__body tr:nth-child(odd) td) { + background: #fdfdfe; +} + +:deep(.el-table__body tr:nth-child(even) td) { + background: #fafbfd; +} + +.cell-content-card { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 6px; + min-height: 60px; +} + +.data-display-area { + min-height: 24px; + display: flex; + align-items: center; + justify-content: center; + width: 100%; +} + +.display-val { + font-weight: 700; + color: #667eea; + font-size: 15px; + font-family: "Courier New", monospace; +} + +.display-remark { + font-size: 12px; + color: #5b5d68; + max-width: 180px; + line-height: 1.4; + background: #f8f9fc; + padding: 4px 12px; + border-radius: 6px; + text-align: center; +} + +.no-data-placeholder { + color: #c0c4cc; + font-size: 12px; +} + +.pure-date { + color: #6b6d7a; + font-weight: 500; + font-family: "Courier New", monospace; + font-size: 12px; +} + +.edit-link-btn { + font-size: 12px; + height: auto; + padding: 0; + opacity: 0.6; + color: #667eea; + transition: all 0.15s; +} + +.edit-link-btn:hover { + opacity: 1; + color: #4f46e5; + font-weight: 600; } -.no-data-placeholder { color: #c0c4cc; font-size: 12px; } -.pure-date { color: #6b6d7a; font-weight: 500; font-family: "Courier New", monospace; font-size: 12px; } -.edit-link-btn { font-size: 12px; height: auto; padding: 0; opacity: 0.6; color: #667eea; transition: all 0.15s; } -.edit-link-btn:hover { opacity: 1; color: #4f46e5; font-weight: 600; } /* ---- Pagination ---- */ .pagination-container { - margin-top: 18px; display: flex; justify-content: flex-end; + margin-top: 18px; + display: flex; + justify-content: flex-end; padding-top: 16px; border-top: 1px solid #f0f1f4; } /* ---- Progress ---- */ -:deep(.el-progress-bar__outer) { background: #eef0f4; border-radius: 10px; overflow: hidden; } +:deep(.el-progress-bar__outer) { + background: #eef0f4; + border-radius: 10px; + overflow: hidden; +} + :deep(.el-progress-bar__inner) { background: linear-gradient(90deg, #667eea, #764ba2) !important; } + :deep(.el-progress-bar__innerText) { - display: flex !important; align-items: center !important; - justify-content: center !important; height: 100% !important; - line-height: 1 !important; vertical-align: middle !important; + display: flex !important; + align-items: center !important; + justify-content: center !important; + height: 100% !important; + line-height: 1 !important; + vertical-align: middle !important; } + :deep(.el-progress-bar__innerText svg), :deep(.el-progress-bar__innerText .el-icon) { - margin: 0 !important; position: relative !important; - top: -1px !important; width: 0.8em; height: 0.8em; + margin: 0 !important; + position: relative !important; + top: -1px !important; + width: 0.8em; + height: 0.8em; } -:deep(.el-progress) { display: flex; align-items: center; } -.progress-radio-group { display: flex; justify-content: center; margin: 10px 0; } -.progress-radio-group :deep(.el-radio-button__inner) { padding: 8px 10px !important; } +:deep(.el-progress) { + display: flex; + align-items: center; +} + +.progress-radio-group { + display: flex; + justify-content: center; + margin: 10px 0; +} + +.progress-radio-group :deep(.el-radio-button__inner) { + padding: 8px 10px !important; +} /* ---- Table Overrides ---- */ -:deep(.el-table__row) { height: 100px; } -:deep(.el-table .cell) { overflow: visible !important; } +:deep(.el-table__row) { + height: 100px; +} + +:deep(.el-table .cell) { + overflow: visible !important; +} /* ---- Popover (Inline Edit Flyout) ---- */ :deep(.el-popover) { border-radius: 16px !important; border: none !important; box-shadow: - 0 8px 32px rgba(0,0,0,0.1), - 0 2px 8px rgba(0,0,0,0.06) !important; + 0 8px 32px rgba(0, 0, 0, 0.1), + 0 2px 8px rgba(0, 0, 0, 0.06) !important; padding: 20px !important; } @@ -770,50 +826,57 @@ onMounted(async () => { align-items: center; gap: 6px; } + .pop-header::before { content: ""; - width: 3px; height: 14px; + width: 3px; + height: 14px; background: linear-gradient(180deg, #667eea, #764ba2); border-radius: 2px; } :deep(.popover-content .el-input__wrapper) { border-radius: 10px !important; - box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset !important; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset !important; transition: box-shadow 0.2s; } + :deep(.popover-content .el-input__wrapper:hover) { - box-shadow: 0 0 0 1px rgba(102,126,234,0.3) inset !important; + box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3) inset !important; } + :deep(.popover-content .el-input__wrapper.is-focus) { - box-shadow: 0 0 0 2px rgba(102,126,234,0.15), 0 0 0 1px #667eea inset !important; + box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15), 0 0 0 1px #667eea inset !important; } :deep(.popover-content .el-textarea__inner) { border-radius: 10px !important; - box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset !important; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08) inset !important; transition: box-shadow 0.2s; font-size: 13px; } + :deep(.popover-content .el-textarea__inner:focus) { - box-shadow: 0 0 0 2px rgba(102,126,234,0.15), 0 0 0 1px #667eea inset !important; + box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15), 0 0 0 1px #667eea inset !important; } .pop-footer { margin-top: 10px; text-align: right; } + .pop-footer :deep(.el-button--primary) { background: linear-gradient(135deg, #667eea, #764ba2) !important; border: none !important; border-radius: 10px !important; padding: 7px 20px !important; font-weight: 600 !important; - box-shadow: 0 2px 8px rgba(102,126,234,0.3); + box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); transition: all 0.2s; } + .pop-footer :deep(.el-button--primary:hover) { - box-shadow: 0 4px 16px rgba(102,126,234,0.4); + box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4); transform: translateY(-1px); } @@ -822,27 +885,40 @@ onMounted(async () => { border-radius: 8px !important; padding: 6px 12px !important; } + :deep(.popover-content .el-radio-button__inner:hover) { color: #667eea !important; } + :deep(.popover-content .is-active .el-radio-button__inner) { background: linear-gradient(135deg, #667eea, #764ba2) !important; border-color: transparent !important; color: #fff !important; - box-shadow: 0 2px 6px rgba(102,126,234,0.3); + box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3); } /* ---- Action Buttons Glow ---- */ -:deep(.el-table .el-button--primary) { transition: all 0.2s; } -:deep(.el-table .el-button--primary:hover) { box-shadow: 0 0 12px var(--glow-indigo); } -:deep(.el-table .el-button--success:hover) { box-shadow: 0 0 12px var(--glow-green); } -:deep(.el-table .el-button--warning:hover) { box-shadow: 0 0 12px var(--glow-amber); } +:deep(.el-table .el-button--primary) { + transition: all 0.2s; +} + +:deep(.el-table .el-button--primary:hover) { + box-shadow: 0 0 12px var(--glow-indigo); +} + +:deep(.el-table .el-button--success:hover) { + box-shadow: 0 0 12px var(--glow-green); +} + +:deep(.el-table .el-button--warning:hover) { + box-shadow: 0 0 12px var(--glow-amber); +} /* ---- Logout Dropdown ---- */ :deep(.el-dropdown-menu) { border-radius: 14px !important; border: none !important; - box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06) !important; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06) !important; padding: 6px !important; } @@ -855,7 +931,7 @@ onMounted(async () => { } :deep(.el-dropdown-menu__item:hover) { - background: linear-gradient(135deg, rgba(244,63,94,0.06), rgba(244,63,94,0.02)) !important; + background: linear-gradient(135deg, rgba(244, 63, 94, 0.06), rgba(244, 63, 94, 0.02)) !important; color: #e11d48 !important; } @@ -863,7 +939,7 @@ onMounted(async () => { :deep(.el-message-box) { border-radius: 18px !important; border: none !important; - box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06) !important; + box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06) !important; padding: 28px !important; } @@ -893,10 +969,10 @@ onMounted(async () => { :deep(.el-message-box__btns .el-button--primary) { background: linear-gradient(135deg, #667eea, #764ba2) !important; border: none !important; - box-shadow: 0 2px 8px rgba(102,126,234,0.3) !important; + box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important; } :deep(.el-message-box__btns .el-button--primary:hover) { - box-shadow: 0 4px 16px rgba(102,126,234,0.4) !important; + box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4) !important; }