|
@@ -6,7 +6,7 @@ var temp = `
|
|
|
<div>
|
|
|
<div class="user-data-dialog" id="collectUserInfoDialog" v-if="showForm">
|
|
|
<div class="mask"></div>
|
|
|
- <div class="dialog-container">
|
|
|
+ <div class="dialog-container seo-dialog-container">
|
|
|
<div class="dialog-header fs18" v-if="dialogTitleTop" v-text="dialogTitleTop"></div>
|
|
|
<div class="dialog-header dialog-header-subtitle mt-4" v-if="dialogTitle" v-html="dialogTitle"></div>
|
|
|
<div class="dialog-content">
|
|
@@ -76,7 +76,7 @@ var temp = `
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div class="long-control" v-if="setCoopreate">
|
|
|
+ <div class="long-control" v-if="moduleShow.cooperate">
|
|
|
<el-form-item label="合作概述 :" prop="cooperate">
|
|
|
<el-input
|
|
|
v-model.trim="form.cooperate"
|
|
@@ -100,9 +100,27 @@ var temp = `
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="company clearfix" v-if="moduleShow.report">
|
|
|
+ <div class="form-title">定制专属分析报告</div>
|
|
|
+ <div class="form-main">
|
|
|
+ <div class="long-control">
|
|
|
+ <el-form-item label="您的行业 :" class="industry-type" prop="industry">
|
|
|
+ <el-checkbox-group v-model="form.industry" @change="onIndustryChange">
|
|
|
+ <el-checkbox v-for="item in industryData" :key="item" :label="item"></el-checkbox>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="form.otherIndustry"
|
|
|
+ class="item-input industry-input"
|
|
|
+ @input="onOtherIndustryInput"
|
|
|
+ placeholder="请输入您的行业">
|
|
|
+ </el-input>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="warm-prompt">
|
|
|
<span class="icon-warning"></span>
|
|
|
- <span class="warm-text">温馨提示:请提供准确的信息,我们将为您推荐更准确、更个性化的商机和服务</span>
|
|
|
+ <span class="warm-text">@@warmText@@</span>
|
|
|
</div>
|
|
|
<div class="agree-service" v-if="moduleShow.agree">
|
|
|
<el-checkbox v-model="form.agreeChecked"> 我同意剑鱼标讯将业务范围及合作需求提供给潜在合作伙伴搜索、查看</el-checkbox>
|
|
@@ -156,6 +174,8 @@ var branchData = branchJson.map(function (item) {
|
|
|
label: item
|
|
|
}
|
|
|
})
|
|
|
+// 您的行业
|
|
|
+var industryData = ['建筑工程', '行政办公', '医疗卫生', '服务采购', '机械设备', '弱电安防', '信息技术', '交通工程', '市政设施', '其他']
|
|
|
// 防抖
|
|
|
function debounce (fn, delay) {
|
|
|
var timer
|
|
@@ -278,11 +298,35 @@ var vm = new Vue({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ var validIndustry = function (rule, value, callback) {
|
|
|
+ if (!value.length) {
|
|
|
+ return callback(new Error('行业为必填项'));
|
|
|
+ } else {
|
|
|
+ if (value.includes('其他')) {
|
|
|
+ console.log(value, '有值', rule);
|
|
|
+
|
|
|
+ if (vm.form.otherIndustry === '') {
|
|
|
+ callback(new Error('请输入行业'))
|
|
|
+ } else if (vm.industryData.includes(vm.form.otherIndustry)) {
|
|
|
+ callback(new Error('行业输入重复'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (vm.industryData.includes(vm.form.otherIndustry)) {
|
|
|
+ callback(new Error('行业输入重复'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
dialogTitleTop: '为给您匹配精准的推荐信息,请完善个人信息',
|
|
|
dialogTitle: '',
|
|
|
jobData: jobData, // 职位数据
|
|
|
branchData: branchData,
|
|
|
+ industryData: industryData,
|
|
|
form: {
|
|
|
name: '', // 姓名
|
|
|
phone: '', // 手机号
|
|
@@ -295,7 +339,9 @@ var vm = new Vue({
|
|
|
need: '', // 合作需求
|
|
|
agreeChecked: true,
|
|
|
branch: '',
|
|
|
- cooperate: '' // 商务合作
|
|
|
+ cooperate: '', // 商务合作
|
|
|
+ industry: [], // 行业
|
|
|
+ otherIndustry: '', // 其他行业
|
|
|
},
|
|
|
rules: {
|
|
|
name: [
|
|
@@ -346,7 +392,14 @@ var vm = new Vue({
|
|
|
message: '商务合作为必填项',
|
|
|
trigger: 'change'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ industry: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validIndustry,
|
|
|
+ trigger: 'change'
|
|
|
+ }
|
|
|
+ ],
|
|
|
},
|
|
|
showSearchResult: false,
|
|
|
companyList: [],
|
|
@@ -363,7 +416,8 @@ var vm = new Vue({
|
|
|
business: false,
|
|
|
need: false,
|
|
|
agree: false,
|
|
|
- cooperate: false // 商务合作显示
|
|
|
+ cooperate: false, // 商务合作显示
|
|
|
+ report: false // seo-定制专属分析报告
|
|
|
},
|
|
|
sourceTitleMap: {
|
|
|
pc_article_member_freeuse: '请升级大会员无限制查看标讯、超前项目,优先对接项目负责人,抢占绝对先机!',
|
|
@@ -406,7 +460,8 @@ var vm = new Vue({
|
|
|
'customermanagement-landingpage': '客户管理落地页',
|
|
|
'digitalmarketing-landingpage': '数字化营销落地页',
|
|
|
'pc_ServiceList_experience': 'PC服务列表-申请免费体验'
|
|
|
- }
|
|
|
+ },
|
|
|
+ warmText: '温馨提示:请提供准确的信息,我们将为您推荐更准确、更个性化的商机和服务'
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -486,15 +541,6 @@ var vm = new Vue({
|
|
|
}
|
|
|
return '我们会尽快联系您并预约演示时间,请耐心等待~<br>您将获得免费体验大会员全部功能!'
|
|
|
}
|
|
|
- },
|
|
|
- setCoopreate () {
|
|
|
- if (this.source === 'businesscooperation-landingpage') {
|
|
|
- return this.moduleShow.cooperate
|
|
|
- } else {
|
|
|
- this.moduleShow.companyType = true
|
|
|
- this.moduleShow.job = true
|
|
|
- return false
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
mounted: function () {
|
|
@@ -513,6 +559,19 @@ var vm = new Vue({
|
|
|
$(document).off('click')
|
|
|
},
|
|
|
methods: {
|
|
|
+ onIndustryChange: function (val) {
|
|
|
+ console.log(val)
|
|
|
+ },
|
|
|
+ onOtherIndustryInput: function (event) {
|
|
|
+ var val = event.replace(/\s*/g, '')
|
|
|
+ if (val) {
|
|
|
+ if (this.form.industry.includes('其他')) {
|
|
|
+ // console.log('有');
|
|
|
+ } else {
|
|
|
+ this.form.industry.push('其他')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 点击我知道了
|
|
|
knowHandle: function () {
|
|
|
this.showSuccess = false
|
|
@@ -537,25 +596,6 @@ var vm = new Vue({
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
- // 判断收藏留资显示
|
|
|
- if (this.source == "bidmanagement-landingpage") {
|
|
|
- for (var k in this.moduleShow) {
|
|
|
- this.moduleShow[k] = false
|
|
|
- }
|
|
|
- this.moduleShow.cooperate = true
|
|
|
- }
|
|
|
- // 判断收藏留资显示
|
|
|
- if (this.source == "article_collection") {
|
|
|
- for (var k in this.moduleShow) {
|
|
|
- this.moduleShow[k] = false
|
|
|
- }
|
|
|
- }
|
|
|
- // 判断阅读原文留资显示
|
|
|
- if (vm.source == "article_original") {
|
|
|
- for (var k in vm.moduleShow) {
|
|
|
- vm.moduleShow[k] = false
|
|
|
- }
|
|
|
- }
|
|
|
if (text) {
|
|
|
if (source.indexOf('_freeuser') > -1 && text.indexOf('【') > -1) {
|
|
|
var r = text.match(/\【(.+?)\】/g)
|
|
@@ -604,9 +644,28 @@ var vm = new Vue({
|
|
|
this.dialogTitle = text
|
|
|
this.dialogTitleTop = '欢迎体验剑鱼大会员'
|
|
|
}
|
|
|
+ // 控制非常规表单模块是否展示,默认全部隐藏,companyType、job(公司类型、职位大多数场景都需要展示)
|
|
|
+ var noNeedCompanyType = ['bidmanagement-landingpage', 'pc_briefinghomepage_dzhfxbg', 'pc_briefinglist_dzhfxbg', 'pc_briefingdetails_dzhfxbg']
|
|
|
+ var noNeedJob = ['bidmanagement-landingpage']
|
|
|
for (var k in this.moduleShow) {
|
|
|
this.moduleShow[k] = false
|
|
|
}
|
|
|
+ if (noNeedCompanyType.indexOf(this.source) > -1) {
|
|
|
+ this.moduleShow.companyType = false
|
|
|
+ } else {
|
|
|
+ this.moduleShow.companyType = true
|
|
|
+ }
|
|
|
+ if (noNeedJob.indexOf(this.source) > -1) {
|
|
|
+ this.moduleShow.job = false
|
|
|
+ } else {
|
|
|
+ this.moduleShow.job = true
|
|
|
+ }
|
|
|
+ if (this.source == "bidmanagement-landingpage") {
|
|
|
+ this.moduleShow.cooperate = true
|
|
|
+ } else if (this.source.indexOf('_dzhfxbg') > -1) {
|
|
|
+ this.moduleShow.report = true
|
|
|
+ this.warmText = '温馨提示:请提供您的真实信息,以便为您提供精准的分析报告'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
nameFocus: function () {
|
|
@@ -690,13 +749,6 @@ var vm = new Vue({
|
|
|
location.href = '/big/page/index'
|
|
|
break
|
|
|
}
|
|
|
- default: {
|
|
|
- // if (source.indexOf('_freeuser') > -1) {
|
|
|
- // _this.showSuccess = true
|
|
|
- // } else {
|
|
|
- // _this.showSuccess = true
|
|
|
- // }
|
|
|
- }
|
|
|
}
|
|
|
} else if (res.data) {
|
|
|
window.isRetained = res.data.retainedCapital
|
|
@@ -717,8 +769,8 @@ var vm = new Vue({
|
|
|
if (source === 'businesscooperation-landingpage') {
|
|
|
_this.moduleShow.cooperate = true
|
|
|
} else {
|
|
|
- _this.moduleShow.companyType = true
|
|
|
- _this.moduleShow.job = true
|
|
|
+ // _this.moduleShow.companyType = true
|
|
|
+ // _this.moduleShow.job = true
|
|
|
_this.moduleShow.cooperate = false
|
|
|
}
|
|
|
}
|
|
@@ -784,6 +836,16 @@ var vm = new Vue({
|
|
|
params = info
|
|
|
params.source = source
|
|
|
}
|
|
|
+ // 行业分析报告增加行业参数
|
|
|
+ if (source.indexOf('_dzhfxbg') > -1) {
|
|
|
+ const filterIndustry = this.form.industry.filter(function(item) {
|
|
|
+ return item !== '其他'
|
|
|
+ })
|
|
|
+ if (this.form.industry.includes('其他')) {
|
|
|
+ filterIndustry.push(this.form.otherIndustry)
|
|
|
+ }
|
|
|
+ params.industry = filterIndustry.toString()
|
|
|
+ }
|
|
|
var _this = this
|
|
|
$.ajax({
|
|
|
type: 'POST',
|
|
@@ -863,28 +925,7 @@ var vm = new Vue({
|
|
|
},
|
|
|
success: function (res) {
|
|
|
if (res && res.info) {
|
|
|
- res.data = res.info
|
|
|
- }
|
|
|
- if (res.data) {
|
|
|
- _this.form.name = res.data.name ? res.data.name : ''
|
|
|
- _this.form.phone = res.data.phone ? res.data.phone : ''
|
|
|
- _this.form.mail = res.data.mail ? res.data.mail : ''
|
|
|
- _this.form.companyName = res.data.company ? res.data.company : ''
|
|
|
- _this.form.companyType = res.data.companyType ? res.data.companyType.split(',') : []
|
|
|
- if (res.data.position) {
|
|
|
- if (jobJson.indexOf(res.data.position) == -1) {
|
|
|
- _this.form.job = ''
|
|
|
- _this.form.otherJob = ''
|
|
|
- } else {
|
|
|
- _this.form.job = res.data.position
|
|
|
- }
|
|
|
- } else {
|
|
|
- _this.form.job = ''
|
|
|
- }
|
|
|
- _this.form.business = res.data.workScope ? res.data.workScope : ''
|
|
|
- _this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
|
|
|
- _this.form.agreeChecked = res.data.agree == undefined ? true : res.data.agree
|
|
|
- _this.form.branch = res.data.branch || ''
|
|
|
+ _this.setEchoInfo(res.info)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -952,8 +993,10 @@ var vm = new Vue({
|
|
|
this.form.business = ''
|
|
|
this.form.need = ''
|
|
|
this.form.cooperate = ''
|
|
|
+ this.form.otherIndustry = ''
|
|
|
},
|
|
|
setEchoInfo: function (data) {
|
|
|
+ this.form.otherIndustry = ''
|
|
|
if (data) {
|
|
|
this.form.name = data.name ? data.name : ''
|
|
|
this.form.phone = data.phone ? data.phone : ''
|
|
@@ -975,6 +1018,22 @@ var vm = new Vue({
|
|
|
this.form.agreeChecked = data.agree == undefined ? true : data.agree
|
|
|
this.form.branch = data.branch || ''
|
|
|
this.form.cooperate = data.cooperate ? data.cooperate : ''
|
|
|
+ if (data.industry) {
|
|
|
+ var industryArr = data.industry.split(',')
|
|
|
+ var same = [...new Set(industryArr)].filter(item =>
|
|
|
+ this.industryData.includes(item)
|
|
|
+ )
|
|
|
+ var different = [...new Set(industryArr)].filter(item =>
|
|
|
+ !this.industryData.includes(item)
|
|
|
+ )
|
|
|
+ if (same) {
|
|
|
+ this.form.industry = same
|
|
|
+ }
|
|
|
+ if (different && different.length > 0) {
|
|
|
+ this.form.otherIndustry = different.toString()
|
|
|
+ this.form.industry.push('其他')
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|