Parcourir la source

配合后端问题修改

SunZehao il y a 1 an
Parent
commit
a7b434012b

+ 51 - 51
src/App.vue

@@ -111,54 +111,57 @@
                     },
                 ],
                 generatingCapDatas: [{
-                    icon: 'Coin',
-                    index: '/generatingCap/dataFilter/prepare',
-                    name: '风电数据准备'
-                }, {
-                    icon: 'DataAnalysis',
-                    index: '/generatingCap/dataFilter/process',
-                    name: '风电数据处理'
-                }, {
-                    icon: 'Operation',
-                    index: '/generatingCap/dataAnalysis/combine',
-                    name: '功率曲线拟合分析'
-                }, {
-                    icon: 'ScaleToOriginal',
-                    index: '/generatingCap/dataAnalysis/rateAnalysis',
-                    name: '对风偏差分析'
-                }, {
-                    icon: 'DataLine',
-                    index: '/generatingCap/dataAnalysis/lineAnalysis',
-                    name: '曲线偏差率分析'
-                }, {
-                    icon: 'Odometer',
-                    index: '/generatingCap/dataAnalysis/hotAnalysis',
-                    name: '温度与功率分析'
-                }, {
-                    icon: 'Finished',
-                    index: '/generatingCap/dataAnalysis/windAnalysis',
-                    name: '损失电量分析'
-                }, {
-                    icon: 'Coordinate',
-                    index: '/generatingCap/dataAnalysis/posAnalysis',
-                    name: '微观选址分析'
-                }, {
-                    icon: 'SetUp',
-                    index: '/generatingCap/dataAnalysis/spaceAnalysis',
-                    name: '毛容量分析'
-                }, {
-                    icon: 'Suitcase',
-                    index: '/generatingCap/dataAnalysis/angleAnalysis',
-                    name: '浆距角分析'
-                }, {
-                    icon: 'Monitor',
-                    index: '/generatingCap/dataAnalysis/agcAnalysis',
-                    name: 'AGC曲线偏差分析'
-                }, {
-                    icon: 'Files',
-                    index: '/generatingCap/dataAnalysis/analysisReport',
-                    name: '分析报告'
-                }, ],
+                        icon: 'Coin',
+                        index: '/generatingCap/dataFilter/prepare',
+                        name: '风电数据准备'
+                    }, {
+                        icon: 'DataAnalysis',
+                        index: '/generatingCap/dataFilter/process',
+                        name: '风电数据处理'
+                    }, {
+                        icon: 'Operation',
+                        index: '/generatingCap/dataAnalysis/combine',
+                        name: '功率曲线拟合分析'
+                    }, {
+                        icon: 'ScaleToOriginal',
+                        index: '/generatingCap/dataAnalysis/rateAnalysis',
+                        name: '对风偏差分析'
+                    }, {
+                        icon: 'DataLine',
+                        index: '/generatingCap/dataAnalysis/lineAnalysis',
+                        name: '曲线偏差率分析'
+                    }, {
+                        icon: 'Odometer',
+                        index: '/generatingCap/dataAnalysis/hotAnalysis',
+                        name: '温度与功率分析'
+                    }, {
+                        icon: 'Finished',
+                        index: '/generatingCap/dataAnalysis/windAnalysis',
+                        name: '损失电量分析'
+                    }, {
+                        icon: 'Coordinate',
+                        index: '/generatingCap/dataAnalysis/posAnalysis',
+                        name: '微观选址分析'
+                    }, {
+                        icon: 'SetUp',
+                        index: '/generatingCap/dataAnalysis/spaceAnalysis',
+                        name: '毛容量分析'
+                    },
+                    // {
+                    //     icon: 'Suitcase',
+                    //     index: '/generatingCap/dataAnalysis/angleAnalysis',
+                    //     name: '浆距角分析'
+                    // }, {
+                    //     icon: 'Monitor',
+                    //     index: '/generatingCap/dataAnalysis/agcAnalysis',
+                    //     name: 'AGC曲线偏差分析'
+                    // }, 
+                    {
+                        icon: 'Files',
+                        index: '/generatingCap/dataAnalysis/analysisReport',
+                        name: '分析报告'
+                    },
+                ],
                 memuCloseTimeout: null,
                 fixed: false,
                 swichTheme: false
