|
@@ -117,7 +117,7 @@
|
|
|
v-model="formData.activityType"
|
|
|
placeholder="请选择活动类型"
|
|
|
@change="activityTypeChange"
|
|
|
- :disabled="edit_id"
|
|
|
+ :disabled="edit_id||isRaiRole"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(type, index) in permission.activityTypeList"
|
|
@@ -164,6 +164,7 @@
|
|
|
hide-area
|
|
|
></v-distpicker> -->
|
|
|
<search-dist-picker
|
|
|
+ :showArea="isRaiRole"
|
|
|
@selected="onChangeCity($event,'roadshow')"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
@@ -190,16 +191,26 @@
|
|
|
</el-form-item>
|
|
|
<!-- 客户信息 -->
|
|
|
<div class="company-info" v-if="formData.activityType === '路演' && formData.companyId && companyInfo">
|
|
|
- <template v-if="companyInfo.EnglishCompany===1">
|
|
|
- <p>所属国家:{{companyInfo.EnglishCountry}}</p>
|
|
|
- <p>累计点击量:{{companyInfo.EnglishViewTotal}}</p>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <p>客户状态:{{ companyInfo.Status }}</p>
|
|
|
- <p>所属行业:{{ companyInfo.IndustryName }}</p>
|
|
|
- <p>开通品种:{{ companyInfo.PermissionName }}</p>
|
|
|
- <p>累计报告阅读次数:{{ companyInfo.ReportReadTotal }}</p>
|
|
|
- </template>
|
|
|
+ <!-- ficc角色看ficc信息 -->
|
|
|
+ <template v-if="!isRaiRole">
|
|
|
+ <template v-if="companyInfo.EnglishCompany===1">
|
|
|
+ <p>所属国家:{{companyInfo.EnglishCountry}}</p>
|
|
|
+ <p>累计点击量:{{companyInfo.EnglishViewTotal}}</p>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <p>客户状态:{{ companyInfo.Status }}</p>
|
|
|
+ <p>所属行业:{{ companyInfo.IndustryName }}</p>
|
|
|
+ <p>开通品种:{{ companyInfo.PermissionName }}</p>
|
|
|
+ <p>累计报告阅读次数:{{ companyInfo.ReportReadTotal }}</p>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <!-- 权益角色看权益信息 -->
|
|
|
+ <template v-else>
|
|
|
+ <p>客户状态:{{companyInfo.Status}}</p>
|
|
|
+ <p>所属行业:{{companyInfo.IndustryName}}</p>
|
|
|
+ <p>行业权限:{{companyInfo.PermissionName}}</p>
|
|
|
+ <p>累计互动次数:{{companyInfo.ReportReadTotal}}</p>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<el-form-item
|
|
|
label="会议形式"
|
|
@@ -396,7 +407,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { activityCellDiaConfig,confirmDiaLink } from "../roleConfig";
|
|
|
+import { activityCellDiaConfig,confirmDiaLink,confirmDiaRai } from "../roleConfig";
|
|
|
import { roadshowInterence,ficcManageInterface } from "@/api/api.js";
|
|
|
import publicMixins from '../roleConfig/mixins';
|
|
|
import { constrainPoint } from "@fullcalendar/common";
|
|
@@ -495,7 +506,7 @@ export default {
|
|
|
const res = await roadshowInterence.getResearcherList();
|
|
|
if (res.Ret === 200) {
|
|
|
|
|
|
- this.researcherList = res.Data && res.Data.filter(item => item.GroupName !== 'ficc全体').map(group => ({
|
|
|
+ /* this.researcherList = res.Data && res.Data.filter(item => item.GroupName !== 'ficc全体').map(group => ({
|
|
|
...group,
|
|
|
label: group.GroupName,
|
|
|
ResearcherList: group.ResearcherList ? group.ResearcherList.map(child => ({
|
|
@@ -503,12 +514,21 @@ export default {
|
|
|
label: child.RealName,
|
|
|
value: child.AdminId
|
|
|
})) : []
|
|
|
- }))
|
|
|
+ })) */
|
|
|
+ const ficcList = this.formatResearcherList(res.Data.find(i=>i.GroupName==='ficc').ResearcherList||[]);
|
|
|
+ const raiList = this.formatResearcherList(res.Data.find(i=>i.GroupName==='权益').ResearcherList||[]);
|
|
|
+ this.researcherList = [{
|
|
|
+ label:'ficc',
|
|
|
+ ResearcherList:ficcList
|
|
|
+ },{
|
|
|
+ label:'权益',
|
|
|
+ ResearcherList:raiList
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
// 对获取到的研究员列表做处理
|
|
|
formatResearcherList(list) {
|
|
|
- this.researcherList = list && list.filter(item => item.GroupName !== 'ficc全体').map(group => ({
|
|
|
+ /* this.researcherList = list && list.filter(item => item.GroupName !== 'ficc全体').map(group => ({
|
|
|
...group,
|
|
|
label:group.GroupName,
|
|
|
ResearcherList: group.ResearcherList && group.ResearcherList.map(child => ({
|
|
@@ -516,7 +536,23 @@ export default {
|
|
|
label: child.RealName,
|
|
|
value: child.AdminId
|
|
|
}))
|
|
|
- }))
|
|
|
+ })) */
|
|
|
+ list.forEach((group) => {
|
|
|
+ // 对组做处理
|
|
|
+ group.label = group.GroupName;
|
|
|
+ // 如果有列表
|
|
|
+ if (group.ResearcherList) {
|
|
|
+ group.ResearcherList.forEach((item) => {
|
|
|
+ // 对研究员做处理
|
|
|
+ item.label = item.RealName;
|
|
|
+ item.value = item.AdminId;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // 没有列表
|
|
|
+ group.value = group.GroupId;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return list.filter((group) => group.GroupName !== "ficc全体");
|
|
|
|
|
|
},
|
|
|
// 取消按钮
|
|
@@ -536,12 +572,13 @@ export default {
|
|
|
await this.$refs.form.validate();
|
|
|
|
|
|
if(this.formData.companyName && !this.formData.companyId) return this.$message.warning('请选择客户');
|
|
|
+ if(this.isRaiRole&&this.formData.roadshowType==='线下'&&!this.formData.District) return this.$message.warning('请选择路演城市')
|
|
|
// 设置参数
|
|
|
let parmas = null;
|
|
|
|
|
|
const param_research = this.formData.selectResearchers.map(item=>({
|
|
|
ResearcherId: item.researcherId,
|
|
|
- ResearcherName: this.findResearcherById(item.researcherId),
|
|
|
+ ResearcherName: this.findResearcherName(item.researcherId),
|
|
|
StartDate:this.$moment(item.startDate).format('YYYY-MM-DD'),
|
|
|
EndDate: this.$moment(item.endDate).format('YYYY-MM-DD'),
|
|
|
StartTime: this.$moment(item.startTime).format('HH:mm:ss'),
|
|
@@ -560,6 +597,7 @@ export default {
|
|
|
ActivityCategory: this.formData.activityClass[this.formData.activityClass.length-1],
|
|
|
City: ['公开会议','路演'].includes(this.formData.activityType) ? dynaic_city_param[this.formData.activityType][1] : '',
|
|
|
Province: ['公开会议','路演'].includes(this.formData.activityType) ? dynaic_city_param[this.formData.activityType][0] : '',
|
|
|
+ District:this.formData.District||'',
|
|
|
CooperationName: this.formData.partnersName,
|
|
|
Theme: this.formData.meetingTheme,
|
|
|
RoadshowType: this.formData.activityType === '路演' ? this.formData.roadshowType : this.formData.meetingType,
|
|
@@ -582,8 +620,34 @@ export default {
|
|
|
if (res.Ret !== 200) return
|
|
|
const { text,content,query } = this.setDynamicLink(this.formData.activityType);
|
|
|
|
|
|
- this.edit_id ? this.$message.warning('提交成功') : confirmDiaLink(text, content, query);
|
|
|
-
|
|
|
+ //this.edit_id ? this.$message.warning('提交成功') : confirmDiaLink(text, content, query);
|
|
|
+ if(this.edit_id){
|
|
|
+ this.$message.warning('提交成功')
|
|
|
+ }else{
|
|
|
+ if(this.formData.activityType!=='路演'){
|
|
|
+ confirmDiaLink(text, content, query)
|
|
|
+ this.$emit('ensureCallback');
|
|
|
+ this.cancel();
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //判断所选研究员是否有权益
|
|
|
+ const ResearcherIds = this.formData.selectResearchers.map(i=>i.researcherId)
|
|
|
+ const ResearcherTypes = ResearcherIds.map(i=>this.findType(i))
|
|
|
+ console.log('types',ResearcherTypes)
|
|
|
+ //既有权益研究员的路演,又有ficc研究员路演时,提示弹窗
|
|
|
+ if(ResearcherTypes.includes('rai')&&ResearcherTypes.includes('ficc')){
|
|
|
+ const { text, content, query } = this.setDynamicLink(
|
|
|
+ 'ficc&rai路演'
|
|
|
+ );
|
|
|
+ confirmDiaLink(text, content, query)
|
|
|
+ //只提交权益研究员的路演时,提示弹窗:
|
|
|
+ }else if(ResearcherTypes.includes('rai')){
|
|
|
+ confirmDiaRai()
|
|
|
+ //只提交ficc研究员的路演时,提示弹窗:(维持原来的不变)
|
|
|
+ }else{
|
|
|
+ confirmDiaLink(text, content, query)
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$emit('ensureCallback');
|
|
|
this.cancel();
|
|
|
|
|
@@ -664,10 +728,10 @@ export default {
|
|
|
this.companyInfo = Data;
|
|
|
|
|
|
},
|
|
|
- // 研究员id查找研究员名
|
|
|
+ /* // 研究员id查找研究员名
|
|
|
findResearcherById(id){
|
|
|
return this.allResearcher.find(researcher => researcher.AdminId===id).RealName
|
|
|
- }
|
|
|
+ } */
|
|
|
},
|
|
|
created() {
|
|
|
this.permission = activityCellDiaConfig[localStorage.getItem("Role")];
|