|
@@ -24,7 +24,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="年度" style="margin-bottom: 0">
|
|
|
- <el-select v-model="selectedYear" style="width: 100%" >
|
|
|
+ <el-select v-model="selectedYear" style="width: 100%">
|
|
|
<el-option v-for="year in availableYears" :key="year" :value="year">
|
|
|
{{ year }}
|
|
|
</el-option>
|
|
@@ -39,11 +39,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="企业分类">
|
|
|
- <el-select
|
|
|
- v-model="typeNum"
|
|
|
- style="width: 100%"
|
|
|
- clearable
|
|
|
- >
|
|
|
+ <el-select v-model="typeNum" style="width: 100%" clearable>
|
|
|
<el-option
|
|
|
v-for="item in enterTypeList"
|
|
|
:key="item.number"
|
|
@@ -66,9 +62,13 @@
|
|
|
{{ industryMap.get(selectedCode) }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
+
|
|
|
<el-form-item style="margin-bottom: 0">
|
|
|
- <el-button type="primary" icon="el-icon-search" @click="updateChart" size="mini"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ @click="updateChart"
|
|
|
+ size="mini"
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
@@ -126,7 +126,10 @@
|
|
|
|
|
|
<script>
|
|
|
import * as echarts from "echarts";
|
|
|
-import { listBase_data_year, listBase_data_year_all} from "@/api/base_data_year/base_data_year";
|
|
|
+import {
|
|
|
+ listBase_data_year,
|
|
|
+ listBase_data_year_all,
|
|
|
+} from "@/api/base_data_year/base_data_year";
|
|
|
import { listAllIndustry } from "@/api/industry/industry"; // 导入行业数据的接口
|
|
|
import { listEtypeAll } from "@/api/etype/etype";
|
|
|
require("echarts/theme/macarons"); // echarts theme
|
|
@@ -225,7 +228,7 @@ export default {
|
|
|
selectedRange: 300, // 不能为 0
|
|
|
tableData: [],
|
|
|
enterTypeList: [],
|
|
|
- typeNum: null
|
|
|
+ typeNum: null,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -269,7 +272,7 @@ export default {
|
|
|
.catch((error) => {
|
|
|
console.error("Error fetching data:", error);
|
|
|
});
|
|
|
- this.getEtypeAll()
|
|
|
+ this.getEtypeAll();
|
|
|
},
|
|
|
getEtypeAll() {
|
|
|
return listEtypeAll().then((res) => {
|
|
@@ -294,10 +297,18 @@ export default {
|
|
|
}
|
|
|
let filteredData = this.chartData;
|
|
|
if (this.selectedYear) {
|
|
|
- filteredData = filteredData.filter(
|
|
|
- (item) =>
|
|
|
- item.year === this.selectedYear && item.code === this.selectedCode
|
|
|
- );
|
|
|
+ if (this.typeNum && this.typeNum != "") {
|
|
|
+ console.log(this.typeNum, 999);
|
|
|
+ filteredData = filteredData.filter(
|
|
|
+ (item) =>
|
|
|
+ item.year === this.selectedYear && item.code === this.selectedCode && item.typeNum === this.typeNum
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ filteredData = filteredData.filter(
|
|
|
+ (item) =>
|
|
|
+ item.year === this.selectedYear && item.code === this.selectedCode
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
const values = filteredData.map((item) => item[this.selectedDataKey]);
|
|
|
const minVal = 0;
|
|
@@ -485,7 +496,7 @@ export default {
|
|
|
watch: {
|
|
|
// littlegreen - 关闭监测数值变化
|
|
|
selectedDataKey() {
|
|
|
- this.label = "评估指标值"+this.keyToUnit[this.selectedDataKey]
|
|
|
+ this.label = "评估指标值" + this.keyToUnit[this.selectedDataKey];
|
|
|
},
|
|
|
// selectedYear() {
|
|
|
// this.updateChart();
|