Browse Source

新增升压站

lining 3 years ago
parent
commit
8646209341
30 changed files with 29967 additions and 41612 deletions
  1. 2 1
      .env.development
  2. 2 1
      .env.production
  3. 13 0
      src/api/cockpit/boosterStation/index.js
  4. 0 3
      src/api/cockpit/matrix/index.js
  5. 44 0
      src/api/wisdomOverhaul/windResources/index.js
  6. 1 1
      src/components/coms/cards/percent-card-2.vue
  7. 5 5
      src/views/Home/components/map/svg-map-nx.vue
  8. 561 2004
      src/views/WindSite/components/boosterstation/BoosterStation.js
  9. 7251 0
      src/views/WindSite/components/boosterstation/cl.vue
  10. 0 2206
      src/views/WindSite/components/boosterstation/dwk.vue
  11. 4858 0
      src/views/WindSite/components/boosterstation/dx.vue
  12. 0 1538
      src/views/WindSite/components/boosterstation/hzj.vue
  13. 16338 0
      src/views/WindSite/components/boosterstation/kb.vue
  14. 0 2850
      src/views/WindSite/components/boosterstation/mch.vue
  15. 0 3466
      src/views/WindSite/components/boosterstation/mhs.vue
  16. 0 5491
      src/views/WindSite/components/boosterstation/nss.vue
  17. 0 1941
      src/views/WindSite/components/boosterstation/pl1.vue
  18. 0 3592
      src/views/WindSite/components/boosterstation/pl2.vue
  19. 722 0
      src/views/WindSite/components/boosterstation/previewPicture.vue
  20. 0 2726
      src/views/WindSite/components/boosterstation/qs.vue
  21. 0 1926
      src/views/WindSite/components/boosterstation/sbdl.vue
  22. 0 5297
      src/views/WindSite/components/boosterstation/sbq.vue
  23. 0 4377
      src/views/WindSite/components/boosterstation/xh.vue
  24. 0 3966
      src/views/WindSite/components/boosterstation/xs.vue
  25. 10 53
      src/views/WindSite/pages/BoosterStation.vue
  26. 14 25
      src/views/windAnalysis/fxzstab1.vue
  27. 27 47
      src/views/windAnalysis/fxzstab2.vue
  28. 37 24
      src/views/windAnalysis/tab1.vue
  29. 36 36
      src/views/windAnalysis/tab2.vue
  30. 46 36
      src/views/windAnalysis/tab3.vue

+ 2 - 1
.env.development

@@ -1,2 +1,3 @@
 VUE_APP_API=http://10.83.68.97:8020
-VUE_APP_Matrix=http://10.83.68.97:8170
+VUE_APP_Matrix=http://10.83.68.97:8170
+VUE_APP_ADAPTERURL=http://10.83.68.205:8011

+ 2 - 1
.env.production

@@ -1,2 +1,3 @@
 VUE_APP_API=http://10.83.68.97:8020
-VUE_APP_Matrix=http://10.83.68.97:8170
+VUE_APP_Matrix=http://10.83.68.97:8170
+VUE_APP_ADAPTERURL=http://10.83.68.205:8011

+ 13 - 0
src/api/cockpit/boosterStation/index.js

@@ -0,0 +1,13 @@
+import request from "../../../tools/request";
+//数据刷新
+const refreshData = (keys) => {
+    return request({
+        baseURL: process.env.VUE_APP_ADAPTERURL,
+        url: `/ts/latest?keys=${keys}`,
+        method: "get",
+    });
+};
+
+export default {
+    refreshData,
+}

+ 0 - 3
src/api/cockpit/matrix/index.js

@@ -172,9 +172,6 @@ const monitorFindGeneralAppearance = (data) => {
     });
 };
 
