From f612399e9221541197a5c78526ff0c3a25c071fd Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 14 Mar 2025 15:36:43 +0800 Subject: [PATCH] init --- package_sub/pages/BatchDetail/BatchDetail.vue | 10 +-- package_sub/pages/BatchForm/BatchForm.vue | 76 ++++++++++++------- 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/package_sub/pages/BatchDetail/BatchDetail.vue b/package_sub/pages/BatchDetail/BatchDetail.vue index 36ccfd3..fb9a620 100644 --- a/package_sub/pages/BatchDetail/BatchDetail.vue +++ b/package_sub/pages/BatchDetail/BatchDetail.vue @@ -8,11 +8,9 @@ - - - {{ batch.name || '-' }} - - + + {{ batch.name || '-' }} + @@ -245,8 +243,6 @@ export default { color: #e77817; font-weight: 500; padding: 30rpx 20rpx; - word-break: keep-all; - white-space: nowrap; } .batch-sub { &__title { diff --git a/package_sub/pages/BatchForm/BatchForm.vue b/package_sub/pages/BatchForm/BatchForm.vue index 1cac398..7af7235 100644 --- a/package_sub/pages/BatchForm/BatchForm.vue +++ b/package_sub/pages/BatchForm/BatchForm.vue @@ -1,8 +1,10 @@ @@ -314,8 +315,8 @@ export default { }, schoolListConfirm(e) { console.log(e) - if (e[1]) { - const { label, value, extra } = e[1] + if (e[0]) { + const { label, value, extra } = e[0] if (this.forSchoolName.code) { this.flatForm[this.forSchoolName.code] = value } @@ -344,18 +345,24 @@ export default { try { const { list } = await this.$u.api.schoolList({ page: 1, - page_size: 9999 + page_size: 9999, + group: this.aspiration.group }) - this.schoolList = this.areaList.map(area => ({ - id: area.id, - value: area.id, - label: area.name, - children: list.data.filter(school => school.area_id === area.id)?.map(i => ({ - value: i.code, - label: i.name, - extra: i.id - })) + this.schoolList = list.data.map(school => ({ + value: school.code, + label: school.name, + extra: school.id })) + // this.schoolList = this.areaList.map(area => ({ + // id: area.id, + // value: area.id, + // label: area.name, + // children: list.data.filter(school => school.area_id === area.id)?.map(i => ({ + // value: i.code, + // label: i.name, + // extra: i.id + // })) + // })) } catch (err) { console.error(err) } @@ -453,6 +460,7 @@ export default { this.setTitle() } else { this.$u.toast("暂未获取到当年模版") + this.stepClick('prev') } } catch (err) { console.error(err) @@ -462,12 +470,17 @@ export default { if (type === 'next') { if (this.step === 1 && !this.config) { await this.getConfig() + await this.getSchools() } if (this.step < (1 + this.batches.length)) { this.step = this.step + 1 } } else if (type === 'prev') { - if (this.step > 1) { + if (this.step === 1) { + this.form.group = '' + this.config = null + } + else if (this.step > 1) { this.step = this.step - 1 } } @@ -477,7 +490,7 @@ export default { }, setTitle() { uni.setNavigationBarTitle({ - title: `志愿模拟填报 - Step ${this.step}${ this.step !== 1 ? ('/'+(this.batches.length)) : '' }` + title: `志愿模拟填报 - Step ${this.step}${ this.step !== 1 ? ('/'+(this.batches.length+1)) : '' }` }) }, async getArea() { @@ -593,6 +606,14 @@ export default { width: 100vw; background: #eaf8fe; + .notice-bar { + position: sticky; + top: 0; + left: 0; + right: 0; + z-index: 5; + } + .bkg { width: 100vw; position: fixed; @@ -774,8 +795,6 @@ export default { color: #e77817; font-weight: 500; padding: 30rpx 20rpx; - word-break: keep-all; - white-space: nowrap; } &-is-obey { @@ -855,6 +874,7 @@ export default { font-size: 28rpx; text-transform: uppercase; color: #333333; + text-align: center; } &__col2 { flex-basis: 29%;