Parcourir la source

Signed-off-by: yinxr <2273460044@qq.com>

yinxr il y a 6 ans
Parent
commit
8c9a3c3759

+ 231 - 0
src/main/webapp/WEB-INF/manager/cms/article/article_form.ftl

@@ -0,0 +1,231 @@
+<@ms.html5>
+	<@ms.nav title="文章管理" back=true>
+		<#if article.basicId == 0>
+	 		<@ms.saveButton id="saveUpdate" value="保存"/>
+	 	<#else>
+	 		<@ms.updateButton id="saveUpdate" value="更新"/>
+	 	</#if>
+	</@ms.nav>
+	<@ms.panel>
+		<@ms.form isvalidation=true name="articleForm" action="${managerPath}/cms/article/${autoCURD}.do">
+			<@ms.text name="basicTitle" colSm="2" width="400" label="文章标题"	title="文章标题" size="5"  placeholder="请输入文章标题"  value="${article.basicTitle?default('')}"  validation={"maxlength":"300","required":"true", "data-bv-notempty-message":"文章标题不能为空","data-bv-stringlength-message":"标题在300个字符以内!", "data-bv-notempty-message":"必填项目"}/>
+			<@ms.text name="basicSort"  colSm="2" width="200" label="自定义顺序" title="自定义顺序" size="5"  placeholder="请输入文章顺序" value="${article.basicSort?c?default(0)}" validation={"data-bv-between":"true","required":"true", "data-bv-between-message":"自定义顺序必须大于0","data-bv-between-min":"0", "data-bv-between-max":"99999999","data-bv-notempty-message":"自定义顺序不能为空"}/>
+			<#if articleType?has_content>
+				<@ms.checkboxlist colSm="2" name="checkbox" label="文章属性" list=articleType listKey="dictValue"  listValue="dictLabel" />
+			</#if>
+			<@ms.radio name="basicDisplay" 
+			    list=[{"id":"0","value":"是"},{"id":"1","value":"否"}] value="${article.basicDisplay?c?default()}" 
+			    listKey="id" listValue="value" label="是否显示" help="选择否后前端将不显示,需要重新生成才有效果"
+			/>
+			<@ms.formRow colSm="2" label="文章缩略图" width="400" >
+					<@ms.uploadImg path="article" uploadFloderPath="${articleImagesUrl?default('')}" inputName="basicThumbnails" size="1" msg="提示:文章缩略图,支持jpg格式"  imgs="${article.basicThumbnails?default('')}"  />
+			</@ms.formRow>
+			<@ms.text name="articleSource" colSm="2" width="200" label="文章来源" title="文章来源" size="5"  placeholder="请输入文章来源"  value="${article.articleSource?default('')}" validation={"maxlength":"300", "data-bv-stringlength-message":"文章来源在300个字符以内!"} />
+			<@ms.text name="articleAuthor" colSm="2" width="200" label="文章作者" title="文章作者" size="5"  placeholder="请输入文章作者"  value="${article.articleAuthor?default('')}" validation={"maxlength":"12", "data-bv-stringlength-message":"文章作者在12个字符以内!"} />
+			<#if !isEditCategory><!-- 如果不是单篇 -->
+	            <@ms.formRow colSm="2" label="所属栏目" width="300">
+	            <#if categoryTitle=="">
+	            	<@ms.treeInput treeId="inputTree" json="${listColumn?default('')}" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" inputName="basicCategoryId" inputValue="${categoryId}" buttonText="选择栏目" clickZtreeId="clickZtreeId(event,treeId,treeNode);" expandAll="true"  showIcon="true"/>
+	            <#else>
+	            	<@ms.treeInput treeId="inputTree" json="${listColumn?default('')}" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" inputName="basicCategoryId" inputValue="${categoryId}" buttonText="${(categoryTitle)!}" clickZtreeId="clickZtreeId(event,treeId,treeNode);" expandAll="true"  showIcon="true"/>
+				</#if>
+				</@ms.formRow>
+            </#if>
+            <@ms.hidden id="basicDateTime" name="basicDateTime" value=""/>
+            <@ms.date id="articleDateTime" name="articleDateTime" time=true label="发布时间" single=true readonly="readonly" width="300" value="${(article.basicDateTime?default(.now))?string('yyyy-MM-dd HH:mm')}" validation={"required":"true", "data-bv-notempty-message":"必填项目"} placeholder="点击该框选择时间段"  />
+			<@ms.textarea colSm="2" name="basicDescription" label="描述" wrap="Soft" rows="4"  size=""  value="${article.basicDescription?default('')}" placeholder="请输入对该文章的简短描述,以便用户查看文章简略" validation={"maxlength":"400","data-bv-stringlength-message":"文章描述在400个字符以内!"}/>
+			<@ms.textarea colSm="2" name="articleKeyword" label="关键字" wrap="Soft" rows="4"  size="" placeholder="请输入文章关键字"   value="${article.articleKeyword?default('')}" validation={"maxlength":"155", "data-bv-stringlength-message":"文章作者在155个字符以内!"}/>
+			<!--新填字段内容开始-->
+			<div id="addFieldForm">		
+			</div>
+			<@ms.hidden name="articleTypeJson" />
+			<@ms.editor colSm="2" name="articleContent" label="文章内容" content="${article.articleContent?default('')}"  appId="${appId?default(0)}"/>			
+			<@ms.hidden name="modelId"  value="${Session.model_id_session?default('0')}" />
+		</@ms.form>
+	</@ms.panel>
+</@ms.html5>     
+<script>
+//重写时间控件
+$('#articleDateTime').daterangepicker({
+	format:'YYYY-MM-DD HH:mm',
+	singleDatePicker: true,
+	showDropdowns: true,
+	timePickerIncrement: 1,
+  	timePicker: true,
+  	timePicker12Hour: true,
+  	startDate: moment().hours(0).minutes(0).seconds(0),
+   	showDropdowns: true,
+    showWeekNumbers: true,
+  });
+$('#articleDateTime').on('apply.daterangepicker', function(ev, picker) {
+		$('#articleDateTime').parents("form:first").data('bootstrapValidator').revalidateField('articleDateTime');
+});
+var articleBasicId=0;
+$(function(){
+	//页面标题
+	var articleTitle="<#if categoryTitle?has_content>${categoryTitle}&nbsp;</#if><#if article.basicId !=0><small>编辑文章</small><#else><small>添加文章</small></#if>";
+	$(".ms-weixin-content-body-title>span").html(articleTitle);	
+	//隐藏跳转地址
+	$("input[name='articleUrl']").parent().hide();
+	
+	//文章属性
+	var actionUrl="";
+	
+	<#if article.basicId !=0>
+	actionUrl = "${managerPath}/cms/article/${article.basicId?c?default(0)}/update.do";
+	var type="${article.articleType?default('')}";
+	var articleType = new Array;
+	//文章属性
+	$("#articleForm input[name='checkbox']").each(function(){
+		if(type!=""){
+			articleType = type.split(",");
+		  	for(i=0;i<articleType.length;i++){
+				if($(this).val()==articleType[i]){
+					$(this).attr("checked",'true');
+				}
+			}
+		}
+	});
+	articleBasicId=${article.basicId?c?default(0)};
+	<#else>
+	actionUrl = "${managerPath}/cms/article/save.do";
+	</#if>	
+	
+	//获取当前栏目的自定义模型
+	var url="${managerPath}/mdiy/contentModel/contentModelField/"+${categoryId?default(0)}+"/queryField.do";
+	var articleId="basicId="+${article.basicId?c?default(0)};
+	$(this).request({url:url,data:articleId,method:"post",func:function(data) {
+		$("#addFieldForm").html(data);
+	}});
+
+	//显示跳转地址
+	$("input[name='checkbox']").click(function(){
+		$("input[name='checkbox']").each(function(){
+			if( $(this).val() == 'j'){
+				if($(this).is(":checked") ){
+					$("input[name='articleUrl']").parent().show();
+				}else{
+					$("input[name='articleUrl']").parent().hide();
+				}
+			}
+		});
+	});	
+	
+	//更新或保存				
+	$("#saveUpdate").click(function(){
+		//禁用按钮
+		$("#saveUpdate").attr("disabled",true);
+		//获取按钮值
+		var bottonText = $("#saveUpdate").text().trim();
+		//设置按钮加载状态值
+		$("#saveUpdate").attr("data-loading-text",bottonText+"中");
+		
+		var articleDateTimeValue = $("#articleDateTime").val()+":00";//让时间能精确到秒与后台对应
+		$("#basicDateTime").val(articleDateTimeValue); //给basicDateTime字段赋值
+		//获取所有栏目属性被选中的值
+		var typeJson=""
+		$("#articleTypeField").find("select").each(function(index){ 
+			var typeValue=0;
+			if($(this).find("option:selected").val()==undefined){
+				return;
+			}
+			var typeValue=$(this).find("option:selected").val();
+			if($("#articleTypeField").find("select").length==index){
+				typeJson =typeJson+ "{bcCategoryId:\"" + typeValue + "\",bcBasicId:'${article.basicId?default(0)}'}"
+			}else{
+				typeJson =typeJson+ "{bcCategoryId:\"" + typeValue + "\",bcBasicId:'${article.basicId?default(0)}'},"
+			}
+			
+		})
+		$("input[name=articleTypeJson]").val("["+typeJson+"]");
+		var basicCategoryId="";
+		<#if !isEditCategory><!-- 如果不是单篇 -->
+			basicCategoryId=$("input[name='basicCategoryId']").val(); //多篇时的文章栏目
+		<#else>
+			basicCategoryId=${categoryId}; //单篇时的文章栏目
+		</#if>
+		//文章所属栏目是数字且不能为0
+		if(basicCategoryId !=0 && !isNaN(basicCategoryId) ){
+			//将表单序列化
+			var saveArticle = $("#articleForm").serialize();
+			saveArticle += "&basicCategoryId="+basicCategoryId;
+			//文章属性
+			var checkboxType="";
+			$("input[name='checkbox']").each(function(){
+				if($(this).is(":checked")){
+					checkboxType+=$(this).val()+",";
+				}
+			});
+			var dataMsg = saveArticle+"&checkboxType="+checkboxType;
+			var seeMsg = "";
+			<#if article.basicId !=0>
+	   			seeMsg="更新中....";
+	   		<#else>
+	   			seeMsg="保存中....";
+	   		</#if>
+	   		var vobj = $("#articleForm").data('bootstrapValidator').validate();
+			if(vobj.isValid()){
+				if(isNaN($("input[name=basicSort]").val())){
+					<@ms.notify msg="自定义排序必须是数字" type="warning"/>
+					$("input[name=basicSort]").val(0);
+					//启用按钮
+					$("#saveUpdate").button('reset');
+					return;
+				}
+				$(this).request({url:actionUrl,data:dataMsg,loadingText:seeMsg,method:"post",type:"json",func:function(obj) {
+					//执行加载状态
+					$("#saveUpdate").button('loading');
+					if(obj.result){
+						<#if article.basicId !=0>
+		   					<@ms.notify msg="更新文章成功" type="success"/>
+			   			<#else>
+			   				<@ms.notify msg="保存文章成功" type="success"/>
+			   			</#if>
+			   			var columnType = ${columnType?default(0)};
+		   			    if(columnType == 1){
+		   			    	//更新并生成之后路径进行跳转
+					    	location.href=managerPath+"/cms/article/${categoryId?default(0)}/main.do";
+		   			    }else{
+		   			    	var dataId = obj.resultData;
+		   			    	if(dataId!=""){
+		   			    		location.href = "${managerPath}/cms/article/"+dataId+"/edit.do";
+		   			    	}
+		   			    };
+		   			    $("#saveUpdate").button('reset');
+					}else{
+						$('.ms-notifications').offset({top:43}).notify({
+					    	type:'warning',
+					    	message: { text:obj.resultMsg }
+					 	}).show();
+					}
+				}});
+			}
+		}else{
+			<@ms.notify msg="请选择文章所属栏目" type="warning"/>
+			//启用按钮
+			$("#saveUpdate").attr("disabled",false);
+		}
+		 //启用按钮
+		 $("#saveUpdate").button('reset');
+	     $("#saveUpdate").attr("disabled",false);
+	});	
+});
+
+//选择栏目后查询自定义模型
+function clickZtreeId(event,treeId,treeNode){
+	if(treeNode.columnType == 2){
+		<@ms.notify msg="不能选择单篇栏目" />
+		return false;
+	}
+	if(treeNode.isParent==true){
+		<@ms.notify msg="不能选择父级栏目" />
+		return false;
+	}
+	var url="${managerPath}/mdiy/contentModel/contentModelField/"+treeNode.categoryId+"/queryField.do";
+	var basicId="basicId=${article.basicId?c?default(0)}";
+	$(this).request({url:url,data:basicId,method:"post",func:function(data) {
+		$("#addFieldForm").html("");
+		$("#addFieldForm").html(data);
+	}});
+} 
+</script>

