@arkxos/arkos-app-gateway-manage 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/ark_dist/ark-meta.json +75 -0
- package/ark_dist/ark_userChunk_1.js +5 -0
- package/ark_dist/ark_userChunk_2.js +49 -0
- package/ark_dist/css/views/views-CreateGateway.41b2bde6.css +297 -0
- package/ark_dist/favicon.ico +0 -0
- package/ark_dist/img/404.png +0 -0
- package/ark_dist/img/auth_banner.jpg +0 -0
- package/ark_dist/img/avatar.jpg +0 -0
- package/ark_dist/img/avatar2.gif +0 -0
- package/ark_dist/img/avatar3.gif +0 -0
- package/ark_dist/img/loginbg.svg +1 -0
- package/ark_dist/img/logo-r.png +0 -0
- package/ark_dist/img/logo.png +0 -0
- package/ark_dist/img/no-widgets.svg +57 -0
- package/ark_dist/img/tasks-example.png +0 -0
- package/ark_dist/img/ver.svg +236 -0
- package/ark_dist/index.html +132 -0
- package/ark_dist/js/app.e014b7a5.js +1 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js +3 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js.LICENSE.txt +1 -0
- package/ark_dist/js/views/views-CreateGateway.7db295a9.js.map +1 -0
- package/ark_proxy/entry.js +30 -0
- package/ark_proxy_es/entry.js +18 -0
- package/package.json +156 -0
- package/scripts/check.js +13 -0
- package/scripts/meta.js +21 -0
- package/scripts/prepublishOnly.js +28 -0
- package/src/api/apidoc_api.js +35 -0
- package/src/api/authority.js +161 -0
- package/src/api/balanced_api.js +101 -0
- package/src/api/client_api.js +68 -0
- package/src/api/count_api.js +62 -0
- package/src/api/gateway-manage/client_api.js +68 -0
- package/src/api/gateway-manage/open_client.js +188 -0
- package/src/api/gateway_api.js +81 -0
- package/src/api/global_function.js +278 -0
- package/src/api/global_variable.js +35 -0
- package/src/api/groovyscript_api.js +130 -0
- package/src/api/ip_api.js +47 -0
- package/src/api/monitor_api.js +24 -0
- package/src/api/regserver_api.js +224 -0
- package/src/api/request.js +107 -0
- package/src/assets/font_1930435_u2cpsigmd9d.js +38 -0
- package/src/assets/font_ma6wg7gw3td/demo.css +539 -0
- package/src/assets/font_ma6wg7gw3td/demo_index.html +674 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.css +105 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.eot +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.js +1 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.json +163 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.svg +92 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.ttf +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.woff +0 -0
- package/src/assets/font_ma6wg7gw3td/iconfont.woff2 +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/particles.json +110 -0
- package/src/auto-imports.d.ts +307 -0
- package/src/component/BoxCard.vue +156 -0
- package/src/component/ClientInfo.vue +82 -0
- package/src/component/GroovyScriptTable.vue +74 -0
- package/src/component/PanThumb/index.vue +149 -0
- package/src/component/RouteAccessChart.vue +85 -0
- package/src/component/RouteInfo.vue +146 -0
- package/src/component/RouteRequestCount.vue +126 -0
- package/src/component/TextHoverEffect/Mallki.vue +120 -0
- package/src/configs/subApp.ts +9 -0
- package/src/entrance/libProperties.ts +30 -0
- package/src/entrance/libTypes.ts +27 -0
- package/src/main.ts +13 -0
- package/src/plugins/index.ts +11 -0
- package/src/router/constantRoutes.js +155 -0
- package/src/router/loadComponent.js +29 -0
- package/src/views/AddClientGateway.vue +253 -0
- package/src/views/AddGatewayClient.vue +360 -0
- package/src/views/AddGroovyScript.vue +337 -0
- package/src/views/ApiCount.vue +291 -0
- package/src/views/ApiDoc.vue +293 -0
- package/src/views/ApiMonitor.vue +292 -0
- package/src/views/ClientList.vue +217 -0
- package/src/views/CreateBalanced.vue +341 -0
- package/src/views/CreateClient.vue +171 -0
- package/src/views/CreateGateway.vue +836 -0
- package/src/views/GatewayList.vue +322 -0
- package/src/views/GatewayTopology.vue +245 -0
- package/src/views/IpList.vue +218 -0
- package/src/views/LoadBalanced.vue +389 -0
- package/src/views/Main.vue +98 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- <el-page-header @back="goBack" content="已注册客户端管理"></el-page-header> -->
|
|
4
|
+
<el-dialog title="添加客户端" v-model="dialogFormVisible" width="40%" :close-on-click-modal="false">
|
|
5
|
+
<el-table size="mini" :data="clientTableData" style="width: 100%">
|
|
6
|
+
<el-table-column label="客户端ID" width="280">
|
|
7
|
+
<template #default="{ row }">
|
|
8
|
+
<el-tag size="small" type="warning" style="font-weight: bold;">{{row.id}}</el-tag>
|
|
9
|
+
</template>
|
|
10
|
+
</el-table-column>
|
|
11
|
+
<el-table-column label="分组" width="120">
|
|
12
|
+
<template #default="{ row }">
|
|
13
|
+
<el-tag v-for="group in groupOptions" :key="group.value" v-show="(group.value === row.groupCode)" size="small" type="">{{group.label}}</el-tag>
|
|
14
|
+
</template>
|
|
15
|
+
</el-table-column>
|
|
16
|
+
<el-table-column label="名称" prop="name"></el-table-column>
|
|
17
|
+
<el-table-column label="IP地址" prop="ip"></el-table-column>
|
|
18
|
+
<el-table-column label="操作" width="60">
|
|
19
|
+
<template #default="{ row }">
|
|
20
|
+
<el-button circle icon="el-icon-plus" type="success" title="添加" @click="handleAddRegClient(row)"></el-button>
|
|
21
|
+
</template>
|
|
22
|
+
</el-table-column>
|
|
23
|
+
</el-table>
|
|
24
|
+
<div class="block" style="margin-top: 20px;">
|
|
25
|
+
<el-pagination
|
|
26
|
+
@size-change="handleSizeChange"
|
|
27
|
+
@current-change="handleCurrentChange"
|
|
28
|
+
:current-page="clientCurrentPage"
|
|
29
|
+
:page-sizes="[10, 30, 50]"
|
|
30
|
+
:page-size="clientPageSize"
|
|
31
|
+
layout="total, sizes, prev, pager, next, jumper"
|
|
32
|
+
:total="clientTotalNum">
|
|
33
|
+
</el-pagination>
|
|
34
|
+
</div>
|
|
35
|
+
<div slot="footer" class="dialog-footer">
|
|
36
|
+
<el-button @click="dialogFormVisible = false" size="small">关 闭</el-button>
|
|
37
|
+
</div>
|
|
38
|
+
</el-dialog>
|
|
39
|
+
|
|
40
|
+
<el-row :gutter="20" style="margin-top: 20px;">
|
|
41
|
+
<el-col>
|
|
42
|
+
<el-card class="box-card">
|
|
43
|
+
<div slot="header" class="clearfix">
|
|
44
|
+
<span>网关客户端</span>
|
|
45
|
+
<el-popover trigger="click" placement="bottom">
|
|
46
|
+
<div style="font-size: 10pt;">
|
|
47
|
+
<span>添加客户端说明:</span><br/>
|
|
48
|
+
<span>1. 开启路由服务IP过滤后,默认只有已注册到当前服务的客户端才有权限访问。</span><br/>
|
|
49
|
+
<span>2. 新添加的客户端,默认为禁止访问路由服务,请手动开启允许访问,才能生效。</span><br/>
|
|
50
|
+
<span>3. 点击<i></i>查看与创建客户端JWT通行令牌。</span>
|
|
51
|
+
</div>
|
|
52
|
+
<template #reference>
|
|
53
|
+
<el-button style="padding: 3px 0; " icon="el-icon-question" type="text" title="说明"></el-button>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
</el-popover>
|
|
57
|
+
<span style="margin-left: 50px;">
|
|
58
|
+
<i class="el-icon-connection"></i>
|
|
59
|
+
<span style="font-size: 11pt;">
|
|
60
|
+
<el-tag size="mini" style="font-weight: bold;">{{form.name}}</el-tag> -
|
|
61
|
+
<el-tag size="mini" type="warning" style="font-weight: bold;">{{form.id}}</el-tag> -
|
|
62
|
+
<el-tag size="mini" type="success" style="font-weight: bold;">{{form.uri}}</el-tag>
|
|
63
|
+
</span>
|
|
64
|
+
</span>
|
|
65
|
+
<div style="float: right; margin-left: 10px;">
|
|
66
|
+
<el-button icon="el-icon-circle-plus-outline" size="small" type="success" @click="search" title="查找客户端">添加客户端</el-button>
|
|
67
|
+
</div>
|
|
68
|
+
<div style="float: right; margin-left: 10px;">
|
|
69
|
+
<el-button icon="el-icon-s-claim" size="small" type="primary" @click="startAll" title="启用所有客户端通行">全部允许</el-button>
|
|
70
|
+
</div>
|
|
71
|
+
<div style="float: right; margin-left: 10px;">
|
|
72
|
+
<el-button icon="el-icon-circle-close" size="small" type="danger" @click="stopAll" title="禁用所有客户端通行">全部禁止</el-button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<el-table size="small" :data="tableData" style="width: 100%">
|
|
77
|
+
<el-table-column label="客户端ID(系统生成)" width="290">
|
|
78
|
+
<template #default="{ row }">
|
|
79
|
+
<el-tag size="small" type="warning" style="font-weight: bold;">{{row.id}}</el-tag>
|
|
80
|
+
</template>
|
|
81
|
+
</el-table-column>
|
|
82
|
+
<el-table-column label="分组">
|
|
83
|
+
<template #default="{ row }">
|
|
84
|
+
<el-tag v-for="group in groupOptions" :key="group.value" v-show="(group.value === row.groupCode)" size="small" type="">{{group.label}}</el-tag>
|
|
85
|
+
</template>
|
|
86
|
+
</el-table-column>
|
|
87
|
+
<el-table-column label="名称" prop="name"></el-table-column>
|
|
88
|
+
<el-table-column label="IP地址" prop="ip"></el-table-column>
|
|
89
|
+
<el-table-column label="TOKEN" >
|
|
90
|
+
<template #default="{ row }">
|
|
91
|
+
<el-tag v-if="row.token != undefined && row.token != ''" size="small" type="success" style="font-weight: bold;">JWT通行令牌</el-tag>
|
|
92
|
+
<el-tag v-if="row.token == undefined || row.token == ''" size="small" type="" style="font-weight: bold;">无通行令牌</el-tag>
|
|
93
|
+
<el-tag v-if="row.isTimeout == '1'" size="small" type="danger" style="font-weight: bold;">已过期</el-tag>
|
|
94
|
+
<el-tag v-if="row.token != undefined && row.token != '' && row.isTimeout != '1'" size="small" type="primary" style="font-weight: bold;">未过期</el-tag>
|
|
95
|
+
<el-popover trigger="click" placement="bottom" :v-model="true">
|
|
96
|
+
<div style="font-size: 10pt; width:500px;">
|
|
97
|
+
<div style="margin-bottom: 8px;">
|
|
98
|
+
<!-- <i class="iconfont icon-xiaoxitongzhi" style="font-size: 16pt; color: #90A0A5;"></i>-->
|
|
99
|
+
<span class="route-title">JWT通行令牌</span>
|
|
100
|
+
</div>
|
|
101
|
+
<div>
|
|
102
|
+
过期时间:<el-date-picker v-model="tokenEffectiveTime" type="datetime" placeholder="选择截止过期时间" style="width:300px;" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker><br/><br/>
|
|
103
|
+
加密密钥:<el-input placeholder="请输入加密密钥(最长200个字符,为空则默认取客户端ID)" v-model="secretKey" maxlength="200" style="width:430px;" clearable></el-input><br/><br/>
|
|
104
|
+
<el-input size="small" type="textarea" :rows="8" placeholder="JWT通行令牌内容" v-model="token" :disabled="tokenIsTrue"></el-input><br/><br/>
|
|
105
|
+
<div style="float: right; margin-left: 10px;">
|
|
106
|
+
<el-button icon="el-icon-delete" size="small" type="danger" @click="handleRemoveToken(row)">清空令牌</el-button>
|
|
107
|
+
<el-button icon="el-icon-refresh" size="small" type="primary" @click="handleCreateToken(row)">生成令牌</el-button>
|
|
108
|
+
<el-button icon="el-icon-document-copy" size="small" type="success" @click="handleCopyToken()">复制令牌</el-button>
|
|
109
|
+
<!-- <el-button icon="el-icon-circle-close" size="small" type="" @click="handleCloseToken(scope.$index)">关闭</el-button> -->
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<!-- icon="iconfont icon-xiaoxitongzhi"-->
|
|
114
|
+
<template #reference>
|
|
115
|
+
<el-button type="text" @click="queryRegClientTokenInfo(row, scope.$index)" title="点击查看JWT通行令牌"></el-button>
|
|
116
|
+
</template>
|
|
117
|
+
|
|
118
|
+
</el-popover>
|
|
119
|
+
</template>
|
|
120
|
+
</el-table-column>
|
|
121
|
+
<el-table-column label="TOKEN过期时间" prop="tokenEffectiveTime"></el-table-column>
|
|
122
|
+
<el-table-column label="状态" prop="status" :formatter="formatterStatus">
|
|
123
|
+
<template #default="{ row }">
|
|
124
|
+
<div v-if="row.regServerStatus==='0'"><i class="el-icon-success" style="color: #409EFF;"></i> <el-tag size="mini">{{'允许通行'}}</el-tag></div>
|
|
125
|
+
<div v-if="row.regServerStatus==='1'"><i class="el-icon-error" style="color: #f00000;"></i> <el-tag size="mini" type="danger">{{'禁止通行'}}</el-tag></div>
|
|
126
|
+
</template>
|
|
127
|
+
</el-table-column>
|
|
128
|
+
<el-table-column label="注册时间" prop="regServerTime"></el-table-column>
|
|
129
|
+
<el-table-column label="操作" width="60">
|
|
130
|
+
<template #default="{ row }">
|
|
131
|
+
<el-dropdown trigger="click" @command="handleCommandRegClient">
|
|
132
|
+
<el-button circle icon="el-icon-setting" title="设置" style="border: 0px;"></el-button>
|
|
133
|
+
<template #dropdown>
|
|
134
|
+
<el-dropdown-menu>
|
|
135
|
+
<el-dropdown-item :command="{command:'start', row: row}"><i class="el-icon-success" style="color: #409EFF;"></i>允许通行</el-dropdown-item>
|
|
136
|
+
<el-dropdown-item :command="{command:'stop', row: row}"><i class="el-icon-error" style="color: red;"></i>禁止通行</el-dropdown-item>
|
|
137
|
+
<el-dropdown-item :command="{command:'delete', row: row}" divided><i class="el-icon-delete"></i>移除</el-dropdown-item>
|
|
138
|
+
</el-dropdown-menu>
|
|
139
|
+
</template>
|
|
140
|
+
</el-dropdown>
|
|
141
|
+
</template>
|
|
142
|
+
</el-table-column>
|
|
143
|
+
</el-table>
|
|
144
|
+
<div class="block" style="margin-top: 20px;">
|
|
145
|
+
<el-pagination
|
|
146
|
+
@size-change="handleSizeChange"
|
|
147
|
+
@current-change="handleCurrentChange"
|
|
148
|
+
:current-page="currentPage"
|
|
149
|
+
:page-sizes="[10, 30, 50]"
|
|
150
|
+
:page-size="pageSize"
|
|
151
|
+
layout="total, sizes, prev, pager, next, jumper"
|
|
152
|
+
:total="totalNum"
|
|
153
|
+
></el-pagination>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
</el-card>
|
|
159
|
+
</el-col>
|
|
160
|
+
</el-row>
|
|
161
|
+
|
|
162
|
+
</div>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
165
|
+
<script>
|
|
166
|
+
import {addRegClient,regClientPageList,startRegClient,stopRegClient,deleteRegClient,startAllRegClient,stopAllRegClient,notRegClientPageList,createRegClientToken,removeRegClientToken} from '../api/regserver_api.js'
|
|
167
|
+
|
|
168
|
+
export default {
|
|
169
|
+
data() {
|
|
170
|
+
return {
|
|
171
|
+
dialogFormVisible: false,
|
|
172
|
+
secretKey:null,
|
|
173
|
+
token:null,
|
|
174
|
+
tokenEffectiveTime:null,
|
|
175
|
+
tokenIsTrue: true,
|
|
176
|
+
form:{},
|
|
177
|
+
tableData: [{
|
|
178
|
+
}],
|
|
179
|
+
currentPage: 1,
|
|
180
|
+
pageSize: 10,
|
|
181
|
+
totalNum: 0,
|
|
182
|
+
clientTableData: [{
|
|
183
|
+
}],
|
|
184
|
+
clientCurrentPage: 1,
|
|
185
|
+
clientPageSize: 10,
|
|
186
|
+
clientTotalNum:0,
|
|
187
|
+
groupOptions: this.GLOBAL_VAR.groups
|
|
188
|
+
};
|
|
189
|
+
},
|
|
190
|
+
created: function() {
|
|
191
|
+
//在组件创建完毕后加载
|
|
192
|
+
let query = this.$route.query;
|
|
193
|
+
if (query){
|
|
194
|
+
let route = query.route;
|
|
195
|
+
route = JSON.parse(route)
|
|
196
|
+
console.log('route', route);
|
|
197
|
+
this.init(route);
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
mounted: function() {
|
|
201
|
+
|
|
202
|
+
},
|
|
203
|
+
beforeDestroy: function() {
|
|
204
|
+
|
|
205
|
+
},
|
|
206
|
+
methods:{
|
|
207
|
+
init(route) {
|
|
208
|
+
this.form = route.form;
|
|
209
|
+
this.regClientList();
|
|
210
|
+
},
|
|
211
|
+
goBack() {
|
|
212
|
+
console.log('go back');
|
|
213
|
+
this.$router.push({path:'/gatewayList',query:{}});
|
|
214
|
+
},
|
|
215
|
+
handleSizeChange(val) {
|
|
216
|
+
this.pageSize = val;
|
|
217
|
+
},
|
|
218
|
+
handleCurrentChange(val) {
|
|
219
|
+
this.currentPage = val;
|
|
220
|
+
},
|
|
221
|
+
handleShowInfo(row, index){
|
|
222
|
+
this.infoForm = row;
|
|
223
|
+
},
|
|
224
|
+
formatterStatus(row, index){
|
|
225
|
+
return "允许通行"
|
|
226
|
+
},
|
|
227
|
+
handleCommandRegClient(obj){
|
|
228
|
+
console.log("command" , obj);
|
|
229
|
+
let _this = this;
|
|
230
|
+
if (obj.command === 'start'){
|
|
231
|
+
this.$confirm('确认允许当前客户端"'+obj.row.name+'"访问该注册服务?').then(_ => {
|
|
232
|
+
startRegClient({id:obj.row.regServerId}).then(function(result){
|
|
233
|
+
_this.GLOBAL_FUN.successMsg();
|
|
234
|
+
_this.regClientList();
|
|
235
|
+
});
|
|
236
|
+
}).catch(_ => {});
|
|
237
|
+
} else if (obj.command === 'stop'){
|
|
238
|
+
this.$confirm('确认禁止当前客户端"'+obj.row.name+'"访问该注册服务?').then(_ => {
|
|
239
|
+
stopRegClient({id:obj.row.regServerId}).then(function(result){
|
|
240
|
+
_this.GLOBAL_FUN.successMsg();
|
|
241
|
+
_this.regClientList();
|
|
242
|
+
});
|
|
243
|
+
}).catch(_ => {});
|
|
244
|
+
} else if (obj.command === 'delete'){
|
|
245
|
+
this.$confirm('确认删除客户端"'+obj.row.name+'"注册该服务?').then(_ => {
|
|
246
|
+
deleteRegClient({id:obj.row.regServerId}).then(function(result){
|
|
247
|
+
_this.GLOBAL_FUN.successMsg();
|
|
248
|
+
_this.regClientList();
|
|
249
|
+
})
|
|
250
|
+
}).catch(_ => {});
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
handleAddRegClient(row){
|
|
254
|
+
let _this = this;
|
|
255
|
+
addRegClient({clientId: row.id, routeId: this.form.id}).then(function(result){
|
|
256
|
+
_this.GLOBAL_FUN.successMsg();
|
|
257
|
+
_this.regClientList();
|
|
258
|
+
_this.clientList();
|
|
259
|
+
});
|
|
260
|
+
},
|
|
261
|
+
startAll(){
|
|
262
|
+
let _this = this;
|
|
263
|
+
this.$confirm('确认要允许当前服务下所有已注册的客户端访问?').then(_ => {
|
|
264
|
+
startAllRegClient({routeId: _this.form.id,}).then(function(result){
|
|
265
|
+
_this.GLOBAL_FUN.successMsg();
|
|
266
|
+
_this.regClientList();
|
|
267
|
+
});
|
|
268
|
+
}).catch(_ => {});
|
|
269
|
+
},
|
|
270
|
+
stopAll(){
|
|
271
|
+
let _this = this;
|
|
272
|
+
this.$confirm('确认要禁止当前服务下所有已注册客户端访问?').then(_ => {
|
|
273
|
+
stopAllRegClient({routeId: _this.form.id,}).then(function(result){
|
|
274
|
+
_this.GLOBAL_FUN.successMsg();
|
|
275
|
+
_this.regClientList();
|
|
276
|
+
});
|
|
277
|
+
}).catch(_ => {});
|
|
278
|
+
},
|
|
279
|
+
regClientList(){
|
|
280
|
+
let _this = this;
|
|
281
|
+
regClientPageList({routeId: this.form.id, currentPage: this.currentPage, pageSize: this.pageSize}).then(function(result){
|
|
282
|
+
if (result.data){
|
|
283
|
+
_this.tableData = result.data.records;
|
|
284
|
+
_this.totalNum = result.data.total;
|
|
285
|
+
}
|
|
286
|
+
})
|
|
287
|
+
},
|
|
288
|
+
clientList(){
|
|
289
|
+
let _this = this;
|
|
290
|
+
notRegClientPageList({routeId: this.form.id, currentPage: this.clientCurrentPage, pageSize: this.clientPageSize}).then(function(result){
|
|
291
|
+
console.log(result);
|
|
292
|
+
if (result.data && result.data.records){
|
|
293
|
+
_this.clientTableData = result.data.records;
|
|
294
|
+
_this.clientTotalNum = result.data.total;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
},
|
|
298
|
+
handleCreateToken(row){ //创建注册客户端Token
|
|
299
|
+
let _this = this;
|
|
300
|
+
console.log(this.tokenEffectiveTime);
|
|
301
|
+
if (this.tokenEffectiveTime == null || this.tokenEffectiveTime == undefined || this.tokenEffectiveTime == ''){
|
|
302
|
+
this.GLOBAL_FUN.errorMsg('JWT通行令牌过期时间不能为空');
|
|
303
|
+
return false;
|
|
304
|
+
}
|
|
305
|
+
createRegClientToken({regServerId: row.regServerId, secretKey:this.secretKey, tokenEffectiveTime: this.tokenEffectiveTime}).then(function(result){
|
|
306
|
+
if (result.data){
|
|
307
|
+
_this.token = result.data;
|
|
308
|
+
_this.GLOBAL_FUN.successMsg('创建成功');
|
|
309
|
+
_this.tableData.forEach((data, index)=>{
|
|
310
|
+
if (data.regServerId == row.regServerId){
|
|
311
|
+
data.secretKey = _this.secretKey;
|
|
312
|
+
data.tokenEffectiveTime = _this.tokenEffectiveTime;
|
|
313
|
+
data.token = _this.token;
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
},
|
|
319
|
+
handleRemoveToken(row){ //清除注册客户端Token
|
|
320
|
+
let _this = this;
|
|
321
|
+
removeRegClientToken({regServerId: row.regServerId}).then(function(result){
|
|
322
|
+
_this.token = null;
|
|
323
|
+
_this.secretKey = null;
|
|
324
|
+
_this.tokenEffectiveTime = null;
|
|
325
|
+
_this.GLOBAL_FUN.successMsg('清除成功');
|
|
326
|
+
_this.tableData.forEach((data, index)=>{
|
|
327
|
+
if (data.regServerId == row.regServerId){
|
|
328
|
+
data.secretKey = _this.secretKey;
|
|
329
|
+
data.tokenEffectiveTime = _this.tokenEffectiveTime;
|
|
330
|
+
data.token = _this.token;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
},
|
|
335
|
+
handleCopyToken(){//复制token
|
|
336
|
+
if (this.token == null || this.token == undefined || this.token == ''){
|
|
337
|
+
this.GLOBAL_FUN.errorMsg('JWT通行令牌内容不能为空');
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
this.GLOBAL_FUN.copy(this.token);
|
|
341
|
+
},
|
|
342
|
+
queryRegClientTokenInfo(row,index){//查看Token
|
|
343
|
+
this.token = row.token;
|
|
344
|
+
this.secretKey = row.secretKey;
|
|
345
|
+
this.tokenEffectiveTime = row.tokenEffectiveTime;
|
|
346
|
+
},
|
|
347
|
+
search(){
|
|
348
|
+
this.dialogFormVisible = true;
|
|
349
|
+
this.clientList();
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
</script>
|
|
354
|
+
|
|
355
|
+
<style>
|
|
356
|
+
.el-icon-setting:before {
|
|
357
|
+
content: "\E6CA";
|
|
358
|
+
font-size: 12pt;
|
|
359
|
+
}
|
|
360
|
+
</style>
|