【update】-关联会议的处理
This commit is contained in:
@@ -23,9 +23,14 @@
|
||||
</a-col>
|
||||
<a-row class="flex-col mul-row-row" v-if="currentMeetingInfo.isWasic">
|
||||
<label>关联会议:</label>
|
||||
<span class="mul-row-content">
|
||||
<span class="content" v-for="item in (currentMeetingInfo.linkTopics_dictText || '').split(',')" :key="item">{{item}}</span>
|
||||
</span>
|
||||
<div class="mul-row-content">
|
||||
<div>
|
||||
<div class="word-beak block-span" v-for="item in wasicLinkTopics" :key="item.name">
|
||||
<div class="topic-title">{{ item.name }}</div>
|
||||
<div v-for="innerItem in item.children" :key="'a_checked_'+ innerItem.value">{{ innerItem.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-row>
|
||||
</template>
|
||||
|
||||
@@ -393,6 +398,7 @@ import PreviewFile from '@comp/jero/PreviewFile'
|
||||
import JImageUpload from '@comp/jero/JImageUpload'
|
||||
import SetGuessUploadFlagModal from './modules/SetGuessUploadFlagModal'
|
||||
import { downloadFile } from '../../../api/manage'
|
||||
import WasicTopicData from "./modules/wasicStaticData";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -667,6 +673,8 @@ export default {
|
||||
meetingCostBool: false,
|
||||
meetingId: '',
|
||||
meetingTypeValue: '',
|
||||
// 关联会议展示的字段
|
||||
wasicLinkTopics: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -681,6 +689,7 @@ export default {
|
||||
getMeetInfoById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.currentMeetingInfo = Object.assign({}, res.result)
|
||||
this.wasicLinkTopics = this.handleWasicLinkTopics(this.currentMeetingInfo)
|
||||
// 转化会议类型
|
||||
this.meetingType = this.generateMeetingType(this.currentMeetingInfo.meetingType)
|
||||
// 列表表头只有国际研讨会有对接人字段
|
||||
@@ -780,6 +789,41 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 处理国际研讨会-WASIC-已经选择的数据如何展示
|
||||
handleWasicLinkTopics(currentMeetingInfo, dictKey) {
|
||||
dictKey = dictKey || 'linkTopics'
|
||||
if(currentMeetingInfo[dictKey] && currentMeetingInfo[dictKey + '_dictText']) {
|
||||
let topicArr = currentMeetingInfo[dictKey].split(',')
|
||||
let topicTextArr = currentMeetingInfo[dictKey + '_dictText'].split(',')
|
||||
let opeArr = JSON.parse(JSON.stringify(WasicTopicData))
|
||||
let resultArr = []
|
||||
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
|
||||
}
|
||||
},
|
||||
selectIdentity(){
|
||||
console.log(this.queryParam.identity)
|
||||
if(this.queryParam.identity !== '1'){
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
@ok="addContactsOk"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
|
||||
<a-col :xxl="8" :xl="12" :sm="24">
|
||||
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入手机号"
|
||||
@@ -43,23 +41,6 @@
|
||||
v-decorator="['phone',validatorRules.phone]"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 国际研讨会 WASIC 增加会议名称的选择--已经到账的信息不能修改-->
|
||||
<a-col :xxl="8" :xl="12" :sm="24" v-if="currentMeetingInfo.isWasic">
|
||||
<a-form-item label="会议名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-multi-select-tag
|
||||
v-decorator="['choiceTopic',validatorRules.choiceTopic]"
|
||||
:trigger-change="true"
|
||||
style="width: 100%"
|
||||
dict-code="linkTopics"
|
||||
placeholder="请选择会议名称"
|
||||
:options="linkTopicsOptionArr"
|
||||
type="checkbox"
|
||||
class="meeting-form-multi-select"
|
||||
:disabled="model.inAccount === 1"
|
||||
>
|
||||
</j-multi-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xxl="8" :xl="12" :sm="24">
|
||||
<a-form-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
@@ -85,6 +66,39 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="currentMeetingInfo.isWasic">
|
||||
<!-- 国际研讨会 WASIC 增加会议名称的选择--已经到账的信息不能修改-->
|
||||
<a-col :xxl="8" :xl="12" :sm="24" v-if="currentMeetingInfo.isWasic">
|
||||
<a-form-item label="会议名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<!--<j-multi-select-tag-->
|
||||
<!-- v-decorator="['choiceTopic',validatorRules.choiceTopic]"-->
|
||||
<!-- :trigger-change="true"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- dict-code="linkTopics"-->
|
||||
<!-- placeholder="请选择会议名称"-->
|
||||
<!-- :options="linkTopicsOptionArr"-->
|
||||
<!-- type="checkbox"-->
|
||||
<!-- class="meeting-form-multi-select"-->
|
||||
<!-- :disabled="model.inAccount === 1"-->
|
||||
<!-->-->
|
||||
<!--</j-multi-select-tag>-->
|
||||
|
||||
<a-checkbox-group class="meeting-form-multi-select" @change="choiceTopicChange" v-decorator="['choiceTopic',validatorRules.choiceTopic]" :disabled="model.inAccount === 1">
|
||||
<div v-for="(item, index) in showTopicsArr" :key="'showTopicTitle_'+ index">
|
||||
<div class="topic-title">{{item.name}}</div>
|
||||
<div>
|
||||
<a-checkbox v-for="item in item.children" :key="'a_checkbox_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-checkbox>
|
||||
</div>
|
||||
<div class="radio-div" v-if="item.radioChildren">
|
||||
<a-radio-group v-decorator="[item.radioKey]" :disabled="model.inAccount === 1">
|
||||
<a-radio v-for="item in item.radioChildren" :key="'a_radio_'+ item.value" :value="item.value" :disabled="item.disabled">{{ item.text }}</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</a-checkbox-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!--个人信息end-->
|
||||
<!--除开国际研讨会的其他会议的显示-->
|
||||
<template v-if="meetingType !== '3' ">
|
||||
@@ -153,6 +167,7 @@ import pick from 'lodash.pick'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import { queryCompanyInfoById } from '../../../api/api'
|
||||
import { LinkTopicsEnums } from '../../../enums/commonEnums'
|
||||
import WasicTopicData from './modules/wasicStaticData'
|
||||
|
||||
export default {
|
||||
name: 'SignUpInfoEdit',
|
||||
@@ -270,7 +285,9 @@ export default {
|
||||
// 当前参会企业是否是内部企业
|
||||
isInternalEnterprise: false,
|
||||
// 可选会议名称的数组
|
||||
linkTopicsOptionArr: []
|
||||
linkTopicsOptionArr: [],
|
||||
// WASIC可选会议的数组-前端写死
|
||||
showTopicsArr: [...WasicTopicData]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -315,21 +332,34 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
choiceTopicChange(e) {
|
||||
console.log(e)
|
||||
},
|
||||
// 获取国际研讨会-能选择课题的数据字典数据
|
||||
getLinkTopicsOptionArr(meetingId) {
|
||||
getLinkTopics({id: meetingId}).then(res =>{
|
||||
if(res.success) {
|
||||
this.linkTopicsOptionArr = res.result || []
|
||||
// 操作默认的课题,默认的课题不能删除
|
||||
this.linkTopicsOptionArr.map(item => {
|
||||
if((item.value + '') === (LinkTopicsEnums.default.index + '')) {
|
||||
item.disabled = true
|
||||
}
|
||||
// 页面上展示的文字 按照数据字段返回的展示
|
||||
this.showTopicsArr.map(tt => {
|
||||
tt.children.map(item => {
|
||||
let ele = this.linkTopicsOptionArr.find(a => a.value + '' === item.value)
|
||||
if(ele) {
|
||||
item.text = ele.text
|
||||
item.title = ele.title
|
||||
}
|
||||
})
|
||||
})
|
||||
// 非新增页面,给Form赋值
|
||||
// 操作默认的课题,默认的课题不能删除
|
||||
// this.linkTopicsOptionArr.map(item => {
|
||||
// if((item.value + '') === (LinkTopicsEnums.default.index + '')) {
|
||||
// item.disabled = true
|
||||
// }
|
||||
// })
|
||||
// 新增页面,给Form赋值
|
||||
if(!this.model.id) {
|
||||
this.form.setFieldsValue({
|
||||
choiceTopic: LinkTopicsEnums.default.index + ''
|
||||
choiceTopic: [LinkTopicsEnums.default.index + '']
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -397,6 +427,34 @@ export default {
|
||||
id:this.model.companyContactTemporaryId,
|
||||
name:this.model.companyContactName
|
||||
}
|
||||
// 如果存在所选择的课题,则对课题数据进行处理
|
||||
if (this.model.choiceTopic) {
|
||||
let choiceTopicArr = this.model.choiceTopic.split(',')
|
||||
this.showTopicsArr = JSON.parse(JSON.stringify(WasicTopicData))
|
||||
let checkboxArr = [], radioObj = {}
|
||||
choiceTopicArr.map(checkedItem => {
|
||||
this.showTopicsArr.map(tt => {
|
||||
let index = tt.children.findIndex(inner => inner.value === checkedItem)
|
||||
if(index > -1) {
|
||||
tt.children[index].checked = true
|
||||
checkboxArr.push(checkedItem)
|
||||
}
|
||||
if(tt.radioChildren) {
|
||||
let radioIndex = tt.radioChildren.findIndex(inner => inner.value === checkedItem)
|
||||
if(radioIndex > -1) {
|
||||
tt.radioChildren[radioIndex].checked = true
|
||||
radioObj[tt.radioKey] = checkedItem
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
this.form.setFieldsValue({
|
||||
...radioObj,
|
||||
'choiceTopic': checkboxArr
|
||||
})
|
||||
|
||||
}
|
||||
//国际研讨会的嘉宾编辑回显值
|
||||
this.$nextTick(() => {
|
||||
// 普通会议的编辑回显值
|
||||
@@ -430,7 +488,6 @@ export default {
|
||||
'companyId',
|
||||
'companyContactId',
|
||||
'phone',
|
||||
'choiceTopic',
|
||||
'email',
|
||||
'post',
|
||||
'identity',
|
||||
@@ -476,6 +533,20 @@ export default {
|
||||
if(this.meetingCostBool){
|
||||
submitData.needInvoice = 0
|
||||
}
|
||||
// 国际研讨会处理 会议名称的问题
|
||||
// 国际研讨会 且为WASIC 会议
|
||||
if (this.currentMeetingInfo.meetingType === '3' && this.currentMeetingInfo.isWasic) {
|
||||
let choiceTopicArr = submitData.choiceTopic
|
||||
//11月27日 单选会议的处理
|
||||
if(submitData.radioKey) {
|
||||
choiceTopicArr.push(submitData.radioKey)
|
||||
}
|
||||
//11月28日 单选会议的处理
|
||||
if(submitData.radioKeyTwo) {
|
||||
choiceTopicArr.push(submitData.radioKeyTwo)
|
||||
}
|
||||
submitData.choiceTopic = choiceTopicArr.join(',')
|
||||
}
|
||||
console.log(submitData)
|
||||
let url = ''
|
||||
if(!this.model.id){
|
||||
@@ -485,6 +556,8 @@ export default {
|
||||
// 编辑的时候需要传入id
|
||||
submitData.id = this.model.id
|
||||
}
|
||||
// that.confirmLoading = false
|
||||
// return
|
||||
let method = 'post'
|
||||
httpAction(url,submitData,method).then(res => {
|
||||
if(res.success){
|
||||
@@ -668,14 +741,23 @@ export default {
|
||||
|
||||
// 国际研讨会-关联会议 多选样式的修改
|
||||
.meeting-form-multi-select{
|
||||
.topic-title{
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
/deep/.ant-checkbox-wrapper + .ant-checkbox-wrapper {
|
||||
margin-left: 0!important;
|
||||
}
|
||||
/deep/ .ant-checkbox-wrapper{
|
||||
/deep/ .ant-checkbox-wrapper,
|
||||
/deep/ .ant-radio-wrapper{
|
||||
margin-right: 8px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.radio-div{
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.2);
|
||||
padding-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
const WasicTopicData = [
|
||||
{
|
||||
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
|
||||
}
|
||||
],
|
||||
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)'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
export default WasicTopicData
|
||||
Reference in New Issue
Block a user