<template>
  <div class="feedback-mes-con">
    <div class="feedback-mes-item">
      <h2>{{feedback.feedbackContent}}</h2>
      <div class="feedback-img-item" :style="{'background-image':'url('+file.url+')'}" v-for="(file,i) in feedback.fileList" :key="i" @click="browse(file.url)"></div>
      <div class="feedback-mes_info">
        {{$t('module.feedback.type')}}:
        <span>{{categoryText(feedback.feedbackType)}}</span>
        {{$t('module.feedback.time')}}：{{feedback.createTime}}
      </div>
      <reply :id="feedback.fid" :list.sync="feedback.replyList" :displayLight="false" :initData="true"></reply>
    </div>
  </div>
</template>
<script>
import Reply from './Reply.vue'
export default {
  components: {
    Reply
  },
  props: {
    feedback: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  data() {
    return {

    }
  },
  computed: {

  },
  created: function () {

  },
  beforeMount: function () {

  },
  mounted: function () {

  },
  beforeDestroy: function () {

  },
  destroyed: function () {

  },
  methods: {
    categoryText(id) {
      return $store.state.feedback.category[$store.state.feedback.category.findIndex((row) => {
        return row.id == id;
      })].text;
    },
    browse(source) {
      new this.$BrowseImage(source);
    }
  },
  watch: {
  },
  directives: {

  }
}
</script>
