fileTable.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div>
  3. <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="tableHieght">
  4. <template v-slot:customcol="scope">
  5. <p >{{scope.column.data[scope.column.columnname]}}</p>
  6. </template>
  7. <template v-slot:opreation="scope">
  8. <div>
  9. <slot name="del" :data="scope.data"></slot>
  10. </div>
  11. </template>
  12. </tableLayout>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. name: "fileTable",
  18. props:["id"],
  19. data(){
  20. return {
  21. tableHieght:420,
  22. tablecols:[],
  23. list:[]
  24. }
  25. },
  26. mounted() {
  27. this.listData()
  28. },
  29. methods:{
  30. async listData(){
  31. const res = await this.$api.requested({
  32. "classname": "system.attachment.Attachment",
  33. "method": "queryFileLink",
  34. "content": {
  35. "ownertable": "plm_technicalinfo",
  36. "ownerid": this.id,
  37. "usetype":"default"//传空返回有所
  38. }
  39. })
  40. this.list = res.data
  41. }
  42. },
  43. created() {
  44. this.tablecols = this.tool.tabelCol(this.$route.name).fileTable.tablecols
  45. }
  46. }
  47. </script>
  48. <style scoped>
  49. </style>