peng
2026-03-25 67d3b57765b0ba66ae25a9da84a16e44a4ef2937
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<template>
  <a-card :bordered="false">
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
 
    </div>
 
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x: true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange"
      >
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical"/>
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
 
    <!-- 表单区域 -->
    <label-modal ref="modalForm" @ok="modalFormOk"></label-modal>
  </a-card>
</template>
 
<script>
import LabelModal from './components/LabelModal'
import {JeecgListMixin} from '@tievd/cube-block/lib/mixins/JeecgListMixin'
 
export default {
  name: 'LabelList',
 
  mixins: [JeecgListMixin],
 
  components: {
    LabelModal
  },
 
  data() {
    return {
      description: 'Label列表',
      // 表头
      columns: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '标签类型',
          align: 'center',
          dataIndex: 'labelType',
        },
        {
          title: '标签内容',
          align: 'center',
          dataIndex: 'labelName',
        },
        {
          title: '创建时间',
          align: 'center',
          dataIndex: 'createTime',
        },
        {
          title: '操作',
          dataIndex: 'action',
          width: 150,
          align: 'center',
          scopedSlots: {customRender: 'action'}
        }
      ],
      url: {
        list: '/jyz/label/list',
        delete: '/jyz/label/delete',
      }
    }
  },
 
  methods: {},
 
  created() {
  }
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>