Line.vue 4.06 KB
Newer Older
纪泽龙's avatar
纪泽龙 committed
1 2 3
<!--
 * @Author: your name
 * @Date: 2022-01-27 14:25:45
纪泽龙's avatar
纪泽龙 committed
4
 * @LastEditTime: 2022-02-28 11:35:31
纪泽龙's avatar
纪泽龙 committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /hello-world/src/views/components/User.vue
-->
<template>
  <div class="user-wrapper">
    <div class="title">{{ companyType[deviceData.companyType] }}</div>
    <div class="close" @click="close">
      <img src="@/assets/mapImages/closeBtn.png" alt="" />
    </div>

    <div class="group flex first">
      <div class="left first">管道长度:</div>
      <div class="right zzz">{{ deviceData.pipeLength }}</div>
      <div class="left">管径:</div>
      <div class="right last">{{ deviceData.pipeDiameter }}</div>
    </div>

    <!-- <div class="group flex">
      
    </div> -->

    <div class="group flex">
      <div class="left first">管道压力:</div>
29 30
      <div :title="deviceData.pipePressure" class="right zzz">
        {{ pipePressure[deviceData.pipePressure + 1] }}
纪泽龙's avatar
纪泽龙 committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44
      </div>
      <div class="left">所属公司:</div>
      <div class="right last">{{ companyType[deviceData.companyType] }}</div>
    </div>

    <div class="group flex">
      <div class="first left">管道材质:</div>
      <div class="right">{{ deviceData.pipeMaterial }}</div>
      <div class="left">管道埋深:</div>
      <div class="right last">{{ deviceData.pipeDepth }}</div>
    </div>

    <div class="group flex">
      <div class="left first">管道走向:</div>
纪泽龙's avatar
纪泽龙 committed
45
      <div class="right zzz" :title="deviceData.pipeTrend">{{ deviceData.pipeTrend }}</div>
纪泽龙's avatar
纪泽龙 committed
46
      <div class="left">权属单位:</div>
47 48 49
      <div :title="deviceData.powerCompany" class="right last zzz">
        {{ deviceData.powerCompany }}
      </div>
纪泽龙's avatar
纪泽龙 committed
50 51 52 53 54
    </div>
    <div class="group flex">
      <div class="first left">建设年代:</div>
      <div class="right">{{ deviceData.buildyear }}</div>
      <div class="left">建设单位:</div>
纪泽龙's avatar
纪泽龙 committed
55
      <div class="last right zzz" :title="deviceData.buildCompany">{{ deviceData.buildCompany }}</div>
纪泽龙's avatar
纪泽龙 committed
56 57 58 59
    </div>

    <div class="group flex">
      <div class="first once left">管道位置:</div>
60 61 62 63 64
      <div
        v-unValue
        :title="deviceData.pipeAddr"
        class="last pipeAddr right zzz"
      >
纪泽龙's avatar
纪泽龙 committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
        {{ deviceData.pipeAddr }}
      </div>
    </div>
  </div>
</template>

<script>
import { companyType, pipePressure } from "@/utils/mapClass/config.js";
export default {
  data() {
    return {
      companyType,
      pipePressure,
    };
  },
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
  computed:{
    prodTest(){
      return this.vueRoot.$store.state.user.systemSetting.prod_test
    },
    company(){
       return this.vueRoot.$store.state.bigWindowCompany.company;
    }

  },
  mounted(){
    // 如果不是测试,而是真数据,就要用帧数据的东西
    if(this.prodTest !="test"){
      this.companyType={};
      this.company.forEach(item=>{
        this.companyType[item.conpanyId] = item.companyName;
      })
    }
  },
纪泽龙's avatar
纪泽龙 committed
98 99 100 101 102 103 104 105 106 107 108 109 110
  methods: {
    close() {
      this.mapClass.infowindowClose();
    },
  },
};
</script>

<style lang="scss" scoped>
.user-wrapper {
  background-color: rgba(9, 18, 32, 0.6);
  padding: 10px;
  position: relative;
纪泽龙's avatar
纪泽龙 committed
111
  width: 500px;
纪泽龙's avatar
纪泽龙 committed
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
  .title {
    font-size: 14px;
    line-height: 14px;
    color: #ffffff;
  }
  .close {
    position: absolute;
    right: 10px;
    top: 5px;
    cursor: pointer;
  }
  .group {
    border: 1px solid #cccccc;
    border-top: none;
    height: 28px;
    font-size: 14px;
    line-height: 28px;
    color: #ffffff;
    &.first {
      border-top: 1px solid #cccccc;
      margin-top: 10px;
    }
    div {
      flex: 1;
      border-right: 1px solid #cccccc;
    }
    .left {
      background-color: rgba(255, 255, 255, 0.1);
      text-align: right;
    }
    .right {
      box-sizing: border-box;
      text-align: left;
纪泽龙's avatar
纪泽龙 committed
145
      padding: 0 1em;
纪泽龙's avatar
纪泽龙 committed
146 147 148 149
    }
    .last {
      border: none;
    }
150 151
    .once {
      flex: 1;
纪泽龙's avatar
纪泽龙 committed
152
    }
153 154 155
    .pipeAddr {
      flex: 3;
      padding: 0 3em 0 1em;
纪泽龙's avatar
纪泽龙 committed
156 157 158 159 160 161 162 163
    }
  }
  .flex {
    display: flex;
    justify-content: space-between;
  }
}
</style>