{"size": 11414, "ext": "js", "max_stars_repo_path": "public/js/admin/chunk2.0e17ec5bde7b31dc0b55.js", "max_stars_repo_name": "luffyzhao/luffy-api-document", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/admin/chunk2.0e17ec5bde7b31dc0b55.js", "max_issues_repo_name": "luffyzhao/luffy-api-document", "max_issues_repo_issues_event_min_datetime": "2018-04-24T10:30:44.000Z", "max_issues_repo_issues_event_max_datetime": "2018-05-02T08:52:46.000Z", "max_forks_repo_path": "public/js/admin/chunk2.0e17ec5bde7b31dc0b55.js", "max_forks_repo_name": "luffyzhao/luffy-api-document", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 11414.0, "max_line_length": 11414, "alphanum_fraction": 0.7032591554}
webpackJsonp([2],{258:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o(259),s=o.n(a),r=o(262),l=o.n(r),i=o(265),n=o.n(i);t.default={data(){this.$createElement;return{Columns:[{title:"用户名",key:"username"},{title:"邮箱",key:"email"},{title:"手机号码",key:"phone"},{title:"操作",render:(e,{row:t,column:o,index:a})=>e("button-group",null,[e("i-button",{on:{click:()=>{this.updateButton(t)}},attrs:{size:"small"}},["更新"]),e("i-button",{on:{click:()=>{this.allotButton(t)}},attrs:{size:"small"}},["分配"])])}],Datas:[],page:{total:0,current:1,page_size:20},createModalShow:!1,updateModalShow:!1,allotModalShow:!1,allotId:0,updateId:0}},mounted(){this.search(1)},methods:{search(e){this.$get("user",{page:e}).then(e=>{this.Datas=e.data.data,this.page.total=e.data.total,this.page.current=e.data.current_page,this.page.page_size=e.data.per_page})},updateButton(e){this.updateId=e.id,this.updateModalShow=!0},allotButton(e){this.allotId=e.id,this.allotModalShow=!0},visibleChangeCreate(e){this.createModalShow=e,!1===e&&this.search(1)},visibleChangeAllot(e){this.allotModalShow=e},visibleChangeUpdate(e){this.updateModalShow=e,!1===e&&this.search(this.page.current)}},components:{Create:s.a,Update:l.a,Allot:n.a}}},259:function(e,t,o){var a=o(10)(o(260),o(261),!1,null,null,null);e.exports=a.exports},260:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{show:{type:Boolean,default:!1}},computed:{modalShow:{get:function(){return this.show},set:function(){}}},data:function(){return{loadingVisible:!1,formItem:{}}},methods:{visibleChange:function(e){!1===e?this.$emit("visibleChange",e):this.formItem={}},submit:function(e){var t=this;this.loadingVisible=!0,this.$refs[e].validate(function(e){e&&t.$post("user",t.formItem).then(function(e){t.loadingVisible=!1,t.visibleChange(!1),t.$Message.error("用户添加成功!")})}).catch(function(e){t.loadingVisible=!1})}}}},261:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("Modal",{attrs:{title:"创建项目","mask-closable":!1,"class-name":"vertical-center-modal",width:"auto","ok-text":"提交"},on:{"on-visible-change":e.visibleChange,"on-ok":e.submit},model:{value:e.modalShow,callback:function(t){e.modalShow=t},expression:"modalShow"}},[o("Form",{ref:"formItem",attrs:{model:e.formItem,"label-width":100}},[o("FormItem",{attrs:{label:"用户姓名:",prop:"username",rules:{required:!0,message:"用户姓名不能为空！",trigger:"blur"}}},[o("Input",{staticStyle:{width:"300px"},model:{value:e.formItem.username,callback:function(t){e.$set(e.formItem,"username",t)},expression:"formItem.username"}})],1),e._v(" "),o("FormItem",{attrs:{label:"登录邮箱:",prop:"email",rules:{required:!0,type:"email",message:"请输出正确的邮箱号码！",trigger:"blur"}}},[o("Input",{staticStyle:{width:"300px"},model:{value:e.formItem.email,callback:function(t){e.$set(e.formItem,"email",t)},expression:"formItem.email"}})],1),e._v(" "),o("FormItem",{attrs:{label:"手机号码:",prop:"phone",rules:{pattern:/^1[34578][0-9]{9}$/,message:"手机号码格式不正确！",trigger:"blur"}}},[o("Input",{staticStyle:{width:"300px"},model:{value:e.formItem.phone,callback:function(t){e.$set(e.formItem,"phone",t)},expression:"formItem.phone"}})],1),e._v(" "),o("FormItem",{attrs:{label:"密码",prop:"password",rules:{required:!0,message:"密码不能为空！",trigger:"blur"}}},[o("Input",{attrs:{type:"password"},model:{value:e.formItem.password,callback:function(t){e.$set(e.formItem,"password",t)},expression:"formItem.password"}})],1),e._v(" "),o("FormItem",{attrs:{label:"确认密码",prop:"password_confirmation",rules:{required:!0,message:"确认密码不能为空！",trigger:"blur"}}},[o("Input",{attrs:{type:"password"},model:{value:e.formItem.password_confirmation,callback:function(t){e.$set(e.formItem,"password_confirmation",t)},expression:"formItem.password_confirmation"}})],1)],1),e._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("Button",{attrs:{type:"primary",size:"large",loading:e.loadingVisible},on:{click:function(t){e.submit("formItem")}}},[e._v("提交")])],1)],1)],1)},staticRenderFns:[]}},262:function(e,t,o){var a=o(10)(o(263),o(264),!1,null,null,null);e.exports=a.exports},263:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{show:{type:Boolean,default:!1},row:{type:Number,default:0}},computed:{modalShow:{get:function(){return this.show},set:function(){}},updateId:function(){return this.row}},data:function(){return{loadingVisible:!1,formItem:{},formSetPassword:{old_password:"",password:"",password_confirmation:""},setPassword:!1}},methods:{handlePassword:function(e){var t=this;this.$put("user/"+this.updateId+"/password",this.formSetPassword).then(function(e){t.$Message.success("密码修改成功!"),t.$refs.modalSetPassword.close()})},visibleChange:function(e){!1===e&&this.$emit("visibleChange",e)},submit:function(e){var t=this;this.loadingVisible=!0,this.$refs[e].validate(function(e){e&&t.$put("user/"+t.updateId,{username:t.formItem.username,phone:t.formItem.phone,email:t.formItem.email}).then(function(e){t.loadingVisible=!1,t.visibleChange(!1),t.$Message.error("用户更新成功!")}).catch(function(e){t.loadingVisible=!1})})}},watch:{modalShow:function(e,t){var o=this;e?this.$get("user/"+this.updateId).then(function(e){o.formItem=e.data}):this.formItem={}}}}},264:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("Modal",{attrs:{title:"修改文档","mask-closable":!1,"class-name":"vertical-center-modal",width:"auto","ok-text":"提交"},on:{"on-visible-change":e.visibleChange,"on-ok":e.submit},model:{value:e.modalShow,callback:function(t){e.modalShow=t},expression:"modalShow"}},[o("Form",{ref:"formItem",attrs:{model:e.formItem,"label-width":100}},[o("FormItem",{attrs:{label:"用户姓名:",prop:"username",rules:{required:!0,message:"用户姓名不能为空！",trigger:"blur"}}},[o("Input",{staticStyle:{width:"300px"},model:{value:e.formItem.username,callback:function(t){e.$set(e.formItem,"username",t)},expression:"formItem.username"}})],1),e._v(" "),o("FormItem",{attrs:{label:"登录邮箱:",prop:"email",rules:{required:!0,type:"email",message:"请输出正确的邮箱号码！",trigger:"blur"}}},[o("Input",{staticStyle:{width:"300px"},model:{value:e.formItem.email,callback:function(t){e.$set(e.formItem,"email",t)},expression:"formItem.email"}})],1),e._v(" "),o("FormItem",{attrs:{label:"手机号码:",prop:"phone",rules:{pattern:/^1[34578][0-9]{9}$/,message:"手机号码格式不正确！",trigger:"blur"}}},[o("Input",{staticStyle:{width:"300px"},model:{value:e.formItem.phone,callback:function(t){e.$set(e.formItem,"phone",t)},expression:"formItem.phone"}})],1),e._v(" "),o("FormItem",{attrs:{label:"登录密码:"}},[o("Button",{attrs:{type:"text"},on:{click:function(t){e.setPassword=!0}}},[e._v("修改密码")])],1)],1),e._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("Button",{attrs:{type:"primary",size:"large",loading:e.loadingVisible},on:{click:function(t){e.submit("formItem")}}},[e._v("提交")])],1)],1),e._v(" "),o("Modal",{ref:"modalSetPassword",attrs:{title:"修改密码","ok-text":"提交","cancel-text":"取消",loading:!0},on:{"on-ok":e.handlePassword},model:{value:e.setPassword,callback:function(t){e.setPassword=t},expression:"setPassword"}},[o("Form",{ref:"formSetPassword",attrs:{model:e.formSetPassword,"label-width":100}},[o("FormItem",{attrs:{label:"原密码",prop:"old_password",rules:{required:!0,message:"原密码不能为空！",trigger:"blur"}}},[o("Input",{attrs:{type:"password"},model:{value:e.formSetPassword.old_password,callback:function(t){e.$set(e.formSetPassword,"old_password",t)},expression:"formSetPassword.old_password"}})],1),e._v(" "),o("FormItem",{attrs:{label:"新密码",prop:"password",rules:{required:!0,message:"密码不能为空！",trigger:"blur"}}},[o("Input",{attrs:{type:"password"},model:{value:e.formSetPassword.password,callback:function(t){e.$set(e.formSetPassword,"password",t)},expression:"formSetPassword.password"}})],1),e._v(" "),o("FormItem",{attrs:{label:"确认密码",prop:"password_confirmation",rules:{required:!0,message:"确认密码不能为空！",trigger:"blur"}}},[o("Input",{attrs:{type:"password"},model:{value:e.formSetPassword.password_confirmation,callback:function(t){e.$set(e.formSetPassword,"password_confirmation",t)},expression:"formSetPassword.password_confirmation"}})],1)],1)],1)],1)},staticRenderFns:[]}},265:function(e,t,o){var a=o(10)(o(266),o(267),!1,null,null,null);e.exports=a.exports},266:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{show:{type:Boolean,default:!1},row:{type:Number,default:0}},computed:{modalShow:{get:function(){return this.show},set:function(){}},allotId:function(){return this.row}},data:function(){return{loadingVisible:!1,formItem:{permission:[],data:[]}}},methods:{visibleChange:function(e){!1===e&&this.$emit("visibleChange",e)},allCheck:function(){this.formItem.data.length===this.formItem.permission.length?this.formItem.data=[]:this.formItem.data=this.formItem.permission.map(function(e){return e.id})},submit:function(e){var t=this;this.loadingVisible=!0,this.$post("user/"+this.allotId+"/role",{relation:this.formItem.data}).then(function(e){t.loadingVisible=!1,t.visibleChange(!1)})}},watch:{modalShow:function(e,t){var o=this;e&&(this.$get("role/all").then(function(e){o.formItem.permission=e.data}),this.$get("user/"+this.allotId+"/allot").then(function(e){o.formItem.data=e.data.map(function(e){return e.id})}))}}}},267:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("Modal",{attrs:{title:"修改文档","mask-closable":!1,"class-name":"vertical-center-modal",width:"500","ok-text":"提交"},on:{"on-visible-change":e.visibleChange,"on-ok":e.submit},model:{value:e.modalShow,callback:function(t){e.modalShow=t},expression:"modalShow"}},[o("Form",{ref:"formItem",attrs:{model:e.formItem,"label-width":1}},[o("FormItem",[o("CheckboxGroup",{model:{value:e.formItem.data,callback:function(t){e.$set(e.formItem,"data",t)},expression:"formItem.data"}},e._l(e.formItem.permission,function(t){return o("Checkbox",{key:t.id,attrs:{label:t.id}},[e._v(e._s(t.display_name))])}))],1)],1),e._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("Button",{attrs:{size:"large"},on:{click:e.allCheck}},[e._v("全选")]),e._v(" "),o("Button",{attrs:{type:"primary",size:"large",loading:e.loadingVisible},on:{click:function(t){e.submit("formItem")}}},[e._v("提交")])],1)],1)],1)},staticRenderFns:[]}},268:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"box-flex"},[o("div",{staticClass:"box-flex-list"},[o("Card",{attrs:{bordered:!1}},[o("p",{attrs:{slot:"title"},slot:"title"},[o("span",[e._v("列表")]),e._v(" "),o("Button",{attrs:{size:"small",type:"success"},on:{click:function(t){e.createModalShow=!0}}},[e._v("添加")])],1),e._v(" "),o("Table",{ref:"table",attrs:{columns:e.Columns,data:e.Datas,size:"small"}}),e._v(" "),o("Page",{attrs:{total:e.page.total,size:"small",current:e.page.current,"page-size":e.page.page_size,"show-total":""},on:{"update:current":function(t){e.$set(e.page,"current",t)}}})],1)],1),e._v(" "),o("Create",{attrs:{show:e.createModalShow},on:{visibleChange:e.visibleChangeCreate}}),e._v(" "),o("Update",{attrs:{show:e.updateModalShow,row:e.updateId},on:{visibleChange:e.visibleChangeUpdate}}),e._v(" "),o("Allot",{attrs:{show:e.allotModalShow,row:e.allotId},on:{visibleChange:e.visibleChangeAllot}})],1)},staticRenderFns:[]}},280:function(e,t,o){var a=o(10)(o(258),o(268),!1,null,null,null);e.exports=a.exports}});