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 || '否'}}
-
+
关联会议
-
- {{item}}
-
+
+
+ {{pItem.name}}
+ {{item.text}}
+
+
+
@@ -191,13 +195,13 @@
身份
{{singInPersonInfo.identity_dictText}}
-
-
+
+
会议名称
-
- {{item}}
-
-
+
+ {{pItem.name}}
+ {{item.text}}
+
手机号
@@ -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 || '否'}}
-
+
关联会议
- {{item}}
+
+ {{pItem.name}}
+ {{item.text}}
+
-
+
@@ -52,7 +55,7 @@
{{meetingDetailIngfo.councilName || ''}}
-
+
召开时间
{{meetingDetailIngfo.startTime + '~' + meetingDetailIngfo.endTime }}
diff --git a/pages/signUpPageGuoji/signUpPageGuoji.js b/pages/signUpPageGuoji/signUpPageGuoji.js
index 811b3d2..e37f653 100644
--- a/pages/signUpPageGuoji/signUpPageGuoji.js
+++ b/pages/signUpPageGuoji/signUpPageGuoji.js
@@ -35,11 +35,85 @@ const LinkTopicsEnums = {
name: '免费专题',
index: 6
},
+ freeTwo: { name: '免费专题', index: 8 },
default: {
name: '114/22焦点论坛(默认专题)',
index: 99
}
}
+const topicData = [
+ {
+ name: '11月27日',
+ date: '11月27日',
+ radioKey: 'radioKey',
+ children: [
+ {
+ 'value': '6',
+ 'text': '国际发展论坛(09:00-15:00)',
+ 'title': '国际发展论坛(09:00-15:00)'
+ }
+ ],
+ radioChildren: [
+ {
+ 'value':'5',
+ 'text':'弱势道路交通参与者(VRU)保护专题(14:00-18:00)',
+ 'title':'弱势道路交通参与者(VRU)保护专题(14:00-18:00)'
+ },
+ {
+ 'value':'2',
+ 'text':'智能网联汽车标准化领航及标准路线图专题(14:00-18:00)',
+ 'title':'智能网联汽车标准化领航及标准路线图专题(14:00-18:00)'
+ },
+ {
+ 'value':'4',
+ 'text':'动力电池安全专题(14:00-18:00)',
+ 'title':'动力电池安全专题(14:00-18:00)'
+ }
+ ]
+ },
+ {
+ name: '11月28日',
+ date: '11月28日',
+ radioKey: 'radioKeyTwo',
+ children: [
+ {
+ 'value':'99',
+ 'text':'114/22焦点论坛(08:00-12:00,全体大会)',
+ 'title':'114/22焦点论坛(08:00-12:00,全体大会)',
+ 'disabled': true,
+ checked: true
+ }
+ ],
+ radioChildren: [
+ {
+ 'value':'1',
+ 'text':'汽车网络安全与数据安全标准合规专题(14:00-18:00)',
+ 'title':'汽车网络安全与数据安全标准合规专题(14:00-18:00)'
+ },
+ {
+ 'value':'3',
+ 'text':'汽车低碳专题(14:00-18:00)',
+ 'title':'汽车低碳专题(14:00-18:00)'
+ },
+ {
+ 'value':'7',
+ 'text':'无人小车专题(14:00-18:00)',
+ 'title':'无人小车专题(14:00-18:00)'
+ }
+ ]
+ },
+ {
+ name: '11月29日',
+ date: '11月29日',
+ children: [
+ {
+ 'value':'8',
+ 'text':'湾区智联试验场参观(8:30-10:30)',
+ 'title':'湾区智联试验场参观(8:30-10:30)'
+ }
+ ]
+ }
+]
import {
InvoiceTypeEnums,
@@ -62,6 +136,8 @@ Page({
inviteCodeArr: [],
// 可选课题名称的数组
linkTopicsOptionArr: [],
+ // WASIC可选会议的数组-前端写死
+ showTopicsArr: [...topicData],
// 国际研讨会-WASIC-选择关联客户的数组
choiceTopicArr: [],
// 是否出现输入邀请码 参会身份选择嘉宾才出现
@@ -368,7 +444,7 @@ Page({
let meetingCostSum = that.data.selectedMeeting.meetingCosts
// 如果当前是WASIC会议 则需要通过会议名称判断会议的费用
if (this.data.meetingDetailInfo.isWasic) {
- meetingCostSum = this.handleMeetingCostSum(this.data.linkTopicsOptionArr)
+ meetingCostSum = this.handleMeetingCostSum(this.data.showTopicsArr)
}
this.setData({
meetingCosts: meetingCostSum
@@ -380,9 +456,22 @@ Page({
}
},
// 多选主题的时候 处理当前显示的费用总数
- handleMeetingCostSum(linkTopicsOptionArr) {
+ handleMeetingCostSum() {
+ let arr = []
+ this.data.showTopicsArr.map(tt => {
+ tt.children && tt.children.map(item => {
+ if(item.checked) {
+ arr.push(item.value)
+ }
+ })
+ tt.radioChildren && tt.radioChildren.map(item => {
+ if(item.checked) {
+ arr.push(item.value)
+ }
+ })
+ })
let meetingCostSum
- let choiceTopicArr = linkTopicsOptionArr.filter(item => item.checked && item.value !== (LinkTopicsEnums.free.index + ''))
+ let choiceTopicArr = arr.filter(item => (item + '') !== (LinkTopicsEnums.free.index + '') && (item + '') !== (LinkTopicsEnums.freeTwo.index + ''))
if (choiceTopicArr.length > 2) {
meetingCostSum = this.data.meetingDetailInfo.meetingCostsThreeTopic
} else {
@@ -396,25 +485,35 @@ Page({
id: meetingId
}).then(res => {
if (res.success) {
- let arr = res.result || []
- arr.map(tt => {
- tt.name = tt.text
- if(tt.value + '' === LinkTopicsEnums.default.index + '') {
- tt.checked = true
- tt.disabled = true
- }
+ let arr = res.result || []
+ this.data.showTopicsArr.map(tt => {
+ tt.children.map(item => {
+ let ele = arr.find(a => a.value + '' === item.value)
+ if(ele) {
+ item.text = ele.text
+ item.title = ele.title
+ }
+ })
+ tt.radioChildren && tt.radioChildren.map(item => {
+ let ele = arr.find(a => a.value + '' === item.value)
+ if(ele) {
+ item.text = ele.text
+ item.title = ele.title
+ }
+ })
})
const updateObj = {
- linkTopicsOptionArr: arr // 参会人信息
+ // linkTopicsOptionArr: arr // 参会人信息
+ showTopicsArr: this.data.showTopicsArr
}
// 编辑时 对数据进行处理
if (this.isEdit) {
// 选中的主题
const choiceTopic = (this.model.choiceTopic || '').split(',')
- this.updateCheckboxArr(arr, choiceTopic)
+ this.updateCheckboxArr(this.data.showTopicsArr, choiceTopic, 'all')
// 计算费用
- updateObj.meetingCosts = this.handleMeetingCostSum(arr)
- updateObj.linkTopicsOptionArr = arr
+ updateObj.meetingCosts = this.handleMeetingCostSum()
+ updateObj.showTopicsArr = this.data.showTopicsArr
}
this.setData({
...updateObj
@@ -426,16 +525,36 @@ Page({
// 选择的课题发生改变
changeChoiceTopic(e) {
const values = e.detail.value // 是一个数组 ['1', '2']
- this.updateCheckboxArr(this.data.linkTopicsOptionArr, values)
- let updateObj = {linkTopicsOptionArr: this.data.linkTopicsOptionArr}
+ this.updateCheckboxArr(this.data.showTopicsArr, values, 'check')
+ let updateObj = {showTopicsArr: this.data.showTopicsArr}
// 选择是参会人的时候处理数据
+ this.selectedCheckTopicsArr = [...values]
if (this.data.identity === '2') {
- updateObj.meetingCosts = this.handleMeetingCostSum(this.data.linkTopicsOptionArr)
+ updateObj.meetingCosts = this.handleMeetingCostSum()
}
this.setData({
...updateObj
})
},
+ changeRadioTopic(e) {
+ const value = e.detail.value
+ let keyName = e.currentTarget.dataset.name
+ this[keyName] = value
+ let pIndex = this.data.showTopicsArr.findIndex(tt => tt.radioKey === keyName)
+ if(pIndex > -1) {
+ this.data.showTopicsArr[pIndex].radioChildren.map(radioItem => {
+ radioItem.checked = false
+ if(radioItem.value === value) {
+ radioItem.checked = true
+ }
+ })
+ }
+ let updateObj = {showTopicsArr: this.data.showTopicsArr}
+ updateObj.meetingCosts = this.handleMeetingCostSum()
+ this.setData({
+ ...updateObj
+ })
+ },
// 设置邀请码的值
bindInputInviteCode(e) {
// 在这里将所有控制表单都设为false 防止显示出问题
@@ -1156,7 +1275,17 @@ Page({
}
// 国际研讨会-WASIC 所选择的 关联会议
if (formData.choiceTopic) {
- formData.choiceTopic = formData.choiceTopic.join(',')
+ let choiceArr = formData.choiceTopic
+ if(formData.radioKey) {
+ choiceArr.push(formData.radioKey)
+ delete formData.radioKey
+ }
+ if(formData.radioKeyTwo) {
+ choiceArr.push(formData.radioKeyTwo)
+ delete formData.radioKeyTwo
+ }
+
+ formData.choiceTopic = choiceArr.join(',')
}
// 会议类型
// formData.meetingType = this.data.selectedMeeting.meetingType
@@ -1303,14 +1432,27 @@ Page({
},
/**
* 更新Checkbox对应的选中状态
- * @param arr-Checkbox对应的数组
+ * @param arr-Checkbox对应的数组 和 showTopicsArr 对应的数据格式一致
* @param valueArr-选中的值-数组
+ * @param type-类型 ‘all’ 单选多选全都匹配; ‘check’-匹配多选 ‘radio’匹配单选
*/
- updateCheckboxArr(arr, valueArr) {
+ updateCheckboxArr(arr, valueArr, type) {
arr.map(tt => {
- tt.checked = false
- if (valueArr.indexOf(tt.value) > -1) {
- tt.checked = true
+ if (type === 'all' || type === 'check') {
+ tt.children.map(item =>{
+ item.checked = false
+ if (valueArr.indexOf(item.value) > -1) {
+ item.checked = true
+ }
+ })
+ }
+ if(type === 'all' || type === 'radio') {
+ tt.radioChildren && tt.radioChildren.map(item =>{
+ item.checked = false
+ if (valueArr.indexOf(item.value) > -1) {
+ item.checked = true
+ }
+ })
}
})
},
@@ -1401,9 +1543,9 @@ Page({
if (this.data.meetingDetailInfo.isWasic) {
// 选中的主题
const choiceTopic = (this.model.choiceTopic || '').split(',')
- this.updateCheckboxArr(this.data.linkTopicsOptionArr, choiceTopic)
+ this.updateCheckboxArr(this.data.showTopicsArr, choiceTopic, 'all')
// 计算费用
- updateObj.meetingCosts = this.handleMeetingCostSum(this.data.linkTopicsOptionArr)
+ updateObj.meetingCosts = this.handleMeetingCostSum()
}
if (this.model.identity === MeetIdentifyTypeEnums.attendee.index) {
this.updateRadioArr(this.data.need, '0')
diff --git a/pages/signUpPageGuoji/signUpPageGuoji.wxml b/pages/signUpPageGuoji/signUpPageGuoji.wxml
index 3c4a400..51c6902 100644
--- a/pages/signUpPageGuoji/signUpPageGuoji.wxml
+++ b/pages/signUpPageGuoji/signUpPageGuoji.wxml
@@ -31,9 +31,23 @@
-
+
+ {{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