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

style(admin): C-15 SystemPromptManagement/Detail/Tasks/PackageAudit/GuidePackages 内联 style 归零

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

+ 11 - 7
cfc-web/src/views/GuidePackages.vue

@@ -6,7 +6,7 @@
       </PageHeader>
 
       <!-- 搜索 -->
-      <el-form :inline="true" :model="searchForm" style="margin-bottom: 20px">
+      <el-form :inline="true" :model="searchForm" class="mb-20">
         <el-form-item label="状态">
           <el-select v-model="searchForm.status" placeholder="全部" clearable @change="loadData">
             <el-option label="草稿" value="draft"></el-option>
@@ -120,7 +120,7 @@
         </el-form-item>
         <el-form-item label="是否公开">
           <el-switch v-model="form.isPublic"></el-switch>
-          <span style="margin-left: 10px; color: var(--adm-text-45)">公开后将显示在任务模板市场</span>
+          <span class="suffix-hint">公开后将显示在任务模板市场</span>
         </el-form-item>
         <el-form-item label="封面图">
           <el-upload
@@ -145,7 +145,7 @@
 
     <!-- 任务项管理弹窗 -->
     <el-dialog title="任务项管理" :visible.sync="itemsDialogVisible" width="800px">
-      <div style="margin-bottom: 20px">
+      <div class="mb-20">
         <el-button type="primary" size="small" @click="handleAddItem">添加任务项</el-button>
       </div>
       <el-table :data="items" border :max-height="300">
@@ -204,9 +204,9 @@
 
     <!-- 分享弹窗 -->
     <el-dialog title="分享任务模板" :visible.sync="shareDialogVisible" width="400px">
-      <div v-if="currentRow" style="text-align: center">
-        <p style="margin-bottom: 20px">分享码: <strong>{{ currentRow.shareCode }}</strong></p>
-        <p style="color: var(--adm-text-45); font-size: 12px">家长可通过分享码或链接查看您的任务模板</p>
+      <div v-if="currentRow" class="text-center">
+        <p class="mb-20">分享码: <strong>{{ currentRow.shareCode }}</strong></p>
+        <p class="text-muted-sm">家长可通过分享码或链接查看您的任务模板</p>
         <el-button type="primary" @click="copyShareCode">复制分享码</el-button>
       </div>
     </el-dialog>
@@ -479,5 +479,9 @@ export default {
   height: 148px;
   display: block;
 }
-
+/* == C 批内联清理工具类 == */
+.mb-20 { margin-bottom: 20px; }
+.suffix-hint { margin-left: 10px; color: var(--adm-text-45); }
+.text-center { text-align: center; }
+.text-muted-sm { color: var(--adm-text-45); font-size: 12px; }
 </style>

+ 18 - 7
cfc-web/src/views/Tasks.vue

@@ -6,7 +6,7 @@
       </PageHeader>
 
       <!-- 搜索筛选 -->
-      <el-form :inline="true" :model="searchForm" style="margin-bottom: 20px">
+      <el-form :inline="true" :model="searchForm" class="mb-20">
         <el-form-item label="任务标题">
           <el-input
             v-model="searchForm.title"
@@ -36,7 +36,7 @@
               icon="el-icon-close"
               v-if="searchForm.familyId"
               @click.stop="clearFamily"
-              style="padding: 8px"
+              class="padding-8"
             ></el-button>
             <i slot="suffix" class="el-input__icon el-icon-arrow-down" @click.stop="showFamilySelector"></i>
           </el-input>
@@ -49,7 +49,7 @@
 
       <!-- 家庭选择对话框 -->
       <el-dialog title="选择家庭" :visible.sync="familyDialogVisible" width="600px">
