|
@@ -1,197 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="draught-fan-list">
|
|
|
- <div class="query mg-b-8">
|
|
|
- <div class="query-items">
|
|
|
- <div class="query-item">
|
|
|
- <div class="lable">场站:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="(wpId) => { getProject(); }">
|
|
|
- <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item">
|
|
|
- <div class="lable">项目:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="projectId" clearable placeholder="请选择" popper-class="select">
|
|
|
- <el-option v-for="item in projectArray" :key="item.id" :value="item.id" :label="item.name" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item">
|
|
|
- <div class="lable">日期:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-date-picker v-model="recorddate" type="date"
|
|
|
- value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-actions">
|
|
|
- <button class="btn green" @click="search">搜索</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <Mlc height="650px" :list="chartData" :units="chartUnit" :showLegend="true" />
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import Mlc from "@com/chart/line/multiple-line-chart.vue";
|
|
|
-export default {
|
|
|
- // 名称
|
|
|
- name: "cutAnalyse",
|
|
|
-
|
|
|
- // 使用组件
|
|
|
- components: {
|
|
|
- Mlc
|
|
|
- },
|
|
|
-
|
|
|
- // 数据
|
|
|
- data () {
|
|
|
- return {
|
|
|
- isAsc: "asc",
|
|
|
- wpArray: [],
|
|
|
- projectArray: [],
|
|
|
- wpId: "",
|
|
|
- projectId:"",
|
|
|
- wtId: "MG01_01",
|
|
|
- recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
|
|
|
- chartData: [{
|
|
|
- title: "",
|
|
|
- yAxisIndex: 0,
|
|
|
- value: []
|
|
|
- }],
|
|
|
- chartUnit: ["功率(万kw)"]
|
|
|
- };
|
|
|
- },
|
|
|
-
|
|
|
- // 函数
|
|
|
- methods: {
|
|
|
- // 获取风场
|
|
|
- getWp (reGetWp) {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- subUrl: "powercompare/windfarmAjax",
|
|
|
- success (res) {
|
|
|
- that.wpArray = res.data;
|
|
|
- that.wpId = res.data[0].id;
|
|
|
- that.getProject();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- // 获取期数
|
|
|
- getProject(){
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- subUrl: "powercompare/projectAjax",
|
|
|
- data:{
|
|
|
- wpIds: that.wpId
|
|
|
- },
|
|
|
- success (res) {
|
|
|
- that.projectArray = res.data;
|
|
|
- that.projectId = res.data[0].id;
|
|
|
- that.getChartData();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- // 获取图表数据
|
|
|
- getChartData () {
|
|
|
- let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: "powersaturation/powersaturationamonutchart",
|
|
|
- data: {
|
|
|
- wtId: that.wtId
|
|
|
- },
|
|
|
- success (res) {
|
|
|
-
|
|
|
- const keyArray = [{
|
|
|
- key: "value1",
|
|
|
- title: "功率"
|
|
|
- }];
|
|
|
-
|
|
|
- let chartData = [{
|
|
|
- title: "功率",
|
|
|
- yAxisIndex: 0,
|
|
|
- value: []
|
|
|
- }];
|
|
|
-
|
|
|
- keyArray.forEach((keyEle, keyIndex) => {
|
|
|
- res.data.forEach(ele => {
|
|
|
- chartData[keyIndex].value.push({
|
|
|
- text: "",
|
|
|
- value: ele[keyEle.key]
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- that.chartData = chartData;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- search () {
|
|
|
- if (!this.wpId || !this.projectId) {
|
|
|
- this.BASE.showMsg({
|
|
|
- msg: '场站与项目为必选项'
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.getChartData();
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- created () {
|
|
|
- this.getWp();
|
|
|
- },
|
|
|
-
|
|
|
- mounted () { },
|
|
|
-
|
|
|
- unmounted () { },
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less" scoped>
|
|
|
-.draught-fan-list {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
-
|
|
|
- .btn-group-tabs {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
-
|
|
|
- .photovoltaic {
|
|
|
- margin-left: 1.481vh;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .df-table {
|
|
|
- border: 0.093vh solid fade(@darkgray, 50%);
|
|
|
- position: relative;
|
|
|
- overflow: auto;
|
|
|
- flex-grow: 1;
|
|
|
- margin-top: 1.481vh;
|
|
|
- height: 30vh;
|
|
|
-
|
|
|
- &:before {
|
|
|
- content: '';
|
|
|
- width: 0.37vh;
|
|
|
- height: 0.37vh;
|
|
|
- background: @write;
|
|
|
- position: absolute;
|
|
|
- left: 0.278vh;
|
|
|
- top: 0.278vh;
|
|
|
- }
|
|
|
-
|
|
|
- tbody {
|
|
|
- height: calc(100vh - 166px);
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|