Compare commits
2 Commits
96ac78f856
...
ac1512088f
| Author | SHA1 | Date | |
|---|---|---|---|
| ac1512088f | |||
| 84ebce764b |
572
doc/sql.md
572
doc/sql.md
@@ -2,197 +2,449 @@
|
||||
|
||||
```sql
|
||||
/* ---------------------------------------------------- */
|
||||
/* Generated by Enterprise Architect Version 10.10 */
|
||||
/* Created On : 20-1月-2026 15:13:42 */
|
||||
/* DBMS : PostgreSQL */
|
||||
/* Generated by Enterprise Architect Version 10.10 */
|
||||
/* Created On : 22-1月-2026 10:57:00 */
|
||||
/* DBMS : PostgreSQL */
|
||||
/* ---------------------------------------------------- */
|
||||
|
||||
/* Drop Sequences for Autonumber Columns */
|
||||
DROP SEQUENCE IF EXISTS cg_template_id_seq;
|
||||
|
||||
|
||||
|
||||
DROP SEQUENCE IF EXISTS cg_template_id_seq
|
||||
;
|
||||
|
||||
/* Drop Tables */
|
||||
DROP TABLE IF EXISTS cg_fun_item CASCADE;
|
||||
DROP TABLE IF EXISTS cg_fun_module CASCADE;
|
||||
DROP TABLE IF EXISTS cg_fun_operation CASCADE;
|
||||
DROP TABLE IF EXISTS cg_menu CASCADE;
|
||||
DROP TABLE IF EXISTS cg_role CASCADE;
|
||||
DROP TABLE IF EXISTS cg_role_fun CASCADE;
|
||||
DROP TABLE IF EXISTS cg_template CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS cg_fun_item CASCADE
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS cg_fun_module CASCADE
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS cg_fun_operation CASCADE
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS cg_menu CASCADE
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS cg_role CASCADE
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS cg_role_fun CASCADE
|
||||
;
|
||||
|
||||
DROP TABLE IF EXISTS cg_template CASCADE
|
||||
;
|
||||
|
||||
/* Create Tables */
|
||||
CREATE TABLE cg_fun_item (
|
||||
id bigint NOT NULL, -- id
|
||||
module_id bigint NOT NULL, -- 模块ID
|
||||
item_id bigint NOT NULL, -- 功能ID
|
||||
item_name varchar(50) NOT NULL, -- 功能名称
|
||||
item_code varchar(64) NOT NULL, -- 功能编码
|
||||
is_tenant boolean NOT NULL DEFAULT true, -- 是否租户
|
||||
describe varchar(250) NULL, -- 说明
|
||||
sort_order smallint NOT NULL DEFAULT 0 -- 排序
|
||||
);
|
||||
|
||||
CREATE TABLE cg_fun_module (
|
||||
id bigint NOT NULL, -- id
|
||||
module_code varchar(16) NOT NULL, -- 模块编码
|
||||
module_name varchar(8) NOT NULL, -- 模块名称
|
||||
package_name varchar(250) NOT NULL, -- 包名称
|
||||
api_package_name varchar(250) NOT NULL, -- 参数包名
|
||||
sort_order smallint NOT NULL DEFAULT 0, -- 排序
|
||||
describe varchar(250) NULL -- 描述
|
||||
);
|
||||
CREATE TABLE cg_fun_item
|
||||
(
|
||||
id bigint NOT NULL, -- id
|
||||
module_id bigint NOT NULL, -- 模块ID
|
||||
item_id bigint NOT NULL, -- 功能ID
|
||||
item_name varchar(50) NOT NULL, -- 功能名称
|
||||
item_code varchar(64) NOT NULL, -- 功能编码
|
||||
is_tenant boolean NOT NULL DEFAULT true, -- 是否租户
|
||||
describe varchar(250) NULL, -- 说明
|
||||
sort_order smallint NOT NULL DEFAULT 0 -- 排序
|
||||
)
|
||||
;
|
||||
|
||||
CREATE TABLE cg_fun_operation (
|
||||
id bigint NOT NULL, -- id
|
||||
module_id bigint NOT NULL, -- 模块ID
|
||||
item_id bigint NOT NULL, -- 功能ID(表主键ID)
|
||||
is_green_light boolean NOT NULL DEFAULT false, -- 直接放行
|
||||
operation_id bigint NOT NULL, -- 操作ID
|
||||
operation_code varchar(32) NULL, -- 操作编码
|
||||
fun_name varchar(16) NOT NULL, -- 操作名称
|
||||
fun_type smallint NOT NULL, -- 操作类型 > >查 > >改 > >删 > >增
|
||||
request_type smallint NOT NULL, -- 请求类型
|
||||
is_req_params boolean NOT NULL DEFAULT true, -- 是否需要请求参数
|
||||
is_res_params boolean NOT NULL DEFAULT true, -- 是否需要响应参数
|
||||
is_page boolean NOT NULL DEFAULT true, -- 是否分页
|
||||
path_params varchar(16) NULL, -- 路径参数(与请求参数true互斥)
|
||||
usable_config json NOT NULL DEFAULT '[]', -- 可配置数据类型json[]
|
||||
field_config json NOT NULL DEFAULT '[]', -- 可配置字段
|
||||
sort_order smallint NOT NULL DEFAULT 0, -- 排序
|
||||
describe varchar(250) NULL -- 说明说明
|
||||
);
|
||||
CREATE TABLE cg_fun_module
|
||||
(
|
||||
id bigint NOT NULL, -- id
|
||||
module_code varchar(16) NOT NULL, -- 模块编码
|
||||
module_name varchar(8) NOT NULL, -- 模块名称
|
||||
package_name varchar(250) NOT NULL, -- 包名称
|
||||
api_package_name varchar(250) NOT NULL, -- 参数包名
|
||||
sort_order smallint NOT NULL DEFAULT 0, -- 排序
|
||||
describe varchar(250) NULL -- 描述
|
||||
)
|
||||
;
|
||||
|
||||
CREATE TABLE cg_menu (
|
||||
id bigint NOT NULL, -- 主键ID
|
||||
client_type smallint NOT NULL, -- 客户端类型:0 PC端,1 小程序端,2 H5端
|
||||
menu_name varchar(32) NOT NULL, -- 菜单名称
|
||||
parent_id bigint NOT NULL DEFAULT 0, -- 父菜单ID
|
||||
fun_id bigint NULL, -- 操作ID/来自操作表
|
||||
menu_type smallint NOT NULL DEFAULT 0, -- 0菜单1按钮
|
||||
path varchar(64) NULL, -- 路由路径
|
||||
icon varchar(64) NULL, -- 菜单图标
|
||||
is_tenant boolean NOT NULL DEFAULT true, -- 是否租户
|
||||
is_hide boolean NOT NULL DEFAULT false, -- 是否隐藏
|
||||
sort_order smallint NOT NULL DEFAULT 0 -- 排序
|
||||
);
|
||||
CREATE TABLE cg_fun_operation
|
||||
(
|
||||
id bigint NOT NULL, -- id
|
||||
module_id bigint NOT NULL, -- 模块ID
|
||||
item_id bigint NOT NULL, -- 功能ID(表主键ID)
|
||||
is_green_light boolean NOT NULL DEFAULT false, -- 直接放行
|
||||
operation_id bigint NOT NULL, -- 操作ID
|
||||
operation_code varchar(32) NULL, -- 操作编码
|
||||
fun_name varchar(16) NOT NULL, -- 操作名称
|
||||
fun_type smallint NOT NULL, -- 操作类型>>查>>改>>删>>增
|
||||
request_type smallint NOT NULL, -- 请求类型
|
||||
is_req_params boolean NOT NULL DEFAULT true, -- 是否需要请求参数
|
||||
is_res_params boolean NOT NULL DEFAULT true, -- 是否需要响应参数
|
||||
is_page boolean NOT NULL DEFAULT true, -- 是否分页
|
||||
path_params varchar(16) NULL, -- 路径参数(与请求参数true互斥)
|
||||
usable_config json NOT NULL DEFAULT '[]', -- 可配置数据类型json[]
|
||||
field_config json NOT NULL DEFAULT '[]', -- 可配置字段
|
||||
sort_order smallint NOT NULL DEFAULT 0, -- 排序
|
||||
describe varchar(250) NULL -- 说明说明
|
||||
)
|
||||
;
|
||||
|
||||
CREATE TABLE cg_role (
|
||||
id bigint NOT NULL, -- 主键ID
|
||||
role_name varchar(32) NOT NULL, -- 角色名称
|
||||
role_type smallint NOT NULL -- 角色类型 0平台 1套餐
|
||||
);
|
||||
CREATE TABLE cg_menu
|
||||
(
|
||||
id bigint NOT NULL, -- 主键ID
|
||||
client_type smallint NOT NULL, -- 客户端类型:0 PC端,1 小程序端,2 H5端
|
||||
menu_name varchar(32) NOT NULL, -- 菜单名称
|
||||
parent_id bigint NOT NULL DEFAULT 0, -- 父菜单ID
|
||||
fun_id bigint NULL, -- 操作ID/来自操作表
|
||||
menu_type smallint NOT NULL DEFAULT 0, -- 0菜单1按钮
|
||||
path varchar(64) NULL, -- 路由路径
|
||||
page_path varchar(64) NULL,
|
||||
icon varchar(64) NULL, -- 菜单图标
|
||||
is_tenant boolean NOT NULL DEFAULT true, -- 是否租户
|
||||
is_hide boolean NOT NULL DEFAULT false, -- 是否隐藏
|
||||
sort_order smallint NOT NULL DEFAULT 0 -- 排序
|
||||
)
|
||||
;
|
||||
|
||||
CREATE TABLE cg_role_fun (
|
||||
id bigint NOT NULL, -- 主键ID
|
||||
role_id bigint NOT NULL, -- 角色ID
|
||||
fun_id bigint NOT NULL, -- 操作ID
|
||||
data_scope smallint NOT NULL DEFAULT 0, -- 数据权限默认:0无
|
||||
assign_data_scope json NOT NULL DEFAULT '[]', -- 指定的数据权限范围
|
||||
exclude_field json NOT NULL DEFAULT '[]', -- 排除的字段
|
||||
client_type smallserial NOT NULL -- 客户端类型:0 PC端,1 小程序端,2 H5端
|
||||
);
|
||||
CREATE TABLE cg_role
|
||||
(
|
||||
id bigint NOT NULL, -- 主键ID
|
||||
role_name varchar(32) NOT NULL, -- 角色名称
|
||||
role_type smallint NOT NULL -- 角色类型 0平台 1套餐
|
||||
)
|
||||
;
|
||||
|
||||
CREATE TABLE cg_template (
|
||||
id bigint NOT NULL DEFAULT NEXTVAL(('"cg_template_id_seq"'::text)::regclass), -- 主键ID
|
||||
is_use boolean NOT NULL DEFAULT false, -- 是否使用
|
||||
template_name varchar(32) NOT NULL, -- 模板名称
|
||||
template_type smallint NOT NULL, -- 模板类型
|
||||
content text NOT NULL -- 正文
|
||||
);
|
||||
CREATE TABLE cg_role_fun
|
||||
(
|
||||
id bigint NOT NULL, -- 主键ID
|
||||
role_id bigint NOT NULL, -- 角色ID
|
||||
fun_id bigint NOT NULL, -- 操作ID
|
||||
data_scope smallint NOT NULL DEFAULT 0, -- 数据权限默认:0无
|
||||
assign_data_scope json NOT NULL DEFAULT '[]', -- 指定的数据权限范围
|
||||
exclude_field json NOT NULL DEFAULT '[]', -- 排除的字段
|
||||
client_type smallserial NOT NULL -- 客户端类型:0 PC端,1 小程序端,2 H5端
|
||||
)
|
||||
;
|
||||
|
||||
CREATE TABLE cg_template
|
||||
(
|
||||
id bigint NOT NULL DEFAULT NEXTVAL(('"cg_template_id_seq"'::text)::regclass), -- 主键ID
|
||||
is_use boolean NOT NULL DEFAULT false, -- 是否使用
|
||||
template_name varchar(32) NOT NULL, -- 模板名称
|
||||
template_type smallint NOT NULL, -- 模板类型
|
||||
content text NOT NULL -- 正文
|
||||
)
|
||||
;
|
||||
|
||||
/* Create Primary Keys, Indexes, Uniques, Checks */
|
||||
ALTER TABLE cg_fun_item ADD CONSTRAINT "PK_cg_fun_item" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_item ADD CONSTRAINT u_module_item_code UNIQUE (module_id, item_id, item_code);
|
||||
ALTER TABLE cg_fun_item ADD CONSTRAINT u_module_item_id UNIQUE (module_id, item_id);
|
||||
|
||||
ALTER TABLE cg_fun_module ADD CONSTRAINT "PK_cg_fun_module" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_item ADD CONSTRAINT "PK_cg_fun_item"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_fun_operation ADD CONSTRAINT "PK_cg_fun_operation" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_operation ADD CONSTRAINT u_module_item_opration UNIQUE (module_id, item_id, operation_code);
|
||||
ALTER TABLE cg_fun_operation ADD CONSTRAINT u_module_item_operation_id UNIQUE (module_id, item_id, operation_id);
|
||||
ALTER TABLE cg_fun_item
|
||||
ADD CONSTRAINT u_module_item_code UNIQUE (module_id,item_id,item_code)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_menu ADD CONSTRAINT "PK_cg_menu" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_item
|
||||
ADD CONSTRAINT u_module_item_id UNIQUE (module_id,item_id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_role ADD CONSTRAINT "PK_cg_role" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_module ADD CONSTRAINT "PK_cg_fun_module"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_role_fun ADD CONSTRAINT "PK_cg_role_fun" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_operation ADD CONSTRAINT "PK_cg_fun_operation"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_template ADD CONSTRAINT "PK_cg_template" PRIMARY KEY (id);
|
||||
ALTER TABLE cg_fun_operation
|
||||
ADD CONSTRAINT u_module_item_opration UNIQUE (module_id,item_id,operation_code)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_fun_operation
|
||||
ADD CONSTRAINT u_module_item_operation_id UNIQUE (module_id,item_id,operation_id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_menu ADD CONSTRAINT "PK_cg_menu"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_role ADD CONSTRAINT "PK_cg_role"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_role_fun ADD CONSTRAINT "PK_cg_role_fun"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
ALTER TABLE cg_template ADD CONSTRAINT "PK_cg_template"
|
||||
PRIMARY KEY (id)
|
||||
;
|
||||
|
||||
/* Create Table Comments, Sequences for Autonumber Columns */
|
||||
COMMENT ON TABLE cg_fun_item IS '功能项配置';
|
||||
COMMENT ON COLUMN cg_fun_item.id IS 'id';
|
||||
COMMENT ON COLUMN cg_fun_item.module_id IS '模块ID';
|
||||
COMMENT ON COLUMN cg_fun_item.item_id IS '功能ID';
|
||||
COMMENT ON COLUMN cg_fun_item.item_name IS '功能名称';
|
||||
COMMENT ON COLUMN cg_fun_item.item_code IS '功能编码';
|
||||
COMMENT ON COLUMN cg_fun_item.is_tenant IS '是否租户';
|
||||
COMMENT ON COLUMN cg_fun_item.describe IS '说明';
|
||||
COMMENT ON COLUMN cg_fun_item.sort_order IS '排序';
|
||||
|
||||
COMMENT ON TABLE cg_fun_module IS '模块配置';
|
||||
COMMENT ON COLUMN cg_fun_module.id IS 'id';
|
||||
COMMENT ON COLUMN cg_fun_module.module_code IS '模块编码';
|
||||
COMMENT ON COLUMN cg_fun_module.module_name IS '模块名称';
|
||||
COMMENT ON COLUMN cg_fun_module.package_name IS '包名称';
|
||||
COMMENT ON COLUMN cg_fun_module.api_package_name IS '参数包名';
|
||||
COMMENT ON COLUMN cg_fun_module.sort_order IS '排序';
|
||||
COMMENT ON COLUMN cg_fun_module.describe IS '描述';
|
||||
COMMENT ON TABLE cg_fun_item
|
||||
IS '功能项配置'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_fun_operation IS '操作配置';
|
||||
COMMENT ON COLUMN cg_fun_operation.id IS 'id';
|
||||
COMMENT ON COLUMN cg_fun_operation.module_id IS '模块ID';
|
||||
COMMENT ON COLUMN cg_fun_operation.item_id IS '功能ID(表主键ID)';
|
||||
COMMENT ON COLUMN cg_fun_operation.is_green_light IS '直接放行';
|
||||
COMMENT ON COLUMN cg_fun_operation.operation_id IS '操作ID';
|
||||
COMMENT ON COLUMN cg_fun_operation.operation_code IS '操作编码';
|
||||
COMMENT ON COLUMN cg_fun_operation.fun_name IS '操作名称';
|
||||
COMMENT ON COLUMN cg_fun_operation.fun_type IS '操作类型 > >查 > >改 > >删 > >增';
|
||||
COMMENT ON COLUMN cg_fun_operation.request_type IS '请求类型';
|
||||
COMMENT ON COLUMN cg_fun_operation.is_req_params IS '是否需要请求参数';
|
||||
COMMENT ON COLUMN cg_fun_operation.is_res_params IS '是否需要响应参数';
|
||||
COMMENT ON COLUMN cg_fun_operation.is_page IS '是否分页';
|
||||
COMMENT ON COLUMN cg_fun_operation.path_params IS '路径参数(与请求参数true互斥)';
|
||||
COMMENT ON COLUMN cg_fun_operation.usable_config IS '可配置数据类型json[]';
|
||||
COMMENT ON COLUMN cg_fun_operation.field_config IS '可配置字段';
|
||||
COMMENT ON COLUMN cg_fun_operation.sort_order IS '排序';
|
||||
COMMENT ON COLUMN cg_fun_operation.describe IS '说明说明';
|
||||
COMMENT ON COLUMN cg_fun_item.id
|
||||
IS 'id'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_menu IS '菜单';
|
||||
COMMENT ON COLUMN cg_menu.id IS '主键ID';
|
||||
COMMENT ON COLUMN cg_menu.client_type IS '客户端类型:0 PC端,1 小程序端,2 H5端';
|
||||
COMMENT ON COLUMN cg_menu.menu_name IS '菜单名称';
|
||||
COMMENT ON COLUMN cg_menu.parent_id IS '父菜单ID';
|
||||
COMMENT ON COLUMN cg_menu.fun_id IS '操作ID/来自操作表';
|
||||
COMMENT ON COLUMN cg_menu.menu_type IS '0菜单1按钮';
|
||||
COMMENT ON COLUMN cg_menu.path IS '路由路径';
|
||||
COMMENT ON COLUMN cg_menu.icon IS '菜单图标';
|
||||
COMMENT ON COLUMN cg_menu.is_tenant IS '是否租户';
|
||||
COMMENT ON COLUMN cg_menu.is_hide IS '是否隐藏';
|
||||
COMMENT ON COLUMN cg_menu.sort_order IS '排序';
|
||||
COMMENT ON COLUMN cg_fun_item.module_id
|
||||
IS '模块ID'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_role IS '角色表';
|
||||
COMMENT ON COLUMN cg_role.id IS '主键ID';
|
||||
COMMENT ON COLUMN cg_role.role_name IS '角色名称';
|
||||
COMMENT ON COLUMN cg_role.role_type IS '角色类型 0平台 1套餐';
|
||||
COMMENT ON COLUMN cg_fun_item.item_id
|
||||
IS '功能ID'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_role_fun IS '角色权限表';
|
||||
COMMENT ON COLUMN cg_role_fun.id IS '主键ID';
|
||||
COMMENT ON COLUMN cg_role_fun.role_id IS '角色ID';
|
||||
COMMENT ON COLUMN cg_role_fun.fun_id IS '操作ID';
|
||||
COMMENT ON COLUMN cg_role_fun.data_scope IS '数据权限默认:0无';
|
||||
COMMENT ON COLUMN cg_role_fun.assign_data_scope IS '指定的数据权限范围';
|
||||
COMMENT ON COLUMN cg_role_fun.exclude_field IS '排除的字段';
|
||||
COMMENT ON COLUMN cg_role_fun.client_type IS '客户端类型:0 PC端,1 小程序端,2 H5端';
|
||||
COMMENT ON COLUMN cg_fun_item.item_name
|
||||
IS '功能名称'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_template IS '模板表';
|
||||
COMMENT ON COLUMN cg_template.id IS '主键ID';
|
||||
COMMENT ON COLUMN cg_template.is_use IS '是否使用';
|
||||
COMMENT ON COLUMN cg_template.template_name IS '模板名称';
|
||||
COMMENT ON COLUMN cg_template.template_type IS '模板类型';
|
||||
COMMENT ON COLUMN cg_template.content IS '正文';
|
||||
COMMENT ON COLUMN cg_fun_item.item_code
|
||||
IS '功能编码'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_item.is_tenant
|
||||
IS '是否租户'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_item.describe
|
||||
IS '说明'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_item.sort_order
|
||||
IS '排序'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_fun_module
|
||||
IS '模块配置'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.id
|
||||
IS 'id'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.module_code
|
||||
IS '模块编码'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.module_name
|
||||
IS '模块名称'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.package_name
|
||||
IS '包名称'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.api_package_name
|
||||
IS '参数包名'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.sort_order
|
||||
IS '排序'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_module.describe
|
||||
IS '描述'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_fun_operation
|
||||
IS '操作配置'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.id
|
||||
IS 'id'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.module_id
|
||||
IS '模块ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.item_id
|
||||
IS '功能ID(表主键ID)'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.is_green_light
|
||||
IS '直接放行'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.operation_id
|
||||
IS '操作ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.operation_code
|
||||
IS '操作编码'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.fun_name
|
||||
IS '操作名称'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.fun_type
|
||||
IS '操作类型>>查>>改>>删>>增'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.request_type
|
||||
IS '请求类型'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.is_req_params
|
||||
IS '是否需要请求参数'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.is_res_params
|
||||
IS '是否需要响应参数'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.is_page
|
||||
IS '是否分页'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.path_params
|
||||
IS '路径参数(与请求参数true互斥)'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.usable_config
|
||||
IS '可配置数据类型json[]'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.field_config
|
||||
IS '可配置字段'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.sort_order
|
||||
IS '排序'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_fun_operation.describe
|
||||
IS '说明说明'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_menu
|
||||
IS '菜单'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.id
|
||||
IS '主键ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.client_type
|
||||
IS '客户端类型:0 PC端,1 小程序端,2 H5端'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.menu_name
|
||||
IS '菜单名称'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.parent_id
|
||||
IS '父菜单ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.fun_id
|
||||
IS '操作ID/来自操作表'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.menu_type
|
||||
IS '0菜单1按钮'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.path
|
||||
IS '路由路径'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.icon
|
||||
IS '菜单图标'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.is_tenant
|
||||
IS '是否租户'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.is_hide
|
||||
IS '是否隐藏'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_menu.sort_order
|
||||
IS '排序'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_role
|
||||
IS '角色表'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role.id
|
||||
IS '主键ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role.role_name
|
||||
IS '角色名称'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role.role_type
|
||||
IS '角色类型 0平台 1套餐'
|
||||
;
|
||||
|
||||
COMMENT ON TABLE cg_role_fun
|
||||
IS '角色权限表'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.id
|
||||
IS '主键ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.role_id
|
||||
IS '角色ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.fun_id
|
||||
IS '操作ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.data_scope
|
||||
IS '数据权限默认:0无'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.assign_data_scope
|
||||
IS '指定的数据权限范围'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.exclude_field
|
||||
IS '排除的字段'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_role_fun.client_type
|
||||
IS '客户端类型:0 PC端,1 小程序端,2 H5端'
|
||||
;
|
||||
|
||||
|
||||
|
||||
COMMENT ON COLUMN cg_template.id
|
||||
IS '主键ID'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_template.is_use
|
||||
IS '是否使用'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_template.template_name
|
||||
IS '模板名称'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_template.template_type
|
||||
IS '模板类型'
|
||||
;
|
||||
|
||||
COMMENT ON COLUMN cg_template.content
|
||||
IS '正文'
|
||||
;
|
||||
|
||||
CREATE SEQUENCE cg_template_id_seq INCREMENT 1 START 1
|
||||
;
|
||||
|
||||
CREATE SEQUENCE cg_template_id_seq INCREMENT 1 START 1;
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class $basics.itemCodeUp$Controller {
|
||||
$operationList:{op |
|
||||
|
||||
@OperLog
|
||||
@SecureAudit(id = $op.id$,$if(op.isGreenLight)$isGreenLight = true,$endif$ $if(!op.isTenant)$isTenant = false,$endif$
|
||||
@SecureAudit(id = $op.id$,$if(op.isGreenLight)$isGreenLight = true,$endif$ $if(!item.isTenant)$isTenant = false,$endif$
|
||||
funType = FunTypeEnum.$op.funType$, funName = "$op.funName$", funCode = "$module.moduleCode$:$item.itemCode$:$op.operationCode$")
|
||||
@Operation(summary = "$op.funName$", description = "$op.describe$")
|
||||
$requestAnnotations.(op.requestType)$("$op.url$$op.pathParamsUrl$")
|
||||
@@ -342,16 +342,16 @@ operationTemplate(operation) ::= <<
|
||||
<changeSet id="insert-ms-fun-operation-data" author="xinghe">
|
||||
<comment>初始化操作数据</comment>
|
||||
$operation:{op |
|
||||
<insert tableName="ms_fun_item">
|
||||
<insert tableName="ms_fun_operation">
|
||||
<column name="id" value="$op.id$"/>
|
||||
<column name="module_id" value="$op.moduleId$"/>
|
||||
<column name="item_id" value="$op.itemId$"/>
|
||||
<column name="is_green_light" value="$op.isGreenLight$"/>
|
||||
<column name="fun_code" value="$op.operationCode$"/>
|
||||
<column name="fun_code" value="$op.moduleCode$:$op.itemCode$:$op.operationCode$"/>
|
||||
<column name="fun_name" value="$op.funName$"/>
|
||||
<column name="fun_type" value="$funTypeAnnotations.(op.funType)$"/>
|
||||
<column name="usable_config" value="$op.usableConfigJson$"/>
|
||||
<column name="field_cofnig" value="$op.fieldConfigJson$"/>
|
||||
<column name="field_config" value="$op.fieldConfigJson$"/>
|
||||
<column name="sort_order" value="$op.sortOrder$"/>
|
||||
<column name="describe" value="$op.describe$"/>
|
||||
</insert>
|
||||
|
||||
Binary file not shown.
@@ -5,20 +5,19 @@ import com.cczsa.xinghe.codegen.entity.enums.MenuTypeEnum;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 菜单 实体类。
|
||||
*
|
||||
* @author My
|
||||
* @author xiayb
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Data
|
||||
@@ -68,6 +67,11 @@ public class MenuEntity extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 页面路径
|
||||
*/
|
||||
private String pagePath;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,6 @@ public class CodeGen implements Serializable {
|
||||
@Schema(description = "功能ID")
|
||||
private Long itemId;
|
||||
|
||||
@Schema(description = "模块ID")
|
||||
private Long moduleId;
|
||||
|
||||
|
||||
@Hidden
|
||||
@AssertTrue(message = "当代码生成类型为 CONTROLLER 时,功能ID不能为空")
|
||||
@@ -42,15 +39,5 @@ public class CodeGen implements Serializable {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Hidden
|
||||
@AssertTrue(message = "当代码生成类型为 MODULE_DATA_INFO 时,模块ID不能为空")
|
||||
public boolean isModuleIdValid() {
|
||||
if (codeGenType == CodeGenType.MODULE_DATA_INFO) {
|
||||
return moduleId != null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ import lombok.Getter;
|
||||
public enum CodeGenType {
|
||||
|
||||
CONTROLLER(0, "controller"),
|
||||
MODULE_DATA_INFO(1, "module_data_info");
|
||||
MODULE_DATA_INFO(1, "module_data_info"),
|
||||
role_permission(2,"role_permission");
|
||||
|
||||
private final int code;
|
||||
private final String desc;
|
||||
|
||||
@@ -15,6 +15,22 @@ import lombok.EqualsAndHashCode;
|
||||
@Data
|
||||
public class FunOperationTemp extends FunOperationEntity {
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
private String moduleName;
|
||||
/**
|
||||
* 模块编码
|
||||
*/
|
||||
private String moduleCode;
|
||||
/**
|
||||
* 功能名称
|
||||
*/
|
||||
private String itemName;
|
||||
/**
|
||||
* 功能编码
|
||||
*/
|
||||
private String itemCode;
|
||||
/**
|
||||
* URL路径
|
||||
*/
|
||||
|
||||
@@ -29,4 +29,7 @@ public class FunItemQueryReq implements Serializable {
|
||||
@Schema(description = "功能编码")
|
||||
private String itemCode;
|
||||
|
||||
@Schema(description = "是否租户")
|
||||
private Boolean isTenant;
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cczsa.xinghe.codegen.entity.enums.ClientTypeEnum;
|
||||
import com.cczsa.xinghe.codegen.entity.enums.MenuTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -35,6 +36,10 @@ public class MenuAddReq implements Serializable {
|
||||
@Schema(description = "父菜单ID")
|
||||
private Long parentId = 0L;
|
||||
|
||||
@Pattern(
|
||||
regexp = "^(?:$|/(?:[a-zA-Z0-9_=?#&-]+/)*[a-zA-Z0-9_=?#&-]+)$",
|
||||
message = "路由路径格式不正确:必须以'/'开头,不能以'/'结尾,且只能包含字母、数字、下划线、横杠、等号、问号、井号、与号,以及分隔斜杠(不能连续)"
|
||||
)
|
||||
@Schema(description = "路由路径")
|
||||
private String path;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
||||
/**
|
||||
* 菜单 映射层。
|
||||
*
|
||||
* @author My
|
||||
* @author xiayb
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Mapper
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.io.Serial;
|
||||
/**
|
||||
* 菜单 表定义层。
|
||||
*
|
||||
* @author My
|
||||
* @author xiayb
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class MenuDef extends TableDef {
|
||||
@@ -61,6 +61,11 @@ public class MenuDef extends TableDef {
|
||||
*/
|
||||
public final QueryColumn MENU_TYPE = new QueryColumn(this, "menu_type");
|
||||
|
||||
/**
|
||||
* 页面路径
|
||||
*/
|
||||
public final QueryColumn PAGE_PATH = new QueryColumn(this, "page_path");
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
@@ -84,7 +89,7 @@ public class MenuDef extends TableDef {
|
||||
/**
|
||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||
*/
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, CLIENT_TYPE, MENU_NAME, PARENT_ID, FUN_ID, MENU_TYPE, PATH, ICON, IS_TENANT, IS_HIDE, SORT_ORDER};
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, CLIENT_TYPE, MENU_NAME, PARENT_ID, FUN_ID, MENU_TYPE, PATH, PAGE_PATH, ICON, IS_TENANT, IS_HIDE, SORT_ORDER};
|
||||
|
||||
public MenuDef() {
|
||||
super("", "cg_menu");
|
||||
|
||||
@@ -8,6 +8,9 @@ import com.cczsa.xinghe.codegen.entity.enums.TemplateTypeEnum;
|
||||
import com.cczsa.xinghe.codegen.mapper.FunItemMapper;
|
||||
import com.cczsa.xinghe.codegen.mapper.FunModuleMapper;
|
||||
import com.cczsa.xinghe.codegen.mapper.FunOperationMapper;
|
||||
import com.cczsa.xinghe.codegen.mapper.def.FunItemDef;
|
||||
import com.cczsa.xinghe.codegen.mapper.def.FunModuleDef;
|
||||
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;
|
||||
@@ -47,12 +50,6 @@ public class ModuleDataInfoCreate extends NodeComponent {
|
||||
|
||||
@Override
|
||||
public void process() throws Exception {
|
||||
Long moduleId = this.getContextBean(Long.class);
|
||||
|
||||
FunModuleEntity moduleEntity = funModuleMapper.selectOneById(moduleId);
|
||||
if (moduleEntity == null){
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取 模版
|
||||
String template = templateService.getTemplateTypeContent(TemplateTypeEnum.MODULE_DATA_INFO);
|
||||
@@ -83,7 +80,17 @@ public class ModuleDataInfoCreate extends NodeComponent {
|
||||
|
||||
ST operationTemplate = group.getInstanceOf("operationTemplate"); // 使用正确的模板名称
|
||||
// 操作数据生成
|
||||
List<FunOperationTemp> funOperationEntities = funOperationMapper.selectListByQueryAs(QueryWrapper.create(),FunOperationTemp.class);
|
||||
FunModuleDef moduleDef = FunModuleDef.FUN_MODULE_ENTITY;
|
||||
FunItemDef itemDefDef = FunItemDef.FUN_ITEM_ENTITY;
|
||||
FunOperationDef operationDef = FunOperationDef.FUN_OPERATION_ENTITY;
|
||||
|
||||
QueryWrapper wrapper = QueryWrapper.create();
|
||||
wrapper.select(operationDef.ALL_COLUMNS,moduleDef.MODULE_NAME,moduleDef.MODULE_CODE,itemDefDef.ITEM_NAME,itemDefDef.ITEM_CODE)
|
||||
.from(operationDef)
|
||||
.leftJoin(moduleDef).on(operationDef.MODULE_ID.eq(moduleDef.ID))
|
||||
.leftJoin(itemDefDef).on(operationDef.ITEM_ID.eq(itemDefDef.ID))
|
||||
.where(operationDef.ID.isNotNull());
|
||||
List<FunOperationTemp> funOperationEntities = funOperationMapper.selectListByQueryAs(wrapper,FunOperationTemp.class);
|
||||
funOperationEntities.sort(Comparator.comparing(FunOperationEntity::getId));
|
||||
funOperationEntities.forEach(FunOperationTemp::info);
|
||||
operationTemplate.add("operation", funOperationEntities);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cczsa.xinghe.codegen.service.impl;
|
||||
|
||||
import com.cczsa.xinghe.codegen.entity.FunItemEntity;
|
||||
import com.cczsa.xinghe.codegen.entity.FunModuleEntity;
|
||||
import com.cczsa.xinghe.codegen.entity.domain.template.CodeGen;
|
||||
import com.cczsa.xinghe.codegen.entity.domain.template.CodeGenType;
|
||||
import com.cczsa.xinghe.codegen.mapper.FunItemMapper;
|
||||
@@ -43,20 +42,10 @@ public class CodeGenServiceImpl implements CodeGenService {
|
||||
id = req.getItemId();
|
||||
}
|
||||
|
||||
if(req.getCodeGenType() == CodeGenType.MODULE_DATA_INFO){
|
||||
FunModuleEntity funModuleEntity = funModuleMapper.selectOneById(req.getModuleId());
|
||||
if (funModuleEntity == null) {
|
||||
return null;
|
||||
}
|
||||
id = req.getModuleId();
|
||||
}
|
||||
|
||||
if(id != null){
|
||||
LiteflowResponse response = flowExecutor.execute2Resp(req.getCodeGenType().getDesc(),null,id);
|
||||
log.info("执行结果:{}",response);
|
||||
if (response.isSuccess()) {
|
||||
return (byte[]) response.getSlot().getResponseData();
|
||||
}
|
||||
LiteflowResponse response = flowExecutor.execute2Resp(req.getCodeGenType().getDesc(),null,id);
|
||||
log.info("执行结果:{}",response);
|
||||
if (response.isSuccess()) {
|
||||
return (byte[]) response.getSlot().getResponseData();
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -51,6 +51,7 @@ public class FunItemServiceImpl implements FunItemService {
|
||||
.from(funItemDef)
|
||||
.join(funModuleDef).on(funItemDef.MODULE_ID.eq(funModuleDef.ID))
|
||||
.eq(FunItemEntity::getModuleId, req.getModuleId(), ObjectUtil.areNotNull(req.getModuleId()))
|
||||
.eq(FunItemEntity::getIsTenant, req.getIsTenant(), ObjectUtil.areNotNull(req.getIsTenant()))
|
||||
.like(FunItemEntity::getItemName, req.getItemName(), StrUtil.isNotBlank(req.getItemName()))
|
||||
.like(FunItemEntity::getItemCode, req.getItemCode(), StrUtil.isNotBlank(req.getItemCode()))
|
||||
.orderBy(FunItemEntity::getSortOrder, false);
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cczsa.xinghe.codegen.entity.FunOperationEntity;
|
||||
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
||||
import com.cczsa.xinghe.codegen.entity.RoleEntity;
|
||||
import com.cczsa.xinghe.codegen.entity.RoleFunEntity;
|
||||
import com.cczsa.xinghe.codegen.entity.enums.RoleTypeEnum;
|
||||
import com.cczsa.xinghe.codegen.entity.enums.UsableConfigEnum;
|
||||
import com.cczsa.xinghe.codegen.entity.req.role.RoleAddReq;
|
||||
import com.cczsa.xinghe.codegen.entity.req.role.RoleBindFunReq;
|
||||
@@ -212,6 +213,14 @@ public class RoleServiceImpl implements RoleService {
|
||||
*/
|
||||
@Override
|
||||
public XResult<List<RoleQueryFunRes>> queryRoleFun(RoleQueryFunReq req) {
|
||||
// 获取角色
|
||||
RoleEntity roleEntity = roleMapper.selectOneById(req.getRoleId());
|
||||
if (roleEntity == null) {
|
||||
return XResult.failed("角色不存在");
|
||||
}
|
||||
RoleTypeEnum roleType = roleEntity.getRoleType();
|
||||
boolean isTenant = roleType == RoleTypeEnum.PACKAGE;
|
||||
|
||||
// 获取菜单
|
||||
MenuDef menuDef = MenuDef.MENU_ENTITY;
|
||||
FunOperationDef funOperationDef = FunOperationDef.FUN_OPERATION_ENTITY;
|
||||
@@ -228,6 +237,7 @@ public class RoleServiceImpl implements RoleService {
|
||||
.from(menuDef)
|
||||
.leftJoin(funOperationDef).on(menuDef.FUN_ID.eq(funOperationDef.ID))
|
||||
.eq(MenuEntity::getClientType, req.getClientType())
|
||||
.eq(MenuEntity::getIsTenant, isTenant)
|
||||
.orderBy(MenuEntity::getSortOrder, false);
|
||||
List<RoleQueryFunRes> roleQueryFunList = menuMapper.selectListByQueryAs(queryMenu, RoleQueryFunRes.class);
|
||||
// 获取角色功能权限
|
||||
@@ -239,6 +249,10 @@ public class RoleServiceImpl implements RoleService {
|
||||
.eq(RoleFunEntity::getRoleId, req.getRoleId());
|
||||
List<RoleFunEntity> roleFunEntities = roleFunMapper.selectListByQuery(queryRoleFun);
|
||||
for (RoleQueryFunRes roleQueryFunRes : roleQueryFunList) {
|
||||
if(isTenant){
|
||||
roleQueryFunRes.setUsableConfig(new ArrayList<>());
|
||||
roleQueryFunRes.setFieldConfig(new ArrayList<>());
|
||||
}
|
||||
// 获取菜单功能
|
||||
RoleFunEntity roleFunEntity = roleFunEntities.stream()
|
||||
.filter(entity -> entity.getFunId().equals(roleQueryFunRes.getFunId()))
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/app-loading.css" />
|
||||
<title>功能管理</title>
|
||||
<script type="module" crossorigin src="/static/index-380a124d.js"></script>
|
||||
<script type="module" crossorigin src="/static/index-65b53bc7.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/static/vue-5ea6dbbd.js">
|
||||
<link rel="modulepreload" crossorigin href="/static/element-a57cc571.js">
|
||||
<link rel="modulepreload" crossorigin href="/static/vxe-830e4310.js">
|
||||
|
||||
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-380a124d.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-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};
|
||||
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{h as O}from"./index-e628964d.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-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};
|
||||
File diff suppressed because one or more lines are too long
1
src/main/resources/static/static/index-1580db42.js
Normal file
1
src/main/resources/static/static/index-1580db42.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{e}from"./index-380a124d.js";function r(o){return e({url:"/codegen/download",method:"post",data:o,responseType:"blob"})}export{r as c};
|
||||
import{e}from"./index-65b53bc7.js";function r(o){return e({url:"/codegen/download",method:"post",data:o,responseType:"blob"})}export{r as c};
|
||||
1
src/main/resources/static/static/index-1cca6468.css
Normal file
1
src/main/resources/static/static/index-1cca6468.css
Normal file
@@ -0,0 +1 @@
|
||||
.search-wrapper[data-v-25594890]{margin-bottom:20px}.search-wrapper[data-v-25594890] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-25594890]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-25594890]{margin-bottom:20px}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
.search-wrapper[data-v-ca91c9a5]{margin-bottom:20px}.search-wrapper[data-v-ca91c9a5] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-ca91c9a5]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-ca91c9a5]{margin-bottom:20px}
|
||||
1
src/main/resources/static/static/index-4dcc4407.css
Normal file
1
src/main/resources/static/static/index-4dcc4407.css
Normal file
@@ -0,0 +1 @@
|
||||
.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}
|
||||
1
src/main/resources/static/static/index-4f2efa93.js
Normal file
1
src/main/resources/static/static/index-4f2efa93.js
Normal file
File diff suppressed because one or more lines are too long
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{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-380a124d.js";import{t as M,v as N}from"./element-a57cc571.js";import{_ as q}from"./index.vue_vue_type_script_setup_true_lang-cc3fa793.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-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};
|
||||
@@ -1 +1 @@
|
||||
import{_ as c,c as a}from"./index-380a124d.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-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};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
.search-wrapper[data-v-92adff16]{margin-bottom:20px}.search-wrapper[data-v-92adff16] .el-card__body{padding-bottom:2px}.toolbar-wrapper[data-v-92adff16]{display:flex;justify-content:space-between;margin-bottom:20px}.table-wrapper[data-v-92adff16]{margin-bottom:20px}
|
||||
@@ -1 +1 @@
|
||||
import{e as t}from"./index-380a124d.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-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};
|
||||
@@ -1 +1 @@
|
||||
import{e as t}from"./index-380a124d.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-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};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{d as k}from"./index-380a124d.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-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 _};
|
||||
Reference in New Issue
Block a user