<template>
  <div>
    <tableLayout  :layout="tablecols" :data="list" :custom="true" height="200">
      <template v-slot:customcol="scope">
        <p >{{scope.column.data[scope.column.columnname]}}</p>
      </template>
    </tableLayout>
  </div>
</template>

<script>
export default {
  name: "index",
  props:["data"],
  data() {
    return {
      tablecols:'',
      list:[],
    }
  },
  mounted() {
   if (this.data.quotedpricetype === '项目报价') {
     this.projectData()
   } else {
     this.list = []
   }
  },
  methods:{
    async projectData(){
      const res = await this.$api.requested({
        "id": 20221021103902,
        "content": {
          "sa_projectid": this.data.sa_projectid
        },
      })
      this.list.push(res.data)
      console.log(res.data)
      console.log(this.list,"项目商机内容")
    }
  },
  created() {
    this.tablecols = this.tool.tabelCol(this.$route.name).ProjectOpportunitiesTable.tablecols
  }
}
</script>

<style scoped>

</style>