-
-
-
 export default {
     findBasicDataInfo,
     findPowerInfo,

+ 44 - 0
src/api/wisdomOverhaul/windResources/index.js

@@ -0,0 +1,44 @@
+import request from "../../../tools/request";
+const scatterAjax = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `scatter/scatterAjax?wpId=${data.wpId}&pjId=${data.pjId}&lnId=${data.lnId}&year=${data.year}&wpId=${data.month}`,
+        method: "get",
+    });
+};
+const projectAjax = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powercompare/projectAjax?wpIds=${data.wpIds}`,
+        method: "get",
+    });
+};
+const lineWpIdAjax = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `powercompare/lineWpIdAjax?wpId=${data.wpId}`,
+        method: "get",
+    });
+};
+const getWinddirection = (data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `winddirection/getWinddirection?wpId=${data.wpId}&recorddate=${data.recorddate}`,
+        method: "get",
+    });
+};
+const goodness = (url,data) => {
+    return request({
+        baseURL: process.env.VUE_APP_Matrix,
+        url: `${url}?wpId=${data.wpId}&recorddate=${data.recorddate}`,
+        method: "get",
+    });
+};
+
+export default {
+    scatterAjax,
+    projectAjax,
+    lineWpIdAjax,
+    getWinddirection,
+    goodness,
+}

+ 1 - 1
src/components/coms/cards/percent-card-2.vue

@@ -64,7 +64,7 @@ export default {
 
   computed: {
     percent() {
-      return parseInt((this.TotalValue / this.ActualValue) * 1000);
+      return this.TotalValue=== 0? 0 :parseInt((this.TotalValue / this.ActualValue) * 100);
     },
 
   

+ 5 - 5
src/views/Home/components/map/svg-map-nx.vue

@@ -514,7 +514,7 @@
                 >
                   经度
                 </text>
-                <text x="80" y="190" fill="#05bb4c" font-size="12">
+                <text x="60" y="190" fill="#05bb4c" font-size="12">
                   {{ xtMap.SY_FDC && xtMap.SY_FDC.jd }}°
                 </text>
                 <text
@@ -526,7 +526,7 @@
                 >
                   纬度
                 </text>
-                <text x="80" y="215" fill="#05bb4c" font-size="12">
+                <text x="60" y="215" fill="#05bb4c" font-size="12">
                   {{ xtMap.SY_FDC && xtMap.SY_FDC.wd }}°
                 </text>
                 <text
@@ -538,7 +538,7 @@
                 >
                   海拔
                 </text>
-                <text x="80" y="240" fill="#05bb4c" font-size="12">
+                <text x="60" y="240" fill="#05bb4c" font-size="12">
                   {{ xtMap.SY_FDC && xtMap.SY_FDC.hb }}米
                 </text>
                 <text
@@ -550,7 +550,7 @@
                 >
                   功率
                 </text>
-                <text x="80" y="265" fill="#05bb4c" font-size="12">
+                <text x="60" y="265" fill="#05bb4c" font-size="12">
                   {{ xtMap.SY_FDC && xtMap.SY_FDC.gl }}MW
                 </text>
                 <text
@@ -562,7 +562,7 @@
                 >
                   风速
                 </text>
-                <text x="80" y="290" fill="#05bb4c" font-size="12">
+                <text x="60" y="290" fill="#05bb4c" font-size="12">
                   {{ xtMap.SY_FDC && xtMap.SY_FDC.ssfs }}m/s
                 </text>
               </g>

File diff suppressed because it is too large
+ 561 - 2004
src/views/WindSite/components/boosterstation/BoosterStation.js


File diff suppressed because it is too large
+ 7251 - 0
src/views/WindSite/components/boosterstation/cl.vue


File diff suppressed because it is too large
+ 0 - 2206
src/views/WindSite/components/boosterstation/dwk.vue


File diff suppressed because it is too large
+ 4858 - 0
src/views/WindSite/components/boosterstation/dx.vue


File diff suppressed because it is too large
+ 0 - 1538
src/views/WindSite/components/boosterstation/hzj.vue


File diff suppressed because it is too large
+ 16338 - 0
src/views/WindSite/components/boosterstation/kb.vue


File diff suppressed because it is too large
+ 0 - 2850
src/views/WindSite/components/boosterstation/mch.vue


File diff suppressed because it is too large
+ 0 - 3466
src/views/WindSite/components/boosterstation/mhs.vue


File diff suppressed because it is too large
+ 0 - 5491
src/views/WindSite/components/boosterstation/nss.vue


File diff suppressed because it is too large
+ 0 - 1941
src/views/WindSite/components/boosterstation/pl1.vue


File diff suppressed because it is too large
+ 0 - 3592
src/views/WindSite/components/boosterstation/pl2.vue


+ 722 - 0
src/views/WindSite/components/boosterstation/previewPicture.vue

@@ -0,0 +1,722 @@
+<template>
+  <div class="pop-up-main">
+    <div class="paln-box">
+      <div
+        class="movableItem"
+        :style="{ width: width, height: height }"
+        @mousewheel="rollImg($event)"
+        @mousedown="drag($event, 1)"
+        ref="bigImage"
+      >
+        <!-- 图片不可选中 或不可拖拽到新标签打开-->
+        <slot
+          name="svg"
+          oncontextmenu="return false;"
+          onselectstart="return false;"
+          draggable="false"
+        ></slot>
+        <template v-if="isEdit && iconWidth">
+          <img
+            ref="signImage"
+            :src="iconImgUrl"
+            @mousedown="dragSign($event, key)"
+            v-for="(item, key) in equipment"
+            :key="key"
+            :style="{
+              top: equipment[key].top + '%',
+              left: equipment[key].left + '%',
+              width: iconWidth,
+              height: iconHeight,
+            }"
+            class="equipment"
+          />
+        </template>
+        <el-popover
+          width="200"
+          placement="bottom-start"
+          trigger="hover"
+          :close-delay="100"
+          content="暂无描述"
+          v-else-if="!isEdit && iconWidth && arrIcon.length == equipment.length"
+          v-for="(item, key) in equipment"
+          :key="key"
+          popper-class="preview-popover"
+        >
+          <!-- &&arrIcon.length==equipment.length -->
+          <template>
+            <div v-if="equipment[key].describe" class="describe">
+              <p class="describe-top">
+                {{ equipment[key].describe.deviceName }}
+              </p>
+              <p class="describe-center">
+                {{ equipment[key].describe.remark }}
+              </p>
+              <p class="describe-bottom">
+                {{ equipment[key].describe.location }}
+              </p>
+            </div>
+          </template>
+          <!-- <img oncontextmenu="return false;" onselectstart="return false;" draggable="false" slot="reference"
+						ref="signImage" :src="$baseUrl + equipment[key].iconImgUrl"
+						:style="{top:equipment[key].top+'%',left:equipment[key].left+'%',width:arrIcon[key].iconWidth,height:arrIcon[key].iconHeight}"
+						class="equipment" /> -->
+        </el-popover>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    equipment: {
+      type: Array,
+      default: () => {
+        return [
+          {
+            iconImgUrl: "",
+            top: 0,
+            left: 0,
+          },
+        ];
+      },
+    },
+    isEdit: {
+      default: false,
+    },
+    imgUrl: {},
+  },
+
+  data() {
+    return {
+      // 定时器
+      timer: "",
+      // 图片加载失败
+      imgOnerror: false,
+      imgIndex: 0,
+      isChange: true,
+      // 图片显示默认大小
+      width: '1823px',
+      height: '103vh',  
+      // 可缩小倍数,为空则可无限缩小
+      minification: 3,
+      // 可放大倍数 为空则可无限放大
+      magnification: "",
+      bigMaxWidth: 1100,
+      bigMaxHeight: 800,
+
+      // 小图标信息
+      iconImgUrl: "",
+      iconWidth: "",
+      // 存储每个小图标处理好的宽高
+      iconHeight: "",
+      arrIcon: [],
+      iconMaxWidth: 32,
+      iconMaxHeight: 32,
+      tog: 1,
+    };
+  },
+  methods: {
+    // 获取图片大小
+    getImgInfo(
+      imgUrl,
+      MaxWidth,
+      MaxHeight,
+      StrWidth,
+      StrHeight,
+      Array = false,
+      arr,
+      num = 0
+    ) {
+      let img = new Image();
+
+      // img.src = imgUrl;
+      img = document.getElementsByClassName("svg");
+      let _this = this;
+      img.onerror = () => {
+        // console.log("加载失败!!", _this.arrIcon.length);
+        // console.log(imgUrl, MaxWidth, MaxHeight, StrWidth, StrHeight);
+        _this.imgOnerror = true;
+        _this.imgIndex =
+          _this.arrIcon.length - 1 < 0 ? 0 : _this.arrIcon.length - 1;
+        this.timer = setTimeout(() => {
+          if (num <= 5) {
+            _this.getImgInfo(
+              imgUrl,
+              MaxWidth,
+              MaxHeight,
+              StrWidth,
+              StrHeight,
+              Array,
+              arr,
+              num + 1
+            );
+          }
+          clearInterval(this.timer);
+        }, 2000);
+      };
+      img.onload = function (e) {
+        //  显示时 初始 最大宽度
+        let maxWidth = MaxWidth;
+        //  显示时 初始 最大高度
+        let maxHeight = MaxHeight;
+        if (
+          e.path[0].naturalWidth <= maxWidth &&
+          e.path[0].naturalHeight <= maxHeight
+        ) {
+          _this[StrWidth] = e.path[0].naturalWidth + "px";
+          _this[StrHeight] = e.path[0].naturalHeight + "px";
+        } else {
+          _this[StrWidth] = e.path[0].naturalWidth + "px";
+          _this[StrHeight] = e.path[0].naturalHeight + "px";
+          if (
+            e.path[0].naturalWidth > maxWidth &&
+            e.path[0].naturalHeight <= maxHeight
+          ) {
+            let ratio = e.path[0].naturalWidth / e.path[0].naturalHeight;
+            _this[StrWidth] = "1600px";
+            _this[StrHeight] = maxWidth / ratio + "px";
+          } else if (
+            e.path[0].naturalWidth <= maxWidth &&
+            e.path[0].naturalHeight > maxHeight
+          ) {
+            let ratio = e.path[0].naturalWidth / e.path[0].naturalHeight;
+            _this[StrWidth] = maxHeight * ratio + "px";
+            _this[StrHeight] = "800px";
+          } else if (
+            e.path[0].naturalWidth > maxWidth &&
+            e.path[0].naturalHeight > maxHeight
+          ) {
+            let ratio = e.path[0].naturalWidth / e.path[0].naturalHeight;
+            let w = maxWidth;
+            let h = w / ratio;
+            if (h > maxHeight) {
+              let ratio2 = w / h;
+              h = maxHeight;
+              w = h * ratio2;
+            }
+            _this[StrWidth] = w + "px";
+            _this[StrHeight] = h + "px";
+          }
+        }
+        if (Array) {
+          _this[arr].push({
+            iconWidth: _this[StrWidth],
+            iconHeight: _this[StrHeight],
+          });
+          // console.log(
+          // 	"tow#################################arrIcon",
+          // 	_this[arr].length
+          // );
+        }
+        // _this[StrWidth] = `${e.path[0].naturalWidth}px`;
+        // _this[StrHeight] = `${e.path[0].naturalHeight}px`;
+        // vm.$set(vm.imgInfo, "width", img.width);
+        // vm.$set(vm.imgInfo, "height", img.height);
+        // console.log("打印图片信息", imgUrl, _this[StrWidth], _this[StrHeight]); // 打印图片信息
+
+        // console.log("打印图片信息", e.path[0].naturalHeight); // 打印图片信息
+        // console.log("打印图片信息", e); // 打印图片信息
+        // console.log("打印图片信息this.width", _this[StrWidth]); // 打印图片信息
+        // console.log("打印图片信息this.height", _this[StrHeight]); // 打印图片信息
+      };
+    },
+    // 缩放
+    rollImg() {
+      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);
+      let _this = this;
+
+      function fnWheel(obj, fncc) {
+        obj.onmousewheel = fn;
+        if (obj.addEventListener) {
+          obj.addEventListener("DOMMouseScroll", fn, false);
+        }
+
+        function fn(ev) {
+          let oEvent = ev || window.event;
+          let down = true;
+          if (oEvent.detail) {
+            down = oEvent.detail > 0;
+          } else {
+            down = oEvent.wheelDelta < 0;
+          }
+          if (fncc) {
+            fncc.call(this, down, oEvent);
+          }
+          if (oEvent.preventDefault) {
+            oEvent.preventDefault();
+          }
+          return false;
+        }
+      }
+      fnWheel(oImg, function (down, oEvent) {
+        let oldWidth = this.offsetWidth;
+        let oldHeight = this.offsetHeight;
+        let oldLeft = this.offsetLeft;
+        let oldTop = this.offsetTop;
+        let parent = oEvent.path[2];
+        // 获取父元素距离页面可视区域的位置
+        let parentLeft = parent.getBoundingClientRect().left;
+        let parentTop = parent.getBoundingClientRect().top;
+        // 比例 = (点击位置距离可视窗口位置 - 父元素距离可视窗口位置 - 相对定位的left)/ 本身宽度
+        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];
+        let initHeight = _this.height.split("p")[0];
+
+        let miniFlag = true;
+        let magniFlag = true;
+        if (_this.minification) {
+          // 限制缩小范围
+          if (nowWidth <= parseInt(initWidth / _this.minification)) {
+            miniFlag = false;
+            // console.log("限制缩小范围");
+            // console.log(
+            // 	"限制缩小范围",
+            // 	nowWidth,
+            // 	parseInt(initWidth / _this.minification)
+            // );
+            this.style.width = parseInt(initWidth / _this.minification) + "px";
+            this.style.height =
+              parseInt(initHeight / _this.minification) + "px";
+          }
+          if (_this.magnification) {
+            // 限制放大范围
+            if (nowWidth >= parseInt(initWidth * _this.magnification)) {
+              magniFlag = false;
+              // console.log("限制放大范围");
+              this.style.width =
+                parseInt(initWidth * _this.magnification) + "px";
+              this.style.height =
+                parseInt(initHeight * _this.magnification) + "px";
+            }
+          }
+        }
+
+        if (down && miniFlag) {
+          this.style.width = parseInt(this.offsetWidth * 0.9) + "px";
+          this.style.height = parseInt(this.offsetHeight * 0.9) + "px";
+
+          that.width = parseInt(this.offsetWidth * 0.9) + "px";
+          that.height = parseInt(this.offsetHeight * 0.9) + "px";
+        } else if (!down && magniFlag) {
+          // console.log("放大");
+          this.style.width = parseInt(this.offsetWidth * 1.1) + "px";
+          this.style.height = parseInt(this.offsetHeight * 1.1) + "px";
+          that.width = parseInt(this.offsetWidth * 1.1) + "px";
+          that.height = parseInt(this.offsetHeight * 1.1) + "px";
+        }
+        let newWidth = this.offsetWidth;
+        let newHeight = this.offsetHeight;
+
+        // 新的相对位置left = 原先的相对位置left - 比例 *(本身新的宽度-旧的宽度)
+        this.style.left =
+          Math.round(this.offsetLeft - scaleX * (newWidth - oldWidth)) + "px";
+        this.style.top =
+          Math.round(this.offsetTop - scaleY * (newHeight - oldHeight)) + "px";
+      });
+      // console.log(that.width)
+    },
+    // },
+    //拖拽
+    drag(ev) {
+      // 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) {
+          oDragObj.style.top =
+            (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px";
+          oDragObj.style.left =
+            (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px";
+          return false;
+        }
+      }
+
+      function initDrag(e) {
+        // console.log("点击图片initDrag");
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
+        while (
+          oDragHandle.tagName != topElement &&
+          oDragHandle.className != "movableItem"
+        ) {
+          oDragHandle = nn6
+            ? oDragHandle.parentNode
+            : oDragHandle.parentElement;
+        }
+        if (oDragHandle.className == "movableItem") {
+          isdrag = true;
+          oDragObj = oDragHandle;
+          // 父元素宽高
+          let width = e.path[2].offsetWidth;
+          let height = e.path[2].offsetHeight;
+          // 这里判断第一次获取不到style 样式 默认为 居中50%
+          if (oDragObj.style.top == "") {
+            nTY = 0;
+            nTX = parseInt((50 * width) / 100 + 0);
+          } else {
+            nTY = parseInt(oDragObj.style.top + 0);
+            nTX = parseInt(oDragObj.style.left + 0);
+          }
+          y = nn6 ? e.clientY : event.clientY;
+          x = nn6 ? e.clientX : event.clientX;
+          oDragObj.style.cursor = "move";
+          document.onmousemove = moveMouse;
+          return false;
+        }
+      }
+      document.onmousemove = initDrag;
+      // document.onmouseup = new Function("isdrag=false");
+      document.onmouseup = function (e) {
+        isdrag = false;
+        document.onmousemove = null;
+        document.onmouseup = null;
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
+        while (
+          oDragHandle.tagName != topElement &&
+          oDragHandle.className != "movableItem"
+        ) {
+          oDragHandle = nn6
+            ? oDragHandle.parentNode
+            : oDragHandle.parentElement;
+        }
+        if (oDragHandle.className == "movableItem") {
+          oDragObj = oDragHandle;
+          oDragObj.style.cursor = "Default";
+        }
+      };
+      ev = event || window.event;
+
+      // 取消事件冒泡行为
+      // window.event ? (window.event.cancelBubble = true) : ev.stopPropagation();
+    },
+    // 拖拽标记
+    // eslint-disable-next-line no-unused-lets
+    dragSign(ev, key) {
+      let nn6 = document.getElementById && !document.all;
+      let isdrag = false;
+      let y, x;
+      let nTY, nTX;
+      let oDragObj;
+      let _this = this;
+
+      function moveMouse(e) {
+        if (isdrag) {
+          this.equipmentKey = key;
+          // console.log("thisequipmentKey", this.equipmentKey);
+
+          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-lets
+          let height = heightItem[0];
+          let top =
+            ((nn6
+              ? (nTY / 100) * height + e.clientY - y
+              : (nTY / 100) * height + event.clientY - y) /
+              height) *
+            100;
+          let left =
+            ((nn6
+              ? (nTX / 100) * width + e.clientX - x
+              : (nTX / 100) * width + event.clientX - x) /
+              width) *
+            100;
+
+          if (top >= 0 && top <= 100) {
+            _this.equipment[key].top = top;
+          }
+          if (left >= 0 && left <= 100) {
+            _this.equipment[key].left = left;
+          }
+
+          return false;
+        }
+      }
+      // eslint-disable-next-line no-unused-vars
+      function initDrag(e) {
+        // console.log("_this", _this);
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
+        while (
+          oDragHandle.tagName != topElement &&
+          oDragHandle.className.indexOf("equipment") == -1
+        ) {
+          oDragHandle = nn6
+            ? oDragHandle.parentNode
+            : oDragHandle.parentElement;
+        }
+        if (oDragHandle.className.indexOf("equipment") != -1) {
+          isdrag = true;
+          oDragObj = oDragHandle;
+          // 父元素宽高
+          let width = e.path[1].offsetWidth;
+          // let height = e.path[1].offsetHeight;
+          // console.log(width, height);
+          // console.log("oDragObj.style", oDragObj.style);
+          // 这里判断第一次获取不到style 样式 默认为 居中50%
+          if (oDragObj.style.top == "") {
+            // nTY = parseInt((50 * height) / 100 + 0);
+            nTY = 0;
+            nTX = parseInt((50 * width) / 100 + 0);
+          } else if (oDragObj.style.top.indexOf("%") != -1) {
+            nTY = oDragObj.style.top.split("%")[0];
+            nTX = oDragObj.style.left.split("%")[0];
+          } else {
+            nTY = parseInt(oDragObj.style.top + 0);
+            nTX = parseInt(oDragObj.style.left + 0);
+          }
+          y = nn6 ? e.clientY : event.clientY;
+          x = nn6 ? e.clientX : event.clientX;
+
+          oDragObj.style.cursor = "move";
+          document.onmousemove = moveMouse;
+          return false;
+        }
+      }
+
+      // document.onmousedown = initDrag;
+      document.onmousemove = initDrag;
+
+      document.onmouseup = function (e) {
+        isdrag = false;
+        document.onmousemove = null;
+        document.onmouseup = null;
+        let oDragHandle = nn6 ? e.target : event.srcElement;
+        let topElement = "HTML";
+        while (
+          oDragHandle.tagName != topElement &&
+          oDragHandle.className != "equipment"
+        ) {
+          oDragHandle = nn6
+            ? oDragHandle.parentNode
+            : oDragHandle.parentElement;
+        }
+        if (oDragHandle.className == "equipment") {
+          oDragObj = oDragHandle;
+          oDragObj.style.cursor = "Default";
+        }
+      };
+
+      // _this.equipmentKey = key;
+      // _this.equipment[_this.equipmentKey].left = l;
+      // _this.equipment[_this.equipmentKey].top = t;
+      ev = event || window.event;
+
+      // 取消事件冒泡行为
+      window.event ? (window.event.cancelBubble = true) : ev.stopPropagation();
+    },
+  },
+
+  watch: {
+    equipment() {
+      if (this.equipment.length != 0) {
+        this.arrIcon = [];
+        let finish = true;
+        this.equipment.filter((item) => {
+          if (!item.iconImgUrl) {
+            finish = false;
+          }
+          return true;
+        });
+        // console.log("finish", finish);
+        if (finish) {
+          this.equipment.filter((item, index) => {
+            if (index >= this.imgIndex) {
+              console.log("iconImgUrl", this.equipment[index].iconImgUrl);
+              this.getImgInfo(
+                this.$baseUrl + item.iconImgUrl,
+                this.iconMaxWidth,
+                this.iconMaxHeight,
+                "iconWidth",
+                "iconHeight",
+                true,
+                "arrIcon"
+              );
+            }
+            console.log("22filter", index);
+            return true;
+          });
+        }
+      }
+    },
+  },
+  created() {
+    this.getImgInfo(
+      this.imgUrl,
+      this.bigMaxWidth,
+      this.bigMaxHeight,
+      "width",
+      "height"
+    );
+    if (this.equipment.length != 0) {
+      this.arrIcon = [];
+      let finish = true;
+      this.equipment.filter((item) => {
+        if (!item.iconImgUrl) {
+          finish = false;
+        }
+        return true;
+      });
+      // console.log("finish", finish);
+      if (finish) {
+        this.equipment.filter((item, index) => {
+          if (index >= this.imgIndex) {
+            // console.log("iconImgUrl", this.equipment[index].iconImgUrl);
+            this.getImgInfo(
+              this.$baseUrl + item.iconImgUrl,
+              this.iconMaxWidth,
+              this.iconMaxHeight,
+              "iconWidth",
+              "iconHeight",
+              true,
+              "arrIcon"
+            );
+          }
+          // console.log("22filter", index);
+          return true;
+        });
+      }
+    }
+
+    this.iconImgUrl = JSON.parse(
+      JSON.stringify(this.$baseUrl + this.equipment[0].iconImgUrl)
+    );
+    // console.log("imgUrl", this.imgUrl);
+    // console.log("equipment", this.equipment);
+    // //禁止鼠标右键
+    // document.oncontextmenu = function() {
+    //   return false;
+    // };
+  },
+};
+</script>
+<style lang="less">
+.preview-popover {
+  background-color: #d3edf7dd;
+  padding: 12px;
+
+  .popper__arrow::after {
+    border-bottom-color: #d3edf7dd !important;
+  }
+
+  .describe {
+    p {
+      padding-bottom: 5px;
+
+      &:last-child {
+        padding-bottom: 0px;
+      }
+    }
+
+    .describe-top {
+      // color: sandybrown;
+      // color: red;
+      color: rgb(21, 110, 110);
+    }
+
+    .describe-center {
+      color: rgb(79, 21, 206);
+    }
+
+    .describe-bottom {
+      color: rgb(30, 31, 29);
+    }
+  }
+}
+</style>
+<style lang="less" scoped>
+.pop-up-main {
+		width: 100%;
+		height: calc(100vh - 12vh);
+		overflow-y:hidden ;
+
+		.paln-box {
+			width: 100%;
+			height: 100%;
+			position: relative;
+
+			.movableItem {
+				position: absolute;
+				// top: 75%;
+				left: 50%;
+				transform: translate(-50%, -8%);
+
+				img,
+				.svg {
+					z-index: 1;
+					width: 100%;
+					height: 100%;
+				}
+
+				.equipment {
+					position: absolute;
+					top: 0;
+					left: 0;
+					transform: translate(-50%, -50%);
+					z-index: 2;
+					font-size: 40px;
+					// color: red;
+					// background: blue;
+					zoom: 1;
+				}
+			}
+
+			.shuaxin {
+				position: absolute;
+				z-index: 2;
+				font-size: 40px;
+				top: 20px;
+				left: 20px;
+				cursor: pointer;
+
+				&:hover {
+					color: yellowgreen;
+				}
+			}
+
+			.equipment {
+				color: white;
+			}
+
+			&/deep/.el-button {
+				z-index: 2;
+				position: absolute;
+				bottom: 60px;
+				right: 20px;
+				width: 60px;
+				height: 35px;
+
+				span {
+					display: inline-block;
+					position: absolute;
+					top: 50%;
+					left: 50%;
+					transform: translate(-50%, -50%);
+				}
+
+				i {
+					display: inline-block;
+					position: absolute;
+					top: 50%;
+					left: 25%;
+					transform: translate(-50%, -50%);
+				}
+			}
+		}
+	}
+</style>

File diff suppressed because it is too large
+ 0 - 2726
src/views/WindSite/components/boosterstation/qs.vue


File diff suppressed because it is too large
+ 0 - 1926
src/views/WindSite/components/boosterstation/sbdl.vue


File diff suppressed because it is too large
+ 0 - 5297
src/views/WindSite/components/boosterstation/sbq.vue


File diff suppressed because it is too large
+ 0 - 4377
src/views/WindSite/components/boosterstation/xh.vue


File diff suppressed because it is too large
+ 0 - 3966
src/views/WindSite/components/boosterstation/xs.vue


+ 10 - 53
src/views/WindSite/pages/BoosterStation.vue

@@ -9,57 +9,23 @@
       ></BtnGroup2>
     </div>
     <!-- 麻黄山 -->
-    <MHS class="booster-station-body" v-if="wpId === 'MHS_FDC'" />
+    <CL class="booster-station-body" v-if="wpId === 'CL_FDC'" />
 
     <!-- 牛首山 -->
-    <NSS class="booster-station-body" v-if="wpId === 'NSS_FDC'" />
+    <KB class="booster-station-body" v-if="wpId === 'KB_FDC'" />
 
     <!-- 青山 -->
-    <QS class="booster-station-body" v-if="wpId === 'QS_FDC'" />
+    <DX class="booster-station-body" v-if="wpId === 'DX_FDC'" />
 
-    <!-- 石板泉 -->
-    <SBQ class="booster-station-body" v-if="wpId === 'SBQ_FDC'" />
-
-    <!-- 香山 -->
-    <XS class="booster-station-body" v-if="wpId === 'XS_FDC'" />
-	
-	<!-- 宋堡第六 -->
-	<SBDL class="booster-station-body" v-if="wpId === 'QS3_FDC'" />
-	
-    <!-- 大武口 -->
-    <DWK class="booster-station-body" v-if="wpId === 'DWK_GDC'" />
-
-    <!-- 平罗一期 -->
-    <PL1 class="booster-station-body" v-if="wpId === 'PL_GDC'" />
-
-    <!-- 平罗二期 -->
-    <PL2 class="booster-station-body" v-if="wpId === 'PL2_GDC'" />
-
-    <!-- 宣和 -->
-    <XH class="booster-station-body" v-if="wpId === 'XH_GDC'" />
-
-    <!-- 马场湖 -->
-    <MCH class="booster-station-body" v-if="wpId === 'MCH_GDC'" />
-	
-	<!-- 海子井 -->
-	<HZJ class="booster-station-body" v-if="wpId === 'HZJ_GDC'" />
+   
   </div>
 </template>
 
 <script>
 import BtnGroup2 from "@com/coms/btn/btn-group-double.vue";
-import MHS from "../components/boosterstation/mhs.vue";
-import NSS from "../components/boosterstation/nss.vue";
-import QS from "../components/boosterstation/qs.vue";
-import SBQ from "../components/boosterstation/sbq.vue";
-import SBDL from "../components/boosterstation/sbdl.vue";
-import XS from "../components/boosterstation/xs.vue";
-import DWK from "../components/boosterstation/dwk.vue";
-import PL1 from "../components/boosterstation/pl1.vue";
-import PL2 from "../components/boosterstation/pl2.vue";
-import XH from "../components/boosterstation/xh.vue";
-import MCH from "../components/boosterstation/mch.vue";
-import HZJ from "../components/boosterstation/hzj.vue";
+import CL from "../components/boosterstation/cl.vue";
+import KB from "../components/boosterstation/kb.vue";
+import DX from "../components/boosterstation/dx.vue";
 import api from "@api/cockpit/matrix/index.js";
 export default {
   // 名称
@@ -67,18 +33,9 @@ export default {
   // 使用组件
   components: {
     BtnGroup2,
-    MHS,
-    NSS,
-    QS,
-    SBQ,
-    SBDL,
-    XS,
-    DWK,
-    PL1,
-    PL2,
-    XH,
-    MCH,
-	HZJ
+    CL,
+    KB,
+    DX,
   },
   // 数据
   data() {

+ 14 - 25
src/views/windAnalysis/fxzstab1.vue

@@ -33,6 +33,8 @@
 <script>
 import Panel from "../../components/coms/panel/panel.vue";
 import multiArrowLineChart from "../../components/chart/line/multi-arrow-line-chart.vue";
+import apis from "@api/wisdomOverhaul/health/index.js";
+import api from "@api/wisdomOverhaul/windResources/index.js";
 export default {
   setup() {},
   components: {
@@ -58,33 +60,21 @@ export default {
   methods: {
     // 获取风场
     getWp (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.getChartData();
-        }
+      apis.powercompareWindfarmAjax({}).then((res) => {
+        this.wpArray = res.data;
+          this.wpArray = res.data;
+          this.wpId = res.data[0].id;
+          this.getChartData();
       });
     },
 
     // 获取图表数据
     getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "winddirection/getWinddirection",
-        data: {
-          wpId: that.wpId,
-          recorddate: that.recorddate,
-          // year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          // month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          console.log(res.data);
-          const array = [];
+      api.getWinddirection({
+        wpId: this.wpId,
+          recorddate: this.recorddate,
+      }).then((res) => {
+        const array = [];
           for (var {timestr: n, valueObjVo: {value: f,symbolRotate:r,symbolSize:s}} of res.data) {
             let obj = {'text':n , 'value': f ,'size': s,'route':r};
             // let temp = 'text: ' + n + ', value: ' + f+ ', size: ' + s+ ', route: ' + r;
@@ -96,10 +86,9 @@ export default {
             title: "风速",
             value: (array || [])
           }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
+          this.$nextTick(()=>{
+            this.chartData = chartData;
           });
-        }
       });
     },
 

+ 27 - 47
src/views/windAnalysis/fxzstab2.vue

@@ -103,6 +103,8 @@
 import DirectionRadarChart from "../../components/chart/radar/direction-radar-chart.vue";
 import panel from "../../components/coms/panel/panel.vue";
 import RadarChart from "../../components/chart/radar/radar-chart.vue";
+import apis from "@api/wisdomOverhaul/health/index.js";
+import api from "@api/wisdomOverhaul/windResources/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -184,45 +186,30 @@ export default {
   methods: {
     // 获取风场
     getWp (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.getProject();
-        }
+      apis.powercompareWindfarmAjax({}).then((res) => {
+        this.wpArray = res.data;
+          this.wpArray = res.data;
+          this.wpId = res.data[0].id;
+          this.getProject();
       });
     },
 
     // 获取期数
     getProject(){
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/projectAjax",
-        data:{
-          wpIds: that.wpId
-        },
-        success (res) {
-          that.projectArray = res.data;
-          that.projectId = res.data[0].id;
-          that.getChartData();
-        }
+      api.projectAjax({
+        wpIds: this.wpId
+      }).then((res) => {
+        this.wpArray = res.data;
+          this.projectArray = res.data;
+          this.projectId = res.data[0].id;
+          this.getChartData();
       });
     },
 
     // tab3,tab4 - 获取玫瑰图
     getMgt (subUrl, data, dataKey) {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl,
-        data,
-        success (res) {
-          console.log(res.data);
-          that[dataKey.split("Data")[0] + "Str"] = res.data.jfpl || "";
+      api.goodness(subUrl,data).then(res =>{
+          this[dataKey.split("Data")[0] + "Str"] = res.data.jfpl || "";
 
           let mgtData = {
             indicator: [],
@@ -239,35 +226,28 @@ export default {
             });
           }
 
-          that[dataKey] = mgtData;
-        }
-      });
+          this[dataKey] = mgtData;
+      })
     },
 
    
 
     // 获取图表数据
     getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterAjax",
-        data: {
-          wpId: "",
-          pjId: that.projectId,
+      api.scatterAjax({
+        wpId: this.wpId,
+          pjId: "",
           lnId: "",
-          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          let chartData = [{
+          year: (this.recorddate ? new Date(this.recorddate).getFullYear() : ""),
+          month: (this.recorddate ? (new Date(this.recorddate).getMonth() + 1) : ""),
+      }).then((res) => {
+        let chartData = [{
             title: "风资源分析",
             value: (res.data || [])
           }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
+          this.$nextTick(()=>{
+            this.chartData = chartData;
           });
-        }
       });
     },
 

+ 37 - 24
src/views/windAnalysis/tab1.vue

@@ -28,6 +28,8 @@
 
 <script>
 import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+import apis from "@api/wisdomOverhaul/health/index.js";
+import api from "@api/wisdomOverhaul/windResources/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -56,42 +58,53 @@ export default {
   methods: {
     // 获取风场
     getWp (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.$emit('thisWpId', that.wpId)
-          that.getChartData();
-        }
+      apis.powercompareWindfarmAjax({}).then((res) => {
+        this.wpArray = res.data;
+          this.wpId = res.data[0].id;
+		      this.$emit('thisWpId', this.wpId)
+          this.getChartData();
       });
     },
 
     // 获取图表数据
     getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterAjax",
-        data: {
-          wpId: that.wpId,
+      api.scatterAjax({
+        wpId: this.wpId,
           pjId: "",
           lnId: "",
-          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          let chartData = [{
+          year: (this.recorddate ? new Date(this.recorddate).getFullYear() : ""),
+          month: (this.recorddate ? (new Date(this.recorddate).getMonth() + 1) : ""),
+      }).then((res) => {
+        let chartData = [{
             title: "风资源分析",
             value: (res.data || [])
           }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
+          this.$nextTick(()=>{
+            this.chartData = chartData;
           });
-        }
       });
+      
+      // let that = this;
+      // that.API.requestData({
+      //   method: "POST",
+      //   subUrl: "scatter/scatterAjax",
+      //   data: {
+      //     wpId: that.wpId,
+      //     pjId: "",
+      //     lnId: "",
+      //     year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
+      //     month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
+      //   },
+      //   success (res) {
+      //     let chartData = [{
+      //       title: "风资源分析",
+      //       value: (res.data || [])
+      //     }];
+      //     that.$nextTick(()=>{
+      //       that.chartData = chartData;
+      //     });
+      //   }
+      // });
     },
 
     search () {

+ 36 - 36
src/views/windAnalysis/tab2.vue

@@ -37,6 +37,8 @@
 
 <script>
 import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+import apis from "@api/wisdomOverhaul/health/index.js";
+import api from "@api/wisdomOverhaul/windResources/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -67,57 +69,55 @@ export default {
   methods: {
     // 获取风场
     getWp (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.getProject();
-        }
+      apis.powercompareWindfarmAjax({}).then((res) => {
+        this.wpArray = res.data;
+          this.wpArray = res.data;
+          this.wpId = res.data[0].id;
+          this.getProject();
       });
     },
 
     // 获取期数
     getProject(){
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/projectAjax",
-        data:{
-          wpIds: that.wpId
-        },
-        success (res) {
-          that.projectArray = res.data;
-          that.projectId = res.data[0].id;
-          that.getChartData();
-        }
+      api.projectAjax({
+        wpIds: this.wpId
+      }).then((res) => {
+        this.wpArray = res.data;
+          this.projectArray = res.data;
+          this.projectId = res.data[0].id;
+          this.getChartData();
       });
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/projectAjax",
+      //   data:{
+      //     wpIds: that.wpId
+      //   },
+      //   success (res) {
+      //     that.projectArray = res.data;
+      //     that.projectId = res.data[0].id;
+      //     that.getChartData();
+      //   }
+      // });
     },
 
     // 获取图表数据
     getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterAjax",
-        data: {
-          wpId: that.wpId,
-          pjId: that.projectId,
+      api.scatterAjax({
+        wpId: this.wpId,
+          pjId: "",
           lnId: "",
-          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          let chartData = [{
+          year: (this.recorddate ? new Date(this.recorddate).getFullYear() : ""),
+          month: (this.recorddate ? (new Date(this.recorddate).getMonth() + 1) : ""),
+      }).then((res) => {
+        let chartData = [{
             title: "风资源分析",
             value: (res.data || [])
           }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
+          this.$nextTick(()=>{
+            this.chartData = chartData;
           });
-        }
       });
     },
 

+ 46 - 36
src/views/windAnalysis/tab3.vue

@@ -37,6 +37,8 @@
 
 <script>
 import NormalScatterChart from "@com/chart/scatter/normal-scatter-chart.vue";
+import apis from "@api/wisdomOverhaul/health/index.js";
+import api from "@api/wisdomOverhaul/windResources/index.js";
 export default {
   // 名称
   name: "cutAnalyse",
@@ -67,57 +69,65 @@ export default {
   methods: {
     // 获取风场
     getWp (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.getLine();
-        }
+      apis.powercompareWindfarmAjax({}).then((res) => {
+        this.wpArray = res.data;
+          this.wpArray = res.data;
+          this.wpId = res.data[0].id;
+          this.getLine();
       });
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/windfarmAjax",
+      //   success (res) {
+      //     that.wpArray = res.data;
+      //     that.wpId = res.data[0].id;
+      //     that.getLine();
+      //   }
+      // });
     },
 
     // 获取线路
     getLine(){
-      let that = this;
-      that.API.requestData({
-        method: "GET",
-        subUrl: "powercompare/lineWpIdAjax",
-        data:{
-          wpId: that.wpId
-        },
-        success (res) {
-          that.lineArray = res.data;
-          that.lineId = res.data[0].id;
-          that.getChartData();
-        }
+      api.lineWpIdAjax({
+        wpIds: this.wpId
+      }).then((res) => {
+        this.wpArray = res.data;
+          this.projectArray = res.data;
+          this.projectId = res.data[0].id;
+          this.getChartData();
       });
+      // let that = this;
+      // that.API.requestData({
+      //   method: "GET",
+      //   subUrl: "powercompare/lineWpIdAjax",
+      //   data:{
+      //     wpId: that.wpId
+      //   },
+      //   success (res) {
+      //     that.lineArray = res.data;
+      //     that.lineId = res.data[0].id;
+      //     that.getChartData();
+      //   }
+      // });
     },
 
     // 获取图表数据
     getChartData () {
-      let that = this;
-      that.API.requestData({
-        method: "POST",
-        subUrl: "scatter/scatterAjax",
-        data: {
-          wpId: that.wpId,
+      api.scatterAjax({
+        wpId: this.wpId,
           pjId: "",
-          lnId: that.lineId,
-          year: (that.recorddate ? new Date(that.recorddate).getFullYear() : ""),
-          month: (that.recorddate ? (new Date(that.recorddate).getMonth() + 1) : ""),
-        },
-        success (res) {
-          let chartData = [{
+          lnId: "",
+          year: (this.recorddate ? new Date(this.recorddate).getFullYear() : ""),
+          month: (this.recorddate ? (new Date(this.recorddate).getMonth() + 1) : ""),
+      }).then((res) => {
+        let chartData = [{
             title: "风资源分析",
             value: (res.data || [])
           }];
-          that.$nextTick(()=>{
-            that.chartData = chartData;
+          this.$nextTick(()=>{
+            this.chartData = chartData;
           });
-        }
       });
     },