-        <el-table :data="familyList" border v-loading="familyLoading" @row-click="selectFamily" style="cursor: pointer" :max-height="300">
+        <el-table :data="familyList" border v-loading="familyLoading" @row-click="selectFamily" class="cursor-pointer" :max-height="300">
           <el-table-column prop="id" label="ID" width="80"></el-table-column>
           <el-table-column prop="name" label="家庭名称" min-width="150"></el-table-column>
           <el-table-column prop="inviteCode" label="邀请码" width="120"></el-table-column>
@@ -59,7 +59,7 @@
             </template>
           </el-table-column>
         <el-pagination
-          style="margin-top: 15px; text-align: right"
+          class="pagination-mt15"
           @current-change="loadFamilies"
           :current-page="familyPagination.current"
           :page-size="familyPagination.size"
@@ -69,7 +69,7 @@
       </el-dialog>
 
       <!-- 统计卡片 -->
-      <el-row :gutter="20" style="margin-bottom: 20px">
+      <el-row :gutter="20" class="mb-20">
         <el-col :span="6">
           <StatCard label="总任务数" :value="stats.total || 0" color="primary" icon="el-icon-tickets" />
         </el-col>
@@ -80,7 +80,7 @@
 
       <!-- 任务列表 -->
             <div class="adm-table-wrap">
-<el-table :data="tableData" border v-loading="loading" style="width: 100%" height="100%">
+<el-table :data="tableData" border v-loading="loading" class="full-width" height="100%">
         <el-table-column prop="id" label="ID" width="80">
           <template slot="header">
             <span class="sort-header" @click.stop="onSortClick('id', $event)">ID<span v-if="sortIndex('id') !== null" class="sort-index" :class="sortClass('id') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('id') }}</span>{{ sortIcon('id') }}</span>
@@ -155,7 +155,7 @@
 
       <!-- 分页 -->
       <el-pagination
-        style="margin-top: 20px; text-align: right"
+        class="pagination-mt20"
         @size-change="handleSizeChange"
         @current-change="handleCurrentChange"
         :current-page="pagination.current"
@@ -371,4 +371,15 @@ export default {
 }
 </script>
 
+<style scoped>
+.mb-20 { margin-bottom: 20px; }
+.mb-15 { margin-bottom: 15px; }
+.padding-8 { padding: 8px; }
+.cursor-pointer { cursor: pointer; }
+.pagination-mt15 { margin-top: 15px; text-align: right; }
+.pagination-mt20 { margin-top: 20px; text-align: right; }
+.full-width { width: 100%; }
+.text-error { color: var(--adm-error-text); }
+</style>
+
 

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

@@ -6,14 +6,14 @@
         <el-button size="mini" type="primary" @click="showEdit(null)">新增提示词</el-button>
       </PageHeader>
 
-      <el-form :model="filters" inline size="small" style="margin-bottom:16px;">
+      <el-form :model="filters" inline size="small" class="mb-16">
         <el-form-item label="关键词">
           <el-input v-model="filters.keyword" placeholder="搜索标题或键名" clearable @input="fetchList" />
         </el-form-item>
       </el-form>
 
             <div class="adm-table-wrap">
-<el-table :data="list" border stripe v-loading="loading" empty-text="暂无数据" style="width:100%" height="100%">
+<el-table :data="list" border stripe v-loading="loading" empty-text="暂无数据" class="full-width" height="100%">
         <el-table-column prop="promptKey" label="提示词键" width="160" />
         <el-table-column prop="title" label="标题" width="140" />
         <el-table-column prop="content" label="内容" min-width="300" show-overflow-tooltip />
@@ -34,14 +34,14 @@
             <el-button type="text" size="small" @click="showPreview(row)">预览</el-button>
             <el-button type="text" size="small" @click="showVersions(row)">版本</el-button>
             <el-button type="text" size="small" @click="resetToDefault(row)">重置</el-button>
-            <el-button type="text" size="small" style="color: var(--adm-error-text)" @click="deleteRow(row)">删除</el-button>
+            <el-button type="text" size="small" class="text-error" @click="deleteRow(row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
       </div>
 
       <el-pagination
