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

@@ -17,3 +17,6 @@ export const editGroup = (obj) => http.post('/admin/project/editGroup', obj)
//查看学员
export const studentProcess = (obj) => http.get('/admin/project/studentProcess', { params: obj })
//是否优秀学员
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)

View File

@@ -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)

View File

@@ -19,12 +19,12 @@
<div class="onerow">将此学员移动到</div>
<div class="secondrow">
<a-select
v-model:value="value"
v-model:value="groupValue"
style="width: 264px; border-radius: 8px"
placeholder="好好学习"
:options="stugroupList"
allowClear
showSearch
@change="handleChange"
/>
</div>
</div>
@@ -38,6 +38,7 @@
<script>
import { reactive, toRefs } from "vue";
import { getGroupList } from "../../api/indexProjStu";
export default {
name: "ChangeGroup",
props: {
@@ -45,39 +46,76 @@ export default {
type: Boolean,
default: false,
},
projectId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
const state = reactive({
stugroupList: [
{
id: "1",
value: "好好学习",
label: "好好学习",
},
{
id: "2",
value: "天天向上",
label: "天天向上",
},
{
id: "3",
value: "最强小组",
label: "最强小组",
},
// {
// id: "1",
// value: "好好学习",
// label: "好好学习",
// },
// {
// id: "2",
// value: "天天向上",
// label: "天天向上",
// },
// {
// id: "3",
// value: "最强小组",
// label: "最强小组",
// },
],
groupValue: null, //下拉框选择的值
});
const closeDrawer = () => {
ctx.emit("update:Changevisible", false);
};
const setStuGroups = (tableData) => {
let data = tableData;
let array = [];
data.map((value) => {
let obj = {
id: value.projectGroupId,
value: value.groupName,
label: value.groupName,
};
array.push(obj);
});
state.stugroupList = array;
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
let obj = {
name: "",
pageNo: 1,
pageSize: 12,
projectId: props.projectId,
};
getGroupList(obj).then((res) => {
console.log("在抽屉里获取了小组列表", res.data.data.rows);
let result = res.data.data.rows;
if (result.length > 0) {
setStuGroups(result);
}
});
};
const handleChange = (value) => {
console.log(`selected ${value}`);
};
return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
setStuGroups,
handleChange,
// change,
};
},

View File

