webpackJsonp([32],{"2pIq":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("5aCZ"),o=n("R2Wb"),i=n("Z4qH"),a={components:{Tinymce:r.a},mixins:[i.a],data:function(){return{dialogTitle:"新建文章",rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],description:[{required:!0,message:"请输入简介",trigger:"blur"}],author:[{required:!0,message:"请输入作者",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"}],content:[{required:!0,message:"请输入内容",trigger:"blur"}]},ruleForm:{}}},watch:{dialogType:function(t){this.dialogTitle=1===t?"新建文章":"编辑文章"}},methods:{editCallback:function(){var t=this;this.$nextTick(function(){t.$refs.tinymce.setContent(t.ruleForm.content)})},closeCallback:function(){this.$refs.tinymce.setContent("")},createCallback:function(){return o.a.createNotice(this.ruleForm)},updateCallback:function(){return o.a.updateNotice(this.ruleForm)}}},l={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialogVisible,width:"50%"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.closeDialog}},[n("el-form",{ref:"ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"100px"}},[n("el-form-item",{attrs:{label:"文章标题",prop:"title"}},[n("el-input",{staticClass:"form-input",model:{value:t.ruleForm.title,callback:function(e){t.$set(t.ruleForm,"title",e)},expression:"ruleForm.title"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"文章简介",prop:"description"}},[n("el-input",{staticClass:"form-input",model:{value:t.ruleForm.description,callback:function(e){t.$set(t.ruleForm,"description",e)},expression:"ruleForm.description"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"文章作者",prop:"author"}},[n("el-input",{staticClass:"form-input",model:{value:t.ruleForm.author,callback:function(e){t.$set(t.ruleForm,"author",e)},expression:"ruleForm.author"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"文章排序",prop:"sort"}},[n("el-input-number",{staticClass:"form-input",model:{value:t.ruleForm.sort,callback:function(e){t.$set(t.ruleForm,"sort",e)},expression:"ruleForm.sort"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"文章内容",prop:"content"}},[n("tinymce",{ref:"tinymce",attrs:{height:150},model:{value:t.ruleForm.content,callback:function(e){t.$set(t.ruleForm,"content",e)},expression:"ruleForm.content"}})],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitForm("ruleForm")}}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var s=n("rCDr")(a,l,!1,function(t){n("tAc/")},"data-v-7bb50e6a",null);e.default=s.exports},R2Wb:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("vLgD"),o={createNotice:function(t){return Object(r.a)({url:"/admin/notices",method:"post",data:t})},deleteNotice:function(t){return Object(r.a)({url:"/admin/notices/delete",method:"post",data:t})},updateStatus:function(t,e){return Object(r.a)({url:"/admin/notices/updateStatus",method:"post",params:{id:t,status:e}})},getNoticeList:function(t,e,n){var o={};for(var i in t)if(t[i])if("dateRange"===i){var a=t.dateRange[0],l=t.dateRange[1];o.startTime=a,o.endTime=l}else o[i]=t[i];return o.current=e,o.size=n,console.log("结果",o),Object(r.a)({url:"/admin/notices",method:"get",params:o})},getOneNotice:function(t){return Object(r.a)({url:"/admin/notices",method:"get",params:{id:t}})},updateNotice:function(t){return Object(r.a)({url:"/admin/notices",method:"patch",data:t})}}},VypR:function(t,e,n){(t.exports=n("uszS")(!1)).push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",""])},"tAc/":function(t,e,n){var r=n("VypR");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("Xatw")("5f933860",r,!0)}});