Branch_d40a2540
yujialong 2 years ago
parent 0698977aef
commit 7887d28243
  1. 2
      src/api/index.js
  2. 33
      src/pages/assessment/list/index.vue
  3. 149
      src/pages/station/list/index.vue
  4. 5
      src/pages/station/preview/index.vue
  5. 2
      src/setting.js

@ -22,6 +22,8 @@ export default {
getProjectBySystemId: 'occupationlab/occupationlab/projectManage/getProjectBySystemId',
getTheMostRecentlyRunProject: 'python/python/getTheMostRecentlyRunProject',
whetherToRenewTheFee: 'nakadai/nakadai/curriculum/whetherToRenewTheFee',
recentUse: `nakadai/nakadai/curriculum/recentUse`,
recordRecentUsage: `nakadai/nakadai/curriculum/recordRecentUsage`,
// 权限管理
getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`,

@ -115,14 +115,6 @@
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="pageNum"></el-pagination>
</div>
<!-- 购买弹框 -->
<el-dialog title="温馨提示" :visible.sync="buyVisible" width="420px" center :close-on-click-modal="false">
<div class="buy">
<p class="tips">该课程订阅期限已到期请联系院校管理员续费</p>
<img src="@/assets/img/wechat-code.jpeg" alt="">
</div>
</el-dialog>
</div>
</template>
@ -195,7 +187,6 @@ export default {
multipleSelection: [], //
listLoading:false,//
ticker: null, //
buyVisible: false
};
},
computed: {
@ -329,32 +320,22 @@ export default {
console.log(err);
});
},
//
async getStatus(cid) {
const res = await this.$get(this.api.whetherToRenewTheFee, {
cid
})
this.buyVisible = !res.isRenew
// 10
return res.isRenew
},
add() {
this.$router.push("add");
},
edit(row) {
this.getStatus(row.curriculumId) && this.$router.push(`add?id=${row.id}`);
this.$router.push(`add?id=${row.id}`);
},
show(row) {
this.$router.push(`/achievement/teach?id=${row.id}&projectName=${row.projectName}&permissions=1`)
},
start(row) {
this.getStatus(row.curriculumId) &&
this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(res => {
util.successMsg("启动成功!");
this.getData(1);
}).catch(err => {
console.log(err);
})
});
},
finish(row) {
this.$confirm("确定要提前结束吗?", "提示", {
@ -434,14 +415,4 @@ export default {
.el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0;
}
.buy {
text-align: center;
.tips {
margin-bottom: 10px;
font-size: 14px;
}
img {
width: 85%;
}
}
</style>

@ -9,7 +9,11 @@
</div>
</div>
<div class="station">
<div class="inner">
<div class="inner">
<div class="tab">
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{active: item.id == active}" @click="tabChange(item)">{{ item.name }}</a>
</div>
<div class="curs">
<template v-if="curriculumList.length">
<template v-for="(item,index) in curriculumList">
<div class="item" :title="item.curriculumName" @click="goPreview(item)" :key="index" v-if="!keyword || item.curriculumName.includes(keyword)">
@ -21,13 +25,14 @@
</div>
</template>
</template>
<div class="empty flex-1" v-else>
<div>
<img src="@/assets/img/none.png" alt="">
<p>暂无数据</p>
</div>
<div class="empty flex-1" v-else>
<div>
<img src="@/assets/img/none.png" alt="">
<p>暂无数据</p>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
@ -38,6 +43,17 @@ export default {
data() {
return {
keyword: "",
active: 0,
tabs: [
{
id: 0,
name: '实验课程'
},
{
id: 1,
name: '最近使用'
}
],
curriculumList: []
}
},
@ -46,6 +62,13 @@ export default {
},
methods: {
getschoolCourse() { //
this.active ?
this.$post(this.api.recentUse, {
pageNum: 1,
pageSize: 100
}).then(({ page }) => {
this.curriculumList = page.records
}).catch(err => {}) :
this.$get(this.api.schoolCourse).then(res => {
this.curriculumList = res.data;
}).catch(err => {
@ -55,6 +78,11 @@ export default {
goPreview(item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.curriculumName}`);
},
// tab
tabChange(item) {
this.active = item.id
this.getschoolCourse()
},
}
};
</script>
@ -96,60 +124,83 @@ export default {
}
}
.tab {
display: flex;
justify-content: center;
align-items: center;
.item {
padding: 0 20px;
margin-right: 16px;
font-size: 17px;
text-align: center;
color: #333;
line-height: 50px;
border-bottom: 3px solid transparent;
cursor: pointer;
&.active {
color: #007EFF;
border-color: #007EFF;
}
}
}
.station {
min-height: calc(100vh - 520px);
background: url(../../../assets/img/station1.png) (top left)/auto no-repeat,
url(../../../assets/img/station2.png) bottom right/auto no-repeat;
.inner {
width: 1072px;
margin: 0 auto;
}
.curs {
display: flex;
flex-wrap: wrap;
width: 1072px;
padding-top: 60px;
margin: 0 auto;
}
.item {
position: relative;
padding: 0 10px;
margin: 0 10px 40px;
text-align: center;
background-color: #fff;
border-radius: 8px;
cursor: pointer;
&:hover {
opacity: .9;
}
img {
width: 215px;
height: 118px;
margin-top: -20px;
border-radius: 12px;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 5px;
}
.text {
display: inline-flex;
align-items: center;
width: 130px;
height: 40px;
text-align: left;
font-size: 12px;
line-height: 1.6;
overflow: hidden;
span {
@include mul-ellipsis(2);
.item {
position: relative;
padding: 0 10px;
margin: 0 10px 40px;
text-align: center;
background-color: #fff;
border-radius: 8px;
cursor: pointer;
&:hover {
opacity: .9;
}
img {
width: 215px;
height: 118px;
margin-top: -20px;
border-radius: 12px;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 5px;
}
.text {
display: inline-flex;
align-items: center;
width: 130px;
height: 40px;
text-align: left;
font-size: 12px;
line-height: 1.6;
overflow: hidden;
span {
@include mul-ellipsis(2);
}
}
a {
padding: 0 8px;
line-height: 28px;
font-size: 14px;
color: #7A7A7A;
border-radius: 20px;
border: 1px solid #DADADA;
}
}
a {
padding: 0 8px;
line-height: 28px;
font-size: 14px;
color: #7A7A7A;
border-radius: 20px;
border: 1px solid #DADADA;
}
}
}

@ -166,6 +166,7 @@ export default {
this.insertScript();
this.getData();
this.getStatus()
this.addRecord()
},
methods: {
goBack() {
@ -180,6 +181,10 @@ export default {
this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds
},
// 使
addRecord() {
this.$post(`${this.api.recordRecentUsage}?cid=${this.courseId}`).then(res => {}).catch(res => {})
},
//
getStatus() {
this.$get(this.api.whetherToRenewTheFee, {

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.151:9000/"; // 榕
host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.116:9000/'; // 赓
}

Loading…
Cancel
Save