|
@@ -28,34 +28,24 @@
|
|
<div class="searchbox">
|
|
<div class="searchbox">
|
|
<p>
|
|
<p>
|
|
单位:
|
|
单位:
|
|
- <selecttree
|
|
|
|
- style="width: 220px"
|
|
|
|
- placeholder="请选择上级单位"
|
|
|
|
- :list="parentOpt"
|
|
|
|
- type="1"
|
|
|
|
- v-model="companyCode"
|
|
|
|
- @change="parentChange"
|
|
|
|
- :defaultParentProps="{
|
|
|
|
- children: 'children',
|
|
|
|
- label: 'companyName',
|
|
|
|
- value: 'codeNumber',
|
|
|
|
- }"
|
|
|
|
- >
|
|
|
|
- </selecttree>
|
|
|
|
|
|
+ <el-select v-model="company" size="small" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in companyoptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
</p>
|
|
</p>
|
|
<p>
|
|
<p>
|
|
风机:
|
|
风机:
|
|
- <el-select
|
|
|
|
- v-model="unitvalue"
|
|
|
|
- @change="getchedian"
|
|
|
|
- size="small"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-select v-model="unitvalue" size="small" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in unitoptions"
|
|
v-for="item in unitoptions"
|
|
- :key="item.engineCode"
|
|
|
|
- :label="item.engineName"
|
|
|
|
- :value="item.engineCode"
|
|
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
>
|
|
>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -65,9 +55,9 @@
|
|
<el-select v-model="monitoringvalue" size="small" placeholder="请选择">
|
|
<el-select v-model="monitoringvalue" size="small" placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in monitoringoptions"
|
|
v-for="item in monitoringoptions"
|
|
- :key="item.detectionPointEn"
|
|
|
|
- :label="item.detectionPointCn"
|
|
|
|
- :value="item.detectionPointEn"
|
|
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
>
|
|
>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -84,9 +74,7 @@
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</p>
|
|
</p>
|
|
- <el-button type="primary" size="small" @click="conditions"
|
|
|
|
- >查询</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" size="small">查询</el-button>
|
|
<el-button size="small">导出</el-button>
|
|
<el-button size="small">导出</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="main-body">
|
|
<div class="main-body">
|
|
@@ -123,12 +111,14 @@
|
|
minimized: item.isMinimized,
|
|
minimized: item.isMinimized,
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- <p>测点路径:{{}}</p>
|
|
|
|
|
|
+ <p>测点路径:</p>
|
|
<P><span>采样频率:</span><span>采样时间:</span></P>
|
|
<P><span>采样频率:</span><span>采样时间:</span></P>
|
|
<div v-if="item.name === '时域图'">
|
|
<div v-if="item.name === '时域图'">
|
|
<timedomaincharts
|
|
<timedomaincharts
|
|
- :timeList="timeList"
|
|
|
|
|
|
+ :chartData="chartData"
|
|
|
|
+ :chartLabels="chartLabels"
|
|
:currentIndex="currentIndex"
|
|
:currentIndex="currentIndex"
|
|
|
|
+ :tableData="tableData"
|
|
@update:currentIndex="handleCurrentIndexUpdate"
|
|
@update:currentIndex="handleCurrentIndexUpdate"
|
|
></timedomaincharts>
|
|
></timedomaincharts>
|
|
</div>
|
|
</div>
|
|
@@ -159,21 +149,17 @@
|
|
<div class="data-origin">
|
|
<div class="data-origin">
|
|
<el-table
|
|
<el-table
|
|
ref="singleTable"
|
|
ref="singleTable"
|
|
- :data="tableDataList"
|
|
|
|
|
|
+ :data="tableData"
|
|
:current-row-key="currentIndex"
|
|
:current-row-key="currentIndex"
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
highlight-current-row
|
|
highlight-current-row
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
>
|
|
>
|
|
<el-table-column type="index" label="排序"> </el-table-column>
|
|
<el-table-column type="index" label="排序"> </el-table-column>
|
|
- <el-table-column prop="timeStamp" label="时间"> </el-table-column>
|
|
|
|
- <el-table-column prop="mesurePointName" label="测点名称">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="address" label="场站">
|
|
|
|
- {{ this.companyCode }}
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="windTurbineNumber" label="风机" width="80px">
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="name" label="时间"> </el-table-column>
|
|
|
|
+ <el-table-column prop="address" label="测点名称"> </el-table-column>
|
|
|
|
+ <el-table-column prop="address" label="场站"> </el-table-column>
|
|
|
|
+ <el-table-column prop="address" label="风机"> </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -181,27 +167,18 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- getSysOrganizationAuthTreeByRoleId,
|
|
|
|
- windEngineGrouPage,
|
|
|
|
- queryDetectionDic,
|
|
|
|
- getMesureData,
|
|
|
|
-} from "@/api/ledger.js";
|
|
|
|
-import selecttree from "../../components/selecttree.vue";
|
|
|
|
-
|
|
|
|
import * as echarts from "echarts";
|
|
import * as echarts from "echarts";
|
|
import envelopecharts from "./components/envelopecharts.vue";
|
|
import envelopecharts from "./components/envelopecharts.vue";
|
|
import spectrogramcharts from "./components/spectrogramcharts.vue";
|
|
import spectrogramcharts from "./components/spectrogramcharts.vue";
|
|
import tendencycharts from "./components/tendencycharts.vue";
|
|
import tendencycharts from "./components/tendencycharts.vue";
|
|
import timedomaincharts from "./components/timedomaincharts.vue";
|
|
import timedomaincharts from "./components/timedomaincharts.vue";
|
|
-import axios from "axios";
|
|
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
envelopecharts,
|
|
envelopecharts,
|
|
spectrogramcharts,
|
|
spectrogramcharts,
|
|
tendencycharts,
|
|
tendencycharts,
|
|
timedomaincharts,
|
|
timedomaincharts,
|
|
- selecttree,
|
|
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -210,7 +187,7 @@ export default {
|
|
tableData: [],
|
|
tableData: [],
|
|
data: [10, 20, 30, 40], // 假设是图表的数据
|
|
data: [10, 20, 30, 40], // 假设是图表的数据
|
|
labels: ["2024/1/1", "2024/1/2", "2024/1/3", "2024/1/4"], // 假设是时间轴数据
|
|
labels: ["2024/1/1", "2024/1/2", "2024/1/3", "2024/1/4"], // 假设是时间轴数据
|
|
-
|
|
|
|
|
|
+ currentIndex: 0,
|
|
tableData: [], // 假设是来自父组件的数据
|
|
tableData: [], // 假设是来自父组件的数据
|
|
|
|
|
|
company: "",
|
|
company: "",
|
|
@@ -219,121 +196,40 @@ export default {
|
|
unitoptions: [],
|
|
unitoptions: [],
|
|
monitoringvalue: "",
|
|
monitoringvalue: "",
|
|
monitoringoptions: [],
|
|
monitoringoptions: [],
|
|
-
|
|
|
|
- tableData: [],
|
|
|
|
|
|
+ timevalue: "",
|
|
|
|
+ tableData: [
|
|
|
|
+ { name: "2024-11-01", address: "Location A" },
|
|
|
|
+ { name: "2024-11-02", address: "Location B" },
|
|
|
|
+ { name: "2024-11-03", address: "Location C" },
|
|
|
|
+ ],
|
|
|
|
|
|
fourList: [],
|
|
fourList: [],
|
|
currentRow: null, // 用于存储当前选中的行
|
|
currentRow: null, // 用于存储当前选中的行
|
|
currentIndex: 0,
|
|
currentIndex: 0,
|
|
isChartVisible: false,
|
|
isChartVisible: false,
|
|
- parentOpt: [],
|
|
|
|
- defaultdata: {},
|
|
|
|
- companyCode: "",
|
|
|
|
- maplist: {},
|
|
|
|
- timevalue: [], // 绑定 el-date-picker 的值
|
|
|
|
- startTime: "", // 开始时间
|
|
|
|
- endTime: "", // 结束时间
|
|
|
|
- tableDataList: [],
|
|
|
|
-
|
|
|
|
- timeList: {},
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
- created() {
|
|
|
|
- this.GETtree();
|
|
|
|
- },
|
|
|
|
methods: {
|
|
methods: {
|
|
- // 获取风场
|
|
|
|
- async GETtree() {
|
|
|
|
- const res = await getSysOrganizationAuthTreeByRoleId();
|
|
|
|
- const treedata = res.data;
|
|
|
|
- const processedData = this.processTreeData(treedata);
|
|
|
|
- this.parentOpt = processedData;
|
|
|
|
- this.defaultdata = res.data[0];
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- parentChange(data) {
|
|
|
|
- this.maplist = data;
|
|
|
|
- this.maplistArr = data;
|
|
|
|
- let paramsData = {
|
|
|
|
- fieldCode: this.maplist.codeNumber,
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 99,
|
|
|
|
- };
|
|
|
|
- this.unitvalue = "";
|
|
|
|
- // 获取风机
|
|
|
|
- windEngineGrouPage(paramsData).then((res) => {
|
|
|
|
- this.unitoptions = res.data.list;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- console.log(data, "parentChange");
|
|
|
|
- if (data.codeType === "field") {
|
|
|
|
- if (this.parseCoordinates(data.longitudeAndLatitudeString).length > 0) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- const dataMapList = data.children;
|
|
|
|
- dataMapList.forEach((element) => {
|
|
|
|
- console.log(element);
|
|
|
|
- if (
|
|
|
|
- this.parseCoordinates(element.longitudeAndLatitudeString).length >
|
|
|
|
- 0 &&
|
|
|
|
- element.codeType === "field"
|
|
|
|
- ) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- processTreeData(treeData) {
|
|
|
|
- const processedData = [];
|
|
|
|
- function processNode(node) {
|
|
|
|
- if (node.codeType === "field") {
|
|
|
|
- node.companyName = node.fieldName;
|
|
|
|
- }
|
|
|
|
- if (node.children && node.children.length > 0) {
|
|
|
|
- node.children.forEach((child) => {
|
|
|
|
- processNode(child);
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- treeData.forEach((root) => {
|
|
|
|
- processNode(root);
|
|
|
|
- processedData.push(root);
|
|
|
|
- });
|
|
|
|
- return processedData;
|
|
|
|
- },
|
|
|
|
- parseCoordinates(input) {
|
|
|
|
- if (input && typeof input === "string") {
|
|
|
|
- return input.split(",").map(Number);
|
|
|
|
- }
|
|
|
|
- // debugger;
|
|
|
|
- return [];
|
|
|
|
- },
|
|
|
|
- // 获取测点
|
|
|
|
- getchedian(value) {
|
|
|
|
- queryDetectionDic({ engineCodes: value }).then((res) => {
|
|
|
|
- this.monitoringoptions = res.data;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-// 更新父组件的 currentIndex
|
|
|
|
handleCurrentIndexUpdate(newIndex) {
|
|
handleCurrentIndexUpdate(newIndex) {
|
|
this.currentIndex = newIndex;
|
|
this.currentIndex = newIndex;
|
|
- this.setCurrentRowData(newIndex)
|
|
|
|
},
|
|
},
|
|
-
|
|
|
|
- // 当前所在行高亮提示
|
|
|
|
setCurrent(row) {
|
|
setCurrent(row) {
|
|
- this.$refs.singleTable.setCurrentRow(row);
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ if (this.$refs.singleTable) {
|
|
|
|
+ this.$refs.singleTable.setCurrentRow(row); // 设置当前行
|
|
|
|
+ } else {
|
|
|
|
+ console.warn("Cannot access $refs.singleTable: it's undefined.");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- // 当前单选
|
|
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
- this.currentRow = val;
|
|
|
|
- const index = this.tableData.indexOf(val);
|
|
|
|
|
|
+ this.currentRow = val; // 处理当前选中行
|
|
|
|
+ const index = this.tableData.indexOf(val); // 获取当前选中行的索引
|
|
this.currentIndex = index; // 更新当前索引
|
|
this.currentIndex = index; // 更新当前索引
|
|
|
|
+ console.log("currentIndex updated to:", this.currentIndex);
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
generate(type) {
|
|
generate(type) {
|
|
if (!this.currentRow) {
|
|
if (!this.currentRow) {
|
|
this.$message.warning("请先选择数据");
|
|
this.$message.warning("请先选择数据");
|
|
@@ -355,19 +251,6 @@ export default {
|
|
};
|
|
};
|
|
this.fourList.push(newItem);
|
|
this.fourList.push(newItem);
|
|
}
|
|
}
|
|
- const params = {
|
|
|
|
- ids: [67803],
|
|
|
|
- windCode: "SKF001_wave",
|
|
|
|
- analysisType: "time",
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- axios
|
|
|
|
- .post("/WJapi/analysis/time", params)
|
|
|
|
- .then((res) => {
|
|
|
|
- this.timeList = JSON.parse(res.data);
|
|
|
|
- console.log(this.timeList);
|
|
|
|
- })
|
|
|
|
- .catch((error) => {});
|
|
|
|
},
|
|
},
|
|
|
|
|
|
tendency() {
|
|
tendency() {
|
|
@@ -383,34 +266,6 @@ export default {
|
|
this.fourList.push(newItem);
|
|
this.fourList.push(newItem);
|
|
},
|
|
},
|
|
|
|
|
|
- // // const params = {
|
|
|
|
- // // windCode: this.maplist.codeNumber,
|
|
|
|
- // // windTurbineNumberList: this.unitvalue,
|
|
|
|
- // // mesureNameList: this.monitoringvalue,
|
|
|
|
- // // startTime: this.$formatDateTWO(this.timevalue[0]),
|
|
|
|
- // // endTime: this.$formatDateTWO(this.timevalue[1]),
|
|
|
|
- // // };
|
|
|
|
- conditions() {
|
|
|
|
- const params = {
|
|
|
|
- endTime: "2024-07-02 00:00:00",
|
|
|
|
- mesureNameList: ["gearbox_input_end_radial_vibration"],
|
|
|
|
- startTime: "2024-07-01 00:00:00",
|
|
|
|
- windCode: "SKF001",
|
|
|
|
- windTurbineNumberList: ["F004"],
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- axios
|
|
|
|
- .post("/WZLapi/waveData/getMesureData", params)
|
|
|
|
- .then((res) => {
|
|
|
|
- this.tableDataList = res.data.datas;
|
|
|
|
- console.log(this.tableDataList, "-----------------");
|
|
|
|
- })
|
|
|
|
- .catch((error) => {
|
|
|
|
- console.error("Error:", error);
|
|
|
|
- // Handle the error here
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
// 缩小
|
|
// 缩小
|
|
lessen(index) {
|
|
lessen(index) {
|
|
if (!this.fourList[index].isMinimized) {
|
|
if (!this.fourList[index].isMinimized) {
|
|
@@ -532,4 +387,13 @@ export default {
|
|
height: 0px; /* Adjust height when minimized */
|
|
height: 0px; /* Adjust height when minimized */
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+
|
|
|
|
+#main {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 280px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// .line-chart {
|
|
|
|
+// position: relative;
|
|
|
|
+// }
|
|
|
|
+</style>
|