-        style="margin-top: 16px; text-align: right"
+        class="pagination-right"
         :current-page="page"
         :page-size="size"
         :total="total"
@@ -80,7 +80,7 @@
 
     <!-- 预览弹窗 -->
     <el-dialog title="提示词预览" :visible.sync="previewVisible" width="600px">
-      <el-card shadow="never" style="white-space: pre-wrap; font-family: monospace; font-size: 13px; line-height: 1.8; background: var(--adm-bg-header);">
+      <el-card shadow="never" class="code-block">
         {{ previewContent }}
       </el-card>
       <div slot="footer">
@@ -90,7 +90,7 @@
 
     <!-- 版本历史弹窗 -->
     <el-dialog title="版本历史" :visible.sync="versionDialog.visible" width="900px">
-      <div style="margin-bottom:12px; color: var(--adm-text-65); font-size:13px;">
+      <div class="desc-hint">
         当前提示词: <strong>{{ versionDialog.promptKey }}</strong> — {{ versionDialog.title }}
       </div>
       <el-table :data="versionDialog.versions" border stripe size="small" max-height="400">
@@ -113,7 +113,7 @@
               :disabled="row.version === currentVersion">
               回滚到 v{{ row.version }}
             </el-button>
-            <span v-else style="color: var(--adm-text-45); font-size:12px;">当前版本</span>
+            <span v-else class="text-muted">当前版本</span>
           </template>
         </el-table-column>
       <div slot="footer">
