codeMan 5 miesięcy temu
rodzic
commit
c6ac44e4a5

+ 7 - 3
src/system/IOT/positionControl/index.vue

@@ -83,7 +83,7 @@
         <ContentBox>
           <div class="header">
             <span>本周告警统计</span>
-            <a-button type="primary" size="small" @click="goPage('/warningControl')">进入</a-button>
+            <a-button type="primary" size="small" @click="goPage('/warningControl','valvesystem')">进入</a-button>
           </div>
           <div class="history-statistice">
             <div>
@@ -310,8 +310,12 @@ const loginOut = ()=>{
   });
 }
 
-let goPage = (path) => {
-  router.push(path)
+let goPage = (path,name) => {
+  if (name) {
+    router.push({path:path,query:{systemname:name}})
+  } else {
+    router.push(path)
+  }
   setTimeout(() => {
     console.log(system.value,app.value);
     let result

+ 7 - 3
src/system/IOT/pressureControl/index.vue

@@ -83,7 +83,7 @@
         <ContentBox>
           <div class="header">
             <span>本周告警统计</span>
-            <a-button type="primary" size="small" @click="goPage('/warningControl')">进入</a-button>
+            <a-button type="primary" size="small" @click="goPage('/warningControl','wpressuresystem')">进入</a-button>
           </div>
           <div class="history-statistice">
             <div>
@@ -310,8 +310,12 @@ const loginOut = ()=>{
   });
 }
 
-let goPage = (path) => {
-  router.push(path)
+let goPage = (path,name) => {
+  if (name) {
+    router.push({path:path,query:{systemname:name}})
+  } else {
+    router.push(path)
+  }
   setTimeout(() => {
     console.log(system.value,app.value);
     let result

+ 4 - 1
src/system/IOT/warningControl/index.vue

@@ -106,7 +106,9 @@ import { line, Line } from '@antv/g2plot'
 import baseSet from './baseSet.js'
 import countUp from '@/system/IOT/IoTdashboard/modules/countUp.vue'
 import {ref, defineProps, defineEmits, onMounted, computed} from 'vue'
+import { useRouter } from 'vue-router';
 import { Empty } from 'ant-design-vue';
+const router = useRouter()
 const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE
 import Api from '@/api/api'
 import utils from '@/utils/utils'
@@ -207,7 +209,8 @@ let getHistory = async () => {
 let param2 = ref({
   "id": 20230905141202,
   "content": {
-    type:''
+    type:'',
+    systemname:router.currentRoute.value.query.systemname || ''
   }
 })
 let selectType = ({target}) => {