(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12e238a6"],{"21bb":function(e,t,l){"use strict";l("68aa")},"68aa":function(e,t,l){},"7dd6":function(e,t,l){"use strict";function a(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}l.d(t,"a",(function(){return a}))},bb51:function(e,t,l){"use strict";l.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-container",[a("el-header",[a("div",{staticClass:"header"},[a("img",{staticClass:"logo",attrs:{src:l("cf05"),alt:""}}),a("div",{staticClass:"siteTitle"},[e._v("中国科学院四封审读工作平台")])]),a("div",{staticClass:"nav"},[a("a",[e._v("审读管理")]),a("div",{staticClass:"setting",staticStyle:{cursor:"pointer"}},[a("i",{staticClass:"el-icon-message-solid"}),a("el-dropdown",[a("span",{staticClass:"el-dropdown-link"},[e._v("\n "+e._s(e.info.realname)),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{nativeOn:{click:function(t){e.dialogVisible=!0}}},[e._v("修改密码")]),1==e.role||2==e.role||3==e.role?a("el-dropdown-item",{nativeOn:{click:function(t){return e.getUserInfo(e.info)}}},[e._v("修改个人信息")]):e._e()],1)],1),a("span",{staticClass:"logout",on:{click:e.logout}},[e._v("退出登陆")])],1)])]),a("el-container",{staticClass:"main"},[a("el-aside",{staticClass:"left-aside",attrs:{width:"210px"}},[a("el-menu",{staticClass:"left-menue",attrs:{"background-color":"#ffffff","text-color":"#666666","unique-opened":!1,"default-active":"/"+e.$route.path.split("/")[1],router:"","active-text-color":"#3895FE"}},[e._l(e.$router.options.routes,(function(t,l){return[t.show&&t.isLeaf&&t.role==e.info.role?a("el-menu-item",{key:l,attrs:{index:t.path}},[a("i",{class:t.icon}),a("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.name))])]):e._e()]}))],2)],1),a("el-container",[a("el-main",[a("transition",{attrs:{name:"fade",mode:"out-in"}},[a("router-view")],1)],1)],1)],1),a("el-dialog",{staticClass:"fu-dialog",attrs:{title:"修改密码","close-on-click-modal":!1,visible:e.dialogVisible,width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form",attrs:{size:"small",inline:!1,"label-width":"80px",model:e.form,rules:e.rules,center:""}},[a("el-form-item",{attrs:{label:"新密码",prop:"password"}},[a("el-input",{attrs:{placeholder:"请输入密码"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1),a("el-form-item",{attrs:{label:"确认密码",prop:"repassword"}},[a("el-input",{attrs:{placeholder:"请再次输入密码"},model:{value:e.form.repassword,callback:function(t){e.$set(e.form,"repassword",t)},expression:"form.repassword"}})],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.changePwd}},[e._v("确 定")])],1)],1),1==e.role?a("el-dialog",{staticClass:"fu-dialog",attrs:{title:"修改账号信息","close-on-click-modal":!1,visible:e.dialogVisible1,width:"800px"},on:{"update:visible":function(t){e.dialogVisible1=t}}},[a("el-form",{ref:"form1",staticClass:"preview",attrs:{inline:!0,"label-width":"120px",model:e.form1,rules:e.rules}},[a("el-form-item",{attrs:{label:"账号",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入账号","show-word-limit":"",disabled:""},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",{attrs:{disabled:""},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),a("el-form-item",{attrs:{label:"主管单位"}},[a("el-select",{attrs:{filterable:""},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),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),a("el-form-item",{attrs:{label:"负责人手机号","label-width":"120px"}},[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),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small",type:"primary",plain:""},on:{click:function(t){e.dialogVisible1=!1}}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.changeUserInfo}},[e._v("确 定")])],1)],1):a("el-dialog",{staticClass:"fu-dialog",attrs:{title:"修改账号信息","close-on-click-modal":!1,visible:e.dialogVisible1},on:{"update:visible":function(t){e.dialogVisible1=t}}},[a("el-form",{ref:"form1",staticClass:"preview",attrs:{size:"small",inline:!0,"label-width":"80px",model:e.form1,rules:e.rules}},[a("el-form-item",{attrs:{label:"账号",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入账号",disabled:""},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:"realname"}},[a("el-input",{attrs:{placeholder:"请输入姓名"},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),a("el-form-item",{attrs:{label:"职称",prop:"title"}},[a("el-input",{attrs:{placeholder:"请输入职称"},model:{value:e.form1.title,callback:function(t){e.$set(e.form1,"title",t)},expression:"form1.title"}})],1),a("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[a("el-input",{attrs:{placeholder:"请输入手机号"},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:"请输入邮箱"},model:{value:e.form1.email,callback:function(t){e.$set(e.form1,"email",t)},expression:"form1.email"}})],1),a("el-form-item",{attrs:{label:"单位",prop:"college"}},[a("el-select",{attrs:{filterable:""},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:"journal"}},[a("el-select",{attrs:{filterable:""},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),a("el-form-item",{attrs:{label:"职务"}},[a("el-input",{attrs:{placeholder:"请输入职务"},model:{value:e.form1.job,callback:function(t){e.$set(e.form1,"job",t)},expression:"form1.job"}})],1),a("el-form-item",{attrs:{label:"地址"}},[a("el-input",{staticStyle:{width:"514px"},attrs:{placeholder:"请输入地址"},model:{value:e.form1.address,callback:function(t){e.$set(e.form1,"address",t)},expression:"form1.address"}})],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.dialogVisible1=!1}}},[e._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.changeUserInfo}},[e._v("确 定")])],1)],1)],1)},o=[],r=l("7dd6"),i={name:"home",data:function(){var e;return e={role:"0",collegeList:[],branchList:[],journalList:[],info:{}},Object(r["a"])(e,"role",1),Object(r["a"])(e,"dialogVisible",!1),Object(r["a"])(e,"dialogVisible1",!1),Object(r["a"])(e,"dialogVisible2",!1),Object(r["a"])(e,"form",{}),Object(r["a"])(e,"form1",{}),Object(r["a"])(e,"form2",{}),Object(r["a"])(e,"rules",{password:[{required:!0,message:"请输入密码",trigger:"blur"}],repassword:[{required:!0,message:"请再次输入密码",trigger:"blur"}],name:[{required:!0,message:"请输入账号",trigger:"blur"}],journal:[{required:!0,message:"请选择期刊",trigger:"change"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],email:[{required:!0,message:"请输入邮箱",trigger:"blur"}]}),e},methods:{changePwd:function(){var e=this,t=this.form;t.password!=t.repassword&&this.$message.error("两次输入的密码不一致!"),this.$refs["form"].validate((function(l){l&&e.$api.changePassword(t).then((function(t){0==t.data.code?(e.$message.success("修改密码成功"),e.dialogVisible=!1):e.$message.error(t.data.message)}))}))},getUserInfo:function(e){var t=this;1==e.role?this.$api.getJournalUsersInfo({id:e.id}).then((function(e){t.form1=e.data.data,t.dialogVisible1=!0})):this.$api.getExpertInfo({id:e.id}).then((function(e){t.form1=e.data.data,t.dialogVisible1=!0}))},changeUserInfo:function(){var e=this,t=this.form1;this.$refs["form1"].validate((function(l){l&&(1==e.role?e.$api.editJournalUsers(t).then((function(t){0==t.data.code?(e.$message.success("修改成功"),e.dialogVisible1=!1):e.$message.error(t.data.message)})):e.$api.editExpert(t).then((function(t){0==t.data.code?(e.$message.success("修改成功"),e.dialogVisible1=!1):e.$message.error(t.data.message)})))}))},getDate:function(){this.now=(new Date).toLocaleDateString()+" "+(new Date).toLocaleTimeString()},logout:function(){var e=this;this.$api.logout().then((function(t){localStorage.clear(),e.$router.push({path:"/"})}))},getData:function(){var e=this;this.$api.getJournalList({}).then((function(t){e.journalList=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})),this.$api.getAccountInfo().then((function(t){t.code||(e.info=t.data.data,localStorage.setItem("uid",t.data.data.id),e.role=t.data.data.role)}))}},created:function(){this.getData()}},s=i,n=(l("21bb"),l("5d22")),c=Object(n["a"])(s,a,o,!1,null,null,null);t["default"]=c.exports},cf05:function(e,t,l){e.exports=l.p+"img/logo.56ae0f9e.png"}}]); //# sourceMappingURL=chunk-12e238a6.b30484cd.js.map