+ 163 - 0
src/main/webapp/WEB-INF/manager/cms/article/article_main.ftl

@@ -0,0 +1,163 @@
+<@ms.html5>
+	<@ms.nav title="文章列表"></@ms.nav>
+	<@ms.searchForm   name="searchForm" action="">
+			<#if articleTypeList?has_content>
+				<@ms.select label="文章属性" default="全部" value="a" name="articleType" id="forumSelect"  list=articleTypeList  listValue="dictLabel"   listKey="dictValue"    value="${articleType?default('')}"/>
+			<#else>
+				<@ms.select label="文章属性"     name="articleType" id="forumSelect" value="" list=["默认属性"]  />
+			</#if>
+			<@ms.text label="文章标题"  name="basicTitle" value="" title="请输入文章标题"  placeholder="请输入文章标题" />
+			<@ms.searchFormButton>
+				<@ms.queryButton id="submitSearch" />								
+			</@ms.searchFormButton>
+	</@ms.searchForm>
+	<div id="toolbar">
+		<@ms.panelNavBtnGroup>
+			<@shiro.hasPermission name="article:save"><@ms.panelNavBtnAdd title=""/></@shiro.hasPermission> 
+			<@shiro.hasPermission name="article:del"><@ms.panelNavBtnDel title=""/></@shiro.hasPermission> 
+		</@ms.panelNavBtnGroup>
+	</div>
+	<@ms.panel>
+		<table id="articleListTable"
+			data-show-refresh="true"
+	        data-show-columns="true"
+	        data-show-export="true"
+			data-method="post" 
+			data-detail-formatter="detailFormatter" 
+			data-pagination="true"
+			data-page-size="10"
+			data-side-pagination="server">
+		</table>
+	</@ms.panel>
+</@ms.html5>	
+<!--删除限时文章-->    
+<@ms.modal modalName="delete" title="删除文章">
+	  <@ms.modalBody>
+	  		确定要删除所选的文章吗?
+     </@ms.modalBody>
+	 <@ms.modalButton>
+ 		<@ms.button class="btn btn-danger rightDelete" value="确定"/>
+ 	</@ms.modalButton>
+</@ms.modal>			
+<script>
+	
+	
+	$(function(){
+		var search = $("form[name='searchForm']").serializeJSON();
+		var articleType = search.articleType; 
+		$("#articleListTable").bootstrapTable({
+		url:"${managerPath}/cms/article/${categoryId}/list.do?articleTypeStr="+articleType,
+		contentType : "application/x-www-form-urlencoded",
+		queryParamsType : "undefined",
+		toolbar: "#toolbar",
+	    columns: [{ checkbox: true}, {
+	        field: 'column.categoryTitle',
+	        title: '栏目名',
+	        width: 90,
+	        align: 'left'
+	    },{
+	        field: 'basicTitle',
+	        title: '文章标题',
+	        
+	        formatter: function (value, row, index){
+				<@shiro.hasPermission name="article:update">	        
+	        	var url='${managerPath}/cms/article/'+row.articleID+"/edit.do";
+	    		return "<a href="+url+" target='_self' >"+value+"</a>";
+	    		</@shiro.hasPermission> 
+	    		<@shiro.lacksPermission name="article:update">
+	    			return value;
+	    		</@shiro.lacksPermission> 
+	    		
+	    	}
+	    }, {
+	        field: 'articleAuthor',
+	        title: '作者',
+	        width: 100
+	    }, {
+	        field: 'basicSort',
+	        title: '排序',
+	        align: 'center',
+	        width: 50
+	    }, {
+	        field: 'basicHit',
+	        title: '点击',
+	        align: 'center',
+	        width: 50
+	    }, {
+	        field: 'basicDateTime',
+	        title: '发布时间',
+	        align: 'center',
+	        width: 90
+	    }]
+	});
+	//查询文章标题
+	$("#submitSearch").click(function(){
+		var search = $("form[name='searchForm']").serializeJSON();
+		var params = $('#articleListTable').bootstrapTable('getOptions');
+		params.queryParams = function(params) {  
+		 	$.extend(params,search);
+	        	return params;  
+			}  
+		$("#articleListTable").bootstrapTable('refresh', {query:$("form[name='searchForm']").serializeJSON()});
+	});
+	//添加文章
+	$("#addButton").click(function(){
+		if(${isParent}==true){
+			<@ms.notify msg="不能选择父级栏目" />
+			return false;
+		}
+		location.href = "${managerPath}/cms/article/add.do?categoryId=${categoryId?default(0)}&modelId=${Session.model_id_session?default(0)}&categoryTitle=${categoryTitle?default('')}"; 
+	});	
+	//点击重置按钮
+	$(".reset").click(function(){
+		$("input[name=basicTitle]").val("");
+	})
+	//多选删除
+	$("#delButton").click(function(){
+		//获取勾选的所在行的所有数据
+		var rows = $("#articleListTable").bootstrapTable("getSelections");
+		if(rows!=""){
+		//弹出modal窗体
+			$(".delete").modal();
+		}else{
+			<@ms.notify msg="请选择文章!" type="warning"/>
+		}
+	});
+	//删除多个文章
+	$(".rightDelete").click(function(){
+		var rows = $("#articleListTable").bootstrapTable("getSelections");
+		if(rows!=""){
+			$.ajax({
+				url:"${managerPath}/cms/article/delete.do",
+				type:'post',
+				dataType:'json',
+				data:JSON.stringify(rows),
+				contentType:'application/json',
+				success:function(msg) {
+					if (msg.result) {
+						<@ms.notify msg="删除成功!" type="success"/>
+						location.reload();
+					} else {
+						<@ms.notify msg="删除失败" type="fail"/>
+					}
+				}
+			});
+		}else{
+	    	<@ms.notify msg="请选择文章!" type="warning"/>
+	    }
+	});
+});
+</script>
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 57 - 0
src/main/webapp/WEB-INF/manager/cms/article/index.ftl

