Kaynağa Gözat

更新安全监视代码

baiyanting 2 yıl önce
ebeveyn
işleme
809799f3a4
55 değiştirilmiş dosya ile 13975 ekleme ve 11502 silme
  1. BIN
      src/assets/img/images/area.png
  2. BIN
      src/assets/img/images/cardcon.png
  3. BIN
      src/assets/img/images/navicon1.png
  4. BIN
      src/assets/img/images/navicon2.png
  5. BIN
      src/assets/img/images/xxblue.png
  6. BIN
      src/assets/img/images/xxyellow.png
  7. 63 0
      src/components/ebtn/index.vue
  8. 30 0
      src/components/ebtngroup/index.vue
  9. 6 0
      src/config.js
  10. 154 0
      src/store/modules/factory.js
  11. 20 0
      src/store/reactive/index.js
  12. 19 0
      src/store/reactive/organizations.js
  13. 424 3
      src/views/layout/economicsOperation/companyHomepage/indexGf.vue
  14. 832 169
      src/views/layout/economicsOperation/homePage/components/card.vue
  15. 2 1
      src/views/layout/stateMonitor/AGCMonitor/components/AGCFan.vue
  16. 1140 1208
      src/views/layout/stateMonitor/AGCMonitor/components/AGCSun.vue
  17. 61 56
      src/views/layout/stateMonitor/AGCMonitor/index.vue
  18. 121 72
      src/views/layout/stateMonitor/detailMatrix/index.vue
  19. 208 126
      src/views/layout/stateMonitor/factoryMonitor/components/dialogCheck.vue
  20. 101 40
      src/views/layout/stateMonitor/factoryMonitor/components/qushiDialog.vue
  21. 58 30
      src/views/layout/stateMonitor/factoryMonitor/components/qushiDialogCopy.vue
  22. 288 202
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/components/navList.vue
  23. 25 74
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightDataTarget/components/lightDataGF.vue
  24. 90 86
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightDataTarget/index.vue
  25. 34 30
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/components/lightCard.vue
  26. 112 74
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/components/lightList.vue
  27. 94 462
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/components/lightMatrixGF.vue
  28. 58 49
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/index.vue
  29. 70 41
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/components/lightMatrixCard.vue
  30. 27 205
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/components/lightMatrixGF.vue
  31. 65 35
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/components/lightMatrixList.vue
  32. 44 33
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/index.vue
  33. 9 5
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/photovoltaicFacility/components/photoitaicGF.vue
  34. 40 33
      src/views/layout/stateMonitor/factoryMonitor/photovoltaic/photovoltaicFacility/index.vue
  35. 8 5
      src/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/iframeCom.vue
  36. 1 1
      src/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/lineCharts.vue
  37. 13 5
      src/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/lineChartsCopy.vue
  38. 2395 2028
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/index.vue
  39. 11 2
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/components/benchList.vue
  40. 13 3
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/components/benchLists.vue
  41. 147 230
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue
  42. 593 555
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/index.vue
  43. 504 461
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/subview/EqCard.vue
  44. 396 377
      src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/subview/EqList.vue
  45. 1533 1361
      src/views/layout/stateMonitor/photovoltaicStation/components/card.vue
  46. 82 20
      src/views/layout/stateMonitor/photovoltaicStation/components/list.vue
  47. 1906 1414
      src/views/layout/stateMonitor/photovoltaicStation/index.vue
  48. 366 353
      src/views/layout/stateMonitor/photovoltaicStationIndex/index.vue
  49. 18 4
      src/views/layout/stateMonitor/photovoltaicStationIndex/subview/LeftChart.vue
  50. 29 9
      src/views/layout/stateMonitor/photovoltaicStationIndex/subview/LeftSlideDetail.vue
  51. 2 1
      src/views/layout/stateMonitor/photovoltaicStationIndex/subview/RightSlide.vue
  52. 9 4
      src/views/layout/stateMonitor/photovoltaicStationIndex/subview/RightSlideDetail.vue
  53. 181 0
      src/views/layout/stateMonitor/simpleMatrix/HeaderMultiBtn.vue
  54. 1418 1443
      src/views/layout/stateMonitor/simpleMatrix/index.vue
  55. 155 192
      src/views/layout/stateMonitor/synthesizeTargetSystem/index.vue

BIN
src/assets/img/images/area.png


BIN
src/assets/img/images/cardcon.png


BIN
src/assets/img/images/navicon1.png


BIN
src/assets/img/images/navicon2.png


BIN
src/assets/img/images/xxblue.png


BIN
src/assets/img/images/xxyellow.png


+ 63 - 0
src/components/ebtn/index.vue

@@ -0,0 +1,63 @@
+<template>
+  <div class="ebtn" :class="{ 'ebtn-active': actived }" @click="$emit('click')"
+    :style="{ background: actived ? backgroundActived : backgroundDefault }">
+    <div class="ebtn-icon">
+      <slot name="img" />
+    </div>
+    <span v-if="!!slots.default">
+      <slot />
+    </span>
+  </div>
+</template>
+<script setup>
+import { defineProps, defineEmits, computed, useSlots } from 'vue'
+const props = defineProps({
+  actived: {
+    default: true
+  },
+  colorDirection: {
+    default: 'to right'
+  },
+  img: {}
+})
+const slots = useSlots()
+
+const backgroundDefault = computed(() => `linear-gradient(${props.colorDirection}, rgba(64, 72, 88, 0), rgba(64, 72, 88, .7))`)
+const backgroundActived = computed(() => `linear-gradient(${props.colorDirection}, rgba(64, 72, 88, 0), rgba(27, 107, 255, .7))`)
+
+defineEmits(['click'])
+</script>
+<style lang="less">
+.ebtn {
+  border: 1px solid #455165;
+  border-radius: 3px;
+  font-size: 14px;
+  color: #A1A7B9;
+  font-family: MicrosoftYaHeiLight;
+  padding: 0 8px 0 9px;
+  height: 28px;
+  box-sizing: border-box;
+  cursor: pointer;
+  white-space: nowrap;
+  display: flex;
+  align-items: center;
+
+  &.ebtn-active {
+    color: #fff;
+  }
+
+  span{
+    white-space: nowrap;
+    margin-left: 12px;
+  }
+
+  .ebtn-icon {
+    width: 14px;
+    height: 14px;
+    display: inline-block;
+    * {
+      vertical-align: top;
+    }
+  }
+}
+</style>

+ 30 - 0
src/components/ebtngroup/index.vue

@@ -0,0 +1,30 @@
+<template>
+  <div style="display: flex;">
+    <ebtn style="border-top-right-radius: 0;border-bottom-right-radius: 0;padding: 0 22px;" colorDirection="to left"
+      @click="$emit('update:modelValue', options[0].value)" :actived="modelValue == options[0].value">
+      <template v-if="options[0].icon" #img>
+        <i :class="options[0].icon" />
+      </template>
+    </ebtn>
+    <ebtn style="border-top-left-radius: 0;border-bottom-left-radius: 0;margin-left: -1px;padding: 0 22px;"
+      @click="$emit('update:modelValue', options[1].value)" :actived="modelValue == options[1].value">
+      <template v-if="options[1].icon" #img>
+        <i :class="options[1].icon" />
+
+      </template>
+    </ebtn>
+  </div>
+</template>
+<script setup>
+import ebtn from '../ebtn'
+import { defineProps } from 'vue'
+
+const props = defineProps({
+  options: {
+    require: true
+  },
+  modelValue: {
+  }
+})
+
+</script>

+ 6 - 0
src/config.js

@@ -0,0 +1,6 @@
+// 报警数据请求间隔
+export const alarmRefreshTime = 5000
+// 实时数据请求间隔
+export const rtDataRefreshTime = 3000
+// 图表数据请求间隔
+export const curveDateRefreshTime = 15000

+ 154 - 0
src/store/modules/factory.js

@@ -0,0 +1,154 @@
+import { GetOrganizeTreeInfo, GetAqInfoByStationCode } from '@/api/factoryMonitor'
+import { GetRtValuesByTagName } from '@api/photovoltaicStation'
+
+const initState = {
+  treeData: {}, // 树的节点
+  chooseNodeCode: null, // 选中节点的code
+  agValueConfigMap: {}, // 阵区点位信息的map
+  agValueMap: {} // 阵区点位的实时值map
+}
+
+export default {
+  state: initState,
+  mutations: {
+    SET_TREEDATA(state, data) {
+      state.treeData = data
+    },
+    SET_CHOOSE_NODE(state, code) {
+      state.chooseNodeCode = code
+    },
+    SET_AG_VALUE_CONFIG_MAP(state, map) {
+      state.agValueConfigMap = map
+    },
+    SET_AG_VALUE_MAP(state, map) {
+      state.agValueMap = map
+    },
+    RESET(state) {
+      Object.assign(state, initState)
+    }
+  },
+  getters: {
+    treeLength(state) {
+      return countNodes(state.treeData)
+    },
+    agNodes({ treeData }) {
+      const list = []
+      treeData?.datas?.forEach(node1 => {
+        node1.datas.forEach(node2 => {
+          node2.datas.forEach(node3 => {
+            list.push({
+              ...node3,
+              parentCode: node2.nemCode,
+              originCode: node1.nemCode
+            })
+          })
+        })
+      })
+      return list
+    },
+    lineNodes({ treeData }) {
+      const list = []
+      treeData?.datas?.forEach(node1 => {
+        node1.datas.forEach(node2 => {
+          list.push({
+            ...node2,
+            parentCode: node1.nemCode
+          })
+        })
+      })
+      return list
+    },
+    nodeMap({ treeData }) {
+      const map = {}
+      if (treeData) {
+        map[treeData.nemCode] = treeData
+      }
+      treeData?.datas?.forEach(node1 => {
+        map[node1.nemCode] = node1
+        node1.parentCode = treeData.nemCode
+        node1.datas.forEach(node2 => {
+          map[node2.nemCode] = node2
+          node2.parentCode = node1.nemCode
+          node2.datas.forEach(node3 => {
+            map[node3.nemCode] = node3
+            node3.parentCode = node2.nemCode
+          })
+        })
+      })
+      return map
+    },
+    checkedNodesList({chooseNodeCode}, {nodeMap}){
+      if (!chooseNodeCode || !nodeMap) {
+        return []
+      }
+      const result = [chooseNodeCode]
+      let curNode = nodeMap[chooseNodeCode]
+      while(curNode?.parentCode) {
+        result.push(curNode.parentCode)
+        curNode = nodeMap[curNode.parentCode]
+      }
+      return result
+    }
+  },
+  actions: {
+    async getTreeInfoApi({ commit }, powerStationCode, type) {
+      commit('SET_TREEDATA', null)
+      await GetOrganizeTreeInfo({ powerStationCode, type }).then(res => {
+        commit('SET_TREEDATA', res)
+      })
+    },
+    async getAgConfig({ commit }, stationCode) {
+      await GetAqInfoByStationCode({
+        stationCode
+      }).then(res => {
+        const map = {}
+        res?.datas.forEach(item => {
+          map[item.nemCode] = item
+        })
+        commit('SET_AG_VALUE_CONFIG_MAP', map)
+      })
+    },
+    async getAgValue({commit, state}) {
+      const config = state.agValueConfigMap
+      const queryList = []
+      const list = Object.values(config)
+      list.forEach(item => {
+        queryList.push(item.RFDL, item.SSZGL, item.RLYXS)
+      })
+      const realData = await getRealtimeData(queryList.filter(v => v).join('|'))
+      const result = {}
+      list.forEach(it => {
+        result[it.nemCode] = {
+          ...it,
+          jrCapacity: it.jrCapacity?.toFixed(0) ?? 0,
+          aname: it.aname.replace('阵区', ''),
+          RFDL: realData[it.RFDL]?.toFixed(0) ?? 0,
+          SSZGL: realData[it.SSZGL]?.toFixed(0) ?? 0,
+          RLYXS: realData[it.RLYXS]?.toFixed(2) ?? 0
+        }
+      })
+      commit('SET_AG_VALUE_MAP', result)
+    }
+  }
+}
+
+async function getRealtimeData(str) {
+  const res = {}
+  const ret = await GetRtValuesByTagName(str)
+  if (ret.length) {
+    ret.forEach(({ value, tagName }) => {
+      res[tagName] = value
+    })
+  }
+  return res
+}
+
+function countNodes(node) {
+  let num = 1
+  if (node.datas && node.datas.length) {
+    node.datas.forEach(snode => {
+      num += countNodes(snode)
+    })
+  }
+  return num
+}

+ 20 - 0
src/store/reactive/index.js

@@ -0,0 +1,20 @@
+import organizations from './organizations'
+
+function createStore(parmas) {
+  return {
+    install(app) {
+      this.provide(app)
+    },
+    provide(app) {
+      const keys = parmas&&Object.keys(parmas)
+      keys&&keys.forEach((item) => { 
+        // 注册
+        app.provide(item,parmas[item])
+      })
+    }
+  }
+}
+
+export default createStore({
+  organizations
+})

+ 19 - 0
src/store/reactive/organizations.js

@@ -0,0 +1,19 @@
+// reactive store对象
+import { reactive } from 'vue'
+
+const organiztions = {
+  level1Map: {},
+  setLevel1(v) {
+    this.level1Map['value'] = v
+  },
+  level2Map: {},
+  setLevel2(k, v) {
+    this.level2Map[k] = v
+  },
+  level3Map: {},
+  setLevel3(k, v) {
+    this.level3Map[k] = v
+  },
+}
+
+export default reactive(organiztions)

+ 424 - 3
src/views/layout/economicsOperation/companyHomepage/indexGf.vue

@@ -230,10 +230,184 @@
               <i class="icon-maintenance"></i>
               <span>损失明细</span>
             </div>
+            <div class="label">对标方式:</div>
+            <el-select
+              style="width: 145px"
+              v-model="benchmarkingVal"
+              placeholder="请选择"
+              clearable
+              size="mini"
+              @change="changeNum"
+            >
+              <el-option
+                @mousedown.native="clickBench(item.value)"
+                v-for="(item, indexe) in benchmarking"
+                :key="indexe"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <el-badge
+              v-if="benchNum !== 0 && benchmarkingVal !== ''"
+              @click="hidenBenchList"
+              :value="benchNum"
+              style="margin-left: 20px; cursor: pointer"
+            >
+              <img src="@/assets/img/images/benhNum.png" />
+            </el-badge>
+          </div>
+          <div
+            style="z-index: 999; width: 40%; background: #0c0f15"
+            class="window"
+            v-if="displaycheck === true"
+          >
+            <div class="stitBorder"></div>
+            <p class="ststTit header">
+              <span v-if="benchmarkingVal === 'bench2'"> 场际对标 </span>
+              <span v-if="benchmarkingVal === 'bench3'"> 项目对标 </span>
+              <span v-if="benchmarkingVal === 'bench4'"> 线路对标 </span>
+              <span v-if="benchmarkingVal === 'bench5'"> 阵区对标 </span>
+              <span v-if="benchmarkingVal === 'bench1'"> 场内对标 </span>
+              (<span style="color: #d8d8d9">{{ benchNum }}</span
+              >)
+            </p>
+            <div class="lines"></div>
+            <div
+              class="overHidd"
+              style="padding-top: 10px"
+              v-if="benchmarkingVal === 'bench1'"
+            >
+              <el-time-picker
+                format="HH:mm:ss"
+                value-format="HH:mm:ss"
+                size="mini"
+                v-model="selectTime"
+                placeholder="选择时间"
+                :disabled-hours="disabledHour"
+                :disabled-minutes="disabledMinute"
+                @change="changeTimePick"
+              >
+              </el-time-picker>
+
+              <ul
+                v-for="(item, index) in cardBench"
+                :key="index"
+                class="stations"
+              >
+                <li>
+                  {{ stationData?.name }}
+                </li>
+                <li
+                  style="
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                  "
+                >
+                  {{ item + " " + dateTimes }}
+                </li>
+
+                <li @click="removeTable(index)" style="cursor: pointer">
+                  <!--                        <el-tooltip class="item" effect="dark" content="删除" placement="right">-->
+                  <!--                        </el-tooltip>-->
+                  <i class="el-icon-close"></i>
+                </li>
+              </ul>
+            </div>
+            <div class="overHidd" v-if="benchmarkingVal === 'bench2'">
+              <ul
+                v-for="(item, index) in cardBench"
+                :key="index"
+                class="stations"
+              >
+                <li
+                  style="
+                    width: 60%;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                  "
+                >
+                  {{ item }}
+                </li>
+
+                <li @click="removeTable(index)" style="cursor: pointer">
+                  <!--                        <el-tooltip class="item" effect="dark" content="删除" placement="right">-->
+                  <!--                        </el-tooltip>-->
+                  <i class="el-icon-close"></i>
+                </li>
+              </ul>
+            </div>
+            <div
+              class="overHidd"
+              v-if="
+                benchmarkingVal !== 'bench2' && benchmarkingVal !== 'bench1'
+              "
+            >
+              <ul
+                v-for="(item, index) in cardLists"
+                :key="index"
+                class="stations"
+              >
+                <li style="text-overflow: ellipsis">
+                  {{ item }}
+                </li>
+
+                <li @click="removeTable(index)" style="cursor: pointer">
+                  <!--                        <el-tooltip class="item" effect="dark" content="删除" placement="right">-->
+                  <!--                        </el-tooltip>-->
+                  <i class="el-icon-close"></i>
+                </li>
+              </ul>
+            </div>
+            <el-row
+              class="footerButton"
+              v-if="benchmarkingVal === 'bench1'"
+              style="position: absolute; bottom: 19px; left: 15px"
+            >
+              <el-button type="primary" round @click="openCurvDatasedDate"
+                >开始对标</el-button
+              >
+              <div class="footTitle" @click="clearTable">
+                <p>清空</p>
+                <Delete
+                  style="
+                    width: 17px;
+                    height: 17px;
+                    margin-top: 6px;
+                    margin-left: 5px;
+                    color: rgba(255, 102, 0, 1);
+                  "
+                />
+              </div>
+            </el-row>
+            <el-row
+              class="footerButton"
+              v-else
+              style="position: absolute; bottom: 19px; left: 15px"
+            >
+              <el-button type="primary" round @click="openCurvDatased"
+                >开始对标</el-button
+              >
+              <div class="footTitle" @click="clearTable">
+                <p>清空</p>
+                <Delete
+                  style="
+                    width: 17px;
+                    height: 17px;
+                    margin-top: 6px;
+                    margin-left: 5px;
+                    color: rgba(255, 102, 0, 1);
+                  "
+                />
+              </div>
+            </el-row>
           </div>
         </div>
       </div>
-      <!--  <div class="photovoltaic-toggle">
+
+      <!-- 右侧列表卡片切换按钮 <div class="photovoltaic-toggle">
        <div
           class="type-card"
           :class="isActive === 'card' && 'actived-toggle'"
@@ -260,7 +434,10 @@
     </div>
     <div class="photovoltaic-data">
       <Card
+        ref="childCard"
         :dataSource="cardData"
+        :benchmarkingVal="benchmarkingVal"
+        :electTarget="electTarget"
         :typeStr="typeNode"
         :theme="themeType"
         :isStation="true"
@@ -291,7 +468,7 @@ import { homePage } from "@/api/economy-homepage.js";
 import { GetOrganization, GetStationByCompany } from "@/api/econ-headerNav.js";
 
 export default {
-  name: "photovoltaicLevelTwoStation", // 公司首页
+  name: "companyHomepage", // 公司分析
   components: {
     Card,
     List,
@@ -334,6 +511,27 @@ export default {
       datetype: "r",
       wxssTotal: 0,
       stationTopTotal: 0,
+      benchmarking: [
+        { label: "场内对标", value: "bench1" },
+        { label: "场际对标", value: "bench2" },
+        { label: "项目对标", value: "bench3" },
+        { label: "线路对标", value: "bench4" },
+        { label: "阵区对标", value: "bench5" },
+      ],
+      benchmarkingVal: "",
+      benchNum: 0,
+      displaycheck: false,
+      displaybench: false,
+      benchIndex: "",
+      selectTime: "",
+      benchChang: "",
+      cardBench: [],
+      ListBench: [],
+      ListBenchs: [],
+      didBench: "",
+      benchCode: "",
+      stationData: {},
+      dateTimes: null,
     };
   },
 
@@ -345,12 +543,96 @@ export default {
       this.getOrganizationList();
       this.getStationList();
     },
+    // 切换对标方式
+    changeNum(val) {
+      if (val === "") {
+        this.$confirm("是否清空对标方式?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            this.$message({
+              type: "success",
+              message: "已清空!",
+              offset: 200,
+              center: true,
+              customClass: "s",
+            });
+            this.displaycheck = false;
+            this.$refs.childCard.changenums();
+          })
+          .catch((_) => {
+            this.benchChang = this.didBench;
+            this.benchmarkingVal = this.didBench;
+          });
+      }
+      this.benchChang = val;
+    },
+    // 点击对标方式
+    clickBench(val) {
+      this.didBench = val;
+      let s = this.benchmarkingVal;
+
+      if (
+        this.benchChang !== "" &&
+        val !== "" &&
+        this.benchmarkingVal !== val &&
+        this.benchNum !== 0
+      ) {
+        this.$confirm("是否切换对标方式?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            this.$message({
+              type: "success",
+              message: "切换成功!",
+              offset: 200,
+              center: true,
+              customClass: "s",
+            });
+            this.benchmarkingVal = val;
+            this.$refs.childCard.changenums();
+            this.displaycheck = false;
+          })
+          .catch(() => {
+            this.benchmarkingVal = s;
+          });
+      }
+    },
+    // 打开对标框
+    async hidenBenchList(event) {
+      this.displaycheck = !this.displaycheck;
+    },
+    // 点击确认后添加数据
+    setdataed(data, val, dateTime) {
+      this.stationData = val;
+      this.cardBench = data;
+      this.benchNum = data.length;
+
+      if (this.selectTime === "" || this.selectTime === null) {
+        this.dateTimes = dateTime;
+      } else {
+        this.dateTimes = this.selectTime;
+      }
+    },
+    // 选择数据
+    setdatas(data, val, index) {
+      this.benchIndex = index;
+      this.cardBench = data;
+      this.cardVal = val;
+      this.benchNum = data.length;
+      this.getList();
+    },
     //切换类型
     levels1DataChang() {
       this.checkNode = "";
       this.resetAllFiller();
       this.$router.push({ path: "/economicsOperation/comphomepage" });
     },
