项目等完善

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-option>
</el-select> </el-select>
</li> </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> <li>
<label>系统</label> <label>系统</label>
<el-select v-model="systemId" placeholder="请选择" @change="initData"> <el-select v-model="systemId" placeholder="请选择" @change="initData">
@ -132,11 +143,15 @@ export default {
roleIdEd: this.roleId ? 13 : this.roleId,// roleId13roleId14113,1413> roleIdEd: this.roleId ? 13 : this.roleId,// roleId13roleId14113,1413>
systemId: "", systemId: "",
systemList: [], systemList: [],
systemListAll: [],
curriculumId: '',
curriculumList: [],
queryData: { queryData: {
platformId: 1, // :1 :3 platformId: 1, // :1 :3
founder: 2, // (0: 1: 2:) founder: 2, // (0: 1: 2:)
state: "", // (0:稿 1:) state: "", // (0:稿 1:)
permissions: "" // (0: 1: 2:) permissions: "", // (0: 1: 2:)
cid: ''
}, },
keyword: "", keyword: "",
status: "", status: "",
@ -247,13 +262,10 @@ export default {
}), }),
getSystemData() { getSystemData() {
this.$get(this.api.getSystemIdBySchool).then(res => { this.$get(this.api.getSystemIdBySchool).then(res => {
if (res.status == 200){ if (res.status == 200){
this.systemList = res.data; this.systemListAll = res.data;
console.log(this.systemList)
// systemIdsystemIdsystemId // systemIdsystemIdsystemId
this.systemId = this.lastSystemId ? this.lastSystemId : this.systemList[0].id; this.getschoolCourse()
this.getData();
}else{ }else{
} }
@ -274,6 +286,24 @@ export default {
}).catch(err => { }).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() { initData() {
this.page = 1; this.page = 1;
this.getData(); this.getData();

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

Loading…
Cancel
Save