From 6690a69d806fe7b06a9d2e3c6421496c42c53f3d Mon Sep 17 00:00:00 2001 From: songwc Date: Fri, 11 Nov 2022 18:14:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=AC=E5=91=8A=20=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=85=AC=E5=91=8A=20=20=E6=9B=B4=E6=94=B9=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E4=BC=98=E7=A7=80=20=E5=88=86=E9=A1=B5=20=E7=BB=84=E5=91=98?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E5=AF=B9=E6=8E=A5=20=20=E7=BB=84=E5=91=98?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E5=90=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexProjStu.js | 5 +- src/api/indexTaskadd.js | 3 + src/components/drawers/ChangeGroup.vue | 72 ++++-- src/components/drawers/MemberList.vue | 333 ++++++++++++++++++------- src/components/drawers/NoticeHis.vue | 105 ++++++++ src/components/drawers/NoticePub.vue | 216 ++++++++++------ src/views/projectcenter/TaskPage.vue | 294 ++++++++++++++-------- 7 files changed, 752 insertions(+), 276 deletions(-) create mode 100644 src/components/drawers/NoticeHis.vue diff --git a/src/api/indexProjStu.js b/src/api/indexProjStu.js index 8d9ddff3..28d77063 100644 --- a/src/api/indexProjStu.js +++ b/src/api/indexProjStu.js @@ -16,4 +16,7 @@ export const deleteGroup = (obj) => http.delete('/admin/project/deleteGroup', { export const editGroup = (obj) => http.post('/admin/project/editGroup', obj) //查看学员 -export const studentProcess = (obj) => http.get('/admin/project/studentProcess', { params: obj }) \ No newline at end of file +export const studentProcess = (obj) => http.get('/admin/project/studentProcess', { params: obj }) + +//是否优秀学员 +export const topStudent = (obj) => http.post('/admin/project/topStudent', obj) \ No newline at end of file diff --git a/src/api/indexTaskadd.js b/src/api/indexTaskadd.js index dd8001d2..ac0f16bf 100644 --- a/src/api/indexTaskadd.js +++ b/src/api/indexTaskadd.js @@ -12,3 +12,6 @@ export const addTask = (obj) => http.post('/admin/project/editTask', obj) //项目里的删除任务 export const deleteTask = (obj) => http.delete('/admin/project/deleteTask', { params: obj }) + +//新建或编辑项目 +export const editProj = (obj) => http.post('/admin/project/edit', obj) diff --git a/src/components/drawers/ChangeGroup.vue b/src/components/drawers/ChangeGroup.vue index 6447ff12..2059425d 100644 --- a/src/components/drawers/ChangeGroup.vue +++ b/src/components/drawers/ChangeGroup.vue @@ -19,12 +19,12 @@
将此学员移动到
@@ -38,6 +38,7 @@ + \ No newline at end of file diff --git a/src/components/drawers/NoticePub.vue b/src/components/drawers/NoticePub.vue index d36f32b6..4ecf4e49 100644 --- a/src/components/drawers/NoticePub.vue +++ b/src/components/drawers/NoticePub.vue @@ -1,85 +1,159 @@ s \ No newline at end of file diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 163d1cae..69247d7f 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -571,18 +571,23 @@ onChange: onSelectChange, }" /> -
+
@@ -648,7 +653,10 @@
进度
-
+
组员名单 >
@@ -681,7 +689,13 @@
- +
+ + + +
@@ -922,11 +936,22 @@ - + - + - + @@ -1117,7 +1142,7 @@
-
取消
+
取消
确定
@@ -1149,7 +1174,7 @@
-
取消
+
取消
确定
@@ -1363,6 +1388,7 @@ import ImportStu from "../../components/drawers/ImportStu"; import SeeStu from "../../components/drawers/SeeStu"; import ChangeGroup from "../../components/drawers/ChangeGroup"; import NoticePub from "../../components/drawers/NoticePub"; +import NoticeHis from "../../components/drawers/NoticeHis"; import ProjectScore from "../../components/drawers/ProjectScore"; import TaskImpStu from "../../components/drawers/TaskFaceIn"; import { storage } from "../../api/storage"; @@ -1373,6 +1399,7 @@ import { getGroupList, deleteGroup, editGroup, + topStudent, } from "../../api/indexProjStu"; import { message } from "ant-design-vue"; import * as apitl from "../../api/index"; @@ -1399,6 +1426,7 @@ export default { ProjectScore, TaskImpStu, projSet, + NoticeHis, }, setup() { const state = reactive({ @@ -1429,6 +1457,7 @@ export default { label: "", }, ], + changeGoods: [], //更改是否优秀的id数组 //学员信息列表 tabledata: [ // { @@ -1477,7 +1506,9 @@ export default { // stuGroup: "", //搜索的学员小组名称 // stuBum: "", //搜索的学员小组部门 // stuGood: "", //搜索的学员是否优秀 - total: null, //学员列表数据总条数 + total: 0, //学员列表数据总条数 + stupageSize: 10, + currentPageStu: 1, //当前页 choosed: 0, //勾选的学员总数 selectedRowKeys: [], //选择的学员 selectedRows: [], //选择的学员的id值 @@ -1527,9 +1558,10 @@ export default { checkedBOEU: false, //是否BOEU实施 radioV1: "", radioV2: "", - activeKey: "5", //1:概览 2.任务... + activeKey: "4", //1:概览 2.任务... activeKey1: "8", //8:学员管理 9:小组管理 activeKey2: "3", + activeKeyNotice: "11", inputValue: 5, inputValue2: 5, inputValue3: 5, @@ -1546,6 +1578,7 @@ export default { TaskFaceImpStuvisible: false, //批量面授报名 valuestugn: "", //小组管理的输入的小组名称 checkStuId: null, //要查看的学员id + chooseGroupId: null, //进度排行表 jindutabledata: [ { @@ -2055,77 +2088,77 @@ export default { }; //学员学员管理渲染 - const getTableDate = () => { - let datas = state.tabledata; - datas.map((value) => { - { - //单层项目 - value.operations = ( -
-
-
-
{ - // state.QR_hs = true; - // state.ftsQR_hs = true; - state.canclestu = true; - }} - > - 优秀学员 -
-
{ - state.Seevisible = true; - }} - > - 查看 -
-
- - -
{ - // state.copy_hs = true; - }} - > - 复制 -
-
- -
{ - state.delete_hs = true; - }} - > - 删除 -
-
-
-
-
-
-
- ); - } - }); - state.tableData = datas; - }; - getTableDate(); + // const getTableDate = () => { + // let datas = state.tabledata; + // datas.map((value) => { + // { + // //单层项目 + // value.operations = ( + //
+ //
+ //
+ //
{ + // // state.QR_hs = true; + // // state.ftsQR_hs = true; + // state.canclestu = true; + // }} + // > + // 优秀学员 + //
+ //
{ + // state.Seevisible = true; + // }} + // > + // 查看 + //
+ //
+ // + // + //
{ + // // state.copy_hs = true; + // }} + // > + // 复制 + //
+ //
+ // + //
{ + // state.delete_hs = true; + // }} + // > + // 删除 + //
+ //
+ //
+ //
+ //
+ //
+ //
+ // ); + // } + // }); + // state.tableData = datas; + // }; + // getTableDate(); const totask = () => { state.activeKey = "2"; @@ -2143,13 +2176,59 @@ export default { const showModal1 = () => { state.canclestu = true; }; + //点击确定授予优秀学员后 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.canclestu = false; + }; + //点击取消授予优秀学员后 + const cancelyou = () => { + state.changeGoods = []; state.canclestu = false; }; const showModal3 = () => { state.canclestu1 = true; }; + //点击确定取消优秀学员称号 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.canclestu1 = false; + }; + //点击取消取消授予优秀学员后 + const cancelcanyou = () => { + state.changeGoods = []; state.canclestu1 = false; }; @@ -2192,8 +2271,7 @@ export default { state.FaceVisivle = true; }; const showSubset = () => { - //面授管理的抽屉 - // console.log("点击管理"); + // 随机分组 state.subsetVisivle = true; }; //面授学员的弹窗 @@ -2201,8 +2279,10 @@ export default { state.FSvisible = true; }; //面授学员的弹窗 - const showMemberList = () => { + const showMemberList = (id) => { state.Lvisible = true; + console.log("ssdsdsdsd", id); + state.chooseGroupId = id; }; //活动考勤的抽屉 const showAA = (course) => { @@ -2283,8 +2363,12 @@ export default { onClick={() => { if (value.excellent === false) { state.canclestu = true; + console.log("youxiu", value.studentId); + state.changeGoods.push(value.studentId); } else if (value.excellent === true) { state.canclestu1 = true; + console.log("youxiu", value.studentId); + state.changeGoods.push(value.studentId); } }} > @@ -2334,7 +2418,7 @@ export default { }); state.tabledata = arr; }; - // studentData(); + studentData(); const studentColumns = () => { const tablecolumns = [ { @@ -2522,6 +2606,7 @@ export default { //点击取消删除单个学员 const closeDeleteOne = () => { state.deleteOneStu = false; + state.chooseDeleteOne = []; }; //点击确认删除单个学员 const closeDeleteOneConfirm = () => { @@ -2563,6 +2648,7 @@ export default { .then((res) => { console.log(res, "删除成功"); message.success("删除成功"); + state.selectedRows = []; getStu(); }) .catch((err) => { @@ -2606,7 +2692,7 @@ export default { : value.source == 3 ? "受众添加" : "-", //加入方式 - beginStudyTime: value.beginStudyTime, //开始学习时间 + stutime: toDate(value.beginStudyTime / 1000, "Y-M-D"), //开始学习时间 }; array.push(obj); }); @@ -2638,7 +2724,7 @@ export default { deptIds: [], //部门 groupName: state.valuestugroup, name: state.valuestun, - pageNo: 1, + pageNo: state.currentPageStu, pageSize: 10, projectId: state.projectId, topFlag: @@ -2646,19 +2732,12 @@ export default { ? 1 : state.valuegood == "普通学员" ? 0 - : null, + : state.valuegood == "全部" + ? "" + : "", }; //重新获取列表 getStu(obj); - // getProjStu(obj).then((res) => { - // console.log("搜索成功", res); - //重新获取列表 - // let leng = res.data.data.rows; - // if (leng > 0) { - // let arr = res.data.data.rows; - // getTableDataList(arr); - // } - // }); }; //勾选学员 const onSelectChange = (selectedRowKeys, selectedRows) => { @@ -2702,10 +2781,10 @@ export default { deptIds: [], //部门 groupName: "", name: "", - pageNo: 1, + pageNo: state.currentPageStu, pageSize: 10, projectId: state.projectId, - topFlag: 0, + topFlag: "", }; getProjStu(objf).then((res) => { console.log(res.data.data, "获取学员列表"); @@ -2770,7 +2849,7 @@ export default { const getGroup = (obj) => { let objf = obj || { name: "", - pageNo: 1, + pageNo: state.currentPageStu, pageSize: 10, projectId: state.projectId, }; @@ -2832,6 +2911,11 @@ export default { }; getGroup(obj); }; + //分页 + const changePaginationStu = (page) => { + state.currentPageStu = page; + getStu(); + }; //end---------学员------ onMounted(() => { getStu(); @@ -2909,6 +2993,10 @@ export default { createG, resetGroupName, searchGroup, + studentData, + cancelyou, + cancelcanyou, + changePaginationStu, }; }, };