From 72f7732a4f48e949481e263a81796d7f1e58c4e3 Mon Sep 17 00:00:00 2001 From: zhongyh <1599558112> Date: Sat, 28 Dec 2019 18:20:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/manager/cms/category/form.ftl | 51 +++++++++++++++++-- .../WEB-INF/manager/cms/category/index.ftl | 33 +++++++++++- .../WEB-INF/manager/cms/content/form.ftl | 48 ++++++++++++++++- .../WEB-INF/manager/cms/content/main.ftl | 40 ++++++++++++++- 4 files changed, 163 insertions(+), 9 deletions(-) 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}} - + + + + + + - + +