markerInfoWindow.vue 6.16 KB
Newer Older
1 2 3 4
<template>
  <div class="wrapper">
    <span class="dot-left"></span>
    <div class="top display-default">
5
      <div class="left text ddd" :title="data.deviceName">{{ data.deviceName }}</div>
6
      <div class="right text">
7
        <img src="../../assets/images/closeBtn.png" alt="" @click="close" />
8 9 10 11 12 13
      </div>
    </div>
    <!-- 设备信息 -->
    <div class="content">
      <div class="eq-content display-default">
        <div class="text-wrapper">
纪泽龙's avatar
纪泽龙 committed
14 15 16 17 18 19 20
          <div class="eq-text">
            设备类型:<span>{{ title }}</span>
          </div>
          <div class="eq-text">
            设备型号:<span>{{ data.deviceModel }}</span>
          </div>
          <div class="eq-text">
21
            所属管道:<span>{{ data.pipeName }}</span>
纪泽龙's avatar
纪泽龙 committed
22 23 24 25
          </div>
          <div class="eq-text">
            物联网编号:<span>{{ data.iotNo }}</span>
          </div>
26 27 28 29 30 31
        </div>
        <div class="pic">
          <img v-bind:src="data.iconUrl" alt="" />
        </div>
      </div>
      <!-- 维修人员 -->
纪泽龙's avatar
纪泽龙 committed
32
      <div class="maintain-content">
33 34 35
        <el-col :span="11">
          <div>
            <span>安装日期:</span>
纪泽龙's avatar
纪泽龙 committed
36 37 38
            <span>{{
              moment(data.installationTime).format("YYYY-MM-DD")
            }}</span>
39 40 41 42 43 44
          </div>
        </el-col>

        <el-col :span="13">
          <div>
            <span>最后巡检日期:</span>
纪泽龙's avatar
纪泽龙 committed
45
            <span>{{ data.inspectionTime ? data.inspectionTime : "-" }}</span>
46 47 48 49
          </div>
        </el-col>

        <div>
50
          <span>设备所在地址:</span>
51 52 53 54 55 56 57 58 59
          <span>{{ data.pipeAddr }}</span>
        </div>
        <div>
          <span>备注信息:</span>
          <span>{{ data.remarks }} </span>
        </div>
      </div>
    </div>

纪泽龙's avatar
纪泽龙 committed
60 61 62 63 64 65 66
    <!-- 报警状态 -->
    <div class="warn-wrapper" v-if="true">
      <!-- <div class="warn-content">
        <div>报警状态:<span>报警</span></div>
        <div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
      </div> -->
      <div class="btn">
纪泽龙's avatar
纪泽龙 committed
67 68 69
        <span @mousedown.stop="deviceMore">
          <el-button class="elbtn" type="primary">设备详情</el-button>
        </span>
纪泽龙's avatar
纪泽龙 committed
70 71 72
        <!-- <el-button class="elbtn" type="primary">生成工单</el-button> -->
      </div>
    </div>
73 74 75 76
  </div>
</template>

<script>
纪泽龙's avatar
纪泽龙 committed
77
import moment from "moment";
78 79 80 81 82 83
//line移入时的的infowindow
export default {
  props: {
    obj: { typs: Object },
    title: "",
    data: {},
纪泽龙's avatar
纪泽龙 committed
84
    map: null,
85
  },
纪泽龙's avatar
纪泽龙 committed
86
  methods: {
87
    moment,
纪泽龙's avatar
纪泽龙 committed
88 89
    deviceMore() {
      this.data.class.view.$router.push({
90 91
        // path: "/dataMonitoring/realtimedetail",
        path: "/device/deviceInfoDetail",
纪泽龙's avatar
纪泽龙 committed
92 93
        query: {
          deviceId: this.data.deviceId,
94
          // deviceType: this.data.deviceType,
纪泽龙's avatar
纪泽龙 committed
95 96 97
        },
      });
    },
98
    close() {
99
      this.map.clearInfoWindow();
100
      this.data.class.view.domAllShow()
101
    },
纪泽龙's avatar
纪泽龙 committed
102
  },
103 104 105 106 107 108
};
</script>

