xierz hace 5 años
padre
commit
450c72bca5

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

@@ -334,7 +334,7 @@
                         validator: validatorCategoryPinyin, trigger: 'blur'
                     }, {
                         "pattern": /^[^[!@#$"'%^&*()_+-/~?!@#¥%…&*()——+—?》《:“‘’]+$/,
-                        "message": "栏目管理名称格式不匹配"
+                        "message": "拼音格式不匹配"
                     }],
                     // 内容模板
                     categoryUrl: [{
@@ -375,23 +375,17 @@
             },
             'form.categoryTitle': function (n) {
                 var regu = "[[!@'\"#$%^&*()_+-/~?!@#¥%…&*()——+—?》《:“‘’]";
+                this.rules.categoryPinyin =  [{
+                    "validator": this.validatorCategoryPinyin, trigger: 'blur'
+                }, {
+                    "pattern": /^[^[!@#$"'%^&*()_+-/~?!@#¥%…&*()——+—?》《:“‘’]+$/,
+                    "message": "拼音格式不匹配"
+                }];
                 if (this.regularCheck(regu, n)) {
-                    this.rules.categoryPinyin = [{
-                        "validator": this.validatorCategoryPinyin, trigger: 'blur'
-                    },{
+                    this.rules.categoryPinyin.push({
                         "required": true,
                         "message": "请输入栏目拼音名称"
-                    }, {
-                        "pattern": /^[^[!@#$"'%^&*()_+-/~?!@#¥%…&*()——+—?》《:“‘’]+$/,
-                        "message": "栏目管理名称格式不匹配"
-                    }];
-                }else {
-                    this.rules.categoryPinyin = [{
-                        "validator": this.validatorCategoryPinyin, trigger: 'blur'
-                    }, {
-                        "pattern": /^[^[!@#$"'%^&*()_+-/~?!@#¥%…&*()——+—?》《:“‘’]+$/,
-                        "message": "栏目管理名称格式不匹配"
-                    }];
+                    });
                 }
             },
         },
@@ -427,7 +421,6 @@
                 if (that.form.id > 0) {
                     url = ms.manager + "/cms/category/update.do";
                 }
-                console.log("aaa")
                 this.$refs.form.validate(function (valid) {
                     if (valid) {
                         //栏目属性为封面则不需要列表模板

+ 12 - 13
src/main/webapp/WEB-INF/manager/cms/category/index.ftl

@@ -31,7 +31,7 @@
 					{{emptyText}}
 				</template>
 				<el-table-column type="selection" width="40"></el-table-column>
-				<el-table-column label="编号" width="220" prop="id" show-overflow-tooltip>
+				<el-table-column label="编号" width="100" prop="id" show-overflow-tooltip>
 					<template slot='header'>编号
 						<el-popover placement="top-start" title="提示" trigger="hover" >
 							<a href="http://doc.mingsoft.net/plugs-cms/biao-qian/lan-mu-lie-biao-ms-channel.html" target="_blank">${'$'}{field.id}</a>
@@ -48,24 +48,24 @@
             </el-table-column>
 			<el-table-column label="排序" align="center" prop="categorySort"  width="70">
 			</el-table-column>
-			<el-table-column label="链接地址" align="left" prop="categoryPath" show-overflow-tooltip>
+			<el-table-column label="链接地址" align="left" prop="categoryPath" min-width="200" show-overflow-tooltip>
 				<template slot-scope="scope">
-					<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'${'$'}{ms:global.url}'+scope.row.categoryPath+'/index.html'" @click="copyContent">{{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}</span>
+					<span style="cursor: pointer" class="copyBtn" :data-clipboard-text="'{ms:global.url/}'+scope.row.categoryPath+'/index.html'" @click="copyContent">{{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}</span>
 				</template>
 			</el-table-column>
-            <el-table-column label="列表地址" align="left" prop="categoryListUrl" show-overflow-tooltip>
+            <el-table-column label="列表地址" align="left" prop="categoryListUrl" width="100" show-overflow-tooltip>
             </el-table-column>
-            <el-table-column label="内容地址" align="left" prop="categoryUrl" show-overflow-tooltip>
+            <el-table-column label="内容地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
 				<template slot-scope="scope">
 					{{scope.row.categoryType == '1'?scope.row.categoryUrl:''}}
 				</template>
             </el-table-column>
-            <el-table-column label="封面地址" align="left" prop="categoryUrl" show-overflow-tooltip>
+            <el-table-column label="封面地址" align="left" prop="categoryUrl" width="100" show-overflow-tooltip>
 				<template slot-scope="scope">
 					{{scope.row.categoryType == '2'?scope.row.categoryUrl:''}}
 				</template>
             </el-table-column>
-            <el-table-column label="栏目属性" align="left" prop="categoryFlag" show-overflow-tooltip>
+            <el-table-column label="栏目属性" align="left" prop="categoryFlag" width="100" show-overflow-tooltip>
 				<template slot-scope="scope">
 					{{getDictLabel(scope.row.categoryFlag)}}
 				</template>
@@ -95,14 +95,14 @@
 	var indexVue = new Vue({
 		el: '#index',
 		data: {
-			dataList: [],
 			//分类列表
-			selectionList: [],
+			dataList: [],
 			//分类列表选中
-			loading: true,
+			selectionList: [],
 			//加载状态
-			emptyText: '',
+			loading: true,
 			//提示文字
+			emptyText: '',
 			categoryFlagOptions: [],
 			manager: ms.manager,
 			loadState: false,
@@ -146,9 +146,8 @@
 			//根据字典数据值获取字典标签名
 			getDictLabel: function (v) {
 				var that = this;
-				v = v.split(",");
 				var labels = [];
-				v.forEach(function (item) {
+				v.split(",").forEach(function (item) {
 					for (var key in that.categoryFlagOptions) {
 						if (item == that.categoryFlagOptions[key].dictValue) {
 							labels.push(that.categoryFlagOptions[key].dictLabel);

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

@@ -91,7 +91,6 @@
                                             start-placeholder=""
                                             end-placeholder=""
                                             :readonly="false"
-
                                             :disabled="false"
                                             :editable="true"
                                             :clearable="true"
@@ -259,8 +258,8 @@
             return {
                 saveDisabled: false,
                 activeName: 'form',
-                model: undefined,
                 //自定义模型实例
+                model: undefined,
                 editableTabs: [{
                     title: '文章编辑',
                     name: 'form'
@@ -612,7 +611,7 @@
             this.contentTypeOptionsGet();
 
             this.form.id = ms.util.getParameter("id");
-            if (ms.util.getParameter("categoryId") != 'undefined' && ms.util.getParameter("categoryId") != 'null') {
+            if (ms.util.getParameter("categoryId")) {
                 this.form.contentCategoryId = ms.util.getParameter("categoryId");
             }
             this.type = ms.util.getParameter("type");