Signed-off-by: mingsoft <killfen@126.com>
master
mingsoft 2 years ago
parent e9f7b03638
commit 30f9611bf4
  1. 42
      doc/5.3.2-up-5.3.3.sql
  2. 10
      pom.xml
  3. 2
      src/main/java/net/mingsoft/cms/action/BaseAction.java
  4. 14
      src/main/java/net/mingsoft/cms/action/CategoryAction.java
  5. 3
      src/main/java/net/mingsoft/cms/action/ContentAction.java
  6. 2
      src/main/java/net/mingsoft/cms/action/GeneraterAction.java
  7. 38
      src/main/java/net/mingsoft/cms/action/web/CategoryAction.java
  8. 42
      src/main/java/net/mingsoft/cms/action/web/ContentAction.java
  9. 24
      src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
  10. 21
      src/main/java/net/mingsoft/cms/aop/CategoryAop.java
  11. 6
      src/main/java/net/mingsoft/cms/aop/ContentAop.java
  12. 2
      src/main/java/net/mingsoft/cms/bean/CategoryBean.java
  13. 42
      src/main/java/net/mingsoft/cms/bean/ContentBean.java
  14. 2
      src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
  15. 13
      src/main/java/net/mingsoft/cms/biz/IContentBiz.java
  16. 2
      src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java
  17. 2
      src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
  18. 4
      src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
  19. 42
      src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java
  20. 2
      src/main/java/net/mingsoft/cms/constant/Const.java
  21. 21
      src/main/java/net/mingsoft/cms/constant/e/CategoryDisplayEnum.java
  22. 21
      src/main/java/net/mingsoft/cms/constant/e/CategoryIsSearchEnum.java
  23. 2
      src/main/java/net/mingsoft/cms/constant/e/CategoryTypeEnum.java
  24. 21
      src/main/java/net/mingsoft/cms/constant/e/ContentEnum.java
  25. 2
      src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
  26. 4
      src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
  27. 2
      src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java
  28. 4
      src/main/java/net/mingsoft/cms/dao/IContentDao.java
  29. 11
      src/main/java/net/mingsoft/cms/dao/IContentDao.xml
  30. 6
      src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
  31. 42
      src/main/java/net/mingsoft/cms/entity/ContentEntity.java
  32. 38
      src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
  33. 2
      src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
  34. 2
      src/main/java/net/mingsoft/config/WebConfig.java
  35. 2
      src/main/resources/application-dev.yml
  36. 59
      src/main/webapp/WEB-INF/manager/cms/category/form.ftl
  37. 105
      src/main/webapp/WEB-INF/manager/cms/category/index.ftl
  38. 59
      src/main/webapp/WEB-INF/manager/cms/content/form.ftl
  39. 15
      src/main/webapp/WEB-INF/manager/cms/content/index.ftl
  40. 11
      src/main/webapp/WEB-INF/manager/cms/content/main.ftl
  41. 2
      src/main/webapp/template/1/default/message.htm