@@ -173,9 +176,6 @@
                 immediate: true
             }
         },
-        created() {
-            debugger
-        },
         mounted() {
             if (!JSON.parse(window.sessionStorage.getItem('theme'))) {
                 document.getElementById('app').style.background = '#040c0b'

+ 1 - 1
src/components/generatingCapacityComponent/tree.vue

@@ -233,7 +233,7 @@
                             }
                             if (res.code === 200) {
                                 ElMessage.success(res.msg);
-                                emits("refresh");
+                                this.$emit("refresh");
                             }
                         });
 

+ 4 - 5
src/views/generatingCapacity/dataAnalysis/combine/components/current-scatter-chart.vue

@@ -83,7 +83,6 @@
                     "#c531c7",
                     "#bd3338",
                 ],
-                theme: 'dark'
             };
         },
         computed: {
@@ -145,17 +144,17 @@
                         x: "right",
                         position: [10, 10],
                         // backgroundColor:'rgba(0,0,0,0.4)',
-                        borderColor: partten.getColor("white"),
+                        borderColor: that.theme ? partten.getColor("gray") : partten.getColor("white"),
                         textStyle: {
                             fontSize: util.vh(16),
-                            color: partten.getColor("white")
+                            color: that.theme ? partten.getColor("gray") : partten.getColor("white")
                         },
                         iconStyle: {
-                            borderColor: partten.getColor("white")
+                            borderColor: that.theme ? partten.getColor("gray") : partten.getColor("white")
                         },
                         emphasis: {
                             iconStyle: {
-                                borderColor: partten.getColor("white")
+                                borderColor: that.theme ? partten.getColor("gray") : partten.getColor("white")
                             },
                         },
                     },

+ 1 - 1
src/views/generatingCapacity/dataAnalysis/combine/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="dataAnalysisCom" :class="!theme ? 'themeDark' : 'themeLight'">
         <div class="dataAnalysisComMain">
-            <p>风电数据处理</p>
+            <p>功率曲线拟合分析</p>
             <search-cop @submit="funSubmit">
             </search-cop>
             <div class="main">

+ 4 - 2
src/views/generatingCapacity/dataAnalysis/lineAnalysis/components/current-scatter-chart.vue

@@ -236,7 +236,8 @@
                     xAxis: [{
                         name: 'm/s',
                         nameTextStyle: {
-                            color: '#fff'
+                            color: that.echartsTheme === "dark" ?
+                                "#fff" : "#000",
                         },
                         type: "value",
                         boundaryGap: false,
@@ -265,7 +266,8 @@
                         min: 0,
                         name: 'kW',
                         nameTextStyle: {
-                            color: '#fff'
+                            color: that.echartsTheme === "dark" ?
+                                "#fff" : "#000",
                         }
                     }],
                     animation: true,

+ 100 - 65
src/views/generatingCapacity/dataAnalysis/posAnalysis/components/posChart.vue

