静态化
This commit is contained in:
parent
eeff1573b1
commit
8a249af400
|
@ -238,10 +238,10 @@
|
||||||
(select id FROM cms_category where <include refid="queryWhereCategoryId"></include>))
|
(select id FROM cms_category where <include refid="queryWhereCategoryId"></include>))
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime!=null and beginTime!=''">
|
<if test="beginTime!=null and beginTime!=''">
|
||||||
and content_updatetime >= #{beginTime}
|
and content_datetime >= #{beginTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime!=null and endTime!=''">
|
<if test="endTime!=null and endTime!=''">
|
||||||
and content_updatetime >= #{endTime}
|
and content_datetime >= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="orderBy!=null and order!=null and orderBy!='' and order!=''">
|
<if test="orderBy!=null and order!=null and orderBy!='' and order!=''">
|
||||||
ORDER BY `${orderBy}` ${order}
|
ORDER BY `${orderBy}` ${order}
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<el-form-item prop="categoryUrl" :label="form.categoryType =='1'? '内容模板' : '封面模板'">
|
<el-form-item prop="categoryUrl" :label="form.categoryType =='1'? '内容模板' : '封面模板'">
|
||||||
<el-select v-model="form.categoryUrl"
|
<el-select v-model="form.categoryUrl"
|
||||||
:style="{width: '100%'}"
|
:style="{width: '100%'}"
|
||||||
:filterable="false"
|
:filterable="true"
|
||||||
:disabled="false"
|
:disabled="false"
|
||||||
:multiple="false" :clearable="true"
|
:multiple="false" :clearable="true"
|
||||||
placeholder="请选择内容模板">
|
placeholder="请选择内容模板">
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
</template>
|
</template>
|
||||||
<el-select v-model="form.categoryListUrl"
|
<el-select v-model="form.categoryListUrl"
|
||||||
:style="{width: '100%'}"
|
:style="{width: '100%'}"
|
||||||
:filterable="false"
|
:filterable="true"
|
||||||
:disabled="false"
|
:disabled="false"
|
||||||
:multiple="false" :clearable="true"
|
:multiple="false" :clearable="true"
|
||||||
placeholder="请选择列表模板">
|
placeholder="请选择列表模板">
|
||||||
|
|
|
@ -27,7 +27,8 @@
|
||||||
<div class="class-4" >
|
<div class="class-4" >
|
||||||
<el-form-item label="主题模板">
|
<el-form-item label="主题模板">
|
||||||
<el-select v-model="template"
|
<el-select v-model="template"
|
||||||
:clearable="true"
|
:filterable="true"
|
||||||
|
:clearable="false"
|
||||||
placeholder="请选择主题模板">
|
placeholder="请选择主题模板">
|
||||||
<el-option v-for='item in templateOptions' :key="item" :value="item"
|
<el-option v-for='item in templateOptions' :key="item" :value="item"
|
||||||
:label="item"></el-option>
|
:label="item"></el-option>
|
||||||
|
@ -80,8 +81,8 @@
|
||||||
end-placeholder=""
|
end-placeholder=""
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:disabled="false"
|
:disabled="false"
|
||||||
:editable="true"
|
:editable="false"
|
||||||
:clearable="true"
|
:clearable="false"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
:style="{width:'100%'}"
|
:style="{width:'100%'}"
|
||||||
|
@ -125,14 +126,17 @@
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
loading:false,
|
loading:false,
|
||||||
template:'',//主题模板
|
template:'index.htm',//主题模板
|
||||||
templateOptions:[],
|
templateOptions:[],
|
||||||
position:'index.html', //位置
|
position:'index', //位置
|
||||||
contentSection:'', //文章栏目
|
contentSection:'0', //文章栏目
|
||||||
section:'', //栏目
|
section:'0', //栏目
|
||||||
time:ms.util.date.fmt(new Date(),"yyyy-MM-dd"),
|
time:ms.util.date.fmt(new Date(),"yyyy-MM-dd"),
|
||||||
treeList:[],
|
treeList:[{
|
||||||
|
id:'0',
|
||||||
|
categoryTitle:'顶级栏目',
|
||||||
|
children:[],
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//更新主页
|
//更新主页
|
||||||
|
@ -143,7 +147,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
ms.http.get(ms.manager+'/cms/generate//generateIndex.do', {url:that.template,position:that.position}).then(function (data) {
|
ms.http.post(ms.manager+'/cms/generate//generateIndex.do', {url:that.template,position:that.position}).then(function (data) {
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.$notify({ title: '更新成功!', type: 'success' });
|
that.$notify({ title: '更新成功!', type: 'success' });
|
||||||
}
|
}
|
||||||
|
@ -165,12 +169,8 @@
|
||||||
//更新栏目
|
//更新栏目
|
||||||
updateColumn(){
|
updateColumn(){
|
||||||
var that = this;
|
var that = this;
|
||||||
if(!that.section || that.section == ''){
|
|
||||||
that.$notify({ title: '请选择栏目!', type: 'warning' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
ms.http.get(ms.manager+'/cms/generate/'+that.section+'/genernateColumn.do', {section:that.section}).then(function (data) {
|
ms.http.get(ms.manager+'/cms/generate/'+(that.section?that.section:0)+'/genernateColumn.do').then(function (data) {
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.$notify({ title: '更新成功!', type: 'success' });
|
that.$notify({ title: '更新成功!', type: 'success' });
|
||||||
}
|
}
|
||||||
|
@ -184,12 +184,8 @@
|
||||||
//生成文章栏目
|
//生成文章栏目
|
||||||
updateArticle(){
|
updateArticle(){
|
||||||
var that = this;
|
var that = this;
|
||||||
if(!that.contentSection || that.contentSection == ''){
|
|
||||||
that.$notify({ title: '请选择栏目!', type: 'warning' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
that.loading = true;
|
that.loading = true;
|
||||||
ms.http.get(ms.manager+'/cms/generate/'+that.contentSection+'/generateArticle.do', {contentSection:that.contentSection,data:that.time}).then(function (data) {
|
ms.http.post(ms.manager+'/cms/generate/'+(that.contentSection?that.contentSection:0)+'/generateArticle.do', {dateTime:that.time}).then(function (data) {
|
||||||
if(data.result){
|
if(data.result){
|
||||||
that.$notify({ title: '更新成功!', type: 'success' });
|
that.$notify({ title: '更新成功!', type: 'success' });
|
||||||
}
|
}
|
||||||
|
@ -214,7 +210,7 @@
|
||||||
ms.http.get(ms.manager+"/cms/category/list.do",{pageSize:9999}).then(function(res){
|
ms.http.get(ms.manager+"/cms/category/list.do",{pageSize:9999}).then(function(res){
|
||||||
if(res.result){
|
if(res.result){
|
||||||
//res.data.rows.push({id:0,categoryId: null,categoryTitle:'顶级栏目管理'});
|
//res.data.rows.push({id:0,categoryId: null,categoryTitle:'顶级栏目管理'});
|
||||||
that.treeList = 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){
|
}).catch(function(err){
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
Loading…
Reference in New Issue