text: webpackJsonp([1],{MQlT:function(e,t){},NHnr:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("7+uW"),r=a("Gvdl"),o=a.n(r),l=a("aK3Z"),s=a.n(l),i={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},staticRenderFns:[]};var u=a("VU/8")({name:"App"},i,!1,function(e){a("Z+Wy")},null,null).exports,d=a("/ocq"),c={data:function(){return{activeIndex:"1",activeIndex2:"1"}},methods:{handleSelect:function(e,t){console.log(e,t)}}},p={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"line"}),e._v(" "),a("el-menu",{staticClass:"el-menu-demo",attrs:{"default-active":e.activeIndex2,mode:"horizontal","background-color":"#545c64","text-color":"#fff","active-text-color":"#ffd04b"},on:{select:e.handleSelect}},[a("el-menu-item",{attrs:{index:"1"}},[e._v("设备管理")]),e._v(" "),a("el-submenu",{attrs:{index:"2"}},[a("template",{slot:"title"},[e._v("我的工作台")]),e._v(" "),a("el-menu-item",{attrs:{index:"2-1"}},[e._v("选项1")]),e._v(" "),a("el-menu-item",{attrs:{index:"2-2"}},[e._v("选项2")]),e._v(" "),a("el-menu-item",{attrs:{index:"2-3"}},[e._v("选项3")]),e._v(" "),a("el-submenu",{attrs:{index:"2-4"}},[a("template",{slot:"title"},[e._v("选项4")]),e._v(" "),a("el-menu-item",{attrs:{index:"2-4-1"}},[e._v("选项1")]),e._v(" "),a("el-menu-item",{attrs:{index:"2-4-2"}},[e._v("选项2")]),e._v(" "),a("el-menu-item",{attrs:{index:"2-4-3"}},[e._v("选项3")])],2)],2),e._v(" "),a("el-menu-item",{attrs:{index:"3"}},[e._v("消息中心")]),e._v(" "),a("el-menu-item",{attrs:{index:"4"}},[e._v("订单管理")])],1)],1)},staticRenderFns:[]},m=a("VU/8")(c,p,!1,null,null,null).exports,v=a("woOf"),f=a.n(v),h=a("//Fk"),g=a.n(h),_=a("mtWM"),b=a.n(_).a.create({baseURL:"http://rapapi.org/mockjsdata/32584/"});function x(e,t,a){"000"!==e.data.code?a(e.data.msg):t(e.data)}var I=function(e){return function(e,t){return new g.a(function(a,n){b.get(e,{params:t}).then(function(e){x(e,a,n)}).catch(function(e){n(e)})})}("/api/device/list",e)},k={data:function(){return{form:{keywords:"",groupId:"",shopId:""},tableData:[],page:{pageNo:1,pageSize:20,totalCount:1},loading:!1,dialogVisible:!1,row:{}}},observableMethods:{search:"search$",handleCurrentChange:"handleCurrentChange$"},subscriptions:function(){var e=this,t=this.$eventToObservable("hook:created").map(function(){return{name:"created",data:{pageNo:1}}}),a=this.search$.debounceTime(500).do(function(){e.page.pageNo=1}).map(function(){var t=e.form;return{name:"search",data:{groupId:t.groupId,shopId:t.shopId,groupName:t.keywords,pageNo:e.page.pageNo}}}),n=this.handleCurrentChange$.debounceTime(500).skipWhile(function(t){return e.page.pageNo===t}).map(function(t){var a=e.form;return{name:"handleCurrentChange",data:{groupId:a.groupId,shopId:a.shopId,groupName:e.preData.reqData.data.groupName,pageNo:t}}});return{preData:o.a.Observable.merge(t,a,n).do(function(){e.loading=!0}).switchMap(function(e){return o.a.Observable.fromPromise(I(e.data))},function(e,t){return{reqData:e,rspData:t}}).catch(function(t){throw e.loading=!1,e.$message({message:"查询失败，具体原因："+t,type:"error"}),new Error(t)}).do(function(t){var a=t.rspData;a=e.formatRsp(a),e.tableData=a.data?a.data:[],a.page&&(e.page=a.page),e.loading=!1})}},methods:{formatRsp:function(e){if(e&&e.data){var t=e.data.map(function(e){return f()({},e,{status:"0"===String(e.status)?"下线":"上线"})});return f()({},e,{data:t})}return e},keypress:function(e){13===e.keyCode&&this.search()}}},w={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"content-wrap"},[a("el-form",{ref:"form",attrs:{inline:!0,model:e.form,size:"small"}},[a("el-form-item",{attrs:{label:"集团名称"}},[a("el-input",{attrs:{placeholder:"请输入集团名称"},nativeOn:{keypress:function(t){return e.keypress(t)}},model:{value:e.form.keywords,callback:function(t){e.$set(e.form,"keywords",t)},expression:"form.keywords"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"集团ID"},nativeOn:{keypress:function(t){return e.keypress(t)}}},[a("el-input",{attrs:{placeholder:"请输入集团ID"},model:{value:e.form.groupId,callback:function(t){e.$set(e.form,"groupId",t)},expression:"form.groupId"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"店铺ID"},nativeOn:{keypress:function(t){return e.keypress(t)}}},[a("el-input",{attrs:{placeholder:"请输入店铺ID"},model:{value:e.form.shopId,callback:function(t){e.$set(e.form,"shopId",t)},expression:"form.shopId"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.search}},[e._v("搜索")])],1)],1),e._v(" "),a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.tableData,border:"","max-height":"600"}},[a("el-table-column",{attrs:{prop:"groupId",label:"集团ID",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{prop:"groupName",label:"集团名称",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"address",label:"店铺地址",width:"250"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"店铺名称",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{prop:"deviceCount",label:"设备数量"}})],1),e._v(" "),a("div",{staticClass:"page"},[a("el-pagination",{attrs:{"current-page":e.page.pageNo,"page-size":e.page.pageSize,layout:"total, prev, pager, next, jumper",total:e.page.totalCount},on:{"size-change":e.handleCurrentChange,"current-change":e.handleCurrentChange}})],1)],1)],1)},staticRenderFns:[]};var C={components:{HeaderCom:m,device:a("VU/8")(k,w,!1,function(e){a("MQlT")},"data-v-d375d8ec",null).exports}},y={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("header-com"),this._v(" "),t("device")],1)},staticRenderFns:[]};var N=a("VU/8")(C,y,!1,function(e){a("e5H8")},null,null).exports;n.default.use(d.a);var D=new d.a({routes:[{path:"",name:"device",component:N},{path:"/device",name:"device",component:N}]}),$=a("zL8q"),R=a.n($);a("tvR6"),a("uMhA");n.default.config.productionTip=!1,n.default.use(s.a,o.a),n.default.use(R.a),new n.default({el:"#app",router:D,components:{App:u},template:"<App/>"})},"Z+Wy":function(e,t){},e5H8:function(e,t){},tvR6:function(e,t){},uMhA:function(e,t){}},["NHnr"]);
  //# sourceMappingURL=app.379e35b680d3095ce5ee.js.map