@@ -242,4 +242,12 @@ export default {
 .system-prompt-page {
   padding: 0;
 }
+/* == C 批内联清理工具类 == */
+.mb-16 { margin-bottom: 16px; }
+.full-width { width: 100%; }
+.text-error { color: var(--adm-error-text); }
+.text-muted { color: var(--adm-text-45); font-size: 12px; }
+.pagination-right { margin-top: 16px; text-align: right; }
+.code-block { white-space: pre-wrap; font-family: monospace; font-size: 13px; line-height: 1.8; background: var(--adm-bg-header); }
+.desc-hint { margin-bottom: 12px; color: var(--adm-text-65); font-size: 13px; }
 </style>

+ 12 - 6
cfc-web/src/views/admin/review/PackageAudit.vue

@@ -12,7 +12,7 @@
       <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">
@@ -43,8 +43,8 @@
       </el-table-column>
       <el-table-column prop="rejectReason" label="拒绝原因" min-width="150" show-overflow-tooltip>
         <template slot-scope="{ row }">
-          <span v-if="row.rejectReason" style="color:var(--adm-error-text);">{{ row.rejectReason }}</span>
-          <span v-else style="color:var(--adm-text-45);">-</span>
+          <span v-if="row.rejectReason" class="text-error">{{ row.rejectReason }}</span>
+          <span v-else class="text-muted">-</span>
         </template>
       </el-table-column>
       <el-table-column prop="createdAt" label="申请时间" width="160">
@@ -67,7 +67,7 @@
       :total="total"
       layout="total, prev, pager, next"
       @current-change="onPageChange"
-      style="margin-top:12px;text-align:right;"
+      class="pagination-right"
     />
 
     <audit-detail-drawer
@@ -85,9 +85,9 @@
         <el-form-item label="价格">{{ formatPrice(currentRow.price) }}</el-form-item>
         <el-form-item label="创建时间">{{ currentRow.createdAt }}</el-form-item>
         <el-form-item label="详细介绍" v-if="currentRow.description">
-          <div style="border:1px solid var(--adm-border-split);padding:10px;border-radius:4px;background:var(--adm-bg-header);white-space:pre-wrap;">{{ currentRow.description }}</div>
+          <div class="content-box">{{ currentRow.description }}</div>
         </el-form-item>
-        <el-form-item label="拒绝原因" v-if="currentRow.rejectReason" style="color:var(--adm-error-text);">
+        <el-form-item label="拒绝原因" v-if="currentRow.rejectReason" class="text-error">
           {{ currentRow.rejectReason }}
         </el-form-item>
       </el-form>
@@ -238,4 +238,10 @@ 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 批内联清理工具类 == */
+.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-box { border: 1px solid var(--adm-border-split); padding: 10px; border-radius: 4px; background: var(--adm-bg-header); white-space: pre-wrap; }
 </style>

+ 10 - 7
cfc-web/src/views/admin/supply-system/Detail.vue

@@ -32,7 +32,7 @@
 
         <!-- Tab 2: 成员 -->
         <el-tab-pane label="成员" name="members">
-          <div style="margin-bottom: 15px;">
+          <div class="mb-15">
             <el-button type="primary" size="small" @click="showAddMemberDialog">+ 添加成员</el-button>
           </div>
                     <div class="adm-table-wrap">
@@ -93,7 +93,7 @@
 
         <!-- Tab 4: 结算 -->
         <el-tab-pane label="结算" name="settlements">
-            <div style="margin-bottom: 15px;">
+            <div class="mb-15">
                 <el-button type="primary" size="small" @click="showCreateSettlementDialog">生成结算单</el-button>
             </div>
                         <div class="adm-table-wrap">
@@ -128,7 +128,7 @@
         
         <!-- Tab 5: 下级关系 -->
         <el-tab-pane label="下级关系" name="hierarchy">
-            <div style="margin-bottom: 15px;">
+            <div class="mb-15">
                 <el-button type="primary" size="small" @click="showSetHierarchyDialog">调整关系</el-button>
             </div>
             <el-tree
@@ -170,12 +170,12 @@
         <el-dialog title="调整层级关系" :visible.sync="setHierarchyVisible" width="450px">
             <el-form label-width="100px">
                 <el-form-item label="上级">
-                    <el-select v-model="setHierarchyForm.parentId" placeholder="选择上级" style="width: 100%">
+                    <el-select v-model="setHierarchyForm.parentId" placeholder="选择上级" class="full-width">
                         <el-option v-for="member in members" :key="member.userId" :label="`${member.nickname} (${member.realName})`" :value="member.userId"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item label="下级">
-                    <el-select v-model="setHierarchyForm.childId" placeholder="选择下级" style="width: 100%">
+                    <el-select v-model="setHierarchyForm.childId" placeholder="选择下级" class="full-width">
                         <el-option v-for="member in members" :key="member.userId" :label="`${member.nickname} (${member.realName})`" :value="member.userId"></el-option>
                     </el-select>
                 </el-form-item>
@@ -190,10 +190,10 @@
         <el-dialog title="生成结算单" :visible.sync="createSettlementVisible" width="450px">
       <el-form label-width="120px">
         <el-form-item label="结算周期开始">
-          <el-date-picker v-model="settlementForm.periodStart" type="date" placeholder="选择开始日期" value-format="yyyy-MM-dd" style="width: 100%"></el-date-picker>
+          <el-date-picker v-model="settlementForm.periodStart" type="date" placeholder="选择开始日期" value-format="yyyy-MM-dd" class="full-width"></el-date-picker>
         </el-form-item>
         <el-form-item label="结算周期结束">
-          <el-date-picker v-model="settlementForm.periodEnd" type="date" placeholder="选择结束日期" value-format="yyyy-MM-dd" style="width: 100%"></el-date-picker>
+          <el-date-picker v-model="settlementForm.periodEnd" type="date" placeholder="选择结束日期" value-format="yyyy-MM-dd" class="full-width"></el-date-picker>
         </el-form-item>
         <el-form-item label="备注">
           <el-input v-model="settlementForm.remark" type="textarea"></el-input>
@@ -520,4 +520,7 @@ export default {
     align-items: center;
     width: 100%;
 }
+/* == C 批内联清理工具类 == */
+.mb-15 { margin-bottom: 15px; }
+.full-width { width: 100%; }
 </style>