12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0eef71e0"],{"0353":function(e,t,r){"use strict";var a=r("6bf8"),n=RegExp.prototype.exec,i=String.prototype.replace,o=n,l="lastIndex",s=function(){var e=/a/,t=/b*/g;return n.call(e,"a"),n.call(t,"a"),0!==e[l]||0!==t[l]}(),c=void 0!==/()??/.exec("")[1],u=s||c;u&&(o=function(e){var t,r,o,u,f=this;return c&&(r=new RegExp("^"+f.source+"$(?!\\s)",a.call(f))),s&&(t=f[l]),o=n.call(f,e),s&&o&&(f[l]=f.global?o.index+o[0].length:t),c&&o&&o.length>1&&i.call(o[0],r,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o}),e.exports=o},1256:function(e,t,r){},"129d":function(e,t,r){"use strict";r("a210")},1374:function(e,t,r){"use strict";var a=r("bb8b"),n=r("5edc");e.exports=function(e,t,r){t in e?a.f(e,t,n(0,r)):e[t]=r}},1663:function(e,t,r){var a=r("212e"),n=r("3ab0");e.exports=function(e){return function(t,r){var i,o,l=String(n(t)),s=a(r),c=l.length;return s<0||s>=c?e?"":void 0:(i=l.charCodeAt(s),i<55296||i>56319||s+1===c||(o=l.charCodeAt(s+1))<56320||o>57343?e?l.charAt(s):i:e?l.slice(s,s+2):o-56320+(i-55296<<10)+65536)}}},"18c2":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",[e._m(0),r("div",{staticClass:"content"},[r("div",{staticClass:"filter"},[r("el-form",{attrs:{size:"small","label-width":"70px",inline:!0,"label-position":"left"}},[r("el-form-item",{attrs:{label:""}},[r("el-input",{attrs:{clearable:"",placeholder:"请输入信息标题"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),r("el-form-item",{attrs:{label:""}},[r("el-select",{attrs:{placeholder:"请选择期刊",clearable:""},model:{value:e.form.journal_id,callback:function(t){e.$set(e.form,"journal_id",t)},expression:"form.journal_id"}},e._l(e.journalsList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")])],1),r("el-form-item",{staticStyle:{float:"right"}},[r("el-button",{attrs:{type:"primary"},on:{click:e.addPerson}},[e._v("新增管理员")])],1)],1)],1),r("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"}},[r("el-table-column",{attrs:{prop:"name",label:"账号"}}),r("el-table-column",{attrs:{prop:"realname",label:"姓名"}}),r("el-table-column",{attrs:{prop:"phone",label:"手机号"}}),r("el-table-column",{attrs:{prop:"journal_name",label:"所属期刊"}}),r("el-table-column",{attrs:{prop:"role_name",label:"创建角色"}}),r("el-table-column",{attrs:{prop:"",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.is_active?r("span",{staticClass:"account_active"},[e._v("激活")]):r("span",{staticClass:"account_nactive"},[e._v("禁用")])]}}])}),r("el-table-column",{attrs:{prop:"cname",label:"创建人"}}),r("el-table-column",{attrs:{prop:"ctime",label:"创建时间"}}),r("el-table-column",{attrs:{prop:"last_login_time",label:"最后一次登录"}}),r("el-table-column",{attrs:{prop:"zip",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{staticClass:"edit",attrs:{type:"text"},on:{click:function(r){return e.editPerson(t.row)}}},[e._v("编辑")]),r("el-button",{staticClass:"del",attrs:{type:"text"},on:{click:function(r){return e.del(t.row.id)}}},[e._v("删除")])]}}])})],1),r("Page",{ref:"pageButton",attrs:{current:e.form.page,page_size:e.form.page_size,total:e.total},on:{pageChange:e.gopage}})],1),r("el-dialog",{attrs:{title:e.dialogTitle,"close-on-click-modal":!1,visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("el-form",{ref:"form1",staticClass:"preview",attrs:{size:"small",inline:!1,"label-width":"80px",model:e.form1,rules:e.rules}},[r("el-form-item",{attrs:{label:"所属期刊",prop:"journal_id"}},[r("el-select",{attrs:{placeholder:"请选择期刊",filterable:""},model:{value:e.form1.journal_id,callback:function(t){e.$set(e.form1,"journal_id",t)},expression:"form1.journal_id"}},e._l(e.journalsList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"角色",prop:"role_id"}},[r("el-select",{attrs:{placeholder:"请选择角色"},model:{value:e.form1.role_id,callback:function(t){e.$set(e.form1,"role_id",t)},expression:"form1.role_id"}},e._l(e.rolesList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),r("el-form-item",{attrs:{label:"账号",prop:"name"}},[r("el-input",{attrs:{placeholder:"请输入账号"},model:{value:e.form1.name,callback:function(t){e.$set(e.form1,"name",t)},expression:"form1.name"}})],1),r("el-form-item",{attrs:{label:"姓名",prop:"realname"}},[r("el-input",{attrs:{placeholder:"请输入账号"},model:{value:e.form1.realname,callback:function(t){e.$set(e.form1,"realname",t)},expression:"form1.realname"}})],1),r("el-form-item",{attrs:{label:"密码",prop:"password"}},[r("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入密码",type:"password"},model:{value:e.form1.password,callback:function(t){e.$set(e.form1,"password",t)},expression:"form1.password"}})],1),r("el-form-item",{attrs:{label:"确认密码",prop:"rePassword"}},[r("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请再次输入密码",type:"password"},model:{value:e.form1.rePassword,callback:function(t){e.$set(e.form1,"rePassword",t)},expression:"form1.rePassword"}})],1),r("el-form-item",{attrs:{label:"手机号",prop:"phone"}},[r("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入手机号"},model:{value:e.form1.phone,callback:function(t){e.$set(e.form1,"phone",t)},expression:"form1.phone"}})],1),r("el-form-item",{attrs:{label:"账户状态",prop:"is_active"}},[r("el-radio-group",{model:{value:e.form1.is_active,callback:function(t){e.$set(e.form1,"is_active",t)},expression:"form1.is_active"}},[r("el-radio",{attrs:{label:1}},[e._v("启用")]),r("el-radio",{attrs:{label:0}},[e._v("禁用")])],1)],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1)],1)},n=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("p",[r("span",[e._v("系统管理>")]),e._v("账号管理")])}],i=(r("ac67"),r("1bc78"),r("32ea"),r("a450"),r("fc02"),r("28f8")),o=r("9973");function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){Object(i["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var c={components:{Page:o["a"]},data:function(){return{edit:0,form:{name:"",page:1,page_size:20},journalsList:[],rolesList:[],total:100,list:[],dialogTitle:"",form1:{is_active:1},loading:!1,input:"",dialogVisible:!1,defaultProps:{},rules:{journal_id:[{required:!0,message:"请选择期刊",trigger:"change"}],role_id:[{required:!0,message:"请选择角色",trigger:"change"}],name:[{required:!0,message:"请输入账号",trigger:"blur"}],realname:[{required:!0,message:"请输入姓名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],rePassword:[{required:!0,message:"请再次输入密码",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}]}}},methods:{addPerson:function(){this.dialogTitle="新增管理员",this.dialogVisible=!0,this.form1={is_active:1}},editPerson:function(e){this.dialogTitle="编辑管理员",this.dialogVisible=!0,this.form1=e,this.form1.rePassword=this.form1.password},gopage:function(e){e&&(this.form.page_size=e),this.form.page=this.$refs.pageButton.page,this.getData()},handleSelectionChange:function(e){this.multipleSelection=e},gopage1:function(e){e&&(this.form1.page_size=e),this.form1.page=this.$refs.pageButton1.page,this.getJl()},open:function(e){this.dialogFormVisible=!0,this.message=s({},e)},download:function(){for(var e=this.multipleSelection,t=[],r=0;r<e.length;r++)t.push(e[r].id);t=t.join(","),this.$api.downloadMon({ids:t}).then((function(e){var t=document.createElement("a"),r=new Blob([e.data],{type:"application/vnd.ms-excel"}),a=URL.createObjectURL(r);console.log(e.headers["content-disposition"]);var n=e.headers["content-disposition"].split("=")[1];t.download=n,t.style.display="none",t.href=a,document.body.appendChild(t),t.click(),document.body.removeChild(t)}))},detail:function(e){this.$router.push({path:"/company/detail",query:{id:e,page:this.form.page,page_size:this.form.page_size}})},getData:function(){var e=this,t=this.form;this.loading=!0,this.$api.getUserList(t).then((function(t){e.list=t.data.data.list,e.total=t.data.data.total,e.loading=!1}))},getJournals:function(){var e=this;this.$api.getUserJournals().then((function(t){e.journalsList=t.data.data}))},getRoles:function(){var e=this;this.$api.getUserRoles().then((function(t){e.rolesList=t.data.data}))},search:function(){this.form.page=1,this.getData()},save:function(){var e=this;this.$refs["form1"].validate((function(t){console.log(t),t&&(e.form1.id?e.$api.editUser(e.form1).then((function(t){0==t.data.code?(e.$message({message:"成功",type:"success"}),e.getData()):e.$message.error(t.data.message),e.dialogVisible=!1})):e.$api.addUser(e.form1).then((function(t){0==t.data.code?(e.$message({message:"成功!",type:"success"}),e.getData()):e.$message.error(t.data.message),e.dialogVisible=!1})))}))},del:function(e){var t=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){t.$api.delUser({id:e}).then((function(e){0==e.data.code?(t.$message({message:"删除成功",type:"success"}),t.getData()):t.$message.error(e.data.message)}))}))},permission:function(e){for(var t=this.info.permissions||[],r=[],a=0;a<t.length;a++)r.push(t[a].name);return!(r.indexOf(e)<0)}},created:function(){this.getJournals(),this.getRoles(),this.getData()}},u=c,f=(r("6b92"),r("5d22")),p=Object(f["a"])(u,a,n,!1,null,null,null);t["default"]=p.exports},"1bc78":function(e,t,r){for(var a=r("25ba"),n=r("93ca"),i=r("84e8"),o=r("0b34"),l=r("065d"),s=r("953d"),c=r("839a"),u=c("iterator"),f=c("toStringTag"),p=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=n(d),g=0;g<m.length;g++){var h,b=m[g],v=d[b],y=o[b],x=y&&y.prototype;if(x&&(x[u]||l(x,u,p),x[f]||l(x,f,b),s[b]=p,v))for(h in a)x[h]||i(x,h,a[h],!0)}},"21d9":function(e,t,r){var a=r("3a4c"),n=r("065e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,n)}},"285b":function(e,t,r){var a=r("35d4"),n=r("5edc"),i=r("3471"),o=r("5d10"),l=r("4fd4"),s=r("83d3"),c=Object.getOwnPropertyDescriptor;t.f=r("26df")?c:function(e,t){if(e=i(e),t=o(t,!0),s)try{return c(e,t)}catch(r){}if(l(e,t))return n(!a.f.call(e,t),e[t])}},"28f8":function(e,t,r){"use strict";function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return a}))},"32ea":function(e,t,r){var a=r("8078"),n=r("93ca");r("b2be")("keys",(function(){return function(e){return n(a(e))}}))},"43ec":function(e,t,r){"use strict";var a=r("1663")(!0);e.exports=function(e,t,r){return t+(r?a(e,t).length:1)}},"6b92":function(e,t,r){"use strict";r("1256")},"6bf8":function(e,t,r){"use strict";var a=r("a86f");e.exports=function(){var e=a(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"804d":function(e,t,r){var a=r("9cff"),n=r("cea2"),i=r("839a")("match");e.exports=function(e){var t;return a(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==n(e))}},9973:function(e,t,r){"use strict";var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("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}})},n=[],i={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(){}},o=i,l=(r("129d"),r("5d22")),s=Object(l["a"])(o,a,n,!1,null,null,null);t["a"]=s.exports},a210:function(e,t,r){},a450:function(e,t,r){var a=r("bb8b").f,n=Function.prototype,i=/^\s*function ([^ (]*)/,o="name";o in n||r("26df")&&a(n,o,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},ac67:function(e,t,r){var a=r("e99b"),n=r("e7c8"),i=r("3471"),o=r("285b"),l=r("1374");a(a.S,"Object",{getOwnPropertyDescriptors:function(e){var t,r,a=i(e),s=o.f,c=n(a),u={},f=0;while(c.length>f)r=s(a,t=c[f++]),void 0!==r&&l(u,t,r);return u}})},b2be:function(e,t,r){var a=r("e99b"),n=r("76e3"),i=r("0926");e.exports=function(e,t){var r=(n.Object||{})[e]||Object[e],o={};o[e]=t(r),a(a.S+a.F*i((function(){r(1)})),"Object",o)}},bf73:function(e,t,r){"use strict";var a=r("0353");r("e99b")({target:"RegExp",proto:!0,forced:a!==/./.exec},{exec:a})},c46f:function(e,t,r){"use strict";r("bf73");var a=r("84e8"),n=r("065d"),i=r("0926"),o=r("3ab0"),l=r("839a"),s=r("0353"),c=l("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2===r.length&&"a"===r[0]&&"b"===r[1]}();e.exports=function(e,t,r){var p=l(e),d=!i((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),m=d?!i((function(){var t=!1,r=/a/;return r.exec=function(){return t=!0,null},"split"===e&&(r.constructor={},r.constructor[c]=function(){return r}),r[p](""),!t})):void 0;if(!d||!m||"replace"===e&&!u||"split"===e&&!f){var g=/./[p],h=r(o,p,""[e],(function(e,t,r,a,n){return t.exec===s?d&&!n?{done:!0,value:g.call(t,r,a)}:{done:!0,value:e.call(r,t,a)}:{done:!1}})),b=h[0],v=h[1];a(String.prototype,e,b),n(RegExp.prototype,p,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}}},e7c8:function(e,t,r){var a=r("21d9"),n=r("0c29"),i=r("a86f"),o=r("0b34").Reflect;e.exports=o&&o.ownKeys||function(e){var t=a.f(i(e)),r=n.f;return r?t.concat(r(e)):t}},f417:function(e,t,r){"use strict";var a=r("d445"),n=RegExp.prototype.exec;e.exports=function(e,t){var r=e.exec;if("function"===typeof r){var i=r.call(e,t);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==a(e))throw new TypeError("RegExp#exec called on incompatible receiver");return n.call(e,t)}},fc02:function(e,t,r){"use strict";var a=r("804d"),n=r("a86f"),i=r("1b0b"),o=r("43ec"),l=r("201c"),s=r("f417"),c=r("0353"),u=r("0926"),f=Math.min,p=[].push,d="split",m="length",g="lastIndex",h=4294967295,b=!u((function(){RegExp(h,"y")}));r("c46f")("split",2,(function(e,t,r,u){var v;return v="c"=="abbc"[d](/(b)*/)[1]||4!="test"[d](/(?:)/,-1)[m]||2!="ab"[d](/(?:ab)*/)[m]||4!="."[d](/(.?)(.?)/)[m]||"."[d](/()()/)[m]>1||""[d](/.?/)[m]?function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!a(e))return r.call(n,e,t);var i,o,l,s=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,d=void 0===t?h:t>>>0,b=new RegExp(e.source,u+"g");while(i=c.call(b,n)){if(o=b[g],o>f&&(s.push(n.slice(f,i.index)),i[m]>1&&i.index<n[m]&&p.apply(s,i.slice(1)),l=i[0][m],f=o,s[m]>=d))break;b[g]===i.index&&b[g]++}return f===n[m]?!l&&b.test("")||s.push(""):s.push(n.slice(f)),s[m]>d?s.slice(0,d):s}:"0"[d](void 0,0)[m]?function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)}:r,[function(r,a){var n=e(this),i=void 0==r?void 0:r[t];return void 0!==i?i.call(r,n,a):v.call(String(n),r,a)},function(e,t){var a=u(v,e,this,t,v!==r);if(a.done)return a.value;var c=n(e),p=String(this),d=i(c,RegExp),m=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(b?"y":"g"),y=new d(b?c:"^(?:"+c.source+")",g),x=void 0===t?h:t>>>0;if(0===x)return[];if(0===p.length)return null===s(y,p)?[p]:[];var _=0,w=0,S=[];while(w<p.length){y.lastIndex=b?w:0;var j,L=s(y,b?p:p.slice(w));if(null===L||(j=f(l(y.lastIndex+(b?0:w)),p.length))===_)w=o(p,w,m);else{if(S.push(p.slice(_,w)),S.length===x)return S;for(var O=1;O<=L.length-1;O++)if(S.push(L[O]),S.length===x)return S;w=_=j}}return S.push(p.slice(_)),S}]}))}}]);
- //# sourceMappingURL=chunk-0eef71e0.534c1a78.js.map
|