This commit is contained in:
曹辉 2023-04-18 10:12:58 +08:00
parent 56f1a4ce3c
commit 472ae45bb0
2 changed files with 44 additions and 7 deletions

View File

@ -7,3 +7,12 @@ export function clockStatistics(pageNum, pageSize, parentInfoId, classId, startD
method: 'post',
})
}
export function calendarStatistics(parentInfoId, startDate) {
return request({
url: `/system/appLogManage/calendarStatistics?parentInfoId=${parentInfoId}&startDate=${startDate}`,
method: 'post',
})
}

View File

@ -198,7 +198,10 @@
</div>
</template>
<script>
import { clockStatistics } from "@/api/system/StatisticsParent";
import {
clockStatistics,
calendarStatistics
} from "@/api/system/StatisticsParent";
import classe from "../../assembly/classe.vue";
import parent from "../../assembly/parent.vue";
import calendar from "../../calendar.js";
@ -252,10 +255,11 @@ export default {
startDate: "",
endDate: ""
},
selectedDates: ["2023-03-12", "2023-04-12", "2023-04-15", "2023-04-24"],
selectedDates: [],
date: new Date(),
yearmonths: [],
year: "2023"
year: "2023",
parentInfoId: ""
};
},
created() {
@ -279,6 +283,17 @@ export default {
this.year + "-11",
this.year + "-12"
];
this.selectedDates = [];
var startDate = this.year + "-01-01";
calendarStatistics(this.parentInfoId, startDate).then(res => {
if (res.data) {
if (res.data.dateTimeList.length > 0) {
res.data.dateTimeList.forEach(e => {
this.selectedDates.push(e.logDate);
});
}
}
});
}
},
methods: {
@ -365,7 +380,6 @@ export default {
dates.year + "-11",
dates.year + "-12"
];
console.log(this.year);
// //
// if (dates.month < 10) {
// this.query.startDate = dates.year + "-0" + dates.month;
@ -382,8 +396,20 @@ export default {
// this.query.endDate = this.endDate + "-" + dates.date;
// }
},
look() {
this.loginCountshow = true;
look(row) {
this.parentInfoId = row.parentInfoId;
this.selectedDates = [];
var startDate = "2023-01-01";
calendarStatistics(row.parentInfoId, startDate).then(res => {
if (res.data) {
if (res.data.dateTimeList.length > 0) {
res.data.dateTimeList.forEach(e => {
this.selectedDates.push(e.logDate);
});
}
}
this.loginCountshow = true;
});
},
//
parentlist(e) {
@ -397,6 +423,8 @@ export default {
resetQuery() {
this.newtime();
this.valuetime = "";
this.query.classId = "";
this.query.parentInfoId = "";
this.query.startDate = "";
this.query.endDate = "";
this.$refs.resets.reset();
@ -493,6 +521,7 @@ export default {
.el-calendar-table .el-calendar-day > div.selected {
background-color: #fef2f2;
border: 3px solid #fb0;
color: #fb0;
border-radius: 10px;
text-align: center;
}
@ -503,7 +532,6 @@ export default {
}
/**本月农历设置为灰色*/
.el-calendar-table .current .lunar {
color: #606266;
width: 100%;
}
/**本月农历节日设置为红色*/