feat:公告 历史公告 更改是否优秀 分页 组员名单对接 组员名单各操作

This commit is contained in:
songwc
2022-11-11 18:14:45 +08:00
parent ee03a13e6e
commit 6690a69d80
7 changed files with 752 additions and 276 deletions

View File

@@ -571,18 +571,23 @@
onChange: onSelectChange,
}"
/>
<div class="nostu" style="display: block">
<div
class="nostu"
:style="{ display: total > 0 ? 'none' : 'block' }"
>
<div class="nostuimg"></div>
</div>
<div class="pa">
<a-pagination
v-if="total > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
:pageSize="stupageSize"
:current="currentPageStu"
:total="total"
class="pagination"
@change="changePaginationStu"
/>
</div>
</div>
@@ -648,7 +653,10 @@
<div class="leader1">进度</div>
<a-progress :percent="item.completeRatio" />
</div>
<div class="grofooter" @click="showMemberList">
<div
class="grofooter"
@click="showMemberList(item.projectGroupId)"
>
<div class="ftext">组员名单 ></div>
<div class="peoples">
<div class="people1">
@@ -681,7 +689,13 @@
</div>
</a-tab-pane>
<a-tab-pane key="4" tab="公告">
<NoticePub></NoticePub>
<div class="split"></div>
<a-tabs v-model:activeKey="activeKeyNotice">
<a-tab-pane key="11" tab="公告"><NoticePub v-model:projectId="projectId"></NoticePub></a-tab-pane>
<a-tab-pane key="12" tab="历史公告" force-render
><NoticeHis v-model:projectId="projectId"></NoticeHis></a-tab-pane
>
</a-tabs>
</a-tab-pane>
<a-tab-pane key="5" tab="项目积分">
<ProjectScore :projectId="projectId"></ProjectScore>
@@ -922,11 +936,22 @@
<!-- 学员管理-导入学员抽屉 -->
<import-stu v-model:Importvisible="Importvisible" />
<!-- 查看学员 传入查看学员的id-->
<see-stu v-model:Seevisible="Seevisible" v-model:checkStuId="checkStuId" v-model:projectId="projectId"/>
<see-stu
v-model:Seevisible="Seevisible"
v-model:checkStuId="checkStuId"
v-model:projectId="projectId"
/>
<!-- 学员换组 -->
<change-group v-model:Changevisible="Changevisible" />
<change-group
v-model:Changevisible="Changevisible"
v-model:projectId="projectId"
/>
<!-- 组员名单抽屉 -->
<member-list v-model:Lvisible="Lvisible" />
<member-list
v-model:Lvisible="Lvisible"
v-model:chooseGroupId="chooseGroupId"
v-model:projectId="projectId"
/>
<!-- 面授学员抽屉 -->
<face-stu v-model:FSvisible="FSvisible" />
<!-- 活动考勤抽屉 -->
@@ -1117,7 +1142,7 @@
</div>
<div class="del_btnbox">
<div class="del_btn btn1">
<div class="btnText" @click="closeModal1">取消</div>
<div class="btnText" @click="cancelyou">取消</div>
</div>
<div class="del_btn btn2">
<div class="btnText" @click="closeModal1">确定</div>
@@ -1149,7 +1174,7 @@
</div>
<div class="del_btnbox">
<div class="del_btn btn1">
<div class="btnText" @click="closeModal3">取消</div>
<div class="btnText" @click="cancelcanyou">取消</div>
</div>
<div class="del_btn btn2">
<div class="btnText" @click="closeModal3">确定</div>
@@ -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 = (
<div class="operation">
<div class="nSelect">
<div class="nselect">
<div
class="jc"
onClick={() => {
// state.QR_hs = true;
// state.ftsQR_hs = true;
state.canclestu = true;
}}
>
优秀学员
</div>
<div
class="jc"
onClick={() => {
state.Seevisible = true;
}}
>
查看
</div>
<div class="tableSelect">
<a-select
style="width: 50px;margin-top:2px;margin-left:25px"
value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown"
>
<a-select-option
value="换组"
label="换组"
style="padding-left:35px"
>
<div
onClick={() => {
// state.copy_hs = true;
}}
>
复制
</div>
</a-select-option>
<a-select-option
value="删除"
label="删除"
style="padding-left:35px"
>
<div
onClick={() => {
state.delete_hs = true;
}}
>
删除
</div>
</a-select-option>
</a-select>
</div>
</div>
</div>
</div>
);
}
});
state.tableData = datas;
};
getTableDate();
// const getTableDate = () => {
// let datas = state.tabledata;
// datas.map((value) => {
// {
// //单层项目
// value.operations = (
// <div class="operation">
// <div class="nSelect">
// <div class="nselect">
// <div
// class="jc"
// onClick={() => {
// // state.QR_hs = true;
// // state.ftsQR_hs = true;
// state.canclestu = true;
// }}
// >
// 优秀学员
// </div>
// <div
// class="jc"
// onClick={() => {
// state.Seevisible = true;
// }}
// >
// 查看
// </div>
// <div class="tableSelect">
// <a-select
// style="width: 50px;margin-top:2px;margin-left:25px"
// value="更多"
// // options={state.projectNameList}
// dropdownClassName="tabledropdown"
// >
// <a-select-option
// value="换组"
// label="换组"
// style="padding-left:35px"
// >
// <div
// onClick={() => {
// // state.copy_hs = true;
// }}
// >
// 复制
// </div>
// </a-select-option>
// <a-select-option
// value="删除"
// label="删除"
// style="padding-left:35px"
// >
// <div
// onClick={() => {
// state.delete_hs = true;
// }}
// >
// 删除
// </div>
// </a-select-option>
// </a-select>
// </div>
// </div>
// </div>
// </div>
// );
// }
// });
// 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,
};
},
};