troubleInfoWindowWarn.vue 8.59 KB
Newer Older
1 2 3 4
<template>
  <div class="wrapper">
    <span class="dot-left"></span>
    <div class="top display-default">
5 6 7
      <div class="left text ddd" :title="data.troubleName">
        {{ data.troubleName }}
      </div>
8
      <div class="right text">
9
        <img src="../../assets/images/closeBtn.png" alt="" @click="close" />
10 11 12
      </div>
    </div>
    <!-- 设备信息 -->
纪泽龙's avatar
纪泽龙 committed
13
    <div class="content  scrollStyle">
14 15 16
      <div class="eq-content display-default">
        <div class="text-wrapper">
          <div class="eq-text">
纪泽龙's avatar
纪泽龙 committed
17
            隐患类型:<span>{{ data.troubleType }}</span>
18 19
          </div>
          <div class="eq-text">
纪泽龙's avatar
纪泽龙 committed
20
            隐患等级:<span>{{ data.troubleLevel }}</span>
21 22
          </div>
          <div class="eq-text">
纪泽龙's avatar
纪泽龙 committed
23
            处理状态:<span>{{
纪泽龙's avatar
纪泽龙 committed
24
              data.dealStatus ? data.dealStatus : "暂未处理"
纪泽龙's avatar
纪泽龙 committed
25
            }}</span>
26 27
          </div>
          <div class="eq-text">
纪泽龙's avatar
纪泽龙 committed
28
            上报人员:<span>{{ data.reportManName }}</span>
29 30 31
          </div>
        </div>
        <div class="pic">
纪泽龙's avatar
纪泽龙 committed
32
          <img v-bind:src="data.pictureUrl" alt="" />
33 34 35 36 37 38
        </div>
      </div>
      <!-- 维修人员 -->
      <div class="maintain-content">
        <el-col :span="11">
          <div>
纪泽龙's avatar
纪泽龙 committed
39 40
            <span>上报日期:</span>
            <span>{{ moment(data.createTime).format("YYYY-MM-DD") }}</span>
41 42 43 44 45 46
          </div>
        </el-col>

        <el-col :span="13">
          <div>
            <span>最后巡检日期:</span>
纪泽龙's avatar
纪泽龙 committed
47 48 49 50 51
            <span>{{
              data.updateTime
                ? moment(data.updateTime).format("YYYY-MM-DD")
                : "-"
            }}</span>
52 53 54 55
          </div>
        </el-col>

        <div>
纪泽龙's avatar
纪泽龙 committed
56 57
          <span>隐患所在地址:</span>
          <span>{{ data.address }}</span>
58 59 60
        </div>
        <div>
          <span>备注信息:</span>
纪泽龙's avatar
纪泽龙 committed
61
          <span>{{ data.remarks ? data.remarks : "-" }} </span>
62 63 64 65
        </div>
      </div>
    </div>

纪泽龙's avatar
纪泽龙 committed
66
    <!-- 隐患关联设备状态 -->
67 68 69
    <div class="warn-wrapper" v-if="true">
      <div class="warn-content">
        <div>
纪泽龙's avatar
纪泽龙 committed
70
          关联设备:<span>{{ data.deviceName ? data.deviceName : "-" }}</span>
71 72
        </div>
        <div>
73 74 75
          设备类型:<span>{{
            data.deviceType ? this.deviceType[data.deviceType] : "-"
          }}</span>
76 77 78 79 80 81 82
        </div>
        <div v-if="!orderId">
          工单编号:<span>{{ data.orderId }}</span>
        </div>
      </div>
      <div class="btn">
        <span @mousedown.stop="deviceMore">
纪泽龙's avatar
纪泽龙 committed
83
          <el-button class="elbtn" type="primary">隐患详情</el-button>
84 85
        </span>
        <span v-if="orderId" @mousedown.stop="createWork">
86
          <el-button class="elbtn" type="primary">生成工单</el-button>
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
        </span>
        <span v-else @mousedown.stop="checkWork">
          <el-button class="elbtn" type="primary">查看工单</el-button>
        </span>
      </div>
    </div>
  </div>
</template>

