Просмотр исходного кода

style: align result and admin pages with medtech system

wangkangyjy 1 месяц назад
Родитель
Сommit
2378a6a1a9

+ 15 - 0
frontend/scripts/verify-medtech-theme.mjs

@@ -99,6 +99,21 @@ if (!scoringEdit.includes('evidence-panel')) failures.push('ScoringEditView must
 if (!scoringEdit.includes('decision-panel')) failures.push('ScoringEditView must use decision-panel')
 if (!scoringList.includes('scoring-worklist')) failures.push('ScoringListView must use scoring-worklist')
 
+const requiredClasses = new Map([
+  ['src/views/scoring/MyResultView.vue', 'result-workbench'],
+  ['src/views/scoring/HistoryView.vue', 'history-workbench'],
+  ['src/views/feedback/FeedbackView.vue', 'feedback-workbench'],
+  ['src/views/org/OrgView.vue', 'org-workbench'],
+  ['src/views/system/LogView.vue', 'log-workbench'],
+  ['src/views/system/DimensionConfigView.vue', 'dimension-workbench'],
+  ['src/views/period/KpiTemplateView.vue', 'template-workbench']
+])
+
+for (const [file, className] of requiredClasses) {
+  const text = readFileSync(join(root, file), 'utf8')
+  if (!text.includes(className)) failures.push(`${file} must use ${className}`)
+}
+
 const vueAndCssFiles = walk(src).filter((file) => /\.(vue|css)$/.test(file))
 for (const file of vueAndCssFiles) {
   const text = readFileSync(file, 'utf8')

+ 3 - 3
frontend/src/views/feedback/FeedbackView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page feedback-workbench">
     <div class="page-hero">
       <div class="hero-info">
         <h2>绩效沟通</h2>
@@ -132,9 +132,9 @@ async function handleSave() {
 .page-hero { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
 .hero-info h2 { font-size: 28px; font-weight: 700; color: #1a1a2e; margin: 0; }
 .hero-info p { font-size: 14px; color: #888; margin: 4px 0 0; }
-.empty-state { display: flex; align-items: center; justify-content: center; height: 300px; color: #bbb; font-size: 15px; background: #fff; border-radius: 12px; }
+.empty-state { display: flex; align-items: center; justify-content: center; height: 300px; color: #bbb; font-size: 15px; background: #fff; border-radius: 8px; }
 .text-muted { color: #ccc; }
-.data-table { border-radius: 12px; overflow: hidden; }
+.data-table { border-radius: 8px; overflow: hidden; }
 .data-table :deep(th) { white-space: nowrap; font-weight: 600; color: #555; background: #fafbfc; }
 .data-table :deep(td) { cursor: pointer; }
 .grade-chip { display: inline-block; width: 24px; height: 24px; line-height: 24px; border-radius: 6px; font-weight: 700; font-size: 13px; color: #fff; margin-right: 6px; text-align: center; }

+ 2 - 2
frontend/src/views/org/OrgView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page org-workbench">
     <div class="page-hero">
       <div class="hero-info">
         <h2>组织架构</h2>
@@ -232,7 +232,7 @@ async function handleInitSeed() {
 .hero-actions { display: flex; gap: 8px; }
 
 .two-col { display: flex; gap: 20px; }
-.col { background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
+.col { background: #fff; border-radius: 8px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
 .dept-col { width: 320px; flex-shrink: 0; }
 .user-col { flex: 1; min-width: 0; }
 .col-head { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; }

+ 1 - 1
frontend/src/views/period/KpiTemplateView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page template-workbench">
     <div class="page-header">
       <h3>绩效模板</h3>
       <el-button type="primary" @click="openCreate"><el-icon><Plus /></el-icon> 添加模板</el-button>

+ 4 - 4
frontend/src/views/scoring/HistoryView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page history-workbench">
     <div class="page-hero">
       <div class="hero-info">
         <h2>历史绩效</h2>
@@ -145,7 +145,7 @@ function gradeDesc(g) {
 
 .score-hero {
   display: flex; align-items: center; gap: 32px;
-  background: #f6f6fb; border-radius: 16px;
+  background: #f6f6fb; border-radius: 8px;
   padding: 32px 40px; margin-bottom: 24px; border: 1px solid #e8e8f0;
 }
 .grade-ring { width: 100px; height: 100px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 4px solid #ddd; flex-shrink: 0; }
@@ -167,7 +167,7 @@ function gradeDesc(g) {
 .break-item.penalty .break-value { color: #e74c3c; }
 
 .compare-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 24px; }
-.compare-card { background: #fff; border-radius: 12px; padding: 16px 28px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
+.compare-card { background: #fff; border-radius: 8px; padding: 16px 28px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
 .compare-card.self { border-left: 4px solid #3498db; }
 .compare-card.final { border-left: 4px solid #27ae60; }
 .compare-label { font-size: 12px; color: #999; margin-bottom: 4px; }
@@ -176,7 +176,7 @@ function gradeDesc(g) {
 .compare-arrow { font-size: 24px; color: #ccc; }
 
 .two-col { display: flex; gap: 20px; }
-.col { flex: 1; background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
+.col { flex: 1; background: #fff; border-radius: 8px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
 .col-head { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; }
 .mini-okr { padding: 10px; margin-bottom: 10px; background: #fafbfc; border-radius: 8px; border: 1px solid #f0f0f0; }
 .mini-o { font-weight: 600; font-size: 13px; color: #2b1f99; margin-bottom: 6px; }

+ 9 - 9
frontend/src/views/scoring/MyResultView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page result-workbench">
     <div class="page-hero">
       <div class="hero-info">
         <h2>我的绩效</h2>
@@ -61,7 +61,7 @@
       </div>
 
       <div class="form-card">
-        <div class="form-section-title">专项加减分</div>
+        <div class="form-section-title">专项加减分</div>
         <div class="bonus-row">
           <span class="bonus-label">加分(上限5)</span>
           <el-input-number v-model="form.bonus" :min="0" :max="5" :precision="1" size="large" controls-position="right" />
@@ -125,7 +125,7 @@
       </div>
 
       <div v-else class="score-pending">
-        <div class="pending-icon">📋</div>
+        <div class="pending-icon"></div>
         <div class="pending-text">绩效考核尚未完成</div>
       </div>
 
@@ -350,7 +350,7 @@ function gradeDesc(g) {
 .bonus-label { font-size: 13px; color: #666; }
 
 .result-preview {
-  background: #f4f2f9; border-radius: 12px;
+  background: #f4f2f9; border-radius: 8px;
   padding: 20px; text-align: center; border: 1px solid #dcd4f0; margin-bottom: 16px;
 }
 .rp-formula { font-size: 12px; color: #888; }
@@ -366,7 +366,7 @@ function gradeDesc(g) {
 
 .score-hero {
   display: flex; align-items: center; gap: 32px;
-  background: #f6f6fb; border-radius: 16px;
+  background: #f6f6fb; border-radius: 8px;
   padding: 32px 40px; margin-bottom: 24px; border: 1px solid #e8e8f0;
 }
 .score-hero.self-submitted { background: linear-gradient(135deg, #fffcf5, #fef9e7); border-color: #f9e79f; }
@@ -396,7 +396,7 @@ function gradeDesc(g) {
 .break-item.penalty .break-value { color: #e74c3c; }
 
 .score-pending {
-  background: #fff; border-radius: 16px; padding: 60px; text-align: center;
+  background: #fff; border-radius: 8px; padding: 60px; text-align: center;
   margin-bottom: 24px; border: 1px solid #eee;
 }
 .pending-icon { font-size: 48px; margin-bottom: 12px; }
@@ -404,7 +404,7 @@ function gradeDesc(g) {
 
 .confirm-bar {
   display: flex; align-items: center; justify-content: space-between;
-  background: #fef9e7; border: 2px solid #f9e79f; border-radius: 12px;
+  background: #fef9e7; border: 2px solid #f9e79f; border-radius: 8px;
   padding: 18px 24px; margin-bottom: 24px;
 }
 .confirm-info { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #7d6608; }
@@ -415,7 +415,7 @@ function gradeDesc(g) {
 }
 
 .compare-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 24px; }
-.compare-card { background: #fff; border-radius: 12px; padding: 16px 28px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
+.compare-card { background: #fff; border-radius: 8px; padding: 16px 28px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
 .compare-card.self { border-left: 4px solid #3498db; }
 .compare-card.final { border-left: 4px solid #27ae60; }
 .compare-label { font-size: 12px; color: #999; margin-bottom: 4px; }
@@ -424,7 +424,7 @@ function gradeDesc(g) {
 .compare-arrow { font-size: 24px; color: #ccc; }
 
 .two-col { display: flex; gap: 20px; }
-.col { flex: 1; background: #fff; border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
+.col { flex: 1; background: #fff; border-radius: 8px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
 .col-head { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; }
 
 .mini-okr { padding: 10px; margin-bottom: 10px; background: #fafbfc; border-radius: 8px; border: 1px solid #f0f0f0; }

+ 1 - 1
frontend/src/views/system/DimensionConfigView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page dimension-workbench">
     <div class="page-header">
       <h3>考核维度配置</h3>
       <el-button type="primary" @click="openCreate"><el-icon><Plus /></el-icon> 添加维度</el-button>

+ 2 - 2
frontend/src/views/system/LogView.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="app-page log-workbench">
     <div class="page-hero">
       <div class="hero-info">
         <h2>操作日志</h2>
@@ -71,7 +71,7 @@ function truncate(str) {
 .page-hero { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
 .hero-info h2 { font-size: 28px; font-weight: 700; color: #1a1a2e; margin: 0; }
 .hero-info p { font-size: 14px; color: #888; margin: 4px 0 0; }
-.data-table { border-radius: 12px; overflow: hidden; }
+.data-table { border-radius: 8px; overflow: hidden; }
 .data-table :deep(th) { white-space: nowrap; font-weight: 600; color: #555; background: #fafbfc; }
 .log-code { font-size: 11px; color: #888; font-family: 'SF Mono', 'Fira Code', monospace; }
 </style>