@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html lang="zh">
+ <head>
+<#include "/include/macro.ftl"/>
+<#include "/include/meta.ftl"/>
+</head>
+<body class="over-hide">
+<@ms.content>
+ 	<@ms.contentMenu>
+		 <!-- 树形模块菜单开始 -->
+		<#if listColumn?has_content>
+				<@ms.tree  treeId="inputTree" json="${listColumn?default('')}" addNodesName="全部"  jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle"   showIcon="true" expandAll="true" getZtreeId="getZtreeId(event,treeId,treeNode);" />
+			<#else> 
+				<@ms.nodata content="暂无栏目"/>
+		</#if>
+		<!-- 树形模块菜单结束 -->
+	</@ms.contentMenu>
+	<@ms.contentBody width="85%" style="overflow-y: hidden;">
+		<@ms.contentPanel  style="margin:0;padding:0;overflow-y: hidden;">
+		<iframe src="${managerPath}/cms/article/0/main.do" style="width:100%;maring:0;padding:0;border:none;height:100%;background-image: url(${skin_manager_loadding});  background-repeat: no-repeat;  background-position: center;" id="listFrame" target="listFrame" ></iframe>
+		</@ms.contentPanel>
+	</@ms.contentBody>
+</@ms.content>
+<script>
+
+//树形结点
+function getZtreeId(event,treeId,treeNode){
+	if (treeNode.columnType==1) {
+		//父级栏目为true,子级栏目为false
+		var isParent = false;
+		if(treeNode.isParent == true){
+			 isParent = true;
+		}
+		$("#listFrame").attr("src","${managerPath}/cms/article/"+treeNode.categoryId+"/main.do?isParent="+isParent+"&categoryTitle="+encodeURIComponent(treeNode.categoryTitle));
+	} else if(treeNode.columnType==2){
+		//判断该单篇栏目是否存在文章
+		$.ajax({ 
+			type: "POST", 
+			url: "${managerPath}/cms/article/"+treeNode.categoryId+"/queryColumnArticle.do",
+			dataType:"json",
+			success: function(msg){
+				if (msg.result) {
+					$("#listFrame").attr("src","${managerPath}/cms/article/add.do?categoryId="+treeNode.categoryId+"&categoryTitle="+encodeURIComponent(treeNode.categoryTitle));
+				} else {
+					//如果该单篇栏目下存在文章则跳转到文章编辑页
+					$("#listFrame").attr("src","${managerPath}/cms/article/"+treeNode.categoryId+"/edit.do?categoryId="+treeNode.categoryId+"&categoryTitle="+encodeURIComponent(treeNode.categoryTitle));
+				}
+			},
+		});
+	} else if(treeNode.columnType=="" || treeNode.columnType == undefined){
+		$("#listFrame").attr("src","${managerPath}/cms/article/0/main.do"); 
+	}
+	
+}
+</script>
+</body>
+</html>

