| | |
| | | <template> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false"> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :size="size" rowKey="deviceId"> |
| | | |
| | | </a-table> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'UseNcDocumentEquipmentTableList', |
| | | components: {}, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentDocumentInfo: { |
| | | type: Object |
| | | }, |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | columns: [ |
| | | { |
| | | title: '序号', |
| | |
| | | { title: '控制系统', dataIndex: 'controlSystem', align: 'center' } |
| | | ], |
| | | url: { |
| | | list: '' |
| | | list: '/doc/relative/get/device' |
| | | } |
| | | } |
| | | }, |
| | | methods: {} |
| | | methods: { |
| | | loadData() { |
| | | this.dataSource = [] |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list属性!') |
| | | return |
| | | } |
| | | var params = this.getQueryParams()//查询条件 |
| | | if (!params) { |
| | | return false |
| | | } |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.currentDocumentInfo.docId}`, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.list |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |