feat:增加学习路径及项目发布的统计,增加组织树

This commit is contained in:
lixg
2022-11-20 18:08:46 +08:00
parent f2171b0bd6
commit a01686ffe3
12 changed files with 1312 additions and 1262 deletions

View File

@@ -118,7 +118,7 @@
<a-modal
:closable="sh"
centered="true"
v-model:visible="out"
v-model:visible="out"
:footer="null"
wrapClassName="CreatePath"
>
@@ -194,7 +194,7 @@
<img class="im" src="../../assets/px.jpg" /> -->
<div
@click="chooseImg(item)"
v-for="item,index in imgData"
v-for="(item, index) in imgData"
:key="item.key"
class="learnBgItem"
:style="{
@@ -203,10 +203,14 @@
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #C7CBD2',
'background-image': 'url(' + item.source + ')',
display:index>=5?'none':'flex'
display: index >= 5 ? 'none' : 'flex',
}"
></div>
<div @click="showLearnBgMore" v-if="imgData.length > 5" class="learnBgItem learnBgMore">
<div
@click="showLearnBgMore"
v-if="imgData.length > 5"
class="learnBgItem learnBgMore"
>
查看更多 <img src="../../assets/images/projectadd/go.png" />
</div>
</div>
@@ -313,7 +317,7 @@
<img class="im" src="../../assets/px.jpg" /> -->
<div
@click="chooseImg2(item)"
v-for="(item,index) in imgData"
v-for="(item, index) in imgData"
:key="item.key"
class="learnBgItem"
:style="{
@@ -322,12 +326,16 @@
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
'background-image': 'url(' + item.source + ')',
display:index>=5?'none':'flex'
display: index >= 5 ? 'none' : 'flex',
}"
>
<!-- <img class="im" :src="item.source" /> -->
</div>
<div @click="showLearnBgMore" v-if="imgData.length > 5" class="learnBgItem learnBgMore">
<div
@click="showLearnBgMore"
v-if="imgData.length > 5"
class="learnBgItem learnBgMore"
>
查看更多 <img src="../../assets/images/projectadd/go.png" />
</div>
</div>
@@ -392,7 +400,9 @@
<div class="projectbox">
<div class="promessage">
<div class="messageme">路径信息</div>
<div class="messagege">当前路径共0个关卡0个任务</div>
<div class="messagege">
当前路径共{{ routeChapters }}个关卡{{ routeTasks }}个任务
</div>
</div>
<div class="stumessage">
<div class="messageme1">学员信息</div>
@@ -618,13 +628,11 @@
>
<!-- <img class="im" :src="item.source" /> -->
</div>
</div>
<div class="btn">
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
</div>
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
</div>
</div>
</a-modal>
</div>
@@ -695,7 +703,8 @@ export default {
{
id: 7,
source: require("../../assets/images/leveladd/2.png"),
}, {
},
{
id: 5,
source: require("../../assets/images/leveladd/3.png"),
},
@@ -706,7 +715,8 @@ export default {
{
id: 7,
source: require("../../assets/images/leveladd/2.png"),
}, {
},
{
id: 5,
source: require("../../assets/images/leveladd/3.png"),
},
@@ -717,7 +727,8 @@ export default {
{
id: 7,
source: require("../../assets/images/leveladd/2.png"),
}, {
},
{
id: 5,
source: require("../../assets/images/leveladd/3.png"),
},
@@ -728,7 +739,8 @@ export default {
{
id: 7,
source: require("../../assets/images/leveladd/2.png"),
}, {
},
{
id: 5,
source: require("../../assets/images/leveladd/3.png"),
},
@@ -739,7 +751,8 @@ export default {
{
id: 7,
source: require("../../assets/images/leveladd/2.png"),
}, {
},
{
id: 5,
source: require("../../assets/images/leveladd/3.png"),
},
@@ -836,7 +849,9 @@ export default {
endTime: null, //结束时间
//发布---------------
releasePathId: null, //发布路径id
routeStudentsNum: 0,
routeStudentsNum: 0, //学员总数
routeChapters: 0, //关卡总数
routeTasks: 0, //任务总数
recallPathId: null, //撤回路径id
stopPathId: null, //停用路径id
copyPathId: null, //复制路径iid
@@ -881,32 +896,19 @@ export default {
const showPub = (routerId) => {
state.pub = true;
state.releasePathId = routerId;
//获取学员总数
let obj = {
pageNo: 0,
pageSize: 0,
routerId: routerId,
};
api
.getStudent(obj)
.getLearnCount(routerId)
.then((res) => {
if (res.status === 200) {
// console.log("res", res.data.data);
state.routeStudentsNum = res.data.data.total;
// console.log("获取关卡、任务、学员统计数据", res.data);
state.routeStudentsNum = res.data.students;
state.routeChapters = res.data.chapters;
state.routeTasks = res.data.tasks;
}
})
.catch((err) => {
console.log("err", err);
});
//获取学习路径详细信息
api
.getRouterDetail(routerId)
.then((res) => {
console.log("学习路径详情", res);
})
.catch((err) => {
console.log("学习路径详情获取错误", err);
});
};
//确定发布
const releaseLearnPath = () => {
@@ -1641,6 +1643,7 @@ export default {
// console.log("执行");
getLearnPath();
});
return {
...toRefs(state),
selectProjectName,
@@ -1912,70 +1915,69 @@ export default {
width: 680px !important;
height: 528px !important;
padding: 0 !important;
.main{
display: flex;
flex-direction: column;
.top {
padding-left: 51px;
padding-right: 51px;
padding-top: 28px;
.main {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
.topc {
font-size: 16px;
font-weight: bold;
color: #000000;
line-height: 36px;
}
}
.imagesBox{
display: flex;
// justify-content: space-between;
flex-wrap: wrap;
padding-left: 51px;
padding-right: 39px;
margin-top: 20px;
height: 350px;
overflow-y: auto;
.learnBgItem{
border-radius: 8px;
width: 136px;
height: 106px;
background-size: 100%;
background-repeat: no-repeat;
margin-bottom: 20px;
margin-right: 10px;
}
}
.btn {
width: 100%;
position: absolute;
bottom:30px ;
margin-top: 30px;
display: flex;
justify-content: center;
.samtn {
width: 100px;
height: 40px;
font-size: 14px;
border: 1px solid #4ea6ff;
border-radius: 8px;
cursor: pointer;
}
.btn1 {
background-color: #fff;
color: #4ea6ff;
}
.btn2 {
background-color: #4ea6ff;
color: #fff;
margin-left: 16px;
}
flex-direction: column;
.top {
padding-left: 51px;
padding-right: 51px;
padding-top: 28px;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
.topc {
font-size: 16px;
font-weight: bold;
color: #000000;
line-height: 36px;
}
}
}
.imagesBox {
display: flex;
// justify-content: space-between;
flex-wrap: wrap;
padding-left: 51px;
padding-right: 39px;
margin-top: 20px;
height: 350px;
overflow-y: auto;
.learnBgItem {
border-radius: 8px;
width: 136px;
height: 106px;
background-size: 100%;
background-repeat: no-repeat;
margin-bottom: 20px;
margin-right: 10px;
}
}
.btn {
width: 100%;
position: absolute;
bottom: 30px;
margin-top: 30px;
display: flex;
justify-content: center;
.samtn {
width: 100px;
height: 40px;
font-size: 14px;
border: 1px solid #4ea6ff;
border-radius: 8px;
cursor: pointer;
}
.btn1 {
background-color: #fff;
color: #4ea6ff;
}
.btn2 {
background-color: #4ea6ff;
color: #fff;
margin-left: 16px;
}
}
}
}
}
}