erp/public/dist/js/chunk-f35dfe36.683d24b3.js

2 lines
10 KiB
JavaScript
Vendored

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f35dfe36"],{2909:function(t,e,a){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}function i(t){if(Array.isArray(t))return n(t)}a.d(e,"a",(function(){return s}));a("a4d3"),a("e01a"),a("d3b7"),a("d28b"),a("3ca3"),a("ddb0"),a("a630");function r(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}a("fb6a"),a("b0c0");function o(t,e){if(t){if("string"===typeof t)return n(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(t,e):void 0}}function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t){return i(t)||r(t)||o(t)||l()}},"4df4":function(t,e,a){"use strict";var n=a("0366"),i=a("7b0b"),r=a("9bdd"),o=a("e95a"),l=a("50c4"),s=a("8418"),c=a("35a1");t.exports=function(t){var e,a,d,u,f,m,p=i(t),b="function"==typeof this?this:Array,v=arguments.length,h=v>1?arguments[1]:void 0,g=void 0!==h,_=c(p),y=0;if(g&&(h=n(h,v>2?arguments[2]:void 0,2)),void 0==_||b==Array&&o(_))for(e=l(p.length),a=new b(e);e>y;y++)m=g?h(p[y],y):p[y],s(a,y,m);else for(u=_.call(p),f=u.next,a=new b;!(d=f.call(u)).done;y++)m=g?r(u,h,[d.value,y],!0):d.value,s(a,y,m);return a.length=y,a}},6355:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"conent"},[a("div",{staticClass:"from"},[a("el-dialog",{attrs:{title:"新增用户",visible:t.dialogVisible,width:"30%","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",[a("el-form",{attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"姓名"}},[a("el-input",{model:{value:t.from.name,callback:function(e){t.$set(t.from,"name",e)},expression:"from.name"}})],1),a("el-form-item",{attrs:{label:"密码"}},[a("el-input",{model:{value:t.from.password,callback:function(e){t.$set(t.from,"password",e)},expression:"from.password"}})],1),a("el-form-item",{attrs:{label:"确认密码"}},[a("el-input",{model:{value:t.from.password_confirmation,callback:function(e){t.$set(t.from,"password_confirmation",e)},expression:"from.password_confirmation"}})],1),a("el-form-item",{attrs:{label:"角色"}},[[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.roleOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.name}})})),1)]],2),a("div",{staticClass:"from-btn"},[a("el-button",{attrs:{type:"danger"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),a("el-button",{on:{click:t.onSubmit}},[t._v("确认")])],1)],1)],1)])],1),a("div",{staticClass:"edit_from"},[a("el-dialog",{attrs:{title:"编辑",visible:t.editVisible,width:"30%","close-on-click-modal":!1},on:{"update:visible":function(e){t.editVisible=e}}},[a("div",[a("el-form",{attrs:{"label-width":"80px"}},[a("el-form-item",{attrs:{label:"ID"}},[a("el-input",{model:{value:t.edit_from.id,callback:function(e){t.$set(t.edit_from,"id",e)},expression:"edit_from.id"}})],1),a("el-form-item",{attrs:{label:"姓名"}},[a("el-input",{model:{value:t.edit_from.name,callback:function(e){t.$set(t.edit_from,"name",e)},expression:"edit_from.name"}})],1),a("el-form-item",{attrs:{label:"邮箱"}},[a("el-input",{model:{value:t.edit_from.email,callback:function(e){t.$set(t.edit_from,"email",e)},expression:"edit_from.email"}})],1),a("el-form-item",{attrs:{label:"角色"}},[[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.edit_from.role_name,callback:function(e){t.$set(t.edit_from,"role_name",e)},expression:"edit_from.role_name"}},t._l(t.roleOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.name,value:t.name}})})),1)]],2),a("el-form-item",{attrs:{label:"密码"}},[a("el-input",{model:{value:t.edit_from.password,callback:function(e){t.$set(t.edit_from,"password",e)},expression:"edit_from.password"}})],1),a("el-form-item",{attrs:{label:"密码确认"}},[a("el-input",{model:{value:t.edit_from.password_confirmation,callback:function(e){t.$set(t.edit_from,"password_confirmation",e)},expression:"edit_from.password_confirmation"}})],1),a("div",{staticClass:"from-btn"},[a("el-button",{attrs:{type:"danger"},on:{click:function(e){t.editVisible=!1}}},[t._v("取消")]),a("el-button",{on:{click:function(e){return t.onEdit()}}},[t._v("确认")])],1)],1)],1)])],1),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("新增")]),a("div",{staticClass:"table",staticStyle:{"margin-top":"10px"}},[[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.tableList}},[a("el-table-column",{attrs:{prop:"id",label:"ID"}}),a("el-table-column",{attrs:{prop:"name",label:"姓名"}}),a("el-table-column",{attrs:{label:"角色"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.roles[0].name))]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{on:{click:function(a){return t.openEdit(e.row)}}},[t._v("编辑")])]}}])})],1)]],2),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"current-page":t.current_page,"page-sizes":[15,50,100],"page-size":t.per_page,layout:"total, sizes, prev, pager, next, jumper",total:t.Paginationdata.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},i=[],r=a("2909"),o=(a("99af"),a("c24f")),l={data:function(){return{id:"",dialogVisible:!1,editVisible:!1,loading:!0,tableList:[],from:{name:"",password:"",password_confirmation:"",role_name:""},edit_from:{created_at:"",deleted_at:null,email:"",id:"",name:"",password:"",password_confirmation:"",role_name:""},Paginationdata:{},current_page:1,per_page:15,roleOptions:[],value:""}},mounted:function(){this.getList(),this.getrole()},methods:{getrole:function(){var t=this;Object(o["a"])().then((function(e){t.roleOptions=e.data.data}))},getList:function(){var t=this,e={page:this.current_page,per_page:this.per_page};Object(o["e"])(e).then((function(e){t.tableList=e.data.data,t.Paginationdata=e.data.meta})),this.loading=!1},onSubmit:function(){var t=this;this.from.role_name=this.value;var e=this.from;Object(o["b"])(e).then((function(e){t.tableList=[].concat(Object(r["a"])(t.tableList),[e.data.data]),t.dialogVisible=!1,t.getList(),t.from={},t.$message({message:"账号添加成功!",type:"success"})}))},openEdit:function(t){var e=this;this.editVisible=!0;var a=t.id;this.id=t.id,Object(o["d"])(a).then((function(t){e.edit_from=t.data.data}))},onEdit:function(){var t=this;Object(o["c"])(this.id,this.edit_from).then((function(e){t.tableList=[].concat(Object(r["a"])(t.tableList),[e.data.data]),t.editVisible=!1,t.getList(),t.$message({message:"账号修改成功!",type:"success"})})),this.editVisible=!1},handleSizeChange:function(t){this.per_page=t,this.getList()},handleCurrentChange:function(t){this.current_page=t,this.getList()}}},s=l,c=(a("cc1b"),a("2877")),d=Object(c["a"])(s,n,i,!1,null,"cd5188f4",null);e["default"]=d.exports},"99af":function(t,e,a){"use strict";var n=a("23e7"),i=a("d039"),r=a("e8b5"),o=a("861d"),l=a("7b0b"),s=a("50c4"),c=a("8418"),d=a("65f0"),u=a("1dde"),f=a("b622"),m=a("2d00"),p=f("isConcatSpreadable"),b=9007199254740991,v="Maximum allowed index exceeded",h=m>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),g=u("concat"),_=function(t){if(!o(t))return!1;var e=t[p];return void 0!==e?!!e:r(t)},y=!h||!g;n({target:"Array",proto:!0,forced:y},{concat:function(t){var e,a,n,i,r,o=l(this),u=d(o,0),f=0;for(e=-1,n=arguments.length;e<n;e++)if(r=-1===e?o:arguments[e],_(r)){if(i=s(r.length),f+i>b)throw TypeError(v);for(a=0;a<i;a++,f++)a in r&&c(u,f,r[a])}else{if(f>=b)throw TypeError(v);c(u,f++,r)}return u.length=f,u}})},"9bdd":function(t,e,a){var n=a("825a"),i=a("2a62");t.exports=function(t,e,a,r){try{return r?e(n(a)[0],a[1]):e(a)}catch(o){throw i(t),o}}},a630:function(t,e,a){var n=a("23e7"),i=a("4df4"),r=a("1c7e"),o=!r((function(t){Array.from(t)}));n({target:"Array",stat:!0,forced:o},{from:i})},c24f:function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"e",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"d",(function(){return l})),a.d(e,"c",(function(){return s}));var n=a("adb5");function i(){return Object(n["a"])({url:"/api/roles",method:"get"})}function r(t){return Object(n["a"])({url:"/api/users",method:"get",params:t})}function o(t){return Object(n["a"])({url:"/api/users",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/api/users/".concat(t),method:"get"})}function s(t,e){return Object(n["a"])({url:"/api/users/".concat(t),method:"patch",data:e})}},cc1b:function(t,e,a){"use strict";a("dc9f")},d28b:function(t,e,a){var n=a("746f");n("iterator")},dc9f:function(t,e,a){},e01a:function(t,e,a){"use strict";var n=a("23e7"),i=a("83ab"),r=a("da84"),o=a("5135"),l=a("861d"),s=a("9bf2").f,c=a("e893"),d=r.Symbol;if(i&&"function"==typeof d&&(!("description"in d.prototype)||void 0!==d().description)){var u={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new d(t):void 0===t?d():d(t);return""===t&&(u[e]=!0),e};c(f,d);var m=f.prototype=d.prototype;m.constructor=f;var p=m.toString,b="Symbol(test)"==String(d("test")),v=/^Symbol\((.*)\)[^)]+$/;s(m,"description",{configurable:!0,get:function(){var t=l(this)?this.valueOf():this,e=p.call(t);if(o(u,t))return"";var a=b?e.slice(7,-1):e.replace(v,"$1");return""===a?void 0:a}}),n({global:!0,forced:!0},{Symbol:f})}},fb6a:function(t,e,a){"use strict";var n=a("23e7"),i=a("861d"),r=a("e8b5"),o=a("23cb"),l=a("50c4"),s=a("fc6a"),c=a("8418"),d=a("b622"),u=a("1dde"),f=u("slice"),m=d("species"),p=[].slice,b=Math.max;n({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var a,n,d,u=s(this),f=l(u.length),v=o(t,f),h=o(void 0===e?f:e,f);if(r(u)&&(a=u.constructor,"function"!=typeof a||a!==Array&&!r(a.prototype)?i(a)&&(a=a[m],null===a&&(a=void 0)):a=void 0,a===Array||void 0===a))return p.call(u,v,h);for(n=new(void 0===a?Array:a)(b(h-v,0)),d=0;v<h;v++,d++)v in u&&c(n,d,u[v]);return n.length=d,n}})}}]);
//# sourceMappingURL=chunk-f35dfe36.683d24b3.js.map