Pārlūkot izejas kodu

up:5.4.4升级

msgroup 8 mēneši atpakaļ
vecāks
revīzija
d06d606533

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 17
doc/5.4.2-up-5.4.3.sql


+ 11 - 0
doc/5.4.3-up-5.4.4.sql

@@ -0,0 +1,11 @@
+ALTER TABLE `mdiy_tag`   ADD COLUMN `APP_ID` varchar(20) NULL DEFAULT 'global' COMMENT '站点id,如果是global说明在站群下是全局标识' AFTER `CREATE_DATE`;
+ALTER TABLE `mdiy_model`    ADD COLUMN `APP_ID` varchar(20) NULL DEFAULT 'global' COMMENT '站点id,如果是global说明在站群下是全局标识' AFTER `NOT_DEL`;
+ALTER TABLE `mdiy_config`    ADD COLUMN `APP_ID` varchar(20) NULL DEFAULT 'global' COMMENT '站点id,如果是global说明在站群下是全局标识' AFTER `NOT_DEL`;
+ALTER TABLE `model`    ADD COLUMN `APP_ID` varchar(20) NULL COMMENT '站点id,默认情况是null' AFTER `DEL`;
+UPDATE mdiy_tag SET APP_ID = 'global' WHERE APP_ID IS null ;
+UPDATE mdiy_model SET APP_ID = 'global' WHERE APP_ID IS null ;
+UPDATE mdiy_config SET APP_ID = 'global' WHERE APP_ID IS null ;
+UPDATE model m1 JOIN (SELECT m.id,mm.id AS model_id, mm.model_name, m.model_url FROM model m JOIN mdiy_model mm ON m.model_url LIKE CONCAT( '%mdiy:configData:', mm.model_name, ':%' )) m2 ON m1.id = m2.id SET m1.model_url = REPLACE ( m1.model_url, CONCAT( 'mdiy:configData:', m2.model_name ), CONCAT( 'mdiy:configData:', m2.model_id ));
+ALTER TABLE `cms_content`    MODIFY COLUMN `content_datetime` datetime NULL DEFAULT CURRENT_TIMESTAMP AFTER `CONTENT_TAGS`;
+UPDATE model p1 JOIN (SELECT t1.id,t2.id AS model_id,t2.model_name,t1.model_url FROM model t1 JOIN mdiy_model t2 ON t1.model_url LIKE CONCAT( '%modelName=', t2.model_name, '%' )) p2 ON p1.id = p2.id SET p1.model_url = REPLACE (p1.model_url,CONCAT( 'modelName=', p2.model_name ),CONCAT( 'modelId=', p2.model_id ));
+UPDATE model m1 JOIN (SELECT m.id,mm.id AS model_id, mm.model_name, m.model_url FROM model m JOIN mdiy_model mm ON m.model_url LIKE CONCAT( '%mdiy:formData:', mm.model_name, ':%' )) m2 ON m1.id = m2.id SET m1.model_url = REPLACE ( m1.model_url, CONCAT( 'mdiy:formData:', m2.model_name ), CONCAT( 'mdiy:formData:', m2.model_id ));

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 3 - 6
doc/mcms-5.4.4.sql


+ 7 - 7
pom.xml

@@ -44,24 +44,24 @@
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-base</artifactId>
-            <version>2.2.6</version>
+            <version>2.2.7</version>
         </dependency>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-basic</artifactId>
-            <version>2.2.6</version>
+            <version>2.2.7</version>
         </dependency>
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>ms-mdiy</artifactId>
-            <version>2.2.6</version>
+            <version>2.2.7</version>
         </dependency>
 
         <!--store入口依赖(源码不开发),如果不需要MStore可以直接去掉依赖-->
         <dependency>
             <groupId>net.mingsoft</groupId>
             <artifactId>store-client</artifactId>
-            <version>2.2.6</version>
+            <version>2.2.7</version>
         </dependency>
         <dependency>
             <groupId>com.github.oshi</groupId>
@@ -127,13 +127,13 @@
                 <excludes>
                     <!-- 可以避免将静态资源打入jar包中,方便生产实时修改静态资源文件-->
                     <!-- 打包生产建议并手动将static、html、upload、template复制到生产 -->
