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

style(admin): C-14 OrderManage/ArticleAudit/OrderDetail/VirtualTeamList/ProxyReport 内联 style 归零

zxyj-web 3 недель назад
Родитель
Сommit
287870ca38

+ 12 - 7
cfc-web/src/views/admin/OrderDetail.vue

@@ -3,7 +3,7 @@
     <PageHeader title="订单详情" back @back="$router.push('/order-manage')" />
 
     <template v-if="order">
-      <el-card style="margin-bottom:20px;">
+      <el-card class="mb-20">
         <div slot="header">
           <SectionTitle title="基本信息">
             <StatusTag :type="statusType(order.status)" :text="statusLabel(order.status)" />
@@ -25,7 +25,7 @@
         </el-descriptions>
       </el-card>
 
-      <el-card style="margin-bottom:20px;">
+      <el-card class="mb-20">
         <div slot="header">
           <SectionTitle title="收货信息" />
         </div>
@@ -40,7 +40,7 @@
         </el-descriptions>
       </el-card>
 
-      <el-card v-if="order.refundStatus" style="margin-bottom:20px;">
+      <el-card v-if="order.refundStatus" class="mb-20">
         <div slot="header">
           <SectionTitle title="退款信息" />
         </div>
@@ -52,20 +52,20 @@
         </el-descriptions>
       </el-card>
 
-      <div style="margin-top:20px;">
+      <div class="mt-20">
         <el-button type="success" @click="handleShip" v-if="order.status === 'paid'">发货</el-button>
         <el-button type="danger" @click="handleClose" v-if="['paid','pending_receipt','refunding'].includes(order.status)">关闭订单</el-button>
         <el-button type="warning" @click="showRefundDialog" v-if="order.status === 'refunding'">退款审核</el-button>
       </div>
     </template>
 
-    <div v-else-if="!loading" style="text-align:center;padding:60px;color:var(--adm-text-45);">
+    <div v-else-if="!loading" class="empty-state">
       <p>未找到订单信息</p>
     </div>
 
     <!-- Ship Dialog -->
     <el-dialog title="发货" :visible.sync="shipDialogVisible" width="450px">
-      <el-alert title="确认发货" type="info" :closable="false" style="margin-bottom:15px;">
+      <el-alert title="确认发货" type="info" :closable="false" class="mb-15">
         <template slot>订单号:<strong>{{ order?.orderNo }}</strong></template>
       </el-alert>
       <el-form :model="shipForm" label-width="90px">
@@ -84,7 +84,7 @@
 
     <!-- Refund Dialog -->
     <el-dialog title="退款审核" :visible.sync="refundDialogVisible" width="450px">
-      <el-alert title="退款申请" type="warning" :closable="false" style="margin-bottom:15px;">
+      <el-alert title="退款申请" type="warning" :closable="false" class="mb-15">
         <template slot>
           订单号:<strong>{{ order?.orderNo }}</strong><br>
           退款原因:{{ order?.refundReason || '-' }}
