<template>
<el-table :data="TableData" style="width: 100%">
<el-table-column prop="id" label="№ ID" width="180" />
<el-table-column prop="num_contract_reg" label="№ договора" width="240" />
<el-table-column prop="name_organization_reg" label="Название организации" width="240" />
<el-table-column label="Operations">
<template #default="scope">
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">Edit</el-button>
</template>
</el-table-column>
</el-table>
</template>
<script>
export default {
name: "SpisokLabelsComponent",
data(){
return{
TableData: null,
}
},
mounted() {
this.getPoluhenie()
},
methods: {
getPoluhenie() {
axios.get('/api/protocolsbd', {})
.then(res => {
this.TableData = res.data.data;
console.log(res)
})
},
handleEdit(row) {
return this.$router.push({
path: `/protocol_information/${row.id}/edit/`,
})
},
}
}
</script>
<style scoped>
</style>