From 4fd0048112d1703fcaf34430a3b93da50ec6d42d Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 7 Jul 2022 14:08:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E9=85=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/setting.js | 2 +- src/views/match/add/index.vue | 33 +++++++++++++++++------- src/views/match/list/index.vue | 8 +++--- src/views/match/manage/index.vue | 18 ++++++++++++- src/views/match/manage/matchProgress.vue | 6 ++--- src/views/match/manage/matchSignup.vue | 2 +- src/views/match/manage/notice.vue | 7 ++--- src/views/match/manage/noticeDetail.vue | 4 +-- src/views/order/AddOrder.vue | 4 +-- src/views/parner/index.vue | 10 ++++--- src/views/parner/mobileRole.vue | 10 +++---- src/views/parner/pcRole.vue | 10 +++---- src/views/parner/staff.vue | 18 ++++++------- src/views/system/staff.vue | 2 +- 14 files changed, 85 insertions(+), 49 deletions(-) diff --git a/src/setting.js b/src/setting.js index f555548..8e05d17 100644 --- a/src/setting.js +++ b/src/setting.js @@ -43,7 +43,7 @@ const Setting = { isDev, isPro, // 是否使用动态路由 - dynamicRoute: false, + dynamicRoute: true, /** * @description 默认密码 */ diff --git a/src/views/match/add/index.vue b/src/views/match/add/index.vue index e5c6646..8329570 100644 --- a/src/views/match/add/index.vue +++ b/src/views/match/add/index.vue @@ -135,8 +135,8 @@ 保存 - 发布 - 预览 + 发布 + 预览 @@ -214,9 +214,12 @@ export default { checkStrictly: true, lazy: true, lazyLoad (node, resolve) { + // 如果是在模糊搜索中,则不再用懒加载请求数据 const input = document.querySelector('.el-cascader__search-input') - if (input && input.value) return false + console.log("🚀 ~ file: index.vue ~ line 219 ~ lazyLoad ~ input", input, node) + if (input && input.value) return resolve([]) const { level, value } = node + // console.log("🚀 ~ file: index.vue ~ line 221 ~ lazyLoad ~ level", node) // 省份 if (!level) { that.$get(that.api.queryProvince).then(({ list }) => { @@ -365,8 +368,15 @@ export default { // 获取学校列表 getSchool() { this.$get(this.api.querySchoolData).then(({ list }) => { - list.map(e => e.label = e.schoolName) - this.schools = list + const result = [] + list.map(e => { + result.push({ + value: e.schoolId, + label: e.schoolName, + leaf: true + }) + }) + this.schools = result }).catch(res => {}) }, // 范围模糊查询前置钩子 @@ -378,7 +388,7 @@ export default { clearTimeout(this.rangeTimer) this.rangeTimer = setTimeout(() => { const val = el.target.value - let result = this.schools.filter(e => e.schoolName.includes(val)) // 用学校列表做比对 + let result = this.schools.filter(e => e.label.includes(val)) // 用学校列表做比对 this.rangeList = val ? result : [] }, 500) }, @@ -425,10 +435,15 @@ export default { // 附件上传成功 uploadAnnexSuccess(res) { const file = res.data.filesResult - this.form.contestAnnexList.push({ + const { id } = this.form + const data = { + contestId: id || '', fileName: this.fileName, - filePath: file.fileUrl || file.fileId - }) + filePath: file.fileUrl + } + this.form.contestAnnexList.push(data) + // 编辑的时候需要调新增附件接口 + id && this.$post(this.api.saveAnnex, data).then(res => {}).catch(res => {}) }, // 附件上传前 beforeUpload(file) { diff --git a/src/views/match/list/index.vue b/src/views/match/list/index.vue index 81258c6..b2555c4 100644 --- a/src/views/match/list/index.vue +++ b/src/views/match/list/index.vue @@ -40,7 +40,7 @@
- 创建竞赛 + 创建竞赛
@@ -76,10 +76,10 @@