chunk-03bc4e08.42d51ad6.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-03bc4e08"],{"7ab2":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"公告名称:"}},[a("el-input",{model:{value:e.form.noticeTitle,callback:function(t){e.$set(e.form,"noticeTitle",t)},expression:"form.noticeTitle"}})],1),a("el-form-item",{attrs:{label:"是否发布:"}},[a("el-select",{model:{value:e.form.publishStatus,callback:function(t){e.$set(e.form,"publishStatus",t)},expression:"form.publishStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未发布",value:0}}),a("el-option",{attrs:{label:"已发布",value:1}})],1)],1),a("el-form-item",{attrs:{label:"显示状态:"}},[a("el-select",{model:{value:e.form.displayStatus,callback:function(t){e.$set(e.form,"displayStatus",t)},expression:"form.displayStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未开始",value:1}}),a("el-option",{attrs:{label:"显示中",value:2}}),a("el-option",{attrs:{label:"已结束",value:3}})],1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.initList}},[e._v("搜索")]),a("el-button",{on:{click:e.reset}},[e._v("重置")])],1)],1),a("el-row",{staticStyle:{"margin-bottom":"20px"}},[a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.add}},[e._v("新增")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"公告名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.noticeTitle||"-")+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"是否发布",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(e.initPublishStatus(a.publishStatus))+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"显示状态",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(e.initDisplayStatus(a.displayStatus))+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"显示时间",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.noticeStartTime)+" ~ "+e._s(a.noticeEndTime)+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"发布人",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.publishPeople)+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"添加人",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.createUser)+" ")]}}])}),a("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"最后修改时间",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(" "+e._s(a.updateDate)+" ")]}}])}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.publishStatus?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.withdraw(t.row)}}},[e._v("撤回")]):e._e(),0==t.row.publishStatus?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.edit(t.row)}}},[e._v("修改")]):e._e(),0==t.row.publishStatus?a("el-button",{staticStyle:{color:"red"},attrs:{type:"text",size:"small"},on:{click:function(a){return e.del(t.row)}}},[e._v("删除")]):e._e()]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.form.pageNum,limit:e.form.pageSize},on:{"update:page":function(t){return e.$set(e.form,"pageNum",t)},"update:limit":function(t){return e.$set(e.form,"pageSize",t)},pagination:e.initList}}),e.dialogVisible?a("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"900px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":e.cancel},on:{"update:visible":function(t){e.dialogVisible=t},close:e.cancel}},[a("div",{staticStyle:{"max-height":"65vh",overflow:"auto"}},[a("el-form",{ref:"ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px","label-position":"right"}},[a("el-form-item",{attrs:{label:"公告名称:",prop:"noticeTitle"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:e.ruleForm.noticeTitle,callback:function(t){e.$set(e.ruleForm,"noticeTitle",t)},expression:"ruleForm.noticeTitle"}})],1),a("el-form-item",{attrs:{label:"显示时间:",prop:"time"}},[a("el-date-picker",{staticStyle:{width:"500px"},attrs:{type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.ruleForm.time,callback:function(t){e.$set(e.ruleForm,"time",t)},expression:"ruleForm.time"}})],1),a("el-form-item",{attrs:{label:"是否发布:",prop:"publishStatus"}},[a("el-radio-group",{model:{value:e.ruleForm.publishStatus,callback:function(t){e.$set(e.ruleForm,"publishStatus",t)},expression:"ruleForm.publishStatus"}},[a("el-radio",{attrs:{label:1}},[e._v("是")]),a("el-radio",{attrs:{label:0}},[e._v("否")])],1)],1),a("el-form-item",{attrs:{label:"发布人:",prop:"publishPeople"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:e.ruleForm.publishPeople,callback:function(t){e.$set(e.ruleForm,"publishPeople",t)},expression:"ruleForm.publishPeople"}})],1),a("el-form-item",{attrs:{label:"公告内容:",prop:"noticeContent"}},[a("editor",{attrs:{id:"editor_id",height:"500px",content:e.ruleForm.noticeContent,loadStyleMode:!1},on:{"update:content":function(t){return e.$set(e.ruleForm,"noticeContent",t)},"on-content-change":e.onContentChange}})],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancel}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)]):e._e()],1)},o=[],n=a("5530"),r=a("c7eb"),i=a("1da1"),s=(a("b0c0"),a("9bb4")),u=a("943d"),c={name:"EitcErmPcIndex",components:{editor:s["a"]},data:function(){return{form:{noticeTitle:"",publishStatus:"",displayStatus:"",pageNum:1,pageSize:10},title:"",dialogVisible:!1,ruleForm:{noticeTitle:"",time:null,publishStatus:1,publishPeople:"",noticeContent:""},rules:{noticeTitle:[{required:!0,message:"请输入公告名称",trigger:"blur"}],time:[{required:!0,message:"请选择显示时间",trigger:"change"}],publishStatus:[{required:!0,message:"请选择发布状态",trigger:"change"}],publishPeople:[{required:!0,message:"请输入发布人",trigger:"blur"}],noticeContent:[{required:!0,message:"请输入公告内容",trigger:"change"}]},tableData:[],total:0}},mounted:function(){this.initList()},methods:{initList:function(){var e=this;return Object(i["a"])(Object(r["a"])().mark((function t(){var a;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["yb"])(e.form);case 2:a=t.sent,e.tableData=a.rows,e.total=a.total;case 5:case"end":return t.stop()}}),t)})))()},reset:function(){this.form={noticeTitle:"",publishStatus:"",displayStatus:"",pageNum:1,pageSize:10},this.initList()},withdraw:function(e){var t=this;this.$confirm("确认撤回吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(i["a"])(Object(r["a"])().mark((function a(){var l;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["Ab"])({id:e.id});case 2:if(l=a.sent,200===l.code){a.next=5;break}return a.abrupt("return",t.$message.error(l.msg));case 5:t.initList(),t.$message({type:"success",message:"撤回成功!"});case 7:case"end":return a.stop()}}),a)})))).catch((function(){t.$message({type:"info",message:"已取消撤回"})}))},edit:function(e){var t=this;return Object(i["a"])(Object(r["a"])().mark((function a(){var l;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return t.dialogVisible=!0,t.title="编辑公告",a.next=4,Object(u["xb"])({id:e.id});case 4:l=a.sent,t.ruleForm=Object(n["a"])(Object(n["a"])({},l.data),{},{time:[l.data.noticeStartTime,l.data.noticeEndTime]}),t.$forceUpdate();case 7:case"end":return a.stop()}}),a)})))()},del:function(e){var t=this;this.$confirm("此操作将永久删除该项?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(i["a"])(Object(r["a"])().mark((function a(){var l;return Object(r["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["zb"])(e.id);case 2:if(l=a.sent,200===l.code){a.next=5;break}return a.abrupt("return",t.$message.error(l.msg));case 5:t.initList(),t.$message({type:"success",message:"删除成功!"});case 7:case"end":return a.stop()}}),a)})))).catch((function(){}))},initPublishStatus:function(e){switch(e){case 0:return"未发布";case 1:return"已发布";default:break}},initDisplayStatus:function(e){switch(e){case 1:return"未开始";case 2:return"显示中";case 3:return"已结束";default:break}},onContentChange:function(e){this.ruleForm.name=e},add:function(){this.dialogVisible=!0,this.title="添加公告",this.ruleForm={noticeTitle:"",time:null,publishStatus:1,publishPeople:"",noticeContent:""}},submit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(i["a"])(Object(r["a"])().mark((function t(a){var l,o;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=25;break}if("添加公告"!=e.title){t.next=13;break}return e.ruleForm.noticeStartTime=e.ruleForm.time[0],e.ruleForm.noticeEndTime=e.ruleForm.time[1],t.next=6,Object(u["wb"])(e.ruleForm);case 6:if(l=t.sent,200===l.code){t.next=9;break}return t.abrupt("return",e.$message.error(l.msg));case 9:e.dialogVisible=!1,e.$message.success("添加公告!"),t.next=22;break;case 13:return e.ruleForm.noticeStartTime=e.ruleForm.time[0],e.ruleForm.noticeEndTime=e.ruleForm.time[1],t.next=17,Object(u["Bb"])(e.ruleForm);case 17:if(o=t.sent,200===o.code){t.next=20;break}return t.abrupt("return",e.$message.error(o.msg));case 20:e.dialogVisible=!1,e.$message.success("编辑公告!");case 22:e.initList(),t.next=27;break;case 25:return e.$message.error("必填项不能为空!"),t.abrupt("return",!1);case 27:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},cancel:function(){this.dialogVisible=!1}}},p=c,d=a("2877"),m=Object(d["a"])(p,l,o,!1,null,null,null);t["default"]=m.exports},"9bb4":function(e,t,a){"use strict";var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"kindeditor"},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:e.outContent,expression:"outContent"}],attrs:{id:e.id,name:"content"},domProps:{value:e.outContent},on:{input:function(t){t.target.composing||(e.outContent=t.target.value)}}})])},o=[],n=(a("a9e3"),a("c7ea"),a("8187"),a("475d"),{name:"kindeditor",data:function(){return{editor:null,outContent:this.content}},props:{content:{type:String,default:""},id:{type:String,required:!0},width:{type:String},height:{type:String},minWidth:{type:Number,default:650},minHeight:{type:Number,default:100},items:{type:Array,default:function(){return["undo","redo","|","preview","print","cut","copy","paste","plainpaste","wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","clearhtml","quickformat","selectall","|","fullscreen","/","formatblock","fontname","fontsize","|","forecolor","hilitecolor","bold","italic","underline","strikethrough","lineheight","removeformat"]}},noDisableItems:{type:Array,default:function(){return["source","fullscreen"]}},filterMode:{type:Boolean,default:!0},htmlTags:{type:Object,default:function(){return{font:["color","size","face",".background-color"],span:["style"],div:["class","align","style"],table:["class","border","cellspacing","cellpadding","width","height","align","style"],"td,th":["class","align","valign","width","height","colspan","rowspan","bgcolor","style"],a:["class","href","target","name","style"],embed:["src","width","height","type","loop","autostart","quality","style","align","allowscriptaccess","/"],img:["src","width","height","border","alt","title","align","style","/"],hr:["class","/"],br:["/"],"p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6":["align","style"],"tbody,tr,strong,b,sub,sup,em,i,u,strike":[]}}},wellFormatMode:{type:Boolean,default:!0},resizeType:{type:Number,default:2},themeType:{type:String,default:"default"},langType:{type:String,default:"zh-CN"},designMode:{type:Boolean,default:!0},fullscreenMode:{type:Boolean,default:!1},basePath:{type:String},themesPath:{type:String},pluginsPath:{type:String,default:""},langPath:{type:String},minChangeSize:{type:Number,default:5},loadStyleMode:{type:Boolean,default:!0},urlType:{type:String,default:""},newlineTag:{type:String,default:"p"},pasteType:{type:Number,default:2},dialogAlignType:{type:String,default:"page"},shadowMode:{type:Boolean,default:!0},zIndex:{type:Number,default:811213},useContextmenu:{type:Boolean,default:!0},syncType:{type:String,default:"form"},indentChar:{type:String,default:"\t"},cssPath:{type:[String,Array]},cssData:{type:String},bodyClass:{type:String,default:"ke-content"},colorTable:{type:Array},afterCreate:{type:Function},afterChange:{type:Function},afterTab:{type:Function},afterFocus:{type:Function},afterBlur:{type:Function},afterUpload:{type:Function},uploadJson:{type:String},fileManagerJson:{type:Function},allowPreviewEmoticons:{type:Boolean,default:!0},allowImageUpload:{type:Boolean,default:!0},allowFlashUpload:{type:Boolean,default:!0},allowMediaUpload:{type:Boolean,default:!0},allowFileUpload:{type:Boolean,default:!0},allowFileManager:{type:Boolean,default:!1},fontSizeTable:{type:Array,default:function(){return["9px","10px","12px","14px","16px","18px","24px","32px"]}},imageTabIndex:{type:Number,default:0},formatUploadUrl:{type:Boolean,default:!0},fullscreenShortcut:{type:Boolean,default:!1},extraFileUploadParams:{type:Array,default:function(){return[]}},filePostName:{type:String,default:"imgFile"},fillDescAfterUploadImage:{type:Boolean,default:!1},afterSelectFile:{type:Function},pagebreakHtml:{type:String,default:"<hr style=”page-break-after: always;” class=”ke-pagebreak” />"},allowImageRemote:{type:Boolean,default:!0},autoHeightMode:{type:Boolean,default:!1},fixToolBar:{type:Boolean,default:!1},tabIndex:{type:Number}},watch:{content:function(e){this.editor&&e!==this.outContent&&this.editor.html(e)},outContent:function(e){this.$emit("update:content",e),this.$emit("on-content-change",e)}},mounted:function(){var e=this;e.editor=window.KindEditor.create("#"+this.id,{width:e.width,height:e.height,minWidth:e.minWidth,minHeight:e.minHeight,items:e.items,noDisableItems:e.noDisableItems,filterMode:e.filterMode,htmlTags:e.htmlTags,wellFormatMode:e.wellFormatMode,resizeType:e.resizeType,themeType:e.themeType,langType:e.langType,designMode:e.designMode,fullscreenMode:e.fullscreenMode,basePath:e.basePath,themesPath:e.cssPath,pluginsPath:e.pluginsPath,langPath:e.langPath,minChangeSize:e.minChangeSize,loadStyleMode:e.loadStyleMode,urlType:e.urlType,newlineTag:e.newlineTag,pasteType:e.pasteType,dialogAlignType:e.dialogAlignType,shadowMode:e.shadowMode,zIndex:e.zIndex,useContextmenu:e.useContextmenu,syncType:e.syncType,indentChar:e.indentChar,cssPath:e.cssPath,cssData:e.cssData,bodyClass:e.bodyClass,colorTable:e.colorTable,afterCreate:e.afterCreate,afterChange:function(){e.afterChange,e.outContent=this.html()},afterTab:e.afterTab,afterFocus:e.afterFocus,afterBlur:e.afterBlur,afterUpload:e.afterUpload,uploadJson:e.uploadJson,fileManagerJson:e.fileManagerJson,allowPreviewEmoticons:e.allowPreviewEmoticons,allowImageUpload:e.allowImageUpload,allowFlashUpload:e.allowFlashUpload,allowMediaUpload:e.allowMediaUpload,allowFileUpload:e.allowFileUpload,allowFileManager:e.allowFileManager,fontSizeTable:e.fontSizeTable,imageTabIndex:e.imageTabIndex,formatUploadUrl:e.formatUploadUrl,fullscreenShortcut:e.fullscreenShortcut,extraFileUploadParams:e.extraFileUploadParams,filePostName:e.filePostName,fillDescAfterUploadImage:e.fillDescAfterUploadImage,afterSelectFile:e.afterSelectFile,pagebreakHtml:e.pagebreakHtml,allowImageRemote:e.allowImageRemote,autoHeightMode:e.autoHeightMode,fixToolBar:e.fixToolBar,tabIndex:e.tabIndex})}}),r=n,i=a("2877"),s=Object(i["a"])(r,l,o,!1,null,null,null);t["a"]=s.exports}}]);