+ 2 - 0
src/main/webapp/WEB-INF/manager/cms/column/shiro-button.ftl

@@ -0,0 +1,2 @@
+<@shiro.hasPermission name="cms:column:save"><@ms.addButton id="addColumnBtn"/></@shiro.hasPermission>
+<@shiro.hasPermission name="cms:column:del"><@ms.delButton id="delColumnBtn"/></@shiro.hasPermission>

+ 7 - 0
src/main/webapp/WEB-INF/manager/cms/column/shiro-update.ftl

@@ -0,0 +1,7 @@
+<@shiro.hasPermission name="cms:column:update">
+var url = "${managerPath}/${model?default("")}/column/"+row.categoryId+"/edit.do?modelId=${Session.model_id_session?default(0)}&modelTitle=${Session.model_title_session?default('')}";
+return "<a href=" +url+ " target='_self'>" + value + "</a>";
+</@shiro.hasPermission>
+<@shiro.lacksPermission name="cms:column:update">
+return value;
+</@shiro.lacksPermission> 

+ 161 - 0
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl

@@ -0,0 +1,161 @@
+<@ms.html5>
+	<@ms.nav title="静态化"></@ms.nav>
+	<@ms.panel>
+		<p class="alert alert-info" role="alert">
+			<span class="glyphicon glyphicon-pushpin text-lef "></span>
+			<a class="alert-link text-lef" style="margin-left: 12px;">
+        		更新主页,如果系统存在引导页面可以手动修改主页位置文件名,default.html引导页面index.html主页。
+			</a><br/>
+			<span class="glyphicon glyphicon-pushpin text-lef "></span>
+			<a class="alert-link text-lef" style="margin-left: 12px;">
+        		更新栏目列表,推荐使用指定栏目更新。系统提示“更新中...”请不要刷新页面或点击其他菜单。
+			</a><br/>
+			<span class="glyphicon glyphicon-pushpin text-lef "></span>
+			<a class="alert-link text-lef" style="margin-left: 12px;">
+            	根据时间与栏目类型生成文章
+			</a>
+		</p>		
+		<@ms.form name="generateIndex">
+			<@ms.formRow label="选择主页模板" width="300">
+					<select class="form-control" id="select_id"></select>
+					<input type="hidden" name="url"/>				
+			</@ms.formRow>
+			<@ms.text  id="position" label="选择主页位置	" width="300" value="index" placeholder="输入主页位置" name="position"  help="注:主页位置htm文件名一般为index.html或default.html"/>
+			<div class="form-group ms-form-group"><div class="col-sm-2"></div><div class="col-sm-9 ms-from-group-input ms-form-input">
+			<@shiro.hasPermission name="cms:generate:index">	  
+				<@ms.button class="btn btn-primary" id="updateIndex" value="生成主页" /> 	
+				<@ms.panelNavBtnSave title="" id="viewIndex" value="预览主页" />
+			</@shiro.hasPermission>
+			</div>
+			</div>
+		</@ms.form>
+		<!--选择更新的栏目-->
+		<@ms.form name="generateColumn">
+			<@ms.formRow label="选择要生成栏目" width="300">
+					<#if list?has_content>
+						<@ms.treeInput treeId="inputTree" json="${list?default('')}" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" buttonText="选择更新的栏目" addNodesName="所有栏目" inputName="columnId" showIcon="true" expandAll="true" />
+					<#else>
+						<@ms.treeInput treeId="errorTree" buttonText="暂无数据" />
+					</#if>
+			</@ms.formRow>
+			<div class="form-group ms-form-group"><div class="col-sm-2"></div><div class="col-sm-9 ms-from-group-input ms-form-input">
+			<@shiro.hasPermission name="cms:generate:column">
+				<@ms.button class="btn btn-primary" id="updateColumn" value="生成栏目" />
+			</@shiro.hasPermission>
+			</div></div>
+		</@ms.form>
+		<@ms.form name="generateArticle">
+			<@ms.formRow label="文章栏目" width="300">
+        			<#if list?has_content>
+						<@ms.treeInput  treeId="inputTreee" json="${list?default('')}" jsonId="categoryId" jsonPid="categoryCategoryId" jsonName="categoryTitle" addNodesName="所有栏目" buttonText="选择更新的栏目" inputName="articleId"  showIcon="true" expandAll="true" />
+    				<#else> 
+						<@ms.treeInput  treeId="errorTree"  buttonText="暂无数据" />
+    				</#if>	
+    		</@ms.formRow>
+            <@ms.date name="dateTime" label="指定时间" single=true readonly="readonly" width="300" value="${now?string('yyyy-MM-dd')}" validation={"required":"true", "data-bv-notempty-message":"必填项目"} placeholder="点击该框选择时间段"  />
+			<div class="form-group ms-form-group"><div class="col-sm-2"></div><div class="col-sm-9 ms-from-group-input ms-form-input">
+			<@shiro.hasPermission name="cms:generate:article">
+				<@ms.button class="btn btn-primary" id="updateArticle" value="生成文章" />
+			</@shiro.hasPermission>
+			</div></div>
+		</@ms.form>	
+	</@ms.panel>
+</@ms.html5>	
+
+<!--点击进行按钮提交-->
+<script>
+	$(function(){
+		var URL="${managerPath}/template/queryTemplateFileForColumn.do";
+		var DATA = "";
+		$(this).request({url:URL,data:DATA,type:"json",method:"get",func:function(msg) {
+			if(msg.length==0){
+				$("#select_id").append("<option value='' >暂无文件</option>")
+			}
+			for(var i = 0;i<msg.length;i++){
+				$("#select_id").append("<option value="+msg[i]+">"+msg[i]+"</option>");
+				//如果存在index.html
+				if(msg[i]=="index.html" || msg[i]=="index.htm"){
+					$("#select_id").find("option[value='"+msg[i]+"']").attr("selected",true);
+				}
+			}
+		}});
+	})
+	
+	//点击一键更新主页时,进行主页更新
+	$("#updateIndex").click(function(){
+		//选择的主页模板名称和主页位置
+		var url = $("#select_id").val();
+		var position =$("input[name='position']").val();
+		//封装ajax请求参数
+		var URL="${managerPath}/cms/generate//generateIndex.do";
+		var DATA = "url="+url+"&position="+position;
+		$(this).html("更新中..").attr("disabled", "disabled");
+		$(this).request({url:URL,data:DATA,type:"json",method:"post",func:function(msg) {
+			$("#updateIndex").html("更新主页").removeAttr("disabled");
+			if(msg.result){
+				<@ms.notify msg="更新成功" type="success"/>
+			}else{
+				$('.ms-notifications').offset({top:43}).notify({
+			    	type:'warning',
+			    	message: { text:msg.resultMsg }
+			 	}).show();
+			}
+			$("#updateIndex").html("更新主页")
+		}});
+	});
+	//点击预览时,进行预览
+	$("#viewIndex").click(function(){
+		var position =$("input[name='position']").val();
+		window.open("${managerPath}/cms/generate/"+position+"/viewIndex.do");
+	});
+</script>
+
+<!--点击生成栏目按钮-->
+<script>
+	$("#updateColumn").click(function() {
+		var columnId = 0;
+		if($("input[name='columnId']").val() !="" && $("input[name='columnId']").val().length>0){
+			columnId = $("input[name='columnId']").val();
+		}
+		var URL="${managerPath}/cms/generate/"+columnId+"/genernateColumn.do";
+		$(this).html("更新中..").attr("disabled", "disabled");
+		$(this).request({url:URL,data:columnId,type:"json",method:"post",func:function(msg) {
+			$("#updateColumn").html("更新栏目").removeAttr("disabled");
+			//回调处理方式
+			if(msg.result){
+				<@ms.notify msg="更新成功" type="success"/>
+			}else{
+				$('.ms-notifications').offset({top:43}).notify({
+			    	type:'warning',
+			    	message: { text:msg.resultMsg }
+			 	}).show();
+			}
+		}});
+	});
+</script>
+
+<!--点击生成文章按钮-->
+<script>
+	$("#updateArticle").click(function() {
+		var articleId = 0;
+		if($("input[name='articleId']").val() !="" ){
+			articleId = $("input[name='articleId']").val();
+		}
+		var URL="${managerPath}/cms/generate/" + articleId + "/generateArticle.do";
+		var DATA = "dateTime=" + $("input[name='dateTime']").val();
+		$(this).html("更新中..").attr("disabled", "disabled");
+		
+		$(this).request({url:URL,data:DATA,type:"json",method:"post",func:function(msg) {
+			$("#updateArticle").html("更新文档").removeAttr("disabled");
+			//回调处理方式
+			if(msg.result){
+				<@ms.notify msg="更新成功" type="success"/>
+			}else{
+				$('.ms-notifications').offset({top:43}).notify({
+			    	type:'warning',
+			    	message: { text:msg.resultMsg }
+			 	}).show();
+			}
+		}});
+	});
+</script>

+ 30 - 0
src/main/webapp/WEB-INF/manager/exit-system.ftl

@@ -0,0 +1,30 @@
+<!-- 退出系统 -->
+<div id="exit-system" class="exit-system">
+    <el-dialog title="退出提示" :visible.sync="isShow">
+        确认退出
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="isShow = false">取 消</el-button>
+            <el-button type="primary" @click="loginOut">确认退出</el-button>
+        </div>
+    </el-dialog>
+</div>
+<script>
+    var exitSystemVue = new Vue({
+        el: '#exit-system',
+        data: {
+            isShow: false, // 模态框的显示
+        },
+        methods: {
+            loginOut: function () {
+                var that = this;
+                ms.http.get(ms.manager + "/loginOut.do")
+                    .then((data) => {
+                        isShow = false;
+                        location.href = ms.manager + "/login.do";
+                    }, (err) => {
+                        that.$message.error(data.resultMsg);
+                    })
+            }
+        }
+    })
+</script>

BIN
src/main/webapp/WEB-INF/manager/images/data/img.png


BIN
src/main/webapp/WEB-INF/manager/images/data/ms-bg_1.jpg


+ 53 - 0
src/main/webapp/WEB-INF/manager/include/head-file.ftl

@@ -0,0 +1,53 @@
+    
+    <meta charset="utf-8">
+    <!--浏览器小图标-->
+    <link rel="icon" href="http://cdn.mingsoft.net/global/images/ms.ico" type="x-icon">
+    <script type="text/javascript" src="https://unpkg.com/vue@2.5.21/dist/vue.min.js"></script>
+    <!--小图标-->
+    <link rel="stylesheet" href="//at.alicdn.com/t/font_847907_mkdvd7gopsg.css">
+    <!-- 引入样式 -->
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <!-- 引入组件库 -->
+    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+    <!--网络请求框架-->
+    <script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
+    <script src="https://cdn.bootcss.com/qs/6.5.2/qs.min.js"></script>
+    <!--铭飞-->
+    <script src="http://cdn.mingsoft.net/ms/1.0/ms.js"></script>
+    <script src="http://cdn.mingsoft.net/ms/1.0/ms.http.js"></script>
+    <script src="http://cdn.mingsoft.net/ms/1.0/ms.util.js"></script>
+
+    <!--jquery-->
+    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
+    <!--百度富文本-->
+    <script type="text/javascript" charset="utf-8" src="http://mpm.mingsoft.net/static/plugins/ueditor/1.4.3.1/ueditor.parse.js"></script>
+    <script type="text/javascript" charset="utf-8" src="http://mpm.mingsoft.net/static/plugins/ueditor/1.4.3.1/ueditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="http://mpm.mingsoft.net/static/plugins/ueditor/1.4.3.1/ueditor.all.js"></script>
+    <script type="text/javascript" charset="utf-8" src="http://mpm.mingsoft.net/static/plugins/ueditor/1.4.3.1/lang/zh-cn/zh-cn.js"></script>
+
+    <!-- 拖拽 -->
+    <script src="//cdn.jsdelivr.net/npm/sortablejs@1.7.0/Sortable.min.js"></script>
+    <script src="//cdnjs.cloudflare.com/ajax/libs/Vue.Draggable/2.17.0/vuedraggable.min.js"></script>
+    
+    <!-- <link rel="stylesheet" href="${base}/static/ms-admin/4.7.0/css/login.css"> -->
+    <!-- <link rel="stylesheet" href="${base}/static/mweixin/css/custom-menu.css"> -->
+    <!-- <link rel="stylesheet" href="${base}/static/mweixin/css/message-reply.css"> -->
+    
+    <!--图片懒加载-->
+		<script src="https://cdn.bootcss.com/vue-lazyload/1.2.6/vue-lazyload.js"></script>
+
+    <link rel="stylesheet" href="../../../static/ms-admin/4.7.0/css/login.css">
+    <link rel="stylesheet" href="../../../static/mweixin/css/custom-menu.css">
+    <link rel="stylesheet" href="../../../static/mweixin/css/message-reply.css">
+    <script>
+        // ms.base = "${base}";
+        // ms.manager = "${managerPath}";
+
+        ms.base = "http://192.168.0.54:82";
+        ms.manager = "http://192.168.0.54:82/apis/ms";
+        //图片懒加载
+			  Vue.use(VueLazyload, {
+			    error: ms.base + '/images/ic_image_deault.png',
+			    loading: ms.base + '/images/ic_image_deault.png',
+			  })
+    </script>

+ 263 - 0
src/main/webapp/WEB-INF/manager/index.ftl

@@ -0,0 +1,263 @@
+<!DOCTYPE html>
+<html>
+   <head>
+      <title></title>
+      <!-- <#include "/include/head-file.ftl"/> -->
+     <!-- <link rel="stylesheet" href="${base}/static/ms-admin/4.7.0/css/index.css"> -->
+    <!--#include virtual="include/head-file.ftl" --> 
+    <!--#include virtual="./reset-password.ftl" --> 
+    <!--#include virtual="./exit-system.ftl" --> 
+    <link rel="stylesheet" href="../../../static/ms-admin/4.7.0/css/index.css">
+
+   </head>
+   <body>
+      <div id="app" class="index">
+         <el-container>
+            <!--头部-->
+            <el-header class="ms-admin-header">
+               <el-aside width="200px" class="ms-admin-logo">
+                  <img :src="ms.base+'/static/ms-admin/4.7.0/images/logo.png'" />
+                  <div>
+                     <img :src="ms.base+'/static/ms-admin/4.7.0/images/version.png'" />
+                     <span>v4.6.3</span>
+                  </div>
+               </el-aside>
+
+               <!--头部menu-->
+               <el-menu class="ms-admin-header-menu" :default-active="0+''" mode="horizontal" >
+                  <el-menu-item 
+                    class="ms-admin-menu-item" 
+                    :index="i+''" 
+                    v-for="(menu,i) in mainParentMenuList" 
+                    :key='i'
+                    @click="openMenu(menu,i)"
+                    v-text="menu.modelTitle"
+                ></el-menu-item>
+                  <el-menu-item class="ms-admin-menu-item" :index="menuList.length+''" @click=''>
+                     <i class="iconfont icon-gengduo" @click.stop.self='shortcutMenu = !shortcutMenu'></i>
+                  </el-menu-item>
+                   <!-- 快捷菜单 -->
+                   <ul class="ms-admin-shortcut-menu" v-show='shortcutMenu'>
+                        <li v-for="(item,index) of parentMenuList" 
+                            :key='index'
+                             v-text='item.modelTitle' 
+                             @click='openMenu(item,index)'
+                             ></li>
+                        <i class="iconfont icon-gengduo" @click.stop.self='shortcutMenu = !shortcutMenu'></i>
+                    </ul>
+               </el-menu>
+
+               <!--头部右侧-->
+               <el-main class="ms-admin-mstore">
+                  <!--登录-->
+                  <el-dropdown trigger="click" class="ms-admin-login" placement="top-start" @visible-change="loginDown = !loginDown">
+                     <span class="el-dropdown-link" :class="{'active':loginDown}">
+                        <img src="http://cdn.mingsoft.net/global/static/ms-admin/4.7.0//msheader.png" />
+                        <span v-text='peopleInfo.managerName'></span>
+                     </span>
+                     <el-dropdown-menu class="ms-admin-login-down" slot="dropdown" @click.native='openModal'>
+                        <el-dropdown-item>修改密码</el-dropdown-item>
+                        <el-dropdown-item>退出</el-dropdown-item>
+                     </el-dropdown-menu>
+                  </el-dropdown>
+                  <!--mstore按钮-->
+                  <div class="ms-admin-mstore-icon">
+                     <i class="iconfont icon-gengduo1"></i>
+                  </div>
+               </el-main>
+
+            </el-header>
+            <el-container class="ms-admin-container">
+               <!--菜单-->
+               <el-aside :class="['ms-admin-menu-aside',{'ms-admin-menu-aside-active':collapseMenu}]">
+                  <el-menu 
+                    :class="['ms-admin-menu',{'ms-admin-menu-active':collapseMenu}]" 
+                    :default-active="menuActive"
+                    :collapse="collapseMenu" 
+                    mode='vertical' 
+                    :collapse-transition='true' 
+                    :unique-opened='true' 
+                    ref='menu'
+                    >
+                     <el-submenu 
+                        :index="i+''" 
+                        v-for="(menu,i) in parentMenuList"
+                        :key='i'
+                        >
+                        <template slot="title">
+                           <i class="iconfont" :class="iconType(menu.modelTitle)"></i>
+                           <span v-text="menu.modelTitle"></span>
+                        </template>
+                        <!-- 子菜单 -->
+                        <el-menu-item 
+                            :index="i+'-'+index" 
+                            v-for="(sub,index) in getSubMenu(menu.modelId)" 
+                            :key='sub.modelModelId'
+                            v-text="sub.modelTitle"
+                            @click.self='open(sub.modelTitle,sub.modelUrl)'
+                        ></el-menu-item>
+                     </el-submenu>
+                     <!-- 收缩按钮 -->
+                     <div :class="['ms-menu-expand',{'ms-menu-expand-active':collapseMenu}]" @click='collapseMenu = !collapseMenu'>
+                        <i class="iconfont icon-shousuo"></i>
+                     </div>
+                  </el-menu>
+               </el-aside>
+               <!--内容-->
+               <el-main class="ms-admin-main">
+                  <!--选项卡-->
+                  <el-tabs 
+                    class="ms-admin-tabs" 
+                    v-model="currentTab" 
+                    type="card" 
+                    closable 
+                    @tab-remove="closeTab"
+                    >
+                     <el-tab-pane 
+                        v-for="(item, index) in editableTabs" 
+                        :key="index" 
+                        :label="item.title" 
+                        :name="item.title"
+                    >
+                        <iframe :src='ms.manager+"/"+item.url'></iframe>
+                     </el-tab-pane>
+                  </el-tabs>
+               </el-main>
+            </el-container>
+         </el-container>
+      </div>
+   </body>
+</html>
+<script>
+   var indexVue = new Vue({
+      el: "#app",
+      data: {
+        // 预置菜单图标
+        icon:{
+            '消息管理':'icon-xiaoxiguanli',
+            '评论管理':'icon-pinglunguanli',
+            '内容管理':'icon-bianji1',
+            '会员中心':'icon-huiyuan',
+            '自定义管理':'icon-gengduo-2',
+            '权限管理':'icon-UPMSquanxianicon-',
+            '系统管理':'icon-xitong',
+        },
+        menuList:[],//菜单接口数据
+        parentMenuList:[],//一级菜单
+        subMenuList:[],//二级菜单 所有
+        mainParentMenuList:[],//头部菜单显示主要的选项
+        loginDown: false, //登录下拉
+        menuActive: "", //选中菜单
+        editableTabsValue: '',
+        editableTabs: [],//当前打开的tab页面
+        shortcutMenu:false,//快捷菜单显示状态
+        collapseMenu:false,//菜单折叠,false不折叠
+        currentTab:'',//当前激活tab的name
+        tabIndex: 2,
+        //登录用户信息
+        peopleInfo:{
+        	managerName:''//账号
+        },
+      },
+      watch:{
+          menuList:function(n,o){
+              var that = this;
+            n && n.forEach(function(item,index){
+                item.modelModelId == 0 ? that.parentMenuList.push(item) : that.subMenuList.push(item)
+            })
+          },
+          parentMenuList:function(n,o){
+             this.mainParentMenuList = n.slice(0,5);
+          },
+      },
+      methods: {
+        // 菜单列表
+        list:function(){
+            var that = this;
+            ms.http.get(ms.manager + "/model/list.do")
+                .then((data)=>{
+                    that.menuList = data.rows
+                }, (err) => {
+                    that.$message.error(err);
+                })	
+        },
+        // 菜单打开页面
+        open:function(title,url){
+            var result = '';
+            result = this.editableTabs.some(function (item,index) {return item.title == title})
+            !result ? this.editableTabs.push({title:title,url:url}) : ""
+            this.currentTab = title;
+            // 处理其他逻辑
+        },
+        // 获取当前菜单的子菜单
+        getSubMenu:function (modelId) {
+            var result = [];
+            var that = this;
+            that.subMenuList && that.subMenuList.forEach(function (item) {
+                item.modelModelId == modelId ? result.push(item) : ''
+            })
+            return result;
+        },
+        // 匹配图标
+        iconType:function (title) {
+            return this.icon[title] || 'icon-xitongpeizhi'
+        },
+         //关闭tab标签页
+         closeTab(targetName) {
+            var that = this;
+            // 关闭的面板是当前激活面板
+            if(that.currentTab == targetName){
+                that.editableTabs.forEach(function (tab,index,arr) {
+                    if(tab.title == targetName){
+                        var nextTab = arr[index + 1] || arr[index - 1];
+                        if(nextTab){
+                            that.currentTab = nextTab.title
+                        }
+                    }
+                })
+            }
+            // 关闭的不是当前面板
+            that.editableTabs = that.editableTabs.filter(function (tab) {
+                return tab.title !== targetName
+            })
+         },
+        //  头部导航打开菜单
+         openMenu:function(menu,index){
+             this.$refs.menu.open(index);
+             var children = [];
+             this.menuList.forEach(function (tab) {
+                 if(tab.modelModelId == menu.modelId){
+                    children.push(tab)
+                 }
+             })
+             this.currentTab = children[0] && children[0].modelTitle;
+             this.open(children[0].modelTitle,children[0].modelUrl);
+             var that = this;
+             setTimeout(function(){
+                that.shortcutMenu = false
+             },50)
+         },
+         managerGet:function(){
+         	var that = this;
+         	ms.http.get(ms.manager + "/basic/manager/get.do")
+               .then((data)=>{
+                   that.peopleInfo = data
+               }, (err) => {
+                   that.$message.error(err);
+               })	
+         },
+        //  打开修改密码,退出的模态框
+         openModal:function(){
+             console.log('event.target',event.target.innerText);
+            event.target.innerText.indexOf('修改密码')>-1
+            ? resetPasswordVue.isShow=true : exitSystemVue.isShow=true
+         }
+      },
+      mounted:function(){
+            // 菜单列表
+            this.list();
+            //获取登录用户信息
+            this.managerGet();
+      },
+   })
+</script>

