瀏覽代碼

Merge remote-tracking branch 'origin/v0.1.0' into v0.1.0

jingyuanchao 1 年之前
父節點
當前提交
0948720ce2
共有 3 個文件被更改,包括 26 次插入9 次删除
  1. 5 4
      src/api/iot/videoDiagnosis.js
  2. 1 1
      src/router/router.config.js
  3. 20 4
      src/views/menu/iot/smartOpration/index.vue

+ 5 - 4
src/api/iot/videoDiagnosis.js

@@ -45,11 +45,12 @@ export function integrity(hostCode, channelCode,date) {
  * @param {} orgId 
  * @returns 
  */
-   export function getSmartOprationBadge(orgId){
+   export function getSmartOprationBadge(query){
     return request({
-      url: `/iot/smartopration/app/badge/${orgId}`,
-      method: 'get',
-      hideLoading:true
+      url: `/iot/smartopration/app/tab/badge`,
+      method: 'post',
+      hideLoading:true,
+      data: query
     });
   }
 

+ 1 - 1
src/router/router.config.js

@@ -294,7 +294,7 @@ export let routers = [
         path: '/iot/smartOpration',
         name: 'iot_smartOpration',
         component: () => import('@/views/menu/iot/smartOpration/index'),
-        meta: { title: '智能运维', keepAlive: true, deep: 1 }
+        meta: { title: '视频监测', keepAlive: true, deep: 1 }
       },
       {
         path: '/monitoringCall',

+ 20 - 4
src/views/menu/iot/smartOpration/index.vue

@@ -72,6 +72,7 @@ export default {
   data() {
     return {
       activeTab:"videoCheck",
+      historySearch:null,
       search: {
         orgId: this.orgId,
         checkSub: true,
@@ -96,11 +97,26 @@ export default {
       dicts: ["app_video_diagnosis_status"]
     }
   },
-  watch: {},
+  watch: {
+    search: {
+      deep: true,
+      handler: function (value) {
+        if(this.historySearch && value)
+        {
+          if(this.historySearch.orgId==value.orgId && this.historySearch.checkSub ==value.checkSub)
+          {
+            return;
+          }
+        }
+        this.historySearch={...value};
+        this.getBadge();
+      }
+    }
+  },
   created() {},
   mounted() {
     this.search.orgId = this.orgId
-    this.getBadge();
+    
   },  
   computed: {
     ...mapGetters(['orgName', 'orgId', 'dictionary']),
@@ -183,9 +199,9 @@ export default {
     },
     getBadge()
     {
-      getSmartOprationBadge(this.orgId).then(r => {
+      getSmartOprationBadge({orgId:this.search.orgId,checkSub:this.search.checkSub}).then(r => {
         console.log("getSmartOprationBadge",r)
-          if (r.videoCheckBadge) {            
+          if (r.videoCheckBadge) {
             this.videoCheckBadge=r.videoCheckBadge> 99 ? '99+' : r.videoCheckBadge;          
           } else {
             this.videoCheckBadge=null;