|
@@ -3,9 +3,68 @@
|
|
|
<div class="rateAnalysisMain">
|
|
|
<div class="main_top">
|
|
|
<p class="topPsty">对风偏差分析</p>
|
|
|
+ <div class="search-item" style="margin-left: 16px">
|
|
|
+ <span class="label">场站:</span>
|
|
|
+ <div class="search-content">
|
|
|
+ <el-select
|
|
|
+ v-model="stationId"
|
|
|
+ style="width: 120px"
|
|
|
+ clearable
|
|
|
+ size="mini"
|
|
|
+ placeholder="全部"
|
|
|
+ popper-class="select"
|
|
|
+ @change="getWindturbineList"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in stationList"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <span class="label">机组:</span>
|
|
|
+ <div class="search-content">
|
|
|
+ <el-select
|
|
|
+ v-model="deviceId"
|
|
|
+ style="width: 120px"
|
|
|
+ clearable
|
|
|
+ size="mini"
|
|
|
+ placeholder="全部"
|
|
|
+ popper-class="select"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in windturbineList"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.aname"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <span class="label">日期:</span>
|
|
|
+ <div class="search-content">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="dateTime"
|
|
|
+ size="mini"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="-"
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ start-placeholder="开始"
|
|
|
+ end-placeholder="结束"
|
|
|
+ popper-class="date-select"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
- <div class="treeDataMain">
|
|
|
+ <!-- <div class="treeDataMain">
|
|
|
<tree-cop
|
|
|
:data="treeData"
|
|
|
@checkChange="funTreeCheckChange"
|
|
@@ -27,16 +86,17 @@
|
|
|
@checkChange="funExcelCheckChange"
|
|
|
:theme="theme"
|
|
|
></excel-cop>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="tableDataMain">
|
|
|
<el-tabs v-model="activeTab">
|
|
|
<el-tab-pane label="图表展示" name="1"> </el-tab-pane>
|
|
|
- <el-tab-pane label="风时" name="3"> </el-tab-pane>
|
|
|
+ <!-- <el-tab-pane label="风时" name="3"> </el-tab-pane> -->
|
|
|
<el-tab-pane
|
|
|
:label="`表格数据${
|
|
|
tableData?.length ? ' (' + tableData.length + '个)' : ''
|
|
|
}`"
|
|
|
name="2"
|
|
|
+ v-if="false"
|
|
|
>
|
|
|
</el-tab-pane>
|
|
|
<el-row v-if="activeTab === '1'" :style="{ height: tableHeight }">
|
|
@@ -309,6 +369,12 @@ import {
|
|
|
nextTick,
|
|
|
watch,
|
|
|
} from "vue";
|
|
|
+import dayjs from "dayjs";
|
|
|
+import {
|
|
|
+ fetchWindturbineList,
|
|
|
+ getWpList,
|
|
|
+} from "@/api/zhbj/index.js";
|
|
|
+
|
|
|
import { useStore } from "vuex";
|
|
|
import httpRequest from "@/utils/request.js";
|
|
|
import tools from "@tools/htmlToPdf.js";
|
|
@@ -353,7 +419,7 @@ const funExcelCheckChange = ({ checkArr, data }) => {
|
|
|
const tableData = ref([]);
|
|
|
const tableColumn = ref([]);
|
|
|
const tableDataGet = async () => {
|
|
|
- const res = await httpRequest.get(`${process.env.VUE_APP_ALARM}/wind/show`, {
|
|
|
+ const res = await httpRequest.get(`${process.env.VUE_APP_API}/wind/show`, {
|
|
|
params: {
|
|
|
id: excelCheckIds.value.join(),
|
|
|
},
|
|
@@ -389,7 +455,9 @@ const funRepeatMap = (arr) => {
|
|
|
});
|
|
|
};
|
|
|
const funGetTree = async () => {
|
|
|
- const res = await httpRequest.get(`${process.env.VUE_APP_ALARM}/power/process/tree`);
|
|
|
+ const res = await httpRequest.get(
|
|
|
+ `${process.env.VUE_APP_ALARM}/power/process/tree`
|
|
|
+ );
|
|
|
actTreeNode.value = null;
|
|
|
excelList.value = [];
|
|
|
treeData.value = funRepeatMap(res.data);
|
|
@@ -545,18 +613,12 @@ const fsBarSeries = ref([
|
|
|
|
|
|
/**submit */
|
|
|
const funSubmit = async () => {
|
|
|
- const rosesRes = await httpRequest.get(`${process.env.VUE_APP_ALARM}/wind/roses`, {
|
|
|
- params: {
|
|
|
- ids: excelCheckIds.value.join(","),
|
|
|
- mode: 0,
|
|
|
- },
|
|
|
- });
|
|
|
- const lineRes = await httpRequest.get(`${process.env.VUE_APP_ALARM}/wind/deviation/ratio`, {
|
|
|
- params: {
|
|
|
- ids: excelCheckIds.value.join(","),
|
|
|
- mode: 0,
|
|
|
- },
|
|
|
- });
|
|
|
+ const rosesRes = await httpRequest.get(
|
|
|
+ `${process.env.VUE_APP_API}/winddirecton/roses?wtid=${deviceId.value}&kssj=${dateTime.value[0]}&jssj=${dateTime.value[1]}`
|
|
|
+ );
|
|
|
+ const lineRes = await httpRequest.get(
|
|
|
+ `${process.env.VUE_APP_API}/winddirecton/deviation/ratio?wtid=${deviceId.value}&kssj=${dateTime.value[0]}&jssj=${dateTime.value[1]}`
|
|
|
+ );
|
|
|
// const rosesRes = flowerRes
|
|
|
// const lineRes = lineChartRes
|
|
|
if (rosesRes.code === 200) {
|
|
@@ -852,12 +914,15 @@ const funChartSelect = async (batch) => {
|
|
|
wDataArr.push(dataSetObj[0].source[scatterIndex].k);
|
|
|
}
|
|
|
}
|
|
|
- const wtRes = await httpRequest.get(`${process.env.VUE_APP_ALARM}/power/fitting/filter`, {
|
|
|
- params: {
|
|
|
- yk: yDataArr.join(","),
|
|
|
- wk: wDataArr.join(","),
|
|
|
- },
|
|
|
- });
|
|
|
+ const wtRes = await httpRequest.get(
|
|
|
+ `${process.env.VUE_APP_ALARM}/power/fitting/filter`,
|
|
|
+ {
|
|
|
+ params: {
|
|
|
+ yk: yDataArr.join(","),
|
|
|
+ wk: wDataArr.join(","),
|
|
|
+ },
|
|
|
+ }
|
|
|
+ );
|
|
|
if (wtRes.code === 200) {
|
|
|
let id = 1;
|
|
|
const tempArr = []; //用于以风机id 聚合dataArr
|
|
@@ -1554,10 +1619,40 @@ const initPageData = () => {
|
|
|
currentNodeKey.value = actTreeNode.value?.id || "";
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+// 场站列表/升压站列表
|
|
|
+const stationId = ref("");
|
|
|
+const stationList = ref([]);
|
|
|
+const getStationList = async () => {
|
|
|
+ const { data } = await getWpList("windturbine");
|
|
|
+ stationList.value = data;
|
|
|
+ stationId.value = data?.[0]?.id || "";
|
|
|
+ if (stationList.value.length) {
|
|
|
+ await getWindturbineList();
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+//get 风机
|
|
|
+const deviceId = ref("");
|
|
|
+const windturbineList = ref([]);
|
|
|
+const getWindturbineList = async () => {
|
|
|
+ const { data } = await fetchWindturbineList(stationId.value);
|
|
|
+ windturbineList.value = data;
|
|
|
+ deviceId.value = data?.[0]?.id || "";
|
|
|
+ funSubmit();
|
|
|
+ // tableDataGet();
|
|
|
+};
|
|
|
+
|
|
|
+const dateTime = ref([]);
|
|
|
/**activated */
|
|
|
onMounted(() => {
|
|
|
- initPageData();
|
|
|
- funGetTree();
|
|
|
+ dateTime.value = [
|
|
|
+ dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ ];
|
|
|
+ // initPageData();
|
|
|
+ getStationList();
|
|
|
+ // funGetTree();
|
|
|
//test
|
|
|
// funSubmit()
|
|
|
//
|
|
@@ -1629,7 +1724,7 @@ onMounted(() => {
|
|
|
|
|
|
.tableDataMain {
|
|
|
padding: 10px;
|
|
|
- width: calc(66% - 20px);
|
|
|
+ width: calc(100% - 20px);
|
|
|
|
|
|
.chartRowTop {
|
|
|
display: flex;
|
|
@@ -1697,4 +1792,19 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.search-item {
|
|
|
+ display: flex;
|
|
|
+ margin-right: 10px;
|
|
|
+ max-width: 450px;
|
|
|
+ align-items: center;
|
|
|
+ .label {
|
|
|
+ margin-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+ white-space: nowrap;
|
|
|
+ // width: 60px;
|
|
|
+ }
|
|
|
+ .search-content {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|