Merge branch 'dongwu_develop' into develop

This commit is contained in:
BOE\10867418
2023-03-22 17:14:29 +08:00
9 changed files with 105 additions and 31 deletions

View File

@@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi";
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
console.log("版本2.2.2------------"); console.log("版本2.2.3------------");
// 监听关闭浏览器 // 监听关闭浏览器
let time1 = ref(0); let time1 = ref(0);

View File

@@ -34,6 +34,7 @@ export const routerStudentRank = (obj) => http.get('/admin/router/studentRank',
//是否优秀学员 //是否优秀学员
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj) export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
export const updateStudent = (obj) => http.post('/admin/student/updateStudent', obj) export const updateStudent = (obj) => http.post('/admin/student/updateStudent', obj)
export const auditStudentStatus = (obj) => http.post('/admin/student/auditStudent', obj)
//项目概览 //项目概览
export const overview = (obj) => http.get('/admin/project/overview', { params: obj }) export const overview = (obj) => http.get('/admin/project/overview', { params: obj })

View File

@@ -92,7 +92,9 @@
<div class="btn btn1" @click="batchFinish" style="margin-right: 20px"> <div class="btn btn1" @click="batchFinish" style="margin-right: 20px">
<div class="wz">批量标注完成</div> <div class="wz">批量标注完成</div>
</div> </div>
<CommonImport title="录入成绩" v-if="homeWorkId" :template-url="scoreTemplateUrl" :data="{ targetId: offcoursePlanId, type:3 }" :url="`/admin/student/importHomeWork`" name="uploadFile"> <CommonImport title="录入成绩" v-if="homeWorkId" :template-url="scoreTemplateUrl"
:data="{ targetId: offcoursePlanId, type:3,workId:homeWorkId }" :url="`/admin/student/importHomeWork`"
name="uploadFile">
<div class="btn btn1" style="margin-right: 20px;margin-left: 20px"> <div class="btn btn1" style="margin-right: 20px;margin-left: 20px">
<div class="img1"></div> <div class="img1"></div>
<div class="wz">批量录入成绩</div> <div class="wz">批量录入成绩</div>
@@ -120,6 +122,12 @@
</div> </div>
</a-drawer> </a-drawer>
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource"/> <CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource"/>
<!-- 查看作业抽屉 -->
<CKWork
v-model:CWvisible="CWvisible"
:workId="props.datasource?.courseId"
:stuId="stuId"
/>
<ExportHomeWork <ExportHomeWork
v-model:exportHomeWorkV="exportHomeWorkV" v-model:exportHomeWorkV="exportHomeWorkV"
:downloadUrl="downloadUrl" :downloadUrl="downloadUrl"
@@ -138,10 +146,12 @@ import CommonImport from "@/components/common/CommonImport";
import CheckAnsware from "../CheckAnsware.vue"; import CheckAnsware from "../CheckAnsware.vue";
import {batchSendMessage} from "@/api/index1"; import {batchSendMessage} from "@/api/index1";
import ExportHomeWork from "@/components/Modals/ExportHomeWork.vue"; import ExportHomeWork from "@/components/Modals/ExportHomeWork.vue";
import CKWork from "../CheckWork.vue";
const coursePlanIndex = ref(0); const coursePlanIndex = ref(0);
const tableRef = ref(); const tableRef = ref();
const CAvisible = ref(false); const CAvisible = ref(false);
const CWvisible = ref(false);
const exportHomeWorkV = ref(false); const exportHomeWorkV = ref(false);
const downloadUrl = ref(); const downloadUrl = ref();
const emit = defineEmits([]); const emit = defineEmits([]);
@@ -192,7 +202,8 @@ const { data = [], loading, fetchData } = useRequest(COURSE_PLAN_LIST, planParam
const offcoursePlanId = computed(() => data.value[coursePlanIndex.value]?.id || ""); const offcoursePlanId = computed(() => data.value[coursePlanIndex.value]?.id || "");
const homeWorkId = computed(() => data.value[coursePlanIndex.value]?.homeWorkId || ""); const homeWorkId = computed(() => data.value[coursePlanIndex.value]?.homeWorkId || "");
const infoId = computed(() => props.type === 1 ? props.datasource.projectId : props.datasource.routerId); const infoId = computed(() => props.type === 1 ? props.datasource.projectId : props.datasource.routerId);
const scoreTemplateUrl = ref(`${process.env.VUE_APP_BASE_API}/admin/student/exportHomeWorkTemplate?taskId=0&type=3&pid=${offcoursePlanId.value}&thirdType=3`); const scoreTemplateUrl = computed(() => `${process.env.VUE_APP_BASE_API}/admin/student/exportHomeWorkTemplate?taskId=0&type=3&pid=${offcoursePlanId.value}&thirdType=3`);
const stuId = ref("");
const columns = ref([ const columns = ref([
{ {
title: "工号", title: "工号",
@@ -242,7 +253,7 @@ const columns = ref([
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: ({ record: { workScore } }) => <span> {workScore!==-2?workScore:"-" || "-"}</span> customRender: ({ record: { workScore } }) => <span> {workScore !== -2 ? workScore : "-" || "-"}</span>
}, },
{ {
title: "考试成绩", title: "考试成绩",
@@ -284,12 +295,56 @@ const columns = ref([
className: "h", className: "h",
dataIndex: "opacation", dataIndex: "opacation",
key: "opacation", key: "opacation",
width: 50, width: 100,
align: "center", align: "center",
customRender: (text) => <div class="opa" onClick={() => showExamAnswer(text)}>{data.value[coursePlanIndex.value]?.answerId ? "查看答卷" : ""}</div> customRender: (text) => {
return (
<div style="display:flex;justify-content:center;">
<a
class="opa"
style="margin-right:12px;"
onClick={() => {
showExamAnswer(text);
}}>
{text.record.answerId ? "查看答卷" : ""}
</a>
{
text.record.answerId ?
<a
class="opa"
style="margin-right:12px;"
onClick={() => {
showExamAnswer(text);
}}>
查看答卷
</a>
: <div
class="opa"
style="margin-right:12px;color:#666">
查看答卷
</div>
}
{
text.record.workScore == 1 ?
<a
class="opa"
onClick={() => {
showCWvisible(text.record.studentId);
}}>
查看作业
</a>
: <div
class="opa"
style="color:#666;">
查看作业
</div>
}
</div>);
}
}, },
]); ]);
watch(() => data.value.length, () => { watch(() => data.value, () => {
params.value.pid = data.value[coursePlanIndex.value]?.id || 0; params.value.pid = data.value[coursePlanIndex.value]?.id || 0;
tableRef.value.fetch(); tableRef.value.fetch();
}); });
@@ -328,6 +383,11 @@ const showExamAnswer = () => {
CAvisible.value = true; CAvisible.value = true;
}; };
const showCWvisible = (id) => {
stuId.value = id;
CWvisible.value = true;
};
const searchTaskList = () => tableRef.value.fetch(); const searchTaskList = () => tableRef.value.fetch();
const exportTaskData = () => window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=3&pid=${offcoursePlanId.value}&thirdType=2`); const exportTaskData = () => window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?type=3&pid=${offcoursePlanId.value}&thirdType=2`);
@@ -347,7 +407,7 @@ function exportTaskStu() {
const hasten = () => { const hasten = () => {
message.success("催促成功"); message.success("催促成功");
console.log(data.value[coursePlanIndex.value]) console.log(data.value[coursePlanIndex.value]);
batchSendMessage({ batchSendMessage({
// courseId: props.datasource.courseId,//任务的Id // courseId: props.datasource.courseId,//任务的Id
courseId: data.value[coursePlanIndex.value].id,//任务的Id courseId: data.value[coursePlanIndex.value].id,//任务的Id
@@ -376,6 +436,13 @@ function resetStudentPage() {
} }
} }
.RouterFaceStu {
.ant-drawer-content-wrapper {
min-width: 1200px !important;
width: 1200px !important;
}
}
.CopyModal { .CopyModal {
.ant-modal { .ant-modal {
width: 424px !important; width: 424px !important;

View File

@@ -287,7 +287,8 @@ const columns = ref([
]); ]);
const { data = [], loading, fetchData } = useRequest(COURSE_PLAN_LIST, planParams, false); const { data = [], loading, fetchData } = useRequest(COURSE_PLAN_LIST, planParams, false);
watch(() => data.value.length, () => { watch(() => data.value, () => {
coursePlanIndex.value = 0
params.value.pid = data.value[coursePlanIndex.value]?.id || 0; params.value.pid = data.value[coursePlanIndex.value]?.id || 0;
tableRef.value.fetch(); tableRef.value.fetch();
}); });
@@ -359,7 +360,7 @@ function exportTaskStu() {
} }
function afterVisibleChange(bool) { function afterVisibleChange(bool) {
bool && fetchData(); bool && fetchData()
} }
function resetStudentPage() { function resetStudentPage() {
@@ -371,7 +372,7 @@ const qrcodeVisible = () => {
qrCode({ qrCode({
title: "【签到】二维码", title: "【签到】二维码",
name: props.datasource?.name, name: props.datasource?.name,
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}&type=${props.type}`, url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${props.datasource.id}&taskType=${props.datasource.type}&type=${props.type}`,
}); });
}; };

View File

@@ -1742,7 +1742,7 @@ import AddHomework from "../../components/drawers/CommonHomework.vue";
import AddTest from "../../components/drawers/CommonTest.vue"; import AddTest from "../../components/drawers/CommonTest.vue";
import TableStudent from "@/components/student/TableStudent"; import TableStudent from "@/components/student/TableStudent";
import FJUpload from "@/components/common/FJUpload"; import FJUpload from "@/components/common/FJUpload";
import { updateStudent } from "@/api/indexProjStu"; import {auditStudentStatus} from "@/api/indexProjStu";
import { useStore } from "vuex"; import { useStore } from "vuex";
import DropDown from "@/components/common/DropDown"; import DropDown from "@/components/common/DropDown";
import { checkPer, checkOwner } from "@/utils/utils"; import { checkPer, checkOwner } from "@/utils/utils";
@@ -4879,7 +4879,7 @@ export default defineComponent({
}; };
function auditStudent(record) { function auditStudent(record) {
updateStudent(record); auditStudentStatus(record);
} }
//二维码 //二维码

View File

@@ -458,7 +458,7 @@
<div class="time"> <div class="time">
<div class="timetext">开始时间</div> <div class="timetext">开始时间</div>
<div class="timetext"> <div class="timetext">
{{ item.startTime !== null ? item.startTime : "-" }} {{ item.type==2 ? item.createTime !== null ? item.createTime : "-" : item.startTime !== null ? item.startTime : "-" }}
</div> </div>
</div> </div>
<div class="progress"> <div class="progress">
@@ -2666,13 +2666,16 @@ export default {
// if (date1 < date2) return message.warning("当前面授课已结束"); // if (date1 < date2) return message.warning("当前面授课已结束");
// if (item.taskStatus == 1 || item.taskStatus == 2) // if (item.taskStatus == 1 || item.taskStatus == 2)
// return message.error("该任务无法学习,请联系管理员进行替换。"); // return message.error("该任务无法学习,请联系管理员进行替换。");
codeUrl =
window.location.protocol + // codeUrl =
process.env.VUE_APP_H5 + // window.location.protocol +
"/faceteach?type=2&courseId=" + // process.env.VUE_APP_H5 +
item.courseId + // "/faceteach?type=2&courseId=" +
"&id=" + // item.courseId +
item.id; // "&id=" +
// item.id;
codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/pathdetails?routerId=" + state.routerId;
} }
if (item.type == 3) return message.error("请在pc端完成"); if (item.type == 3) return message.error("请在pc端完成");

View File

@@ -288,8 +288,8 @@
开课 开课
</span> </span>
<span <span
v-if="!element.routerTaskId"
style="color: #4ea6ff;cursor: pointer;" style="color: #4ea6ff;cursor: pointer;"
:style="{marginRight:element.type===2?`6px`:`25px`,marginLeft:element.type===2?`6px`:`0px`}"
@click="editTaskForType(element,index)"> @click="editTaskForType(element,index)">
编辑 编辑
</span> </span>

View File

@@ -258,8 +258,8 @@
开课 开课
</span> </span>
<span <span
v-if="!element.projectTaskId"
style="color: #4ea6ff;cursor: pointer;" style="color: #4ea6ff;cursor: pointer;"
:style="{marginRight:element.type==2?6+'px':25+'px',marginLeft:element.type==2?6+'px':0+'px'}"
@click="editTaskForType(element,index)"> @click="editTaskForType(element,index)">
编辑 编辑
</span> </span>

View File

@@ -587,7 +587,7 @@
<div class="time"> <div class="time">
<div class="timetext">开始时间</div> <div class="timetext">开始时间</div>
<div class="timetext"> <div class="timetext">
{{ item.startTime !== null ? item.startTime : "-" }} {{ item.type==2 ? item.createTime !== null ? item.createTime : "-" : item.startTime !== null ? item.startTime : "-" }}
</div> </div>
</div> </div>
<div class="progress"> <div class="progress">
@@ -4614,13 +4614,15 @@ export default {
item.courseId; item.courseId;
} }
if (item.type == 2) { if (item.type == 2) {
codeUrl = // codeUrl =
window.location.protocol + // window.location.protocol +
process.env.VUE_APP_H5 + // process.env.VUE_APP_H5 +
"/faceteach?type=1&courseId=" + // "/faceteach?type=1&courseId=" +
item.courseId + // item.courseId +
"&id=" + // "&id=" +
item.id; // item.id;
codeUrl = window.location.protocol + process.env.VUE_APP_H5 + "/projectdetails?type=1&projectId=" + state.projectId;
} }
if (item.type == 3) return message.error("请在pc端完成"); if (item.type == 3) return message.error("请在pc端完成");
if (item.type == 4) { if (item.type == 4) {