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

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