diff --git a/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 40fb3e64..2cd56b12 100644 --- a/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -98,6 +98,7 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码 filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码 filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除 + filterChainDefinitionMap.put("/cms/front/**", "anon"); //cms不拦截 //CMS门户 filterChainDefinitionMap.put("/cms/front/**","anon"); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java index 8a9abd1a..b1fd405d 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java @@ -16,8 +16,10 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.modules.demo.cms.entity.CmsArticle; import org.jeecg.modules.demo.cms.entity.CmsColumn; +import org.jeecg.modules.demo.cms.entity.Subweside; import org.jeecg.modules.demo.cms.service.ICmsArticleService; import org.jeecg.modules.demo.cms.service.ICmsColumnService; +import org.jeecg.modules.demo.cms.service.ISubwesideService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.*; @@ -27,6 +29,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; /** * @Description: 文章 @@ -44,6 +48,9 @@ public class CmsArticleController extends JeecgController subwesideQueryWrapper = new QueryWrapper<>(); + subwesideQueryWrapper.in("id", principal.getId()); + List subwesideList = subwesideService.list(subwesideQueryWrapper); + if (!subwesideList.isEmpty()) { + List subnames = subwesideList.stream() + .map(Subweside::getSubname) // 将每个Subweside对象映射到其subname字段 + .collect(Collectors.toList()); // 收集结果到List + String joinedString = String.join(", ", subnames); + cmsArticle.setSource("来自子站:"+joinedString); + }else { + cmsArticle.setSource("来自子站管理员"); + } cmsArticleService.save(cmsArticle); return Result.OK("添加成功!"); } @@ -111,10 +130,23 @@ public class CmsArticleController extends JeecgController edit(@RequestBody CmsArticle cmsArticle) { + LoginUser principal = (LoginUser) SecurityUtils.getSubject().getPrincipal(); CmsColumn cmsColumn = cmsColumnService.getById(cmsArticle.getColumnId()); if (!ObjectUtils.isEmpty(cmsColumn)) { cmsArticle.setColumnName(cmsColumn.getName()); } + QueryWrapper subwesideQueryWrapper = new QueryWrapper<>(); + subwesideQueryWrapper.in("id", principal.getId()); + List subwesideList = subwesideService.list(subwesideQueryWrapper); + if (!subwesideList.isEmpty()) { + List subnames = subwesideList.stream() + .map(Subweside::getSubname) // 将每个Subweside对象映射到其subname字段 + .collect(Collectors.toList()); // 收集结果到List + String joinedString = String.join(", ", subnames); + cmsArticle.setSource("来自子站:"+joinedString); + }else { + cmsArticle.setSource("管理员"); + } cmsArticleService.updateById(cmsArticle); return Result.OK("编辑成功!"); } diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsArticle.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsArticle.java index 80877bee..2795cdc0 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsArticle.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsArticle.java @@ -110,4 +110,18 @@ public class CmsArticle implements Serializable { @Excel(name = "源url", width = 15) @ApiModelProperty(value = "源url") private String originUrl; + + /**文章图片*/ + @Excel(name = "文章图片", width = 15) + @ApiModelProperty(value = "文章图片") + private java.lang.String comimg; + /**文章文件*/ + @Excel(name = "文章文件", width = 15) + @ApiModelProperty(value = "文章文件") + private java.lang.String comfile; + /**文章来源*/ + @Excel(name = "文章来源", width = 15, dictTable = "subweside", dicText = "subname", dicCode = "id") + @Dict(dictTable = "subweside", dicText = "subname", dicCode = "id") + @ApiModelProperty(value = "文章来源") + private java.lang.String artfrom; } diff --git a/jeecgboot-vue3-master/src/assets/images/mainHome/div.png b/jeecgboot-vue3-master/src/assets/images/mainHome/div.png index 26b82341..209cfcde 100644 Binary files a/jeecgboot-vue3-master/src/assets/images/mainHome/div.png and b/jeecgboot-vue3-master/src/assets/images/mainHome/div.png differ diff --git a/jeecgboot-vue3-master/src/views/cms/admin/articel/CmsArticle.data.ts b/jeecgboot-vue3-master/src/views/cms/admin/articel/CmsArticle.data.ts index 6d891f67..bb90e4f9 100644 --- a/jeecgboot-vue3-master/src/views/cms/admin/articel/CmsArticle.data.ts +++ b/jeecgboot-vue3-master/src/views/cms/admin/articel/CmsArticle.data.ts @@ -123,6 +123,30 @@ export const formSchema: FormSchema[] = [ field: 'originUrl', component: 'Input', }, + + { + label: '文章图片', + field: 'comimg', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '文章文件', + field: 'comfile', + component: 'JUpload', + componentProps:{ + }, + }, +/* { + label: '文章来源', + field: 'artfrom', + component: 'JSearchSelect', + componentProps:{ + dict: "subweside,subname,id" + }, + },*/ + // TODO 主键隐藏字段,目前写死为ID { label: '', diff --git a/jeecgboot-vue3-master/src/views/demo/main-home/components/homePage/index.vue b/jeecgboot-vue3-master/src/views/demo/main-home/components/homePage/index.vue index 5378f1a0..8ace4756 100644 --- a/jeecgboot-vue3-master/src/views/demo/main-home/components/homePage/index.vue +++ b/jeecgboot-vue3-master/src/views/demo/main-home/components/homePage/index.vue @@ -49,10 +49,10 @@ -
待定...
+
查看更多>> @@ -174,10 +174,10 @@ import { ref } from 'vue'; const navNews = [ { img: n.Frame, text: '全部' }, - { img: n.Frame1, text: '通知公告' }, +/* { img: n.Frame1, text: '通知公告' }, { img: n.Frame2, text: '赛事咨讯' }, { img: n.Frame3, text: '活动速递' }, - { img: n.Frame4, text: '政策文件' }, + { img: n.Frame4, text: '政策文件' },*/ ] const activeNavNew = ref(navNews[0]) @@ -460,4 +460,4 @@ const activeNavNew = ref(navNews[0]) box-shadow: 1px 3px 5px 0px #ccc; } } - \ No newline at end of file + diff --git a/jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/MCh.vue b/jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/MCh.vue index 953e3f55..f4656944 100644 --- a/jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/MCh.vue +++ b/jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/MCh.vue @@ -6,7 +6,7 @@ 首页
成果展示
-
优秀毕业生
+ @@ -356,4 +356,4 @@ a { } } } - \ No newline at end of file + diff --git a/jeecgboot-vue3-master/src/views/demo/main-home/index.vue b/jeecgboot-vue3-master/src/views/demo/main-home/index.vue index 9d26fa1b..31038728 100644 --- a/jeecgboot-vue3-master/src/views/demo/main-home/index.vue +++ b/jeecgboot-vue3-master/src/views/demo/main-home/index.vue @@ -4,7 +4,7 @@
- +
@@ -108,17 +108,21 @@ const navItems: item[] = [ path: '/main-home/HomePage' }, { - title: '竞赛评价', + title: '新闻管理', path: '/main-home/MatchEvaluation' }, { - title: '竞赛导航', + title: '比赛信息', path: '/main-home/...' }, { - title: '研究成果', + title: '比赛结果', path: '/main-home/...' }, + { + title: '文件下载', + path: '/main-home/...' + }, ] @@ -425,4 +429,4 @@ const navItems: item[] = [ justify-content: space-between; align-items: center; } - \ No newline at end of file +