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 abd4d362..81a86520 100644
--- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl
@@ -8,7 +8,7 @@
@@ -193,6 +193,7 @@
UEDITOR_HOME_URL: ms.base+'/static/plugins/ueditor/1.4.3.1/'
},
contentCategoryIdOptions:[],
+ returnIsShow:true,
//表单数据
form: {
// 文章标题
@@ -337,14 +338,43 @@
this.form.contentImg.splice(index, 1);
}
},
+ //查询列表
+ list: function(contentCategoryId) {
+ var that = this;
+ ms.http.post(ms.manager+"/cms/content/list.do",{
+ contentCategoryId:contentCategoryId,
+ }).then(function(res) {
+ if(res.result&&res.data.total>0){
+ if(res.data.rows[0].contentType){
+ res.data.rows[0].contentType = res.data.rows[0].contentType.split(',');
+ }
+ if(res.data.rows[0].contentImg){
+ res.data.rows[0].contentImg = JSON.parse(res.data.rows[0].contentImg);
+ res.data.rows[0].contentImg.forEach(function(value){
+ value.url= ms.base + value.path
+ })
+ }else{
+ res.data.rows[0].contentImg=[]
+ }
+ that.form = res.data.rows[0];
+ }
+ }).catch(function(err) {
+ console.log(err);
+ });
+ },
},
created() {
this.contentCategoryIdOptionsGet();
this.contentTypeOptionsGet();
this.form.id = ms.util.getParameter("id");
+ this.form.contentCategoryId = ms.util.getParameter("categoryId");
if (this.form.id) {
this.get(this.form.id);
}
+ if(this.form.contentCategoryId){
+ this.list(this.form.contentCategoryId);
+ this.returnIsShow = false;
+ }
}
});
diff --git a/src/main/webapp/WEB-INF/manager/cms/content/index.ftl b/src/main/webapp/WEB-INF/manager/cms/content/index.ftl
index f358e7fb..0de0339d 100644
--- a/src/main/webapp/WEB-INF/manager/cms/content/index.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/content/index.ftl
@@ -34,8 +34,13 @@
},
methods:{
handleNodeClick: function(data){
- this.$el.getElementsByTagName('iframe')[0].contentWindow.window.mainVue.form.contentCategoryId = data.id;
- this.$el.getElementsByTagName('iframe')[0].contentWindow.window.mainVue.list();
+ if(data.categoryType == '1'){
+ this.action = ms.manager +"/cms/content/main.do?categoryId="+data.id;
+ } else if(data.categoryType == '2'){
+ this.action = ms.manager +"/cms/content/form.do?categoryId="+data.id;
+ } else{
+ this.action = ms.manager +"/cms/content/main.do";
+ }
},
treeList: function(){
var that = this;