mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 17:26:46 +08:00
feat:增加小组导入导出
This commit is contained in:
@@ -725,7 +725,7 @@
|
||||
<a-button @click="settingTopFlag(record)" type="link">{{
|
||||
record.topFlag ? "取消优秀" : "优秀学员"
|
||||
}}</a-button>
|
||||
<a-button type="link" @click="showChangeGroupModal()"
|
||||
<a-button type="link" @click="showChangeGroupModal(record)"
|
||||
>换组</a-button
|
||||
>
|
||||
</template>
|
||||
@@ -761,10 +761,10 @@
|
||||
<img src="../../assets/images/courseManage/reset2.png" />
|
||||
<span class="btn2text">随机分组</span>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="btn2" @click="exportGroup">
|
||||
<span class="btn2text">导出小组</span>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="btn2" @click="importGroupLeader">
|
||||
<span class="btn2text">导入小组长</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -806,7 +806,7 @@
|
||||
@click="showMemberList(item.projectGroupId)"
|
||||
>
|
||||
<div class="ftext">组员名单 ></div>
|
||||
<div class="peoples">
|
||||
<!-- <div class="peoples">
|
||||
<div class="people1">
|
||||
<img
|
||||
src="../../assets/images/taskpage/people1.png"
|
||||
@@ -827,7 +827,7 @@
|
||||
src="../../assets/images/taskpage/people4.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1676,6 +1676,24 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="star" style="margin-top: -4px">
|
||||
<img
|
||||
style="width: 10px; height: 10px"
|
||||
src="../../assets/images/basicinfo/asterisk.png"
|
||||
/>
|
||||
</div>
|
||||
<div class="inname">组员人数:</div>
|
||||
<div class="in">
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
style="width: 395px; height: 40px; border-radius: 8px"
|
||||
v-model:value="groupNumber"
|
||||
></a-input-number>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="star" style="margin-top: -4px">
|
||||
<img
|
||||
@@ -2092,8 +2110,18 @@
|
||||
<!-- 二维码弹窗 -->
|
||||
|
||||
<!-- 换组弹窗 -->
|
||||
<ChangeGroupModal v-model:changegroupV="changegroupV" />
|
||||
<ChangeGroupModal
|
||||
v-model:changegroupV="changegroupV"
|
||||
:groupList="groupList"
|
||||
:checkgroupStuId="checkgroupStuId"
|
||||
/>
|
||||
<!-- 换组弹窗 -->
|
||||
<!-- 导入小组长 -->
|
||||
<ImpoterGroupLeader
|
||||
v-model:ImpoterGroupLeaderV="ImpoterGroupLeaderV"
|
||||
:projectId="projectId"
|
||||
/>
|
||||
<!-- 导入小组长 -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -2154,7 +2182,7 @@ import TableCertificateStudent from "@/components/student/TableCertificateStuden
|
||||
import { getStuPage } from "@/api/index1";
|
||||
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
|
||||
import ImpoterGroupLeader from "@/components/drawers/project/ImpoterGroupLeader.vue";
|
||||
export default {
|
||||
name: "taskPage",
|
||||
components: {
|
||||
@@ -2189,6 +2217,7 @@ export default {
|
||||
CreateCertificate,
|
||||
ProjectVoteManage,
|
||||
ChangeGroupModal,
|
||||
ImpoterGroupLeader,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore();
|
||||
@@ -2380,6 +2409,7 @@ export default {
|
||||
inputValue3: 5,
|
||||
valueaddm: "", //创建小组输入小组长
|
||||
valueaddg: "", //创建小组输入名称
|
||||
groupNumber: 0, //组员人数
|
||||
valuestun: "", //学员管理姓名
|
||||
valuegood: "",
|
||||
valuestub: "", //学员管理部门
|
||||
@@ -2532,7 +2562,7 @@ export default {
|
||||
},
|
||||
],
|
||||
//学时排行表
|
||||
studytimeRankLoading:true,
|
||||
studytimeRankLoading: true,
|
||||
xueshitabledata: [],
|
||||
xueshitablecolumns: [
|
||||
{
|
||||
@@ -2741,7 +2771,8 @@ export default {
|
||||
|
||||
modal1Visible: false, // 证书预览
|
||||
changegroupV: false, //换组弹窗
|
||||
|
||||
checkgroupStuId: null, //换组id
|
||||
ImpoterGroupLeaderV: false, //导入小组长抽屉
|
||||
certificatelist: [],
|
||||
fileUrl: process.env.VUE_APP_FILE_PATH,
|
||||
});
|
||||
@@ -2761,11 +2792,11 @@ export default {
|
||||
const jdSelectChange1 = (e) => {
|
||||
console.log(e);
|
||||
completionRank();
|
||||
}
|
||||
};
|
||||
const xsSelectChange = (e) => {
|
||||
console.log(e)
|
||||
console.log(e);
|
||||
studytimeRank();
|
||||
}
|
||||
};
|
||||
//项目积分榜单
|
||||
const scoreRank = (period, type) => {
|
||||
state.scoreRankLoading = true;
|
||||
@@ -2821,8 +2852,8 @@ export default {
|
||||
state.processRankLoading = true;
|
||||
let obj = {
|
||||
projectId: state.projectId, // 项目id
|
||||
startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳
|
||||
endTime: state.rankEndTime?state.rankEndTime:0,
|
||||
startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳
|
||||
endTime: state.rankEndTime ? state.rankEndTime : 0,
|
||||
stageId: state.valuestu2, // 阶段ID
|
||||
type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜
|
||||
};
|
||||
@@ -2852,28 +2883,30 @@ export default {
|
||||
state.studytimeRankLoading = true;
|
||||
let obj = {
|
||||
projectId: state.projectId, // 项目id
|
||||
startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳
|
||||
endTime: state.rankEndTime?state.rankEndTime:0,
|
||||
startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳
|
||||
endTime: state.rankEndTime ? state.rankEndTime : 0,
|
||||
type: Number(state.valuestu4), // 查询类型 0 学员积分榜 1 小组积分榜
|
||||
}
|
||||
};
|
||||
|
||||
console.log('我是获取得项目学时排行榜--》', obj)
|
||||
api.studytimeRank(obj).then(res=>{
|
||||
console.log('项目学时榜单获取',res)
|
||||
if(res.data.datas){
|
||||
state.xueshitabledata = res.data.datas;
|
||||
state.studytimeRankLoading = false;
|
||||
}else{
|
||||
console.log("我是获取得项目学时排行榜--》", obj);
|
||||
api
|
||||
.studytimeRank(obj)
|
||||
.then((res) => {
|
||||
console.log("项目学时榜单获取", res);
|
||||
if (res.data.datas) {
|
||||
state.xueshitabledata = res.data.datas;
|
||||
state.studytimeRankLoading = false;
|
||||
} else {
|
||||
state.xueshitabledata = [];
|
||||
state.studytimeRankLoading = false;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
state.xueshitabledata = [];
|
||||
state.studytimeRankLoading = false;
|
||||
}
|
||||
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.xueshitabledata = [];
|
||||
state.studytimeRankLoading = false;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 排行榜 - end
|
||||
|
||||
@@ -3106,9 +3139,10 @@ export default {
|
||||
};
|
||||
|
||||
//显示学员换组弹窗
|
||||
const showChangeGroupModal = () => {
|
||||
const showChangeGroupModal = (record) => {
|
||||
state.changegroupV = true;
|
||||
console.log("点击换组", state.changegroupV);
|
||||
console.log("点击换组", record.studentId);
|
||||
state.checkgroupStuId = record.studentId;
|
||||
};
|
||||
|
||||
const showModal2 = (classify, item) => {
|
||||
@@ -3119,6 +3153,7 @@ export default {
|
||||
console.log("item", item);
|
||||
if (item) {
|
||||
state.valueaddg = item.groupName;
|
||||
state.groupNumber = item.groupMemberCount;
|
||||
state.stuGroupName = item.leaderName;
|
||||
state.stuGroupId = item.leaderId;
|
||||
}
|
||||
@@ -3127,6 +3162,7 @@ export default {
|
||||
const closeModal2 = () => {
|
||||
state.stugroup = false;
|
||||
state.valueaddg = null;
|
||||
state.groupNumber = 0;
|
||||
state.stuGroupName = null;
|
||||
state.stuGroupId = null;
|
||||
state.projectGroupId = null;
|
||||
@@ -3134,7 +3170,11 @@ export default {
|
||||
};
|
||||
//点击确定创建小组
|
||||
const createG = () => {
|
||||
if (state.stuGroupName == "" || state.valueaddg == "") {
|
||||
if (
|
||||
state.stuGroupName == "" ||
|
||||
state.valueaddg == "" ||
|
||||
state.groupNumber == null
|
||||
) {
|
||||
message.destroy();
|
||||
return message.warning("请输入必填项");
|
||||
} else {
|
||||
@@ -3628,7 +3668,6 @@ export default {
|
||||
completionRank();
|
||||
// 获取学时排行榜
|
||||
studytimeRank();
|
||||
|
||||
} else if (e == 3) {
|
||||
state.tabFlag = true;
|
||||
} else {
|
||||
@@ -3821,6 +3860,7 @@ export default {
|
||||
groupName: value.groupName, //小组名称
|
||||
leaderId: value.leaderId, //组长id
|
||||
leaderName: value.leaderName, //组长名称
|
||||
groupMemberCount: value.groupMemberCount, //组员人数
|
||||
source: value.source == 1 ? "指定添加" : "随机分组",
|
||||
completeTaskCnt: value.completeTaskCnt, //完成任务数
|
||||
totalTaskCnt: value.totalTaskCnt, //累计任务数
|
||||
@@ -4051,6 +4091,7 @@ export default {
|
||||
if (state.stuMemberClassify === 1) {
|
||||
let obj = {
|
||||
groupName: state.valueaddg,
|
||||
groupMemberCount: state.groupNumber,
|
||||
leaderId: state.stuGroupId,
|
||||
leaderName: state.stuGroupName,
|
||||
// projectGroupId: 0,
|
||||
@@ -4073,6 +4114,7 @@ export default {
|
||||
if (state.stuMemberClassify === 2) {
|
||||
let obj = {
|
||||
groupName: state.valueaddg,
|
||||
groupMemberCount: state.groupNumber,
|
||||
leaderId: state.stuGroupId,
|
||||
leaderName: state.stuGroupName,
|
||||
projectGroupId: state.projectGroupId,
|
||||
@@ -4115,6 +4157,16 @@ export default {
|
||||
console.log(data);
|
||||
getStu();
|
||||
};
|
||||
//导入小组长
|
||||
const importGroupLeader = () => {
|
||||
state.ImpoterGroupLeaderV = true;
|
||||
};
|
||||
//导出小组
|
||||
const exportGroup = () => {
|
||||
window.open(
|
||||
`${process.env.VUE_APP_BASE_API}/admin/studentGroup/exportGroup/${state.projectId}`
|
||||
);
|
||||
};
|
||||
//end---------学员------
|
||||
|
||||
//start---------项目概览
|
||||
@@ -4652,7 +4704,9 @@ export default {
|
||||
window.location.protocol +
|
||||
process.env.VUE_APP_H5 +
|
||||
"/faceteach?type=2&courseId=" +
|
||||
item.courseId+'&id='+ item.projectTaskId;
|
||||
item.courseId +
|
||||
"&id=" +
|
||||
item.projectTaskId;
|
||||
}
|
||||
|
||||
if (item.type == 4) {
|
||||
@@ -4989,6 +5043,8 @@ export default {
|
||||
closeStartModal,
|
||||
templateProject,
|
||||
changeGrouped,
|
||||
importGroupLeader,
|
||||
exportGroup,
|
||||
deFile,
|
||||
toDate,
|
||||
routered,
|
||||
@@ -5019,8 +5075,7 @@ export default {
|
||||
jdSelectChange1,
|
||||
|
||||
studytimeRank,
|
||||
xsSelectChange
|
||||
|
||||
xsSelectChange,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user