Browse Source

修改详情样式

zhangyu 5 years ago
parent
commit
a2bfaf9018

+ 19 - 26
src/components/ledger/details/detail/exhibitionBaseInformation.vue

@@ -2,13 +2,10 @@
 <div class="exhibition-baseInformation">
   <section v-for="(val,key,i) in exhibitionBaseInformation.information">
     <h4 class="base">{{key || '信息'}}</h4>
-    <div v-for="(value,keys,index) in val.paths"
-         :class="{'w47':exhibitionBaseInformation.style == 2,'w30':exhibitionBaseInformation.style==3,
-'w22':exhibitionBaseInformation.style == 4}"
-         style="display: inline-block;margin-left: 20px">
+    <div class="infoPoint-item" v-for="(value,keys,index) in val.paths">
       <span> {{value.InfoPointName}}:</span>
       <el-popover
-        v-if="value.Value && value.Value.length && value.Value.length>12 && value.Path=='EquipQRCode'"
+        v-if="value.Path == 'EquipQRCode' || value.Path == 'RoomQRCode' || value.Path == 'ShaftQRCode'"
         placement="top"
         width="360"
         trigger="hover">
@@ -16,10 +13,12 @@
         <div style="overflow:hidden;">
           <div style="float:left;width: 60%">
             <img
+              v-if="value.Value"
               style="width:200px;height:200px;"
               :src="'/image-service/common/file_get/'+ value.Value +'?systemId=dataPlatform'"
               alt="二维码"
             >
+            <span v-else>数据暂无</span>
           </div>
           <div style="float:right;width: 40%;margin-top: 30px">
             <span>{{value.Value}}</span>
@@ -44,28 +43,28 @@
         <el-button slot="reference" type="text">{{value.Value? '有':'-'}}</el-button>
       </el-popover>
       <el-popover
-        v-else-if="value.Value && value.Value.length && value.Value.length>12"
+        v-else-if="Array.isArray(value.Value) && value.InputMode=='N2'"
         placement="top"
-        width="160"
+        width="600"
         trigger="hover">
         <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{value.InfoPointName}}</p>
-        <p>{{value.Value}}</p>
+        <p style="height: 300px;overflow: auto">{{value.Value}}</p>
         <div style="text-align: center; margin: 0">
           <el-button type="text" size="mini" @click="handleCopy(value.Value)">复制</el-button>
         </div>
-        <el-button slot="reference" type="text">{{handleName(value.Value)}}</el-button>
+        <el-button slot="reference" type="text">{{value.Value ? '有' :'-'}}</el-button>
       </el-popover>
       <el-popover
-        v-else-if="Array.isArray(value.Value) && value.InputMode=='N2'"
+        v-else-if="value.Value && value.Value.length && `${value.InfoPointName}:${value.Value}`.length>23"
         placement="top"
-        width="600"
+        width="160"
         trigger="hover">
         <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{value.InfoPointName}}</p>
-        <p style="height: 300px;overflow: auto">{{value.Value}}</p>
+        <p>{{value.Value}}</p>
         <div style="text-align: center; margin: 0">
           <el-button type="text" size="mini" @click="handleCopy(value.Value)">复制</el-button>
         </div>
-        <el-button slot="reference" type="text">{{value.Value ? '有' :'-'}}</el-button>
+        <el-button slot="reference" type="text">{{handleName(value.InfoPointName, value.Value)}}</el-button>
       </el-popover>
       <span v-else>{{value.Value}}</span>
     </div>
@@ -94,8 +93,9 @@
         this.$message.success('复制成功')
         oInput.remove()
       },
-      handleName(val) {
-        return val.length > 10 ? val.substring(0, 10) + '...' : val
+      handleName(infoPoint, val) {
+        let text = `${infoPoint}:${val}`
+        return text.length > 23 ? val.substring(0, 23-`${infoPoint}:`.length) + '...' : val
       }
     }
   }
@@ -125,17 +125,10 @@
       text-indent: 10px;
     }
 
-    .w47 {
-      width: 44%;
-    }
-
-
-    .w30 {
-      width: 30%;
-    }
-
-    .w22 {
-      width: 22%;
+    .infoPoint-item {
+      width: 350px;
+      display: inline-block;
+      margin-left: 20px;
     }
   }
 </style>

+ 1 - 2
src/views/ledger/cenotelist/cenoteDetail/index.vue

@@ -71,8 +71,7 @@
         pointData: [], //信息点数据
         exampleData: {}, //实例数据
         exhibitionBaseInformation: {
-          information: {},
-          style: 4
+          information: {}
         },
         selectRadio: {
           information: '设备信息点',

+ 7 - 4
src/views/ledger/facility/details/index.vue

@@ -2,7 +2,7 @@
   <div class="tableDisplay">
     <div class="header">
       <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-      <span class="details-title"><b>{{name}} - {{code}}</b></span>
+      <span :title="`${name} - ${code}`" class="details-title"><b>{{name}} - {{code}}</b></span>
     </div>
     <div class="content">
       <div class="content-left">
@@ -127,8 +127,7 @@
           ]
         },
         exhibitionBaseInformation: {
-          information: {},
-          style:2
+          information: {}
         },
         exhibitionEnergy: {
           title: '能耗信息',
@@ -444,11 +443,15 @@
   .tableDisplay {
     .header {
       padding-bottom: 10px;
+      overflow: hidden;
+      text-overflow:ellipsis;
+      white-space: nowrap;
       .details-title {
         color: #333;
         font-size: 16px;
         margin-left: 20px;
         line-height: 32px;
+        cursor: pointer;
       }
     }
 
@@ -489,7 +492,7 @@
           }
 
           .content-point-right {
-            width: 400px;
+            width: 350px;
             border-left: 1px solid #ccc;
           }
         }

+ 6 - 3
src/views/ledger/property/details/index.vue

@@ -2,7 +2,7 @@
   <div class="tableDisplay">
     <div class="header">
       <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
-      <span class="details-title"><b>{{name}} - {{code}}</b></span>
+      <span :title="`${name} - ${code}`" class="details-title"><b>{{name}} - {{code}}</b></span>
     </div>
     <div class="content">
       <div class="content-left">
@@ -114,8 +114,7 @@
           ]
         },
         exhibitionBaseInformation: {
-          information: {},
-          style:3
+          information: {}
         },
         exhibitionFile: {
           title: '文件',
@@ -384,11 +383,15 @@
   .tableDisplay {
     .header {
       padding-bottom: 10px;
+      overflow: hidden;
+      text-overflow:ellipsis;
+      white-space: nowrap;
       .details-title {
         color: #333;
         font-size: 16px;
         margin-left: 20px;
         line-height: 32px;
+        cursor: pointer;
       }
     }
 

+ 2 - 3
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -120,8 +120,7 @@
           ]
         },
         exhibitionBaseInformation: {
-          information: {},
-          style:2
+          information: {}
         },
         exhibitionEnergy: {
           title: '能耗信息',
@@ -526,7 +525,7 @@
             flex: 1;
           }
           .content-point-right {
-            width: 400px;
+            width: 350px;
             border-left: 1px solid #ccc;
           }
         }

+ 1 - 2
src/views/ledger/system/systemDetail/index.vue

@@ -117,8 +117,7 @@
           ]
         },
         exhibitionBaseInformation: {
-          information: {},
-          style: 3
+          information: {}
         },
         exhibitionEnergy: {
           title: '能耗信息',