From 93f42d3d9b45eaecf802cd38fccc2c6c32f1b366 Mon Sep 17 00:00:00 2001 From: Kunagisa <1549184870@qq.com> Date: Thu, 10 Jul 2025 18:21:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E6=94=B9=E4=BA=86=E5=A5=BD?= =?UTF-8?q?=E5=A4=9A=EF=BC=8C=E4=B8=8D=E9=9C=80=E8=A6=81=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E8=BE=93=E7=94=A8=E6=88=B7=E5=90=8D=E5=92=8Cqq=E5=8F=B7?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/weapon.css | 500 ++++++++++ src/components/weapon/ObjectEditor.vue | 925 +++++++++++++++++++ src/components/weapon/TemplateMatch.vue | 396 ++++++++ src/components/weapon/WeaponCompare.vue | 1128 +++++++++++++++++++++++ src/router/index.js | 2 +- src/views/weapon/WeaponMatch.vue | 147 +++ 6 files changed, 3097 insertions(+), 1 deletion(-) create mode 100644 src/assets/styles/weapon.css create mode 100644 src/components/weapon/ObjectEditor.vue create mode 100644 src/components/weapon/TemplateMatch.vue create mode 100644 src/components/weapon/WeaponCompare.vue create mode 100644 src/views/weapon/WeaponMatch.vue diff --git a/src/assets/styles/weapon.css b/src/assets/styles/weapon.css new file mode 100644 index 0000000..85fff57 --- /dev/null +++ b/src/assets/styles/weapon.css @@ -0,0 +1,500 @@ +/* 武器工具集样式 */ +.weapon-match-container { + min-height: 100vh; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + padding: 20px; +} + +.page-header { + text-align: center; + margin-bottom: 30px; +} + +.page-title { + color: white; + font-size: 28px; + font-weight: 600; + margin-bottom: 10px; + text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.tab-navigation { + display: flex; + justify-content: center; + gap: 10px; + margin-bottom: 30px; +} + +.tab-btn { + padding: 12px 24px; + background: rgba(255, 255, 255, 0.1); + border: 2px solid rgba(255, 255, 255, 0.2); + border-radius: 25px; + color: white; + font-size: 16px; + cursor: pointer; + transition: all 0.3s ease; + backdrop-filter: blur(10px); + display: flex; + align-items: center; + gap: 8px; +} + +.tab-btn:hover { + background: rgba(255, 255, 255, 0.2); + border-color: rgba(255, 255, 255, 0.4); + transform: translateY(-2px); +} + +.tab-btn.active { + background: rgba(255, 255, 255, 0.25); + border-color: rgba(255, 255, 255, 0.6); + box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); +} + +/* 通用内容卡片样式 */ +.content-card { + background: white; + border-radius: 16px; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); + overflow: hidden; + margin-bottom: 20px; +} + +.card-header { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + color: white; + padding: 24px; + text-align: center; +} + +.card-header h2 { + margin: 0; + font-size: 24px; + font-weight: 600; +} + +.card-header i { + margin-right: 12px; + font-size: 20px; +} + +/* 表格样式 */ +.table-container { + background: white; + border-radius: 12px; + overflow: hidden; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); +} + +.result-table, +.weapon-table, +.comparison-table { + width: 100%; + border-collapse: collapse; + font-size: 14px; +} + +.result-table th, +.result-table td, +.weapon-table th, +.weapon-table td, +.comparison-table th, +.comparison-table td { + padding: 16px; + text-align: left; + border-bottom: 1px solid #f0f0f0; +} + +.result-table th, +.weapon-table th, +.comparison-table th { + background: #f8f9fa; + font-weight: 600; + color: #495057; +} + +.result-table tr:hover, +.weapon-table tr:hover { + background: #f8f9fa; +} + +/* 按钮样式 */ +.action-btn { + padding: 12px 24px; + border: none; + border-radius: 8px; + cursor: pointer; + font-size: 14px; + font-weight: 500; + transition: all 0.3s ease; + display: flex; + align-items: center; + gap: 8px; +} + +.action-btn.primary { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + color: white; +} + +.action-btn.primary:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); +} + +.action-btn.danger { + background: #dc3545; + color: white; +} + +.action-btn.danger:hover { + background: #c82333; + transform: translateY(-2px); +} + +.tool-btn { + padding: 10px 20px; + background: #f8f9fa; + border: 1px solid #dee2e6; + border-radius: 8px; + cursor: pointer; + font-size: 14px; + transition: all 0.3s ease; + display: flex; + align-items: center; + gap: 8px; + color: #495057; +} + +.tool-btn:hover { + background: #e9ecef; +} + +.tool-btn.active { + background: #667eea; + color: white; + border-color: #667eea; +} + +.small-btn { + padding: 6px 12px; + font-size: 12px; + border: 1px solid #dee2e6; + border-radius: 6px; + background: white; + cursor: pointer; + transition: all 0.3s ease; +} + +.small-btn:hover { + background: #f8f9fa; +} + +.small-btn.danger { + color: #dc3545; + border-color: #dc3545; +} + +.small-btn.danger:hover { + background: #fff5f5; +} + +/* 输入框样式 */ +.file-input, +.detail-input, +.search-input { + padding: 8px 12px; + border: 1px solid #dee2e6; + border-radius: 6px; + font-size: 14px; + transition: border-color 0.3s ease; +} + +.file-input:focus, +.detail-input:focus, +.search-input:focus { + border-color: #667eea; + outline: none; + box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2); +} + +/* 复选框样式 */ +.checkbox-wrapper { + display: block; + position: relative; + cursor: pointer; +} + +.checkbox-wrapper input { + opacity: 0; + position: absolute; +} + +.checkmark { + display: inline-block; + width: 18px; + height: 18px; + background: white; + border: 2px solid #dee2e6; + border-radius: 4px; + transition: all 0.3s ease; +} + +.checkbox-wrapper input:checked ~ .checkmark { + background: #667eea; + border-color: #667eea; +} + +.checkmark:after { + content: ""; + position: absolute; + display: none; + left: 6px; + top: 2px; + width: 6px; + height: 10px; + border: solid white; + border-width: 0 2px 2px 0; + transform: rotate(45deg); +} + +.checkbox-wrapper input:checked ~ .checkmark:after { + display: block; +} + +/* 标签样式 */ +.template-tag, +.attribute-tag { + display: inline-flex; + align-items: center; + background: #e7f3ff; + color: #1c7ed6; + padding: 4px 12px; + border-radius: 16px; + font-size: 12px; + font-weight: 500; + cursor: pointer; + transition: all 0.3s ease; + gap: 6px; +} + +.template-tag:hover, +.attribute-tag:hover { + background: #d0ebff; +} + +/* 空状态样式 */ +.empty-state { + padding: 60px 30px; + text-align: center; + color: #6c757d; +} + +.empty-state i { + font-size: 64px; + margin-bottom: 16px; + opacity: 0.5; +} + +.empty-state p { + font-size: 16px; + margin: 0; +} + +.empty-state.small { + padding: 40px 20px; +} + +.empty-state.small i { + font-size: 48px; + margin-bottom: 12px; +} + +.empty-state.small p { + font-size: 14px; +} + +/* 对比结果样式 */ +.attr-name { + font-weight: 600; + background: #f8f9fa !important; + color: #495057; +} + +.has-value { + background: #f6ffed; + color: #52c41a; +} + +.no-value { + background: #fff2f0; + color: #cf1322; +} + +/* 分页样式 */ +.pagination-controls { + display: flex; + align-items: center; + gap: 12px; + justify-content: center; +} + +.page-btn { + padding: 8px 16px; + background: white; + border: 1px solid #dee2e6; + border-radius: 6px; + cursor: pointer; + transition: all 0.3s ease; + display: flex; + align-items: center; + gap: 6px; +} + +.page-btn:hover:not(:disabled) { + border-color: #667eea; + color: #667eea; +} + +.page-btn:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.page-info { + font-size: 14px; + color: #6c757d; + margin: 0 8px; +} + +/* 响应式设计 */ +@media (max-width: 768px) { + .weapon-match-container { + padding: 15px; + } + + .page-title { + font-size: 24px; + } + + .tab-navigation { + flex-direction: column; + align-items: center; + } + + .tab-btn { + width: 200px; + justify-content: center; + } + + .content-card { + margin-bottom: 15px; + } + + .card-header { + padding: 20px; + } + + .card-header h2 { + font-size: 20px; + } + + .action-btn, + .tool-btn { + padding: 8px 16px; + font-size: 13px; + } + + .result-table th, + .result-table td, + .weapon-table th, + .weapon-table td, + .comparison-table th, + .comparison-table td { + padding: 12px 8px; + font-size: 13px; + } + + .empty-state { + padding: 40px 20px; + } + + .empty-state i { + font-size: 48px; + margin-bottom: 12px; + } + + .empty-state p { + font-size: 14px; + } + + .pagination-controls { + flex-direction: column; + gap: 8px; + } + + .page-btn { + width: 100%; + justify-content: center; + } +} + +@media (max-width: 480px) { + .weapon-match-container { + padding: 10px; + } + + .page-title { + font-size: 20px; + } + + .tab-btn { + width: 100%; + padding: 10px 20px; + font-size: 14px; + } + + .card-header { + padding: 16px; + } + + .card-header h2 { + font-size: 18px; + } + + .action-btn, + .tool-btn { + padding: 6px 12px; + font-size: 12px; + } + + .result-table th, + .result-table td, + .weapon-table th, + .weapon-table td, + .comparison-table th, + .comparison-table td { + padding: 8px 6px; + font-size: 12px; + } + + .template-tag, + .attribute-tag { + padding: 2px 8px; + font-size: 11px; + } + + .empty-state { + padding: 30px 15px; + } + + .empty-state i { + font-size: 36px; + margin-bottom: 10px; + } + + .empty-state p { + font-size: 13px; + } +} \ No newline at end of file diff --git a/src/components/weapon/ObjectEditor.vue b/src/components/weapon/ObjectEditor.vue new file mode 100644 index 0000000..472d9d3 --- /dev/null +++ b/src/components/weapon/ObjectEditor.vue @@ -0,0 +1,925 @@ + + + + + \ No newline at end of file diff --git a/src/components/weapon/TemplateMatch.vue b/src/components/weapon/TemplateMatch.vue new file mode 100644 index 0000000..973adbc --- /dev/null +++ b/src/components/weapon/TemplateMatch.vue @@ -0,0 +1,396 @@ + + + + + \ No newline at end of file diff --git a/src/components/weapon/WeaponCompare.vue b/src/components/weapon/WeaponCompare.vue new file mode 100644 index 0000000..aaf82f9 --- /dev/null +++ b/src/components/weapon/WeaponCompare.vue @@ -0,0 +1,1128 @@ + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index cfbf04b..6cb9bc8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -47,7 +47,7 @@ const routes = [ { path: 'weapon-match', name: 'WeaponMatch', - component: () => import('@/views/index/WeaponMatch.vue'), + component: () => import('@/views/weapon/WeaponMatch.vue'), meta: { requiresAuth: true, requiredPrivilege: ['lv-admin','lv-mod'] } }, { diff --git a/src/views/weapon/WeaponMatch.vue b/src/views/weapon/WeaponMatch.vue new file mode 100644 index 0000000..335ae23 --- /dev/null +++ b/src/views/weapon/WeaponMatch.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file