chunk-2deca30c.b83fb6f1.js 4.7 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2deca30c"],{"65a0":function(e,t,a){},bb8d:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[e._m(0),a("div",{staticClass:"content"},[a("el-form",{ref:"form",staticClass:"over_y",attrs:{size:"small","label-width":"140px",model:e.form,rules:e.rules}},[a("el-form-item",{attrs:{label:"文章名称:",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入文章名称",clearable:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-row",[a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"文章来源:",prop:"journal_id"}},[a("el-select",{attrs:{placeholder:"请选择",filterable:""},model:{value:e.form.journal_id,callback:function(t){e.$set(e.form,"journal_id",t)},expression:"form.journal_id"}},e._l(e.journalList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1)],1),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"作者:",prop:"author"}},[a("el-input",{attrs:{placeholder:""},model:{value:e.form.author,callback:function(t){e.$set(e.form,"author",t)},expression:"form.author"}})],1)],1),a("el-col",{attrs:{span:12,offset:2}},[a("el-form-item",{attrs:{label:"出版时间:",prop:"publish_time"}},[a("el-date-picker",{attrs:{type:"date","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.form.publish_time,callback:function(t){e.$set(e.form,"publish_time",t)},expression:"form.publish_time"}})],1)],1)],1),a("el-form-item",{attrs:{label:"文章简介:"}},[a("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入文章简介"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1),a("el-form-item",{attrs:{label:"封面图:",prop:"img"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{action:"/api/admin/uploadfile","show-file-list":!1,"on-success":e.handleAvatarSuccess}},[e.form.img?a("img",{staticClass:"avatar",attrs:{src:e.form.img}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),a("span",{staticStyle:{"font-size":"12px",color:"#999999"}},[e._v("建议图片尺寸为:210*160")])],1),a("el-form-item",{attrs:{label:"文章详情:"}},[a("fuEditor",{attrs:{value:e.form.content}})],1),a("el-form-item",{staticStyle:{position:"fixed",bottom:"20px",right:"60px"}},[a("el-button",{attrs:{type:"primary"}},[e._v("预览")]),a("el-button",{attrs:{type:"success"}},[e._v("发布")]),a("el-button",{attrs:{type:"default"},on:{click:e.save}},[e._v("保存")])],1)],1)],1)])},s=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[a("span",[e._v("会议管理>")]),e._v("新增文章")])}],o=a("5d89"),i={components:{fuEditor:o["a"]},data:function(){return{form:{},journalList:[],imageUrl:"",rules:{name:[{required:!0,message:"请输入标题",trigger:"blur"}],journal_id:[{required:!0,message:"请选择来源",trigger:"change"}],author:[{required:!0,message:"请选择模板",trigger:"blur"}],publish_time:[{required:!0,message:"发布时间",trigger:"blur"}],img:[{required:!0,message:"封面图",trigger:"blur"}]}}},methods:{handleAvatarSuccess:function(e,t){this.form.img=t.response.data,console.log(this.form.img)},handleAvatarSuccess1:function(e,t,a){var r=this.form.speaker[e];r.img=a.response.data,this.$set(this.form.speaker,e,r)},beforeAvatarUpload:function(){},handleClick:function(){},addSpeaker:function(){this.form.speaker.push({name:"",intruduce:""})},gopage:function(e){e&&(this.form.page_size=e),this.form.page=this.$refs.pageButton.page,this.getData()},getData:function(){var e=this;this.loading=!0,this.$api.searchJournalList().then((function(t){e.journalList=t.data.data}));var t=this.$route.query.id;t&&this.$api.getArticle({id:t}).then((function(t){e.form=t.data.data}))},save:function(){var e=this,t=this.$route.query.id,a=this.form;this.$refs["form"].validate((function(r){r?t?(a.id=t,e.$api.updateArticle(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!")}))):e.$api.addArticle(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!")})):e.$message.error("有必填项没有填!")}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.deleteEnterprise({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))}},created:function(){this.getData()}},l=i,n=(a("d5f4"),a("5d22")),c=Object(n["a"])(l,r,s,!1,null,"214fa1a8",null);t["default"]=c.exports},d5f4:function(e,t,a){"use strict";a("65a0")}}]);
  2. //# sourceMappingURL=chunk-2deca30c.b83fb6f1.js.map