|
@@ -152,18 +152,32 @@ export default {
|
|
|
console.info(resp)
|
|
|
})
|
|
|
},
|
|
|
- // 查看理想数据
|
|
|
+ // 查看非理想数据
|
|
|
viewResult(value) {
|
|
|
- getAlgorithmDto(value).then(response => {
|
|
|
- this.ioSubList = response.data.ioSubList
|
|
|
- console.log(this.ioSubList)
|
|
|
- })
|
|
|
- console.log(value)
|
|
|
+ if (!value) {
|
|
|
+ this.$message.error('请选择要对比的数据')
|
|
|
+ } else {
|
|
|
+ console.log(value)
|
|
|
+ getAlgorithmDto(value).then(response => {
|
|
|
+ this.ioSubList = response.data.ioSubList
|
|
|
+ console.log(this.ioSubList)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
this.resetForm('queryForm')
|
|
|
- this.handleQuery()
|
|
|
+ this.nonIdeal = null
|
|
|
+ this.nonIdealData = []
|
|
|
+ this.algoTypeList = []
|
|
|
+ if (this.chart1) {
|
|
|
+ this.chart1.dispose()
|
|
|
+ this.chart1 = null
|
|
|
+ }
|
|
|
+ if (this.chart2) {
|
|
|
+ this.chart2.dispose()
|
|
|
+ this.chart2 = null
|
|
|
+ }
|
|
|
},
|
|
|
/** 查看按钮操作 */
|
|
|
handleQuery() {
|
|
@@ -176,7 +190,6 @@ export default {
|
|
|
this.chart2 = null
|
|
|
}
|
|
|
if (this.ioSubList)
|
|
|
- // this.handleCSV()
|
|
|
this.ioSubList.forEach(item => {
|
|
|
if (item.type === '1') {
|
|
|
this.handleCSV(item.path, item.type)
|
|
@@ -247,7 +260,6 @@ export default {
|
|
|
showECharts2() {
|
|
|
var chartDom = this.$refs.chart2
|
|
|
this.chart2 = echarts.init(chartDom)
|
|
|
- // var option
|
|
|
this.option2 = {
|
|
|
title: {
|
|
|
text: '理想数据',
|
|
@@ -282,11 +294,7 @@ export default {
|
|
|
this.showECharts1()
|
|
|
} else {
|
|
|
const url = process.env.VUE_APP_BASE_API + path
|
|
|
- console.log('url', url)
|
|
|
let parsedData = await parseCSV(url)
|
|
|
- // [index,item['9.966666666666667007e-01']]
|
|
|
-
|
|
|
- // this.idealData=
|
|
|
parsedData.forEach((obj, index) => {
|
|
|
for (const key in obj) {
|
|
|
if (obj.hasOwnProperty(key)) {
|
|
@@ -298,16 +306,12 @@ export default {
|
|
|
console.log(this.idealData)
|
|
|
this.showECharts2()
|
|
|
}
|
|
|
- // const url = process.env.VUE_APP_BASE_API + '/profile/upload/2023/10/08/原始标签.csv'
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.chart {
|
|
|
- /* display: flex; */
|
|
|
-}
|
|
|
.chart1 {
|
|
|
width: 100%;
|
|
|
height: 300px;
|