-                    <!--<exclude>static/</exclude>
+                    <exclude>static/</exclude>
                     <exclude>html/</exclude>
                     <exclude>upload/</exclude>
-                    <exclude>template/</exclude>-->
+                    <exclude>template/</exclude>
 
                     <!-- 如果生产需要实时修改WEB-INF/下的页面可,启用这行并手动将项目中的WEB-INF目录复制到运行环境 -->
-                    <!--<exclude>WEB-INF/</exclude>-->
+                    <exclude>WEB-INF/</exclude>
                 </excludes>
          </resource>
          <resource>

+ 5 - 2
src/main/java/net/mingsoft/cms/action/web/ContentAction.java

@@ -37,11 +37,11 @@ import net.mingsoft.cms.biz.IHistoryLogBiz;
 import net.mingsoft.cms.entity.CategoryEntity;
 import net.mingsoft.cms.entity.ContentEntity;
 import net.mingsoft.cms.entity.HistoryLogEntity;
+import net.mingsoft.mdiy.biz.IConfigBiz;
 import net.mingsoft.mdiy.biz.IModelBiz;
 import net.mingsoft.mdiy.entity.ModelEntity;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
@@ -76,6 +76,9 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
 	private IModelBiz modelBiz;
 
 	@Autowired
+	private IConfigBiz modelBiz1;
+
+	@Autowired
 	private IHistoryLogBiz historyLogBiz;
 
 	/**
@@ -159,7 +162,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
 	@ApiOperation(value = "查看文章点击数")
 	@ApiImplicitParam(name = "contentId", value = "文章编号", required = true,paramType="path")
 	// 由于适配增加了对clob序列化处理,此处需要指定响应头
-	@GetMapping(value = "/{contentId}/hit", produces = MediaType.TEXT_HTML_VALUE)
+	@GetMapping(value = "/{contentId}/hit", produces = "application/javascript")
 	@ResponseBody
 	public String hit(@PathVariable @ApiIgnore String contentId) {
 		if(StringUtils.isEmpty(contentId)){

+ 15 - 0
src/main/java/net/mingsoft/cms/bean/CategoryBean.java

@@ -48,6 +48,21 @@ public class CategoryBean extends CategoryEntity {
 	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date contentUpdateDate;
 
+	/**
+	 * 文章发布时间
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date contentDatetime;
+
+	public Date getContentDatetime() {
+		return contentDatetime;
+	}
+
+	public void setContentDatetime(Date contentDatetime) {
+		this.contentDatetime = contentDatetime;
+	}
+
 	public Date getContentUpdateDate() {
 		return contentUpdateDate;
 	}

+ 7 - 0
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java

@@ -521,6 +521,13 @@ public class CategoryEntity extends BaseEntity {
     private String typepath;
 
     /**
+     * 获取栏目小图 (标签使用)
+     */
+    public String getTypeico() {
+        return categoryIco;
+    }
+
+    /**
      * 获取栏目图片 (标签使用)
      */
     public String getTypepath() {

+ 7 - 1
src/main/java/net/mingsoft/config/WebConfig.java

@@ -38,6 +38,7 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean;
 import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.core.Ordered;
 import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
@@ -61,7 +62,11 @@ import java.util.concurrent.TimeUnit;
 @Configuration
 public class WebConfig implements WebMvcConfigurer {
 
+    /**
+     * 必须增加@Lazy注解,否则会导致 configBiz 实例化 单例模式,导致configBiz不被aop拦截、事务机制不生效
+     */
     @Resource
+    @Lazy
     private IConfigBiz configBiz;
 
 
@@ -92,7 +97,7 @@ public class WebConfig implements WebMvcConfigurer {
      */
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
-          // 排除配置
+        // 排除配置
         registry.addInterceptor(actionInterceptor()).excludePathPatterns("/static/**", "/app/**", "/webjars/**",
                 "/*.html", "/*.htm");
     }
@@ -187,6 +192,7 @@ public class WebConfig implements WebMvcConfigurer {
      */
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        // TODO Auto-generated method stub
         converters.add(mappingJackson2HttpMessageConverter);
         WebMvcConfigurer.super.configureMessageConverters(converters);
 

+ 2 - 2
src/main/webapp/WEB-INF/manager/cms/category/form.ftl

@@ -674,7 +674,7 @@
                         if (res.data.categoryImg) {
                             res.data.categoryImg = JSON.parse(res.data.categoryImg);
                             res.data.categoryImg.forEach(function (value) {
-                                value.url = ms.base + value.url;
+                                value.url = ms.contextpath + value.url;
                             });
                         } else {
                             res.data.categoryImg = [];
@@ -682,7 +682,7 @@
                         if (res.data.categoryIco) {
                             res.data.categoryIco = JSON.parse(res.data.categoryIco);
                             res.data.categoryIco.forEach(function (value) {
-                                value.url = ms.base + value.url;
+                                value.url = ms.contextpath + value.url;
                             });
                         } else {
                             res.data.categoryIco = [];

+ 15 - 13
src/main/webapp/WEB-INF/manager/cms/content/form.ftl

@@ -1,4 +1,4 @@
-
+<#include "mdiy/components/ms-dict.ftl">
 <template type="text/x-template" id="content-form">
     <div id="form" v-cloak>
         <el-header class="ms-header ms-tr" height="50px" >
@@ -232,16 +232,15 @@
                                 </el-col>
                                 <el-col :span=12>
                                     <el-form-item label="文章标签" prop="contentTags">
-                                        <el-select v-model="form.contentTags"
-                                                   :style="{width: '100%'}"
-                                                   :filterable="false"
-                                                   :disabled="false"
-                                                   :multiple="true" :clearable="true"
-                                                   placeholder="请选择文章标签">
-                                            <el-option v-for='item in contentTagsOptions' :key="item.dictValue"
-                                                       :value="item.dictValue"
-                                                       :label="item.dictLabel"></el-option>
-                                        </el-select>
+                                        <ms-dict v-model="form.contentTags"
+                                                 :style="{width: ''}"
+                                                 :filterable="true"
+                                                 :disabled="false"
+                                                 dict-type="文章标签"
+                                                 :multiple-limit="5"
+                                                 :multiple="true" :clearable="true"
+                                                 placeholder="请选择文章标签">
+                                        </ms-dict>
                                         <div class="ms-form-tip">
                                             标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html" target="_blank">${'$'}{field.tags}</a>
                                             通过自定义字典可扩展数据;字典类型:文章标签
@@ -299,6 +298,9 @@
     var contentForm = Vue.defineComponent({
         template: '#content-form',
         props:["categoryId","categoryType","id"],
+        components:{
+            MsDict
+        },
         data: function () {
             var checkTags = function (rule, value, callback){
                 if (value.length > 5){
@@ -638,7 +640,7 @@
                         if (res.data.contentImg && res.data.contentImg != '') {
                             res.data.contentImg = JSON.parse(res.data.contentImg);
                             res.data.contentImg.forEach(function (value) {
-                                value.url = ms.base + value.url;
+                                value.url = ms.contextpath + value.url;
                             });
                         } else {
                             res.data.contentImg = [];
@@ -676,7 +678,7 @@
                             if (res.data.contentImg) {
                                 res.data.contentImg = JSON.parse(res.data.contentImg);
                                 res.data.contentImg.forEach(function (value) {
-                                    value.url = ms.base + value.url;
+                                    value.url = ms.contextpath + value.url;
                                 });
                             } else {
                                 res.data.contentImg = [];

+ 252 - 245
src/main/webapp/WEB-INF/manager/cms/content/list.ftl

@@ -1,133 +1,133 @@
 
 <template type="text/x-template" id="content-main">
-<div id="main" class="ms-index"  v-cloak>
-    <el-header class="ms-header" height="50px">
-        <el-col :span=12>
-            <@shiro.hasPermission name="cms:content:save">
-                <el-button v-if="isLeaf==true" type="primary" class="el-icon-plus" size="default" @click="openForm()">新增</el-button>
-            </@shiro.hasPermission>
-            <@shiro.hasPermission name="cms:content:del">
-                <el-button type="danger" class="el-icon-delete" size="default" @click="del(selectionList)"  :disabled="!selectionList.length">删除</el-button>
-            </@shiro.hasPermission>
-        </el-col>
-    </el-header>
-    <div class="ms-search">
-        <el-row>
-            <el-form :model="form"  ref="searchForm"  label-width="120px" size="default">
-                <el-row>
-                    <el-col :span=8>
-                        <el-form-item  label="文章标题" prop="contentTitle">
-                            <el-input v-model="form.contentTitle"
-                                      :disabled="false"
-                                      :style="{width:  '100%'}"
-                                      :clearable="true"
-                                      placeholder="请输入文章标题">
-                            </el-input>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span=8>
-                        <el-form-item  label="文章类型" prop="contentType">
-                            <el-select v-model="form.contentType"
-                                       :style="{width: '100%'}"
-                                       :filterable="false"
-                                       :disabled="false"
-                                       :multiple="true" :clearable="true"
-                                       placeholder="请选择文章类型">
-                                <el-option v-for='item in contentTypeOptions' :key="item.dictValue" :value="item.dictValue"
-                                           :label="item.dictLabel"></el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span=8 style="display: flex;justify-content: end;padding-right: 10px;">
-                        <el-button type="primary" class="el-icon-search" size="default" @click="form.sqlWhere=null;currentPage=1;list()">查询</el-button>
-                        <el-button @click="rest"  class="el-icon-refresh" size="default">重置</el-button>
-                        <ms-search ref="search" @search="search" :search-json="searchJson" :search-key="historyKey"></ms-search>
+    <div id="main" class="ms-index"  v-cloak>
+        <el-header class="ms-header" height="50px">
+            <el-col :span=12>
+                <@shiro.hasPermission name="cms:content:save">
+                    <el-button v-if="isLeaf==true" type="primary" class="el-icon-plus" size="default" @click="openForm()">新增</el-button>
+                </@shiro.hasPermission>
+                <@shiro.hasPermission name="cms:content:del">
+                    <el-button type="danger" class="el-icon-delete" size="default" @click="del(selectionList)"  :disabled="!selectionList.length">删除</el-button>
+                </@shiro.hasPermission>
+            </el-col>
+        </el-header>
+        <div class="ms-search">
+            <el-row>
+                <el-form :model="form"  ref="searchForm"  label-width="120px" size="default">
+                    <el-row>
+                        <el-col :span=8>
+                            <el-form-item  label="文章标题" prop="contentTitle">
+                                <el-input v-model="form.contentTitle"
+                                          :disabled="false"
+                                          :style="{width:  '100%'}"
+                                          :clearable="true"
+                                          placeholder="请输入文章标题">
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span=8>
+                            <el-form-item  label="文章类型" prop="contentType">
+                                <el-select v-model="form.contentType"
+                                           :style="{width: '100%'}"
+                                           :filterable="false"
+                                           :disabled="false"
+                                           :multiple="true" :clearable="true"
+                                           placeholder="请选择文章类型">
+                                    <el-option v-for='item in contentTypeOptions' :key="item.dictValue" :value="item.dictValue"
+                                               :label="item.dictLabel"></el-option>
+                                </el-select>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span=8 style="display: flex;justify-content: end;padding-right: 10px;">
+                            <el-button type="primary" class="el-icon-search" size="default" @click="form.sqlWhere=null;currentPage=1;list()">查询</el-button>
+                            <el-button @click="rest"  class="el-icon-refresh" size="default">重置</el-button>
+                            <ms-search ref="search" @search="search" :search-json="searchJson" :search-key="historyKey"></ms-search>
 
-                    </el-col>
-                </el-row>
-            </el-form>
-        </el-row>
-    </div>
-    <el-main class="ms-container">
-        <el-table v-loading="loading" ref="multipleTable" class="ms-table-pagination" border :data="dataList" tooltip-effect="dark" @selection-change="handleSelectionChange">
-            <template #empty>
-                {{emptyText}}
-            </template>
-            <el-table-column type="selection" width="40"></el-table-column>
-            <el-table-column label="编号" width="200" prop="id">
-                <template #header>编号
-                    <el-popover placement="top-start" title="提示" trigger="hover" >
-                        标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html#%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8-msarclist" target="_blank">${'$'}{field.id}</a>
-                        <template #reference>
-                            <i class="el-icon-question"></i>
-                        </template>
-                    </el-popover>
-                </template>
-            </el-table-column>
-            <el-table-column label="栏目名" align="left" prop="categoryId" :formatter="contentCategoryIdFormat" width="180">
-            </el-table-column>
-            <el-table-column label="文章标题" align="left" prop="contentTitle" show-overflow-tooltip>
-            </el-table-column>
-            <el-table-column label="文章副标题" align="left" prop="contentShortTitle" show-overflow-tooltip>
-            </el-table-column>
-            <el-table-column label="文章链接" align="left" prop="categoryId" :formatter="contentCategoryPathFormat" width="240">
-            </el-table-column>
-            <el-table-column label="是否显示" width="100" align="center" prop="contentDisplay">
-                <template #header>是否显示
-                    <el-popover placement="top-start" title="提示" trigger="hover" >
-                        为否后,该文章将不会在前台显示。
-                        <template #reference>
-                            <i class="el-icon-question"></i>
-                        </template>
-                    </el-popover>
-                </template>
-                <template #default="scope">
-                    <el-tag :type="scope.row.contentDisplay==0?'success':'info'">{{scope.row.contentDisplay==0?'显示':'隐藏'}}</el-tag>
-                </template>
-            </el-table-column>
-            <el-table-column label="作者" align="left" prop="contentAuthor" width="100" show-overflow-tooltip>
-            </el-table-column>
-            <el-table-column label="排序" width="55" align="right" prop="contentSort">
-            </el-table-column>
-            <el-table-column label="点击量" width="90" align="right" prop="contentHit">
-                <template #header>点击量
-                    <el-popover placement="top-start" title="提示" trigger="hover" >
-                        标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html#%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8-msarclist" target="_blank">${'$'}{field.hit}</a>
-                        <template #reference>
-                            <i class="el-icon-question"></i>
-                        </template>
-                    </el-popover>
-                </template>
-                <template #default="scope">
-                    {{scope.row.contentHit?scope.row.contentHit:0}}
-                </template>
-            </el-table-column>
-            <el-table-column label="发布时间" align="center" prop="contentDatetime" :formatter="dateFormat" width="120">
-            </el-table-column>
-            <el-table-column label="操作" width="120" align="center"   fixed="right">
-                <template #default="scope">
-                    <@shiro.hasPermission name="cms:content:update">
-                        <el-link type="primary" :underline="false" @click="openForm(scope.row.id)">编辑</el-link>
-                    </@shiro.hasPermission>
-                    <@shiro.hasPermission name="cms:content:del">
-                        <el-link type="primary" :underline="false" @click="del([scope.row])">删除</el-link>
-                    </@shiro.hasPermission>
+                        </el-col>
+                    </el-row>
+                </el-form>
+            </el-row>
+        </div>
+        <el-main class="ms-container">
+            <el-table v-loading="loading" ref="multipleTable" class="ms-table-pagination" border :data="dataList" tooltip-effect="dark" @selection-change="handleSelectionChange">
+                <template #empty>
+                    {{emptyText}}
                 </template>
-            </el-table-column>
-        </el-table>
-        <el-pagination
-                background
-                :page-sizes="[10,20,30,40,50,100]"
-                layout="total, sizes, prev, pager, next, jumper"
-                :current-page="currentPage"
-                :page-size="pageSize"
-                :total="total"
-                class="ms-pagination"
-                @current-change='currentChange'
-                @size-change="sizeChange">
-        </el-pagination>
-    </el-main>
-</div>
+                <el-table-column type="selection" width="40"></el-table-column>
+                <el-table-column label="编号" width="200" prop="id">
+                    <template #header>编号
+                        <el-popover placement="top-start" title="提示" trigger="hover" >
+                            标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html#%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8-msarclist" target="_blank">${'$'}{field.id}</a>
+                            <template #reference>
+                                <i class="el-icon-question"></i>
+                            </template>
+                        </el-popover>
+                    </template>
+                </el-table-column>
+                <el-table-column label="栏目名" align="left" prop="categoryId" :formatter="contentCategoryIdFormat" width="180">
+                </el-table-column>
+                <el-table-column label="文章标题" align="left" prop="contentTitle" show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column label="文章副标题" align="left" prop="contentShortTitle" show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column label="文章链接" align="left" prop="categoryId" :formatter="contentCategoryPathFormat" width="240">
+                </el-table-column>
+                <el-table-column label="是否显示" width="100" align="center" prop="contentDisplay">
+                    <template #header>是否显示
+                        <el-popover placement="top-start" title="提示" trigger="hover" >
+                            为否后,该文章将不会在前台显示。
+                            <template #reference>
+                                <i class="el-icon-question"></i>
+                            </template>
+                        </el-popover>
+                    </template>
+                    <template #default="scope">
+                        <el-tag :type="scope.row.contentDisplay==0?'success':'info'">{{scope.row.contentDisplay==0?'显示':'隐藏'}}</el-tag>
+                    </template>
+                </el-table-column>
+                <el-table-column label="作者" align="left" prop="contentAuthor" width="100" show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column label="排序" width="55" align="right" prop="contentSort">
+                </el-table-column>
+                <el-table-column label="点击量" width="90" align="right" prop="contentHit">
+                    <template #header>点击量
+                        <el-popover placement="top-start" title="提示" trigger="hover" >
+                            标签:<a href="http://doc.mingsoft.net/mcms/biao-qian/wen-zhang-lie-biao-ms-arclist.html#%E6%96%87%E7%AB%A0%E5%88%97%E8%A1%A8-msarclist" target="_blank">${'$'}{field.hit}</a>
+                            <template #reference>
+                                <i class="el-icon-question"></i>
+                            </template>
+                        </el-popover>
+                    </template>
+                    <template #default="scope">
+                        {{scope.row.contentHit?scope.row.contentHit:0}}
+                    </template>
+                </el-table-column>
+                <el-table-column label="发布时间" align="center" prop="contentDatetime" :formatter="dateFormat" width="120">
+                </el-table-column>
+                <el-table-column label="操作" width="120" align="center"   fixed="right">
+                    <template #default="scope">
+                        <@shiro.hasPermission name="cms:content:update">
+                            <el-link type="primary" :underline="false" @click="openForm(scope.row.id)">编辑</el-link>
+                        </@shiro.hasPermission>
+                        <@shiro.hasPermission name="cms:content:del">
+                            <el-link type="primary" :underline="false" @click="del([scope.row])">删除</el-link>
+                        </@shiro.hasPermission>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination
+                    background
+                    :page-sizes="[10,20,30,40,50,100]"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :current-page="currentPage"
+                    :page-size="pageSize"
+                    :total="total"
+                    class="ms-pagination"
+                    @current-change='currentChange'
+                    @size-change="sizeChange">
+            </el-pagination>
+        </el-main>
+    </div>
 </template>
 
 <script>
@@ -143,124 +143,130 @@
             return {
 
                 searchJson: [
-                   {
-                    action: 'and',
-                    field: 'content_title',
-                    el: 'eq',
-                    model: 'contentTitle',
-                    name: '文章标题',
-                    type: 'input'
-                }, {
-                    action: 'and',
-                    field: 'content_short_title',
-                    el: 'eq',
-                    model: 'contentShortTitle',
-                    name: '文章副标题',
-                    type: 'input'
-                }, {
-                    action: 'and',
-                    field: 'ct.category_id',
-                    el: 'eq',
-                    model: 'contentCategoryId',
-                    name: '所属栏目',
-                    key: 'id',
-                    title: 'categoryTitle',
-                    type: 'cascader',
-                    multiple: false
-                }, {
-                    action: 'and',
-                    field: 'content_type',
-                    el: 'eq',
-                    model: 'contentType',
-                    name: '文章类型',
-                    key: 'dictValue',
-                    title: 'dictLabel',
-                    type: 'checkbox',
-                    label: false,
-                    multiple: true
-                }, {
-                    action: 'and',
-                    field: 'content_display',
-                    el: 'eq',
-                    model: 'contentDisplay',
-                    name: '是否显示',
-                    key: 'value',
-                    title: 'label',
-                    type: 'radio',
-                    label: true,
-                    multiple: false
-                }, {
-                    action: 'and',
-                    field: 'content_author',
-                    el: 'eq',
-                    model: 'contentAuthor',
-                    name: '文章作者',
-                    type: 'input'
-                }, {
-                    action: 'and',
-                    field: 'content_source',
-                    el: 'eq',
-                    model: 'contentSource',
-                    name: '文章来源',
-                    type: 'input'
-                }, {
-                    action: 'and',
-                    field: 'ct.content_datetime',
-                    model: 'contentDatetime',
-                    el: 'gt',
-                    name: '发布时间',
-                    type: 'date'
-                }, {
-                    action: 'and',
-                    field: 'content_sort',
-                    el: 'eq',
-                    model: 'contentSort',
-                    name: '自定义顺序',
-                    type: 'number'
-                }, {
-                    action: 'and',
-                    field: 'content_description',
-                    el: 'eq',
-                    model: 'contentDescription',
-                    name: '描述',
-                    type: 'textarea'
-                }, {
-                    action: 'and',
-                    field: 'content_keyword',
-                    el: 'eq',
-                    model: 'contentKeyword',
-                    name: '关键字',
-                    type: 'textarea'
-                }, {
-                    action: 'and',
-                    field: 'content_details',
-                    el: 'like',
-                    model: 'contentDetails',
-                    name: '文章内容',
-                    type: 'input'
-                }, {
-                    action: 'and',
-                    field: 'content_url',
-                    el: 'eq',
-                    model: 'contentUrl',
-                    name: '文章跳转链接地址',
-                    type: 'input'
-                }, {
-                    action: 'and',
-                    field: 'ct.create_date',
-                    el: 'eq',
-                    model: 'createDate',
-                    name: '创建时间',
-                    type: 'date'
-                }, {
-                    action: 'and',
-                    field: 'ct.update_date',
-                    el: 'eq',
-                    model: 'updateDate',
-                    name: '修改时间',
-                    type: 'date'
-                }],
+                    {
+                        action: 'and',
+                        field: 'content_title',
+                        el: 'eq',
+                        model: 'contentTitle',
+                        name: '文章标题',
+                        type: 'input'
+                    }, {
+                        action: 'and',
+                        field: 'content_short_title',
+                        el: 'eq',
+                        model: 'contentShortTitle',
+                        name: '文章副标题',
+                        type: 'input'
+                    }, {
+                        action: 'and',
+                        field: 'ct.category_id',
+                        el: 'eq',
+                        model: 'contentCategoryId',
+                        name: '所属栏目',
+                        key: 'id',
+                        title: 'categoryTitle',
+                        type: 'tree'
+                    }, {
+                        action: 'and',
+                        field: 'content_type',
+                        el: 'eq',
+                        model: 'contentType',
+                        name: '文章类型',
+                        key: 'dictValue',
+                        title: 'dictLabel',
+                        type: 'checkbox',
+                        label: false,
+                        multiple: true
+                    }, {
+                        action: 'and',
+                        field: 'content_display',
+                        el: 'eq',
+                        model: 'contentDisplay',
+                        name: '是否显示',
+                        key: 'value',
+                        title: 'label',
+                        type: 'radio',
+                        label: true,
+                        multiple: false
+                    }, {
+                        action: 'and',
+                        field: 'content_author',
+                        el: 'eq',
+                        model: 'contentAuthor',
+                        name: '文章作者',
+                        type: 'input'
+                    }, {
+                        action: 'and',
+                        field: 'content_source',
+                        el: 'eq',
+                        model: 'contentSource',
+                        name: '文章来源',
+                        type: 'input'
+                    }, {
+                        action: 'and',
+                        field: 'ct.content_datetime',
+                        model: 'contentDatetime',
+                        el: 'gt',
+                        name: '发布时间',
+                        type: 'date'
+                    }, {
+                        action: 'and',
+                        field: 'content_sort',
+                        el: 'eq',
+                        model: 'contentSort',
+                        name: '自定义顺序',
+                        type: 'number'
+                    }, {
+                        action: 'and',
+                        field: 'content_description',
+                        el: 'eq',
+                        model: 'contentDescription',
+                        name: '描述',
+                        type: 'textarea'
+                    }, {
+                        action: 'and',
+                        field: 'content_keyword',
+                        el: 'eq',
+                        model: 'contentKeyword',
+                        name: '关键字',
+                        type: 'textarea'
+                    }, {
+                        action: 'and',
+                        field: 'content_details',
+                        el: 'like',
+                        model: 'contentDetails',
+                        name: '文章内容',
+                        type: 'input'
+                    }, {
+                        action: 'and',
+                        field: 'content_url',
+                        el: 'eq',
+                        model: 'contentUrl',
+                        name: '文章跳转链接地址',
+                        type: 'input'
+                    }, {
+                        action: 'and',
+                        field: 'ct.create_date',
+                        el: 'eq',
+                        model: 'createDate',
+                        name: '创建时间',
+                        type: 'date'
+                    }, {
+                        action: 'and',
+                        field: 'ct.update_date',
+                        el: 'eq',
+                        model: 'updateDate',
+                        name: '修改时间',
+                        type: 'date'
+                    }],
                 contentCategoryIdOptions: [],
+                contentCategoryIdTreeOptions: [],
+                contentCategoryIdTreeProps: {value: 'id',label: 'categoryTitle',children: 'children'},
+                contentCategoryIdProps:{
+                    value: 'id',
+                    categoryTitle: 'modelTitle',
+                    children: 'modelChildList'
+                },
                 dataList: [],
                 //文章列表
                 selectionList: [],
@@ -432,7 +438,7 @@
                     });
                     if (data && data.categoryPath) {
                         // row.url /html/web/categoryPath/文章id.html categoryPath做占位符
-                            path = row.url.replace("categoryPath",data.categoryPath);
+                        path = row.url.replace("categoryPath",data.categoryPath);
                     }else {
                         path = row.url;
                     }
@@ -489,6 +495,7 @@
                 ms.http.get(ms.manager + "/cms/category/list.do").then(function (res) {
                     if (res.result) {
                         that.contentCategoryIdOptions = res.data.rows;
+                        that.contentCategoryIdTreeOptions =  ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
                     }else {
                         that.$notify({
                             title: '失败',
@@ -554,7 +561,7 @@
 
             }
         }
-        
+
     });
 </script>
 <style scoped>

+ 10 - 4
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl

@@ -167,7 +167,7 @@
                     <div class="class-10" >
                         <el-form-item>
                             <@shiro.hasPermission name="cms:generate:del">
-                                <el-button type="primary" @click="del(deletePath)" :loading="homeLoading">{{homeLoading?'删除中':'删除页面'}}</el-button>
+                                <el-button type="primary" @click="del()" :loading="delLoading">{{delLoading?'删除中':'删除页面'}}</el-button>
                             </@shiro.hasPermission>
                         </el-form-item>
                     </div>
@@ -190,6 +190,7 @@
                 homeLoading: false,
                 articleLoading: false,
                 columnLoading: false,
+                delLoading:false,
                 template: '',
                 //主题模板
                 templateOptions: [],
@@ -210,14 +211,16 @@
         },
         methods: {
             //删除
-            del: function (deletePath) {
+            del: function () {
                 var that = this;
-                if (!deletePath.trim()) {
+                that.delLoading = true;
+                if (!that.deletePath.trim()) {
                     that.$notify({
                         title: '失败',
                         message: "请输入有效的页面路径",
                         type: 'warning'
                     });
+                    that.delLoading = false;
                     return;
                 }
                 that.$confirm('确定删除该文件吗?', '删除文件', {
@@ -226,7 +229,7 @@
                     type: 'warning'
                 }).then(function () {
                     ms.http.post(ms.manager + "/cms/generate/delete.do", {
-                        deletePath:deletePath
+                        deletePath:that.deletePath
                     }).then(function (res) {
                         if (res.result) {
                             that.$notify({
@@ -241,7 +244,10 @@
                                 type: 'warning'
                             });
                         }
+                        that.delLoading = false;
                     });
+                }).catch(function (err) {
+                    that.delLoading = false;
                 })
             },
 

+ 5 - 0
src/main/webapp/static/css/app.css

@@ -191,4 +191,9 @@ textarea::-webkit-input-placeholder {
 /** 表单提示 **/
 .el-form-item__content {
     display: unset !important;
+}
+
+/**提示引导信息宽度问题**/
+.el-popper {
+    width: unset!important;
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/main/webapp/static/plugins/ms/3.0/ms-el-form.umd.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 2
src/main/webapp/static/plugins/ms/3.0/ms.umd.js


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels