(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-572e0774"],{"0fb6":function(e,t,n){},"15b5":function(e,t,n){"use strict";var r=n("5f54"),a=n.n(r);a.a},"1c4c":function(e,t,n){"use strict";var r=n("9b43"),a=n("5ca1"),i=n("4bf8"),o=n("1fa8"),s=n("33a4"),l=n("9def"),c=n("f1ae"),u=n("27ee");a(a.S+a.F*!n("5cc5")(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,a,f,d=i(e),p="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,b=void 0!==m,g=0,v=u(d);if(b&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==v||p==Array&&s(v))for(t=l(d.length),n=new p(t);t>g;g++)c(n,g,b?m(d[g],g):d[g]);else for(f=v.call(d),n=new p;!(a=f.next()).done;g++)c(n,g,b?o(f,m,[a.value,g],!0):a.value);return n.length=g,n}})},3107:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("pop-confirm",e._b({attrs:{type:"danger",confirm:e.onConfirm,size:"small"}},"pop-confirm",e.$attrs,!1),[e._t("default",[e._v("删除")])],2)},a=[],i=(n("96cf"),n("3b8d")),o=n("bd0b"),s=n("bf9a"),l=n("873a"),c=n("91a0"),u={name:"RowDestroy",components:{PopConfirm:o["a"]},mixins:[c["a"]],methods:{onConfirm:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.checkResourceName(),this.setIdentify(),e.next=4,s["b"].delete("".concat(this.resource,"/").concat(this.identify));case 4:this.data.splice(this.getIndex(),1),this.$message.success(Object(l["h"])("destroyed"));case 6:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}},f=u,d=n("2877"),p=Object(d["a"])(f,r,a,!1,null,null,null);t["a"]=p.exports},"323a":function(e,t,n){"use strict";n.d(t,"e",function(){return a}),n.d(t,"f",function(){return i}),n.d(t,"a",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return c});var r=n("bf9a");function a(e){return r["b"].post("admin_merchants",e)}function i(e,t){return r["b"].put("admin_merchants/".concat(e),t)}function o(e){return r["b"].get("admin_merchants/".concat(e,"/edit"))}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("admin_merchants",{params:e})}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r["b"].get("admin_merchant_config/get",{params:e})}function c(e){return r["b"].post("admin_merchant_config/edit",e)}},"386d":function(e,t,n){"use strict";var r=n("cb7c"),a=n("83a1"),i=n("5f1b");n("214f")("search",1,function(e,t,n,o){return[function(n){var r=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),l=String(this),c=s.lastIndex;a(c,0)||(s.lastIndex=0);var u=i(s,l);return a(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]})},"3c1b":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button-link",{attrs:{size:"small",to:e.link}},[e._t("default",[e._v("编辑")])],2)},a=[],i=n("c3c6"),o=n("91a0"),s={name:"RowToEdit",components:{ButtonLink:i["a"]},mixins:[o["a"]],data:function(){return{identify:void 0}},computed:{link:function(){return this.checkResourceName(),"/".concat(this.resource,"/").concat(this.identify,"/edit")}},mounted:function(){this.setIdentify()}},l=s,c=n("2877"),u=Object(c["a"])(l,r,a,!1,null,null,null);t["a"]=u.exports},"469f":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("7d7b")},"5d73":function(e,t,n){e.exports=n("469f")},"5f54":function(e,t,n){},"69d9":function(e,t,n){"use strict";n("8e6e"),n("456d"),n("7f7f"),n("ac6a");var r=n("bd86");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.$el;if(e){var t=e.tagName.toLowerCase();return"tr"===t?e:"tbody"===t?void 0:this.findTr(e.parentNode)}},setIdentify:function(){if(void 0===this.identify){var e=this.getIndex();this.identify=this.data[e][this.rowKey]}},checkResourceName:function(){if(!this.resource)throw new Error("必须在 [ 表格 ] 或者 [ ".concat(this.$options.name," ] 中,传入 [ resource ] 属性"))}}}},bd0b:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(e.comp,e._b({tag:"component",staticClass:"pop-confirm",attrs:{type:e.type,disabled:e.disabled}},"component",e.$attrs,!1),[n("el-popover",{attrs:{placement:"top",width:"160",disabled:e.disabled},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("p",[e._v(e._s(e.notice))]),n("div",{staticStyle:{"text-align":"right",margin:"0"}},[n("el-button",{attrs:{size:"mini"},on:{click:e.onCancel}},[e._v("取消")]),n("loading-action",{attrs:{type:e.confirmType,size:"mini",action:e.action,disabled:e.disabled}},[e._v("\n 确定\n ")])],1),n("span",{staticClass:"trigger",attrs:{slot:"reference"},slot:"reference"})]),e._t("default")],2)},a=[],i=(n("96cf"),n("3b8d")),o={name:"PopConfirm",data:function(){return{visible:!1}},props:{notice:{type:String,default:"确认操作?"},confirmType:{type:String,default:"primary"},confirm:Function,type:String,disabled:Boolean,comp:{type:String,default:"el-button"}},methods:{onCancel:function(){this.visible=!1,this.$emit("cancel")},action:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!this.disabled){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.confirm();case 4:this.visible=!1;case 5:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}},s=o,l=(n("15b5"),n("2877")),c=Object(l["a"])(s,r,a,!1,null,"f59b5a72",null);t["a"]=c.exports},cafd:function(e,t,n){"use strict";var r=n("0fb6"),a=n.n(r);a.a},cf96:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-card",{scopedSlots:e._u([{key:"header",fn:function(){return[n("content-header")]},proxy:!0}])},[n("search-form",{ref:"searchForm",attrs:{fields:e.search}}),n("el-table",{attrs:{data:e.users,resource:"admin-users"}},[n("el-table-column",{attrs:{prop:"id",label:"ID",align:"center","show-overflow-tooltip":"","min-width":"2%"}}),n("el-table-column",{attrs:{prop:"name",label:"姓名",align:"center","show-overflow-tooltip":"","min-width":"8%"}}),n("el-table-column",{attrs:{prop:"account",label:"账号",align:"center","show-overflow-tooltip":"","min-width":"5%"}}),n("el-table-column",{attrs:{prop:"phone",label:"手机号",align:"center","show-overflow-tooltip":"","min-width":"6%"}}),n("el-table-column",{attrs:{prop:"job_number",label:"工号",align:"center","show-overflow-tooltip":"","min-width":"4%"}}),n("el-table-column",{attrs:{prop:"area",label:"区域",align:"center","show-overflow-tooltip":"","min-width":"7%"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[n("el-tag",{directives:[{name:"show",rawName:"v-show",value:r.quanbu,expression:"row.quanbu"}],staticClass:"mr-1"},[e._v("\n 全部\n ")]),e._l(r.areas,function(t){return n("el-tag",{key:t.id,staticClass:"mr-1"},[e._v("\n "+e._s(t.name)+"\n ")])})]}}])}),n("el-table-column",{attrs:{label:"角色",align:"center","show-overflow-tooltip":"","min-width":"9%"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return e._l(r.roles,function(t){return n("el-tag",{key:t.id,staticClass:"mr-1"},[e._v("\n "+e._s(t.name)+"\n ")])})}}])}),n("el-table-column",{attrs:{label:"状态",align:"center","show-overflow-tooltip":"","min-width":"4%"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.status?n("el-tag",{attrs:{type:"success"}},[e._v("正常")]):n("el-tag",{attrs:{type:"danger"}},[e._v("禁用")])]}}])}),n("el-table-column",{attrs:{label:"能否登录运维端",align:"center","show-overflow-tooltip":"","min-width":"4%"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.is_login_app?n("el-tag",{attrs:{type:"success"}},[e._v("正常")]):n("el-tag",{attrs:{type:"danger"}},[e._v("禁用")])]}}])}),n("el-table-column",{attrs:{prop:"created_at",label:"添加时间",align:"center","show-overflow-tooltip":"","min-width":"5%"}}),n("el-table-column",{attrs:{prop:"updated_at",label:"修改时间",align:"center","show-overflow-tooltip":"","min-width":"5%"}}),n("el-table-column",{attrs:{label:"操作",align:"center","show-overflow-tooltip":"",width:"150"},scopedSlots:e._u([{key:"default",fn:function(e){e.row,e.$index;return[n("el-button-group",[n("row-to-edit"),n("row-destroy")],1)]}}])})],1),n("div",{staticClass:"card-footer"},[n("pagination",{attrs:{page:e.page}})],1)],1)},a=[],i=(n("386d"),n("ac6a"),n("5df3"),n("768b")),o=(n("96cf"),n("3b8d")),s=n("69d9"),l=n("81df"),c=n("22a6"),u=n("3107"),f=n("3c1b"),d=n("873a"),p=n("323a"),h={name:"Index",components:{RowToEdit:f["a"],RowDestroy:u["a"],SearchForm:s["a"],Pagination:l["a"]},data:function(){return{search:[{field:"id",label:"ID"},{field:"name",label:"姓名"},{field:"account",label:"账号"},{field:"role_name",label:"角色"},{field:"phone",label:"手机号"},{field:"job_number",label:"工号"},{type:"el-select",field:"merchant_id",label:"商户",options:[{id:"",name:"全部"}]}],users:[],page:null,first_blood:!0}},mixins:[d["m"]],created:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t,n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if("administrator"!==this.$store.state.users.user.roles[0]){e.next=9;break}return e.next=3,Promise.all([Object(p["c"])({all:1})]);case 3:t=e.sent,n=Object(i["a"])(t,1),r=n[0].data,this.search[6].options.push.apply(this.search[6].options,r.data),e.next=10;break;case 9:this.search.splice(6,1);case 10:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),watch:{$route:{handler:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.autoPageSize(53,t);case 2:return e.next=4,Object(c["c"])(t.query);case 4:n=e.sent,r=n.data,a=r.data,i=r.meta,this.users=a,this.page=i;case 10:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),immediate:!0}}},m=h,b=n("2877"),g=Object(b["a"])(m,r,a,!1,null,null,null);t["default"]=g.exports}}]); //# sourceMappingURL=chunk-572e0774.f701c1c4.js.map