From 4ef7bc416f964f3cbb40cf049accd9febdc98802 Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Thu, 2 Nov 2023 14:18:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E3=80=91=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E7=A0=94=E8=AE=A8=E4=BC=9A=E5=85=B3=E8=81=94=E4=BC=9A=E8=AE=AE?= =?UTF-8?q?=E7=9A=84=E4=BC=98=E5=8C=9620231102?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../meetingDetailSigned.js | 54 ++++- .../meetingDetailSigned.wxml | 26 ++- pages/signUpEntrance/signUpEntrance.js | 44 +++- pages/signUpEntrance/signUpEntrance.wxml | 11 +- pages/signUpPageGuoji/signUpPageGuoji.js | 192 +++++++++++++++--- pages/signUpPageGuoji/signUpPageGuoji.wxml | 20 +- pages/signUpPageGuoji/signUpPageGuoji.wxss | 12 ++ 7 files changed, 312 insertions(+), 47 deletions(-) diff --git a/pages/meetingDetailSigned/meetingDetailSigned.js b/pages/meetingDetailSigned/meetingDetailSigned.js index 2d4f29e..77234aa 100644 --- a/pages/meetingDetailSigned/meetingDetailSigned.js +++ b/pages/meetingDetailSigned/meetingDetailSigned.js @@ -14,6 +14,8 @@ import { baseUrl, URL_CONFIG } from '../../assets/js/project.config.js' + +import WasicTopicData from '../../assets/js/wasicStaticData.js' Page({ /** @@ -51,7 +53,45 @@ Page({ isMoreTime:false, // 是否超过 会议截止报名时间 meetingTypeText:"", // 会议类型 questionList: [], // 标协会议 存储官宣答疑的数组 + wasicChoiceTopics: [], // 选择的会议展示的信息 + wasicLinkTopics: [] // 关联会议展示的字段 }, + // 处理国际研讨会-WASIC-已经选择的数据如何展示 + handleWasicLinkTopics(currentMeetingInfo, dictKey) { + dictKey = dictKey || 'linkTopics' + let resultArr = [] + if(currentMeetingInfo[dictKey] && currentMeetingInfo[dictKey + '_dictText']) { + let topicArr = currentMeetingInfo[dictKey].split(',') + let topicTextArr = currentMeetingInfo[dictKey + '_dictText'].split(',') + let opeArr = JSON.parse(JSON.stringify(WasicTopicData)) + + opeArr.map(tt => { + // 先查询子集中 + tt.allChildren = [...tt.children, ...(tt.radioChildren || [])] + let ele = tt.allChildren.find(item => topicArr.includes(item.value)) + if(ele) { + let dateItem = { + name: tt.name, + date: tt.date, + children: [] + } + + tt.allChildren.map(innerItem => { + let index = topicArr.findIndex(a => a === innerItem.value) + if(index > -1) { + dateItem.children.push({ + 'value': innerItem.value, + 'text': topicTextArr[index], + 'title': topicTextArr[index] + }) + } + }) + resultArr.push(dateItem) + } + }) + } + return resultArr + }, /* * 会议类型 * */ @@ -178,9 +218,11 @@ Page({ if(res.result.choiceTopic_dictText) { res.result.choiceTopicArr = res.result.choiceTopic_dictText.split(',') } + let wasicChoiceTopics = this.handleWasicLinkTopics(res.result, 'choiceTopic') this.setData({ singInPersonInfo: res.result, ordeCode: res.result.orderCode, + wasicChoiceTopics }) // 演讲ppt、 if (res.result.speechPpt) { @@ -404,12 +446,16 @@ Page({ meetingInfo.meetingType = meetingInfo.meetingType + '' meetingInfo.tbMeetingType = meetingInfo.tbMeetingType + '' // 国际研讨会 关联会议字段有值,则进行处理 + let updateObj = {} if(meetingInfo.linkTopics_dictText) { meetingInfo.linkTopicsArr = meetingInfo.linkTopics_dictText.split(',') + // WASIC-关联会议的处理 + updateObj.wasicLinkTopics = this.handleWasicLinkTopics(meetingInfo) } this.setData({ meetingInfo:meetingInfo, - questionList: meetingInfo.questionList || [] + questionList: meetingInfo.questionList || [], + ...updateObj }) let flag = this.compareCurrentTime(meetingInfo.registerDeadline) this.setData({ @@ -423,9 +469,13 @@ Page({ if(res.result.linkTopics_dictText) { res.result.linkTopicsArr = res.result.linkTopics_dictText.split(',') } + // WASIC-关联会议的处理 + let updateObj = {} + updateObj.wasicLinkTopics = this.handleWasicLinkTopics(meetingInfo) this.setData({ meetingInfo:res.result, - questionList: res.result.questionList || [] + questionList: res.result.questionList || [], + ...updateObj }) let flag = this.compareCurrentTime(res.result.registerDeadline) this.setData({ diff --git a/pages/meetingDetailSigned/meetingDetailSigned.wxml b/pages/meetingDetailSigned/meetingDetailSigned.wxml index ebb4a1b..9b8acd5 100644 --- a/pages/meetingDetailSigned/meetingDetailSigned.wxml +++ b/pages/meetingDetailSigned/meetingDetailSigned.wxml @@ -13,11 +13,15 @@ 是否WASIC {{meetingInfo.isWasic_dictText || '否'}} - + @@ -191,13 +195,13 @@ 身份 {{singInPersonInfo.identity_dictText}} - - + + 手机号 @@ -713,4 +717,4 @@ 去签到 - + \ No newline at end of file diff --git a/pages/signUpEntrance/signUpEntrance.js b/pages/signUpEntrance/signUpEntrance.js index 8489ebe..319d704 100644 --- a/pages/signUpEntrance/signUpEntrance.js +++ b/pages/signUpEntrance/signUpEntrance.js @@ -9,6 +9,7 @@ import { baseUrl, URL_CONFIG } from '../../assets/js/project.config.js' +import WasicTopicData from '../../assets/js/wasicStaticData.js' Page({ @@ -31,8 +32,46 @@ Page({ // 当前会议是否超出时间 isMoreBool: false, // 标协会议问题征集数据 - questionList: [] + questionList: [], + // 关联会议展示的字段 + wasicLinkTopics: [] }, + // 处理国际研讨会-WASIC-已经选择的数据如何展示 + handleWasicLinkTopics(currentMeetingInfo, dictKey) { + dictKey = dictKey || 'linkTopics' + let resultArr = [] + if(currentMeetingInfo[dictKey] && currentMeetingInfo[dictKey + '_dictText']) { + let topicArr = currentMeetingInfo[dictKey].split(',') + let topicTextArr = currentMeetingInfo[dictKey + '_dictText'].split(',') + let opeArr = JSON.parse(JSON.stringify(WasicTopicData)) + + opeArr.map(tt => { + // 先查询子集中 + tt.allChildren = [...tt.children, ...(tt.radioChildren || [])] + let ele = tt.allChildren.find(item => topicArr.includes(item.value)) + if(ele) { + let dateItem = { + name: tt.name, + date: tt.date, + children: [] + } + + tt.allChildren.map(innerItem => { + let index = topicArr.findIndex(a => a === innerItem.value) + if(index > -1) { + dateItem.children.push({ + 'value': innerItem.value, + 'text': topicTextArr[index], + 'title': topicTextArr[index] + }) + } + }) + resultArr.push(dateItem) + } + }) + } + return resultArr + }, compareCurrentTime(time) { let date = new Date() let compareTime = new Date(time) @@ -58,7 +97,8 @@ Page({ payOrCode: baseUrl + URL_CONFIG + 'sys/common/download/' + res.result.paymentQrCode, tbMeetingType: that.generateTbMeetingType(res.result.tbMeetingType), hotelContactsList: res.result.hotelContactsList, - questionList: res.result.questionList || [] + questionList: res.result.questionList || [], + wasicLinkTopics: this.handleWasicLinkTopics(res.result) }) console.log(that.data.hotelContactsList); initFileList(res.result.meetingFiles).then(res => { diff --git a/pages/signUpEntrance/signUpEntrance.wxml b/pages/signUpEntrance/signUpEntrance.wxml index 4c650e6..bbf3660 100644 --- a/pages/signUpEntrance/signUpEntrance.wxml +++ b/pages/signUpEntrance/signUpEntrance.wxml @@ -14,12 +14,15 @@ 是否WASIC {{meetingDetailIngfo.isWasic_dictText || '否'}} - + @@ -52,7 +55,7 @@ {{meetingDetailIngfo.councilName || ''}} - - + + {{item.name}} + + + + + + + + + + + diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxss b/pages/signUpPageGuoji/signUpPageGuoji.wxss index 2c261f1..2c07b74 100644 --- a/pages/signUpPageGuoji/signUpPageGuoji.wxss +++ b/pages/signUpPageGuoji/signUpPageGuoji.wxss @@ -174,3 +174,15 @@ page{ .checkbox-item { display: block; } +.topic-title{ + padding: 15rpx 0; +} +.radio-div{ + border-top: 1px solid rgba(0, 0, 0, 0.2); + padding-top: 15rpx; + margin-top: 15rpx; +} +.radio-div .radio-item { + display: block; + padding: 15rpx 0; +} \ No newline at end of file