+    // 获取数据
     async getDataDetial() {
       let { data: res } = await homePage({
         companyId: this.checkNode,
@@ -520,6 +802,143 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.window {
+  position: absolute;
+  top: 22px;
+  right: -40%;
+  height: 350px;
+  border: 1px solid #094493;
+  border-image: linear-gradient(
+      0deg,
+      rgba(28, 156, 255, 0),
+      rgba(28, 156, 255, 0.6),
+      rgba(28, 156, 255, 0.8)
+    )
+    1 1;
+  background: rgba(29, 34, 43, 0.9) !important;
+  border-radius: 3px;
+  box-shadow: 0 0 22px rgba(0, 70, 199, 0.2) inset !important;
+
+  .stitBorder {
+    position: absolute;
+    width: 70%;
+    height: 2px;
+    top: 0;
+    background-image: linear-gradient(to right, #1c99ff, rgba(0, 70, 199, 0));
+  }
+
+  //box-shadow: 0 0 22px rgb(0 70 199 / 20%) inset !important;
+}
+
+.ststTit {
+  width: 100%;
+  text-align: center;
+  height: 44px;
+  color: #1c99ff;
+  font-size: 16px;
+  line-height: 44px;
+  box-sizing: border-box;
+
+  //cursor: move;
+}
+
+.lines {
+  width: 99%;
+  height: 1px;
+  margin-left: 1px;
+  position: relative;
+  background: #3a3f43;
+
+  &:after {
+    content: "";
+    display: block;
+    width: 9px;
+    height: 1px;
+    background-color: #fff;
+    position: absolute;
+    right: 0;
+  }
+
+  &:before {
+    content: "";
+    display: block;
+    width: 8px;
+    height: 1px;
+    background-color: #fff;
+    position: absolute;
+    left: 0;
+  }
+}
+
+.overHidd {
+  overflow: scroll;
+  height: 70%;
+  width: 100%;
+}
+
+.footerButton {
+  display: flex;
+  justify-content: space-between;
+  width: 90%;
+
+  .footTitle {
+    height: 30px;
+    line-height: 30px;
+    display: flex;
+
+    p {
+      font-size: 14px;
+      font-family: Microsoft YaHei;
+      font-weight: 300;
+      color: #d3d3d3;
+    }
+  }
+
+  .el-button:last-of-type {
+    width: 88px;
+    color: rgba(28, 108, 255, 1);
+    border-radius: 3px;
+    background: rgba(28, 108, 255, 0);
+    border: 1px solid !important;
+    border-image: linear-gradient(0deg, rgba(28, 156, 255, 0), #1d74eb, #1d74eb)
+      1 1 !important;
+  }
+
+  /deep/ .el-button.is-round {
+    padding: 0 10px !important;
+  }
+}
+
+.stations {
+  height: 39px;
+  line-height: 39px;
+  width: 100%;
+  display: flex;
+  border-bottom: 1px solid rgba(76, 85, 90, 1);
+  justify-content: space-between;
+  font-size: 13px;
+  padding-right: 20px;
+  padding-left: 20px;
+  color: rgba(211, 211, 211, 1);
+}
+
+.photovoltaic-filter {
+  /deep/ .el-badge__content--danger {
+    background: #ff6600;
+    border: 1px solid #a5a5a5;
+  }
+
+  /deep/ .el-badge__content.is-fixed {
+    top: 5px;
+    right: 10px;
+  }
+}
+
+.searchColors {
+  background: rgba(0, 70, 199, 0.5) !important;
+  color: #ffffff !important;
+}
+
 :deep(.el-input) {
   .el-input__inner {
     height: 25px !important;
@@ -535,6 +954,7 @@ export default {
     }
   }
 }
+
 .photovoltaic-filter .status {
   :deep(.el-input) {
     .el-input__inner {
@@ -542,6 +962,7 @@ export default {
     }
   }
 }
+
 .photovoltaic-filter .station {
   :deep(.el-input) {
     .el-input__inner {
@@ -1071,7 +1492,7 @@ export default {
         display: flex;
         align-items: center;
         margin-left: 10px;
-
+        position: relative;
         .form-box {
           display: flex;
           height: 50px;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 832 - 169
src/views/layout/economicsOperation/homePage/components/card.vue


+ 2 - 1
src/views/layout/stateMonitor/AGCMonitor/components/AGCFan.vue

@@ -99,6 +99,7 @@
     import headerNav from '@/components/headerNav'
     import AgcEcharts from '@/views/layout/stateMonitor/AGCMonitor/components/AgcEchart'
     import {GetCurveValues} from "@api/home";
+import { rtDataRefreshTime } from "../../../../../config";
     export default {
         name: 'AGCMonitor',//AGC监视
         components: {
@@ -159,7 +160,7 @@
         mounted() {
             this.timer = setInterval(() => {
                 this.getRealData()
-            }, 3000)
+            }, rtDataRefreshTime)
         },
         created() {
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1140 - 1208
src/views/layout/stateMonitor/AGCMonitor/components/AGCSun.vue


+ 61 - 56
src/views/layout/stateMonitor/AGCMonitor/index.vue

@@ -1,71 +1,76 @@
 <template>
-    <div style="padding:0 20px" >
-        <headerNav @firstRender="firstRender" />
-         <a-g-c-fan v-if="headerIndex==-1" ref="agc"  :nodeCode="nodeCode" :activeNode="activeNode"/>
-        <a-g-c-sun v-if="headerIndex==-2" ref="agc"  :nodeCode="nodeCode" :activeNode="activeNode"/>
-    </div>
+  <div style="padding:0 20px">
+    <!-- <headerNav @firstRender="firstRender" /> -->
+    <HeaderMultiBtn @onChange="onChange" />
+
+    <a-g-c-fan v-if="headerIndex == -1" ref="agc" :nodeCode="nodeCode" :activeNode="activeNode" />
+    <a-g-c-sun v-if="headerIndex == -2" ref="agc" :nodeCode="nodeCode" :activeNode="activeNode" />
+  </div>
 </template>
 
 <script>
-    import AGCFan from "./components/AGCFan";
-    import AGCSun from "./components/AGCSun";
-    import qushiDialog from "../factoryMonitor/components/qushiDialog";
-    import {
-        GetElectricFieldCards,
-        GetRealData,
-    } from '@/api/agcAbout'
-    import headerNav from '@/components/headerNav'
-    import AgcEcharts from '@/views/layout/stateMonitor/AGCMonitor/components/AgcEchart'
-    import {GetCurveValues} from "@api/home";
-    export default {
-        name: 'AGCMonitor',//AGC监视
-        components: {
-            headerNav,
-            AGCFan,
-            AGCSun,
-            
-        },
-        data() {
-            return {
-                headerIndex: "0",
-                nodeCode: '',
-                activeNode: '',
+import AGCFan from "./components/AGCFan";
+import AGCSun from "./components/AGCSun";
+import qushiDialog from "../factoryMonitor/components/qushiDialog";
+import {
+  GetElectricFieldCards,
+  GetRealData,
+} from '@/api/agcAbout'
+// import headerNav from '@/components/headerNav'
+import AgcEcharts from '@/views/layout/stateMonitor/AGCMonitor/components/AgcEchart'
+import { GetCurveValues } from "@api/home";
+import HeaderMultiBtn from "../simpleMatrix/HeaderMultiBtn.vue";
+HeaderMultiBtn
+export default {
+  name: 'AGCMonitor',//AGC监视
+  components: {
+    // headerNav,
+    HeaderMultiBtn,
+    AGCFan,
+    AGCSun,
 
-            }
-        },
-        mounted() {
-        },
+  },
+  data() {
+    return {
+      headerIndex: "0",
+      nodeCode: '',
+      activeNode: '',
 
+    }
+  },
+  mounted() {
+  },
 
 
-        methods: {
-            getScale () {
-                    const w = window.innerWidth / this.style.width
-                    const h = window.innerHeight / this.style.height
-                    return { x: w, y: h }
-            },
-            setScale () {
-                    const scale = this.getScale()
-                    this.style.transform =
-                    'scaleY(' + scale.y + ') scaleX(' + scale.x + ') translate(-50%, -50%)'
-            },
 
-            firstRender(headerIndex, nodeCode, activeNode, a, b) {
-                this.headerIndex = headerIndex;
-                this.nodeCode = nodeCode;
-                this.activeNode = activeNode
-                setTimeout(() => {
-                    this.$refs.agc.getElectricFieldCards();
-                }, 15)
+  methods: {
+    getScale() {
+      const w = window.innerWidth / this.style.width
+      const h = window.innerHeight / this.style.height
+      return { x: w, y: h }
+    },
+    setScale() {
+      const scale = this.getScale()
+      this.style.transform =
+        'scaleY(' + scale.y + ') scaleX(' + scale.x + ') translate(-50%, -50%)'
+    },
+    onChange({ type, companys, stations, area }) {
+      this.firstRender(type, companys, stations, area, 'all')
+    },
+    firstRender(headerIndex, nodeCode, activeNode, a, b) {
+      this.headerIndex = headerIndex;
+      this.nodeCode = nodeCode;
+      this.activeNode = activeNode
+      setTimeout(() => {
+        this.$refs.agc.getElectricFieldCards();
+      }, 15)
 
-            },
+    },
 
 
-        }
+  }
 
-    }
+}
 </script>
 
-<style lang="less" scoped>
-
-</style>
+<style lang="less" scoped></style>

+ 121 - 72
src/views/layout/stateMonitor/detailMatrix/index.vue

@@ -1,6 +1,8 @@
 <template>
     <div class="simpleMatrix ">
-        <headerNav @firstRender="firstRender"/>
+        <!-- <headerNav @firstRender="firstRender"/> -->
+        <HeaderMultiBtn @onChange="onChange"/>
+
         <div class="matrix-body">
             <div class="body-title">
                 <div class="title-name">
@@ -27,19 +29,23 @@
 
                     <div class="el-cole" v-for="(item, index) in titleList" :key="index">
 
-                        <div class="active-b" :class="{active_bor:this.act==item.value1}">
+                        <div class="active-b" :class="{ active_bor: this.act == item.value1 }">
 
-                            <div><p class="left_p"></p>
-                                <p class="right_p"></p></div>
-                            <div class="yuan"><p><span class="circle"></span></p>
-                                <p>{{ item.name }}</p></div>
+                            <div>
+                                <p class="left_p"></p>
+                                <p class="right_p"></p>
+                            </div>
+                            <div class="yuan">
+                                <p><span class="circle"></span></p>
+                                <p>{{ item.name }}</p>
+                            </div>
 
                             <div @click="handleClick(item.value1)" class="disCircles"
                                  style="cursor: pointer;font-size: 16px;font-family: 'Bicubik'">
                                 <span class="circles"></span>
                                 <span>
                                     {{
-                                        titleArr[item.code] ? (titleArr[item.code]).toFixed(0) : '0'
+                                        titleArr[item.code] ? (Number(titleArr[item.code])).toFixed(0) : '0'
                                     }}
                                 </span>
                             </div>
@@ -86,9 +92,7 @@
                     <div class="unpaid_lefts"></div>
                     <div class="unpaid-tit"></div>
                     <div class="unpaid-tits"></div>
-                    <el-button class="updownTits " round size="mini" type="primary"
-                               @click="setTitle"
-                    >
+                    <el-button class="updownTits " round size="mini" type="primary" @click="setTitle">
                         自定义指标
                     </el-button>
                 </div>
@@ -98,30 +102,29 @@
                 <el-collapse v-model="activeNames" @change="handleChange">
 
                     <el-collapse-item style="position: relative" class="matrixs"
-                                      v-for="(values, leng) in showMatrixList" :key="leng" :name="leng+1"
-                    >
+                                      v-for="(values, leng) in showMatrixList"
+                                      :key="leng" :name="leng + 1">
                         <template #title>
                             <div class="matrix-titles" style="height: 50px;padding: 0 0 0 10px"
-                                 v-if="values.LISTS?.length !=0 || current=='all'">
+                                 v-if="values.LISTS?.length != 0 || current == 'all'">
                                 <div style="width: 150px">
                                     <span class="station-name">{{ values.CMANAME }}</span>
                                 </div>
                                 <div class="indicator" @click.stop="" style="margin-left: 6px">
-                                    <div class="sub-title-item"
-                                         v-for="(item, indexse) in subTitleData" :key="indexse"
+                                    <div class="sub-title-item" v-for="(item, indexse) in subTitleData" :key="indexse"
                                          :class="indexse >= 7 ? 'active' : ''"
-                                         @click="handleCurveClicks(leng,indexse)">
+                                         @click="handleCurveClicks(leng, indexse)">
                                         <span>{{ item.text }}</span>
                                         <span class="sub-value" :style="{ color: item.color }">
-                  {{
+                      {{
                                                 values[item.key] ? (values[item.key] / item.ratio).toFixed(item.fix) : "0"
                                             }}
-                </span>
+                    </span>
                                     </div>
                                 </div>
                             </div>
                         </template>
-                        <div v-for="(value,index) in values.LISTS" :key="index">
+                        <div v-for="(value, index) in values.LISTS" :key="index">
 
                             <div v-if="values.CMCODE!=values.LISTS[0].CZBM">
                                 <div class="matrix-title active"
@@ -143,7 +146,7 @@
                                             <span>{{ item.type === value.CZLX ? item.text1 : item.text }}</span>
                                             <span class="sub-value" :style="{ color: item.color }">
                   {{
-                                                    value[item.key] ? (value[item.key] / (item.ratio)).toFixed(item.fix) : "0"
+                                                    value[item.key] ? Number(value[item.key] / (item.ratio)).toFixed(item.fix) : "0"
                                                 }}
                 </span>
                                         </div>
@@ -151,25 +154,29 @@
                                 </div>
                             </div>
 
-                            <div class="matrix-list" :style="{margin:(value.lists.length == 0 ? '0':'10px 0 5px 0')}">
+                            <div class="matrix-list"
+                                 :style="{ margin: (value.lists.length == 0 ? '0' : '10px 0 5px 0') }">
                                 <!--  风机颜色判断,随机数不对-->
                                 <div class="matrix-card" style="cursor: pointer"
                                      :class="val.SBZT !== '' && colorList[Number(val.SBZT.toFixed(0))] ? colorList[Number(val.SBZT.toFixed(0))] : 'gray'"
                                      v-for="(val, indexe) in value.lists" :key="indexe">
                                     <div class="info">
                                         <div style="cursor: pointer" class="card-left"
-                                             @click="handleClickMatrix(val, value.CZLX, value.CZMC,indexe,values.CMANAME,value.CZAMC)">
+                                             @click="handleClickMatrix(val, value.CZLX, value.CZMC, indexe, values.CMANAME, value.CZAMC)">
                                             <span class="card-name">{{ val.aname }}</span>
                                         </div>
 
                                         <div class="card-right" style="cursor: pointer"
-                                             @click="handleDetailClick(index,indexe,leng ,'sun')">
-                                            <div class="right-item" v-for="(vales,ind) in electTarget">
+                                             @click="handleDetailClick(index, indexe, leng, 'sun')">
+                                            <div class="right-item" v-for="(vales, ind) in electTarget">
                                                 <div style="width: 70px">
                                                     {{ vales.name }}
                                                 </div>
-                                                <div class="right-value">
-                                                    {{ vales.type ? Number(val[vales.type]).toFixed(2) : '0.00' }}
+                                                <div class="right-value"
+                                                     @contextmenu="handDialog(vales, val[vales.type], val, value.CZAMC)">
+                                                    {{
+                                                        vales.type ? Number(val[vales.type + 'Value']).toFixed(2) : '0.00'
+                                                    }}
                                                 </div>
                                                 <div class="right-unite">
                                                     {{ val[vales.unite] }}
@@ -208,20 +215,18 @@
                 <template #title>
                     <div class="dialog-title">
                         <img class="dialog-title-img" src="@assets/img/images/dialog-title.png"/>
-                        <div class="title">设备详情</div>
+                        <div class="title">设备详情1</div>
                     </div>
                 </template>
-                <div class="dialog-body" style="height: 77vh">
+                <div class="dialog-body" style="height: 880px">
                     <img class="dialog-img" src="@assets/img/images/dialog.png"/>
-                    <lightDetial ref="lightDetial" :JZheight="'63%'" :GJheight="'95%'"  :stationName="stationName"
-                                 :leftcellHeight="'2.8vh'"
-                                 :rightcellHeight="'2.4vh'"/>
+                    <lightDetial ref="lightDetial" :JZheight="'63%'" :GJheight="'95%'" :stationName="stationName"
+                                 :leftcellHeight="'2.8vh'" :rightcellHeight="'2.4vh'"/>
                 </div>
             </el-dialog>
 
         </div>
-        <el-dialog width="50%" top="80px" v-model="displaySet" :show-close="true"
-                   :destroy-on-close="true">
+        <el-dialog width="50%" top="80px" v-model="displaySet" :show-close="true" :destroy-on-close="true">
             <template #title>
                 <div class="dialog-title">
                     <img class="dialog-title-img" src="@assets/img/images/dialog-title.png"/>
@@ -232,7 +237,7 @@
                  src="@assets/img/images/dialog.png"/>
             <div class="dialog-body" style="height:30vh;position: relative">
                 <el-checkbox-group v-model="checkList" @change="change">
-                    <el-checkbox v-for="(item2,index2) in setTarget" :key="index2" :label="item2.name"></el-checkbox>
+                    <el-checkbox v-for="(item2, index2) in setTarget" :key="index2" :label="item2.name"></el-checkbox>
                 </el-checkbox-group>
                 <el-row class="footerButton">
                     <el-button round @click="cancel">取消</el-button>
@@ -240,14 +245,17 @@
                 </el-row>
             </div>
         </el-dialog>
+        <dialog-check ref="tagChild"
+        />
         <qushi-dialog ref="child" :chartName="chartName"></qushi-dialog>
     </div>
 </template>
 
 <script>
+    import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
     import qushiDialog from "../factoryMonitor/components/qushiDialog";
     import {GetPowerstationTypeList} from '@/api/factoryMonitor';
-    import headerNav from '@/components/headerNav'
+    // import headerNav from '@/components/headerNav'
     import windDetail from "@/components/windDetail/index";
     import windChartCom from "@/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/lineCharts.vue";
     import lightDetial from '@/components/lightDetial'
@@ -259,15 +267,20 @@
     } from "@api/stateMonitor";
     import {GetCurveValues} from '@/api/home'
     import dayjs from "dayjs";
+    import HeaderMultiBtn from "../simpleMatrix/HeaderMultiBtn.vue";
+    import {rtDataRefreshTime} from "../../../../config";
+
 
     export default {
         name: 'detailMatrix',//明细矩阵
         components: {
-            headerNav,
+            // headerNav,
             windDetail,
             windChartCom,
             lightDetial,
-            qushiDialog
+            qushiDialog,
+            dialogCheck,
+            HeaderMultiBtn
         },
         data() {
             return {
@@ -643,7 +656,11 @@
                 changeCom: '',
                 setTarget: [],
                 electTarget: [],
-                electType: ''
+                electType: '',
+
+                // 趋势对比曲线
+                cilent: "", //区分点击事件触发条件
+
             }
         },
         created() {
@@ -651,6 +668,26 @@
         },
         methods: {
 
+
+            // 点击趋势对比
+            handDialog(val, de, item, aname) {
+                if (de !== '') {
+                    this.cilent = process.env.VUE_APP_DIALOG_POINT; //区分鼠标左右键点击
+                    this.$refs.tagChild.getXY(val.type, val.name, de, aname + item.aname, item[val.dataTime])
+
+                } else {
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
+                }
+                event.preventDefault();
+            },
+
             // 获取逆变器可选的指标
             async getPowerstationTypeList() {
 
@@ -783,6 +820,7 @@
             },
             async getPoint() {
                 let pointList = []
+                let arr = []
                 if (this.company == undefined) {
                     this.company = ''
                 }
@@ -797,14 +835,14 @@
 
                     this.data5 = this.deepClone(data?.LIST2)
                     for (const key in data.LIST1) {
-                        if (key !== 'JRTS' && key != 'NAME' && key != 'ANAME' && key != 'CMCODE' && key != 'NEMCODE' && key != 'capacityJl' && key != 'capacityZl') {
+                        if (key !== 'JRTS' && key !== 'NAME' && key !== 'JRDY' && key !== 'ANAME' && key !== 'CMCODE' && key !== 'NEMCODE' && key !== 'capacityJl' && key !== 'capacityZl') {
                             pointList.push(data.LIST1[key])
                         }
                     }
                     data.LIST2?.forEach(item => {
                         for (const key in item) {
-                            if (key !== 'CZBM ' && key !== 'zjCapacityJl ' && key !== 'CMCODE ' && key !== 'CZLX' && key !== 'CZMC' && key != 'CZAMC' && key !== 'JRTS' && key != 'CMANAME' && key != 'CMNAME' && key != 'COMPNAME' && key != 'capacityJl' && key != 'capacityZl') {
-                                pointList.push(item[key])
+                            if (key !== 'CZBM ' && key !== 'zjCapacityJl ' && key !== 'orgType' && key !== 'CMCODE ' && key !== 'JRDY' && key !== 'CZLX' && key !== 'CZMC' && key !== 'CZAMC' && key !== 'JRTS' && key !== 'CMANAME' && key !== 'CMNAME' && key !== 'COMPNAME' && key !== 'capacityJl' && key !== 'capacityZl') {
+                                arr.push(item[key])
                             }
                         }
 
@@ -812,7 +850,7 @@
 
                     this.stsee = data.LIST2
                     this.pointArr = JSON.parse(JSON.stringify(data))
-                    let param = pointList.join('|')
+                    let param = arr.join('|') + '|' + pointList.join('|')
                     this.param = param
                     this.carCode = data?.LIST2[0]?.CMCODE
                     this.getEquipmentsListGroupByCompany(this.carCode, param)
@@ -865,7 +903,7 @@
                     data.LISTS?.forEach(items => {
                         items.list?.forEach(item => {
                             for (const key in item) {
-                                if (key !== 'CZBM ' && key !== 'CMCODE' && key !== 'CZLX' && key !== 'CZMC' && key != 'CZAMC' && key != 'JRDYUNIT' && key !== 'JRTS' && key != 'COMPNAME' && key != 'capacityJl' && key != 'capacityZl') {
+                                if (key !== 'CZBM ' && key !== 'CMCODE' && key !== 'JRDY' && key !== 'CZLX' && key !== 'CZMC' && key != 'CZAMC' && key != 'JRDYUNIT' && key !== 'JRTS' && key != 'COMPNAME' && key != 'capacityJl' && key != 'capacityZl') {
                                     if (key == 'lists') {
                                         item.lists.forEach(val => {
                                             arr.forEach(z => {
@@ -910,7 +948,7 @@
                 this.timer = null;
                 this.timer = setInterval(() => {
                     this.GetRtValuesByTagName(param)
-                }, 3000);
+                }, rtDataRefreshTime);
             },
             dataDeal(titleList, matrixList, data) {
                 for (const key in titleList) {
@@ -936,13 +974,20 @@
                                     arr.forEach(d => {
                                         let dataValue = data.find(vals => vals.tagName === val[d])
                                         if (dataValue) {
-                                            val[d + 'tagName'] = dataValue?.tagName
-                                            val[d + 'dateTime'] = dataValue?.dateTime
-                                            val[d] = dataValue?.value
+                                            if (d === 'SBZT') {
+                                                val[d + 'tagName'] = dataValue?.tagName
+                                                val[d + 'Time'] = dataValue?.dateTime
+                                                val[d] = dataValue?.value
+                                            } else {
+                                                val[d + 'tagName'] = dataValue?.tagName
+                                                val[d + 'Time'] = dataValue?.dateTime
+                                                val[d + 'Value'] = dataValue?.value
+                                            }
+
                                         }
                                     })
 
-                                    val.ZHL = (val.AIG007 / val.AIG010) * 100 ? (val.AIG007 / val.AIG010) * 100 : ''
+                                    val.ZHLValue = (val.AIG007 / val.AIG010) * 100 ? (val.AIG007 / val.AIG010) * 100 : ''
                                     val.ZHLdateTime = val.AIG010dateTime
                                     val.zhUnit = '%'
                                 })
@@ -958,6 +1003,7 @@
                 this.titleArr = titleList
                 this.matrixList = matrixList
 
+
                 this.handleClickWind()
             },
             handleClickWind() {
@@ -967,7 +1013,9 @@
                     this.showMatrixList = JSON.parse(JSON.stringify(this.matrixList))
 
                 }
+
                 if (this.current !== 'all') {
+
                     // this.changeCom=this.company
                     // this.activeNames=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
                     this.showMatrixList.forEach(item => {
@@ -1054,6 +1102,9 @@
                 this.current = val
                 this.handleClickWind()
             },
+            onChange({type, companys, stations, area}) {
+                this.firstRender(type, companys, stations, area, 'all')
+            },
             firstRender(val, company, stationSet, activeNode, a) {
                 this.current = 'all'
                 this.status = val
@@ -1174,25 +1225,25 @@
     }
   }
 
- .matrixs{
-   /deep/ .el-icon-arrow-right:before {
-     content: '';
-   }
-   /deep/ .el-icon-arrow-right {
-     width: 22px;
-     height: 17px;
-     top: 17px;
-     background: url("../../../../assets/img/images/zuLeft.png") no-repeat;
+  .matrixs {
+    /deep/ .el-icon-arrow-right:before {
+      content: '';
+    }
 
-   }
+    /deep/ .el-icon-arrow-right {
+      width: 22px;
+      height: 17px;
+      top: 17px;
+      background: url("../../../../assets/img/images/zuLeft.png") no-repeat;
 
-   /deep/ .el-collapse-item__arrow.is-active {
-     transform: rotate(0);
-     top: 15px;
-     background: url("../../../../assets/img/images/zuTop.png") no-repeat;
-   }
- }
+    }
 
+    /deep/ .el-collapse-item__arrow.is-active {
+      transform: rotate(0);
+      top: 15px;
+      background: url("../../../../assets/img/images/zuTop.png") no-repeat;
+    }
+  }
 
 
   .simpleMatrix {
@@ -1333,7 +1384,6 @@
     }
 
     .el-collapse-item {
-
     }
   }
 
@@ -1583,6 +1633,7 @@
       border-radius: 4px;
       margin-bottom: 5px;
       background-color: rgba(0, 0, 0, .45);
+
       .title-name {
         display: flex;
         flex-direction: row;
@@ -1663,6 +1714,7 @@
 
         }
       }
+
       .base-inf {
         display: flex;
         flex-direction: row;
@@ -1673,7 +1725,6 @@
         margin-left: -14px;
 
 
-
         .status {
           width: 84%;
           display: flex;
@@ -2365,7 +2416,7 @@
           font-size: 15px;
           position: relative;
           top: 0;
-          left:-25px
+          left: -25px
         }
 
         &.active {
@@ -2376,7 +2427,7 @@
           font-size: 15px;
           margin-left: -15px;
           width: 125px;
-          white-space:nowrap;
+          white-space: nowrap;
         }
 
         .indicator {
@@ -2400,7 +2451,7 @@
           align-items: center;
           // justify-content: space-between;
           width: 6.2%;
-          white-space:nowrap;
+          white-space: nowrap;
           height: 100%;
           margin-right: -5px;
           font-size: 14px;
@@ -2434,7 +2485,7 @@
         margin: 5px 0;
         padding-right: 6px;
 
-        .matrix-card:hover .info{
+        .matrix-card:hover .info {
           transform: translateZ(40px);
         }
 
@@ -2916,6 +2967,4 @@
 
     }
   }
-
-
 </style>

+ 208 - 126
src/views/layout/stateMonitor/factoryMonitor/components/dialogCheck.vue

@@ -1,26 +1,35 @@
 <template>
     <div>
-       <div  @mouseenter="leaveList(true)" @mouseleave="leaveList(false)" v-if="visible==true && tagCode != tag1 && tagCode != tag2" style="width: 192px;min-height: 120px; position: fixed;"
-             :style="{ left: (xs-20 )+ 'px', top: (ys-15 )+ 'px' }">
-           <div  class="contrasten" :style="{ left: xs + 'px', top: ys + 'px' }"
-                :class="{'changeSer':changeSer==true,'changeWid':changeWid==true,'changeAll':changeAll==true}"
-                >
-               <div style="text-align: left" slot="content" @click="showDelogOnly(tagCode,indexes,tagName)">
-                   <i class="icon-curve" style="margin-right: 3px"></i>
-                   趋势曲线
-                   <el-icon style="position: relative;top:3px;left: 35px">
-                       <ArrowRight/>
-                   </el-icon>
-               </div>
-               <div style="text-align: left" slot="content" @click="showDelog(tagCode,indexes,tagName)" :plain="true">
-                   <i class="icon-contrast" style="margin-right: 3px"></i>
-                   趋势对比
-                   <el-icon style="position: relative;top:3px;left: 35px">
-                       <ArrowRight/>
-                   </el-icon>
-               </div>
-           </div>
-       </div>
+        <div @mouseenter="leaveList(true)" @mouseleave="leaveList(false)"
+             v-if="visible==true && tagCode != tag1 && tagCode != tag2"
+             style="width: 192px;z-index:99;min-height: 140px; position: fixed;padding-top: 10px"
+             :style="{ left: SetX(clientXs) + 'px', top: SetY(clientYs-10) + 'px' }">
+            <div class="contrasten"
+                 :class="{'changeSer':changeSer==true,'changeWid':changeWid==true,'changeAll':changeAll==true}"
+            >
+                <div style="text-align: left" slot="content" @click="showDelogOnly(tagCode,indexes,tagName)">
+                    <i class="icon-curve" style="margin-right: 3px"></i>
+                    趋势曲线
+                    <el-icon style="position: relative;top:3px;left: 46px">
+                        <ArrowRight/>
+                    </el-icon>
+                </div>
+                <div style="text-align: left" slot="content" @click="showDelog(tagCode,indexes,tagName)" :plain="true">
+                    <i class="icon-contrast" style="margin-right: 3px"></i>
+                    趋势对比
+                    <el-icon style="position: relative;top:3px;left: 46px">
+                        <ArrowRight/>
+                    </el-icon>
+                </div>
+                <div>
+                    <i class="el-icon-time"></i>
+                    <span style="margin-left: 10px">
+                        {{ dateFormat(dialogTime) }}
+                    </span>
+                </div>
+            </div>
+
+        </div>
         <div style="position:fixed;top:400px;z-index:999;height: 26%;width: 36%;background: #0C0F15 "
              class="window" v-if="dialogVisibles==true" :style="{ left: x + 'px', top: y + 'px' }">
             <p class="ststTit header" @mousedown="startDrag">
@@ -64,6 +73,7 @@
     import dayjs from "dayjs";
     import windChartCom from "../windPowerPlant/components/lineCharts.vue";
     import {QuestionFilled} from "@element-plus/icons-vue";
+    import moment from "moment/moment";
 
     export default {
         name: 'changeCheck',//趋势对比
@@ -74,57 +84,39 @@
             qushiDialog1
         },
         props: {
-            tagCode: {
-                type: String,
-                required: true,
-            },
-            indexes: {
-                type: String,
 
-            },
-            tagName: {
-                type: String,
-                required: true,
-            },
-            visible: {
-                type: Boolean,
 
-            },
-            xs: {
-                type: Number,
-
-            },
-            changeSer: {
-                type: Boolean,
-
-            },
-            changeWid: {
-                type: Boolean,
-            },
-            changeAll: {
-                type: Boolean,
-            },
+            // changeSer: {
+            //     type: Boolean,
+            //     default: false
+            //
+            // },
+            // changeWid: {
+            //     type: Boolean,
+            //     default: false
+            // },
+            // changeAll: {
+            //     type: Boolean,
+            //     default: false
+            // },
 
-            ys: {
-                type: Number,
 
-            },
             tableData: {
                 type: Object,
-                required: true,
+                default: []
+
             },
             tag1: {
                 type: String,
-                required: true,
+                default: '-1'
+
             },
             tag2: {
                 type: String,
-                required: true,
+                default: '-1'
+
             },
-            NameCode: {
-                type: String,
-                required: true,
-            }
+
         },
         data() {
             return {
@@ -168,44 +160,121 @@
                 left: '',
                 top: '',
                 dialogFull: false,
-                chartHeight: '43vh'
+                chartHeight: '43vh',
+                clientYs: null,
+                clientXs: null,
+                changeWid: false,
+                changeSer: false,
+                changeAll: false,
+                dialogTime: '',
+                indexes: "",
+                tagName: "",
+                tagCode: "",
+                NameCode: '',
+                visible: false
+
             };
         },
         async created() {
 
             let dete = JSON.parse(localStorage.getItem('tmpData'))
             if (dete != null) {
-            //
-            //     setTimeout(() => {
-            //         if (dete.length > 0 ) {
-            //
+                //
+                //     setTimeout(() => {
+                //         if (dete.length > 0 ) {
+                //
                 this.tmpData = dete
-                        this.dialogVisibles = true
-            //
-            //         }
-            //     }, 1000)
+                this.dialogVisibles = true
+                //
+                //         }
+                //     }, 1000)
             }
 
         },
-        watch:{
-          // ys(newval,oldVal){
-          //   console.log('tagCode',this.tagCode)
-          //  console.log('indexes',this.indexes)
-          //  console.log('tagName',this.tagName)
-          //  console.log('visible',this.visible)
-          //  console.log('xs',this.xs)
-          //  console.log('ys',this.ys)
-          //  console.log('changeSer',this.changeSer)
-          //  console.log('changeWid',this.changeWid)
-          //  console.log('changeAll',this.changeAll)
-          //  console.log('tag2',this.tag2)
-          //  console.log('tag1',this.tag1)
-          //  console.log('NameCode',this.NameCode)
-          // }
+        watch: {
+            // ys(newval,oldVal){
+            //   console.log('tagCode',this.tagCode)
+            //  console.log('indexes',this.indexes)
+            //  console.log('tagName',this.tagName)
+            //  console.log('visible',this.visible)
+            //  console.log('xs',this.xs)
+            //  console.log('ys',this.ys)
+            //  console.log('changeSer',this.changeSer)
+            //  console.log('changeWid',this.changeWid)
+            //  console.log('changeAll',this.changeAll)
+            //  console.log('tag2',this.tag2)
+            //  console.log('tag1',this.tag1)
+            //  console.log('NameCode',this.NameCode)
+            // }
         },
         methods: {
-            leaveList(val){
-                this.$emit("tag", val)
+            dateFormat(num) {
+                if (typeof num == 'number') {
+                    return moment(num).format('YYYY-MM-DD HH:mm:ss')
+                } else {
+                    return num
+                }
+            },
+            getXY(tagCode, tagName, de, item, dateTime) {
+                this.tagCode = tagCode;
+                this.tagName = tagName;
+                this.indexes = de;
+                this.NameCode = item
+                this.dialogTime = dateTime
+                this.visible = true
+                if (event.clientY > window.innerHeight - 180) {
+                    this.clientYs = event.clientY - 106;
+                    this.changeSer = true;
+                    this.changeAll = false;
+                } else {
+                    this.clientYs = event.clientY + 16;
+                    this.changeSer = false;
+                }
+                if (
+                    event.clientY > window.innerHeight - 180 &&
+                    event.clientX > window.innerWidth - 180
+                ) {
+                    this.changeWid = false;
+                    this.changeSer = false;
+                    this.changeAll = true;
+                    this.clientYs = event.clientY - 106;
+                    this.clientXs = event.clientX - 165;
+                } else if (event.clientX > window.innerWidth - 180) {
+                    this.clientXs = event.clientX - 165;
+                    this.changeAll = false;
+                    this.changeWid = true;
+                } else {
+                    this.clientXs = event.clientX - 1;
+                    this.changeWid = false;
+                    this.changeAll = false;
+                }
+            },
+
+            SetY(num) {
+                let wh = this.getScale()
+                let y;
+                if (this.changeSer === true) {
+                    y = num * wh.y - 35
+                } else if (this.changeAll === true) {
+                    y = num * wh.y - 35
+                } else {
+                    y = num * wh.y
+                }
+
+                return y
+            },
+            SetX(num) {
+                let wh = this.getScale()
+                let x = num * wh.x
+                return x
+            },
+            getScale() {
+                const w = 1920 / window.innerWidth
+                const h = 1080 / window.innerHeight
+                return {x: w, y: h}
+            },
+            leaveList(val) {
+                this.visible = val
             },
 
             exportDatas() {
@@ -451,7 +520,7 @@
             showDelogOnly(data, index, title) {
 
                 this.stationTit = data
-                this.$emit("tag", false)
+                this.visible = false
                 this.leng = index
                 this.tmpDatas = []
 
@@ -477,7 +546,7 @@
 
                 this.tmpData = []
                 this.tmp = []
-                this.$emit("tag", false)
+                this.visible = false
                 this.stationTit = data
                 this.leng = index
                 let b = false;
@@ -646,34 +715,54 @@
   }
 
   .contrasten {
-    width: 172px;
+    width: 190px;
+    white-space: nowrap;
     color: #ffffff;
-    border: 1px solid #094493;
-    box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
     background: #090E19;
 
     div:first-of-type {
       margin-top: 10px;
     }
 
-    div:last-of-type {
-      margin-bottom: 10px;
-    }
 
     div {
-
       margin-left: 10px;
       padding-left: 10px;
-      width: 85%;
+      width: 157px;
       height: 35px;
       line-height: 35px;
       font-size: 14px;
+      border: 1px solid transparent;
+
     }
 
-    div:hover {
+    div:not(:last-of-type):hover {
 
-      background: linear-gradient(90deg, rgba(28, 153, 255, 0.65), rgba(28, 153, 255, 0));
+      background-color: transparent !important;
+      border-radius: 3px;
+      background-clip: padding-box, border-box;
+      background-origin: padding-box, border-box;
+      background-image: linear-gradient(135deg, #0043BF66, #090E19, #090E19), linear-gradient(to right, #1c78f9b2, rgba(0, 67, 191, .5), rgba(0, 67, 191, .5), #090E19, #090E19);
+    }
+
+    div:last-of-type {
+      margin-bottom: 5px;
+      position: relative;
+      margin-top: 7px;
+      font-size: 12px;
+      font-family: MicrosoftYaHei;
+      color: #1B99FF;
+
+    }
 
+    div:last-of-type:before {
+      content: '';
+      position: absolute;
+      top: -3px;
+      width: 140px;
+      height: 1px;
+      z-index: 999;
+      background: linear-gradient(to right, rgba(28, 153, 255, 0), rgba(27, 119, 249, 1), rgba(28, 108, 255, 0))
     }
   }
 
@@ -715,9 +804,10 @@
   }
 
   .contrasten {
-    position: fixed;
-    box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
-    //border: 1px solid #094493;
+    position: relative;
+    box-shadow: 0 0 3px rgba(27.9996, 155.998, 255, .7) !important;
+    border: 1px solid rgba(27, 113, 233, 1);
+
   }
 
   .contrasten:before {
@@ -746,15 +836,15 @@
     border-top: 15px solid transparent;
     border-left: 0px solid transparent;
     border-right: 15px solid transparent;
-    border-bottom: 10px solid #094493;
+    border-bottom: 10px solid rgba(27, 113, 233, 1);
 
   }
 
   .changeSer {
-    width: 172px;
-
+    width: 190px;
+    white-space: nowrap;
     color: #ffffff;
-    border: 1px solid #094493;
+    border: 1px solid rgba(27, 113, 233, 1);
     box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
     background: #090E19;
 
@@ -776,15 +866,11 @@
       font-size: 14px;
     }
 
-    div:hover {
-
-      background: linear-gradient(90deg, rgba(28, 153, 255, 0.65), rgba(28, 153, 255, 0));
 
-    }
   }
 
   .changeSer {
-    position: fixed;
+    position: relative;
     box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
     //border: 1px solid #094493;
   }
@@ -792,7 +878,7 @@
   .changeSer:before {
     content: '';
     position: absolute;
-    top: 88.5px;
+    top: 131px;
     left: 0;
     width: 0;
     height: 0;
@@ -801,14 +887,12 @@
     border-right: 14px solid transparent;
     border-bottom: 9px solid transparent;
     z-index: 999;
-
-
   }
 
   .changeSer:after {
     content: '';
     position: absolute;
-    top: 89px;
+    top: 132px;
     left: -.5px;
     width: 0;
     height: 0;
@@ -820,8 +904,8 @@
   }
 
   .changeWid {
-    width: 172px;
-
+    width: 190px;
+    white-space: nowrap;
     color: #ffffff;
     border: 1px solid #094493;
     box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
@@ -853,7 +937,7 @@
   }
 
   .changeWid {
-    position: fixed;
+    position: relative;
     box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
     //border: 1px solid #094493;
   }
@@ -862,7 +946,7 @@
     content: '';
     position: absolute;
     top: -9.5px;
-    left: 158.5px;
+    left: 176.5px;
     width: 0;
     height: 0;
     border-top: 0 solid transparent;
@@ -878,19 +962,17 @@
     content: '';
     position: absolute;
     top: -13px;
-    left: 159px;
+    left: 177px;
     width: 0;
     height: 0;
     border-top: 0 solid #094493;
     border-left: 13px solid transparent;
     border-right: 0 solid transparent;
     border-bottom: 13px solid #094493;
-
-
   }
 
   .changeAll {
-    width: 172px;
+    width: 190px;
 
     color: #ffffff;
     border: 1px solid #094493;
@@ -923,7 +1005,7 @@
   }
 
   .changeAll {
-    position: fixed;
+    position: relative;
     box-shadow: 0 0 22px rgba(0, 70, 199, 0.20) inset !important;
     //border: 1px solid #094493;
   }
@@ -931,8 +1013,8 @@
   .changeAll:before {
     content: '';
     position: absolute;
-    top: 88.5px;
-    left: 158.5px;
+    top: 131.5px;
+    left: 176.5px;
     width: 0;
     height: 0;
     border-top: 12px solid #090E19;
@@ -947,8 +1029,8 @@
   .changeAll:after {
     content: '';
     position: absolute;
-    top: 89.5px;
-    left: 158.5px;
+    top: 132.5px;
+    left: 176.5px;
     width: 0;
     height: 0;
     border-top: 14.5px solid #094493;

+ 101 - 40
src/views/layout/stateMonitor/factoryMonitor/components/qushiDialog.vue

@@ -281,9 +281,21 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                     });
                     return;
                 }
+
+                            //获取现在时间
+                var timestamp = Date.parse(new Date());
+
+                if(this.starttime>timestamp){
+                    this.$message({
+                        message: '开始时间不能大于当前时间',
+                        type: 'warning'
+                    });
+                    return;
+                }
+
                 if (this.starttime > this.endtime) {
                     this.$message({
-                        message: '开始日期不能小于结束日期。',
+                        message: '开始日期不能于结束日期。',
                         type: 'warning'
                     });
                     return;
@@ -313,7 +325,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                     if (res) {
 
                         let powerLineChartData = [];
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option = {
                                 title: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                 tagName: this.tmpData[index].sts,
@@ -326,21 +339,9 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                         this.chartsData = powerLineChartData
                         this.chartsDataAll = JSON.parse(JSON.stringify(this.chartsData))
                         this.dialogCurveVisible = true
-                        // let tagDatas = [];
-                        // res.forEach((value, index) => {
-                        //   var option = {
-                        //     tagName: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
-                        //     min: 0,
-                        //     max: 0,
-                        //     showy: false,
-                        //   }
-                        //   tagDatas.push(option)
-                        // })
-                        // tagDatas[0].showy = true;
-                        // this.tagDatas = tagDatas;
-                        // this.units = [this.chartsData[0].title];
-                        // this.unitDatas.push({flag: false, min: 0, max: 0,codex:0})
-                        res.forEach((value, index) => {
+                       
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option;
                             if (value != null && value.length > 0) {
                                 let dateTime = null;
@@ -358,18 +359,44 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                                         vals.push(value[j].value);
                                     }
                                 }
-                                let maxValue = (vals.sort()[0]).toFixed(2);
-                                let minValue = (vals.sort().reverse()[0]).toFixed(2);
+
+
+                                let maxValue;
+                                if(vals.sort()[0]!=undefined){
+                                  maxValue = (vals.sort()[0]).toFixed(2);
+                                }else{
+                                  maxValue = '--'
+                                }
+
+                                let minValue;
+                                if(vals.sort().reverse()[0]!=undefined){
+                                    minValue = (vals.sort().reverse()[0]).toFixed(2);
+                                }else {
+                                    minValue= '--'
+                                }
+
+
+
+
                                 let totalValue = 0;
                                 for (var k = 0; k < vals.length; k++) {
                                     totalValue += vals[k];
                                 }
-                                let avgValue = (totalValue / vals.length).toFixed(2);
+
+
+                                let avgValue;
+                                if(totalValue > 0){
+                                  avgValue= (totalValue / vals.length).toFixed(2)
+                                }else{
+                                  avgValue='--';
+                                }
+
+
                                 if (index > 0) {
-                                    avgValue = (avgValue / 1000).toFixed(2)
-                                    minValue = (minValue / 1000).toFixed(2)
-                                    maxValue = (maxValue / 1000).toFixed(2)
-                                    dateValue = (dateValue / 1000).toFixed(2)
+                                    avgValue = avgValue?(avgValue / 1000).toFixed(2):'';
+                                    minValue = minValue?(minValue / 1000).toFixed(2):''
+                                    maxValue = maxValue?(maxValue / 1000).toFixed(2):''
+                                    dateValue = dateValue?(dateValue / 1000).toFixed(2):''
                                 }
                                 option = {
                                     name: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
@@ -469,7 +496,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                 }).then(res => {
                     if (res) {
                         let powerLineChartData = [];
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             value.forEach(val => {
                                 for (let key in val) {
                                     if (key == 'value' && ined == 3 && typeof (val[key]) == "number") {
@@ -497,7 +525,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                         this.dialogCurveVisible = true
 
                         let tagDatas = [];
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option = {
                                 tagName: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                 min: 0,
@@ -510,7 +539,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                         this.tagDatas = tagDatas;
                         this.units = [this.chartsData[0].title];
                         this.unitDatas.push({flag: false, min: 0, max: 0, codex: 0})
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.value
                             var option;
                             if (value != null && value.length > 0) {
                                 let dateTime = null;
@@ -528,6 +558,7 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                                         vals.push(value[j].value);
                                     }
                                 }
+
                                 let maxValue;
                                 if(vals.sort()[0]!=undefined){
                                   maxValue = (vals.sort()[0]).toFixed(2);
@@ -555,13 +586,7 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                                   avgValue='--';
                                 }
 
-// if(index>0 && ined!=2){
-//         avgValue=(avgValue/1000).toFixed(2)
-//         minValue=(minValue/1000).toFixed(2)
-//         maxValue=(maxValue/1000).toFixed(2)
-//         dateValue=(dateValue/1000).toFixed(2)
-//
-// }
+
                                 option = {
                                     name: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                     tagName: this.tmpData[index].sts,
@@ -694,9 +719,21 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                 });
                 return;
             }
+
+            //获取现在时间
+            var timestamp = Date.parse(new Date());
+
+            if(this.starttime>timestamp){
+                this.$message({
+                    message: '开始时间不能大于当前时间',
+                    type: 'warning'
+                });
+                return;
+            }
+
             if (this.starttime > this.endtime) {
                 this.$message({
-                    message: '开始日期不能小于结束日期。',
+                    message: '开始日期不能于结束日期。',
                     type: 'warning'
                 });
                 return;
@@ -725,7 +762,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
             }).then(res => {
                 if (res) {
                     let powerLineChartData = [];
-                    res.forEach((value, index) => {
+                    res.forEach((item, index) => {
+                        let value = item.datas
                         var option = {
                             title: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                             tagName: this.tmpData[index].sts,
@@ -752,7 +790,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                     // this.tagDatas = tagDatas;
                     // this.units = [this.chartsData[0].title];
                     // this.unitDatas.push({flag: false, min: 0, max: 0,codex:0})
-                    res.forEach((value, index) => {
+                    res.forEach((item, index) => {
+                        let value = item.datas
                         var option;
                         if (value != null && value.length > 0) {
                             let dateTime = null;
@@ -770,14 +809,36 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                                     vals.push(value[j].value);
                                 }
                             }
-                            let maxValue = (vals.sort()[0]).toFixed(2);
-                            let minValue = (vals.sort().reverse()[0]).toFixed(2);
+
+
+                            let maxValue;
+                            if(vals.sort()[0]!=undefined){
+                                maxValue = (vals.sort()[0]).toFixed(2);
+                            }else{
+                                maxValue = '--'
+                            }
+
+                            let minValue;
+                            if(vals.sort().reverse()[0]!=undefined){
+                                minValue = (vals.sort().reverse()[0]).toFixed(2);
+                            }else {
+                                minValue= '--'
+                            }
+
 
                             let totalValue = 0;
                             for (var k = 0; k < vals.length; k++) {
                                 totalValue += vals[k];
                             }
-                            let avgValue = (totalValue / vals.length).toFixed(2);
+
+                            let avgValue;
+                            if(totalValue > 0){
+                                avgValue= (totalValue / vals.length).toFixed(2)
+                            }else{
+                                avgValue='--';
+                            }
+
+
                             option = {
                                 name: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                 tagName: this.tmpData[index].sts,

+ 58 - 30
src/views/layout/stateMonitor/factoryMonitor/components/qushiDialogCopy.vue

@@ -53,7 +53,7 @@
                         <div class="station">
                             时间间隔(秒)
                             <div>
-                                <el-input-number  :disabled="detailsValue.length>1" v-model="numgap" :precision="0"></el-input-number>
+                                <el-input-number  :disabled="detailsValue.length>1" v-model="numgap" :min="1" :precision="0"></el-input-number>
                             </div>
                         </div>
                         <el-button style="margin-left:15px ;" round size="mini" class="searchColor"
@@ -215,7 +215,7 @@
                         <div class="station">
                             时间间隔(秒)
                             <div>
-                                <el-input-number v-model="numgapalert" :precision="0"></el-input-number>
+                                <el-input-number :min="1" v-model="numgapalert" :precision="0"></el-input-number>
                             </div>
                         </div>
 
@@ -385,17 +385,14 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                     });
                     return;
                 }
+
+
+
+
+
                 //获取现在时间
-                var timestamp = Date.parse(new Date());
-                if (this.addStartTime > timestamp) {
-                    this.$message({
-                        message: '对比时间比能大于当前时间',
-                        type: 'warning'
-                    });
-                    return;
-                }
+                let addStartTime = Format(new Date(this.addStartTime), 'yyyy-MM-dd')
 
-                // 检测当前日期是否存在
 
                 //设置时间 取第一条时间的 时分秒
                 let a = Format(new Date(this.starttime), 'yyyy-MM-dd HH:mm:ss')+''
@@ -404,7 +401,7 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                 let arr2 = b.split(' ')
                 //获取相差天数
                 var num=(new Date(arr2[0]).getTime()-new Date(arr[0]).getTime())/(1000*60*60*24);/*不用考虑闰年否*/
-                let addStartTime = Format(new Date(this.addStartTime), 'yyyy-MM-dd')
+             
                 //结束日期自动加相差天
                 var diyDate = new Date(addStartTime)
                 var  date = new Date(diyDate.setDate(diyDate.getDate() + num));
@@ -414,6 +411,17 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                 let startTime = addStartTime+' '+arr[1]
                 let endTime = date+' '+arr2[1]
                 let obj  = {}
+
+                let timestamp = Date.parse(new Date());
+
+                // 选中的开始日期加上时间 比能大于当前时间
+                if (startTime > Format(new Date(timestamp), 'yyyy-MM-dd HH:mm:ss')+'') {
+                    this.$message({
+                        message: '开始时间比能大于当前时间',
+                        type: 'warning'
+                    });
+                    return;
+                }
                 
                 if(this.detailsValueList.length){
                     obj = this.detailsValueList[this.detailsValueList.length-1]
@@ -594,7 +602,6 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                 let tagNames = this.tmpData[0].sts
                              //默认只有一条的时候
 
-                console.log(this.detailsValueList)
                 let timeList = []
                 if(this.detailsValueList.length>1){
                     this.detailsValueList.forEach((node,index)=>{
@@ -621,8 +628,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                     if (res) {
                         let powerLineChartData = [];
 
-
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option = {
                                 title: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                 tagName: this.tmpData[index].sts,
@@ -641,7 +648,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                         this.addDialogVisible = false;
              
                       
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option;
                             if (value != null && value.length > 0) {
                                 let dateTime = null;
@@ -659,21 +667,37 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                                         vals.push(value[j].value);
                                     }
                                 }
-                                console.log(vals.sort()[0])
 
-                                let maxValue = (vals.sort()[0]).toFixed(2);
-                                let minValue = (vals.sort().reverse()[0]).toFixed(2);
+
+                                let maxValue;
+                                if(vals.sort()[0]!=undefined){
+                                  maxValue = (vals.sort()[0]).toFixed(2);
+                                }else{
+                                  maxValue = '--'
+                                }
+
+                                let minValue;
+                                if(vals.sort().reverse()[0]!=undefined){
+                                    minValue = (vals.sort().reverse()[0]).toFixed(2);
+                                }else {
+                                    minValue= '--'
+                                }
+
+
+
                                 let totalValue = 0;
                                 for (var k = 0; k < vals.length; k++) {
                                     totalValue += vals[k];
                                 }
-                                let avgValue = (totalValue / vals.length).toFixed(2);
-                                // if (index > 0) {
-                                //     avgValue = (avgValue / 1000).toFixed(2)
-                                //     minValue = (minValue / 1000).toFixed(2)
-                                //     maxValue = (maxValue / 1000).toFixed(2)
-                                //     dateValue = (dateValue / 1000).toFixed(2)
-                                // }
+
+                                let avgValue;
+                                if(totalValue > 0){
+                                  avgValue= (totalValue / vals.length).toFixed(2)
+                                }else{
+                                  avgValue='--';
+                                }
+
+
                                 option = {
                                     name: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                     tagName: this.tmpData[index].sts,
@@ -705,9 +729,9 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
 
                             // numgap
                             this.detailsValue.push(option)  // 表格数据
-                            console.log(this.detailsValue)
 
                         })
+
                       this.getCurrentDateDatas();
                     }
                 });
@@ -801,7 +825,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                 }).then(res => {
                     if (res) {
                         let powerLineChartData = [];
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             value.forEach(val => {
                                 for (let key in val) {
                                     if (key == 'value' && ined == 3 && typeof (val[key]) == "number") {
@@ -830,7 +855,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                         this.dialogCurveVisible = true
 
                         let tagDatas = [];
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option = {
                                 tagName: this.tmpData[index].stse + "" + this.tmpData[index].statiomName,
                                 min: 0,
@@ -843,7 +869,8 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                         this.tagDatas = tagDatas;
                         this.units = [this.chartsData[0].title];
                         this.unitDatas.push({flag: false, min: 0, max: 0, codex: 0})
-                        res.forEach((value, index) => {
+                        res.forEach((item, index) => {
+                            let value = item.datas
                             var option;
                             if (value != null && value.length > 0) {
                                 let dateTime = null;
@@ -861,6 +888,7 @@ import {GetCurveValues, GetRealTimeStaValues, GetRtValuesByTagName} from "../../
                                         vals.push(value[j].value);
                                     }
                                 }
+
                                 let maxValue;
                                 if(vals.sort()[0]!=undefined){
                                   maxValue = (vals.sort()[0]).toFixed(2);

+ 288 - 202
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/components/navList.vue

@@ -1,36 +1,48 @@
 <template>
     <div class="body">
-        <div class="title"><i
-                class="icon-systrem"></i>{{lightList?.aname}}</div>
+        <div class="title">
+          <img class="icon-systrem" src="../../../../../../assets/img/images/gfL.png" alt="">
+          {{lightList?.aname}}
+        </div>
+
+        <!-- 循环区域 -->
         <div class="menuList">
             <div v-if="lightList?.datas.length>=1">
-                <div class="menu" :class="{ active: menuIndex == index }" v-for="(nemu, index) in lightList?.datas"
-                     :key="index">
-                    <div style="margin-bottom: 5px" v-if="nemu.eqType=='IN' " :class="{ active4: menuIndex == index }">
+
+                <div class="menu" :class="{ active: menuIndex == index }" v-for="(nemu, index) in lightList?.datas" :key="index">
+
+                    <!-- 场站名称区域 -->
+                    <div style="margin-bottom: 5px" v-if="nemu.eqType=='IN'  || nemu.eqType == 'EMI'|| nemu.eqType == 'AM' || nemu.eqType == 'SBS'  " :class="{ active4: menuIndex == index }">
                         <div class="text" :class="getColor(nemu.SBZT)">
                             <span class="dot"></span>
                             <span class="box-text4" @click="handleClick(index,nemu,nemu.SBZT)">
-               {{ nemu.aname }}
-              </span>
+                                {{ nemu.aname }}
+                            </span>
                         </div>
+
                     </div>
+
+
                     <div class="box-text" @click="handleClick(index,nemu)" v-else >
                         <div>{{ nemu.aname }}</div>
-                        <i style="color: #1C99FF;" class="icon-bottom"
-                           v-if="menuIndex == index && nemu.datas.length>=1"></i>
-                        <i style="color: #434E5F;" class="icon-right1"
-                           v-else-if="menuIndex != index && nemu.datas.length>=1"></i>
+                          <i style="color: #fff;" class="icon-bottom"
+                            v-if="menuIndex == index && nemu.datas.length>=1"></i>
+                          <i style="color: #434E5F;" class="icon-right1"
+                             v-else-if="menuIndex != index && nemu.datas.length>=1"></i>
                     </div>
 
+
+
                     <div class="second-menu" :class="{ active: secondMenuIndex == nemuIndex  && val.datas.length>0}"
                          v-for="(val, nemuIndex) in nemu.datas" :key="nemuIndex">
-                        <div style="margin-bottom: 5px" v-if="val.eqType=='IN'"
+                        <div style="margin-bottom: 5px" v-if="val.eqType=='IN' || val.eqType == 'EMI'|| val.eqType == 'AM' || val.eqType == 'SBS' "
                              :class="{active4: secondMenuIndexs == nemuIndex }">
+
                             <div class="text" :class="getColor(val.SBZT)">
                                 <span class="dot"></span>
                                 <span class="box-text4" @click="handleClick5(nemuIndex,val,nemuIndex)">
-               {{ val.aname }}
-              </span>
+                                   {{ val.aname }}
+                                </span>
                             </div>
                         </div>
 
@@ -38,58 +50,73 @@
                         <div class="box-text1"  @click="handleClick21(nemuIndex,val,nemuIndex)" v-else-if="val.eqType == 'CB' || val.eqType == 'SCB'">
                             <div class="dot"></div>
                             <div class="text">{{ val.aname }}</div>
-                            <i style="color: #1C99FF;" class="icon-bottom"  v-if="secondMenuIndex == nemuIndex "></i>
-                            <i style="color: #434E5F;" class="icon-right1"  v-else></i>
+                          
+
+                                <i style="color: #fff;" class="icon-bottom"  v-if="secondMenuIndex == nemuIndex "></i>
+                                 <i style="color: #434E5F;" class="icon-right1"  v-else></i>
                         </div>
+
+
+
                         <div class="box-text1" @click="handleClick2(nemuIndex,val,nemuIndex)" v-else>
-                            <div class="dot"></div>
+                              <img class="changzhan" src="../../../../../../assets/img/images/navicon1.png" style="width: 16px;margin-top: 2px;" alt="">
+                              <!-- <div class="dot"></div> -->
                             <div class="text">{{ val.aname }}</div>
-                            <i style="color: #1C99FF;" class="icon-bottom"   v-if="secondMenuIndex == nemuIndex "></i>
-                            <i style="color: #434E5F;" class="icon-right1"  v-else></i>
+
+
+                                <i style="color: #fff;" class="icon-bottom"  v-if="secondMenuIndex == nemuIndex "></i>
+                                 <i style="color: #434E5F;" class="icon-right1"  v-else></i>
+
                         </div>
+
                         <div class="third-menu" :class="{ active: thridMenuIndex == valIndex1 }"
                              v-for="(item1, valIndex1) in val?.datas" :key="valIndex1">
-                            <div v-if="item1.eqType=='IN'" >
-                                <div class="wind-items" style="border-left: 1px dashed rgba(28, 153, 255, 0.5);" v-if="val.eqType == 'CB' || val.eqType == 'SCB'"
+                            <div v-if="item1.eqType=='IN' || item1.eqType == 'EMI'|| item1.eqType == 'AM' || item1.eqType == 'SBS' " class="box-text-item"  style="padding-left: 4px;">
+
+                                <div class="wind-items" v-if="val.eqType == 'CB' || val.eqType == 'SCB'"
                                      :class="{ active5: thridMenuIndexs ==nemuIndex+'-'+ valIndex1 }">
                                     <div class="text" :class="getColor(item1.SBZT)">
                                         <span class="dot"></span>
                                         <span class="box-text4" @click="dataToggles(item1,valIndex1,lightList,item1.SBZT,nemuIndex)">
-               {{ item1.aname }}
-              </span>
+                                           {{ item1.aname }}
+                                        </span>
                                     </div>
                                 </div>
-                                <div style="margin-bottom: 5px" v-else
-                                     :class="{ active4: thridMenuIndex == valIndex1 }">
+
+                                <div style="margin-bottom: 5px" v-else :class="{ active4: thridMenuIndex == valIndex1 }">
                                     <div class="text" :class="getColor(item1.SBZT)">
                                         <span class="dot"></span>
                                         <span class="box-text4" @click="dataToggle(item1,valIndex1,lightList,item1.SBZT,nemuIndex)">
-               {{ item1.aname }}
-              </span>
+                                            {{ item1.aname }}
+                                        </span>
                                     </div>
                                 </div>
+
                             </div>
+
                             <div class="box-text-item" v-else>
-                                <div class="dot"></div>
-                                <div class="text" @click="dataToggle(item1,valIndex1,lightList,item1.SBZT,nemuIndex)">{{
-                                        item1.aname
-                                    }}
+                                <!-- <div class="dot"></div> -->
+                                <img class="changzhan2" src="../../../../../../assets/img/images/navicon2.png" style="width: 14px;margin-left: 14px;" alt="">
+                                <div class="text" @click="dataToggle(item1,valIndex1,lightList,item1.SBZT,nemuIndex)">
+                                   {{item1.aname}}
                                 </div>
-                                <i style="color: #1C99FF;" class="icon-bottom" v-if="thridMenuIndex == valIndex1"
-                                   @click="handleClick3(item1,item1.datas[0].nemCode,valIndex1,lightList)"></i>
-                                <i style="color: #434E5F;" class="icon-right1" v-else
-                                   @click="handleClick3(item1,item1.datas[0].nemCode,valIndex1,lightList)"></i>
+                   
+                                  <i style="color: #fff;" class="icon-bottom" v-if="thridMenuIndex == valIndex1"
+                                    @click="handleClick3(item1,item1.datas[0].nemCode,valIndex1,lightList)"></i>
+                                  <i style="color: #434E5F;" class="icon-right1" v-else
+                                    @click="handleClick3(item1,item1.datas[0].nemCode,valIndex1,lightList)"></i>
+                                   
                             </div>
-                            <div
-                                    v-for="(item2, valIndex2) in item1?.datas" :key="valIndex2">
+
+                            <div  v-for="(item2, valIndex2) in item1?.datas" class="listnode" :key="valIndex2">
                                 <div :class="{ active: itemIndex == valIndex1 + '-' + valIndex2 }" class="wind-item"
                                      v-if="item2.datas.length==0">
                                     <div class="text" :class="getColor(item2.SBZT)">
                                         <span class="dot"></span>
                                         <span class="box-text2"
                                               @click="handleClick4(valIndex1,valIndex2,item1,item2,item2.SBZT)">
-               {{ item2.aname }}
-              </span>
+                                              {{ item2.aname }}
+                                        </span>
                                     </div>
 
                                 </div>
@@ -99,20 +126,19 @@
                                         <span class="dot"></span>
                                         <span class="box-text2"
                                               @click="handleClick4(valIndex1,valIndex2,item1,item2,item2.SBZT)">
-               {{ item2.aname }}
-              </span>
+                                            {{ item2.aname }}
+                                        </span>
                                     </div>
 
-                                    <div
-                                            v-for="(item3, valIndex3) in item2?.datas" :key="valIndex3">
+                                    <div v-for="(item3, valIndex3) in item2?.datas" :key="valIndex3">
                                         <div v-if="item3.datas.length=='0'" class="wind-item"
                                              :class="{ actives: itemIndex5 ==valIndex2 +'-' + valIndex3 }">
                                             <div class="text" :class="getColor(item3.SBZT)">
                                                 <span class="dot"></span>
                                                 <span class="box-text3"
                                                       @click="handleClick6(valIndex1,valIndex2,valIndex3,item2,item3,item3.SBZT)">
-               {{ item3.aname }}
-              </span>
+                                                   {{ item3.aname }}
+                                                </span>
                                             </div>
                                         </div>
 
@@ -122,18 +148,18 @@
                                                 <span class="dot"></span>
                                                 <span class="box-text3"
                                                       @click="handleClick6(valIndex1,valIndex2,valIndex3,item2,item3,item3.SBZT)">
-               {{ item3.aname }}
-              </span>
+                                                   {{ item3.aname }}
+                                                </span>
                                             </div>
                                             <div v-for="(item4, valIndex4) in item3?.datas" :key="valIndex4"
-                                                 class="wind-item" style="width: 119px"
+                                                 class="wind-item" style="width: 130px"
                                                  :class="{ actived: itemIndex7 ==valIndex2 + '-'+valIndex3 +'-' + valIndex4 }">
                                                 <div class="text" :class="getColor(item4.SBZT)">
                                                     <span class="dot"></span>
                                                     <span style="overflow: hidden" class="box-text7"
                                                           @click="handleClick7(valIndex1,valIndex2,valIndex3,valIndex4,item2,item4,item4.SBZT)">
-               {{ item4.aname }}
-              </span>
+                                                        {{ item4.aname }}
+                                                    </span>
                                                 </div>
                                             </div>
                                         </div>
@@ -143,7 +169,9 @@
 
 
                                 </div>
+
                             </div>
+
                         </div>
                     </div>
                 </div>
@@ -369,17 +397,15 @@
 <style lang="less" scoped>
 
   .icon-systrem {
-    position: relative;
-    left: -20px;
-    top: 1px;
-    background-image: linear-gradient(-35deg, #BDEAFF, #7AD5FF, #1C99FF, #0038A0);
-    -webkit-background-clip: text;
-    -webkit-text-fill-color: transparent;
+    position:absolute;
+    left: 20px;
+    top: 50%;
+    margin-top: -7px;
+    width: 20px;
   }
   .body {
     display: flex;
     flex-direction: column;
-    padding: 20px 5px;
     height: 100%;
     width: 100%;
   }
@@ -387,15 +413,21 @@
   .title {
     font-size: 16px;
     font-family: Source Han Sans SC;
-    font-weight: 400;
-    color: #B3B3B3;
-    margin-bottom: 13px;
-    text-align: center;
+    font-weight: 500;
+    color: #fff;
+    height: 60px;
+    line-height: 60px;
+    border-bottom: 1px solid #41474D;
+    padding-left: 46px;
+    position: relative;
+    left: 0;
+    top: 0;
   }
 
   .menuList {
     height: calc(100% - 25px);
     overflow-y: auto;
+    padding:  19px 20px;
 
     &::-webkit-scrollbar {
       width: 3px;
@@ -407,37 +439,51 @@
     display: none;
   }
 
+    // 处理第一层 场站层 最后一个的线条和曲线
   .third-menu {
     display: none;
+    &:last-child{
+        .box-text-item{
+          border: none;
+          // 最后一个元素 添加一根假线
+          &::before{
+            content: '';
+            display: block;
+            width: 1px;
+            height: 9px;
+            position: absolute;
+            left: -1px;
+            top: 0px;
+            border: 1px solid #41474D;
+          }
+
+        }
+
+    }
   }
 
   .wind-item {
     display: none;
   }
 
-  .second-menu .third-menu:last-child .box-text-item::after {
-    border-left: 1px solid #0D1015;
-  }
-
-  .second-menu .third-menu:last-child .wind-item {
-    //border-color: transparent;
-  }
+  // .second-menu .third-menu:last-child .wind-item {
+  //   border-color: transparent;
+  // }
 
   .box-text {
     width: 100%;
-    border: 1px solid rgba(67, 81, 107, 1);
+    border: 1px solid #1985DF;
     border-radius: 2px;
-    height: 32px;
-    line-height: 32px;
+    height: 36px;
+    line-height: 36px;
     font-size: 14px;
     color: #B3B3B3;
     background: rgba(39, 48, 62, 0.6);
-    text-align: center;
     display: flex;
     align-items: center;
     justify-content: space-between;
     cursor: pointer;
-    padding: 0 10px;
+    padding: 0 15px;
 
     > div {
       width: 100%;
@@ -454,20 +500,17 @@
 
     .box-text {
       width: 100%;
-      border: 1px solid rgba(67, 81, 107, 1);
-      border-radius: 2px;
-      height: 32px;
-      line-height: 32px;
+      border-radius: 4px;
+      height: 36px;
+      line-height: 36px;
       font-size: 14px;
       color: #B3B3B3;
       background: rgba(39, 48, 62, 0.6);
-      text-align: center;
       display: flex;
       align-items: center;
       justify-content: space-between;
       cursor: pointer;
-      padding: 0 10px;
-
+      padding: 0 15px;
       > div {
         width: 100%;
       }
@@ -482,23 +525,77 @@
       display: flex;
       height: 30px;
       line-height: 30px;
-      border-bottom: 1px solid rgba(23, 27, 33, 1);
-      color: #1c99ff;
+      // border-bottom: 1px solid rgba(23, 27, 33, 1);
+      color: #b3b3b3;
       align-items: center;
       justify-content: space-between;
       cursor: pointer;
-      margin: 0 10px;
+      margin: 0 15px;
       font-size: 14px;
       font-family: Arial;
 
       & > .text {
-        width: 92px;
+        width: 131px;
       }
 
       i {
         font-size: 12px;
       }
     }
+    // xhw处理西多余线问题
+    .third-menu{
+      &:last-child{
+          >.listnode{
+            >.wind-item{
+              border-left: none;
+            }
+          }
+      }
+      .listnode{
+        overflow: hidden;
+        >.wind-item{
+            >div{
+              >.wind-item{
+                >.wind-item{
+                  &:last-child{
+                    >.text{
+                      border-left: none;
+                    }
+                  }
+                }
+              }
+
+              &:last-child{
+                  >.wind-item{
+                    >.text{
+                      border-left: none;
+                    }
+                  }
+              }
+            }
+        }
+
+
+        //处理最后一个
+        &:last-child{
+            >div{
+              &:last-child{
+                >.text{
+                  border-left: none;
+                }
+              }
+              >div{
+                >.wind-item{
+                  &:last-child{
+                    border-left: none ;
+                  }
+                }
+              }
+            }
+        }
+
+      }
+    }
 
     .box-text-item {
       position: relative;
@@ -509,13 +606,16 @@
       align-items: center;
       justify-content: space-between;
       cursor: pointer;
-      margin: 0 10px 0 18px;
-      font-size: 12px;
+      margin: 0 15px 0 20px;
+      font-size: 14px;
       font-family: Arial;
-      border-left: 1px dashed rgba(28, 153, 255, 0.5);
+      border-left:  1px solid #41474D;
+      overflow: hidden;
+
+
 
       & > .text {
-        width: 74px;
+        width: 125px;
       }
 
       .dot {
@@ -525,25 +625,28 @@
       &::after {
         content: '';
         display: block;
-        width: 18px;
-        height: 15px;
-        border-top: 1px dashed rgba(28, 153, 255, 0.5);
+        width: 50px;
+        height: 50px;
         position: absolute;
-        left: -1px;
-        top: 15px;
+        left: -4px;
+        top: -33px;
+        border: 3px solid #41474D;
+        border-radius: 19px;
+        border-right: none;
+        border-top: none;
+        border-bottom: none;
+        // transform: rotate(21deg);
+
       }
     }
 
     .box-text4 {
       display: inline-block;
-      width: 84px;
       height: 22px;
       line-height: 22px;
-      border: 1px solid rgba(7, 78, 173, 0.60);
-      padding: 0 12px;
+      padding: 0 2px;
       color: #959595;
-      font-size: 12px;
-      background-color: rgba(0, 70, 199, 0.2);
+      font-size: 14px;
       cursor: pointer;
     }
     .third-menu{
@@ -555,7 +658,7 @@
       position: relative;
       color: #959595;
       margin: 0 10px 0 18px;
-      border-left: 1px dashed rgba(28, 153, 255, 0.5);
+      border-left: 1px solid rgba(28, 153, 255, 0.5);
       margin-bottom: 3px;
 
       .text{
@@ -568,7 +671,7 @@
         display: block;
         width: 15px;
         height: 18px;
-        border-top: 1px dashed rgba(28, 153, 255, 0.5);
+        border-top: 1px solid rgba(28, 153, 255, 0.5);
         position: absolute;
         left: 0;
         top: 22px;
@@ -580,61 +683,59 @@
       height: 26px;
       line-height: 26px;
       color: #959595;
-      margin: 0 10px 0 18px;
-      border-left: 1px dashed rgba(28, 153, 255, 0.5);
+      margin: 0 10px 0 20px;
+      // border-left: 1px solid rgba(28, 153, 255, 1);
+      border-left:1px solid #41474D;
+      left: 0;
+      top: 0;
 
       .text {
-        margin-left: 18px;
-        border-left: 1px dashed rgba(28, 153, 255, 0.5);
+        margin-left: 20px;
+         border-left: 1px solid #41474D;
         width: 95%;
-        padding-left: 10px;
+        padding-left: 12px;
         display: flex;
         align-items: center;
         height: 26px;
         line-height: 26px;
 
+
+
+
         .box-text2 {
           display: inline-block;
-          width: 123px;
           height: 22px;
-          line-height: 22px;
-          border: 1px solid rgba(7, 78, 173, 0.60);
-          padding: 0 12px;
+          line-height: 19px;
+          padding: 0 5px;
           color: #959595;
-          font-size: 12px;
-          background-color: rgba(0, 70, 199, 0.2);
+          font-size: 14px;
           cursor: pointer;
         }
       }
 
       .box-text3 {
         display: inline-block;
-        width: 104px;
         height: 22px;
         line-height: 22px;
-        border: 1px solid rgba(7, 78, 173, 0.60);
-        padding: 0 12px;
         color: #959595;
-        font-size: 12px;
-        background-color: rgba(0, 70, 199, 0.2);
+        padding: 0px 4px;
+        font-size: 14px;
         cursor: pointer;
 
       }
       .box-text7{
         display: inline-block;
-        width: 84px;
         height: 22px;
         line-height: 22px;
-        border: 1px solid rgba(7, 78, 173, 0.60);
-        padding: 0 12px;
+        padding: 0 4px;
         color: #959595;
-        font-size: 12px;
-        background-color: rgba(0, 70, 199, 0.2);
+        font-size: 14px;
         cursor: pointer;
       }
       .actived {
         .box-text7 {
-          background-color: rgba(0, 70, 199, 0.4);
+          border: 1px solid #1985DF;
+          border-radius: 5px;
           color: #fff;
         }
 
@@ -642,41 +743,46 @@
 
       .actives {
         .box-text3 {
-          background-color: rgba(0, 70, 199, 0.4);
+          border: 1px solid #1985DF;
+          border-radius: 5px;
           color: #fff;
         }
 
       }
 
-      &::after {
+      &::after{
         content: '';
         display: block;
-        width: 15px;
-        height: 18px;
-        border-top: 1px dashed rgba(28, 153, 255, 0.5);
+        width: 40px;
+        height: 50px;
         position: absolute;
-        left: 16px;
-        top: 13px;
+        left: 20px;
+        top: -35px;
+        border: 1px solid #41474D;
+        border-radius: 17px;
+        border-right: none;
+        border-top: none;
+        border-bottom: none;
       }
 
       .dot {
-        width: 5px;
-        height: 5px;
+        width: 9px;
+        height: 9px;
         background-color: RGBA(20, 94, 155, 1);
       }
 
-      &:last-child::after {
-        border-left: 1px solid #0D1015;
-      }
+      // &:last-child::after {
+      //   border-left: 1px solid #0D1015;
+      // }
     }
 
     .dot {
       display: inline-block;
-      width: 7px;
-      height: 7px;
+      width: 9px;
+      height: 9px;
       border-radius: 50%;
       border: 1px solid rgba(28, 153, 255, 1);
-      box-shadow: 0 0 7px rgb(28 153 255);
+      box-shadow: 0 0 2px rgb(28 153 255);
       margin-right: 7px;
       margin-left: 5px;
       background-color: RGBA(10, 13, 17, 1);
@@ -685,7 +791,7 @@
 
     &.active {
       .box-text {
-        color: #1C99FF;
+        color: #fff;
       }
 
       .second-menu {
@@ -693,23 +799,12 @@
 
         &.active {
           .box-text1 {
-            color: #1C99FF;
+            color: #fff;
 
             .dot {
               background-color: RGBA(20, 94, 155, 1);
               z-index: 99;
             }
-
-            &::after {
-              content: '';
-              display: block;
-              width: 12px;
-              height: 12px;
-              border-left: 1px dashed rgba(28, 153, 255, 0.5);
-              position: absolute;
-              left: 8px;
-              top: 17px;
-            }
           }
 
           .third-menu {
@@ -717,59 +812,45 @@
 
             &.active {
               .box-text-item {
-                color: #1C99FF;
+                color: #fff;
 
                 .dot {
-                  background-color: RGBA(20, 94, 155, 1);
+                  // background-color: RGBA(20, 94, 155, 1);
                   z-index: 99;
                 }
-
-                &::after {
-                  border-right: 1px dashed rgba(28, 153, 255, 0.5);
-                }
               }
 
               .wind-item {
                 display: block;
-
-                .green .dot {
-                  background-color: rgba(5, 187, 76, .7);
-                  border-color: #05BB4C;
+                >div{
+                  overflow: hidden;
                 }
 
-                .blue .dot {
-                  background-color: rgba(28, 153, 255, .7);
-                  border-color: #1C99FF;
-                }
 
-                .pink .dot {
-                  background-color: rgba(197, 48, 200, .7);
-                  border-color: #C530C8;
+                .blue .dot {
+                  background-color: #35A5FF;
+                  border-color:#002F57;
                 }
 
                 .red .dot {
-                  background-color: rgba(186, 50, 55, .7);
-                  border-color: #BA3237;
+                  background-color: #B93137;
+                   border-color:#5A0003;
                 }
 
                 .orange .dot {
-                  background-color: rgba(247, 135, 14, .7);
-                  border-color: #F7870E;
+                     background-color:#E17D23;
+                      border-color:#5B2A00;
                 }
 
                 .gray .dot {
-                  background-color: rgba(86, 86, 86, .7);
-                  border-color: #565656;
-                }
-
-                .write .dot {
-                  background-color: rgba(255, 255, 255, .7);
-                  border-color: #FFFFFF;
+                  background-color:#A7A7A7;
+                  border-color: #585858;
                 }
 
                 &.active {
                   .box-text2 {
-                    background-color: rgba(0, 70, 199, 0.4);
+                    border: 1px solid #1985DF;
+                    border-radius: 5px;
                     color: #fff;
                   }
 
@@ -777,53 +858,58 @@
               }
 
             }
+
+            &:first-child{
+              background: red;
+            }
+
+
+
+
           }
         }
+
+
+
       }
     }
   }
 
   .active4 .box-text4 {
-    background-color: rgba(0, 70, 199, 0.4);
+    border: 1px solid #1985DF;
+    border-radius: 5px;
     color: #fff;
   }
   .active5 .box-text4{
-    background-color: rgba(0, 70, 199, 0.4);
+    border: 1px solid #1985DF;
+    border-radius: 5px;
     color: #fff;
   }
 
-  .green .dot {
-    background-color: rgba(5, 187, 76, .7);
-    border-color: #05BB4C;
-  }
-
   .blue .dot {
-    background-color: rgba(28, 153, 255, .7);
-    border-color: #1C99FF;
+    background-color: #35A5FF;
+    border-color:#002F57;
   }
 
-  .pink .dot {
-    background-color: rgba(197, 48, 200, .7);
-    border-color: #C530C8;
-  }
+
 
   .red .dot {
-    background-color: rgba(186, 50, 55, .7);
-    border-color: #BA3237;
+    background-color: #B93137;
+    border-color:#5A0003;
   }
 
   .orange .dot {
-    background-color: rgba(247, 135, 14, .7);
-    border-color: #F7870E;
+    background-color:#E17D23;
+    border-color:#5B2A00;
   }
 
   .gray .dot {
-    background-color: rgba(86, 86, 86, .7);
-    border-color: #565656;
+    background-color: #A7A7A7;
+    border-color: #585858;
   }
 
-  .write .dot {
-    background-color: rgba(255, 255, 255, .7);
-    border-color: #FFFFFF;
-  }
+
+.icon-bottom{
+  font-size: 12px !important;
+}
 </style>

+ 25 - 74
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightDataTarget/components/lightDataGF.vue

@@ -53,17 +53,11 @@
                 >
                     <template v-slot="scope" v-if="cilent=='click'">
                         <el-tag   @click="v(item.tagCode,scope.$index,item,scope.row, scope.row[`${item.tagCode}`])">
-                            <el-tooltip
-                                    v-if="item.tagName!=='设备名称' && item.tagName!=='设备类型'"
-                                    effect="dark"
-                                    :content="getchangeTime(scope.row[`${item.tagCode}` + 'date'])"
-                                    placement="right"
-                            >
-                                 <span style="cursor: pointer">
+
+                                 <span   v-if="item.tagName!=='设备名称' && item.tagName!=='设备类型'" style="cursor: pointer">
                         {{ scope.row[`${item.tagCode}`+'value'] }}
                    </span>
 
-                            </el-tooltip>
                             <span v-else>   {{
 
                                     scope.row[`${item.tagCode}`] || '--'
@@ -74,17 +68,11 @@
                     <template v-slot="scope" v-else>
 
                         <el-tag  @contextmenu="v(item.tagCode,scope.$index,item,scope.row, scope.row[`${item.tagCode}`])">
-                            <el-tooltip
-                                    v-if="item.tagName!=='设备名称' && item.tagName!=='设备型号'"
-                                    effect="dark"
-                                    :content="getchangeTime(scope.row[`${item.tagCode}` + 'date'])"
-                                    placement="right"
-                            >
-                                 <span style="cursor: pointer">
+
+                                 <span  v-if="item.tagName!=='设备名称' && item.tagName!=='设备型号'" style="cursor: pointer">
                         {{ scope.row[`${item.tagCode}`+'value'] }}
                    </span>
 
-                            </el-tooltip>
                             <span v-else>   {{
 
                                     scope.row[`${item.tagCode}`] || '--'
@@ -105,11 +93,7 @@
                 </el-table-column>
 
             </el-table>
-            <dialog-check :tagCode="tagCode" :changeWid="changeWid" :changeSer="changeSer" :changeAll="changeAll"
-                          :indexes="indexes"
-                          :tableData="tableData" :tagName="tagName" :xs="xs" :ys="ys"
-                          :NameCode="name" :visible="visible" v-on:tag="colseList($event)" :tag1="SBAMC"
-                          :tag2="SBXH"></dialog-check>
+            <dialog-check ref="tagChild"></dialog-check>
 
         </div>
         <el-dialog v-model="dialogVisible" width="1200px">
@@ -158,6 +142,7 @@
     } from '@/api/factoryMonitor'
     import {GetRtValuesByTagName} from "@api/stateMonitor";
     import {GetPowerstationTypeList,GetEquipmentTypesInfoByStationCode} from "../../../../../../../api/factoryMonitor";
+import { rtDataRefreshTime } from "../../../../../../../config";
 
     export default {
         name: 'lightDataTarget',
@@ -217,7 +202,8 @@
                 downName:'',
                 downType:'',
                 name:'',
-                tagscode:''
+                tagscode:'',
+                dialogTime:''
 
             }
         },
@@ -228,8 +214,8 @@
         },
         mounted() {
             this.timer = setInterval(() => {
-                // this.dataHandler();
-            }, 3000)
+                this.dataHandler();
+            }, rtDataRefreshTime)
         },
         unmounted() {
             clearInterval(this.timer);
@@ -245,23 +231,6 @@
 
             },
 
-            //转换时间
-            getchangeTime(data) {
-                if (data != undefined && data != '') {
-                    var date = new Date(data)
-                    var y = date.getFullYear();
-                    var m = date.getMonth() + 1;
-                    var d = date.getDate()
-                    var h = date.getHours()
-                    var f = date.getMinutes()
-                    var s = date.getSeconds();
-                    m = m < 10 ? ('0' + m) : m;
-                    d = d < 10 ? ('0' + d) : d;
-                    return y + '-' + m + '-' + d + ' ' + h + ':' + f + ':' + s
-                } else {
-                    return ''
-                }
-            },
             async getList(){
                 let data = window.localStorage.getItem('alllocalTarge'+ this.titleCode);
                 if (data != null && JSON.stringify(data) != "{}") {
@@ -356,43 +325,25 @@
                 }
             },
 
-            colseList(s) {
-                this.visible = s
-            },
+
             v(tagCode, index, tagName,name,de) {
+                if(de !=='') {
 
-                this.name=name.SBMC
-                this.cilent = process.env.VUE_APP_DIALOG_POINT;
-                this.visible = true
-                this.tagscode=name.CZBM
-                this.tagCode = tagCode
-                this.indexes = de
-                this.tagName = tagName.tagName
-
-                if (event.clientY > (window.innerHeight - 180)) {
-                    this.ys = event.clientY - 106
-                    this.changeSer = true
-                    this.changeAll = false
-                } else {
-                    this.ys = event.clientY + 16
-                    this.changeSer = false
-                }
-                if (event.clientY > (window.innerHeight - 180) && event.clientX > (window.innerWidth - 172)) {
-                    this.changeWid = false
-                    this.changeSer = false
-                    this.changeAll = true
-                    this.ys = event.clientY - 106
-                    this.xs = event.clientX - 171
-
-                } else if (event.clientX > (window.innerWidth - 172)) {
-                    this.xs = event.clientX - 171
-                    this.changeAll = false
-                    this.changeWid = true
+                    this.cilent = process.env.VUE_APP_DIALOG_POINT;
+
+                    this.tagscode = name.CZBM
+
+                    this.$refs.tagChild.getXY(tagCode, tagName.tagName, de,  name.SBMC, name[tagCode + 'date'])
 
                 } else {
-                    this.xs = event.clientX - 1
-                    this.changeWid = false
-                    this.changeAll = false
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
                 }
                 event.preventDefault();
             },

+ 90 - 86
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightDataTarget/index.vue

@@ -1,89 +1,92 @@
 <template>
-    <div class="DataTarget">
+  <div class="DataTarget">
 
-        <header-button-gf   @renderData="renderData" ></header-button-gf>
-        <lightDataGF v-if="tagListNode=='-2'" ref="data"/>
+    <!-- <header-button-gf   @renderData="renderData" ></header-button-gf> -->
+    <HeaderBtn @onChange="renderData" />
+    <lightDataGF v-if="tagListNode == '-2'" ref="data" />
   </div>
-
 </template>
 
 <script>
-    import lightDataGF from "./components/lightDataGF";
-    import utils from "@/utils/downXlsx";
-    import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
-    import headerButton from '../../components/headerButton'
-    import headerButtonGf from "../../components/headerButtonGf";
-    import {
-        GetCompanyEquipmentsIndicator,
-        GetMoreUniformCodesList,
-        GetDefaultUniformCodesList,
-        GetDataTargetsByStationType
-    } from '@/api/factoryMonitor'
-import {GetRtValuesByTagName} from "@api/stateMonitor";
-    import {GetPowerstationTypeList} from "../../../../../../api/factoryMonitor";
+import lightDataGF from "./components/lightDataGF";
+import utils from "@/utils/downXlsx";
+import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
+
+// import headerButton from '../../components/headerButton'
+// import headerButtonGf from "../../components/headerButtonGf";
+import {
+  GetCompanyEquipmentsIndicator,
+  GetMoreUniformCodesList,
+  GetDefaultUniformCodesList,
+  GetDataTargetsByStationType
+} from '@/api/factoryMonitor'
+import { GetRtValuesByTagName } from "@api/stateMonitor";
+import { GetPowerstationTypeList } from "../../../../../../api/factoryMonitor";
+import HeaderBtn from "../../../photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue";
 
 export default {
   name: 'lightDataTarget',
   components: {
-    headerButton,
-      dialogCheck,
-      headerButtonGf,
-      lightDataGF
+    // headerButton,
+    HeaderBtn,
+    dialogCheck,
+    // headerButtonGf,
+    lightDataGF
   },
-    props:{
+  props: {
 
-    },
+  },
   data() {
     return {
-        tagListNode:null,
-        changeAll: false,
-        changeWid: false,
-        changeSer: false,
-        loading: false,
-        SBMC: 'SBMC',
-        SBAMC: 'SBAMC',
-        TargetData:[],
-        SBXH: 'SBXH',
-        tagCode: '',
-        indexes: 0,
-        tagName: '',
-        statiomName: [],
-        stse: [],
-        sts: [],
-        stationTit: null,
-        leng: '',
-        dialogVisibles: false,
-        stationData: null,
-        stationCode: null,
-        dialogVisible: false,
-        stationType: -2,
-        moreTargetData: null,
-        checkList: [],
-        uniformDetial: [],
-        timer: '',
-        tableData: [],
-        codeValur: null,
-        visible: false,
-        headerIndex: 0,
-        x: 500,
-        y: 250,
-        dragging: false,
-        currentX: 50,
-        currentY: 0,
-        initialX: 0,
-        initialY: 0,
-        tableShow: true,
-        tmp: [],
-        xs: 0,
-        ys: 0,
-        tmpData: [],
-        cilent: '',
-        pageSize: 25,
-        stationDatasd: [],
-        titleCode:'',
-        winduniformCode:null,
-        downName:'',
-        downType:''
+      tagListNode: null,
+      changeAll: false,
+      changeWid: false,
+      changeSer: false,
+      loading: false,
+      SBMC: 'SBMC',
+      SBAMC: 'SBAMC',
+      TargetData: [],
+      SBXH: 'SBXH',
+      tagCode: '',
+      indexes: 0,
+      tagName: '',
+      statiomName: [],
+      stse: [],
+      sts: [],
+      stationTit: null,
+      leng: '',
+      dialogVisibles: false,
+      stationData: null,
+      stationCode: null,
+      dialogVisible: false,
+      stationType: -2,
+      moreTargetData: null,
+      checkList: [],
+      uniformDetial: [],
+      timer: '',
+      tableData: [],
+      codeValur: null,
+      visible: false,
+      headerIndex: 0,
+      x: 500,
+      y: 250,
+      dragging: false,
+      currentX: 50,
+      currentY: 0,
+      initialX: 0,
+      initialY: 0,
+      tableShow: true,
+      tmp: [],
+      xs: 0,
+      ys: 0,
+      tmpData: [],
+      cilent: '',
+      pageSize: 25,
+      stationDatasd: [],
+      titleCode: '',
+      winduniformCode: null,
+      downName: '',
+      downType: ''
 
     }
   },
@@ -96,28 +99,29 @@ export default {
 
   },
   methods: {
+    renderData({stationCode, type}) {
+      this.tagListNode = type
+      setTimeout(() => {
+        this.$refs.data.getHeaderNum(0, stationCode)
+      }, 15)
+    }
 
 
-
-      async renderData(stationCode, inde, ind, ine, tagListNode) {
-          this.tagListNode = tagListNode
-          setTimeout(() => {
-              this.$refs.data.getHeaderNum(0, stationCode)
-          }, 15)
+    // async renderData(stationCode, inde, ind, ine, tagListNode) {
+    //   this.tagListNode = tagListNode
+    //   setTimeout(() => {
+    //     this.$refs.data.getHeaderNum(0, stationCode)
+    //   }, 15)
 
 
-      },
+    // },
 
   }
 }
 </script>
 
 <style lang="less" scoped>
-
-
-
-
-  .DataTarget {
-    height: 100%;
-  }
+.DataTarget {
+  height: 100%;
+}
 </style>

+ 34 - 30
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/components/lightCard.vue

@@ -33,19 +33,13 @@
                                      style="padding-top: 10px">
                                     <p>{{ item.name }}</p>
                                     <p>
-                                        <el-tooltip
-                                                v-if="item.name!=='接入容量'"
-                                                effect="dark"
-                                                :content="getchangeTime(value[item.dataTime])"
-                                                placement="right"
-                                        >
-                                                        <span> {{
-                                                                Number(value[item?.value]).toFixed(2) ||  '--'
+
+                                                        <span v-if="item.name!=='接入容量'" @contextmenu="handDialog(item,value[item?.type],value)"> {{
+                                                                value[item?.value] ? Number(value[item?.value]).toFixed(2) :  '--'
                                                             }}</span>
 
-                                        </el-tooltip>
                                         <span v-else> {{
-                                                Number(value[item?.value]).toFixed(2) ||  '--'
+                                                value[item?.value] ?  Number(value[item?.value]).toFixed(2) :  '--'
                                             }}</span>
 
                                     </p>
@@ -76,10 +70,12 @@
             </div>
         </el-dialog>
     </div>
+    <dialog-check
+            ref="tagChild"/>
 </template>
 
 <script>
-
+import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
     import lightDetial from "@com/lightDetial";
 
     export default {
@@ -101,7 +97,8 @@
 
         },
         components: {
-            lightDetial
+            lightDetial,
+            dialogCheck
         },
         data() {
             return {
@@ -115,8 +112,31 @@
 
         },
         methods: {
+
+            z(s) {
+                this.visible = s;
+            },
+
+            // 点击趋势对比
+            handDialog(val, de, item) {
+                if(de!=='') {
+
+                    this.$refs.tagChild.getXY(val.type, val.name, de, this.lightList.aname + item.aname, item[val.dataTime])
+
+                }else {
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
+                }
+                event.preventDefault();
+            },
             handleClickMatrix(val) {
-                console.log(val,"val")
+
                 this.displayMatrixz = true
                 let obj = {
                     namesed: '2'
@@ -145,23 +165,7 @@
                 }
             },
 
-            //转换时间
-            getchangeTime(data) {
-                if (data != undefined && data != '') {
-                    var date = new Date(data)
-                    var y = date.getFullYear();
-                    var m = date.getMonth() + 1;
-                    var d = date.getDate()
-                    var h = date.getHours()
-                    var f = date.getMinutes()
-                    var s = date.getSeconds();
-                    m = m < 10 ? ('0' + m) : m;
-                    d = d < 10 ? ('0' + d) : d;
-                    return y + '-' + m + '-' + d + ' ' + h + ':' + f + ':' + s
-                } else {
-                    return ''
-                }
-            },
+
         },
         computed: {
 

+ 112 - 74
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/components/lightList.vue

@@ -1,84 +1,94 @@
 <template>
-
-            <el-table-column
-                    type="index"
-                    label="序号"
-                    align="center"
-                    fixed
-                    class-name="anames"
-                    width="52">
-            </el-table-column>
-            <el-table-column
-                    prop="aname"
-                    label="设备名称"
-                    align="center"
-                    fixed
-                    width="100">
-            </el-table-column>
-            <el-table-column v-for="(item,index) in electTarget" :key="index"
-                             sortable
-                             align="center"
-                             header-align="center"
-                             :resizable="true"
-                             :width="item.width"
-                             :min-width="item.width"
-                             :fixed="index<2"
-            >
-                <template v-slot="scope">
-                    <div>
-                        <el-tooltip
-
-                                effect="dark"
-                                :content="getchangeTime(scope.row[`${item.dataTime}`])"
-                                placement="right"
-                        >
-                              <span>
-                        {{ scope.row[`${item.value}`] ? scope.row[`${item.value}`].toFixed(2)  : '--' }}
+    <el-table
+
+            :data="test"
+            ref="multipleTable"
+            :cell-style="cellStyle"
+            :header-cell-style="headerStyle"
+            height="900px"
+            style="width: 100%"
+            fit
+            empty-text=" "
+            v-loading="loading"
+            stripe>
+        <el-table-column
+                type="index"
+                label="序号"
+                align="center"
+                fixed
+                class-name="anames"
+                width="52">
+        </el-table-column>
+        <el-table-column
+                prop="aname"
+                label="设备名称"
+                align="center"
+                fixed
+                width="100">
+        </el-table-column>
+        <el-table-column v-for="(item,index) in electTarget" :key="index"
+                         sortable
+                         align="center"
+                         header-align="center"
+                         :resizable="true"
+                         :width="item.width"
+                         :min-width="item.width"
+
+        >
+            <template v-slot="scope">
+                <div>
+                              <span v-if="item.name==='转换率'">
+                        {{ dataToFix2(scope.row[`${item.value}`]) }}
+                   </span>
+                    <span v-else @contextmenu="handDialog(item,scope.row[`${item.type}`],scope.row)">
+                        {{ dataToFix2(scope.row[`${item.value}`]) }}
                    </span>
-                        </el-tooltip>
-
-                    </div>
-                </template>
-                <template #header>
-                    <div v-if="item.unite">
-                        <div >{{ item.name }}</div>
-                        <div >({{ item.unit ? item.unit : '--' }})</div>
-                    </div>
-                    <div v-else>
-                        <div style="line-height: 50px">{{ item.name }}</div>
-                    </div>
-                </template>
-            </el-table-column>
+
+                </div>
+            </template>
+            <template #header>
+                <div v-if="item.unite">
+                    <div>{{ item.name }}</div>
+                    <div>({{ item.unit ? item.unit : '--' }})</div>
+                </div>
+                <div v-else>
+                    <div style="line-height: 50px">{{ item.name }}</div>
+                </div>
+            </template>
+        </el-table-column>
+    </el-table>
+    <dialog-check ref="tagChild"/>
 
 </template>
 
 <script>
-
+    import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
     import utils from "@/utils/downXlsx";
 
     export default {
         name: 'matrixMatrix',
-        props:{
-            test:{
-                type:Object
+        props: {
+            test: {
+                type: Object
+            },
+            electTarget: {
+                type: Object
             },
-            electTarget:{
-                type:Object
+            lightList: {
+                type: String
             },
-            lightList:{
-                type:String
+            data2: {
+                type: Object
             },
-            data2:{
-                type:Object
+            loading: {
+                type: Boolean
             },
         },
         components: {
-
+            dialogCheck
         },
         data() {
-            return {
-
-            }
+            return {}
         },
 
         created() {
@@ -86,6 +96,33 @@
         },
         methods: {
 
+
+            // 点击趋势对比
+            handDialog(val, de, item) {
+                if (de !== '') {
+                    this.$refs.tagChild.getXY(val.type, val.name, de, this.lightList + item.aname, item[val.dataTime])
+
+                } else {
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
+                }
+                event.preventDefault();
+            },
+
+            dataToFix2(obj) {
+                console.log(obj, "onj")
+                if (obj === '' || obj === undefined) {
+                    return '--'
+                } else {
+                    return obj.toFixed(2)
+                }
+            },
             //转换时间
             getchangeTime(data) {
                 if (data != undefined && data != '') {
@@ -98,6 +135,7 @@
                     var s = date.getSeconds();
                     m = m < 10 ? ('0' + m) : m;
                     d = d < 10 ? ('0' + d) : d;
+                    s = s < 10 ? ('0' + s) : s;
                     return y + '-' + m + '-' + d + ' ' + h + ':' + f + ':' + s
                 } else {
                     return ''
@@ -105,18 +143,18 @@
             },
 
             // 导出
-            downXlsxes(){
+            downXlsxes() {
 
                 let headers = []
 
                 this.electTarget.forEach(it => {
-                    if(it.valueUnit!=''){
-                        headers.push(it.name +'(' + it.unit +')')
-                    }else {
-                        headers.push(it.name )
+                    if (it.valueUnit != '') {
+                        headers.push(it.name + '(' + it.unit + ')')
+                    } else {
+                        headers.push(it.name)
                     }
                 })
-                utils.exportExcel(this.$refs['multipleTable'].$el, '序号'+'设备名称'+headers, this.lightList)
+                utils.exportExcel(this.$refs['multipleTable'].$el, '序号' + '设备名称' + headers, this.lightList)
 
             },
             cellStyle({row, column, rowIndex, columnIndex}) {
@@ -126,11 +164,11 @@
                     return {'backdrop-filter': 'blur(10px)', 'padding': '7px 0', 'font-size': '13px'}
                 }
             },
-            headerStyle({row, column, rowIndex, columnIndex}){
-                if (columnIndex < 3){
-                    return {'backdrop-filter': 'blur(10px)','padding':'6px 0'}
-                }else {
-                    return {'padding':'6px 0'}
+            headerStyle({row, column, rowIndex, columnIndex}) {
+                if (columnIndex < 3) {
+                    return {'backdrop-filter': 'blur(10px)', 'padding': '6px 0'}
+                } else {
+                    return {'padding': '6px 0'}
                 }
             },
             deepClone(ob) {

+ 94 - 462
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/components/lightMatrixGF.vue

@@ -146,52 +146,22 @@
                 </div>
 
                 <div v-if="isActive === 'card'"
-                        style="height: 100%;width:100%;overflow-y: auto;" ref="bodyList">
+                        style="height: 899px;width:100%;overflow-y: auto;" ref="bodyList">
                     <light-card  :test="test" :lightList="lightList"
                                 :electTarget="electTarget"/>
 
                 </div>
                 <div  v-if="isActive === 'list'">
-                    <el-table
-
-                            :data="test"
-                            ref="multipleTable"
-                            :cell-style="cellStyle"
-                            :header-cell-style="headerStyle"
-                            height="900px"
-                            style="width: 100%"
-                            fit
-                            empty-text=" "
-                            v-loading="loading"
-                            stripe>
-                        <light-list ref="childred" :lightList="lightList.aname" :test="test"
+
+                        <light-list ref="childred" :lightList="lightList.aname" :test="test" :loading="loading"
                                     :electTarget="electTarget"/>
-                    </el-table>
+
 
                 </div>
             </div>
         </div>
 
-        <el-dialog width="90%" top="80px" v-model="displayZhi" :show-close="true"
-                   :destroy-on-close="true">
-            <template #title>
-                <div class="dialog-title">
-                    <img class="dialog-title-img" src="@assets/img/images/dialog-title.png"/>
-                    <div class="title">支路</div>
-                </div>
-            </template>
-            <img class="dialog-img" style="position:absolute;right: 0px;bottom: 40px"
-                 src="@assets/img/images/dialog.png"/>
-            <div class="dialog-body" style="height:66vh;position: relative">
 
-                <by-pase :zzdlNum="zzdlNum" :sbssglGray="sbssglGray" :sbssglIng="sbssglIng" :sbssglLength="sbssglLength"
-                         :data2="data2" @tableApi="tableApi" :valTndex="valTndex"
-                         :valArea="valArea"
-                         :valLine="valLine" :inverterData="inverterData" :dataesed="dataesed"
-                         :heigth="'62vh'"></by-pase>
-            </div>
-
-        </el-dialog>
         <el-dialog width="50%" top="80px" v-model="displaySet" :show-close="true"
                    :destroy-on-close="true">
             <template #title>
@@ -238,6 +208,7 @@
     import {GetBranchEquipments, GetEquipmentsBySquareId} from "@api/factoryMonitor";
     import byPase from "@com/byPase";
     import utils from "@/utils/downXlsx";
+import { rtDataRefreshTime } from "../../../../../../../config";
 
     export default {
         name: 'matrixMatrix',
@@ -316,7 +287,6 @@
                 color: ["#1985de", "#ff8300", "#06a746", "#3eede7", "#eb0f7c", "#dfdc0a", "#de0feb", "#cca4e3"],
                 stationName: '',
                 displayMatrix: false,
-                displayZhi: false,
                 activeName: '',
                 chartsDatas: [],
                 dialogDetail: false,
@@ -570,20 +540,7 @@
             this.$nextTick(() => this.addRollListener())
         },
         methods: {
-            cellStyle({row, column, rowIndex, columnIndex}) {
-                if (columnIndex > 2) {
-                    return {'font-family': 'Arial', 'padding': '7px 0', 'font-size': '13px'}
-                } else {
-                    return {'backdrop-filter': 'blur(10px)', 'padding': '7px 0', 'font-size': '13px'}
-                }
-            },
-            headerStyle({row, column, rowIndex, columnIndex}){
-                if (columnIndex < 3){
-                    return {'backdrop-filter': 'blur(10px)','padding':'6px 0'}
-                }else {
-                    return {'padding':'6px 0'}
-                }
-            },
+
             downXlsxFn() {
                 this.data3 = this.data2.datas
                 let headers = []
@@ -595,28 +552,38 @@
                         headers.push(it.name )
                     }
                 })
-                console.log(this.lightList,"99")
-                setTimeout(() => {
 
+                setTimeout(() => {
                     utils.exportExcel(this.$refs['multipleTable'].$el, '序号'+'设备名称'+headers, this.lightList.aname)
                 }, 1000)
             },
+            // 切换矩阵
             changeCard() {
+                this.numList=40
+                this.data3=[]
                 let s = this.deepClone(this.setTarget)
-                this.electTarget = s.splice(0, 4)
+                this.electTarget = s.splice(0, 4) //改变指标
                 this.isActive = 'card'
                 this.getPoint(this.stationCode)
+                setTimeout(() => {
+                    this.addRollListener()
+                }, 100);
             },
+
+            // 切换列表
             changeList() {
+                this.numList=25
                 this.data3=[]
                 this.loading = true
                 this.isActive = 'list'
-                this.electTarget = this.setTarget
+                this.electTarget = this.setTarget //改变指标
                 this.getPoint(this.stationCode)
                 setTimeout(() => {
                     this.addRollListener()
                 }, 100);
             },
+
+            // 切换场站
             getHeaderNum(name, stationCode, type, headerIndex, numList, sortCode, changeLength, current) {
                 this.stationName = name;
                 this.stationCode = stationCode;
@@ -640,7 +607,7 @@
             },
             addRollListener() {
 
-                if (this.isActive == 'list') {
+                if (this.isActive === 'list') {
                     let doms = document.getElementsByClassName("el-table__body-wrapper")[0]
                     doms.addEventListener('scroll', () => {
                         const scrollTop = doms.scrollTop
@@ -649,28 +616,30 @@
                         const scrollHeight = doms.scrollHeight
 
                         if (clientHeight + scrollTop + 1 > scrollHeight || offsetHeight + scrollTop >= scrollHeight) {
-                            this.numList += 10
+                            this.numList += 15
+                            let ss = this.deepClone(this.data2.datas)
+                            this.data3 = ss.splice(0, this.numList)
+                        }
+                    })
+                }else {
+                    const dom = this.$refs.bodyList
+                    dom.addEventListener('scroll', () => {
+                        const scrollTop = dom.scrollTop
+                        const windowHeight = window.innerHeight;
+                        const scrollHeight = dom.scrollHeight
+
+                        if (scrollHeight - (scrollTop + windowHeight) < 10 && this.data2.datas.length !== this.data3.length) {
+                            this.numList += 16
                             let ss = this.deepClone(this.data2.datas)
                             this.data3 = ss.splice(0, this.numList)
                         }
                     })
                 }
-                const dom = this.$refs.bodyList
-                dom.addEventListener('scroll', () => {
-                    const scrollTop = dom.scrollTop
-                    const windowHeight = window.innerHeight;
-                    const scrollHeight = dom.scrollHeight
-
-                    if (scrollHeight - (scrollTop + windowHeight) < 10 && this.data2.datas.length != this.data3.length) {
-                        this.numList += 10
-                        let ss = this.deepClone(this.data2.datas)
-                        this.data3 = ss.splice(0, this.numList)
-                    }
-                })
 
-            },
 
+            },
 
+            // 点击自定义指标修改指标
             change(val) {
                 if (val.length > 4) {
                     this.$message({
@@ -685,11 +654,6 @@
 
             },
 
-            handleCurrentChange(val) {
-                this.pageVal = val
-                this.page.currentPage = val;
-                this.getRtValuesByTagName();
-            },
             // 点击场站
             handTitle() {
                 this.changeLength = ''
@@ -697,20 +661,19 @@
                 this.secondMenuIndex = -1
                 this.thridMenuIndex = -1
                 this.stationCode = this.lightList.nemCode
-
-                this.getPoint(this.lightList.nemCode, this.electType)
+                this.getPoint(this.lightList.nemCode)
             },
             //排序方式改变
             sortTypechange() {
                 this.sortType = !this.sortType;
                 this.sortFilterchange()
             },
-
+            // 点击期次请求数据
             handleClicked(val, nemu, it) {
                 this.changeLength = ''
                 this.stationCode = nemu.nemCode
                 this.secondMenuIndex = '-1'
-                this.getPoint(nemu.nemCode, this.electType)
+                this.getPoint(nemu.nemCode)
                 this.menuIndex = val
             },
             // 切换title
@@ -762,14 +725,14 @@
                         list.push(s.type)
                     })
                     this.electType = list
-                    this.getPoint(this.stationCode, this.electType)
+                    this.getPoint(this.stationCode)
                     this.current = 'all'
                     this.changeLength = ''
                     this.sortCode = ''
                     this.displaySet = false
                 }
             },
-
+            // 点击期次收合图标收起
             handleClickBottom(val, nemu, it) {
                 this.itemIndex5 = '-1'
                 this.thridMenuIndexs = -1
@@ -779,6 +742,7 @@
                 this.itemIndex = '0'
                 this.menuIndex = -1
             },
+            // 点击期次收合图标展开并请求数据
             handleClickRight(val, nemu, it) {
                 this.itemIndex5 = '-1'
                 this.thridMenuIndexs = -1
@@ -789,10 +753,10 @@
                 this.changeLength = ''
 
                 this.stationCode = nemu.nemCode
-                this.getPoint(nemu.nemCode, this.electType)
+                this.getPoint(nemu.nemCode)
                 this.menuIndex = val
             },
-
+            // 获取左侧树型结构
             async getSquareEquipmentsOfTree() {
                 let s;
                 if (this.$route.query.nemCode != undefined) {
@@ -823,22 +787,23 @@
                         })
                     })
 
-                    this.getPoint(s, '')
+                    this.getPoint(s)
 
                 }
 
 
             },
-
+            // 点击线路
             handleClick2(val, ined, index) {
                 this.changeLength = ''
-
                 this.stationCode = ined.nemCode
                 this.thridMenuIndex = "-1"
-                this.getPoint(ined.nemCode, this.electType)
+                this.getPoint(ined.nemCode)
                 this.secondMenuIndex = val
 
             },
+
+            // 点击右侧收合展开并请求数据
             handleClick2Right(val, ined, index) {
                 this.itemIndex7 = '-1'
                 this.itemIndex5 = '-1'
@@ -847,9 +812,11 @@
                 this.itemIndex = "0-0"
                 this.changeLength = ''
                 this.stationCode = ined.nemCode
-                this.getPoint(ined.nemCode, this.electType)
+                this.getPoint(ined.nemCode)
                 this.secondMenuIndex = val
             },
+
+            // 点击右侧收合收起
             handleClick2Bottom(val, ined, index) {
                 this.itemIndex7 = '-1'
                 this.itemIndex5 = '-1'
@@ -858,7 +825,7 @@
                 this.itemIndex = "0-0"
                 this.secondMenuIndex = -1
             },
-
+            // 点击阵区请求数据
             dataToggle(val1, index, menu, va, ind) {
                 this.changeLength = ''
                 this.itemIndex7 = '-1'
@@ -867,28 +834,9 @@
                 this.thridMenuIndexs = ind + '-' + index
                 this.thridMenuIndex = index
                 this.stationCode = val1.nemCode
-                this.getPoint(val1.nemCode, this.electType)
+                this.getPoint(val1.nemCode)
             },
 
-            //转换时间
-            getchangeTime(data) {
-                if (data != undefined && data != '') {
-                    var date = new Date(data)
-                    var y = date.getFullYear();
-                    var m = date.getMonth() + 1;
-                    var d = date.getDate()
-                    var h = date.getHours()
-                    var f = date.getMinutes()
-                    var s = date.getSeconds();
-                    m = m < 10 ? ('0' + m) : m;
-                    d = d < 10 ? ('0' + d) : d;
-                    return y + '-' + m + '-' + d + ' ' + h + ':' + f + ':' + s
-                } else {
-                    return ''
-                }
-            },
-
-
             resetData() {
                 this.menuIndex = 0
                 this.secondMenuIndex = 0
@@ -899,123 +847,16 @@
             sortFilterchange() {
                 this.getRtValuesByTagName()
             },
-            getColor(state) {
-                switch (state) {
-                    case 0:
-                        return "blue"
-                    case 1:
-                        return "orange"
-                    case 2:
-                        return "red"
-                    case 3:
-                        return "gray"
-                    case "":
-                        return "gray"
-                    default:
-                        return "gray"
-                }
-            },
 
 
-            curveSwitchData(e) {
-                this.value = e.showy
-                let option = "{";
-                this.detailsValue.forEach((value, index) => {
-                    option += "'" + value.name + "'" + ":" + value.showy + ","
-                })
-                option = option.substring(0, option.length - 1)
-                option += "}";
-                let json = eval("(" + option + ")");
-                this.$refs.windChartCom.changDateVisible(json)
-            },
-            tagCellStyle({row, column, rowIndex, columnIndex}) {
-                if (!row.showy) {
-                    return {color: '#525252', fontSize: '11px'};
-                }
-                if ((columnIndex == 0 || columnIndex == 1) && row.showy) {
-                    return {color: this.color[rowIndex], fontSize: '13px'};
-                } else {
-                    return {padding: '6px 0px'};
-                }
-            },
-            tableApi(pag) {
-                let padTitle = this.deepClone(this.inverterDatas)
-                this.pageSize = pag
-                this.inverterData = padTitle.splice(0, pag)
-            },
-
-            handleClicks(item1, code, index, index1, index2, index3) {
-
-                let obj = {
-                    eqType: 'IN',
-                    conqType: 'ZC',
-                    namesed: '1',
-
-                }
-                this.displayMatrix = true
-                setTimeout(() => {
-                    this.$refs.lightDetial.render(obj, code.nemCode, index);
-                }, 100);
-            },
-            handleCurveClick(inde, index) {
-                if (inde >= 5) {
-                    let s = this.deepClone(this.stsee[index])
-                    let y = this.deepClone(this.stse)
-
-                    y?.forEach(val => {
-                        for (let key in val) {
-                            for (let k in s) {
-                                if (val[key] == k) {
-                                    val[key] = s[k]
-                                }
-                            }
-                        }
-                    })
-
-                    this.$refs.child.openCurvDatas(y)
-                }
-            },
-
-
-            dataToFix(obj) {
-                if (obj) {
-                    if (obj == '' && obj == "undefined") {
-                        return '0'
-                    } else {
-                        return obj.toFixed(0)
-                    }
-                } else {
-                    return "0"
-                }
-            },
             dataToFix2(obj) {
-                if (obj) {
-                    if (obj == '' || obj == "undefined") {
-                        return '0.00'
-                    } else {
-                        return obj.toFixed(2)
-                    }
+                if (obj === '' || obj === undefined) {
+                    return '--'
                 } else {
-                    return "0.00"
+                    return obj.toFixed(2)
                 }
             },
 
-            affectedCic(i) {
-                switch (i) {
-                    case 0:
-                        return "zcyx"
-                    case 1:
-                        return "dzyx"
-                    case 2:
-                        return "sbtj"
-                    case 3:
-                        return "txzd"
-                    case "":
-                        return "txzd"
-                    default:
-                        return "txzd"
-                }
-            },
             affected(i) {
                 switch (i) {
                     case 0:
@@ -1049,37 +890,15 @@
                             s.unite = s.type + '-UNIT'
                         }
                     })
-
                     this.setTarget = this.deepClone(data)
-
-                    let list = [];
                     this.electTarget = data.splice(0, 4)
-                    this.electTarget.forEach(s => {
-                        list.push(s.type)
-                    })
-                    this.electType = list
-                }
-
-            },
-            async a() {
 
-            },
-            ListClick(data, val, mes, index1, index2, index3, value) {
-                this.displayZhi = true
-                this.Listval = val?.SQMC
-                this.Listmes = mes?.XLMC
-                this.valTndex = index1
-                this.valLine = index2
-                this.valArea = index3
-                this.getEquipmentsBySquareId(value.QCBM, mes.XLBM, data);
-            },
+                }
 
-            tabChick(index) {
-                this.activeName = index
-                this.a()
             },
 
-            async getPoint(val, uniformCodes) {
+            // 请求数据接口
+            async getPoint(val) {
 
                 const data = await GetequipmentsByStationCode({
                     stationCode: val,
@@ -1108,6 +927,7 @@
                     // }
                     // this.activeNames = arr
                     this.data1 = this.deepClone(data)
+
                     this.electTarget.forEach(item => {
                         if (item.name == "转换率") {
                             item.unit = '%'
@@ -1117,34 +937,34 @@
                     })
                     let str = '';
                     let result = '';
-                    let dat = data?.DZYXTS + "|" + data?.TXZDTS + "|" + data?.ZCYXTS + "|" + data?.SBTJTS
                     let date1 = data?.datas.flatMap(s => {
                         this.electTarget.forEach(item => {
-                            str = str + '|' + s[item.type]
+                            str = str + s[item.type] + '|'
                         })
                         result = str + '|' + s.SBZT + '|' + s.AIG007 + '|' + s.AIG010
                         return result
 
                     })
 
-                    let n = date1.join("|") + "|" + dat;
-
+                    let n = date1.join("|");
                     let v = n.split("|").filter(d => {
                         return !(d == "undefined" || d == "");
                     })
-                    if (n.length == 0) {
-                        return
-                    }
+
                     this.z = v.join("|")
                     this.getRtValuesByTagName()
 
                 } else {
+                    this.loading = false
+                    this.ststionName=''
                     this.data1 = ''
                     this.z = ''
                     this.data3 = []
                     this.data2 = []
                 }
             },
+
+            // 请求实时数据接口
             async getRtValuesByTagName() {
 
                 if (this.z.length == 0) {
@@ -1162,7 +982,7 @@
                     let data1 = this.deepClone(this.data1)
                     this.electTarget?.forEach(s => {
                         data1?.datas.forEach(function (item) {
-                            item[s.type + 'Num'] = map.get(item[s.type]) ? map.get(item[s.type]) : ''
+                            item[s.type + 'Num'] = map.get(item[s.type])
                             item[s.type + 'Time'] = maps.get(item[s.type])
 
                         })
@@ -1171,7 +991,7 @@
 
                     data1.datas.flatMap(s => {
                         s.zhUnit = '%'
-                        s.ZHLNum = (map.get(s.AIG007) / map.get(s.AIG010)) * 100 ? (map.get(s.AIG007) / map.get(s.AIG010)) * 100 : ''
+                        s.ZHLNum = (map.get(s.AIG007) / map.get(s.AIG010)) * 100
                         s.ZHLTime = maps.get(s.AIG007)
                         s.SBZT = map.get(s.SBZT) ? Number(map.get(s.SBZT).toFixed(0)) : ''
 
@@ -1180,7 +1000,6 @@
                     let sortCo = this.sortCode;
 
                     data1.datas = data1.datas.sort(function (a, b) {
-
                         if (sort) {
                             return b[sortCo] - a[sortCo]
                         } else {
@@ -1207,8 +1026,8 @@
                     data1.TJZT = list3.length
                     data1.ZDZT = list4.length
                     this.loading = false
-                    this.data2 = this.deepClone(data1)
-                    this.data3 = data1?.datas.splice(0, this.numList);
+                    this.data2 =this.deepClone(data1)
+                    this.data3 = data1?.datas;
                 }
             },
 
@@ -1217,49 +1036,12 @@
                 var objClone = JSON.parse(obj)
                 return objClone
             },
-            handleDetailClickList(val, data) {
-
-                let s = this.deepClone(val)
-                let y = this.deepClone(this.ssPv)
 
-                y?.forEach(val => {
-                    for (let key in val) {
-                        for (let k in s) {
-                            if (val[key] == k) {
-                                val[key] = s[k]
-                            } else if (val[key] == 'stse') {
 
-                                val[key] = data + s.SBAMC
-                            }
-                        }
-                    }
-                })
-
-                this.$refs.child.openCurvDatas(y, 2)
-            },
-            handleDetailClick(val, index) {
-                let s = val
-                let y = this.deepClone(this.ssPv)
-                y?.forEach(val => {
-                    for (let key in val) {
-                        for (let k in s) {
-                            if (val[key] == k) {
-                                val[key] = s[k]
-                            } else if (val[key] == 'stse') {
-                                val[key] = s.name
-                            }
-                        }
-                    }
-                })
-
-                this.$refs.child.openCurvDatas(y, 2)
-            },
 // 点击筛选
             handleClick(val, index) {
-                console.log(index,"index")
                 this.changeLength = index
                 this.current = val
-                this.numList = 40
             },
             //     handleStationCurveClick() {
             //         let s = this.deepClone(this.glStsee)
@@ -1279,193 +1061,43 @@
         },
         computed: {
             test: function () {
-
+                var newData=[]
                 if (this.current !== 'all') {
-                    this.v = this.deepClone(this.data2.datas)
+                    this.v = this.deepClone(this.data3)
                     switch (this.current) {
                         case '0':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 0 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 0 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 0 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 0
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-
-                                    })
-
-                                })
+                                this.v =  this.v.filter(f => {
+                                    return (f.SBZT === 0)
                             });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
+                            newData = this.v.splice(0, this.numList)
+                            return newData;
 
                         case '1':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 1 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 1 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 1 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 1
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-                                    })
-
-                                })
+                                this.v = this.v?.filter(f => {
+                                    return f.SBZT === 1
                             });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
+                            newData = this.v.splice(0, this.numList)
+                            return newData;
 
                         case '2':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 2 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 2 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 2 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 2
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-                                    })
-
-                                })
-
+                                this.v = this.v.filter(f => {
+                                    return f.SBZT === 2
                             });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
+                            newData = this.v.splice(0, this.numList)
+                            return newData;
 
                         case '3':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2)
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-
-
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
 
-                        case 'xd':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 4 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 4 || f.eqType != "IN")
-                                })
-                                m.codes.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 4 || f.eqType != "IN")
-                                    })
-                                    m2.codes.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 4
-                                        })
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'sl':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 5 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 5 || f.eqType != "IN")
-                                })
-                                m.codes.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 5 || f.eqType != "IN")
-                                    })
-                                    m2.codes.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 5
-                                        })
-                                    })
-                                })
+                            this.v = this.v.filter(f => {
+                                    return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 )
                             });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'lx':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 6 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 6 || f.eqType != "IN")
-                                })
-                                m.codes.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 6 || f.eqType != "IN")
-                                    })
-                                    m2.codes.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 6
-                                        })
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
+                            newData = this.v.splice(0, this.numList)
+                            return newData;
                     }
 
-
                 } else {
-                    return this.data3
+                    newData = this.data3.splice(0, this.numList)
+                    return newData
                 }
 
             }
@@ -1473,7 +1105,7 @@
         mounted() {
             this.timer = setInterval(() => {
                 this.getRtValuesByTagName()
-            }, 3000);
+            }, rtDataRefreshTime);
         },
         unmounted() {
             clearInterval(this.timer);

+ 58 - 49
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor/index.vue

@@ -1,68 +1,77 @@
 <template>
     <div>
-        <header-button-gf :data="data" :conCode="conCode" @renderData="renderData" ></header-button-gf>
-      <lightMatrixGF v-if="tagListNode==-'2'"  ref="data" />
+        <!-- <header-button-gf :data="data" :conCode="conCode" @renderData="renderData" ></header-button-gf> -->
+        <HeaderBtn @onChange="renderData" />
+        <lightMatrixGF v-if="tagListNode == -'2'" ref="data" />
     </div>
 </template>
 
 <script>
-    import lightMatrixGF from "./components/lightMatrixGF";
-    import headerButtonGf from "@/views/layout/stateMonitor/factoryMonitor/components/headerButtonGf";
-
-
-    export default {
-        name: 'lightMatrixMonitorZQ',
-        props:{
-            data:{
-                type:String
-            },
-            conCode:{
-                type:String
-            }
-        },
-        components: {
-            headerButtonGf,
-            lightMatrixGF
-        },
-        data() {
-            return {
-                tagListNode:null,
-                czType:'',
-            }
-        },
+import HeaderBtn from "../../../photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue";
+import lightMatrixGF from "./components/lightMatrixGF";
+// import headerButtonGf from "@/views/layout/stateMonitor/factoryMonitor/components/headerButtonGf";
 
-        created() {
 
-            if(this.$route.query.czType!=undefined && this.$route.query.czType!=''){
-                this.czType=this.$route.query.czType
-
-            }else {
-                this.czType='all'
-            }
+export default {
+    name: 'lightMatrixMonitorZQ',
+    props: {
+        data: {
+            type: String
         },
-        methods: {
-
-            renderData(stationCode, type, name, headerIndex,tagListNode) {
+        conCode: {
+            type: String
+        }
+    },
+    components: {
+        // headerButtonGf,
+        HeaderBtn,
+        lightMatrixGF
+    },
+    data() {
+        return {
+            tagListNode: null,
+            czType: '',
+        }
+    },
+
+    created() {
+
+        if (this.$route.query.czType != undefined && this.$route.query.czType != '') {
+            this.czType = this.$route.query.czType
+
+        } else {
+            this.czType = 'all'
+        }
+    },
+    methods: {
+        renderData({ stationCode, type, node }) {
+            this.tagListNode = type
+            setTimeout(() => {
+                this.$refs.data.getHeaderNum(node.aname, stationCode, type, type, 40, '', '', this.czType)
+
+            }, 15)
 
-                this.tagListNode=tagListNode
-                setTimeout(() => {
-                    this.$refs.data.getHeaderNum(name,stationCode,type,headerIndex,40,'','',this.czType)
+        },
+        // renderData(stationCode, type, name, headerIndex, tagListNode) {
+        //     this.tagListNode = tagListNode
+        //     setTimeout(() => {
+        //         this.$refs.data.getHeaderNum(name, stationCode, type, headerIndex, 40, '', '', this.czType)
 
-                }, 15)
+        //     }, 15)
 
-            },
-        },
-        computed: {
+        // },
+    },
+    computed: {
 
-        },
-        mounted() {
+    },
+    mounted() {
 
-        },
-        unmounted() {
+    },
+    unmounted() {
 
 
-        },
-    }
+    },
+}
 
 </script>
 

+ 70 - 41
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/components/lightMatrixCard.vue

@@ -8,7 +8,7 @@
                     <div class="matrix-card"
                     >
                         <!--                                            :class="affected(value?.SBZT)"-->
-                        <div class="info" >
+                        <div class="info">
                             <!--                                    :class="affectedCic(value?.SBZT)"-->
                             <div class="nameTop" style="display: flex">
 
@@ -41,19 +41,14 @@
                                      style="padding-top: 10px">
                                     <p>{{ item.name }}</p>
                                     <p>
-                                        <el-tooltip
-                                                v-if="item.name!=='接入容量'"
-                                                effect="dark"
-                                                :content="getchangeTime(value[item.dataTime])"
-                                                placement="right"
-                                        >
-                                                        <span> {{
-                                                                Number(value[item?.value]).toFixed(2) ||  '--'
+
+                                                        <span v-if="item.name!=='接入容量'"
+                                                              @contextmenu="handDialog(item,value[item?.type],value)"> {{
+                                                                dataToFix2(value[item?.value])
                                                             }}</span>
 
-                                        </el-tooltip>
                                         <span v-else> {{
-                                                Number(value[item?.value]).toFixed(2) ||  '--'
+                                                dataToFix2(value.jrCapacity)
                                             }}</span>
                                     </p>
 
@@ -74,38 +69,41 @@
         </div>
 
     </div>
+    <dialog-check
+            ref="tagChild"/>
 </template>
 
 <script>
 
-
+    import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
 
     export default {
         name: 'matrixMatrix',
-        props:{
-            test:{
-                type:Object
+        props: {
+            test: {
+                type: Object
             },
-            electTarget:{
-                type:Object
+            electTarget: {
+                type: Object
             },
-            lightList:{
-                type:Object
+            lightList: {
+                type: Object
             },
-            secondMenuIndex:{
-                type:String
+            secondMenuIndex: {
+                type: String
             },
-            menuIndex:{
-                type:String
+            menuIndex: {
+                type: String
             }
 
         },
         components: {
-
+            dialogCheck
         },
         data() {
             return {
-
+                // 趋势对比曲线
+                cilent: "", //区分点击事件触发条件
 
             }
         },
@@ -115,10 +113,40 @@
 
         },
         methods: {
+            dataToFix2(obj) {
+                if (obj === '' || obj === undefined) {
+                    return '--'
+                } else {
+                    return obj.toFixed(2)
+                }
+            },
+
+
+            // 点击趋势对比
+            handDialog(val, de, item) {
+                if (de !== '') {
+                    this.cilent = process.env.VUE_APP_DIALOG_POINT; //区分鼠标左右键点击
+                    this.$refs.tagChild.getXY(val.type, val.name, de, this.lightList.aname + item.aname, item[val.dataTime])
+
+                } else {
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
 
-            openLightMatrix(value,index){
+                }
+                event.preventDefault();
+            },
 
-                this.$router.push({ path: "/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor" ,query:{stationCode:this.lightList.nemCode,nemCode:value.nemCode,}});
+            openLightMatrix(value, index) {
+
+                this.$router.push({
+                    path: "/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitor",
+                    query: {stationCode: this.lightList.nemCode, nemCode: value.nemCode,}
+                });
             },
 
             //转换时间
@@ -139,9 +167,7 @@
                 }
             },
         },
-        computed: {
-
-        },
+        computed: {},
         mounted() {
 
         },
@@ -161,7 +187,7 @@
     height: 25px;
     box-sizing: border-box;
 
-    div:first-child{
+    div:first-child {
       border-right: 1px solid #455066;
     }
 
@@ -203,12 +229,14 @@
     position: absolute;
     right: 20px;
     bottom: 5px;
-    .el-button:first-child{
-      background-color: rgba(0, 70, 199, 0.2)!important;
+
+    .el-button:first-child {
+      background-color: rgba(0, 70, 199, 0.2) !important;
       color: #B3B3B3;
       border-color: transparent;
     }
   }
+
   .buttons {
     background: rgba(67, 81, 107, 0.3) !important;
     border: 1px solid #3B4C6C;
@@ -375,9 +403,6 @@
   .bottomTit {
     width: 100%;
     height: 117px;
-    z-index: 2;
-    margin-top: -15px;
-
     //background: #282F3D;
     //background: rgba(65,78,111,0.3);
 
@@ -388,18 +413,22 @@
     display: flex;
     justify-content: space-between;
     width: 90%;
-    height: 15px;
+    height: 26px;
     font-size: 14px;
-    margin: 12px auto 0;
+    margin: 0 auto;
 
     p {
-      width: 90px;
+      width: 100px;
+      height: 26px;
       color: #ABB8CD;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      overflow: hidden;
     }
 
     p:last-of-type {
       text-align: left;
-      width: 25px;
+      width: 45px;
       font-size: 13px;
     }
 
@@ -1989,7 +2018,7 @@
         height: 155px;
         position: relative;
         border: 1px solid #343D59;
-        background: rgba(65,78,111,0.3);
+        background: rgba(65, 78, 111, 0.3);
         border-radius: 10px;
 
 

+ 27 - 205
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/components/lightMatrixGF.vue

@@ -42,7 +42,7 @@
                 </div>
             </div>
             <div class="matrix-body detail"
-                 style="height:100%;background-color: rgba(0, 0, 0, 0.45);border-radius: 0 0 5px 5px;padding: 5px 10px 10px 10px">
+                 style="height:960px;background-color: rgba(0, 0, 0, 0.45);border-radius: 0 0 5px 5px;padding: 5px 10px 10px 10px">
 
                 <div class="body-title" style="position:relative;">
                     <div class="title-name">
@@ -104,11 +104,11 @@
                     <!--                    </div>-->
 
                 </div>
-                <div v-if="isActive === 'card'"  style="height: 100%;width:100%;overflow-y: auto;" ref="bodyList">
-                      <light-matrix-card   :lightList="lightList" :test="test" :electTarget="electTarget"></light-matrix-card>
+                <div v-if="isActive === 'card'"  style="height: 899px;width:100%;overflow-y: auto;" ref="bodyList">
+                      <light-matrix-card   :lightList="lightList" :test="data3" :electTarget="electTarget"></light-matrix-card>
                 </div>
                 <div  v-if="isActive === 'list'">
-                    <light-matrix-list ref="childred" :lightList="lightList.aname" :test="test" :electTarget="electTarget" />
+                    <light-matrix-list ref="childred" :lightList="lightList.aname" :test="data3" :electTarget="electTarget" />
                 </div>
 
 
@@ -191,6 +191,7 @@
     import {GetBranchEquipments, GetEquipmentsBySquareId} from "@api/factoryMonitor";
     import byPase from "@com/byPase";
     import utils from "@/utils/downXlsx";
+import { rtDataRefreshTime } from "../../../../../../../config";
 
     export default {
         name: 'matrixMatrix',
@@ -453,6 +454,7 @@
                 this.getPoint(this.stationCode)
             },
             changeList(){
+                this.data3=[]
                 this.electTarget =this.setTarget
                 this.isActive = 'list'
                 this.getPoint(this.stationCode)
@@ -779,7 +781,7 @@
             },
             dataToFix2(obj) {
                 if (obj) {
-                    if (obj == '' || obj == "undefined") {
+                    if (obj === '' || obj === undefined) {
                         return '0.00'
                     } else {
                         return obj.toFixed(2)
@@ -835,10 +837,13 @@
                         s.value = s.type + 'Num'
                         s.dataTime = s.type + 'Time'
                         if(s.name!='接入容量'){
+
                             s.unite = s.type + '-UNIT'
                         }
                     })
 
+
+
                     this.setTarget = this.deepClone(data)
                     let list = [];
                     this.electTarget = data.splice(0, 4)
@@ -882,6 +887,7 @@
                     for (let i = 0; i < data.datas?.length; i++) {
                         arr.push(i + 1)
                     }
+
                     this.activeNames = arr
                     this.data1 = this.deepClone(data)
                     this.electTarget.forEach(item => {
@@ -896,17 +902,21 @@
 
                     let str = '';
                     let result = '';
-                    let dat = data?.DZYXTS + "|" + data?.TXZDTS + "|" + data?.ZCYXTS + "|" + data?.SBTJTS
+
                     let date1 = data?.datas.flatMap(s => {
+
                         this.electTarget.forEach(item => {
-                            str = str + '|' + s[item.type]
+                            if(item.name!=='接入容量'){
+                                str = str + '|' + s[item.type]
+                            }
+
                         })
                         result = str + '|' + s.SBZT
                         return result
 
                     })
 
-                    let n = date1.join("|") + "|" + dat;
+                    let n = date1.join("|")
 
                     let v = n.split("|").filter(d => {
                         return !(d == "undefined" || d == "");
@@ -919,6 +929,7 @@
                     this.current = 'all'
 
                 } else {
+                    this.ststionName=''
                     this.data1 = ''
                     this.z = ''
                     this.data3=[]
@@ -927,9 +938,10 @@
             },
             async getRtValuesByTagName() {
 
-                if (this.z.length == 0) {
+                if (this.z.length == 0 || this.z=='') {
                     this.data2 = this.data1
-                    return
+                    this.data3 = this.data1?.datas
+
                 } else {
                     const lists = await GetRtValuesByTagName(this.z)
                     let map = new Map();
@@ -942,7 +954,7 @@
                     let data1 = this.deepClone(this.data1)
                     this.electTarget?.forEach(s => {
                         data1?.datas.forEach(function (item) {
-                            item[s.type + 'Num'] = map.get(item[s.type]) ? map.get(item[s.type]) :''
+                            item[s.type + 'Num'] = map.get(item[s.type])
                             item[s.type + 'Time'] = maps.get(item[s.type])
 
                         })
@@ -950,8 +962,7 @@
                     })
 
                     data1.datas.flatMap(s => {
-                        s.zhUnit='MW'
-                        s.jrCapacityNum=s.jrCapacity
+
                         s.SBZT = map.get(s.SBZT) ? Number(map.get(s.SBZT).toFixed(0)) : ''
                         return s.codes?.flatMap(z => {
                             z.SBZT = map.get(z.SBZT) ? Number(map.get(z.SBZT).toFixed(0)) : ''
@@ -976,7 +987,8 @@
                             return a[sortCo] - b[sortCo]
                         }
                     })
-                    this.data2 = this.deepClone(data1)
+                    this.data2 =data1
+
                     // this.page.total = this.data2.datas?.length
                     // this.data3 = data1?.datas
                     this.data3 = data1?.datas
@@ -1064,203 +1076,13 @@
             //     }
         },
         computed: {
-            test: function () {
-
-                if (this.current !== 'all') {
-                    this.v = this.deepClone(this.data2.datas)
-                    switch (this.current) {
-                        case 'yx':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 0 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 0 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 0 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 0
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-
-                                    })
-
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'gz':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 1 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 1 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 1 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 1
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-                                    })
-
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'tj':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 2 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 2 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 2 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 2
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-                                    })
-
-                                })
-
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
 
-                        case 'zd':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 || f.eqType != "IN")
-                                })
-                                m.codes?.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2 || f.eqType != "IN")
-                                    })
-                                    m2.codes?.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return (f.SBZT != 0 && f.SBZT != 1 && f.SBZT != 2)
-                                        })
-                                        m2.codes = m2.codes.filter(s => {
-                                            return s.codes.length != 0
-                                        })
-
-
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'xd':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 4 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 4 || f.eqType != "IN")
-                                })
-                                m.codes.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 4 || f.eqType != "IN")
-                                    })
-                                    m2.codes.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 4
-                                        })
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'sl':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 5 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 5 || f.eqType != "IN")
-                                })
-                                m.codes.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 5 || f.eqType != "IN")
-                                    })
-                                    m2.codes.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 5
-                                        })
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-
-                        case 'lx':
-                            this.v = this.v?.filter(f => {
-                                return (f.SBZT === 6 || f.eqType != "IN")
-                            })
-                            this.v.forEach((m, index) => {
-                                m.codes = m.codes?.filter(f => {
-                                    return (f.SBZT === 6 || f.eqType != "IN")
-                                })
-                                m.codes.forEach((m2, ind) => {
-                                    m2.codes = m2.codes?.filter(f => {
-                                        return (f.SBZT === 6 || f.eqType != "IN")
-                                    })
-                                    m2.codes.forEach((m1, ined) => {
-
-                                        m1.codes = m1.codes.filter(f => {
-                                            return f.SBZT === 6
-                                        })
-                                    })
-                                })
-                            });
-                            this.v = this.v.splice(0, this.numList)
-                            return this.v;
-                    }
-
-
-                } else {
-                    return this.data3
-                }
-
-            }
         },
         mounted() {
             this.timer = setInterval(() => {
                 this.getRtValuesByTagName()
 
-            }, 3000);
+            }, rtDataRefreshTime);
         },
         unmounted() {
             clearInterval(this.timer);

+ 65 - 35
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/components/lightMatrixList.vue

@@ -34,29 +34,23 @@
                              :resizable="true"
                              :width="item.width"
                              :min-width="item.width"
-                             :fixed="index<2"
+
             >
                 <template v-slot="scope">
                     <div>
-                        <el-tooltip
-                                v-if="item.name!=='接入容量'"
-                                effect="dark"
-                                :content="getchangeTime(scope.row[`${item.dataTime}`])"
-                                placement="right"
-                        >
-                              <span>
-                        {{ scope.row[`${item.value}`] ? scope.row[`${item.value}`].toFixed(2)  : '--' }}
+
+                              <span  v-if="item.name!=='接入容量'" @contextmenu="handDialog(item,scope.row[`${item.type}`],scope.row)">
+                        {{  dataToFix2(scope.row[`${item.value}`])}}
                    </span>
-                        </el-tooltip>
-                   <span v-else>
-                        {{ scope.row[`${item.value}`] ? scope.row[`${item.value}`].toFixed(2)  : '--' }}
+                        <span v-else>
+                        {{ dataToFix2(scope.row.jrCapacity)}}
                    </span>
                     </div>
                 </template>
                 <template #header>
                     <div v-if="item.unite">
-                        <div >{{ item.name }}</div>
-                        <div >({{ item.unit ? item.unit : '--' }})</div>
+                        <div>{{ item.name }}</div>
+                        <div>({{ item.unit ? item.unit : '--' }})</div>
                     </div>
                     <div v-else>
                         <div style="line-height: 50px">{{ item.name }}</div>
@@ -66,30 +60,34 @@
 
         </el-table>
     </div>
+    <dialog-check
+            ref="tagChild"/>
 </template>
 
 <script>
-
+    import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
     import utils from "@/utils/downXlsx";
 
     export default {
         name: 'matrixMatrix',
-        props:{
-            test:{
-                type:Object
+        props: {
+            test: {
+                type: Object
             },
-            electTarget:{
-                type:Object
+            electTarget: {
+                type: Object
             },
-            lightList:{
-                type:String
+            lightList: {
+                type: String
             }
         },
         components: {
-
+            dialogCheck
         },
         data() {
             return {
+                // 趋势对比曲线
+                cilent: "", //区分点击事件触发条件
 
             }
         },
@@ -98,6 +96,36 @@
 
         },
         methods: {
+            dataToFix2(obj) {
+
+                    if (obj === '' || obj === undefined) {
+                        return '--'
+                    } else {
+                        return obj.toFixed(2)
+                    }
+
+            },
+
+
+
+            // 点击趋势对比
+            handDialog(val, de, item) {
+                if(de!=='') {
+
+                    this.cilent = process.env.VUE_APP_DIALOG_POINT; //区分鼠标左右键点击
+                    this.$refs.tagChild.getXY(val.type, val.name, de,this.lightList + item.aname, item[val.dataTime])
+                }else {
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
+                }
+                event.preventDefault();
+            },
 
             //转换时间
             getchangeTime(data) {
@@ -117,18 +145,20 @@
                 }
             },
             // 导出
-            downXlsxes(){
-                    let headers = []
+            downXlsxes() {
+                let headers = []
                 this.electTarget.forEach(it => {
-                    if(it.valueUnit!=''){
-                        headers.push(it.name +'(' + it.unit +')')
-                    }else {
-                        headers.push(it.name )
+                    if (it.valueUnit != '') {
+                        headers.push(it.name + '(' + it.unit + ')')
+                    } else {
+                        headers.push(it.name)
                     }
                 })
-                            utils.exportExcel(this.$refs['multipleTable'].$el, '序号'+'设备名称'+headers, this.lightList)
+                utils.exportExcel(this.$refs['multipleTable'].$el, '序号' + '设备名称' + headers, this.lightList)
 
             },
+
+
             cellStyle({row, column, rowIndex, columnIndex}) {
                 if (columnIndex > 2) {
                     return {'font-family': 'Arial', 'padding': '7px 0', 'font-size': '13px'}
@@ -136,11 +166,11 @@
                     return {'backdrop-filter': 'blur(10px)', 'padding': '7px 0', 'font-size': '13px'}
                 }
             },
-            headerStyle({row, column, rowIndex, columnIndex}){
-                if (columnIndex < 3){
-                    return {'backdrop-filter': 'blur(10px)','padding':'6px 0'}
-                }else {
-                    return {'padding':'6px 0'}
+            headerStyle({row, column, rowIndex, columnIndex}) {
+                if (columnIndex < 3) {
+                    return {'backdrop-filter': 'blur(10px)', 'padding': '6px 0'}
+                } else {
+                    return {'padding': '6px 0'}
                 }
             },
 

+ 44 - 33
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/lightMatrixMonitorZQ/index.vue

@@ -1,58 +1,69 @@
 <template>
     <div>
-        <header-button-gf  @renderData="renderData" ></header-button-gf>
-      <lightMatrixGF v-if="tagListNode==-'2'"  ref="data" />
+        <!-- <header-button-gf  @renderData="renderData" ></header-button-gf> -->
+        <HeaderBtn @onChange="renderData" />
+        <lightMatrixGF v-if="tagListNode == -'2'" ref="data" />
 
     </div>
 </template>
 
 <script>
-    import lightMatrixGF from "./components/lightMatrixGF";
-    import headerButtonGf from "@/views/layout/stateMonitor/factoryMonitor/components/headerButtonGf";
+import HeaderBtn from "../../../photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue";
+import lightMatrixGF from "./components/lightMatrixGF";
+// import headerButtonGf from "@/views/layout/stateMonitor/factoryMonitor/components/headerButtonGf";
 
 
-    export default {
-        name: 'matrixMatrix',
-        props:{
+export default {
+    name: 'matrixMatrix',
+    props: {
 
-        },
-        components: {
-            headerButtonGf,
-            lightMatrixGF
-        },
-        data() {
-            return {
-                tagListNode:null
+    },
+    components: {
+        // headerButtonGf,
+        lightMatrixGF,
+        HeaderBtn
+    },
+    data() {
+        return {
+            tagListNode: null
 
-            }
-        },
+        }
+    },
+
+    created() {
+
+    },
+    methods: {
+        renderData({stationCode, type, node}) {
 
-        created() {
+            this.tagListNode = type
+            setTimeout(() => {
+                this.$refs.data.getHeaderNum(node.name, stationCode, type, type, 40, '', '',)
 
+            }, 15)
 
         },
-        methods: {
-            renderData(stationCode, type, name, headerIndex,tagListNode) {
+        // renderData(stationCode, type, name, headerIndex, tagListNode) {
 
-                this.tagListNode=tagListNode
-                setTimeout(() => {
-                    this.$refs.data.getHeaderNum(name,stationCode,type,headerIndex,40,'','',)
+        //     this.tagListNode = tagListNode
+        //     setTimeout(() => {
+        //         this.$refs.data.getHeaderNum(name, stationCode, type, headerIndex, 40, '', '',)
 
-                }, 15)
+        //     }, 15)
 
-            },
-        },
-        computed: {
+        // },
+    },
+    computed: {
 
-        },
-        mounted() {
+    },
+    mounted() {
 
-        },
-        unmounted() {
+    },
+    unmounted() {
 
 
-        },
-    }
+    },
+}
 
 </script>
 

+ 9 - 5
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/photovoltaicFacility/components/photoitaicGF.vue

@@ -9,7 +9,7 @@
                 />
             </div>
             <div class="detail">
-                <lightDetial :alarmTable="'550px'" v-if="number==0" ref="lightDetial" :LightGeig="'780px'" :height="'64%'"
+                <lightDetial :lightList="lightList" :alarmTable="'550px'" v-if="number==0" ref="lightDetial" :LightGeig="'780px'" :height="'64%'"
                              :stationName="stationName"/>
                 <div  v-if="number==1" >
                     <device-information ></device-information>
@@ -58,6 +58,7 @@
         },
         methods: {
            async getHeaderNum(name,stationCode){
+
                this.stationName = name;
                this.stationCode = stationCode;
                 const result = await this.getSquareEquipmentsOfTree();
@@ -155,7 +156,9 @@
                                             return item5.SBZT == item.tagName;
                                         })
 
-                                        item5.SBZT = Number(result4.value.toFixed(0));
+                                        if(result4){
+                                            item5.SBZT = Number(result4.value.toFixed(0));
+                                        }
 
 
                                     })
@@ -196,6 +199,7 @@
                     this.lightList = datas;
 
 
+
                 } else {
                     this.lightList = this.lightData;
                 }
@@ -218,8 +222,8 @@
 
             },
 
+            // 菜单栏点击 通知右侧详情
             handClick(val, index) {
-
                 this.lightCode = val?.nemCode
                 this.$refs.lightDetial.getHand(val, index)
 
@@ -249,7 +253,7 @@
     width: 100%;
 
     .station {
-      width: 210px;
+      width: 260px;
       height:960px;
       background-color: rgba(0, 0, 0, .45);
       border-radius: 8px;
@@ -260,7 +264,7 @@
     .detail {
       width: calc(100% - 216px);
       padding-left: 15px;
-      height: 960px;
+      height: 964px;
 
     }
   }

+ 40 - 33
src/views/layout/stateMonitor/factoryMonitor/photovoltaic/photovoltaicFacility/index.vue

@@ -1,51 +1,58 @@
 <template>
     <div>
-        <header-button-gf  @renderData="renderData" ></header-button-gf>
-        <photoitaicGF v-if="tagListNode=='-2'" ref="data"/>
+        <!-- <header-button-gf  @renderData="renderData" ></header-button-gf> -->
+        <HeaderBtn @onChange="renderData" />
+        <photoitaicGF v-if="tagListNode == '-2'" ref="data" />
     </div>
 </template>
 <script>
-    import photoitaicGF from "./components/photoitaicGF";
+import HeaderBtn from "../../../photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue";
+import photoitaicGF from "./components/photoitaicGF";
+// import headerButtonGf from "@/views/layout/stateMonitor/factoryMonitor/components/headerButtonGf";
+
+export default {
+    name: 'photovoltaicFacility',
+    components: {
+        // headerButtonGf,
+        HeaderBtn,
+        photoitaicGF
+    },
+    props: {
+
+    },
+    data() {
+        return {
+            tagListNode: null
 
-    import headerButtonGf from "@/views/layout/stateMonitor/factoryMonitor/components/headerButtonGf";
+        }
+    },
+    mounted() {
 
-    export default {
-        name: 'photovoltaicFacility',
-        components: {
-            headerButtonGf,
-            photoitaicGF
-        },
-        props:{
+    },
+    unmounted() {
 
-        },
-        data() {
-            return {
-                tagListNode:null
+    },
+    methods: {
+        async renderData({ stationCode, type, node}) {
+            this.tagListNode = type
+            setTimeout(() => {
+                this.$refs.data.getHeaderNum(node.CZAMC, stationCode)
+            }, 15)
 
-            }
-        },
-        mounted() {
 
         },
-        unmounted() {
 
-        },
-        methods: {
+        // async renderData(stationCode, type, name, inde, tagListNode) {
+        //     this.tagListNode = tagListNode
+        //     setTimeout(() => {
+        //         this.$refs.data.getHeaderNum(name, stationCode)
+        //     }, 15)
 
-            async renderData(stationCode, type, name,inde,tagListNode) {
-                this.tagListNode=tagListNode
-                setTimeout(() => {
-                    this.$refs.data.getHeaderNum(name,stationCode)
-                }, 15)
 
+        // },
 
-            },
-
-        }
     }
+}
 
 </script>
-<style lang="less" scoped>
-
-
-</style>
+<style lang="less" scoped></style>

+ 8 - 5
src/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/iframeCom.vue

@@ -2,7 +2,8 @@
     <div>
 
 <!--        <headerButton @renderData="renderData" :type="headerTyp"/>-->
-        <headerButtonGf @renderData="renderData" :type='-2' />
+        <!-- <headerButtonGf @renderData="renderData" :type='-2' /> -->
+        <HeaderBtn @onChange="renderData" />
 
         <div v-loading="loading" element-loading-text="加载中..." v-if="iframeData && iframeData.length==1" id="ifVideo"
              class="iframeContainner"
@@ -43,17 +44,19 @@
 <script>
     import tuDialog from "../../components/tuDialog";
     // import headerButton from '../../components/headerButton'
-    import headerButtonGf from '../../components/headerButtonGf'
+    // import headerButtonGf from '../../components/headerButtonGf'
     import {GetMapUrlAddressByStationCode} from "@api/boosterStation";
     import {GetCompanyDataTagList} from '@/api/synthesizeTargetSystem';
     import {GetTagInfoByTagName} from "../../../../../../api/boosterStation";
+import HeaderBtn from "../../../photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue";
 
     export default {
         name: 'iframeCom',
         components: {
             // headerButton,
-            headerButtonGf,
-            tuDialog
+            // headerButtonGf,
+            tuDialog,
+            HeaderBtn
         },
         props: ['type', "headerTyp"],
         data() {
@@ -150,7 +153,7 @@
             startDrag(s) {
                 this.isActive = s
             },
-            renderData(stationCode) {
+            renderData({stationCode}) {
                 this.stationCode = stationCode;
                 this.getCompanyDataTagList()
                 this.getMapUrlAddressByStationCode();

+ 1 - 1
src/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/lineCharts.vue

@@ -228,7 +228,7 @@ export default {
           yAxisIndex: value.yAxisIndex,
           data: value.value.map((t) => {
             if (value.noRatio) {
-              return t.value ? t.value.toFixed(2) : '';
+              return  typeof t.value == 'number' ? t.value.toFixed(2): '';
             } else {
               return t.value === '' && t.value !== 0 ? '' : (t.value / this.ratio).toFixed(2);
             }

+ 13 - 5
src/views/layout/stateMonitor/factoryMonitor/windPowerPlant/components/lineChartsCopy.vue

@@ -160,6 +160,8 @@ export default {
         this.newlist = newValue;
         this.$nextTick(() => {
           this.newlist = this.list;
+          // this.newlist[0].value[0].value =0.1
+          // this.newlist[0].value[1].value = 0.3
           this.setlist()
           this.initChart();
         });
@@ -234,14 +236,16 @@ export default {
           yAxisIndex: value.yAxisIndex,
           data: value.value.map((t) => {
             if (value.noRatio) {
-              return t.value ? t.value.toFixed(2) : '';
+              return  typeof t.value == 'number' ? t.value.toFixed(2): '';
             } else {
-              return t.value === '' && t.value !== 0 ? '' : (t.value / this.ratio).toFixed(2);
+              return t.value === '' ? '' : (t.value / this.ratio).toFixed(2);
             }
 
           }),
         });
       });
+
+      console.log(result)
       return result;
     },
     yAxis() {
@@ -281,6 +285,7 @@ export default {
               },
           },
         };
+        console.log(this.unitDatas[index])
         if(this.unitDatas[index].flag){
           i++;
           option.min=this.unitDatas[index].min
@@ -313,7 +318,7 @@ export default {
           result.push(option);
         }else if(index == 0){
           if(!this.unitDatas[0].flag){
-            option.axisLine.lineStyle.color = "#525252"
+             option.axisLine.lineStyle.color = "#525252"
               option.axisLabel.textStyle.color = "#828484"
           }
           if(this.unitDatas[index].min==0 && this.unitDatas[index].max==0){
@@ -322,13 +327,16 @@ export default {
             option.min=this.unitDatas[index].min
             option.max=this.unitDatas[index].max
             result.push(option);
-          }
         }
-        this.leftOffset = 35;
+      }
+
+
+          this.leftOffset = 35;
         if(i==0){
           this.leftOffset = 35;
         }
       });
+      console.log(result)
       return result;
     },
   },

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2395 - 2028
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/index.vue


+ 11 - 2
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/components/benchList.vue

@@ -18,11 +18,11 @@
                     <el-tooltip v-if="value.name!=='接入容量'" class="box-item" effect="dark" :content="
                       getchangeTime(scope.row[value.type]?.dateTime)
                     " placement="top">
-                        <div> {{scope.row[value.type]?.value || '--'}}</div>
+                        <div> {{dataToFix2(scope.row[value.type]?.value) }}</div>
 
                     </el-tooltip>
                     <span v-else>
-                    {{scope.row.jrCapacity|| '--'}}
+                    {{dataToFix2(scope.row.jrCapacity)}}
                 </span>
                 </template>
                 <template #header>
@@ -75,6 +75,15 @@
         },
 
         methods: {
+            dataToFix2(obj) {
+
+                if (obj === '' || obj === undefined) {
+                    return '--'
+                } else {
+                    return obj.toFixed(2)
+                }
+
+            },
             moment,
             //转换时间
             getchangeTime(data) {

+ 13 - 3
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/components/benchLists.vue

@@ -18,12 +18,14 @@
 
             <el-table-column  v-for="(value,index) in electTarget" :key="index" :align="'center'">
                 <template v-slot="scope">
-                    <el-tooltip v-if="value.name!=='接入容量'" class="box-item" effect="dark" :content="scope.row.datetime" placement="top">
-                        <div> {{scope.row[value.type] ? (scope.row[value.type]).toFixed(2) : '--'}}</div>
+                    <el-tooltip v-if="value.name!=='接入容量' && benchmarkingVal!=='bench1'" class="box-item" effect="dark" :content="scope.row.datetime" placement="top">
+                        <div> {{dataToFix2(scope.row[value.type])}}</div>
 
                     </el-tooltip>
+                        <div v-else-if="benchmarkingVal==='bench1' && value.name!=='接入容量'"> {{dataToFix2(scope.row[value.type])}}</div>
+
                     <span v-else>
-                    {{scope.row.JRRL|| '--'}}
+                    {{dataToFix2(scope.row.JRRL)}}
                 </span>
                 </template>
                 <template #header>
@@ -112,6 +114,14 @@
                     return "--";
                 }
             },
+            dataToFix2(obj) {
+
+                if (obj === '' || obj === undefined) {
+                    return '--'
+                } else {
+                    return obj.toFixed(2)
+                }
+            },
             calcOnlinePercentage(row) {
                 const online =
                     (Number(row.SBTJTS.value) || 0) +

+ 147 - 230
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/components/headerBtn.vue

@@ -1,279 +1,196 @@
 <template>
   <el-row class="headerButton">
-    <!--      <div class="nav_right headerRight">-->
-    <!--          <i class="active_icon icon-enterprise"></i>-->
-    <!--          <span>{{region[0]?.aname}}</span>-->
-    <!--      </div>-->
-    <!-- <el-select v-model="typeNode" style="margin-right: 8px" @change="levels1DataChang">
-      <el-option v-for="(item, index) in levels1Data" :key="index" :label="item.name" :value="item.type">
-      </el-option>
-    </el-select> -->
-    <eselect :data="levels1Data" v-model="typeNode" placeholder="请选择" @change="levels1DataChang" 
-      labelKey="name" valueKey="type" style="margin-right: 8px; width: 132px;" 
-    />
-    <!-- <el-select v-model="checkNode" style="margin-right: 8px" placeholder="请选择" @change="dataChang">
-      <el-option v-for="item in OrganizationList" :key="item.value" :label="item.label" :value="item.value">
-      </el-option>
-    </el-select> -->
-    <eselect :data="OrganizationList" v-model="checkNode" placeholder="请选择" @change="dataChang" 
-      style="margin-right: 8px; width: 180px;" 
-    >
+
+    <eselect :data="level1" v-model="level1Check" placeholder="请选择" labelKey="name" valueKey="type"
+      style="margin-right: 8px; width: 132px;" />
+
+    <eselect :data="level2" v-model="level2Check" placeholder="请选择" labelKey="aname" valueKey="code"
+      style="margin-right: 8px; width: 180px;">
       <template #prefix>
         <img src="@assets/img/images/company.png" style="width: 23px;margin-top: 0px; margin-left: 2px; " />
       </template>
     </eselect>
-    <!-- <el-select v-if="OrganizationList" v-model="checkNodes" placeholder="请选择" @change="dataChangs" v-show="!isOrganizationAStation">
-      <el-option v-for="(item, index) in allPowerStation" :key="index" :label="item.CZAMC" :value="item.CZBM">
-      </el-option>
-    </el-select> -->
-    <eselect :data="allPowerStation" v-model="checkNodes" placeholder="请选择" @change="dataChangs" 
-      labelKey="CZAMC" valueKey="CZBM" v-if="OrganizationList" v-show="!isOrganizationAStation"
-      style="width: 180px;"
-    />
+
+    <eselect :data="level3" v-model="level3Check" placeholder="请选择" labelKey="CZAMC" valueKey="CZBM"
+      v-if="!isLevel2STA && showLevel3" style="width: 180px;" />
   </el-row>
 </template>
 <script>
 import { GetPowerStation, getOrganization, getPowerstationTypeList } from '@/api/home'
 import eselect from '@/components/eselect/index.vue'
+import { Debounce } from '@/utils/common'
+import { inject } from 'vue'
 
 export default {
   name: 'headerButton',
   components: {
     eselect
   },
+  setup() {
+    // 具体在 store/reactive/organizations.js里
+    const store = inject('organizations')
+    return {
+      ...store,
+    }
+  },
   props: {
-    companyCode: {
-      type: String,
-      default: '',
-    },
-    code: {
-      type: String,
-      default: '',
-    },
-    typeStr: {
-      type: String,
-      default: '',
-    },
+    // 如果有第三级 就不显示区域那项
+    showLevel3: {
+      type: Boolean,
+      default: true
+    }
   },
   data() {
+    const { type, companyCode, stationCode } = this.$route.query
+
     return {
       //风光类型
-      levels1Data: [],
-      typeNode: '',
-      OrganizationList: null,
-      checkNode: '',
-      checkNodes: null,
-      leftIndex: this.typeStr,
-      allPowerStation: null,
-      region: [],
-      routeName: this.$route.name
+      level1Check: type,
+      // 公司
+      level2Check: companyCode,
+      // 场站
+      level3Check: stationCode
     }
   },
   computed: {
-    isOrganizationAStation() {
-      if (this.OrganizationList && this.checkNode) {
-        const choosed = this.OrganizationList?.find(it => it.value === this.checkNode)
-        if (choosed && choosed.type === 'STA') {
-          return true
-        }
+    level1() {
+      return this.level1Map.value
+    },
+    // 场站列表
+    level3() {
+      if (!this.level2Check) {
+        return []
+      }
+      const r = this.level3Map[this.level2Check]
+      if (!r) {
+        this.getPowerStation(this.level1Check, this.level2Check)
+        return []
+      }
+      return r
+    },
+    // 公司列表
+    level2() {
+      if (!this.level1Check) {
+        return []
+      }
+      const r = this.level2Map[this.level1Check]
+      if (!r) {
+        this.getOrganizationList(this.level1Check)
+        return []
+      }
+      // 有第三级不显示区域
+      if (this.showLevel3) {
+        return r.slice(1)
+      }
+      return r
+    },
+    isLevel2STA() {
+      if (this.level2Check && this.level2?.length) {
+        const comp = this.level2.find(item => item.code === this.level2Check)
+        return comp && comp.orgType === 'STA'
       }
       return false
-    }
-  },
-  async created() {
-    if (this.companyCode) {
-      this.checkNode = this.companyCode;
-    }
-    if (this.code) {
-      this.checkNodes = this.code;
-    }
-    if (this.typeStr) {
-      this.typeNode = this.typeStr;
-    }
-
-    //获取风和光
-    await this.gettypeData();
-
-    if (!this.companyCode) {
-      this.checkNode = this.code
-      this.checkNodes = null
-    }
-
-    //获取区域公司
-    await this.getOrganizationList();
-
-    if (!this.companyCode && !this.code) {
-      // 没有参数 就是默认首页
-      await this.getPowerStation();
-    } else
-      if (this.companyCode && !this.isOrganizationAStation) {
-        // 如果没有公司编码说明区域就是站点
-        //根据区域公司编码获取场站信息
-        await this.getPowerStation();
+    },
+    checks() {
+      return [this.level1Check, this.level2Check, this.level3CheckComputed]
+    },
+    // 选中的场站 如果是集中式 就是二级点
+    checkNode() {
+      if (this.isLevel2STA) {
+        return this.level2.find(item => item.code === this.level2Check)
       } else {
-
-        // this.$emit('renderData',this.checkNode,this.checkNode);
-        this.$router.replace({
-          name: 'lighthomeIndex',
-          query: {
-            ...this.$route.query,
-            type: this.$route.query.type,
-            stationCode: this.checkNode,
-            companyCode: this.checkNode
-          }
-        })
+        return this.level3.find(item => item.CZBM === this.level3Check)
+      }
+    },
+    level3CheckComputed() {
+      if (this.isLevel2STA) {
+        return this.level2Check
       }
+      return this.level3Check
+    }
   },
-  methods: {
-    //获取风光类型
-    async gettypeData() {
-      const data = await getPowerstationTypeList({ code: 'classification' });
-      this.levels1Data = data.filter(obj => obj.flag == 0).map(i => ({...i, icon: i.type}))
-      if (!this.typeNode) {
-        this.typeNode = this.levels1Data[0].type;
+  watch: {
+    level3(v) {
+      // 公司变动的时候 检查check值
+      if (v.length) {
+        const valueList = v.map(item => item.CZBM)
+        if (!this.level3Check || !valueList.includes(this.level3Check)) {
+          this.level3Check = valueList[0]
+        }
       }
     },
-    //切换类型
-    levels1DataChang() {
-      this.getOrganizationList();
-    },
-    //获取区域公司
-    async getOrganizationList() {
-      const data = await getOrganization({ type: this.typeNode });
-      var arr = [];
-      if (data && data.length > 0) {
-        this.region = data
-        let data1 = data.slice(1);
-        // 当前选项是否在切换后的里面
-        let choosedInData = false
-        data1.forEach(item => {
-          var obj = {};
-          obj.value = item.code;
-          obj.label = item.aname;
-          obj.type = item.orgType
-          arr.push(obj);
-          if (this.checkNode && this.checkNode === item.code) {
-            choosedInData = true
-          }
-        })
-        if (!this.checkNode || !choosedInData) {
-          this.checkNode = data1[0].code;
-          this.dataChang()
+    level2(v) {
+      // 公司变动的时候 检查check值
+      if (v.length) {
+        const valueList = v.map(item => item.code)
+        if (!this.level2Check || !valueList.includes(this.level2Check)) {
+          this.level2Check = valueList[0]
         }
-        this.OrganizationList = arr;
       }
     },
-    //获取场站信息
-    async getPowerStation() {
-      const data = await GetPowerStation({ companyCode: this.checkNode, stationType: this.leftIndex })
-      if (data) {
-        this.allPowerStation = data;
-        // this.checkNodes=data[0].CZBM
-        const res = data.find(obj => {
-          return obj.CZBM == this.checkNodes;
-        })
-        if (!res) {
-          this.checkNodes = data[0].CZBM
-        }
-        if (this.routeName !== 'lighthome') {
-          this.$router.replace({
-            name: 'lighthome',
-            query: {
-              type: this.$route.query.type,
-              stationCode: this.checkNodes,
-              companyCode: this.checkNode
-            }
-          })
-        } else {
-          this.$emit('renderData', this.checkNode, this.checkNodes);
+    level1: {
+      handler(d) {
+        if (!d?.length) {
+          this.gettypeData()
+        } else if (!this.level1Check) {
+          // this.$nextTick(() => {
+          this.level1Check = d[0].type
+          // })
         }
-      }
+      },
+      immediate: true
     },
-    //区域切换
-    async dataChang() {
-      const choosed = this.OrganizationList?.find(it => it.value === this.checkNode)
-      if (choosed && choosed.type === 'STA') {
-        this.checkNodes = null
-        // this.$emit('renderData',this.checkNode,this.checkNode);
-        this.$router.replace({
-          name: 'lighthomeIndex',
-          query: {
-            type: this.$route.query.type,
-            stationCode: this.checkNode,
-            companyCode: this.checkNode
-          }
+  },
+  created() {
+    this.commit = Debounce(() => {
+      if (this.checks.filter(v => v).length === 3 || !this.showLevel3) {
+        this.$emit('onChange', {
+          type: this.level1Check,
+          companyCode: this.level2Check,
+          stationCode: this.level3CheckComputed,
+          node: this.checkNode ?? {}
         })
-      } else {
-        //根据区域公司编码获取场站信息
-        await this.getPowerStation();
       }
+    }, 200)
+    this.$watch(() => this.checks.join(','), () => this.changeQuery(), { immediate: true })
+  },
+  methods: {
+    // 选择值变动的时候 更新参数
+    changeQuery() {
+      this.$router.replace({
+        ...this.$route,
+        query: {
+          ...this.$route.query,
+          type: this.level1Check,
+          companyCode: this.level2Check,
+          stationCode: this.level3CheckComputed
+        }
+      })
+      this.commit()
     },
-    //点击场站切换数据
-    dataChangs() {
-      if (this.routeName !== 'lighthome') {
-        this.$router.replace({
-          name: 'lighthome',
-          query: {
-            type: this.$route.query.type,
-            stationCode: this.checkNodes,
-            companyCode: this.checkNode
-          }
-        })
+    //获取风光类型
+    async gettypeData() {
+      const data = await getPowerstationTypeList({ code: 'classification' });
+      const df = data.filter(obj => obj.flag == 0).map(i => ({ ...i, icon: i.type, type: String(i.type) }))
+      this.setLevel1(df)
+    },
+    //获取区域公司
+    async getOrganizationList(type) {
+      const data = await getOrganization({ type });
+      if (data && data.length > 0) {
+        this.setLevel2(type, data)
       } else {
-        this.$emit('renderData', this.checkNode, this.checkNodes);
+        this.setLevel2(type, [])
       }
     },
-    setQuery() {
-      const {name, query} = this.$route
-      const nq = {
-        ...query
-      }
-      let needSet = false
-      if (!query.companyCode) {
-        nq.companyCode = this.checkNode
-        needSet = true
-      }
-      if (!query.stationCode) {
-        nq.stationCode = this.checkNodes
-        needSet = true
+    //获取场站信息
+    async getPowerStation(typeNode, checkNode) {
+      const data = await GetPowerStation({ companyCode: checkNode, stationType: typeNode })
+      if (data) {
+        this.setLevel3(checkNode, data)
       }
-      needSet && this.$router.replace({
-        name,
-        query: {
-          ...nq
-        }
-      })
     }
   },
-  watch: {
-    checkNode() {
-      this.setQuery()
-    },
-    checkNodes() {
-      this.setQuery()
-    }
-    // checkNode(v) {
-    //   // 在切换时更新url上的参数
-    //   this.$router.replace({
-    //     name: 'lighthome',
-    //     query: {
-    //       type: this.$route.query.type,
-    //       stationCode: this.$route.query.stationCode,
-    //       companyCode: v
-    //     }
-    //   })
-    // },
-    // checkNodes(v) {
-    //   this.$router.replace({
-    //     name: 'lighthome',
-    //     query: {
-    //       type: this.$route.query.type,
-    //       companyCode: this.$route.query.companyCode,
-    //       stationCode: v
-    //     }
-    //   })
-    // }
-  }
 }
 </script>
 <style lang="less" scoped>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 593 - 555
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/index.vue


Dosya farkı çok büyük olduğundan ihmal edildi
+ 504 - 461
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/subview/EqCard.vue


+ 396 - 377
src/views/layout/stateMonitor/photovoltaicLevelTwoStation/photovoltaicStationDetail/subview/EqList.vue

@@ -1,414 +1,433 @@
 <template>
-  <div class="photovoltaicList">
-    <el-table v-loading="dataSource == null" :empty-text="emptyStr" :data="dataSource" stripe style="width: 100%"
-      height="100%" row-key="deviceName" @row-click="showLightDetial">
-      <el-table-column prop="s" width="74" label="状态" align="center">
-        <template v-slot="scope">
-            <div class="device-state"
-              :class="scope.row.state == 0 ? 'device-normal' : scope.row.state == 1 ? 'device-fault' : scope.row.state == 2 ? 'device-halt' : 'device-interrupt'">
-              <div class="point"></div>
+    <div class="photovoltaicList">
+        <el-table v-loading="dataSource == null" :empty-text="emptyStr" :data="dataSource" stripe
+                  style="min-width: 100%"
+                  height="100%" row-key="deviceName" @row-click="showLightDetial">
+            <el-table-column prop="s" width="74" label="状态" align="center">
+                <template v-slot="scope">
+                    <div class="device-state"
+                         :class="scope.row.state == 0 ? 'device-normal' : scope.row.state == 1 ? 'device-fault' : scope.row.state == 2 ? 'device-halt' : 'device-interrupt'">
+                        <div class="point"></div>
+                    </div>
+                </template>
+            </el-table-column>
+
+            <el-table-column prop="name" min-width="160" label="设备名称" align="center">
+
+            </el-table-column>
+
+            <el-table-column prop="model" min-width="160" label="设备型号" align="center">
+
+            </el-table-column>
+            <el-table-column prop="SNNumber" min-width="230" show-overflow-tooltip label="设备SN号" align="center">
+
+            </el-table-column>
+
+            <el-table-column v-for="col in colList" min-width="130" :prop="col.type"
+                             :label="`${col.name}(${col.unit ?? '-'})`" align="center">
+                <template v-slot="scope">
+                    <div @contextmenu="handDialog(col,scope.row[col.type],scope.row)">
+                        {{ scope.row[col.type + 'Value']?.value }}
+                    </div>
+                </template>
+            </el-table-column>
+
+            <!--
+            <el-table-column  v-if="typeStr=='IN'" prop="jrCapacity" label="接入容量(kWp)"  align="center"> </el-table-column>
+            <el-table-column  v-if="typeStr=='IN'" prop="power" label="交流功率(kW)"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                  :content="dateFormat(scope.row.power.dateTime)" placement="top">
+                  <div>{{ scope.row.power.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column  v-if="typeStr=='IN'" prop="ZLGL" label="直流功率(kW)"  align="center">
+            <template v-slot="scope">
+              <el-tooltip class="box-item" effect="dark"
+                          :content="dateFormat(scope.row.ZLGL.dateTime)" placement="top">
+                <div>{{ scope.row.ZLGL.value }}</div>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+            <el-table-column  v-if="typeStr=='IN'" prop="RFDL" label="日发电量(kWh)"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                  :content="dateFormat(scope.row.RFDL.dateTime)" placement="top">
+                  <div>{{ scope.row.RFDL.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column  v-if="typeStr=='IN'" prop="RLYXSK" label="日等效小时(h)"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                  :content="dateFormat(scope.row.RLYXSK.dateTime)" placement="top">
+                  <div>{{ scope.row.RLYXSK.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='IN'" prop="ZFDL" label="总发电量(万kWh)"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.ZFDL.dateTime)" placement="top">
+                  <div>{{ scope.row.ZFDL.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+
+
+            <el-table-column v-if="typeStr=='SCB'" prop="ZGL" label="总功率"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.ZGL.dateTime)" placement="top">
+                  <div>{{ scope.row.ZGL.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='SCB'" prop="DY" label="电压"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.DY.dateTime)" placement="top">
+                  <div>{{ scope.row.DY.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='SCB'" prop="DL" label="电流"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.DL.dateTime)" placement="top">
+                  <div>{{ scope.row.DL.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='SCB'" prop="WD" label="温度"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.WD.dateTime)" placement="top">
+                  <div>{{ scope.row.WD.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+
+            <el-table-column v-if="typeStr=='CB'" prop="YGGL" label="有功功率"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.YGGL.dateTime)" placement="top">
+                  <div>{{ scope.row.YGGL.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='CB'" prop="RZWDA" label="绕组温度A"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.RZWDA.dateTime)" placement="top">
+                  <div>{{ scope.row.RZWDA.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='CB'" prop="RZWDB" label="绕组温度B"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.RZWDB.dateTime)" placement="top">
+                  <div>{{ scope.row.RZWDB.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='CB'" prop="RZWDC" label="绕组温度C"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.RZWDC.dateTime)" placement="top">
+                  <div>{{ scope.row.RZWDC.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+
+
+            <el-table-column v-if="typeStr=='AM'" prop="ZXYG" label="正向有功电度"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.ZXYG.dateTime)" placement="top">
+                  <div>{{ scope.row.ZXYG.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='AM'" prop="ZXWG" label="正向无功电度"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.ZXWG.dateTime)" placement="top">
+                  <div>{{ scope.row.ZXWG.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='AM'" prop="FXYG" label="反向有功电度"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.FXYG.dateTime)" placement="top">
+                  <div>{{ scope.row.FXYG.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='AM'" prop="FXWG" label="反向无功电度"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.FXWG.dateTime)" placement="top">
+                  <div>{{ scope.row.FXWG.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+
+
+            <el-table-column v-if="typeStr=='EMI'" prop="LJFSL" label="日总辐射值"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.LJFSL.dateTime)" placement="top">
+                  <div>{{ scope.row.LJFSL.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='EMI'" prop="FZQD" label="瞬时辐射值"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.FZQD.dateTime)" placement="top">
+                  <div>{{ scope.row.FZQD.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column v-if="typeStr=='EMI'" prop="JCYHJWD" label="环境温度温"  align="center">
+              <template v-slot="scope">
+                <el-tooltip class="box-item" effect="dark"
+                            :content="dateFormat(scope.row.JCYHJWD.dateTime)" placement="top">
+                  <div>{{ scope.row.JCYHJWD.value }}</div>
+                </el-tooltip>
+              </template>
+            </el-table-column> -->
+
+
+        </el-table>
+    </div>
+    <el-dialog class="dialogs" width="90%" top="40px" :destroy-on-close="true" v-model="displaySunMatrix"
+               :show-close="true">
+        <template #title>
+            <div class="dialog-title">
+                <img class="dialog-title-img" src="@assets/img/images/dialog-title.png"/>
+                <div class="title">设备详情</div>
             </div>
         </template>
-      </el-table-column>
-
-      <el-table-column prop="deviceName" label="设备名称" align="center">
-        <template v-slot="scope">
-          <div>
-            {{ scope.row.name }}
-          </div>
-        </template>
-      </el-table-column>
-
-      <el-table-column prop="model"  label="设备型号" align="center">
-        <template v-slot="scope">
-          <div >
-            {{ scope.row.model }}
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column prop="SNNumber"  label="设备SN号" show-overflow-tooltip align="center">
-        <template v-slot="scope">
-          <div >
-            {{ scope.row.SNNumber }}
-          </div>
-        </template>
-      </el-table-column>
-
-      <el-table-column v-for="col in colList" :prop="col.type" :label="`${col.name}(${col.unit ?? '-'})`" align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark" :content="dateFormat(scope.row[col.type + 'Value']?.dateTime)"
-            placement="top">
-            <div>{{ scope.row[col.type + 'Value']?.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-
-      <!-- 
-      <el-table-column  v-if="typeStr=='IN'" prop="jrCapacity" label="接入容量(kWp)"  align="center"> </el-table-column>
-      <el-table-column  v-if="typeStr=='IN'" prop="power" label="交流功率(kW)"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-            :content="dateFormat(scope.row.power.dateTime)" placement="top">
-            <div>{{ scope.row.power.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column  v-if="typeStr=='IN'" prop="ZLGL" label="直流功率(kW)"  align="center">
-      <template v-slot="scope">
-        <el-tooltip class="box-item" effect="dark"
-                    :content="dateFormat(scope.row.ZLGL.dateTime)" placement="top">
-          <div>{{ scope.row.ZLGL.value }}</div>
-        </el-tooltip>
-      </template>
-    </el-table-column>
-      <el-table-column  v-if="typeStr=='IN'" prop="RFDL" label="日发电量(kWh)"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-            :content="dateFormat(scope.row.RFDL.dateTime)" placement="top">
-            <div>{{ scope.row.RFDL.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column  v-if="typeStr=='IN'" prop="RLYXSK" label="日等效小时(h)"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-            :content="dateFormat(scope.row.RLYXSK.dateTime)" placement="top">
-            <div>{{ scope.row.RLYXSK.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='IN'" prop="ZFDL" label="总发电量(万kWh)"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.ZFDL.dateTime)" placement="top">
-            <div>{{ scope.row.ZFDL.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-
-
-      <el-table-column v-if="typeStr=='SCB'" prop="ZGL" label="总功率"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.ZGL.dateTime)" placement="top">
-            <div>{{ scope.row.ZGL.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='SCB'" prop="DY" label="电压"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.DY.dateTime)" placement="top">
-            <div>{{ scope.row.DY.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='SCB'" prop="DL" label="电流"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.DL.dateTime)" placement="top">
-            <div>{{ scope.row.DL.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='SCB'" prop="WD" label="温度"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.WD.dateTime)" placement="top">
-            <div>{{ scope.row.WD.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-
-      <el-table-column v-if="typeStr=='CB'" prop="YGGL" label="有功功率"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.YGGL.dateTime)" placement="top">
-            <div>{{ scope.row.YGGL.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='CB'" prop="RZWDA" label="绕组温度A"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.RZWDA.dateTime)" placement="top">
-            <div>{{ scope.row.RZWDA.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='CB'" prop="RZWDB" label="绕组温度B"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.RZWDB.dateTime)" placement="top">
-            <div>{{ scope.row.RZWDB.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='CB'" prop="RZWDC" label="绕组温度C"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.RZWDC.dateTime)" placement="top">
-            <div>{{ scope.row.RZWDC.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-
-
-      <el-table-column v-if="typeStr=='AM'" prop="ZXYG" label="正向有功电度"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.ZXYG.dateTime)" placement="top">
-            <div>{{ scope.row.ZXYG.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='AM'" prop="ZXWG" label="正向无功电度"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.ZXWG.dateTime)" placement="top">
-            <div>{{ scope.row.ZXWG.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='AM'" prop="FXYG" label="反向有功电度"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.FXYG.dateTime)" placement="top">
-            <div>{{ scope.row.FXYG.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='AM'" prop="FXWG" label="反向无功电度"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.FXWG.dateTime)" placement="top">
-            <div>{{ scope.row.FXWG.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-
-
-      <el-table-column v-if="typeStr=='EMI'" prop="LJFSL" label="日总辐射值"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.LJFSL.dateTime)" placement="top">
-            <div>{{ scope.row.LJFSL.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='EMI'" prop="FZQD" label="瞬时辐射值"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.FZQD.dateTime)" placement="top">
-            <div>{{ scope.row.FZQD.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column>
-      <el-table-column v-if="typeStr=='EMI'" prop="JCYHJWD" label="环境温度温"  align="center">
-        <template v-slot="scope">
-          <el-tooltip class="box-item" effect="dark"
-                      :content="dateFormat(scope.row.JCYHJWD.dateTime)" placement="top">
-            <div>{{ scope.row.JCYHJWD.value }}</div>
-          </el-tooltip>
-        </template>
-      </el-table-column> -->
-
-
-    </el-table>
-  </div>
-  <el-dialog class="dialogs" width="90%" top="40px" :destroy-on-close="true" v-model="displaySunMatrix"
-    :show-close="true">
-    <template #title>
-      <div class="dialog-title">
-        <img class="dialog-title-img" src="@assets/img/images/dialog-title.png" />
-        <div class="title">设备详情</div>
-      </div>
-    </template>
-    <div class="dialog-body" style="height: 77vh">
-      <img class="dialog-img" src="@assets/img/images/dialog.png" />
-      <lightDetial ref="lightDetial" :stationName="stationName" :leftcellHeight="'2.8vh'" :rightcellHeight="'2.5vh'" />
-    </div>
-  </el-dialog>
+        <div class="dialog-body" style="height: 77vh">
+            <img class="dialog-img" src="@assets/img/images/dialog.png"/>
+            <lightDetial ref="lightDetial" :stationName="stationName" :leftcellHeight="'2.8vh'"
+                         :rightcellHeight="'2.5vh'"/>
+        </div>
+    </el-dialog>
+    <dialog-check
+            ref="tagChild"
+    />
 </template>
 
 <script>
-import moment from "moment";
-import { GetGfEquipmentInfo, } from "@api/stateMonitor";
-import lightDetial from '@/components/lightDetial'
-export default {
-  name: 'photovoltaicList',// 场站详情-列表
-  components: {
-    lightDetial
-  },
-  props: {
-    dataSource: {
-      type: Array,
-      required: true,
-    },
-    width1: {
-      type: Number,
-      default: 130,
-    },
-    width2: {
-      type: Number,
-      default: 130,
-    },
-    padding: {
-      type: Boolean,
-      default: false,
-    },
-    typeStr: {
-      required: true,
-      default: 'IN'
-    },
-    colList: {
-      type: Array,
+    import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
+    import moment from "moment";
+    import {GetGfEquipmentInfo,} from "@api/stateMonitor";
+    import lightDetial from '@/components/lightDetial'
+
+    export default {
+        name: 'photovoltaicList',// 场站详情-列表
+        components: {
+            lightDetial,
+            dialogCheck
+        },
+        props: {
+            stationData: {
+                type: String,
+                required: true,
+            },
+            dataSource: {
+                type: Array,
+                required: true,
+            },
+            width1: {
+                type: Number,
+                default: 130,
+            },
+            width2: {
+                type: Number,
+                default: 130,
+            },
+            padding: {
+                type: Boolean,
+                default: false,
+            },
+            typeStr: {
+                required: true,
+                default: 'IN'
+            },
+            colList: {
+                type: Array,
+            }
+        },
+        data() {
+            return {
+
+                displaySunMatrix: false,
+                stationName: '',
+            }
+        },
+        methods: {
+            // 点击趋势对比
+            handDialog(val, de, item) {
+                if (de !== '') {
+                    this.$refs.tagChild.getXY(val.type, val.name, de, this.stationData + item.aname, item[val.type + 'Value']?.dateTime)
+                } else {
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
+                }
+                event.preventDefault();
+            },
+
+            showLightDetial(val) {
+                // va 场站  v 公司
+                let s = val.aname;
+                this.stationName = val;
+                GetGfEquipmentInfo({
+                    equipmentCode: val.nemCode
+                }).then(res => {
+                    if (res) {
+                        let obj = {
+                            eqType: 'IN',
+                            conqType: val.conqType,
+                            namesed: s
+                        }
+                        this.displaySunMatrix = true
+                        setTimeout(() => {
+                            this.$refs.lightDetial.render(obj, val.nemCode, 0);
+                        }, 100);
+                    }
+                })
+            },
+            dateFormat(num) {
+                if (typeof num == 'number') {
+                    return moment(num).format('YYYY-MM-DD HH:mm:ss')
+                } else {
+                    return num
+                }
+            },
+            moment,
+        },
+        created() {
+        },
+        mounted() {
+        },
+        unmounted() {
+        },
+        computed: {
+            emptyStr() {
+                return this.dataSource === null ? '  ' : '暂无数据'
+            }
+        },
     }
-  },
-  data() {
-    return {
-      displaySunMatrix: false,
-      stationName: '',
-    }
-  },
-  methods: {
-    showLightDetial(val) {
-      // va 场站  v 公司
-      let s = val.aname;
-      this.stationName = val;
-      GetGfEquipmentInfo({
-        equipmentCode: val.nemCode
-      }).then(res => {
-        if (res) {
-          let obj = {
-            eqType: 'IN',
-            conqType: val.conqType,
-            namesed: s
-          }
-          this.displaySunMatrix = true
-          setTimeout(() => {
-            this.$refs.lightDetial.render(obj, val.nemCode, 0);
-          }, 100);
-        }
-      })
-    },
-    dateFormat(num) {
-      if (typeof num == 'number') {
-        return moment(num).format('YYYY-MM-DD HH:mm:ss')
-      } else {
-        return num
-      }
-    },
-    moment,
-  },
-  created() {
-  },
-  mounted() {
-  },
-  unmounted() {
-  },
-  computed: {
-    emptyStr() {
-      return this.dataSource === null ? '  ' : '暂无数据'
-    }
-  },
-}
 </script>
 
 <style lang="less" scoped>
-.photovoltaicList {
-  height: 590px;
-  padding-bottom: 20px;
+  .photovoltaicList {
+    height: 590px;
+    padding-bottom: 20px;
 
-  :deep(.el-table) {
-    font-size: 13px !important;
-    color: #B3B3B3 !important;
+    :deep(.el-table) {
+      font-size: 13px !important;
+      color: #B3B3B3 !important;
 
-    .el-table__cell {
-      padding: 6px 0;
-    }
+      .el-table__cell {
+        padding: 6px 0;
+      }
 
-    .cell {
-      .pad {
-        padding-left: 20px;
+      .cell {
+        .pad {
+          padding-left: 20px;
+        }
       }
-    }
 
-    .el-table__fixed-body-wrapper {
-      top: 48px !important;
-    }
+      .el-table__fixed-body-wrapper {
+        top: 48px !important;
+      }
 
-    .device-state {
-      width: 20px;
-      height: 20px;
-      content: "";
-      background-size: cover;
-      display: inline-block;
-    }
+      .device-state {
+        width: 20px;
+        height: 20px;
+        content: "";
+        background-size: cover;
+        display: inline-block;
+      }
 
 
-    .device-normal {
-      background-image: url('../../../../../../assets/img/images/dotb.png');
+      .device-normal {
+        background-image: url('../../../../../../assets/img/images/dotb.png');
 
-    }
+      }
 
-    .device-fault {
-      background-image: url('../../../../../../assets/img/images/doty.png');
+      .device-fault {
+        background-image: url('../../../../../../assets/img/images/doty.png');
 
-    }
+      }
 
-    .device-halt {
-      background-image: url('../../../../../../assets/img/images/dotr.png');
+      .device-halt {
+        background-image: url('../../../../../../assets/img/images/dotr.png');
 
-    }
+      }
 
-    .device-interrupt {
-      background-image: url('../../../../../../assets/img/images/dotw.png');
+      .device-interrupt {
+        background-image: url('../../../../../../assets/img/images/dotw.png');
 
+      }
     }
   }
-}
-
-.photovoltaicCard,
-.photovoltaicList {
-  //height: calc(100% - 56px);
-  // background: rgba(11, 11, 11, 0.45);
-  // padding: 17px 15px;
-  // border-radius: 8px;
-}
-
-.photovoltaicList {
-  :deep(.el-table) {
-    font-size: 14px !important;
-
-    .el-table__header .el-table__cell {
-      border-right-color: rgba(11, 11, 11, 0.45) !important;
-      border-bottom-color: rgba(11, 11, 11, 0.45) !important;
-      .cell {
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: wrap;
+
+  .photovoltaicCard,
+  .photovoltaicList {
+    //height: calc(100% - 56px);
+    // background: rgba(11, 11, 11, 0.45);
+    // padding: 17px 15px;
+    // border-radius: 8px;
+  }
+
+  .photovoltaicList {
+    :deep(.el-table) {
+      font-size: 14px !important;
+
+      .el-table__header .el-table__cell {
+        border-right-color: rgba(11, 11, 11, 0.45) !important;
+        border-bottom-color: rgba(11, 11, 11, 0.45) !important;
+
+        .cell {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: wrap;
+        }
       }
-    }
 
-    .el-table__cell {
-      height: 48px;
-      padding: 0;
+      .el-table__cell {
+        height: 48px;
+        padding: 0;
 
-      .cell {
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
+        .cell {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
       }
-    }
 
+    }
   }
-}
 </style>
 <style lang="less">
-.photovoltaicList{
-  .el-loading-mask{
-    background-color: transparent !important;
+  .photovoltaicList {
+    .el-loading-mask {
+      background-color: transparent !important;
+    }
   }
-}
 </style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1533 - 1361
src/views/layout/stateMonitor/photovoltaicStation/components/card.vue


+ 82 - 20
src/views/layout/stateMonitor/photovoltaicStation/components/list.vue

@@ -2,10 +2,10 @@
   <div class="photovoltaicList" v-loading="loading">
     <el-table
     :empty-text="emptyStr"
-    :data="dataSourceList" style="width: 100%" height="630px"  stripe>
-      <el-table-column type="index" label="序号" align="center" width="70">
+    :data="dataSourceList" style="width: 100%" height="100%"  stripe>
+      <el-table-column type="index" label="序号" align="center" width="70" >
       </el-table-column>
-      <el-table-column prop="companyName" :label="!isStation ? '公司名称' : '场站名称'" :align="'center'" width="230">
+      <el-table-column prop="companyName"  :label="!isStation ? '公司名称' : '场站名称'" :align="'center'" width="230">
         <template v-slot="scope">
           <div class="detail_Lasts" @click="jumpLevelTwo(scope.row)" :class="isStation && 'hover-data'">
             <div v-if="scope.row.CZZT?.value || scope.row.CZZT?.value === 0" :class="
@@ -21,7 +21,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="地址" :align="'center'">
+      <el-table-column  prop="address" label="地址" :align="'center'">
         <template v-slot="scope">
           <div :class="isStation && 'hover-data'" :title="scope.row.address">
             {{ scope.row.address || "--" }}
@@ -30,17 +30,15 @@
       </el-table-column>
         <el-table-column v-if="theme !== 'maintenance'" v-for="(value,index) in electTarget" :key="index" :align="'center'">
             <template v-slot="scope">
-                <el-tooltip v-if="value.name!=='接入容量'" class="box-item" effect="dark" :content="
-                      getchangeTime(scope.row[value.type]?.dateTime)
-                    " placement="top">
-                    <div class="getLeft" @contextmenu="v(value.type, value.name, scope.row[value.type].code, scope.row)"> {{scope.row[value.type]?.value || '0'}}
+
+                    <div v-if="value.name!=='接入容量'" class="getLeft" @contextmenu="v(value.type, value.name, scope.row[value.type].code, scope.row)"> {{scope.row[value.type]?.value || '0'}}
 
 <!--                        趋势曲线趋势对比弹-->
 
                     </div>
 
 
-                </el-tooltip>
+
                 <span v-else>
                     {{scope.row.jrCapacity|| '0'}}
                 </span>
@@ -52,6 +50,36 @@
 
             </template>
         </el-table-column>
+      <el-table-column prop="RFDL" label="日发电量(kWh)" :align="'center'" v-if="theme === 'maintenance'">
+        <template v-slot="scope">
+          <el-tooltip class="box-item" effect="dark" :content="
+            moment(scope.row.RFDL.dateTime).format('YYYY-MM-DD HH:mm:ss')
+          " placement="top">
+            <div class="row-blue">
+              {{
+                typeof scope.row.RFDL.value == "number"
+                ? scope.row.RFDL.value.toFixed(2)
+                : scope.row.RFDL.value
+              }}
+            </div>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    <el-table-column prop="RLYXS" label="日等效小时(h)" :align="'center'" v-if="theme === 'maintenance'">
+        <template v-slot="scope">
+          <el-tooltip class="box-item" effect="dark" :content="
+            moment(scope.row.RLYXS.dateTime).format('YYYY-MM-DD HH:mm:ss')
+          " placement="top">
+            <div class="row-blue">
+              {{
+                typeof scope.row.RLYXS.value == "number"
+                ? scope.row.RLYXS.value.toFixed(2)
+                : scope.row.RLYXS.value
+              }}
+            </div>
+          </el-tooltip>
+        </template>
+      </el-table-column>
       <el-table-column prop="TXZDTS" label="通讯中断(台)" :align="'center'" v-if="theme === 'maintenance'">
         <template v-slot="scope">
           <el-tooltip class="box-item" effect="dark" :content="
@@ -112,7 +140,18 @@
           </el-tooltip>
         </template>
       </el-table-column>
-      <el-table-column prop="SBZXL" label="设备在线率(台)" :align="'center'" v-if="theme === 'maintenance'">
+      <el-table-column prop="SBZSTS" label="设备总数(台)" :align="'center'" v-if="theme === 'maintenance'">
+        <template v-slot="scope">
+          <div class="row-blue">
+            {{
+                typeof scope.row.SBZSTS.value == "number"
+                ? scope.row.SBZSTS.value.toFixed(0)
+                : '--'
+              }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="SBZXL" label="设备在线率(%)" :align="'center'" v-if="theme === 'maintenance'">
         <template v-slot="scope">
           <div class="row-blue">
             {{ calcOnlinePercentage(scope.row) }}
@@ -132,9 +171,8 @@
               :ys="ys"
               :NameCode="name"
               :visible="visible"
-              :tag1="CZAMC"
-              :tag2="ZJRL"
               v-on:tag="z($event)"
+              :dialogTime="dialogTime"
 
       ></dialog-check>
   </div>
@@ -181,8 +219,6 @@ export default {
         changeSer: false,
         changeWid: false,
         changeAll: false,
-        CZAMC: "CZAMC",
-        ZJRL: "ZJRL",
         ys: 0,
         xs: 0,
         tableData: [],
@@ -192,6 +228,7 @@ export default {
         name: "",
         visible: false,
         cilent: "", //区分点击事件触发条件
+        dialogTime:''
 
 
     };
@@ -206,6 +243,7 @@ export default {
 
       // 点击趋势对比
       v(tagCode, tagName, de, item) {
+          this.dialogTime=item[tagCode].dateTime
           this.name = item.anames;
           this.cilent = process.env.VUE_APP_DIALOG_POINT; //区分鼠标左右键点击
           this.tagCode = tagCode;
@@ -278,10 +316,10 @@ export default {
     jumpLevelTwo(param) {
       if (param.orgType === "STA") {
         // 场站跳转详情
-        if (this.$route.query.companyCode) {
+        if (!param.parentCode?.endsWith('_RGN')) {
           this.$router.push({
             name: "lighthome",
-            query: { companyCode: this.$route.query.companyCode, stationCode: param.code, type: this.typeStr },
+            query: { companyCode: param.parentCode, stationCode: param.code, type: this.typeStr },
           })
         } else {
           this.$router.push({
@@ -362,12 +400,36 @@ export default {
   color: #b3b3b3 !important;
 }
 
+:deep(.el-table) {
+    font-size: 14px !important;
+
+    .el-table__header .el-table__cell {
+      border-right-color: rgba(11, 11, 11, 0.45) !important;
+      border-bottom-color: rgba(11, 11, 11, 0.45) !important;
+      .cell {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: wrap;
+      }
+    }
+
+    .el-table__cell {
+      height: 48px;
+      padding: 0;
+
+      .cell {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+    }
+
+  }
+
 
 .photovoltaicList {
-  height: 630px;
-  padding: 30px 20px;
+  height: 100%;
   overflow: hidden;
-  background: rgba(0, 0, 0, 0.45);
 
   .detail_Lasts {
     display: flex;
@@ -424,7 +486,7 @@ export default {
   }
 
   .row-blue {
-    color: #1b99ff;
+    // color: #1b99ff;
   }
 
   .row-white {

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1906 - 1414
src/views/layout/stateMonitor/photovoltaicStation/index.vue


+ 366 - 353
src/views/layout/stateMonitor/photovoltaicStationIndex/index.vue

@@ -1,80 +1,77 @@
 <template>
-    <div class="indexcon">
-        <div class="indexinnercon" @animationend="animationend">
-            <img src="@assets/images/photovoltaic-background.jpg" style="width: 100%;height: 100%;" />
-        </div>
-        <div class="containerr" v-if="startInit">
-            <div style="padding-left: 30px;" class="posi">
-                <HeaderBtn :typeStr="type" :code="stationCode" :companyCode="''" />
-            </div>
-
-
-            <div style="display: inline-block;" class="posi"
-                :style="{ transform: `scale(${scale})`, transformOrigin: '0 0' }">
-                <template v-if="!showLineView">
-                    <LeftTop :realtimeData="realtimeData" :companyCode="companyCode" :type="type" />
-                    <LeftSlide class="posi" :companyCode="companyCode" :calcData="calcData" />
-                </template>
-                <LeftSlideDetail v-else :zjCapacity="zjCapacity" :calcData="calcData" :realtimeData="realtimeData"
-                    :queryCode="queryCode" />
-            </div>
-            <RightSlide v-if="!showLineView" :companyCode="companyCode" :realtimeData="realtimeData" :alarmData="alarmData"
-                :calcData="calcData" @changeLine="changeLine" />
-            <RightSlideDetail v-else :lineCode="queryCode" :companyCode="companyCode" :realtimeData="realtimeData"
-                :alarmData="alarmData" :calcData="calcData" @changeLine="changeLine" @goback="goback" />
-
-
-            <div class="containerr" style="padding-left: 0;">
-                <!-- 绘制点 -->
-                <img class="icon animate__animated animate__bounceIn" v-for="img in pointData" :src="icons[img.type]"
-                    :style="{ left: `${img.x / 1920 * 100}%`, top: `${img.y / 1080 * 100}%` }"
-                    v-show="!chooseNodeCode || chooseNodeCode === img.nemCode || chooseNodeCode === img.parentCode || chooseNodeCode === img.originCode"
-                    @mouseout.stop.prevent.capture="hideDeviceHover" @mouseenter.stop.prevent.capture="e => hoverDevice(e, img)" />
-                <!-- 阵区点 -->
-                <div class="agnode animate__animated animate__bounceIn" v-for="ag in agNodes" :key="ag.nemCode"
-                    :class="{ agalarm: agAlarmData[ag.nemCode] }"
-                    :style="{ left: `${ag.xpoint / 1920 * 100}%`, top: `${ag.ypoint / 1080 * 100}%` }"
-                    @mouseover.stop.prevent.capture="e => hoverAg(e, ag)" @mouseleave.stop.prevent.capture="hideAgHover"
-                    v-show="!chooseNodeCode || chooseNodeCode === ag.nemCode || chooseNodeCode === ag.parentCode || chooseNodeCode === ag.originCode">
-                    <div class="dot"></div>
-                    <div class="tag" v-show="chooseNodeCode">
-                        {{ ag.aname }}
-                    </div>
-                </div>
-                <!-- 线路点 -->
-                <div v-for="line in lineNodes" :key="line.nemCode" style="position: absolute;"
-                    :style="{ left: `calc(${line.xpoint / 1920 * 100}% - 35px)`, top: `calc(${line.ypoint / 1080 * 100}% - 21px)` }">
-                    <div v-if="line.nemCode === chooseNodeCode" class="linec">
-                        <img src="@assets/img/photovoltaic/lineloc.png" style="width: 71px;" />
-                        <img class="ab" src="@assets/img/photovoltaic/triangle.png" style="width: 44px;" />
-                        <div class="li"></div>
-                        <div class="licon">
-                            {{ line.name }}
-                        </div>
-                    </div>
-                </div>
-                <!-- 阵区悬浮框 -->
-                <HoverAg v-show="showAghover || showAghoverSub" :position="agPosition" :info="agInfo" :realData="agRealData[agInfo.nemCode]"
-                    :alarm="agAlarmData[agInfo.nemCode]" 
-                    @onmouse="emitAgHover"
-                    />
-                <!-- 设备悬浮框 -->
-                <HoverDevice v-show="showDeviceHover || showDeviceHoverSub" :position="devicePosition" :info="deviceInfo"
-                    @onmouse="emitDeviceHover" />
-            </div>
-            <div style="position: absolute;z-index: 0;left: 0;top: 0;" v-show="!showLineView">
-                <img src="@assets/images/mask-left.png" style="width:402px" />
-            </div>
-            <div style="position: absolute;z-index: 0;left: 0;top: 0;right: 0;">
-                <img src="@assets/images/mask-top.png" style="width:100%" />
-            </div>
+  <div class="indexcon">
+    <div class="indexinnercon" @animationend="animationend">
+      <img src="@assets/images/photovoltaic-background.jpg" style="width: 100%;height: 100%;" />
+    </div>
+    <div class="containerr" v-if="startInit">
+      <div style="padding-left: 30px;" class="posi">
+        <HeaderBtn @onChange="changeSome" />
+      </div>
+
+
+      <div style="display: inline-block;" class="posi" :style="{ transform: `scale(${scale})`, transformOrigin: '0 0' }">
+        <template v-if="!showLineView">
+          <LeftTop :realtimeData="realtimeData" :companyCode="companyCode" :type="type" />
+          <LeftSlide class="posi" :companyCode="companyCode" :calcData="calcData" />
+        </template>
+        <LeftSlideDetail v-else :zjCapacity="zjCapacity" :calcData="calcData" :realtimeData="realtimeData"
+          :queryCode="queryCode" />
+      </div>
+      <RightSlide v-if="!showLineView" :companyCode="companyCode" :realtimeData="realtimeData" :alarmData="alarmData"
+        :calcData="calcData" @changeLine="changeLine" />
+      <RightSlideDetail v-else :lineCode="queryCode" :companyCode="companyCode" :realtimeData="realtimeData"
+        :alarmData="alarmData" :calcData="calcData" @changeLine="changeLine" @goback="goback" />
+
+
+      <div class="containerr" style="padding-left: 0;">
+        <!-- 绘制点 -->
+        <img class="icon animate__animated animate__bounceIn" v-for="img in pointData" :src="icons[img.type]"
+          :style="{ left: `${img.x / 1920 * 100}%`, top: `${img.y / 1080 * 100}%` }"
+          v-show="!chooseNodeCode || chooseNodeCode === img.nemCode || chooseNodeCode === img.parentCode || chooseNodeCode === img.originCode"
+          @mouseout.stop.prevent.capture="hideDeviceHover" @mouseenter.stop.prevent.capture="e => hoverDevice(e, img)" />
+        <!-- 阵区点 -->
+        <div class="agnode animate__animated animate__bounceIn" v-for="ag in agNodes" :key="ag.nemCode"
+          :class="{ agalarm: agAlarmData[ag.nemCode] }"
+          :style="{ left: `${ag.xpoint / 1920 * 100}%`, top: `${ag.ypoint / 1080 * 100}%` }"
+          @mouseover.stop.prevent.capture="e => hoverAg(e, ag)" @mouseleave.stop.prevent.capture="hideAgHover"
+          v-show="!chooseNodeCode || chooseNodeCode === ag.nemCode || chooseNodeCode === ag.parentCode || chooseNodeCode === ag.originCode">
+          <div class="dot"></div>
+          <div class="tag" v-show="chooseNodeCode">
+            {{ ag.aname }}
+          </div>
         </div>
-        <div class="sidebar">
-            <div>
-                <saliderBar :routerData="routerData" />
+        <!-- 线路点 -->
+        <div v-for="line in lineNodes" :key="line.nemCode" style="position: absolute;"
+          :style="{ left: `calc(${line.xpoint / 1920 * 100}% - 35px)`, top: `calc(${line.ypoint / 1080 * 100}% - 21px)` }">
+          <div v-if="line.nemCode === chooseNodeCode" class="linec">
+            <img src="@assets/img/photovoltaic/lineloc.png" style="width: 71px;" />
+            <img class="ab" src="@assets/img/photovoltaic/triangle.png" style="width: 44px;" />
+            <div class="li"></div>
+            <div class="licon">
+              {{ line.name }}
             </div>
+          </div>
         </div>
+        <!-- 阵区悬浮框 -->
+        <HoverAg v-show="showAghover || showAghoverSub" :position="agPosition" :info="agInfo"
+          :realData="agRealData[agInfo.nemCode]" :alarm="agAlarmData[agInfo.nemCode]" @onmouse="emitAgHover" />
+        <!-- 设备悬浮框 -->
+        <HoverDevice v-show="showDeviceHover || showDeviceHoverSub" :position="devicePosition" :info="deviceInfo"
+          @onmouse="emitDeviceHover" />
+      </div>
+      <div style="position: absolute;z-index: 0;left: 0;top: 0;" v-show="!showLineView">
+        <img src="@assets/images/mask-left.png" style="width:402px" />
+      </div>
+      <div style="position: absolute;z-index: 0;left: 0;top: 0;right: 0;">
+        <img src="@assets/images/mask-top.png" style="width:100%" />
+      </div>
+    </div>
+    <div class="sidebar">
+      <div>
+        <saliderBar :routerData="routerData" />
+      </div>
     </div>
+  </div>
 </template>
 <script setup>
 import { useRoute, useRouter } from 'vue-router';
@@ -91,9 +88,11 @@ import { GetRealTimeValues, GetAlarmDataApi, GetCalcValues } from '@api/home'
 import { GetIntelligentPositionData, GetSquaresAlarmCountByPowerstationId } from '@api/station'
 import { computed, nextTick, onBeforeUnmount, onMounted, onUnmounted, ref, watch } from 'vue';
 import { useStore } from 'vuex'
+import { alarmRefreshTime, rtDataRefreshTime } from '@/config'
 import { useResizeScale } from './hooks';
 const { stationCode, type } = useRoute().query
 
+
 const route = useRoute()
 const router = useRouter()
 // 是显示站还是线路
@@ -101,20 +100,20 @@ const showLineView = ref(!!route.query.lineCode)
 
 
 function goback() {
-    // 返回首页清理一些东西
-    $store.commit('SET_CHOOSE_NODE')
-    const query = {
-        ...route.query,
-    }
-    delete query.lineCode
-    delete query.parentCode
-    router.replace({
-        query
-    })
-    queryCode.value = route.query.stationCode
-    setTimeout(() => {
-        showLineView.value = false
-    },)
+  // 返回首页清理一些东西
+  $store.commit('SET_CHOOSE_NODE')
+  const query = {
+    ...route.query,
+  }
+  delete query.lineCode
+  delete query.parentCode
+  router.replace({
+    query
+  })
+  queryCode.value = route.query.stationCode
+  setTimeout(() => {
+    showLineView.value = false
+  },)
 }
 
 let queryCode = ref(route.query.lineCode || route.query.stationCode)
@@ -123,30 +122,30 @@ let queryCode = ref(route.query.lineCode || route.query.stationCode)
 const zjCapacity = ref('--')
 
 const changeLine = node => {
-    const lineCode = node.nemCode
-    zjCapacity.value = node.zjCapacity
+  const lineCode = node.nemCode
+  zjCapacity.value = node.zjCapacity
 
-    showLineView.value = !!lineCode
-    queryCode.value = lineCode || route.query.stationCode
+  showLineView.value = !!lineCode
+  queryCode.value = lineCode || route.query.stationCode
 }
 
 watch(queryCode, (v, v2) => {
-    if (v != v2) {
-        // 切换的时候清空数据
-        realtimeData.value = null
-        calcData.value = null
-        alarmData.value = null
-        clearTimeout(timer)
-        updateData()
-    }
+  if (v != v2) {
+    // 切换的时候清空数据
+    realtimeData.value = null
+    calcData.value = null
+    alarmData.value = null
+    clearTimeout(timer)
+    updateData()
+  }
 })
 
 const scale = useResizeScale()
 
 const icons = {
-    UAV: require('@assets/img/photovoltaic/uav.png'),
-    CAM: require('@assets/img/photovoltaic/cam.png'),
-    ROB: require('@assets/img/photovoltaic/rob.png'),
+  UAV: require('@assets/img/photovoltaic/uav.png'),
+  CAM: require('@assets/img/photovoltaic/cam.png'),
+  ROB: require('@assets/img/photovoltaic/rob.png'),
 }
 const companyCode = stationCode
 // 实时数据
@@ -162,120 +161,127 @@ const pointData = ref([])
 const startInit = ref(false)
 
 let timer
-function updateData() {
+async function updateData() {
+  await Promise.all([
     GetRealTimeValues({
-        companyCode: queryCode.value,
-        uniformCode: 'NFDL,RFDL,AQTS,YFDL,SSZGL,RLYXS,YLYXS,NLYXS'
+      companyCode: queryCode.value,
+      uniformCode: 'NFDL,RFDL,AQTS,YFDL,SSZGL,RLYXS,YLYXS,NLYXS'
     }).then(res => {
-        realtimeData.value = res
-    })
-
-    GetAlarmDataApi({
-        companyCode: queryCode.value,
-    }).then(res => {
-        alarmData.value = res
-    })
-
+      realtimeData.value = res
+    }),
     GetCalcValues({
-        companyCode: queryCode.value,
-        uniformCode: 'JYM,JYS,CO2,SO2'
+      companyCode: queryCode.value,
+      uniformCode: 'JYM,JYS,CO2,SO2'
     }).then(res => {
-        calcData.value = res
+      calcData.value = res
     })
+  ])
 
-    timer = setTimeout(updateData, 3000)
+  timer = setTimeout(updateData, rtDataRefreshTime)
 }
 
+
 function animationend() {
-    startInit.value = true
+  startInit.value = true
+}
+// 改变场站时检查跳转
+function changeSome({ companyCode, stationCode }) {
+  if (companyCode !== stationCode) {
+    router.replace({
+      name: 'lighthome',
+      query: {
+        ...route.query
+      }
+    })
+  }
 }
 
 onMounted(async () => {
-    // 获取组织列表
-    await $store.dispatch('getTreeInfoApi', stationCode, type)
-    // 树节点的flat map
-    const agNodesMap = $store.getters.nodeMap
-    GetIntelligentPositionData({ stationCode }).then(list => {
-        const result = []
-        list.forEach(item => {
-            const node = agNodesMap[item.code]
-            let originCode, parentCode
-            if (node.type === 'AG') {
-                originCode = agNodesMap[node.parentCode].parentCode
-            }
-            parentCode = node.parentCode
-            item.ROB && item.ROBDatas.forEach(it => {
-                result.push({
-                    ...it,
-                    x: it.xPoint,
-                    y: it.yPoint,
-                    type: 'ROB',
-                    nemCode: item.code,
-                    parentCode,
-                    originCode
-                })
-            })
-            item.UAV && item.UAVDatas.forEach(it => {
-                result.push({
-                    ...it,
-                    x: it.xPoint,
-                    y: it.yPoint,
-                    type: 'UAV',
-                    nemCode: item.code,
-                    parentCode,
-                    originCode
-                })
-            })
-            if (item.CAM) {
-                result.push({
-                    x: item.CAMxPoint,
-                    y: item.CAMyPoint,
-                    num: item.CAM,
-                    CODE: 'CAM',
-                    type: 'CAM',
-                    nemCode: item.code,
-                    parentCode,
-                    originCode
-                })
-            }
+  // 获取组织列表
+  await $store.dispatch('getTreeInfoApi', stationCode, type)
+  // 树节点的flat map
+  const agNodesMap = $store.getters.nodeMap
+  GetIntelligentPositionData({ stationCode }).then(list => {
+    const result = []
+    list.forEach(item => {
+      const node = agNodesMap[item.code]
+      let originCode, parentCode
+      if (node.type === 'AG') {
+        originCode = agNodesMap[node.parentCode].parentCode
+      }
+      parentCode = node.parentCode
+      item.ROB && item.ROBDatas.forEach(it => {
+        result.push({
+          ...it,
+          x: it.xPoint,
+          y: it.yPoint,
+          type: 'ROB',
+          nemCode: item.code,
+          parentCode,
+          originCode
+        })
+      })
+      item.UAV && item.UAVDatas.forEach(it => {
+        result.push({
+          ...it,
+          x: it.xPoint,
+          y: it.yPoint,
+          type: 'UAV',
+          nemCode: item.code,
+          parentCode,
+          originCode
         })
-        pointData.value = result
+      })
+      if (item.CAM) {
+        result.push({
+          x: item.CAMxPoint,
+          y: item.CAMyPoint,
+          num: item.CAM,
+          CODE: 'CAM',
+          type: 'CAM',
+          nemCode: item.code,
+          parentCode,
+          originCode
+        })
+      }
     })
+    pointData.value = result
+  })
 
-    updateData()
+  updateData()
 })
 onUnmounted(() => {
-    clearTimeout(timer)
+  clearTimeout(timer)
 })
 // 设备悬浮控制
 const devicePosition = ref({})
 const showDeviceHover = ref(false)
 const showDeviceHoverSub = ref(false)
 function emitDeviceHover(v) {
-    showDeviceHoverSub.value = v
+  showDeviceHoverSub.value = v
 }
 function hideDeviceHover() {
-    setTimeout(() => {
-        showDeviceHover.value = false
-    }, 20)
+  setTimeout(() => {
+    showDeviceHover.value = false
+  }, 20)
 }
 const deviceInfo = ref({})
 function hoverDevice({ pageX, pageY }, img) {
-    let top, left
-    // 算往哪边放
-    if (pageX > window.innerWidth / 2) {
-        left = `calc(${img.x / 1920 * 100}% - 341px)`
-    } else {
-        left = `calc(${img.x / 1920 * 100}% + 47px)`
-    }
-    if (pageY > window.innerHeight / 2) {
-        top = `calc(${img.y / 1080 * 100}% - 114px)`
-    } else {
-        top = `${img.y / 1080 * 100}%`
-    }
-    deviceInfo.value = img
-    devicePosition.value = { top, left }
-    showDeviceHover.value = true
+  let top, left
+  // 算往哪边放
+  if (pageX > window.innerWidth / 2) {
+    left = `calc(${img.x / 1920 * 100}% - 341px)`
+  } else {
+    left = `calc(${img.x / 1920 * 100}% + 47px)`
+  }
+  if (pageY > window.innerHeight / 2) {
+    top = `calc(${img.y / 1080 * 100}% - 114px)`
+  } else {
+    top = `${img.y / 1080 * 100}%`
+  }
+  deviceInfo.value = img
+  devicePosition.value = { top, left }
+  showDeviceHover.value = true
 }
 
 // 阵区悬浮控制
@@ -283,46 +289,46 @@ const agPosition = ref({})
 const showAghover = ref(false)
 const showAghoverSub = ref(false)
 function emitAgHover(v) {
-    showAghoverSub.value = v
+  showAghoverSub.value = v
 }
 function hideAgHover() {
-    setTimeout(() => {
-        showAghover.value = false
-    }, 100)
+  setTimeout(() => {
+    showAghover.value = false
+  }, 100)
 }
 const agInfo = ref({})
 function hoverAg({ pageX, pageY }, ag) {
-    let top, left
-    // 算往哪边放
-    if (pageX > window.innerWidth / 2) {
-        left = `calc(${ag.xpoint / 1920 * 100}% - 217px)`
-    } else {
-        left = `calc(${ag.xpoint / 1920 * 100}% + 20px)`
-    }
-    if (pageY > window.innerHeight / 2) {
-        top = `calc(${ag.ypoint / 1080 * 100}% - 127px)`
-    } else {
-        top = `${ag.ypoint / 1080 * 100}%`
-    }
-    agInfo.value = ag
-    agPosition.value = { top, left }
-    showAghover.value = true
+  let top, left
+  // 算往哪边放
+  if (pageX > window.innerWidth / 2) {
+    left = `calc(${ag.xpoint / 1920 * 100}% - 217px)`
+  } else {
+    left = `calc(${ag.xpoint / 1920 * 100}% + 20px)`
+  }
+  if (pageY > window.innerHeight / 2) {
+    top = `calc(${ag.ypoint / 1080 * 100}% - 127px)`
+  } else {
+    top = `${ag.ypoint / 1080 * 100}%`
+  }
+  agInfo.value = ag
+  agPosition.value = { top, left }
+  showAghover.value = true
 }
 
 const $store = useStore()
 const routerData = computed(() => {
-    if (!$store.state.user.MenuList) {
-        return []
-    }
-    const result = $store.state.user.MenuList.find(item => {
-        return item.permission == 'stateMonitor'
-    })
-
-    const result1 = result.children?.find(item1 => {
-        return item1.permission == 'factoryMonitor1'
-    })
-
-    return result1.children;
+  if (!$store.state.user.MenuList) {
+    return []
+  }
+  const result = $store.state.user.MenuList.find(item => {
+    return item.permission == 'stateMonitor'
+  })
+
+  const result1 = result.children?.find(item1 => {
+    return item1.permission == 'factoryMonitor1'
+  })
+
+  return result1.children;
 })
 // 所有的线路点
 const lineNodes = computed(() => $store.getters.lineNodes)
@@ -335,178 +341,185 @@ const chooseNodeCode = computed(() => $store.state.factory.chooseNodeCode)
 // 获取阵区告警数量
 let alarmtimer
 const agAlarmData = ref({})
-function getAgAlarmDataApi() {
+async function getAgAlarmDataApi() {
+  await Promise.all([
     GetSquaresAlarmCountByPowerstationId({ stationCode }).then(res => {
-        const t = {}
-        res.forEach(({ agId, alarmCount }) => {
-            t[agId] = alarmCount
-        })
-        agAlarmData.value = t
-        alarmtimer = setTimeout(getAgAlarmDataApi, 3000)
+      const t = {}
+      res.forEach(({ agId, alarmCount }) => {
+        t[agId] = alarmCount
+      })
+      agAlarmData.value = t
+    }),
+    GetAlarmDataApi({
+      companyCode: queryCode.value,
+    }).then(res => {
+      alarmData.value = res
     })
+  ])
+  alarmtimer = setTimeout(getAgAlarmDataApi, alarmRefreshTime)
 }
 
 onMounted(getAgAlarmDataApi)
 onBeforeUnmount(() => {
-    clearTimeout(alarmtimer)
+  clearTimeout(alarmtimer)
 })
 
 // 获取所有阵区的数据并实时刷新
 let agRealDataTimer
 const agRealData = computed(() => $store.state.factory.agValueMap)
 async function getAgRealData() {
-    await $store.dispatch('getAgValue')
-    agRealDataTimer = setTimeout(getAgRealData, 5000)
+  await $store.dispatch('getAgValue')
+  agRealDataTimer = setTimeout(getAgRealData, rtDataRefreshTime)
 }
 onMounted(async () => {
-    await $store.dispatch('getAgConfig', stationCode)
-    getAgRealData()
+  await $store.dispatch('getAgConfig', stationCode)
+  getAgRealData()
 })
 onBeforeUnmount(() => {
-    $store.commit('RESET')
-    $store.commit('SET_CHOOSE_NODE', null)
-    clearTimeout(agRealDataTimer)
+  $store.commit('RESET')
+  $store.commit('SET_CHOOSE_NODE', null)
+  clearTimeout(agRealDataTimer)
 })
 
 </script>
 
 <style scoped>
 @keyframes mapani {
-    from {
-        opacity: 0.1;
-        transform: perspective(500px) rotateX(-330deg) scale(2);
-    }
+  from {
+    opacity: 0.1;
+    transform: perspective(500px) rotateX(-330deg) scale(2);
+  }
 
-    to {
-        opacity: 1;
-        transform: perspective(500px) rotateX(-360deg) scale(1);
-    }
+  to {
+    opacity: 1;
+    transform: perspective(500px) rotateX(-360deg) scale(1);
+  }
 }
 
 .agnode {
-    position: absolute;
-    width: 24px;
-    height: 24px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+  position: absolute;
+  width: 24px;
+  height: 24px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
 }
 
 .agnode .dot {
-    width: 10px;
-    height: 10px;
-    border-radius: 5px;
-    background-color: #006F50;
-    border: 1px solid #CBFFE3;
-    position: relative;
-    box-shadow: 0 0 10px 6px #2b1d0f7f;
+  width: 10px;
+  height: 10px;
+  border-radius: 5px;
+  background-color: #006F50;
+  border: 1px solid #CBFFE3;
+  position: relative;
+  box-shadow: 0 0 10px 6px #2b1d0f7f;
 }
 
 .agnode.agalarm .dot {
-    background-color: #D11D00;
-    border-color: #FFC0B2;
+  background-color: #D11D00;
+  border-color: #FFC0B2;
 }
 
 .agnode.agalarm .dot::before {
-    background-color: #D11D0066;
-    width: 16px;
-    height: 16px;
-    border-radius: 8px;
-    position: absolute;
-    left: calc(50% - 8px);
-    top: calc(50% - 8px);
-    content: '';
-    z-index: -1;
-    animation: scl 1.5s 0s infinite;
+  background-color: #D11D0066;
+  width: 16px;
+  height: 16px;
+  border-radius: 8px;
+  position: absolute;
+  left: calc(50% - 8px);
+  top: calc(50% - 8px);
+  content: '';
+  z-index: -1;
+  animation: scl 1.5s 0s infinite;
 }
 
 .agnode.agalarm .dot::after {
-    background-color: #D11D0033;
-    width: 24px;
-    height: 24px;
-    border-radius: 12px;
-    position: absolute;
-    left: calc(50% - 12px);
-    top: calc(50% - 12px);
-    content: '';
-    z-index: -2;
-    animation: scl 1.5s 0s infinite;
+  background-color: #D11D0033;
+  width: 24px;
+  height: 24px;
+  border-radius: 12px;
+  position: absolute;
+  left: calc(50% - 12px);
+  top: calc(50% - 12px);
+  content: '';
+  z-index: -2;
+  animation: scl 1.5s 0s infinite;
 }
 
 @keyframes scl {
-    from {
-        transform: scale(0.5);
-    }
+  from {
+    transform: scale(0.5);
+  }
 
-    to {
-        transform: scale(1);
-    }
+  to {
+    transform: scale(1);
+  }
 }
 
 .indexcon {
-    width: 100%;
-    height: 100%;
-    position: relative;
+  width: 100%;
+  height: 100%;
+  position: relative;
 }
 
 .sidebar {
-    position: absolute;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    width: 70px;
-    z-index: 10;
+  position: absolute;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  width: 70px;
+  z-index: 10;
 }
 
 .sidebar>div {
-    background-color: #1a1d2466;
-    width: 50px;
-    border-radius: 25px;
+  background-color: #1a1d2466;
+  width: 50px;
+  border-radius: 25px;
 }
 
 .indexinnercon {
-    width: 100%;
-    position: absolute;
-    left: 0;
-    top: -59px;
-    bottom: 0;
-    animation: mapani 1s ease-in-out;
+  width: 100%;
+  position: absolute;
+  left: 0;
+  top: -59px;
+  bottom: 0;
+  animation: mapani 1s ease-in-out;
 }
 
 .containerr {
-    position: absolute;
-    z-index: 1;
-    top: -59px;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    padding-top: 59px;
+  position: absolute;
+  z-index: 1;
+  top: -59px;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  padding-top: 59px;
 }
 
 .icon {
-    width: 53px;
-    position: absolute;
+  width: 53px;
+  position: absolute;
 }
 
 .posi {
-    position: relative;
-    z-index: 9;
+  position: relative;
+  z-index: 9;
 }
 
 .tag {
-    position: absolute;
-    top: -8px;
-    left: 27px;
-    padding-left: 5px;
-    padding-right: 14px;
-    white-space: nowrap;
-    height: 20px;
-    line-height: 18px;
-    color: #fff;
-    font-size: 14px;
-    border: 1px solid #ff60006b;
-    background: rgba(43, 19, 0, 0.7);
-    border-left-width: 0;
+  position: absolute;
+  top: -8px;
+  left: 27px;
+  padding-left: 5px;
+  padding-right: 14px;
+  white-space: nowrap;
+  height: 20px;
+  line-height: 18px;
+  color: #fff;
+  font-size: 14px;
+  border: 1px solid #ff60006b;
+  background: rgba(43, 19, 0, 0.7);
+  border-left-width: 0;
 }
 
 /* .tag::after{
@@ -519,46 +532,46 @@ onBeforeUnmount(() => {
     border-top-color: transparent;
 } */
 .tag::before {
-    content: '';
-    position: absolute;
-    left: -17px;
-    top: -1px;
-    width: 17px;
-    height: 20px;
-    background-image: url('../../../../assets/img/photovoltaic/anc.png');
-    background-size: cover;
+  content: '';
+  position: absolute;
+  left: -17px;
+  top: -1px;
+  width: 17px;
+  height: 20px;
+  background-image: url('../../../../assets/img/photovoltaic/anc.png');
+  background-size: cover;
 }
 
 .linec {
-    position: relative;
+  position: relative;
 }
 
 .linec .ab {
-    position: absolute;
-    top: -83px;
-    left: calc(50% - 22px);
+  position: absolute;
+  top: -83px;
+  left: calc(50% - 22px);
 }
 
 .linec .li {
-    position: absolute;
-    background-color: #FF8B33;
-    width: 2px;
-    height: 50px;
-    top: -47px;
-    left: calc(50% - 1px);
-    opacity: .8;
-    z-index: 2;
+  position: absolute;
+  background-color: #FF8B33;
+  width: 2px;
+  height: 50px;
+  top: -47px;
+  left: calc(50% - 1px);
+  opacity: .8;
+  z-index: 2;
 }
 
 .linec .licon {
-    position: absolute;
-    background-color: #03091199;
-    border: 1px solid #F1830B;
-    padding: 3px 30px 4px;
-    font-size: 14px;
-    color: #fff;
-    top: -83px;
-    right: 60px;
-    white-space: nowrap;
+  position: absolute;
+  background-color: #03091199;
+  border: 1px solid #F1830B;
+  padding: 3px 30px 4px;
+  font-size: 14px;
+  color: #fff;
+  top: -83px;
+  right: 60px;
+  white-space: nowrap;
 }
 </style>

+ 18 - 4
src/views/layout/stateMonitor/photovoltaicStationIndex/subview/LeftChart.vue

@@ -5,8 +5,9 @@
 import * as echarts from 'echarts';
 import { GetCurveValues } from '@api/home'
 import dayjs from "dayjs";
-import { computed, onMounted, ref } from 'vue';
+import { computed, onMounted, ref, onBeforeUnmount } from 'vue';
 import { legendTextStyle, xNameTextStyle, yNameTextStyle } from './chartStyle'
+import { curveDateRefreshTime } from '@/config'
 
 const props = defineProps({
   companyCode: {}
@@ -29,15 +30,25 @@ function getTimeStamp() {
   emptyData.push('0');
   return timeStamp;
 }
-
-onMounted(() => {
-  GetCurveValues({
+let curTimer
+async function refreshCurTimer() {
+  clearTimeout(curTimer)
+  await GetCurveValues({
     companyCode: props.companyCode,
     uniformCode: 'SSPJGZD,SSZGL',
     intervalTime: 900
   }).then(res => {
     getChart(combineSeries(res))
   })
+  curTimer = setTimeout(refreshCurTimer, curveDateRefreshTime)
+}
+
+onMounted(() => {
+  refreshCurTimer()
+})
+
+onBeforeUnmount(() => {
+  clearTimeout(curTimer)
 })
 
 function combineSeries(data) {
@@ -116,6 +127,9 @@ function getData(datas) {
 
 function getChart(series) {
   var chartDom = document.getElementById('leftchart');
+  if (!chartDom) {
+    return
+  }
   var myChart = echarts.init(chartDom);        // 绘制图表
   var options = {
     title: {},

+ 29 - 9
src/views/layout/stateMonitor/photovoltaicStationIndex/subview/LeftSlideDetail.vue

@@ -127,13 +127,14 @@
   </div>
 </template>
 <script setup>
-import { computed, nextTick, onMounted, ref, watch } from 'vue';
+import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
 import CardVue from '../components/CardVue.vue';
 import CheckLabel from '../components/CheckLabel.vue';
 import { GetPlanValues } from '@api/home'
 import { GetActAndLoseEleValues, GetYearEleValuesAndCompare } from '@api/station'
 import { grid, xNameTextStyle, yNameTextStyle, legendTextStyle } from './chartStyle'
 import * as echarts from 'echarts';
+import { curveDateRefreshTime } from '../../../../../config';
 
 const leftr = require('@assets/img/photovoltaic/arrow-left.png')
 const rightr = require('@assets/img/photovoltaic/arrow-right.png')
@@ -209,17 +210,22 @@ watch(() => props.queryCode, () => {
 
 
 
-let echart1
+let echart1, chart1timer
 // 切换日月年时图表变化
 const ryn = ref('日')
 watch(ryn, getChart1)
-function getChart1() {
-  GetActAndLoseEleValues({
+async function getChart1() {
+  clearTimeout(chart1timer)
+  await GetActAndLoseEleValues({
     companyCode: props.queryCode,
     type: ({ '日': 'D', '月': 'M', '年': 'Y' })[ryn.value]
   }).then(data => {
     if (!echart1) {
-      echart1 = echarts.init(document.getElementById('chart1'))
+      const dom = document.getElementById('chart1')
+      if (!dom) {
+        return
+      }
+      echart1 = echarts.init(dom)
     }
     const option = {
       tooltip: {
@@ -336,17 +342,25 @@ function getChart1() {
     }
     echart1.setOption(option)
   })
+  chart1timer = setTimeout(() => getChart1(), curveDateRefreshTime)
 }
-let chart2
+let chart2, chart2timer
 // 对比图
-function getChart2() {
-  GetYearEleValuesAndCompare({
+async function getChart2() {
+  clearTimeout(chart2timer)
+  await GetYearEleValuesAndCompare({
     companyCode: props.queryCode,
     year: new Date().getFullYear()
   }).then(data => {
     // console.log(data)
     const [data1, data2] = Object.values(data)
-    chart2 = echarts.init(document.getElementById('chart2'))
+    if (!chart2) {
+      const dom = document.getElementById('chart2')
+      if (!dom) {
+        return
+      }
+      chart2 = echarts.init(dom)
+    }
     const option = {
       tooltip: {
         trigger: 'axis',
@@ -505,6 +519,7 @@ function getChart2() {
     }
     chart2.setOption(option)
   })
+  chart2timer = setTimeout(() => getChart2(), curveDateRefreshTime)
 }
 
 function formatValue(v, b = 1) {
@@ -528,6 +543,11 @@ onMounted(() => {
   })
 })
 
+onBeforeUnmount(() => {
+  clearTimeout(chart1timer)
+  clearTimeout(chart2timer)
+})
+
 </script>
 <style scoped>
 .lslidecon {

+ 2 - 1
src/views/layout/stateMonitor/photovoltaicStationIndex/subview/RightSlide.vue

@@ -197,6 +197,7 @@ import { GetCompanEquipmentsDatas, GetRtValuesByTagName } from '@api/photovoltai
 import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue';
 import { useResizeScale, useClickAlarm } from '../hooks';
 import CardVue from '../components/CardVue.vue';
+import { alarmRefreshTime, rtDataRefreshTime } from '@/config'
 import { useRouter } from 'vue-router';
 
 const props = defineProps({
@@ -343,7 +344,7 @@ function updateDeviceState() {
         count[s]++
       })
       sbzt.value = count
-      timer = setTimeout(updateDeviceState, 3000)
+      timer = setTimeout(updateDeviceState, rtDataRefreshTime)
     })
   })
 }

+ 9 - 4
src/views/layout/stateMonitor/photovoltaicStationIndex/subview/RightSlideDetail.vue

@@ -160,6 +160,7 @@ import CheckLabel from '../components/CheckLabel.vue';
 import * as echarts from 'echarts';
 import { useRoute, useRouter } from 'vue-router';
 import { grid, xNameTextStyle, yNameTextStyle, legendTextStyle } from './chartStyle'
+import { curveDateRefreshTime, rtDataRefreshTime } from '@/config'
 import { useStore } from 'vuex';
 
 const router = useRouter()
@@ -323,11 +324,11 @@ function updateDeviceState() {
           count[s]++
         })
         sbzt.value = count
-        timer = setTimeout(updateDeviceState, 3000)
+        timer = setTimeout(updateDeviceState, rtDataRefreshTime)
       })
     } else {
       sbzt.value = count
-      timer = setTimeout(updateDeviceState, 3000)
+      timer = setTimeout(updateDeviceState, rtDataRefreshTime)
     }
   })
 }
@@ -349,7 +350,11 @@ function getChart3() {
     type: ({ '日': 'D', '月': 'M', '年': 'Y' })[ryn.value]
   }).then(data => {
     if (!chart3) {
-      chart3 = echarts.init(document.getElementById('chart3'))
+      const dom = document.getElementById('chart3')
+      if (!dom) {
+        return
+      }
+      chart3 = echarts.init(dom)
     }
 
     const option = {
@@ -499,7 +504,7 @@ function getChart3() {
       ]
     }
     chart3.setOption(option)
-    timer3 = setTimeout(getChart3, 15000)
+    timer3 = setTimeout(getChart3, curveDateRefreshTime)
   })
 }
 watch(ryn, getChart3)

+ 181 - 0
src/views/layout/stateMonitor/simpleMatrix/HeaderMultiBtn.vue

@@ -0,0 +1,181 @@
+<template>
+  <el-row class="multibtn">
+
+    <eselect :data="level1" v-model="level1Check" placeholder="请选择" labelKey="name" valueKey="type"
+      style="margin-right: 8px; width: 132px;" />
+
+    <eselect :data="level2" v-model="level2Check" :placeholder="level2?.[0]?.name" labelKey="aname" valueKey="code"
+      :clearable="true"
+      multiple class="multipre" style="margin-right: 8px; width: 190px;">
+      <template #prefix>
+        <img src="@assets/img/images/company.png" style="width: 23px;margin-top: 0px; margin-left: 2px; " />
+      </template>
+    </eselect>
+
+    <eselect :data="level3" v-show="level3.length" v-model="level3Check" placeholder="全部场站" labelKey="CZAMC"
+      :clearable="true"
+      valueKey="CZBM" multiple style="width: 164px;" />
+  </el-row>
+</template>
+<script>
+import { GetPowerStation, getOrganization, getPowerstationTypeList } from '@/api/home'
+import eselect from '@/components/eselect/index.vue'
+import { Debounce } from '@/utils/common'
+import { inject } from 'vue'
+
+export default {
+  name: 'HeaderMultiBtn',
+  components: {
+    eselect
+  },
+  setup() {
+    // 具体在 store/reactive/organizations.js里
+    const store = inject('organizations')
+    return {
+      ...store,
+    }
+  },
+  props: {
+
+  },
+  data() {
+    const { type } = this.$route.query
+
+    return {
+      //风光类型
+      level1Check: type,
+      // 公司
+      level2Check: [],
+      // 场站
+      level3Check: []
+    }
+  },
+  computed: {
+    level1() {
+      return this.level1Map.value
+    },
+    // 场站列表
+    level3() {
+      if (!this.level2Check.length) {
+        return []
+      }
+      const r = []
+      this.level2Check.forEach(c => {
+        const cl = this.level3Map[c]
+        if (!cl) {
+          this.getPowerStation(this.level1Check, c)
+        } else {
+          cl.length && r.push(...cl)
+        }
+      })
+      return r
+    },
+    // 公司列表
+    level2() {
+      if (!this.level1Check) {
+        return []
+      }
+      const r = this.level2Map[this.level1Check]
+      if (!r) {
+        this.getOrganizationList(this.level1Check)
+        return []
+      }
+      return r.map((item, index) => {
+        if (index === 0) {
+          return { ...item, disabled: true }
+        }
+        return item
+      })
+    },
+    checks() {
+      return [this.level1Check, this.level2Check.join(','), this.level3Check.join(',')].join('|')
+    }
+  },
+  watch: {
+    level1: {
+      handler(d) {
+        if (!d?.length) {
+          this.gettypeData()
+        } else if (!this.level1Check) {
+          this.level1Check = d[0].type
+        }
+      },
+      immediate: true
+    },
+    level2Check(n, old) {
+      if (n.length < old.length) {
+        // 删除选项了 需要检查删除选中的lv3的
+        const newCheck = []
+        const arr = old.filter(i => !n.includes(i))
+        arr.forEach((item) => {
+          const l2arr = this.level3Map[item].map?.(it => it.CZBM) ?? []
+          newCheck.push(...l2arr)
+        })
+        this.level3Check = this.level3Check.filter(item => !newCheck.includes(item))
+      }
+    },
+    checks: {
+      handler() {
+        this.commit()
+      },
+      immediate: true
+    }
+  },
+  beforeCreate() {
+    this.commit = Debounce(() => {
+      this.$emit('onChange', {
+        area: this.level2?.[0]?.code,
+        type: this.level1Check,
+        companys: this.level2Check,
+        stations: this.level3Check,
+        values: this.level3Check.length ? this.level3Check : this.level2Check
+      })
+    }, 500)
+  },
+  methods: {
+    //获取风光类型
+    async gettypeData() {
+      const data = await getPowerstationTypeList({ code: 'classification' });
+      const df = data.filter(obj => obj.flag == 0).map(i => ({ ...i, icon: i.type, type: String(i.type) }))
+      this.setLevel1(df)
+    },
+    //获取区域公司
+    async getOrganizationList(type) {
+      const data = await getOrganization({ type });
+      if (data && data.length > 0) {
+        this.setLevel2(type, data)
+      } else {
+        this.setLevel2(type, [])
+      }
+    },
+    //获取场站信息
+    async getPowerStation(typeNode, checkNode) {
+      const data = await GetPowerStation({ companyCode: checkNode, stationType: typeNode })
+      if (data) {
+        this.setLevel3(checkNode, data)
+      }
+    }
+  },
+}
+</script>
+<style lang="less">
+.multibtn {
+  margin: 10px 0 15px;
+
+  .multipre.el-select {
+    .el-select__tags {
+      padding-left: 30px;
+    }
+    .el-select__tags-text{
+      margin-left: -20px;
+      &::before{
+        content: "";
+        width: 16px;
+        height: 10px;
+        display: inline-block;
+      }
+    }
+  }
+  
+}
+</style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1418 - 1443
src/views/layout/stateMonitor/simpleMatrix/index.vue


+ 155 - 192
src/views/layout/stateMonitor/synthesizeTargetSystem/index.vue

@@ -1,7 +1,9 @@
 <template>
     <!--   <div>综合指标</div>-->
     <div class="synthesizeTargetSystem">
-        <headerNav class="headerNav" @firstRender="firstRender" :handType="'1'"/>
+        <!-- <headerNav class="headerNav" @firstRender="firstRender" :handType="'1'"/> -->
+        <HeaderMultiBtn @onChange="onChange"/>
+
         <div class="systemData bodys">
             <div class="line">
                 <div class="leftContent"><span>数据指标</span></div>
@@ -9,59 +11,37 @@
                     <div class="more" @click="addTargets"><i>+</i>更多指标</div>
                 </div>
                 <el-tooltip class="item" effect="dark" content="导出" placement="bottom">
-                    <el-button class="updownTits icon-dataOut" round size="mini" type="primary"
-                               @click="downXlsxFn"
-                    >
+                    <el-button class="updownTits icon-dataOut" round size="mini" type="primary" @click="downXlsxFn">
                     </el-button>
                 </el-tooltip>
             </div>
 
-            <el-table
-                    ref="table"
-                    :data="stationData"
-                    :cell-style="cellStyle"
-                    :header-cell-style="headerStyle"
-                    height="900px"
-                    style="width: 100%"
-                    fit
-                    :load="load"
-                    lazy
-                    :default-expand-all="isExpand"
-                    element-loading-text="加载中..."
-                    empty-text=" "
-                    :tree-props="{children: 'datas', hasChildren: 'hasChildren'}"
-                    row-key="CZAMC"
-                    v-if="tableShow"
-                    stripe>
-
-
-                <el-table-column
-                        v-for="(item,index) in uniformDetial" :key="index"
-                        :prop="item.tagCode"
-                        sortable
-                        align="center"
-                        header-align="center"
-                        :resizable="true"
-                        :width="item.width"
-                        :fixed="index<2"
-                >
-                    <template v-slot="scope" v-if="cilent=='click'">
-                        <el-tag @click="v(item.tagCode,scope.$index,item,scope.row, scope.row[`${item.tagCode}`])">
-                            <el-tooltip
-                                    v-if="item.tagName!=='场站名称' && item.tagName!=='装机容量'"
-                                    effect="dark"
-                                    :content="getchangeTime(scope.row[`${item.tagCode}` + 'date'])"
-                                    placement="right"
-                            >
-                                <span style="cursor: pointer">   {{
-
-                                        scope.row[`${item.tagCode}` +'value'] || '--'
-                                    }}</span>
+            <el-table ref="table" :data="stationData" :cell-style="cellStyle" :header-cell-style="headerStyle"
+                      height="900px"
+                      style="width: 100%" fit :load="load" lazy :default-expand-all="isExpand"
+                      element-loading-text="加载中..."
+                      empty-text=" " :tree-props="{ children: 'datas', hasChildren: 'hasChildren' }" row-key="CZAMC"
+                      v-if="tableShow"
+                      stripe>
+
+
+                <el-table-column v-for="(item, index) in uniformDetial" :key="index" :prop="item.tagCode" sortable
+                                 align="center"
+                                 header-align="center" :resizable="true" :width="item.width" :fixed="index < 2">
+                    <template v-slot="scope" v-if="cilent == 'click'">
+                        <el-tag @click="v(item.tagCode, scope.$index, item, scope.row, scope.row[`${item.tagCode}`])">
+                            <el-tooltip v-if="item.tagName !== '场站名称' && item.tagName !== '装机容量'" effect="dark"
+                                        :content="getchangeTime(scope.row[`${item.tagCode}` + 'date'])"
+                                        placement="right">
+                <span style="cursor: pointer"> {{
+
+                        scope.row[`${item.tagCode}` + 'value'] || '--'
+                    }}</span>
 
                             </el-tooltip>
-                            <span v-else>   {{
+                            <span v-else> {{
 
-                                    scope.row[`${item.tagCode}` +'value'] || '--'
+                                    scope.row[`${item.tagCode}` + 'value'] || '--'
                                 }}</span>
 
                         </el-tag>
@@ -69,21 +49,16 @@
                     <template v-slot="scope" v-else>
 
                         <el-tag @contextmenu="v(item.tagCode,scope.$index,item,scope.row, scope.row[`${item.tagCode}`])">
-                            <el-tooltip
-                                    v-if="item.tagName!=='场站名称' && item.tagName!=='装机容量'"
-                                    effect="dark"
-                                    :content="getchangeTime(scope.row[`${item.tagCode}` + 'date'])"
-                                    placement="right"
-                            >
-                                <span style="cursor: pointer">   {{
 
-                                        scope.row[`${item.tagCode}` +'value'] || '--'
-                                    }}</span>
+                <span v-if="item.tagName!=='场站名称' && item.tagName!=='装机容量'" style="cursor: pointer"> {{
+
+                        dataToFix2(scope.row[`${item.tagCode}` + 'value'])
+                    }}</span>
 
-                            </el-tooltip>
-                            <span v-else>   {{
 
-                                    scope.row[`${item.tagCode}` +'value'] || '--'
+                            <span v-else> {{
+
+                                    scope.row[`${item.tagCode}` + 'value'] ? scope.row[`${item.tagCode}` + 'value'] : '--'
                                 }}</span>
 
                         </el-tag>
@@ -92,7 +67,7 @@
 
                     <template #header>
 
-                        <div v-if="item.tagName.length>9">
+                        <div v-if="item.tagName.length > 9">
                             {{ item.tagName }} <span v-if="item.valueUnit">({{ item.valueUnit }})</span>
                         </div>
                         <div v-else>
@@ -131,34 +106,35 @@
             <!--            </el-table>-->
 
 
-            <dialog-check :tagCode="tagCode"  :changeWid="changeWid" :changeSer="changeSer" :changeAll="changeAll"
-                          :indexes="indexes"
-                          :tableData="tableData" :tagName="tagName" :xs="xs"
-                          :ys="ys"
-                          :NameCode="name" :visible="visible" v-on:tag="z($event)" :tag1="CZAMC"
-                          :tag2="ZJRL"></dialog-check>
+            <dialog-check
+                    ref="tagChild"></dialog-check>
 
         </div>
-        <el-dialog v-model="dialogVisible" width="1100px" >
+        <el-dialog v-model="dialogVisible" width="1100px">
             <template #title>
                 <div class="dialog-title">
                     <img class="dialog-title-img" src="/img/images/dialog-title.png"/>
                     <div class="title"> 选择指标(<span class="count"> {{ checkList.length }} </span>)</div>
                 </div>
             </template>
-            <div class="dialog-body" >
+            <div class="dialog-body">
                 <img class="dialog-img" src="/img/images/dialog.png"/>
-                <div class="targetNav" v-if="moreTargetData.length>1">
+                <div class="targetNav" v-if="moreTargetData.length > 1">
                     <ul>
-                        <li :class="{active:headerIndex==-1}" @click="headerIndex=-1"> 全部 </li>
-                        <li v-for="(item,index) in moreTargetData" :key="index" :class="{active:headerIndex==index}" @click="headerIndex=index" > {{item.unitName}} </li>
+                        <li :class="{ active: headerIndex == -1 }" @click="headerIndex = -1"> 全部</li>
+                        <li v-for="(item, index) in moreTargetData" :key="index"
+                            :class="{ active: headerIndex == index }"
+                            @click="headerIndex = index"> {{ item.unitName }}
+                        </li>
                     </ul>
                 </div>
                 <div class="box">
-                    <div v-for="(item1,index1) in moreTargetData" :key="index1" v-show="headerIndex==index1 || headerIndex==-1">
+                    <div v-for="(item1, index1) in moreTargetData" :key="index1"
+                         v-show="headerIndex == index1 || headerIndex == -1">
                         <el-row class="headerTitle">{{ item1.unitName }}</el-row>
                         <el-checkbox-group v-model="checkList">
-                            <el-checkbox v-for="(item2,index2) in item1.datas" :key="index2" :label="item2.tagName"></el-checkbox>
+                            <el-checkbox v-for="(item2, index2) in item1.datas" :key="index2"
+                                         :label="item2.tagName"></el-checkbox>
                         </el-checkbox-group>
                     </div>
                 </div>
@@ -174,12 +150,11 @@
         </div>
 
     </div>
-
 </template>
 
 <script>
     import dialogCheck from "@/views/layout/stateMonitor/factoryMonitor/components/dialogCheck";
-    import headerNav from '@/components/headerNav'
+    // import headerNav from '@/components/headerNav'
     import {GetCompanyDataTagList, GetMorePowerStationUniformCodes} from '@/api/synthesizeTargetSystem'
     import {GetRtValuesByTagName} from "@api/stateMonitor";
     import {List} from "@element-plus/icons-vue";
@@ -187,18 +162,22 @@
     import windChartCom from "../../stateMonitor/factoryMonitor/windPowerPlant/components/lineCharts.vue";
     import dayjs from "dayjs";
     import utils from "@/utils/downXlsx";
+    import HeaderMultiBtn from "../simpleMatrix/HeaderMultiBtn.vue";
+    import {rtDataRefreshTime} from "../../../../config";
+
 
     export default {
         name: 'synthesizeTargetSystem',//综合指标
         components: {
             List,
-            headerNav,
+            // headerNav,
+            HeaderMultiBtn,
             dialogCheck
         },
         data() {
             return {
-                headerIndex:-1,
-                isExpand:false,
+                headerIndex: -1,
+                isExpand: false,
                 changeAll: false,
                 loading: false,
                 CZMC: 'CZMC',
@@ -210,7 +189,7 @@
                 color: ["#1985de", "#ff8300", "#06a746", "#3eede7", "#eb0f7c", "#dfdc0a", "#de0feb", "#cca4e3"],
                 stse: [],
                 sts: [],
-                alluniformCode:null,
+                alluniformCode: null,
                 statiomName: [],
                 stationTit: null,
                 leng: '',
@@ -253,19 +232,17 @@
                 ysetName: 'Y坐标设置',
                 visible: false,
                 visibles: "",
-                ys: '',
-                xs: '',
                 dete: '',
                 cilent: '',
-                tableDatas: [],
                 pageNow: 1,
                 pageSize: 19,
                 stationDatasd: [],
                 changeSer: false,
                 changeWid: false,
                 activeNode: '',
-                name:'',
-                tagscode:''
+                name: '',
+                tagscode: '',
+                dialogTime: ''
 
             }
         },
@@ -277,7 +254,7 @@
         mounted() {
             this.timer = setInterval(() => {
                 this.dataHandler();
-            }, 3000)
+            }, rtDataRefreshTime)
 
         },
         unmounted() {
@@ -285,12 +262,18 @@
             this.timer = null;
         },
         methods: {
-
-            downXlsxFn(){
+            dataToFix2(obj) {
+                if (obj === '' || obj === undefined) {
+                    return '--'
+                } else {
+                    return obj.toFixed(2)
+                }
+            },
+            downXlsxFn() {
 
                 // this.stationData = this.stationDatasd
                 setTimeout(() => {
-                        utils.exportExcel(this.$refs['table'].$el, '序号'  , '12')
+                    utils.exportExcel(this.$refs['table'].$el, '序号', '12')
                 }, 1000)
                 // setTimeout(() => {
                 //     let set=this.deepClone(this.stationDatasd)
@@ -308,17 +291,16 @@
             async getMorePowerStation() {
                 let data;
                 var code;
-                if (this.stationType == -1 ) {
+                if (this.stationType == -1) {
                     code = 'RFDL,YFDL,NFDL,LLGL,RSWDL,ZFDL,RFDLSYZ,YFDLSYZ,NFDLSYZ,YSWDL,YGWGWDL,DZXYTS,NNWGWDL,RCYDL'
-                    if(window.localStorage.getItem('alllocalDataFun') != null && JSON.stringify(window.localStorage.getItem('alllocalDataFun')) != "{}"){
+                    if (window.localStorage.getItem('alllocalDataFun') != null && JSON.stringify(window.localStorage.getItem('alllocalDataFun')) != "{}") {
                         data = window.localStorage.getItem('alllocalDataFun');
                     }
 
 
-
-                } else if (this.stationType == -2 ) {
+                } else if (this.stationType == -2) {
                     code = 'RFDL,YFDL,NFDL,LLGL,ZFDL,RPJGZD,RFDLSYZ,YFDLSYZ,NFDLSYZ,YSWDL,YGWGWDL,DZXYTS,NNWGWDL,RCYDL'
-                    if(window.localStorage.getItem('alllocalData') != null && JSON.stringify(window.localStorage.getItem('alllocalData')) != "{}"){
+                    if (window.localStorage.getItem('alllocalData') != null && JSON.stringify(window.localStorage.getItem('alllocalData')) != "{}") {
                         data = window.localStorage.getItem('alllocalData');
                     }
 
@@ -340,7 +322,7 @@
 
                     if (datas != null) {
                         datas.forEach(item => {
-                            newArr.push({...item, width: '120'});
+                            newArr.push({...item, width: ''});
                         })
                         this.uniformDetial = [{
                             tagName: '场站名称',
@@ -371,13 +353,10 @@
 
             },
 
-            z(s) {
 
-                this.visible = s
-            },
             load(row, treeNode, resolve) {
 
-                if (this.activeNode == '' ) {
+                if (this.activeNode == '') {
                     this.stationDatasd.forEach(r => {
                         if (r.CZBM == row.CZBM) {
                             resolve(r.datas)
@@ -407,47 +386,20 @@
             //     })
             // },
 
-            v(tagCode, index, tagName,name,de) {
-
-                console.log(tagCode)
-                console.log(tagName)
-                console.log(name)
-                console.log(de)
-                console.log(event)
-                console.log(process.env.VUE_APP_DIALOG_POINT)
-
-                this.name=name.CZAMC //公司名称
-                this.cilent = process.env.VUE_APP_DIALOG_POINT;
-                this.visible = true
-                this.tagscode=name.CZBM
-                this.tagCode = tagCode
-                this.indexes = de
-                this.tagName = tagName.tagName
-
-                if (event.clientY > (window.innerHeight - 180)) {
-                    this.ys = event.clientY - 106
-                    this.changeSer = true
-                    this.changeAll = false
-                } else {
-                    this.ys = event.clientY + 16
-                    this.changeSer = false
-                }
-                if (event.clientY > (window.innerHeight - 180) && event.clientX > (window.innerWidth - 100)) {
-                    this.changeWid = false
-                    this.changeSer = false
-                    this.changeAll = true
-                    this.ys = event.clientY - 106
-                    this.xs = event.clientX - 171
-
-                } else if (event.clientX > (window.innerWidth - 100)) {
-                    this.xs = event.clientX - 171
-                    this.changeAll = false
-                    this.changeWid = true
+            v(tagCode, index, tagName, name, de) {
+                if (de !== '') {
+                    // this.cilent = process.env.VUE_APP_DIALOG_POINT;
+                    this.$refs.tagChild.getXY(tagCode, tagName.tagName, de, name.CZAMC, name[tagCode + 'date'])
 
                 } else {
-                    this.xs = event.clientX - 1
-                    this.changeWid = false
-                    this.changeAll = false
+                    this.$message({
+                        type: 'warning',
+                        offset: 200,
+                        center: true,
+                        customClass: 's',
+                        message: '指标测点为空'
+                    });
+
                 }
                 event.preventDefault();
             },
@@ -471,21 +423,23 @@
                     return ''
                 }
             },
-
+            onChange({type, companys, stations}) {
+                this.firstRender(type, companys, stations)
+            },
 
             async firstRender(headerIndex, nodeCode, activeNode) {
                 this.stationType = headerIndex;
                 this.companyCode = nodeCode;
                 this.activeNode = activeNode
                 //获取table数据
-                if (this.activeNode=='') {
-                    this.isExpand=false
+                if (this.activeNode == '') {
+                    this.isExpand = false
 
 
-                }else {
-                    setTimeout(()=>{
-                        this.isExpand=true
-                    },500)
+                } else {
+                    setTimeout(() => {
+                        this.isExpand = true
+                    }, 500)
 
                 }
 
@@ -497,8 +451,7 @@
             //根据机构编码获取table数据
             async getCompanyDataTagList() {
 
-                
-                
+
                 const data = await GetCompanyDataTagList({
                     companyCode: this.companyCode,
                     stationType: this.stationType,
@@ -506,19 +459,17 @@
                     stationCode: this.activeNode
                 })
 
-                
 
-                data?.forEach(s=>{
+                data?.forEach(s => {
 
-                    if (this.activeNode=='' ) {
+                    if (this.activeNode == '') {
 
-                        if(s.datas.length>0){
-                            s.hasChildren=true
+                        if (s.datas.length > 0) {
+                            s.hasChildren = true
                         }
 
-                    }
-                    else {
-                        s.hasChildren=false
+                    } else {
+                        s.hasChildren = false
                     }
 
                     // if(s.CZBM == s.datas[0].CZBM){
@@ -528,7 +479,6 @@
                     // }
 
 
-
                 })
 
                 this.tableData = data
@@ -598,18 +548,18 @@
                     const codeArr = this.alluniformCode.split(',')
                     codeArr.forEach(code => {
                         // z[code]=map.get(z[code]);
-                        z[code+'value'] = map.get(z[code]) ? (map.get(z[code])).toFixed(2) : '--';
-                        z[code+'date'] = maps.get(z[code]) ? Number(maps.get(z[code])) : '--';
-                        z.ZJRLvalue=z.ZJRL
-                        z.CZAMCvalue=z.CZAMC
+                        z[code + 'value'] = map.get(z[code]) ;
+                        z[code + 'date'] = maps.get(z[code])
+                        z.ZJRLvalue = z.ZJRL
+                        z.CZAMCvalue = z.CZAMC
                     })
                     z.datas?.forEach(canCode => {
                         codeArr.forEach(code => {
                             // z[code]=map.get(z[code]);
-                            canCode[code+'value'] = map.get(canCode[code]) ? (map.get(canCode[code])).toFixed(2) : '--';
-                            canCode[code+'date'] = maps.get(canCode[code]) ? Number(maps.get(canCode[code])) : '--';
-                            canCode.ZJRLvalue=canCode.ZJRL
-                            canCode.CZAMCvalue=canCode.CZAMC
+                            canCode[code + 'value'] = map.get(canCode[code])
+                            canCode[code + 'date'] = maps.get(canCode[code])
+                            canCode.ZJRLvalue = canCode.ZJRL
+                            canCode.CZAMCvalue = canCode.CZAMC
 
                         })
                     })
@@ -617,10 +567,10 @@
                 });
 
                 this.stationDatasd = this.deepClone(datas)
-                datas.forEach(s=>{
+                datas.forEach(s => {
 
-                    if (this.companyCode=='' ) {
-                        s.datas=[]
+                    if (this.companyCode == '') {
+                        s.datas = []
                     }
 
                 })
@@ -630,14 +580,14 @@
 
             },
             cellStyle({row, column, rowIndex, columnIndex}) {
-                if (columnIndex > 2) {
+                if (columnIndex > 1) {
                     return {'font-family': 'Arial', 'padding': '7px 0', 'font-size': '13px'}
                 } else {
                     return {'backdrop-filter': 'blur(10px)', 'padding': '7px 0', 'font-size': '13px'}
                 }
             },
             headerStyle({row, column, rowIndex, columnIndex}) {
-                if (columnIndex < 3) {
+                if (columnIndex < 2) {
                     return {'backdrop-filter': 'blur(10px)', 'padding': '6px 0'}
                 } else {
                     return {'padding': '6px 0'}
@@ -683,7 +633,7 @@
                 var targetArray = [];
 
                 this.moreTargetData.forEach(item => {
-                    item.datas.forEach(s=>{
+                    item.datas.forEach(s => {
                         targetArray.push(s);
                     })
                 })
@@ -695,7 +645,7 @@
                     const obj = targetArray.find(value => {
                         return arr == value.tagName
                     })
-                    if(obj!=undefined){
+                    if (obj != undefined) {
                         codeDetial.push(obj);
                     }
 
@@ -770,6 +720,7 @@
     background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(0, 0, 0, .5), rgba(0, 0, 0, 1));
 
   }
+
   .search-input {
     margin-left: 10px;
 
@@ -959,47 +910,55 @@
   .header {
     cursor: move;
   }
-  .targetNav{
-    >ul{
+
+  .targetNav {
+    > ul {
       display: flex;
       border: 1px solid rgba(42, 55, 79, 1);
       height: 30px;
       border-radius: 15px;
       width: fit-content;
       margin: 0 auto;
-      li{
+
+      li {
         padding: 0 36px;
         color: #B3B3B3;
         font-size: 13px;
         line-height: 28px;
         background-color: rgba(67, 81, 107, 0.2);
         border-right: 1px solid #2A374F;
-        cursor:pointer;
+        cursor: pointer;
       }
-      li:first-child{
+
+      li:first-child {
         border-top-left-radius: 15px;
         border-bottom-left-radius: 15px;
       }
-      li:last-child{
+
+      li:last-child {
         border-top-right-radius: 15px;
         border-bottom-right-radius: 15px;
         border: none;
       }
     }
-    .active{
+
+    .active {
       background-color: rgba(0, 70, 199, 0.4);
       color: #FFFFFF;
     }
   }
-  .dialog-body{
+
+  .dialog-body {
     height: 590px;
   }
-  .box{
+
+  .box {
     height: 500px;
     overflow: auto;
     margin: 10px 0 40px 0;
     padding: 0 10px;
-    .headerTitle{
+
+    .headerTitle {
       width: 100%;
       border-bottom: 1px solid #3A3F43;
       padding: 9px 0;
@@ -1008,7 +967,8 @@
       position: relative;
       margin-bottom: 8px;
     }
-    .headerTitle:before{
+
+    .headerTitle:before {
       content: '';
       display: block;
       width: 8px;
@@ -1017,7 +977,8 @@
       position: absolute;
       bottom: -1px;
     }
-    .headerTitle::after{
+
+    .headerTitle::after {
       content: '';
       display: block;
       width: 8px;
@@ -1028,28 +989,30 @@
       right: 0;
     }
   }
-  /deep/ .el-table__body{
-    tr{
-      td:first-of-type{
+
+  /deep/ .el-table__body {
+    tr {
+      td:first-of-type {
         text-align: left;
         position: relative;
-        .el-table__expand-icon{
-         position: absolute;
+
+        .el-table__expand-icon {
+          position: absolute;
           left: 6px;
           top: 12px;
 
         }
-        .el-table__expand-icon--expanded{
+
+        .el-table__expand-icon--expanded {
           position: absolute;
           left: 6px;
           top: 12px;
         }
-        .el-tag{
-         padding-left: 25px;
+
+        .el-tag {
+          padding-left: 25px;
         }
       }
     }
   }
-
-
 </style>