feat:增加小组管理页面

This commit is contained in:
lixg
2023-01-31 13:41:31 +08:00
14 changed files with 1589 additions and 1260 deletions

View File

@@ -191,7 +191,7 @@
<a-tab-pane key="1" tab="概览">
<div class="split"></div>
<!-- 概览(无数据) -->
<div v-if="!hasTask">
<div v-if="!hasTask">
<div class="onerow">
<div class="taskmain">快速创建项目详情</div>
</div>
@@ -266,7 +266,7 @@
</div>
<!-- 概览(无数据) -->
<!-- 概览(有数据) -->
<div v-if="hasTask">
<div v-if="hasTask">
<div class="onerow">
<div class="taskmain">项目概览</div>
</div>
@@ -326,15 +326,15 @@
</div> -->
<div class="stagemess">
<div
v-for="(item,index) in stageList"
v-for="(item, index) in stageList"
:class="{
stage1: index === choosedStageIndex,
stage2: index !== choosedStageIndex,
}"
:key="item.stageId"
@click="stageChange(item,index)"
@click="stageChange(item, index)"
>
{{ item.name || '无阶段' }}
{{ item.name || "无阶段" }}
</div>
<!-- <div class="stage1">阶段1</div>
<div class="stage2">阶段2</div> -->
@@ -348,7 +348,9 @@
<a-progress
type="dashboard"
gapDegree="0"
:percent="stageOverviewList[choosedStageIndex]?.completeCourseRatio"
:percent="
stageOverviewList[choosedStageIndex]?.completeCourseRatio
"
:width="140"
/>
<div class="protext">课程完成率</div>
@@ -357,7 +359,9 @@
<a-progress
type="dashboard"
gapDegree="0"
:percent="stageOverviewList[choosedStageIndex]?.completeExamRatio"
:percent="
stageOverviewList[choosedStageIndex]?.completeExamRatio
"
:width="140"
/>
<div class="protext">考试通过率</div>
@@ -378,7 +382,9 @@
<div class="proright1">
<span class="textpro">阶段任务总数</span>
<a-progress
:percent="stageOverviewList[choosedStageIndex]?.totalTaskCnt"
:percent="
stageOverviewList[choosedStageIndex]?.totalTaskCnt
"
style="width: 369px"
/>
</div>
@@ -540,17 +546,27 @@
</div>
<div class="progress">
<div class="progresstext">
{{item.finishStuCnt || 0 }}/{{item.totalStuCnt || 0}}人
{{ item.finishStuCnt || 0 }}/{{
item.totalStuCnt || 0
}}人
</div>
<div style="display: flex">
<a-progress
:showInfo="false"
:percent="parseInt((item.finishStuCnt / item.totalStuCnt) * 100)"
:percent="
parseInt(
(item.finishStuCnt / item.totalStuCnt) * 100
)
"
strokeColor="#FFC067"
trailColor="rgba(253, 209, 98, 0.2)"
/>
<span class="progresstext" style="margin-left: 10px"
>{{parseInt((item.finishStuCnt / item.totalStuCnt) * 100) || 0 }}%</span
>{{
parseInt(
(item.finishStuCnt / item.totalStuCnt) * 100
) || 0
}}%</span
>
</div>
</div>
@@ -567,7 +583,7 @@
<div
class="operation"
style="cursor: pointer"
@click="showAA(item.name)"
@click="showAA(item.type, item.name, item)"
v-if="item.type == 6 || item.type == 9"
>
考勤
@@ -701,35 +717,117 @@
:visable="tabFlag"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
</div>
<div
@click="settingTopFlag(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
{{ record.topFlag ? "取消优秀" : "优秀学员" }}
</div>
</div>
<a-button @click="showStudent(record)" type="link"
>查看</a-button
>
<a-button @click="settingTopFlag(record)" type="link">{{
record.topFlag ? "取消优秀" : "优秀学员"
}}</a-button>
</template>
</TableStudent>
</a-tab-pane>
<a-tab-pane key="9" tab="小组管理" force-render>
<div class="group">
<div class="groupleft">
<div class="groupname">小组名称:</div>
<a-input
v-model:value="valuestugn"
placeholder="请输入小组名称"
/>
</div>
<div class="groupright">
<div class="btn1" @click="searchGroup">
<img src="../../assets/images/courseManage/search0.png" />
<span class="btn1text">搜索</span>
</div>
<div class="btn2" @click="resetGroupName">
<img src="../../assets/images/courseManage/reset1.png" />
<span class="btn2text">重置</span>
</div>
</div>
</div>
<div class="second2">
<div class="btn1" @click="showModal2(1, null)">
<img src="../../assets/images/courseManage/add0.png" />
<span class="btn1text">创建小组</span>
</div>
<div class="btn2" @click="showSubset">
<img src="../../assets/images/courseManage/reset2.png" />
<span class="btn2text">随机分组</span>
</div>
<div class="btn2">
<span class="btn2text">导出小组</span>
</div>
<div class="btn2">
<span class="btn2text">导入小组长</span>
</div>
</div>
<!-- 小组列表 -->
<div class="groupmain">
<div
class="groupbox"
v-for="item in groupList"
:key="item.projectGroupId"
>
<div style="width: 90%">
<div class="grouptitle">
<div class="goodgruop">{{ item.groupName }}</div>
<div class="more">
<span
style="color: rgba(0, 0, 0, 0.45); cursor: pointer"
>. . .</span
>
<div class="moreItems">
<div class="sammo" @click="showModal2(2, item)">
编辑
</div>
<div
class="sammo"
@click="deleteGroupBtn(item.projectGroupId)"
>
删除
</div>
</div>
</div>
</div>
<div class="leader">组长:{{ item.leaderName }}</div>
<div class="grocenter">
<div class="leader1">进度</div>
<a-progress :percent="item.completeRatio" />
</div>
<div
class="grofooter"
@click="showMemberList(item.projectGroupId)"
>
<div class="ftext">组员名单 ></div>
<div class="peoples">
<div class="people1">
<img
src="../../assets/images/taskpage/people1.png"
/>
</div>
<div class="people2">
<img
src="../../assets/images/taskpage/people2.png"
/>
</div>
<div class="people3">
<img
src="../../assets/images/taskpage/people3.png"
/>
</div>
<div class="people4">
<img
src="../../assets/images/taskpage/people4.png"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</a-tab-pane>
</a-tabs>
</div>
</a-tab-pane>
@@ -747,11 +845,9 @@
</a-tab-pane>
</a-tabs>
</a-tab-pane>
<!-- 2022-11-30注释 后面放开 -->
<a-tab-pane key="5" tab="项目积分">
<ProjectScore :projectId="projectId"></ProjectScore>
</a-tab-pane>
<!-- 2022-11-30注释 后面放开 -->
<a-tab-pane key="6" tab="排行榜">
<div class="split"></div>
<div class="content6">
@@ -759,7 +855,6 @@
<div class="line"></div>
<div class="search">
<div class="left">
<div class="time">
<div class="text">选择时间:</div>
<a-range-picker
@@ -870,38 +965,112 @@
<a-tab-pane key="7" tab="证书">
<div class="split"></div>
<!-- 没有证书显示的页面 -->
<div v-if="3>7" style="display:flex; justify-content:center; align-items:center;height: 600px;flex-direction:column;">
<div
v-if="3 > 7"
style="
display: flex;
justify-content: center;
align-items: center;
height: 600px;
flex-direction: column;
"
>
<img
src="@/assets/images/nodata.png"
style=" width: 212px; height: 212px;"
style="width: 212px; height: 212px"
alt=""
/>
<button class="xkbtn11" @click="addCertificate">
添加证书
</button>
/>
<button class="xkbtn11" @click="addCertificate">添加证书</button>
</div>
<!-- 有证书显示的页面 -->
<div v-else style="padding: 36px; display: flex;min-height: 400px;">
<div style="width:170px;height:200px;border:1px solid #b1b3b8;display: flex;justify-content: center;align-items: center;color: #4ea6ff;cursor: pointer;" @click="addCertificate">
<div v-else style="padding: 36px; display: flex; min-height: 400px">
<div
style="
width: 170px;
height: 200px;
border: 1px solid #b1b3b8;
display: flex;
justify-content: center;
align-items: center;
color: #4ea6ff;
cursor: pointer;
"
@click="addCertificate"
>
<div class="ant-upload-text">+添加证书</div>
</div>
<div style="width:170px;height:200px;border:1px solid #b1b3b8;margin-left: 32px;display: flex;justify-content: center;align-items: center;flex-direction:column;">
<img
<div
style="
width: 170px;
height: 200px;
border: 1px solid #b1b3b8;
margin-left: 32px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
"
>
<img
@click="previewPic"
style="cursor:pointer"
style="cursor: pointer"
width="140"
height="160"
src="https://picb6.photophoto.cn/32/552/32552236_1.jpg" alt="" srcset="">
<div style="display:flex;height: 26px;justify-content: space-around;align-items: center;">
<div style="font-size:14px; width: 85px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">培训认证证书</div>
<div style="font-size:12px;color:#999;width:50px;margin-left: 6px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">完成项目</div>
<div style="cursor:pointer;position: relative;">
src="https://picb6.photophoto.cn/32/552/32552236_1.jpg"
alt=""
srcset=""
/>
<div
style="
display: flex;
height: 26px;
justify-content: space-around;
align-items: center;
"
>
<div
style="
font-size: 14px;
width: 85px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>
培训认证证书
</div>
<div
style="
font-size: 12px;
color: #999;
width: 50px;
margin-left: 6px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>
完成项目
</div>
<div style="cursor: pointer; position: relative">
...
<div style="position:absolute;width: 45px;height: 60px;background: #fff;display: flex;flex-direction: column;justify-content: center;align-items: center;border: 1px solid #b1b3b8;">
<div style="font-size:12px;color:#999">查看</div>
<div style="font-size:12px;color:#999">编辑</div>
<div style="font-size:12px;color:#999">删除</div>
<div
style="
position: absolute;
width: 45px;
height: 60px;
background: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 1px solid #b1b3b8;
"
>
<div style="font-size: 12px; color: #999">查看</div>
<div style="font-size: 12px; color: #999">编辑</div>
<div style="font-size: 12px; color: #999">删除</div>
</div>
</div>
</div>
@@ -1019,7 +1188,7 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="13" tab="共享文档">
<div class="sametab">
<div class="Gcon">
@@ -1051,7 +1220,13 @@
>
<img
src="@/assets/images/basicinfo/cloud.png"
style="cursor: pointer; width: 24px; height: 24px; margin-left: 8px;margin-bottom: 3px;"
style="
cursor: pointer;
width: 24px;
height: 24px;
margin-left: 8px;
margin-bottom: 3px;
"
alt=""
/>
</a-upload>
@@ -1086,26 +1261,74 @@
"
alt=""
/> -->
<img v-if="
item.name.indexOf('jpg') !== -1 ||
item.name.indexOf('jpeg') !== -1 ||
item.name.indexOf('png') !== -1
"
style="width: 27px;height: 32px;margin-right: 40px;"
src="@/assets/images/coursewareManage/pngpic.png" />
<img
v-if="
item.name.indexOf('jpg') !== -1 ||
item.name.indexOf('jpeg') !== -1 ||
item.name.indexOf('png') !== -1
"
style="width: 27px; height: 32px; margin-right: 40px"
src="@/assets/images/coursewareManage/pngpic.png"
/>
<div v-else>
<img v-if="item.name.indexOf('doc') !== -1" style="width: 27px;height: 32px;margin-right: 40px;" src="@/assets/images/coursewareManage/docpic.png" />
<img
v-if="item.name.indexOf('doc') !== -1"
style="
width: 27px;
height: 32px;
margin-right: 40px;
"
src="@/assets/images/coursewareManage/docpic.png"
/>
<div v-else>
<img v-if="item.name.indexOf('xls') !== -1" style="width: 27px;height: 32px;margin-right: 40px;" src="@/assets/images/coursewareManage/xlspic.png" />
<img
v-if="item.name.indexOf('xls') !== -1"
style="
width: 27px;
height: 32px;
margin-right: 40px;
"
src="@/assets/images/coursewareManage/xlspic.png"
/>
<div v-else>
<img v-if="item.name.indexOf('ppt') !== -1" style="width: 27px;height: 32px;margin-right: 40px;" src="@/assets/images/coursewareManage/pptpic.png" />
<img
v-if="item.name.indexOf('ppt') !== -1"
style="
width: 27px;
height: 32px;
margin-right: 40px;
"
src="@/assets/images/coursewareManage/pptpic.png"
/>
<div v-else>
<img v-if="item.name.indexOf('pdf') !== -1" style="width: 27px;height: 32px;margin-right: 40px;" src="@/assets/images/coursewareManage/pdfpic.png" />
<img
v-if="item.name.indexOf('pdf') !== -1"
style="
width: 27px;
height: 32px;
margin-right: 40px;
"
src="@/assets/images/coursewareManage/pdfpic.png"
/>
<div v-else>
<img v-if="item.name.indexOf('zip') !== -1"
style="width: 27px;height: 32px;margin-right: 40px;"
src="@/assets/images/coursewareManage/zippic.png" />
<img v-else style="width: 27px;height: 32px;margin-right: 40px;" src="@/assets/images/coursewareManage/docpic.png" />
<img
v-if="item.name.indexOf('zip') !== -1"
style="
width: 27px;
height: 32px;
margin-right: 40px;
"
src="@/assets/images/coursewareManage/zippic.png"
/>
<img
v-else
style="
width: 27px;
height: 32px;
margin-right: 40px;
"
src="@/assets/images/coursewareManage/docpic.png"
/>
</div>
</div>
</div>
@@ -1123,10 +1346,16 @@
:title="item.name"
>{{ item.name }}</span
>
<a
<a
href="javascript:void(0);"
@click="downloadFile(item.response ? item.response.data : '')"
style="margin-left: 5px">下载</a>
@click="
downloadFile(
item.response ? item.response.data : ''
)
"
style="margin-left: 5px"
>下载</a
>
<span
style="color: #4ea6ff; float: right; cursor: pointer"
@click="deFile(item.uid)"
@@ -1138,7 +1367,6 @@
</div>
</div>
</a-tab-pane>
</a-tabs>
</a-tab-pane>
</a-tabs>
@@ -1184,7 +1412,7 @@
<!-- 投票管理抽屉 -->
<ProjectVoteManage
v-model:ProjectVoteModelVisible="projectVoteModelVisible"
:title="voteModelVisibleTitle"
:title="voteModelVisibleTitle"
:levelName="voteLevelName"
:datasource="voteData"
/>
@@ -1196,16 +1424,12 @@
:itemsType="evaltype"
:datasource="evalData"
/>
<!-- 添加证书抽屉 -->
<AddCertificate
v-model:ACertificate="ACertificate"
/>
<AddCertificate v-model:ACertificate="ACertificate" />
<!-- 创建证书抽屉 -->
<CreateCertificate
v-model:CCertificate="CCertificate"
/>
<CreateCertificate v-model:CCertificate="CCertificate" />
<!-- 预览 -->
<a-modal
@@ -1213,12 +1437,15 @@
width="60%"
:footer="null"
v-model:visible="modal1Visible"
style="display:flex; justify-content:center; align-items:center;"
style="display: flex; justify-content: center; align-items: center"
@ok="setModal1Visible(false)"
>
<img
:width="screenWidth*0.55"
src="https://picb6.photophoto.cn/32/552/32552236_1.jpg" alt="" srcset="">
<img
:width="screenWidth * 0.55"
src="https://picb6.photophoto.cn/32/552/32552236_1.jpg"
alt=""
srcset=""
/>
</a-modal>
<!-- 学员(小组管理)创建小组抽屉 -->
@@ -1262,11 +1489,13 @@
v-model:FSvisible="FSvisible"
:projectTaskInfo="facestudent"
/>
<!-- 活动考勤抽屉 -->
<!-- 活动直播考勤抽屉 -->
<active-attendance
v-model:AAvisible="AAvisible"
:title="showkaoqinText"
classify="1"
:datasource="liveData"
:title="showKaoqinText"
types="2"
classify="2"
/>
<!-- 批量面授报名 -->
@@ -1825,9 +2054,9 @@ import ProjectFaceTaskManage from "../../components/drawers/project/ProjectFaceT
import ProjectOnlineManage from "../../components/drawers/project/ProjectOnlineManage";
import ProjectHomeWorkManage from "../../components/drawers/project/ProjectHomeWorkManage";
import ProjectExamManage from "../../components/drawers/project/ProjectExamManage";
import ProjectEvalManage from "../../components/drawers/project/ProjectEvalManage";
import AddCertificate from "../../components/drawers/project/AddCertificate";
import CreateCertificate from "../../components/drawers/project/CreateCertificate";
import ProjectEvalManage from "../../components/drawers/project/ProjectEvalManage";
import AddCertificate from "../../components/drawers/project/AddCertificate";
import CreateCertificate from "../../components/drawers/project/CreateCertificate";
import ProjectVoteManage from "../../components/drawers/project/ProjectVoteManage";
import SubsetManage from "../../components/drawers/SubsetManage";
@@ -1899,17 +2128,17 @@ export default {
TableStudent,
AddCertificate,
CreateCertificate,
ProjectVoteManage
ProjectVoteManage,
},
setup() {
const store = useStore();
const route = useRoute();
const state = reactive({
screenHeight: document.body.clientHeight,
screenWidth: document.body.clientWidth,
screenHeight: document.body.clientHeight,
screenWidth: document.body.clientWidth,
editRecord: {},
choosedStageIndex:0,
hasTask:false,
choosedStageIndex: 0,
hasTask: false,
tabFlag: true,
stage: [],
stuColumns: [
@@ -1923,7 +2152,7 @@ export default {
ellipsis: true,
customRender: ({ record }) => (
<div>
{record.finishTaskNum|| 0}/{record.totalTaskNum || 0}
{record.finishTaskNum || 0}/{record.totalTaskNum || 0}
</div>
),
},
@@ -1937,7 +2166,11 @@ export default {
ellipsis: true,
customRender: ({ record }) => (
<div>
{record.finishTaskNum ==0?"未开始":record.finishTaskNum == record.totalTaskNum?"已完成":"进行中"}
{record.finishTaskNum == 0
? "未开始"
: record.finishTaskNum == record.totalTaskNum
? "已完成"
: "进行中"}
</div>
),
},
@@ -2047,7 +2280,7 @@ export default {
projectVoteModelVisible: false, // 投票管理
TMvisible: false, //考试管理
Evalvisible: false, //测评管理
ACertificate: false, //证书添加
ACertificate: false, //证书添加
CCertificate: false, //证书创建
Stuvisible: false, //添加学员
Importvisible: false, //导入学员
@@ -2536,7 +2769,8 @@ export default {
//直播、面授传递title
showWorkText: "",
//直播、活动页面传递参数
showkaoqinText: "",
showkaoqinText: "直播",
liveData: "",
//所有抽屉的传过去的type
itemstype: null,
@@ -2588,8 +2822,8 @@ export default {
evaltype: "",
evalData: "",
voteData: "",
voteModelVisibleTitle:'',
voteLevelName:'',
voteModelVisibleTitle: "",
voteLevelName: "",
facestudent: "",
modal1Visible: false, // 证书预览
@@ -2614,7 +2848,7 @@ export default {
totalTaskCnt: 0,
totalReqCnt: 0,
totalOptCnt: 0,
}
},
],
stageList: [
// 阶段列表
@@ -2655,7 +2889,7 @@ export default {
}
}
}
levelList.stageList = res.data.data.stageList
levelList.stageList = res.data.data.stageList;
//暂时传个固定的id用 到时候看数据里面是否有在更换
// state.projectTaskId = res.data.data.stageList[0].taskList[0].projectTaskId
let leng = res.data.data.stageList.length;
@@ -2869,9 +3103,18 @@ export default {
state.chooseGroupId = id;
};
//活动考勤的抽屉
const showAA = (title) => {
{
/* const showAA = (title) => {
state.AAvisible = true;
state.showkaoqinText = title;
}; */
}
//考勤的抽屉
const showAA = (course, a, data) => {
state.AAvisible = true;
state.liveData = data;
state.showKaoqinText = "直播";
console.log(state.showKaoqinText, 1111, data);
};
//作业管理的抽屉
const showWork = (name, id, item) => {
@@ -2880,14 +3123,16 @@ export default {
state.projectTaskId = id;
state.projectTaskInfo = item;
};
{/* 直播管理的抽屉 */}
{
/* 直播管理的抽屉 */
}
const showVote = (name, id, data) => {
console.log(name, id, data)
console.log(name, id, data);
state.projectVoteModelVisible = true;
state.voteData = data;
state.voteModelVisibleTitle = name;
state.voteLevelName = '无阶段任务';
}
state.voteLevelName = "无阶段任务";
};
//考试管理的抽屉
const showTest = (name, id, data) => {
state.examData = data;
@@ -3623,7 +3868,9 @@ export default {
state.noticeFlag = info.noticeFlag;
state.switchopen = info.attachSwitch == 1 ? true : false;
state.docChecked = info.attachSwitch == 1 ? true : false;
state.hasTask = !!res.data.data?.stageList.some(({taskList})=>taskList.length);
state.hasTask = !!res.data.data?.stageList.some(
({ taskList }) => taskList.length
);
// state.attach = info.attach;
// state.templateId = info.templateId;
state.sourceBelong =
@@ -4246,9 +4493,9 @@ export default {
// 共享文档文件下载
const downloadFile = (url) => {
console.log(url)
if(url){
window.open(url)
console.log(url);
if (url) {
window.open(url);
}
// if(url){
// const filename = '操作指南'
@@ -4265,14 +4512,16 @@ export default {
// }
// x.send()
// }
}
function stageChange(item,index){
state.choosedStageId = item.stageId
};
function stageChange(item, index) {
state.choosedStageId = item.stageId;
state.choosedStageIndex = index;
}
{/* 证书 */}
function addCertificate(){
{
/* 证书 */
}
function addCertificate() {
state.ACertificate = true;
}
@@ -4390,7 +4639,7 @@ export default {
checkType,
downloadFile,
addCertificate,
previewPic
previewPic,
};
},
};
@@ -5966,7 +6215,7 @@ export default {
.groupright {
display: flex;
margin-left: 48px;
.btn1 {
width: 100px;
height: 40px;