lineInfoWindow.vue 6.43 KB
Newer Older
纪泽龙's avatar
纪泽龙 committed
1 2 3
<template>
  <div class="wrapper">
    <div class="top display-default">
4
      <div class="left text ddd" :title="obj.pipeName">{{ obj.pipeName }}</div>
纪泽龙's avatar
纪泽龙 committed
5 6
      <div class="right text">
        <img @click="close" src="../../assets/images/closeBtn.png" alt="" />
纪泽龙's avatar
纪泽龙 committed
7 8
      </div>
    </div>
纪泽龙's avatar
纪泽龙 committed
9

纪泽龙's avatar
纪泽龙 committed
10
    <!-- 设备信息 -->
纪泽龙's avatar
纪泽龙 committed
11 12 13 14
    <div class="content">
      <div class="eq-content display-default">
        <div class="text-wrapper">
          <!-- <div :title="obj.pipeName" class="eq-text">
纪泽龙's avatar
纪泽龙 committed
15 16
          <span>管道名称:</span>
          <span>{{ obj.pipeName }}</span>
纪泽龙's avatar
纪泽龙 committed
17
        </div> -->
纪泽龙's avatar
纪泽龙 committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
          <div class="eq-text">
            <span>管道编号:</span>
            <span>{{ obj.pipeCode }} </span>
          </div>
          <div class="eq-text">
            <span>管道长度:</span>
            <span>{{ `${obj.pipeLength ? obj.pipeLength + "米" : ""}` }}</span>
          </div>
          <div class="eq-text">
            <span>管道类型:</span>
            <span>{{ ["地埋管线", "地表管线"][obj.pipeType - 1] }}</span>
          </div>
          <div class="eq-text">
            <span>管道压力:</span>
            <span>{{
纪泽龙's avatar
纪泽龙 committed
33
              ["低压", "中压", "次高压", "高压"][obj.pipePressure - 1]
纪泽龙's avatar
纪泽龙 committed
34 35
            }}</span>
          </div>
纪泽龙's avatar
纪泽龙 committed
36
        </div>
纪泽龙's avatar
纪泽龙 committed
37 38

        <div class="pic">
39 40 41 42 43 44 45 46 47
          <img @mousedown.stop="mousedown" :src="obj.iconUrl" alt="" />
          <el-image
            v-show="false"
            id="img"
            ref="previewImg"
            :src="obj.iconUrl"
            :preview-src-list="bigImageArr"
            :z-index="9999999"
          ></el-image>
纪泽龙's avatar
纪泽龙 committed
48
        </div>
纪泽龙's avatar
纪泽龙 committed
49
      </div>
纪泽龙's avatar
纪泽龙 committed
50

纪泽龙's avatar
纪泽龙 committed
51
      <div class="maintain-content">
52 53 54 55 56 57 58 59 60 61
        <el-col :span="11">
          <div>
            <span>安装日期:</span>
            <span>{{ moment(obj.installationTime).format("YYYY-MM-DD") }}</span>
          </div>
        </el-col>

        <el-col :span="13">
          <div>
            <span>最后巡检日期:</span>
62
            <span>{{ obj.inspectionTime ? obj.inspectionTime : "-" }}</span>
63 64 65
          </div>
        </el-col>

纪泽龙's avatar
纪泽龙 committed
66 67 68 69 70
        <div>
          <span>管道所在地址:</span>
          <span>{{ obj.pipeAddr }}</span>
        </div>
        <div>
纪泽龙's avatar
1  
纪泽龙 committed
71
          <span>备注信息:</span>
72
          <span v-un-content>{{ obj.remarks }}</span>
纪泽龙's avatar
纪泽龙 committed
73
        </div>
纪泽龙's avatar
纪泽龙 committed
74
      </div>
纪泽龙's avatar
纪泽龙 committed
75 76 77 78 79 80 81 82 83
      <template v-if="!obj.editorPage">
        <div class="warn-content">
          <div>报警状态 <span>报警</span></div>
          <div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
        </div>
        <div class="btn">
          <el-button class="elbtn" type="primary">生成工单</el-button>
        </div>
      </template>
纪泽龙's avatar
纪泽龙 committed
84
    </div>
纪泽龙's avatar
纪泽龙 committed
85

纪泽龙's avatar
纪泽龙 committed
86 87 88 89 90 91
    <!-- 报警状态 -->
  </div>
</template>

<script>
//line移入时的的infowindow
纪泽龙's avatar
纪泽龙 committed
92
import moment from "moment";
纪泽龙's avatar
纪泽龙 committed
93 94 95 96
export default {
  props: {
    obj: { typs: Object },
  },
纪泽龙's avatar
纪泽龙 committed
97 98
  created() {
    console.log("created", this.obj);
纪泽龙's avatar
纪泽龙 committed
99
  },
100 101 102 103 104 105
  mounted() {},
  computed: {
    bigImageArr() {
      return [this.obj.iconUrl];
    },
  },
纪泽龙's avatar
纪泽龙 committed
106
  methods: {
纪泽龙's avatar
纪泽龙 committed
107
    moment,
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
    mousedown(e) {
      return;
      // console.log(this.$refs.previewImg)
      this.$refs.previewImg.showViewer = true;
      console.log(this.$refs.previewImg.showViewer);
      // 加载出来的dom给个事件阻止冒泡
      setTimeout(() => {
        const dom = document.getElementsByClassName(
          "el-image-viewer__wrapper"
        )[0];
        dom.addEventListener("mousedown", (e) => {
          e.stopPropagation();
          console.log("?");
        });
      });
    },
纪泽龙's avatar
纪泽龙 committed
124 125 126 127
    close() {
      this.obj.polyline.infoWindow.close();
    },
  },
纪泽龙's avatar
纪泽龙 committed
128 129 130 131 132 133
};
</script>

