Browse Source

页面调整

敲代码的猫 4 months ago
parent
commit
119776ca46

+ 19 - 1
src/api/screen/service.js

@@ -501,7 +501,7 @@ export function dump(appOrg) {
 // 赋码率 -贴签率
 export function codedAndLabelRate(appOrg) {
   return request({
-    url: '/large/asset/codedAndLabelRate?appOrg='+ appOrg,
+    url: '/large/asset/codedAndLabelRate?appOrg='+ '0000',
     method: 'get'
   })
 }
@@ -591,6 +591,15 @@ export function thisWeekElectricity() {
   })
 }
 
+//光伏发电
+export function photovoltaicPower() {
+  return request({
+    url: '/large/third/photovoltaicPower',
+    method: 'get'
+  })
+}
+
+
 //电梯能量回收
 export function controlElevator() {
   return request({
@@ -633,6 +642,15 @@ export function monthElectricity() {
 }
 
 
+//配电室重要回路负荷情况明细
+export function roomLoadDetail(power, customParams) {
+  return request({
+    url: '/large/third/roomLoadDetail?kind='+ customParams + '&state=' + power,
+    method: 'get'
+  })
+}
+
+
 //配电室重要回路负荷情况
 export function roomLoad() {
   return request({

+ 20 - 14
src/components/Echarts/BarChart.vue

@@ -113,11 +113,19 @@ export default {
   },
   watch: {
     chartData: {
-      deep: true,
-      handler(val) {
-        this.initChart(val)
-      }
-    }
+      handler(newVal, oldVal) {
+        if (this.myChart) {
+          if (newVal !== oldVal) {
+            this.myChart.setOption({
+              series: newVal
+            });
+          }
+        } else {
+          this.initChart();
+        }
+      },
+      deep: true
+    },
   },
   mounted() {
     this.$nextTick(() => {
@@ -167,15 +175,13 @@ export default {
         }],
         series: this.chartData
       })
-      //点击事件
-      this.chart.on('click',function(params){
-        if (params.componentType === 'series') {
-          var dataIndex = params.dataIndex;
-          that.$emit('clickBar',dataIndex)
-          // 在这里处理点击事件
-          // 例如:弹出框显示更多信息等
-        }
-      })
+      
+      // 监听点击事件
+      this.chart.on('click', (params) => {
+        // 触发自定义事件,向父组件传递点击的详细信息
+        this.$emit('chart-click', params);
+      });
+  
     }
   }
 }

+ 69 - 69
src/components/VideoComponent/index.vue

@@ -5,19 +5,19 @@
 </template>
 
 <script>
-import {DataFunc} from '@/utils/datafunc';
-import {Aes} from '@/utils/encrypt';
+import { DataFunc } from '@/utils/datafunc';
+import { Aes } from '@/utils/encrypt';
 
 
 export default {
   name: "VideoComponent",
   data() {
     return {
-      cacheData: {linkDoms: []},
+      cacheData: { linkDoms: [] },
       clientId: "UVP" + Math.floor(Math.random() * 99999999),
       nrUvpVideoObj: '',
       cameraConfig: {},
-      location:'',
+      location: '',
     };
   },
   destroyed() {
@@ -43,9 +43,9 @@ export default {
     that.importJsFile();
 
     window.onEventNotify = (type, context) => {
-      console.log("==播放回调==",type, context);
+      console.log("==播放回调==", type, context);
       if (type === 100) {
-        if (!that.nrUvpVideoObj){
+        if (!that.nrUvpVideoObj) {
 
         }
       }
@@ -65,7 +65,7 @@ export default {
     // },
 
     //引入外部js文件
-    importJsFile () {
+    importJsFile() {
       const that = this;
       const linkData = [
         {
@@ -121,34 +121,34 @@ export default {
 
     //授权验证
     initViewer() {
-  const that = this;
-  let apiUrl = '/uvp-backend-common/api/v1/authorization';
-  if (apiUrl.startsWith('/sxgw')) {
-    apiUrl = apiUrl.substring(4);
-  }
-  DataFunc.post(apiUrl, {
-    ak: that.cameraConfig.ak,
-    sk: that.cameraConfig.sk
-  }, { location: true }).then(res => {
-    console.log("==获取的授权信息==", res);
-    if (res && res.resultValue) {
-      that.cameraConfig.token = res.resultValue.token;
-      // 加载播放器
-      this.$emit("videoLoad", this);
-    }
-  }).catch(error => {
-    console.error("请求失败:", error);
-  });
-},
+      const that = this;
+      let apiUrl = '/uvp-backend-common/api/v1/authorization';
+      if (apiUrl.startsWith('/sxgw')) {
+        apiUrl = apiUrl.substring(4);
+      }
+      DataFunc.post(apiUrl, {
+        ak: that.cameraConfig.ak,
+        sk: that.cameraConfig.sk
+      }, { location: true }).then(res => {
+        console.log("==获取的授权信息==", res);
+        if (res && res.resultValue) {
+          that.cameraConfig.token = res.resultValue.token;
+          // 加载播放器
+          this.$emit("videoLoad", this);
+        }
+      }).catch(error => {
+        console.error("请求失败:", error);
+      });
+    },
 
     //开始播放
     videoPlay(options) {
       const that = this;
-      if(!options || !options.code) {
-        console.log("==设备编码不全,无法播放==");      
+      if (!options || !options.code) {
+        console.log("==设备编码不全,无法播放==");
         return;
       }
-      if(!that.nrUvpVideoObj) {
+      if (!that.nrUvpVideoObj) {
         console.log("==创建播放器==");
         that.nrUvpVideoObj = new UVPVideoObj({
           id: that.clientId,
@@ -160,7 +160,7 @@ export default {
           callback: onEventNotify
         });
       }
-      console.log("==开始播放==>参数集: ",JSON.stringify(options));
+      console.log("==开始播放==>参数集: ", JSON.stringify(options));
       that.nrUvpVideoObj.uvpVideoPlay({
         winNum: options.winNum,
         devCode: options.code,
@@ -171,64 +171,64 @@ export default {
 
     // 云台控制
     videoControl(options) {
-    if (!options?.code) return;
-    // if (!this.nrUvpVideoObj) {
-    //   this.nrUvpVideoObj = new UVPVideoObj({
-    //       id: that.clientId,
-    //       winNum: options.winNum,
-    //       ip: that.cameraConfig.ip,
-    //       port: that.cameraConfig.port,
-    //       token: that.cameraConfig.token,
-    //       ak: that.cameraConfig.ak,
-    //       callback: onEventNotify
-    //   });
-    // }
-     console.log("==进入云台操作==>参数集: ",JSON.stringify(options));
-    this.nrUvpVideoObj.uvpVideoControl({
-      devCode: options.code,
-      cmd: options.control,
-      lspeed: 5,
-      rspeed: 5,
-    });
-  },
+      if (!options?.code) return;
+      // if (!this.nrUvpVideoObj) {
+      //   this.nrUvpVideoObj = new UVPVideoObj({
+      //       id: that.clientId,
+      //       winNum: options.winNum,
+      //       ip: that.cameraConfig.ip,
+      //       port: that.cameraConfig.port,
+      //       token: that.cameraConfig.token,
+      //       ak: that.cameraConfig.ak,
+      //       callback: onEventNotify
+      //   });
+      // }
+      console.log("==进入云台操作==>参数集: ", JSON.stringify(options));
+      this.nrUvpVideoObj.uvpVideoControl({
+        devCode: options.code,
+        cmd: options.control,
+        lspeed: 5,
+        rspeed: 5,
+      });
+    },
 
 
     // 视频截图
-    capture(options){
-       if (!options?.code) return;
-      console.log("==开始截图==>参数集: ",JSON.stringify(options));
+    capture(options) {
+      if (!options?.code) return;
+      console.log("==开始截图==>参数集: ", JSON.stringify(options));
       this.nrUvpVideoObj.uvpCapture({
         winNum: options.winNum,
-        fileName:"",
-        fileType:1
+        fileName: "",
+        fileType: 1
       });
 
     },
     //播放结束
     videoStop(winNum) {
       const that = this;
-      that.nrUvpVideoObj && that.nrUvpVideoObj.uvpVideoClose({winNum});
+      that.nrUvpVideoObj && that.nrUvpVideoObj.uvpVideoClose({ winNum });
     },
     // 生成UUID
-     generateUUID() {
-    var d = new Date().getTime();
-    var d2 = (performance && performance.now && (performance.now()*1000)) || 0;
-    return 'xxxxxxxxxxxx4xxxy'.replace(/[xy]/g, function(c) {
+    generateUUID() {
+      var d = new Date().getTime();
+      var d2 = (performance && performance.now && (performance.now() * 1000)) || 0;
+      return 'xxxxxxxxxxxx4xxxy'.replace(/[xy]/g, function (c) {
         var r = Math.random() * 16;
-        if(d > 0) {
-            r = (d + r)%16 | 0;
-            d = Math.floor(d/16);
+        if (d > 0) {
+          r = (d + r) % 16 | 0;
+          d = Math.floor(d / 16);
         } else {
-            r = (d2 + r)%16 | 0;
-            d2 = Math.floor(d2/16);
+          r = (d2 + r) % 16 | 0;
+          d2 = Math.floor(d2 / 16);
         }
         return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
-    });
-},
+      });
+    },
 
     getCurrentTimestamp() {
-    return new Date().getTime();
-   }
+      return new Date().getTime();
+    }
 
   },
 };

+ 20 - 107
src/views/pad/building/distributionList.vue

@@ -15,7 +15,7 @@
               <div class="table-bot">
                 <div class="table-list" v-for="(item,index) in floorDataList" :key="index">
                   <div class="fir">{{item.number}}</div>
-                  <div class="snd">{{item.name}}</div>
+                  <div class="snd">{{item.deviceName}}</div>
                   <div class="thr">{{item.type}}</div>
                 </div>
               </div>
@@ -27,42 +27,24 @@
 </template>
 
 <script>
-import { getFoodsList } from "@/api/screen/service";
+import { roomLoadDetail } from "@/api/screen/service";
 import pinyin from "../data/pinyin.js";
 
 export default {
   name: "WeekFoods",
   props: {
-    week: {
-      type: String,
-      default: "",
-    },
-    appOrg: {
-      type: String,
-      default: "10001",
-    },
+    power: {  // 保持驼峰命名(在模板中会自动匹配 kebab-case)
+  type: Number ,
+  default: ""  // 默认值改为空字符串
+},
+customParams: {  // 保持驼峰命名(在模板中会自动匹配 kebab-case)
+  type: Number ,
+  default: ""  // 默认值改为空字符串
+}
   },
   data() {
     return {
-      floorDataList: [
-       { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-5', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '-2F北区消防风机总箱' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-      { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-   
-
-     ],
+      floorDataList: [],
       dataList: [],
       weeks: ["周一", "周二", "周三", "周四", "周五"],
       list: [],
@@ -75,91 +57,22 @@ export default {
     };
   },
   created() {
-    this.getFoodsList();
+    this.roomLoadDetail();
   },
   destroyed() {},
   beforeDestroy() {},
   mounted() {},
   methods: {
-    //获取数据概况
-    getFoodsList() {
-      let appOrg = this.$props.appOrg == '0000' ? '10001' : this.$props.appOrg;
-      if(this.appOrgs.indexOf(appOrg) == -1){
-        appOrg = "1J001";
-      }
-      getFoodsList(appOrg).then((res) => {
-        if (Number(res.code) === 200) {
-          let foodsList = JSON.parse(res.data.foodInfo);
-          this.foodsList = foodsList;
-          // 转换后的数据
-    const transformedData = {};
-
-    // 映射关系
-    const dayMap = {"monday": "1","tuesday": "2","wednesday": "3","thursday": "4","friday": "5",};
-    const mealTypeMap = {"breakfast": "1", "lunch": "2", "dinner": "3"};
-
-   // 遍历原始数据并转换
-   for (const day in foodsList) {
-  if (foodsList.hasOwnProperty(day)) {
-    const dayNumber = dayMap[day];
-    transformedData[dayNumber] = [];
-    for (const mealTypeKey in foodsList[day]) { 
-      if (foodsList[day].hasOwnProperty(mealTypeKey)) {
-        const mealTypeNumber = mealTypeMap[mealTypeKey];
-        foodsList[day][mealTypeKey].forEach(meal => {
-          const newDishes = [
-            {"name": meal.name, "type": mealTypeNumber},
-          ];
-          transformedData[dayNumber] = transformedData[dayNumber].concat(newDishes);
-        });
+    //电室重要回路负荷情况明细
+    roomLoadDetail() {
+        roomLoadDetail(this.$props.power,this.customParams).then((res) => {   
+      if (Number(res.code) === 200) {
+        this.floorDataList=res.data;
       }
     }
-  }
-}
-      //console.log('888888888',JSON.parse(JSON.stringify(transformedData)));
-            this.foodsList=JSON.parse(JSON.stringify(transformedData))
-           let index = parseInt(this.weeks.indexOf(this.$props.week)) + 1;
-           let lists =JSON.parse(JSON.stringify(transformedData[index]));
-       
-          this.lists = lists;
-          // let list = foodsList[index];
-          // this.list = list;
-          //区分早中晚
-          let list = [];
-          let type = parseInt(this.foods.indexOf(this.food)) + 1;
-          let that = this;    
-     // 用于存储所有的"name"字段及其对应的餐次编号
-         lists.forEach((item) => {
-            if (item.type == type) {
-              //处理图片
-              // item.img = require('../../../assets/caidanImgs/'+ pinyin.chineseToPinYin(item.name) +'.jpg');
-              that.loadImage(item);
-              list.push(item);
-            }
-          });
-     this.list = list;
-        }
-      });
-    },
- 
-
-    //默认显示暂无菜品
-    errorImg(item) {
-      item.img = require("@/assets/images/main/no-data.jpg");
-    },
-
-    loadImage(item) {
-      try {
-        // 尝试加载图片
-        item.img = require("@/assets/caidanImgs/" +
-          pinyin.chineseToPinYin(item.name) +
-          ".jpg");
-      } catch (e) {
-        // 处理图片不存在的情况
-        item.img = require("@/assets/images/main/no-data.jpg"); // 使用默认图片
-      }
-    },
-
+  );
+  },
+   
 
 
 

+ 18 - 5
src/views/pad/building/energyRate.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="main-data energy-rate-operation">
 <!--    <div class="title-area">能源占比</div>-->
-    <div class="content-area" v-if="flag >= 4">
+    <div class="content-area" v-if="flag >= 5">
       <div class="content-title">
         <span class="title">楼宇本周用电量</span>
       </div>
@@ -174,7 +174,7 @@
                 <div style="width: 50%;">
                   <div class="cFox">
                     <div>
-                      <div class="num" style="justify-content: center;">112<span class="unit">kWh</span></div>
+                      <div class="num" style="justify-content: center;">{{ photovoltaicPowerList.sum }}<span class="unit">kWh</span></div>
                       <div><img src="@/assets/images/service_new/cicleFox.png"></div>
                       <div style="color: #fff;display: flex;justify-content: center;margin-top: 5px;">光伏发电量</div>
                     </div>
@@ -183,12 +183,12 @@
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">薄膜发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.bm }}<span class="unit">kWh</span></div>
                       <div class="name">
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">光伏板发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.gfb }}<span class="unit">kWh</span></div>
                     </div>
 
                   </div>
@@ -254,7 +254,7 @@ import BarChart from "@/components/Echarts/BarChart.vue";
 import echarts from "echarts";
 import {
 
-thisWeekElectricity,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
+thisWeekElectricity,photovoltaicPower,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
 } from "@/api/screen/service";
 
 export default {
@@ -270,6 +270,7 @@ export default {
     return {
       flag: 0,
       thisWeekElectricityList:{},
+      photovoltaicPowerList:{},
       fllEleList:{},
       //楼宇每月用电量
      yearLineData: [],
@@ -296,6 +297,8 @@ export default {
   created() {
     //楼宇本周用电量
     this.thisWeekElectricity()
+    //光伏发电
+    this.photovoltaicPower()
     //电梯能量回收
     this.controlElevator()
          //楼宇今日总用电量
@@ -320,6 +323,16 @@ export default {
         }
       });
     },
+
+      //光伏发电
+      photovoltaicPower() {
+          photovoltaicPower(this.$props.appOrg).then((res) => {
+        if (Number(res.code) === 200) {
+          this.photovoltaicPowerList=res.data;
+          this.flag++
+        }
+      });
+    },
    
       //电梯能量回收
       controlElevator() {

+ 30 - 9
src/views/pad/building/energyRateDialog.vue

@@ -4,7 +4,7 @@
       <img src="@/assets/images/main/cont_title_bg.png" />
       <div class="title">楼宇中控</div>
     </div>
-    <div class="dialog-cont" v-if="flag >= 8">
+    <div class="dialog-cont" v-if="flag >= 9">
       <div class="dialog-left">
         <div class="dialog-list">
           <div class="dialog-item wid100">
@@ -295,7 +295,7 @@
                 <div style="width: 50%;">
                   <div class="cFox">
                     <div>
-                      <div class="num" style="justify-content: center;">112<span class="unit">kWh</span></div>
+                      <div class="num" style="justify-content: center;">{{ photovoltaicPowerList.sum }}<span class="unit">kWh</span></div>
                       <div><img src="@/assets/images/service_new/cicleFox.png"></div>
                       <div style="color: #fff;display: flex;justify-content: center;margin-top: 5px;">光伏发电量</div>
                     </div>
@@ -304,12 +304,12 @@
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">薄膜发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.bm }}<span class="unit">kWh</span></div>
                       <div class="name">
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">光伏板发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.gfb }}<span class="unit">kWh</span></div>
                     </div>
 
                   </div>
@@ -360,8 +360,8 @@
                 <div class="content-title">
                   <span class="title">配电室重要回路负荷情况</span>
                 </div>
-                <div class="content" @click="abnormalClick(2)">
-                  <bar-chart :chart-data="barData" :x-axis="barAxis" :y-axis="barYAxis" :grid="barGrid"
+                <div class="content">
+                  <bar-chart  @chart-click="onBarChartClick" :chart-data="barData" :x-axis="barAxis" :y-axis="barYAxis" :grid="barGrid"
                     :legend="barLegend" y-color="#FFF" l-color="#FFF" width="560px" height="180px" />
                 </div>
               </div>
@@ -607,7 +607,7 @@ import CylinderChart from "@/components/Echarts/cylinderChart.vue";
 import echarts from "echarts";
 import {
 
-  thisWeekElectricity,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
+  thisWeekElectricity,photovoltaicPower,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
 } from "@/api/screen/service";
 
 export default {
@@ -628,6 +628,7 @@ export default {
     return {
       flag: 0,
       thisWeekElectricityList:{},
+      photovoltaicPowerList:{},
       fllEleList:{},
       warnDeviceList:{},
       barWidth: 100,
@@ -742,6 +743,8 @@ export default {
   created() {
     //楼宇本周用电量
     this.thisWeekElectricity()
+    //光伏发电
+    this.photovoltaicPower()
      //电梯能量回收
      this.controlElevator()
     //楼宇每月用电量
@@ -768,6 +771,14 @@ export default {
 
   },
   methods: {
+    
+    onBarChartClick(params) {
+    const xAxisIndex = params.dataIndex;
+    const seriesIndex = params.seriesIndex; 
+    const customXParams = [1, 2, 3, 4, 5][xAxisIndex]; 
+    const customYParams = (seriesIndex + 1); 
+     this.abnormalClick(2,customXParams,customYParams);
+  },
       //资产存量
       thisWeekElectricity() {
         thisWeekElectricity(this.$props.appOrg).then((res) => {
@@ -777,6 +788,16 @@ export default {
         }
       });
     },
+     //光伏发电
+     photovoltaicPower() {
+          photovoltaicPower(this.$props.appOrg).then((res) => {
+        if (Number(res.code) === 200) {
+          this.photovoltaicPowerList=res.data;
+          this.flag++
+        }
+      });
+    },
+    
       //电梯能量回收
       controlElevator() {
           controlElevator(this.$props.appOrg).then((res) => {
@@ -1891,8 +1912,8 @@ export default {
     },
    
     //点击楼宇中当前告警设备列表
-    abnormalClick(e,f) {
-      this.$emit("abnormalClick", e,f);
+    abnormalClick(e,f,g) {
+      this.$emit("abnormalClick", e,f,g);
     },
 
 

+ 6 - 2
src/views/pad/building/main.vue

@@ -508,6 +508,8 @@
         v-if="showType === 3"
           @closeFoods="onCloseFoods"
           :appOrg="appOrg"
+           :power="power"
+           :customParams="customParams"
         >
         </distribution-List>
       </div>
@@ -573,7 +575,8 @@ export default {
       showType:0,//设备列表
       monitorInfo: {},
       monitorName: '',
-      power: '', //当前选择的周日情况
+      power: '', 
+      customParams:''
     };
   },
   created() {
@@ -683,8 +686,9 @@ export default {
     },
 
     //点击列表
-    onAbnormalClick(e,f) {
+    onAbnormalClick(e,f,g) {
         this.power=f
+        this.customParams=g
       this.showCenter = true;
       if (e === 0) {
         this.showType = 1;

+ 1 - 1
src/views/pad/engineering/currentArea.vue

@@ -54,7 +54,7 @@
           <div class="table-top">
             <div class="fir" style="width: 43%">时间</div>
             <div class="snd" style="width: 31%">标题</div>
-            <div class="thd" style="width: 29%">问题状</div>
+            <div class="thd" style="width: 29%">问题状</div>
           </div>
           <div class="table-roll" @click="choose" ref="scrollContainer" style="padding-bottom: 140px">
             <div class="table-bot">

+ 1 - 1
src/views/pad/logistics/assets/codeBillDialog.vue

@@ -834,7 +834,7 @@ export default {
         if (Number(res.code) === 200) {
           this.pieData= [
         { value: res.data.buildingAssetNum, name: "楼宇资产", itemStyle: {color:'#FEB948'} },
-        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#242CC4'}},
+        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#2F82FE'}},
         { value: res.data.serviceAssetNum, name: "服务资产" , itemStyle: {color:'#01F6EC'}},
       ]
         }

+ 1 - 1
src/views/pad/logistics/logisticsAssets.vue

@@ -466,7 +466,7 @@ export default {
         if (Number(res.code) === 200) {
           this.pieData= [
         { value: res.data.buildingAssetNum, name: "楼宇资产", itemStyle: {color:'#FEB948'} },
-        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#242CC4'}},
+        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#2F82FE'}},
         { value: res.data.serviceAssetNum, name: "服务资产" , itemStyle: {color:'#01F6EC'}},
       ]
         }

+ 31 - 11
src/views/pad/map/map.vue

@@ -55,17 +55,17 @@ export default {
         { name: "吕梁市", appOrg: "1J001" }
       ],
       points: [
-        { name: "太原市", coordinate: [112.4493, 37.8570], appOrg: "1A003", x: "1", y: "2" },
+        { name: "太原市", coordinate: [111.8493, 37.9570], appOrg: "1A003", x: "1", y: "2" },
         { name: "大同市", coordinate: [113.3002, 40.0768], appOrg: "1B001", x: "1", y: "2" },
-        { name: "阳泉市", coordinate: [113.5805, 37.8563], appOrg: "1C001", x: "1", y: "2" },
-        { name: "长治市", coordinate: [113.1163, 36.1954], appOrg: "1D001", x: "1", y: "2" },
-        { name: "晋城市", coordinate: [112.8513, 35.4907], appOrg: "1E001", x: "1", y: "2" },
-        { name: "朔州市", coordinate: [112.4329, 39.3312], appOrg: "1F001", x: "1", y: "2" },
-        { name: "晋中市", coordinate: [112.8527, 37.6870], appOrg: "1K001", x: "1", y: "2" },
-        { name: "临汾市", coordinate: [111.5186, 36.0882], appOrg: "1L001", x: "1", y: "2" },
-        { name: "忻州市", coordinate: [112.7341, 38.4167], appOrg: "1H001", x: "1", y: "2" },
-        { name: "运城市", coordinate: [111.0069, 35.0264], appOrg: "1M001", x: "1", y: "2" },
-        { name: "吕梁市", coordinate: [111.1443, 37.5183], appOrg: "1J001", x: "1", y: "2" }
+        { name: "阳泉市", coordinate: [113.3805, 38.3563], appOrg: "1C001", x: "1", y: "2" },
+        { name: "长治市", coordinate: [113.1163, 36.6254], appOrg: "1D001", x: "1", y: "2" },
+        { name: "晋城市", coordinate: [112.2113, 35.4007], appOrg: "1E001", x: "1", y: "2" },
+        { name: "朔州市", coordinate: [112.4329, 39.6312], appOrg: "1F001", x: "1", y: "2" },
+        { name: "晋中市", coordinate: [113.3827, 37.1870], appOrg: "1K001", x: "1", y: "2" },
+        { name: "临汾市", coordinate: [111.1286, 36.2582], appOrg: "1L001", x: "1", y: "2" },
+        { name: "忻州市", coordinate: [112.7341, 38.3167], appOrg: "1H001", x: "1", y: "2" },
+        { name: "运城市", coordinate: [111.0069, 35.4264], appOrg: "1M001", x: "1", y: "2" },
+        { name: "吕梁市", coordinate: [111.1443, 37.1183], appOrg: "1J001", x: "1", y: "2" }
       ],
       appOrg: "10001",
       showBack: false,
@@ -164,7 +164,7 @@ export default {
               show: true, // 显示区域名称
               color: "#FFF", // 文字颜色
               fontSize: 16, // 文字大小
-              fontWeight: 600, // 字重
+              fontWeight: 300, // 字重
               emphasis: { color: "#fff" }, // 悬浮时的文字颜色
             },
             data: this.area
@@ -175,6 +175,26 @@ export default {
             coordinateSystem: "geo", // 使用 `geo` 作为坐标系
             symbol: "image://" + require("@/assets/zhang/myMap/projectPosition.png"), // 自定义标记(图片)
             symbolSize: [30, 20], // 标记大小(宽 30,高 20)
+            label: {
+              show: true, // 直接显示数值
+              position: 'top',
+              formatter: (params) => // 格式化提示框内容
+                params.seriesType === "scatter"
+                  ? `{myStyle|在建:${params.data.x}}\n{myStyle|施工:${params.data.y}}`
+                  : params.name,
+              rich:{
+                myStyle: {
+                  color: "#fff", // 文字颜色
+                  fontSize: 12, // 字体大小
+                  lineHeight: 18
+                }
+              },
+              borderColor: "rgba(56,236,250)", // 边框颜色
+              backgroundColor: "#0E7884",
+              borderWidth: 1,
+              padding: [4, 5], // 文字内边距(可选)
+              borderRadius: 2, // 文字框圆角(可选)
+            },
             data: this.points.map(({ name, coordinate, appOrg, x, y }) => ({
               name, // 点名称
               value: coordinate, // 经纬度坐标

+ 2 - 1
src/views/pad/map/mapTwo.vue

@@ -208,7 +208,8 @@ export default {
           charts.dispose();
           // 重新初始化并设置新的配置项
           this.$nextTick(() => {
-            this.initChildren(params.name) // 重新初始化图表
+           // this.initChildren(params.name) // 重新初始化图表
+           this.initCharts();
             this.showBack = true
           });
         }

+ 20 - 107
src/views/screen/building/distributionList.vue

@@ -15,7 +15,7 @@
                 <div class="table-bot">
                   <div class="table-list" v-for="(item,index) in floorDataList" :key="index">
                     <div class="fir">{{item.number}}</div>
-                    <div class="snd">{{item.name}}</div>
+                    <div class="snd">{{item.deviceName}}</div>
                     <div class="thr">{{item.type}}</div>
                   </div>
                 </div>
@@ -27,42 +27,24 @@
   </template>
   
   <script>
-  import { getFoodsList } from "@/api/screen/service";
+  import { roomLoadDetail } from "@/api/screen/service";
   import pinyin from "../data/pinyin.js";
   
   export default {
     name: "WeekFoods",
     props: {
-      week: {
-        type: String,
-        default: "",
-      },
-      appOrg: {
-        type: String,
-        default: "10001",
-      },
+      power: {  // 保持驼峰命名(在模板中会自动匹配 kebab-case)
+    type: Number ,
+    default: ""  // 默认值改为空字符串
+  },
+  customParams: {  // 保持驼峰命名(在模板中会自动匹配 kebab-case)
+    type: Number ,
+    default: ""  // 默认值改为空字符串
+  }
     },
     data() {
       return {
-        floorDataList: [
-         { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-5', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '-2F北区消防风机总箱' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-        { number: '1# 1-3', name: '消火栓泵' ,type:'消防'},
-     
-  
-       ],
+        floorDataList: [],
         dataList: [],
         weeks: ["周一", "周二", "周三", "周四", "周五"],
         list: [],
@@ -75,91 +57,22 @@
       };
     },
     created() {
-      this.getFoodsList();
+      this.roomLoadDetail();
     },
     destroyed() {},
     beforeDestroy() {},
     mounted() {},
     methods: {
-      //获取数据概况
-      getFoodsList() {
-        let appOrg = this.$props.appOrg == '0000' ? '10001' : this.$props.appOrg;
-        if(this.appOrgs.indexOf(appOrg) == -1){
-          appOrg = "1J001";
-        }
-        getFoodsList(appOrg).then((res) => {
-          if (Number(res.code) === 200) {
-            let foodsList = JSON.parse(res.data.foodInfo);
-            this.foodsList = foodsList;
-            // 转换后的数据
-      const transformedData = {};
-  
-      // 映射关系
-      const dayMap = {"monday": "1","tuesday": "2","wednesday": "3","thursday": "4","friday": "5",};
-      const mealTypeMap = {"breakfast": "1", "lunch": "2", "dinner": "3"};
-  
-     // 遍历原始数据并转换
-     for (const day in foodsList) {
-    if (foodsList.hasOwnProperty(day)) {
-      const dayNumber = dayMap[day];
-      transformedData[dayNumber] = [];
-      for (const mealTypeKey in foodsList[day]) { 
-        if (foodsList[day].hasOwnProperty(mealTypeKey)) {
-          const mealTypeNumber = mealTypeMap[mealTypeKey];
-          foodsList[day][mealTypeKey].forEach(meal => {
-            const newDishes = [
-              {"name": meal.name, "type": mealTypeNumber},
-            ];
-            transformedData[dayNumber] = transformedData[dayNumber].concat(newDishes);
-          });
+      //电室重要回路负荷情况明细
+      roomLoadDetail() {
+          roomLoadDetail(this.$props.power,this.customParams).then((res) => {   
+        if (Number(res.code) === 200) {
+          this.floorDataList=res.data;
         }
       }
-    }
-  }
-        //console.log('888888888',JSON.parse(JSON.stringify(transformedData)));
-              this.foodsList=JSON.parse(JSON.stringify(transformedData))
-             let index = parseInt(this.weeks.indexOf(this.$props.week)) + 1;
-             let lists =JSON.parse(JSON.stringify(transformedData[index]));
-         
-            this.lists = lists;
-            // let list = foodsList[index];
-            // this.list = list;
-            //区分早中晚
-            let list = [];
-            let type = parseInt(this.foods.indexOf(this.food)) + 1;
-            let that = this;    
-       // 用于存储所有的"name"字段及其对应的餐次编号
-           lists.forEach((item) => {
-              if (item.type == type) {
-                //处理图片
-                // item.img = require('../../../assets/caidanImgs/'+ pinyin.chineseToPinYin(item.name) +'.jpg');
-                that.loadImage(item);
-                list.push(item);
-              }
-            });
-       this.list = list;
-          }
-        });
-      },
-   
-  
-      //默认显示暂无菜品
-      errorImg(item) {
-        item.img = require("@/assets/images/main/no-data.jpg");
-      },
-  
-      loadImage(item) {
-        try {
-          // 尝试加载图片
-          item.img = require("@/assets/caidanImgs/" +
-            pinyin.chineseToPinYin(item.name) +
-            ".jpg");
-        } catch (e) {
-          // 处理图片不存在的情况
-          item.img = require("@/assets/images/main/no-data.jpg"); // 使用默认图片
-        }
-      },
-  
+    );
+    },
+     
   
   
   

+ 18 - 5
src/views/screen/building/energyRate.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="main-data energy-rate-operation">
 <!--    <div class="title-area">能源占比</div>-->
-    <div class="content-area" v-if="flag >= 4">
+    <div class="content-area" v-if="flag >= 5">
       <div class="content-title">
         <span class="title">楼宇本周用电量</span>
       </div>
@@ -174,7 +174,7 @@
                 <div style="width: 50%;">
                   <div class="cFox">
                     <div>
-                      <div class="num" style="justify-content: center;">112<span class="unit">kWh</span></div>
+                      <div class="num" style="justify-content: center;">{{ photovoltaicPowerList.sum }}<span class="unit">kWh</span></div>
                       <div><img src="@/assets/images/service_new/cicleFox.png"></div>
                       <div style="color: #fff;display: flex;justify-content: center;margin-top: 5px;">光伏发电量</div>
                     </div>
@@ -183,12 +183,12 @@
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">薄膜发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.bm }}<span class="unit">kWh</span></div>
                       <div class="name">
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">光伏板发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.gfb }}<span class="unit">kWh</span></div>
                     </div>
 
                   </div>
@@ -253,7 +253,7 @@ import BarChart from "@/components/Echarts/BarChart.vue";
 import echarts from "echarts";
 import {
 
-thisWeekElectricity,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
+thisWeekElectricity,photovoltaicPower,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
 } from "@/api/screen/service";
 
 export default {
@@ -269,6 +269,7 @@ export default {
     return {
       flag: 0,
       thisWeekElectricityList:{},
+      photovoltaicPowerList:{},
       fllEleList:{},
       //楼宇每月用电量
      yearLineData: [],
@@ -295,6 +296,8 @@ export default {
   created() {
     //楼宇本周用电量
     this.thisWeekElectricity()
+    //光伏发电
+    this.photovoltaicPower()
     //电梯能量回收
     this.controlElevator()
     
@@ -320,6 +323,16 @@ export default {
         }
       });
     },
+        //光伏发电
+        photovoltaicPower() {
+          photovoltaicPower(this.$props.appOrg).then((res) => {
+        if (Number(res.code) === 200) {
+          this.photovoltaicPowerList=res.data;
+          this.flag++
+        }
+      });
+    },
+
     
          //电梯能量回收
          controlElevator() {

+ 29 - 10
src/views/screen/building/energyRateDialog.vue

@@ -4,7 +4,7 @@
       <img src="@/assets/images/main/cont_title_bg.png" />
       <div class="title">楼宇中控</div>
     </div>
-    <div class="dialog-cont" v-if="flag >= 8">
+    <div class="dialog-cont" v-if="flag >= 9">
       <div class="dialog-left">
         <div class="dialog-list">
           <div class="dialog-item wid100">
@@ -295,7 +295,7 @@
                 <div style="width: 50%;">
                   <div class="cFox">
                     <div>
-                      <div class="num" style="justify-content: center;">112<span class="unit">kWh</span></div>
+                      <div class="num" style="justify-content: center;">{{ photovoltaicPowerList.sum }}<span class="unit">kWh</span></div>
                       <div><img src="@/assets/images/service_new/cicleFox.png"></div>
                       <div style="color: #fff;display: flex;justify-content: center;margin-top: 5px;">光伏发电量</div>
                     </div>
@@ -304,12 +304,12 @@
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">薄膜发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.bm }}<span class="unit">kWh</span></div>
                       <div class="name">
                         <div> <img src="@/assets/images/service_new/quantity.png"></div>
                         <div style="padding-left: 5px;">光伏板发电量</div>
                       </div>
-                      <div class="num">29<span class="unit">kWh</span></div>
+                      <div class="num">{{ photovoltaicPowerList.gfb }}<span class="unit">kWh</span></div>
                     </div>
 
                   </div>
@@ -360,8 +360,8 @@
                 <div class="content-title">
                   <span class="title">配电室重要回路负荷情况</span>
                 </div>
-                <div class="content" @click="abnormalClick(2)">
-                  <bar-chart :chart-data="barData" :x-axis="barAxis" :y-axis="barYAxis" :grid="barGrid"
+                <div class="content">
+                  <bar-chart  @chart-click="onBarChartClick" :chart-data="barData" :x-axis="barAxis" :y-axis="barYAxis" :grid="barGrid"
                     :legend="barLegend" y-color="#FFF" l-color="#FFF" width="560px" height="180px" />
                 </div>
               </div>
@@ -606,7 +606,7 @@ import CylinderChart from "@/components/Echarts/cylinderChart.vue";
 import echarts from "echarts";
 import {
 
-  thisWeekElectricity,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
+  thisWeekElectricity,photovoltaicPower,controlElevator,todayElectricity,monthElectricity,roomLoad,warnDevice,warnEvent,waterState
 } from "@/api/screen/service";
 
 export default {
@@ -627,6 +627,7 @@ export default {
     return {
       flag: 0,
       thisWeekElectricityList:{},
+      photovoltaicPowerList:{},
       fllEleList:{},
       warnDeviceList:{},
       barWidth: 100,
@@ -741,6 +742,8 @@ export default {
   created() {
     //楼宇本周用电量
     this.thisWeekElectricity()
+     //光伏发电
+     this.photovoltaicPower()
      //电梯能量回收
      this.controlElevator()
     //楼宇每月用电量
@@ -767,6 +770,13 @@ export default {
 
   },
   methods: {
+    onBarChartClick(params) {
+    const xAxisIndex = params.dataIndex;
+    const seriesIndex = params.seriesIndex; 
+    const customXParams = [1, 2, 3, 4, 5][xAxisIndex]; 
+    const customYParams = (seriesIndex + 1); 
+     this.abnormalClick(2,customXParams,customYParams);
+  },
       //资产存量
       thisWeekElectricity() {
         thisWeekElectricity(this.$props.appOrg).then((res) => {
@@ -776,6 +786,16 @@ export default {
         }
       });
     },
+      //光伏发电
+      photovoltaicPower() {
+          photovoltaicPower(this.$props.appOrg).then((res) => {
+        if (Number(res.code) === 200) {
+          this.photovoltaicPowerList=res.data;
+          this.flag++
+        }
+      });
+    },
+    
        //电梯能量回收
        controlElevator() {
           controlElevator(this.$props.appOrg).then((res) => {
@@ -829,7 +849,6 @@ export default {
             }
           });
         
-          console.log('======================',this.waterTankSecond.dqsx);
           
       this.waterData = [
         
@@ -1889,8 +1908,8 @@ export default {
     },
    
     //点击楼宇中当前告警设备列表
-    abnormalClick(e,f) {
-      this.$emit("abnormalClick", e,f);
+    abnormalClick(e,f,g) {
+      this.$emit("abnormalClick", e,f,g);
     },
 
 

+ 6 - 2
src/views/screen/building/main.vue

@@ -508,6 +508,8 @@
         v-if="showType === 3"
           @closeFoods="onCloseFoods"
           :appOrg="appOrg"
+           :power="power"
+           :customParams="customParams"
         >
         </distribution-List>
       </div>
@@ -573,7 +575,8 @@ export default {
       showType:0,//设备列表
       monitorInfo: {},
       monitorName: '',
-      power: '', //当前选择的周日情况
+      power: '', 
+      customParams:''
     };
   },
   created() {
@@ -683,8 +686,9 @@ export default {
     },
 
     //点击列表
-    onAbnormalClick(e,f) {
+    onAbnormalClick(e,f,g) {
         this.power=f
+        this.customParams=g
       this.showCenter = true;
       if (e === 0) {
         this.showType = 1;

+ 1 - 1
src/views/screen/engineering/currentArea.vue

@@ -54,7 +54,7 @@
           <div class="table-top">
             <div class="fir" style="width: 43%">时间</div>
             <div class="snd" style="width: 31%">标题</div>
-            <div class="thd" style="width: 29%">问题状</div>
+            <div class="thd" style="width: 29%">问题状</div>
           </div>
           <div class="table-roll" @click="choose" ref="scrollContainer" style="padding-bottom: 140px">
             <div class="table-bot">

+ 1 - 1
src/views/screen/logistics/assets/codeBillDialog.vue

@@ -834,7 +834,7 @@ export default {
         if (Number(res.code) === 200) {
           this.pieData= [
         { value: res.data.buildingAssetNum, name: "楼宇资产", itemStyle: {color:'#FEB948'} },
-        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#242CC4'}},
+        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#2F82FE'}},
         { value: res.data.serviceAssetNum, name: "服务资产" , itemStyle: {color:'#01F6EC'}},
       ]
         }

+ 1 - 1
src/views/screen/logistics/logisticsAssets.vue

@@ -466,7 +466,7 @@ export default {
         if (Number(res.code) === 200) {
           this.pieData= [
         { value: res.data.buildingAssetNum, name: "楼宇资产", itemStyle: {color:'#FEB948'} },
-        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#242CC4'}},
+        { value: res.data.officeAssetNum, name: "办公资产" , itemStyle: {color:'#2F82FE'}},
         { value: res.data.serviceAssetNum, name: "服务资产" , itemStyle: {color:'#01F6EC'}},
       ]
         }

+ 2 - 1
src/views/screen/map/mapTwo.vue

@@ -208,7 +208,8 @@ export default {
           charts.dispose();
           // 重新初始化并设置新的配置项
           this.$nextTick(() => {
-            this.initChildren(params.name) // 重新初始化图表
+            // this.initChildren(params.name) // 重新初始化图表
+            this.initCharts();
             this.showBack = true
           });
         }