mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -31,13 +31,35 @@
|
||||
name="uploadFile"
|
||||
:multiple="false"
|
||||
@change="handleChange"
|
||||
:data=" courseType==1?{
|
||||
stageId: Number(courseId),
|
||||
type: 3
|
||||
}:{
|
||||
targetId: Number(courseId),
|
||||
type: 3
|
||||
}"
|
||||
:data="
|
||||
courseType == 1
|
||||
? {
|
||||
targetId: Number(courseId),
|
||||
type: 3,
|
||||
userId: userId,
|
||||
userName: userName,
|
||||
}
|
||||
: courseType == 3
|
||||
? {
|
||||
targetId: Number(courseId),
|
||||
type: 1,
|
||||
userId: userId,
|
||||
userName: userName,
|
||||
}
|
||||
: courseType == 4
|
||||
? {
|
||||
targetId: Number(courseId),
|
||||
type: 2,
|
||||
userId: userId,
|
||||
userName: userName,
|
||||
}
|
||||
: {
|
||||
targetId: Number(courseId),
|
||||
type: 3,
|
||||
userId: userId,
|
||||
userName: userName,
|
||||
}
|
||||
"
|
||||
:showUploadList="false"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
@@ -53,33 +75,61 @@
|
||||
<div class="tipz">支持扩展名:.xls/.xlsx</div>
|
||||
</div> -->
|
||||
<div class="loadstate">
|
||||
|
||||
<div v-if="uploadpercent!==-1" class="loadborder">
|
||||
<div v-if="uploadpercent !== -1" class="loadborder">
|
||||
<div class="content">
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">京东方商业模型.xls</div>
|
||||
<div v-if="uploadErr" class="stateloading" style="color:red;">上传失败</div>
|
||||
<div v-else class="stateloading">{{uploadpercent==100?"上传成功":"正在上传"}}</div>
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div
|
||||
v-if="uploadErr"
|
||||
class="stateloading"
|
||||
style="color: red"
|
||||
>
|
||||
上传失败
|
||||
</div>
|
||||
<div v-else class="stateloading">
|
||||
{{ uploadpercent == 100 ? "上传成功" : "正在上传" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="prog">
|
||||
<div class="inprogloading" :style="{width:uploadpercent==-1?0:uploadpercent+'%', background:uploadErr?'#ff7474':'#35ae69'}"></div>
|
||||
<div
|
||||
class="inprogloading"
|
||||
:style="{
|
||||
width: uploadpercent == -1 ? 0 : uploadpercent + '%',
|
||||
background: uploadErr ? '#ff7474' : '#35ae69',
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="curloading">
|
||||
<div class="cur">{{uploadpercent==-1?0:uploadpercent}}%</div>
|
||||
<div class="cancel" style="margin-left: 20px;cursor: pointer;" @click="removeUpload">删除</div>
|
||||
<div class="cur">
|
||||
{{ uploadpercent == -1 ? 0 : uploadpercent }}%
|
||||
</div>
|
||||
<div
|
||||
class="cancel"
|
||||
style="margin-left: 20px; cursor: pointer"
|
||||
@click="removeUpload"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
<div class="cancel" style="margin-left: 15px"></div>
|
||||
</div>
|
||||
<div v-if="errNum!==0" class="defeat">
|
||||
<div class="detext" @click="downloadEeeorData">下载失败数据</div>
|
||||
<div v-if="errNum !== 0" class="defeat">
|
||||
<div class="detext" @click="downloadEeeorData">
|
||||
下载失败数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showBottomBar" :class="errNum==0?'succebox':'defeatbox'">
|
||||
<div
|
||||
v-if="showBottomBar"
|
||||
:class="errNum == 0 ? 'succebox' : 'defeatbox'"
|
||||
>
|
||||
<div class="lefimg"></div>
|
||||
<div class="tacl">{{succNum}}条数据导入成功,{{errNum}}条数据导入失败</div>
|
||||
<div class="tacl">
|
||||
{{ succNum }}条数据导入成功,{{ errNum }}条数据导入失败
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="loadborder">
|
||||
@@ -87,7 +137,7 @@
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">京东方商业模型.xls</div>
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="statedefeat">上传失败</div>
|
||||
</div>
|
||||
<div class="prog">
|
||||
@@ -113,7 +163,7 @@
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">京东方商业模型.xls</div>
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="statesucce">上传成功</div>
|
||||
</div>
|
||||
<div class="prog">
|
||||
@@ -151,6 +201,7 @@ import { reactive, toRefs } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { BATCH_IMPORT_SCORE } from "@/api/config";
|
||||
import { useStore } from "vuex";
|
||||
export default {
|
||||
name: "ImpStu",
|
||||
props: {
|
||||
@@ -168,21 +219,32 @@ export default {
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
template: process.env.VUE_APP_TEMPLATE + "导入学员模版-1672998102528.xlsx",
|
||||
importStudent: process.env.VUE_APP_BASE_API + "admin/student/importStudent",
|
||||
template:
|
||||
process.env.VUE_APP_TEMPLATE + "导入学员模版-1672998102528.xlsx",
|
||||
importStudent:
|
||||
process.env.VUE_APP_BASE_API + "admin/student/importStudent",
|
||||
timers: "", // 定时器,用于清空定时器使用
|
||||
isAddStudent: false, // 用于判断用户是否关闭弹框需要重新获取学员列表
|
||||
uploadpercent: -1,
|
||||
uploadErr: false, //上传失败
|
||||
addLoading: false,
|
||||
fileList: [],
|
||||
fileList: [],
|
||||
succNum: 0, //成功数据数
|
||||
errNum: 0, //失败数据数
|
||||
downloadErrUrl: '',
|
||||
downloadErrUrl: "",
|
||||
showBottomBar: false, // 显示底部成功条数和失败条数
|
||||
locationHref: location.href.indexOf('http://') !== -1 ? 'http://111.231.196.214:12016/' : location.href.slice(0, location.href.indexOf('/m')) + '/upload/'
|
||||
locationHref:
|
||||
location.href.indexOf("http://") !== -1
|
||||
? "http://111.231.196.214:12016/"
|
||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||
|
||||
userId: store.state.userInfo.id,
|
||||
userName: store.state.userInfo.realName,
|
||||
fileName: "",
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
clearInterval(state.timers);
|
||||
state.fileList = [];
|
||||
@@ -201,19 +263,20 @@ export default {
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
console.log("store", store.state.userInfo);
|
||||
};
|
||||
//上传文件
|
||||
const handleChange = (info) => {
|
||||
console.log("info", info);
|
||||
|
||||
if(info){
|
||||
var FileExt = info.file.name.replace(/.+\./, "");
|
||||
if (['xls','xlsx'].indexOf(FileExt.toLowerCase()) === -1){
|
||||
if (info) {
|
||||
var FileExt = info.file.name.replace(/.+\./, "");
|
||||
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
message.destroy()
|
||||
message.error("请上传正确的文件格式")
|
||||
return
|
||||
state.uploadpercent = -1;
|
||||
message.destroy();
|
||||
message.error("请上传正确的文件格式");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,59 +289,59 @@ export default {
|
||||
console.log(info.file, info.fileList);
|
||||
}
|
||||
if (status === "done") {
|
||||
console.log('上传成功返回的UUID', info.file.response.data)
|
||||
console.log('上传成功返回的UUID----->', info)
|
||||
console.log("上传成功返回的UUID", info.file.response.data);
|
||||
console.log("上传成功返回的UUID----->", info);
|
||||
console.log("我是导入学员接口传递的参数", {
|
||||
uploadFile: info.file.originFileObj,
|
||||
targetId: props.courseId,
|
||||
type: 3
|
||||
})
|
||||
type: 3,
|
||||
});
|
||||
state.fileName = info.file.name;
|
||||
let i = 0;
|
||||
state.timers = setInterval(() => {
|
||||
let uid = info.file.response.data;
|
||||
api
|
||||
.getImportStatus(uid)
|
||||
.then((res) => {
|
||||
console.log("查询导入状态", res);
|
||||
if (res.data.code === 200) {
|
||||
if (res.data.data.status !== "START") {
|
||||
i++;
|
||||
if (i === 1) {
|
||||
message.destroy();
|
||||
message.success(`${info.file.name}上传成功`);
|
||||
state.showBottomBar = true;
|
||||
state.addLoading = false;
|
||||
state.isAddStudent = true;
|
||||
}
|
||||
state.succNum = res.data.data.successNum;
|
||||
state.errNum = res.data.data.failedNum;
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
clearInterval(state.timers);
|
||||
let uid = info.file.response.data;
|
||||
api
|
||||
.getImportStatus(uid)
|
||||
.then((res) => {
|
||||
console.log("查询导入状态", res);
|
||||
if (res.data.code === 200) {
|
||||
if (res.data.data.status !== "START") {
|
||||
i++;
|
||||
if (i === 1) {
|
||||
message.destroy();
|
||||
message.success(`${info.file.name}上传成功`);
|
||||
state.showBottomBar = true;
|
||||
state.addLoading = false;
|
||||
state.isAddStudent = true;
|
||||
}
|
||||
state.succNum = res.data.data.successNum;
|
||||
state.errNum = res.data.data.failedNum;
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
clearInterval(state.timers);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
clearInterval(state.timers);
|
||||
state.showBottomBar = true;
|
||||
state.addLoading = false;
|
||||
console.log("查询导入状态失败", err);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
clearInterval(state.timers);
|
||||
state.showBottomBar = true;
|
||||
state.addLoading = false;
|
||||
console.log("查询导入状态失败", err);
|
||||
});
|
||||
}, 500);
|
||||
} else if (status === "error") {
|
||||
state.addLoading = false;
|
||||
state.uploadErr = true;
|
||||
message.error(`${info.file.name}上传失败`);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// 下载失败数据
|
||||
const downloadEeeorData = () => {
|
||||
console.log(state.locationHref + state.downloadErrUrl)
|
||||
if(state.downloadErrUrl!==""){
|
||||
window.open(state.locationHref + state.downloadErrUrl)
|
||||
console.log(state.locationHref + state.downloadErrUrl);
|
||||
if (state.downloadErrUrl !== "") {
|
||||
window.open(state.locationHref + state.downloadErrUrl);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//删除
|
||||
const removeUpload = () => {
|
||||
@@ -301,7 +364,7 @@ export default {
|
||||
handleChange,
|
||||
BATCH_IMPORT_SCORE,
|
||||
downloadEeeorData,
|
||||
removeUpload
|
||||
removeUpload,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
:showUploadList="false"
|
||||
:data="{
|
||||
type: type,
|
||||
targetid: Number(id),
|
||||
targetId: Number(id),
|
||||
}"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
@@ -60,7 +60,7 @@
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">京东方商业模型.xls</div>
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="stateloading">正在上传</div>
|
||||
</div>
|
||||
<a-progress :percent="uploadpercent" />
|
||||
@@ -80,7 +80,7 @@
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">京东方商业模型.xls</div>
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="statedefeat">上传失败</div>
|
||||
</div>
|
||||
<a-progress :percent="uploadpercent" />
|
||||
@@ -115,7 +115,7 @@
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">京东方商业模型.xls</div>
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="statesucce">上传成功</div>
|
||||
</div>
|
||||
<a-progress :percent="uploadpercent" />
|
||||
@@ -191,6 +191,7 @@ import { reactive, toRefs } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { BATCH_IMPORT_SCORE } from "@/api/config";
|
||||
import { useStore } from "vuex";
|
||||
export default {
|
||||
name: "EScore",
|
||||
props: {
|
||||
@@ -213,6 +214,7 @@ export default {
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
const state = reactive({
|
||||
fileType: ["xls", "xlsx"],
|
||||
importHomeWork:
|
||||
@@ -228,6 +230,9 @@ export default {
|
||||
location.href.indexOf("http://") !== -1
|
||||
? "http://111.231.196.214:12016/"
|
||||
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
|
||||
userId: store.state.userInfo.id,
|
||||
userName: store.state.userInfo.realName,
|
||||
fileName: "",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:eScorevisible", false);
|
||||
@@ -261,6 +266,7 @@ export default {
|
||||
// console.log(info.file, info.fileList);
|
||||
}
|
||||
if (status === "done") {
|
||||
state.fileName = info.file.name;
|
||||
let i = 0;
|
||||
let timer = setInterval(() => {
|
||||
let uid = info.file.response.data;
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="endtime" style="margin-left: 64px">签到时间:14:00</div>
|
||||
<div class="endtime" style="margin-left: 64px">
|
||||
签到时间:{{ beginTime }}~{{ endTime }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
@@ -234,6 +236,7 @@ import SignQR from "../SignQR.vue";
|
||||
import * as api from "../../../api/index1";
|
||||
import TwoDimensionalCode from "../../../components/TwoDimensionalCode";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../../api/method";
|
||||
export default {
|
||||
name: "FaceManage",
|
||||
components: {
|
||||
@@ -341,10 +344,13 @@ export default {
|
||||
codeIndex: null,
|
||||
codeInfo: null, //二维码内容
|
||||
// selectOption: [],
|
||||
beginTime: null, //签到开始时间
|
||||
endTime: null, //签到结束时间
|
||||
});
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getStudent();
|
||||
isSignClick();
|
||||
}
|
||||
};
|
||||
//考勤
|
||||
@@ -395,7 +401,8 @@ export default {
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj, (res) => {
|
||||
.attendanceSign(obj)
|
||||
.then((res) => {
|
||||
console.log("签到结果", res, obj);
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
@@ -565,12 +572,19 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "签到时间",
|
||||
dataIndex: "cur",
|
||||
key: "cur",
|
||||
dataIndex: "signTime",
|
||||
key: "signTime",
|
||||
width: 110,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signTime ? text.record.signTime : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "签退时间",
|
||||
@@ -582,21 +596,42 @@ export default {
|
||||
// },
|
||||
{
|
||||
title: "考勤",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
// console.log("text", text);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.signStatus
|
||||
? "签到"
|
||||
: text.record.leaveStatus
|
||||
? "请假"
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
dataIndex: "state",
|
||||
key: "state",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signStatus ? "正常" : "异常"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考勤情况",
|
||||
@@ -614,7 +649,7 @@ export default {
|
||||
<a-radio-group name="radioGroup">
|
||||
<a-radio
|
||||
value="1"
|
||||
checked={text.record.signIn}
|
||||
checked={text.record.signStatus}
|
||||
onChange={(e) => {
|
||||
console.log("点击签到", e);
|
||||
let obj = {
|
||||
@@ -629,15 +664,17 @@ export default {
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj, (res) => {
|
||||
.attendanceSign(obj)
|
||||
.then((res) => {
|
||||
console.log("签到结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.signIn = true;
|
||||
text.record.signStatus = true;
|
||||
getStudent();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("签到失败", err, obj);
|
||||
text.record.signIn = false;
|
||||
text.record.signStatus = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -645,7 +682,7 @@ export default {
|
||||
</a-radio>
|
||||
<a-radio
|
||||
value="2"
|
||||
checked={text.record.leave}
|
||||
checked={text.record.leaveStatus}
|
||||
onChange={(e) => {
|
||||
console.log("点击请假", e, props.datasource);
|
||||
let obj = {
|
||||
@@ -659,15 +696,17 @@ export default {
|
||||
type: 1,
|
||||
};
|
||||
api
|
||||
.attendanceLeave(obj, (res) => {
|
||||
.attendanceLeave(obj)
|
||||
.then((res) => {
|
||||
console.log("请假结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.leave = true;
|
||||
text.record.leaveStatus = true;
|
||||
getStudent();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("请假结果", err, obj);
|
||||
text.record.leave = false;
|
||||
text.record.leaveStatus = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -855,7 +894,31 @@ export default {
|
||||
getStudent();
|
||||
}
|
||||
};
|
||||
// 计算签到时间
|
||||
const isSignClick = () => {
|
||||
let beginTime = new Date(props.datasource.startTime).getTime();
|
||||
let endTime = !props.datasource.afterStart
|
||||
? new Date(props.datasource.endTime).getTime()
|
||||
: new Date(props.datasource.beginTime).getTime();
|
||||
if (props.datasource.beforeStart && props.datasource.afterStart) {
|
||||
//有开始前有开始后
|
||||
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
|
||||
endTime = endTime + props.datasource.afterStart * 60 * 1000;
|
||||
console.log("1111");
|
||||
} else if (props.datasource.beforeStart && !props.datasource.afterStart) {
|
||||
//只有开始前无开始后
|
||||
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
|
||||
console.log("11112222");
|
||||
} else if (!props.datasource.beforeStart && props.datasource.afterStart) {
|
||||
//无开始前有开始后
|
||||
endTime = endTime + props.datasource.afterStart * 60 * 1000;
|
||||
console.log("1111333");
|
||||
}
|
||||
|
||||
state.beginTime = toDate(beginTime / 1000, "Y/M/D h:m:s");
|
||||
state.endTime = toDate(endTime / 1000, "Y/M/D h:m:s");
|
||||
console.log("beginTime,endTime", state.beginTime, state.endTime);
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<!-- <div class="btn btn1" style="margin-right: 20px" @click="godie">
|
||||
<!-- <div class="btn btn1" style="margin-right: 20px" @click="godie">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促学习</div>
|
||||
</div>
|
||||
@@ -76,8 +76,8 @@
|
||||
<div class="btn btn2" @click="allStuOver">
|
||||
<div class="wz">批量标注完成</div>
|
||||
</div>
|
||||
<div class="btn btn2">
|
||||
<div class="wz" @click="showEntryScore">批量录入成绩</div>
|
||||
<div class="btn btn2" @click="showEntryScore">
|
||||
<div class="wz">批量录入成绩</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="exportTaskStu">
|
||||
<div class="img2"></div>
|
||||
@@ -161,7 +161,12 @@
|
||||
v-model:getStudent="getStudent"
|
||||
/>
|
||||
<!-- 录入成绩抽屉 -->
|
||||
<entry-scores v-model:Evisible="Evisible" />
|
||||
<EScore
|
||||
v-model:eScorevisible="Evisible"
|
||||
:type="1"
|
||||
:id="projectTaskInfo?.projectTaskId"
|
||||
v-model:searchTaskList="searchTaskList"
|
||||
/>
|
||||
<!-- 查看作业抽屉 -->
|
||||
<CKWork v-model:CWvisible="CWvisible" />
|
||||
<!-- 查看答卷抽屉 -->
|
||||
@@ -180,14 +185,14 @@ import { message } from "ant-design-vue";
|
||||
import ASOver from "../AllStuOver.vue";
|
||||
import CKWork from "../CheckWork.vue";
|
||||
import CQue from "../CheckQue.vue";
|
||||
import EntryScores from "../EntryScores.vue";
|
||||
import EScore from "../ExportScore.vue";
|
||||
// import * as api from "../../../api/index";
|
||||
import * as api from "../../../api/index1";
|
||||
import ExportHomeWork from "../../Modals/ExportHomeWork.vue";
|
||||
export default {
|
||||
name: "ProjectFaceTaskManage",
|
||||
components: {
|
||||
EntryScores,
|
||||
EScore,
|
||||
CKWork,
|
||||
CQue,
|
||||
ASOver,
|
||||
|
||||
@@ -340,7 +340,7 @@ export default {
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7) {
|
||||
if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 3) {
|
||||
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
||||
console.log("我是传递的查询参数", {
|
||||
pageNo: state.currentPage,
|
||||
|
||||
@@ -343,7 +343,7 @@ export default {
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7) {
|
||||
if (props.datasource.type == 11 || props.datasource.type == 9 || props.datasource.type == 6 || props.datasource.type == 7 || props.datasource.type == 3) {
|
||||
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
|
||||
console.log("我是传递的查询参数", {
|
||||
pageNo: state.currentPage,
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
~
|
||||
{{ datasource && datasource.endTime ? datasource.endTime : "-" }}
|
||||
</div>
|
||||
<div class="endtime" style="margin-left: 64px">签到时间:14:00</div>
|
||||
<div class="endtime" style="margin-left: 64px">
|
||||
签到时间:{{ beginTime }}~{{ endTime }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
@@ -228,6 +230,7 @@ import SignQR from "../SignQR.vue";
|
||||
import * as api from "../../../api/index1";
|
||||
import TwoDimensionalCode from "../../../components/TwoDimensionalCode";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../../api/method";
|
||||
export default {
|
||||
name: "FaceManage",
|
||||
components: {
|
||||
@@ -335,10 +338,14 @@ export default {
|
||||
codeType: null,
|
||||
codeIndex: null,
|
||||
codeInfo: null, //二维码内容
|
||||
beginTime: null, //签到开始时间
|
||||
endTime: null, //签到结束时间
|
||||
});
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
getStudent();
|
||||
console.log("1111");
|
||||
isSignClick();
|
||||
}
|
||||
};
|
||||
//考勤
|
||||
@@ -388,7 +395,8 @@ export default {
|
||||
type: 2,
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj, (res) => {
|
||||
.attendanceSign(obj)
|
||||
.then((res) => {
|
||||
console.log("签到结果", res, obj);
|
||||
if (res.data.code === 200) {
|
||||
message.destroy();
|
||||
@@ -506,12 +514,19 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "签到时间",
|
||||
dataIndex: "cur",
|
||||
key: "cur",
|
||||
dataIndex: "signTime",
|
||||
key: "signTime",
|
||||
width: 110,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signTime ? text.record.signTime : "-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: "签退时间",
|
||||
@@ -523,21 +538,42 @@ export default {
|
||||
// },
|
||||
{
|
||||
title: "考勤",
|
||||
dataIndex: "time",
|
||||
key: "time",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus ",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
// console.log("text", text);
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.signStatus
|
||||
? "签到"
|
||||
: text.record.leaveStatus
|
||||
? "请假"
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "签到状态",
|
||||
dataIndex: "state",
|
||||
key: "state",
|
||||
dataIndex: "signStatus",
|
||||
key: "signStatus",
|
||||
width: 50,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>{text.record.signStatus ? "正常" : "异常"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考勤情况",
|
||||
@@ -555,7 +591,7 @@ export default {
|
||||
<a-radio-group name="radioGroup">
|
||||
<a-radio
|
||||
value="1"
|
||||
checked={text.record.signIn}
|
||||
checked={text.record.signStatus}
|
||||
onChange={(e) => {
|
||||
console.log("点击签到", e);
|
||||
let obj = {
|
||||
@@ -569,15 +605,17 @@ export default {
|
||||
type: 2,
|
||||
};
|
||||
api
|
||||
.attendanceSign(obj, (res) => {
|
||||
.attendanceSign(obj)
|
||||
.then((res) => {
|
||||
console.log("签到结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.signIn = true;
|
||||
text.record.signStatus = true;
|
||||
getStudent();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("签到失败", err, obj);
|
||||
text.record.signIn = false;
|
||||
text.record.signStatus = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -585,7 +623,7 @@ export default {
|
||||
</a-radio>
|
||||
<a-radio
|
||||
value="2"
|
||||
checked={text.record.leave}
|
||||
checked={text.record.leaveStatus}
|
||||
onChange={(e) => {
|
||||
console.log("点击请假", e, props.datasource);
|
||||
let obj = {
|
||||
@@ -600,15 +638,17 @@ export default {
|
||||
// userName: "",
|
||||
};
|
||||
api
|
||||
.attendanceLeave(obj, (res) => {
|
||||
.attendanceLeave(obj)
|
||||
.then((res) => {
|
||||
console.log("请假结果", res, obj, e);
|
||||
if (res.data.code === 200) {
|
||||
text.record.leave = true;
|
||||
text.record.leaveStatus = true;
|
||||
getStudent();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("请假结果", err, obj);
|
||||
text.record.leave = false;
|
||||
text.record.leaveStatus = false;
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -702,7 +742,7 @@ export default {
|
||||
|
||||
//获取学员
|
||||
const getStudent = () => {
|
||||
console.log("我是传递的查询参数", props.datasource, {
|
||||
console.log("我是传递的查询参数222", props.datasource, {
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
@@ -822,6 +862,33 @@ export default {
|
||||
}
|
||||
};
|
||||
|
||||
// 计算签到时间
|
||||
const isSignClick = () => {
|
||||
console.log("计算签到时间");
|
||||
let beginTime = new Date(props.datasource.startTime).getTime();
|
||||
let endTime = !props.datasource.afterStart
|
||||
? new Date(props.datasource.endTime).getTime()
|
||||
: new Date(props.datasource.beginTime).getTime();
|
||||
if (props.datasource.beforeStart && props.datasource.afterStart) {
|
||||
//有开始前有开始后
|
||||
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
|
||||
endTime = endTime + props.datasource.afterStart * 60 * 1000;
|
||||
console.log("1111");
|
||||
} else if (props.datasource.beforeStart && !props.datasource.afterStart) {
|
||||
//只有开始前无开始后
|
||||
beginTime = beginTime - props.datasource.beforeStart * 60 * 1000;
|
||||
console.log("11112222");
|
||||
} else if (!props.datasource.beforeStart && props.datasource.afterStart) {
|
||||
//无开始前有开始后
|
||||
endTime = endTime + props.datasource.afterStart * 60 * 1000;
|
||||
console.log("1111333");
|
||||
}
|
||||
|
||||
state.beginTime = toDate(beginTime / 1000, "Y/M/D h:m:s");
|
||||
state.endTime = toDate(endTime / 1000, "Y/M/D h:m:s");
|
||||
console.log("beginTime,endTime", state.beginTime, state.endTime);
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
|
||||
@@ -145,7 +145,12 @@
|
||||
v-model:getStudent="getStudent"
|
||||
/>
|
||||
<!-- 录入成绩抽屉 -->
|
||||
<entry-scores v-model:Evisible="Evisible" />
|
||||
<EScore
|
||||
v-model:eScorevisible="Evisible"
|
||||
:type="2"
|
||||
:id="datasource?.routerTaskId"
|
||||
v-model:searchTaskList="searchTaskList"
|
||||
/>
|
||||
<!-- 查看作业抽屉 -->
|
||||
<CKWork v-model:CWvisible="CWvisible" />
|
||||
<!-- 查看答卷抽屉 -->
|
||||
@@ -163,14 +168,14 @@ import { message } from "ant-design-vue";
|
||||
import ASOver from "../AllStuOver.vue";
|
||||
import CKWork from "../CheckWork.vue";
|
||||
import CQue from "../CheckQue.vue";
|
||||
import EntryScores from "../EntryScores.vue";
|
||||
import EScore from "../ExportScore.vue";
|
||||
// import * as api from "../../../api/index";
|
||||
import * as api from "../../../api/index1";
|
||||
import ExportHomeWork from "../../Modals/ExportHomeWork.vue";
|
||||
export default {
|
||||
name: "RouterFaceTeachManage",
|
||||
components: {
|
||||
EntryScores,
|
||||
EScore,
|
||||
CKWork,
|
||||
CQue,
|
||||
ASOver,
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</a-col>
|
||||
<!-- 新加导入学员 批量换组 导出学习信息 -->
|
||||
<a-col :span="1.5" v-if="type === 1 || type === 2">
|
||||
<a-button class="cus-btn white">
|
||||
<a-button class="cus-btn white" @click="showImpStu">
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
@@ -351,6 +351,16 @@
|
||||
v-model:exportHomeWorkV="exportHomeWorkV"
|
||||
:downloadUrl="downloadUrl"
|
||||
/>
|
||||
|
||||
<!-- 导入学员抽屉 -->
|
||||
<!-- :courseId="projectTaskInfo.courseId"
|
||||
:courseType="2" -->
|
||||
<imp-stu
|
||||
v-model:AddImpStuvisible="AddImpStuvisible"
|
||||
@AddImpStuvisibleClose="AddImpStuvisibleClose"
|
||||
:courseId="id"
|
||||
:courseType="type === 1 ? 3 : 4"
|
||||
/>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, defineProps, onMounted, ref, watch } from "vue";
|
||||
@@ -364,6 +374,7 @@ import EScore from "../drawers/ExportScore.vue";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import ExportHomeWork from "../Modals/ExportHomeWork.vue";
|
||||
import * as api from "../../api/index1";
|
||||
import ImpStu from "../drawers/AddLevelImportStu";
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
id: String,
|
||||
@@ -726,6 +737,21 @@ const updateStatus = (status, id) => {
|
||||
console.log("批量更新学员状态失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
//导入学员
|
||||
const AddImpStuvisible = ref(false); //导入学员抽屉
|
||||
const showImpStu = () => {
|
||||
AddImpStuvisible.value = true;
|
||||
};
|
||||
const AddImpStuvisibleClose = (isget) => {
|
||||
console.log("关闭了导入学员弹框", isget);
|
||||
{
|
||||
/* 此处操作重新获取学员列表数据 */
|
||||
}
|
||||
if (isget) {
|
||||
getStuList();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.TableStudent {
|
||||
|
||||
Reference in New Issue
Block a user