数字营销算法优化

dev-QQq
qinzhenpen 2 years ago
parent e643847b11
commit 5f69d18c67

@ -17,6 +17,7 @@
"dependencies": {
"@antv/g2": "^5.2.3",
"@element-plus/icons-vue": "2.0.10",
"@videojs-player/vue": "^1.0.0",
"@vueup/vue-quill": "1.1.0",
"@vueuse/core": "9.5.0",
"axios": "0.27.2",
@ -35,6 +36,7 @@
"md-editor-v3": "^4.18.1",
"nprogress": "0.2.0",
"pinia": "2.0.22",
"video.js": "^8.17.3",
"vue": "^3.2.47",
"vue-cropper": "1.0.3",
"vue-router": "4.1.4",

@ -15,7 +15,7 @@ const useAlgorithmStore = defineStore("algorithm", {
userDatabase: [],
tableData: [],
tableKey:[],
userDataLabel:["用户属性表", "用户登录活跃表", "用户消费能力表", "用户行为表", "用户评论表"], //用户数据标签
userDataLabel:[], //用户数据标签
userDataLabel2:["用户商品评论数据"],
indexLibrary: [],
analysisData: [],

@ -1,5 +1,5 @@
<template>
<div class="rgzn_top app-container2">
<div class="rgzn_top app-container2" v-loading="loading" element-loading-text="Loading..." :element-loading-spinner="svg" element-loading-svg-view-box="-10, -10, 50, 50" element-loading-background="rgba(122, 122, 122, 0.8)">
<div class="top_item">
<el-button :class="{ active: isActive === 1 }" @click="activeIndex(1)"></el-button>
<el-button :class="{ active: isActive === 2 }" @click="activeIndex(2)"></el-button>
@ -14,26 +14,48 @@
</div>
</template>
<script setup>
import * as portraitModel from "@/api/portraitModel";
import useAlgorithmStore from "@/store/modules/algorithm.js";
import { getUserInfo } from "@/utils/auth";
const algorithmStore = useAlgorithmStore();
const userInfo = JSON.parse(getUserInfo());
const route = useRoute();
const pageData = [defineAsyncComponent(() => import("./components/bigData.vue")), defineAsyncComponent(() => import("./components/descriptiveStatistics.vue")), defineAsyncComponent(() => import("./components/clusterAnalysis.vue")), defineAsyncComponent(() => import("./components/associationRuleMining.vue")), defineAsyncComponent(() => import("./components/regressionAnalysis.vue")), defineAsyncComponent(() => import("./components/emotion-analysis.vue"))];
const component = ref(pageData[0]);
const isActive = ref(1);
const loading = ref(false);
const activeIndex = (index) => {
isActive.value = index;
component.value = pageData[index - 1];
};
const map = {
'用户数据库': 1,
'描述性统计': 2,
'关联规则挖掘': 3,
'聚类分析': 4,
'回归分析': 5,
'情感分析': 6,
用户数据库: 1,
描述性统计: 2,
关联规则挖掘: 3,
聚类分析: 4,
回归分析: 5,
情感分析: 6,
};
const selectZJ = (item) => {
loading.value = true;
portraitModel.getUserTableInfo({ userId: userInfo.userId }).then((res) => {
algorithmStore.userDataLabel = [...res?.data.tableNames, ...res.data.selfBuiltTable].filter((item) => item !== "用户评论表");
if (algorithmStore.userDataLabel.length > 0) {
setTimeout(() => {
loading.value = false;
}, 500);
} else {
setTimeout(() => {
loading.value = false;
}, 1000);
}
});
};
onMounted(() => {
isActive.value = map[route.meta.title];
component.value = pageData[map[route.meta.title] - 1];
})
selectZJ();
});
</script>
<style lang="scss" scoped>
@ -42,6 +64,7 @@ onMounted(()=>{
}
.rgzn_top {
margin-top: 20px;
height: calc(100vh - 100px);
.top_item {
img {
margin-right: 5px;

Loading…
Cancel
Save