diff --git a/.env b/.env index f998fe9d..c9eb2d7b 100644 --- a/.env +++ b/.env @@ -33,4 +33,4 @@ VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= #考试 VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id= #h5的基本url -VUE_APP_H5=//u-pre.boe.com/mobile/student-h5 +VUE_APP_H5=//u-pre.boe.com/student-h5 diff --git a/src/components/drawers/ActiveAttendance.vue b/src/components/drawers/ActiveAttendance.vue index 27282fde..362b5dd4 100644 --- a/src/components/drawers/ActiveAttendance.vue +++ b/src/components/drawers/ActiveAttendance.vue @@ -1,32 +1,46 @@ @@ -219,7 +278,7 @@ export default { name: "ActiveAttendance", components: { SignQR, - TwoDimensionalCode + TwoDimensionalCode, }, props: { AAvisible: { @@ -239,7 +298,7 @@ export default { types: { type: Number, default: null, - } + }, }, setup(props, ctx) { @@ -267,7 +326,7 @@ export default { id: 2, value: "2", label: "请假", - } + }, ], projectNameList2: [ { @@ -279,7 +338,7 @@ export default { id: 2, value: "2", label: "异常", - } + }, ], selectedRowKeys: [], tableData: [ @@ -295,7 +354,7 @@ export default { signIn: false, //签到 signOut: false, //签退 leave: false, //请假 - } + }, ], options: [ { @@ -393,9 +452,12 @@ export default { const getTableData = () => { // debugger - console.log('当前是项目还是路径图 1 项目 2 路径图', props) - console.log('当前是项目还是路径图 1 项目 2 路径图', props.types) - if (props.datasource.type == 6 && props.types == 2 || props.datasource.type == 9 && props.types == 2) { + console.log("当前是项目还是路径图 1 项目 2 路径图", props); + console.log("当前是项目还是路径图 1 项目 2 路径图", props.types); + if ( + (props.datasource.type == 6 && props.types == 2) || + (props.datasource.type == 9 && props.types == 2) + ) { // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 console.log("我是传递的查询参数", { pageNo: state.currentPage, @@ -414,7 +476,7 @@ export default { pageNo: state.currentPage, pageSize: state.pageSize, currentStageId: props.datasource.chapterId, - type: 2, // 1项目 2 路径 + type: 2, // 1项目 2 路径 pid: props.datasource.routerId, taskId: props.datasource.id, taskType: props.datasource.type, @@ -425,10 +487,11 @@ export default { .then((res) => { console.log(res); if (res.status == 200) { - let keyarr = [] + let keyarr = []; for (let i = 0; i < res.data.data.records.length; i++) { - res.data.data.records[i].key = res.data.data.records[i].studentId - keyarr.push(res.data.data.records[i]) + res.data.data.records[i].key = + res.data.data.records[i].studentId; + keyarr.push(res.data.data.records[i]); } state.tableData = keyarr; state.tableDataTotal = res.data.data.total; @@ -440,7 +503,10 @@ export default { state.tableDataTotalLoading = false; state.tableData = []; }); - } else if (props.datasource.type == 6 && props.types == 1 || props.datasource.type == 9 && props.types == 1) { + } else if ( + (props.datasource.type == 6 && props.types == 1) || + (props.datasource.type == 9 && props.types == 1) + ) { // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 console.log("我是传递的查询参数", { pageNo: state.currentPage, @@ -452,28 +518,29 @@ export default { taskType: props.datasource.type, status: state.projectName, studentName: state.name, - signStatus: state.projectName2 + signStatus: state.projectName2, }); api .AssessmentManagementMessage({ pageNo: state.currentPage, pageSize: state.pageSize, currentStageId: props.datasource.stageId, - type: 1, // 1项目 2 路径 + type: 1, // 1项目 2 路径 pid: props.datasource.projectId, taskId: props.datasource.id, taskType: props.datasource.type, status: state.projectName, studentName: state.name, - signStatus: state.projectName2 + signStatus: state.projectName2, }) .then((res) => { console.log(res); if (res.status == 200) { - let keyarr = [] + let keyarr = []; for (let i = 0; i < res.data.data.records.length; i++) { - res.data.data.records[i].key = res.data.data.records[i].studentId - keyarr.push(res.data.data.records[i]) + res.data.data.records[i].key = + res.data.data.records[i].studentId; + keyarr.push(res.data.data.records[i]); } state.tableData = keyarr; state.tableDataTotal = res.data.data.total; @@ -538,7 +605,7 @@ export default { taskType: Number(props.datasource.type), type: 1, }; - console.log(obj) + console.log(obj); state.tableDataTotalLoading = true; api @@ -571,7 +638,10 @@ export default { customRender: (text) => { return (
- {text.record.studentUserNo ? text.record.studentUserNo : "-"} + + {" "} + {text.record.studentUserNo ? text.record.studentUserNo : "-"} +
); }, @@ -587,7 +657,10 @@ export default { customRender: (text) => { return (
- {text.record.studentName ? text.record.studentName : "-"} + + {" "} + {text.record.studentName ? text.record.studentName : "-"} +
); }, @@ -603,7 +676,12 @@ export default { customRender: (text) => { return (
- {text.record.studentDepartName ? text.record.studentDepartName : "-"} + + {" "} + {text.record.studentDepartName + ? text.record.studentDepartName + : "-"} +
); }, @@ -619,7 +697,12 @@ export default { customRender: (text) => { return (
- {text.record.studentJobName ? text.record.studentJobName : "-"} + + {" "} + {text.record.studentJobName + ? text.record.studentJobName + : "-"} +
); }, @@ -634,7 +717,10 @@ export default { customRender: (text) => { return (
- {text.record.signTime ? text.record.signTime : "-"} + + {" "} + {text.record.signTime ? text.record.signTime : "-"} +
); }, @@ -654,8 +740,8 @@ export default { {text.record.signStatus ? "签到" : text.record.leaveStatus - ? "请假" - : "-"} + ? "请假" + : "-"} ); @@ -671,7 +757,18 @@ export default { customRender: (text) => { return (
- {text.record.signStatus == null && new Date().getTime() > new Date(state.endTime).getTime() ? "异常" : text.record.signStatus ? "正常" : text.record.leaveStatus ? "异常" : text.record.signStatus == null ? "-" : "异常"} + + {text.record.signStatus == null && + new Date().getTime() > new Date(state.endTime).getTime() + ? "异常" + : text.record.signStatus + ? "正常" + : text.record.leaveStatus + ? "异常" + : text.record.signStatus == null + ? "-" + : "异常"} +
); }, @@ -685,15 +782,23 @@ export default { align: "center", customRender: (value) => { return ( -
+
{ - {/* debugger */ } + { + /* debugger */ + } console.log("点击签到", value); // 获取当前时间 - {/* showsingleqdModal(); */ } - {/* AttendanceSign */ } - + { + /* showsingleqdModal(); */ + } + { + /* AttendanceSign */ + } let obj1 = { courseId: Number(props.datasource.courseId), @@ -713,33 +818,42 @@ export default { type: 2, }; // 1是项目 2路径图 3开课 - console.log(obj1, obj2) + console.log(obj1, obj2); state.tableDataTotalLoading = true; - api.AttendanceSign(props.types === '1' ? obj1 : obj2).then(res => { - console.log('res----签到是否成功', res) - message.destroy() - message.info('签到成功') - getTableData(); - }).catch(err => { - state.tableDataTotalLoading = false; - console.log(err) - }) + api + .AttendanceSign(props.types === "1" ? obj1 : obj2) + .then((res) => { + console.log("res----签到是否成功", res); + message.destroy(); + message.info("签到成功"); + getTableData(); + }) + .catch((err) => { + state.tableDataTotalLoading = false; + console.log(err); + }); }} - style="display:flex;justify-content:center;align-items:center;margin-right:12px;cursor:pointer;"> - {value.record.signStatus ? -
-
-
: -
- } + style="display:flex;justify-content:center;align-items:center;margin-right:12px;cursor:pointer;" + > + {value.record.signStatus ? ( +
+
+
+ ) : ( +
+ )}
签到
{ console.log("点击请假", value); - {/* showsingleqjModal(); */ } + { + /* showsingleqjModal(); */ + } - {/* AttendanceLeave */ } + { + /* AttendanceLeave */ + } let obj = { courseId: Number(props.datasource.courseId), routerId: Number(props.datasource.routerId), @@ -756,30 +870,35 @@ export default { taskType: Number(props.datasource.type), type: 2, }; - console.log(obj, obj2) + console.log(obj, obj2); state.tableDataTotalLoading = true; - api.AttendanceLeave(props.types == 1 ? obj : obj2).then(res => { - console.log('res----请假是否成功', res) - message.destroy() - message.info('请假成功') - getTableData(); - }).catch(err => { - state.tableDataTotalLoading = false; - console.log(err) - }) + api + .AttendanceLeave(props.types == 1 ? obj : obj2) + .then((res) => { + console.log("res----请假是否成功", res); + message.destroy(); + message.info("请假成功"); + getTableData(); + }) + .catch((err) => { + state.tableDataTotalLoading = false; + console.log(err); + }); }} - style="display:flex;justify-content:center;align-items:center;cursor:pointer;"> - {value.record.leaveStatus ? -
-
-
: -
- } + style="display:flex;justify-content:center;align-items:center;cursor:pointer;" + > + {value.record.leaveStatus ? ( +
+
+
+ ) : ( +
+ )}
请假
- ) - } + ); + }, }, ]; return columns; @@ -791,9 +910,9 @@ export default { }; const showqdModal = () => { if (state.selectedStudents.length == 0) { - message.destroy() - message.error('请选择学员') - return + message.destroy(); + message.error("请选择学员"); + return; } state.qdModal = true; }; @@ -820,14 +939,16 @@ export default { state.singleqjModal = false; }; const signQR = () => { + console.log("props.datasource", props.datasource); state.codevisible = true; state.codeInfo = { title: "【签到】二维码", name: props.datasource?.name, url: process.env.VUE_APP_BASE_API + - `/admin/student/studentSign?taskId=${props.datasource.id - }&taskType=${props.datasource.type}&type=${2}`, + `/admin/student/studentSign?taskId=${props.datasource.id}&taskType=${ + props.datasource.type + }&type=${2}`, }; console.log("codeInfo", state.codeInfo); state.codeIndex = 0; @@ -855,20 +976,21 @@ export default { // 导出数据 function exportTaskStu() { - {/* debugger */ } - console.log("props.datasource此处的taskId 应该是router_task 表中主键", props.datasource); + { + /* debugger */ + } + console.log( + "props.datasource此处的taskId 应该是router_task 表中主键", + props.datasource + ); console.log("props.datasource", props.datasource); if (props.types == 2) { window.open( - `${process.env.VUE_APP_BASE_API - }/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId - }&type=2&pid=${props.datasource.routerId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` + `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=2&pid=${props.datasource.routerId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` ); } else { window.open( - `${process.env.VUE_APP_BASE_API - }/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId - }&type=1&pid=${props.datasource.projectId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` + `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=1&pid=${props.datasource.projectId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}` ); } @@ -911,7 +1033,7 @@ export default { batchSign, searchTaskList, resetTaskList, - exportTaskStu + exportTaskStu, }; }, }; @@ -1157,7 +1279,7 @@ export default { padding: 0px !important; } - .ant-table-thead>tr>th { + .ant-table-thead > tr > th { background-color: rgba(239, 244, 252, 1); } @@ -1165,7 +1287,11 @@ export default { background-color: #eff4fc !important; } - .ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td { + .ant-table-tbody + > tr:hover:not(.ant-table-expanded-row):not( + .ant-table-row-selected + ) + > td { background: #f6f9fd; } } diff --git a/src/components/student/TableModelStudent.vue b/src/components/student/TableModelStudent.vue index 5662b73e..5eccfd9a 100644 --- a/src/components/student/TableModelStudent.vue +++ b/src/components/student/TableModelStudent.vue @@ -96,11 +96,42 @@
+ + + +
+
+
+
+
+ 提示 +
+
+
+ 确定删除? + 数据删除后不可恢复! +
+
+
+
取消
+
+
+
确定
+
+
+
+
+