dev-QQq
方佳 博 2 years ago
parent b4afe55856
commit e9d5ca0ce7

@ -78,7 +78,7 @@
</div>
</div>
<div class="main-right">
<el-scrollbar height="500px" ref="scrollbar" style="padding: 20px">
<el-scrollbar height="550px" ref="scrollbar" style="padding: 20px">
<div>
<span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据</span>
<el-table :data="tableData2" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
@ -89,7 +89,7 @@
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果</span>
<el-button v-if="uplodFlag" @click="upload"></el-button>
<el-table ref="exportTableRef" :data="tableData3" row-key="TSuid" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table ref="exportTableRef" v-loading="loading1" :data="tableData3" row-key="TSuid" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="400">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center" />
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -344,6 +344,8 @@ const task=()=>{
dialogVisible.value = false
proxy.$modal.msgSuccess("提交完成!");
}
const scrollbar = ref(null);
const loading1=ref(false)
const dialogVisible = ref(false);
const runResultShow = ref(false);
const tableLabel = reactive([{ prop: "date", label: "" }]);
@ -550,6 +552,7 @@ const computation = () => {
return;
}
if (input5.value && input6.value && input4.value) {
loading1.value=true
const sendData = {
confidence: parseFloat(input5.value) / 100,
support: parseFloat(input6.value) / 100,
@ -567,6 +570,23 @@ const computation = () => {
});
}
tableData3.value = res.data;
//
setTimeout(() => {
loading1.value=false
},500)
nextTick(() => {
setTimeout(() => {
const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap");
if (scrollContainer) {
scrollContainer.scrollTo({
top: scrollContainer.scrollHeight,
behavior: "smooth", //
});
}
}, 500);
});
}).catch(()=>{
loading1.value=false
});
} else {
proxy.$modal.msgWarning("请模型参数进行设置!");

@ -28,7 +28,7 @@
</el-select>
</div>
<div class="metrics-table" style="margin-top: 10px">
<el-table border :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handleSelectionChange">
<el-table v-loading="loading1" border :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle" @selection-change="handleSelectionChange">
<el-table-column type="selection" label="Date" align="center" :selectable="flag" />
<el-table-column prop="text" label="指标" align="center" />
</el-table>
@ -82,7 +82,7 @@
<el-scrollbar height="500px" ref="scrollbar" style="padding: 20px">
<div>
<span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据</span>
<el-table ref="exportTableRef" :data="tableData2" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table ref="exportTableRef" v-loading="loading2" :data="tableData2" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center" />
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -90,7 +90,7 @@
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果</span>
<el-button @click="upLoad" v-if="showChart"></el-button>
<el-table :data="tableData3" row-key="TSuid" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table :data="tableData3" v-loading="loading3" row-key="TSuid" style="width: 100%; margin-top: 10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center" />
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -282,6 +282,9 @@ import JSZip from "jszip";
import * as API from "@/api/AI.js";
import { getUserInfo } from "@/utils/auth";
import { onMounted, reactive } from "vue";
const loading1=ref(false)
const loading2=ref(false)
const loading3=ref(false)
const runResultShow = ref(false);
const { proxy } = getCurrentInstance();
const dialogVisible = ref(false);
@ -379,7 +382,7 @@ onMounted(() => {
{
type: "scatter",
encode: { tooltip: [0, 1] },
symbolSize: 15,
symbolSize: 8,
itemStyle: {
borderColor: "#555",
},
@ -393,6 +396,7 @@ onMounted(() => {
});
const optionData=()=>{
loading1.value=true
API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'聚类分析'}).then((res)=>{
tableData.value=[]
input3.value=''
@ -401,6 +405,9 @@ onMounted(() => {
text:element
})
})
loading1.value=false
}).catch(()=>{
loading1.value=false
})
}
const selectedRows = ref([]);
@ -491,11 +498,17 @@ const optionData2 = () => {
method: input3.value,
userId: JSON.parse(getUserInfo()).userId,
});
loading2.value=true
API.dataPreprocessing(sendData.value).then((res) => {
resTable2.value = res.data;
tableData2.value = [];
tableData2.value = res.data;
proxy.$modal.msgSuccess("预处理成功!");
setTimeout(() => {
loading1.value=false
},500)
}).catch(()=>{
loading2.value=false
});
}
};
@ -509,6 +522,7 @@ const computation = () => {
return;
}
if (input5.value && input6.value && input4.value) {
loading3.value=true
const sendData = {
k: input5.value,
t: input6.value,
@ -571,7 +585,12 @@ const computation = () => {
Object.keys(res.data.centroid).forEach((key) => {
addData(myChart2, res.data.centroid[key], "red");
});
setTimeout(() => {
loading1.value=false
},500)
});
}).catch(()=>{
loading3.value=false
});
nextTick(() => {
setTimeout(() => {

@ -86,7 +86,7 @@
<el-scrollbar height="500px" ref="scrollbar" style="padding: 20px;">
<div>
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">分析数据</span>
<el-table :data="tableData2" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table :data="tableData2" style="width: 98%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -94,7 +94,7 @@
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果</span>
<el-button class="imgBtn" v-if="flagUP" @click="upLoad"></el-button>
<el-table :data="tableData3" ref="exportTableRef" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table :data="tableData3" v-loading="loading1" ref="exportTableRef" row-key="TSuid" style="width: 98%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
<el-table-column v-if="flagColumn" label="预测" align="center">
<template #default="scope">
@ -331,6 +331,7 @@ const task=()=>{
dialogVisible.value = false
proxy.$modal.msgSuccess("提交完成!");
}
const loading1=ref(false)
const dialogVisible2 = ref(false);
const flagColumn = ref(false);
const runResultShow = ref(false);
@ -380,6 +381,7 @@ const handleSelectionChange = (selection) => {
};
const tableData2 = ref([]);
const tableData3 = ref([]);
const scrollbar = ref(null);
const resTable2 = ref();
const taskZB = () => {
flag.value = true;
@ -489,6 +491,7 @@ const computation = () => {
x: [],
userId: JSON.parse(getUserInfo()).userId,
};
loading1.value=true
if (input4.value === "线性回归") {
if (input5.value.length > 1) {
proxy.$modal.msgError("y变量数量有误");
@ -515,6 +518,7 @@ const computation = () => {
data.slopes = data.slopes.join(",");
tableData3.value = [data];
predictionResults.value = "";
loading1.value=false
});
} else {
if (input5.value.length > 1) {
@ -550,11 +554,24 @@ const computation = () => {
data.slope = data.slope;
tableData3.value = [data];
predictionResults.value = "";
loading1.value=true
});
}
} else {
proxy.$modal.msgWarning("请模型参数进行设置!");
}
nextTick(() => {
setTimeout(() => {
loading1.value=false
const scrollContainer = scrollbar.value?.$el.querySelector(".el-scrollbar__wrap");
if (scrollContainer) {
scrollContainer.scrollTo({
top: scrollContainer.scrollHeight,
behavior: "smooth", //
});
}
}, 500);
});
flagUP.value = true;
};
const nowData = ref([]);

Loading…
Cancel
Save