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
106
107
108
109
110
111
| <template>
| <a-card :bordered="false">
| <!-- 操作按钮区域 -->
| <div class="table-operator">
| <a-button @click="showModal(null)" type="primary" icon="plus">新增</a-button>
| </div>
| <div>
| <a-table
| ref="table"
| size="middle"
| :scroll="{x:true}"
| bordered
| rowKey="id"
| :columns="columns"
| :dataSource="dataSource"
| :pagination="false"
| :loading="loading"
| class="j-table-force-nowrap"
| @change="handleTableChange">
| <span slot="status" slot-scope="text, record, index">
| <a-tag color="pink" v-if="text==0">禁用</a-tag>
| <a-tag color="#87d068" v-if="text==1" >正常</a-tag>
| </span>
| <span slot="action" slot-scope="text, record">
| <a @click="showModal(record)">编辑</a>
|
| <a-divider type="vertical"/>
| <a-dropdown>
| <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
| <a-menu slot="overlay">
| <a-menu-item>
| <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
| <a>删除</a>
| </a-popconfirm>
| </a-menu-item>
| </a-menu>
| </a-dropdown>
| </span>
|
| </a-table>
| </div>
| <gate-way-route-modal ref="modalForm" @ok="modalFormOk"></gate-way-route-modal>
| </a-card>
| </template>
|
| <script>
|
| import '@/assets/less/TableExpand.less'
| import { mixinDevice } from '@/utils/mixin'
| import { JeecgListMixin } from '@/mixins/JeecgListMixin'
| import GateWayRouteModal from './modules/GateWayRouteModal'
|
| export default {
| name: 'TenantList',
| mixins: [JeecgListMixin, mixinDevice],
| components: {
| GateWayRouteModal
| },
| data() {
| return {
| description: 'adad管理页面',
| // 表头
| columns: [
| {
| title: '路由ID',
| align: 'center',
| dataIndex: 'routerId'
| }, {
| title: '路由名称',
| align: 'center',
| dataIndex: 'name'
| },
| {
| title: '路由URI',
| align: 'center',
| dataIndex: 'uri'
| },
| {
| title: '状态',
| align: 'center',
| dataIndex: 'status',
| scopedSlots: { customRender: 'status' }
| },
| {
| title: '操作',
| dataIndex: 'action',
| align: 'center',
| fixed: 'right',
| width: 147,
| scopedSlots: { customRender: 'action' }
| }
| ],
| url: {
| list: '/sys/gatewayRoute/list',
| delete: '/sys/gatewayRoute/delete'
| },
| dictOptions: {}
| }
| },
| created() {
| },
| methods: {
| showModal(record) {
| this.$refs['modalForm'].show(record)
| }
| }
| }
| </script>
| <style scoped>
| @import '~@assets/less/common.less';
| </style>
|
|