浏览代码

Merge branch 'refs/heads/wang' into test

WanGxC 11 月之前
父节点
当前提交
cf7ef0d9b7

+ 37 - 10
src/views/keyword/rootWordManage/components/root-word-manage-table.vue

@@ -52,7 +52,7 @@ const rules = reactive<FormRules<typeof ruleForm>>({
   searchTermType: [{ required: true, validator: checkSearchTermType, trigger: 'blur' }],
 });
 
-const searchTermTypeFilter = ref(' ');
+const searchTermTypeFilter = ref('all');
 const searchTermFilter = ref('');
 const upload = ref<UploadInstance>();
 
@@ -315,8 +315,8 @@ function handleResponse(response: any) {
 
 <template>
   <div>
-    <el-card v-loading="tableLoading" body-style="background-color: #f6f7fb;">
-      <div class="flex justify-between gap-3.5 pb-3.5">
+    <el-card v-loading="tableLoading" body-style="background-color: #f7f7f7;">
+      <el-card body-class="flex justify-between gap-3.5" shadow="hover" style="border: none; margin-bottom: 10px">
         <div class="flex gap-7">
           <div>
             <span class="font-bold mr-2" style="color: #303133">词根:</span>
@@ -329,11 +329,12 @@ function handleResponse(response: any) {
               style="width: 240px"></el-input>
           </div>
           <div>
-            <span class="font-bold mr-2" style="color: #303133">搜索条件:</span>
+            <span class="font-bold mr-2" style="color: #303133">词根类型:</span>
             <el-select v-model="searchTermTypeFilter" style="width: 200px" @change="fetchSearchTermList">
-              <el-option label="全部" value=" " />
+              <el-option label="全部" value="all" />
               <el-option label="positive" value="positive" />
               <el-option label="negative" value="negative" />
+              <el-option label="无词根类型" value="typeless" />
             </el-select>
           </div>
         </div>
@@ -344,7 +345,8 @@ function handleResponse(response: any) {
             </el-icon>
             添加词根
           </el-button>
-          <div style="height: 72px">
+          <!-- 想要不页面不跳动可以加72的高度 -->
+          <div>
             <el-upload
               ref="upload"
               action="#"
@@ -358,19 +360,38 @@ function handleResponse(response: any) {
             </el-upload>
           </div>
         </div>
-      </div>
+      </el-card>
       <!-- 表格 -->
-      <el-card shadow="never">
+      <el-card shadow="hover" style="border: none">
         <div style="height: 535px; overflow: auto">
           <el-table :data="tableData" stripe style="width: 100%">
-            <el-table-column fixed prop="add_date" label="添加日期" width="180" sortable />
+            <el-table-column fixed prop="add_date" label="添加日期" width="180" sortable>
+              <template #header>
+                <el-icon style="top: 2px; margin-right: 3px">
+                  <Calendar />
+                </el-icon>
+                <span>添加日期</span>
+              </template>
+            </el-table-column>
             <el-table-column prop="searchTerm" label="词根" sortable>
+              <template #header>
+                <el-icon style="top: 2px; right: 2px">
+                  <Key />
+                </el-icon>
+                <span>词根</span>
+              </template>
               <template #default="{ row }">
                 <el-input ref="searchTermInpRef" v-if="row.isEditing" v-model="row.searchTerm" @change="updateSearchTerm(row)" />
-                <span class="font-bold" v-else>{{ row.searchTerm }}</span>
+                <span class="font-semibold" style="color: #5c96f7" v-else>{{ row.searchTerm }}</span>
               </template>
             </el-table-column>
             <el-table-column prop="searchTerm_type" label="词根类型" sortable>
+              <template #header>
+                <el-icon style="top: 2px; right: 2px">
+                  <Coin />
+                </el-icon>
+                <span>词根类型</span>
+              </template>
               <template #default="{ row }">
                 <el-popconfirm
                   title="确定修改吗?"
@@ -387,6 +408,12 @@ function handleResponse(response: any) {
               </template>
             </el-table-column>
             <el-table-column fixed="right" label="操作" width="120">
+              <template #header>
+                <el-icon style="top: 2px; margin-right: 5px">
+                  <EditPen />
+                </el-icon>
+                <span>操作</span>
+              </template>
               <template #default="{ row }">
                 <el-button link type="primary" size="small" @click="handleClick(row)" v-if="!row.isEditing"> 编辑</el-button>
                 <el-button link type="primary" size="small" @click="handleClick(row)" v-else> 取消</el-button>

+ 1 - 1
src/views/keyword/rootWordManage/index.vue

@@ -9,7 +9,7 @@ import RootWordManageTable from './components/root-word-manage-table.vue';
 </script>
 
 <template>
-  <div class="pt-1.5 pr-2.5">
+  <div>
     <RootWordManageTable />
   </div>
 </template>