From f6f72ea7b23162630fb670e2780f5b61d52a888d Mon Sep 17 00:00:00 2001 From: mhsnet Date: Wed, 24 May 2023 15:21:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yxgw/controller/YxgwNewsController.java | 2 +- .../modules/demo/yxgw/entity/YxgwNews.java | 14 ++- .../demo/yxgw/entity/YxgwSolution.java | 29 ++++-- .../demo/yxgw/mapper/YxgwNewsMapper.java | 2 +- .../demo/yxgw/service/IYxgwNewsService.java | 2 +- .../service/impl/YxgwNewsServiceImpl.java | 2 +- .../demo/yxgw/vue3/YxgwCase_menu_insert.sql | 14 +-- .../modules/demo/yxgw/vue3/YxgwNews.data.ts | 29 ++++-- .../demo/yxgw/vue3/YxgwNews_menu_insert.sql | 14 +-- .../demo/yxgw/vue3/YxgwSolution.data.ts | 62 +++++++++--- .../demo/yxgw/vue3/YxgwSolutionList.vue | 18 ++++ .../yxgw/vue3/YxgwSolution_menu_insert.sql | 14 +-- .../demo/yxgwf/controller/NewsController.java | 2 +- .../yxgwf/controller/SolutionController.java | 8 +- .../jeecg/modules/demo/yxgwf/entity/Case.java | 95 ++++++++++--------- .../jeecg/modules/demo/yxgwf/entity/News.java | 91 ++++++++++-------- .../modules/demo/yxgwf/entity/Solution.java | 52 ++++++++-- .../src/views/yxgw/YxgwCase_menu_insert.sql | 14 +-- .../src/views/yxgw/YxgwNews.data.ts | 29 ++++-- .../src/views/yxgw/YxgwNews_menu_insert.sql | 14 +-- .../src/views/yxgw/YxgwSolution.data.ts | 62 +++++++++--- .../src/views/yxgw/YxgwSolutionList.vue | 18 ++++ .../views/yxgw/YxgwSolution_menu_insert.sql | 14 +-- 23 files changed, 401 insertions(+), 200 deletions(-) diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/controller/YxgwNewsController.java b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/controller/YxgwNewsController.java index a792aae..e62b140 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/controller/YxgwNewsController.java +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/controller/YxgwNewsController.java @@ -40,7 +40,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; /** * @Description: 资讯动态 * @Author: jeecg-boot - * @Date: 2023-05-23 + * @Date: 2023-05-24 * @Version: V1.0 */ @Api(tags="资讯动态") diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwNews.java b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwNews.java index c662409..5bdb70a 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwNews.java +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwNews.java @@ -21,7 +21,7 @@ import lombok.experimental.Accessors; /** * @Description: 资讯动态 * @Author: jeecg-boot - * @Date: 2023-05-23 + * @Date: 2023-05-24 * @Version: V1.0 */ @Data @@ -63,16 +63,20 @@ public class YxgwNews implements Serializable { @Excel(name = "类型", width = 15) @ApiModelProperty(value = "类型") private java.lang.String type; + /**图片*/ + @Excel(name = "图片", width = 15) + @ApiModelProperty(value = "图片") + private java.lang.String img; /**日期*/ @Excel(name = "日期", width = 15, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "日期") private java.util.Date date; - /**图片*/ - @Excel(name = "图片", width = 15) - @ApiModelProperty(value = "图片") - private java.lang.String img; + /**是否发布*/ + @Excel(name = "是否发布", width = 15) + @ApiModelProperty(value = "是否发布") + private java.lang.String isshow; /**描述*/ @Excel(name = "描述", width = 15) @ApiModelProperty(value = "描述") diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwSolution.java b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwSolution.java index b2e5933..d0da0c2 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwSolution.java +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/entity/YxgwSolution.java @@ -55,24 +55,37 @@ public class YxgwSolution implements Serializable { /**所属部门*/ @ApiModelProperty(value = "所属部门") private java.lang.String sysOrgCode; - /**所属行业|方案名称*/ - @Excel(name = "所属行业|方案名称", width = 15) - @ApiModelProperty(value = "所属行业|方案名称") - private java.lang.String name; - /**方案描述*/ - @Excel(name = "方案描述", width = 15) - @ApiModelProperty(value = "方案描述") - private java.lang.String des; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**所属行业*/ + @Excel(name = "所属行业", width = 15) + @ApiModelProperty(value = "所属行业") + private java.lang.String industry; /**方案图片*/ @Excel(name = "方案图片", width = 15) @ApiModelProperty(value = "方案图片") private java.lang.String img; + /**案例列表*/ + @Excel(name = "案例列表", width = 15, dictTable = "yxgw_case", dicText = "customer", dicCode = "id") + @Dict(dictTable = "yxgw_case", dicText = "customer", dicCode = "id") + @ApiModelProperty(value = "案例列表") + private java.lang.String cases; /**发布日期*/ @Excel(name = "发布日期", width = 15, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "发布日期") private java.util.Date date; + /**是否发布*/ + @Excel(name = "是否发布", width = 15) + @ApiModelProperty(value = "是否发布") + private java.lang.String isshow; + /**方案描述*/ + @Excel(name = "方案描述", width = 15) + @ApiModelProperty(value = "方案描述") + private java.lang.String des; /**方案内容*/ @Excel(name = "方案内容", width = 15) @ApiModelProperty(value = "方案内容") diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/mapper/YxgwNewsMapper.java b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/mapper/YxgwNewsMapper.java index f03d962..3832387 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/mapper/YxgwNewsMapper.java +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/mapper/YxgwNewsMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 资讯动态 * @Author: jeecg-boot - * @Date: 2023-05-23 + * @Date: 2023-05-24 * @Version: V1.0 */ public interface YxgwNewsMapper extends BaseMapper { diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/IYxgwNewsService.java b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/IYxgwNewsService.java index 5d74068..ceeb357 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/IYxgwNewsService.java +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/IYxgwNewsService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 资讯动态 * @Author: jeecg-boot - * @Date: 2023-05-23 + * @Date: 2023-05-24 * @Version: V1.0 */ public interface IYxgwNewsService extends IService { diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/impl/YxgwNewsServiceImpl.java b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/impl/YxgwNewsServiceImpl.java index e7fd83a..5d3152e 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/impl/YxgwNewsServiceImpl.java +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/service/impl/YxgwNewsServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 资讯动态 * @Author: jeecg-boot - * @Date: 2023-05-23 + * @Date: 2023-05-24 * @Version: V1.0 */ @Service diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwCase_menu_insert.sql b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwCase_menu_insert.sql index f129b87..398ce32 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwCase_menu_insert.sql +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwCase_menu_insert.sql @@ -3,24 +3,24 @@ INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) -VALUES ('2023052410192170020', NULL, '客户案例', '/yxgw/yxgwCaseList', 'yxgw/YxgwCaseList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0); +VALUES ('2023052401568400450', NULL, '客户案例', '/yxgw/yxgwCaseList', 'yxgw/YxgwCaseList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0); -- 权限控制sql -- 新增 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052410192170021', '2023052410192170020', '添加客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401568400451', '2023052401568400450', '添加客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0, 0, '1', 0); -- 编辑 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052410192170022', '2023052410192170020', '编辑客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401568400452', '2023052401568400450', '编辑客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0, 0, '1', 0); -- 删除 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052410192170023', '2023052410192170020', '删除客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401568400453', '2023052401568400450', '删除客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0, 0, '1', 0); -- 批量删除 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052410192170024', '2023052410192170020', '批量删除客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401568400454', '2023052401568400450', '批量删除客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0, 0, '1', 0); -- 导出excel INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052410192170025', '2023052410192170020', '导出excel_客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401568400455', '2023052401568400450', '导出excel_客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0, 0, '1', 0); -- 导入excel INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052410192170026', '2023052410192170020', '导入excel_客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 10:19:02', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file +VALUES ('2023052401568400456', '2023052401568400450', '导入excel_客户案例', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_case:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:45', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews.data.ts b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews.data.ts index ea7981e..0a71951 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews.data.ts +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews.data.ts @@ -17,6 +17,12 @@ export const columns: BasicColumn[] = [ return render.renderCategoryTree(text,'C03A01') }, }, + { + title: '图片', + align:"center", + dataIndex: 'img', + customRender:render.renderImage, + }, { title: '日期', align:"center", @@ -26,10 +32,12 @@ export const columns: BasicColumn[] = [ }, }, { - title: '图片', + title: '是否发布', align:"center", - dataIndex: 'img', - customRender:render.renderImage, + dataIndex: 'isshow', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]) + }, }, { title: '描述', @@ -55,17 +63,24 @@ export const formSchema: FormSchema[] = [ pcode:"C03A01", //TODO back和事件未添加,暂时有问题 }, }, + { + label: '图片', + field: 'img', + component: 'JImageUpload', + componentProps:{ + }, + }, { label: '日期', field: 'date', component: 'DatePicker', }, { - label: '图片', - field: 'img', - component: 'JImageUpload', + label: '是否发布', + field: 'isshow', + component: 'JSwitch', componentProps:{ - }, + }, }, { label: '描述', diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews_menu_insert.sql b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews_menu_insert.sql index d4bc61f..ba45236 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews_menu_insert.sql +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwNews_menu_insert.sql @@ -3,24 +3,24 @@ INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) -VALUES ('2023052301573510160', NULL, '资讯动态', '/yxgw/yxgwNewsList', 'yxgw/YxgwNewsList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0); +VALUES ('2023052401562420100', NULL, '资讯动态', '/yxgw/yxgwNewsList', 'yxgw/YxgwNewsList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0); -- 权限控制sql -- 新增 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052301573510161', '2023052301573510160', '添加资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401562430101', '2023052401562420100', '添加资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0, 0, '1', 0); -- 编辑 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052301573510162', '2023052301573510160', '编辑资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401562430102', '2023052401562420100', '编辑资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0, 0, '1', 0); -- 删除 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052301573510163', '2023052301573510160', '删除资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401562430103', '2023052401562420100', '删除资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0, 0, '1', 0); -- 批量删除 INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052301573510164', '2023052301573510160', '批量删除资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401562430104', '2023052401562420100', '批量删除资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0, 0, '1', 0); -- 导出excel INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052301573510165', '2023052301573510160', '导出excel_资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0, 0, '1', 0); +VALUES ('2023052401562430105', '2023052401562420100', '导出excel_资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0, 0, '1', 0); -- 导入excel INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) -VALUES ('2023052301573510166', '2023052301573510160', '导入excel_资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-23 13:57:16', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file +VALUES ('2023052401562430106', '2023052401562420100', '导入excel_资讯动态', NULL, NULL, 0, NULL, NULL, 2, 'yxgw:yxgw_news:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-24 13:56:10', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolution.data.ts b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolution.data.ts index df502fc..b3952a6 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolution.data.ts +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolution.data.ts @@ -5,14 +5,17 @@ import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ { - title: '所属行业|方案名称', + title: '标题', align:"center", - dataIndex: 'name' + dataIndex: 'title' }, { - title: '方案描述', + title: '所属行业', align:"center", - dataIndex: 'des' + dataIndex: 'industry', + customRender:({text}) => { + return render.renderCategoryTree(text,'C03A02') + }, }, { title: '方案图片', @@ -20,6 +23,11 @@ export const columns: BasicColumn[] = [ dataIndex: 'img', customRender:render.renderImage, }, + { + title: '案例列表', + align:"center", + dataIndex: 'cases_dictText' + }, { title: '发布日期', align:"center", @@ -29,10 +37,17 @@ export const columns: BasicColumn[] = [ }, }, { - title: '方案内容', + title: '是否发布', align:"center", - dataIndex: 'article', - slots: { customRender: 'htmlSlot' }, + dataIndex: 'isshow', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]) + }, + }, + { + title: '方案描述', + align:"center", + dataIndex: 'des' }, ]; //查询数据 @@ -41,14 +56,17 @@ export const searchFormSchema: FormSchema[] = [ //表单数据 export const formSchema: FormSchema[] = [ { - label: '所属行业|方案名称', - field: 'name', + label: '标题', + field: 'title', component: 'Input', }, { - label: '方案描述', - field: 'des', - component: 'InputTextArea', + label: '所属行业', + field: 'industry', + component: 'JCategorySelect', + componentProps:{ + pcode:"C03A02", //TODO back和事件未添加,暂时有问题 + }, }, { label: '方案图片', @@ -57,11 +75,31 @@ export const formSchema: FormSchema[] = [ componentProps:{ }, }, + { + label: '案例列表', + field: 'cases', + component: 'JSelectMultiple', + componentProps:{ + dictCode:"yxgw_case,customer,id" + }, + }, { label: '发布日期', field: 'date', component: 'DatePicker', }, + { + label: '是否发布', + field: 'isshow', + component: 'JSwitch', + componentProps:{ + }, + }, + { + label: '方案描述', + field: 'des', + component: 'InputTextArea', + }, { label: '方案内容', field: 'article', diff --git a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolutionList.vue b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolutionList.vue index 083180e..d7f3b10 100644 --- a/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolutionList.vue +++ b/linus-boot/linus-module-demo/src/main/java/org/jeecg/modules/demo/yxgw/vue3/YxgwSolutionList.vue @@ -52,6 +52,9 @@ import {columns, searchFormSchema} from './YxgwSolution.data'; import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './YxgwSolution.api'; import { downloadFile } from '/@/utils/common/renderUtils'; + import { loadCategoryData } from '/@/api/common/api' + import { getAuthCache, setAuthCache } from '/@/utils/auth'; + import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum'; const checkedKeys = ref>([]); //注册model const [registerModal, {openModal}] = useModal(); @@ -166,6 +169,21 @@ } + /** + * 初始化字典配置 + */ + function initDictConfig(){ + loadCategoryData({code:'C03A02'}).then((res) => { + if (res) { + let allDictDate = getAuthCache(DB_DICT_DATA_KEY); + if(!allDictDate['C03A02']){ + Object.assign(allDictDate,{'C03A02':res}) + } + setAuthCache(DB_DICT_DATA_KEY,allDictDate) + } + }) + } + initDictConfig();