|
|
|
@ -27,14 +27,16 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="main-right">
|
|
|
|
<div class="main-right">
|
|
|
|
|
|
|
|
<el-scrollbar height="740px" style="padding: 20px">
|
|
|
|
<el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
|
|
|
|
<el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle">
|
|
|
|
<el-table-column v-for="column in tableLabel" :key="column" :prop="column.prop" :label="column.label" align="center">
|
|
|
|
<el-table-column v-for="column in tableLabel" :key="column" :prop="column" :label="column" align="center">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<template #default="{ row }">
|
|
|
|
{{ formatDate(row[column.prop]) ?? "..." }}
|
|
|
|
{{ formatDate(row[column]) ?? "..." }}
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<pagination v-show="datatotal > 0" :total="datatotal" v-model:page="n_dataTableQuery.index" v-model:limit="n_dataTableQuery.size" @pagination="getSurface" style="margin-top: 10px" />
|
|
|
|
<pagination v-show="datatotal > 0" :total="datatotal" v-model:page="n_dataTableQuery.index" v-model:limit="n_dataTableQuery.size" @pagination="getSurface" style="margin-top: 10px" />
|
|
|
|
|
|
|
|
</el-scrollbar>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
@ -46,14 +48,16 @@ import useUserStore from "@/store/modules/user";
|
|
|
|
import useAlgorithmStore from "@/store/modules/algorithm.js";
|
|
|
|
import useAlgorithmStore from "@/store/modules/algorithm.js";
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
import { getUserInfo } from "@/utils/auth";
|
|
|
|
import { getUserInfo } from "@/utils/auth";
|
|
|
|
|
|
|
|
import { warn } from "vue";
|
|
|
|
const userInfo = JSON.parse(getUserInfo());
|
|
|
|
const userInfo = JSON.parse(getUserInfo());
|
|
|
|
const loading = ref(false);
|
|
|
|
const loading = ref(false);
|
|
|
|
const fileData = ref(null);
|
|
|
|
const fileData = ref(null);
|
|
|
|
|
|
|
|
const scrollbarHeight = ref(0);
|
|
|
|
const algorithmStore = useAlgorithmStore();
|
|
|
|
const algorithmStore = useAlgorithmStore();
|
|
|
|
// 数据表query
|
|
|
|
// 数据表query
|
|
|
|
const n_dataTableQuery = ref({
|
|
|
|
const n_dataTableQuery = ref({
|
|
|
|
index: 1,
|
|
|
|
index: 1,
|
|
|
|
size: 7,
|
|
|
|
size: 15,
|
|
|
|
tableName: "",
|
|
|
|
tableName: "",
|
|
|
|
userId: userInfo.userId,
|
|
|
|
userId: userInfo.userId,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -62,42 +66,19 @@ const nzIndex = ref(0);
|
|
|
|
const nzData = ref([]);
|
|
|
|
const nzData = ref([]);
|
|
|
|
const zjIndex = ref(-1);
|
|
|
|
const zjIndex = ref(-1);
|
|
|
|
const zjData = ref([]);
|
|
|
|
const zjData = ref([]);
|
|
|
|
const tableLabel = ref([
|
|
|
|
const tableLabel = ref([]);
|
|
|
|
{ prop: "id", label: "ID" },
|
|
|
|
|
|
|
|
{ prop: "age", label: "年龄" },
|
|
|
|
|
|
|
|
{ prop: "annualIncome", label: "年收入" },
|
|
|
|
|
|
|
|
{ prop: "spendingScore", label: "消费水平" },
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
const tableLabel3 = ref([
|
|
|
|
|
|
|
|
{ prop: "id", label: "ID" },
|
|
|
|
|
|
|
|
{ prop: "content", label: "评论内容" },
|
|
|
|
|
|
|
|
{ prop: "creationTime", label: "评论时间" },
|
|
|
|
|
|
|
|
{ prop: "nickName", label: "昵称" },
|
|
|
|
|
|
|
|
{ prop: "referenceName", label: "评论对象" },
|
|
|
|
|
|
|
|
{ prop: "contentType", label: "评论类型" },
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
const tableLabel4 = ref([
|
|
|
|
|
|
|
|
{ prop: "id", label: "ID" },
|
|
|
|
|
|
|
|
{ prop: "salesVolume", label: "销售量" },
|
|
|
|
|
|
|
|
{ prop: "salesForehead", label: "销售额" },
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
const tableLabel5 = ref([
|
|
|
|
|
|
|
|
{ prop: "id", label: "ID" },
|
|
|
|
|
|
|
|
{ prop: "consumerGoods", label: "消费商品" },
|
|
|
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const tableLabel2 = ref([]);
|
|
|
|
const tableLabel2 = ref([]);
|
|
|
|
const arrhander = ref([]);
|
|
|
|
const arrhander = ref([]);
|
|
|
|
const arrhanderkey = ref([]);
|
|
|
|
const arrhanderkey = ref([]);
|
|
|
|
const arrMap = {
|
|
|
|
// const arrMap = {
|
|
|
|
客户细分数据表: tableLabel.value,
|
|
|
|
// 客户细分数据表: tableLabel.value,
|
|
|
|
销售预测数据表: tableLabel4.value,
|
|
|
|
// 销售预测数据表: tableLabel4.value,
|
|
|
|
购物车数据表: tableLabel5.value,
|
|
|
|
// 购物车数据表: tableLabel5.value,
|
|
|
|
用户评论表: tableLabel3.value,
|
|
|
|
// 用户评论表: tableLabel3.value,
|
|
|
|
};
|
|
|
|
// };
|
|
|
|
const goNZ = (index, item) => {
|
|
|
|
const goNZ = (index, item) => {
|
|
|
|
nzIndex.value = index;
|
|
|
|
nzIndex.value = index;
|
|
|
|
tableLabel.value = arrMap[item];
|
|
|
|
// tableLabel.value = arrMap[item];
|
|
|
|
n_dataTableQuery.value.tableName = item;
|
|
|
|
n_dataTableQuery.value.tableName = item;
|
|
|
|
delete n_dataTableQuery.value.selfTableName;
|
|
|
|
delete n_dataTableQuery.value.selfTableName;
|
|
|
|
getSurface();
|
|
|
|
getSurface();
|
|
|
|
@ -125,6 +106,7 @@ const getSurface = () => {
|
|
|
|
portraitModel
|
|
|
|
portraitModel
|
|
|
|
.getUserTableData(n_dataTableQuery.value)
|
|
|
|
.getUserTableData(n_dataTableQuery.value)
|
|
|
|
.then((res) => {
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
tableLabel.value = Object.keys(res?.data?.list[0]);
|
|
|
|
tableData.value = res?.data?.list;
|
|
|
|
tableData.value = res?.data?.list;
|
|
|
|
datatotal.value = res?.data?.total;
|
|
|
|
datatotal.value = res?.data?.total;
|
|
|
|
tableLabel2.value = [];
|
|
|
|
tableLabel2.value = [];
|
|
|
|
@ -137,7 +119,7 @@ const getSurface = () => {
|
|
|
|
label: item,
|
|
|
|
label: item,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
tableLabel.value = tableLabel2.value;
|
|
|
|
tableLabel.value = arrhanderkey.value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
loading.value = false;
|
|
|
|
loading.value = false;
|
|
|
|
@ -172,6 +154,7 @@ const importData = (e) => {
|
|
|
|
const selectZJ = (item) => {
|
|
|
|
const selectZJ = (item) => {
|
|
|
|
portraitModel.getUserTableInfo({ userId: userInfo.userId }).then((res) => {
|
|
|
|
portraitModel.getUserTableInfo({ userId: userInfo.userId }).then((res) => {
|
|
|
|
nzData.value = res.data.tableNames;
|
|
|
|
nzData.value = res.data.tableNames;
|
|
|
|
|
|
|
|
console.log(tableLabel.value, " tableLabel.value");
|
|
|
|
n_dataTableQuery.value.tableName = nzData.value[0];
|
|
|
|
n_dataTableQuery.value.tableName = nzData.value[0];
|
|
|
|
getSurface();
|
|
|
|
getSurface();
|
|
|
|
algorithmStore.userDataLabel = [...res?.data.tableNames, ...res.data.selfBuiltTable].filter((item) => item !== "用户评论表");
|
|
|
|
algorithmStore.userDataLabel = [...res?.data.tableNames, ...res.data.selfBuiltTable].filter((item) => item !== "用户评论表");
|
|
|
|
@ -191,13 +174,12 @@ onMounted(() => {
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.app-main {
|
|
|
|
.app-main {
|
|
|
|
// background-color: #f5f5f5;
|
|
|
|
|
|
|
|
margin: 20px 20px 0;
|
|
|
|
margin: 20px 20px 0;
|
|
|
|
height: calc(100vh - 150px);
|
|
|
|
height: calc(100vh - 150px);
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
overflow: auto;
|
|
|
|
// width: 100%;
|
|
|
|
.main-left {
|
|
|
|
.main-left {
|
|
|
|
width: 205px;
|
|
|
|
width: 12.3rem;
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: #041c49;
|
|
|
|
background: #041c49;
|
|
|
|
.left-top {
|
|
|
|
.left-top {
|
|
|
|
@ -273,12 +255,9 @@ onMounted(() => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.main-right {
|
|
|
|
.main-right {
|
|
|
|
width: 1639px;
|
|
|
|
width: calc(100% - 12.3rem);
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
// background: #001D40;
|
|
|
|
|
|
|
|
border: 1px solid #0452c6;
|
|
|
|
border: 1px solid #0452c6;
|
|
|
|
// opacity: 0.5;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
:deep(.el-table__header) {
|
|
|
|
:deep(.el-table__header) {
|
|
|
|
@ -294,4 +273,8 @@ onMounted(() => {
|
|
|
|
color: #e6e6e6;
|
|
|
|
color: #e6e6e6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
:deep(.pagination-container .el-pagination) {
|
|
|
|
|
|
|
|
// 去除定位
|
|
|
|
|
|
|
|
position: static;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|