File diff suppressed because one or more lines are too long

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mcms</artifactId>
<version>5.3.3</version>
<version>5.3.4</version>
<name>${project.groupId}:${project.artifactId}</name>
<!-- 打包war包,注意不启用(resources》resource》excludes的配置并注释掉maven-assembly-plugin 插件配置 -->
<!--<packaging>war</packaging>-->
@ -44,24 +44,24 @@
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-base</artifactId>
<version>2.1.22</version>
<version>2.1.23</version>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-basic</artifactId>
<version>2.1.22.1</version>
<version>2.1.23</version>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mdiy</artifactId>
<version>2.1.22</version>
<version>2.1.23</version>
</dependency>
<!--store入口依赖(源码不开发),如果不需要MStore可以直接去掉依赖-->
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>store-client</artifactId>
<version>2.1.22</version>
<version>2.1.23</version>
</dependency>
<dependency>
<groupId>com.github.oshi</groupId>

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.action;
import java.util.MissingResourceException;

@ -7,10 +7,10 @@
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.action;
import cn.hutool.core.io.file.FileNameUtil;
@ -74,6 +76,7 @@ public class CategoryAction extends BaseAction {
* 返回主界面index
* @return
*/
@ApiIgnore
@GetMapping("/index")
@RequiresPermissions("cms:category:view")
public String index() {
@ -102,6 +105,7 @@ public class CategoryAction extends BaseAction {
* @param category 栏目
* @return
*/
@ApiIgnore
@GetMapping("/form")
public String form(@ModelAttribute CategoryEntity category, ModelMap model) {
model.addAttribute("appId", BasicUtil.getApp().getAppId());
@ -261,10 +265,6 @@ public class CategoryAction extends BaseAction {
return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100"));
}
// 判断前端拼音传值是否正常
if (!StringUtil.checkLength(category.getCategoryPinyin() + "", 1, 100)) {
return ResultData.build().error(getResString("err.length", this.getResString("category.pinyin"), "1", "100"));
}
if (!StringUtil.checkLength(category.getCategoryParentIds() + "", 0, 100)) {
return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
}
@ -286,7 +286,7 @@ public class CategoryAction extends BaseAction {
}
String pingYin = PinYinUtil.getPingYin(category.getCategoryTitle());
//如果用户填写了拼音则使用用户填写的
if (StrUtil.isNotBlank(category.getCategoryPinyin())) {
if (StrUtil.isNotBlank(category.getCategoryPinyin()) && StringUtil.checkLength(category.getCategoryPinyin() + "", 1, 100)) {
pingYin = category.getCategoryPinyin();
}
CategoryEntity categoryEntity = new CategoryEntity();

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.action;
import io.swagger.annotations.Api;
@ -126,6 +128,7 @@ public class ContentAction extends BaseAction {
/**
* 返回编辑界面content_form
*/
@ApiIgnore
@GetMapping("/form")
public String form(@ModelAttribute ContentEntity content, ModelMap model){
model.addAttribute("appId", BasicUtil.getApp().getAppId());

@ -22,6 +22,8 @@
package net.mingsoft.cms.action;
import cn.hutool.core.bean.BeanUtil;

@ -1,23 +1,25 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.action.web;

@ -1,23 +1,25 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.action.web;

@ -19,6 +19,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.action.web;
import cn.hutool.core.util.ObjectUtil;
@ -130,32 +132,10 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
categoryIds = null;
}
//List categoryIdList = CollectionUtil.newArrayList();
//当传递了栏目编号,但不是栏目集合
if (StringUtils.isNotBlank(categoryIds) && !categoryIds.contains(",")) {
typeId = categoryIds;
}
// else {
// //取出所有的子栏目
// String[] ids = categoryIds.split(",");
// List<CategoryEntity> categoryList = categoryBiz.list(Wrappers.<CategoryEntity>lambdaQuery().ne(CategoryEntity::getCategoryType, CategoryTypeEnum.LINK.toString()));
//
// categoryIdList = CollectionUtil.newArrayList(ids);
// for(CategoryEntity c:categoryList) {
// if(StringUtils.isNotEmpty(c.getParentids())) {
// for(String id:ids) {
// if(c.getParentids().indexOf(id)>-1) {
// categoryIdList.add(c.getId());
// break;
// }
// }
// }
// }
// }
//重新组织 ID
//categoryIds = StringUtils.join(categoryIdList, ",");
//根据栏目确定自定义模型

@ -1,9 +1,26 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* 本软件及相关文档文件以下简称软件的版权归 铭软科技 所有
* 遵循铭软科技保密协议
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.aop;
import cn.hutool.core.collection.CollectionUtil;

@ -7,10 +7,10 @@
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.aop;
import cn.hutool.core.io.FileUtil;

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.bean;
import com.fasterxml.jackson.annotation.JsonFormat;

@ -1,23 +1,25 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.bean;

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
@ -54,7 +56,16 @@ public interface IContentBiz extends IBaseBiz<ContentEntity> {
*/
List<CategoryBean> queryContent(ContentBean contentBean);
int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, int appId, String categoryIds);
/**
* 文章搜索结果总数提供搜索使用
* @param contentModel 文章模型
* @param diyList 扩展模型字段 List<Map> key:自定义模型字段:
* @param whereMap 条件
* @param websiteId 站点编号
* @param categoryIds 栏目编号集合 格式1,2,3
* @return
*/
int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, String websiteId, String categoryIds);
/**
* 根据文章属性查询,不包括单篇
* @param contentBean

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;

@ -22,6 +22,8 @@
package net.mingsoft.cms.biz.impl;
import cn.hutool.core.collection.CollUtil;

@ -22,6 +22,8 @@
package net.mingsoft.cms.biz.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -92,7 +94,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
}
@Override
public int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, int appId, String categoryIds) {
public int getSearchCount(ModelEntity contentModel, List diyList, Map whereMap, String appId, String categoryIds) {
if (contentModel!=null) {
return contentDao.getSearchCount(contentModel.getModelTableName(),diyList,whereMap, appId,categoryIds);
}

@ -1,23 +1,25 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.constant;
/**

@ -1,9 +1,26 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* 本软件及相关文档文件以下简称软件的版权归 铭软科技 所有
* 遵循铭软科技保密协议
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.constant.e;
import net.mingsoft.base.constant.e.BaseEnum;

@ -1,9 +1,26 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* 本软件及相关文档文件以下简称软件的版权归 铭软科技 所有
* 遵循铭软科技保密协议
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.constant.e;
import net.mingsoft.base.constant.e.BaseEnum;

@ -21,6 +21,8 @@
package net.mingsoft.cms.constant.e;
import net.mingsoft.base.constant.e.BaseEnum;

@ -1,3 +1,24 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.constant.e;
import net.mingsoft.base.constant.e.BaseEnum;

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;

@ -54,10 +54,10 @@
category_url=#{categoryUrl},
<if test="categoryKeyword != null ">category_keyword=#{categoryKeyword},</if>
<if test="categoryDescrip != null ">category_descrip=#{categoryDescrip},</if>
<if test="categoryImg != null and categoryImg != ''">category_img=#{categoryImg},</if>
<if test="categoryImg != null">category_img=#{categoryImg},</if>
<if test="categoryDisplay != null and categoryDisplay != ''">category_display=#{categoryDisplay},</if>
<if test="categoryIsSearch != null and categoryIsSearch != ''">category_is_search=#{categoryIsSearch},</if>
<if test="categoryIco != null and categoryIco != ''">category_ico=#{categoryIco},</if>
<if test="categoryIco != null">category_ico=#{categoryIco},</if>
<if test="categoryDiyUrl != null">category_diy_url=#{categoryDiyUrl},</if>
<if test="dictId != null">dict_id=#{dictId},</if>
<if test="categoryFlag != null ">category_flag=#{categoryFlag},</if>

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
@ -73,7 +75,7 @@ public interface IContentDao extends IBaseDao<ContentEntity> {
* @return 文章实体总数
*/
int getSearchCount(@Param("tableName") String tableName, @Param("diyList") List diyList, @Param("map") Map<String, Object> map,
@Param("websiteId") int websiteId, @Param("ids") String ids);
@Param("websiteId") String websiteId, @Param("ids") String categoryIds);
/**
* 分类编号删除文章

@ -436,9 +436,16 @@
and a.content_display=0
and c.category_display='enable'
and c.category_is_search='enable'
<if test="ids!=null and ids!=''">
and FIND_IN_SET(a.category_id,#{ids})>0
<if test="categoryIds!=null and categoryIds!=''">
and
<foreach item="item" index="index" collection="categoryIds.split(',')" open="(" separator="or"
close=")">
a.category_id=${item}
or a.category_id in (select id FROM cms_category where cms_category.del=0
and FIND_IN_SET(${item},CATEGORY_PARENT_IDS) > 0)
</foreach>
</if>
<if test="map.content_title!=null">
and a.content_title like CONCAT(CONCAT('%',#{map.content_title}),'%')
</if>

@ -7,10 +7,10 @@
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.entity;
import cn.hutool.core.util.BooleanUtil;

@ -1,23 +1,25 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.entity;

@ -1,23 +1,25 @@
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
/**
* The MIT License (MIT)
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.cms.entity;

@ -20,6 +20,8 @@
*/
package net.mingsoft.cms.util;
import cn.hutool.core.io.FileUtil;

@ -19,6 +19,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package net.mingsoft.config;
import cn.hutool.core.util.StrUtil;

@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/mcms?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
url: jdbc:mysql://192.168.0.6:3306/mcms?useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
username: root
password: root
filters: wall,mergeStat

@ -22,9 +22,9 @@
<el-form v-if="item.title=='栏目编辑'" ref="form" :model="form" :rules="rules" label-width="130px"
size="mini">
<el-row
:gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="栏目名称" prop="categoryTitle">
<el-input v-model="form.categoryTitle"
:disabled="false"
@ -38,13 +38,13 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item label="所属栏目" prop="categoryId">
<ms-tree-select ref="tree"
:key="treeList"
:props="{value: 'id',label: 'categoryTitle',children: 'children'}"
:options="treeList" :style="{width:'100%'}"
v-model="form.categoryId"></ms-tree-select>
:key="treeKey"
:props="{value: 'id',label: 'categoryTitle',children: 'children'}"
:options="treeList" :style="{width:'100%'}"
v-model="form.categoryId"></ms-tree-select>
<div class="ms-form-tip">
不能将父级别栏目移动到自身子级栏目
</div>
@ -52,9 +52,9 @@
</el-col>
</el-row>
<el-row
:gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="栏目副标题" prop="categoryShortTitle">
<el-input v-model="form.categoryShortTitle"
:disabled="false"
@ -68,7 +68,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12" style="display: flex">
<el-col :span=12 style="display: flex">
<el-form-item label="栏目属性" prop="categoryFlag">
<el-select v-model="form.categoryFlag"
:style="{width: '100%'}"
@ -88,9 +88,9 @@
</el-col>
</el-row>
<el-row
:gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="是否显示" prop="categoryDisplay">
<el-radio-group v-model="form.categoryDisplay"
:style="{width: ''}"
@ -107,7 +107,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item label="是否可被搜索" prop="categoryIsSearch">
<el-radio-group v-model="form.categoryIsSearch"
:style="{width: ''}"
@ -126,9 +126,9 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item prop="categoryType" label="栏目类型">
<el-radio-group v-model="form.categoryType"
:style="{width: ''}"
@ -148,7 +148,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item prop="mdiyModelId" label="文章自定义模型">
<el-select v-model="form.mdiyModelId"
:style="{width: '100%'}"
@ -167,8 +167,8 @@
</el-col>
</el-row>
<el-row gutter="0" justify="start" align="top">
<el-col span="12">
<el-row :gutter=0 justify="start" align="top">
<el-col :span=12>
<el-form-item prop="categoryUrl" label="详情模板" v-if="form.categoryType != '3'">
<el-select v-model="form.categoryUrl"
:style="{width: '100%'}"
@ -197,7 +197,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item prop="categoryListUrl" label="列表模板" v-if="form.categoryType == '1'">
<el-select v-model="form.categoryListUrl"
@ -216,20 +216,20 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
</el-col>
<el-col span="12">
<el-col :span=12>
</el-col>
</el-row>
<el-row
:gutter="0"
:gutter=0
justify="start" align="top">
<el-col :span="12">
<el-col :span=12>
<el-form-item label="生成路径" prop="categoryPinyin">
<el-input
v-model="form.categoryPinyin"
@ -244,7 +244,7 @@
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span=12>
<el-form-item label="自定义顺序" prop="categorySort">
<el-input-number
v-model="form.categorySort"
@ -369,6 +369,7 @@
categoryTitle: '顶级栏目',
children: []
}],
treeKey: new Date().getTime(), //用于刷新下啦栏目,不能使用treeList,脚手架会报错
categoryList: [],
saveDisabled: false,
categoryTypeDisabled: true,
@ -541,6 +542,7 @@
//res.data.rows.push({id:0,categoryId: null,categoryTitle:'顶级栏目管理'});
that.categoryList = res.data.rows;
that.treeList = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
that.treeKey = new Date().getTime();
}
});
},
@ -656,7 +658,6 @@
});
},
//获取当前分类
get: function (id) {
var that = this;
@ -827,12 +828,6 @@
title: '加载中...',
name: 'custom-name'
});
this.$nextTick(function () {
ms.mdiy.model.extend("model1", {id:modelId},{ linkId: that.form.id },true).then(function(obj) {
that.model = obj;
that.editableTabs[1].title = obj.modelName
});
});
},
},