<style lang="scss" scoped>
.wrapper {
  width: 406px;
纪泽龙's avatar
纪泽龙 committed
134
  // height: 488px;
135
  // background: #fff;
纪泽龙's avatar
纪泽龙 committed
136 137
  border-radius: 4px;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
138 139
  background: rgba(7, 29, 51, 0.9);
  color: #fff;
纪泽龙's avatar
纪泽龙 committed
140
  // overflow: hidden;
141

纪泽龙's avatar
纪泽龙 committed
142 143 144
  .top {
    width: 100%;
    height: 51px;
145 146 147 148 149 150 151 152 153 154 155 156 157 158
    // background-color: #053b6a;
    background-image: url(../../assets/images/blueTopBg.png);
    background-size: 100% 100%;
    background-position: center;
    &:before {
      content: "";
      position: absolute;
      left: -20px;
      top: 5px;
      z-index: -1;
      width: 33px;
      height: 33px;
      background-image: url(../../assets/images/blueLeftTriangle.png);
    }
纪泽龙's avatar
纪泽龙 committed
159 160 161 162 163 164 165
    .text {
      font-weight: 600;
      font-size: 16px;
      color: #ffffff;
      line-height: 51px;
    }
    .left {
纪泽龙's avatar
纪泽龙 committed
166
      padding-left: 22px;
纪泽龙's avatar
纪泽龙 committed
167 168
    }
    .right {
纪泽龙's avatar
纪泽龙 committed
169
      padding-right: 22px;
170
      img {
纪泽龙's avatar
纪泽龙 committed
171 172
        cursor: pointer;
      }
纪泽龙's avatar
纪泽龙 committed
173 174
    }
  }
纪泽龙's avatar
纪泽龙 committed
175
  .content {
176
    position: relative;
纪泽龙's avatar
纪泽龙 committed
177 178 179 180
    max-height: 400px;
    overflow: hidden;
    overflow-y: auto;
    .eq-content {
181
      // min-height: 156px;
纪泽龙's avatar
纪泽龙 committed
182 183 184 185 186 187 188 189 190 191 192
      box-sizing: border-box;
      padding: 13px 22px 0px 22px;
      // border-bottom: 1px solid #e2e2e2;
      .text-wrapper {
        padding-top: 1px;
        & > div {
          margin-bottom: 6px;
        }
        .eq-text {
          font-size: 14px;
          font-weight: 400;
193
          color: #fff;
纪泽龙's avatar
纪泽龙 committed
194 195 196 197 198 199 200 201 202 203
          opacity: 1;
          & > span {
            vertical-align: top;
            display: inline-block;
            // white-space: nowrap;
            // text-overflow: ellipsis;
            // overflow: hidden;
            word-break: break-all;
            max-width: 100px;
          }
纪泽龙's avatar
纪泽龙 committed
204
        }
纪泽龙's avatar
纪泽龙 committed
205
      }
纪泽龙's avatar
纪泽龙 committed
206
      .pic {
207 208
        width: 180px;
        height: 103px;
纪泽龙's avatar
纪泽龙 committed
209 210 211 212
        // background-color: black;
        img {
          width: 100%;
          height: 100%;
213
          // cursor: pointer;
纪泽龙's avatar
纪泽龙 committed
214
        }
纪泽龙's avatar
纪泽龙 committed
215 216 217 218 219 220
      }
    }
  }

  .maintain-content {
    width: 100%;
221
    max-height: 119px;
纪泽龙's avatar
纪泽龙 committed
222
    padding-left: 22px;
223
    // padding-right: 22px;
纪泽龙's avatar
纪泽龙 committed
224
    padding-bottom: 10px;
纪泽龙's avatar
纪泽龙 committed
225
    // padding-top: 16px;
纪泽龙's avatar
纪泽龙 committed
226
    box-sizing: border-box;
纪泽龙's avatar
纪泽龙 committed
227
    // border-bottom: 1px solid #e2e2e2;
纪泽龙's avatar
纪泽龙 committed
228 229 230 231
    & > div {
      margin-bottom: 8px;
      font-size: 14px;
      font-weight: 400;
纪泽龙's avatar
纪泽龙 committed
232 233 234 235
      span {
        vertical-align: top;
        display: inline-block;
        word-break: break-all;
236
        max-width: 280px;
纪泽龙's avatar
纪泽龙 committed
237
      }
纪泽龙's avatar
纪泽龙 committed
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
    }
  }

  .warn-content {
    height: 82px;
    box-sizing: border-box;
    padding: 8px 0 0 22px;
    border-bottom: 1px solid #e2e2e2;
    & > div {
      font-size: 14px;
      font-weight: 400;
      margin-bottom: 8px;
    }
  }
  .btn {
    padding-top: 32px;
    text-align: center;
    .elbtn {
      background-color: #053b6a;
      box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
      width: 95px;
      height: 33px;
    }
  }
}
纪泽龙's avatar
纪泽龙 committed
263

纪泽龙's avatar
纪泽龙 committed
264
.wrapperEditorPage {
纪泽龙's avatar
纪泽龙 committed
265
}
纪泽龙's avatar
纪泽龙 committed
266 267 268 269
.display-default {
  display: flex;
  justify-content: space-between;
}
270
</style>