Commit 7c444e32 by 黑潮

update: 营销分析设置

parent e85752ef
......@@ -153,7 +153,7 @@ export default {
useStoredFlag: 0, //显示储值触发和会员卡升级事件
analyseConfig: {
open_flag: 0,
crowd_flag: 1,
crowd_flag: 0,
crowd_send: 4,
crowd_no_send: 1,
marke_days: 14
......@@ -409,7 +409,7 @@ export default {
this.form.storedLowest = cost.lowest_cost;
this.form.storedMax = cost.max_cost;
}
if ([1, 2].includes(this.form.effectType) && result.analyseJson) {
if (this.xsxsFlag && result.analyseJson) {
this.analyseConfig = JSON.parse(result.analyseJson);
}
}
......@@ -653,7 +653,7 @@ export default {
return;
}
}
if ([1, 2].includes(this.form.effectType) && this.xsxsFlag == 1) {
if (this.xsxsFlag == 1) {
if (this.analyseConfig.crowd_send === undefined) {
this.$tips({ type: 'warning', message: '请填写实验组' });
return;
......@@ -790,7 +790,7 @@ export default {
};
params.marketingTemplate = JSON.stringify(marketingTemplate);
}
if ([1, 2].includes(this.form.effectType)) {
if (this.xsxsFlag == 1) {
params.analyseJson = JSON.stringify(this.analyseConfig);
}
this.saveEcmInfo(params);
......@@ -1028,11 +1028,22 @@ export default {
.join(',');
}
},
onChangeAnalyseConfig(isOpen) {
onChangeAnalyseConfig(isOpen, isOpenFlag) {
if (!isOpen) {
this.analyseConfig.crowd_send = 4;
this.analyseConfig.crowd_no_send = 1;
this.analyseConfig.marke_days = 14;
isOpenFlag && (this.analyseConfig.marke_days = 14);
}
},
onChangeEffectType(val) {
if (val == 0) {
this.analyseConfig.crowd_flag = 0;
this.analyseConfig.crowd_send = 4;
this.analyseConfig.crowd_no_send = 1;
} else {
this.analyseConfig.crowd_flag = 1;
this.analyseConfig.crowd_send = 4;
this.analyseConfig.crowd_no_send = 1;
}
}
},
......
......@@ -8,9 +8,9 @@
<dm-input class="w400" :maxlength="9" v-model="form.ecmPlanName" :disabled="!isAdd"></dm-input>
</el-form-item>
<el-form-item label="时效" class="is-required">
<el-radio v-model="form.effectType" :label="0" :disabled="!isAdd">触点</el-radio>
<el-radio v-model="form.effectType" :label="1" :disabled="!isAdd">重复</el-radio>
<el-radio v-model="form.effectType" :label="2" :disabled="!isAdd">单次</el-radio>
<el-radio v-model="form.effectType" :label="0" :disabled="!isAdd" @change="onChangeEffectType">触点</el-radio>
<el-radio v-model="form.effectType" :label="1" :disabled="!isAdd" @change="onChangeEffectType">重复</el-radio>
<el-radio v-model="form.effectType" :label="2" :disabled="!isAdd" @change="onChangeEffectType">单次</el-radio>
<!-- <el-select style="width:262px;" :disabled="!isAdd" v-model="form.effectTime" v-if="form.effectType == 1" placeholder="请选择时间">
<el-option v-for="(v, i) in dayOptions" :key="i" :label="v.label" :value="v.value"></el-option>
</el-select> -->
......@@ -360,19 +360,19 @@
</el-form-item>
</section>
<!-- 营销分析设置 -->
<section class="dm-form__wrap" v-if="xsxsFlag == 1 && [1, 2].includes(form.effectType)">
<section class="dm-form__wrap" v-if="xsxsFlag == 1">
<h3 class="dm-title__label">
<span class="inline-block mr10">营销分析设置</span>
<el-switch :disabled="!isAdd" v-model="analyseConfig.open_flag" :active-value="1" :inactive-value="0" @change="onChangeAnalyseConfig"></el-switch>
<el-switch :disabled="!isAdd" v-model="analyseConfig.open_flag" :active-value="1" :inactive-value="0" @change="onChangeAnalyseConfig($event, true)"></el-switch>
</h3>
<div v-if="analyseConfig.open_flag == 1" style="padding-bottom:10px;color:#303133">
<div>
<div v-show="[1, 2].includes(form.effectType)">
<div class="w140 text-right inline-block mr10">
<el-tooltip slot="label" open-delay="200" content="设置后系统按比例随机抽取部分人群不触发任务进行数据参照" placement="top">
<label class="tooltip-icon cursor">设置参照组</label>
</el-tooltip>
</div>
<el-switch :disabled="!isAdd" v-model="analyseConfig.crowd_flag" :active-value="1" :inactive-value="0" @change="onChangeAnalyseConfig"></el-switch>
<el-switch :disabled="!isAdd" v-model="analyseConfig.crowd_flag" :active-value="1" :inactive-value="0" @change="onChangeAnalyseConfig($event, false)"></el-switch>
</div>
<div v-if="analyseConfig.crowd_flag == 1" class="mt20">
<label class="w140 text-right inline-block mr10">实验组 (触发任务人群)</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment