|
|
|
|
@ -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(() => {
|
|
|
|
|
|