<script>
import moment from "moment";
//line移入时的的infowindow
export default {
  props: {
    obj: { typs: Object },
    title: "",
    data: {},
    map: null,
  },
  data() {
    return {
      deviceType: {
纪泽龙's avatar
纪泽龙 committed
109
        0: "管道",
110 111 112 113 114 115 116 117 118 119
        1: "调压箱",
        2: "阀门井",
        3: "流量计",
        4: "智能燃气表",
      },
    };
  },
  computed: {
    orderId() {
      // 如果已经生成过工单,就不能再次生成了
120
      console.log("orderId", this.data.orderId);
121 122 123 124 125 126 127 128 129
      // return this.data.orderId ? false : true;
      return this.data.orderId ? false : true;
    },
  },
  methods: {
    moment,
    createWork() {
      // 控制外层弹框
      // console.log(this.data.view.$refs.CreateWork);
130 131 132 133 134 135 136 137
      this.data.class.view.$refs.CreateWorkTrouble.form.troubleId =
        this.data.troubleId;
      this.data.class.view.$refs.CreateWorkTrouble.form.troubleName =
        this.data.troubleName;
      this.data.class.view.$refs.CreateWorkTrouble.form.troubleType =
        this.data.troubleType;
      this.data.class.view.$refs.CreateWorkTrouble.form.troubleLevel =
        this.data.troubleLevel;
纪泽龙's avatar
纪泽龙 committed
138
      this.data.class.view.$refs.CreateWorkTrouble.open = true;
139 140
      this.data.class.view.$refs.CreateWorkTrouble.gaoMap =
        this.data.class.view.gaoMap;
141 142
      // 改变外层回调
      // this.data.view.CreateWorkCallBack = this.CreateWorkCallBack;
143
      this.data.class.view.troubleObjChange({ troubleId: this.data.troubleId });
144 145 146 147 148 149 150 151 152 153 154 155 156
    },
    // CreateWorkCallBack(e) {
    //   // console.log("生成工单后传过来的参数", e);
    //   // console.log("markerCallBack");
    //   const marker = this.data.view.gaoMap.markers.filter((item) => {
    //     return item.getExtData().alarmId == this.data.alarmId;
    //   })[0];
    //   console.log("marer.getExtData()", marker.getExtData());
    //   let options = marker.getExtData();
    //   // 暂时传值,到时候回重新刷新
    //   options.orderId = e;
    //   marker.setExtData(options);
    // },
157 158
    close() {
      this.map.clearInfoWindow();
159
      this.data.class.view.domAllShow();
160
    },
161
    deviceMore() {
纪泽龙's avatar
纪泽龙 committed
162 163
      this.data.class.view.$router.push({
        path: "/riskManagement/hiddenTroubleDetail",
164
        query: {
纪泽龙's avatar
纪泽龙 committed
165 166
          troubleId: this.data.troubleId,
          // dcviceType: this.deviceType[this.data.deviceType],
167 168 169 170 171
        },
      });
    },
    // 查看工单
    checkWork() {
纪泽龙's avatar
纪泽龙 committed
172
      this.data.class.view.$router.push({
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
        path: "/workOrder/detail",
        query: {
          orderId: this.data.orderId,
        },
      });
    },
  },
  beforeDestroy() {
    // this.data.view.createWorkOpen = false;
  },
};
</script>

<style lang="scss" scoped>
.wrapper {
  width: 406px;
189
  max-height: 500px;
190 191 192
  // background: #fff;
  background: rgba(7, 29, 51, 0.9);

193 194
  border-radius: 4px;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
195
  // overflow: hidden;
196 197 198
  .top {
    width: 100%;
    height: 51px;
199 200 201 202 203
    // background-color: #e6a23c;
    background-image: url(../../assets/images/yellowTopBg.png);
    background-size: 100% 100%;
    background-position: center;
    color: #fff;
204 205 206 207 208
    &:before {
      content: "";
      position: absolute;
      left: -20px;
      top: 5px;
209 210 211 212
      z-index: -1;
      width: 33px;
      height: 33px;
      background-image: url(../../assets/images/yellowLeftTriangle.png);
213
    }
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
    .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;
    max-height: 300px;
    overflow: hidden;
    overflow-y: auto;
    padding-bottom: 2px;
    border-bottom: 1px solid #eeeeee;
    .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;
250
          color: #fff;
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
          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;
280
    color: #fff;
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
    // padding-right: 22px;
    // padding-bottom: 10px;
    // 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;
      }
    }
  }
  .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;
      }
    }
    .btn {
      padding: 16px 0;
      text-align: center;
      span {
        display: inline-block;
        padding: 0 10px;
        .elbtn {
          background-color: #053b6a;
          box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
          width: 95px;
          height: 33px;
321
          // border: none;
322 323 324 325 326 327 328 329 330 331 332 333 334
        }
      }
    }
  }
}

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