Browse Source

1,关键信息点显示value值
2,checkbox对齐
3,没有一级标题和显示信息点的,显示‘信息’

shaun-sheep 5 years ago
parent
commit
def82b142d

+ 4 - 0
src/components/ledger/details/detail/cruxDialog.vue

@@ -98,6 +98,10 @@
 
 <style scoped lang="less">
   .crux-dialog {
+    .el-checkbox{
+      display: inline-block;
+      width: 20%;
+    }
     /deep/ .el-dialog__body {
       height: 420px;
       overflow: auto;

+ 1 - 1
src/components/ledger/details/detail/exhibitionBaseInformation.vue

@@ -1,7 +1,7 @@
 <template>
 <div class="exhibition-baseInformation">
   <section v-for="(val,key,i) in exhibitionBaseInformation.information">
-    <h4 class="base">{{key}}</h4>
+    <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}"

+ 56 - 1
src/components/ledger/details/detail/exhibitionCrux.vue

@@ -4,7 +4,46 @@
       <span class="icon-shezhi iconfont setting" @click="setting"></span></p>
     <div>
       <div v-if="exhibitionCrux.cruxArray.length">
-        <p class="crux-list" v-for="(item,index) in exhibitionCrux.cruxArray" :key="index">{{item.InfoPointName}}</p>
+        <div class="crux-list" v-for="(item,index) in exhibitionCrux.cruxArray" :key="index">{{item.InfoPointName}}:
+
+        <el-popover
+          v-if="item.value && item.value.length && item.value.length>12 && item.Path=='EquipQRCode'"
+          placement="top"
+          width="360"
+          trigger="hover">
+          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{item.InfoPointName}}</p>
+          <div style="overflow:hidden;">
+            <div style="float:left;width: 60%">
+              <img
+                style="width:200px;height:200px;"
+                :src="'/image-service/common/file_get/'+ item.value +'?systemId=dataPlatform'"
+                alt="二维码"
+              >
+            </div>
+            <div style="float:right;width: 40%;margin-top: 30px">
+              <span>{{item.value}}</span>
+            </div>
+          </div>
+
+          <div style="text-align: center; margin: 0">
+            <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
+          </div>
+          <el-button slot="reference" type="text">{{handleName(item.value)}}</el-button>
+        </el-popover>
+        <el-popover
+          v-else-if="item.value && item.value.length && item.value.length>12"
+          placement="top"
+          width="160"
+          trigger="hover">
+          <p style="border-bottom: 1px solid #eee;padding:2px 0 4px 0;'">{{item.InfoPointName}}</p>
+          <p>{{item.value}}</p>
+          <div style="text-align: center; margin: 0">
+            <el-button type="text" size="mini" @click="handleCopy(item.value)">复制</el-button>
+          </div>
+          <el-button slot="reference" type="text">{{handleName(item.value)}}</el-button>
+        </el-popover>
+        <span v-else>{{item.value}}</span>
+        </div>
       </div>
       <div style="text-align: center" v-else>暂无数据</div>
     </div>
@@ -36,6 +75,18 @@
       },
       cruxSuccess() {
         this.$emit('cruxSuccess')
+      },
+      handleCopy(data) {
+        let oInput = document.createElement('input')
+        oInput.value = data
+        document.body.appendChild(oInput)
+        oInput.select()
+        document.execCommand('Copy')
+        this.$message.success('复制成功')
+        oInput.remove()
+      },
+      handleName(val) {
+        return val.length > 12 ? val.substr(1, 12) + '...' : val
       }
     }
   }
@@ -43,6 +94,10 @@
 
 <style lang="less" scoped>
   .exhibition-crux {
+    /deep/ .el-button--text {
+      color: #555 !important;
+      font-size: 14px;
+    }
     .title {
       border-left: 8px solid black;
       margin: 10px 40px 0 10px;

+ 8 - 0
src/views/ledger/facility/details/index.vue

@@ -253,6 +253,14 @@
           arr = this.pointData.filter(i => i.Visible)
           //关键信息点
           this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord)
+          this.exhibitionCrux.cruxArray.map(i => {
+            if (this.exampleData.hasOwnProperty(i.Path)) {
+              return {
+                ...i,
+                value: this.exampleData[i.Path]
+              }
+            }
+          })
           //  图片和的处理
           this.handlePicList(arr)
           //  文件处理

+ 8 - 0
src/views/ledger/property/details/index.vue

@@ -188,6 +188,14 @@
           arr = this.pointData.filter(i => i.Visible)
           //关键信息点
           this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord)
+          this.exhibitionCrux.cruxArray.map(i => {
+            if (this.exampleData.hasOwnProperty(i.Path)) {
+              return {
+                ...i,
+                value: this.exampleData[i.Path]
+              }
+            }
+          })
           //  图片和的处理
           this.handlePicList(arr)
           //  文件处理

+ 9 - 1
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -281,7 +281,15 @@
       if (val == 1) { //需采集信息
         arr = this.pointData.filter(i => i.Visible)
         //关键信息点
-        this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord) //todo 融合
+        this.exhibitionCrux.cruxArray = arr.filter(i => i.KeyWord)
+        this.exhibitionCrux.cruxArray.map(i => {
+          if (this.exampleData.hasOwnProperty(i.Path)) {
+            return {
+              ...i,
+              value: this.exampleData[i.Path]
+            }
+          }
+        })
         //  图片和的处理
         this.handlePicList(arr)
         //  文件处理