mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
--fix 项目概览
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
<a-tab-pane key="1" tab="概览">
|
||||
<div class="split"></div>
|
||||
<!-- 概览(无数据) -->
|
||||
<div :style="{ display: 'block' }">
|
||||
<div v-if="!hasTask">
|
||||
<div class="onerow">
|
||||
<div class="taskmain">快速创建路径图详情</div>
|
||||
</div>
|
||||
@@ -117,7 +117,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 概览(有数据) -->
|
||||
<div :style="{ display: 'none' }">
|
||||
<div v-if="hasTask">
|
||||
<div class="onerow">
|
||||
<div class="taskmain">关卡概览</div>
|
||||
</div>
|
||||
@@ -173,13 +173,13 @@
|
||||
</div>
|
||||
<div class="stagemess">
|
||||
<div
|
||||
v-for="item in stageList"
|
||||
v-for="(item,index) in stageList"
|
||||
:class="{
|
||||
stage1: item.stageId == choosedStageId,
|
||||
stage2: item.stageId != choosedStageId,
|
||||
}"
|
||||
:key="item.stageId"
|
||||
@click="stageChange(item.name, item.stageId)"
|
||||
@click="stageChange(item.name, item.stageId,index)"
|
||||
>
|
||||
关卡{{ item.stageId }}
|
||||
</div>
|
||||
@@ -195,7 +195,7 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="chapterOverviewList.completeCourseRatio"
|
||||
:percent="chapterOverviewList[choosedStageIndex]?.completeCourseRatio"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">课程完成率</div>
|
||||
@@ -204,7 +204,7 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="chapterOverviewList.completeExamRatio"
|
||||
:percent="chapterOverviewList[choosedStageIndex]?.completeExamRatio"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">考试通过率</div>
|
||||
@@ -213,39 +213,39 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="chapterOverviewList.completeRatio"
|
||||
:percent="chapterOverviewList[choosedStageIndex]?.completeRatio"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">作业完成率</div>
|
||||
</div>
|
||||
<div class="proright">
|
||||
<div class="pronub" style="margin-left: 280px">
|
||||
{{ chapterOverviewList.totalTaskCnt }}
|
||||
{{ chapterOverviewList[choosedStageIndex].totalTaskCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">关卡任务总数</span>
|
||||
<a-progress
|
||||
:percent="chapterOverviewList.totalTaskCnt"
|
||||
:percent="chapterOverviewList[choosedStageIndex].totalTaskCnt"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 206px">
|
||||
{{ chapterOverviewList.totalReqCnt }}
|
||||
{{ chapterOverviewList[choosedStageIndex].totalReqCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">必修课</span>
|
||||
<a-progress
|
||||
:percent="chapterOverviewList.totalReqCnt"
|
||||
:percent="chapterOverviewList[choosedStageIndex].totalReqCnt"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{ chapterOverviewList.totalOptCnt }}
|
||||
{{ chapterOverviewList[choosedStageIndex].totalOptCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">选修课</span>
|
||||
<a-progress
|
||||
:percent="chapterOverviewList.totalOptCnt"
|
||||
:percent="chapterOverviewList[choosedStageIndex].totalOptCnt"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
@@ -1357,6 +1357,7 @@ export default {
|
||||
const router = useRouter();
|
||||
// const store = useStore();
|
||||
const state = reactive({
|
||||
hasTask:false,
|
||||
stage: [],
|
||||
statess: [],
|
||||
routerId: storage.get("routerId")
|
||||
@@ -1383,6 +1384,7 @@ export default {
|
||||
CheckStuvisible: false, //学员管理的查看抽屉
|
||||
addLoading: false, // 加载动画
|
||||
choosedStageId: 1, // 选择的阶段id
|
||||
choosedStageIndex: 0, // 选择的阶段ID
|
||||
selectedRowKeys: [],
|
||||
twobtn: true,
|
||||
number: true,
|
||||
@@ -1802,9 +1804,10 @@ export default {
|
||||
const closehuodModal = () => {
|
||||
state.huodModal = false;
|
||||
};
|
||||
const stageChange = (name, id) => {
|
||||
const stageChange = (name, id,index) => {
|
||||
state.choosedStageId = id;
|
||||
state.stateName = name;
|
||||
state.choosedStageIndex = index;
|
||||
};
|
||||
const changeTabs = (e) => {
|
||||
console.log("切换tabs", e, state.routerId);
|
||||
@@ -2099,6 +2102,7 @@ export default {
|
||||
state.picUrl = res.data.data.routerInfo.picUrl;
|
||||
state.action = res.data.data.routerInfo.status;
|
||||
state.remark = res.data.data.routerInfo.remark;
|
||||
state.hasTask = !!res.data.data?.chapterList.some(({taskList})=>taskList.length);
|
||||
state.act =
|
||||
state.action == 0
|
||||
? "发布"
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
<a-tab-pane key="1" tab="概览">
|
||||
<div class="split"></div>
|
||||
<!-- 概览(无数据) -->
|
||||
<div>
|
||||
<div v-if="!hasTask">
|
||||
<div class="onerow">
|
||||
<div class="taskmain">快速创建项目详情</div>
|
||||
</div>
|
||||
@@ -266,7 +266,7 @@
|
||||
</div>
|
||||
<!-- 概览(无数据) -->
|
||||
<!-- 概览(有数据) -->
|
||||
<div style="display: none">
|
||||
<div v-if="hasTask">
|
||||
<div class="onerow">
|
||||
<div class="taskmain">项目概览</div>
|
||||
</div>
|
||||
@@ -326,15 +326,15 @@
|
||||
</div> -->
|
||||
<div class="stagemess">
|
||||
<div
|
||||
v-for="item in stageList"
|
||||
v-for="(item,index) in stageList"
|
||||
:class="{
|
||||
stage1: item.stageId == choosedStageId,
|
||||
stage2: item.stageId != choosedStageId,
|
||||
stage1: index === choosedStageIndex,
|
||||
stage2: index !== choosedStageIndex,
|
||||
}"
|
||||
:key="item.stageId"
|
||||
@click="choosedStageId = item.stageId"
|
||||
@click="stageChange(item,index)"
|
||||
>
|
||||
{{ item.stage }}
|
||||
{{ item.name || '无阶段' }}
|
||||
</div>
|
||||
<!-- <div class="stage1">阶段1</div>
|
||||
<div class="stage2">阶段2</div> -->
|
||||
@@ -348,7 +348,7 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="stageOverviewList.completeCourseRatio"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.completeCourseRatio"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">课程完成率</div>
|
||||
@@ -357,7 +357,7 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="stageOverviewList.completeExamRatio"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.completeExamRatio"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">考试通过率</div>
|
||||
@@ -366,39 +366,39 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="stageOverviewList.completeRatio"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.completeRatio"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">作业完成率</div>
|
||||
</div>
|
||||
<div class="proright">
|
||||
<div class="pronub" style="margin-left: 280px">
|
||||
{{ stageOverviewList.totalTaskCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.totalTaskCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">阶段任务总数</span>
|
||||
<a-progress
|
||||
:percent="stageOverviewList.totalTaskCnt"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.totalTaskCnt"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 206px">
|
||||
{{ stageOverviewList.totalReqCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.totalReqCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">必修课</span>
|
||||
<a-progress
|
||||
:percent="stageOverviewList.totalReqCnt"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.totalReqCnt"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{ stageOverviewList.totalOptCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.totalOptCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">选修课</span>
|
||||
<a-progress
|
||||
:percent="stageOverviewList.totalOptCnt"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.totalOptCnt"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
@@ -1826,6 +1826,8 @@ export default {
|
||||
const route = useRoute();
|
||||
const state = reactive({
|
||||
editRecord: {},
|
||||
choosedStageIndex:0,
|
||||
hasTask:false,
|
||||
tabFlag: true,
|
||||
stage: [],
|
||||
stuColumns: [
|
||||
@@ -2513,25 +2515,19 @@ export default {
|
||||
offLineCourseCnt: 0,
|
||||
completeRatio: 0,
|
||||
},
|
||||
stageOverviewList: {
|
||||
// 阶段数据概览
|
||||
completeCourseRatio: 0,
|
||||
completeExamRatio: 0,
|
||||
completeRatio: 0,
|
||||
totalTaskCnt: 0,
|
||||
totalReqCnt: 0,
|
||||
totalOptCnt: 0,
|
||||
},
|
||||
stageOverviewList: [
|
||||
{
|
||||
// 阶段数据概览
|
||||
completeCourseRatio: 0,
|
||||
completeExamRatio: 0,
|
||||
completeRatio: 0,
|
||||
totalTaskCnt: 0,
|
||||
totalReqCnt: 0,
|
||||
totalOptCnt: 0,
|
||||
}
|
||||
],
|
||||
stageList: [
|
||||
// 阶段列表
|
||||
{
|
||||
stageId: 1,
|
||||
stage: "阶段一",
|
||||
},
|
||||
{
|
||||
stageId: 2,
|
||||
stage: "阶段二",
|
||||
},
|
||||
],
|
||||
});
|
||||
// 输入接入 -- start --
|
||||
@@ -2569,7 +2565,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
levelList.stageList = res.data.data.stageList
|
||||
//暂时传个固定的id用 到时候看数据里面是否有在更换
|
||||
// state.projectTaskId = res.data.data.stageList[0].taskList[0].projectTaskId
|
||||
let leng = res.data.data.stageList.length;
|
||||
@@ -3529,7 +3525,7 @@ 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.attach = info.attach;
|
||||
// state.templateId = info.templateId;
|
||||
state.sourceBelong =
|
||||
@@ -4172,10 +4168,15 @@ export default {
|
||||
// x.send()
|
||||
// }
|
||||
}
|
||||
function stageChange(item,index){
|
||||
state.choosedStageId = item.stageId
|
||||
state.choosedStageIndex = index;
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
...toRefs(levelList),
|
||||
stageChange,
|
||||
showStudent,
|
||||
settingTopFlag,
|
||||
totask,
|
||||
|
||||
Reference in New Issue
Block a user