Sfoglia il codice sorgente

1、联锁明细页面进行浏览器刷新时,页面不改变
2、联锁增加个复制按钮,可以复制相同的联锁条件
3、联锁明细的单位加颜色,和数据区分,旁路状态标颜色

dongjh 2 mesi fa
parent
commit
88d6611ff2

+ 7 - 2
src/views/module_interLock/InterlockSummary/index.vue

@@ -65,8 +65,13 @@
         this.$refs.summaryList.loadData();
       },
       summaryListClick(data){
-        this.showPage='detail'
-        this.currentData = data
+        // this.showPage='detail'
+        // this.currentData = data
+        console.log(data)
+        sessionStorage.setItem("detail_sid", data.summaryid)
+        sessionStorage.setItem("detail_isid", data.interlockSystemId)
+        sessionStorage.setItem("detail_dname", data.detailName)
+        this.$router.push({path: "/interLock/detail"})
         // this.$nextTick(()=>{
         //   this.$refs.summaryDetailRef.currentData = data
         //   console.log('ref', this.$refs.summaryDetailRef.currentData)

+ 6 - 2
src/views/module_interLock/interlockHistoryData/index.vue

@@ -78,8 +78,12 @@
         this.$refs.summaryList.loadData();
       },
       historyListClick(data){
-        this.showPage = 'detail'
-        this.currentData = data
+        // this.showPage = 'detail'
+        // this.currentData = data
+        sessionStorage.setItem("detail_sid", data.summaryid)
+        sessionStorage.setItem("detail_isid", data.interlockSystemId)
+        sessionStorage.setItem("detail_dname", data.detailName)
+        this.$router.push({path: "/interLock/history/detail"})
       },
     }
   }

+ 8 - 3
src/views/module_interLock/interlockHistoryDetail/InterlockHistoryDetailList.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="interlock-detail-header">
       <a-icon type="arrow-left" @click="goBack"/>
-      <span>{{currentData.detailName ? currentData.detailName : '详情'}}</span>
+      <span>{{queryParam.detailName  ? queryParam.detailName  : '详情'}}</span>
     </div>
     <div class="iotmenu-content">
       <a-card :bordered="false" style="background-color: #FAFAFA;">
@@ -350,6 +350,7 @@
     },
     created() {
       // this.queryParam.summaryid = this.$route.query.summaryid
+      this.queryParam.detailName = sessionStorage.getItem("detail_dname")
       this.getSuperFieldList();
     },
     computed: {
@@ -372,8 +373,11 @@
         //   this.queryParam.summaryid = this.$route.query.summaryid
         // }
         var params = this.getQueryParams();//查询条件
-        params.summaryid = this.currentData.summaryid
+        // params.summaryid = this.currentData.summaryid
         // params.interlockSystemId = this.currentData.interlockSystemId
+        params.summaryid = sessionStorage.getItem("detail_sid")
+        params.interlockSystemId = sessionStorage.getItem("detail_isid")
+
         this.loading = true;
         getAction(this.url.list, params).then((res) => {
           if (res.success) {
@@ -485,7 +489,8 @@
         })
       },
       goBack(){
-        this.$emit('click')
+        // this.$emit('click')
+        this.$router.push({path: "/interLock/historyData"});
       },
       initDictConfig(){
       },

+ 39 - 8
src/views/module_interLock/interlockSummaryDetail/InterlockSummaryDetailList.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="interlock-detail-header">
       <a-icon type="arrow-left" @click="goBack"/>
-      <span>{{currentData.detailName ? currentData.detailName : '详情'}}</span>
+      <span>{{queryParam.detailName ? queryParam.detailName : '详情'}}</span>
     </div>
     <div class="iotmenu-content">
       <a-card :bordered="false" style="background-color: #FAFAFA;">
@@ -83,12 +83,27 @@
                   <template slot="title">
                     {{ record.bypassTag }}
                   </template>
+                  <span :class="record.bypass === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
+                    {{ text }}
+                  </span>
+                </a-tooltip>
+              </template>
+              <template v-else>
+                <span :class="record.bypass === record.instrumentStatusNormal ? 'normal-tag':'abnormal-tag'">
+                  {{ text }}
+                </span>
+              </template>
+              <!-- <template v-if="record.bypassTag">
+                <a-tooltip placement="top">
+                  <template slot="title">
+                    {{ record.bypassTag }}
+                  </template>
                   {{ text }}
                 </a-tooltip>
               </template>
               <template v-else>
                 {{ text }}
-              </template>
+              </template> -->
             </span>
             <!-- 仪表状态 -->
             <span slot="instrumentStatus" slot-scope="text, record">
@@ -273,7 +288,10 @@
                   <template slot="title">
                     { record.interlockConditionTag }
                   </template>
-                  { interlockCondition }
+                  { text }
+                  <span class="normal-tag">
+                    { record.interlockSetUnit ? record.interlockSetUnit : '' }
+                  </span>
                 </a-tooltip>
               )
               return children
@@ -298,7 +316,15 @@
             dataIndex: 'interlockSetValue',
             customRender:function (t,r,index) {
               var data = r.interlockSetUnit ? t + r.interlockSetUnit : t
-              return data
+              var children = (
+                <a-tooltip>
+                  { t }
+                  <span class="normal-tag">
+                    { r.interlockSetUnit ? r.interlockSetUnit : '' }
+                  </span>
+                </a-tooltip>
+              )
+              return children
             },
           },
           // {
@@ -383,8 +409,10 @@
     //     deep: true
     //   }
     // },
+    mounted() {
+    },
     created() {
-      // this.queryParam.summaryid = this.$route.query.summaryid
+      this.queryParam.detailName = sessionStorage.getItem("detail_dname")
       this.getSuperFieldList();
     },
     computed: {
@@ -408,8 +436,10 @@
         // }
         // this.queryParam.interlockSystemId = this.$route.query.interlockSystemId
         var params = this.getQueryParams();//查询条件
-        params.summaryid = this.currentData.summaryid
-        params.interlockSystemId = this.currentData.interlockSystemId
+        // params.summaryid = this.currentData.summaryid
+        // params.interlockSystemId = this.currentData.interlockSystemId
+        params.summaryid = sessionStorage.getItem("detail_sid")
+        params.interlockSystemId = sessionStorage.getItem("detail_isid")
         
         this.loading = true;
         getAction(this.url.list, params).then((res) => {
@@ -522,7 +552,8 @@
         })
       },
       goBack(){
-        this.$emit('click')
+        // this.$emit('click')
+        this.$router.push({path: "/interLock/summary"});
       },
       initDictConfig(){
       },