|
@@ -65,11 +65,25 @@
|
|
|
</el-switch>
|
|
|
</td>
|
|
|
</tr>
|
|
|
+ #if(shiro.hasPermission('news:audit')==false)
|
|
|
+ <tr v-if="item.mAudit==2">
|
|
|
+ <td class="l" style="vertical-align: top">审核不过原因 <span style="color: red;font-weight: bold;"> *</span></td>
|
|
|
+ <td colspan="3">
|
|
|
+ <textarea style="height: 70px;" class="form-control" placeholder="输入原因" readonly v-model="item.msg"></textarea>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ #end
|
|
|
#if(shiro.hasPermission('news:audit'))
|
|
|
<tr>
|
|
|
<td class="l" style="vertical-align: top;">文章审核 <span>*</span></td>
|
|
|
<td colspan="3">
|
|
|
- <label class="spa" :class="{active:item.mAudit==index}" v-for="(audit,index) in audit_list" @click="item.mAudit=index">{{audit}}</label>
|
|
|
+ <label class="spa" :class="{active:item.mAudit==index}" v-for="(audit,index) in audit_list" @click="audits(index)">{{audit}}</label>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-if="zt">
|
|
|
+ <td class="l" style="vertical-align: top;">审核不过原因 <span>*</span></td>
|
|
|
+ <td colspan="3">
|
|
|
+ <textarea style="height: 70px;" id="msg" name="msg" class="form-control" placeholder="输入原因" v-model="item.msg"></textarea>
|
|
|
</td>
|
|
|
</tr>
|
|
|
#end
|
|
@@ -96,9 +110,11 @@
|
|
|
#@js()
|
|
|
<script>
|
|
|
var ue=UE.getEditor('editor',{
|
|
|
+ serverUrl:'#(path)/admin/upload/',
|
|
|
toolbars:[['FullScreen', 'Undo','Redo','forecolor','bold', 'italic','formatmatch', 'autotypeset','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','insertorderedlist', 'insertunorderedlist',
|
|
|
'rowspacingtop', 'rowspacingbottom', 'lineheight','simpleupload','insertvideo','customstyle','paragraph','fontfamily', 'fontsize','inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols']]
|
|
|
});
|
|
|
+ ue.set
|
|
|
var cropper = null;
|
|
|
var vm = new Vue({
|
|
|
el: "#app",
|
|
@@ -106,12 +122,14 @@
|
|
|
audit_list:['待审核','审核通过','审核不通过'],
|
|
|
type_list:[{name:'时政信息',id:1},{name:'政策宣传',id:2}],
|
|
|
colmun_list:[],
|
|
|
- item: {mTitle:'',mContent:'',typeName:1,mRelease:true,columnId:1,isTop:false,mAudit:0,mCove:'',mTime:''},
|
|
|
+ item: {mTitle:'',mContent:'',typeName:1,mRelease:true,columnId:1,isTop:false,mAudit:0,mCove:'',mTime:'',msg:''},
|
|
|
show: false,
|
|
|
mCove: '',
|
|
|
dataImage: '',
|
|
|
select:false,
|
|
|
columnId:0,
|
|
|
+ zt:false,
|
|
|
+ f:true
|
|
|
},
|
|
|
mounted: function () {
|
|
|
if ('#(op)' == 'edit'||'#(op)' == 'audit') {
|
|
@@ -121,6 +139,7 @@
|
|
|
this.item.isTop=this.item.isTop==0?false:true;
|
|
|
this.now=this.item.mAudit;
|
|
|
this.columnId=this.item.columnId;
|
|
|
+ this.f=false;
|
|
|
}
|
|
|
this.getColmun(this.item.typeName);
|
|
|
},
|
|
@@ -128,21 +147,31 @@
|
|
|
//选择分类
|
|
|
selected:function(){
|
|
|
this.select=true;
|
|
|
+ this.f=false;
|
|
|
this.getColmun(vm.item.typeName);
|
|
|
+
|
|
|
},
|
|
|
//选择栏目
|
|
|
getColmun:function(e){
|
|
|
- console.log("zx4:"+this.item.columnId);
|
|
|
sendAjax("#(path)/admin/work/news/colmun_list",{type:e},function(res){
|
|
|
cancelLoding();
|
|
|
vm.colmun_list=res;
|
|
|
- if(vm.select){
|
|
|
+ if(vm.select||vm.f){
|
|
|
vm.item.columnId=res[0].id;
|
|
|
}else{
|
|
|
vm.item.columnId=vm.columnId;
|
|
|
}
|
|
|
+ console.log("vm.item.columnId2:"+vm.item.columnId);
|
|
|
});
|
|
|
},
|
|
|
+ audits:function(index){
|
|
|
+ vm.item.mAudit=index;
|
|
|
+ if(index==2){
|
|
|
+ vm.zt=true;
|
|
|
+ }else{
|
|
|
+ vm.zt=false;
|
|
|
+ }
|
|
|
+ },
|
|
|
//创建列表
|
|
|
change: function (e, index) {
|
|
|
var objUrl = vm.getUri(e.currentTarget.files[0]);
|
|
@@ -185,9 +214,17 @@
|
|
|
}
|
|
|
})
|
|
|
$("#add").click(function () {
|
|
|
+ if(vm.item.mTitle==''){
|
|
|
+ showToastError("输入标题")
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ vm.item.mContent = ue.getContent();
|
|
|
+ if(vm.item.mContent==''){
|
|
|
+ showToastError("输入内容")
|
|
|
+ return;
|
|
|
+ }
|
|
|
vm.item.isTop = vm.item.isTop == true ? 1 : 0;
|
|
|
vm.item.mRelease = vm.item.mRelease == true ? 0 :1;
|
|
|
- vm.item.mContent = ue.getContent();
|
|
|
vm.item.mTime=$('#max').val();
|
|
|
var data = {news: JSON.stringify(vm.item)};
|
|
|
ajaxSubmit("#(path)/admin/work/news/#(op)", data);
|