-- fix 开课选择评估和考试

This commit is contained in:
yuping
2023-02-21 17:34:14 +08:00
parent b1c7888c11
commit 74c9b161d3
5 changed files with 1291 additions and 400 deletions

View File

@@ -953,7 +953,9 @@
<div v-if="checked4" class="cstm_items main_item">
<div class="signbox"></div>
<div class="btnbox">
<button class="xkbtn" @click="showAssessment">选择评估</button>
<AssessmentList v-model:assessmentName="assessmentName" v-model:assessmentId="assessmentId">
<button class="xkbtn" @click="showAssessment" style="margin-bottom: 0;margin-top: 0">选择评估</button>
</AssessmentList>
<div v-if="assessmentId > 0">
<a-tag closable @close="removePG" color="processing">
<span style="font-size: 14px; line-height: 33px">
@@ -961,54 +963,40 @@
</span>
</a-tag>
</div>
<AssessmentList
v-model:assessmentVisible="assessmentVisible"
v-model:assessmentName="assessmentName"
:assessmentId="assessmentId"
@checkedAss="getCheckedAss"
/>
</div>
</div>
<div class="cstm_items main_item">
<div class="signbox"></div>
<div class="btnbox">
<button class="xkbtn" @click="showDrawerAddHomework">
<add-homework v-model:info="workInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">
配置作业
</button>
<div v-if="EditWorkId > 0">
</add-homework>
<div v-if="workInfo.workName">
<a-tag closable @close="logW" color="processing">
<span style="font-size: 14px; line-height: 33px">
{{ workName }}
{{ workInfo.workName }}
</span>
</a-tag>
</div>
<add-homework
v-model:addhomeworkVisible="addhomeworkvisible"
@getWork="getWork"
:faceLevel="true"
v-model:EditWorkId="EditWorkId"
v-model:workName="workName"
/>
</div>
</div>
<div class="cstm_items main_item">
<div class="signbox"></div>
<div class="btnbox">
<button class="xkbtn" @click="showDrawerAddTest">配置考试</button>
<div v-if="EditTestId > 0">
<add-test v-model:info="examInfo">
<button class="xkbtn" style="margin-bottom: 0;margin-top: 0">配置考试</button>
</add-test>
<div v-if="examInfo.examinationName">
<a-tag closable @close="logT" color="processing">
<span style="font-size: 14px; line-height: 33px">
{{ testName }}
{{ examInfo.examinationName }}
</span>
</a-tag>
</div>
<add-test
v-model:addtestVisible="addtestvisible"
v-model:EditTestId="EditTestId"
v-model:testName="testName"
:faceLevel="true"
/>
</div>
</div>
<!--
@@ -1036,7 +1024,7 @@
</a-checkbox>
</div>
</div> -->
<div class="cstm_items items_fj">
<div class="cstm_items items_fj" style="height:80px">
<div class="signbox">
<span style="margin-right: 3px"></span>
</div>
@@ -1503,15 +1491,11 @@ import {
computed,
} from "vue";
import * as api from "../../api/indexInvist.js";
import * as apis from "../../api/indexTaskManage";
import {message} from "ant-design-vue";
import {useRouter, useRoute} from "vue-router";
import CommonStudent from "@/components/student/CommonStudent";
import OwnerTableModelStudent from "@/components/student/OwnerTableModelStudent";
// import StuAdd from "../../components/drawers/StuAdd";
// import OwnPower from "../../components/drawers/OwnPower.vue";
// import Corpowerlist from "../../components/drawers/CorPowerlist.vue";
import addOnlineCourse from "../../components/Modals/addOnlineCourse.vue";
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
@@ -1550,11 +1534,11 @@ import SeeModal from "./components/seeModal.vue";
import CourseModal from "./courseModal.vue";
import * as moment from "moment";
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
import {codeUrl, toDate} from "../../api/method";
import {codeUrl, toDate} from "@/api/method";
import {queryWorkDetailById} from "@/api/indexWork";
import {queryExaminationDetailById} from "@/api/indexExam";
import AddHomework from "../../components/drawers/AddHomework.vue";
import AddTest from "../../components/drawers/AddTest.vue";
import AddHomework from "../../components/drawers/CommonHomework.vue";
import AddTest from "../../components/drawers/CommonTest.vue";
import TableStudent from "@/components/student/TableStudent";
import FJUpload from "@/components/common/FJUpload";
import {updateStudent} from "@/api/indexProjStu";
@@ -1562,7 +1546,6 @@ import {useStore} from "vuex";
import DropDown from "@/components/common/DropDown";
import {checkPer} from "@/utils/utils";
import dayjs from "dayjs";
// import { commonExport } from '@/utils/commonExcel'
//列表表格
const columns1 = [
@@ -2171,6 +2154,8 @@ export default defineComponent({
const store = useStore();
const state = reactive({
workInfo:{},
examInfo:{},
tableLoading: false,
//新加
stuColumns: [
@@ -3193,13 +3178,11 @@ export default defineComponent({
const showDrawerAddTest = () => {
state.addtestvisible = true;
};
const logW = (e) => {
state.EditWorkId = null;
console.log(e);
const logW = () => {
state.workInfo = {}
};
const logT = (e) => {
state.EditTestId = 0;
console.log(e);
const logT = () => {
state.examInfo = {}
};
const removePG = () => {
console.log("11111");
@@ -3670,13 +3653,7 @@ export default defineComponent({
startTime = dayjs(state.xjkkinputV3[0]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[0].$d.getTime() / 1000);
endTime = dayjs(state.xjkkinputV3[1]).format('YYYY-MM-DD HH:mm') //parseInt(state.xjkkinputV3[1].$d.getTime() / 1000);
}
// console.log("state.validate", state.validate);
// if (!state.validate) {
// message.destroy();
// return message.warning("该开课名称已存在");
// }
const offName = await validateName({ name: state.xjkkinputV1, type: 5 }).then(res => {
const offName = await validateName({ name: state.xjkkinputV1, type: 5 ,id:state.offcoursePlanId}).then(res => {
console.log(res,res.data.data);
return res.data.data === 1;
});
@@ -3706,6 +3683,8 @@ const offName = await validateName({ name: state.xjkkinputV1, type: 5 }).then(re
// signWordFlag: state.xjkkradioV1 === 1 ? 1 : 0, //签到是否需要口令:1是0否
teacherId: state.member.value,
teacher: state.member.name,
workInfo: state.workInfo,//提交的作业信息
examInfo: state.examInfo//提交的考试信息
};
console.log(postData);
const checkList = [
@@ -3735,30 +3714,14 @@ const offName = await validateName({ name: state.xjkkinputV1, type: 5 }).then(re
state.offcourseId = item.offcourseId;
state.offcoursePlanId = item.id;
if (item.evaluateId) {
api
.queryAppraiseDetailById({assessmentId: item.evaluateId})
.then((res) => {
state.assessmentName = res.data.data.assessmentName;
})
.catch();
}
if (item.homeWorkId) {
queryWorkDetailById({workId: item.homeWorkId}).then((res) => {
state.workName = res.data.data.workName;
});
queryWorkDetailById({workId: item.homeWorkId}).then((res) => state.workInfo = res.data.data);
}
if (item.testId) {
queryExaminationDetailById({examinationId: item.testId}).then(
(res) => {
state.testName = res.data.data.examinationName;
}
);
queryExaminationDetailById({examinationId: item.testId}).then((res) => state.examInfo = res.data.data);
}
console.log("res");
console.log("获取面授课开课详情", item);
state.xjkkinputV2 = item.address;
state.checked1 = item.applyFlag === 1 ? true : false;
let arrss = item.attach.split(",");
@@ -3781,7 +3744,8 @@ const offName = await validateName({ name: state.xjkkinputV1, type: 5 }).then(re
(state.comLeave =
item.completeType.split(",")[1] == "1" ? true : false),
(state.checked4 = item.evalFlag === 1 ? true : false);
state.assessmentId = String(item.evaluateId);
state.assessmentName = item.assessmentName;
state.assessmentId = String(item.assessmentId);
state.EditTestId = Number(item.testId);
state.EditWorkId = String(item.homeWorkId);
state.xjkkinputV1 = item.name;
@@ -4675,7 +4639,6 @@ const offName = await validateName({ name: state.xjkkinputV1, type: 5 }).then(re
};
const disabledDate = (current) => {
// Can not select days before today and today
console.log("1111", dayjs().endOf("day"));
return current && current < dayjs().startOf("day");
};