|
@@ -43,9 +43,9 @@
|
|
|
<el-form-item label="风机">
|
|
|
<el-select
|
|
|
v-model="formInline.unitvalue"
|
|
|
- @change="getchedian"
|
|
|
size="small"
|
|
|
placeholder="请选择"
|
|
|
+ @change="handleWindTuebineData"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in unitoptions"
|
|
@@ -90,8 +90,9 @@
|
|
|
<div class="boxContent">
|
|
|
<div class="left" v-if="tabActiveName === 'init'">
|
|
|
<el-empty
|
|
|
+ description="暂无数据,请先进行数据筛选"
|
|
|
:image-size="200"
|
|
|
- v-if="currentRow === null"
|
|
|
+ v-if="currentInitRow === null"
|
|
|
></el-empty>
|
|
|
<div v-else>
|
|
|
<InitCharts></InitCharts>
|
|
@@ -102,8 +103,13 @@
|
|
|
<div class="right">
|
|
|
<DescrBox
|
|
|
type="init"
|
|
|
+ :tableData="tableData"
|
|
|
ref="initTable"
|
|
|
- @handleCurrentChange="handleCurrentChange"
|
|
|
+ :windName="windName"
|
|
|
+ :windTurbineName="windTurbineName"
|
|
|
+ :currentIndex="currentInitIndex"
|
|
|
+ :currentRow="currentInitRow"
|
|
|
+ @handleInitCurrentChange="handleInitCurrentChange"
|
|
|
></DescrBox>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -120,8 +126,9 @@
|
|
|
<div class="boxContent" v-if="tabActiveName === 'copy'">
|
|
|
<div class="left">
|
|
|
<el-empty
|
|
|
+ description="暂无数据,请先进行数据筛选"
|
|
|
:image-size="200"
|
|
|
- v-if="currentRow === null"
|
|
|
+ v-if="currentCopyRow === null"
|
|
|
></el-empty>
|
|
|
<div v-else>
|
|
|
<PlotOfFit type="LeafRootOutline"></PlotOfFit>
|
|
@@ -134,7 +141,12 @@
|
|
|
<DescrBox
|
|
|
type="copy"
|
|
|
ref="copyTable"
|
|
|
- @handleCurrentChange="handleCurrentChange"
|
|
|
+ :windName="windName"
|
|
|
+ :windTurbineName="windTurbineName"
|
|
|
+ :tableData="tableData"
|
|
|
+ :currentRow="currentCopyRow"
|
|
|
+ :currentIndex="currentCopyIndex"
|
|
|
+ @handleCopyCurrentChange="handleCopyCurrentChange"
|
|
|
></DescrBox>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -149,7 +161,11 @@
|
|
|
数据列表
|
|
|
</span>
|
|
|
<div>
|
|
|
- <MultilevelTable></MultilevelTable>
|
|
|
+ <MultilevelTable
|
|
|
+ :windName="windName"
|
|
|
+ :windTurbineName="windTurbineName"
|
|
|
+ :tableData="tableData"
|
|
|
+ ></MultilevelTable>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -159,11 +175,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import * as echarts from "echarts";
|
|
|
import {
|
|
|
getSysOrganizationAuthTreeByRoleId,
|
|
|
windEngineGrouPage,
|
|
|
- queryDetectionDic,
|
|
|
} from "@/api/ledger.js";
|
|
|
import DescrBox from "./components/descrBox.vue";
|
|
|
import selecttree from "../../components/selecttree.vue";
|
|
@@ -184,26 +198,17 @@ export default {
|
|
|
timevalue: "", //时间
|
|
|
},
|
|
|
companyCode: "", //单位表格中展示
|
|
|
- parentOpt: [],
|
|
|
- chartData: [],
|
|
|
- chartLabels: [],
|
|
|
- tableData: [],
|
|
|
- data: [10, 20, 30, 40], // 假设是图表的数据
|
|
|
- labels: ["2024/1/1", "2024/1/2", "2024/1/3", "2024/1/4"], // 假设是时间轴数据
|
|
|
- currentIndex: 0,
|
|
|
+ parentOpt: [], //风场
|
|
|
tableData: [], // 假设是来自父组件的数据
|
|
|
company: "",
|
|
|
- companyoptions: [],
|
|
|
- unitvalue: "",
|
|
|
- unitoptions: [],
|
|
|
- monitoringvalue: "",
|
|
|
- monitoringoptions: [],
|
|
|
- timevalue: "",
|
|
|
- tableData: [],
|
|
|
+ unitoptions: [], //风机list
|
|
|
fourList: [],
|
|
|
- currentRow: null, // 用于存储当前选中的行
|
|
|
- currentIndex: 0,
|
|
|
- isChartVisible: false,
|
|
|
+ currentInitRow: null, // 原始图用于存储当前选中的行
|
|
|
+ currentInitIndex: 0,
|
|
|
+ currentCopyRow: null, //拟合图用于存储当前选中的行
|
|
|
+ currentCopyIndex: 0,
|
|
|
+ windName: "",
|
|
|
+ windTurbineName: "",
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
@@ -221,8 +226,21 @@ export default {
|
|
|
//获取表格数据接口
|
|
|
async getTableData() {
|
|
|
try {
|
|
|
+ // companyCode: "", //单位
|
|
|
+ // unitvalue: "", //风机
|
|
|
+ const params = {
|
|
|
+ startTime: this.$formatDateTWO(this.formInline.timevalue[0]),
|
|
|
+ endTime: this.$formatDateTWO(this.formInline.timevalue[1]),
|
|
|
+ windCode: this.formInline.companyCode,
|
|
|
+ windTurbineNumber: this.formInline.unitvalue,
|
|
|
+ };
|
|
|
console.log(this.formInline, "formInline");
|
|
|
- const res = await axios.post("/WZLapi/laserData/getLaserData");
|
|
|
+ const res = await axios.post("/WZLapi/laserData/getLaserData", params);
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ this.tableData = res.data.datas;
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.data.message);
|
|
|
+ }
|
|
|
} catch (err) {
|
|
|
this.$message.error(err);
|
|
|
}
|
|
@@ -257,7 +275,12 @@ export default {
|
|
|
});
|
|
|
return processedData;
|
|
|
},
|
|
|
+ handleWindTuebineData(data) {
|
|
|
+ this.windTurbineName = this.getWindTurbineLabel(data);
|
|
|
+ },
|
|
|
parentChange(data) {
|
|
|
+ console.log(data, "data");
|
|
|
+ this.windName = data && data.companyName;
|
|
|
this.maplist = data;
|
|
|
this.maplistArr = data;
|
|
|
let paramsData = {
|
|
@@ -265,7 +288,7 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 99,
|
|
|
};
|
|
|
- this.unitvalue = "";
|
|
|
+ // this.unitvalue = "";
|
|
|
// 获取风机
|
|
|
windEngineGrouPage(paramsData).then((res) => {
|
|
|
this.unitoptions = res.data.list;
|
|
@@ -295,69 +318,20 @@ export default {
|
|
|
// debugger;
|
|
|
return [];
|
|
|
},
|
|
|
- // 获取测点
|
|
|
- getchedian(value) {
|
|
|
- queryDetectionDic({ engineCodes: value }).then((res) => {
|
|
|
- this.monitoringoptions = res.data;
|
|
|
- });
|
|
|
+ handleInitCurrentChange(val, ind) {
|
|
|
+ this.currentInitRow = val; // 处理当前选中行
|
|
|
+ this.currentInitIndex = ind; // 更新当前索引
|
|
|
},
|
|
|
- handleCurrentIndexUpdate(newIndex) {
|
|
|
- this.currentIndex = newIndex;
|
|
|
- },
|
|
|
- setCurrent(row) {
|
|
|
- this.$nextTick(() => {
|
|
|
- if (this.$refs.singleTable) {
|
|
|
- this.$refs.singleTable.setCurrentRow(row); // 设置当前行
|
|
|
- } else {
|
|
|
- console.warn("Cannot access $refs.singleTable: it's undefined.");
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.currentRow = val; // 处理当前选中行
|
|
|
- const index = this.tableData.indexOf(val); // 获取当前选中行的索引
|
|
|
- this.currentIndex = index; // 更新当前索引
|
|
|
+ handleCopyCurrentChange(val, ind) {
|
|
|
+ this.currentCopyRow = val; // 处理当前选中行
|
|
|
+ this.currentCopyIndex = ind; // 更新当前索引
|
|
|
},
|
|
|
|
|
|
- generate(type) {
|
|
|
- if (!this.currentRow) {
|
|
|
- this.$message.warning("请先选择数据");
|
|
|
- return;
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- // 缩小
|
|
|
- lessen(index) {
|
|
|
- if (!this.fourList[index].isMinimized) {
|
|
|
- this.fourList[index].isMinimized = true;
|
|
|
- }
|
|
|
- console.log("1");
|
|
|
- },
|
|
|
- // 放大
|
|
|
- amplifier(index) {
|
|
|
- const item = this.fourList[index];
|
|
|
- if (item.isMinimized) {
|
|
|
- item.isMinimized = false;
|
|
|
- }
|
|
|
- console.log("2");
|
|
|
- },
|
|
|
- // 关闭
|
|
|
- close(index) {
|
|
|
- this.fourList.splice(index, 1);
|
|
|
- console.log("3");
|
|
|
- },
|
|
|
- zhankai() {
|
|
|
- this.fourList.forEach((item) => {
|
|
|
- item.isMinimized = false;
|
|
|
- });
|
|
|
- },
|
|
|
- suoxiao() {
|
|
|
- this.fourList.forEach((item) => {
|
|
|
- item.isMinimized = true;
|
|
|
- });
|
|
|
- },
|
|
|
- guanbi() {
|
|
|
- this.fourList = [];
|
|
|
+ getWindTurbineLabel(companyCode) {
|
|
|
+ const selectedOption = this.unitoptions?.find(
|
|
|
+ (option) => option.engineCode === companyCode
|
|
|
+ );
|
|
|
+ return selectedOption ? selectedOption.engineName : "";
|
|
|
},
|
|
|
onSubmit() {
|
|
|
console.log("事件触发了");
|