|
|
@ -48,16 +48,12 @@ |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>课程</label> |
|
|
|
<label>课程</label> |
|
|
|
<el-select v-model="curriculumId" |
|
|
|
<el-cascader v-model="mallIds" |
|
|
|
@change="curriculumChange"> |
|
|
|
:options="curs" |
|
|
|
<el-option label="不限" |
|
|
|
:props="{ checkStrictly: true, value: 'id' }" |
|
|
|
value=""></el-option> |
|
|
|
popper-class="course-cas" |
|
|
|
<el-option v-for="item in curriculumList" |
|
|
|
@expand-change="curChange" |
|
|
|
:key="item.cid" |
|
|
|
@change="curChange"></el-cascader> |
|
|
|
:label="item.curriculumName" |
|
|
|
|
|
|
|
:value="item.cid"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<el-input placeholder="请输入考核或项目名称" |
|
|
|
<el-input placeholder="请输入考核或项目名称" |
|
|
@ -165,9 +161,12 @@ export default { |
|
|
|
return { |
|
|
|
return { |
|
|
|
classId: this.$route.query.class ? +this.$route.query.class : '', |
|
|
|
classId: this.$route.query.class ? +this.$route.query.class : '', |
|
|
|
classList: [], |
|
|
|
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: [], |
|
|
|
curriculumList: [], |
|
|
|
projectPermissions: this.$route.query.per ? +this.$route.query.per : 0, |
|
|
|
projectPermissions: this.$route.query.per ? +this.$route.query.per : 0, |
|
|
|
|
|
|
|
mallIds: [], |
|
|
|
|
|
|
|
curs: [], |
|
|
|
keyword: "", |
|
|
|
keyword: "", |
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
|
startingtime: "", |
|
|
|
startingtime: "", |
|
|
@ -231,20 +230,48 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
this.getschoolCourse(); |
|
|
|
this.getClassData() |
|
|
|
this.getClassData(); |
|
|
|
this.getCourse() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
pickerInput () { |
|
|
|
pickerInput () { |
|
|
|
this.month = '6' |
|
|
|
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(); |
|
|
|
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 () { // 获取班级下拉框数据 |
|
|
|
getClassData () { // 获取班级下拉框数据 |
|
|
|
this.$post(this.api.myClass).then(res => { |
|
|
|
this.$post(this.api.myClass).then(res => { |
|
|
|
this.classList = res.list; |
|
|
|
this.classList = res.list; |
|
|
@ -256,19 +283,20 @@ export default { |
|
|
|
background: "rgba(255,255,255,.6)" |
|
|
|
background: "rgba(255,255,255,.6)" |
|
|
|
}); |
|
|
|
}); |
|
|
|
const per = this.projectPermissions |
|
|
|
const per = this.projectPermissions |
|
|
|
const curriculumId = this.curriculumId |
|
|
|
const { mallIds } = this |
|
|
|
const curr = this.curriculumList.find(e => e.cid == curriculumId) |
|
|
|
const cur = this.curs.find(e => e.mallId == mallIds[0]) |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
classId: this.classId, |
|
|
|
classId: this.classId, |
|
|
|
permissions: per, |
|
|
|
permissions: per, |
|
|
|
curriculumId, |
|
|
|
curriculumId: cur.cid, |
|
|
|
|
|
|
|
mallId: mallIds[0], |
|
|
|
keyWord: this.keyword, |
|
|
|
keyWord: this.keyword, |
|
|
|
startTime: this.startingtime, |
|
|
|
startTime: this.startingtime, |
|
|
|
endTime: this.endTime, |
|
|
|
endTime: this.endTime, |
|
|
|
month: this.month, |
|
|
|
month: this.month, |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageSize: this.pageSize, |
|
|
|
systemId: curr ? curr.systemId : '' |
|
|
|
systemId: mallIds[1] |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(this.api.getAchievementInfo, data).then(res => { |
|
|
|
this.$post(this.api.getAchievementInfo, data).then(res => { |
|
|
|
let list = [] |
|
|
|
let list = [] |
|
|
|