From 5e4e6f16b7f25982cd7a1823427acb6c73fb4253 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Mon, 26 Dec 2022 17:19:21 +0800 Subject: [PATCH] =?UTF-8?q?--=20=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexProjStu.js | 1 + src/components/drawers/SeeStu.vue | 4 +- src/components/student/TableStudent.vue | 914 ++++++++++++------------ src/views/projectcenter/TaskPage.vue | 100 +-- 4 files changed, 528 insertions(+), 491 deletions(-) diff --git a/src/api/indexProjStu.js b/src/api/indexProjStu.js index e620b460..ab1092f2 100644 --- a/src/api/indexProjStu.js +++ b/src/api/indexProjStu.js @@ -29,6 +29,7 @@ export const studentProcess = (obj) => http.get('/admin/project/studentProcess', //是否优秀学员 export const topStudent = (obj) => http.post('/admin/project/topStudent', obj) +export const updateStudent = (obj) => http.post('/admin/student/updateStudent', obj) //项目概览 export const overview = (obj) => http.get('/admin/project/overview', { params: obj }) diff --git a/src/components/drawers/SeeStu.vue b/src/components/drawers/SeeStu.vue index dce4fedc..be119982 100644 --- a/src/components/drawers/SeeStu.vue +++ b/src/components/drawers/SeeStu.vue @@ -303,8 +303,8 @@ export default { }; const check = () => { let obj = { - projectId: 37, - studentId: 3, + projectId: props.projectId, + studentId: props.checkStuId, }; studentProcess(obj).then((res) => { console.log("查看了学员", res.data.data); diff --git a/src/components/student/TableStudent.vue b/src/components/student/TableStudent.vue index b516df37..b2781f7c 100644 --- a/src/components/student/TableStudent.vue +++ b/src/components/student/TableStudent.vue @@ -1,328 +1,332 @@ + + + + + + + +
+ +
+
+
+
+
+ 提示 +
+
+ 您是否授予此学员优秀学员称号? +
+
+
+
取消
+
+
+
确定
+
+
+
+
+
+
+ + +
+ +
+
+
+
+
+ 提示 +
+
+ 您是否取消此学员优学员称号? +
+
+
+
取消
+
+
+
确定
+
+
+
+
+
+
+ + - \ No newline at end of file diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 1d76a46a..8ca77da1 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -688,7 +688,7 @@
- +
@@ -700,7 +700,24 @@ :columns="stuColumns" :stage="stage" :visable ="tabFlag" - > + > + +
@@ -1275,7 +1292,7 @@ :closable="close" wrapClassName="canclestu" centered="true" - @cancel="closeModal1" + @cancel="cancelyou" >
@@ -1288,11 +1305,11 @@ 您是否授予此学员优秀学员称号?
-
-
取消
+
+
取消
-
-
确定
+
+
确定
@@ -1320,11 +1337,11 @@ 您是否取消此学员优学员称号?
-
-
取消
+
+
取消
-
-
确定
+
+
确定
@@ -1678,7 +1695,7 @@ import { getGroupList, deleteGroup, editGroup, - topStudent, + topStudent, updateStudent, } from "../../api/indexProjStu"; import { message, Modal } from "ant-design-vue"; import * as apitl from "../../api/index"; @@ -1725,6 +1742,7 @@ export default { const store = useStore(); const route = useRoute(); const state = reactive({ + editRecord:{}, tabFlag:true, stage: [], stuColumns: [ @@ -2559,26 +2577,12 @@ export default { }; //点击确定授予优秀学员后 const closeModal1 = () => { - let obj = { - projectId: state.projectId, - studentIds: state.changeGoods, - topFlag: 1, - }; - topStudent(obj) - .then((res) => { - console.log(`优秀学员授予成功${res.data}`); - message.success("优秀学员称号授予成功"); - - getStu(); - }) - .catch((err) => { - console.log(`优秀学员授予成功${err}`); - message.warning("优秀学员称号授予失败"); - }); - state.changeGoods = []; + state.editRecord.topFlag = 1 + updateStudent(state.editRecord) state.canclestu = false; + message.success("优秀学员称号授予成功"); }; - + //点击取消授予优秀学员后 const cancelyou = () => { state.changeGoods = []; @@ -2589,24 +2593,10 @@ export default { }; //点击确定取消优秀学员称号 const closeModal3 = () => { - let obj = { - projectId: state.projectId, - studentIds: state.changeGoods, - topFlag: 0, - }; - topStudent(obj) - .then((res) => { - console.log(`取消优秀学员称号成功${res}`); - message.success("优秀学员称号取消成功"); - - getStu(); - }) - .catch((err) => { - console.log(`取消优秀学员称号失败${err}`); - message.warning("优秀学员称号取消失败"); - }); - state.changeGoods = []; + state.editRecord.topFlag = 0 + updateStudent(state.editRecord) state.canclestu1 = false; + message.success("优秀学员称号取消成功"); }; //点击取消取消授予优秀学员后 const cancelcanyou = () => { @@ -3071,8 +3061,8 @@ export default { //tabs切换 const tabsChange = (e) => { - - + + //排行榜 if (e == 6) { //获取进度榜 @@ -4024,9 +4014,19 @@ export default { }; state.codeInfo = obj; }; + function settingTopFlag(record){ + record.topFlag?(state.canclestu1 = true):(state.canclestu=true) + state.editRecord = record + } + function showStudent(record){ + state.Seevisible = true + state.checkStuId = record.studentId + } return { ...toRefs(state), ...toRefs(levelList), + showStudent, + settingTopFlag, totask, tostudent, showModal, @@ -4037,7 +4037,7 @@ export default { closeModal2, showModal3, closeModal3, - + showDeleteOne, closeDeleteOne, showTime,