1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <div>
- <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="tableHieght">
- <template v-slot:customcol="scope">
- <p >{{scope.column.data[scope.column.columnname]}}</p>
- </template>
- <template v-slot:opreation="scope">
- <div>
- <slot name="del" :data="scope.data"></slot>
- </div>
- </template>
- </tableLayout>
- </div>
- </template>
- <script>
- export default {
- name: "fileTable",
- props:["id"],
- data(){
- return {
- tableHieght:420,
- tablecols:[],
- list:[]
- }
- },
- mounted() {
- this.listData()
- },
- methods:{
- async listData(){
- const res = await this.$api.requested({
- "classname": "system.attachment.Attachment",
- "method": "queryFileLink",
- "content": {
- "ownertable": "plm_technicalinfo",
- "ownerid": this.id,
- "usetype":"default"//传空返回有所
- }
- })
- this.list = res.data
- }
- },
- created() {
- this.tablecols = this.tool.tabelCol(this.$route.name).fileTable.tablecols
- }
- }
- </script>
- <style scoped>
- </style>
|