mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
表格显示优化
This commit is contained in:
@@ -126,7 +126,8 @@ lib.importJs('../../assets/js/routerole.js')
|
|||||||
, headers: {access_token: ApiUtil.getAccessToken()}
|
, headers: {access_token: ApiUtil.getAccessToken()}
|
||||||
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
, cols: [[
|
, cols: [[
|
||||||
{field: 'routeId', title: 'id(接口名+版本号)', width: 200}
|
{field: 'name', title: '接口名', width: 200}
|
||||||
|
, {field: 'version', title: '版本号', width: 80}
|
||||||
, {
|
, {
|
||||||
field: 'type', title: '限流策略', width: 80, templet: function (row) {
|
field: 'type', title: '限流策略', width: 80, templet: function (row) {
|
||||||
return LIMIT_TYPE[row.type + ''];
|
return LIMIT_TYPE[row.type + ''];
|
||||||
|
@@ -108,7 +108,8 @@ lib.importJs('../../assets/js/routerole.js')
|
|||||||
, headers: {access_token: ApiUtil.getAccessToken()}
|
, headers: {access_token: ApiUtil.getAccessToken()}
|
||||||
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
, cols: [[
|
, cols: [[
|
||||||
{field: 'id', title: 'id(接口名+版本号)'}
|
{field: 'name', title: '接口名', width: 200}
|
||||||
|
, {field: 'version', title: '版本号', width: 80}
|
||||||
, {field: 'uri', title: 'uri', width: 200}
|
, {field: 'uri', title: 'uri', width: 200}
|
||||||
, {field: 'path', title: 'path'}
|
, {field: 'path', title: 'path'}
|
||||||
, {field: 'roles', title: '访问权限', width: 100, templet: function (row) {
|
, {field: 'roles', title: '访问权限', width: 100, templet: function (row) {
|
||||||
|
@@ -58,6 +58,7 @@ public class LimitApi {
|
|||||||
.map(gatewayRouteDefinition -> {
|
.map(gatewayRouteDefinition -> {
|
||||||
String routeId = gatewayRouteDefinition.getId();
|
String routeId = gatewayRouteDefinition.getId();
|
||||||
LimitVO vo = new LimitVO();
|
LimitVO vo = new LimitVO();
|
||||||
|
CopyUtil.copyPropertiesIgnoreNull(gatewayRouteDefinition, vo);
|
||||||
ConfigRouteLimit configRouteLimit = routeLimitMap.getOrDefault(routeId, getDefaultLimit());
|
ConfigRouteLimit configRouteLimit = routeLimitMap.getOrDefault(routeId, getDefaultLimit());
|
||||||
CopyUtil.copyPropertiesIgnoreNull(configRouteLimit, vo);
|
CopyUtil.copyPropertiesIgnoreNull(configRouteLimit, vo);
|
||||||
vo.setRouteId(routeId);
|
vo.setRouteId(routeId);
|
||||||
|
@@ -16,6 +16,18 @@ public class LimitVO {
|
|||||||
@ApiDocField(description = "路由id")
|
@ApiDocField(description = "路由id")
|
||||||
private String routeId;
|
private String routeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口名
|
||||||
|
*/
|
||||||
|
@ApiDocField(description = "接口名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
@ApiDocField(description = "版本号")
|
||||||
|
private String version;
|
||||||
|
|
||||||
@ApiDocField(description = "serviceId")
|
@ApiDocField(description = "serviceId")
|
||||||
private String serviceId;
|
private String serviceId;
|
||||||
|
|
||||||
|
@@ -17,6 +17,16 @@ public class GatewayRouteDefinition {
|
|||||||
@ApiDocField(description = "路由id")
|
@ApiDocField(description = "路由id")
|
||||||
private String id = "";
|
private String id = "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
private String version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由断言集合配置
|
* 路由断言集合配置
|
||||||
*/
|
*/
|
||||||
|
@@ -11,10 +11,20 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class GatewayRouteDefinition {
|
public class GatewayRouteDefinition {
|
||||||
/**
|
/**
|
||||||
* 路由的Id
|
* 路由的Id(接口名+版本号),确保此id全局唯一
|
||||||
*/
|
*/
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
private String version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路由断言集合配置
|
* 路由断言集合配置
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user