|
|
|
@ -48,16 +48,12 @@ |
|
|
|
|
</li> |
|
|
|
|
<li> |
|
|
|
|
<label>课程</label> |
|
|
|
|
<el-select v-model="curriculumId" |
|
|
|
|
@change="curriculumChange"> |
|
|
|
|
<el-option label="不限" |
|
|
|
|
value=""></el-option> |
|
|
|
|
<el-option v-for="item in curriculumList" |
|
|
|
|
:key="item.cid" |
|
|
|
|
:label="item.curriculumName" |
|
|
|
|
:value="item.cid"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-cascader v-model="mallIds" |
|
|
|
|
:options="curs" |
|
|
|
|
:props="{ checkStrictly: true, value: 'id' }" |
|
|
|
|
popper-class="course-cas" |
|
|
|
|
@expand-change="curChange" |
|
|
|
|
@change="curChange"></el-cascader> |
|
|
|
|
</li> |
|
|
|
|
<li> |
|
|
|
|
<el-input placeholder="请输入考核或项目名称" |
|
|
|
@ -165,9 +161,12 @@ export default { |
|
|
|
|
return { |
|
|
|
|
classId: this.$route.query.class ? +this.$route.query.class : '', |
|
|
|
|
classList: [], |
|
|
|
|
curriculumId: this.$route.query.curriculum ? +this.$route.query.curriculum : '', |
|
|
|
|
mallId: this.$route.query.mallId ? +this.$route.query.mallId : '', |
|
|
|
|
systemId: this.$route.query.systemId ? +this.$route.query.systemId : '', |
|
|
|
|
curriculumList: [], |
|
|
|
|
projectPermissions: this.$route.query.per ? +this.$route.query.per : 0, |
|
|
|
|
mallIds: [], |
|
|
|
|
curs: [], |
|
|
|
|
keyword: "", |
|
|
|
|
searchTimer: null, |
|
|
|
|
startingtime: "", |
|
|
|
@ -231,20 +230,48 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
this.getschoolCourse(); |
|
|
|
|
this.getClassData(); |
|
|
|
|
this.getClassData() |
|
|
|
|
this.getCourse() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
pickerInput () { |
|
|
|
|
this.month = '6' |
|
|
|
|
}, |
|
|
|
|
getschoolCourse () { // 获取课程下拉框数据 |
|
|
|
|
this.$get(this.api.schoolCourseByAchievement).then(res => { |
|
|
|
|
this.curriculumList = res.data; |
|
|
|
|
|
|
|
|
|
// 获取课程 |
|
|
|
|
async getCourse () { |
|
|
|
|
const { data } = await this.$get(this.api.getSystemIdBySchool) |
|
|
|
|
const res = await this.$get(this.api.getSchoolEffectiveCourse) |
|
|
|
|
if (res.data.length) { |
|
|
|
|
res.data.map(e => { |
|
|
|
|
e.id = e.mallId |
|
|
|
|
e.label = e.curriculumName |
|
|
|
|
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统 |
|
|
|
|
}) |
|
|
|
|
this.curs = res.data |
|
|
|
|
this.mallIds = [this.mallId || res.data[0].mallId, this.systemId || data[0].id] |
|
|
|
|
this.getData(); |
|
|
|
|
}).catch(err => { |
|
|
|
|
}); |
|
|
|
|
console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", this.mallIds) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 课程选择回调 |
|
|
|
|
curChange (val) { |
|
|
|
|
const id = val[0] |
|
|
|
|
if (val.length === 1) { |
|
|
|
|
// 如果选择的是课程,则默认选中下面第一个系统 |
|
|
|
|
this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id] |
|
|
|
|
} |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: 'list', |
|
|
|
|
query: { |
|
|
|
|
...this.$route.query, |
|
|
|
|
mallId: this.mallIds[0], |
|
|
|
|
systemId: this.mallIds[1], |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.getData() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getClassData () { // 获取班级下拉框数据 |
|
|
|
|
this.$post(this.api.myClass).then(res => { |
|
|
|
|
this.classList = res.list; |
|
|
|
@ -256,19 +283,20 @@ export default { |
|
|
|
|
background: "rgba(255,255,255,.6)" |
|
|
|
|
}); |
|
|
|
|
const per = this.projectPermissions |
|
|
|
|
const curriculumId = this.curriculumId |
|
|
|
|
const curr = this.curriculumList.find(e => e.cid == curriculumId) |
|
|
|
|
const { mallIds } = this |
|
|
|
|
const cur = this.curs.find(e => e.mallId == mallIds[0]) |
|
|
|
|
let data = { |
|
|
|
|
classId: this.classId, |
|
|
|
|
permissions: per, |
|
|
|
|
curriculumId, |
|
|
|
|
curriculumId: cur.cid, |
|
|
|
|
mallId: mallIds[0], |
|
|
|
|
keyWord: this.keyword, |
|
|
|
|
startTime: this.startingtime, |
|
|
|
|
endTime: this.endTime, |
|
|
|
|
month: this.month, |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
systemId: curr ? curr.systemId : '' |
|
|
|
|
systemId: mallIds[1] |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.getAchievementInfo, data).then(res => { |
|
|
|
|
let list = [] |
|
|
|
|