Browse Source

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

dongjh 2 months ago
parent
commit
88d6611ff2

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

@@ -65,8 +65,13 @@
         this.$refs.summaryList.loadData();
         this.$refs.summaryList.loadData();
       },
       },
       summaryListClick(data){
       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.$nextTick(()=>{
         //   this.$refs.summaryDetailRef.currentData = data
         //   this.$refs.summaryDetailRef.currentData = data
         //   console.log('ref', this.$refs.summaryDetailRef.currentData)
         //   console.log('ref', this.$refs.summaryDetailRef.currentData)

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

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

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

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