(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-339c96c6"],{"10d9":function(t,e,a){"use strict";var n=a("8cae"),i=a.n(n);i.a},4800:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"table-classic-wrapper"},[a("Hints",[a("template",{slot:"hintName"},[t._v("通告管理")]),a("template",{slot:"hintInfo"},[a("p")])],2),a("el-button",{attrs:{type:"primary"},on:{click:t.fetchData}},[t._v("查询/刷新")]),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData,"tooltip-effect":"dark",size:"small"}},[a("el-table-column",{attrs:{prop:"id",label:"id",align:"center",fixed:"left",width:"100"}}),a("el-table-column",{attrs:{prop:"content",label:"通告内容",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{domProps:{innerHTML:t._s(e.row.content)}})]}}])}),a("el-table-column",{attrs:{prop:"status",label:"通告状态",align:"center",fixed:"right",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{attrs:{slot:"reference"},slot:"reference"},[0==e.row.status?a("el-tag",{attrs:{size:"medium",type:"success"}},[t._v("已启用")]):1==e.row.status?a("el-tag",{attrs:{size:"medium",type:"danger"}},[t._v("已禁用")]):a("el-tag",{attrs:{type:"danger"}},[t._v("删除")])],1)]}}])}),a("el-table-column",{attrs:{prop:"notice_type",label:"展示类型",align:"center",width:"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-select",{attrs:{"popper-class":"notice-type-popper",placeholder:"更改展示类型"},on:{change:function(a){return t.typeChange(e.row)}},model:{value:e.row.notice_type,callback:function(a){t.$set(e.row,"notice_type",a)},expression:"scope.row.notice_type"}},[a("el-option",{attrs:{value:"banner",label:"顶部轮播"}}),a("el-option",{attrs:{value:"popup",label:"每日弹窗"}})],1)]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-select",{attrs:{placeholder:"更改通告状态"},on:{change:function(a){return t.selectChange(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}},[a("el-option",{attrs:{value:0,label:"启用"}}),a("el-option",{attrs:{value:1,label:"禁用"}}),a("el-option",{attrs:{value:2,label:"删除"}})],1)]}}])})],1),a("Pagination",{attrs:{total:t.total,page:t.listQuery.currentPage,limit:t.listQuery.pageSize},on:{"update:page":function(e){return t.$set(t.listQuery,"currentPage",e)},"update:limit":function(e){return t.$set(t.listQuery,"pageSize",e)},pagination:t.fetchData}}),a("div",{staticStyle:{cleart:"both",padding:"20px 0"}}),a("el-form",[a("el-form-item",{attrs:{label:"展示类型"}},[a("el-radio-group",{model:{value:t.noticeType,callback:function(e){t.noticeType=e},expression:"noticeType"}},[a("el-radio",{attrs:{label:"banner"}},[t._v("顶部轮播（我的广告数据顶部滚动展示）")]),a("el-radio",{attrs:{label:"popup"}},[t._v("每日弹窗（每天首次打开弹窗提醒）")])],1)],1),a("Editor",{attrs:{placeholder:t.placeholder},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("添加通告")])],1)],1)],1)},i=[],o=a("b522"),l=a("333d"),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"editor-wrapper"},[a("div",{ref:"editorEle",staticClass:"editor-container"})])},s=[],c=(a("d3b7"),a("07ac"),a("25f0"),a("1a0b")),u=a.n(c),d={name:"Editor",props:{value:{type:String,default:""},placeholder:{type:String,default:""}},data:function(){return{editor:null}},watch:{value:function(t){this.editor.txt.html(t)}},mounted:function(){var t=this;this.editor=new u.a(this.$refs.editorEle),this.editor.customConfig.onchange=function(e){t.$emit("input",e)},this.editor.customConfig.uploadImgServer="你的上传图片的接口",this.editor.customConfig.uploadFileName="你自定义的文件名",this.editor.customConfig.menus=["head","bold","fontSize","fontName","italic","underline","strikeThrough","foreColor","backColor","link","list","justify","quote","emoticon","code","undo","redo","fullscreen"],this.editor.customConfig.colors=["#000000","#eeece0","#1c487f","#4d80bf","#c24f4a","#8baa4a","#7b5ba1","#46acc8","#f9963b","#ffffff"],this.editor.customConfig.uploadImgHooks={before:function(t,e,a){},success:function(t,e,a){this.imgUrl=Object.values(a.data).toString()},fail:function(t,e,a){},error:function(t,e){},timeout:function(t,e){},customInsert:function(t,e,a){var n=Object.values(e.data);JSON.stringify(n),t(n)}},this.editor.create(),this.editor.txt.html(this.placeholder)},beforeDestroy:function(){this.editor.destroy()}},p=d,f=(a("bcc2"),a("2877")),h=Object(f["a"])(p,r,s,!1,null,null,null),b=h.exports,g=a("5c96"),m={name:"Table",components:{Hints:o["a"],Editor:b,Pagination:l["a"]},data:function(){return{content:"",noticeType:"banner",placeholder:"",listQuery:{currentPage:1,pageSize:10},listLoading:!1,total:0,tableData:[]}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this;this.listLoading=!0,this.api.getNotice(this.listQuery).then((function(e){var a=e.total,n=e.list;t.tableData=n,t.total=a,t.listLoading=!1})).catch((function(){t.listLoading=!1}))},selectChange:function(t){var e=this,a=t.id,n=t.status;this.api.updateStatus({id:a,status:n}).then((function(t){return e.fetchData()}))},typeChange:function(t){var e=this,a=t.id,n=t.notice_type;this.api.updateNoticeType({id:a,notice_type:n}).then((function(){Object(g["Message"])({type:"success",message:"展示类型已更新"}),e.fetchData()}))},onSubmit:function(){var t=this;if(""===this.content)return Object(g["Message"])({type:"error",message:"请输入内容"});this.api.addNotice({content:this.content,notice_type:this.noticeType}).then((function(e){Object(g["Message"])({type:"success",message:"添加成功"}),t.fetchData(),t.content=""}))}}},y=m,v=(a("10d9"),Object(f["a"])(y,n,i,!1,null,null,null));e["default"]=v.exports},"8cae":function(t,e,a){},aa2b:function(t,e,a){},bcc2:function(t,e,a){"use strict";var n=a("aa2b"),i=a.n(n);i.a}}]);