|
|
|
@ -1,22 +1,23 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<!-- <el-scrollbar ref="scrollbar" height="800px"> -->
|
|
|
|
<!-- <el-scrollbar ref="scrollbar" height="800px"> -->
|
|
|
|
<div class="main-top">
|
|
|
|
<div class="main-top">
|
|
|
|
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
|
|
|
|
<span style="font-weight: bold; font-size: 18px; color: #3596eb">任务描述</span>
|
|
|
|
<p style="font-weight: 400; font-size: 12px; color: #e6e6e6">(给出任务清单参考,做哪些数据的统计分析)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
|
|
|
|
<p style="font-weight: 400; font-size: 12px; color: #e6e6e6">(给出任务清单参考,做哪些数据的统计分析)Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="main-but">
|
|
|
|
<div class="main-but">
|
|
|
|
<el-button @click="algorithmicKnowledge()">
|
|
|
|
<el-button @click="algorithmicKnowledge()">
|
|
|
|
<img src="../../../assets/images/导入.png" alt="" />
|
|
|
|
<img src="../../../assets/images/导入.png" alt="" />
|
|
|
|
算法知识导入
|
|
|
|
算法知识导入
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
<el-button @click="taskSubmit">
|
|
|
|
<el-button @click="taskSubmit">
|
|
|
|
<img src="../../../assets/images/提交.png" alt="" />
|
|
|
|
<img src="../../../assets/images/提交.png" alt="" />
|
|
|
|
实训任务提交
|
|
|
|
实训任务提交
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="app-main">
|
|
|
|
<div class="app-main">
|
|
|
|
<div class="main-left">
|
|
|
|
|
|
|
|
<el-scrollbar height="550px" style="padding: 0 10px" min-size="5">
|
|
|
|
<div class="main-left">
|
|
|
|
|
|
|
|
<el-scrollbar height="560px" style="padding: 0 10px" min-size="5">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="left-top">
|
|
|
|
<div class="left-top">
|
|
|
|
<span>一、选择指标</span>
|
|
|
|
<span>一、选择指标</span>
|
|
|
|
@ -27,7 +28,7 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="metrics-table" style="margin-top: 10px">
|
|
|
|
<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 type="selection" label="Date" align="center" :selectable="flag" />
|
|
|
|
<el-table-column prop="text" label="指标" align="center" />
|
|
|
|
<el-table-column prop="text" label="指标" align="center" />
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
@ -80,7 +81,7 @@
|
|
|
|
<el-scrollbar height="500px" ref="scrollbar" style="padding: 20px">
|
|
|
|
<el-scrollbar height="500px" ref="scrollbar" style="padding: 20px">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<span style="font-weight: bold; font-size: 18px; color: #3596eb">分析数据:</span>
|
|
|
|
<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-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center" />
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
|
|
|
|
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
|
|
|
|
@ -88,7 +89,7 @@
|
|
|
|
<div class="analysisResults" style="margin-top: 20px">
|
|
|
|
<div class="analysisResults" style="margin-top: 20px">
|
|
|
|
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果:</span>
|
|
|
|
<span style="font-weight: bold; font-size: 18px; color: #3596eb; display: block">分析结果:</span>
|
|
|
|
<el-button @click="upLoad" v-if="showChart">下载</el-button>
|
|
|
|
<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-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center" />
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
|
|
|
|
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
|
|
|
|
@ -281,6 +282,9 @@ import JSZip from "jszip";
|
|
|
|
import * as API from "@/api/AI.js";
|
|
|
|
import * as API from "@/api/AI.js";
|
|
|
|
import { getUserInfo } from "@/utils/auth";
|
|
|
|
import { getUserInfo } from "@/utils/auth";
|
|
|
|
import { onMounted, reactive } from "vue";
|
|
|
|
import { onMounted, reactive } from "vue";
|
|
|
|
|
|
|
|
const loading1=ref(false)
|
|
|
|
|
|
|
|
const loading2=ref(false)
|
|
|
|
|
|
|
|
const loading3=ref(false)
|
|
|
|
const runResultShow = ref(false);
|
|
|
|
const runResultShow = ref(false);
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const dialogVisible = ref(false);
|
|
|
|
const dialogVisible = ref(false);
|
|
|
|
@ -393,7 +397,7 @@ onMounted(() => {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: "scatter",
|
|
|
|
type: "scatter",
|
|
|
|
encode: { tooltip: [0, 1] },
|
|
|
|
encode: { tooltip: [0, 1] },
|
|
|
|
symbolSize: 15,
|
|
|
|
symbolSize: 8,
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
borderColor: "#555",
|
|
|
|
borderColor: "#555",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -405,44 +409,48 @@ onMounted(() => {
|
|
|
|
myChart2.setOption(option);
|
|
|
|
myChart2.setOption(option);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const optionData = () => {
|
|
|
|
const optionData=()=>{
|
|
|
|
API.viewingMetrics({ userId: JSON.parse(getUserInfo()).userId, tableName: input.value, algorithmName: "聚类分析" }).then((res) => {
|
|
|
|
loading1.value=true
|
|
|
|
tableData.value = [];
|
|
|
|
API.viewingMetrics({userId:JSON.parse(getUserInfo()).userId,tableName:input.value,algorithmName:'聚类分析'}).then((res)=>{
|
|
|
|
input3.value = "";
|
|
|
|
tableData.value=[]
|
|
|
|
res.data.forEach((element) => {
|
|
|
|
input3.value=''
|
|
|
|
tableData.value.push({
|
|
|
|
res.data.forEach(element => {
|
|
|
|
text: element,
|
|
|
|
tableData.value.push({
|
|
|
|
});
|
|
|
|
text:element
|
|
|
|
});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
})
|
|
|
|
};
|
|
|
|
loading1.value=false
|
|
|
|
const selectedRows = ref([]);
|
|
|
|
}).catch(()=>{
|
|
|
|
const handleSelectionChange = (selection) => {
|
|
|
|
loading1.value=false
|
|
|
|
selectedRows.value = selection;
|
|
|
|
})
|
|
|
|
};
|
|
|
|
|
|
|
|
const tableData2 = ref([]);
|
|
|
|
|
|
|
|
const tableData3 = ref([]);
|
|
|
|
|
|
|
|
const resTable2 = ref();
|
|
|
|
|
|
|
|
const taskZB = () => {
|
|
|
|
|
|
|
|
flag.value = true;
|
|
|
|
|
|
|
|
if (selectedRows.value.length === 0) {
|
|
|
|
|
|
|
|
return proxy.$modal.msgWarning("请选择指标!");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const sendData = {
|
|
|
|
const selectedRows = ref([]);
|
|
|
|
tableName: input.value,
|
|
|
|
const handleSelectionChange = (selection) => {
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
selectedRows.value = selection;
|
|
|
|
fieldList: selectedRows.value.map((item) => item.text),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const tableData2=ref([])
|
|
|
|
API.analysisDataDisplay(sendData).then((res) => {
|
|
|
|
const tableData3=ref([])
|
|
|
|
tableLabel.length = 0;
|
|
|
|
const resTable2=ref()
|
|
|
|
for (const key in res.data[0]) {
|
|
|
|
const taskZB=()=>{
|
|
|
|
tableLabel.push({
|
|
|
|
flag.value=true
|
|
|
|
label: key,
|
|
|
|
if(selectedRows.value.length===0){
|
|
|
|
prop: key,
|
|
|
|
return
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const sendData={
|
|
|
|
tableData2.value = res.data;
|
|
|
|
tableName:input.value,
|
|
|
|
flag.value = true;
|
|
|
|
userId:JSON.parse(getUserInfo()).userId,
|
|
|
|
|
|
|
|
fieldList:selectedRows.value.map(item=>item.text)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
API.analysisDataDisplay(sendData).then((res)=>{
|
|
|
|
|
|
|
|
tableLabel.length=0
|
|
|
|
|
|
|
|
for (const key in res.data[0]) {
|
|
|
|
|
|
|
|
tableLabel.push({
|
|
|
|
|
|
|
|
label:key,
|
|
|
|
|
|
|
|
prop:key
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
tableData2.value=res.data
|
|
|
|
|
|
|
|
flag.value=true
|
|
|
|
proxy.$modal.msgSuccess("计算完成!");
|
|
|
|
proxy.$modal.msgSuccess("计算完成!");
|
|
|
|
tableData2.value = res.data;
|
|
|
|
tableData2.value = res.data;
|
|
|
|
flag.value = true;
|
|
|
|
flag.value = true;
|
|
|
|
@ -504,11 +512,17 @@ const optionData2 = () => {
|
|
|
|
method: input3.value,
|
|
|
|
method: input3.value,
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
userId: JSON.parse(getUserInfo()).userId,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
loading2.value=true
|
|
|
|
API.dataPreprocessing(sendData.value).then((res) => {
|
|
|
|
API.dataPreprocessing(sendData.value).then((res) => {
|
|
|
|
resTable2.value = res.data;
|
|
|
|
resTable2.value = res.data;
|
|
|
|
tableData2.value = [];
|
|
|
|
tableData2.value = [];
|
|
|
|
tableData2.value = res.data;
|
|
|
|
tableData2.value = res.data;
|
|
|
|
proxy.$modal.msgSuccess("预处理成功!");
|
|
|
|
proxy.$modal.msgSuccess("预处理成功!");
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
loading2.value=false
|
|
|
|
|
|
|
|
},500)
|
|
|
|
|
|
|
|
}).catch(()=>{
|
|
|
|
|
|
|
|
loading2.value=false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -521,6 +535,7 @@ const clusterAnalysisCalculation = () => {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (input5.value && input6.value && input4.value) {
|
|
|
|
if (input5.value && input6.value && input4.value) {
|
|
|
|
|
|
|
|
loading3.value=true
|
|
|
|
const sendData = {
|
|
|
|
const sendData = {
|
|
|
|
k: input5.value,
|
|
|
|
k: input5.value,
|
|
|
|
t: input6.value,
|
|
|
|
t: input6.value,
|
|
|
|
@ -583,7 +598,12 @@ const clusterAnalysisCalculation = () => {
|
|
|
|
Object.keys(res.data.centroid).forEach((key) => {
|
|
|
|
Object.keys(res.data.centroid).forEach((key) => {
|
|
|
|
addData(myChart2, res.data.centroid[key], "red");
|
|
|
|
addData(myChart2, res.data.centroid[key], "red");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
loading3.value=false
|
|
|
|
|
|
|
|
},500)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}).catch(()=>{
|
|
|
|
|
|
|
|
loading3.value=false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
nextTick(() => {
|
|
|
|
nextTick(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -663,28 +683,10 @@ const handleExport = async (name) => {
|
|
|
|
border: 1px solid #0452c6;
|
|
|
|
border: 1px solid #0452c6;
|
|
|
|
padding: 5px 20px;
|
|
|
|
padding: 5px 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.main-but {
|
|
|
|
|
|
|
|
margin: 5px 20px 0;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.el-button:nth-child(1) {
|
|
|
|
|
|
|
|
width: 180px;
|
|
|
|
|
|
|
|
height: 56px;
|
|
|
|
|
|
|
|
background: url("../../../assets/images/011.png");
|
|
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
border-color: #ffffff00;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-button:nth-child(2) {
|
|
|
|
|
|
|
|
width: 180px;
|
|
|
|
|
|
|
|
height: 56px;
|
|
|
|
|
|
|
|
background: url("../../../assets/images/022.png");
|
|
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
border-color: #ffffff00;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.app-main {
|
|
|
|
.app-main {
|
|
|
|
// background-color: #f5f5f5;
|
|
|
|
// background-color: #f5f5f5;
|
|
|
|
// min-height: 965px;
|
|
|
|
// min-height: 965px;
|
|
|
|
margin: 5px 20px 0;
|
|
|
|
margin: 0px 20px 0;
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
// overflow: auto;
|
|
|
|
// overflow: auto;
|
|
|
|
|