AARRR、用户画像分析联调、重新实训联调

dev-QQq
HeHaonan 2 years ago
parent 0cb7ceeec1
commit 14d42dd8ef

@ -6,7 +6,7 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import {defineExpose } from 'vue' import { defineExpose } from "vue";
const props = defineProps({ const props = defineProps({
currentComponent: { currentComponent: {
type: Object, type: Object,
@ -29,10 +29,15 @@ const content = ref(null);
// }; // };
const submitMethod = () => { const submitMethod = () => {
// console.log(666); // console.log(666);
content.value.submitData() content.value.submitData();
};
const retrainMethod = () => {
// console.log(666);
content.value.retrain();
}; };
defineExpose({ defineExpose({
submitMethod, submitMethod,
retrainMethod,
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

@ -152,7 +152,7 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<p>1月度平均激活率是多少</p> <p>1月度平均激活率是多少</p>
<el-select <el-select
v-model="asd" v-model="step2Params1"
placeholder="请选择" placeholder="请选择"
style="width: 200px" style="width: 200px"
> >
@ -166,7 +166,7 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<p>2需要重点分析哪个月的激活率</p> <p>2需要重点分析哪个月的激活率</p>
<el-select <el-select
v-model="asd" v-model="step2Params2"
placeholder="请选择" placeholder="请选择"
style="width: 200px" style="width: 200px"
> >
@ -178,7 +178,9 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
/> />
</el-select> </el-select>
</div> </div>
<div class="submit" style="margin-top: 75px">提交</div> <div class="submit" style="margin-top: 75px" @click="step2Submit">
提交
</div>
</div> </div>
</div> </div>
</div> </div>
@ -234,7 +236,7 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<p>1两周平均留存率是多少</p> <p>1两周平均留存率是多少</p>
<el-select <el-select
v-model="asd" v-model="step3Params1"
placeholder="请选择" placeholder="请选择"
style="width: 200px" style="width: 200px"
> >
@ -246,7 +248,7 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<p>2从哪个时间段开始留存下来的客户是公司的忠诚用户</p> <p>2从哪个时间段开始留存下来的客户是公司的忠诚用户</p>
<el-select <el-select
v-model="asd" v-model="step3Params2"
placeholder="请选择" placeholder="请选择"
style="width: 200px" style="width: 200px"
> >
@ -255,7 +257,9 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<el-option :label="'30天'" :value="'30天'" /> <el-option :label="'30天'" :value="'30天'" />
</el-select> </el-select>
</div> </div>
<div class="submit" style="margin-top: 75px">提交</div> <div class="submit" style="margin-top: 75px" @click="step3Submit">
提交
</div>
</div> </div>
</div> </div>
</div> </div>
@ -297,22 +301,31 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<div style="display: flex"> <div style="display: flex">
<div style="margin-right: 50px"> <div style="margin-right: 50px">
<p>低活跃用户</p> <p>低活跃用户</p>
<el-input style="width: 107px"></el-input> <el-input
style="width: 107px"
v-model="step4Params1"
></el-input>
</div> </div>
<div style="margin-right: 50px"> <div style="margin-right: 50px">
<p>普通用户</p> <p>普通用户</p>
<el-input style="width: 107px"></el-input> <el-input
style="width: 107px"
v-model="step4Params2"
></el-input>
</div> </div>
<div> <div>
<p>会员用户</p> <p>会员用户</p>
<el-input style="width: 107px"></el-input> <el-input
style="width: 107px"
v-model="step4Params3"
></el-input>
</div> </div>
</div> </div>
</div> </div>
<div style="margin-left: 20px"> <div style="margin-left: 20px">
<p>2需要针对哪类用户制定营销手段来提高他们的活跃度</p> <p>2需要针对哪类用户制定营销手段来提高他们的活跃度</p>
<el-select <el-select
v-model="asd" v-model="step4Params4"
placeholder="请选择" placeholder="请选择"
style="width: 200px" style="width: 200px"
> >
@ -321,7 +334,9 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<el-option :label="'会员用户'" :value="'会员用户'" /> <el-option :label="'会员用户'" :value="'会员用户'" />
</el-select> </el-select>
</div> </div>
<div class="submit" style="margin-top: 25px">提交</div> <div class="submit" style="margin-top: 25px" @click="step4Submit">
提交
</div>
</div> </div>
</div> </div>
</div> </div>
@ -365,7 +380,10 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<div style="display: flex"> <div style="display: flex">
<div style="margin-right: 50px"> <div style="margin-right: 50px">
<p>该买菜app的K值为计算结果保留两位小数</p> <p>该买菜app的K值为计算结果保留两位小数</p>
<el-input style="width: 107px"></el-input> <el-input
style="width: 107px"
v-model="step5Params"
></el-input>
</div> </div>
</div> </div>
</div> </div>
@ -373,7 +391,9 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
结论拥有了自传播的力量可以进一步通过邀请获红包等运营活动进一步提高 结论拥有了自传播的力量可以进一步通过邀请获红包等运营活动进一步提高
K 加快传播速度 K 加快传播速度
</div> </div>
<div class="submit" style="margin-top: 15px">提交</div> <div class="submit" style="margin-top: 15px" @click="step5Submit">
提交
</div>
</div> </div>
</div> </div>
</div> </div>
@ -407,6 +427,15 @@ const step4AnswerFlag = ref(false);
const step5AnswerFlag = ref(false); const step5AnswerFlag = ref(false);
const step1Params1 = ref(""); const step1Params1 = ref("");
const step1Params2 = ref(""); const step1Params2 = ref("");
const step2Params1 = ref("");
const step2Params2 = ref("");
const step3Params1 = ref("");
const step3Params2 = ref("");
const step4Params1 = ref("");
const step4Params2 = ref("");
const step4Params3 = ref("");
const step4Params4 = ref("");
const step5Params = ref("");
const knowledgeFlag = ref(false); const knowledgeFlag = ref(false);
//-7 //-7
const sevenNum = ref(0); const sevenNum = ref(0);
@ -741,6 +770,12 @@ const dayOptions = ref([
label: "14日", label: "14日",
}, },
]); ]);
onMounted(() => {
getData();
});
onBeforeUnmount(() => {
saveData();
});
const moveUp = (index, row) => { const moveUp = (index, row) => {
console.log("上移", index, row); console.log("上移", index, row);
if (index > 0) { if (index > 0) {
@ -997,12 +1032,241 @@ const drawLineEchart = () => {
option && myChart.setOption(option); option && myChart.setOption(option);
}; };
const step1Submit = () => { const step1Submit = () => {
step1Error.value = 0;
if (step1Params1.value == "" || step1Params2.value == "") { if (step1Params1.value == "" || step1Params2.value == "") {
proxy.$modal.msgError("请先完成所有填空"); proxy.$modal.msgError("请先完成所有填空");
return; return;
} }
console.log(666); if (step1Params1.value != "线下活动推广") {
step1Error.value++;
}
if (step1Params2.value != "线下活动推广") {
step1Error.value++;
}
// console.log(666);
console.log(step1Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step1AnswerFlag.value = true;
};
const step2Submit = () => {
step2Error.value = 0;
if (step2Params1.value == "" || step2Params2.value == "") {
proxy.$modal.msgError("请先完成所有填空");
return;
}
if (step2Params1.value != "80%") {
step2Error.value++;
}
if (step2Params2.value != "2020-10") {
step2Error.value++;
}
console.log(step2Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step2AnswerFlag.value = true;
};
const step3Submit = () => {
step3Error.value = 0;
if (step3Params1.value == "" || step3Params2.value == "") {
proxy.$modal.msgError("请先完成所有填空");
return;
}
if (step3Params1.value != "13.25%") {
step3Error.value++;
}
if (step3Params2.value != "两周") {
step3Error.value++;
}
console.log(step3Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step3AnswerFlag.value = true;
};
const step4Submit = () => {
step4Error.value = 0;
if (
step4Params1.value == "" ||
step4Params2.value == "" ||
step4Params3.value == "" ||
step4Params4.value == ""
) {
proxy.$modal.msgError("请先完成所有填空");
return;
}
if (step4Params1.value != "58.9%") {
step4Error.value++;
}
if (step4Params2.value != "28.2%") {
step4Error.value++;
}
if (step4Params3.value != "12.9%") {
step4Error.value++;
}
if (step4Params4.value != "会员用户") {
step4Error.value++;
}
console.log(step4Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step4AnswerFlag.value = true;
};
const step5Submit = () => {
step5Error.value = 0;
if (step5Params.value == "") {
proxy.$modal.msgError("请先完成所有填空");
return;
}
if (step5Params.value != "1.17") {
step5Error.value++;
}
console.log(step5Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step5AnswerFlag.value = true;
};
const saveData = () => {
const params = {
stepFiveA: step1Params1.value,
stepFiveB: step1Params2.value,
stepFiveC: step2Params1.value,
stepFiveD: step2Params2.value,
stepSixA: step3Params1.value,
stepSixB: step3Params2.value,
stepSixC: step4Params1.value,
stepSixD: step4Params2.value,
stepSevenA: step4Params3.value,
stepSevenB: step4Params4.value,
stepSevenC: step5Params.value,
// stepSevenD: step4Data.value[1].params1,
// stepEightA: step4Data.value[2].params1,
// stepEightB: step4Data.value[3].params1,
// stepEightC: step4Data.value[4].params1,
// stepEightD: step4Data.value[5].params1,
// stepNineA: step4Data.value[6].params1,
// stepNineB: step4Data.value[7].params1,
// stepNineC: step4Data.value[8].params1,
// stepNineD: step4Data.value[9].params1,
// stepTenA: step4DataTable2.value[0].params1,
// stepTenB: step4DataTable2.value[1].params1,
// stepTenC: analysisConclusionStep1.value,
// stepTenD: analysisConclusionStep2.value,
// stepElevenA: analysisConclusionStep3.value,
// stepOneA: analysisConclusionStep4.value,
// stepOneB: step1Data.value[8].params3,
// stepOneC: step1Data.value[9].params1,
// stepOneD: step1Data.value[9].params2,
// stepTwoA: step1Data.value[9].params3,
// stepTwoB: step4Data.value[6].params2,
// stepTwoC: step5DataTable2.value[0].params,
// stepThreeA: step5DataTable2.value[1].params,
// stepThreeB: step5DataTable2.value[2].params,
// stepThreeC: step5DataTable2.value[3].params,
// stepThreeD: step5DataTable2.value[4].params,
// stepFourA: step5DataTable3.value[0].params1,
// stepFourB: step5DataTable3.value[0].params2,
// stepFourC: step5DataTable3.value[1].params1,
// stepFourD: step5DataTable3.value[1].params2,
// stepNewOne: step5DataTable3.value[2].params1,
// stepNewTwo: step5DataTable3.value[2].params2,
// stepNewThree: step5DataTable3.value[3].params1,
// stepNewFive: step5DataTable3.value[3].params2,
// stepNewSix: step5DataTable3.value[4].params1,
// stepNewEight: step5DataTable3.value[4].params2,
};
portraitModel
.saveData({
userId: 492,
module: "AARRR用户运营分析",
...params,
})
.then((res) => {})
.catch((error) => {});
};
const getData = () => {
portraitModel
.getData({
userId: 492,
module: "AARRR用户运营分析",
})
.then((res) => {
step1Params1.value = res.data.stepFiveA;
step1Params2.value = res.data.stepFiveB;
step2Params1.value = res.data.stepFiveC;
step2Params2.value = res.data.stepFiveD;
step3Params1.value = res.data.stepSixA;
step3Params2.value = res.data.stepSixB;
step4Params1.value = res.data.stepSixC;
step4Params2.value = res.data.stepSixD;
step4Params3.value = res.data.stepSevenA;
step4Params4.value = res.data.stepSevenB;
step5Params.value = res.data.stepSevenC;
// step4Data.value[1].params1 = res.data.stepSevenD;
// step4Data.value[2].params1 = res.data.stepEightA;
// step4Data.value[3].params1 = res.data.stepEightB;
// step4Data.value[4].params1 = res.data.stepEightC;
// step4Data.value[5].params1 = res.data.stepEightD;
// step4Data.value[6].params1 = res.data.stepNineA;
// step4Data.value[7].params1 = res.data.stepNineB;
// step4Data.value[8].params1 = res.data.stepNineC;
// step4Data.value[9].params1 = res.data.stepNineD;
// step4DataTable2.value[0].params1 = res.data.stepTenA;
// step4DataTable2.value[1].params1 = res.data.stepTenB;
// analysisConclusionStep1.value = res.data.stepTenC;
// analysisConclusionStep2.value = res.data.stepTenD;
// analysisConclusionStep3.value = res.data.stepElevenA;
// analysisConclusionStep4.value = res.data.stepOneA;
// step1Data.value[8].params3 = res.data.stepOneB;
// step1Data.value[9].params1 = res.data.stepOneC;
// step1Data.value[9].params2 = res.data.stepOneD;
// step1Data.value[9].params3 = res.data.stepTwoA;
// step4Data.value[6].params2 = res.data.stepTwoB;
// step5DataTable2.value[0].params = res.data.stepTwoC;
// step5DataTable2.value[1].params = res.data.stepThreeA;
// step5DataTable2.value[2].params = res.data.stepThreeB;
// step5DataTable2.value[3].params = res.data.stepThreeC;
// step5DataTable2.value[4].params = res.data.stepThreeD;
// step5DataTable3.value[0].params1 = res.data.stepFourA;
// step5DataTable3.value[0].params2 = res.data.stepFourB;
// step5DataTable3.value[1].params1 = res.data.stepFourC;
// step5DataTable3.value[1].params2 = res.data.stepFourD;
// step5DataTable3.value[2].params1 = res.data.stepNewOne;
// step5DataTable3.value[2].params2 = res.data.stepNewTwo;
// step5DataTable3.value[3].params1 = res.data.stepNewThree;
// step5DataTable3.value[3].params2 = res.data.stepNewFive;
// step5DataTable3.value[4].params1 = res.data.stepNewSix;
// step5DataTable3.value[4].params2 = res.data.stepNewEight;
})
.catch((error) => {});
};
const submitData = () => {
if (
!step1AnswerFlag.value ||
!step2AnswerFlag.value ||
!step3AnswerFlag.value ||
!step4AnswerFlag.value ||
!step5AnswerFlag.value
) {
proxy.$modal.msgError("请先完成所有步骤!");
return;
}
errorNum.value =
step1Error.value +
step2Error.value +
step3Error.value +
step4Error.value +
step5Error.value;
console.log(errorNum.value, "总错误次数");
portraitModel
.submit({
userId: 492,
taskName: "AARRR用户运营分析",
numberOfErrors: errorNum.value,
})
.then((res) => {
proxy.$modal.msgSuccess("提交成功");
})
.catch((error) => {});
}; };
defineExpose({
submitData,
// practicalTraining,
});
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

@ -861,8 +861,35 @@ const submitData = () => {
}) })
.catch((error) => {}); .catch((error) => {});
}; };
const retrain = () => {
portraitModel
.retrain({
userId: 492,
module: "帕累托/ABC分析",
})
.then((res) => {
proxy.$modal.msgSuccess("重新实训成功");
for (let i in step1Data.value) {
step1Data.value[i].params = "";
}
for (let i in step3Data.value) {
step3Data.value[i].params1 = "";
step3Data.value[i].params2 = "";
}
for (let i in step4Data.value) {
step4Data.value[i].params = "";
}
// for (let i in step5Data.value) {
// step5Data.value[i].params1 = "";
// step5Data.value[i].params2 = "";
// step5Data.value[i].params3 = "";
// }
})
.catch((error) => {});
};
defineExpose({ defineExpose({
submitData, submitData,
retrain,
// practicalTraining, // practicalTraining,
}); });
</script> </script>

@ -860,8 +860,12 @@ const submitData = () => {
}) })
.catch((error) => {}); .catch((error) => {});
}; };
const retrain = () => {
console.log(66);
};
defineExpose({ defineExpose({
submitData, submitData,
retrain,
// practicalTraining, // practicalTraining,
}); });
</script> </script>

@ -877,8 +877,34 @@ const submitData = () => {
.catch((error) => {}); .catch((error) => {});
// console.log(666); // console.log(666);
}; };
const retrain = () => {
portraitModel
.retrain({
userId: 492,
module: "转化分析-漏斗模型",
})
.then((res) => {
proxy.$modal.msgSuccess("重新实训成功");
for (let i in step1Data.value) {
step1Data.value[i].params1 = "";
step1Data.value[i].params2 = "";
step1Data.value[i].params3 = "";
step1Data.value[i].params4 = "";
step1Data.value[i].params5 = "";
}
step2Select1.value = "";
step2Select2.value = "";
step2Select3.value = "";
step2Select4.value = "";
step2Select5.value = "";
step3Select1.value = "";
step3Select2.value = "";
})
.catch((error) => {});
};
defineExpose({ defineExpose({
submitData, submitData,
retrain,
// practicalTraining, // practicalTraining,
}); });
</script> </script>

@ -56,7 +56,11 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</span> </span>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<el-select v-model="asd" placeholder="请选择" style="width: 160px"> <el-select
v-model="step1SelectParams1"
placeholder="请选择"
style="width: 160px"
>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -71,7 +75,11 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</ul> </ul>
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<el-select v-model="asd" placeholder="请选择" style="width: 160px"> <el-select
v-model="step1SelectParams2"
placeholder="请选择"
style="width: 160px"
>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -86,7 +94,11 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</ul> </ul>
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<el-select v-model="asd" placeholder="请选择" style="width: 160px"> <el-select
v-model="step1SelectParams3"
placeholder="请选择"
style="width: 160px"
>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -101,7 +113,11 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</ul> </ul>
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<el-select v-model="asd" placeholder="请选择" style="width: 160px"> <el-select
v-model="step1SelectParams4"
placeholder="请选择"
style="width: 160px"
>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -116,7 +132,11 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</ul> </ul>
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<el-select v-model="asd" placeholder="请选择" style="width: 160px"> <el-select
v-model="step1SelectParams5"
placeholder="请选择"
style="width: 160px"
>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -131,7 +151,11 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</ul> </ul>
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<el-select v-model="asd" placeholder="请选择" style="width: 160px"> <el-select
v-model="step1SelectParams6"
placeholder="请选择"
style="width: 160px"
>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -145,7 +169,9 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</li> </li>
</ul> </ul>
</div> </div>
<div class="submit" style="margin-top: 25px">提交</div> <div class="submit" style="margin-top: 25px" @click="step1Submit">
提交
</div>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
@ -192,15 +218,15 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
style="width: 130px" style="width: 130px"
size="small" size="small"
> >
<el-option :label="'事实标签'" :value="'1'" /> <el-option :label="'事实标签'" :value="'事实标签'" />
<el-option :label="'规则标签'" :value="'2'" /> <el-option :label="'规则标签'" :value="'规则标签'" />
<el-option :label="'预测标签'" :value="'3'" /> <el-option :label="'预测标签'" :value="'预测标签'" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="submit"></div> <div class="submit" @click="step2Submit"></div>
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
@ -246,9 +272,9 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
<span>第四步用户画像应用场景</span> <span>第四步用户画像应用场景</span>
</div> </div>
<span style="line-height: 25px; font-size: 14px"> <span style="line-height: 25px; font-size: 14px">
1人群分析人群分析是用户画像最基础的应用场景之一运营人员可借助标签深入分析不同用户画像群体的分布特征又或是不同人群的消费习惯消费偏好不同地域的差异分析等<br> 1人群分析人群分析是用户画像最基础的应用场景之一运营人员可借助标签深入分析不同用户画像群体的分布特征又或是不同人群的消费习惯消费偏好不同地域的差异分析等<br />
2广告优化用户画像可以圈选定位更准确的人群同时也为素材文案广告创意提供了更具体的撰写方向做到精准且有效的投放此外用户画像可以助力广告主完成洞察到决策的环节让投放工作更有目标方向广告主也可基于标签高效触达目标人群提升用户体验实现营销价值的最大化<br> 2广告优化用户画像可以圈选定位更准确的人群同时也为素材文案广告创意提供了更具体的撰写方向做到精准且有效的投放此外用户画像可以助力广告主完成洞察到决策的环节让投放工作更有目标方向广告主也可基于标签高效触达目标人群提升用户体验实现营销价值的最大化<br />
3精细化消费者运营运营人员可以通过快速分析用户特征找到不同运营场景下的目标用户从而精准圈定目标人群进行更灵活更有针对性的营销活动和个性化消息推送基于用户画像分析在合适的时间通过最佳渠道给用户传递最感兴趣的内容可以根据用户历史数据实现基于用户兴趣的个性化推荐也可在文案中植入用户个性化标签增加用户的好感度亲密度还可以通过用户历史购买时间判断用户最容易消费的时间点在合适时间给用户发送营销信息<br> 3精细化消费者运营运营人员可以通过快速分析用户特征找到不同运营场景下的目标用户从而精准圈定目标人群进行更灵活更有针对性的营销活动和个性化消息推送基于用户画像分析在合适的时间通过最佳渠道给用户传递最感兴趣的内容可以根据用户历史数据实现基于用户兴趣的个性化推荐也可在文案中植入用户个性化标签增加用户的好感度亲密度还可以通过用户历史购买时间判断用户最容易消费的时间点在合适时间给用户发送营销信息<br />
</span> </span>
</div> </div>
<div class="line"></div> <div class="line"></div>
@ -257,6 +283,8 @@ https://help.fanruan.com/finebi5.1/doc-view-1256.html"
</template> </template>
<script setup> <script setup>
import * as portraitModel from "@/api/portraitModel";
import { downBlobFile } from "@/utils/index.js";
import * as echarts from "echarts"; import * as echarts from "echarts";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const knowledgeHtml = ref( const knowledgeHtml = ref(
@ -267,29 +295,40 @@ const dayValue = ref("");
const combinationValue1 = ref(""); const combinationValue1 = ref("");
const combinationValue2 = ref(""); const combinationValue2 = ref("");
const analysisConclusion = ref(""); const analysisConclusion = ref("");
const errorNum = ref(0);
const step1Error = ref(0);
const step2Error = ref(0);
const step1AnswerFlag = ref(false);
const step2AnswerFlag = ref(false);
const step1SelectParams1 = ref("");
const step1SelectParams2 = ref("");
const step1SelectParams3 = ref("");
const step1SelectParams4 = ref("");
const step1SelectParams5 = ref("");
const step1SelectParams6 = ref("");
const selectList = ref([ const selectList = ref([
{ {
value: "1", value: "用户信息表",
label: "用户信息表", label: "用户信息表",
}, },
{ {
value: "2", value: "商品订单表",
label: "商品订单表", label: "商品订单表",
}, },
{ {
value: "3", value: "访问日志表",
label: "访问日志表", label: "访问日志表",
}, },
{ {
value: "4", value: "商品评论表",
label: "商品评论表", label: "商品评论表",
}, },
{ {
value: "5", value: "搜索日志表",
label: "搜索日志表", label: "搜索日志表",
}, },
{ {
value: "6", value: "销售明细表",
label: "销售明细表", label: "销售明细表",
}, },
]); ]);
@ -834,6 +873,12 @@ const dayOptions = ref([
label: "14日", label: "14日",
}, },
]); ]);
onMounted(() => {
getData();
});
onBeforeUnmount(() => {
saveData();
});
const addCombination = () => { const addCombination = () => {
if (list.value[0] == "-") { if (list.value[0] == "-") {
list.value = []; list.value = [];
@ -977,6 +1022,229 @@ const drawEcharts = () => {
option && myChart.setOption(option); option && myChart.setOption(option);
}; };
const step1Submit = () => {
step1Error.value = 0;
if (
step1SelectParams1.value == "" ||
step1SelectParams2.value == "" ||
step1SelectParams3.value == "" ||
step1SelectParams4.value == "" ||
step1SelectParams5.value == "" ||
step1SelectParams6.value == ""
) {
proxy.$modal.msgError("请先完成所有填空");
return;
}
if (step1SelectParams1.value != "用户信息表") {
step1Error.value++;
}
if (step1SelectParams2.value != "商品订单表") {
step1Error.value++;
}
if (step1SelectParams3.value != "访问日志表") {
step1Error.value++;
}
if (step1SelectParams4.value != "商品评论表") {
step1Error.value++;
}
if (step1SelectParams5.value != "搜索日志表") {
step1Error.value++;
}
if (step1SelectParams6.value != "销售明细表") {
step1Error.value++;
}
console.log(step1Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step1AnswerFlag.value = true;
};
const step2Submit = () => {
step2Error.value = 0;
for (let i in step2Data.value) {
if (!step2Data.value[i].params) {
proxy.$modal.msgError("请先完成所有填空");
return;
}
}
let sliceList1 = step2Data.value.slice(0, step2Data.value.length - 8);
for (let i in sliceList1) {
if (sliceList1[i].params != "事实标签") {
step2Error.value++;
}
}
let sliceList2 = step2Data.value.slice(29, 34);
for (let i in sliceList2) {
if (sliceList2[i].params != "规则标签") {
step2Error.value++;
}
}
let sliceList3 = step2Data.value.slice(34);
for (let i in sliceList3) {
if (sliceList3[i].params != "预测标签") {
step2Error.value++;
}
}
console.log(step2Error.value, "错误数");
proxy.$modal.msgSuccess("提交成功");
step2AnswerFlag.value = true;
};
const saveData = () => {
const params = {
stepFiveA: step1SelectParams1.value,
stepFiveB: step1SelectParams2.value,
stepFiveC: step1SelectParams3.value,
stepFiveD: step1SelectParams4.value,
stepSixA: step1SelectParams5.value,
stepSixB: step1SelectParams6.value,
stepSixC: step2Data.value[0].params,
stepSixD: step2Data.value[1].params,
stepSevenA: step2Data.value[2].params,
stepSevenB: step2Data.value[3].params,
stepSevenC: step2Data.value[4].params,
stepSevenD: step2Data.value[5].params,
stepEightA: step2Data.value[6].params,
stepEightB: step2Data.value[7].params,
stepEightC: step2Data.value[8].params,
stepEightD: step2Data.value[9].params,
stepNineA: step2Data.value[10].params,
stepNineB: step2Data.value[11].params,
stepNineC: step2Data.value[12].params,
stepNineD: step2Data.value[13].params,
stepTenA: step2Data.value[14].params,
stepTenB: step2Data.value[15].params,
stepTenC: step2Data.value[16].params,
stepTenD: step2Data.value[17].params,
stepElevenA: step2Data.value[18].params,
stepOneA: step2Data.value[19].params,
stepOneB: step2Data.value[20].params,
stepOneC: step2Data.value[21].params,
stepOneD: step2Data.value[22].params,
stepTwoA: step2Data.value[23].params,
stepTwoB: step2Data.value[24].params,
stepTwoC: step2Data.value[25].params,
stepThreeA: step2Data.value[26].params,
stepThreeB: step2Data.value[27].params,
stepThreeC: step2Data.value[28].params,
stepThreeD: step2Data.value[29].params,
stepFourA: step2Data.value[30].params,
stepFourB: step2Data.value[31].params,
stepFourC: step2Data.value[32].params,
stepFourD: step2Data.value[33].params,
stepNewOne: step2Data.value[34].params,
stepNewTwo: step2Data.value[35].params,
stepNewThree: step2Data.value[36].params,
// stepNewFive: step5DataTable3.value[3].params2,
// stepNewSix: step5DataTable3.value[4].params1,
// stepNewEight: step5DataTable3.value[4].params2,
};
portraitModel
.saveData({
userId: 492,
module: "用户画像分析",
...params,
})
.then((res) => {})
.catch((error) => {});
};
const getData = () => {
portraitModel
.getData({
userId: 492,
module: "用户画像分析",
})
.then((res) => {
step1SelectParams1.value = res.data.stepFiveA;
step1SelectParams2.value = res.data.stepFiveB;
step1SelectParams3.value = res.data.stepFiveC;
step1SelectParams4.value = res.data.stepFiveD;
step1SelectParams5.value = res.data.stepSixA;
step1SelectParams6.value = res.data.stepSixB;
step2Data.value[0].params = res.data.stepSixC;
step2Data.value[1].params = res.data.stepSixD;
step2Data.value[2].params = res.data.stepSevenA;
step2Data.value[3].params = res.data.stepSevenB;
step2Data.value[4].params = res.data.stepSevenC;
step2Data.value[5].params = res.data.stepSevenD;
step2Data.value[6].params = res.data.stepEightA;
step2Data.value[7].params = res.data.stepEightB;
step2Data.value[8].params = res.data.stepEightC;
step2Data.value[9].params = res.data.stepEightD;
step2Data.value[10].params = res.data.stepNineA;
step2Data.value[11].params = res.data.stepNineB;
step2Data.value[12].params = res.data.stepNineC;
step2Data.value[13].params = res.data.stepNineD;
step2Data.value[14].params = res.data.stepTenA;
step2Data.value[15].params = res.data.stepTenB;
step2Data.value[16].params = res.data.stepTenC;
step2Data.value[17].params = res.data.stepTenD;
step2Data.value[18].params = res.data.stepElevenA;
step2Data.value[19].params = res.data.stepOneA;
step2Data.value[20].params = res.data.stepOneB;
step2Data.value[21].params = res.data.stepOneC;
step2Data.value[22].params = res.data.stepOneD;
step2Data.value[23].params = res.data.stepTwoA;
step2Data.value[24].params = res.data.stepTwoB;
step2Data.value[25].params = res.data.stepTwoC;
step2Data.value[26].params = res.data.stepThreeA;
step2Data.value[27].params = res.data.stepThreeB;
step2Data.value[28].params = res.data.stepThreeC;
step2Data.value[29].params = res.data.stepThreeD;
step2Data.value[30].params = res.data.stepFourA;
step2Data.value[31].params = res.data.stepFourB;
step2Data.value[32].params = res.data.stepFourC;
step2Data.value[33].params = res.data.stepFourD;
step2Data.value[34].params = res.data.stepNewOne;
step2Data.value[35].params = res.data.stepNewTwo;
step2Data.value[36].params = res.data.stepNewThree;
// step5DataTable3.value[3].params2 = res.data.stepNewFive;
// step5DataTable3.value[4].params1 = res.data.stepNewSix;
// step5DataTable3.value[4].params2 = res.data.stepNewEight;
})
.catch((error) => {});
};
const submitData = () => {
// console.log(5666);
if (!step1AnswerFlag.value || !step2AnswerFlag.value) {
proxy.$modal.msgError("请先完成所有步骤!");
return;
}
errorNum.value = step1Error.value + step2Error.value;
console.log(errorNum.value, "总错误次数");
portraitModel
.submit({
userId: 492,
taskName: "用户画像分析",
numberOfErrors: errorNum.value,
})
.then((res) => {
proxy.$modal.msgSuccess("提交成功");
})
.catch((error) => {});
};
const retrain = () => {
// console.log(66666);
portraitModel
.retrain({
userId: 492,
module: "用户画像分析",
})
.then((res) => {
proxy.$modal.msgSuccess("重新实训成功");
step1SelectParams1.value = "";
step1SelectParams2.value = "";
step1SelectParams3.value = "";
step1SelectParams4.value = "";
step1SelectParams5.value = "";
step1SelectParams6.value = "";
for (let i in step2Data.value) {
step2Data.value[i].params = "";
}
})
.catch((error) => {});
};
defineExpose({
submitData,
retrain,
});
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

@ -1178,8 +1178,44 @@ const getData = () => {
}) })
.catch((error) => {}); .catch((error) => {});
}; };
const retrain = () => {
portraitModel
.retrain({
userId: 492,
module: "RFM分析",
})
.then((res) => {
proxy.$modal.msgSuccess("重新实训成功");
for (let i in fileTable1.value) {
fileTable1.value[i].params = "";
}
for (let i in step2Data.value) {
step2Data.value[i].params1 = "";
step2Data.value[i].params2 = "";
step2Data.value[i].params3 = "";
}
for (let i in step4Data.value) {
step4Data.value[i].params1 = "";
step4Data.value[i].params2 = "";
step4Data.value[i].params3 = "";
}
step5Data.value[0].params1 = "";
step5Data.value[0].params2 = "";
step5Data.value[0].params3 = "";
for (let i in step6Data.value) {
step6Data.value[i].params1 = "";
step6Data.value[i].params2 = "";
step6Data.value[i].params3 = "";
}
for (let i in step7Data.value) {
step7Data.value[i].params = "";
}
})
.catch((error) => {});
};
defineExpose({ defineExpose({
submitData, submitData,
retrain,
// practicalTraining, // practicalTraining,
}); });
const tableSpanMethod = ({ row, column, rowIndex, columnIndex }) => { const tableSpanMethod = ({ row, column, rowIndex, columnIndex }) => {

@ -15,7 +15,7 @@
</div> </div>
<div class="btn" v-if="currentComponent"> <div class="btn" v-if="currentComponent">
<div class="submit" @click="submit"></div> <div class="submit" @click="submit"></div>
<div class="retrain">重新实</div> <div class="retrain" @click="retrain"></div>
</div> </div>
<div class="container" v-if="menuIndex != 0"> <div class="container" v-if="menuIndex != 0">
<div class="leftContent"> <div class="leftContent">
@ -393,6 +393,9 @@ const changeTab = (item) => {
const submit = () => { const submit = () => {
contentRef.value.submitMethod(); contentRef.value.submitMethod();
}; };
const retrain = () => {
contentRef.value.retrainMethod();
}
// defineExpose({ // defineExpose({
// submit, // submit,
// }); // });

Loading…
Cancel
Save