<template>
  <div class="otherAppeal">
    <!-- 标题 -->
    <div class="title" v-if="isOther">
      {{ otherAppeal.title }}
    </div>
    <div class="details" v-if="isOther && otherAppeal.process === '2'">
      <img src="/static/appeal/avator.png" class="icon" />
      <p class="msg">
        <span class="name">{{ otherAppeal.department_name }}</span
        >：
        <span class="msg_body">{{ otherAppeal.reply }}</span>
      </p>
    </div>
    <div class="details" v-if="!isOther">
      <p class="content">
        <img
          src="/static/appeal/waited.svg"
          class="state"
          v-if="otherAppeal.process === '2'"
        />
        <img src="/static/appeal/waiting.svg" class="state" v-else />
        <span class="content_body">{{ otherAppeal.content }}</span>
      </p>
    </div>
    <!-- <div class="details" v-else>
      <p class="msg">
        <span class="msg_body_waiting">正在处理中……</span>
      </p>
    </div> -->
    <!-- <div class="details" v-else>
      <img src="/static/appeal/avator.png" class="icon" />
      <p class="msg">
        <span class="name">{{ otherAppeal.department_name }}</span
        >：
        <span class="msg_body">{{ otherAppeal.reply }}</span>
      </p>
    </div> -->
  </div>
</template>
<script>
export default {
  props: ["otherAppeal", "isOther"],
};
</script>
<style lang="scss" scoped>
.otherAppeal {
  margin: 5% 8%;
  position: relative;
  height: 150rpx;
  display: flex;
  flex-flow: column;
  justify-content: center;
  .title {
    margin-bottom: 5%;
    font-size: 30rpx;
    font-weight: 600;
  }
  .details {
    .name {
      font-size: 26rpx;
      color: red;
    }
    .msg {
      font-size: 26rpx;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      word-wrap: break-word;
      word-break: break-all;
      line-height: 40rpx;
      letter-spacing: 2rpx;
      .msg_body_waiting {
        color: #aaa;
      }
    }
    .content {
      position: relative;
      width: 100%;
      font-size: 26rpx;
      .state {
        position: absolute;
        right: 0;
        top: 0;
        width: 94rpx;
        height: 74rpx;
      }
      .content_body {
        width: 80%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        word-wrap: break-word;
        word-break: break-all;
        line-height: 40rpx;
        letter-spacing: 2rpx;
      }
    }
    .icon {
      width: 50rpx;
      height: 50rpx;
      position: absolute;
      transform: translateX(-100%);
    }
  }
}
</style>