diff --git a/src/api/index.js b/src/api/index.js
index 1744873..7268f87 100644
--- a/src/api/index.js
+++ b/src/api/index.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`,
diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue
index a7445fa..7027242 100644
--- a/src/pages/assessment/list/index.vue
+++ b/src/pages/assessment/list/index.vue
@@ -115,14 +115,6 @@
-
-
-
-
+
+
+
@@ -21,13 +25,14 @@
-
-
-
-
暂无数据
-
+
+
+
+
暂无数据
+
+
@@ -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()
+ },
}
};
@@ -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;
}
}
}
diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue
index ec7b008..f57db5c 100644
--- a/src/pages/station/preview/index.vue
+++ b/src/pages/station/preview/index.vue
@@ -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, {
diff --git a/src/setting.js b/src/setting.js
index 0fbbd78..41f846d 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -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/'; // 赓
}