|
|
@@ -15,16 +15,22 @@
|
|
|
已过期
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- :type="type == 1 ? 'primary' : ''"
|
|
|
- @click="(currentPage = 1), (type = 1), getCertList()"
|
|
|
+ :type="type == 7 ? 'primary' : ''"
|
|
|
+ @click="(currentPage = 1), (type = 2), getCertList()"
|
|
|
>
|
|
|
- 当月
|
|
|
+ {{ nextMonthStr }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- :type="type == 2 ? 'primary' : ''"
|
|
|
- @click="(currentPage = 1), (type = 2), getCertList()"
|
|
|
+ :type="type == 8 ? 'primary' : ''"
|
|
|
+ @click="(currentPage = 1), (type = 8), getCertList()"
|
|
|
>
|
|
|
- 下月
|
|
|
+ {{ nextNextMonthStr }}
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ :type="type == 9 ? 'primary' : ''"
|
|
|
+ @click="(currentPage = 1), (type = 9), getCertList()"
|
|
|
+ >
|
|
|
+ {{ nextNextNextMonthStr }}
|
|
|
</el-button>
|
|
|
</el-button-group>
|
|
|
</div>
|
|
|
@@ -178,7 +184,30 @@ let certType = ref(1);
|
|
|
let tableData = ref([]);
|
|
|
let total = ref(0);
|
|
|
let currentPage = ref(1);
|
|
|
+const monthNames = [
|
|
|
+ "一月",
|
|
|
+ "二月",
|
|
|
+ "三月",
|
|
|
+ "四月",
|
|
|
+ "五月",
|
|
|
+ "六月",
|
|
|
+ "七月",
|
|
|
+ "八月",
|
|
|
+ "九月",
|
|
|
+ "十月",
|
|
|
+ "十一月",
|
|
|
+ "十二月",
|
|
|
+];
|
|
|
+
|
|
|
+function getMonthName(monthOffset) {
|
|
|
+ const currentMonth = new Date().getMonth();
|
|
|
+ const newMonth = (currentMonth + monthOffset) % 12;
|
|
|
+ return monthNames[newMonth] + "过期";
|
|
|
+}
|
|
|
|
|
|
+const nextMonthStr = ref(getMonthName(1));
|
|
|
+const nextNextMonthStr = ref(getMonthName(2));
|
|
|
+const nextNextNextMonthStr = ref(getMonthName(3));
|
|
|
async function getCertList() {
|
|
|
let { data } = await api.getCertList({
|
|
|
type: type.value,
|