chunk-1d36933c.1e663f1f.js 12 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1d36933c"],{"129d":function(e,t,a){"use strict";a("a210")},"32ab":function(e,t,a){},"4bf4":function(e,t,a){"use strict";a("32ab")},9973:function(e,t,a){"use strict";var l=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}})},i=[],o={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(e){console.log(e),this.page=e,this.$emit("pageChange")},handleSizeChange:function(e){this.$emit("pageChange",e)}},created:function(){}},r=o,s=(a("129d"),a("5d22")),n=Object(s["a"])(r,l,i,!1,null,null,null);t["a"]=n.exports},a210:function(e,t,a){},d8de:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",[a("el-breadcrumb",{attrs:{separator:"/"}},[a("el-breadcrumb-item",[e._v("审读管理")]),a("el-breadcrumb-item",[e._v("编辑部账号")])],1),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",{staticClass:"input-with-select",attrs:{clearable:"",placeholder:"请输入标题"},on:{clear:e.getData},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(t)}},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}},[a("el-select",{staticStyle:{width:"120px"},attrs:{slot:"prepend",placeholder:"请选择"},slot:"prepend",model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"账号",value:"name"}}),a("el-option",{attrs:{label:"期刊名称",value:"journal"}}),a("el-option",{attrs:{label:"主管单位",value:"unit"}}),a("el-option",{attrs:{label:"主办单位",value:"college"}}),a("el-option",{attrs:{label:"负责人",value:"realname"}}),a("el-option",{attrs:{label:"负责人手机",value:"phone"}}),a("el-option",{attrs:{label:"负责人邮箱",value:"email"}})],1),a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.getData},slot:"append"})],1)],1),a("el-form-item",[a("el-select",{attrs:{placeholder:"主管单位",clearable:""},on:{change:e.getData},model:{value:e.form.unit,callback:function(t){e.$set(e.form,"unit",t)},expression:"form.unit"}},e._l(e.branchList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.name}})})),1)],1),a("el-form-item",[a("el-select",{attrs:{placeholder:"主办单位",clearable:""},on:{change:e.getData},model:{value:e.form.college,callback:function(t){e.$set(e.form,"college",t)},expression:"form.college"}},e._l(e.collegeList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.name}})})),1)],1),a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.open=!0}}},[e._v("批量导入")]),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:{width:"150",prop:"name",label:"账号"}}),a("el-table-column",{attrs:{width:"150",prop:"journal",label:"期刊名称"}}),a("el-table-column",{attrs:{prop:"unit",label:"主管单位"}}),a("el-table-column",{attrs:{width:"200",prop:"college",label:"主办单位"}}),a("el-table-column",{attrs:{width:"200",prop:"realname",label:"负责人"}}),a("el-table-column",{attrs:{width:"120",prop:"phone",label:"负责人手机"}}),a("el-table-column",{attrs:{width:"160",prop:"email",label:"负责人邮箱"}}),a("el-table-column",{attrs:{width:"200",prop:"ctime",label:"添加时间"}}),a("el-table-column",{attrs:{prop:"zip",width:"150",fixed:"right",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(a){return e.edit(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{size:"mini",type:"danger"},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-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"账号",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入账号","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:"journal"}},[a("el-select",{model:{value:e.form1.journal,callback:function(t){e.$set(e.form1,"journal",t)},expression:"form1.journal"}},e._l(e.journalList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.name}})})),1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"密码",prop:"password","label-width":"120px"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入密码","show-word-limit":""},model:{value:e.form1.password,callback:function(t){e.$set(e.form1,"password",t)},expression:"form1.password"}})],1),a("el-form-item",{attrs:{label:"主管单位","label-width":"120px"}},[a("el-select",{attrs:{filterable:"true"},model:{value:e.form1.unit,callback:function(t){e.$set(e.form1,"unit",t)},expression:"form1.unit"}},e._l(e.branchList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.name}})})),1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"主办单位"}},[a("el-select",{model:{value:e.form1.college,callback:function(t){e.$set(e.form1,"college",t)},expression:"form1.college"}},e._l(e.collegeList,(function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.name}})})),1)],1),a("el-form-item",{attrs:{label:"负责人",prop:"realname"}},[a("el-input",{attrs:{placeholder:"请输入负责人","show-word-limit":""},model:{value:e.form1.realname,callback:function(t){e.$set(e.form1,"realname",t)},expression:"form1.realname"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"负责人手机号","label-width":"120px",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入负责人","show-word-limit":""},model:{value:e.form1.phone,callback:function(t){e.$set(e.form1,"phone",t)},expression:"form1.phone"}})],1),a("el-form-item",{attrs:{label:"负责人邮箱","label-width":"120px"}},[a("el-input",{attrs:{placeholder:"请输入负责人","show-word-limit":""},model:{value:e.form1.email,callback:function(t){e.$set(e.form1,"email",t)},expression:"form1.email"}})],1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"primary",plain:""},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"批量导入",width:"500px","close-on-click-modal":!1,visible:e.open},on:{"update:visible":function(t){e.open=t}}},[a("el-upload",{staticClass:"upload-demo",staticStyle:{"text-align":"center"},attrs:{drag:"","on-success":e.uploadSuccess,action:"/api/admin/examine/journalusers/batchupload"}},[a("i",{staticClass:"el-icon-upload"}),a("div",{staticClass:"el-upload__text"},[e._v("将文件拖到此处,或"),a("em",[e._v("点击上传")])])]),a("div",{staticClass:"el-upload__tip",staticStyle:{"text-align":"left","padding-left":"45px"}},[a("a",{attrs:{href:"http://four.scxjc.club/journalusers_template.xlsx"}},[e._v("点击下载模板")])]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"primary",plain:""},on:{click:function(t){e.open=!1}}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){e.open=!1}}},[e._v("确 定")])],1)],1)],1)},i=[],o=(a("a450"),a("9973")),r=a("5d89"),s={components:{Page:o["a"],fuEditor:r["a"]},data:function(){return{collegeList:[],branchList:[],subjectList:[],journalList:[],type:"realname",activeStatus:"1",form:{name:"",type:"",page:1,page_size:20},form1:{},total:1,list:[],loading:!1,dialogVisible:!1,dialogVisible1:!1,dialogTitle:"",dialogTitle1:"",open:!1,file:[],rules:{name:[{required:!0,message:"请输入账号",trigger:"blur"}],realname:[{required:!0,message:"请输入负责人",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],journal:[{required:!0,message:"请选择期刊",trigger:"change"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"}]}}},methods:{handleClick:function(e,t){console.log(e,t)},uploadSuccess:function(e){console.log(e),this.$alert("导入成功"+e.data.success.length+"条数据,导入失败"+e.data.failed.length+"条数据","导入提示")},upload:function(e){var t=this,a=document.getElementById(e).files,l=new FormData;l.append("file",a[0]),this.$api.uploadFile(l).then((function(a){0==a.data.code?(t.$set(t.form1,e,a.data.data.url),t.$set(t.form1,"filename",a.data.data.name),t.$message({message:"上传成功!",type:"success"})):t.$message.error(a.data.message)}))},search:function(){this.form;this.getData()},add:function(){this.form1={},this.fileList=[],this.dialogVisible=!0,this.dialogTitle="新增期刊账号"},gopage:function(e){e&&(this.form.page_size=e),this.form.page=this.$refs.pageButton.page,this.getData()},getData:function(){var e=this;this.$api.getJournalList({}).then((function(t){e.journalList=t.data.data})),this.$api.getSubjectList({}).then((function(t){e.subjectList=t.data.data})),this.$api.getBranchList({}).then((function(t){e.branchList=t.data.data})),this.$api.getCollegeList({}).then((function(t){e.collegeList=t.data.data}));var t=this.form;this.loading=!0,this.$api.getJournalUsersList(t).then((function(t){e.list=t.data.data.list,e.total=t.data.data.total,e.loading=!1}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.delJournalUsers({id:e}).then((function(e){t.$message({message:"删除成功",type:"success"}),t.getData()}))}))},edit:function(e){var t=this;this.$api.getJournalList({}).then((function(e){t.journalList=e.data.data})),this.$api.getJournalUsersInfo({id:e.id,type:"edit"}).then((function(e){t.form1=e.data.data,t.fileList=e.data.data.fileurl,t.dialogTitle="编辑账号";var a=t.form1.receiver_id;"string"==typeof a&&(a=JSON.parse(a)),t.form1.receiver_id=a,t.dialogVisible=!0}))},save:function(){var e=this;this.$refs["form1"].validate((function(t){if(t){var a=e.form1,l=e.form1.id;a.fileurl=JSON.stringify(e.fileList),a.receiver_id=JSON.stringify(a.receiver_id),l?e.$api.editJournalUsers(a).then((function(t){0==t.data.code?e.$message({type:"success",message:"保存成功!"}):e.$message.error("保存失败!"),e.getData(),e.dialogVisible=!1})):e.$api.addJournalUsers(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()}},n=s,c=(a("4bf4"),a("5d22")),u=Object(c["a"])(n,l,i,!1,null,"44c329d6",null);t["default"]=u.exports}}]);
  2. //# sourceMappingURL=chunk-1d36933c.1e663f1f.js.map