diff --git a/src/views/menuData/AnalysisDialog.vue b/src/views/menuData/AnalysisDialog.vue
index f72b5ac..9187569 100644
--- a/src/views/menuData/AnalysisDialog.vue
+++ b/src/views/menuData/AnalysisDialog.vue
@@ -93,8 +93,10 @@ export default {
const seriesData = sortedDateData.map((item) => item.count);
const sortedDateData1 = res.data.time.sort(
- (a, b) => new Date(a.key) - new Date(b.key)
+ (a, b) => Number(a.key) - Number(b.key)
);
+
+ console.log(sortedDateData1, "sortedDateData1");
const xAxisData1 = sortedDateData1.map((item) => item.key);
const seriesData1 = sortedDateData1.map((item) => item.count);
this.chartData = res.data;
diff --git a/src/views/menuData/WhitListDialog.vue b/src/views/menuData/WhitListDialog.vue
index 96742ed..418a4aa 100644
--- a/src/views/menuData/WhitListDialog.vue
+++ b/src/views/menuData/WhitListDialog.vue
@@ -36,6 +36,9 @@
@changePage="handlePageChange"
@selectionChange="handleSelectionChange"
>
+
+ {{ data.createTime }} - {{ data.endTime }}
+
{
if (res.code === 0) {
this.tableData = res.data.items.map((item) => {
- return item.allDay
- ? { ...item, allDay: "是" }
- : { ...item, allDay: "否" };
+ let status = "未启用";
+ if (item.allDay) {
+ status = "启用中";
+ } else {
+ const now = new Date();
+ const endTime = new Date(item.endTime);
+ status = endTime > now ? "启用中" : "未启用";
+ }
+ return {
+ ...item,
+ allDay: item.allDay ? "是" : "否",
+ status
+ };
});
+
this.paginationParam.total = res.data.total;
}
});
@@ -340,11 +348,11 @@ export default {
this.isType = "edit";
this.title = "编辑白名单";
this.isEditFlag = false;
- this.fromItem = { ...value };
- this.fromItem.positionId = value.positionIds;
+ this.fromItem = JSON.parse(JSON.stringify(value));
+ this.fromItem.positionId = this.fromItem.positionIds;
this.formDrawerList = this.getDefaultFormDrawerList();
- value.allDay = value.allDay ? "0" : "1";
- this.changeSelect(value.allDay); // 根据 allDay 调整时间日期字段
+ this.fromItem.allDay = this.fromItem.allDay ? "0" : "1";
+ this.changeSelect(this.fromItem.allDay); // 根据 allDay 调整时间日期字段
this.initPosition();
this.drawer = true;
} else if (type === "delete") {