<template>
  <div>
    <div>
      <el-card shadow="always" v-if="messageList.length>0" style="width: 95%;margin: 0 auto">
        <el-timeline style="width: 90%;margin-top: 20px">
          <el-timeline-item v-for="(message,index) in messageList" :key="index" :timestamp="timeString ? (message.createTime).substring(0,19):message.createMan+'  '+(message.createTime).substring(0,19)" placement="top" >
            <el-card class="stepList">
              <p>{{message.messageStr}}</p>
            </el-card>
          </el-timeline-item>
        </el-timeline>
      </el-card>
      <div v-else>
        <span style="display: block;width: 100%;line-height: 34px;text-align: center;color: #7c7c7c">暂无消息</span>
      </div>
    </div>
  </div>
</template>

<script>
import {
  viewRemoteOrderMessage
} from '@/api/feedBack/feedBack.js'
export default {
  name: 'OrderMessage',
  data() {
    return {
      idPrint:"",
      idOrder: '',
      sMessage: '',
      messageList: [],
      timeString: '',
      idOriginFactory:"",
      originOrderId:""
    }
  },
  created() {
    // this.getList()
  },
  methods: {
    getList() {
      var _that = this;
      _that.messageList= [];
      var data = {
        'idOriginFactory': _that.idOriginFactory,
        'originOrderId': _that.originOrderId
      }
      viewRemoteOrderMessage(data).then(response => {
        // console.log(response)
        _that.messageList = response.data
      }).catch(err => {
        _that.$message.error(err)
      })
    }
  }
}
</script>

<style scoped>

</style>
