|
@@ -2,19 +2,22 @@
|
|
|
<div class="health-2">
|
|
|
<div class="power-info mg-b-16">
|
|
|
<div class="info-tab">
|
|
|
- <div
|
|
|
- class="tab"
|
|
|
- v-for="(item, index) in infoList"
|
|
|
- :key="index"
|
|
|
- :class="item.active ? 'active' : ''"
|
|
|
- @click="onClickInfo(item)"
|
|
|
- >
|
|
|
+ <div class="tab" :class="type === '2' ? 'active' : ''" @click="changeDate('2')">
|
|
|
<i class="svg-icon svg-icon svg-icon-sm">
|
|
|
- <svg-icon :svgid="item.svgid" />
|
|
|
+ <svg-icon :svgid="'svg-h-day'" />
|
|
|
</i>
|
|
|
- <span> {{ item.title }} </span>
|
|
|
+ <span> 7日健康趋势 </span>
|
|
|
+ </div>
|
|
|
+ <div class="tab" :class="type === '3' ? 'active' : ''" @click="changeDate('3')">
|
|
|
+ <i class="svg-icon svg-icon svg-icon-sm">
|
|
|
+ <svg-icon :svgid="'svg-h-month'" />
|
|
|
+ </i>
|
|
|
+ <span>30日健康趋势</span>
|
|
|
</div>
|
|
|
<div class="empty"></div>
|
|
|
+ <!-- <div class="tab">
|
|
|
+ <span>全部风场健康趋势</span>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
<div class="info-chart">
|
|
|
<panel class="info-chart-panel" :title="'损失电量分析'">
|
|
@@ -101,11 +104,6 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
type: "2",
|
|
|
- infoList: [
|
|
|
- // {title: '24小时健康趋势', svgid: 'svg-24-houre', active: false, type: 'houre'},
|
|
|
- { title: "7日健康趋势", svgid: "svg-h-day", active: true, type: "day" },
|
|
|
- { title: "30日健康趋势", svgid: "svg-h-month", active: false, type: "month"},
|
|
|
- ],
|
|
|
bardata: {
|
|
|
area: [],
|
|
|
legend: [],
|
|
@@ -151,37 +149,22 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.requestCoulometry(2);
|
|
|
+ this.requestData();
|
|
|
this.getAllMap();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- // 未确认缺陷按钮下的健康趋势选项
|
|
|
- onClickInfo(item) {
|
|
|
- this.infoList.forEach((element) => {
|
|
|
- if (item.type == element.type) {
|
|
|
- item.active = true;
|
|
|
- switch (item.type) {
|
|
|
- case "day":
|
|
|
- this.requestCoulometry(2);
|
|
|
- break;
|
|
|
- case "month":
|
|
|
- this.requestCoulometry(3);
|
|
|
- }
|
|
|
- } else {
|
|
|
- element.active = false;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
// 获取顶部柱状图数据
|
|
|
- // 损失电量分析 type:1 表示24小时健康趋势,2 表示七天健康趋势 3 表示30天健康趋势
|
|
|
- requestCoulometry(type) {
|
|
|
+ requestData() {
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
|
method: "POST",
|
|
|
timeout: 8000,
|
|
|
subUrl: "recommen/findAllChartjz",
|
|
|
- data: { wpId: 0, type: type },
|
|
|
+ data: {
|
|
|
+ wpId: "0",
|
|
|
+ type: that.type,
|
|
|
+ },
|
|
|
success(res) {
|
|
|
if (res.code == 200) {
|
|
|
that.bardata.legend = ["优数量", "良数量", "差数量"];
|
|
@@ -199,7 +182,6 @@ export default {
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
|
method: "POST",
|
|
|
- timeout: 8000,
|
|
|
subUrl: "healthmain/findAllMap",
|
|
|
success(res) {
|
|
|
res.data.wpmap.forEach((ele) => {
|