diff --git a/package_sub/pages/BatchForm/BatchForm.vue b/package_sub/pages/BatchForm/BatchForm.vue index a983703..1cac398 100644 --- a/package_sub/pages/BatchForm/BatchForm.vue +++ b/package_sub/pages/BatchForm/BatchForm.vue @@ -34,9 +34,9 @@ 所在区域 - - {{ item.name }} - + + {{ group.map(i => i.name).toString() }} + @@ -53,7 +53,7 @@ 'color': '#fff' }" @click="() => { - if (form.area_id) { + if (form.group) { stepClick('next') } else { $u.toast('请选择区域') @@ -234,6 +234,7 @@ second: false }" @confirm="e => form.year = e.year"> + @@ -245,10 +246,12 @@ export default { data() { return { + isShowWhite: false, isShowModal: false, step: 1, isShowTime: false, areaList: [], + groupArea: {}, forSchoolName: { code: '', value: '', @@ -266,6 +269,7 @@ export default { name: "", finish_school: "", examination_number: "", + group: "", area_id: "", year: new Date().getFullYear().toString(), aspiration_id: "" @@ -439,7 +443,7 @@ export default { async getConfig () { try { const { list } = await this.$u.api.batchIndex({ - area_id: this.form.area_id, + group: this.form.group, year: this.form.year }) if (list.length > 0) { @@ -447,6 +451,8 @@ export default { this.aspiration = list[0] this.setTitle() + } else { + this.$u.toast("暂未获取到当年模版") } } catch (err) { console.error(err) @@ -478,6 +484,14 @@ export default { try { const res = await this.$u.api.area() this.areaList = res.list + this.groupArea = res.list?.reduce((acc, item) => { + const key = item.group; + if (!acc[key]) { + acc[key] = []; + } + acc[key].push(item); + return acc; + }, {}) } catch (err) { console.error(err) } @@ -559,6 +573,9 @@ export default { }, onShow() { this.setTitle() + if (!this.vuex_user.white) { + this.isShowWhite = true + } }, created() { this.getArea().then(_ => { @@ -667,6 +684,9 @@ export default { filter: drop-shadow(0 4rpx 2rpx rgba(0, 0, 0, 0.3)); position: relative; overflow: hidden; + display: flex; + align-items: center; + justify-content: center; &::before { content: ''; diff --git a/package_sub/pages/RecommendForm/RecommendForm.vue b/package_sub/pages/RecommendForm/RecommendForm.vue index b5daeb0..5707dab 100644 --- a/package_sub/pages/RecommendForm/RecommendForm.vue +++ b/package_sub/pages/RecommendForm/RecommendForm.vue @@ -1,4 +1,11 @@ @@ -135,26 +202,44 @@ export default { is_stable: 1, is_bare: 1 }, + rules: { + area_id: [ + { + required: true, + message: '请选择县区' + } + ], + }, isShowAreaSelect: false, areaList: [], isShowSchoolSelect: false, schoolList: [], + + recommends: { + top: [], + steady: [], + safeguard: [] + }, + isShowRecommend: false, }; }, watch: { - vuex_user(newVal) { - const keys = new Map([ + vuex_user: { + handler: function (newVal) { + const keys = new Map([ ['middle_exam_year', 'year'], ['name', 'name'], ['sex', 'sex'], ['nationality', 'nationality'] - ]) - Array.from(keys.keys()).forEach(key => { - if (newVal[key]) { - this.form[keys.get(key)] = newVal[key] - } - }) + ]) + Array.from(keys.keys()).forEach(key => { + if (newVal[key]) { + this.form[keys.get(key)] = newVal[key] + } + }) + }, + immediate: true } }, computed: { @@ -176,6 +261,11 @@ export default { if (this.regionType === 'area') { return [this.form.province,this.form.city] } + }, + schoolArea() { + return function (areaId) { + return this.areaList.find(i => i.value === areaId)?.label + } } }, methods: { @@ -240,8 +330,12 @@ export default { console.log(res) uni.showToast({ title: '提交成功', - icon: 'none' + icon: 'none', + duration: 1000 }) + const { model } = res + this.recommends = model?.recommends + this.isShowRecommend = true }) } catch (err) { console.error(err) @@ -260,6 +354,9 @@ export default { diff --git a/pages/index/index.vue b/pages/index/index.vue index a6d8e71..b62fe6e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,4 +1,11 @@ @@ -80,6 +107,7 @@ export default { data() { return { + isShowQrcode: false, banners: [], }; }, @@ -275,4 +303,36 @@ export default { height: 140rpx; z-index: 10; } + +.customer-service { + background: #eaf8fe; + padding: 20rpx 20rpx 40rpx; + + &__title { + font-size: 36rpx; + text-transform: uppercase; + color: #333333; + font-weight: bold; + padding: 34rpx 20rpx 24rpx; + } + &__body { + color: #666; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border-radius: 10rpx; + border: 2rpx solid #ccc; + margin: 20rpx 20rpx 0; + line-height: 2; + font-weight: 500; + padding: 10rpx 20rpx; + + & > image { + width: 340rpx; + height: 340rpx; + margin: 10rpx 0; + } + } +} diff --git a/pages/list/list.vue b/pages/list/list.vue index 1ce60a2..86d2ca1 100644 --- a/pages/list/list.vue +++ b/pages/list/list.vue @@ -8,7 +8,7 @@ 填报时间:{{ item.created_at }} - + 规划师已查看