@@ -27,11 +27,11 @@
</div>
<div class="btns">
<div class="btn btn1" style="margin-right: 20px">
<div class="btn btn1" style="margin-right: 20px" @click="searchStu">
<div class="img1"></div>
<div class="wz">搜索</div>
</div>
<div class="btn btn2">
<div class="btn btn2" @click="resetSearch">
<div class="img2"></div>
<div class="wz">重置</div>
</div>
@@ -56,10 +56,10 @@
<div class="left">
<div class="img"></div>
<div class="text" style="margin-left: 10px">已选择</div>
<div class="text2">2</div>
<div class="text2">{{ choosed }}</div>
<div class="text"></div>
<div class="text3">列表选项总计</div>
<div class="text4">9</div>
<div class="text4">{{ total }}</div>
</div>
<div class="right">清空</div>
</div>
@@ -82,13 +82,15 @@
/>
<div class="pa">
<a-pagination
v-if="total > 10"
showSizeChanger="true"
showQuickJumper="true"
hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
:total="total"
class="pagination"
@change="changePaginationStu"
/>
</div>
</div>
@@ -97,7 +99,7 @@
<button class="btn1">取消</button>
<button class="btn2">确定</button>
</div>
<!-- 批量删除的弹窗 -->
<a-modal
:closable="closable"
v-model:visible="showmodal"
@@ -117,7 +119,30 @@
<div class="main">请确认是否批量删除组员</div>
<div class="butn">
<button class="btn btn1" @click="closeModal">取消</button>
<button class="btn btn2" @click="closeModal">确定</button>
<button class="btn btn2" @click="sureDeModal">确定</button>
</div>
</a-modal>
<!-- 单独删除的弹窗 -->
<a-modal
:closable="closable"
v-model:visible="deone"
centered="true"
:footer="null"
wrapClassName="FacMa"
>
<div class="head">
<div class="inhead">
<div class="left">
<img src="../../assets/images/coursewareManage/notice.png" />
<div class="tis">提示</div>
</div>
<div class="right" @click="closedeleone"></div>
</div>
</div>
<div class="main">请确认是否批量删除组员</div>
<div class="butn">
<button class="btn btn1" @click="closedeleone">取消</button>
<button class="btn btn2" @click="yesdele">确定</button>
</div>
</a-modal>
<stu-add v-model:Stuvisible="Stuvisible" />
@@ -128,6 +153,9 @@
<script>
import { toRefs, reactive } from "vue";
import StuAdd from "./StuAdd.vue";
import { getProjStu, deleteStu } from "../../api/indexProjStu";
import { toDate } from "../../api/method";
import { message } from "ant-design-vue";
export default {
name: "MemberList",
components: { StuAdd },
@@ -136,6 +164,14 @@ export default {
type: Boolean,
default: false,
},
chooseGroupId: {
type: Number,
default: null,
},
projectId: {
type: Number,
default: null,
},
},
setup(props, ctx) {
@@ -144,85 +180,25 @@ export default {
name: null,
showmodal: false,
closable: false, //modal右上角的关闭按钮
pageSize: 10,
currentPage: 1,
tableDataTotal: 100,
total: null,
selectedRowKeys: [],
choosed: 0, //勾选的学员总数
selectedRows: [], //选择的学员的id值
deleteOne: null,
deone: false,
tabledata: [
{
key: 1,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 2,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 3,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 4,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 5,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 6,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 7,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 8,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
{
key: 9,
name: "小李",
bum: "产品部",
gangw: "产品经理",
progress: "20%",
operations: "删除",
},
// {
// key: 1,
// name: "小李",
// bum: "产品部",
// gangw: "产品经理",
// progress: "20%",
// operations: "删除",
// },
],
tablecolumns: [
{
title: "姓名",
@@ -263,6 +239,18 @@ export default {
width: 60,
align: "center",
className: "operation",
scopedSlots: { customRender: "action" }, //引入的插槽
customRender: (value) => {
return (
<div
onClick={() => {
deleteOne(value.record.key);
}}
>
删除
</div>
);
},
},
],
});
@@ -270,7 +258,31 @@ export default {
ctx.emit("update:Lvisible", false);
};
const showModal = () => {
state.showmodal = true;
if (state.selectedRows.length == 0) {
message.destroy();
return message.warning("请选择要删除的学员");
} else {
state.showmodal = true;
}
// state.showmodal = true;
};
//点击确认批量删除弹窗
const sureDeModal = () => {
deleteStu({
projectId: props.projectId,
studentIds: state.selectedRows,
})
.then((res) => {
console.log(res, "删除成功");
message.success("删除成功");
state.selectedRows = [];
getStu();
})
.catch((err) => {
console.log(err, "删除失败");
message.warning("删除失败");
});
state.showmodal = false;
};
const closeModal = () => {
state.showmodal = false;
@@ -278,14 +290,167 @@ export default {
const showStuAdd = () => {
state.Stuvisible = true;
};
//把数据放到state里
const getTableDataList = (tableData) => {
let data = tableData;
let array = [];
data.map((value) => {
let obj = {
key: value.studentId,
projectId: value.projectId, //项目id
groupId: value.groupId, //小组id
group: value.groupName, //小组名
studentId: value.studentId, //学生id
currentStageId: value.currentStageId, //当前关卡id
name: value.name, //用户名
bum: value.userInfoBo.deptName, //部门
gangw: value.userInfoBo.jobName, //岗位
completeStageCnt: value.completeStageCnt, //当前完成阶段数
totalStageCnt: value.totalStageCnt, //总阶段数
progress: value.completeStageCnt + "/" + value.totalStageCnt,
stutime: toDate(value.beginStudyTime / 1000, "Y-M-D"), //开始学习时间
};
array.push(obj);
});
state.tabledata = array;
};
//获取学员列表
const getStu = (obj) => {
let objf = obj || {
deptIds: [], //部门
groupName: "",
name: "",
pageNo: state.currentPage,
pageSize: 10,
projectId: props.projectId,
topFlag: "",
groupId: 10, //暂时写死
};
getProjStu(objf).then((res) => {
console.log(res.data.data, "获取学员列表");
let leng = res.data.data.rows.length;
state.total = res.data.data.total;
if (leng > 0) {
let arr = res.data.data.rows;
getTableDataList(arr);
}
});
};
const afterVisibleChange = () => {
getStu();
};
//分页
const changePaginationStu = (page) => {
state.currentPage = page;
getStu();
};
//勾选学员
const onSelectChange = (selectedRowKeys, selectedRows) => {
console.log("selectedRowKeys changed: ", selectedRowKeys);
state.selectedRowKeys = selectedRowKeys;
state.choosed = state.selectedRowKeys.length;
console.log("ssss", selectedRows);
state.selectedRows = [];
console.log("before", state.selectedRows);
// let arr = [];
//遍历 插入到state.selectedRows里
selectedRows.map((item) => {
console.log(item.studentId);
state.selectedRows.push(item.studentId);
// arr.push(item.studentId);
// console.log("asdfasdf", arr);
});
// state.selectedRows = arr;
console.log("after", state.selectedRows);
// console.log(state.selectedRows[0]);
// console.log("dddd",selectedRows.)
//判断是否为数组
// console.log("wwwwww", Object.prototype.toString.call(state.selectedRows));
};
//清空所选的学员
const clearChooseStu = () => {
state.selectedRowKeys = [];
state.choosed = 0;
};
//学员搜索
const searchStu = () => {
let obj = {
deptIds: [], //部门
groupName: "",
name: state.name,
pageNo: state.currentPage,
pageSize: 10,
projectId: props.projectId,
topFlag: "",
};
//重新获取列表
getStu(obj);
};
//重置
const resetSearch = () => {
state.name = null;
let obj = {
deptIds: [], //部门
groupName: "",
name: "",
pageNo: 1,
pageSize: 10,
projectId: props.projectId,
topFlag: "",
};
//重新获取列表
getStu(obj);
};
const deleteOne = (id) => {
// console.log(id, "fewfew");
console.log(`${id}`);
state.deone = true;
state.selectedRows.push(id);
};
//点击取消删除单个学员
const closedeleone = () => {
state.deone = false;
state.selectedRows = [];
};
const yesdele = () => {
state.deone = false;
deleteStu({
projectId: props.projectId,
studentIds: state.selectedRows,
})
.then((res) => {
console.log(res, "单个删除成功");
message.success("删除成功");
getStu();
})
.catch((err) => {
console.log(err, "单个删除失败");
message.warning("删除失败");
});
state.selectedRows = [];
};
return {
...toRefs(state),
closeDrawer,
showModal,
closeModal,
showStuAdd,
getStu,
getTableDataList,
afterVisibleChange,
changePaginationStu,
clearChooseStu,
onSelectChange,
searchStu,
resetSearch,
sureDeModal,
deleteOne,
closedeleone,
yesdele,
};
},
};

View File

@@ -0,0 +1,105 @@
<!--发布公告-->
<template>
<!-- <div class="split"></div> -->
<div class="noticeconTitle">
<!-- <div class="notitle"><span class="titlespan">公告</span></div> -->
<div>公告内容</div>
<div>发布时间</div>
</div>
<div class="noticeContent">
<div v-for="item in notice" :key="item.id" class="item">
<div class="itemcontent">{{ item.content }}</div>
<div class="itemtime">{{ item.pubtime }}</div>
</div>
</div>
</template>s
<script>
import { reactive, toRefs, onMounted } from "vue";
import { getTask } from "../../api/indexTaskadd";
export default {
name: "NoticeHis",
props: {
projectId: {
type: Number,
default: null,
},
},
setup(props) {
const state = reactive({
noticeChecked: true,
notice: [
// {
// id: 1,
// content:
// "jwlfwefefweffjwofiewjffwefwowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefwef",
// pubtime: "2022-11-7 12:23:00",
// },
// {
// id: 2,
// content: "fjwofiewjfowefjwlfwefwefwefwef",
// pubtime: "2022-11-7 12:23:00",
// },
],
projectInfo: {},
});
const getTaskInfo = () => {
getTask({ projectId: props.projectId }).then((res) => {
console.log("公告获取项目", res.data.data.projectInfo);
state.projectInfo = res.data.data.projectInfo;
//下一步是把公告赋值给state.notice
});
};
onMounted(() => {
getTaskInfo();
});
return {
...toRefs(state),
getTaskInfo,
};
},
};
</script>
<style lang="scss">
.noticeconTitle {
// margin-left: 32px;
// margin-right: 32px;
// padding-top: 20px;
margin: 20px 32px 0 32px;
width: 70%;
// background-color: #bfa;
display: flex;
justify-content: space-between;
}
.noticeContent {
margin-top: 20px;
margin-left: 32px;
.item {
height: 66px;
width: 74%;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
.itemcontent {
width: 500px;
word-break: break-all;
word-wrap: break-word;
// overflow: hidden;
// text-overflow: ellipsis;
white-space: wrap;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
}
.itemtime {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
display: flex;
align-items: center;
}
}
}
</style>

View File

@@ -1,85 +1,159 @@
<!--发布公告-->
<template>
<div class="split"></div>
<div class="noticeTitle">
<div class="notitle"><span class="titlespan">公告</span></div>
<div class="switch"><a-switch v-model:checked="noticeChecked" size="small"/><span style="margin-left: 16px;">开启</span></div>
<template v-if="noticeChecked">
<p>公告内容</p>
<a-textarea v-model:value="noticeContent" :maxlength="150" placeholder="公告信息最多输入150个字" style="margin-top: -10px;height: 120px;"/>
<div class="publish"><div class="iconPub"></div><div class="btnText">发布</div></div>
</template>
<!-- <div class="split"></div> -->
<div class="noticeTitle">
<!-- <div class="notitle"><span class="titlespan">公告</span></div> -->
<div class="switch">
<a-switch v-model:checked="noticeChecked" size="small" /><span
style="margin-left: 16px"
>开启</span
>
</div>
<template v-if="noticeChecked">
<p>公告内容</p>
<a-textarea
v-model:value="noticeContent"
:maxlength="150"
placeholder="公告信息最多输入150个字"
style="margin-top: -10px; height: 120px"
/>
<div class="publish">
<div class="iconPub"></div>
<div class="btnText" @click="pubNotice">发布</div>
</div>
</template>
</div>
</template>s
<script>
import { reactive,toRefs} from "vue";
import { message } from "ant-design-vue";
import { reactive, toRefs, onMounted } from "vue";
import { getTask } from "../../api/indexTaskadd";
import { editProj } from "../../api/indexTaskadd";
export default {
name: "NoticePub",
setup(){
const state = reactive({
name: "NoticePub",
props: {
projectId: {
type: Number,
default: null,
},
},
setup(props) {
const state = reactive({
noticeChecked: true,
projectInfo: {},
noticeContent: "",
});
return{
const getTaskInfo = () => {
getTask({ projectId: props.projectId }).then((res) => {
console.log("公告获取项目", res.data.data.projectInfo);
state.projectInfo = res.data.data.projectInfo;
});
};
const pubNotice = () => {
if (state.noticeContent == "") {
message.destroy();
return message.warning("请输入公告内容");
} else {
let result = state.projectInfo;
let obj = {
attach: result.attach,
beginTime: result.beginTime,
boeFlag: result.boeFlag,
category: result.category,
courseSyncFlag: result.courseSyncFlag,
endTime: result.endTime,
level: result.level,
manager: result.manager,
managerId: result.managerId,
name: result.name,
notice: state.noticeContent,
noticeFlag: 1,
parentId: result.parentId,
picUrl: result.picUrl,
projectId: result.projectId,
remark: result.remark,
sourceBelongId: result.sourceBelongId,
status: result.status,
systemId: result.systemId,
templateId: result.templateId,
type: result.type,
};
// console.log(result, obj, result.type);
editProj(obj)
.then((res) => {
message.destroy();
message.success("发布成功", res);
state.noticeContent = null;
})
.catch((err) => {
message.destroy();
message.warning("发布失败");
console.log(err);
});
}
};
onMounted(() => {
getTaskInfo();
});
return {
...toRefs(state),
}
}
}
getTaskInfo,
pubNotice,
};
},
};
</script>
<style lang="scss">
.noticeTitle {
margin-left: 32px;
margin-right: 32px;
padding-top: 20px;
.notitle{
height: 55px;
border-bottom:1px solid #ededed;
position: relative;
.titlespan{
font-size: 18px;
position: absolute;
left: 0;
bottom: 0px;
}
}
.switch{
display: flex;
align-items: center;
height: 90px;
}
.publish {
width: 100px;
height:38px;
background: rgb(64, 158, 255);
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
float: right;
margin-top: 24px;
margin-bottom: 60px;
margin-right: 20px;
cursor: pointer;
.iconPub {
width: 15px;
height: 15px;
background-image: url(@/assets/images/taskpage/pub0.png);
background-size: 100% 100%;
color: rgb(255, 255, 255);
}
.btnText {
font-size: 14px;
font-weight: 400;
color: rgb(255, 255, 255);
line-height: 36px;
margin-left: 5px;
}
}
.noticeTitle {
margin-left: 32px;
margin-right: 32px;
// padding-top: 20px;
.notitle {
height: 55px;
border-bottom: 1px solid #ededed;
position: relative;
.titlespan {
font-size: 18px;
position: absolute;
left: 0;
bottom: 0px;
}
}
.switch {
display: flex;
align-items: center;
height: 90px;
}
.publish {
width: 100px;
height: 38px;
background: rgb(64, 158, 255);
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
float: right;
margin-top: 24px;
margin-bottom: 60px;
margin-right: 20px;
cursor: pointer;
.iconPub {
width: 15px;
height: 15px;
background-image: url(@/assets/images/taskpage/pub0.png);
background-size: 100% 100%;
color: rgb(255, 255, 255);
}
.btnText {
font-size: 14px;
font-weight: 400;
color: rgb(255, 255, 255);
line-height: 36px;
margin-left: 5px;
}
}
}
</style>

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,
};
},
};