|
@@ -2,26 +2,26 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="84px">
|
|
|
<el-form-item label="算法类型" prop="type">
|
|
|
- <el-select v-model="queryParams.type" placeholder="请选择算法类型" clearable filterable @change="changeQueryType()">
|
|
|
+ <el-select :disabled="isDisabled" v-model="queryParams.type" placeholder="请选择算法类型" clearable filterable @change="changeQueryType()">
|
|
|
<el-option v-for="dict in dict.type.algorithm_type" :key="dict.value" :label="dict.label"
|
|
|
:value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="算法子类型" prop="subTypeId">
|
|
|
- <el-select v-model="queryParams.subTypeId" placeholder="请选择算法子类型" clearable filterable @change="getList()">
|
|
|
+ <el-select :disabled="isDisabled" v-model="queryParams.subTypeId" placeholder="请选择算法子类型" clearable filterable @change="getList()">
|
|
|
<el-option v-for="item in algoTypeList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="非理想数据" prop="type">
|
|
|
- <el-select v-model="nonIdeal" placeholder="请选择非理想数据" clearable filterable @change="viewResult">
|
|
|
+ <el-select :disabled="isDisabled" v-model="nonIdeal" placeholder="请选择非理想数据" clearable filterable @change="viewResult">
|
|
|
<el-option v-for="item in nonIdealData" :key="item.id" :label="item.name" :value="item.id">
|
|
|
{{ item.name }}
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查看</el-button>
|
|
|
+ <el-button :disabled="isDisabled" type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查看</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -33,6 +33,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { listSubType, getSubType } from "@/api/conf/subType";
|
|
|
import { listAlgorithm, getAlgorithmDto } from '@/api/algoManager/algorithm'
|
|
|
import { parseCSV } from '@/utils/cvstoarrory'
|
|
|
import { listInputFile } from '@/api/algoManager/file'
|
|
@@ -106,15 +107,16 @@ export default {
|
|
|
idealData: [],
|
|
|
chart2: null,
|
|
|
option2: null,
|
|
|
+ // 是否禁用选择框
|
|
|
+ isDisabled:false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.getInputList()
|
|
|
- // this.handleCSV()
|
|
|
- // this.showECharts()
|
|
|
},
|
|
|
created() {
|
|
|
this.getAlgoSubOption()
|
|
|
+ // 获取跳转过来的参数
|
|
|
+ this.getParam()
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
if (!this.chart) {
|
|
@@ -124,6 +126,33 @@ export default {
|
|
|
this.chart = null
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取跳转参数
|
|
|
+ getParam(){
|
|
|
+ let param=this.$route.params.nonIdealID
|
|
|
+ if(param !== undefined){
|
|
|
+ // 根据nonIdealID获取算法类型
|
|
|
+ getAlgorithmDto(param).then(response => {
|
|
|
+ this.ioSubList = response.data.ioSubList
|
|
|
+ // 绑定算法类型的值
|
|
|
+ this.queryParams.type=response.data.type
|
|
|
+ // 绑定非理想数据的值
|
|
|
+ this.nonIdeal=response.data.name
|
|
|
+ let subTypeId=response.data.subTypeId
|
|
|
+ let data={
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ type:this.queryParams.type
|
|
|
+ }
|
|
|
+ // 获取算法子类型的名称
|
|
|
+ listSubType(data).then(response => {
|
|
|
+ const filteredData = response.rows.filter(item => item.id === subTypeId);
|
|
|
+ this.queryParams.subTypeId=filteredData[0].name
|
|
|
+ this.handleQuery()
|
|
|
+ });
|
|
|
+ this.isDisabled=true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 查看非理想 */
|
|
|
getList() {
|
|
|
this.loading = true
|
|
@@ -160,6 +189,7 @@ export default {
|
|
|
this.nonIdeal = null
|
|
|
this.nonIdealData = []
|
|
|
this.algoTypeList = []
|
|
|
+ this.isDisabled=false
|
|
|
if (this.chart1) {
|
|
|
this.chart1.dispose()
|
|
|
this.chart1 = null
|
|
@@ -183,11 +213,9 @@ export default {
|
|
|
let firstInput = this.ioSubList.find(item => item.type === "1" && item.path.includes(".csv"));
|
|
|
let firstOut = this.ioSubList.find(item => item.type === "2" && item.path.includes(".csv"));
|
|
|
if (firstInput) {
|
|
|
- // console.log(firstInput.path,firstInput.type);
|
|
|
this.handleCSV(firstInput.path, firstInput.type)
|
|
|
}
|
|
|
if(firstOut){
|
|
|
- // console.log(firstOut.path,firstOut.type);
|
|
|
this.handleCSV(firstOut.path, firstOut.type)
|
|
|
}
|
|
|
}
|