修复数字营销算法页面bug

dev-QQq
方佳 博 2 years ago
parent 69497fed71
commit 7760909153

Binary file not shown.

@ -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,6 +14,27 @@
</div>
</template>
<script setup>
import * as portraitModel from "@/api/portraitModel";
import useAlgorithmStore from "@/store/modules/algorithm.js";
import { getUserInfo } from "@/utils/auth";
const userInfo = JSON.parse(getUserInfo());
const algorithmStore = useAlgorithmStore();
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 > 1) {
setTimeout(() => {
loading.value = false;
}, 500);
} else {
setTimeout(() => {
loading.value = false;
}, 500);
}
});
};
const loading = ref(false);
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]);
@ -23,17 +44,18 @@ const activeIndex = (index) => {
component.value = pageData[index - 1];
};
const map = {
'用户数据库': 1,
'描述性统计': 2,
'关联规则挖掘': 3,
'聚类分析': 4,
'回归分析': 5,
'情感分析': 6,
用户数据库: 1,
描述性统计: 2,
关联规则挖掘: 3,
聚类分析: 4,
回归分析: 5,
情感分析: 6,
};
onMounted(()=>{
isActive.value= map[route.meta.title];
component.value= pageData[map[route.meta.title]-1];
})
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