Browse Source

style(admin): B-8 组件铺开 - NutritionProducts/ProblemDomain 分区 SectionTitle + 状态 StatusTag + hex 令牌化

liaoxg 1 month ago
parent
commit
57830a31a9

+ 6 - 8
cfc-web/src/views/admin/NutritionProducts.vue

@@ -83,7 +83,7 @@
         </el-table-column>
         <el-table-column label="分类" width="95" align="center">
           <template slot-scope="{ row }">
-            <el-tag size="mini" effect="plain">{{ categoryName(row.categoryId) }}</el-tag>
+            <StatusTag type="primary" :text="categoryName(row.categoryId)" size="mini" effect="plain" />
           </template>
           <template slot="header">
             <span class="sort-header" @click.stop="onSortClick('categoryId', $event)">分类<span v-if="sortIndex('categoryId') !== null" class="sort-index" :class="sortClass('categoryId') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('categoryId') }}</span>{{ sortIcon('categoryId') }}</span>
@@ -190,9 +190,7 @@
                 <span v-else class="no-data">-</span>
               </el-descriptions-item>
               <el-descriptions-item label="关联商品ID" :span="2">
-                <el-tag v-if="detailData.product.localProductId" type="success">
-                  {{ detailData.product.localProductId }}
-                </el-tag>
+                <StatusTag v-if="detailData.product.localProductId" type="success" :text="detailData.product.localProductId" />
                 <span v-else class="no-data">未关联</span>
               </el-descriptions-item>
               <el-descriptions-item label="产品描述" :span="2">
@@ -202,7 +200,7 @@
           </el-col>
         </el-row>
 
-        <el-divider content-position="left">成份明细</el-divider>
+        <SectionTitle title="成份明细" />
         <el-table v-if="detailData.ingredients && detailData.ingredients.length" :data="detailData.ingredients" size="mini" border stripe>
           <el-table-column prop="name" label="成分名" min-width="150" />
           <el-table-column prop="ingredientType" label="类型" width="100" />
@@ -213,7 +211,7 @@
           <el-table-column prop="purpose" label="功效" min-width="150" />
         <div v-else class="no-data">暂无成份数据</div>
 
-        <el-divider content-position="left">平台价格</el-divider>
+        <SectionTitle title="平台价格" />
         <el-table v-if="detailData.platformListings && detailData.platformListings.length" :data="detailData.platformListings" size="mini" border stripe>
           <el-table-column prop="platform" label="平台" width="100" />
           <el-table-column label="当前价格" width="120">
@@ -234,9 +232,9 @@
           </el-table-column>
         <div v-else class="no-data">暂无平台价格数据</div>
 
-        <el-divider content-position="left">本平台关联商品</el-divider>
+        <SectionTitle title="本平台关联商品" />
         <div v-if="detailData.localProduct">
-          <el-tag type="success">已关联商品 ID: {{ detailData.localProduct.id }}</el-tag>
+          <StatusTag type="success" :text="'已关联商品 ID: ' + detailData.localProduct.id" />
           <p style="margin-top: 8px;">名称: {{ detailData.localProduct.name }}</p>
           <p>价格: ¥{{ (detailData.localProduct.price / 100).toFixed(2) }}</p>
         </div>

+ 4 - 4
cfc-web/src/views/admin/ProblemDomainManage.vue

@@ -58,7 +58,7 @@
         <el-table-column label="操作" width="150" align="center">
           <template slot-scope="scope">
             <el-button type="text" size="mini" @click="openEdit(scope.row)">编辑</el-button>
-            <el-button type="text" size="mini" style="color:#f56c6c" @click="handleDelete(scope.row)">删除</el-button>
+            <el-button type="text" size="mini" style="color:var(--adm-error)" @click="handleDelete(scope.row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -110,7 +110,7 @@
           <el-switch v-model="form.status" :active-value="1" :inactive-value="0" />
         </el-form-item>
 
-        <el-divider content-position="left">服务流程(7步,JSON数组)</el-divider>
+        <SectionTitle title="服务流程(7步,JSON数组)" />
         <el-form-item label="流程JSON">
           <el-input
             v-model="form.flowIntroJson"
@@ -128,7 +128,7 @@
             >
               <el-input v-model="step.title" placeholder="步骤标题" style="width:40%;margin-right:8px" size="small" />
               <el-input v-model="step.desc" placeholder="步骤描述" style="width:40%;margin-right:8px" size="small" />
-              <el-button type="text" size="small" style="color:#f56c6c" @click="removeStep(idx)">删除</el-button>
+              <el-button type="text" size="small" style="color:var(--adm-error)" @click="removeStep(idx)">删除</el-button>
             </div>
             <el-button type="primary" size="mini" plain @click="addStep">+ 添加步骤</el-button>
             <el-button type="success" size="mini" plain @click="syncFlowJson" style="margin-left:8px">同步到JSON</el-button>
@@ -282,7 +282,7 @@ export default {
   font-size: 12px;
 }
 .sort-header:hover {
-  color: #409eff;
+  color: var(--adm-primary);
 }
 .sort-tag {
   margin-left: 8px;