zhaowei
2025-01-20 5ffe205b81d80bff5f64c9799f54d4309b86369d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
  <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: '序号',
            dataIndex: 'rowIndex',
            key: 'rowIndex',
            width: 65,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
          },
          { title: '设备名称', dataIndex: 'deviceName', align: 'center' },
          { title: '设备编号', dataIndex: 'deviceNo', align: 'center' },
          { title: '设备型号', dataIndex: 'deviceModel', align: 'center' },
          { title: '所属部门', dataIndex: 'departName', align: 'center' },
          { title: '设备分组', dataIndex: 'groupName', align: 'center' },
          { title: '控制系统', dataIndex: 'controlSystem', align: 'center' }
        ],
        url: {
          list: '/doc/relative/get/device'
        }
      }
    },
    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>
 
<style scoped>
 
</style>