@ -8,7 +8,7 @@
<body>
<div id="index" class="ms-index" v-cloak>
<el-header class="ms-header" height="50px">
<el-col :span="12">
<el-col :span=12>
<@shiro.hasPermission name="cms:category:save">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="save()">新增</el-button>
</@shiro.hasPermission>
@ -25,7 +25,7 @@
border :data="dataList"
row-key="id"
v-loading="loading"
default-expand-all='true'
:default-expand-all=true
:tree-props="{children: 'children'}"
tooltip-effect="dark"
@selection-change="handleSelectionChange">
@ -87,9 +87,6 @@
<@shiro.hasPermission name="cms:category:save">
<el-link type="primary" :underline="false" @click="copyCategory(scope.row.id)">克隆</el-link>
</@shiro.hasPermission>
<#-- <@shiro.hasPermission name="cms:category:update">-->
<#-- <el-link type="primary" :underline="false" v-if="scope.row.categoryType == '1' || scope.row.categoryType == '2'" @click="updateTemplate(scope.row.id)">应用子栏目</el-link>-->
<#-- </@shiro.hasPermission>-->
<@shiro.hasPermission name="cms:category:update">
<el-link type="primary" :underline="false" @click="save(scope.row.id)">编辑</el-link>
</@shiro.hasPermission>
@ -109,54 +106,56 @@
var indexVue = new Vue({
el: '#index',
data: {
//分类列表
dataList: [],
//分类列表选中
selectionList: [],
//加载状态
loading: true,
//提示文字
emptyText: '',
categoryFlagOptions: [],
manager: ms.manager,
loadState: false,
categoryTypeOptions: [{
"value": "1",
"label": "列表"
}, {
"value": "2",
"label": "封面"
}, {
"value": "3",
"label": "链接"
}],
//搜索表单
form: {
// 栏目管理名称
categoryTitle: '',
// 栏目管理名称
categoryShortTitle: '',
// 所属栏目
categoryId: '',
// 栏目管理属性
categoryType: '2',
// 自定义顺序
categorySort: 0,
// 列表模板
categoryListUrl: '',
// 内容模板
categoryUrl: '',
// 栏目管理关键字
categoryKeyword: '',
// 栏目管理描述
categoryDescrip: '',
// 缩略图
categoryImg: [],
// 自定义链接
categoryDiyUrl: '',
// 栏目管理的内容模型id
mdiyModelId: ''
data: function () {
return {
//分类列表
dataList: [],
//分类列表选中
selectionList: [],
//加载状态
loading: true,
//提示文字
emptyText: '',
categoryFlagOptions: [],
manager: ms.manager,
loadState: false,
categoryTypeOptions: [{
"value": "1",
"label": "列表"
}, {
"value": "2",
"label": "封面"
}, {
"value": "3",
"label": "链接"
}],
//搜索表单
form: {
// 栏目管理名称
categoryTitle: '',
// 栏目管理名称
categoryShortTitle: '',
// 所属栏目
categoryId: '',
// 栏目管理属性
categoryType: '2',
// 自定义顺序
categorySort: 0,
// 列表模板
categoryListUrl: '',
// 内容模板
categoryUrl: '',
// 栏目管理关键字
categoryKeyword: '',
// 栏目管理描述
categoryDescrip: '',
// 缩略图
categoryImg: [],
// 自定义链接
categoryDiyUrl: '',
// 栏目管理的内容模型id
mdiyModelId: ''
}
}
},
methods: {

@ -9,13 +9,13 @@
<div id="form" v-cloak>
<el-header class="ms-header ms-tr" height="50px" >
<el-row type="flex" justify="space-between" align="middle">
<el-col :xs="12" :sm="14" :md="16" :lg="18" :xl="18" style="display:flex;align-items:center;">
<el-col :xs=12 :sm=14 :md=16 :lg=18 :xl=18 style="display:flex;align-items:center;">
<el-tooltip class="item" effect="dark" :content="form.id" placement="top-start">
<span v-if="form.id && categoryType=='2'" style="float: left; max-width:calc(30% - 40px);" class="header-info">编号:{{form.id}}</span>
</el-tooltip>
<el-button v-if="form.id && categoryType=='2'" type="text" style="float: left" icon="el-icon-document-copy" circle :data-clipboard-text="form.id" @click="copyString()" class="copyBtn"></el-button>
</el-col>
<el-col :xs="12" :sm="10" :md="8" :lg="6" :xl="6" class="ms-tr">
<el-col :xs=12 :sm=10 :md=8 :lg=6 :xl=6 class="ms-tr">
<@shiro.hasPermission name="cms:content:save">
<el-button type="primary" icon="iconfont icon-baocun" size="mini" @click="save()" :loading="saveDisabled">保存
</el-button>
@ -28,14 +28,14 @@
</el-row>
</el-header>
<el-main class="ms-container" style="position:relative;">
<el-scrollbar class="ms-scrollbar" style="height: 100%;">
<el-tabs v-model="activeName" style="height: calc(100% - 10px);">
<el-scrollbar class="ms-scrollbar" style="height: 95vh">
<el-tabs v-model="activeName" style="height: calc(100vh - 10px);">
<el-tab-pane style="position:relative;" v-for="(item, index) in editableTabs" :key="index"
:label="item.title" :name="item.name">
<el-form v-if="item.title=='文章编辑'" ref="form" :model="form" :rules="rules" label-width="120px"
size="mini">
<el-row :gutter="0" justify="start" align="top">
<el-col :span="12">
<el-row :gutter=0 justify="start" align="top">
<el-col :span=12>
<el-form-item label="文章标题" prop="contentTitle">
<el-input v-model="form.contentTitle"
:disabled="false"
@ -48,19 +48,20 @@
</div>
</el-form-item>
</el-col>
<el-col span="12" >
<el-col :span=12 >
<el-form-item label="所属栏目" prop="categoryId">
<treeselect v-model="form.categoryId"
:disabled="!returnIsShow"
:disable-branch-nodes="true"
:normalizer="node=>{
:normalizer="function(node){
return {
id: node.id,
label: node.categoryTitle,
children: node.children
}}"
@change="categoryChange"
@select="categoryChange"
:options="contentCategoryIdOptions" placeholder="请选择"></treeselect>
<div class="ms-form-tip">
标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html" target="_blank">${'$'}{field.typetitle}</a>
不能选择封面、链接栏目类型,不能选择父栏目
@ -69,9 +70,9 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col :span="12">
<el-col :span=12>
<el-form-item label="文章副标题" prop="contentShortTitle">
<el-input v-model="form.contentShortTitle"
:disabled="false"
@ -84,7 +85,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item label="文章外链接" prop="contentOutLink">
<el-input v-model="form.contentOutLink"
:disabled="false"
@ -100,9 +101,9 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="文章类型" prop="contentType">
<el-select v-model="form.contentType"
:style="{width: '100%'}"
@ -120,7 +121,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item label="发布时间" prop="contentDatetime">
<el-date-picker
v-model="form.contentDatetime"
@ -143,9 +144,9 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="文章作者" prop="contentAuthor">
<el-input v-model="form.contentAuthor"
:disabled="false"
@ -158,7 +159,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item label="文章来源" prop="contentSource">
<el-input v-model="form.contentSource"
:disabled="false"
@ -173,9 +174,9 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="是否显示" prop="contentDisplay">
<el-radio-group v-model="form.contentDisplay"
:style="{width: ''}"
@ -192,7 +193,7 @@
</div>
</el-form-item>
</el-col>
<el-col span="12">
<el-col :span=12>
<el-form-item label="自定义顺序" prop="contentSort">
<el-input-number
v-model="form.contentSort"
@ -206,9 +207,9 @@
</el-col>
</el-row>
<el-row
gutter="0"
:gutter=0
justify="start" align="top">
<el-col span="12">
<el-col :span=12>
<el-form-item label="文章缩略图" prop="contentImg">
<el-upload
:file-list="form.contentImg"
@ -231,13 +232,12 @@
</el-upload>
</el-form-item>
</el-col>
<el-col span="12">
<el-col span=12>
<el-form-item label="文章标签" prop="contentTags">
<el-select v-model="form.contentTags"
:style="{width: '100%'}"
:filterable="false"
:disabled="false"
filterable
:multiple="true" :clearable="true"
placeholder="请选择文章标签">
<el-option v-for='item in contentTagsOptions' :key="item.dictValue"
@ -446,9 +446,9 @@
ms.http.post(url, data).then(function (data) {
if (data.result) {
//保存时需要赋值关联ID
if (model) {
model.form.linkId = data.data.id;
model.save();
if (window.model) {
window.model.form.linkId = data.data.id;
window.model.save();
}
that.$notify({
title: '成功',
@ -535,9 +535,10 @@
title: '加载中...',
name: 'custom-name'
});
window.formVue = this;
this.$nextTick(function () {
ms.mdiy.model.extend("model1", {id:modelId},{ linkId: that.form.id },true).then(function(obj) {
that.model = obj;
window.model = obj;
that.editableTabs[1].title = obj.modelName
});
});

@ -28,7 +28,7 @@
</el-tree>
</el-scrollbar>
</div>
<iframe :src="action" class="ms-iframe-style" style="background:url('${base}/static/images/loading.gif') no-repeat center;">
<iframe :src="action" :key="iframeKey" class="ms-iframe-style" style="background:url('${base}/static/images/loading.gif') no-repeat center;">
</iframe>
</el-container>
</div>
@ -39,6 +39,7 @@
el: "#index",
data: function () {
return {
iframeKey:'',
action: "",
//跳转页面
defaultProps: {
@ -52,6 +53,7 @@
},
methods: {
handleNodeClick: function (data) {
this.iframeKey = new Date().getTime();
if (data.categoryType == '1') {
this.action = ms.manager + "/cms/content/main.do?categoryId=" + data.id+"&leaf="+data.leaf;
} else if (data.categoryType == '2') {
@ -110,10 +112,19 @@
}
#index .ms-iframe-style {
width: 100%;
height: 100%;
height: 100vh;
border: 0;
}
/*脚手架需要此样式*/
#index >>> .ms-iframe-style {
height: 92vh;
}
#index >>> .ms-index {
height: 100vh;
}
#index .index-menu .el-main {
padding: 0;
}

@ -9,7 +9,7 @@
<div id="main" class="ms-index" v-cloak>
<ms-search ref="search" @search="search" :condition-data="conditionList" :conditions="conditions"></ms-search>
<el-header class="ms-header" height="50px">
<el-col :span="12">
<el-col :span=12>
<@shiro.hasPermission name="cms:content:save">
<el-button v-if="leaf==true" type="primary" icon="el-icon-plus" size="mini" @click="save()">新增</el-button>
</@shiro.hasPermission>
@ -22,7 +22,7 @@
<el-row>
<el-form :model="form" ref="searchForm" label-width="120px" size="mini">
<el-row>
<el-col :span="8">
<el-col :span=8>
<el-form-item label="文章标题" prop="contentTitle">
<el-input v-model="form.contentTitle"
:disabled="false"
@ -32,7 +32,7 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span=8>
<el-form-item label="文章类型" prop="contentType">
<el-select v-model="form.contentType"
:style="{width: '100%'}"
@ -45,7 +45,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="text-align: right;padding-right: 10px;">
<el-col :span=8 style="text-align: right;padding-right: 10px;">
<el-button type="primary" icon="el-icon-search" size="mini" @click="form.sqlWhere=null;currentPage=1;list()">查询</el-button>
<el-button @click="rest" icon="el-icon-refresh" size="mini">重置</el-button>
<el-button type="primary" size="mini" @click="$refs.search.open()"><i class="iconfont icon-shaixuan"></i>筛选</el-button>
@ -519,6 +519,9 @@
#main .ms-container {
height: calc(100vh - 141px);
}
#main {
height: 100vh
}
body{
overflow: hidden;
}

@ -175,7 +175,7 @@
type: 'warning'
});
} else {
that.$alert('需要安装留言插件才能使用,请先进入后台MStore安装留言插件使用。<a href="http://store.mingsoft.net/#/detail?id=310&type=plugin" style="color:#409EFF " target="_blank">查看留言插件</a>', '留言插件提示', {
that.$alert('需要安装留言插件才能使用,请先进入后台MStore安装留言插件使用。<a href="http://store.mingsoft.net/#/detail?id=310&type=plugin" target="_blank">查看留言插件</a>', '留言插件提示', {
dangerouslyUseHTMLString: true
});
}

Loading…
Cancel
Save