|
@@ -241,36 +241,92 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<el-row :gutter="10" v-show="currentType != '列表'" v-loading="loading">
|
|
|
- <el-col :span="6">
|
|
|
- <el-card header="" class="mb8">
|
|
|
+ <el-col :span="rowColNum[0]">
|
|
|
+ <el-card class="mb8 relative">
|
|
|
<TargetBar height="350px" ref="targetBarRef"></TargetBar>
|
|
|
+ <el-tooltip class="item" effect="dark" content="放大" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[0] == 6"
|
|
|
+ class="el-icon-zoom-in abs"
|
|
|
+ @click="handleEnlarge(0)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="缩小" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[0] == 24"
|
|
|
+ class="el-icon-zoom-out abs2"
|
|
|
+ @click="handleNarrow(0)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-card class="mb8">
|
|
|
+ <el-col :span="rowColNum[1]">
|
|
|
+ <el-card class="mb8 relative">
|
|
|
<TargetLine
|
|
|
height="350px"
|
|
|
id="stopTimeMonth"
|
|
|
ref="stopTargetLineRef"
|
|
|
></TargetLine>
|
|
|
+ <el-tooltip class="item" effect="dark" content="放大" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[1] == 6"
|
|
|
+ class="el-icon-zoom-in abs"
|
|
|
+ @click="handleEnlarge(1)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="缩小" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[1] == 24"
|
|
|
+ class="el-icon-zoom-out abs2"
|
|
|
+ @click="handleNarrow(1)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-card class="mb8">
|
|
|
+ <el-col :span="rowColNum[2]">
|
|
|
+ <el-card class="mb8 relative">
|
|
|
<TargetLine
|
|
|
height="350px"
|
|
|
id="planStopTimeMonth"
|
|
|
ref="planStopTargetLineRef"
|
|
|
></TargetLine>
|
|
|
+ <el-tooltip class="item" effect="dark" content="放大" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[2] == 6"
|
|
|
+ class="el-icon-zoom-in abs"
|
|
|
+ @click="handleEnlarge(2)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="缩小" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[2] == 24"
|
|
|
+ class="el-icon-zoom-out abs2"
|
|
|
+ @click="handleNarrow(2)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-card>
|
|
|
+ <el-col :span="rowColNum[3]">
|
|
|
+ <el-card class="mb8 relative">
|
|
|
<TargetLine
|
|
|
height="350px"
|
|
|
id="errorStopTimeMonth"
|
|
|
ref="errorStopTargetLineRef"
|
|
|
></TargetLine>
|
|
|
+ <el-tooltip class="item" effect="dark" content="放大" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[3] == 6"
|
|
|
+ class="el-icon-zoom-in abs"
|
|
|
+ @click="handleEnlarge(3)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="缩小" placement="top">
|
|
|
+ <i
|
|
|
+ v-show="rowColNum[3] == 24"
|
|
|
+ class="el-icon-zoom-out abs2"
|
|
|
+ @click="handleNarrow(3)"
|
|
|
+ ></i>
|
|
|
+ </el-tooltip>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
@@ -328,12 +384,22 @@ export default {
|
|
|
reportYear: `${new Date().getFullYear()}`,
|
|
|
},
|
|
|
currentType: "列表",
|
|
|
+ rowColNum: [6, 6, 6, 6],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleEnlarge(i) {
|
|
|
+ this.rowColNum = this.rowColNum.map(() => 0);
|
|
|
+ this.rowColNum[i] = 24;
|
|
|
+ this.initChart();
|
|
|
+ },
|
|
|
+ handleNarrow(i) {
|
|
|
+ this.rowColNum = this.rowColNum.map(() => 6);
|
|
|
+ this.initChart();
|
|
|
+ },
|
|
|
/** 查询列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
@@ -343,25 +409,28 @@ export default {
|
|
|
this.dataList = response.rows;
|
|
|
this.loading = false;
|
|
|
if (this.currentType == "图表") {
|
|
|
- this.$refs.targetBarRef.initEcharts(this.dataList, "xxx");
|
|
|
- this.$refs.stopTargetLineRef.initEcharts(
|
|
|
- this.dataList,
|
|
|
- "中压用户停电月度总时长目标"
|
|
|
- );
|
|
|
- this.$refs.planStopTargetLineRef.initEcharts(
|
|
|
- this.dataList,
|
|
|
- "中压用户预安排停电月度总时长目标"
|
|
|
- );
|
|
|
- this.$refs.errorStopTargetLineRef.initEcharts(
|
|
|
- this.dataList,
|
|
|
- "中压用户故障停电月度总时长目标"
|
|
|
- );
|
|
|
+ this.initChart();
|
|
|
// this.$refs.zyPlanStopTargetLineRef.initEcharts(this.dataList);
|
|
|
// this.$refs.zyStopTargetLineRef.initEcharts(this.dataList);
|
|
|
// this.$refs.zyErrorStopTargetLineRef.initEcharts(this.dataList);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ initChart() {
|
|
|
+ this.$refs.targetBarRef.initEcharts(this.dataList, "xxx");
|
|
|
+ this.$refs.stopTargetLineRef.initEcharts(
|
|
|
+ this.dataList,
|
|
|
+ "中压用户停电月度总时长目标"
|
|
|
+ );
|
|
|
+ this.$refs.planStopTargetLineRef.initEcharts(
|
|
|
+ this.dataList,
|
|
|
+ "中压用户预安排停电月度总时长目标"
|
|
|
+ );
|
|
|
+ this.$refs.errorStopTargetLineRef.initEcharts(
|
|
|
+ this.dataList,
|
|
|
+ "中压用户故障停电月度总时长目标"
|
|
|
+ );
|
|
|
+ },
|
|
|
handleImport() {
|
|
|
this.$refs.importModelRef.openModel();
|
|
|
},
|
|
@@ -412,4 +481,19 @@ export default {
|
|
|
.mt15 {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
+.relative {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.abs {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ top: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.abs2 {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ top: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
</style>
|