Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
wyx
2023-01-31 16:14:22 +08:00
4 changed files with 175 additions and 27 deletions

View File

@@ -0,0 +1,94 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-12-20 17:00:37
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-01-31 15:51:36
* @FilePath: /fe-manage/src/components/student/ChangeLevelModal.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<a-modal
style="padding: 0"
:closable="true"
:visible="changegroupV"
:footer="null"
centered="true"
wrapClassName="changeModal"
>
<div class="con">
<div class="header">
<div class="inhe">
<div class="mod"></div>
<div class="tz">换组</div>
<div class="mg" @click="closeChangeModal"></div>
</div>
</div>
<div class="mid">
<div class="inher">
<!-- <div class="cur">当前关卡关卡2</div> -->
<div class="select">
<a-select
v-model:value="selectStage"
style="width: 100%"
placeholder="请选择小组"
:options="option"
allowClear
></a-select>
</div>
<div class="btn">
<button
class="sameb btn1"
@click="closeChangeModal"
style="cursor: pointer"
>
取消
</button>
<button
class="sameb btn2"
@click="changeGroup"
style="cursor: pointer"
>
确定
</button>
</div>
</div>
</div>
</div>
</a-modal>
</template>
<script setup>
import { computed, defineEmits, defineProps, ref } from "vue";
// import { moveStudent } from "@/api/index1";
// import { message } from "ant-design-vue";
const props = defineProps({
changegroupV: {
type: Boolean,
default: false,
},
stage: {
type: Array,
default: () => [],
},
ids: {
type: Array,
default: () => [],
},
});
const option = computed(() => {
return props.stage.map((e) => ({ label: e.name, value: e.id }));
});
console.log("changegroupV", props.changegroupV);
const selectStage = ref();
const emit = defineEmits({});
const closeChangeModal = () => {
emit("update:changegroupV", false);
};
//确认换组
const changeGroup = (item) => {
console.log("换组", item);
};
</script>

View File

@@ -216,12 +216,7 @@
<!-- </div>--> <!-- </div>-->
<a-space :size="2"> <a-space :size="2">
<slot name="extension" v-bind:data="{ record }"></slot> <slot name="extension" v-bind:data="{ record }"></slot>
<a-button
v-if="type === 1"
@click="updateStatus(0, record.id)"
type="link"
>换组</a-button
>
<a-button <a-button
v-if="type === 3 && record.status !== 0" v-if="type === 3 && record.status !== 0"
@click="updateStatus(0, record.id)" @click="updateStatus(0, record.id)"

View File

