Compare commits
2 Commits
8390993384
...
57e3785445
Author | SHA1 | Date | |
---|---|---|---|
57e3785445 | |||
686ed55a79 |
@ -64,21 +64,10 @@
|
||||
@send="sendMessage"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="考核">
|
||||
<el-tab-pane label="考核" v-if="route.name === 'Meeting'">
|
||||
<!-- // 签到、考试、问卷弹窗 -->
|
||||
<el-row :gutter="10">
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8"
|
||||
><el-button
|
||||
type="primary"
|
||||
:disabled="
|
||||
!isDuringSignPeriod || store.state.joinUser.signSubmited
|
||||
"
|
||||
style="width: 100%"
|
||||
@click="showSignDialog = true"
|
||||
>签到</el-button
|
||||
></el-col
|
||||
>
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8"
|
||||
<el-col :span="12"
|
||||
><el-button
|
||||
type="primary"
|
||||
:disabled="
|
||||
@ -89,7 +78,7 @@
|
||||
>考试</el-button
|
||||
></el-col
|
||||
>
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8"
|
||||
<el-col :span="12"
|
||||
><el-button
|
||||
type="primary"
|
||||
style="width: 100%"
|
||||
@ -123,22 +112,6 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- <el-dialog
|
||||
v-model="showSignSubmitedDialog"
|
||||
:close-on-click-modal="false"
|
||||
title="签到"
|
||||
width="30%"
|
||||
:fullscreen="screenWidth < 900"
|
||||
>
|
||||
<span>您已经签到过了</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="showSignSubmitedDialog = false"
|
||||
>关闭</el-button
|
||||
>
|
||||
</span>
|
||||
</template></el-dialog
|
||||
> -->
|
||||
<mediaCheck />
|
||||
|
||||
<questions
|
||||
@ -152,7 +125,7 @@
|
||||
|
||||
<questions
|
||||
mode="2"
|
||||
@state="getStageQuestionnaireAnswer"
|
||||
@stage="getStageQuestionnaireAnswer"
|
||||
:questions-list="questionnaireQuestionsList"
|
||||
v-if="showQuestionnaireDialog && route.name !== 'Host'"
|
||||
:showDialog="showQuestionnaireDialog"
|
||||
@ -229,25 +202,8 @@ const meetingConfig = reactive({
|
||||
});
|
||||
|
||||
// 是否在签到时间段内
|
||||
const now = ref(dayjs());
|
||||
setInterval(() => {
|
||||
now.value = dayjs();
|
||||
}, 1000);
|
||||
const isDuringSignPeriod = computed(() => {
|
||||
const signModelList = store.state.meeting.signModelList.map((el) => el);
|
||||
if (signModelList.length === 0) {
|
||||
return false;
|
||||
} else {
|
||||
return signModelList.some((el) => {
|
||||
return (
|
||||
now.value.isAfter(dayjs(el.signStartTime)) &&
|
||||
now.value.isBefore(dayjs(el.signEndTime))
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const isDuringExamPeriod = computed(() => {
|
||||
const isDuringExamPeriod = ref(false);
|
||||
isDuringExamPeriod = (() => {
|
||||
const examStartTime = dayjs(store.state.meeting.examStartTime);
|
||||
const meetingEndTime = dayjs(store.state.meeting.startTime).add(
|
||||
store.state.meeting.duration,
|
||||
@ -256,11 +212,11 @@ const isDuringExamPeriod = computed(() => {
|
||||
if (!examStartTime) {
|
||||
return false;
|
||||
} else {
|
||||
return (
|
||||
now.value.isAfter(examStartTime) && now.value.isBefore(meetingEndTime)
|
||||
);
|
||||
const now = dayjs();
|
||||
return now.isAfter(examStartTime) && now.isBefore(meetingEndTime);
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
const handleReOpenExam = () => {
|
||||
showExamDialog.value = true;
|
||||
};
|
||||
@ -701,6 +657,7 @@ const initWebSocket = () => {
|
||||
// 开始签到时
|
||||
else if (data.type === "isStartSign" && route.name === "Meeting") {
|
||||
showSignDialog.value = true;
|
||||
isDuringExamPeriod.value = true;
|
||||
}
|
||||
// 签到结束时
|
||||
else if (data.type === "isEndSign" && route.name === "Meeting") {
|
||||
@ -718,6 +675,7 @@ const initWebSocket = () => {
|
||||
else if (data.type === "isCloseMeeting") {
|
||||
showExamDialog.value = false;
|
||||
showQuestionnaireDialog.value = false;
|
||||
isDuringExamPeriod.value = false;
|
||||
ElMessageBox.alert("会议已结束");
|
||||
socket.close();
|
||||
if (route.name === "Meeting") {
|
||||
@ -781,6 +739,7 @@ const getStageExamAnswer = (val) => {
|
||||
};
|
||||
const questionnaireQuestionsList = ref([]);
|
||||
const getStageQuestionnaireAnswer = (val) => {
|
||||
console.log(val);
|
||||
questionnaireQuestionsList.value = val.map((el) => el);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user