@@ -45,8 +45,83 @@
         })
     }
     const funStationPos = async () => {
+        const res = await httpRequest.get('/base/location', {
+            params: {
+                ids: props.ids.join(","),
+            },
+        })
+        if (res.code === 200) {
+            if (res.data && res.data.length) {
+                map.value.clearMap()
+                res.data.forEach(item => {
+                    const marker = new aMap.value.Marker({
+                        icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png",
+                        // icon: "./static/run_Icon.gif",
+                        position: [Number(item.longitude), Number(item.latitude)],
+                        anchor: 'bottom-center'
+                    });
+                    // 设置label标签
+                    // label默认蓝框白底左上角显示,样式className为:amap-marker-label
+                    marker.setLabel({
+                        direction: 'right',
+                        offset: new aMap.value.Pixel(10, 0), //设置文本标注偏移量
+                        content: `${item.aname}`, //设置文本标注内容
+                    });
+                    map.value.add(marker)
+                    // marker.setTitle(item.name);
+
+                    //创建右键菜单
+                    const contextMenu = new aMap.value.ContextMenu();
+                    /**右键菜单可根据props中传参定义 */
+                    //右键1
+                    contextMenu.addItem("功率曲线拟合", (e) => {
+                        console.log('rightObj====>>>>', rightObj.value)
+                        // funCombineGet(rightObj.value)
+                        emits('rightClick', {
+                            menuIndex: 0,
+                            current: rightObj.value,
+                        })
+                    }, 0);
+
+                    //右键2
+                    contextMenu.addItem("对风偏差分析", () => {
+                        emits('rightClick', {
+                            menuIndex: 1,
+                            current: rightObj.value,
+                        })
+                    }, 1);
+
+                    // //右键2
+                    // contextMenu.addItem("温度与功率分析", () => {
+                    // 	emits('rightClick', {
+                    // 		menuIndex: 2,
+                    // 		current: rightObj.value
+                    // 	})
+                    // }, 2);
+                    map.value.add(marker)
+                    // marker.setTitle(item.name);
+                    // 设置label标签
+                    // label默认蓝框白底左上角显示,样式className为:amap-marker-label
+                    marker.setLabel({
+                        direction: 'right',
+                        offset: new aMap.value.Pixel(10, 0), //设置文本标注偏移量
+                        content: `${item.name}`, //设置文本标注内容
+                    });
+                    //绑定鼠标右击事件——弹出右键菜单
+                    marker.on('rightclick', function (e) {
+                        rightObj.value = item
+                        contextMenu.open(map.value, e.lnglat);
+                    });
+
+                })
+                map.value.setFitView()
+            }
+        }
+    }
+
+    const funStationPosvs = async () => {
         const res = await httpRequest.get('/base/station', {
-            params: {}
+            params: {},
         })
         if (res.code === 200) {
             if (res.data && res.data.length) {
@@ -54,6 +129,7 @@
                 res.data.forEach(item => {
                     const marker = new aMap.value.Marker({
                         icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png",
+                        // icon: "./static/run_Icon.gif",
                         position: [Number(item.longitude), Number(item.latitude)],
                         anchor: 'bottom-center'
                     });
@@ -66,6 +142,7 @@
                     });
                     map.value.add(marker)
                     // marker.setTitle(item.name);
+
                 })
                 map.value.setFitView()
             }
