Procházet zdrojové kódy

优化详情返回等相关代码(2)

yuhan před 1 měsícem
rodič
revize
b4f88a8bab

+ 18 - 20
src/views/module_interLock/interlockHistoryDetail/InterlockHistoryDetailList.vue

@@ -245,22 +245,19 @@
             title:'联锁名称',
             align:"center",
             dataIndex: 'interlockname',
+            width: 200,
+            ellipsis: true,
             customRender:function (t,r,index) {
+              // return {children: t,attrs: {rowSpan:r.rowSpan}};
               var children = (
-                <div class="item-node-container">
-                  <div class="item-node-title">
-                    <span class="item-node-name">
-                      <a-tooltip>
-                        <template slot="title">
-                          { r.interlockApparatusName } -- { r.interlockSystemName } -- {r.interlockname}
-                        </template>
-                        <span>
-                          {r.interlockname}
-                        </span>
-                      </a-tooltip>
-                    </span>
-                  </div>
-                </div>
+                <a-tooltip>
+                  <template slot="title">
+                    {r.interlockname}
+                  </template>
+                  <span class="item-cell-name">
+                    {r.interlockname}
+                  </span>
+                </a-tooltip>
               )
               return {
                 children: [children],
@@ -402,6 +399,9 @@
       importExcelUrl: function(){
         return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
       },
+      summaryEditInfo() {
+        return this.$store.getters.summaryEditInfo
+      },
     },
     methods: {
       loadData(arg) {
@@ -418,10 +418,8 @@
         //   this.queryParam.summaryid = this.$route.query.summaryid
         // }
         var params = this.getQueryParams();//查询条件
-        // params.summaryid = this.currentData.summaryid
-        // params.interlockSystemId = this.currentData.interlockSystemId
-        params.summaryid = sessionStorage.getItem("detail_sid")
-        params.interlockSystemId = sessionStorage.getItem("detail_isid")
+        params.summaryid = this.summaryEditInfo.summaryid
+        params.interlockSystemId = this.summaryEditInfo.interlockSystemId
 
         this.loading = true;
         getAction(this.url.list, params).then((res) => {
@@ -534,8 +532,8 @@
         })
       },
       goBack(){
-        // this.$emit('click')
-        this.$router.push({path: "/interLock/historyData"});
+        this.$router.go(-1)
+        this.$store.commit('SET_SUMMARYEDITINFO', []);
       },
       initDictConfig(){
       },

+ 20 - 25
src/views/module_interLock/interlockSummaryDetail/InterlockSummaryDetailList.vue

@@ -266,22 +266,19 @@
             title:'联锁名称',
             align:"center",
             dataIndex: 'interlockname',
+            width: 200,
+            ellipsis: true,
             customRender:function (t,r,index) {
+              // return {children: t,attrs: {rowSpan:r.rowSpan}};
               var children = (
-                <div class="item-node-container">
-                  <div class="item-node-title">
-                    <span class="item-node-name">
-                      <a-tooltip>
-                        <template slot="title">
-                          { r.interlockApparatusName } -- { r.interlockSystemName } -- {r.interlockname}
-                        </template>
-                        <span>
-                          {r.interlockname}
-                        </span>
-                      </a-tooltip>
-                    </span>
-                  </div>
-                </div>
+                <a-tooltip>
+                  <template slot="title">
+                    {r.interlockname}
+                  </template>
+                  <span class="item-cell-name">
+                    {r.interlockname}
+                  </span>
+                </a-tooltip>
               )
               return {
                 children: [children],
@@ -436,6 +433,9 @@
       importExcelUrl: function(){
         return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
       },
+      summaryEditInfo() {
+        return this.$store.getters.summaryEditInfo
+      },
     },
     methods: {
       loadData(arg) {
@@ -453,10 +453,8 @@
         // }
         // this.queryParam.interlockSystemId = this.$route.query.interlockSystemId
         var params = this.getQueryParams();//查询条件
-        // params.summaryid = this.currentData.summaryid
-        // params.interlockSystemId = this.currentData.interlockSystemId
-        params.summaryid = sessionStorage.getItem("detail_sid")
-        params.interlockSystemId = sessionStorage.getItem("detail_isid")
+        params.summaryid = this.summaryEditInfo.summaryid
+        params.interlockSystemId = this.summaryEditInfo.interlockSystemId
         
         this.loading = true;
         getAction(this.url.list, params).then((res) => {
@@ -569,8 +567,8 @@
         })
       },
       goBack(){
-        // this.$emit('click')
-        this.$router.push({path: "/interLock/summary"});
+        this.$router.go(-1)
+        this.$store.commit('SET_SUMMARYEDITINFO', []);
       },
       initDictConfig(){
       },
@@ -616,12 +614,9 @@
   @import '~@assets/less/common.less';
 </style>
 <style lang="less" scoped>
-  .item-node-title {
-    width: 90%;
-  }
-  .item-node-name{
+  .item-cell-name{
     padding-left: 8px;
-    width: 90%;
+    width: 200px;
     display: inline-block;
     white-space: nowrap;
     overflow: hidden; /*超出的文本隐藏*/