项目等完善

dev_2022-05-11
yujialong 3 years ago
parent d5ebb17584
commit 113e324bd2
  1. 42
      src/pages/project/list/index.vue
  2. 5
      src/pages/station/preview/index.vue

@ -40,6 +40,17 @@
></el-option>
</el-select>
</li>
<li>
<label>课程</label>
<el-select v-model="queryData.cid" @change="courseChange">
<el-option
v-for="item in curriculumList"
:key="item.cid"
:label="item.curriculumName"
:value="item.cid">
</el-option>
</el-select>
</li>
<li>
<label>系统</label>
<el-select v-model="systemId" placeholder="请选择" @change="initData">
@ -132,11 +143,15 @@ export default {
roleIdEd: this.roleId ? 13 : this.roleId,// roleId13roleId14113,1413>
systemId: "",
systemList: [],
systemListAll: [],
curriculumId: '',
curriculumList: [],
queryData: {
platformId: 1, // :1 :3
founder: 2, // (0: 1: 2:)
state: "", // (0:稿 1:)
permissions: "" // (0: 1: 2:)
permissions: "", // (0: 1: 2:)
cid: ''
},
keyword: "",
status: "",
@ -247,13 +262,10 @@ export default {
}),
getSystemData() {
this.$get(this.api.getSystemIdBySchool).then(res => {
if (res.status == 200){
this.systemList = res.data;
console.log(this.systemList)
this.systemListAll = res.data;
// systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : this.systemList[0].id;
this.getData();
this.getschoolCourse()
}else{
}
@ -274,6 +286,24 @@ export default {
}).catch(err => {
});
},
getschoolCourse() { //
this.$get(this.api.schoolCourseByAchievement).then(res => {
const { data } = res
this.curriculumList = data
const { cid } = this.queryData
if (data.length) {
this.queryData.cid = cid || data[0].cid
this.courseChange()
}
}).catch(err => {})
},
//
courseChange(val) {
const systemIds = this.curriculumList.find(e => e.cid == this.queryData.cid).systemId.split(',') // systemId
this.systemList = this.systemListAll.filter(e => systemIds.includes(e.id + '')) //
this.systemId = this.systemList[0].id
this.initData()
},
initData() {
this.page = 1;
this.getData();

@ -110,6 +110,7 @@ export default {
briefIntroduction: "", //
teachingObjectives: "", //
assessmentList: "", //
systemIds: '',
curLink: "", //
playAuth: "",
player: null,
@ -154,6 +155,7 @@ export default {
this.briefIntroduction = data.briefIntroduction;
this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds
},
async getChapter() {
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`);
@ -288,7 +290,7 @@ export default {
this.currentPage = 1;
},
goSystem() { //
let id = this.assessmentList[0].systemId;
const id = this.systemIds
let href = ''
let token = util.local.get(Setting.tokenKey);
let roleId = this.roleId == 4 ? 0 : 1;
@ -313,6 +315,7 @@ export default {
util.cookies.set("stopTime", "", -1);
util.cookies.set("token", token);
util.cookies.set("courseId", this.courseId);
util.cookies.set("curriculumName", escape(this.curriculumName));
util.cookies.set("systemId", id);
location.href = href;
}

Loading…
Cancel
Save