main
王家东 5 months ago
parent 6b820337aa
commit a8aa30df93
  1. 1
      jeecg-boot-master/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 32
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java
  3. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsArticle.java
  4. BIN
      jeecgboot-vue3-master/src/assets/images/mainHome/div.png
  5. 24
      jeecgboot-vue3-master/src/views/cms/admin/articel/CmsArticle.data.ts
  6. 8
      jeecgboot-vue3-master/src/views/demo/main-home/components/homePage/index.vue
  7. 2
      jeecgboot-vue3-master/src/views/demo/main-home/components/matchEvaluation/components/MCh.vue
  8. 12
      jeecgboot-vue3-master/src/views/demo/main-home/index.vue

@ -98,6 +98,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码 filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码 filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除 filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
filterChainDefinitionMap.put("/cms/front/**", "anon"); //cms不拦截
//CMS门户 //CMS门户
filterChainDefinitionMap.put("/cms/front/**","anon"); filterChainDefinitionMap.put("/cms/front/**","anon");

@ -16,8 +16,10 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.cms.entity.CmsArticle; import org.jeecg.modules.demo.cms.entity.CmsArticle;
import org.jeecg.modules.demo.cms.entity.CmsColumn; 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.ICmsArticleService;
import org.jeecg.modules.demo.cms.service.ICmsColumnService; 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.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -27,6 +29,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* @Description: 文章 * @Description: 文章
@ -44,6 +48,9 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
@Autowired @Autowired
private ICmsColumnService cmsColumnService; private ICmsColumnService cmsColumnService;
@Autowired
private ISubwesideService subwesideService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -85,6 +92,18 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
cmsArticle.setPublishTime(new Date()); cmsArticle.setPublishTime(new Date());
cmsArticle.setStatus("1"); cmsArticle.setStatus("1");
// } // }
QueryWrapper<Subweside> subwesideQueryWrapper = new QueryWrapper<>();
subwesideQueryWrapper.in("id", principal.getId());
List<Subweside> subwesideList = subwesideService.list(subwesideQueryWrapper);
if (!subwesideList.isEmpty()) {
List<String> subnames = subwesideList.stream()
.map(Subweside::getSubname) // 将每个Subweside对象映射到其subname字段
.collect(Collectors.toList()); // 收集结果到List<String>
String joinedString = String.join(", ", subnames);
cmsArticle.setSource("来自子站:"+joinedString);
}else {
cmsArticle.setSource("来自子站管理员");
}
cmsArticleService.save(cmsArticle); cmsArticleService.save(cmsArticle);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
@ -111,10 +130,23 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
// @RequiresPermissions("cms:cms_article:edit") // @RequiresPermissions("cms:cms_article:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody CmsArticle cmsArticle) { public Result<String> edit(@RequestBody CmsArticle cmsArticle) {
LoginUser principal = (LoginUser) SecurityUtils.getSubject().getPrincipal();
CmsColumn cmsColumn = cmsColumnService.getById(cmsArticle.getColumnId()); CmsColumn cmsColumn = cmsColumnService.getById(cmsArticle.getColumnId());
if (!ObjectUtils.isEmpty(cmsColumn)) { if (!ObjectUtils.isEmpty(cmsColumn)) {
cmsArticle.setColumnName(cmsColumn.getName()); cmsArticle.setColumnName(cmsColumn.getName());
} }
QueryWrapper<Subweside> subwesideQueryWrapper = new QueryWrapper<>();
subwesideQueryWrapper.in("id", principal.getId());
List<Subweside> subwesideList = subwesideService.list(subwesideQueryWrapper);
if (!subwesideList.isEmpty()) {
List<String> subnames = subwesideList.stream()
.map(Subweside::getSubname) // 将每个Subweside对象映射到其subname字段
.collect(Collectors.toList()); // 收集结果到List<String>
String joinedString = String.join(", ", subnames);
cmsArticle.setSource("来自子站:"+joinedString);
}else {
cmsArticle.setSource("管理员");
}
cmsArticleService.updateById(cmsArticle); cmsArticleService.updateById(cmsArticle);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }

@ -110,4 +110,18 @@ public class CmsArticle implements Serializable {
@Excel(name = "源url", width = 15) @Excel(name = "源url", width = 15)
@ApiModelProperty(value = "源url") @ApiModelProperty(value = "源url")
private String originUrl; 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;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 997 KiB

@ -123,6 +123,30 @@ export const formSchema: FormSchema[] = [
field: 'originUrl', field: 'originUrl',
component: 'Input', 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 // TODO 主键隐藏字段,目前写死为ID
{ {
label: '', label: '',

@ -49,10 +49,10 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="if-item" v-if="activeNavNew.text === navNews[1].text">待定...</div> <!-- <div class="if-item" v-if="activeNavNew.text === navNews[1].text">待定...</div>
<div class="if-item" v-if="activeNavNew.text === navNews[2].text">待定...</div> <div class="if-item" v-if="activeNavNew.text === navNews[2].text">待定...</div>
<div class="if-item" v-if="activeNavNew.text === navNews[3].text">待定...</div> <div class="if-item" v-if="activeNavNew.text === navNews[3].text">待定...</div>
<div class="if-item" v-if="activeNavNew.text === navNews[4].text">待定...</div> <div class="if-item" v-if="activeNavNew.text === navNews[4].text">待定...</div>-->
<div class="look-more"> <div class="look-more">
<span>查看更多>></span> <span>查看更多>></span>
@ -174,10 +174,10 @@ import { ref } from 'vue';
const navNews = [ const navNews = [
{ img: n.Frame, text: '全部' }, { img: n.Frame, text: '全部' },
{ img: n.Frame1, text: '通知公告' }, /* { img: n.Frame1, text: '' },
{ img: n.Frame2, text: '赛事咨讯' }, { img: n.Frame2, text: '赛事咨讯' },
{ img: n.Frame3, text: '活动速递' }, { img: n.Frame3, text: '活动速递' },
{ img: n.Frame4, text: '政策文件' }, { img: n.Frame4, text: '政策文件' },*/
] ]
const activeNavNew = ref(navNews[0]) const activeNavNew = ref(navNews[0])

@ -6,7 +6,7 @@
<RouterLink to="/main-home">首页</RouterLink> <RouterLink to="/main-home">首页</RouterLink>
</div> </div>
<div class="item">成果展示</div> <div class="item">成果展示</div>
<div class="item">优秀毕业生</div> <!-- <div class="item">优秀毕业生</div>-->
</div> </div>
</div> </div>
</div> </div>

@ -4,7 +4,7 @@
<div class="header-box"> <div class="header-box">
<div class="nav-center"> <div class="nav-center">
<div class="title"> <div class="title">
河南省大学生学科竞赛综合管理平台 大数据双创应用竞赛管理系统
</div> </div>
<div class="nav-content"> <div class="nav-content">
<div class="nav-box"> <div class="nav-box">
@ -108,15 +108,19 @@ const navItems: item[] = [
path: '/main-home/HomePage' path: '/main-home/HomePage'
}, },
{ {
title: '竞赛评价', title: '新闻管理',
path: '/main-home/MatchEvaluation' path: '/main-home/MatchEvaluation'
}, },
{ {
title: '竞赛导航', title: '比赛信息',
path: '/main-home/...' path: '/main-home/...'
}, },
{ {
title: '研究成果', title: '比赛结果',
path: '/main-home/...'
},
{
title: '文件下载',
path: '/main-home/...' path: '/main-home/...'
}, },
] ]

Loading…
Cancel
Save