diff --git a/src/components/breadcrumb/index.vue b/src/components/breadcrumb/index.vue new file mode 100644 index 0000000..30e2385 --- /dev/null +++ b/src/components/breadcrumb/index.vue @@ -0,0 +1,64 @@ + + + + \ No newline at end of file diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue index 2a06cc6..f731393 100644 --- a/src/pages/achievement/list/index.vue +++ b/src/pages/achievement/list/index.vue @@ -184,10 +184,8 @@ export default { }, getschoolCourse() { // 获取课程下拉框数据 this.$get(this.api.schoolCourseByAchievement).then(res => { - if (res.data && res.data.length) { - this.curriculumList = res.data; - this.getData(); - } + this.curriculumList = res.data; + this.getData(); }).catch(err => { }); }, diff --git a/src/pages/match/add/index.vue b/src/pages/match/add/index.vue index f9b39c0..39476e6 100644 --- a/src/pages/match/add/index.vue +++ b/src/pages/match/add/index.vue @@ -149,7 +149,10 @@ :props="props" :show-all-levels="false" clearable - filterable> + filterable + :before-filter="beforeFilter" + :options="rangeList" + @input.native="rangeSearch"> 取 消 确 定 @@ -212,6 +215,9 @@ export default { checkStrictly: true, lazy: true, lazyLoad (node, resolve) { + // 如果是在模糊搜索中,则不再用懒加载请求数据 + const input = document.querySelector('.el-cascader__search-input') + if (input && input.value) return false const { level, value } = node // 省份 console.log('lazy', node, that.range) @@ -265,6 +271,9 @@ export default { }, submiting: false, updateTime: 0, + rangeTimer: null, + schools: [], + rangeList: [] }; }, components: { @@ -301,6 +310,7 @@ export default { }, mounted() { this.getData() + this.getSchool() }, methods: { getData() { @@ -355,6 +365,26 @@ export default { showRange() { this.rangeVisible = true }, + // 获取学校列表 + getSchool() { + this.$get(this.api.querySchoolData).then(({ list }) => { + list.map(e => e.label = e.schoolName) + this.schools = list + }).catch(res => {}) + }, + // 范围模糊查询前置钩子 + beforeFilter() { + return false + }, + // 范围筛选 + rangeSearch(el) { + clearTimeout(this.rangeTimer) + this.rangeTimer = setTimeout(() => { + const val = el.target.value + let result = this.schools.filter(e => e.schoolName.includes(val)) // 用学校列表做比对 + this.rangeList = val ? result : [] + }, 500) + }, // 范围确定 rangeSubmit() { // 处理提交需要的id diff --git a/src/pages/match/list/index.vue b/src/pages/match/list/index.vue index a146ae0..d228396 100644 --- a/src/pages/match/list/index.vue +++ b/src/pages/match/list/index.vue @@ -239,7 +239,7 @@ export default { type: "warning" }) .then(() => { - this.$del(`${this.api.deleteContest}/${row.id}`).then(res => { + this.$post(`${this.api.deleteContest}?contestId=${row.id}`).then(res => { util.successMsg("删除成功"); this.getData(); }).catch(res => { diff --git a/src/pages/match/manage/matchSignup.vue b/src/pages/match/manage/matchSignup.vue index 49e2280..741889f 100644 --- a/src/pages/match/manage/matchSignup.vue +++ b/src/pages/match/manage/matchSignup.vue @@ -9,13 +9,12 @@
- 全部导出 - 批量导出 + 导出
- +