فهرست منبع

履职登记-履职项增加数据来源处理,弹窗功能完善

jingyuanchao 1 سال پیش
والد
کامیت
24abc26618
2فایلهای تغییر یافته به همراه60 افزوده شده و 40 حذف شده
  1. 4 4
      src/views/menu/iot/smartOpration/components/item.vue
  2. 56 36
      src/views/menu/resumption/dvrDetailDialog.vue

+ 4 - 4
src/views/menu/iot/smartOpration/components/item.vue

@@ -26,7 +26,7 @@
         </template>
          -->
       </van-cell>
-     
+
       <van-cell title-style="display:none" value-class="cell-channel-list">
         <template #default>
           <span v-show="expanded" class="cell-channel-item" v-for="channel in showChannels" :key="channel.channelCode">
@@ -76,7 +76,7 @@ export default {
       // exceptionChannelCount:0,
       showChannels:[],
     }
-  },  
+  },
   mounted() {
     // this.initChannelCount();
   },
@@ -129,7 +129,7 @@ export default {
       {
         this.showChannels=this.data.channels.filter(x=> x.state===0);
       }
-    },    
+    },
     showExceptionChannel()
     {
       this.expanded=!this.expanded;
@@ -168,7 +168,7 @@ export default {
   text-align: center;
 }
 .custom-title-tag{
-  margin-left: 50px;
+  margin-left: 25px;
   margin-right: 10px;
 }
 </style>

+ 56 - 36
src/views/menu/resumption/dvrDetailDialog.vue

@@ -1,16 +1,15 @@
 <template>
   <div class="nfc-popup">
-    <van-popup v-model="visible"  get-container="nfc-popup" lock-scroll>
+    <van-popup v-model="visible" get-container="nfc-popup" lock-scroll>
       <!-- 添加标题部分 -->
       <div class="popup-header">
-       {{this.DialogTitle}}
+        {{ this.dialogTitle }}
       </div>
       <div class="dvr-detail">
         <div class="container">
-          <k-list :list="smartOprationlist" :params="search" :auto="false" ref="list" @load="reLoadData">
+          <k-list :list="smartOprationlist" :params="search" :auto="true" ref="list" @load="reLoadData">
             <template slot-scope="{ data }">
-              <disk-item :data="data" :defaultExpanded="!search.checkSub"></disk-item>
-              <!--                  <item v-else :data="data" :defaultExpanded="!search.checkSub"></item>-->
+              <item :data="data" :defaultExpanded="!search.checkSub"></item>
             </template>
           </k-list>
         </div>
@@ -24,68 +23,89 @@ import SelectCell from "@/components/selectCell";
 import Item from "views/menu/iot/smartOpration/components/item.vue";
 import KList from "components/list/index.vue";
 import DiskItem from "views/menu/iot/smartOpration/components/diskItem.vue";
-import { list,smartOprationlist } from '@/api/iot/videoDiagnosis.js'
+import {list, smartOprationlist} from '@/api/iot/videoDiagnosis.js'
+import {mapGetters} from "vuex";
+
 export default {
-  components:{DiskItem, KList, Item, SelectCell},
-  data(){
+  components: {DiskItem, KList, Item, SelectCell},
+  data() {
     return {
       //nfc弹窗
-      visible:false,
+      visible: false,
       //nfc数据
-      dataList:[],
-      //自定义字段
-      prop:{
-        label:'checkName',
-        value:'nfccdoe'
-      },
+      dataList: [],
       search: {
-        orgId: this.orgId,
+        orgId: null,
         checkSub: true,
         state: null,
         pageNum: 1,
         pageSize: 10,
-        activeTab:"videoCheck",
+        activeTab: "videoCheck",
       },
-      DialogTitle:'',
+      dialogTitle: '',
     }
   },
-  mounted() {
+  computed: {
+    ...mapGetters(['orgId']),
 
   },
-  watch:{
-    visible(val){
-      if(!this.visible){
+  mounted() {
+  },
+  watch: {
+    visible(val) {
+      if (!this.visible) {
         this.clear();
       }
     }
   },
-  methods:{
+  methods: {
     list,
     smartOprationlist,
     //清空数据
-    clear(){
+    clear() {
       this.showBottomBox = true;
       this.dataList = [];
 
     },
     //显示弹窗
-    show(point){
-      if (point.pointDataSource==2){
+    show(point) {
+      this.visible = true;
+      this.search.orgId = this.orgId;
+      if (point.pointDataSource == 2) {
         this.search.activeTab = "videoCheck";
-        this.DialogTitle="录像检测信息";
-      }else {
+        this.dialogTitle = "录像检测信息";
+      } else {
         this.search.activeTab = "videoDiagnosis";
-        this.DialogTitle="视频质量诊断信息";
+        this.dialogTitle = "视频质量诊断信息";
       }
-      this.visible = true;
+      console.log("123",this.search)
+    },
+
+    reLoadData(data) {
+      this.dvrTotalCount = data.length;
+      if (data.length > 0) {
+        let template = 0;
+        let templateEx = 0;
+        data.forEach(x => {
+          let ex = x.channels.filter(x => x.state === 1);
+          templateEx = templateEx + ex.length;
+          template = template + x.channels.length;
+        })
+        this.channelTotalCount = template;
+        this.exChannelCount = templateEx;
+      } else {
+        this.channelTotalCount = 0;
+        this.exChannelCount = 0;
+      }
+      this.$forceUpdate()
     },
   }
 }
 </script>
 <style lang="scss">
-#app{
-  .nfc-popup{
-    .van-popup--center{
+#app {
+  .nfc-popup {
+    .van-popup--center {
       border-radius: 40px;
     }
   }
@@ -103,9 +123,9 @@ export default {
 }
 
 
-.dvr-detail{
-  width: 600px;
-  height: 800px;
+.dvr-detail {
+  width: 700px;
+  height: 1200px;
 
 }