ming před 3 roky
rodič
revize
783f231966

+ 1 - 6
src/views/powerQuality/asseReport/scoreReport.vue

@@ -591,19 +591,14 @@ export default defineComponent({
     watch(
       () => props.activeName,
       (newVal) => {
-        // alert(newVal)
         if (newVal == 'first') {
-         setTimeout(function(){
-        evaluationReport()
-      },1000)
+          evaluationReport()
         }
       }
     )
 
     onMounted(() => {
-       setTimeout(function(){
         evaluationReport()
-      },1000)
       
       
     })

+ 1 - 2
src/views/powerQuality/harmonicReport/index.vue

@@ -174,7 +174,6 @@ export default defineComponent({
         if (requset.status === 'SUCCESS') {
           deviceList.value = requset.data
           deviceCode.value = requset.data[0] ? requset.data[0].deviceCode : ''
-
           listTabsChange('dayValue')
 
         } else {
@@ -190,7 +189,6 @@ export default defineComponent({
     }
 
     function listSelect() {
-
       let list = {}
 
       if (listTabPosition.value == 'dayValue') {
@@ -253,6 +251,7 @@ export default defineComponent({
 
     onMounted(() => {
       deviceSelect()
+      listSelect()
     })
     return {
       listTabsChange,

+ 2 - 2
src/views/powerQuality/realTimeMonitoring/index.vue

@@ -8,12 +8,12 @@
       >
         <el-tab-pane label="实时评分" name="first">
           <br>
-          <real-score ></real-score>
+          <real-score :activeName="activeName"></real-score>
        
         </el-tab-pane>
         <el-tab-pane label="单回路监测" name="second"  :key='activeName'>
           <br>
-           <loop-monitor v-if="key='activeName'" ></loop-monitor >
+           <loop-monitor v-if="key='activeName'" :activeName="activeName"></loop-monitor >
         </el-tab-pane>
       </el-tabs>
       <br>

+ 40 - 22
src/views/powerQuality/realTimeMonitoring/loopMonitor.vue

@@ -81,27 +81,33 @@
                 "
               >
                 <div class="mb-10">电压不平衡度</div>
-                <div>{{getData.vtBalun?getData.vtBalun*100:0}}%</div>
+                <div>{{ getData.vtBalun ? getData.vtBalun * 100 : 0 }}%</div>
               </div>
               <ul>
                 <li>
                   <div>A相电压</div>
                   <div>
-                    <div class="mb-5">幅值:{{getData.ua?getData.ua+' V':0}}</div>
+                    <div class="mb-5">
+                      幅值:{{ getData.ua ? getData.ua + ' V' : 0 }}
+                    </div>
                     <div>相角:-</div>
                   </div>
                 </li>
                 <li>
                   <div>B相电压</div>
                   <div>
-                    <div class="mb-5">幅值:{{getData.ub?getData.ub+' V':0}}</div>
+                    <div class="mb-5">
+                      幅值:{{ getData.ub ? getData.ub + ' V' : 0 }}
+                    </div>
                     <div>相角:-</div>
                   </div>
                 </li>
                 <li>
                   <div>C相电压</div>
                   <div>
-                    <div class="mb-5">幅值:{{getData.uc?getData.uc+' V':0}}</div>
+                    <div class="mb-5">
+                      幅值:{{ getData.uc ? getData.uc + ' V' : 0 }}
+                    </div>
                     <div>相角:-</div>
                   </div>
                 </li>
@@ -130,27 +136,33 @@
                 "
               >
                 <div class="mb-10">电流不平衡度</div>
-                <div>{{getData.elBalun?getData.elBalun*100:0}}%</div>
+                <div>{{ getData.elBalun ? getData.elBalun * 100 : 0 }}%</div>
               </div>
               <ul>
                 <li>
                   <div>A相电流</div>
                   <div>
-                    <div class="mb-5">幅值:{{getData.ua?getData.ia+' A':0}}</div>
+                    <div class="mb-5">
+                      幅值:{{ getData.ua ? getData.ia + ' A' : 0 }}
+                    </div>
                     <div>相角:-</div>
                   </div>
                 </li>
                 <li>
                   <div>B相电流</div>
                   <div>
-                    <div class="mb-5">幅值:{{getData.ua?getData.ib+' A':0}}</div>
+                    <div class="mb-5">
+                      幅值:{{ getData.ua ? getData.ib + ' A' : 0 }}
+                    </div>
                     <div>相角:-</div>
                   </div>
                 </li>
                 <li>
                   <div>C相电流</div>
                   <div>
-                    <div class="mb-5">幅值:{{getData.ua?getData.ic+' A':0}}</div>
+                    <div class="mb-5">
+                      幅值:{{ getData.ua ? getData.ic + ' A' : 0 }}
+                    </div>
                     <div>相角:-</div>
                   </div>
                 </li>
@@ -183,7 +195,7 @@
 
       <!-- 有功功率 -->
       <el-col :md="24" :lg="8">
-        <power-panel  :getData="getData"></power-panel>
+        <power-panel :getData="getData"></power-panel>
       </el-col>
       <!-- 有功功率 end -->
     </el-row>
@@ -197,13 +209,12 @@
       class="descripDialog"
     ></descrip-dialog>
     <!--指标说明弹框组件结束-----------------------end-->
-
   </div>
 </template>
 
 <script>
 import { useStore } from 'vuex'
-import { defineComponent, onMounted, ref } from 'vue'
+import { defineComponent, onMounted, ref} from 'vue'
 import loopRadarChart from './loopMonitorComponent/loopRadarChart'
 import loopRadarChart2 from './loopMonitorComponent/loopRadarChart2'
 import harmonicPanel from './loopMonitorComponent/harmonicPanel'
@@ -224,16 +235,19 @@ export default defineComponent({
     voltagePanel,
     frequencyPanel,
     powerPanel,
-    descripDialog
+    descripDialog,
+  },
+  props: {
+    activeName: String,
   },
-  setup() {
+  setup(props) {
     const store = useStore()
     const getData = ref({})
     const deviceList = ref([])
     const deviceCode = ref('')
     const showDialog = ref(false)
     const dialogTitle = ref('')
-    const siteId=ref(0)
+    const siteId = ref(0)
 
     function linkDevice() {
       deviceSelect()
@@ -265,21 +279,25 @@ export default defineComponent({
 
     // 查看指标说明
     const descripDialog = () => {
-      siteId.value=store.state.siteId
+      siteId.value = store.state.siteId
       dialogTitle.value = '指标说明'
       showDialog.value = true
     }
-     // 关闭操作
+    // 关闭操作
     const closeDialog = () => {
       showDialog.value = false
-      
     }
+    
 
     onMounted(() => {
-      deviceSelect()
-      setTimeout(function(){
-        realScoreOne()
-      },1000)
+        deviceSelect()
+  
+       if (props.activeName == 'second') {
+          setTimeout(function () {
+            realScoreOne()
+           
+          }, 1000)
+        }
      
     })
     return {
@@ -294,7 +312,7 @@ export default defineComponent({
       showDialog,
       dialogTitle,
       closeDialog,
-      siteId
+      siteId,
     }
   },
 })

+ 16 - 4
src/views/powerQuality/realTimeMonitoring/realScore.vue

@@ -269,7 +269,7 @@ import pieChart from './realScoreComponent/pieChart.vue'
 import dialogChartOne from './realScoreComponent/dialogChartOne'
 import descripDialog from './realScoreComponent/descripDialog'
 import { useStore } from 'vuex'
-import { defineComponent, onMounted, ref } from 'vue'
+import { defineComponent, onMounted, ref,watch } from 'vue'
 import * as api from '@/api/powerQuality/realScore.js'
 import { ElMessage } from 'element-plus'
 import { parseTime } from '@/utils'
@@ -281,10 +281,11 @@ export default defineComponent({
     pieChart,
     dialogChartOne,
     descripDialog
-
-    
   },
-  setup() {
+   props: {
+    activeName: String,
+  },
+  setup(props) {
     const store = useStore()
     const num = ref(1)
     const nowTime = ref(parseTime(new Date()))
@@ -522,6 +523,17 @@ export default defineComponent({
       
     }
 
+    watch(
+      () => props.activeName,
+      (newVal) => {
+        if (newVal == 'first') {
+         setTimeout(function(){
+        realScore()
+      },1000)
+        }
+      }
+    )
+
     onMounted(() => {
       deviceSelect()
       setTimeout(function(){