|
@@ -1,8 +1,8 @@
|
|
#set(title="新闻管理")
|
|
#set(title="新闻管理")
|
|
#@header()
|
|
#@header()
|
|
<style>
|
|
<style>
|
|
- .input-text{width: 120px!important;}
|
|
|
|
- .toolbar .search{width: 500px;}
|
|
|
|
|
|
+ .input-text{width: 108px!important;}
|
|
|
|
+ .toolbar .search{width: 580px;}
|
|
</style>
|
|
</style>
|
|
<body>
|
|
<body>
|
|
<div class="con">
|
|
<div class="con">
|
|
@@ -28,6 +28,13 @@
|
|
<option :value="colmun.id" v-for="colmun in colmun_list">{{colmun.mColumnName}}</option>
|
|
<option :value="colmun.id" v-for="colmun in colmun_list">{{colmun.mColumnName}}</option>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="input-group-btn">
|
|
|
|
+ <!--文章栏目-->
|
|
|
|
+ <select class="form-control select" v-model="mAudit" @change="selected(3)">
|
|
|
|
+ <option value="">全部状态</option>
|
|
|
|
+ <option :value="audit.id" v-for="audit in state_list">{{audit.name}}</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
<input type="text" id="name" placeholder="输入文章名称" class="form-control">
|
|
<input type="text" id="name" placeholder="输入文章名称" class="form-control">
|
|
<span class="input-group-btn">
|
|
<span class="input-group-btn">
|
|
<button type="button" @click="search()" class="btn btn-primary">搜索</button>
|
|
<button type="button" @click="search()" class="btn btn-primary">搜索</button>
|
|
@@ -49,19 +56,44 @@
|
|
{ label: '文章标题', name: 'mTitle',frozen: true,width:330},
|
|
{ label: '文章标题', name: 'mTitle',frozen: true,width:330},
|
|
{ label: '文章栏目', name: 'mColumnName'},
|
|
{ label: '文章栏目', name: 'mColumnName'},
|
|
{ label: '文章归类', name: 'typeName'},
|
|
{ label: '文章归类', name: 'typeName'},
|
|
- { label: '文章状态', name: 'mRelease',formatter: mShow},
|
|
|
|
- { label: '是否置顶', name: 'isTop'},
|
|
|
|
|
|
+ { label: '是否审核', name: 'mAudit',formatter: mAudit},
|
|
|
|
+ { label: '是否发布', name: 'mRelease',formatter: mRelease},
|
|
|
|
+ { label: '是否置顶', name: 'isTop',formatter: isTop},
|
|
{ label: '发布人', name: 'realName'},
|
|
{ label: '发布人', name: 'realName'},
|
|
{ label: '发布时间', name: 'mTime'},]
|
|
{ label: '发布时间', name: 'mTime'},]
|
|
jgrid('#(path)/admin/work/news/jsonList', colModel,{fixed: false, height: $('body').height() - 170});
|
|
jgrid('#(path)/admin/work/news/jsonList', colModel,{fixed: false, height: $('body').height() - 170});
|
|
/**
|
|
/**
|
|
*是否显示
|
|
*是否显示
|
|
*/
|
|
*/
|
|
- function mShow(cellvalue, options, rowObject) {
|
|
|
|
|
|
+ function mRelease(cellvalue, options, rowObject) {
|
|
if (cellvalue == '0') {
|
|
if (cellvalue == '0') {
|
|
- return '<span class="label label-sm label-info">显示</span>';
|
|
|
|
|
|
+ return '<span class="label label-sm label-info">已发布</span>';
|
|
|
|
+ } else {
|
|
|
|
+ return '<span class="label label-sm label-danger">未发布</span>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ *是否置顶
|
|
|
|
+ */
|
|
|
|
+ function isTop(cellvalue, options, rowObject) {
|
|
|
|
+ if (cellvalue == '1') {
|
|
|
|
+ return '<span class="label label-sm label-info">置顶</span>';
|
|
} else {
|
|
} else {
|
|
- return '<span class="label label-sm label-danger">不显示</span>';
|
|
|
|
|
|
+ return '<span class="label label-sm label-danger">否</span>';
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ *是否审核
|
|
|
|
+ */
|
|
|
|
+ function mAudit(cellvalue, options, rowObject) {
|
|
|
|
+ if (cellvalue == '0') {
|
|
|
|
+ return '<span class="label label-sm label-danger">待审核</span>';
|
|
|
|
+ }
|
|
|
|
+ if (cellvalue == '1') {
|
|
|
|
+ return '<span class="label label-sm label-info">已审核</span>';
|
|
|
|
+ }
|
|
|
|
+ if (cellvalue == '2') {
|
|
|
|
+ return '<span class="label label-sm label-danger">审核不通过</span>';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -71,6 +103,9 @@
|
|
if (op == 'add') {
|
|
if (op == 'add') {
|
|
openDialogDiy("添加新闻", "#(path)/admin/work/news/view?op=add", "85%", "95%");
|
|
openDialogDiy("添加新闻", "#(path)/admin/work/news/view?op=add", "85%", "95%");
|
|
}
|
|
}
|
|
|
|
+ if (op == 'audit') {
|
|
|
|
+ openDialogDiy("编辑新闻轮播", "#(path)/admin/work/news/view?op=audit&id=" + selectedRow().id, "85%", "95%");
|
|
|
|
+ }
|
|
if (op == 'edit') {
|
|
if (op == 'edit') {
|
|
openDialogDiy("编辑新闻轮播", "#(path)/admin/work/news/view?op=edit&id=" + selectedRow().id, "85%", "95%");
|
|
openDialogDiy("编辑新闻轮播", "#(path)/admin/work/news/view?op=edit&id=" + selectedRow().id, "85%", "95%");
|
|
}
|
|
}
|
|
@@ -84,7 +119,10 @@
|
|
type:1,
|
|
type:1,
|
|
type_list:[{name:'时政信息',id:1},{name:'政策宣传',id:2}],
|
|
type_list:[{name:'时政信息',id:1},{name:'政策宣传',id:2}],
|
|
colmun_list:[],
|
|
colmun_list:[],
|
|
- colmunId:''
|
|
|
|
|
|
+ state_list:[{name:'待审核',id:0},{name:'已审核',id:1},{name:'审核不通过',id:2}],
|
|
|
|
+ colmunId:'',
|
|
|
|
+ mAudit:''
|
|
|
|
+
|
|
},
|
|
},
|
|
mounted: function () {
|
|
mounted: function () {
|
|
this.getColmun(1);
|
|
this.getColmun(1);
|
|
@@ -98,7 +136,10 @@
|
|
reloadGrid({type:this.type==1?'时政信息':'政策宣传',name:'',columnId:'',mRelease:''});
|
|
reloadGrid({type:this.type==1?'时政信息':'政策宣传',name:'',columnId:'',mRelease:''});
|
|
}
|
|
}
|
|
if(index==2){
|
|
if(index==2){
|
|
- reloadGrid({columnId:this.colmunId,min:'',max:'',name:''});
|
|
|
|
|
|
+ reloadGrid({columnId:this.colmunId});
|
|
|
|
+ }
|
|
|
|
+ if(index==3){
|
|
|
|
+ reloadGrid({mAudit:this.mAudit});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//查询文章
|
|
//查询文章
|