Selaa lähdekoodia

refactor(certManage): 调整证书列表筛选按钮布局并修改过期提示文案

- 移除"全部"和"已过期"按钮
- 在"3个月内到期"按钮后添加"已过期"和"全部"按钮
- 将"过期"提示文案改为"到期"
- 设置默认筛选类型为"2" (3个月内到期)
wzg 11 kuukautta sitten
vanhempi
commit
e13e0fb1cd
1 muutettua tiedostoa jossa 15 lisäystä ja 14 poistoa
  1. 15 14
      src/views/workStation/certsManage.vue

+ 15 - 14
src/views/workStation/certsManage.vue

@@ -2,18 +2,6 @@
   <div class="full-container-p24">
     <div class="mb20" style="margin-left: 200px">
       <el-button-group class="mr30">
-        <el-button
-          :type="type == 3 ? 'primary' : ''"
-          @click="(currentPage = 1), (type = 3), getCertList()"
-        >
-          全部
-        </el-button>
-        <el-button
-          :type="type == 0 ? 'primary' : ''"
-          @click="(currentPage = 1), (type = 0), getCertList()"
-        >
-          已过期
-        </el-button>
         <el-button
           :type="type == 2 ? 'primary' : ''"
           @click="(currentPage = 1), (type = 2), getCertList()"
@@ -32,6 +20,19 @@
         >
           {{ nextNextNextMonthStr }}
         </el-button>
+
+        <el-button
+          :type="type == 0 ? 'primary' : ''"
+          @click="(currentPage = 1), (type = 0), getCertList()"
+        >
+          已过期
+        </el-button>
+        <el-button
+          :type="type == 3 ? 'primary' : ''"
+          @click="(currentPage = 1), (type = 3), getCertList()"
+        >
+          全部
+        </el-button>
       </el-button-group>
     </div>
     <div class="df">
@@ -179,7 +180,7 @@ import _ from "lodash";
 import { subTimeStr } from "../../utils/utils";
 
 const route = useRoute();
-let type = ref(3);
+let type = ref(2);
 let certType = ref(1);
 let tableData = ref([]);
 let total = ref(0);
@@ -202,7 +203,7 @@ const monthNames = [
 function getMonthName(monthOffset) {
   const currentMonth = new Date().getMonth();
   const newMonth = (currentMonth + monthOffset) % 12;
-  return monthNames[newMonth] + "期";
+  return monthNames[newMonth] + "期";
 }
 
 const nextMonthStr = ref(getMonthName(1));