+ 25 - 0
src/main/webapp/WEB-INF/manager/main.ftl

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="en">
+<head> 
+  <title>铭飞CMS</title> 
+  <meta content="IE=edge" http-equiv="X-UA-Compatible" /> 
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 
+  <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> 
+<style>
+body{  height: 100%;}
+</style>
+</head>
+<body>
+<div style="
+    text-align: center;
+    color: #555;
+    background: #FCFCFC;
+    height: 300px;
+    padding-top: 200px;
+    vertical-align: middle;
+"><h2>欢迎进入MS系统</h2><p>欢迎加群: ①231212174 ②221335098 或到<a href="http://ms.mingsoft.net/mbbs/main.do" target="_blank"  style="
+    text-decoration: none;
+">官方论坛进行技术交流</a></p></div>
+</body>
+</html>

+ 92 - 0
src/main/webapp/WEB-INF/manager/mweixin/menu/material-bank-form.ftl

@@ -0,0 +1,92 @@
+<!-- 素材库 -->
+<link rel="stylesheet" href="../../../../static/mweixin/css/material-bank-form.css">
+<div id="material-bank-form" class="material-bank-form">
+    <el-dialog title="选择图片" :visible.sync="isShow" custom-class='ms-weixin-dialog'>
+        <el-tabs tab-position="left">
+            <el-tab-pane :label="group.label + '('+group.total+')'" v-for='(group,index) of materialGroup' :key='index'>
+                <el-upload :file-list='fileList' action="" list-type="picture-card" :on-preview="handlePictureCardPreview"
+                    :on-remove="handleRemove">
+                    <i class="el-icon-plus"></i>
+                </el-upload>
+                <el-dialog :visible.sync="dialogVisible" :modal='false' :title='flieName' custom-class='ms-weixin-dialog'>
+                    <!-- 这是图片放大 -->
+                    <img width="100%" :src="dialogImageUrl" alt="">
+                </el-dialog>
+                <el-row type='flex' justify='end'>
+                    <el-col :span='11'>
+                            <el-pagination 
+                            @size-change="handleSizeChange" 
+                            background
+                            :pager-count="1"
+                            @current-change="handleCurrentChange" 
+                            :current-page.sync="currentPage" 
+                            :page-size="10" 
+                            layout="prev, pager, next, jumper" 
+                            :total="50">
+                        </el-pagination>
+                    </el-col>
+                </el-row>
+            </el-tab-pane>
+        </el-tabs>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" @click="isShow = false" size='mini'>确 定</el-button>
+            <el-button @click="isShow = false" size='mini'>取 消</el-button>
+        </div>
+    </el-dialog>
+</div>
+<script>
+    var materialBankFormVue = new Vue({
+        el: '#material-bank-form',
+        data: {
+            isShow: false,
+            materialGroup: [{
+                    label: '未分组',
+                    total:36,
+                },
+                {
+                    label: '云创',
+                    total:12,
+                },
+                {
+                    label: 'PM管理',
+                    total:16,
+                },
+            ],
+            fileList: [], //文件列表
+            dialogImageUrl: '',//点击放大,触发弹窗里面的图片地址
+            dialogVisible: false,
+            flieName:"",//放大图片的文件名
+            currentPage:'',//当前页数
+        },
+        watch:{
+            fileList:{
+                handler:function(n,o){
+                    console.log('文件列表',n);
+            },
+                deep:true
+            }
+        },
+        methods: {
+            // 表单打开
+            open: function () {
+                this.isShow = true;
+            },
+            handlePictureCardPreview:function(file){
+                // 点击预览大图触发的钩子函数
+                console.log('file',file);
+                this.dialogVisible = true;
+                this.dialogImageUrl = file.url
+                this.flieName = file.name
+            },
+            handleRemove:function(){
+
+            },
+            handleSizeChange:function(){
+
+            },
+            handleCurrentChange:function(){
+
+            }
+        }
+    })
+</script>

