12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5156610d"],{"129d":function(e,t,a){"use strict";a("a210")},3747:function(e,t,a){"use strict";a("66dd")},"66dd":function(e,t,a){},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}})},o=[],i={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(){}},s=i,n=(a("129d"),a("5d22")),r=Object(n["a"])(s,l,o,!1,null,null,null);t["a"]=r.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",[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",{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",{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:"realname"}}),a("el-option",{attrs:{label:"账号",value:"name"}}),a("el-option",{attrs:{label:"电话",value:"phone"}})],1)],1)],1),a("el-form-item",[a("el-select",{attrs:{placeholder:"专业领域"},model:{value:e.form.sex,callback:function(t){e.$set(e.form,"sex",t)},expression:"form.sex"}},e._l(e.subjectList,(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:"所属单位"},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:"所属院所"},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",[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: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:{prop:"name",label:"账号"}}),a("el-table-column",{attrs:{prop:"journal",label:"期刊名称"}}),a("el-table-column",{attrs:{prop:"unit",label:"主管单位"}}),a("el-table-column",{attrs:{prop:"college",label:"主办单位"}}),a("el-table-column",{attrs:{prop:"realname",label:"负责人"}}),a("el-table-column",{attrs:{prop:"phone",label:"负责人手机"}}),a("el-table-column",{attrs:{prop:"email",label:"负责人邮箱"}}),a("el-table-column",{attrs:{prop:"ctime",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-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"姓名",prop:"realname"}},[a("el-input",{attrs:{placeholder:"请输入姓名",maxlength:"50","show-word-limit":""},model:{value:e.form1.realname,callback:function(t){e.$set(e.form1,"realname",t)},expression:"form1.realname"}})],1),a("el-form-item",{attrs:{label:"性别",prop:"sex"}},[a("el-select",{model:{value:e.form1.sex,callback:function(t){e.$set(e.form1,"sex",t)},expression:"form1.sex"}},[a("el-option",{attrs:{label:"男",value:"男"}}),a("el-option",{attrs:{label:"女",value:"女"}})],1)],1)],1),a("el-col",{attrs:{span:12}},[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:"password"}},[a("el-input",{attrs:{type:"password",placeholder:"请输入密码",maxlength:"50","show-word-limit":""},model:{value:e.form1.password,callback:function(t){e.$set(e.form1,"password",t)},expression:"form1.password"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入手机号",maxlength:"50","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:"邮箱",prop:"email"}},[a("el-input",{attrs:{placeholder:"请输入标题",maxlength:"50","show-word-limit":""},model:{value:e.form1.email,callback:function(t){e.$set(e.form1,"email",t)},expression:"form1.email"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"专业领域",prop:"subject"}},[a("el-select",{model:{value:e.form1.subject,callback:function(t){e.$set(e.form1,"subject",t)},expression:"form1.subject"}},e._l(e.subjectList,(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:"unit"}},[a("el-select",{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:"所属院所",prop:"college"}},[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)],1),a("el-col",{attrs:{span:12}},[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)],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.imageChange,action:"/api/admin/uploadfile"}},[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:""}},[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:e.save}},[e._v("确 定")])],1)],1)],1)},o=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p",[a("span",[e._v("专家账号>")]),e._v("编辑部账号")])}],i=(a("a450"),a("9973")),s=a("5d89"),n={components:{Page:i["a"],fuEditor:s["a"]},data:function(){return{collegeList:[],branchList:[],subjectList:[],journalList:[],type:"realname",activeStatus:"1",form:{name:"",type:"realname",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"}],receiver_id:[{required:!0,message:"请选择接收人",trigger:"change"}],content:[{required:!0,message:"请输入消息内容",trigger:"change"}]}}},methods:{handleClick:function(e,t){console.log(e,t)},imageChange:function(e){console.log(e),this.file.push(e.data)},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()}},r=n,c=(a("3747"),a("5d22")),u=Object(c["a"])(r,l,o,!1,null,"3c8f151e",null);t["default"]=u.exports}}]);
- //# sourceMappingURL=chunk-5156610d.0369f649.js.map
|