@@ -173,13 +173,13 @@
</div> </div>
<div class="stagemess"> <div class="stagemess">
<div <div
v-for="(item,index) in stageList" v-for="(item, index) in stageList"
:class="{ :class="{
stage1: item.stageId == choosedStageId, stage1: item.stageId == choosedStageId,
stage2: item.stageId != choosedStageId, stage2: item.stageId != choosedStageId,
}" }"
:key="item.stageId" :key="item.stageId"
@click="stageChange(item.name, item.stageId,index)" @click="stageChange(item.name, item.stageId, index)"
> >
关卡{{ item.stageId }} 关卡{{ item.stageId }}
</div> </div>
@@ -195,7 +195,9 @@
<a-progress <a-progress
type="dashboard" type="dashboard"
gapDegree="0" gapDegree="0"
:percent="chapterOverviewList[choosedStageIndex]?.completeCourseRatio" :percent="
chapterOverviewList[choosedStageIndex]?.completeCourseRatio
"
:width="140" :width="140"
/> />
<div class="protext">课程完成率</div> <div class="protext">课程完成率</div>
@@ -204,7 +206,9 @@
<a-progress <a-progress
type="dashboard" type="dashboard"
gapDegree="0" gapDegree="0"
:percent="chapterOverviewList[choosedStageIndex]?.completeExamRatio" :percent="
chapterOverviewList[choosedStageIndex]?.completeExamRatio
"
:width="140" :width="140"
/> />
<div class="protext">考试通过率</div> <div class="protext">考试通过率</div>
@@ -213,39 +217,65 @@
<a-progress <a-progress
type="dashboard" type="dashboard"
gapDegree="0" gapDegree="0"
:percent="chapterOverviewList[choosedStageIndex]?.completeRatio" :percent="
chapterOverviewList[choosedStageIndex]?.completeRatio
"
:width="140" :width="140"
/> />
<div class="protext">作业完成率</div> <div class="protext">作业完成率</div>
</div> </div>
<div class="proright"> <div class="proright">
<div class="pronub" style="margin-left: 142px"> <div class="pronub" style="margin-left: 142px">
{{ chapterOverviewList[choosedStageIndex]?chapterOverviewList[choosedStageIndex].totalTaskCnt:0 }} {{
chapterOverviewList[choosedStageIndex]
? chapterOverviewList[choosedStageIndex].totalTaskCnt
: 0
}}
</div> </div>
<div class="proright1"> <div class="proright1">
<span class="textpro">关卡任务总数</span> <span class="textpro">关卡任务总数</span>
<a-progress <a-progress
:percent="chapterOverviewList[choosedStageIndex]?chapterOverviewList[choosedStageIndex].totalTaskCnt:0" :percent="
chapterOverviewList[choosedStageIndex]
? chapterOverviewList[choosedStageIndex].totalTaskCnt
: 0
"
style="width: 369px" style="width: 369px"
/> />
</div> </div>
<div class="pronub" style="margin-left: 142px"> <div class="pronub" style="margin-left: 142px">
{{ chapterOverviewList[choosedStageIndex]?chapterOverviewList[choosedStageIndex].totalReqCnt:0 }} {{
chapterOverviewList[choosedStageIndex]
? chapterOverviewList[choosedStageIndex].totalReqCnt
: 0
}}
</div> </div>
<div class="proright1"> <div class="proright1">
<span class="textpro">必修课</span> <span class="textpro">必修课</span>
<a-progress <a-progress
:percent="chapterOverviewList[choosedStageIndex]?chapterOverviewList[choosedStageIndex].totalReqCnt:0" :percent="
chapterOverviewList[choosedStageIndex]
? chapterOverviewList[choosedStageIndex].totalReqCnt
: 0
"
style="width: 369px" style="width: 369px"
/> />
</div> </div>
<div class="pronub" style="margin-left: 142px"> <div class="pronub" style="margin-left: 142px">
{{ chapterOverviewList[choosedStageIndex]?chapterOverviewList[choosedStageIndex].totalOptCnt:0 }} {{
chapterOverviewList[choosedStageIndex]
? chapterOverviewList[choosedStageIndex].totalOptCnt
: 0
}}
</div> </div>
<div class="proright1"> <div class="proright1">
<span class="textpro">选修课</span> <span class="textpro">选修课</span>
<a-progress <a-progress
:percent="chapterOverviewList[choosedStageIndex]?chapterOverviewList[choosedStageIndex].totalOptCnt:0" :percent="
chapterOverviewList[choosedStageIndex]
? chapterOverviewList[choosedStageIndex].totalOptCnt
: 0
"
style="width: 369px" style="width: 369px"
/> />
</div> </div>
@@ -431,13 +461,19 @@
<a-progress <a-progress
:showInfo="false" :showInfo="false"
:percent=" :percent="
parseInt((item.finishStuNum / item.totalStuNum) * 100) parseInt(
(item.finishStuNum / item.totalStuNum) * 100
)
" "
strokeColor="#FFC067" strokeColor="#FFC067"
trailColor="rgba(253, 209, 98, 0.2)" trailColor="rgba(253, 209, 98, 0.2)"
/> />
<span class="progresstext" style="margin-left: 10px" <span class="progresstext" style="margin-left: 10px"
>{{parseInt((item.finishStuNum / item.totalStuNum) * 100) || 0}}%</span >{{
parseInt(
(item.finishStuNum / item.totalStuNum) * 100
) || 0
}}%</span
> >
</div> </div>
</div> </div>
@@ -1026,7 +1062,7 @@
v-model:AAvisible="AAvisible" v-model:AAvisible="AAvisible"
:datasource="liveData" :datasource="liveData"
:title="showKaoqinText" :title="showKaoqinText"
types="1" types="1"
classify="2" classify="2"
/> />
<!-- 时间管理抽屉 --> <!-- 时间管理抽屉 -->
@@ -1346,13 +1382,14 @@ export default {
RouterHomeworkManage, RouterHomeworkManage,
RouterCommonManage, RouterCommonManage,
RouterVoteManage, RouterVoteManage,
RouterProjectManage RouterProjectManage,
}, },
setup() { setup() {
const router = useRouter(); const router = useRouter();
// const store = useStore(); // const store = useStore();
const state = reactive({ const state = reactive({
hasTask:false, pjModelVisible: false,
hasTask: false,
stage: [], stage: [],
statess: [], statess: [],
routerId: storage.get("routerId") routerId: storage.get("routerId")
@@ -1812,7 +1849,7 @@ export default {
const closehuodModal = () => { const closehuodModal = () => {
state.huodModal = false; state.huodModal = false;
}; };
const stageChange = (name, id,index) => { const stageChange = (name, id, index) => {
state.choosedStageId = id; state.choosedStageId = id;
state.stateName = name; state.stateName = name;
state.choosedStageIndex = index; state.choosedStageIndex = index;
@@ -1871,7 +1908,7 @@ export default {
state.pjModelVisibleTitle = data.name; state.pjModelVisibleTitle = data.name;
state.pjData = data; state.pjData = data;
// 项目弹框名称 RouterProjectManage // 项目弹框名称 RouterProjectManage
} };
// 作业点击管理弹框 // 作业点击管理弹框
const homeworkModel = (data) => { const homeworkModel = (data) => {
console.log(data); console.log(data);
@@ -2123,13 +2160,17 @@ export default {
const reget = () => { const reget = () => {
GetRouterDetail(state.routerId, "N").then((res) => { GetRouterDetail(state.routerId, "N").then((res) => {
console.log("获取路径图详情", res); console.log("获取路径图详情", res);
console.log(!!res.data.data?.chapterList.some(({taskList})=>taskList.length)); console.log(
!!res.data.data?.chapterList.some(({ taskList }) => taskList.length)
);
state.styTitle = res.data.data.routerInfo.name; state.styTitle = res.data.data.routerInfo.name;
state.cretime = res.data.data.routerInfo.createTime; state.cretime = res.data.data.routerInfo.createTime;
state.picUrl = res.data.data.routerInfo.picUrl; state.picUrl = res.data.data.routerInfo.picUrl;
state.action = res.data.data.routerInfo.status; state.action = res.data.data.routerInfo.status;
state.remark = res.data.data.routerInfo.remark; state.remark = res.data.data.routerInfo.remark;
state.hasTask = !!res.data.data?.chapterList.some(({taskList})=>taskList.length); state.hasTask = !!res.data.data?.chapterList.some(
({ taskList }) => taskList.length
);
state.act = state.act =
state.action == 0 state.action == 0
? "发布" ? "发布"
@@ -2144,7 +2185,7 @@ export default {
const getOverview = () => { const getOverview = () => {
getRouterOverview(state.routerId) getRouterOverview(state.routerId)
.then((res) => { .then((res) => {
console.log('学习路径图概览数据获取', res); console.log("学习路径图概览数据获取", res);
Object.keys(res.data.data.routerInfoOverview).forEach((item) => { Object.keys(res.data.data.routerInfoOverview).forEach((item) => {
levelList.routerInfoOverview[item] = levelList.routerInfoOverview[item] =
res.data.data.routerInfoOverview[item] || 0; res.data.data.routerInfoOverview[item] || 0;

View File

@@ -723,6 +723,9 @@
<a-button @click="settingTopFlag(record)" type="link">{{ <a-button @click="settingTopFlag(record)" type="link">{{
record.topFlag ? "取消优秀" : "优秀学员" record.topFlag ? "取消优秀" : "优秀学员"
}}</a-button> }}</a-button>
<a-button type="link" @click="showChangeGroupModal()"
>换组</a-button
>
</template> </template>
</TableStudent> </TableStudent>
</a-tab-pane> </a-tab-pane>
@@ -2043,6 +2046,10 @@
type="课程二维码" type="课程二维码"
/> />
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
<!-- 换组弹窗 -->
<ChangeGroupModal v-model:changegroupV="changegroupV" />
<!-- 换组弹窗 -->
</div> </div>
</template> </template>
<script> <script>
@@ -2098,6 +2105,7 @@ import TrainClass from "@/components/project/TrainClass";
import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManager from "@/components/project/ProjectManagerNew";
import TableStudent from "@/components/student/TableStudent"; import TableStudent from "@/components/student/TableStudent";
import { getStuPage } from "@/api/index1"; import { getStuPage } from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
export default { export default {
name: "taskPage", name: "taskPage",
components: { components: {
@@ -2129,6 +2137,7 @@ export default {
AddCertificate, AddCertificate,
CreateCertificate, CreateCertificate,
ProjectVoteManage, ProjectVoteManage,
ChangeGroupModal,
}, },
setup() { setup() {
const store = useStore(); const store = useStore();
@@ -2827,6 +2836,8 @@ export default {
facestudent: "", facestudent: "",
modal1Visible: false, // 证书预览 modal1Visible: false, // 证书预览
changegroupV: false, //换组弹窗
}); });
const levelList = reactive({ const levelList = reactive({
@@ -3032,6 +3043,12 @@ export default {
state.canclestu1 = false; state.canclestu1 = false;
}; };
//显示学员换组弹窗
const showChangeGroupModal = () => {
state.changegroupV = true;
console.log("点击换组", state.changegroupV);
};
const showModal2 = (classify, item) => { const showModal2 = (classify, item) => {
state.stuMemberClassify = classify; state.stuMemberClassify = classify;
state.projectGroupId = state.projectGroupId =
@@ -4607,6 +4624,7 @@ export default {
searchGroup, searchGroup,
cancelyou, cancelyou,
cancelcanyou, cancelcanyou,
showChangeGroupModal,
changePaginationStu, changePaginationStu,
handleChange, handleChange,
toEdit, toEdit,