清理代码
This commit is contained in:
parent
8230c3cd38
commit
60d3fd0980
|
@ -393,8 +393,6 @@
|
||||||
that.categoryList = res.data.rows;
|
that.categoryList = res.data.rows;
|
||||||
that.treeList[0].children = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
|
that.treeList[0].children = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
save: function () {
|
save: function () {
|
||||||
|
@ -465,8 +463,6 @@
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.mdiyModelIdOptions = data.data.rows;
|
that.mdiyModelIdOptions = data.data.rows;
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取当前分类
|
//获取当前分类
|
||||||
|
@ -505,8 +501,6 @@
|
||||||
|
|
||||||
that.contentList(that.form.id);
|
that.contentList(that.form.id);
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
contentList: function (id) {
|
contentList: function (id) {
|
||||||
|
@ -521,8 +515,6 @@
|
||||||
that.categoryTypeDisabled = false;
|
that.categoryTypeDisabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取categoryListUrl数据源
|
//获取categoryListUrl数据源
|
||||||
|
@ -530,8 +522,6 @@
|
||||||
var that = this;
|
var that = this;
|
||||||
ms.http.get(ms.manager + "/template/queryTemplateFileForColumn.do", {}).then(function (data) {
|
ms.http.get(ms.manager + "/template/queryTemplateFileForColumn.do", {}).then(function (data) {
|
||||||
that.categoryListUrlOptions = data.data;
|
that.categoryListUrlOptions = data.data;
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取categoryUrl数据源
|
//获取categoryUrl数据源
|
||||||
|
@ -539,8 +529,6 @@
|
||||||
var that = this;
|
var that = this;
|
||||||
ms.http.get(ms.manager + "/template/queryTemplateFileForColumn.do", {}).then(function (data) {
|
ms.http.get(ms.manager + "/template/queryTemplateFileForColumn.do", {}).then(function (data) {
|
||||||
that.categoryUrlOptions = data.data;
|
that.categoryUrlOptions = data.data;
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取categoryFlag数据源
|
//获取categoryFlag数据源
|
||||||
|
@ -554,8 +542,6 @@
|
||||||
res = res.data;
|
res = res.data;
|
||||||
that.categoryFlagOptions = res.rows;
|
that.categoryFlagOptions = res.rows;
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//categoryImg文件上传完成回调
|
//categoryImg文件上传完成回调
|
||||||
|
|
|
@ -169,8 +169,6 @@
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//应用子栏目模板
|
//应用子栏目模板
|
||||||
|
@ -193,8 +191,6 @@
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//根据字典数据值获取字典标签名
|
//根据字典数据值获取字典标签名
|
||||||
|
@ -234,8 +230,6 @@
|
||||||
that.emptyText = '';
|
that.emptyText = '';
|
||||||
that.dataList = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
|
that.dataList = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (that.loadState) {
|
if (that.loadState) {
|
||||||
|
@ -306,8 +300,6 @@
|
||||||
res = res.data;
|
res = res.data;
|
||||||
that.categoryFlagOptions = res.rows;
|
that.categoryFlagOptions = res.rows;
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//表格数据转换
|
//表格数据转换
|
||||||
|
|
|
@ -453,8 +453,6 @@
|
||||||
}
|
}
|
||||||
that.changeModel();
|
that.changeModel();
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//根据封面获取当前文章
|
//根据封面获取当前文章
|
||||||
|
@ -499,8 +497,6 @@
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取contentCategoryId数据源
|
//获取contentCategoryId数据源
|
||||||
|
@ -521,8 +517,6 @@
|
||||||
//获取到栏目数据之后再进行初始化
|
//获取到栏目数据之后再进行初始化
|
||||||
that.init();
|
that.init();
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取contentType数据源
|
//获取contentType数据源
|
||||||
|
@ -536,8 +530,6 @@
|
||||||
data = data.data;
|
data = data.data;
|
||||||
that.contentTypeOptions = data.rows;
|
that.contentTypeOptions = data.rows;
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//contentImg文件上传完成回调
|
//contentImg文件上传完成回调
|
||||||
|
@ -598,8 +590,6 @@
|
||||||
|
|
||||||
that.form = res.data.rows[0];
|
that.form = res.data.rows[0];
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//只有在渲染完栏目数据之后才会初始化
|
//只有在渲染完栏目数据之后才会初始化
|
||||||
|
|
|
@ -86,8 +86,6 @@
|
||||||
children: that.treeData
|
children: that.treeData
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (that.loadState) {
|
if (that.loadState) {
|
||||||
|
|
|
@ -318,9 +318,8 @@
|
||||||
that.total = res.data.total;
|
that.total = res.data.total;
|
||||||
that.dataList = res.data.rows;
|
that.dataList = res.data.rows;
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
}).finally(function () {
|
||||||
that.loading = false;
|
that.loading = false;
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (that.loadState) {
|
if (that.loadState) {
|
||||||
|
@ -451,8 +450,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
that.list();
|
that.list();
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取contentType数据源
|
//获取contentType数据源
|
||||||
|
@ -466,8 +463,6 @@
|
||||||
data = data.data;
|
data = data.data;
|
||||||
that.contentTypeOptions = data.rows;
|
that.contentTypeOptions = data.rows;
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -176,13 +176,6 @@
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
that.$notify({
|
|
||||||
title: '更新失败!',
|
|
||||||
message: err,
|
|
||||||
type: 'error'
|
|
||||||
});
|
|
||||||
console.log(err);
|
|
||||||
}).finally(function () {
|
}).finally(function () {
|
||||||
that.homeLoading = false;
|
that.homeLoading = false;
|
||||||
});
|
});
|
||||||
|
@ -217,13 +210,6 @@
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
that.$notify({
|
|
||||||
title: '更新失败!',
|
|
||||||
message: err,
|
|
||||||
type: 'error'
|
|
||||||
});
|
|
||||||
console.log(err);
|
|
||||||
}).finally(function () {
|
}).finally(function () {
|
||||||
that.columnLoading = false;
|
that.columnLoading = false;
|
||||||
});
|
});
|
||||||
|
@ -248,13 +234,6 @@
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
that.$notify({
|
|
||||||
title: '更新失败!',
|
|
||||||
message: err,
|
|
||||||
type: 'error'
|
|
||||||
});
|
|
||||||
console.log(err);
|
|
||||||
}).finally(function () {
|
}).finally(function () {
|
||||||
that.articleLoading = false;
|
that.articleLoading = false;
|
||||||
});
|
});
|
||||||
|
@ -272,8 +251,6 @@
|
||||||
}); //没有就找其他的
|
}); //没有就找其他的
|
||||||
|
|
||||||
that.template = template || (that.templateOptions.length > 0 ? that.templateOptions[0] : "");
|
that.template = template || (that.templateOptions.length > 0 ? that.templateOptions[0] : "");
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTree: function () {
|
getTree: function () {
|
||||||
|
@ -285,8 +262,6 @@
|
||||||
//res.data.rows.push({id:0,categoryId: null,categoryTitle:'顶级栏目管理'});
|
//res.data.rows.push({id:0,categoryId: null,categoryTitle:'顶级栏目管理'});
|
||||||
that.treeList[0].children = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
|
that.treeList[0].children = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue