diff --git a/src/api/index1.js b/src/api/index1.js index 574be75b..e618b57a 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-04 22:45:31 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-02-09 09:36:11 + * @LastEditTime: 2023-02-11 16:22:43 * @FilePath: /fe-manage/src/api/index1.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -220,3 +220,7 @@ export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCer // 外部考试导入成绩 export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data" } }) +//分组 +export const changeGroupByStudentId = (obj) => http.post('/admin/student/changeGroupByStudentId', obj) +//导入小组 +export const importGroup = (uuid) => http.post('/admin/studentGroup/importGroup/{pid}', { params: { uuid: uuid } }) \ No newline at end of file diff --git a/src/api/indexProjStu.js b/src/api/indexProjStu.js index 87b495e2..115388a0 100644 --- a/src/api/indexProjStu.js +++ b/src/api/indexProjStu.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-18 14:09:43 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-05 15:27:36 + * @LastEditTime: 2023-02-11 18:55:44 * @FilePath: /fe-manage/src/api/indexProjStu.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -42,4 +42,6 @@ export const setScoreRule = (obj) => http.post('/admin/project/setScoreRule', ob export const studentScoreList = (obj) => http.post('/admin/project/studentScoreList', obj) //添加项目学员 -export const addStudent = (obj) => http.post('/admin/project/addStudent', obj) \ No newline at end of file +export const addStudent = (obj) => http.post('/admin/project/addStudent', obj) +//获取组员名单 +export const groupMemberList = (obj) => http.post('/admin/studentGroup/groupMemberList', obj) \ No newline at end of file diff --git a/src/components/drawers/ExportAchievement.vue b/src/components/drawers/ExportAchievement.vue index efe4e941..3e081c19 100644 --- a/src/components/drawers/ExportAchievement.vue +++ b/src/components/drawers/ExportAchievement.vue @@ -1,653 +1,654 @@ + + +
+ +
+ + + }; + + //上传文件 + const handleChange = (info) => { + 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.addLoading = true; + state.uploadpercent = parseInt(info.file.percent); + console.log("我是文件上传的进度---------->", info.file.percent); + const status = info.file.status; + if (status !== "uploading") { + // console.log(info.file, info.fileList); + } + if (status === "done") { + state.fileName = info.file.name; + let i = 0; + let timeouts = setTimeout(() => { + clearInterval(timer); + state.addLoading = false; + message.destroy(); + message.error(`文件导入超时`); + }, 30000); + + let timer = 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.addLoading = false; + props.searchTaskList && props.searchTaskList(); + } + state.succNum = res.data.data.successNum; + state.errNum = res.data.data.failedNum; + state.downloadErrUrl = res.data.data.url; + console.log("props.getStudent", props.getStudent); + clearInterval(timer); + clearTimeout(timeouts); + } + } + }) + .catch((err) => { + state.addLoading = false; + clearInterval(timer); + clearTimeout(timeouts); + console.log("查询导入状态失败", err); + }); + }, 500); + } else if (status === "error") { + state.uploadErr = true; + message.error(`${info.file.name}上传失败`); + } + }; + const beforeUpload = (file) => { + return new Promise((resolve, reject) => { + // const isJpgOrPng = + // file.name.indexOf(".xlsx") !== "-1" || + // file.name.indexOf(".xls") !== "-1"; + + // if (!isJpgOrPng) { + // message.destroy(); + // message.error("仅支持xls、xlsx格式!"); + // return reject(false); + // } + const formData = new FormData(); + formData.append("uploadFile", file); + // let progress = { percent: 1 }; + + // const intervalId = setInterval(() => { + // if (progress.percent < 100) { + // progress.percent++; + // file.onProgress(progress); + // } else { + // clearInterval(intervalId); + // } + // }, 100); + api.batchImportScore(formData).then((res) => { + if (res.data.code === 200) { + console.log("上传成功", res); + return reject(true); + } + }); + return reject(false); + }); + }; + const handleUpload = (e) => { + console.log("handleUpload", e); + }; + + //删除 + const removeUpload = () => { + state.fileList = []; + state.uploadpercent = -1; + state.uploadErr = false; //上传失败 + state.succNum = 0; + state.errNum = 0; + state.downloadErrUrl = null; + state.addLoading = false; + }; + // 下载失败数据 + const downloadEeeorData = () => { + if (state.downloadErrUrl !== "") { + window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl); + } + }; + function downTemplate() { + console.log(state.locationHref + state.template); + window.open(state.locationHref + state.template); + } + + return { + ...toRefs(state), + afterVisibleChange, + closeDrawer, + handleChange, + downTemplate, + BATCH_IMPORT_SCORE, + beforeUpload, + handleUpload, + removeUpload, + downloadEeeorData, + }; + }, +}; + +} + \ No newline at end of file diff --git a/src/components/drawers/MemberList.vue b/src/components/drawers/MemberList.vue index 3475b8ba..8bfa6830 100644 --- a/src/components/drawers/MemberList.vue +++ b/src/components/drawers/MemberList.vue @@ -81,11 +81,11 @@ onChange: onSelectChange, }" /> - +
import { toRefs, reactive } from "vue"; // import StuAdd from "./StuAdd.vue"; -import { getProjStu, removeGroupStudent } from "../../api/indexProjStu"; +import { + // getProjStu, + removeGroupStudent, + groupMemberList, +} from "../../api/indexProjStu"; import { toDate } from "../../api/method"; import { message } from "ant-design-vue"; import AddGroupMembers from "./AddGroupMembers.vue"; @@ -232,21 +236,21 @@ export default { className: "h", }, // { - // title: "岗位", - // dataIndex: "gangw", - // key: "gangw", - // width: 60, - // align: "center", - // className: "h", + // title: "岗位", + // dataIndex: "gangw", + // key: "gangw", + // width: 60, + // align: "center", + // className: "h", // }, // { - // title: "进度", - // dataIndex: "progress", - // key: "progress", - // width: 60, - // align: "center", - // className: "h", - // }, + // title: "进度", + // dataIndex: "progress", + // key: "progress", + // width: 60, + // align: "center", + // className: "h", + // }, { title: "操作", dataIndex: "operations", @@ -330,8 +334,7 @@ export default { gangw: value.userInfoBo.jobName, //岗位 completeStageCnt: value.completeStageCnt, //当前完成阶段数 totalStageCnt: value.totalStageCnt, //总阶段数 - progress: value.completeStageCnt + "/" + value.totalStageCnt, - + progress: value.completeStageCnt + "/" + value.totalStageCnt, stutime: toDate(value.beginStudyTime / 1000, "Y-M-D"), //开始学习时间 }; @@ -339,20 +342,17 @@ export default { }); state.tabledata = array; }; - //获取学员列表 + //获取组员列表 const getStu = (obj) => { let objf = obj || { - deptIds: [], //部门 - groupName: "", - name: "", + studentName: "", pageNo: state.currentPage, pageSize: 10, - projectId: props.projectId, - topFlag: "", + pid: props.projectId, groupId: props.chooseGroupId, //暂时写死 }; state.tableDataTotal = -1; - getProjStu(objf).then((res) => { + groupMemberList(objf).then((res) => { console.log(res.data.data, "获取学员列表"); if (res.data.code === 200) { state.total = res.data.data.total; diff --git a/src/components/drawers/project/ImpoterGroupLeader.vue b/src/components/drawers/project/ImpoterGroupLeader.vue new file mode 100644 index 00000000..f5eb9355 --- /dev/null +++ b/src/components/drawers/project/ImpoterGroupLeader.vue @@ -0,0 +1,652 @@ + + + + + \ No newline at end of file diff --git a/src/components/student/ChangeGroupModal.vue b/src/components/student/ChangeGroupModal.vue index 316ace72..47374414 100644 --- a/src/components/student/ChangeGroupModal.vue +++ b/src/components/student/ChangeGroupModal.vue @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-12-20 17:00:37 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2023-01-31 16:14:39 + * @LastEditTime: 2023-02-11 15:06:13 * @FilePath: /fe-manage/src/components/student/ChangeLevelModal.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> @@ -28,11 +28,12 @@
@@ -58,7 +59,8 @@ diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 16bf5ef4..4d61e645 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -725,7 +725,7 @@ {{ record.topFlag ? "取消优秀" : "优秀学员" }} - 换组 @@ -761,10 +761,10 @@ 随机分组
-
+
导出小组
-
+
导入小组长
@@ -806,7 +806,7 @@ @click="showMemberList(item.projectGroupId)" >
组员名单 >
-
+
@@ -1676,6 +1676,24 @@ /> +
+
+ +
+
组员人数:
+
+ +
+
- + + + +