|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<div class="global-variable">
|
|
|
<div class="head">
|
|
|
+
|
|
|
<div class="headleft">
|
|
|
<div @click="generate('1')" class="picture">
|
|
|
<img src="@/assets/analyse/03.png" alt="" />
|
|
@@ -20,8 +21,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="headright">
|
|
|
- <img src="@/assets/analyse/05.png" alt="全部展开" @click="zhankai" />
|
|
|
<img src="@/assets/analyse/07.png" alt="全部缩小" @click="suoxiao" />
|
|
|
+ <img src="@/assets/analyse/05.png" alt="全部展开" @click="zhankai" />
|
|
|
+
|
|
|
<img src="@/assets/analyse/06.png" alt="全部关闭" @click="guanbi" />
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,7 +94,7 @@
|
|
|
<el-button type="primary" size="small" @click="conditions"
|
|
|
>查询</el-button
|
|
|
>
|
|
|
- <el-button size="small">导出</el-button>
|
|
|
+ <el-button size="small" @click="outputFile">导出</el-button>
|
|
|
</div>
|
|
|
<div class="main-body">
|
|
|
<div class="data-map">
|
|
@@ -101,6 +103,7 @@
|
|
|
v-for="(item, index) in fourList"
|
|
|
:key="item.index"
|
|
|
@mouseover="setCurrent(item.rowData)"
|
|
|
+ @mouseleave="setCurrent(oldCurrentRow)"
|
|
|
>
|
|
|
<div class="dialog-actions">
|
|
|
<p>{{ item.name }}</p>
|
|
@@ -131,10 +134,13 @@
|
|
|
v-loading="item.loading"
|
|
|
>
|
|
|
<!-- {{ item.rowData }} -->
|
|
|
- <p>测点路径:{{ getDetectionPointCn(item?.rowData?.mesurePointName) }}-{{ item?.rowData?.windTurbineNumber }}</p>
|
|
|
- <P>
|
|
|
- <!-- <span>采样频率:</span> -->
|
|
|
- <span>采样时间: {{ item?.rowData?.timeStamp }} </span></P>
|
|
|
+ <p v-if="item.name != '趋势图'">
|
|
|
+ 测点路径:{{
|
|
|
+ getDetectionPointCn(item?.rowData?.mesurePointName)
|
|
|
+ }}-{{ item?.rowData?.windTurbineNumber }}
|
|
|
+ <span>采样时间: {{ item?.rowData?.timeStamp }} </span>
|
|
|
+ </p>
|
|
|
+
|
|
|
<!-- {{ samplingTime }} -->
|
|
|
<div v-if="item.name === '时域图'">
|
|
|
<timedomaincharts
|
|
@@ -172,6 +178,7 @@
|
|
|
:tableDataList="tableDataList"
|
|
|
:activeIndex="index"
|
|
|
:currentRow="currentRow"
|
|
|
+ :ids="[currentRow.id]"
|
|
|
@update:currentIndex="handleCurrentIndexUpdate"
|
|
|
@update-previous-row="goToPreviousRow"
|
|
|
@update-next-row="goToNextRow"
|
|
@@ -197,6 +204,7 @@
|
|
|
highlight-current-row
|
|
|
style="width: 100%"
|
|
|
:row-class-name="tableRowClassName"
|
|
|
+ id="Table1"
|
|
|
>
|
|
|
<el-table-column type="index" label="排序"> </el-table-column>
|
|
|
<el-table-column prop="timeStamp" label="时间"> </el-table-column>
|
|
@@ -218,6 +226,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import * as FileSaver from "file-saver";
|
|
|
+import * as XLSX from "xlsx";
|
|
|
import {
|
|
|
getSysOrganizationAuthTreeByRoleId,
|
|
|
windEngineGrouPage,
|
|
@@ -262,253 +272,12 @@ export default {
|
|
|
parentOpt: [],
|
|
|
defaultdata: {},
|
|
|
companyCode: "",
|
|
|
- windCode:"",
|
|
|
+ windCode: "",
|
|
|
maplist: {},
|
|
|
timevalue: [], // 绑定 el-date-picker 的值
|
|
|
startTime: "", // 开始时间
|
|
|
endTime: "", // 结束时间
|
|
|
- tableDataList: [
|
|
|
- {
|
|
|
- id: 67803,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 00:00:14",
|
|
|
- rotationalSpeed: 971.038,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67804,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 00:00:27",
|
|
|
- rotationalSpeed: 983.67,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67810,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 02:00:12",
|
|
|
- rotationalSpeed: 882.458,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67812,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 02:00:24",
|
|
|
- rotationalSpeed: 874.012,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67822,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 07:14:15",
|
|
|
- rotationalSpeed: 857.37,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67823,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 07:14:28",
|
|
|
- rotationalSpeed: 854.68,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67829,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 08:01:29",
|
|
|
- rotationalSpeed: 1391.36,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67831,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 08:03:27",
|
|
|
- rotationalSpeed: 1217.09,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67833,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 10:48:04",
|
|
|
- rotationalSpeed: 805.184,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67836,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 10:48:16",
|
|
|
- rotationalSpeed: 813.937,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67842,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 12:00:24",
|
|
|
- rotationalSpeed: 1338.95,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67848,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 12:01:40",
|
|
|
- rotationalSpeed: 1357.89,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67852,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 14:00:04",
|
|
|
- rotationalSpeed: 1180.8,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67857,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 14:01:06",
|
|
|
- rotationalSpeed: 1228.19,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67863,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 14:59:38",
|
|
|
- rotationalSpeed: 1630.68,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67866,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 15:31:49",
|
|
|
- rotationalSpeed: 1633.31,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67875,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 16:02:33",
|
|
|
- rotationalSpeed: 1055.18,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67876,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 16:05:14",
|
|
|
- rotationalSpeed: 1079.85,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67882,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 18:47:32",
|
|
|
- rotationalSpeed: 914.042,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67883,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 18:47:45",
|
|
|
- rotationalSpeed: 910.829,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67885,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 20:00:10",
|
|
|
- rotationalSpeed: 932.506,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67891,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 20:01:11",
|
|
|
- rotationalSpeed: 819.334,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67895,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 22:03:33",
|
|
|
- rotationalSpeed: 829.548,
|
|
|
- samplingFrequency: "Time_FFT_1000_Vel",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- {
|
|
|
- id: 67901,
|
|
|
- windTurbineNumber: "F004",
|
|
|
- windTurbineName: "F004",
|
|
|
- timeStamp: "2024-07-01 22:04:59",
|
|
|
- rotationalSpeed: 831.95,
|
|
|
- samplingFrequency: "Time_FFT_10",
|
|
|
- mesurePointName: "gearbox_input_end_radial_vibration",
|
|
|
- mesureData: null,
|
|
|
- },
|
|
|
- ],
|
|
|
+ tableDataList: [],
|
|
|
|
|
|
samplingTime: "", // 采样时间
|
|
|
|
|
@@ -521,22 +290,24 @@ export default {
|
|
|
shuju: {},
|
|
|
spectrumListTwo: {},
|
|
|
envelopeListTwo: {},
|
|
|
+ oldCurrentRow: {},
|
|
|
};
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
this.GETtree();
|
|
|
-
|
|
|
},
|
|
|
- // watch: {
|
|
|
- // // 监听 timeList 的变化
|
|
|
- // timeList(newTimeList) {
|
|
|
- // if (newTimeList && newTimeList.length > 0) {
|
|
|
- // // 当 timeList 不为空时,触发 ECharts 图表生成
|
|
|
- // this.generateChart(1); // 或者根据具体逻辑来生成对应的图表
|
|
|
- // }
|
|
|
- // },
|
|
|
- // },
|
|
|
+ watch: {
|
|
|
+ // 监听 timeList 的变化
|
|
|
+ currentRow(newVal, oldVal) {
|
|
|
+ if (newVal) {
|
|
|
+ console.log(newVal, oldVal);
|
|
|
+ this.oldCurrentRow = oldVal;
|
|
|
+ } else {
|
|
|
+ console.error("currentRow is undefined or null");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
|
|
|
methods: {
|
|
|
handleLoading(currentRow, loading, activeIndex, params) {
|
|
@@ -583,9 +354,7 @@ export default {
|
|
|
// 获取风机
|
|
|
windEngineGrouPage(paramsData).then((res) => {
|
|
|
this.unitoptions = res.data.list;
|
|
|
- this.windCode=this.companyCode
|
|
|
- console.log( this.windCode,' this.windCode');
|
|
|
-
|
|
|
+ this.windCode = this.companyCode;
|
|
|
});
|
|
|
|
|
|
if (data.codeType === "field") {
|
|
@@ -745,9 +514,8 @@ export default {
|
|
|
|
|
|
const params = {
|
|
|
ids: currentRow.id,
|
|
|
- windCode: "SKF001",
|
|
|
+ windCode: "SKF001",
|
|
|
// windCode: this.companyCode,
|
|
|
-
|
|
|
};
|
|
|
|
|
|
// 根据type加载不同的数据
|
|
@@ -834,13 +602,11 @@ export default {
|
|
|
if (!row) {
|
|
|
return false;
|
|
|
}
|
|
|
- console.log(row);
|
|
|
+
|
|
|
this.$refs.singleTable.setCurrentRow(row);
|
|
|
},
|
|
|
// 当前单选
|
|
|
handleCurrentChange(val) {
|
|
|
- console.log(val, "val=============");
|
|
|
-
|
|
|
this.currentRow = val;
|
|
|
const index = this.tableDataList.indexOf(val);
|
|
|
this.currentIndex = index; // 更新当前索引
|
|
@@ -867,37 +633,6 @@ export default {
|
|
|
};
|
|
|
this.fourList.push(newItem);
|
|
|
}
|
|
|
-
|
|
|
- // API call for specific types
|
|
|
- // if (type === "1") {
|
|
|
- // // Time Domain Chart
|
|
|
- // const params = {
|
|
|
- // ids: [this.currentRow.id],
|
|
|
- // windCode: "SKF001",
|
|
|
- // analysisType: "time",
|
|
|
- // };
|
|
|
- // axios
|
|
|
- // .post("/WJapi/analysis/time", params)
|
|
|
- // .then((res) => {
|
|
|
- // this.timeList = JSON.parse(res.data);
|
|
|
- // console.log("Time List Data:", this.timeList);
|
|
|
- // })
|
|
|
- // .catch((error) => {});
|
|
|
- // } else if (type === "2") {
|
|
|
- // // Spectrogram Chart
|
|
|
- // const params = {
|
|
|
- // ids: [this.currentRow.id],
|
|
|
- // windCode: "SKF001",
|
|
|
- // analysisType: "frequency",
|
|
|
- // };
|
|
|
- // axios
|
|
|
- // .post("/WJapi/analysis/frequency", params)
|
|
|
- // .then((res) => {
|
|
|
- // this.spectrumList = JSON.parse(res.data);
|
|
|
- // console.log("Spectrum Data:", this.spectrumList);
|
|
|
- // })
|
|
|
- // .catch((error) => {});
|
|
|
- // }
|
|
|
},
|
|
|
|
|
|
tendency() {
|
|
@@ -922,7 +657,6 @@ export default {
|
|
|
.then((res) => {
|
|
|
this.qsList = JSON.parse(res.data);
|
|
|
this.fourList.push(newItem);
|
|
|
- console.log(res, "-------------------");
|
|
|
})
|
|
|
.catch((error) => {});
|
|
|
},
|
|
@@ -958,7 +692,6 @@ export default {
|
|
|
.post("/WZLapi/waveData/getMesureData", params)
|
|
|
.then((res) => {
|
|
|
this.tableDataList = res.data.datas;
|
|
|
- console.log(this.tableDataList, "-----------------");
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
console.error("Error:", error);
|
|
@@ -977,7 +710,6 @@ export default {
|
|
|
if (!this.fourList[index].isMinimized) {
|
|
|
this.fourList[index].isMinimized = true;
|
|
|
}
|
|
|
- console.log("1");
|
|
|
},
|
|
|
// 放大
|
|
|
amplifier(index) {
|
|
@@ -985,12 +717,10 @@ export default {
|
|
|
if (item.isMinimized) {
|
|
|
item.isMinimized = false;
|
|
|
}
|
|
|
- console.log("2");
|
|
|
},
|
|
|
// 关闭
|
|
|
close(index) {
|
|
|
this.fourList.splice(index, 1);
|
|
|
- console.log("3");
|
|
|
},
|
|
|
zhankai() {
|
|
|
this.fourList.forEach((item) => {
|
|
@@ -1005,14 +735,31 @@ export default {
|
|
|
guanbi() {
|
|
|
this.fourList = [];
|
|
|
},
|
|
|
+ outputFile() {
|
|
|
+ var ws1 = XLSX.utils.table_to_book(document.querySelector("#Table1")); //对应要导出的表格id
|
|
|
+ var wbOut = XLSX.write(ws1, {
|
|
|
+ bookType: "xlsx",
|
|
|
+ bookSST: true,
|
|
|
+ type: "array",
|
|
|
+ });
|
|
|
+ try {
|
|
|
+ FileSaver.saveAs(
|
|
|
+ new Blob([wbOut], { type: "application/octet-stream" }),
|
|
|
+ "demo.xlsx"
|
|
|
+ );
|
|
|
+ } catch (e) {
|
|
|
+ if (typeof console !== "undefined") console.log(e, wbOut);
|
|
|
+ }
|
|
|
+ return wbOut;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.head {
|
|
|
- border-top: 5px solid #088080;
|
|
|
- border-bottom: 5px solid #088080;
|
|
|
+ // border-top: 5px solid #088080;
|
|
|
+ // border-bottom: 5px solid #088080;
|
|
|
padding: 5px 0;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
@@ -1031,6 +778,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.headright {
|
|
|
+ line-height: 38px;
|
|
|
img {
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
@@ -1099,9 +847,9 @@ export default {
|
|
|
height: 0px; /* Adjust height when minimized */
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
-::v-deep .current-row td {
|
|
|
- background-color: rgba(147, 226, 226, 0.2) !important; /* 高亮的背景颜色 */
|
|
|
- color: #088080;
|
|
|
- font-weight: 600;
|
|
|
-}
|
|
|
+// ::v-deep .current-row td {
|
|
|
+// background-color: rgba(147, 226, 226, 0.2) !important; /* 高亮的背景颜色 */
|
|
|
+// color: #088080;
|
|
|
+// font-weight: 600;
|
|
|
+// }
|
|
|
</style>
|