1234567891011121314151617181920212223242526272829303132333435363738 |
- // 研究员
- const RESEARCHLIST = ['ficc_researcher', 'researcher', 'rai_researcher','ficc_admin'];
- // 销售/组长
- const SELLERLIST = ['ficc_seller', 'rai_seller', 'ficc_group', 'rai_group', 'ficc_team','rai_admin'];
- // admin
- const ADMINLIST = ['admin'];
- /* 获取角色类型 */
- export const getRole = (role) => {
- return RESEARCHLIST.includes(role) ? 'researcher' : SELLERLIST.includes(role) ? 'seller' : role;
- }
- /* 回显表单 type回显的研究员是[]还是'' 1路演/公开会议 2内部会议/电话会 */
- export const editInfoBack = ({ ActivityType,RoadshowType,RoadshowPlatform,City,Province,CompanyId,CompanyName,ResearcherId,Theme,CooperationName,ActivityCategory,StartDate,EndDate,StartTime,EndTime },type= 1) => {
- return {
- activityType: ActivityType, // 活动类型
- roadshowType: RoadshowType, // 路演形式
- roadshowPlatform: RoadshowPlatform, // 路演平台
- roadshowCity: Province ? [Province,City] : [], // 路演城市
- companyId: CompanyId, // 客户id
- companyName: CompanyName, // 客户名称
- meetingTheme: Theme, // 会议主题
- partnersName: CooperationName, // 合作方名称
- activityClass: ActivityCategory, // 活动类别
- selectResearchers: [
- // 选择的研究员
- {
- researcherId: type === 2 ? ResearcherId.split(',').map(item => Number(item)) : Number(ResearcherId),
- startTime: new Date(`${StartDate.replace(/-/g,'/')} ${StartTime}`).getTime(),
- endTime: new Date(`${EndDate.replace(/-/g,'/')} ${EndTime}`).getTime(),
- },
- ],
- };
- }
|