|
@@ -11,18 +11,18 @@ var temp = `
|
|
|
<div class="basic clearfix">
|
|
|
<div class="form-title">基本信息</div>
|
|
|
<div class="form-main clearfix">
|
|
|
- <div class="short-control fl">
|
|
|
+ <div class="short-control fl" v-if="moduleShow.name">
|
|
|
<el-form-item label="姓名 :" prop="name">
|
|
|
<el-input v-model.trim="form.name" class="item-input" placeholder="请输入姓名" @focus="nameFocus" required>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div class="short-control fr">
|
|
|
+ <div class="short-control fr" v-if="moduleShow.mail">
|
|
|
<el-form-item label="邮箱 :" prop="mail">
|
|
|
<el-input v-model.trim="form.mail" class="item-input" placeholder="请输入邮箱" @focus="mailFocus"></el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div class="short-control fl">
|
|
|
+ <div class="short-control fl" v-if="moduleShow.phone">
|
|
|
<el-form-item label="手机号 :" prop="phone">
|
|
|
<el-input v-model.trim="form.phone" maxlength="11" @input="inputPhone" class="item-input" placeholder="请输入准确的手机号" @focus="phoneFocus"></el-input>
|
|
|
</el-form-item>
|
|
@@ -39,7 +39,7 @@ var temp = `
|
|
|
<div class="company clearfix">
|
|
|
<div class="form-title">公司信息</div>
|
|
|
<div class="form-main">
|
|
|
- <div class="long-control" style="position: relative;">
|
|
|
+ <div class="long-control" style="position: relative;" v-if="moduleShow.companyName">
|
|
|
<el-form-item label="公司名称 :" prop="companyName">
|
|
|
<el-input
|
|
|
v-model.trim="form.companyName"
|
|
@@ -54,7 +54,7 @@ var temp = `
|
|
|
<div class="company-list" v-for="item in companyList" :key="item" @click="selectCompany(item)" v-html="item"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="long-control" >
|
|
|
+ <div class="long-control" v-if="moduleShow.companyType">
|
|
|
<el-form-item label="公司类型 :" class="company-type" prop="companyType">
|
|
|
<el-checkbox-group v-model="form.companyType">
|
|
|
<el-checkbox label="投标企业"></el-checkbox>
|
|
@@ -67,7 +67,7 @@ var temp = `
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div class="short-control fl">
|
|
|
+ <div class="short-control fl" v-if="moduleShow.job">
|
|
|
<el-form-item label="职位 :" prop="job">
|
|
|
<el-select v-model="form.job" placeholder="请选择职位" class="item-input" clearable>
|
|
|
<el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
|
|
@@ -249,6 +249,13 @@ var vm = new Vue({
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ var validBranch = function(rule,value,callback) {
|
|
|
+ if(value === '') {
|
|
|
+ return callback(new Error('请选择部门'));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
dialogTitle: '为给您匹配精准的推荐信息,请完善个人信息',
|
|
|
jobData: jobData, // 职位数据
|
|
@@ -324,7 +331,8 @@ var vm = new Vue({
|
|
|
{
|
|
|
required: true,
|
|
|
trigger: 'blur',
|
|
|
- message: '请选择部门'
|
|
|
+ validator: validBranch,
|
|
|
+ message: ''
|
|
|
}
|
|
|
],
|
|
|
},
|
|
@@ -334,7 +342,18 @@ var vm = new Vue({
|
|
|
showSuccess: false, // 显示提交成功弹框
|
|
|
showExport: false,
|
|
|
isForce: false, // 是否强制
|
|
|
- source: '' // 来源模块
|
|
|
+ source: '', // 来源模块
|
|
|
+ interest: '', // 感兴趣内容
|
|
|
+ moduleShow: {
|
|
|
+ name: true,
|
|
|
+ phone: true,
|
|
|
+ mail: true,
|
|
|
+ code: false,
|
|
|
+ companyName: true,
|
|
|
+ companyType: true,
|
|
|
+ job: true,
|
|
|
+ branch: false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -376,6 +395,30 @@ var vm = new Vue({
|
|
|
$(document).off('click')
|
|
|
},
|
|
|
methods: {
|
|
|
+ getModules: function () {
|
|
|
+ var source = this.source
|
|
|
+ switch (source) {
|
|
|
+ case 'pc_supermarket_Noresults_customization':
|
|
|
+ case 'pc_market_ApplicationScenario':
|
|
|
+ case 'pc_supermarket_details_customization':
|
|
|
+ case 'pc_supermarket_details_buy': {
|
|
|
+ this.hideModule(['mail'])
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ this.hideModule()
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ hideModule: function (keys) {
|
|
|
+ if (!keys) return
|
|
|
+ var hideType = keys
|
|
|
+ for (var k in this.moduleShow) {
|
|
|
+ if (hideType.indexOf(k) !== -1) {
|
|
|
+ this.moduleShow[k] = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
changeTop: function () {
|
|
|
this.$nextTick(function () {
|
|
|
var dialogDom = $('#collectUserInfoDialog .dialog-container')
|
|
@@ -468,12 +511,13 @@ var vm = new Vue({
|
|
|
})
|
|
|
},
|
|
|
// 是否留资
|
|
|
- isNeedSubmit: function(source, callback, dom) {
|
|
|
+ isNeedSubmit: function(source, callback, interest) {
|
|
|
if (!loginflag) {
|
|
|
openLoginDig()
|
|
|
return
|
|
|
}
|
|
|
this.source = source
|
|
|
+ this.interest = interest
|
|
|
this.logAjax(source)
|
|
|
var _this = this
|
|
|
$.ajax({
|
|
@@ -525,11 +569,24 @@ var vm = new Vue({
|
|
|
// 自定义弹窗头部
|
|
|
isSelfHeader: function(){
|
|
|
var imgUrl = '/common-module/pc-dialog/image/structed-title.png'
|
|
|
- if (this.source.indexOf('custom_export') > -1 || this.source.indexOf('custom_data') > -1) {
|
|
|
+ var custom_export = this.source.indexOf('custom_export') > -1
|
|
|
+ var custom_data = this.source.indexOf('custom_data') > -1
|
|
|
+ var api_interface = this.source.indexOf('api_interface') > -1
|
|
|
+ // 数据超市source
|
|
|
+ var marketNoResult = this.source.indexOf('pc_supermarket_Noresults_customization') > -1 // 数据超市列表无数据-申请定制
|
|
|
+ var marketApplicationScenario = this.source.indexOf('pc_market_ApplicationScenario') > -1 // 数据市场落地页-大数据服务应用场景-立即咨询
|
|
|
+ var marketBuy = this.source.indexOf('pc_supermarket_details_buy') > -1 // 数据超市详情页-申请购买
|
|
|
+ var marketDetailCustom = this.source.indexOf('pc_supermarket_details_customization') > -1 // 数据超市详情页-申请定制
|
|
|
+ if (custom_export || custom_data || marketNoResult || marketDetailCustom) {
|
|
|
imgUrl = '/common-module/pc-dialog/image/leave-title-custom.png'
|
|
|
- } else if (this.source.indexOf('api_interface') > -1) {
|
|
|
+ } else if (api_interface) {
|
|
|
imgUrl = '/common-module/pc-dialog/image/leave-title-api.png'
|
|
|
+ } else if (marketApplicationScenario) {
|
|
|
+ imgUrl = '/common-module/pc-dialog/image/data-supermarket-contact.png'
|
|
|
+ } else if (marketBuy) {
|
|
|
+ imgUrl = '/common-module/pc-dialog/image/data-supermarket-buy.png'
|
|
|
}
|
|
|
+ this.getModules()
|
|
|
this.$nextTick(function(){
|
|
|
$('#collectUserInfoDialog .dialog-header').css('background-image', 'url(' + imgUrl + ')')
|
|
|
})
|
|
@@ -558,7 +615,8 @@ var vm = new Vue({
|
|
|
position: this.form.job == '其他' ? this.form.job + '/' + this.form.otherJob : this.form.job,
|
|
|
code: this.form.code,
|
|
|
agree: true, // 原来留资模块的同意协议字段,,,默认传一个true 方便后端处理
|
|
|
- branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job ? '' : this.form.branch
|
|
|
+ branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job ? '' : this.form.branch,
|
|
|
+ interest: this.interest // 感兴趣内容
|
|
|
}
|
|
|
if (info) {
|
|
|
params = info
|