zhaowei
2025-01-20 5ffe205b81d80bff5f64c9799f54d4309b86369d
src/views/dnc/base/modules/ProductStructure/Document/UseNcDocumentEquipmentTableList.vue
@@ -1,18 +1,28 @@
<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: '序号',
@@ -32,11 +42,33 @@
          { 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>