pyxis-page/dist/js/chunk-8d6861b8.178fbcd5.js

2 lines
12 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8d6861b8"],{"04a9":function(t,e,n){},"333d":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("el-pagination",t._b({attrs:{background:t.background,"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},a=[],r=n("d4ec"),o=n("bee2"),s=n("262e"),u=n("2caf"),l=n("9ab4"),c=n("1b40"),p=(n("4795"),function(t,e,n,i){return t/=i/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)}),d=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}(),f=function(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t},m=function(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop},h=function(t,e,n){var i=m(),a=t-i,r=20,o=0;e="undefined"===typeof e?500:e;var s=function t(){o+=r;var s=p(o,i,a,e);f(s),o<e?d(t):n&&"function"===typeof n&&n()};s()},b=function(t){Object(s["a"])(n,t);var e=Object(u["a"])(n);function n(){return Object(r["a"])(this,n),e.apply(this,arguments)}return Object(o["a"])(n,[{key:"currentPage",get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},{key:"pageSize",get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}},{key:"handleSizeChange",value:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&h(0,800)}},{key:"handleCurrentChange",value:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&h(0,800)}}]),n}(c["c"]);Object(l["a"])([Object(c["b"])({required:!0})],b.prototype,"total",void 0),Object(l["a"])([Object(c["b"])({default:1})],b.prototype,"page",void 0),Object(l["a"])([Object(c["b"])({default:20})],b.prototype,"limit",void 0),Object(l["a"])([Object(c["b"])({default:function(){return[10,20,30,50]}})],b.prototype,"pageSizes",void 0),Object(l["a"])([Object(c["b"])({default:"total, sizes, prev, pager, next, jumper"})],b.prototype,"layout",void 0),Object(l["a"])([Object(c["b"])({default:!0})],b.prototype,"background",void 0),Object(l["a"])([Object(c["b"])({default:!0})],b.prototype,"autoScroll",void 0),Object(l["a"])([Object(c["b"])({default:!1})],b.prototype,"hidden",void 0),b=Object(l["a"])([Object(c["a"])({name:"Pagination"})],b);var g=b,v=g,y=(n("34cc"),n("0c7c")),w=Object(y["a"])(v,i,a,!1,null,"2f4afb68",null);e["a"]=w.exports},"34cc":function(t,e,n){"use strict";n("04a9")},4795:function(t,e,n){var i=n("23e7"),a=n("da84"),r=n("342f"),o=[].slice,s=/MSIE .\./.test(r),u=function(t){return function(e,n){var i=arguments.length>2,a=i?o.call(arguments,2):void 0;return t(i?function(){("function"==typeof e?e:Function(e)).apply(this,a)}:e,n)}};i({global:!0,bind:!0,forced:s},{setTimeout:u(a.setTimeout),setInterval:u(a.setInterval)})},b1bd:function(t,e,n){"use strict";n("b40e")},b40e:function(t,e,n){},c3d3:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-form",{ref:"filterForm",staticClass:"filter",attrs:{inline:!0,model:t.filterForm}},[n("el-form-item",{attrs:{label:"关键字",prop:"key"}},[n("el-input",{attrs:{placeholder:"关键字"},model:{value:t.filterForm.key,callback:function(e){t.$set(t.filterForm,"key",e)},expression:"filterForm.key"}})],1),n("el-form-item",{attrs:{label:"审核状态"}},[n("el-select",{staticClass:"w100",attrs:{placeholder:"所有"},model:{value:t.filterForm.publish,callback:function(e){t.$set(t.filterForm,"publish",e)},expression:"filterForm.publish"}},[n("el-option",{attrs:{value:"all",label:"所有"}},[t._v("所有")]),n("el-option",{attrs:{value:"true",label:"已审核"}},[t._v("已审核")]),n("el-option",{attrs:{value:"false",label:"未审核"}},[t._v("未审核")])],1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")]),n("el-button",{on:{click:t.resetFilterForm}},[t._v("重置")])],1)],1),n("router-link",{attrs:{to:"/system/create"}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:edit"],expression:"['shopman:edit']"}],attrs:{type:"primary",icon:"el-icon-edit"}},[t._v(" 添加 ")])],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%","margin-top":"30px"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{width:"180px",align:"center",label:"添加时间"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("span",[t._v(t._s(t._f("parseTime")(i.createdAt)))])]}}])}),n("el-table-column",{attrs:{"min-width":"200px",label:"店铺名"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/system/edit/"+i._id}},[n("span",[t._v(t._s(i.name))])])]}}])}),n("el-table-column",{attrs:{label:"ID"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/system/edit/"+i._id}},[n("span",[t._v(t._s(i.sid))])])]}}])}),n("el-table-column",{attrs:{label:"区域"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("span",[t._v(t._s(i.areaStr))])]}}])}),n("el-table-column",{attrs:{prop:"publish",align:"center",label:"审核状态"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[n("el-tag",{attrs:{size:"small",type:i.publish?"info":"danger"}},[t._v(t._s(t.formPublish(i.publish)))])]}}])}),n("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"320"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:review"],expression:"['shopman:review']"}],staticStyle:{"margin-left":"10px"},attrs:{type:e.row.publish?"warning":"success",size:"small"},on:{click:function(n){return t.publishShop(e)}}},[t._v(" "+t._s(e.row.publish?"取消审核":"通过审核")+" ")]),n("router-link",{attrs:{to:"/system/edit/"+e.row._id}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:edit"],expression:"['shopman:edit']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"small",icon:"el-icon-edit"}},[t._v(" 编辑 ")])],1),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopman:delete"],expression:"['shopman:delete']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"danger",size:"small"},on:{click:function(n){return t.handleDelete(e)}}},[t._v(" "+t._s(t.$t("permission.delete"))+" ")])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},pagination:t.getList}})],1)},a=[],r=n("1da1"),o=n("d4ec"),s=n("bee2"),u=n("262e"),l=n("2caf"),c=(n("a434"),n("96cf"),n("9ab4")),p=n("1b40"),d=n("333d"),f=n("db85"),m=n("d257"),h=function(t){Object(u["a"])(n,t);var e=Object(l["a"])(n);function n(){var t;return Object(o["a"])(this,n),t=e.apply(this,arguments),t.total=0,t.list=[],t.listLoading=!0,t.listQuery={page:1,limit:20,key:"",publish:"all"},t.filterForm={key:"",publish:"all"},t}return Object(s["a"])(n,[{key:"created",value:function(){this.getList()}},{key:"activated",value:function(){this.getList()}},{key:"getList",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.listLoading=!0,t.next=3,Object(f["h"])(this.listQuery);case 3:e=t.sent,n=e.data,this.listLoading=!1,this.list=n.records,this.total=n.total;case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"formPublish",value:function(t){return t?"已审核":"未审核"}},{key:"handleDelete",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.$index,i=e.row,t.next=3,this.$confirm("确认删除该店铺?","Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:return t.next=5,Object(f["b"])(i._id);case 5:this.list.splice(n,1),this.$message({type:"success",message:"删除成功!"});case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"publishShop",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.row,i=n.publish?"确认取消该店铺的审核状态?":"确定通过该店铺的审核?",t.prev=2,t.next=5,this.$confirm(i,"Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 5:return t.next=7,Object(f["l"])({id:n._id,publish:!n.publish});case 7:n.publish=!n.publish,t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](2),console.log(t.t0);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"search",value:function(){this.filterData()}},{key:"filterData",value:function(){this.listQuery.key=this.filterForm.key,this.listQuery.page=1,this.listQuery.publish=this.filterForm.publish,this.getList()}},{key:"resetFilterForm",value:function(){this.$refs.filterForm.resetFields()}}]),n}(p["c"]);h=Object(c["a"])([Object(p["a"])({name:"ShopList",components:{Pagination:d["a"]},filters:{parseTime:function(t){return Object(m["c"])(t)}}})],h);var b=h,g=b,v=(n("b1bd"),n("0c7c")),y=Object(v["a"])(g,i,a,!1,null,"24219b39",null);e["default"]=y.exports},db85:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"h",(function(){return r})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"j",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"k",(function(){return c})),n.d(e,"f",(function(){return p})),n.d(e,"g",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"l",(function(){return m})),n.d(e,"c",(function(){return h})),n.d(e,"i",(function(){return b}));var i=n("b32d"),a={name:"",address:"",logo:"",qtypes:[]},r=function(t){return Object(i["a"])({url:"/api/shops",method:"post",params:t})},o=function(t,e){return Object(i["a"])({url:"/api/shop/".concat(t),method:"get",params:e})},s=function(){return Object(i["a"])({url:"/api/myshop",method:"get"})},u=function(t){return Object(i["a"])({url:"/api/shop/save",method:"post",data:t})},l=function(t){return Object(i["a"])({url:"/api/shop/".concat(t,"/delete"),method:"post"})},c=function(t){return Object(i["a"])({url:"/api/shop/gameinfo/save",method:"post",data:t})},p=function(t){return Object(i["a"])({url:"/api/shop/gameinfo",method:"post",data:t})},d=function(t){return Object(i["a"])({url:"/api/shop/gameqr",method:"post",data:t})},f=function(t){return Object(i["a"])({url:"/api/shop/save_qtype",method:"post",data:t})},m=function(t){return Object(i["a"])({url:"/api/shop/publish",method:"post",data:t})},h=function(t){return Object(i["a"])({url:"/api/shop/gametheme",method:"post",data:t})},b=function(t){return Object(i["a"])({url:"/api/shop/gametheme/save",method:"post",data:t})}}}]);
//# sourceMappingURL=chunk-8d6861b8.178fbcd5.js.map