@@ -252,4 +252,9 @@ export default {
 
 <style scoped>
 .order-detail { padding: 20px; }
+/* == C 批内联清理工具类 == */
+.mb-20 { margin-bottom: 20px; }
+.mt-20 { margin-top: 20px; }
+.empty-state { text-align: center; padding: 60px; color: var(--adm-text-45); }
+.mb-15 { margin-bottom: 15px; }
 </style>

+ 14 - 7
cfc-web/src/views/admin/OrderManage.vue

@@ -2,7 +2,7 @@
   <div class="order-manage admin-page">
     <PageHeader title="订单管理">
       <div class="filters filter-bar">
-        <el-input v-model="keyword" placeholder="搜索商品/订单号..." prefix-icon="el-icon-search" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" style="width:220px;" />
+        <el-input v-model="keyword" placeholder="搜索商品/订单号..." prefix-icon="el-icon-search" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" class="w-220" />
         <el-date-picker
           v-model="dateRange"
           type="daterange"
@@ -10,7 +10,7 @@
           start-placeholder="开始日期"
           end-placeholder="结束日期"
           value-format="yyyy-MM-dd"
-          style="width:260px;"
+          class="w-260"
           @change="handleSearch"
         />
         <el-select v-model="statusFilter" placeholder="订单状态" @change="handleSearch" clearable>
@@ -39,8 +39,8 @@
 
       <el-table-column label="商品" min-width="160">
         <template slot-scope="{ row }">
-          <div style="display:flex;align-items:center;gap:8px;">
-            <img v-if="row.coverImage" :src="row.coverImage" style="width:40px;height:40px;object-fit:cover;border-radius:4px;" />
+          <div class="product-row">
+            <img v-if="row.coverImage" :src="row.coverImage" class="thumb-40" />
             <span>{{ row.productName || '-' }}</span>
           </div>
         </template>
@@ -60,7 +60,7 @@
       <el-table-column label="履约状态" width="120">
         <template slot-scope="{ row }">
           <StatusTag v-if="row.fulfillStatus" size="mini" :type="fulfillType(row.fulfillStatus)" :text="fulfillLabel(row.fulfillStatus)" />
-          <span v-else style="color:var(--adm-text-45);">-</span>
+          <span v-else class="text-muted">-</span>
         </template>
       </el-table-column>
       <el-table-column prop="paymentMethod" label="支付方式" width="100">
@@ -146,7 +146,7 @@
 
     <!-- Ship Dialog -->
     <el-dialog title="发货" :visible.sync="shipDialogVisible" width="450px">
-      <el-alert title="确认给以下订单发货" type="info" :closable="false" style="margin-bottom:15px;">
+      <el-alert title="确认给以下订单发货" type="info" :closable="false" class="mb-15">
         <template slot>
           订单号:<strong>{{ shipTarget?.orderNo }}</strong>
         </template>
@@ -171,7 +171,7 @@
     <!-- Refund Dialog -->
     <el-dialog title="退款审核" :visible.sync="refundDialogVisible" width="450px">
       <template v-if="refundTarget">
-        <el-alert title="退款申请" type="warning" :closable="false" style="margin-bottom:15px;">
+        <el-alert title="退款申请" type="warning" :closable="false" class="mb-15">
           <template slot>
             订单号:<strong>{{ refundTarget.orderNo }}</strong><br>
             退款原因:{{ refundTarget.refundReason || '-' }}
@@ -426,4 +426,11 @@ export default {
   gap: 10px;
   align-items: center;
 }
+/* == C 批内联清理工具类 == */
+.w-220 { width: 220px; }
+.w-260 { width: 260px; }
+.product-row { display: flex; align-items: center; gap: 8px; }
+.thumb-40 { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
+.text-muted { color: var(--adm-text-45); }
+.mb-15 { margin-bottom: 15px; }
 </style>

+ 15 - 7
cfc-web/src/views/admin/VirtualTeamList.vue

@@ -11,7 +11,7 @@
           placeholder="搜索团队名称"
           prefix-icon="el-icon-search"
           size="small"
-          style="width: 240px"
+          class="w-240"
           clearable
           @clear="loadData"
           @keyup.enter.native="loadData"
@@ -81,7 +81,7 @@
 
     <el-pagination
         v-if="filteredData.length > pageSize"
-        style="margin-top: 16px; text-align: right"
+        class="pagination-right"
         background
         layout="prev, pager, next, total"
         :total="filteredData.length"
@@ -99,8 +99,8 @@
           <el-input v-model="form.description" type="textarea" :rows="3" placeholder="请输入团队描述"></el-input>
         </el-form-item>
         <el-form-item label="利润率" prop="profitRate">
-          <el-input-number v-model="form.profitRate" :min="0" :max="100" :precision="1" :step="0.5" style="width: 200px"></el-input-number>
-          <span style="margin-left: 8px; color: var(--adm-text-45)">%</span>
+          <el-input-number v-model="form.profitRate" :min="0" :max="100" :precision="1" :step="0.5" class="w-200"></el-input-number>
+          <span class="suffix-hint">%</span>
         </el-form-item>
       </el-form>
       <div slot="footer">
@@ -110,9 +110,9 @@
     </el-dialog>
 
     <el-dialog title="操作成功" :visible.sync="successDialogVisible" width="400px" :close-on-click-modal="false">
-      <div style="text-align:center;padding:10px 0">
-        <i class="el-icon-success" style="color: var(--adm-success);font-size:32px"></i>
-        <p style="margin:12px 0 0;font-size:16px;color: var(--adm-text-88)">保存成功</p>
+      <div class="success-wrap">
+        <i class="el-icon-success success-icon"></i>
+        <p class="success-title">保存成功</p>
       </div>
       <div slot="footer">
         <el-button type="primary" @click="handleContinue">继续添加</el-button>
@@ -274,4 +274,12 @@ export default {
 .sort-header:hover {
   color: var(--adm-primary);
 }
+/* == C 批内联清理工具类 == */
+.w-240 { width: 240px; }
+.pagination-right { margin-top: 16px; text-align: right; }
+.w-200 { width: 200px; }
+.suffix-hint { margin-left: 8px; color: var(--adm-text-45); }
+.success-wrap { text-align: center; padding: 10px 0; }
+.success-icon { color: var(--adm-success); font-size: 32px; }
+.success-title { margin: 12px 0 0; font-size: 16px; color: var(--adm-text-88); }
 </style>

+ 14 - 7
cfc-web/src/views/admin/review/ArticleAudit.vue

@@ -7,13 +7,13 @@
         <el-option label="已通过" value="approved" />
         <el-option label="已拒绝" value="rejected" />
       </el-select>
-      <el-input v-model="keyword" placeholder="搜索标题..." prefix-icon="el-icon-search" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" style="width:200px" />
+      <el-input v-model="keyword" placeholder="搜索标题..." prefix-icon="el-icon-search" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" class="w-200" />
       <el-button size="small" @click="loadData" :loading="loading">刷新</el-button>
       <el-button v-if="selectedRows.length > 0 && statusFilter === 'pending'" size="small" type="success" @click="handleBatchApprove">批量通过({{ selectedRows.length }})</el-button>
       <el-button v-if="selectedRows.length > 0 && statusFilter === 'pending'" size="small" type="danger" @click="showBatchRejectDialog">批量驳回({{ selectedRows.length }})</el-button>
     </div>
         <div class="adm-table-wrap">
-<el-table :data="list" v-loading="loading" border stripe style="min-width:900px;" height="100%" @selection-change="onSelectionChange">
+<el-table :data="list" v-loading="loading" border stripe class="wide-table" height="100%" @selection-change="onSelectionChange">
       <el-table-column type="selection" width="40" v-if="statusFilter === 'pending'" />
       <el-table-column prop="id" label="ID" width="60">
         <template slot="header">
@@ -32,8 +32,8 @@
       </el-table-column>
       <el-table-column prop="auditReason" label="驳回原因" min-width="150" show-overflow-tooltip>
         <template slot-scope="{ row }">
-          <span v-if="row.auditReason" style="color:var(--adm-error-text);">{{ row.auditReason }}</span>
-          <span v-else style="color:var(--adm-text-45);">-</span>
+          <span v-if="row.auditReason" class="text-error">{{ row.auditReason }}</span>
+          <span v-else class="text-muted">-</span>
         </template>
       </el-table-column>
       <el-table-column prop="createdAt" label="申请时间" width="160">
@@ -56,7 +56,7 @@
       :total="total"
       layout="total, prev, pager, next"
       @current-change="onPageChange"
-      style="margin-top:12px;text-align:right;"
+      class="pagination-right"
     />
 
     <audit-detail-drawer
@@ -77,9 +77,9 @@
           <el-form-item label="发布时间">{{ currentRow.publishedAt || '-' }}</el-form-item>
           <el-form-item label="内容摘要" v-if="currentRow.summary">{{ currentRow.summary }}</el-form-item>
           <el-form-item label="内容" v-if="currentRow.content">
-            <div v-html="currentRow.content" style="max-height:300px;overflow-y:auto;border:1px solid var(--adm-border-split);padding:10px;border-radius:4px;background:var(--adm-bg-header);"></div>
+            <div v-html="currentRow.content" class="content-preview"></div>
           </el-form-item>
-          <el-form-item label="驳回原因" v-if="currentRow.auditReason" style="color:var(--adm-error-text);">
+          <el-form-item label="驳回原因" v-if="currentRow.auditReason" class="text-error">
             {{ currentRow.auditReason }}
           </el-form-item>
         </el-form>
@@ -237,4 +237,11 @@ export default {
 
 <style scoped>
 .filter-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding: 12px; background: var(--adm-bg-container); border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.08); flex-wrap: wrap; }
+/* == C 批内联清理工具类 == */
+.w-200 { width: 200px; }
+.wide-table { min-width: 900px; }
+.text-error { color: var(--adm-error-text); }
+.text-muted { color: var(--adm-text-45); }
+.pagination-right { margin-top: 12px; text-align: right; }
+.content-preview { max-height: 300px; overflow-y: auto; border: 1px solid var(--adm-border-split); padding: 10px; border-radius: 4px; background: var(--adm-bg-header); }
 </style>

+ 14 - 7
cfc-web/src/views/teacher/ProxyReport.vue

@@ -6,13 +6,13 @@
       <!-- 上传区域 -->
       <el-form ref="uploadForm" :model="uploadForm" label-width="100px" class="upload-form">
         <el-form-item label="选择家庭" prop="familyId" required>
-          <el-select v-model="uploadForm.familyId" placeholder="请选择家庭" filterable style="width:100%" @change="onFamilyChange">
+          <el-select v-model="uploadForm.familyId" placeholder="请选择家庭" filterable class="full-width" @change="onFamilyChange">
             <el-option v-for="f in familyList" :key="f.id" :label="f.name" :value="f.id" />
           </el-select>
         </el-form-item>
 
         <el-form-item label="报告对象" prop="subjectId" required>
-          <el-select v-model="uploadForm.subjectId" placeholder="请选择家庭成员" filterable style="width:100%">
+          <el-select v-model="uploadForm.subjectId" placeholder="请选择家庭成员" filterable class="full-width">
             <el-option v-for="m in memberList" :key="m.id" :label="m.nickname || m.realName" :value="m.id" />
           </el-select>
         </el-form-item>
@@ -43,7 +43,7 @@
     </el-card>
 
     <!-- 解析结果预览 -->
-    <el-card v-if="previewResult" style="margin-top:20px">
+    <el-card v-if="previewResult" class="mt-20">
       <div slot="header">
         <SectionTitle title="解析结果预览">
           <StatusTag :type="previewResult.needBind ? 'warning' : 'success'" :text="previewResult.needBind ? '待绑定成员' : '已匹配成员'" />
@@ -59,14 +59,14 @@
         <el-descriptions-item label="肠型">{{ previewResult.payload && previewResult.payload.gutType ? previewResult.payload.gutType : '-' }}</el-descriptions-item>
       </el-descriptions>
 
-      <div style="margin-top:20px;text-align:right">
+      <div class="pagination-wrap">
         <el-button @click="previewResult=null">取消</el-button>
         <el-button type="primary" :loading="confirming" @click="handleConfirm">确认入库</el-button>
       </div>
     </el-card>
 
     <!-- AI解读结果 -->
-    <el-card v-if="analysisResult" style="margin-top:20px">
+    <el-card v-if="analysisResult" class="mt-20">
       <div slot="header">
         <SectionTitle title="AI解读结果">
           <StatusTag type="success" size="small" text="已完成" />
@@ -76,7 +76,7 @@
     </el-card>
 
     <!-- 历史报告列表 -->
-    <el-card style="margin-top:20px">
+    <el-card class="mt-20">
       <div slot="header">
         <SectionTitle title="代上传历史记录" />
       </div>
@@ -155,7 +155,7 @@
         <el-descriptions-item label="代上传人">{{ detailReport.proxyUploaderName || '-' }}</el-descriptions-item>
         <el-descriptions-item label="备注" :span="2">{{ detailReport.remark || '-' }}</el-descriptions-item>
         <el-descriptions-item label="AI解读" :span="2">
-          <div v-html="detailReport.aiAnalysis" class="analysis-content" style="max-height:300px;overflow:auto"></div>
+          <div v-html="detailReport.aiAnalysis" class="analysis-content analysis-scroll"></div>
         </el-descriptions-item>
       </el-descriptions>
       <span slot="footer">
@@ -353,4 +353,11 @@ export default {
   margin-top: 20px;
   text-align: right;
 }
+.analysis-scroll {
+  max-height: 300px;
+  overflow: auto;
+}
+/* == C 批内联清理工具类 == */
+.full-width { width: 100%; }
+.mt-20 { margin-top: 20px; }
 </style>