fix:直播考勤起至时间,签到时间,签到状态修改。

This commit is contained in:
wuyx
2023-02-23 17:56:22 +08:00
parent 0b16108015
commit 1ffb33c36c

View File

@@ -1,28 +1,20 @@
<template> <template>
<a-drawer <a-drawer :visible="AAvisible" class="largeDrawerStyle" placement="right" width="80%"
:visible="AAvisible" @after-visible-change="afterVisibleChange">
class="largeDrawerStyle"
placement="right"
width="80%"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div class="headerTitle">{{ datasource.type==6?"直播":"活动" }}考勤</div> <div class="headerTitle">{{ datasource.type == 6 ? "直播" : "活动" }}考勤1</div>
<img <img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
style="width: 29px; height: 29px; cursor: pointer" @click="closeDrawer" />
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div> </div>
<div class="centermain"> <div class="centermain">
<div class="titl"> <div class="titl">
<div class="endtime">{{datasource}} <div class="endtime">
起止时间{{ 起止时间{{
datasource && datasource.startTime ? datasource.startTime : "-" datasource.info && datasource.info.liveStartTime ? datasource.info.liveStartTime : "-"
}} }}
{{ datasource && datasource.endTime ? datasource.endTime : "-" }} {{ datasource.info && datasource.info.liveEndTime ? datasource.info.liveEndTime : "-" }}
</div> </div>
<div class="endtime" style="margin-left: 64px">签到时间{{ beginTime }}</div> <div class="endtime" style="margin-left: 64px">签到时间{{ beginTime }}</div>
@@ -33,12 +25,8 @@
<div class="leftchoose"> <div class="leftchoose">
<div class="namecon" style="margin-right: 30px"> <div class="namecon" style="margin-right: 30px">
<div class="name">姓名</div> <div class="name">姓名</div>
<a-input <a-input v-model:value="name" style="width: 270px; height: 40px; border-radius: 8px" placeholder="请输入姓名"
v-model:value="name" maxlength="20" />
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名"
maxlength="20"
/>
</div> </div>
<!-- <div class="namecon" style="margin-right: 30px"> <!-- <div class="namecon" style="margin-right: 30px">
<div class="name">考勤</div> <div class="name">考勤</div>
@@ -57,14 +45,8 @@
<div class="namecon"> <div class="namecon">
<div class="name">签到状态</div> <div class="name">签到状态</div>
<div class="select"> <div class="select">
<a-select <a-select v-model:value="projectName2" style="width: 160px" placeholder="请选择" :options="projectNameList2"
v-model:value="projectName2" @change="selectProjectName2" allowClear></a-select>
style="width: 160px"
placeholder="请选择"
:options="projectNameList2"
@change="selectProjectName2"
allowClear
></a-select>
</div> </div>
</div> </div>
</div> </div>
@@ -107,18 +89,11 @@
</div> --> </div> -->
<div class="tableBox" style="margin-top: 30px"> <div class="tableBox" style="margin-top: 30px">
<a-table <a-table style="border: 1px solid #f2f6fe" :columns="tableDataFunc()" :data-source="tableData"
style="border: 1px solid #f2f6fe" :loading="tableDataTotalLoading" :scroll="{ x: 1300 }" :pagination="false" :row-selection="{
:columns="tableDataFunc()"
:data-source="tableData"
:loading="tableDataTotalLoading"
:scroll="{ x: 1300 }"
:pagination="false"
:row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" }" />
/>
</div> </div>
</div> </div>
<div class="btnn"> <div class="btnn">
@@ -128,13 +103,7 @@
</div> </div>
</a-drawer> </a-drawer>
<!-- 批量签到弹窗 --> <!-- 批量签到弹窗 -->
<a-modal <a-modal v-model:visible="qdModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true">
v-model:visible="qdModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -159,13 +128,7 @@
</a-modal> </a-modal>
<!-- 单独签到弹窗 --> <!-- 单独签到弹窗 -->
<a-modal <a-modal v-model:visible="singleqdModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true">
v-model:visible="singleqdModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -189,13 +152,7 @@
</div> </div>
</a-modal> </a-modal>
<!-- 单独签退弹窗 --> <!-- 单独签退弹窗 -->
<a-modal <a-modal v-model:visible="singleqtModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true">
v-model:visible="singleqtModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -219,13 +176,7 @@
</div> </div>
</a-modal> </a-modal>
<!-- 单独请假弹窗 --> <!-- 单独请假弹窗 -->
<a-modal <a-modal v-model:visible="singleqjModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true">
v-model:visible="singleqjModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -252,12 +203,8 @@
<SignQR v-model:signQRvisible="signQRvisible" /> <SignQR v-model:signQRvisible="signQRvisible" />
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
<two-dimensional-code <two-dimensional-code v-model:codevisible="codevisible" :codeInfo="codeInfo" :index="codeIndex"
v-model:codevisible="codevisible" :type="codeType == 1 ? '课程二维码' : codeType == 2 ? '签到二维码' : ''" />
:codeInfo="codeInfo"
:index="codeIndex"
:type="codeType == 1 ? '课程二维码' : codeType == 2 ? '签到二维码' : ''"
/>
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
</template> </template>
@@ -408,24 +355,24 @@ export default {
// 计算签到时间 // 计算签到时间
const isSignClick = () => { const isSignClick = () => {
// debugger // debugger
console.log("计算签到时间", props.datasource); console.log("计算签到时间", props.datasource.info);
let beginTime = new Date(props.datasource.startTime).getTime(); let beginTime = new Date(props.datasource.info.liveStartTime).getTime();
let endTime = !props.datasource.afterStart let endTime = !props.datasource.info.afterSignIn
? new Date(props.datasource.endTime).getTime() ? new Date(props.datasource.info.liveEndTime).getTime()
: new Date(props.datasource.startTime).getTime(); : new Date(props.datasource.info.liveStartTime).getTime();
if (props.datasource.beforeStart && props.datasource.afterStart) { if (props.datasource.info.beforeSignIn && props.datasource.info.afterSignIn) {
//有开始前有开始后 //有开始前有开始后
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000; beginTime = beginTime - props.datasource.info.beforeSignIn * 60 * 1000;
endTime = endTime + props.datasource.afterStart * 60 * 1000; endTime = endTime + props.datasource.info.afterSignIn * 60 * 1000;
console.log("1111", beginTime, endTime); console.log("1111", beginTime, endTime);
} else if (props.datasource.beforeStart && !props.datasource.afterStart) { } else if (props.datasource.info.beforeSignIn && !props.datasource.info.afterSignIn) {
//只有开始前无开始后 //只有开始前无开始后
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000; beginTime = beginTime - props.datasource.info.beforeSignIn * 60 * 1000;
console.log("11112222", beginTime); console.log("11112222", beginTime);
} else if (!props.datasource.beforeStart && props.datasource.afterStart) { } else if (!props.datasource.info.beforeSignIn && props.datasource.info.afterSignIn) {
//无开始前有开始后 //无开始前有开始后
endTime = endTime + props.datasource.afterStart * 60 * 1000; endTime = endTime + props.datasource.info.afterSignIn * 60 * 1000;
console.log("1111333", endTime); console.log("1111333", endTime);
} }
@@ -437,6 +384,8 @@ export default {
const afterVisibleChange = (bol) => { const afterVisibleChange = (bol) => {
if (bol == true) { if (bol == true) {
console.log("当前是什么类型", props.datasource.type); console.log("当前是什么类型", props.datasource.type);
console.log("当前是什么类型", props.datasource);
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
getTableData(); getTableData();
isSignClick(); isSignClick();
@@ -876,8 +825,7 @@ export default {
name: props.datasource?.name, name: props.datasource?.name,
url: url:
process.env.VUE_APP_BASE_API + process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${ `/admin/student/studentSign?taskId=${props.datasource.routerTaskId
props.datasource.routerTaskId
}&taskType=${props.datasource.type}&type=${2}`, }&taskType=${props.datasource.type}&type=${2}`,
}; };
console.log("codeInfo", state.codeInfo); console.log("codeInfo", state.codeInfo);
@@ -911,18 +859,14 @@ export default {
console.log("props.datasource", props.datasource); console.log("props.datasource", props.datasource);
if (props.types == 1) { if (props.types == 1) {
window.open( window.open(
`${ `${process.env.VUE_APP_BASE_API
process.env.VUE_APP_BASE_API }/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId
}/admin/student/exportTaskStudent?currentStageId=${
props.datasource.chapterId
}&type=2&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` }&type=2&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
); );
} else { } else {
window.open( window.open(
`${ `${process.env.VUE_APP_BASE_API
process.env.VUE_APP_BASE_API }/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId
}/admin/student/exportTaskStudent?currentStageId=${
props.datasource.stageId
}&type=1&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` }&type=1&pid=${props.datasource.courseId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
); );
} }
@@ -984,14 +928,17 @@ export default {
.ant-drawer-header { .ant-drawer-header {
display: none !important; display: none !important;
} }
.ant-drawer-body { .ant-drawer-body {
padding: 0; padding: 0;
.drawerMain { .drawerMain {
min-width: 600px; min-width: 600px;
margin: 0px 32px 0px 32px; margin: 0px 32px 0px 32px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
.header { .header {
height: 73px; height: 73px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
@@ -1000,6 +947,7 @@ export default {
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
flex-shrink: 0; flex-shrink: 0;
.headerTitle { .headerTitle {
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
@@ -1007,13 +955,16 @@ export default {
line-height: 25px; line-height: 25px;
} }
} }
.centermain { .centermain {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
margin-bottom: 75px; margin-bottom: 75px;
padding-right: 10px; padding-right: 10px;
.titl { .titl {
display: flex; display: flex;
.endtime { .endtime {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
@@ -1021,20 +972,24 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
} }
.search { .search {
width: 100%; width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 20px; margin-top: 20px;
justify-content: space-between; justify-content: space-between;
.leftchoose { .leftchoose {
display: flex; display: flex;
margin-right: 20px; margin-right: 20px;
flex-wrap: wrap; flex-wrap: wrap;
.namecon { .namecon {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
margin-bottom: 10px; margin-bottom: 10px;
.name { .name {
margin-top: 8px; margin-top: 8px;
white-space: nowrap; white-space: nowrap;
@@ -1054,6 +1009,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.img1 { .img1 {
width: 15px; width: 15px;
height: 17px; height: 17px;
@@ -1061,6 +1017,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
margin-right: 7px; margin-right: 7px;
} }
.img2 { .img2 {
width: 16px; width: 16px;
height: 18px; height: 18px;
@@ -1075,6 +1032,7 @@ export default {
color: #ffffff; color: #ffffff;
} }
.btn2 { .btn2 {
background: #ffffff; background: #ffffff;
@@ -1083,6 +1041,7 @@ export default {
} }
} }
} }
.btnss { .btnss {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
@@ -1095,6 +1054,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.img1 { .img1 {
width: 15px; width: 15px;
height: 17px; height: 17px;
@@ -1102,6 +1062,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
margin-right: 7px; margin-right: 7px;
} }
.img2 { .img2 {
width: 17px; width: 17px;
height: 16px; height: 16px;
@@ -1116,6 +1077,7 @@ export default {
margin-right: 20px; margin-right: 20px;
color: #ffffff; color: #ffffff;
} }
.btn2 { .btn2 {
background: #ffffff; background: #ffffff;
margin-right: 20px; margin-right: 20px;
@@ -1123,6 +1085,7 @@ export default {
border: 1px solid #4ea6ff; border: 1px solid #4ea6ff;
} }
} }
.line { .line {
width: 100%; width: 100%;
height: 40px; height: 40px;
@@ -1132,34 +1095,41 @@ export default {
align-items: center; align-items: center;
margin-top: 20px; margin-top: 20px;
border: 1px solid #c3e6fc; border: 1px solid #c3e6fc;
.inline { .inline {
width: 95%; width: 95%;
height: 100%; height: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left { .left {
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
.img { .img {
width: 15px; width: 15px;
height: 15px; height: 15px;
background-image: url(../../assets/images/leveladd/gan.png); background-image: url(../../assets/images/leveladd/gan.png);
background-size: 100% 100%; background-size: 100% 100%;
} }
.text { .text {
color: #999ba3; color: #999ba3;
} }
.text2 { .text2 {
color: #4ea6ff; color: #4ea6ff;
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.text3 { .text3 {
color: #999ba3; color: #999ba3;
margin-left: 20px; margin-left: 20px;
} }
} }
.right { .right {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
@@ -1171,31 +1141,35 @@ export default {
} }
} }
} }
.tableBox { .tableBox {
.classify { .classify {
padding-left: 0px !important; padding-left: 0px !important;
} }
.ant-checkbox-wrapper { .ant-checkbox-wrapper {
align-items: center; align-items: center;
margin-top: -2px; margin-top: -2px;
} }
.ant-table-selection-column { .ant-table-selection-column {
padding: 0px !important; padding: 0px !important;
} }
.ant-table-thead>tr>th { .ant-table-thead>tr>th {
background-color: rgba(239, 244, 252, 1); background-color: rgba(239, 244, 252, 1);
} }
th.h { th.h {
background-color: #eff4fc !important; background-color: #eff4fc !important;
} }
.ant-table-tbody .ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td {
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd; background: #f6f9fd;
} }
} }
} }
.btnn { .btnn {
height: 72px; height: 72px;
width: 100%; width: 100%;
@@ -1204,6 +1178,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16); box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 { .btn1 {
width: 100px; width: 100px;
height: 40px; height: 40px;
@@ -1213,6 +1188,7 @@ export default {
background-color: #fff; background-color: #fff;
cursor: pointer; cursor: pointer;
} }
.btn2 { .btn2 {
cursor: pointer; cursor: pointer;
width: 100px; width: 100px;