PortalUrlPermissionManager.vue
5.05 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<template>
<div class="fullheight">
<ht-table
@load="loadData"
:data="data"
:pageResult="pageResult"
:selection="true"
:show-export="false"
:show-custom-column="false"
quick-search-props="sysId"
ref="table"
@selection-change="handleSelectionChange"
>
<template v-slot:toolbar>
<!-- <el-button-group> -->
<el-button
size="small"
@click="showDialog()"
icon="el-icon-plus"
type="primary"
>添加</el-button
>
<ht-delete-button
url="${portal}/portalUrlPermission/v1/"
:htTable="$refs.table"
:disabled="isDisabled"
>删除</ht-delete-button
>
<!-- </el-button-group> -->
</template>
<template>
<ht-table-column type="index" width="50" align="center" label="序号" />
<!-- <ht-table-column-->
<!-- prop="id"-->
<!-- label="主键"-->
<!-- :sortable="true"-->
<!-- :show-overflow-tooltip="true"-->
<!-- >-->
<!-- <template v-slot="{row}">-->
<!-- <el-link type="primary">{{ row.id }}</el-link>-->
<!-- </template>-->
<!-- </ht-table-column>-->
<ht-table-column
prop="sysId"
label="系统编码"
:sortable="true"
:show-overflow-tooltip="true"
>
<!-- <template v-slot="{row}">-->
<!-- <el-link type="primary">{{ row.id }}</el-link>-->
<!-- </template>-->
</ht-table-column>
<ht-table-column
prop="module"
label="所属模块"
:sortable="true"
:show-overflow-tooltip="true"
>
</ht-table-column>
<ht-table-column
prop="function"
label="所属功能"
:sortable="true"
:show-overflow-tooltip="true"
>
</ht-table-column>
<ht-table-column
prop="description"
label="接口描述"
:sortable="true"
:show-overflow-tooltip="true"
>
</ht-table-column>
<ht-table-column
prop="authUrl"
label="接口授权路径"
:sortable="true"
:show-overflow-tooltip="true"
>
</ht-table-column>
<ht-table-column
prop="createTime"
label="创建日期"
:sortable="true"
:show-overflow-tooltip="true"
>
</ht-table-column>
<!-- <ht-table-column-->
<!-- prop="createBy"-->
<!-- label="创建人的ID"-->
<!-- :sortable="true"-->
<!-- :show-overflow-tooltip="true"-->
<!-- >-->
<!-- </ht-table-column>-->
<!-- <ht-table-column-->
<!-- prop="createOrgId"-->
<!-- label="创建人组织ID"-->
<!-- :sortable="true"-->
<!-- :show-overflow-tooltip="true"-->
<!-- >-->
<!-- </ht-table-column>-->
</template>
</ht-table>
<PortalUrlPermission-manager-edit
ref="PortalUrlPermissionManagerEdit"
@loadData="loadData"
></PortalUrlPermission-manager-edit>
</div>
</template>
<script>
import PortalUrlPermissionManagerEdit from './PortalUrlPermissionManagerEdit.vue'
export default {
components: {
PortalUrlPermissionManagerEdit,
},
name: 'PortalUrlPermissionManager',
data() {
return {
dialogVisible: false,
data: [],
pageResult: {
page: 1,
pageSize: 50,
total: 0,
},
PortalUrlPermission: {},
saveMethod: 'POST',
isDisabled:true, //按钮的禁用
selectedList:[]
}
},
watch: {
// 监听选中下
selectedList:{
handler(val){
this.isDisabled = val.length < 1 ? true : false
},
deep:true
}
},
mounted() {
this.$validator = this.$root.$validator
},
methods: {
handleSelectionChange(selection){
this.selectedList = selection
},
showDialog(id) {
this.$refs.PortalUrlPermissionManagerEdit.showDialog(id)
},
beforeCloseDialog() {
this.PortalUrlPermission = {}
this.dialogVisible = false
},
loadData(param, cb) {
this.$http
.post('${portal}/portalUrlPermission/v1/query', param)
.then((resp) => {
let response = resp.data
this.data = response.rows
this.pageResult = {
page: response.page,
pageSize: response.pageSize,
total: response.total,
}
})
.finally(() => {
cb && cb()
})
},
afterSaveData() {
setTimeout(() => {
this.beforeCloseDialog()
this.$refs.htTable.load()
}, 500)
},
},
}
</script>
<style lang="scss" scoped>
.sp-manager__dialog /deep/ > .el-dialog > .el-dialog__body {
height: calc(100% - 170px);
}
</style>