index.vue 752 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div>
  3. <tableLayout ref="list" :layout="tablecols" :data="list" :custom="true" height="300">
  4. <template v-slot:customcol="scope">
  5. <p >{{scope.column.data[scope.column.columnname]}}</p>
  6. </template>
  7. </tableLayout>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "index",
  13. props:["data"],
  14. data() {
  15. return {
  16. tablecols:'',
  17. list:[],
  18. }
  19. },
  20. mounted() {
  21. console.log(this.data,"项目商机")
  22. if (this.data.quotedpricetype === '项目报价') {
  23. this.list[0] = this.data
  24. console.log(this.list)
  25. }else {
  26. this.list = []
  27. }
  28. },
  29. created() {
  30. this.tablecols = this.tool.tabelCol(this.$route.name).projectTable.tablecols
  31. }
  32. }
  33. </script>
  34. <style scoped>
  35. </style>