chunk-3e411df3.031ee1e5.js 6.3 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e411df3"],{"129d":function(e,t,a){"use strict";a("a210")},"28f8":function(e,t,a){"use strict";function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return i}))},"2cb90":function(e,t,a){},"3ddc":function(e,t,a){"use strict";a.r(t);var i,s=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:"请输入标题"},on:{clear:e.getData},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.add}},[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:"单位名称"}}),a("el-table-column",{attrs:{prop:"desc",label:"主办单位简介",width:"1200px"}}),a("el-table-column",{attrs:{prop:"journal_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),a("el-dialog",{staticClass:"fu-dialog",attrs:{title:e.dialogTitle,"close-on-click-modal":!1,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form1",staticClass:"preview",attrs:{size:"small",inline:!1,"label-width":"80px",model:e.form1,rules:e.rules}},[a("el-form-item",{attrs:{label:"单位名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入单位名称",maxlength:"50","show-word-limit":""},model:{value:e.form1.name,callback:function(t){e.$set(e.form1,"name",t)},expression:"form1.name"}})],1),a("el-form-item",{attrs:{label:"单位简介",prop:"desc"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入单位简介"},model:{value:e.form1.desc,callback:function(t){e.$set(e.form1,"desc",t)},expression:"form1.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.form1.img?a("img",{staticClass:"avatar",attrs:{src:e.form1.img}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),a("span",{staticStyle:{"font-size":"12px",color:"#999999"}},[e._v("建议图片尺寸为:210*160")])],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1)],1)},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[a("span",[e._v("刊群导览>")]),e._v("主办单位")])}],l=a("28f8"),n=a("9973"),o=a("5d89"),c={components:{Page:n["a"],fuEditor:o["a"]},data:function(){return{form:{name:"",page:1,page_size:20},total:1,list:[{name:"2333"}],loading:!1,dialogTitle:"",dialogVisible:!1,rules:{name:[{required:!0,message:"请输入单位名称",trigger:"blur"}],desc:[{required:!0,message:"请输入单位简介",trigger:"blur"}],img:[{required:!0,message:"请上传单位封面",trigger:"blur"}]},form1:{}}},methods:(i={handleAvatarSuccess:function(e,t){this.$set(this.form1,"img",t.response.data)},search:function(){this.form;this.getData()},add: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.getOrganizerList(t).then((function(t){console.log(t),e.list=t.data.data.list,e.loading=!1}))}},Object(l["a"])(i,"search",(function(){this.getData()})),Object(l["a"])(i,"del",(function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.delOrganizer({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))})),Object(l["a"])(i,"edit",(function(e){this.dialogVisible=!0,this.form1=e})),Object(l["a"])(i,"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.updateOrganizer(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1})):e.$api.addOrganizer(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1}))}}))})),i),created:function(){this.getData()}},u=c,d=(a("9d42"),a("5d22")),f=Object(d["a"])(u,s,r,!1,null,"01b6eda1",null);t["default"]=f.exports},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}})},s=[],r={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=r,n=(a("129d"),a("5d22")),o=Object(n["a"])(l,i,s,!1,null,null,null);t["a"]=o.exports},"9d42":function(e,t,a){"use strict";a("2cb90")},a210:function(e,t,a){}}]);
  2. //# sourceMappingURL=chunk-3e411df3.031ee1e5.js.map