diff --git a/.idea/encodings.xml b/.idea/encodings.xml index 9dd240f..5ab9894 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -4,12 +4,16 @@ + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/blxc-admin/src/main/java/com/ruoyi/portal/back/controller/NdNewController.java b/blxc-admin/src/main/java/com/ruoyi/portal/back/controller/NdNewController.java index f6e8500..a0d281f 100644 --- a/blxc-admin/src/main/java/com/ruoyi/portal/back/controller/NdNewController.java +++ b/blxc-admin/src/main/java/com/ruoyi/portal/back/controller/NdNewController.java @@ -125,9 +125,18 @@ public class NdNewController extends BaseController if(StringUtils.isNull(ndNew.getPublishTime())){ ndNew.setPublishTime(new Date()); } +// ndNew.setAbstracts(stripHtml(ndNew.getContent())); return toAjax(ndNewService.insertNdNew(ndNew)); } + public static String stripHtml(String input) { + // 定义HTML标签的正则表达式 + String htmlRegex = "<[^>]*>"; + // 使用正则表达式去除HTML标签 + String output = input.replaceAll(htmlRegex, ""); + return output; + } + /** * 修改新闻 */ @@ -149,6 +158,24 @@ public class NdNewController extends BaseController return prefix + "/edit"; } + + @GetMapping("/editGly/{id}") + public String editGly(@PathVariable("id") Long id, ModelMap mmap) + { + List cxList = new ArrayList(); + List firstItems = ndNewService.getNewsTypes(0L); + for(int i=0;i< firstItems.size();i++){ + CxSelect child = firstItems.get(i); + List secondItems = ndNewService.getNewsTypes(Long.valueOf(child.getV())); + child.setS(secondItems); + cxList.add(child); + } + mmap.put("data", JSON.toJSON(cxList)); + NdNew ndNew = ndNewService.selectNdNewById(id); + mmap.put("ndNew", ndNew); + return prefix + "/editGly"; + } + /** * 修改保存新闻 */ @@ -170,6 +197,7 @@ public class NdNewController extends BaseController if(StringUtils.isNull(ndNew.getPublishTime())){ ndNew.setPublishTime(new Date()); } +// ndNew.setAbstracts(stripHtml(ndNew.getContent())); return toAjax(ndNewService.updateNdNew(ndNew)); } diff --git a/blxc-admin/src/main/java/com/ruoyi/portal/back/domain/NdNew.java b/blxc-admin/src/main/java/com/ruoyi/portal/back/domain/NdNew.java index 1a752e9..317e17f 100644 --- a/blxc-admin/src/main/java/com/ruoyi/portal/back/domain/NdNew.java +++ b/blxc-admin/src/main/java/com/ruoyi/portal/back/domain/NdNew.java @@ -80,7 +80,27 @@ public class NdNew extends BaseEntity /** 删除标志(0代表存在 1代表删除) */ private String delFlag; - public void setId(Long id) + private String filePath; + + private String paramLimitno; + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getParamLimitno() { + return paramLimitno; + } + + public void setParamLimitno(String paramLimitno) { + this.paramLimitno = paramLimitno; + } + + public void setId(Long id) { this.id = id; } @@ -246,6 +266,7 @@ public class NdNew extends BaseEntity .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("remark", getRemark()) + .append("filePath", getFilePath()) .toString(); } } diff --git a/blxc-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/blxc-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index 9f120ba..27e5f8c 100644 --- a/blxc-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/blxc-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -2,6 +2,12 @@ package com.ruoyi.web.controller.system; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.portal.back.domain.NdNew; +import com.ruoyi.portal.back.domain.NdNewType; +import com.ruoyi.portal.back.service.INdNewService; +import com.ruoyi.portal.back.service.INdNewTypeService; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.UsernamePasswordToken; @@ -20,6 +26,10 @@ import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.web.service.ConfigService; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + /** * 登录验证 * @@ -37,21 +47,147 @@ public class SysLoginController extends BaseController @Autowired private ConfigService configService; + @Autowired + private INdNewService ndNewService; + + @Autowired + private INdNewTypeService ndNewTypeService; + @GetMapping("/") public String index(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) { + + //新闻动态 5条 newType = 10 + NdNew ndNew = new NdNew(); + ndNew.setNewType("10"); + ndNew.setParamLimitno("5"); + List xwdtList = ndNewService.selectNdNewList(ndNew); + //通知公告 6条 + ndNew = new NdNew(); + ndNew.setNewType("11"); + ndNew.setParamLimitno("6"); + List tztgList = ndNewService.selectNdNewList(ndNew); + //活动预告 5条 + ndNew = new NdNew(); + ndNew.setNewType("12"); + ndNew.setParamLimitno("5"); + List hdygList = ndNewService.selectNdNewList(ndNew); + + //友情链接 + ndNew = new NdNew(); + ndNew.setNewType("13"); + List yqljList = ndNewService.selectNdNewList(ndNew); + mmap.put("yqljList", yqljList); + + mmap.put("xwdtList", xwdtList); + mmap.put("tztgList", tztgList); + mmap.put("hdygList", hdygList); + return "portal/index"; } @GetMapping("/portal/list") public String list(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) { + String newType = request.getParameter("newType"); + String pageNo = request.getParameter("pageNo"); + String pageSize = request.getParameter("pageSize"); + + System.out.println("newType=" + newType); + System.out.println("pageNo=" + pageNo); + System.out.println("pageSize=" + pageSize); + + + NdNewType oneType = ndNewTypeService.selectNdNewTypeById(Long.parseLong(newType)); + NdNewType twoType = ndNewTypeService.selectNdNewTypeById(oneType.getParentId()); + String twoCode = twoType.getId()+""; + String twoName = twoType.getName(); + String threeCode = oneType.getId()+""; + String threeName = oneType.getName(); + if(!StringUtils.equals("1",twoCode)){ + mmap.put("twoName",twoName); + mmap.put("twoCode",twoCode); + }else{ + mmap.put("twoName",twoName); + mmap.put("twoCode","-1"); + } + mmap.put("threeName",threeName); + mmap.put("threeCode",threeCode); + NdNewType ndNewType = new NdNewType(); + ndNewType.setParentId(Long.parseLong(twoCode)); + List list = ndNewTypeService.selectNdNewTypeList(ndNewType); + mmap.put("menuList",list); + + //友情链接 + NdNew ndNew = new NdNew(); + ndNew.setNewType("13"); + List yqljList = ndNewService.selectNdNewList(ndNew); + mmap.put("yqljList", yqljList); return "portal/list"; } + + @GetMapping("/portal/searchList") + public String searchList(NdNew ndNew,HttpServletRequest request, HttpServletResponse response, ModelMap mmap) + { +// NdNew ndNew = new NdNew(); + ndNew.setTitle(request.getParameter("title")); + List list = ndNewService.selectNdNewList(ndNew); + mmap.put("list",list); + //友情链接 + ndNew = new NdNew(); + ndNew.setNewType("13"); + List yqljList = ndNewService.selectNdNewList(ndNew); + mmap.put("yqljList", yqljList); + return "portal/searchList"; + } + + + @PostMapping("/portal/dataList") + @ResponseBody + public TableDataInfo dataList(NdNew ndNew) + { + startPage(); + List list = ndNewService.selectNdNewList(ndNew); + return getDataTable(list); + } + @GetMapping("/portal/details") public String details(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) { + String id = request.getParameter("id"); + NdNew ndNew = ndNewService.selectNdNewById(Long.parseLong(id)); + + ndNew.setClickRate(ndNew.getClickRate()+1); + ndNewService.updateNdNew(ndNew); + + String newType = ndNew.getNewType(); + + NdNewType oneType = ndNewTypeService.selectNdNewTypeById(Long.parseLong(newType)); + + NdNewType twoType = ndNewTypeService.selectNdNewTypeById(oneType.getParentId()); + + String twoCode = twoType.getId()+""; + String twoName = twoType.getName(); + String threeCode = oneType.getId()+""; + String threeName = oneType.getName(); + + if(!StringUtils.equals("1",twoCode)){ + mmap.put("twoName",twoName); + mmap.put("twoCode",twoCode); + }else{ + mmap.put("twoName","-1"); + mmap.put("twoCode","-1"); + } + mmap.put("threeName",threeName); + mmap.put("threeCode",threeCode); + mmap.put("info", ndNew); + + //友情链接 + NdNew ndNew2 = new NdNew(); + ndNew2.setNewType("13"); + List yqljList = ndNewService.selectNdNewList(ndNew2); + mmap.put("yqljList", yqljList); return "portal/details"; } diff --git a/blxc-admin/src/main/resources/application-druid.yml b/blxc-admin/src/main/resources/application-druid.yml index 7da2589..bec3373 100644 --- a/blxc-admin/src/main/resources/application-druid.yml +++ b/blxc-admin/src/main/resources/application-druid.yml @@ -6,7 +6,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/nd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://localhost:3306/nd_cbsy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: root # 从库数据源 diff --git a/blxc-admin/src/main/resources/static/portal/js/page.js b/blxc-admin/src/main/resources/static/portal/js/page.js new file mode 100644 index 0000000..53f3289 --- /dev/null +++ b/blxc-admin/src/main/resources/static/portal/js/page.js @@ -0,0 +1,77 @@ +var page = 1 +var size = 15 +var totalCount = 1 +var values =1 + +function generPage(total, dom_page_class) { + totalCount = total % 10 == 0 ? Math.floor(total / 10) : Math.floor(total / 10) + 1 + + + + let domStr = ` +
+ 共${total}条 + 首页 + ` + for (let i = 1; i <= totalCount; i++) { + + if(values==i){ + domStr += `` + (i ) + `` + }else{ + domStr += `` + (i ) + `` + } + } + + domStr += ` 尾页
`; + console.log('domStr-->',domStr); + document.querySelector('.' + dom_page_class).innerHTML = domStr +} + +function pageChange(currentPage,e) { + // let jsijg = e.innerText + page = currentPage + values = page + mainListChange(page) + + console.log(page) + // 去第一页 +// if(page===1) { +// console.log('123123123') +// document.querySelector('.active')?.classList.remove('active') +// document.querySelector('.first').classList.add('active') +// } +// document.querySelector('.current').addEventListener('click',function (e) { +// if(e.target.tagName ==='DIV') { +// console.log('点击了按钮') +// document.querySelector('.active').classList.remove('active') +// e.target.classList.add('active') +// } +// }) +// if(e.className === 'pageEnd') { +// const pages = document.querySelector('.current').children +// document.querySelector('.active').classList.remove('active') +// pages[1].classList.add('active') +// } +} + +function page_go() { + let content = document.querySelector('#page_input').value + let reg = /^\d$/ + if(reg.test(content)&&content>0&&content<=totalCount){ + page = content + values = page + mainListChange() + } +} + +function prePage() { + if (page != 1) page = page - 1 + values = page + mainListChange() +} + +function nextPage(count) { + if (page != count) page = page + 1 + values = page + mainListChange() +} \ No newline at end of file diff --git a/blxc-admin/src/main/resources/templates/news/news/add.html b/blxc-admin/src/main/resources/templates/news/news/add.html index 58db448..76a208b 100644 --- a/blxc-admin/src/main/resources/templates/news/news/add.html +++ b/blxc-admin/src/main/resources/templates/news/news/add.html @@ -43,13 +43,26 @@ -
- + + + + + + + + + +
+
-
- - -
+ +
+
+
+
+ +
+
@@ -62,30 +75,26 @@
- +
- -
-
-
- -
- -
-
-
-
- -
- -
-
-
- -
- + +
+ +
+ + + + + + + + + + + + @@ -130,10 +139,22 @@ $("input[name='" + event.currentTarget.id + "']").val('') }) + $(".file-uploadb").fileinput({ + uploadUrl: ctx + 'common/upload', + maxFileCount: 10, + autoReplace: true + }).on('fileuploaded', function (event, data, previewId, index) { + var inputaaa = $("input[name='" + event.currentTarget.id + "']").val(); + $("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url) + }).on('fileremoved', function (event, id, index) { + $("input[name='" + event.currentTarget.id + "']").val('') + }) + $(function() { $('.summernote').summernote({ lang: 'zh-CN', dialogsInBody: true, + height: '300px', callbacks: { onChange: function(contents, $edittable) { $("input[name='" + this.id + "']").val(contents); diff --git a/blxc-admin/src/main/resources/templates/news/news/edit.html b/blxc-admin/src/main/resources/templates/news/news/edit.html index 03b0a95..99d3982 100644 --- a/blxc-admin/src/main/resources/templates/news/news/edit.html +++ b/blxc-admin/src/main/resources/templates/news/news/edit.html @@ -10,15 +10,15 @@
-
- -
-
- - -
-
-
+ + + + + + + + +
@@ -26,6 +26,8 @@
+ +
-
- -
-
- - -
-
-
-
- -
- -
- -
-
-
-
- -
- -
-
+ + + + + + + + +
@@ -91,11 +78,35 @@
- +
- + +
+ +
+
+ +
+ +
+ +
+
+
+ + + + + + + + + + + + @@ -152,11 +163,30 @@ $(this).fileinput('_initFileActions'); }); + + $(".file-uploadb").each(function (i) { + var val = $("input[name='" + this.id + "']").val() + $(this).fileinput({ + 'uploadUrl': ctx + 'common/upload', + initialPreviewAsData: true, + initialPreview: [val], + maxFileCount: 10, + autoReplace: true + }).on('fileuploaded', function (event, data, previewId, index) { + var inputaaa = $("input[name='" + event.currentTarget.id + "']").val(); + $("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url) + }).on('fileremoved', function (event, id, index) { + $("input[name='" + event.currentTarget.id + "']").val('') + }) + $(this).fileinput('_initFileActions'); + }); + $(function() { $('.summernote').each(function(i) { $('#' + this.id).summernote({ lang: 'zh-CN', dialogsInBody: true, + height: '300px', callbacks: { onChange: function(contents, $edittable) { $("input[name='" + this.id + "']").val(contents); diff --git a/blxc-admin/src/main/resources/templates/news/news/editGly.html b/blxc-admin/src/main/resources/templates/news/news/editGly.html new file mode 100644 index 0000000..7662671 --- /dev/null +++ b/blxc-admin/src/main/resources/templates/news/news/editGly.html @@ -0,0 +1,217 @@ + + + + + + + + + +
+ + + + + + + + + + + +
+ +
+ +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/blxc-admin/src/main/resources/templates/news/news/list.html b/blxc-admin/src/main/resources/templates/news/news/list.html index e42f410..b2a170b 100644 --- a/blxc-admin/src/main/resources/templates/news/news/list.html +++ b/blxc-admin/src/main/resources/templates/news/news/list.html @@ -14,13 +14,13 @@
  • @@ -102,6 +102,7 @@ url: prefix + "/list", createUrl: prefix + "/add", updateUrl: prefix + "/edit/{id}", + updateGlyUrl: prefix + "/editGly/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", modalName: "新闻", @@ -146,18 +147,19 @@ return ''; } }, - { - field: 'delFlag', - title: '状态', - formatter: function(value, row, index) { - return $.table.selectDictLabel(datas, value); - } - }, +// { +// field: 'delFlag', +// title: '状态', +// formatter: function(value, row, index) { +// return $.table.selectDictLabel(datas, value); +// } +// }, { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; + actions.push('    '); actions.push('编辑 '); actions.push('删除'); return actions.join(''); @@ -166,6 +168,12 @@ }; $.table.init(options); }); + + /* 用户管理-重置密码 */ + function edit2(id) { + var url = prefix+'/editGly/' + id; + $.modal.open("修改", url, '900', '700'); + } \ No newline at end of file diff --git a/blxc-admin/src/main/resources/templates/portal/details.html b/blxc-admin/src/main/resources/templates/portal/details.html index cec1008..0f1e75e 100644 --- a/blxc-admin/src/main/resources/templates/portal/details.html +++ b/blxc-admin/src/main/resources/templates/portal/details.html @@ -34,28 +34,29 @@
    -

    学院召开新农科创新课程开发研讨会

    +

    [[${info.title}]]

      -
    • 日期:2024/03/12
    • -
    • 编辑:吉林农大新农科长白山创新学院
    • -
    • 点击率:65
    • +
    • 日期:[[${#dates.format(info.publishTime, 'YYYY-MM-dd')}]]
    • +
    • 编辑:[[${info.sourceAuthor}]]
    • +
    • 点击率:[[${info.clickRate}]]
    -
    -

    HELLO WORLD!

    +
    + +
    + +
    @@ -64,8 +65,7 @@ - - + diff --git a/blxc-admin/src/main/resources/templates/portal/headerAndFooter.html b/blxc-admin/src/main/resources/templates/portal/headerAndFooter.html index 9295eba..121d030 100644 --- a/blxc-admin/src/main/resources/templates/portal/headerAndFooter.html +++ b/blxc-admin/src/main/resources/templates/portal/headerAndFooter.html @@ -14,7 +14,7 @@ - 吉林省新农科长白山创新学院 + 吉林省新农科长白山创新学院 @@ -28,7 +28,7 @@
    - + @@ -37,127 +37,127 @@
      @@ -229,27 +229,28 @@
      友情链接:
      @@ -268,37 +269,34 @@ alert("请输入你要检索的内容!"); return false; } - if (window.toFF == 1) { - document.getElementById("lucenenewssearchkey1024873").value = - Simplized(keyword); - } else { - document.getElementById("lucenenewssearchkey1024873").value = - keyword; - } - var base64 = new Base64(); - document.getElementById("lucenenewssearchkey1024873").value = - base64.encode( - document.getElementById("lucenenewssearchkey1024873").value - ); - new VsbFormFunc().disableAutoEnable( - document.getElementById("showkeycode1024873") - ); +// if (window.toFF == 1) { +// document.getElementById("lucenenewssearchkey1024873").value = +// Simplized(keyword); +// } else { +// document.getElementById("lucenenewssearchkey1024873").value = +// keyword; +// } +// var base64 = new Base64(); +// document.getElementById("lucenenewssearchkey1024873").value = +// base64.encode( +// document.getElementById("lucenenewssearchkey1024873").value +// ); + new VsbFormFunc().disableAutoEnable('title='+keyword); return true; } -
      - + + +
      - +
      - + diff --git a/blxc-admin/src/main/resources/templates/portal/index.html b/blxc-admin/src/main/resources/templates/portal/index.html index c9e4803..423c7d4 100644 --- a/blxc-admin/src/main/resources/templates/portal/index.html +++ b/blxc-admin/src/main/resources/templates/portal/index.html @@ -34,7 +34,7 @@
      - +
      @@ -59,78 +59,23 @@
      -
      + - -
      -
      - - -
      -

      第十五届挑战杯大学生科技作品赛发布时间:08-07 - 09:55

      + 发布时间:[[${#dates.format(item.publishTime, 'YYYY-MM-dd')}]] +

      @@ -211,87 +141,30 @@
      通知公告
      - More + More
      活动预告
      - More + More
      @@ -299,53 +172,18 @@
        -
      • +
      • -

        智慧农业发展现状与趋势

        -
        主讲人:马韫韬 教授2024.4.25 13:30-17:00
        -
        -
      • -
      • -
        - -
        -
        -

        谈谷论今谷物塑造的人类史

        -
        主讲人:崔 凯 上海交通大学MBA课程教授2024/3/29 8:00
        -
        -
      • -
      • -
        - - -
        -
        -

        掌握未来:2小时解锁AIGC在科研领域的应用

        -
        主讲人:谢亚南2024年5月10日9:00-11:00
        -
        -
      • -
      • -
        - - -
        -
        -

        从集约化到规模化一处于十字路口的荷兰奶牛养殖业

        -
        主讲人:JON DAANE(杨丹)2024年4月10日
        +

        [[${item.title}]]

        +
        主讲人:[[${item.sourceAuthor}]][[${#dates.format(item.publishTime, 'YYYY-MM-dd')}]]
      -
      @@ -390,12 +228,12 @@

      中西融汇、古今贯通、文理渗透 - More + More

      - + College profile
      @@ -405,7 +243,7 @@
      - +
      Academic salon
      @@ -416,7 +254,7 @@
      - +
      Student activity
      diff --git a/blxc-admin/src/main/resources/templates/portal/list.html b/blxc-admin/src/main/resources/templates/portal/list.html index 8c539b3..c35e47e 100644 --- a/blxc-admin/src/main/resources/templates/portal/list.html +++ b/blxc-admin/src/main/resources/templates/portal/list.html @@ -33,115 +33,43 @@
      -

      卓越农林人才培养

      +

      [[${twoName}]]

      @@ -153,7 +81,86 @@ - + + + + + + + + + + + + + + + + + + diff --git a/blxc-admin/src/main/resources/templates/system/user/add.html b/blxc-admin/src/main/resources/templates/system/user/add.html index 680dff1..5d8e797 100644 --- a/blxc-admin/src/main/resources/templates/system/user/add.html +++ b/blxc-admin/src/main/resources/templates/system/user/add.html @@ -100,18 +100,18 @@
      -
      -
      -
      - -
      - -
      -
      -
      -
      + + + + + + + + + + + +
      diff --git a/blxc-admin/src/main/resources/templates/system/user/edit.html b/blxc-admin/src/main/resources/templates/system/user/edit.html index 255239e..0e91ffe 100644 --- a/blxc-admin/src/main/resources/templates/system/user/edit.html +++ b/blxc-admin/src/main/resources/templates/system/user/edit.html @@ -76,28 +76,28 @@
      -
      -
      -
      - -
      - -
      -
      -
      -
      -
      - -
      - -
      -
      -
      -
      + + + + + + + + + + + + + + + + + + + + + +
      diff --git a/blxc-admin/target/classes/application-druid.yml b/blxc-admin/target/classes/application-druid.yml index 7da2589..bec3373 100644 --- a/blxc-admin/target/classes/application-druid.yml +++ b/blxc-admin/target/classes/application-druid.yml @@ -6,7 +6,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/nd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://localhost:3306/nd_cbsy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: root # 从库数据源 diff --git a/blxc-admin/target/classes/com/ruoyi/portal/back/controller/NdNewController.class b/blxc-admin/target/classes/com/ruoyi/portal/back/controller/NdNewController.class index 47dec7a..1af5da1 100644 Binary files a/blxc-admin/target/classes/com/ruoyi/portal/back/controller/NdNewController.class and b/blxc-admin/target/classes/com/ruoyi/portal/back/controller/NdNewController.class differ diff --git a/blxc-admin/target/classes/com/ruoyi/portal/back/domain/NdNew.class b/blxc-admin/target/classes/com/ruoyi/portal/back/domain/NdNew.class index c722976..984c6af 100644 Binary files a/blxc-admin/target/classes/com/ruoyi/portal/back/domain/NdNew.class and b/blxc-admin/target/classes/com/ruoyi/portal/back/domain/NdNew.class differ diff --git a/blxc-admin/target/classes/com/ruoyi/web/controller/system/SysLoginController.class b/blxc-admin/target/classes/com/ruoyi/web/controller/system/SysLoginController.class index 33a06d5..e6aff74 100644 Binary files a/blxc-admin/target/classes/com/ruoyi/web/controller/system/SysLoginController.class and b/blxc-admin/target/classes/com/ruoyi/web/controller/system/SysLoginController.class differ diff --git a/blxc-admin/target/classes/static/portal/js/page.js b/blxc-admin/target/classes/static/portal/js/page.js new file mode 100644 index 0000000..53f3289 --- /dev/null +++ b/blxc-admin/target/classes/static/portal/js/page.js @@ -0,0 +1,77 @@ +var page = 1 +var size = 15 +var totalCount = 1 +var values =1 + +function generPage(total, dom_page_class) { + totalCount = total % 10 == 0 ? Math.floor(total / 10) : Math.floor(total / 10) + 1 + + + + let domStr = ` +
      + 共${total}条 + 首页 + ` + for (let i = 1; i <= totalCount; i++) { + + if(values==i){ + domStr += `` + (i ) + `` + }else{ + domStr += `` + (i ) + `` + } + } + + domStr += ` 尾页
      `; + console.log('domStr-->',domStr); + document.querySelector('.' + dom_page_class).innerHTML = domStr +} + +function pageChange(currentPage,e) { + // let jsijg = e.innerText + page = currentPage + values = page + mainListChange(page) + + console.log(page) + // 去第一页 +// if(page===1) { +// console.log('123123123') +// document.querySelector('.active')?.classList.remove('active') +// document.querySelector('.first').classList.add('active') +// } +// document.querySelector('.current').addEventListener('click',function (e) { +// if(e.target.tagName ==='DIV') { +// console.log('点击了按钮') +// document.querySelector('.active').classList.remove('active') +// e.target.classList.add('active') +// } +// }) +// if(e.className === 'pageEnd') { +// const pages = document.querySelector('.current').children +// document.querySelector('.active').classList.remove('active') +// pages[1].classList.add('active') +// } +} + +function page_go() { + let content = document.querySelector('#page_input').value + let reg = /^\d$/ + if(reg.test(content)&&content>0&&content<=totalCount){ + page = content + values = page + mainListChange() + } +} + +function prePage() { + if (page != 1) page = page - 1 + values = page + mainListChange() +} + +function nextPage(count) { + if (page != count) page = page + 1 + values = page + mainListChange() +} \ No newline at end of file diff --git a/blxc-admin/target/classes/templates/news/news/add.html b/blxc-admin/target/classes/templates/news/news/add.html index 58db448..76a208b 100644 --- a/blxc-admin/target/classes/templates/news/news/add.html +++ b/blxc-admin/target/classes/templates/news/news/add.html @@ -43,13 +43,26 @@
      -
      - + + + + + + + + + +
      +
      -
      - - -
      + +
      +
      +
      +
      + +
      +
      @@ -62,30 +75,26 @@
      - +
      - -
      -
      -
      - -
      - -
      -
      -
      -
      - -
      - -
      -
      -
      - -
      - + +
      + +
      + + + + + + + + + + + +
      @@ -130,10 +139,22 @@ $("input[name='" + event.currentTarget.id + "']").val('') }) + $(".file-uploadb").fileinput({ + uploadUrl: ctx + 'common/upload', + maxFileCount: 10, + autoReplace: true + }).on('fileuploaded', function (event, data, previewId, index) { + var inputaaa = $("input[name='" + event.currentTarget.id + "']").val(); + $("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url) + }).on('fileremoved', function (event, id, index) { + $("input[name='" + event.currentTarget.id + "']").val('') + }) + $(function() { $('.summernote').summernote({ lang: 'zh-CN', dialogsInBody: true, + height: '300px', callbacks: { onChange: function(contents, $edittable) { $("input[name='" + this.id + "']").val(contents); diff --git a/blxc-admin/target/classes/templates/news/news/edit.html b/blxc-admin/target/classes/templates/news/news/edit.html index 03b0a95..99d3982 100644 --- a/blxc-admin/target/classes/templates/news/news/edit.html +++ b/blxc-admin/target/classes/templates/news/news/edit.html @@ -10,15 +10,15 @@
      -
      - -
      -
      - - -
      -
      -
      + + + + + + + + +
      @@ -26,6 +26,8 @@
      + +
      -
      - -
      -
      - - -
      -
      -
      -
      - -
      - -
      - -
      -
      -
      -
      - -
      - -
      -
      + + + + + + + + +
      @@ -91,11 +78,35 @@
      - +
      - + +
      + +
      +
      + +
      + +
      + +
      +
      +
      + + + + + + + + + + + + @@ -152,11 +163,30 @@ $(this).fileinput('_initFileActions'); }); + + $(".file-uploadb").each(function (i) { + var val = $("input[name='" + this.id + "']").val() + $(this).fileinput({ + 'uploadUrl': ctx + 'common/upload', + initialPreviewAsData: true, + initialPreview: [val], + maxFileCount: 10, + autoReplace: true + }).on('fileuploaded', function (event, data, previewId, index) { + var inputaaa = $("input[name='" + event.currentTarget.id + "']").val(); + $("input[name='" + event.currentTarget.id + "']").val(inputaaa+"|"+data.response.url) + }).on('fileremoved', function (event, id, index) { + $("input[name='" + event.currentTarget.id + "']").val('') + }) + $(this).fileinput('_initFileActions'); + }); + $(function() { $('.summernote').each(function(i) { $('#' + this.id).summernote({ lang: 'zh-CN', dialogsInBody: true, + height: '300px', callbacks: { onChange: function(contents, $edittable) { $("input[name='" + this.id + "']").val(contents); diff --git a/blxc-admin/target/classes/templates/news/news/editGly.html b/blxc-admin/target/classes/templates/news/news/editGly.html new file mode 100644 index 0000000..7662671 --- /dev/null +++ b/blxc-admin/target/classes/templates/news/news/editGly.html @@ -0,0 +1,217 @@ + + + + + + + + + +
      + + + + + + + + + + + +
      + +
      + +
      + + +
      + +
      +
      +
      + +
      +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      + +
      +
      +
      + +
      + + + + + + + + \ No newline at end of file diff --git a/blxc-admin/target/classes/templates/news/news/list.html b/blxc-admin/target/classes/templates/news/news/list.html index e42f410..b2a170b 100644 --- a/blxc-admin/target/classes/templates/news/news/list.html +++ b/blxc-admin/target/classes/templates/news/news/list.html @@ -14,13 +14,13 @@
    @@ -102,6 +102,7 @@ url: prefix + "/list", createUrl: prefix + "/add", updateUrl: prefix + "/edit/{id}", + updateGlyUrl: prefix + "/editGly/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", modalName: "新闻", @@ -146,18 +147,19 @@ return ''; } }, - { - field: 'delFlag', - title: '状态', - formatter: function(value, row, index) { - return $.table.selectDictLabel(datas, value); - } - }, +// { +// field: 'delFlag', +// title: '状态', +// formatter: function(value, row, index) { +// return $.table.selectDictLabel(datas, value); +// } +// }, { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; + actions.push('    '); actions.push('编辑 '); actions.push('删除'); return actions.join(''); @@ -166,6 +168,12 @@ }; $.table.init(options); }); + + /* 用户管理-重置密码 */ + function edit2(id) { + var url = prefix+'/editGly/' + id; + $.modal.open("修改", url, '900', '700'); + } \ No newline at end of file diff --git a/blxc-admin/target/classes/templates/portal/details.html b/blxc-admin/target/classes/templates/portal/details.html index cec1008..0f1e75e 100644 --- a/blxc-admin/target/classes/templates/portal/details.html +++ b/blxc-admin/target/classes/templates/portal/details.html @@ -34,28 +34,29 @@
    -

    学院召开新农科创新课程开发研讨会

    +

    [[${info.title}]]

      -
    • 日期:2024/03/12
    • -
    • 编辑:吉林农大新农科长白山创新学院
    • -
    • 点击率:65
    • +
    • 日期:[[${#dates.format(info.publishTime, 'YYYY-MM-dd')}]]
    • +
    • 编辑:[[${info.sourceAuthor}]]
    • +
    • 点击率:[[${info.clickRate}]]
    -
    -

    HELLO WORLD!

    +
    + +
    + +
    @@ -64,8 +65,7 @@ - - + diff --git a/blxc-admin/target/classes/templates/portal/headerAndFooter.html b/blxc-admin/target/classes/templates/portal/headerAndFooter.html index 9295eba..121d030 100644 --- a/blxc-admin/target/classes/templates/portal/headerAndFooter.html +++ b/blxc-admin/target/classes/templates/portal/headerAndFooter.html @@ -14,7 +14,7 @@ - 吉林省新农科长白山创新学院 + 吉林省新农科长白山创新学院 @@ -28,7 +28,7 @@
    - + @@ -37,127 +37,127 @@