<template>
  <div>     <!-- height="calc(100% - 40px)"-->
            <el-table class="com-table" ref="multipleTable" :data="tableData"
                        tooltip-effect="dark" size="small" border style="width: 100%" 
                         v-loading="loading" >
            <el-table-column  prop="stepName"    label="任务名称" align="left" width="200px"/>
            <el-table-column  prop="auditNote"  label="审批备注" align="left"/>
            <el-table-column  prop="auditResultInfo"  label="审批意见" align="left"/>
            <el-table-column  prop="opLoginName" label="操作工号" align="center" width="120px"/>
            <el-table-column  prop="createTime"  label="操作时间" align="center" width="180px"/>

          </el-table>
  </div>
</template>

<script>
export default {
  props: {
    itemId: { required: true,type: String}
  },

  data(){
    return{
      tableData:[],
      loading:false,
    }
  },

  methods:{
    //
    viewItem(itemId,idx){
        console.log({itemId,idx})
    },

    //
    loadData(){
      this.$http({
        url: "/market/tvImport/queryImportAudit",
        method: "post",
        headers: {"Content-Type": "application/json"},
        data: {"itemId":this.itemId}
      }).then((res) => {
         if(res.data.result==0){
            this.tableData = res.data.body 
         }else{
           this.$message({ showClose: true, message: '系统异常',type: 'error'});
         }
      });
    }
  },
  watch:{
    itemId(val,oldVal){
      this.loadData()
    }
  },
  mounted(){
    this.loadData()
  }
}
</script>
