text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0aa792da"],{"126d":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:"contentMgr-avator"},[a("div",{staticClass:"flex search-bar"},[a("el-form",{staticClass:"flex-wrap filter"},[a("div",{staticClass:"flex search-bar"},[a("div",{staticClass:"search-btnGroup flex"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handleAddMember({})}}},[t._v("新增商户")])],1)])])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loadingMap.tableLoading,expression:"loadingMap.tableLoading"}],ref:t.refMap.table,staticClass:"main-table",staticStyle:{width:"100%"},attrs:{data:t.tableData,border:!0,"header-cell-style":{textAlign:"center"}}},[a("el-table-column",{attrs:{sortable:"",label:"商户ID",align:"center",prop:"barId"}}),t._v(" "),a("el-table-column",{attrs:{label:"商户名称",align:"center",prop:"barName",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{sortable:"",label:"创建时间",align:"center",prop:"ctime",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{label:"商户地址",align:"center",prop:"address",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{label:"商户坐标",align:"center",prop:"jw",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{sortable:"",label:"范围半径",align:"center",prop:"range",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{label:"城市",align:"center",prop:"city",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{label:"商户电话",align:"center",prop:"tel",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{sortable:"",label:"状态",align:"center",prop:"state",formatter:t.formatColumn}}),t._v(" "),a("el-table-column",{attrs:{width:"120",height:"80",label:"商户logo",align:"center",prop:"logo"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.logo,expression:"scope.row.logo"}],staticClass:"avator-img",attrs:{width:"120",height:"80"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"success",size:"mini"},on:{click:function(a){return t.handleAddMember(e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(a){return t.handleAddMember(e.row)}}},[t._v("启用")])]}}])})],1),t._v(" "),a("detail",{attrs:{"use-data":t.catchedData,visible:t.visibleMap.detailDiaVisible},on:{"update:visible":function(e){return t.$set(t.visibleMap,"detailDiaVisible",e)},emitFunc:t.acceptEmitFunc}})],1)},i=[],r=(a("96cf"),a("3b8d")),s=a("db72"),o=a("2bef"),c=a("aea5"),l=a("28b9"),u=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"dialog-report"},[a("el-dialog",{attrs:{title:"新增商户",top:"8vh",visible:t.show,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.show=e}}},[a("div",{staticClass:"detail-dialog-wrap"},[a("vue-scroll",[a("el-form",{ref:"form",attrs:{model:t.useData,"label-width":"140px"}},[a("el-form-item",{attrs:{label:"商户名称",prop:"id"}},[a("el-input",{staticStyle:{width:"50%"},attrs:{name:"barName",tabindex:"1","auto-complete":"off"},model:{value:t.useData.barName,callback:function(e){t.$set(t.useData,"barName",e)},expression:"useData.barName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商户logo",prop:"reportUserId"}},[a("el-button",{staticClass:"fileParent",staticStyle:{background:"#808080"},attrs:{type:"file",icon:"el-icon-plus"},on:{change:t.uploadFile}},[t.tempImg?a("img",{attrs:{src:t.tempImg,alt:""}}):a("img",{attrs:{src:t.useData.logo,alt:""}}),t._v(" "),a("input",{staticClass:"file",attrs:{type:"file",multiple:"multiple"},on:{change:t.uploadFile}})])],1),t._v(" "),a("el-form-item",{attrs:{label:"商户地址",prop:"reportUserName"}},[a("el-input",{staticStyle:{width:"50%"},attrs:{name:"address",tabindex:"1","auto-complete":"off"},model:{value:t.useData.address,callback:function(e){t.$set(t.useData,"address",e)},expression:"useData.address"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商户坐标",prop:"accuseId"}},[t._v("\n        X："),a("el-input",{staticStyle:{width:"44%"},attrs:{name:"lng",tabindex:"1","auto-complete":"off"},model:{value:t.useData.lng,callback:function(e){t.$set(t.useData,"lng",e)},expression:"useData.lng"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"",prop:"accuseType"}},[t._v("\n\n        \n                Y："),a("el-input",{staticStyle:{width:"44%"},attrs:{name:"lat",tabindex:"1","auto-complete":"off"},model:{value:t.useData.lat,callback:function(e){t.$set(t.useData,"lat",e)},expression:"useData.lat"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"城市",prop:"id"}},[a("el-input",{staticStyle:{width:"50%"},attrs:{name:"city",tabindex:"1","auto-complete":"off"},model:{value:t.useData.city,callback:function(e){t.$set(t.useData,"city",e)},expression:"useData.city"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"范围半径",prop:"accuseType"}},[a("el-input",{staticStyle:{width:"50%"},attrs:{name:"range",tabindex:"1","auto-complete":"off"},model:{value:t.useData.range,callback:function(e){t.$set(t.useData,"range",e)},expression:"useData.range"}}),t._v("                 米    ")],1),t._v(" "),a("el-form-item",{attrs:{label:"商户电话",prop:"accuseName"}},[a("el-input",{staticStyle:{width:"50%"},attrs:{name:"tel",tabindex:"1","auto-complete":"off"},model:{value:t.useData.tel,callback:function(e){t.$set(t.useData,"tel",e)},expression:"useData.tel"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"accuseName"}},[a("el-radio-group",{staticClass:"radio-group",attrs:{size:"mini"},on:{change:t.handleRadioChange},model:{value:t.chartRadio,callback:function(e){t.chartRadio=e},expression:"chartRadio"}},[a("el-radio-button",{attrs:{label:"启用"}}),t._v(" "),a("el-radio-button",{attrs:{label:"禁用"}})],1)],1)],1),t._v(" "),this.useData.barId?a("el-button",{staticStyle:{width:"10%","margin-left":"50%","margin-top":"20px"},attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleAddMember()}}},[t._v("更新")]):a("el-button",{staticStyle:{width:"10%","margin-left":"50%","margin-top":"20px"},attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleAddMember()}}},[t._v("新增")])],1)],1)])],1)},d=[],h=a("c08d"),p=h["a"],m=(a("5219"),a("2877")),f=Object(m["a"])(p,u,d,!1,null,null,null),b=f.exports,g=a("e33a"),v=a("4c02"),y=a("37b6"),I=a("7346"),D={searchForm:{status:""},formRules:{},censorType:"user"},w={components:{Censorshipstatus:c["a"],Detail:b,Userid:l["a"]},mixins:[g["a"],v["a"],I["a"]],data:function(){return Object(s["a"])({allCensorshipTypes:y["c"],visibleMap:{censorDiaVisible:!1,detailDiaVisible:!1,statusDialogVisible:!1}},D)},methods:{getData:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(o["g"])({});case 3:e=t.sent,console.log(e),this.tableData=e.data.map((function(t){return t.ctime=t.ctime.slice(0,-2),t.jw=t.lng+","+t.lat,t.state=0==t.status?"禁用":"启用",t})),t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.log(t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(){return t.apply(this,arguments)}return e}(),checkPicPass:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a,n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=e.row.dataId,n=this.censorType,i=-1,t.next=6,passPic({dataId:a,type:n,userId:i});case 6:this.$message({type:"success",message:"操作成功"}),this.getData(),t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](0),console.log(t.t0);case 13:case"end":return t.stop()}}),t,this,[[0,10]])})));function e(e){return t.apply(this,arguments)}return e}(),handleAddMember:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.catchedData=e,this.visibleMap.detailDiaVisible=!0;case 2:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),checkPicRefuse:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var a,n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.$msgbox.confirm("确定不通过该图片","提醒",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning",dangerouslyUseHTMLString:!0});case 3:return a=e.row.dataId,n=this.censorType,i=-1,t.next=8,refusePic({dataId:a,type:n,userId:i});case 8:this.$message({type:"success",message:"操作成功"}),this.getData(),t.next=15;break;case 12:t.prev=12,t.t0=t["catch"](0),"cancel"!==t.t0&&console.log(t.t0);case 15:case"end":return t.stop()}}),t,this,[[0,12]])})));function e(e){return t.apply(this,arguments)}return e}()}},x=w,_=Object(m["a"])(x,n,i,!1,null,null,null);e["default"]=_.exports},"2bef":function(t,e,a){"use strict";a.d(e,"g",(function(){return s})),a.d(e,"i",(function(){return o})),a.d(e,"a",(function(){return c})),a.d(e,"m",(function(){return l})),a.d(e,"f",(function(){return u})),a.d(e,"b",(function(){return d})),a.d(e,"e",(function(){return h})),a.d(e,"n",(function(){return p})),a.d(e,"c",(function(){return m})),a.d(e,"k",(function(){return f})),a.d(e,"l",(function(){return b})),a.d(e,"j",(function(){return g})),a.d(e,"o",(function(){return v})),a.d(e,"d",(function(){return y})),a.d(e,"h",(function(){return I}));var n=a("b775"),i=(a("4328"),a("bc3a")),r=a.n(i);function s(t){return Object(n["a"])({url:"/bar/get_bar_list",method:"get",params:t})}function o(t){return Object(n["a"])({url:"/user/get_upload_token",method:"get",params:t})}function c(t){var e=t,a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU0MjUwNDgsInVzZXJJZCI6Ii0xIiwidmVyc2lvbiI6IlYxLjAiLCJpYXQiOjE1ODgzMDIxNTV9.UcR_5JX0hIPBzySF9q4vh4oI8DyY7pXmHTzQqffiKkM";r.a.defaults.headers.common["jwt"]=a,r.a.post("https://api.corgi.org.cn/bar/add_bar",e).then((function(t){console.log("res=>",t)}))}function l(t){var e=t,a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU0MjUwNDgsInVzZXJJZCI6Ii0xIiwidmVyc2lvbiI6IlYxLjAiLCJpYXQiOjE1ODgzMDIxNTV9.UcR_5JX0hIPBzySF9q4vh4oI8DyY7pXmHTzQqffiKkM";r.a.defaults.headers.common["jwt"]=a,r.a.post("https://api.corgi.org.cn/bar/update_bar",e).then((function(t){console.log("res=>",t)}))}function u(t){return Object(n["a"])({url:"/bar/get_bar_activity",method:"get",params:t})}function d(t){var e=t,a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU0MjUwNDgsInVzZXJJZCI6Ii0xIiwidmVyc2lvbiI6IlYxLjAiLCJpYXQiOjE1ODgzMDIxNTV9.UcR_5JX0hIPBzySF9q4vh4oI8DyY7pXmHTzQqffiKkM";r.a.defaults.headers.common["jwt"]=a,r.a.post("https://api.corgi.org.cn/bar/add_bar_activity",e).then((function(t){console.log("res=>",t)}))}function h(t){return Object(n["a"])({url:"/bar/get_bar",method:"get",params:t})}function p(t){var e=t,a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU0MjUwNDgsInVzZXJJZCI6Ii0xIiwidmVyc2lvbiI6IlYxLjAiLCJpYXQiOjE1ODgzMDIxNTV9.UcR_5JX0hIPBzySF9q4vh4oI8DyY7pXmHTzQqffiKkM";r.a.defaults.headers.common["jwt"]=a,r.a.post("https://api.corgi.org.cn/bar/update_bar_activity",e).then((function(t){console.log("res=>",t)}))}function m(t){return Object(n["a"])({url:"/activity/delete_activity",method:"get",params:t})}function f(t){return Object(n["a"])({url:"/bar/recommend",method:"get",params:t})}function b(t){return Object(n["a"])({url:"/bar/unrecommend",method:"get",params:t})}function g(t){return Object(n["a"])({url:"/hot/list_hot_activity",method:"get",params:t})}function v(t){var e=t,a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU0MjUwNDgsInVzZXJJZCI6Ii0xIiwidmVyc2lvbiI6IlYxLjAiLCJpYXQiOjE1ODgzMDIxNTV9.UcR_5JX0hIPBzySF9q4vh4oI8DyY7pXmHTzQqffiKkM";r.a.defaults.headers.common["jwt"]=a,r.a.post("http://139.224.63.240:7888/hot/update_hot_activity",e).then((function(t){console.log("res=>",t)}))}function y(t){return Object(n["a"])({url:"/hot/delete_hot_activity",method:"get",params:t})}function I(t){return Object(n["a"])({url:"/activity/get_detail",method:"get",params:t})}},"4c02":function(t,e,a){"use strict";var n=a("768b"),i=(a("ffc1"),a("ac6a"),a("7346"));e["a"]={mixins:[i["c"]],watch:{$route:function(){this.reload()}},mounted:function(){var t=this;this.$nextTick((function(){return t.addTabelHeightListener("parent")})),this.reload()},methods:{sortUserId:function(t,e){return t.userId-e.userId},searchData:function(){this.resetPagination()},reload:function(){var t=this,e=this.$route.params,a=e.shouldChangeForm,i=e.rewriteForm;a&&Object.entries(i).forEach((function(e){var a=Object(n["a"])(e,2),i=a[0],r=a[1];return t.$set(t.searchForm,i,r)})),this.getData()}}}},5219:function(t,e,a){"use strict";var n=a("ee2d"),i=a.n(n);i.a},c08d:function(t,e,a){"use strict";(function(t){a("7f7f"),a("96cf");var n=a("3b8d"),i=a("2bef"),r=a("37b6"),s=a("27aa"),o=a("28b9"),c=a("69c0"),l=a("7346");e["a"]={components:{ReportStatus:s["a"],Userid:o["a"],Activityid:c["a"]},mixins:[l["d"]],props:{useData:{type:Object,default:function(){return{}}}},data:function(){return{tempImg:"",chartRadio:"启用",shopState:!0,allReportType:r["f"]}},methods:{getData:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log(this.useData);case 1:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleAddMember:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,a,n,r,s,o,c,l,u,d,h;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=this.useData.barName,a=this.useData.address,n=this.useData.lat,r=this.useData.lng,s=this.useData.range,o=this.useData.tel,c=0,c="启用"===this.chartRadio?1:0,l=this.tempImg,u=this.useData.city,this.useData.barId?(this.tempImg&&(this.useData.logo=this.tempImg),d={barName:e,address:a,lat:n,lng:r,range:s,tel:o,city:u,status:c,logo:this.useData.logo,barId:this.useData.barId},console.log(d),Object(i["m"])(d),this.handleDialogClose(),this.$emit("emitFunc",{function:"getData",arguments:[]})):(h={barName:e,address:a,lat:n,lng:r,range:s,tel:o,status:c,logo:l,city:u},console.log(h),Object(i["a"])(h),this.handleDialogClose(),this.$emit("emitFunc",{function:"getData",arguments:[]}));case 11:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),postimg:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(e){var n,r,s,o,c,l,u,d,h,p;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["i"])({});case 2:return n=t.sent,r="oss-cn-beijing",s=n.data.accessKeyId,o=n.data.accessKeySecret,c=n.data.bucketName,l=a("9b15"),console.log(s),u=new l({region:r,accessKeyId:s,accessKeySecret:o,stsToken:n.data.securityToken,bucket:c}),console.log(u),d=Date.parse(new Date),h="".concat(d),h=Base64.encode(h),h="shop/"+h,console.log(h),t.prev=16,t.next=19,u.put(h,e);case 19:p=t.sent,console.log(p),this.tempImg=p.url,console.log(tempImg),t.next=28;break;case 25:t.prev=25,t.t0=t["catch"](16),console.log(t.t0);case 28:case"end":return t.stop()}}),t,this,[[16,25]])})));function e(e){return t.apply(this,arguments)}return e}(),uploadFile:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(e){var a,n,i,r,s,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:a=this,n=e.target.files[0],i=n.name.lastIndexOf("."),r=n.name.substr(i),s=n.name.substr(0,i),o=Date.parse(new Date),s="".concat(s,"_").concat(o).concat(r),a.postimg(n);case 8:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),compress:function(e,a){var n=document.createElement("canvas"),i=n.getContext("2d"),r=(e.src.length,e.width),s=e.height;n.width=r,n.height=s,i.fillStyle="#fff",i.fillRect(0,0,n.width,n.height),i.drawImage(e,0,0,r,s);var o=n.toDataURL("image/jpeg",a);console.log("*******压缩后的图片大小*******"),console.log(o.length/1024);var c=t.from(o,"base64");return console.log(c),c},handleRadioChange:function(t){this.shopState="启用"===this.chartRadio}}}}).call(this,a("b639").Buffer)},e33a:function(t,e,a){"use strict";a("f6b3"),a("ac6a"),a("456d");var n=a("9abb"),i={components:{Paginationtpl:n["a"]},data:function(){return{pagination:{page:1,pageSize:10},paginationTotal:0}},watch:{pagination:{handler:function(){this.getData()},deep:!0}},methods:{resetPagination:function(){this.pagination={page:1,pageSize:10}}}};e["a"]={mixins:[i],data:function(){return{refMap:{table:"mainTable"},tableData:[],catchedDataArr:[],catchedData:{},catchedRadio:null,tableSelected:!1,tableHeight:200,extraHeight:110,loadingMap:{tableLoading:!1},visibleMap:{tableVisible:!1},renderMap:{tableRender:!1},switchMap:{getDataOnRender:!0}}},computed:{isTableRadioSelected:function(){return Object.keys(this.catchedData).length},isTableCheckBoxSelected:function(){return this.catchedDataArr.length>0}},mounted:function(){Reflect.has(this,"getData")&&this.switchMap.getDataOnRender&&this.getData()},watch:{"loadingMap.tableLoading":function(t){var e=this;t||this.$nextTick((function(){var t=e.$refs[e.refMap.table];t&&t.doLayout()}))}},methods:{handleTableCheckBoxSelect:function(t){this.catchedDataArr=t,this.tableSelected=this.$refs[this.refMap.table].selection.length>0},handleTabelRadioClick:function(t){this.catchedRadio=t,this.catchedData=this.tableData[t]},handleTableItemClick:function(t){this.catchedData=t},setTableHeightBySelf:function(){var t=this.minTableHeight,e=void 0===t?0:t,a=this.$refs[this.searchRef],n=a&&a.$el.clientHeight||0,i=this.$el.clientHeight-this.extraHeight-n;this.tableHeight=i<e?e:i},setTableHeightByParent:function(){var t=this.minTableHeight,e=void 0===t?0:t,a=this.$refs[this.searchRef],n=a&&a.$el.clientHeight||0,i=this.$parent.$el.clientHeight-this.extraHeight-n;this.tableHeight=i<e?e:i},watchResizeFinish:function(t,e){var a=this;return clearTimeout(e),e=setTimeout((function(){return new Promise((function(e){a.renderMap.tableRender=!0,e(t()),a.$nextTick((function(){setTimeout((function(){a.renderMap.tableRender=!1}),100)}))}))}),100),e},addTabelHeightListener:function(){var t,e=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"self",n="self"===a?this.$el:this.$parent.$el,i="self"===a?this.setTableHeightBySelf:this.setTableHeightByParent;this.$erd.listenTo(n,(function(a){e.renderMap.tableRender||(t=e.watchResizeFinish(i,t))}))},isTableSelected:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"请先选择需要修改的数据";return!(!this.isTableRadioSelected&&!this.isTableCheckBoxSelected)||(this.$message({type:"warning",message:t}),!1)},formatColumn:function(t,e,a,n){return null===a||""===a||void 0===a?"--":a}},beforeDestroy:function(){this.$erd.removeAllListeners(this.$el)}}},ee2d:function(t,e,a){}}]);