فهرست منبع

修改光伏升压站,完善首页公司列表,提交智慧检修powercurve页面

baiyanting 1 سال پیش
والد
کامیت
7427e34771

+ 11 - 4
src/components/headerNav/index.vue

@@ -65,6 +65,7 @@ export default {
       default: "",
     },
     companyid: { type: String, default: "SXJ_RGN" },
+    currents: { type: Number, default: 0 },
   },
   components: { SvgIcon },
   data() {
@@ -113,7 +114,7 @@ export default {
     wpId: {
       handler(val) {
         let region = this.regionList.find((item) => item.key == val);
-        if ((val && region) || this.isAll) {
+        if ((val && (region || this.currents == 1)) || this.isAll) {
           this.getOrganizationList();
         }
       },
@@ -122,9 +123,15 @@ export default {
   },
   methods: {
     getOrganizationList() {
-      headerCompany({ regionid: this.wpId || "" }).then(({ data }) => {
-        this.childNode = data.data;
-      });
+      if (this.currents == 1 && this.wpId.includes("SXJ")) {
+        headerCompany({ regionid: "SXJ_RGN" }).then(({ data }) => {
+          this.childNode = data.data;
+        });
+      } else {
+        headerCompany({ regionid: this.wpId }).then(({ data }) => {
+          this.childNode = data.data;
+        });
+      }
     },
     handleClickEnterprise(enterprise, name) {
       this.companyName = name;

+ 1 - 0
src/views/Home/components/map.vue

@@ -3,6 +3,7 @@
     <HeaderNav
       ref="header"
       :wpId="wpId"
+      :currents="currents"
       @firstRender="firstRender"
       @typeFlag="typeFlag"
       :isShows="false"

+ 20 - 41
src/views/powerCurve/index.vue

@@ -38,7 +38,7 @@
                 v-for="item in wtArray"
                 :key="item.id"
                 :value="item.id"
-                :label="item.name"
+                :label="item.nemCode"
               />
             </el-select>
           </div>
@@ -115,57 +115,36 @@ export default {
   methods: {
     // 获取风场
     getWp(reGetWp) {
-      api1.benchmarkingWplist({}).then((res) => {
-        this.wpArray = res.data;
-        this.wpId = res.data[0].id;
-        this.getWt(this.wpId, reGetWp);
-      });
-
-      // let that = this;
-      // that.API.requestData({
-      //   method: "GET",
-      //   subUrl: "powercompare/windfarmAjax",
-      //   success(res) {
-      //     that.wpArray = res.data;
-      //     that.wpId = res.data[0].id;
-      //     that.getWt(that.wpId, reGetWp);
-      //   },
-      // });
+      api1
+        .getWpList({
+          type: "-1",
+        })
+        .then((res) => {
+          if (res.data.code === 200) {
+            this.wpArray = res.data.data;
+            this.wpId = res.data.data[0].id;
+            this.getWt(this.wpId, reGetWp);
+          }
+        });
     },
 
     // 获取风机
     getWt(wpid, reGetWp) {
-      if (this.wpId) {
+      if (wpid) {
         api1
-          .powercompareWindturbineAjax({
+          .getWtList({
             wpId: wpid,
           })
           .then((res) => {
-            this.wtArray = res.data;
-            this.wtId = res.data[0].id;
-            if (!reGetWp) {
-              this.getChartData();
+            if (res.code === 200) {
+              this.wtArray = res.data;
+              this.wtId = res.data[0].id;
+              if (!reGetWp) {
+                this.getChartData();
+              }
             }
           });
       }
-
-      // let that = this;
-
-      // that.API.requestData({
-      //   method: "GET",
-      //   baseURL: "http://10.155.32.4:9001",
-      //   subUrl: "benchmarking/wtList",
-      //   data: {
-      //     wpid,
-      //   },
-      //   success(res) {
-      //     that.wtArray = res.data;
-      //     that.wtId = res.data[0].id;
-      //     if (!reGetWp) {
-      //       that.getChartData();
-      //     }
-      //   },
-      // });
     },
 
     // 获取图表数据

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 10048 - 12791
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/fangshansunjiashan.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 12661 - 14688
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/fanshijunfan.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 9646 - 13346
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/huairenchuchen.vue


+ 51 - 54
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/previewPicture.vue

@@ -96,13 +96,13 @@ export default {
       isChange: true,
       // 图片显示默认大小
       width: "1600px",
-      height: "800px",
+      height: "0",
       // 可缩小倍数,为空则可无限缩小
       minification: 3,
       // 可放大倍数 为空则可无限放大
       magnification: "",
-      bigMaxWidth: 1600,
-      bigMaxHeight: 800,
+      bigMaxWidth: 1100,
+      bigMaxHeight: 1200,
 
       // 小图标信息
       iconImgUrl: "",
@@ -127,7 +127,7 @@ export default {
       arr,
       num = 0
     ) {
-      var img = new Image();
+      let img = new Image();
 
       // img.src = imgUrl;
       img = document.getElementsByClassName("svg");
@@ -222,15 +222,15 @@ export default {
     },
     // 缩放
     rollImg() {
-      var that = this;
-      // var oImg = document.getElementsByClassName("movableItem")[0];
-      var oImg = this.$refs.bigImage;
+      let that = this;
+      // let oImg = document.getElementsByClassName("movableItem")[0];
+      let oImg = this.$refs.bigImage;
       // console.log(
       // 	"length",
       // 	document.getElementsByClassName("movableItem").length
       // );
       // console.log("oImg", oImg);
-      var _this = this;
+      let _this = this;
 
       function fnWheel(obj, fncc) {
         obj.onmousewheel = fn;
@@ -239,8 +239,8 @@ export default {
         }
 
         function fn(ev) {
-          var oEvent = ev || window.event;
-          var down = true;
+          let oEvent = ev || window.event;
+          let down = true;
           if (oEvent.detail) {
             down = oEvent.detail > 0;
           } else {
@@ -256,17 +256,19 @@ export default {
         }
       }
       fnWheel(oImg, function (down, oEvent) {
-        var oldWidth = this.offsetWidth;
-        var oldHeight = this.offsetHeight;
-        var oldLeft = this.offsetLeft;
-        var oldTop = this.offsetTop;
-        var parent = oEvent.path[2];
+        let oldWidth = this.offsetWidth;
+        let oldHeight = this.offsetHeight;
+        let oldLeft = this.offsetLeft;
+        let oldTop = this.offsetTop;
+        // let parent = oEvent.path[2];
         // 获取父元素距离页面可视区域的位置
-        var parentLeft = parent.getBoundingClientRect().left;
-        var parentTop = parent.getBoundingClientRect().top;
+        // let parentLeft = parent.getBoundingClientRect().left;
+        // let parentTop = parent.getBoundingClientRect().top;
+        let parentLeft = oEvent.clientX;
+        let parentTop = oEvent.clientY;
         // 比例 = (点击位置距离可视窗口位置 - 父元素距离可视窗口位置 - 相对定位的left)/ 本身宽度
-        var scaleX = (oEvent.clientX - parentLeft - oldLeft) / oldWidth; //比例
-        var scaleY = (oEvent.clientY - parentTop - oldTop) / oldHeight;
+        let scaleX = (oEvent.clientX - parentLeft - oldLeft) / oldWidth; //比例
+        let scaleY = (oEvent.clientY - parentTop - oldTop) / oldHeight;
 
         let nowWidth = this.style.width.split("p")[0];
         let initWidth = _this.width.split("p")[0];
@@ -314,8 +316,8 @@ export default {
           that.width = parseInt(this.offsetWidth * 1.1) + "px";
           that.height = parseInt(this.offsetHeight * 1.1) + "px";
         }
-        var newWidth = this.offsetWidth;
-        var newHeight = this.offsetHeight;
+        let newWidth = this.offsetWidth;
+        let newHeight = this.offsetHeight;
 
         // 新的相对位置left = 原先的相对位置left - 比例 *(本身新的宽度-旧的宽度)
         this.style.left =
@@ -328,12 +330,12 @@ export default {
     // },
     //拖拽
     drag(ev) {
-      // var ie = document.all;
-      var nn6 = document.getElementById && !document.all;
-      var isdrag = false;
-      var y, x;
-      var nTY, nTX;
-      var oDragObj;
+      // let ie = document.all;
+      let nn6 = document.getElementById && !document.all;
+      let isdrag = false;
+      let y, x;
+      let nTY, nTX;
+      let oDragObj;
 
       function moveMouse(e) {
         if (isdrag) {
@@ -347,8 +349,8 @@ export default {
 
       function initDrag(e) {
         // console.log("点击图片initDrag");
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className != "movableItem"
@@ -361,8 +363,10 @@ export default {
           isdrag = true;
           oDragObj = oDragHandle;
           // 父元素宽高
-          let width = e.path[2].offsetWidth;
-          let height = e.path[2].offsetHeight;
+          // let width = e.path[2].offsetWidth;
+          // let height = e.path[2].offsetHeight;
+          let width = e.offsetX;
+          let height = e.offsetY;
           // 这里判断第一次获取不到style 样式 默认为 居中50%
           if (oDragObj.style.top == "") {
             nTY = 0;
@@ -384,8 +388,8 @@ export default {
         isdrag = false;
         document.onmousemove = null;
         document.onmouseup = null;
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className != "movableItem"
@@ -405,13 +409,13 @@ export default {
       // window.event ? (window.event.cancelBubble = true) : ev.stopPropagation();
     },
     // 拖拽标记
-    // eslint-disable-next-line no-unused-vars
+    // eslint-disable-next-line no-unused-lets
     dragSign(ev, key) {
-      var nn6 = document.getElementById && !document.all;
-      var isdrag = false;
-      var y, x;
-      var nTY, nTX;
-      var oDragObj;
+      let nn6 = document.getElementById && !document.all;
+      let isdrag = false;
+      let y, x;
+      let nTY, nTX;
+      let oDragObj;
       let _this = this;
 
       function moveMouse(e) {
@@ -422,7 +426,7 @@ export default {
           let widthItem = e.path[1].style.width.split("p");
           let heightItem = e.path[1].style.height.split("p");
           let width = widthItem[0];
-          // eslint-disable-next-line no-unused-vars
+          // eslint-disable-next-line no-unused-lets
           let height = heightItem[0];
           let top =
             ((nn6
@@ -450,8 +454,8 @@ export default {
       // eslint-disable-next-line no-unused-vars
       function initDrag(e) {
         // console.log("_this", _this);
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className.indexOf("equipment") == -1
@@ -496,8 +500,8 @@ export default {
         isdrag = false;
         document.onmousemove = null;
         document.onmouseup = null;
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className != "equipment"
@@ -642,7 +646,7 @@ export default {
 <style lang="less" scoped>
 .pop-up-main {
   width: 100%;
-  height: calc(100vh - 12vh);
+  height: calc(100vh - 13vh);
   overflow-y: hidden;
 
   .paln-box {
@@ -654,7 +658,7 @@ export default {
       position: absolute;
       // top: 75%;
       left: 50%;
-      transform: translate(-50%, 0%);
+      transform: translate(-50%, -15%);
 
       img,
       .svg {
@@ -693,7 +697,7 @@ export default {
       color: white;
     }
 
-    .el-button {
+    &/deep/.el-button {
       z-index: 2;
       position: absolute;
       bottom: 60px;
@@ -719,11 +723,4 @@ export default {
     }
   }
 }
-
-// body {
-// 		height: 100%;
-// 		overflow: hidden;
-// 		margin: 0;
-// 		padding: 0;
-// 	}
 </style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 22872 - 21780
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/shanyinrongxing.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 11890 - 13636
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/tunliuwuyuan.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 22342 - 22190
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/yanggao.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 37620 - 35378
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/yingxianjinghui.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 11783 - 12258
src/views/stateMonitor/factoryMonitor/photovoltaic/lightBoosterStation/components/youyuyouwei.vue


+ 51 - 54
src/views/stateMonitor/factoryMonitor/windPowerPlant/boosterStation/components/previewPicture.vue

@@ -96,13 +96,13 @@ export default {
       isChange: true,
       // 图片显示默认大小
       width: "1600px",
-      height: "800px",
+      height: "0",
       // 可缩小倍数,为空则可无限缩小
       minification: 3,
       // 可放大倍数 为空则可无限放大
       magnification: "",
-      bigMaxWidth: 1600,
-      bigMaxHeight: 800,
+      bigMaxWidth: 1100,
+      bigMaxHeight: 1200,
 
       // 小图标信息
       iconImgUrl: "",
@@ -127,7 +127,7 @@ export default {
       arr,
       num = 0
     ) {
-      var img = new Image();
+      let img = new Image();
 
       // img.src = imgUrl;
       img = document.getElementsByClassName("svg");
@@ -222,15 +222,15 @@ export default {
     },
     // 缩放
     rollImg() {
-      var that = this;
-      // var oImg = document.getElementsByClassName("movableItem")[0];
-      var oImg = this.$refs.bigImage;
+      let that = this;
+      // let oImg = document.getElementsByClassName("movableItem")[0];
+      let oImg = this.$refs.bigImage;
       // console.log(
       // 	"length",
       // 	document.getElementsByClassName("movableItem").length
       // );
       // console.log("oImg", oImg);
-      var _this = this;
+      let _this = this;
 
       function fnWheel(obj, fncc) {
         obj.onmousewheel = fn;
@@ -239,8 +239,8 @@ export default {
         }
 
         function fn(ev) {
-          var oEvent = ev || window.event;
-          var down = true;
+          let oEvent = ev || window.event;
+          let down = true;
           if (oEvent.detail) {
             down = oEvent.detail > 0;
           } else {
@@ -256,17 +256,19 @@ export default {
         }
       }
       fnWheel(oImg, function (down, oEvent) {
-        var oldWidth = this.offsetWidth;
-        var oldHeight = this.offsetHeight;
-        var oldLeft = this.offsetLeft;
-        var oldTop = this.offsetTop;
-        var parent = oEvent.path[2];
+        let oldWidth = this.offsetWidth;
+        let oldHeight = this.offsetHeight;
+        let oldLeft = this.offsetLeft;
+        let oldTop = this.offsetTop;
+        // let parent = oEvent.path[2];
         // 获取父元素距离页面可视区域的位置
-        var parentLeft = parent.getBoundingClientRect().left;
-        var parentTop = parent.getBoundingClientRect().top;
+        // let parentLeft = parent.getBoundingClientRect().left;
+        // let parentTop = parent.getBoundingClientRect().top;
+        let parentLeft = oEvent.clientX;
+        let parentTop = oEvent.clientY;
         // 比例 = (点击位置距离可视窗口位置 - 父元素距离可视窗口位置 - 相对定位的left)/ 本身宽度
-        var scaleX = (oEvent.clientX - parentLeft - oldLeft) / oldWidth; //比例
-        var scaleY = (oEvent.clientY - parentTop - oldTop) / oldHeight;
+        let scaleX = (oEvent.clientX - parentLeft - oldLeft) / oldWidth; //比例
+        let scaleY = (oEvent.clientY - parentTop - oldTop) / oldHeight;
 
         let nowWidth = this.style.width.split("p")[0];
         let initWidth = _this.width.split("p")[0];
@@ -314,8 +316,8 @@ export default {
           that.width = parseInt(this.offsetWidth * 1.1) + "px";
           that.height = parseInt(this.offsetHeight * 1.1) + "px";
         }
-        var newWidth = this.offsetWidth;
-        var newHeight = this.offsetHeight;
+        let newWidth = this.offsetWidth;
+        let newHeight = this.offsetHeight;
 
         // 新的相对位置left = 原先的相对位置left - 比例 *(本身新的宽度-旧的宽度)
         this.style.left =
@@ -328,12 +330,12 @@ export default {
     // },
     //拖拽
     drag(ev) {
-      // var ie = document.all;
-      var nn6 = document.getElementById && !document.all;
-      var isdrag = false;
-      var y, x;
-      var nTY, nTX;
-      var oDragObj;
+      // let ie = document.all;
+      let nn6 = document.getElementById && !document.all;
+      let isdrag = false;
+      let y, x;
+      let nTY, nTX;
+      let oDragObj;
 
       function moveMouse(e) {
         if (isdrag) {
@@ -347,8 +349,8 @@ export default {
 
       function initDrag(e) {
         // console.log("点击图片initDrag");
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className != "movableItem"
@@ -361,8 +363,10 @@ export default {
           isdrag = true;
           oDragObj = oDragHandle;
           // 父元素宽高
-          let width = e.path[2].offsetWidth;
-          let height = e.path[2].offsetHeight;
+          // let width = e.path[2].offsetWidth;
+          // let height = e.path[2].offsetHeight;
+          let width = e.offsetX;
+          let height = e.offsetY;
           // 这里判断第一次获取不到style 样式 默认为 居中50%
           if (oDragObj.style.top == "") {
             nTY = 0;
@@ -384,8 +388,8 @@ export default {
         isdrag = false;
         document.onmousemove = null;
         document.onmouseup = null;
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className != "movableItem"
@@ -405,13 +409,13 @@ export default {
       // window.event ? (window.event.cancelBubble = true) : ev.stopPropagation();
     },
     // 拖拽标记
-    // eslint-disable-next-line no-unused-vars
+    // eslint-disable-next-line no-unused-lets
     dragSign(ev, key) {
-      var nn6 = document.getElementById && !document.all;
-      var isdrag = false;
-      var y, x;
-      var nTY, nTX;
-      var oDragObj;
+      let nn6 = document.getElementById && !document.all;
+      let isdrag = false;
+      let y, x;
+      let nTY, nTX;
+      let oDragObj;
       let _this = this;
 
       function moveMouse(e) {
@@ -422,7 +426,7 @@ export default {
           let widthItem = e.path[1].style.width.split("p");
           let heightItem = e.path[1].style.height.split("p");
           let width = widthItem[0];
-          // eslint-disable-next-line no-unused-vars
+          // eslint-disable-next-line no-unused-lets
           let height = heightItem[0];
           let top =
             ((nn6
@@ -450,8 +454,8 @@ export default {
       // eslint-disable-next-line no-unused-vars
       function initDrag(e) {
         // console.log("_this", _this);
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className.indexOf("equipment") == -1
@@ -496,8 +500,8 @@ export default {
         isdrag = false;
         document.onmousemove = null;
         document.onmouseup = null;
-        var oDragHandle = nn6 ? e.target : event.srcElement;
-        var topElement = "HTML";
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
         while (
           oDragHandle.tagName != topElement &&
           oDragHandle.className != "equipment"
@@ -642,7 +646,7 @@ export default {
 <style lang="less" scoped>
 .pop-up-main {
   width: 100%;
-  height: calc(100vh - 12vh);
+  height: calc(100vh - 13vh);
   overflow-y: hidden;
 
   .paln-box {
@@ -654,7 +658,7 @@ export default {
       position: absolute;
       // top: 75%;
       left: 50%;
-      transform: translate(-50%, 0%);
+      transform: translate(-50%, -15%);
 
       img,
       .svg {
@@ -693,7 +697,7 @@ export default {
       color: white;
     }
 
-    .el-button {
+    &/deep/.el-button {
       z-index: 2;
       position: absolute;
       bottom: 60px;
@@ -719,11 +723,4 @@ export default {
     }
   }
 }
-
-// body {
-// 		height: 100%;
-// 		overflow: hidden;
-// 		margin: 0;
-// 		padding: 0;
-// 	}
 </style>