Compare commits
4 Commits
ac1512088f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6495150a80 | |||
| 9d4e3081b9 | |||
| 06b7a095ad | |||
| 9e723b3d8a |
122
doc/模版.md
122
doc/模版.md
@@ -279,7 +279,9 @@ moduleTemplate(module) ::= <<
|
|||||||
$module:{op |
|
$module:{op |
|
||||||
<insert tableName="ms_fun_module">
|
<insert tableName="ms_fun_module">
|
||||||
<column name="id" value="$op.id$"/>
|
<column name="id" value="$op.id$"/>
|
||||||
<column name="module_name" value="$op.moduleCode$"/>
|
<column name="module_code" value="$op.moduleCode$"/>
|
||||||
|
<column name="module_name" value="$op.moduleName$"/>
|
||||||
|
<column name="remark" value="$op.describe$"/>
|
||||||
</insert>
|
</insert>
|
||||||
}$
|
}$
|
||||||
</changeSet>
|
</changeSet>
|
||||||
@@ -301,9 +303,10 @@ itemTemplate(item) ::= <<
|
|||||||
<insert tableName="ms_fun_item">
|
<insert tableName="ms_fun_item">
|
||||||
<column name="id" value="$op.id$"/>
|
<column name="id" value="$op.id$"/>
|
||||||
<column name="module_id" value="$op.moduleId$"/>
|
<column name="module_id" value="$op.moduleId$"/>
|
||||||
|
<column name="item_code" value="$op.itemCode$"/>
|
||||||
<column name="item_name" value="$op.itemName$"/>
|
<column name="item_name" value="$op.itemName$"/>
|
||||||
<column name="is_tenant" value="$op.isTenant$"/>
|
<column name="is_tenant" value="$op.isTenant$"/>
|
||||||
<column name="describe" value="$op.describe$"/>
|
<column name="remark" value="$op.describe$"/>
|
||||||
</insert>
|
</insert>
|
||||||
}$
|
}$
|
||||||
</changeSet>
|
</changeSet>
|
||||||
@@ -353,7 +356,7 @@ operationTemplate(operation) ::= <<
|
|||||||
<column name="usable_config" value="$op.usableConfigJson$"/>
|
<column name="usable_config" value="$op.usableConfigJson$"/>
|
||||||
<column name="field_config" value="$op.fieldConfigJson$"/>
|
<column name="field_config" value="$op.fieldConfigJson$"/>
|
||||||
<column name="sort_order" value="$op.sortOrder$"/>
|
<column name="sort_order" value="$op.sortOrder$"/>
|
||||||
<column name="describe" value="$op.describe$"/>
|
<column name="remark" value="$op.describe$"/>
|
||||||
</insert>
|
</insert>
|
||||||
}$
|
}$
|
||||||
</changeSet>
|
</changeSet>
|
||||||
@@ -362,3 +365,116 @@ operationTemplate(operation) ::= <<
|
|||||||
>>
|
>>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 角色套餐
|
||||||
|
|
||||||
|
初始化数据
|
||||||
|
|
||||||
|
```xml
|
||||||
|
group dbXml;
|
||||||
|
|
||||||
|
roleBindFunTemplate(operations,clientTypeCode,clientTypeDesc) ::= <<
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd">
|
||||||
|
|
||||||
|
<changeSet id="insert-ms-user-role-fun-data" author="xinghe">
|
||||||
|
<comment>初始化平台角色权限数据($clientTypeDesc$)</comment>
|
||||||
|
$operations:{op |
|
||||||
|
<!-- $op.funName$ -->
|
||||||
|
<insert tableName="ms_user_role_fun">
|
||||||
|
<column name="id" value="$op.id$$clientTypeCode$100"/>
|
||||||
|
<column name="role_id" value="100"/>
|
||||||
|
<column name="fun_id" value="$op.id$"/>
|
||||||
|
<column name="client_type" value="$clientTypeCode$"/>
|
||||||
|
<column name="data_scope" value="0"/>
|
||||||
|
<column name="assign_data_scope" value="[]"/>
|
||||||
|
<column name="exclude_field" value="[]"/>
|
||||||
|
<column name="update_by_id" value="10086"/>
|
||||||
|
<column name="update_time" value="2025-01-01 00:00:00"/>
|
||||||
|
</insert>
|
||||||
|
}$
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
|
>>
|
||||||
|
|
||||||
|
|
||||||
|
mealBindFunTemplate(meals,clientTypeCode,clientTypeDesc) ::= <<
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd">
|
||||||
|
|
||||||
|
<changeSet id="insert-ms-tenant-meal-bind-fun-data" author="xinghe">
|
||||||
|
<comment>初始化模块数据($clientTypeDesc$)</comment>
|
||||||
|
$meals:{op |
|
||||||
|
<!-- $op.funName$ -->
|
||||||
|
<insert tableName="ms_tenant_meal_bind_fun">
|
||||||
|
<column name="id" value="$op.id$$clientTypeCode$200"/>
|
||||||
|
<column name="meal_id" value="200"/>
|
||||||
|
<column name="fun_id" value="$op.id$"/>
|
||||||
|
<column name="client_type" value="$clientTypeCode$"/>
|
||||||
|
</insert>
|
||||||
|
}$
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
|
>>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 菜单数据
|
||||||
|
|
||||||
|
菜单数据生成
|
||||||
|
|
||||||
|
```xml
|
||||||
|
menuTypeAnnotations ::= [
|
||||||
|
"MENU_ID": "0",
|
||||||
|
"BUTTON_ID": "1"
|
||||||
|
]
|
||||||
|
clientTypeAnnotations ::= [
|
||||||
|
"PC": "0",
|
||||||
|
"MINI_PROGRAM": "1",
|
||||||
|
"H5": "2"
|
||||||
|
]
|
||||||
|
menuTemplate(menus) ::= <<
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.24.xsd">
|
||||||
|
|
||||||
|
<changeSet id="insert-ms-menu-data" author="xinghe">
|
||||||
|
<comment>初始化菜单数据</comment>
|
||||||
|
$menus:{op |
|
||||||
|
<insert tableName="ms_menu">
|
||||||
|
<column name="id" value="$op.id$"/>
|
||||||
|
<column name="parent_id" value="$op.parentId$"/>
|
||||||
|
<column name="fun_id" value="$if(op.funId)$$op.funId$$else$null$endif$"/>
|
||||||
|
<column name="menu_name" value="$op.menuName$"/>
|
||||||
|
<column name="menu_type" value="$menuTypeAnnotations.(op.menuType)$"/>
|
||||||
|
<column name="client_type" value="$clientTypeAnnotations.(op.clientType)$"/>
|
||||||
|
<column name="route_path" value="$op.path$"/>
|
||||||
|
<column name="page_path" value="$op.pagePath$"/>
|
||||||
|
<column name="icon" value="$op.icon$"/>
|
||||||
|
<column name="is_tenant" value="$op.isTenant$"/>
|
||||||
|
<column name="is_hide" value="$op.isHide$"/>
|
||||||
|
<column name="sort_order" value="$op.sortOrder$"/>
|
||||||
|
</insert>
|
||||||
|
}$
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
|
>>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
40
pom.xml
40
pom.xml
@@ -75,18 +75,7 @@
|
|||||||
<artifactId>fastjson2</artifactId>
|
<artifactId>fastjson2</artifactId>
|
||||||
<version>${fastjson2.version}</version>
|
<version>${fastjson2.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- knife4j -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
|
||||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
|
||||||
<version>${knife4j.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springdoc</groupId>
|
|
||||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springdoc</groupId>
|
<groupId>org.springdoc</groupId>
|
||||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||||
@@ -150,4 +139,31 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>dev</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<dependencies>
|
||||||
|
<!-- knife4j -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||||
|
<version>${knife4j.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springdoc</groupId>
|
||||||
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>prod</id>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
@@ -16,7 +16,8 @@ public enum CodeGenType {
|
|||||||
|
|
||||||
CONTROLLER(0, "controller"),
|
CONTROLLER(0, "controller"),
|
||||||
MODULE_DATA_INFO(1, "module_data_info"),
|
MODULE_DATA_INFO(1, "module_data_info"),
|
||||||
role_permission(2,"role_permission");
|
ROLE_PERMISSION(2,"role_permission"),
|
||||||
|
MENU_DATA_INFO(3, "menu_data_info");
|
||||||
|
|
||||||
private final int code;
|
private final int code;
|
||||||
private final String desc;
|
private final String desc;
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ public enum TemplateTypeEnum {
|
|||||||
RESPONSE_PARAM(2, "响应参数"),
|
RESPONSE_PARAM(2, "响应参数"),
|
||||||
SERVICE(3, "服务接口"),
|
SERVICE(3, "服务接口"),
|
||||||
SERVICE_IMPL(4, "服务实现"),
|
SERVICE_IMPL(4, "服务实现"),
|
||||||
MODULE_DATA_INFO(5, "模块功能操作数据生成");
|
MODULE_DATA_INFO(5, "模块功能操作数据生成"),
|
||||||
|
ROLE_DATA_INFO(6, "角色套餐权限数据生成"),
|
||||||
|
MENU_DATA_INFO(7, "菜单数据生成");
|
||||||
|
|
||||||
private final int code;
|
private final int code;
|
||||||
private final String desc;
|
private final String desc;
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ public class MenuAddReq implements Serializable {
|
|||||||
@Schema(description = "路由路径")
|
@Schema(description = "路由路径")
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
|
@Schema(description = "页面路径")
|
||||||
|
private String pagePath;
|
||||||
|
|
||||||
@Schema(description = "菜单图标")
|
@Schema(description = "菜单图标")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.cczsa.xinghe.codegen.entity.enums.ClientTypeEnum;
|
|||||||
import com.cczsa.xinghe.codegen.entity.enums.MenuTypeEnum;
|
import com.cczsa.xinghe.codegen.entity.enums.MenuTypeEnum;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Pattern;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
@@ -37,9 +38,16 @@ public class MenuEditReq implements Serializable {
|
|||||||
@Schema(description = "父菜单ID")
|
@Schema(description = "父菜单ID")
|
||||||
private Long parentId = 0L;
|
private Long parentId = 0L;
|
||||||
|
|
||||||
|
@Pattern(
|
||||||
|
regexp = "^(?:$|/(?:[a-zA-Z0-9_=?#&-]+/)*[a-zA-Z0-9_=?#&-]+)$",
|
||||||
|
message = "路由路径格式不正确:必须以'/'开头,不能以'/'结尾,且只能包含字母、数字、下划线、横杠、等号、问号、井号、与号,以及分隔斜杠(不能连续)"
|
||||||
|
)
|
||||||
@Schema(description = "路由路径")
|
@Schema(description = "路由路径")
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
|
@Schema(description = "页面路径")
|
||||||
|
private String pagePath;
|
||||||
|
|
||||||
@Schema(description = "菜单图标")
|
@Schema(description = "菜单图标")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.cczsa.xinghe.codegen.service.flow.template;
|
||||||
|
|
||||||
|
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
||||||
|
import com.cczsa.xinghe.codegen.entity.enums.TemplateTypeEnum;
|
||||||
|
import com.cczsa.xinghe.codegen.mapper.MenuMapper;
|
||||||
|
import com.cczsa.xinghe.codegen.service.TemplateService;
|
||||||
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.stringtemplate.v4.ST;
|
||||||
|
import org.stringtemplate.v4.STGroup;
|
||||||
|
import org.stringtemplate.v4.STGroupString;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xia
|
||||||
|
* @date 2026/1/23
|
||||||
|
* @version 0.0.1
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@LiteflowComponent(id = "menuDataInfo", name = "菜单数据生成")
|
||||||
|
public class MenuDataInfo extends NodeComponent {
|
||||||
|
|
||||||
|
private final TemplateService templateService;
|
||||||
|
private final MenuMapper menuMapper;
|
||||||
|
|
||||||
|
// 压缩流
|
||||||
|
private ZipOutputStream zos;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process() throws Exception {
|
||||||
|
// 获取 模版
|
||||||
|
String template = templateService.getTemplateTypeContent(TemplateTypeEnum.MENU_DATA_INFO);
|
||||||
|
if (template == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 流
|
||||||
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||||
|
zos = new ZipOutputStream(outputStream);
|
||||||
|
|
||||||
|
// 平台角色
|
||||||
|
STGroup group = new STGroupString("dbXml",template, '$', '$');
|
||||||
|
// 平台角色 功能权限
|
||||||
|
ST menuTemplate = group.getInstanceOf("menuTemplate"); // 使用正确的模板名称
|
||||||
|
List<MenuEntity> menuEntities = menuMapper.selectAll();
|
||||||
|
menuEntities.sort(Comparator.comparing(MenuEntity::getId));
|
||||||
|
menuTemplate.add("menus",menuEntities);
|
||||||
|
writeCodeToZip(menuTemplate);
|
||||||
|
|
||||||
|
// 确保 ZIP 流结束
|
||||||
|
zos.finish();
|
||||||
|
// 返回数据
|
||||||
|
this.getSlot().setResponseData(outputStream.toByteArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void writeCodeToZip(ST st) throws IOException {
|
||||||
|
// 生成代码
|
||||||
|
String result = st.render();
|
||||||
|
ZipEntry entry = new ZipEntry("insert-menus-data.xml");
|
||||||
|
zos.putNextEntry(entry);
|
||||||
|
zos.write(result.getBytes(StandardCharsets.UTF_8));
|
||||||
|
zos.closeEntry();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.cczsa.xinghe.codegen.service.flow.template;
|
||||||
|
|
||||||
|
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
||||||
|
import com.cczsa.xinghe.codegen.entity.enums.ClientTypeEnum;
|
||||||
|
import com.cczsa.xinghe.codegen.entity.enums.TemplateTypeEnum;
|
||||||
|
import com.cczsa.xinghe.codegen.mapper.FunOperationMapper;
|
||||||
|
import com.cczsa.xinghe.codegen.mapper.def.FunItemDef;
|
||||||
|
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
||||||
|
import com.cczsa.xinghe.codegen.service.TemplateService;
|
||||||
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
|
import com.yomahub.liteflow.annotation.LiteflowComponent;
|
||||||
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.stringtemplate.v4.ST;
|
||||||
|
import org.stringtemplate.v4.STGroup;
|
||||||
|
import org.stringtemplate.v4.STGroupString;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色 套餐权限相关数据生成
|
||||||
|
* @author xia
|
||||||
|
* @date 2026/1/23
|
||||||
|
* @version 0.0.1
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@LiteflowComponent(id = "roleDataInfo", name = "角色 套餐权限相关数据生成")
|
||||||
|
public class RoleDataInfo extends NodeComponent {
|
||||||
|
|
||||||
|
private final FunOperationMapper funOperationMapper;
|
||||||
|
private final TemplateService templateService;
|
||||||
|
|
||||||
|
// 压缩流
|
||||||
|
private ZipOutputStream zos;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void process() throws Exception {
|
||||||
|
// 获取 模版
|
||||||
|
String template = templateService.getTemplateTypeContent(TemplateTypeEnum.ROLE_DATA_INFO);
|
||||||
|
if (template == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 流
|
||||||
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||||
|
zos = new ZipOutputStream(outputStream);
|
||||||
|
|
||||||
|
|
||||||
|
// 平台角色
|
||||||
|
STGroup group = new STGroupString("dbXml",template, '$', '$');
|
||||||
|
|
||||||
|
|
||||||
|
// 功能数据生成
|
||||||
|
FunOperationDef funOperationDef = FunOperationDef.FUN_OPERATION_ENTITY.as("o");
|
||||||
|
FunItemDef funItemDef = FunItemDef.FUN_ITEM_ENTITY.as("i");
|
||||||
|
QueryWrapper wrapper = QueryWrapper.create()
|
||||||
|
.select(funOperationDef.ALL_COLUMNS)
|
||||||
|
.from(funItemDef)
|
||||||
|
.leftJoin(funOperationDef).on(funOperationDef.ITEM_ID.eq(funItemDef.ID))
|
||||||
|
.where(funItemDef.IS_TENANT.eq(false))
|
||||||
|
.and(funOperationDef.IS_GREEN_LIGHT.eq(false));
|
||||||
|
List<FunOperationEntity> funOperationEntities = funOperationMapper.selectListByQuery(wrapper);
|
||||||
|
|
||||||
|
funOperationEntities.sort(Comparator.comparing(FunOperationEntity::getId));
|
||||||
|
// 循环 ClientTypeEnum
|
||||||
|
for (ClientTypeEnum clientTypeEnum : ClientTypeEnum.values()) {
|
||||||
|
// 平台角色 功能权限
|
||||||
|
ST roleBindFunTemplate = group.getInstanceOf("roleBindFunTemplate"); // 使用正确的模板名称
|
||||||
|
roleBindFunTemplate.add("operations",funOperationEntities);
|
||||||
|
roleBindFunTemplate.add("clientTypeCode",clientTypeEnum.getCode());
|
||||||
|
roleBindFunTemplate.add("clientTypeDesc",clientTypeEnum.getDesc());
|
||||||
|
writeCodeToZip(roleBindFunTemplate,"roleBindFun-"+clientTypeEnum.getDesc());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QueryWrapper wrapper2 = QueryWrapper.create()
|
||||||
|
.select(funOperationDef.ALL_COLUMNS)
|
||||||
|
.from(funItemDef)
|
||||||
|
.leftJoin(funOperationDef).on(funOperationDef.ITEM_ID.eq(funItemDef.ID))
|
||||||
|
.where(funItemDef.IS_TENANT.eq(true))
|
||||||
|
.and(funOperationDef.IS_GREEN_LIGHT.eq(false));
|
||||||
|
List<FunOperationEntity> mealsFun = funOperationMapper.selectListByQuery(wrapper2);
|
||||||
|
mealsFun.sort(Comparator.comparing(FunOperationEntity::getId));
|
||||||
|
// 功能数据生成
|
||||||
|
for (ClientTypeEnum clientTypeEnum : ClientTypeEnum.values()) {
|
||||||
|
// 平台套餐 功能权限
|
||||||
|
ST mealBindFunTemplate = group.getInstanceOf("mealBindFunTemplate"); // 使用正确的模板名称
|
||||||
|
mealBindFunTemplate.add("meals",mealsFun);
|
||||||
|
mealBindFunTemplate.add("clientTypeCode",clientTypeEnum.getCode());
|
||||||
|
mealBindFunTemplate.add("clientTypeDesc",clientTypeEnum.getDesc());
|
||||||
|
writeCodeToZip(mealBindFunTemplate,"mealBindFun-"+clientTypeEnum.getDesc());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 确保 ZIP 流结束
|
||||||
|
zos.finish();
|
||||||
|
// 返回数据
|
||||||
|
this.getSlot().setResponseData(outputStream.toByteArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void writeCodeToZip(ST st,String fileName) throws IOException {
|
||||||
|
// 生成代码
|
||||||
|
String result = st.render();
|
||||||
|
// insert-ms-fun-operation-data.xml
|
||||||
|
ZipEntry entry = new ZipEntry("insert-"+ fileName +"-data.xml");
|
||||||
|
zos.putNextEntry(entry);
|
||||||
|
zos.write(result.getBytes(StandardCharsets.UTF_8));
|
||||||
|
zos.closeEntry();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cczsa.xinghe.codegen.service.impl;
|
package com.cczsa.xinghe.codegen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cczsa.xinghe.codegen.constant.CodegenConstant;
|
import com.cczsa.xinghe.codegen.constant.CodegenConstant;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
||||||
@@ -15,7 +16,6 @@ import com.cczsa.xinghe.codegen.mapper.def.FunItemDef;
|
|||||||
import com.cczsa.xinghe.codegen.mapper.def.FunModuleDef;
|
import com.cczsa.xinghe.codegen.mapper.def.FunModuleDef;
|
||||||
import com.cczsa.xinghe.codegen.service.FunItemService;
|
import com.cczsa.xinghe.codegen.service.FunItemService;
|
||||||
import com.cczsa.xinghe.codegen.util.XResult;
|
import com.cczsa.xinghe.codegen.util.XResult;
|
||||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import com.mybatisflex.core.util.ObjectUtil;
|
import com.mybatisflex.core.util.ObjectUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cczsa.xinghe.codegen.service.impl;
|
package com.cczsa.xinghe.codegen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cczsa.xinghe.codegen.constant.CodegenConstant;
|
import com.cczsa.xinghe.codegen.constant.CodegenConstant;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
||||||
@@ -18,7 +19,6 @@ import com.cczsa.xinghe.codegen.mapper.def.FunModuleDef;
|
|||||||
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
||||||
import com.cczsa.xinghe.codegen.service.FunModuleService;
|
import com.cczsa.xinghe.codegen.service.FunModuleService;
|
||||||
import com.cczsa.xinghe.codegen.util.XResult;
|
import com.cczsa.xinghe.codegen.util.XResult;
|
||||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cczsa.xinghe.codegen.service.impl;
|
package com.cczsa.xinghe.codegen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
||||||
@@ -16,7 +17,6 @@ import com.cczsa.xinghe.codegen.mapper.def.FunModuleDef;
|
|||||||
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
||||||
import com.cczsa.xinghe.codegen.service.FunOperationService;
|
import com.cczsa.xinghe.codegen.service.FunOperationService;
|
||||||
import com.cczsa.xinghe.codegen.util.XResult;
|
import com.cczsa.xinghe.codegen.util.XResult;
|
||||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import com.mybatisflex.core.util.CollectionUtil;
|
import com.mybatisflex.core.util.CollectionUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cczsa.xinghe.codegen.service.impl;
|
package com.cczsa.xinghe.codegen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
||||||
@@ -11,11 +12,12 @@ import com.cczsa.xinghe.codegen.entity.res.menu.MenuQueryRes;
|
|||||||
import com.cczsa.xinghe.codegen.mapper.FunItemMapper;
|
import com.cczsa.xinghe.codegen.mapper.FunItemMapper;
|
||||||
import com.cczsa.xinghe.codegen.mapper.FunOperationMapper;
|
import com.cczsa.xinghe.codegen.mapper.FunOperationMapper;
|
||||||
import com.cczsa.xinghe.codegen.mapper.MenuMapper;
|
import com.cczsa.xinghe.codegen.mapper.MenuMapper;
|
||||||
|
import com.cczsa.xinghe.codegen.mapper.RoleFunMapper;
|
||||||
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
import com.cczsa.xinghe.codegen.mapper.def.FunOperationDef;
|
||||||
import com.cczsa.xinghe.codegen.mapper.def.MenuDef;
|
import com.cczsa.xinghe.codegen.mapper.def.MenuDef;
|
||||||
|
import com.cczsa.xinghe.codegen.mapper.def.RoleFunDef;
|
||||||
import com.cczsa.xinghe.codegen.service.MenuService;
|
import com.cczsa.xinghe.codegen.service.MenuService;
|
||||||
import com.cczsa.xinghe.codegen.util.XResult;
|
import com.cczsa.xinghe.codegen.util.XResult;
|
||||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -40,6 +42,7 @@ public class MenuServiceImpl implements MenuService {
|
|||||||
private final MenuMapper menuMapper;
|
private final MenuMapper menuMapper;
|
||||||
private final FunOperationMapper funOperationMapper;
|
private final FunOperationMapper funOperationMapper;
|
||||||
private final FunItemMapper funItemMapper;
|
private final FunItemMapper funItemMapper;
|
||||||
|
private final RoleFunMapper roleFunMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -146,6 +149,7 @@ public class MenuServiceImpl implements MenuService {
|
|||||||
query.select(menuDef.ID)
|
query.select(menuDef.ID)
|
||||||
.from(menuDef)
|
.from(menuDef)
|
||||||
.eq(MenuEntity::getParentId, req.getParentId())
|
.eq(MenuEntity::getParentId, req.getParentId())
|
||||||
|
.eq(MenuEntity::getClientType, req.getClientType())
|
||||||
.eq(MenuEntity::getMenuName, req.getMenuName());
|
.eq(MenuEntity::getMenuName, req.getMenuName());
|
||||||
long count = menuMapper.selectCountByQuery(query);
|
long count = menuMapper.selectCountByQuery(query);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
@@ -198,9 +202,20 @@ public class MenuServiceImpl implements MenuService {
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return XResult.failed("请先删除子菜单");
|
return XResult.failed("请先删除子菜单");
|
||||||
}
|
}
|
||||||
QueryWrapper deleteMenu = new QueryWrapper();
|
// 获取菜单
|
||||||
deleteMenu.eq(MenuEntity::getId, id);
|
MenuEntity menuEntity = menuMapper.selectOneById(id);
|
||||||
menuMapper.deleteByQuery(deleteMenu);
|
// 删除配置的角色
|
||||||
|
if (menuEntity != null && menuEntity.getFunId() != null){
|
||||||
|
// 删除角色的权限
|
||||||
|
RoleFunDef roleFunDef = RoleFunDef.ROLE_FUN_ENTITY;
|
||||||
|
QueryWrapper deleteRoleFun = new QueryWrapper();
|
||||||
|
deleteRoleFun.from(roleFunDef);
|
||||||
|
deleteRoleFun.where(roleFunDef.CLIENT_TYPE.eq(menuEntity.getClientType()));
|
||||||
|
deleteRoleFun.and(roleFunDef.FUN_ID.eq(menuEntity.getFunId()));
|
||||||
|
roleFunMapper.deleteByQuery(deleteRoleFun);
|
||||||
|
}
|
||||||
|
// 删除菜单
|
||||||
|
menuMapper.deleteById(id);
|
||||||
return XResult.ok();
|
return XResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,9 +226,7 @@ public class MenuServiceImpl implements MenuService {
|
|||||||
@Override
|
@Override
|
||||||
public XResult<Void> bindFun(MenuBindFunReq req) {
|
public XResult<Void> bindFun(MenuBindFunReq req) {
|
||||||
// 获取菜单
|
// 获取菜单
|
||||||
QueryWrapper queryMenu = new QueryWrapper();
|
MenuEntity menuEntity = menuMapper.selectOneById(req.getMenuId());
|
||||||
queryMenu.eq(MenuEntity::getId, req.getMenuId());
|
|
||||||
MenuEntity menuEntity = menuMapper.selectOneByQuery(queryMenu);
|
|
||||||
if (menuEntity == null) {
|
if (menuEntity == null) {
|
||||||
return XResult.failed("菜单不存在");
|
return XResult.failed("菜单不存在");
|
||||||
}
|
}
|
||||||
@@ -237,23 +250,47 @@ public class MenuServiceImpl implements MenuService {
|
|||||||
}
|
}
|
||||||
menuEntity.setFunId(req.getFunId());
|
menuEntity.setFunId(req.getFunId());
|
||||||
menuMapper.update(menuEntity);
|
menuMapper.update(menuEntity);
|
||||||
|
|
||||||
|
// 删除配置的角色操作权限
|
||||||
|
RoleFunDef roleFunDef = RoleFunDef.ROLE_FUN_ENTITY;
|
||||||
|
QueryWrapper wrapper = new QueryWrapper();
|
||||||
|
wrapper.from(roleFunDef);
|
||||||
|
wrapper.where(roleFunDef.CLIENT_TYPE.eq(menuEntity.getClientType()));
|
||||||
|
wrapper.and(roleFunDef.FUN_ID.eq(req.getFunId()));
|
||||||
|
|
||||||
return XResult.ok();
|
return XResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除菜单权限
|
* 删除菜单权限
|
||||||
*/
|
*/
|
||||||
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public XResult<Void> deleteFun(Long menuId) {
|
public XResult<Void> deleteFun(Long menuId) {
|
||||||
// 获取菜单
|
// 获取菜单
|
||||||
QueryWrapper queryMenu = new QueryWrapper();
|
QueryWrapper queryMenu = new QueryWrapper();
|
||||||
queryMenu.eq(MenuEntity::getId, menuId);
|
queryMenu.eq(MenuEntity::getId, menuId);
|
||||||
MenuEntity menuEntity = menuMapper.selectOneByQuery(queryMenu);
|
MenuEntity menuEntity = menuMapper.selectOneByQuery(queryMenu);
|
||||||
|
|
||||||
if (menuEntity == null) {
|
if (menuEntity == null) {
|
||||||
return XResult.failed("菜单不存在");
|
return XResult.failed("菜单不存在");
|
||||||
}
|
}
|
||||||
|
Long funId = menuEntity.getFunId();
|
||||||
|
if (funId == null) {
|
||||||
|
return XResult.failed("菜单未绑定权限");
|
||||||
|
}
|
||||||
|
|
||||||
menuEntity.setFunId(null);
|
menuEntity.setFunId(null);
|
||||||
menuMapper.update(menuEntity, false);
|
menuMapper.update(menuEntity, false);
|
||||||
|
|
||||||
|
// 删除配置的 角色绑定操作权限
|
||||||
|
RoleFunDef roleFunDef = RoleFunDef.ROLE_FUN_ENTITY;
|
||||||
|
QueryWrapper wrapper = new QueryWrapper();
|
||||||
|
wrapper.from(roleFunDef);
|
||||||
|
wrapper.where(roleFunDef.CLIENT_TYPE.eq(menuEntity.getClientType()));
|
||||||
|
wrapper.and(roleFunDef.FUN_ID.eq(funId));
|
||||||
|
|
||||||
|
roleFunMapper.deleteByQuery(wrapper);
|
||||||
return XResult.ok();
|
return XResult.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cczsa.xinghe.codegen.service.impl;
|
package com.cczsa.xinghe.codegen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.RoleEntity;
|
import com.cczsa.xinghe.codegen.entity.RoleEntity;
|
||||||
@@ -23,7 +24,6 @@ import com.cczsa.xinghe.codegen.mapper.def.RoleDef;
|
|||||||
import com.cczsa.xinghe.codegen.mapper.def.RoleFunDef;
|
import com.cczsa.xinghe.codegen.mapper.def.RoleFunDef;
|
||||||
import com.cczsa.xinghe.codegen.service.RoleService;
|
import com.cczsa.xinghe.codegen.service.RoleService;
|
||||||
import com.cczsa.xinghe.codegen.util.XResult;
|
import com.cczsa.xinghe.codegen.util.XResult;
|
||||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cczsa.xinghe.codegen.service.impl;
|
package com.cczsa.xinghe.codegen.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.cczsa.xinghe.codegen.entity.TemplateEntity;
|
import com.cczsa.xinghe.codegen.entity.TemplateEntity;
|
||||||
import com.cczsa.xinghe.codegen.entity.enums.TemplateTypeEnum;
|
import com.cczsa.xinghe.codegen.entity.enums.TemplateTypeEnum;
|
||||||
import com.cczsa.xinghe.codegen.entity.req.template.TemplateAddReq;
|
import com.cczsa.xinghe.codegen.entity.req.template.TemplateAddReq;
|
||||||
@@ -10,7 +11,6 @@ import com.cczsa.xinghe.codegen.mapper.TemplateMapper;
|
|||||||
import com.cczsa.xinghe.codegen.mapper.def.TemplateDef;
|
import com.cczsa.xinghe.codegen.mapper.def.TemplateDef;
|
||||||
import com.cczsa.xinghe.codegen.service.TemplateService;
|
import com.cczsa.xinghe.codegen.service.TemplateService;
|
||||||
import com.cczsa.xinghe.codegen.util.XResult;
|
import com.cczsa.xinghe.codegen.util.XResult;
|
||||||
import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
spring:
|
spring:
|
||||||
# 使用不同模块的数据库配置
|
# 使用不同模块的数据库配置
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: pro
|
||||||
@@ -10,4 +10,15 @@
|
|||||||
THEN(moduleDataInfo);
|
THEN(moduleDataInfo);
|
||||||
</chain>
|
</chain>
|
||||||
|
|
||||||
|
<!-- 主流程:角色 套餐权限 -->
|
||||||
|
<chain name="role_permission">
|
||||||
|
THEN(roleDataInfo);
|
||||||
|
</chain>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 主流程:角色 套餐权限 -->
|
||||||
|
<chain name="menu_data_info">
|
||||||
|
THEN(menuDataInfo);
|
||||||
|
</chain>
|
||||||
|
|
||||||
</flow>
|
</flow>
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/app-loading.css" />
|
<link rel="stylesheet" href="/app-loading.css" />
|
||||||
<title>功能管理</title>
|
<title>功能管理</title>
|
||||||
<script type="module" crossorigin src="/static/index-65b53bc7.js"></script>
|
<script type="module" crossorigin src="/static/index-e2eede5f.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/static/vue-5ea6dbbd.js">
|
<link rel="modulepreload" crossorigin href="/static/vue-5ea6dbbd.js">
|
||||||
<link rel="modulepreload" crossorigin href="/static/element-a57cc571.js">
|
<link rel="modulepreload" crossorigin href="/static/element-9324df56.js">
|
||||||
<link rel="modulepreload" crossorigin href="/static/vxe-830e4310.js">
|
<link rel="modulepreload" crossorigin href="/static/vxe-5e0bd050.js">
|
||||||
<link rel="stylesheet" href="/static/index-213f7bee.css">
|
<link rel="stylesheet" href="/static/index-213f7bee.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{_}from"./index-65b53bc7.js";import{ag as e,l as n,m as c,p as d,H as l,U as t,O as o,S as p}from"./vue-5ea6dbbd.js";const u={},i={class:"error-page"},f={class:"error-page-svg"};function m(r,g){const a=e("el-button"),s=e("router-link");return n(),c("div",i,[d("div",f,[l(r.$slots,"default",{},void 0,!0)]),t(s,{to:"/"},{default:o(()=>[t(a,{type:"primary"},{default:o(()=>[p("回到首页")]),_:1})]),_:1})])}const x=_(u,[["render",m],["__scopeId","data-v-2fba9562"]]);export{x as E};
|
import{_}from"./index-e2eede5f.js";import{ag as e,l as n,m as c,p as d,H as l,U as t,O as o,S as p}from"./vue-5ea6dbbd.js";const u={},i={class:"error-page"},f={class:"error-page-svg"};function m(r,g){const a=e("el-button"),s=e("router-link");return n(),c("div",i,[d("div",f,[l(r.$slots,"default",{},void 0,!0)]),t(s,{to:"/"},{default:o(()=>[t(a,{type:"primary"},{default:o(()=>[p("回到首页")]),_:1})]),_:1})])}const x=_(u,[["render",m],["__scopeId","data-v-2fba9562"]]);export{x as E};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.app-container[data-v-3401b7f6]{padding:20px}.role-info[data-v-3401b7f6]{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.role-info h2[data-v-3401b7f6]{margin:0}.permission-wrapper[data-v-3401b7f6]{display:flex;gap:20px;margin-bottom:30px}.menu-tree[data-v-3401b7f6]{width:30%;border-right:1px solid #ebeef5;padding-right:20px}.menu-tree h3[data-v-3401b7f6]{margin:0 0 15px;font-size:16px;font-weight:600}.menu-tree .tree-node[data-v-3401b7f6]{display:flex;align-items:center;gap:5px}.menu-tree .tree-node.is-active[data-v-3401b7f6]{color:#67c23a;font-weight:600}.menu-tree .tree-node .node-icon[data-v-3401b7f6]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:16px;color:#909399}.menu-tree .tree-node .el-icon[data-v-3401b7f6]{color:#67c23a}.menu-tree .tree-node .node-badge[data-v-3401b7f6]{margin-left:4px}.menu-tree .tree-node .node-badge[data-v-3401b7f6] .el-badge__content{transform:translateY(-50%) translate(0);right:-10px}.permission-config[data-v-3401b7f6]{width:70%}.permission-config h3[data-v-3401b7f6]{margin:0 0 15px;font-size:16px;font-weight:600}.fun-permission[data-v-3401b7f6]{margin-bottom:30px}.fun-permission .menu-title[data-v-3401b7f6]{margin-bottom:15px;font-weight:600;color:#409eff}.fun-permission .menu-title .menu-title-header[data-v-3401b7f6]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.fun-permission .menu-title .menu-info-tags[data-v-3401b7f6]{display:flex;flex-wrap:wrap;gap:8px}.fun-permission .fun-item[data-v-3401b7f6]{padding:15px;background-color:#f5f7fa;border-radius:4px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}.fun-permission .switch-with-text[data-v-3401b7f6]{display:flex;align-items:center;gap:8px}.fun-permission .switch-label[data-v-3401b7f6]{font-size:14px;color:#606266}.fun-permission .empty-tip[data-v-3401b7f6]{text-align:center;padding:30px;color:#909399;background-color:#f5f7fa;border-radius:4px}.data-permission[data-v-3401b7f6]{background-color:#f5f7fa;padding:15px;border-radius:4px}.data-permission .el-form-item[data-v-3401b7f6]{margin-bottom:20px}.operation-buttons[data-v-3401b7f6]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.app-container[data-v-23d40a43]{padding:20px}.role-info[data-v-23d40a43]{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center}.role-info h2[data-v-23d40a43]{margin:0}.permission-wrapper[data-v-23d40a43]{display:flex;gap:20px;margin-bottom:30px}.menu-tree[data-v-23d40a43]{width:30%;border-right:1px solid #ebeef5;padding-right:20px}.menu-tree h3[data-v-23d40a43]{margin:0 0 15px;font-size:16px;font-weight:600}.menu-tree .tree-node[data-v-23d40a43]{display:flex;align-items:center;gap:5px}.menu-tree .tree-node.is-active[data-v-23d40a43]{color:#67c23a;font-weight:600}.menu-tree .tree-node .el-icon[data-v-23d40a43]{color:#67c23a}.permission-config[data-v-23d40a43]{width:70%}.permission-config h3[data-v-23d40a43]{margin:0 0 15px;font-size:16px;font-weight:600}.fun-permission[data-v-23d40a43]{margin-bottom:30px}.fun-permission .menu-title[data-v-23d40a43]{margin-bottom:15px;font-weight:600;color:#409eff}.fun-permission .menu-title .menu-title-header[data-v-23d40a43]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.fun-permission .menu-title .menu-info-tags[data-v-23d40a43]{display:flex;flex-wrap:wrap;gap:8px}.fun-permission .fun-item[data-v-23d40a43]{padding:15px;background-color:#f5f7fa;border-radius:4px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}.fun-permission .switch-with-text[data-v-23d40a43]{display:flex;align-items:center;gap:8px}.fun-permission .switch-label[data-v-23d40a43]{font-size:14px;color:#606266}.fun-permission .empty-tip[data-v-23d40a43]{text-align:center;padding:30px;color:#909399;background-color:#f5f7fa;border-radius:4px}.data-permission[data-v-23d40a43]{background-color:#f5f7fa;padding:15px;border-radius:4px}.data-permission .el-form-item[data-v-23d40a43]{margin-bottom:20px}.operation-buttons[data-v-23d40a43]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{h as O}from"./index-e7ebadb9.js";import{B as P,E as g,C as A}from"./element-a57cc571.js";import{G as _,r as b,e as m,d as i,b as h,l as v,M as I,O as y,m as C,a7 as S,F as D,u as T}from"./vue-5ea6dbbd.js";const U=_({__name:"index",props:{idType:{},moduleId:{},itemId:{},modelValue:{},placeholder:{default:"请选择ID"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},originalId:{}},emits:["update:modelValue","change","clear"],setup(a,{emit:t}){const e=a,n=b(!1),o=b([]),E=m(()=>{let l=[...o.value];return e.originalId!==void 0&&!l.includes(e.originalId)&&(l=[e.originalId,...l].sort((u,d)=>u-d)),l.map(u=>({label:u.toString(),value:u}))}),c=m({get:()=>e.modelValue,set:l=>t("update:modelValue",l)}),s=()=>e.idType===0?!0:e.idType===1?e.moduleId===void 0||e.moduleId===null||e.moduleId===0?(console.warn("获取功能ID列表失败: moduleId 为必传参数"),!1):!0:e.idType===2?e.moduleId===void 0||e.moduleId===null||e.moduleId===0?(console.warn("获取操作ID列表失败: moduleId 为必传参数"),!1):e.itemId===void 0||e.itemId===null||e.itemId===0?(console.warn("获取操作ID列表失败: itemId 为必传参数"),!1):!0:(console.warn(`未知的 idType: ${e.idType}`),!1),r=async()=>{if(!s()){o.value=[];return}try{n.value=!0;const l=await O({idType:e.idType,moduleId:e.moduleId,itemId:e.itemId});o.value=l.data||[]}catch(l){console.error("获取ID列表失败:",l),g.error("获取ID列表失败"),o.value=[]}finally{n.value=!1}};i(()=>e.idType,()=>{r()}),i(()=>e.moduleId,()=>{(e.idType===1||e.idType===2)&&(s()?r():o.value=[])}),i(()=>e.itemId,()=>{e.idType===2&&(s()?r():o.value=[])});const f=l=>{t("change",l)},p=()=>{t("clear")};return h(()=>{r()}),(l,u)=>(v(),I(T(P),{modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=d=>c.value=d),placeholder:l.placeholder,disabled:l.disabled,clearable:l.clearable,loading:n.value,onChange:f,onClear:p},{default:y(()=>[(v(!0),C(D,null,S(E.value,d=>(v(),I(T(A),{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled","clearable","loading"]))}});var N=(a=>(a[a.MODULE=0]="MODULE",a[a.ITEM=1]="ITEM",a[a.OPERATION=2]="OPERATION",a))(N||{});const B=[{label:"新增",value:0},{label:"删除",value:1},{label:"修改",value:2},{label:"查询",value:3},{label:"上传",value:4},{label:"下载",value:5},{label:"导入",value:6},{label:"导出",value:7},{label:"打印",value:8},{label:"注册",value:9},{label:"登录",value:10},{label:"登出",value:11},{label:"短信",value:12},{label:"邮件",value:13},{label:"微信",value:14},{label:"其它",value:99}],V={0:"新增",1:"删除",2:"修改",3:"查询",4:"上传",5:"下载",6:"导入",7:"导出",8:"打印",9:"注册",10:"登录",11:"登出",12:"短信",13:"邮件",14:"微信",99:"其它"},w=[{label:"GET",value:0},{label:"HEAD",value:1},{label:"POST",value:2},{label:"PUT",value:3},{label:"PATCH",value:4},{label:"DELETE",value:5},{label:"OPTIONS",value:6},{label:"TRACE",value:7}],G={0:"GET",1:"HEAD",2:"POST",3:"PUT",4:"PATCH",5:"DELETE",6:"OPTIONS",7:"TRACE"},k=[{label:"所有",value:1},{label:"本人",value:2},{label:"本部门",value:3},{label:"本部门及子部门",value:4},{label:"指定部门",value:5},{label:"指定人员",value:6}],F={1:"所有",2:"本人",3:"本部门",4:"本部门及子部门",5:"指定部门",6:"指定人员"};export{N as I,V as O,G as R,k as U,U as _,B as a,w as b,F as c};
|
import{h as O}from"./index-bfe0dfe9.js";import{B as P,E as g,C as A}from"./element-9324df56.js";import{G as _,r as b,e as m,d as i,b as h,l as v,M as I,O as y,m as C,a7 as S,F as D,u as T}from"./vue-5ea6dbbd.js";const U=_({__name:"index",props:{idType:{},moduleId:{},itemId:{},modelValue:{},placeholder:{default:"请选择ID"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},originalId:{}},emits:["update:modelValue","change","clear"],setup(a,{emit:t}){const e=a,n=b(!1),o=b([]),E=m(()=>{let l=[...o.value];return e.originalId!==void 0&&!l.includes(e.originalId)&&(l=[e.originalId,...l].sort((u,d)=>u-d)),l.map(u=>({label:u.toString(),value:u}))}),c=m({get:()=>e.modelValue,set:l=>t("update:modelValue",l)}),s=()=>e.idType===0?!0:e.idType===1?e.moduleId===void 0||e.moduleId===null||e.moduleId===0?(console.warn("获取功能ID列表失败: moduleId 为必传参数"),!1):!0:e.idType===2?e.moduleId===void 0||e.moduleId===null||e.moduleId===0?(console.warn("获取操作ID列表失败: moduleId 为必传参数"),!1):e.itemId===void 0||e.itemId===null||e.itemId===0?(console.warn("获取操作ID列表失败: itemId 为必传参数"),!1):!0:(console.warn(`未知的 idType: ${e.idType}`),!1),r=async()=>{if(!s()){o.value=[];return}try{n.value=!0;const l=await O({idType:e.idType,moduleId:e.moduleId,itemId:e.itemId});o.value=l.data||[]}catch(l){console.error("获取ID列表失败:",l),g.error("获取ID列表失败"),o.value=[]}finally{n.value=!1}};i(()=>e.idType,()=>{r()}),i(()=>e.moduleId,()=>{(e.idType===1||e.idType===2)&&(s()?r():o.value=[])}),i(()=>e.itemId,()=>{e.idType===2&&(s()?r():o.value=[])});const f=l=>{t("change",l)},p=()=>{t("clear")};return h(()=>{r()}),(l,u)=>(v(),I(T(P),{modelValue:c.value,"onUpdate:modelValue":u[0]||(u[0]=d=>c.value=d),placeholder:l.placeholder,disabled:l.disabled,clearable:l.clearable,loading:n.value,onChange:f,onClear:p},{default:y(()=>[(v(!0),C(D,null,S(E.value,d=>(v(),I(T(A),{key:d.value,label:d.label,value:d.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","disabled","clearable","loading"]))}});var N=(a=>(a[a.MODULE=0]="MODULE",a[a.ITEM=1]="ITEM",a[a.OPERATION=2]="OPERATION",a))(N||{});const B=[{label:"新增",value:0},{label:"删除",value:1},{label:"修改",value:2},{label:"查询",value:3},{label:"上传",value:4},{label:"下载",value:5},{label:"导入",value:6},{label:"导出",value:7},{label:"打印",value:8},{label:"注册",value:9},{label:"登录",value:10},{label:"登出",value:11},{label:"短信",value:12},{label:"邮件",value:13},{label:"微信",value:14},{label:"其它",value:99}],V={0:"新增",1:"删除",2:"修改",3:"查询",4:"上传",5:"下载",6:"导入",7:"导出",8:"打印",9:"注册",10:"登录",11:"登出",12:"短信",13:"邮件",14:"微信",99:"其它"},w=[{label:"GET",value:0},{label:"HEAD",value:1},{label:"POST",value:2},{label:"PUT",value:3},{label:"PATCH",value:4},{label:"DELETE",value:5},{label:"OPTIONS",value:6},{label:"TRACE",value:7}],G={0:"GET",1:"HEAD",2:"POST",3:"PUT",4:"PATCH",5:"DELETE",6:"OPTIONS",7:"TRACE"},k=[{label:"所有",value:1},{label:"本人",value:2},{label:"本部门",value:3},{label:"本部门及子部门",value:4},{label:"指定部门",value:5},{label:"指定人员",value:6}],F={1:"所有",2:"本人",3:"本部门",4:"本部门及子部门",5:"指定部门",6:"指定人员"};export{N as I,V as O,G as R,k as U,U as _,B as a,w as b,F as c};
|
||||||
File diff suppressed because one or more lines are too long
1
src/main/resources/static/static/index-19213782.js
Normal file
1
src/main/resources/static/static/index-19213782.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{e}from"./index-65b53bc7.js";function r(o){return e({url:"/codegen/download",method:"post",data:o,responseType:"blob"})}export{r as c};
|
import{e}from"./index-e2eede5f.js";function r(o){return e({url:"/codegen/download",method:"post",data:o,responseType:"blob"})}export{r as c};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.search-wrapper[data-v-f5c3a2dc]{margin-bottom:20px}.search-wrapper[data-v-f5c3a2dc] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-f5c3a2dc]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-f5c3a2dc]{margin-bottom:20px}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{e as t}from"./index-65b53bc7.js";function r(e){return t({url:"/role/query",method:"post",data:e})}function n(e){return t({url:"/role/add",method:"put",data:e})}function u(e){return t({url:"/role/edit",method:"post",data:e})}function l(e){return t({url:"/role/query/fun",method:"post",data:e})}function i(e){return t({url:"/role/bind/fun",method:"post",data:e})}function d(e){return t({url:`/role/delete/${e}`,method:"delete"})}function s(e){return t({url:`/role/delete/fun/${e}`,method:"delete"})}export{n as a,l as b,s as c,d,u as e,i as f,r as g};
|
import{e as t}from"./index-e2eede5f.js";function r(e){return t({url:"/role/query",method:"post",data:e})}function n(e){return t({url:"/role/add",method:"put",data:e})}function u(e){return t({url:"/role/edit",method:"post",data:e})}function l(e){return t({url:"/role/query/fun",method:"post",data:e})}function i(e){return t({url:"/role/bind/fun",method:"post",data:e})}function d(e){return t({url:`/role/delete/${e}`,method:"delete"})}function s(e){return t({url:`/role/delete/fun/${e}`,method:"delete"})}export{n as a,l as b,s as c,d,u as e,i as f,r as g};
|
||||||
1
src/main/resources/static/static/index-62d613e6.css
Normal file
1
src/main/resources/static/static/index-62d613e6.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.search-wrapper[data-v-f5ea3f90]{margin-bottom:20px}.search-wrapper[data-v-f5ea3f90] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-f5ea3f90]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-f5ea3f90]{margin-bottom:20px}
|
||||||
1
src/main/resources/static/static/index-9962b727.css
Normal file
1
src/main/resources/static/static/index-9962b727.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@charset "UTF-8";.app-container[data-v-d0ce0224]{padding:20px;width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden}.search-wrapper[data-v-d0ce0224]{margin-bottom:20px}.toolbar-wrapper[data-v-d0ce0224]{display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;margin-bottom:20px;padding:15px;border:1px solid #ebeef5;border-radius:4px;background-color:#fff}.toolbar-left[data-v-d0ce0224]{display:flex;gap:10px}.toolbar-right[data-v-d0ce0224]{display:flex;align-items:center}.el-button--circle[data-v-d0ce0224]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important}.el-button--circle .el-icon[data-v-d0ce0224]{font-size:18px!important;margin:0!important;padding:0!important;line-height:1!important}.refresh-button[data-v-d0ce0224]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important;overflow:hidden!important}.search-wrapper[data-v-d0ce0224]{margin-bottom:15px}.table-wrapper[data-v-d0ce0224]{margin-bottom:20px}.empty-text[data-v-d0ce0224]{text-align:center;padding:20px;color:#999}.hint-text[data-v-d0ce0224]{color:#909399;margin-left:10px;font-size:14px}.bound-functions-header[data-v-d0ce0224]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.pagination-wrapper[data-v-d0ce0224]{display:flex;justify-content:flex-end;margin-top:15px}@media (max-width: 768px){.refresh-button[data-v-d0ce0224]{width:32px!important;height:32px!important}.refresh-button .el-icon[data-v-d0ce0224]{font-size:16px!important}}.content-wrapper[data-v-d0ce0224]{display:flex;gap:20px;height:calc(100vh - 280px)}@media (max-width: 992px){.content-wrapper[data-v-d0ce0224]{flex-direction:column;height:auto}}.menu-tree-wrapper[data-v-d0ce0224]{flex:0 0 40%;overflow-y:auto;min-height:600px}@media (max-width: 992px){.menu-tree-wrapper[data-v-d0ce0224]{flex:0 0 auto;height:400px}}.menu-tree-wrapper .custom-tree-node[data-v-d0ce0224]{display:flex;align-items:center;gap:8px;padding:2px 0}.menu-tree-wrapper .custom-tree-node .node-icon[data-v-d0ce0224]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:16px}.menu-tree-wrapper .custom-tree-node .node-name[data-v-d0ce0224]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-tree-wrapper .el-tree-node__content[data-v-d0ce0224]{padding:4px 8px!important}.menu-tree-wrapper .el-tree-node__expand-icon[data-v-d0ce0224]{font-size:12px;margin-right:4px}.menu-detail-wrapper[data-v-d0ce0224]{flex:1;overflow-y:auto;padding:20px}.menu-detail-wrapper .section-title[data-v-d0ce0224]{font-size:16px;font-weight:700;margin:20px 0 15px;padding-left:5px;border-left:3px solid #409eff}.menu-detail-wrapper .action-buttons[data-v-d0ce0224]{display:flex;justify-content:flex-end;gap:10px;margin-top:30px;padding-top:20px;border-top:1px solid #ebeef5}.menu-detail-wrapper .empty-text[data-v-d0ce0224]{color:#909399;text-align:center;padding:20px}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{e as t}from"./index-65b53bc7.js";function n(e){return t({url:"/funModule/save/update",method:"post",data:e})}function o(e){return t({url:"/funModule/query",method:"post",data:e})}function s(e){return t({url:"/funModule/delete",method:"delete",data:e})}function d(e){return t({url:"/funItem/save/update",method:"post",data:e})}function a(e){return t({url:"/funItem/query",method:"post",data:e})}function l(e){return t({url:"/funItem/delete",method:"delete",data:e})}function f(e){return t({url:"/funOperation/save/update",method:"post",data:e})}function p(e){return t({url:"/funOperation/query",method:"post",data:e})}function i(e,u){return t({url:`/funOperation/query/${u}`,method:"post",data:e})}function m(e){return t({url:"/funOperation/delete",method:"delete",data:e})}function c(e){return t({url:"/funModule/getIdList",method:"post",data:e})}export{d as a,l as b,a as c,s as d,f as e,m as f,p as g,c as h,i,o as q,n as s};
|
import{e as t}from"./index-e2eede5f.js";function n(e){return t({url:"/funModule/save/update",method:"post",data:e})}function o(e){return t({url:"/funModule/query",method:"post",data:e})}function s(e){return t({url:"/funModule/delete",method:"delete",data:e})}function d(e){return t({url:"/funItem/save/update",method:"post",data:e})}function a(e){return t({url:"/funItem/query",method:"post",data:e})}function l(e){return t({url:"/funItem/delete",method:"delete",data:e})}function f(e){return t({url:"/funOperation/save/update",method:"post",data:e})}function p(e){return t({url:"/funOperation/query",method:"post",data:e})}function i(e,u){return t({url:`/funOperation/query/${u}`,method:"post",data:e})}function m(e){return t({url:"/funOperation/delete",method:"delete",data:e})}function c(e){return t({url:"/funModule/getIdList",method:"post",data:e})}export{d as a,l as b,a as c,s as d,f as e,m as f,p as g,c as h,i,o as q,n as s};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
@charset "UTF-8";.app-container[data-v-7f921f63]{padding:20px;width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden}.search-wrapper[data-v-7f921f63]{margin-bottom:20px}.toolbar-wrapper[data-v-7f921f63]{display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;margin-bottom:20px;padding:15px;border:1px solid #ebeef5;border-radius:4px;background-color:#fff}.toolbar-left[data-v-7f921f63]{display:flex;gap:10px}.toolbar-right[data-v-7f921f63]{display:flex;align-items:center}.el-button--circle[data-v-7f921f63]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important}.el-button--circle .el-icon[data-v-7f921f63]{font-size:18px!important;margin:0!important;padding:0!important;line-height:1!important}.refresh-button[data-v-7f921f63]{display:flex!important;align-items:center!important;justify-content:center!important;width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;box-sizing:border-box!important;overflow:hidden!important}.search-wrapper[data-v-7f921f63]{margin-bottom:15px}.table-wrapper[data-v-7f921f63]{margin-bottom:20px}.empty-text[data-v-7f921f63]{text-align:center;padding:20px;color:#999}.hint-text[data-v-7f921f63]{color:#909399;margin-left:10px;font-size:14px}.bound-functions-header[data-v-7f921f63]{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.pagination-wrapper[data-v-7f921f63]{display:flex;justify-content:flex-end;margin-top:15px}@media (max-width: 768px){.refresh-button[data-v-7f921f63]{width:32px!important;height:32px!important}.refresh-button .el-icon[data-v-7f921f63]{font-size:16px!important}}.content-wrapper[data-v-7f921f63]{display:flex;gap:20px;height:calc(100vh - 280px)}@media (max-width: 992px){.content-wrapper[data-v-7f921f63]{flex-direction:column;height:auto}}.menu-tree-wrapper[data-v-7f921f63]{flex:0 0 40%;overflow-y:auto;min-height:600px}@media (max-width: 992px){.menu-tree-wrapper[data-v-7f921f63]{flex:0 0 auto;height:400px}}.menu-tree-wrapper .custom-tree-node[data-v-7f921f63]{display:flex;align-items:center;gap:8px;padding:2px 0}.menu-tree-wrapper .custom-tree-node .node-icon[data-v-7f921f63]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:16px}.menu-tree-wrapper .custom-tree-node .node-name[data-v-7f921f63]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.menu-tree-wrapper .el-tree-node__content[data-v-7f921f63]{padding:4px 8px!important}.menu-tree-wrapper .el-tree-node__expand-icon[data-v-7f921f63]{font-size:12px;margin-right:4px}.menu-detail-wrapper[data-v-7f921f63]{flex:1;overflow-y:auto;padding:20px}.menu-detail-wrapper .section-title[data-v-7f921f63]{font-size:16px;font-weight:700;margin:20px 0 15px;padding-left:5px;border-left:3px solid #409eff}.menu-detail-wrapper .action-buttons[data-v-7f921f63]{display:flex;justify-content:flex-end;gap:10px;margin-top:30px;padding-top:20px;border-top:1px solid #ebeef5}.menu-detail-wrapper .empty-text[data-v-7f921f63]{color:#909399;text-align:center;padding:20px}
|
|
||||||
@@ -1 +1 @@
|
|||||||
import{G as y,aD as V,r as p,Z as k,ag as r,l as C,m as S,U as o,p as l,O as n,u as g,a2 as U,S as F,a8 as I,aG as R,aH as z}from"./vue-5ea6dbbd.js";import{c as B,_ as K}from"./index-65b53bc7.js";import{t as M,v as N}from"./element-a57cc571.js";import{_ as q}from"./index.vue_vue_type_script_setup_true_lang-c0c1aea8.js";import"./vxe-830e4310.js";const D="/static/logo-text-2-eef467fb.png",G=t=>(R("data-v-db1658f3"),t=t(),z(),t),E={class:"login-container"},H={class:"login-card"},L=G(()=>l("div",{class:"title"},[l("img",{src:D})],-1)),O={class:"content"},T=y({__name:"index",setup(t){const v=V(),u=p(null),i=p(!1),x=p(""),e=k({username:"admin",password:"9527",code:""}),h={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:4,max:16,message:"长度在 4 到 16 个字符",trigger:"blur"}]},m=()=>{var d;(d=u.value)==null||d.validate((s,a)=>{s?(i.value=!0,B().login(e).then(()=>{v.push({path:"/"})}).catch(()=>{_(),e.password=""}).finally(()=>{i.value=!1})):console.error("表单校验不通过",a)})},_=()=>{e.code="",x.value=""};return _(),(d,s)=>{const a=r("el-input"),f=r("el-form-item"),w=r("el-button"),b=r("el-form");return C(),S("div",E,[o(q,{class:"theme-switch"}),l("div",H,[L,l("div",O,[o(b,{ref_key:"loginFormRef",ref:u,model:e,rules:h,onKeyup:I(m,["enter"])},{default:n(()=>[o(f,{prop:"username"},{default:n(()=>[o(a,{modelValue:e.username,"onUpdate:modelValue":s[0]||(s[0]=c=>e.username=c),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":g(M),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,{prop:"password"},{default:n(()=>[o(a,{modelValue:e.password,"onUpdate:modelValue":s[1]||(s[1]=c=>e.password=c),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":g(N),size:"large","show-password":""},null,8,["modelValue","prefix-icon"])]),_:1}),o(w,{loading:i.value,type:"primary",size:"large",onClick:U(m,["prevent"])},{default:n(()=>[F("登 录")]),_:1},8,["loading","onClick"])]),_:1},8,["model","onKeyup"])])])])}}});const P=K(T,[["__scopeId","data-v-db1658f3"]]);export{P as default};
|
import{G as y,aD as V,r as p,Z as k,ag as r,l as C,m as S,U as o,p as l,O as n,u as g,a2 as U,S as F,a8 as I,aG as R,aH as z}from"./vue-5ea6dbbd.js";import{c as B,_ as K}from"./index-e2eede5f.js";import{t as M,v as N}from"./element-9324df56.js";import{_ as q}from"./index.vue_vue_type_script_setup_true_lang-0a12c768.js";import"./vxe-5e0bd050.js";const D="/static/logo-text-2-eef467fb.png",G=t=>(R("data-v-db1658f3"),t=t(),z(),t),E={class:"login-container"},H={class:"login-card"},L=G(()=>l("div",{class:"title"},[l("img",{src:D})],-1)),O={class:"content"},T=y({__name:"index",setup(t){const v=V(),u=p(null),i=p(!1),x=p(""),e=k({username:"admin",password:"9527",code:""}),h={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:4,max:16,message:"长度在 4 到 16 个字符",trigger:"blur"}]},m=()=>{var d;(d=u.value)==null||d.validate((s,a)=>{s?(i.value=!0,B().login(e).then(()=>{v.push({path:"/"})}).catch(()=>{_(),e.password=""}).finally(()=>{i.value=!1})):console.error("表单校验不通过",a)})},_=()=>{e.code="",x.value=""};return _(),(d,s)=>{const a=r("el-input"),f=r("el-form-item"),w=r("el-button"),b=r("el-form");return C(),S("div",E,[o(q,{class:"theme-switch"}),l("div",H,[L,l("div",O,[o(b,{ref_key:"loginFormRef",ref:u,model:e,rules:h,onKeyup:I(m,["enter"])},{default:n(()=>[o(f,{prop:"username"},{default:n(()=>[o(a,{modelValue:e.username,"onUpdate:modelValue":s[0]||(s[0]=c=>e.username=c),modelModifiers:{trim:!0},placeholder:"用户名",type:"text",tabindex:"1","prefix-icon":g(M),size:"large"},null,8,["modelValue","prefix-icon"])]),_:1}),o(f,{prop:"password"},{default:n(()=>[o(a,{modelValue:e.password,"onUpdate:modelValue":s[1]||(s[1]=c=>e.password=c),modelModifiers:{trim:!0},placeholder:"密码",type:"password",tabindex:"2","prefix-icon":g(N),size:"large","show-password":""},null,8,["modelValue","prefix-icon"])]),_:1}),o(w,{loading:i.value,type:"primary",size:"large",onClick:U(m,["prevent"])},{default:n(()=>[F("登 录")]),_:1},8,["loading","onClick"])]),_:1},8,["model","onKeyup"])])])])}}});const P=K(T,[["__scopeId","data-v-db1658f3"]]);export{P as default};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{_ as c,c as a}from"./index-65b53bc7.js";import{ag as s,l as n,m as _,U as r,G as i,M as d,Q as p,u as m}from"./vue-5ea6dbbd.js";import"./element-a57cc571.js";import"./vxe-830e4310.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),_("div",u,[r(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]);const y={},x={class:"app-container center"};function h(t,o){const e=s("el-empty");return n(),_("div",x,[r(e,{description:"Editor 权限可见"})])}const b=c(y,[["render",h],["__scopeId","data-v-e677b768"]]),C=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(A,E)=>(n(),d(p(m(e)?v:b)))}});export{C as default};
|
import{_ as c,c as a}from"./index-e2eede5f.js";import{ag as s,l as n,m as _,U as r,G as i,M as d,Q as p,u as m}from"./vue-5ea6dbbd.js";import"./element-9324df56.js";import"./vxe-5e0bd050.js";const l={},u={class:"app-container center"};function f(t,o){const e=s("el-empty");return n(),_("div",u,[r(e,{description:"Admin 权限可见"})])}const v=c(l,[["render",f],["__scopeId","data-v-540a7bcc"]]);const y={},x={class:"app-container center"};function h(t,o){const e=s("el-empty");return n(),_("div",x,[r(e,{description:"Editor 权限可见"})])}const b=c(y,[["render",h],["__scopeId","data-v-e677b768"]]),C=i({__name:"index",setup(t){const e=a().roles.includes("admin");return(A,E)=>(n(),d(p(m(e)?v:b)))}});export{C as default};
|
||||||
File diff suppressed because one or more lines are too long
1
src/main/resources/static/static/index-ff1b2e54.js
Normal file
1
src/main/resources/static/static/index-ff1b2e54.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{d as k}from"./index-65b53bc7.js";import{w as g}from"./element-a57cc571.js";import{G as C,ag as o,l,M as m,O as e,U as n,m as h,a7 as x,u as t,F as B,p as s,T}from"./vue-5ea6dbbd.js";const V=C({__name:"index",setup(b){const{themeList:d,activeThemeName:c,setTheme:r}=k();return(v,N)=>{const _=o("el-icon"),p=o("el-tooltip"),i=o("el-dropdown-item"),u=o("el-dropdown-menu"),f=o("el-dropdown");return l(),m(f,{trigger:"click",onCommand:t(r)},{dropdown:e(()=>[n(u,null,{default:e(()=>[(l(!0),h(B,null,x(t(d),(a,w)=>(l(),m(i,{key:w,disabled:t(c)===a.name,command:a.name},{default:e(()=>[s("span",null,T(a.title),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:e(()=>[s("div",null,[n(p,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[n(_,{size:20},{default:e(()=>[n(t(g))]),_:1})]),_:1})])]),_:1},8,["onCommand"])}}});export{V as _};
|
import{d as k}from"./index-e2eede5f.js";import{w as g}from"./element-9324df56.js";import{G as C,ag as o,l,M as m,O as e,U as n,m as h,a7 as x,u as t,F as B,p as s,T}from"./vue-5ea6dbbd.js";const V=C({__name:"index",setup(b){const{themeList:d,activeThemeName:c,setTheme:r}=k();return(v,N)=>{const _=o("el-icon"),p=o("el-tooltip"),i=o("el-dropdown-item"),u=o("el-dropdown-menu"),f=o("el-dropdown");return l(),m(f,{trigger:"click",onCommand:t(r)},{dropdown:e(()=>[n(u,null,{default:e(()=>[(l(!0),h(B,null,x(t(d),(a,w)=>(l(),m(i,{key:w,disabled:t(c)===a.name,command:a.name},{default:e(()=>[s("span",null,T(a.title),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:e(()=>[s("div",null,[n(p,{effect:"dark",content:"主题模式",placement:"bottom"},{default:e(()=>[n(_,{size:20},{default:e(()=>[n(t(g))]),_:1})]),_:1})])]),_:1},8,["onCommand"])}}});export{V as _};
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user