+ 74 - 0
src/main/webapp/WEB-INF/manager/mweixin/menu/new-pic-form.ftl

@@ -0,0 +1,74 @@
+<!-- 新建图片表单 -->
+<link rel="stylesheet" href="../../../../static/mweixin/css/new-pic-form.css">
+<div id='new-pic-form' v-show='isShow' class="new-pic-form">
+    <el-dialog title="选择图片" :visible.sync="isShow" custom-class='ms-weixin-dialog'>
+        <el-form :model="newPicForm">
+            <el-form-item label="上传图片" label-width="100px">
+                    <el-upload
+                    class="new-pic-upload"
+                    :on-preview="handlePreview"
+                    :on-remove="handleRemove"
+                    :file-list="picList"
+                    list-type="picture">
+                    <el-button size="small" type="primary">本地上传</el-button>
+                    <div slot="tip" class="el-upload__tip">
+                        <dl>
+                            <dt>注意:1.图片上传仅支持bmp、png、jpeg、jpg、gif格式</dt>
+                            <dd>2.同步至微信公众平台的图片最大2M,存在铭飞本地,最大支持5M的图片</dd>
+                        </dl>
+                        
+                    </div>
+                  </el-upload>
+            </el-form-item>
+            <el-form-item label="选择分组" label-width="100px">
+                <el-button icon='el-icon-plus' size='mini'>添加分组</el-button>
+                <el-select v-model="selectedOption" placeholder="请选择分组" size='mini'>
+                    <el-option v-for="item in picGroup" :key="item.value" :label="item.label" :value="item.value">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button @click="isShow = false" size='mini'>取 消</el-button>
+            <el-button type="primary" @click="isShow = false" size='mini'>确 定</el-button>
+        </div>
+    </el-dialog>
+</div>
+<script>
+var newPicFormVue = new Vue({
+    el: '#new-pic-form',
+    data: {
+        isShow: false,
+        newPicForm: {
+
+        },
+        picGroup: [{
+                value: 'default',
+                label: '默认分组'
+            }, {
+                value: 'yun',
+                label: '云创'
+            },
+            {
+                value: 'pm',
+                label: 'PM管理系统'
+            }],
+        selectedOption:'',//被选中的选项
+        picList:[],//图片列表
+    },
+    methods: {
+        // 表单打开
+        open: function () {
+            this.isShow = true;
+        },
+        // 图片刚加载完
+        handlePreview:function(){
+
+        },
+        // 图片删除
+        handleRemove:function(){
+
+        },
+    },
+})
+</script>

+ 40 - 0
src/main/webapp/WEB-INF/manager/reset-password.ftl

@@ -0,0 +1,40 @@
+<!-- 修改密码 -->
+<div id="reset-password" class="reset-password">
+        <el-dialog title="修改密码" :visible.sync="isShow">
+            <el-form :model="resetPasswordForm" label-width='80px'>
+                <el-form-item label="账号">
+                    <el-input v-model="resetPasswordForm.managerName" autocomplete="off" readonly disabled></el-input>
+                </el-form-item>
+                <el-form-item label="旧密码">
+                    <el-input v-model="resetPasswordForm.oldManagerPassword" autocomplete="off"></el-input>
+                </el-form-item>
+                <el-form-item label="新密码">
+                    <el-input v-model="resetPasswordForm.newManagerPassword" autocomplete="off"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="isShow = false">取 消</el-button>
+                <el-button type="primary" @click="update">更新密码</el-button>
+            </div>
+    </el-dialog>
+</div>
+<script>
+    var resetPasswordVue = new Vue({
+        el: '#reset-password',
+        data: {
+            // 模态框的显示
+            isShow: false,
+            resetPasswordForm: {
+                managerName: '',
+                oldManagerPassword: '',
+                newManagerPassword: "",
+            }
+        },
+        methods: {
+            // 更新密码
+            update: function () {
+                isShow = false
+            }
+        }
+    })
+</script>