@@ -73,6 +150,10 @@
     }
 
     const props = defineProps({
+        ids: {
+            type: Array,
+            default: () => [],
+        },
         windList: {
             type: Array,
             default: () => []
@@ -85,70 +166,24 @@
     /** 右键后对象数据的接收 */
     const rightObj = ref(null)
     /**监听windList */
-    // watch(() => props.windList, (val) => {
-    //     if (val && val.length) {
-    //         map.value.clearMap()
-    //         val.forEach(item => {
-    //             const marker = new aMap.value.Marker({
-    //                 icon: "https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png",
-    //                 position: [Number(item.longitude), Number(item.latitude)],
-    //                 anchor: 'bottom-center'
-    //             });
-    //             //创建右键菜单
-    //             const contextMenu = new aMap.value.ContextMenu();
-    //             /**右键菜单可根据props中传参定义 */
-    //             //右键1
-    //             contextMenu.addItem("功率曲线拟合", (e) => {
-    //                 console.log(rightObj.value)
-    //                 // funCombineGet(rightObj.value)
-    //                 emits('rightClick', {
-    //                     menuIndex: 0,
-    //                     current: rightObj.value,
-    //                 })
-    //             }, 0);
-
-    //             //右键2
-    //             contextMenu.addItem("对风偏差分析", () => {
-    //                 emits('rightClick', {
-    //                     menuIndex: 1,
-    //                     current: rightObj.value,
-    //                 })
-    //             }, 1);
-
-    //             // //右键2
-    //             // contextMenu.addItem("温度与功率分析", () => {
-    //             // 	emits('rightClick', {
-    //             // 		menuIndex: 2,
-    //             // 		current: rightObj.value
-    //             // 	})
-    //             // }, 2);
-    //             map.value.add(marker)
-    //             // marker.setTitle(item.name);
-    //             // 设置label标签
-    //             // label默认蓝框白底左上角显示,样式className为:amap-marker-label
-    //             marker.setLabel({
-    //                 direction: 'right',
-    //                 offset: new aMap.value.Pixel(10, 0), //设置文本标注偏移量
-    //                 content: `${item.name}`, //设置文本标注内容
-    //             });
-    //             //绑定鼠标右击事件——弹出右键菜单
-    //             marker.on('rightclick', function (e) {
-    //                 rightObj.value = item
-    //                 contextMenu.open(map.value, e.lnglat);
-    //             });
-    //         })
-    //         map.value.setFitView()
-    //         setTimeout(() => {
-    //             let zoom = map.value.getZoom()
-    //             if (zoom > 16) {
-    //                 zoom = 16
-    //                 map.value.setZoom(zoom)
-    //             }
-    //         }, 1000)
-    //     } else {
-    //         funStationPos()
-    //     }
-    // })
+    watch(() => props.ids, (val) => {
+        if (val.length > 0) {
+            funStationPos()
+        } else {
+            funStationPosvs()
+        }
+        // httpRequest
+        //     .get("/base/location", {
+        //         params: {
+        //             ids: value.join(","),
+        //         },
+        //     })
+        //     .then((res) => {
+        //         this.searchId = value || [];
+        //         this.wtList = res.data || [];
+        //         this.getWpList();
+        //     });
+    })
     //created
     onMounted(() => {
         funMapSet(mapStatus => {

+ 29 - 47
src/views/generatingCapacity/dataAnalysis/posAnalysis/index.vue

@@ -22,7 +22,7 @@
                     overflow: 'hidden',
                 }">
                             <posChart @mapDone="funMapDone" @rightClick="funRightClick" :height="tableHeight"
-                                :windList="windList" v-if="showOnlineMap" />
+                                :windList="windList" :ids="excelCheckIds" v-if="showOnlineMap" />
                             <!-- v-if="showOnlineMap" -->
                             <kMap :parentId="treeId" :ids="excelCheckIds" @mapDone="funMapDone"
                                 @rightClick="funRightClick" v-else />
@@ -58,58 +58,40 @@
                 </div>
             </div>
         </el-dialog>
-        <el-dialog title="对风偏差分析" draggable width="90%" top="25px" v-model="rateDialog">
-            <div :style="{ height: '793px' }"
-                class="flex flex-wrap justify-center items-center overflow-x-hidden overflow-y-auto">
-                <div class="mb-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500"
-                    v-for="(item, index) in chartData" :key="item.id" :class="{ 'mr-[10px]': index % 2 === 0 }">
-                    <el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18"
+        <el-dialog custom-class="windLifeDialog" title="对风偏差分析" draggable width="90%" top="25px" v-model="rateDialog">
+            <el-row :style="{ height: '793px' }">
+                <el-col :span="12" v-for="(item, index) in chartData" :key="item.id" style="height: 45%">
+                    <el-icon :style="!theme ? 'color: #fff' : ''" size="18"
                         @click="funActCop(item, 'chartCop' + (index + 1))">
                         <ZoomIn />
                     </el-icon>
-                    <chart-cop height="100%" width="100%" :xAxis="item.xAxis" :isRadar="item.isRadar"
-                        :subtext="item.subtext" :title="item.title" :series="item.series">
+                    <chart-cop class="" height="100%" width="100%" :xAxis="item.xAxis" :isRadar="item.isRadar"
+                        :theme="theme" :echartsTheme="echartsTheme" :subtext="item.subtext" :title="item.title"
+                        :series="item.series">
                     </chart-cop>
-                </div>
-                <div class="mr-[10px] w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500"
-                    v-if="!!lineSeries.length">
-                    <el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="
-              funActCop(
-                {
-                  xAxis: linexAxis,
-                  yAxis: lineyAxis,
-                  series: lineSeries,
-                  dataset: lineDataSet,
-                },
-                'lineChartCop'
-              )
-            ">
+                </el-col>
+                <el-col :span="12" v-if="!!lineSeries.length" style="height: 50%">
+                    <el-icon :style="!theme ? 'color: #fff' : ''" size="18"
+                        @click="funActCop({ xAxis: linexAxis, yAxis: lineyAxis, series: lineSeries, dataset: lineDataSet }, 'lineChartCop')">
                         <ZoomIn />
                     </el-icon>
-                    <line-chart-cop height="100%" width="100%" :xAxis="linexAxis" :yAxis="lineyAxis"
-                        :series="lineSeries" subtext="对风偏差分析图" :dataset="lineDataSet"></line-chart-cop>
-                </div>
-                <div class="w-[49%] h-[49%] flex flex-col items-end shadow rounded-[6px] shadow-blue-500"
-                    v-if="!!lineSeries.length">
-                    <el-icon class="mr-[10px] mt-[10px] cursor-pointer" size="18" @click="
-              funActCop(
-                {
-                  xAxis: scatterxData,
-                  yAxis: scatteryData,
-                  series: scatterSeries,
-                },
-                'scatterSingleChartCop'
-              )
-            ">
+                    <line-chart-cop class="" height="100%" width="100%" :xAxis="linexAxis" :yAxis="lineyAxis"
+                        :theme="theme" :echartsTheme="echartsTheme" :series="lineSeries" subtext="对风偏差分析图"
+                        :dataset="lineDataSet"></line-chart-cop>
+                </el-col>
+                <el-col :span="12" v-if="!!lineSeries.length" style="height: 50%">
+                    <el-icon :style="!theme ? 'color: #fff' : ''" size="18"
+                        @click="funActCop({ xAxis: scatterxData, yAxis: scatteryData, series: scatterSeries }, 'scatterSingleChartCop')">
                         <ZoomIn />
                     </el-icon>
-                    <scatter-single-chart-cop height="100%" width="100%" :xAxis="scatterxData" :yAxis="scatteryData"
-                        :series="scatterSeries" subtext="静态偏航对风分析图"></scatter-single-chart-cop>
-                </div>
-            </div>
+                    <scatter-single-chart-cop class="" height="95%" width="100%" :xAxis="scatterxData" :theme="theme"
+                        :echartsTheme="echartsTheme" :yAxis="scatteryData" :series="scatterSeries" subtext="静态偏航对风分析图">
+                    </scatter-single-chart-cop>
+                </el-col>
+            </el-row>
         </el-dialog>
-        <el-dialog title="功率曲线拟合" draggable width="90%" top="25px" modal-class="rightMenuDialog"
-            v-model="combineDialog">
+        <el-dialog custom-class="windLifeDialog" title="功率曲线拟合" draggable width="90%" top="25px"
+            modal-class="rightMenuDialog" v-model="combineDialog">
             <combineChart width="100%" height="600px" :chartTitle="
           avgObj.title +
           '&nbsp;&nbsp;' +
@@ -121,8 +103,8 @@
           avgObj.pcratio +
           '%'
         " :xAxisData="combine.xAxisData" :yAxisData="{ splitLine: { show: false } }" :seriesData="combine.seriesData"
-                :showLegend="true" :brushSelected="!combine.isChartArea" :dataSet="combine.dataSet"
-                @getSelected="funCombineChartSelect"></combineChart>
+                :theme="theme" :echartsTheme="echartsTheme" :showLegend="true" :brushSelected="!combine.isChartArea"
+                :dataSet="combine.dataSet" @getSelected="funCombineChartSelect"></combineChart>
         </el-dialog>
         <!-- 功率曲线拟合的圈选功能 -->
         <el-dialog v-model="wtDialog" draggable title="风机功率点位">
@@ -189,7 +171,6 @@
     watch(
         () => router.currentRoute.value,
         (newValue, oldValue) => {
-            debugger
             // if (newValue.path === "/dataAnalysis/posAnalysis") {
             if (newValue.path.indexOf("/dataAnalysis/posAnalysis") > -1) {
                 if (newValue.query.onlineMap) {
@@ -685,6 +666,7 @@
             },
         });
         if (rosesRes.code === 200) {
+            debugger
             if (rosesRes.data.length) {
                 rateDialog.value = true;
                 nextTick(() => {