12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-21b77f0e"],{"129d":function(e,t,a){"use strict";a("a210")},"67ed":function(e,t,a){"use strict";a("b265")},9973:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-pagination",{attrs:{background:"","page-size":e.page_size?e.page_size:20,"current-page":e.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:e.total},on:{"current-change":e.getData,"size-change":e.handleSizeChange}})},n=[],s={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(e){this.page=e,this.$emit("pageChange")},handleSizeChange:function(e){this.$emit("pageChange",e)}},created:function(){}},l=s,r=(a("129d"),a("5d22")),o=Object(r["a"])(l,i,n,!1,null,null,null);t["a"]=o.exports},a210:function(e,t,a){},b265:function(e,t,a){},fa20:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[e._m(0),a("div",{staticClass:"content"},[a("div",{staticClass:"filter"},[a("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入标题"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")])],1),a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.addArticle}},[e._v("发布文章")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:e.list,height:"50vh",border:"","default-expand-all":"","row-key":"id"}},[a("el-table-column",{attrs:{prop:"name",label:"文章名称",width:"500px"}}),a("el-table-column",{attrs:{prop:"author",label:"作者"}}),a("el-table-column",{attrs:{prop:"journal_name",label:"来源"}}),a("el-table-column",{attrs:{prop:"publish_time",label:"出版时间"}}),a("el-table-column",{attrs:{prop:"ctime",label:"发布时间"}}),a("el-table-column",{attrs:{prop:"read_num",label:"阅读量"}}),a("el-table-column",{attrs:{prop:"zip",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"edit",attrs:{type:"text"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),a("el-button",{staticClass:"del",attrs:{type:"text"},on:{click:function(a){return e.del(t.row.id)}}},[e._v("删除")])]}}])})],1),a("Page",{ref:"pageButton",attrs:{current:e.form.page,page_size:e.form.page_size,total:e.total},on:{pageChange:e.gopage}})],1)])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[a("span",[e._v("信息管理>")]),e._v("文章管理")])}],s=a("9973"),l=a("5d89"),r={components:{Page:s["a"],fuEditor:l["a"]},data:function(){return{form:{name:"",page:1,page_size:20},total:1,list:[{name:"2333"}],loading:!1,rules:{name:[{required:!0,message:"请输入标题",trigger:"blur"}]}}},methods:{search:function(){this.form;this.getData()},openDiag:function(){this.form1={},this.dialogVisible=!0,this.dialogTitle="发送消息"},addArticle:function(){this.$router.push({path:"/article/article/add"})},gopage:function(e){e&&(this.form.page_size=e),this.form.page=this.$refs.pageButton.page,this.getData()},getData:function(){var e=this,t=this.form;this.loading=!0,this.$api.getArticleList(t).then((function(t){console.log(t),e.list=t.data.data.list,e.loading=!1}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.delArticle({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))},edit:function(e){this.$router.push({path:"/article/article/add",query:{id:e.id}})},save:function(){var e=this;this.$refs["form1"].validate((function(t){if(t){var a=e.form1,i=e.form1.id;a.receiver_id=JSON.stringify(a.receiver_id),i?e.$api.editMessage(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1})):e.$api.addMessage(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1}))}}))}},created:function(){this.getData()}},o=r,c=(a("67ed"),a("5d22")),u=Object(c["a"])(o,i,n,!1,null,null,null);t["default"]=u.exports}}]);
- //# sourceMappingURL=chunk-21b77f0e.07e5c380.js.map
|