|
@@ -5,19 +5,19 @@
|
|
|
<!-- 原始数据 -->
|
|
|
<div class="tPanel">
|
|
|
<el-table size="mini" :data="originalList">
|
|
|
- <el-table-column prop="resultDataName" label="数据" align="center">
|
|
|
+ <el-table-column prop="dataName" label="数据" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tooltip class="item" effect="dark" :content="scope.row.resultDataName" placement="top">
|
|
|
- <span class="file" @click="handleFile(scope.row.resultDataId, scope.row.processType)">{{
|
|
|
- scope.row.resultDataName }}</span>
|
|
|
+ <el-tooltip class="item" effect="dark" :content="scope.row.dataName" placement="top">
|
|
|
+ <span class="file" @click="handleOriginalFile(scope.row.id,scope.row.dataPath)">{{
|
|
|
+ scope.row.dataName }}</span>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="processStatus" label="状态" align="center">
|
|
|
+ <!-- <el-table-column prop="processStatus" label="状态" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.biz_process_status" :value="scope.row.processStatus" />
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 去噪 -->
|
|
@@ -82,7 +82,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="one">
|
|
|
- <div class="img oneBg even" @click="handleProcess(2)">
|
|
|
+ <div class="img oneBg even" @click="handleProcess(0)">
|
|
|
<div class="tag">补全</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,22 +92,22 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="three">
|
|
|
- <div class="img threeBg even" @click="handleProcess(3)">
|
|
|
+ <div class="img threeBg even" @click="handleProcess(2)">
|
|
|
<div class="tag">扩充</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="four">
|
|
|
- <div class="img fourBg odd" @click="handleProcess(4)">
|
|
|
+ <div class="img fourBg odd" @click="handleProcess(3)">
|
|
|
<div class="tag">特征提取</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="five">
|
|
|
- <div class="img fiveBg even" @click="handleProcess(5)">
|
|
|
+ <div class="img fiveBg even" @click="handleProcess(4)">
|
|
|
<div class="tag">退化评估</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="six">
|
|
|
- <div class="img sixBg odd noAfter" style="content: none;" @click="handleProcess(6)">
|
|
|
+ <div class="img sixBg odd noAfter" style="content: none;" @click="handleProcess(5)">
|
|
|
<div class="tag">故障预测</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -181,9 +181,9 @@
|
|
|
</div>
|
|
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
|
|
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item v-if="dialogType === 4" label="选择数据类型" label-width="120px">
|
|
|
+ <el-form-item v-if="dialogType === 3" label="选择数据类型" label-width="120px">
|
|
|
<el-radio-group v-removeAriaHidden v-model="type">
|
|
|
- <el-radio :label="1">去噪</el-radio>
|
|
|
+ <el-radio :label="2">去噪</el-radio>
|
|
|
<el-radio :label="3">扩充</el-radio>
|
|
|
<!-- <el-radio :label="4">特征提取</el-radio> -->
|
|
|
</el-radio-group>
|
|
@@ -233,7 +233,7 @@ import RingChart from '@/views/homePage/ringChart'
|
|
|
import BarChart from '@/views/dashboard/BarChart'
|
|
|
import { getAlgConfigByType } from "@/api/system/algConfig";
|
|
|
import { getDataProcessByType, addProcess } from "@/api/system/process";
|
|
|
-import { getDataByType, getData } from "@/api/system/data";
|
|
|
+import { getDataByType, getData,listData } from "@/api/system/data";
|
|
|
import * as echarts from 'echarts';
|
|
|
export default {
|
|
|
name: 'Index',
|
|
@@ -273,7 +273,7 @@ export default {
|
|
|
fileType: null,
|
|
|
chart: null,
|
|
|
imgPreviewUrl: null,
|
|
|
- type: 1,
|
|
|
+ type: 2,
|
|
|
dialogType: null
|
|
|
}
|
|
|
},
|
|
@@ -296,32 +296,35 @@ export default {
|
|
|
getDataByType(value).then(res => {
|
|
|
this.optionalData = res.data;
|
|
|
});
|
|
|
- getAlgConfigByType(value).then(res => {
|
|
|
+ getAlgConfigByType(3).then(res => {
|
|
|
this.optionalAglo = res.data;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
getTableData() {
|
|
|
- getDataProcessByType(0).then(res => {
|
|
|
+ const query={
|
|
|
+ dataType:0
|
|
|
+ }
|
|
|
+ listData(query).then(res => {
|
|
|
this.originalList = res.data
|
|
|
})
|
|
|
+ getDataProcessByType(0).then(res => {
|
|
|
+ this.completionList = res.data
|
|
|
+ })
|
|
|
getDataProcessByType(1).then(res => {
|
|
|
this.denoisingList = res.data
|
|
|
})
|
|
|
getDataProcessByType(2).then(res => {
|
|
|
- this.completionList = res.data
|
|
|
- })
|
|
|
- getDataProcessByType(3).then(res => {
|
|
|
this.expansionList = res.data
|
|
|
})
|
|
|
- getDataProcessByType(4).then(res => {
|
|
|
+ getDataProcessByType(3).then(res => {
|
|
|
this.featureExtractionList = res.data
|
|
|
})
|
|
|
- getDataProcessByType(5).then(res => {
|
|
|
+ getDataProcessByType(4).then(res => {
|
|
|
this.assessmentList = res.data
|
|
|
})
|
|
|
- getDataProcessByType(6).then(res => {
|
|
|
+ getDataProcessByType(5).then(res => {
|
|
|
this.faultPredictionList = res.data
|
|
|
})
|
|
|
},
|
|
@@ -334,12 +337,21 @@ export default {
|
|
|
handleProcess(type) {
|
|
|
this.dialogVisible = true;
|
|
|
this.dialogType = type
|
|
|
- const relation = [[2, 0], [1, 2], [3, 1], [4, 1], [4, 3], [5, 4], [6, 4]]
|
|
|
- const match = relation.find(item => item[0] === type)[1];
|
|
|
+ let match
|
|
|
+ if(type===3){
|
|
|
+ const relation = [[3, 2], [3, 3]]
|
|
|
+ match= relation.find(item => item[0] === type)[1]
|
|
|
+ }else if(type===5){
|
|
|
+ match=type-1
|
|
|
+ }else{
|
|
|
+ match=type
|
|
|
+ }
|
|
|
+ // const relation = [[1, 0], [2, 1], [3, 2], [4, 2], [4, 3], [5, 4], [6, 4]]
|
|
|
+ // const match = relation.find(item => item[0] === type)[1];
|
|
|
getDataByType(match).then(res => {
|
|
|
this.optionalData = res.data;
|
|
|
});
|
|
|
- getAlgConfigByType(match).then(res => {
|
|
|
+ getAlgConfigByType(type).then(res => {
|
|
|
this.optionalAglo = res.data;
|
|
|
});
|
|
|
},
|
|
@@ -369,16 +381,16 @@ export default {
|
|
|
this.chart = null
|
|
|
}
|
|
|
switch (res.data.dataType) {
|
|
|
- case '0':
|
|
|
- const originalData = this.handleFileData(text)
|
|
|
- const originalContent = originalData.contentData
|
|
|
- const originalHead = originalData.headData
|
|
|
- this.fileShowVisible = true
|
|
|
- this.loading = false
|
|
|
- this.$nextTick(() => {
|
|
|
- this.handleChartOption(originalContent, originalHead, true)
|
|
|
- })
|
|
|
- break;
|
|
|
+ // case '0':
|
|
|
+ // const originalData = this.handleFileData(text)
|
|
|
+ // const originalContent = originalData.contentData
|
|
|
+ // const originalHead = originalData.headData
|
|
|
+ // this.fileShowVisible = true
|
|
|
+ // this.loading = false
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.handleChartOption(originalContent, originalHead, true)
|
|
|
+ // })
|
|
|
+ // break;
|
|
|
case '1':
|
|
|
const returnData = this.handleFileData(text)
|
|
|
const contentData = returnData.contentData
|
|
@@ -430,6 +442,20 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ handleOriginalFile(id,url){
|
|
|
+ // const url = `${process.env.VUE_APP_BASE_API}${res.data.dataPath}`;
|
|
|
+ // this.fetchLogFile(url)
|
|
|
+ // .then((text) => {
|
|
|
+ // if (this.chart != null && this.chart != "" && this.chart != undefined) {
|
|
|
+ // this.chart.dispose();
|
|
|
+ // this.chart = null
|
|
|
+ // }
|
|
|
+ // .catch((error) => {
|
|
|
+ // console.error("Failed to fetch the log file:", error);
|
|
|
+ // this.$modal.msgSuccess("文件读取错误");
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ },
|
|
|
// 读取文件内容
|
|
|
async fetchLogFile(url) {
|
|
|
try {
|