mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
@@ -4,6 +4,7 @@ import com.gitee.fastmybatis.core.PageInfo;
|
|||||||
import com.gitee.fastmybatis.core.query.LambdaQuery;
|
import com.gitee.fastmybatis.core.query.LambdaQuery;
|
||||||
import com.gitee.sop.adminbackend.common.req.IdParam;
|
import com.gitee.sop.adminbackend.common.req.IdParam;
|
||||||
import com.gitee.sop.adminbackend.common.resp.Result;
|
import com.gitee.sop.adminbackend.common.resp.Result;
|
||||||
|
import com.gitee.sop.adminbackend.controller.isv.req.PermGroupPageParam;
|
||||||
import com.gitee.sop.adminbackend.controller.isv.req.PermGroupParam;
|
import com.gitee.sop.adminbackend.controller.isv.req.PermGroupParam;
|
||||||
import com.gitee.sop.adminbackend.dao.entity.PermGroup;
|
import com.gitee.sop.adminbackend.dao.entity.PermGroup;
|
||||||
import com.gitee.sop.adminbackend.service.isv.PermGroupService;
|
import com.gitee.sop.adminbackend.service.isv.PermGroupService;
|
||||||
@@ -35,8 +36,8 @@ public class PermGroupController {
|
|||||||
* @return 返回分页结果
|
* @return 返回分页结果
|
||||||
*/
|
*/
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
public Result<List<PermGroup>> listAll() {
|
public Result<List<PermGroup>> listAll(PermGroupParam param) {
|
||||||
List<PermGroup> list = permGroupService.listAll();
|
List<PermGroup> list = permGroupService.list(param.toQuery());
|
||||||
return Result.ok(list);
|
return Result.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ public class PermGroupController {
|
|||||||
* @return 返回分页结果
|
* @return 返回分页结果
|
||||||
*/
|
*/
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public Result<PageInfo<PermGroup>> page(PermGroupParam param) {
|
public Result<PageInfo<PermGroup>> page(PermGroupPageParam param) {
|
||||||
LambdaQuery<PermGroup> query = param.toLambdaQuery(PermGroup.class);
|
LambdaQuery<PermGroup> query = param.toLambdaQuery(PermGroup.class);
|
||||||
PageInfo<PermGroup> pageInfo = permGroupService.doPage(query);
|
PageInfo<PermGroup> pageInfo = permGroupService.doPage(query);
|
||||||
return Result.ok(pageInfo);
|
return Result.ok(pageInfo);
|
||||||
|
@@ -0,0 +1,56 @@
|
|||||||
|
package com.gitee.sop.adminbackend.controller.isv;
|
||||||
|
|
||||||
|
import com.gitee.fastmybatis.core.PageInfo;
|
||||||
|
import com.gitee.fastmybatis.core.query.LambdaQuery;
|
||||||
|
import com.gitee.fastmybatis.core.query.param.PageParam;
|
||||||
|
import com.gitee.sop.adminbackend.common.resp.Result;
|
||||||
|
import com.gitee.sop.adminbackend.controller.isv.req.PermGroupApiInfoParam;
|
||||||
|
import com.gitee.sop.adminbackend.controller.isv.req.PermGroupPermissionParam;
|
||||||
|
import com.gitee.sop.adminbackend.dao.entity.ApiInfo;
|
||||||
|
import com.gitee.sop.adminbackend.dao.entity.PermGroupPermission;
|
||||||
|
import com.gitee.sop.adminbackend.service.isv.PermGroupPermissionService;
|
||||||
|
import com.gitee.sop.adminbackend.service.isv.dto.PermGroupPermissionDTO;
|
||||||
|
import com.gitee.sop.adminbackend.util.CopyUtil;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 六如
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("perm/group/permission")
|
||||||
|
public class PermGroupPermissionController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PermGroupPermissionService permGroupPermissionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分组接口
|
||||||
|
*
|
||||||
|
* @param param param
|
||||||
|
* @return 返回分页结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public Result<List<ApiInfo>> page(@Validated PermGroupApiInfoParam param) {
|
||||||
|
LambdaQuery<ApiInfo> query = param.toLambdaQuery(ApiInfo.class);
|
||||||
|
List<ApiInfo> apiInfoList = permGroupPermissionService.listGroupApiId(param.getGroupId(), query);
|
||||||
|
return Result.ok(apiInfoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("setting")
|
||||||
|
public Result<Integer> setting(@RequestBody @Validated PermGroupPermissionParam param) {
|
||||||
|
PermGroupPermissionDTO permGroupPermissionDTO = CopyUtil.copyBean(param, PermGroupPermissionDTO::new);
|
||||||
|
int cnt = permGroupPermissionService.setting(permGroupPermissionDTO);
|
||||||
|
return Result.ok(cnt);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,25 @@
|
|||||||
|
package com.gitee.sop.adminbackend.controller.isv.req;
|
||||||
|
|
||||||
|
import com.gitee.fastmybatis.core.query.Operator;
|
||||||
|
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
||||||
|
import com.gitee.fastmybatis.core.query.param.IParam;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 六如
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PermGroupApiInfoParam implements IParam {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
@Condition(operator = Operator.like)
|
||||||
|
private String apiName;
|
||||||
|
|
||||||
|
@Condition
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,24 @@
|
|||||||
|
package com.gitee.sop.adminbackend.controller.isv.req;
|
||||||
|
|
||||||
|
import com.gitee.fastmybatis.core.query.Operator;
|
||||||
|
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
||||||
|
import com.gitee.fastmybatis.core.query.param.PageParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注:分组表
|
||||||
|
*
|
||||||
|
* @author 六如
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class PermGroupPageParam extends PageParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组描述
|
||||||
|
*/
|
||||||
|
@Condition(operator = Operator.like)
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
}
|
@@ -2,18 +2,14 @@ package com.gitee.sop.adminbackend.controller.isv.req;
|
|||||||
|
|
||||||
import com.gitee.fastmybatis.core.query.Operator;
|
import com.gitee.fastmybatis.core.query.Operator;
|
||||||
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
||||||
import com.gitee.fastmybatis.core.query.param.PageParam;
|
import com.gitee.fastmybatis.core.query.param.IParam;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注:分组表
|
|
||||||
*
|
|
||||||
* @author 六如
|
* @author 六如
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
@Data
|
||||||
public class PermGroupParam extends PageParam {
|
public class PermGroupParam implements IParam {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组描述
|
* 分组描述
|
||||||
|
@@ -0,0 +1,19 @@
|
|||||||
|
package com.gitee.sop.adminbackend.controller.isv.req;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 六如
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PermGroupPermissionParam {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
private List<Long> apiIdList;
|
||||||
|
|
||||||
|
}
|
@@ -5,7 +5,7 @@ import com.gitee.fastmybatis.core.query.Query;
|
|||||||
import com.gitee.sop.adminbackend.common.dto.StatusUpdateDTO;
|
import com.gitee.sop.adminbackend.common.dto.StatusUpdateDTO;
|
||||||
import com.gitee.sop.adminbackend.common.req.StatusUpdateParam;
|
import com.gitee.sop.adminbackend.common.req.StatusUpdateParam;
|
||||||
import com.gitee.sop.adminbackend.common.resp.Result;
|
import com.gitee.sop.adminbackend.common.resp.Result;
|
||||||
import com.gitee.sop.adminbackend.controller.serve.req.ApiInfoParam;
|
import com.gitee.sop.adminbackend.controller.serve.req.ApiInfoPageParam;
|
||||||
import com.gitee.sop.adminbackend.dao.entity.ApiInfo;
|
import com.gitee.sop.adminbackend.dao.entity.ApiInfo;
|
||||||
import com.gitee.sop.adminbackend.service.serve.ApiInfoService;
|
import com.gitee.sop.adminbackend.service.serve.ApiInfoService;
|
||||||
import com.gitee.sop.adminbackend.util.CopyUtil;
|
import com.gitee.sop.adminbackend.util.CopyUtil;
|
||||||
@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接口管理
|
* 接口管理
|
||||||
@@ -37,13 +39,27 @@ public class ApiInfoController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public Result<PageInfo<ApiInfo>> page(ApiInfoParam param) {
|
public Result<PageInfo<ApiInfo>> page(ApiInfoPageParam param) {
|
||||||
Query query = param.toQuery();
|
Query query = param.toQuery();
|
||||||
query.orderByDesc("id");
|
query.orderByDesc("id");
|
||||||
PageInfo<ApiInfo> pageInfo = apiInfoService.page(query);
|
PageInfo<ApiInfo> pageInfo = apiInfoService.page(query);
|
||||||
return Result.ok(pageInfo);
|
return Result.ok(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/listAll")
|
||||||
|
public Result<List<ApiInfo>> listAll(ApiInfoPageParam param) {
|
||||||
|
Query query = param.toQuery();
|
||||||
|
query.orderByDesc("id");
|
||||||
|
List<ApiInfo> list = apiInfoService.list(query);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增记录
|
* 新增记录
|
||||||
*
|
*
|
||||||
|
@@ -0,0 +1,22 @@
|
|||||||
|
package com.gitee.sop.adminbackend.controller.serve.req;
|
||||||
|
|
||||||
|
import com.gitee.fastmybatis.core.query.Operator;
|
||||||
|
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
||||||
|
import com.gitee.fastmybatis.core.query.param.PageParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 六如
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class ApiInfoPageParam extends PageParam {
|
||||||
|
|
||||||
|
@Condition(operator = Operator.like)
|
||||||
|
private String apiName;
|
||||||
|
|
||||||
|
@Condition
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
@@ -2,16 +2,13 @@ package com.gitee.sop.adminbackend.controller.serve.req;
|
|||||||
|
|
||||||
import com.gitee.fastmybatis.core.query.Operator;
|
import com.gitee.fastmybatis.core.query.Operator;
|
||||||
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
import com.gitee.fastmybatis.core.query.annotation.Condition;
|
||||||
import com.gitee.fastmybatis.core.query.param.PageParam;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 六如
|
* @author 六如
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@Data
|
@Data
|
||||||
public class ApiInfoParam extends PageParam {
|
public class ApiInfoParam {
|
||||||
|
|
||||||
@Condition(operator = Operator.like)
|
@Condition(operator = Operator.like)
|
||||||
private String apiName;
|
private String apiName;
|
||||||
|
@@ -32,7 +32,7 @@ public class PermGroupPermission {
|
|||||||
/**
|
/**
|
||||||
* api_info.id
|
* api_info.id
|
||||||
*/
|
*/
|
||||||
private String apiId;
|
private Long apiId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加时间
|
* 添加时间
|
||||||
|
@@ -3,9 +3,21 @@ package com.gitee.sop.adminbackend.service.isv;
|
|||||||
import com.gitee.fastmybatis.core.PageInfo;
|
import com.gitee.fastmybatis.core.PageInfo;
|
||||||
import com.gitee.fastmybatis.core.query.LambdaQuery;
|
import com.gitee.fastmybatis.core.query.LambdaQuery;
|
||||||
import com.gitee.fastmybatis.core.support.LambdaService;
|
import com.gitee.fastmybatis.core.support.LambdaService;
|
||||||
|
import com.gitee.sop.adminbackend.dao.entity.ApiInfo;
|
||||||
import com.gitee.sop.adminbackend.dao.entity.PermGroupPermission;
|
import com.gitee.sop.adminbackend.dao.entity.PermGroupPermission;
|
||||||
|
import com.gitee.sop.adminbackend.dao.mapper.ApiInfoMapper;
|
||||||
import com.gitee.sop.adminbackend.dao.mapper.PermGroupPermissionMapper;
|
import com.gitee.sop.adminbackend.dao.mapper.PermGroupPermissionMapper;
|
||||||
|
import com.gitee.sop.adminbackend.service.isv.dto.PermGroupPermissionDTO;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,8 +26,11 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class PermGroupPermissionService implements LambdaService<PermGroupPermission, PermGroupPermissionMapper> {
|
public class PermGroupPermissionService implements LambdaService<PermGroupPermission, PermGroupPermissionMapper> {
|
||||||
|
|
||||||
public PageInfo<PermGroupPermission> doPage(LambdaQuery<PermGroupPermission> query) {
|
@Resource
|
||||||
query.orderByDesc(PermGroupPermission::getId);
|
private ApiInfoMapper apiInfoMapper;
|
||||||
|
|
||||||
|
public PageInfo<PermGroupPermission> doPage(LambdaQuery<PermGroupPermission> query) {
|
||||||
|
query.orderByDesc(PermGroupPermission::getId);
|
||||||
PageInfo<PermGroupPermission> page = this.page(query);
|
PageInfo<PermGroupPermission> page = this.page(query);
|
||||||
|
|
||||||
// 格式转换
|
// 格式转换
|
||||||
@@ -25,5 +40,36 @@ public class PermGroupPermissionService implements LambdaService<PermGroupPermis
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ApiInfo> listGroupApiId(Long groupId, LambdaQuery<ApiInfo> query) {
|
||||||
|
List<Long> apiIds = this.query()
|
||||||
|
.eq(PermGroupPermission::getGroupId, groupId)
|
||||||
|
.listUniqueValue(PermGroupPermission::getApiId);
|
||||||
|
|
||||||
|
if (apiIds.isEmpty()) {
|
||||||
|
return new ArrayList<>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.in(ApiInfo::getId, apiIds);
|
||||||
|
|
||||||
|
return apiInfoMapper.list(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int setting(PermGroupPermissionDTO param) {
|
||||||
|
Long groupId = param.getGroupId();
|
||||||
|
this.deleteByColumn(PermGroupPermission::getGroupId, groupId);
|
||||||
|
|
||||||
|
List<Long> apiIdList = param.getApiIdList();
|
||||||
|
if (CollectionUtils.isEmpty(apiIdList)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
List<PermGroupPermission> saveList = apiIdList.stream()
|
||||||
|
.map(apiId -> {
|
||||||
|
PermGroupPermission permGroupPermission = new PermGroupPermission();
|
||||||
|
permGroupPermission.setGroupId(groupId);
|
||||||
|
permGroupPermission.setApiId(apiId);
|
||||||
|
return permGroupPermission;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return this.saveBatch(saveList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,19 @@
|
|||||||
|
package com.gitee.sop.adminbackend.service.isv.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 六如
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PermGroupPermissionDTO {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
private List<Long> apiIdList;
|
||||||
|
|
||||||
|
}
|
@@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
## 开发部署
|
## 开发部署
|
||||||
|
|
||||||
> 规定 node 版本应不小于 18.18.0
|
安装nodejs
|
||||||
|
|
||||||
|
> node版本 >= 18.18.0
|
||||||
|
|
||||||
- macOS用户在命令前面添加`sudo`
|
- macOS用户在命令前面添加`sudo`
|
||||||
|
|
||||||
|
38
sop-admin/sop-admin-frontend/src/api/permGroupPermission.ts
Normal file
38
sop-admin/sop-admin-frontend/src/api/permGroupPermission.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
import { createUrl, http } from "@/utils/http";
|
||||||
|
import type { Result } from "@/model";
|
||||||
|
|
||||||
|
// 后端请求接口
|
||||||
|
const apiUrl: any = createUrl({
|
||||||
|
listGroupApiId: "perm/group/permission/list",
|
||||||
|
setting: "perm/group/permission/setting"
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口管理
|
||||||
|
*/
|
||||||
|
export const api: any = {
|
||||||
|
/**
|
||||||
|
* 查询分组权限
|
||||||
|
*
|
||||||
|
* @param groupId groupId
|
||||||
|
*/
|
||||||
|
listGroupApiId(groupId: number): Promise<Result<any>> {
|
||||||
|
const params = {
|
||||||
|
groupId: groupId
|
||||||
|
};
|
||||||
|
return http.get<Result<any>, any>(apiUrl.listGroupApiId, { params });
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 设置接口权限
|
||||||
|
*
|
||||||
|
* @param groupId groupId
|
||||||
|
* @param apiIdList apiIdList
|
||||||
|
*/
|
||||||
|
setting(groupId, apiIdList) {
|
||||||
|
const data = {
|
||||||
|
groupId: groupId,
|
||||||
|
apiIdList: apiIdList
|
||||||
|
};
|
||||||
|
return http.post<Result<any>, any>(apiUrl.setting, { data });
|
||||||
|
}
|
||||||
|
};
|
@@ -4,6 +4,7 @@ import type { PageResult, Result } from "@/model";
|
|||||||
// 后端请求接口
|
// 后端请求接口
|
||||||
const apiUrl: any = createUrl({
|
const apiUrl: any = createUrl({
|
||||||
page: "/serve/api/page",
|
page: "/serve/api/page",
|
||||||
|
listAll: "/serve/api/listAll",
|
||||||
add: "/serve/api/add",
|
add: "/serve/api/add",
|
||||||
update: "/serve/api/update",
|
update: "/serve/api/update",
|
||||||
del: "/serve/api/delete",
|
del: "/serve/api/delete",
|
||||||
@@ -21,6 +22,13 @@ export const api: any = {
|
|||||||
page(params: object): Promise<PageResult> {
|
page(params: object): Promise<PageResult> {
|
||||||
return http.get<PageResult, any>(apiUrl.page, { params });
|
return http.get<PageResult, any>(apiUrl.page, { params });
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
* @param params
|
||||||
|
*/
|
||||||
|
listAll(params: object): Promise<PageResult> {
|
||||||
|
return http.get<Result<any>, any>(apiUrl.listAll, { params });
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
* @param data 表单内容
|
* @param data 表单内容
|
||||||
|
@@ -1,14 +1,61 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { type PlusColumn } from "plus-pro-components";
|
import { type PlusColumn, useTable } from "plus-pro-components";
|
||||||
import { withInstall } from "@pureadmin/utils";
|
import { withInstall } from "@pureadmin/utils";
|
||||||
import apiSelect from "./index.vue";
|
import apiSelect from "./index.vue";
|
||||||
import { StatusEnum } from "@/model/enums";
|
import { StatusEnum } from "@/model/enums";
|
||||||
|
import { api as serveApi } from "@/api/serveApi";
|
||||||
|
|
||||||
export const dlgApiSelectShow = ref(false);
|
export const dlgApiSelectShow = ref(false);
|
||||||
export const dlgWidth = ref(1100);
|
export const dlgWidth = ref(1100);
|
||||||
|
export const handleSaveApi = ref((_: Array<number>) => {});
|
||||||
|
|
||||||
|
// ========= search form =========
|
||||||
|
|
||||||
|
// 查询表单对象
|
||||||
|
export const searchFormData = ref({
|
||||||
|
apiName: "",
|
||||||
|
status: "",
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 999999
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询表单字段定义
|
||||||
|
export const searchFormColumns: PlusColumn[] = [
|
||||||
|
{
|
||||||
|
label: "接口名称",
|
||||||
|
prop: "apiName"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "状态",
|
||||||
|
prop: "status",
|
||||||
|
width: 80,
|
||||||
|
valueType: "select",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "启用",
|
||||||
|
value: StatusEnum.ENABLE,
|
||||||
|
color: "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "禁用",
|
||||||
|
value: StatusEnum.DISABLE,
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
// ========= table =========
|
// ========= table =========
|
||||||
|
|
||||||
|
// 表格对象
|
||||||
|
export const { tableData } = useTable<any[]>();
|
||||||
|
|
||||||
|
interface TableRow {
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
const multipleSelection = ref<TableRow[]>([]);
|
||||||
|
export const selectable = (row: any) => row.status === StatusEnum.ENABLE;
|
||||||
// 表格字段定义
|
// 表格字段定义
|
||||||
export const tableColumns: PlusColumn[] = [
|
export const tableColumns: PlusColumn[] = [
|
||||||
{
|
{
|
||||||
@@ -75,10 +122,56 @@ export const tableColumns: PlusColumn[] = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export const handleConfirm = () => {
|
export const handleAuthApi = apiList => {
|
||||||
console.log(1);
|
dlgApiSelectShow.value = true;
|
||||||
|
const arr = [];
|
||||||
|
for (let apiId of apiList) {
|
||||||
|
for (let row of tableData.value) {
|
||||||
|
if (apiId === row.id) {
|
||||||
|
arr.push(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
multipleSelection.value = arr;
|
||||||
|
console.log(arr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const handleConfirm = () => {
|
||||||
|
const idList = multipleSelection.value.map(row => row.id);
|
||||||
|
handleSaveApi.value(idList);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const handleClose = () => {
|
||||||
|
dlgApiSelectShow.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const handleSelectionChange = (rows: TableRow[]) => {
|
||||||
|
console.log(rows);
|
||||||
|
multipleSelection.value = rows;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 点击查询按钮
|
||||||
|
export const handleSearch = () => {
|
||||||
|
search();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export const search = async () => {
|
||||||
|
try {
|
||||||
|
const { data } = await doSearch();
|
||||||
|
tableData.value = data;
|
||||||
|
} catch (error) {}
|
||||||
|
};
|
||||||
|
// 请求接口
|
||||||
|
const doSearch = async () => {
|
||||||
|
// 查询参数
|
||||||
|
const data = searchFormData.value;
|
||||||
|
return serveApi.listAll(data);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 页面加载
|
||||||
|
search();
|
||||||
|
|
||||||
const ApiSelect = withInstall(apiSelect);
|
const ApiSelect = withInstall(apiSelect);
|
||||||
|
|
||||||
export { ApiSelect };
|
export { ApiSelect };
|
||||||
|
@@ -3,17 +3,14 @@ import {
|
|||||||
handleConfirm,
|
handleConfirm,
|
||||||
dlgApiSelectShow,
|
dlgApiSelectShow,
|
||||||
tableColumns,
|
tableColumns,
|
||||||
dlgWidth
|
dlgWidth,
|
||||||
} from "@/components/ApiSelect/index";
|
selectable,
|
||||||
import {
|
handleSelectionChange,
|
||||||
handlePaginationChange,
|
|
||||||
handleSearch,
|
handleSearch,
|
||||||
pageInfo,
|
|
||||||
searchFormColumns,
|
searchFormColumns,
|
||||||
searchFormData,
|
searchFormData,
|
||||||
total,
|
|
||||||
tableData
|
tableData
|
||||||
} from "@/views/serve/api/index";
|
} from "@/components/ApiSelect/index";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -39,14 +36,12 @@ import {
|
|||||||
<PlusTable
|
<PlusTable
|
||||||
:columns="tableColumns"
|
:columns="tableColumns"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
:pagination="{
|
:is-selection="true"
|
||||||
total,
|
:selectionTableColumnProps="{
|
||||||
modelValue: pageInfo,
|
selectable: selectable
|
||||||
pageSizeList: [10, 20, 50, 100],
|
|
||||||
align: 'right'
|
|
||||||
}"
|
}"
|
||||||
adaptive
|
adaptive
|
||||||
@paginationChange="handlePaginationChange"
|
@selection-change="handleSelectionChange"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
</PlusDialog>
|
</PlusDialog>
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import {
|
import {
|
||||||
type ButtonsCallBackParams,
|
type ButtonsCallBackParams,
|
||||||
type PageInfo,
|
|
||||||
type PlusColumn,
|
type PlusColumn,
|
||||||
useTable
|
useTable
|
||||||
} from "plus-pro-components";
|
} from "plus-pro-components";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { api } from "@/api/permGroup";
|
import { api } from "@/api/permGroup";
|
||||||
import { dlgApiSelectShow } from "@/components/ApiSelect";
|
import { api as permApi } from "@/api/permGroupPermission";
|
||||||
import { search as searchApi } from "@/views/serve/api";
|
import { handleSaveApi, handleClose } from "@/components/ApiSelect";
|
||||||
|
import { searchTable } from "@/views/isv/perm/permGroupApi";
|
||||||
|
|
||||||
const isAdd = ref(false);
|
const isAdd = ref(false);
|
||||||
|
|
||||||
@@ -16,9 +16,7 @@ const isAdd = ref(false);
|
|||||||
|
|
||||||
// 查询表单对象
|
// 查询表单对象
|
||||||
export const searchFormData = ref({
|
export const searchFormData = ref({
|
||||||
groupName: "",
|
groupName: ""
|
||||||
pageIndex: 1,
|
|
||||||
pageSize: 10
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 查询表单字段定义
|
// 查询表单字段定义
|
||||||
@@ -31,46 +29,31 @@ export const searchFormColumns: PlusColumn[] = [
|
|||||||
|
|
||||||
// ========= table =========
|
// ========= table =========
|
||||||
|
|
||||||
|
handleSaveApi.value = apiIdList => {
|
||||||
|
const groupId = selectedGroupId.value;
|
||||||
|
if (groupId > 0) {
|
||||||
|
permApi.setting(groupId, apiIdList).then(() => {
|
||||||
|
ElMessage.success("保存成功");
|
||||||
|
handleClose();
|
||||||
|
search();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 表格对象
|
// 表格对象
|
||||||
export const {
|
export const { tableData, buttons: actionButtons } = useTable<any[]>();
|
||||||
tableData,
|
|
||||||
total,
|
export const selectedGroupId = ref(0);
|
||||||
pageInfo,
|
|
||||||
buttons: actionButtons
|
|
||||||
} = useTable<any[]>();
|
|
||||||
// 默认每页条数,默认10
|
|
||||||
pageInfo.value.pageSize = 10;
|
|
||||||
|
|
||||||
// 表格字段定义
|
// 表格字段定义
|
||||||
export const tableColumns: PlusColumn[] = [
|
export const tableColumns: PlusColumn[] = [
|
||||||
{
|
{
|
||||||
label: "分组名称",
|
label: "分组名称",
|
||||||
prop: "groupName"
|
prop: "groupName"
|
||||||
},
|
|
||||||
{
|
|
||||||
width: 160,
|
|
||||||
label: "添加时间",
|
|
||||||
prop: "addTime"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
width: 160,
|
|
||||||
label: "修改时间",
|
|
||||||
prop: "updateTime"
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
// 表格按钮定义
|
// 表格按钮定义
|
||||||
actionButtons.value = [
|
actionButtons.value = [
|
||||||
{
|
|
||||||
text: "接口授权",
|
|
||||||
code: "edit",
|
|
||||||
props: {
|
|
||||||
type: "warning"
|
|
||||||
},
|
|
||||||
onClick() {
|
|
||||||
dlgApiSelectShow.value = true;
|
|
||||||
searchApi();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
// 修改
|
// 修改
|
||||||
text: "修改",
|
text: "修改",
|
||||||
@@ -78,7 +61,14 @@ actionButtons.value = [
|
|||||||
props: {
|
props: {
|
||||||
type: "primary"
|
type: "primary"
|
||||||
},
|
},
|
||||||
|
// onClick: withModifiers((params: ButtonsCallBackParams) => {
|
||||||
|
// isAdd.value = false;
|
||||||
|
// editFormData.value = Object.assign({}, params.row);
|
||||||
|
// dlgTitle.value = "修改";
|
||||||
|
// dlgShow.value = true;
|
||||||
|
// }, ['stop', 'self']),
|
||||||
onClick(params: ButtonsCallBackParams) {
|
onClick(params: ButtonsCallBackParams) {
|
||||||
|
params.e.stopPropagation();
|
||||||
isAdd.value = false;
|
isAdd.value = false;
|
||||||
editFormData.value = Object.assign({}, params.row);
|
editFormData.value = Object.assign({}, params.row);
|
||||||
dlgTitle.value = "修改";
|
dlgTitle.value = "修改";
|
||||||
@@ -96,6 +86,7 @@ actionButtons.value = [
|
|||||||
options: { draggable: false }
|
options: { draggable: false }
|
||||||
},
|
},
|
||||||
onConfirm(params: ButtonsCallBackParams) {
|
onConfirm(params: ButtonsCallBackParams) {
|
||||||
|
params.e.stopPropagation();
|
||||||
api.del(params.row).then(() => {
|
api.del(params.row).then(() => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: "删除成功",
|
message: "删除成功",
|
||||||
@@ -135,6 +126,13 @@ export const editFormColumns: PlusColumn[] = [
|
|||||||
|
|
||||||
// ========= event =========
|
// ========= event =========
|
||||||
|
|
||||||
|
// 点击行
|
||||||
|
export const handleRowClick = row => {
|
||||||
|
const groupId = row.id;
|
||||||
|
selectedGroupId.value = groupId;
|
||||||
|
searchTable(groupId);
|
||||||
|
};
|
||||||
|
|
||||||
// 添加按钮事件
|
// 添加按钮事件
|
||||||
export const handleAdd = () => {
|
export const handleAdd = () => {
|
||||||
isAdd.value = true;
|
isAdd.value = true;
|
||||||
@@ -156,13 +154,6 @@ export const handleSave = () => {
|
|||||||
|
|
||||||
// 点击查询按钮
|
// 点击查询按钮
|
||||||
export const handleSearch = () => {
|
export const handleSearch = () => {
|
||||||
pageInfo.value.page = 1;
|
|
||||||
search();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 分页事件
|
|
||||||
export const handlePaginationChange = (_pageInfo: PageInfo): void => {
|
|
||||||
pageInfo.value = _pageInfo;
|
|
||||||
search();
|
search();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,19 +161,14 @@ export const handlePaginationChange = (_pageInfo: PageInfo): void => {
|
|||||||
const search = async () => {
|
const search = async () => {
|
||||||
try {
|
try {
|
||||||
const { data } = await doSearch();
|
const { data } = await doSearch();
|
||||||
tableData.value = data.list;
|
tableData.value = data;
|
||||||
total.value = data.total;
|
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
};
|
};
|
||||||
// 请求接口
|
// 请求接口
|
||||||
const doSearch = async () => {
|
const doSearch = async () => {
|
||||||
// 查询参数
|
// 查询参数
|
||||||
const data = searchFormData.value;
|
const data = searchFormData.value;
|
||||||
// 添加分页参数
|
return api.listAll(data);
|
||||||
data.pageIndex = pageInfo.value.page;
|
|
||||||
data.pageSize = pageInfo.value.pageSize;
|
|
||||||
|
|
||||||
return api.page(data);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 页面加载
|
// 页面加载
|
||||||
|
@@ -7,60 +7,66 @@ import {
|
|||||||
editFormData,
|
editFormData,
|
||||||
editFormRules,
|
editFormRules,
|
||||||
handleAdd,
|
handleAdd,
|
||||||
handlePaginationChange,
|
handleRowClick,
|
||||||
handleSave,
|
handleSave,
|
||||||
handleSearch,
|
handleSearch,
|
||||||
pageInfo,
|
|
||||||
searchFormColumns,
|
searchFormColumns,
|
||||||
searchFormData,
|
searchFormData,
|
||||||
|
selectedGroupId,
|
||||||
tableColumns,
|
tableColumns,
|
||||||
tableData,
|
tableData
|
||||||
total
|
|
||||||
} from "./permGroup";
|
} from "./permGroup";
|
||||||
import { ApiSelect } from "@/components/ApiSelect/index";
|
import PermGroupApi from "./permGroupApi.vue";
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<el-container>
|
||||||
<PlusSearch
|
<el-aside width="300px">
|
||||||
v-model="searchFormData"
|
<template #header>
|
||||||
:columns="searchFormColumns"
|
<PlusSearch
|
||||||
:show-number="2"
|
v-model="searchFormData"
|
||||||
label-position="right"
|
:columns="searchFormColumns"
|
||||||
:has-reset="false"
|
:show-number="2"
|
||||||
@search="handleSearch"
|
label-position="right"
|
||||||
/>
|
:has-reset="false"
|
||||||
</template>
|
@search="handleSearch"
|
||||||
<PlusTable
|
/>
|
||||||
:columns="tableColumns"
|
</template>
|
||||||
:table-data="tableData"
|
<PlusTable
|
||||||
:action-bar="{ buttons: actionButtons, width: 200 }"
|
:columns="tableColumns"
|
||||||
:pagination="{
|
:table-data="tableData"
|
||||||
total,
|
:action-bar="{ buttons: actionButtons, width: 100 }"
|
||||||
modelValue: pageInfo,
|
adaptive
|
||||||
pageSizeList: [10, 20, 50, 100],
|
@row-click="handleRowClick"
|
||||||
align: 'right'
|
>
|
||||||
}"
|
<template #title>
|
||||||
adaptive
|
<el-button type="primary" @click="handleAdd">新增</el-button>
|
||||||
@paginationChange="handlePaginationChange"
|
</template>
|
||||||
>
|
</PlusTable>
|
||||||
<template #title>
|
<PlusDialogForm
|
||||||
<el-button type="primary" @click="handleAdd">新增</el-button>
|
v-model:visible="dlgShow"
|
||||||
</template>
|
v-model="editFormData"
|
||||||
</PlusTable>
|
:dialog="{ title: dlgTitle }"
|
||||||
<PlusDialogForm
|
:form="{
|
||||||
v-model:visible="dlgShow"
|
columns: editFormColumns,
|
||||||
v-model="editFormData"
|
rules: editFormRules,
|
||||||
:dialog="{ title: dlgTitle }"
|
labelWidth: '100px',
|
||||||
:form="{
|
labelPosition: 'right'
|
||||||
columns: editFormColumns,
|
}"
|
||||||
rules: editFormRules,
|
:hasErrorTip="false"
|
||||||
labelWidth: '100px',
|
@confirm="handleSave"
|
||||||
labelPosition: 'right'
|
/>
|
||||||
}"
|
</el-aside>
|
||||||
:hasErrorTip="false"
|
<el-main>
|
||||||
@confirm="handleSave"
|
<el-card v-show="selectedGroupId > 0" shadow="never">
|
||||||
/>
|
<template #header>
|
||||||
<ApiSelect />
|
<div class="card-header">
|
||||||
|
<span>组权限</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<PermGroupApi />
|
||||||
|
</el-card>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
140
sop-admin/sop-admin-frontend/src/views/isv/perm/permGroupApi.ts
Normal file
140
sop-admin/sop-admin-frontend/src/views/isv/perm/permGroupApi.ts
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
import { ref } from "vue";
|
||||||
|
import { type PlusColumn, useTable } from "plus-pro-components";
|
||||||
|
import { withInstall } from "@pureadmin/utils";
|
||||||
|
import permGroupApi from "./permGroupApi.vue";
|
||||||
|
import { StatusEnum } from "@/model/enums";
|
||||||
|
import { api as serveApi } from "@/api/serveApi";
|
||||||
|
|
||||||
|
// ========= search form =========
|
||||||
|
|
||||||
|
// 查询表单对象
|
||||||
|
export const searchFormData = ref({
|
||||||
|
groupId: 0,
|
||||||
|
apiName: "",
|
||||||
|
status: ""
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询表单字段定义
|
||||||
|
export const searchFormColumns: PlusColumn[] = [
|
||||||
|
{
|
||||||
|
label: "接口名称",
|
||||||
|
prop: "apiName"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "状态",
|
||||||
|
prop: "status",
|
||||||
|
width: 80,
|
||||||
|
valueType: "select",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "启用",
|
||||||
|
value: StatusEnum.ENABLE,
|
||||||
|
color: "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "禁用",
|
||||||
|
value: StatusEnum.DISABLE,
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// ========= table =========
|
||||||
|
|
||||||
|
// 表格对象
|
||||||
|
export const { tableData } = useTable<any[]>();
|
||||||
|
|
||||||
|
// 表格字段定义
|
||||||
|
export const tableColumns: PlusColumn[] = [
|
||||||
|
{
|
||||||
|
label: "所属应用",
|
||||||
|
prop: "application",
|
||||||
|
tableColumnProps: {
|
||||||
|
showOverflowTooltip: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "接口名称",
|
||||||
|
prop: "apiName",
|
||||||
|
tableColumnProps: {
|
||||||
|
showOverflowTooltip: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "版本号",
|
||||||
|
prop: "apiVersion",
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "接口描述",
|
||||||
|
prop: "description",
|
||||||
|
tableColumnProps: {
|
||||||
|
showOverflowTooltip: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "注册来源",
|
||||||
|
prop: "regSource",
|
||||||
|
width: 100,
|
||||||
|
valueType: "select",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "系统",
|
||||||
|
value: 1,
|
||||||
|
color: "blue"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "手动",
|
||||||
|
value: 2,
|
||||||
|
color: "green"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "状态",
|
||||||
|
prop: "status",
|
||||||
|
width: 80,
|
||||||
|
valueType: "select",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "启用",
|
||||||
|
value: StatusEnum.ENABLE,
|
||||||
|
color: "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "禁用",
|
||||||
|
value: StatusEnum.DISABLE,
|
||||||
|
color: "red"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const searchTable = groupId => {
|
||||||
|
searchFormData.value.groupId = groupId;
|
||||||
|
search();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 点击查询按钮
|
||||||
|
export const handleSearch = () => {
|
||||||
|
search();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export const search = async () => {
|
||||||
|
try {
|
||||||
|
const { data } = await doSearch();
|
||||||
|
tableData.value = data;
|
||||||
|
} catch (error) {}
|
||||||
|
};
|
||||||
|
// 请求接口
|
||||||
|
const doSearch = async () => {
|
||||||
|
// 查询参数
|
||||||
|
const data = searchFormData.value;
|
||||||
|
return serveApi.listAll(data);
|
||||||
|
};
|
||||||
|
|
||||||
|
const PermGroupApi = withInstall(permGroupApi);
|
||||||
|
|
||||||
|
export { PermGroupApi };
|
@@ -0,0 +1,27 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import {
|
||||||
|
tableColumns,
|
||||||
|
handleSearch,
|
||||||
|
searchFormColumns,
|
||||||
|
searchFormData,
|
||||||
|
tableData
|
||||||
|
} from "./permGroupApi";
|
||||||
|
import { ApiSelect } from "@/components/ApiSelect/index";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-card shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<PlusSearch
|
||||||
|
v-model="searchFormData"
|
||||||
|
:columns="searchFormColumns"
|
||||||
|
:show-number="2"
|
||||||
|
label-position="right"
|
||||||
|
:has-reset="false"
|
||||||
|
@search="handleSearch"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<PlusTable :columns="tableColumns" :table-data="tableData" adaptive />
|
||||||
|
<ApiSelect />
|
||||||
|
</el-card>
|
||||||
|
</template>
|
Reference in New Issue
Block a user