diff --git a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl index bd487b7b..b6971d12 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl @@ -12,12 +12,19 @@ - + + - @@ -123,6 +130,13 @@ + + { + if(item.categoryParentId !=null && item.categoryParentId !="" && item.categoryParentId.indexOf(this.form.id) != -1){ + if(item.id == n){ + this.form.categoryId = null; + this.$refs.tree.clearHandle(); + this.$notify({ + title: '提示', + message: '不能选择子分类', + type: 'warning' + }); + } + } + }); + } }, computed:{ }, @@ -238,6 +282,7 @@ ms.http.get(ms.manager+"/cms/category/list.do",{pageSize:9999}).then(function(res){ if(res.result){ //res.data.rows.push({id:0,categoryId: null,categoryTitle:'顶级栏目管理'}); + that.categoryList = res.data.rows; that.treeList[0].children = ms.util.treeData(res.data.rows,'id','categoryId','children'); } }).catch(function(err){ diff --git a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl index ee225e9a..501039bc 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl @@ -31,12 +31,41 @@ {{emptyText}} - + + + + - + + + diff --git a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl index cad44af1..5a73a6c7 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl @@ -25,6 +25,13 @@ justify="start" align="top"> + + + + @@ -167,6 +197,13 @@ + + diff --git a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl index d493766b..f847815e 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl @@ -60,16 +60,52 @@ {{emptyText}} - + + + + + + - + +