|
@@ -1,17 +1,24 @@
|
|
|
<template>
|
|
|
<div class="home-body" style="height: 93vh">
|
|
|
- <HeardSearch
|
|
|
- :type="-2"
|
|
|
- :hiddenWtList="true"
|
|
|
- @firstRender="firstRender"
|
|
|
- :buttons="[
|
|
|
- { label: '明细', callback: mxClick },
|
|
|
- { label: '搜索', callback: getPerformance },
|
|
|
- ]"
|
|
|
- />
|
|
|
- <div class="title" v-if="false">
|
|
|
+ <div class="title">
|
|
|
<el-select
|
|
|
size="mini"
|
|
|
+ :disabled="displayDetail"
|
|
|
+ v-model="tabIndex"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="tabClick"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in tabOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ :disabled="displayDetail"
|
|
|
v-model="company"
|
|
|
placeholder="请选择"
|
|
|
@change="handleCompanyChange(company)"
|
|
@@ -24,65 +31,52 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <div class="tabCut">
|
|
|
- <div
|
|
|
- @click="tabClick(val.id)"
|
|
|
- :class="tabIndex === val.id ? 'active' : ''"
|
|
|
- v-for="val in tabOptions"
|
|
|
- :key="val.id"
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ :disabled="displayDetail"
|
|
|
+ v-model="stationObj"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handleStationChange(stationObj)"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in stationList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ :value="item.id"
|
|
|
>
|
|
|
- <span>{{ val.name }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="station">
|
|
|
- 场站:
|
|
|
- <el-select
|
|
|
- size="mini"
|
|
|
- v-model="stationObj"
|
|
|
- placeholder="请选择"
|
|
|
- @change="handleStationChange(stationObj)"
|
|
|
- clearable
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="projectObj"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handleProjectChange(projectObj)"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in projectList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ :value="item.id"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in stationList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.aname"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="station">
|
|
|
- 项目:
|
|
|
- <el-select
|
|
|
- size="mini"
|
|
|
- v-model="projectObj"
|
|
|
- placeholder="请选择"
|
|
|
- @change="handleProjectChange(projectObj)"
|
|
|
- clearable
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ v-model="lineObj"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handleLineChange(lineObj)"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in lineList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ :value="item.id"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in projectList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.aname"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="station">
|
|
|
- 线路:
|
|
|
- <el-select size="mini" v-model="lineObj" placeholder="请选择" clearable>
|
|
|
- <el-option
|
|
|
- v-for="item in lineList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.aname"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
|
|
|
<div class="dates">
|
|
|
开始日期
|
|
@@ -111,15 +105,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="but">
|
|
|
- <el-button round size="mini" class="buttons" @click="mxClick"
|
|
|
+ <el-button round size="mini" class="buttons" @click="getPerformance"
|
|
|
>搜索</el-button
|
|
|
>
|
|
|
- <el-button
|
|
|
- round
|
|
|
- size="mini"
|
|
|
- class="buttons active"
|
|
|
- @click="getPerformance"
|
|
|
- >明细</el-button
|
|
|
+ <el-button round size="mini" class="buttons active" @click="mxClick"
|
|
|
+ >返回</el-button
|
|
|
>
|
|
|
<!-- <el-button round size="mini" class="buttons">导出</el-button> -->
|
|
|
</div>
|
|
@@ -229,9 +219,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import HeardSearch from "@com/heardSearch/index.vue";
|
|
|
import BarLineChart from "../compontent/bar-line-chart.vue";
|
|
|
import { companys } from "@/api/curveAnalyse";
|
|
|
+import {
|
|
|
+ GetOrganization,
|
|
|
+ GetStationByCompany,
|
|
|
+ GetProjectList,
|
|
|
+ GetLineList,
|
|
|
+ GetSquareList,
|
|
|
+} from "@/api/headerNav.js";
|
|
|
import dayjs from "dayjs";
|
|
|
import {
|
|
|
getStation,
|
|
@@ -242,12 +238,10 @@ import {
|
|
|
export default {
|
|
|
name: "performanceRankingList", //风机绩效榜
|
|
|
components: {
|
|
|
- HeardSearch,
|
|
|
BarLineChart,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isFirstLoad: true,
|
|
|
company: "",
|
|
|
companyOptions: [],
|
|
|
stationObj: "",
|
|
@@ -258,7 +252,7 @@ export default {
|
|
|
lineList: [],
|
|
|
starTime: "",
|
|
|
endTime: "",
|
|
|
- tabIndex: -1,
|
|
|
+ tabIndex: -2,
|
|
|
bardata: [],
|
|
|
lineData: [],
|
|
|
tabOptions: [
|
|
@@ -393,63 +387,45 @@ export default {
|
|
|
this.getPerformance();
|
|
|
},
|
|
|
initialization() {
|
|
|
- companys().then((res) => {
|
|
|
- this.companyOptions = res.data;
|
|
|
- if (res.data.length) {
|
|
|
+ GetOrganization({ type: this.tabIndex }).then((res) => {
|
|
|
+ if (res.data) {
|
|
|
this.company = res.data[0].id;
|
|
|
+ this.companyOptions = res.data;
|
|
|
this.getStation(res.data[0].id);
|
|
|
- } else {
|
|
|
- (this.company = ""),
|
|
|
- (this.stationObj = ""),
|
|
|
- (this.stationList = []),
|
|
|
- (this.projectObj = ""),
|
|
|
- (this.projectList = []),
|
|
|
- (this.lineObj = ""),
|
|
|
- (this.lineList = []);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
getStation(companyids) {
|
|
|
- getStation({
|
|
|
+ GetStationByCompany({
|
|
|
companyids: companyids,
|
|
|
type: this.tabIndex,
|
|
|
}).then((res) => {
|
|
|
if (res.data.length) {
|
|
|
+ // this.stationObj = res.data[0].id;
|
|
|
this.stationList = res.data;
|
|
|
- this.getProject(res.data[0].id);
|
|
|
+ this.getPerformance();
|
|
|
+ // this.getProject(this.stationObj);
|
|
|
} else {
|
|
|
- (this.stationObj = ""),
|
|
|
- (this.stationList = []),
|
|
|
- (this.projectObj = ""),
|
|
|
- (this.projectList = []),
|
|
|
- (this.lineObj = ""),
|
|
|
- (this.lineList = []);
|
|
|
+ this.stationList = [];
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getProject(wpids) {
|
|
|
- getProject({
|
|
|
- wpids: wpids,
|
|
|
- }).then((res) => {
|
|
|
+ getProject(stationids) {
|
|
|
+ GetProjectList(stationids).then((res) => {
|
|
|
if (res.data.length) {
|
|
|
this.projectList = res.data;
|
|
|
- this.getLine(res.data[0].id);
|
|
|
} else {
|
|
|
- (this.projectObj = ""),
|
|
|
- (this.projectList = []),
|
|
|
- (this.lineObj = ""),
|
|
|
- (this.lineList = []);
|
|
|
+ this.projectList = [];
|
|
|
}
|
|
|
+ this.getPerformance();
|
|
|
});
|
|
|
},
|
|
|
- getLine(pjids) {
|
|
|
- getLine({
|
|
|
- pjids: pjids,
|
|
|
- }).then((res) => {
|
|
|
+ getLineList(projectids) {
|
|
|
+ GetLineList(projectids).then((res) => {
|
|
|
if (res.data.length) {
|
|
|
this.lineList = res.data;
|
|
|
} else {
|
|
|
- (this.lineObj = ""), (this.lineList = []);
|
|
|
+ this.lineList = [];
|
|
|
}
|
|
|
this.getPerformance();
|
|
|
});
|
|
@@ -464,7 +440,11 @@ export default {
|
|
|
},
|
|
|
handleProjectChange(val) {
|
|
|
this.typeIndex = "1";
|
|
|
- this.getLine(val);
|
|
|
+ this.getLineList(val);
|
|
|
+ },
|
|
|
+ handleLineChange(val) {
|
|
|
+ this.typeIndex = "1";
|
|
|
+ this.getPerformance();
|
|
|
},
|
|
|
tabClick(data) {
|
|
|
this.tabIndex = data;
|
|
@@ -474,8 +454,7 @@ export default {
|
|
|
(this.projectList = []),
|
|
|
(this.lineObj = ""),
|
|
|
(this.lineList = []);
|
|
|
- this.getStation(this.company);
|
|
|
- this.getPerformance();
|
|
|
+ this.initialization();
|
|
|
},
|
|
|
typeClick(data) {
|
|
|
this.typeIndex = data;
|
|
@@ -570,18 +549,6 @@ export default {
|
|
|
"/economicsOperation/benchmarkingManagement/performanceRankingList"
|
|
|
);
|
|
|
},
|
|
|
- firstRender(searchOptions) {
|
|
|
- this.tabIndex = searchOptions.category;
|
|
|
- this.getype = searchOptions.category;
|
|
|
- this.companyid = searchOptions.orgId;
|
|
|
- this.beginDate = searchOptions.dateRange?.[0] || "";
|
|
|
- this.endDate = searchOptions.dateRange?.[1] || "";
|
|
|
- this.stationObj = searchOptions.station;
|
|
|
- if (this.isFirstLoad) {
|
|
|
- this.isFirstLoad = false;
|
|
|
- this.getPerformance();
|
|
|
- }
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|