<template>
  <div>
    <back :title="titlename"></back>
    <div class="content">
      <van-field
        v-model="info.suggestScene"
        readonly
        name="建议场景"
        label="建议场景"
        placeholder="请输入建议场景"
        :rules="[{ required: false }]"
      />
      <van-field
        type="textarea"
        v-model="info.feedbackContent"
        readonly
        cols="30"
        rows="6"
        label="意见建议"
        placeholder=""
      />
      <van-field
        type="textarea"
        v-model="info.replyContent"
        readonly
        cols="30"
        rows="6"
        label="回复内容"
        placeholder=""
      />
      <!-- <textarea v-model="info.feedbackContent" readonly cols="30" rows="8" label="意见建议"  placeholder=""></textarea> -->
      <!-- <textarea v-model="info.replyContent" readonly cols="30" rows="8" placeholder=""></textarea> -->
      <van-field
        v-model="info.replyTime"
        readonly
        name="回复时间"
        label="回复时间"
        placeholder=""
        :rules="[{ required: false }]"
      />
      <!-- <van-button color="#0c2469" @click="tj">提交</van-button> -->
    </div>
  </div>
</template>

<script>
import { Toast, Dialog } from "vant";
export default {
  data() {
    return {
      titlename: "意见建议",
      feedbackContent: "", //意见建议内容
      userId: "",
      mailRoomId: "", //收发室Id
      feedbackPerson: "", //反馈人
      expressNo: "1", //关联快递单号-选填
      suggestScene: "", //建议场景：寄件、收件
      id: "",
      info: {}
    };
  },
  created: function() {
    this.isLogin();
    this.userId = localStorage.getItem("userId");
    this.mailRoomId = localStorage.getItem("roomId");
    this.id = this.$route.query.id;
    this.getSuggestDetail();
  },
  methods: {
    //查看
    getSuggestDetail() {
      this.$http
        .post(
          this.$store.state.host + "/solic/getSuggestDetail.do",
          {
            id: this.id
          },
          { emulateJSON: true }
        )
        .then(
          res => {
            //发送成功
            if (res.body.msg == "success") {
              this.info = res.body.suggestInfo;
            }
          },
          res => {
            //发送失败
          }
        );
    }
  }
};
</script>

<style scoped lang="less">
.content {
  padding: 0.33rem;
  font-size: 0.36rem;

  .title {
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.2rem;
  }

  textarea {
    width: 96%;
    padding: 2%;
    margin-top: 0.3rem;
    border-color: #dedede;
    font-size: 0.3rem;
  }

  button {
    width: 100%;
    margin-top: 0.3rem;
  }
}
</style>