<style lang="scss" scoped>
.wrapper {
  width: 406px;
纪泽龙's avatar
纪泽龙 committed
109
  max-height: 430px;
110
  // background: #fff;
111
  border-radius: 4px;
112
  background: rgba(7, 29, 51, 0.9);
113
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
114
  color: #fff;
115
  // overflow: hidden;
116 117 118
  .top {
    width: 100%;
    height: 51px;
119 120 121 122
    // background-color: #053b6a;
    background-image: url(../../assets/images/blueTopBg.png);
    background-size: 100% 100%;
    background-position: center;
123
    &:before {
124 125 126 127 128 129 130 131 132 133
      // content: "";
      // position: absolute;
      // left: -20px;
      // top: 5px;
      // width: 0px;
      // height: 0px;
      // z-index:-1;
      // border-top: 15px solid transparent;
      // border-bottom: 15px solid transparent;
      // border-right: 30px solid #053b6a;
134 135 136 137
      content: "";
      position: absolute;
      left: -20px;
      top: 5px;
138 139 140 141
      z-index: -1;
      width: 33px;
      height: 33px;
      background-image: url(../../assets/images/blueLeftTriangle.png);
142
    }
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
    .text {
      font-weight: 600;
      font-size: 16px;
      color: #ffffff;
      line-height: 51px;
    }
    .left {
      padding-left: 22px;
    }
    .right {
      padding-right: 22px;
      img {
        cursor: pointer;
      }
    }
  }
  .content {
    position: relative;
纪泽龙's avatar
纪泽龙 committed
161
    max-height: 300px;
162 163
    overflow: hidden;
    overflow-y: auto;
纪泽龙's avatar
纪泽龙 committed
164 165
    padding-bottom: 2px;
    border-bottom: 1px solid #eeeeee;
166 167 168 169 170 171 172 173 174 175 176 177 178
    .eq-content {
      // min-height: 156px;
      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;
179 180
          // color: #1d1d1d;
          color: #fff;
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
          opacity: 1;
          & > span {
            vertical-align: top;
            display: inline-block;
            // white-space: nowrap;
            // text-overflow: ellipsis;
            // overflow: hidden;
            word-break: break-all;
            max-width: 100px;
          }
        }
      }
      .pic {
        width: 180px;
        height: 103px;
        // background-color: black;
        img {
          width: 100%;
          height: 100%;
          // cursor: pointer;
        }
      }
    }
  }

  .maintain-content {
    width: 100%;
    max-height: 119px;
    padding-left: 22px;
    // padding-right: 22px;
纪泽龙's avatar
纪泽龙 committed
211
    // padding-bottom: 10px;
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226
    // padding-top: 16px;
    box-sizing: border-box;
    // border-bottom: 1px solid #e2e2e2;
    & > div {
      margin-bottom: 8px;
      font-size: 14px;
      font-weight: 400;
      span {
        vertical-align: top;
        display: inline-block;
        word-break: break-all;
        max-width: 280px;
      }
    }
  }
纪泽龙's avatar
纪泽龙 committed
227 228 229 230 231 232 233 234 235 236 237
  .warn-wrapper {
    .warn-content {
      box-sizing: border-box;
      padding: 10px 0 2px 22px;
      border-bottom: 1px solid #e2e2e2;
      color: #fe5966;
      & > div {
        font-size: 14px;
        font-weight: 400;
        margin-bottom: 8px;
      }
238
    }
纪泽龙's avatar
纪泽龙 committed
239 240 241 242 243 244 245 246 247
    .btn {
      padding: 16px 0;
      text-align: center;
      .elbtn {
        background-color: #053b6a;
        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
        width: 95px;
        height: 33px;
      }
248 249 250 251 252 253 254 255 256 257 258
    }
  }
}

.wrapperEditorPage {
}
.display-default {
  display: flex;
  justify-content: space-between;
}
</style>