2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1461ada7"],{"04a9":function(e,t,n){},"333d":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[n("el-pagination",e._b({attrs:{background:e.background,"current-page":e.currentPage,"page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},a=[],i=n("d4ec"),o=n("bee2"),u=n("262e"),s=n("2caf"),c=n("9ab4"),l=n("1b40"),p=(n("4795"),function(e,t,n,r){return e/=r/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t)}),f=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}(),d=function(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e},m=function(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop},h=function(e,t,n){var r=m(),a=e-r,i=20,o=0;t="undefined"===typeof t?500:t;var u=function e(){o+=i;var u=p(o,r,a,t);d(u),o<t?f(e):n&&"function"===typeof n&&n()};u()},v=function(e){Object(u["a"])(n,e);var t=Object(s["a"])(n);function n(){return Object(i["a"])(this,n),t.apply(this,arguments)}return Object(o["a"])(n,[{key:"currentPage",get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},{key:"pageSize",get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}},{key:"handleSizeChange",value:function(e){this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&h(0,800)}},{key:"handleCurrentChange",value:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&h(0,800)}}]),n}(l["c"]);Object(c["a"])([Object(l["b"])({required:!0})],v.prototype,"total",void 0),Object(c["a"])([Object(l["b"])({default:1})],v.prototype,"page",void 0),Object(c["a"])([Object(l["b"])({default:20})],v.prototype,"limit",void 0),Object(c["a"])([Object(l["b"])({default:function(){return[10,20,30,50]}})],v.prototype,"pageSizes",void 0),Object(c["a"])([Object(l["b"])({default:"total, sizes, prev, pager, next, jumper"})],v.prototype,"layout",void 0),Object(c["a"])([Object(l["b"])({default:!0})],v.prototype,"background",void 0),Object(c["a"])([Object(l["b"])({default:!0})],v.prototype,"autoScroll",void 0),Object(c["a"])([Object(l["b"])({default:!1})],v.prototype,"hidden",void 0),v=Object(c["a"])([Object(l["a"])({name:"Pagination"})],v);var b=v,g=b,y=(n("34cc"),n("0c7c")),x=Object(y["a"])(g,r,a,!1,null,"2f4afb68",null);t["a"]=x.exports},"34cc":function(e,t,n){"use strict";n("04a9")},3649: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("div",{staticClass:"app-container"},[n("el-form",{ref:"filterForm",staticClass:"filter",attrs:{inline:!0,model:e.filterForm}},[n("el-form-item",{attrs:{label:"关键字",prop:"key"}},[n("el-input",{attrs:{placeholder:"关键字"},model:{value:e.filterForm.key,callback:function(t){e.$set(e.filterForm,"key",t)},expression:"filterForm.key"}})],1),1===e.userLevel?n("el-form-item",{attrs:{label:"店铺",prop:"key"}},[n("el-select",{staticClass:"w100",attrs:{placeholder:"选择店铺",name:"shop",required:""},model:{value:e.filterForm.shop,callback:function(t){e.$set(e.filterForm,"shop",t)},expression:"filterForm.shop"}},e._l(e.allDepts,(function(e){return n("el-option",{key:e._id,attrs:{label:e.name,value:e._id}})})),1)],1):e._e(),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("查询")]),n("el-button",{on:{click:e.resetFilterForm}},[e._v("重置")])],1)],1),n("router-link",{attrs:{to:"/shop/exam_new"}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopexam:edit"],expression:"['shopexam:edit']"}],attrs:{type:"primary",icon:"el-icon-edit"}},[e._v(" 添加 ")])],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%","margin-top":"30px"},attrs:{data:e.list,border:"",fit:"",stripe:"","highlight-current-row":""}},[n("el-table-column",{attrs:{width:"180px",align:"center",label:"添加时间"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[n("span",[e._v(e._s(e._f("parseTime")(r.createdAt)))])]}}])}),1===e.userLevel?n("el-table-column",{attrs:{label:"店铺",prop:"shop",formatter:e.formatDept}}):e._e(),n("el-table-column",{attrs:{"min-width":"200px",label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/shop/exam_edit/"+r._id}},[n("span",[e._v(e._s(r.name))])])]}}])}),n("el-table-column",{attrs:{label:"是否启用",prop:"active",formatter:e.formatBool}}),n("el-table-column",{attrs:{label:"题目类型",prop:"source",formatter:e.formatSource}}),n("el-table-column",{attrs:{align:"center",width:"180",label:"操作",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("router-link",{attrs:{to:"/shop/exam_edit/"+t.row._id}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopexam:edit"],expression:"['shopexam:edit']"}],attrs:{type:"primary",size:"small",icon:"el-icon-edit"}},[e._v(" 编辑 ")])],1),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shopexam:delete"],expression:"['shopexam:delete']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"danger",size:"small"},on:{click:function(n){return e.handleDelete(t)}}},[e._v(" "+e._s(e.$t("permission.delete"))+" ")])]}}])})],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.limit},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"limit",t)},pagination:e.getList}})],1)},a=[],i=n("b85c"),o=n("1da1"),u=n("d4ec"),s=n("bee2"),c=n("262e"),l=n("2caf"),p=(n("96cf"),n("d3b7"),n("6062b"),n("3ca3"),n("ddb0"),n("a434"),n("b0c0"),n("9ab4")),f=n("1b40"),d=n("333d"),m=n("db85"),h=n("d257"),v=n("63a2"),b=n("fabe"),g=n("9dba"),y=function(e){Object(c["a"])(n,e);var t=Object(l["a"])(n);function n(){var e;return Object(u["a"])(this,n),e=t.apply(this,arguments),e.total=0,e.list=[],e.listLoading=!0,e.allDepts=[],e.listQuery={page:1,limit:20,key:"",shop:""},e.typeOptions=[],e.tagSet=new Set,e.tagOptions=[],e.filterForm={key:"",shop:""},e}return Object(s["a"])(n,[{key:"userLevel",get:function(){return g["a"].level}},{key:"created",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(1!==g["a"].level){e.next=5;break}return e.next=3,this.getRemoteDeptList();case 3:e.next=7;break;case 5:this.filterForm.shop=g["a"].department,this.listQuery.shop=g["a"].department;case 7:return e.next=9,this.getRemoteCategory();case 9:return e.next=11,this.getList();case 11:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getList",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.listLoading=!0,e.next=3,Object(b["d"])(this.listQuery);case 3:t=e.sent,n=t.data,this.listLoading=!1,this.list=n.records,this.total=n.total;case 8:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"handleDelete",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.$index,r=t.row,e.next=3,this.$confirm("确认删除该记录?","Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:return e.next=5,Object(b["b"])(r._id);case 5:this.list.splice(n,1),this.$message({type:"success",message:"删除成功!"});case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"search",value:function(){this.filterData()}},{key:"filterData",value:function(){this.listQuery.key=this.filterForm.key,this.listQuery.shop=this.filterForm.shop,this.listQuery.page=1,this.getList()}},{key:"resetFilterForm",value:function(){this.$refs.filterForm.resetFields()}},{key:"getRemoteDeptList",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(m["h"])({});case 2:if(t=e.sent,n=t.data,n.records){e.next=6;break}return e.abrupt("return");case 6:this.allDepts=n.records;case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getRemoteTags",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(v["d"])();case 2:t=e.sent,n=t.data,console.log(n),this.tagSet=new Set(n),this.tagOptions=n;case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getRemoteCategory",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,n,r,a,o,u,s,c,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(v["c"])();case 2:t=e.sent,n=t.data,r=Object(i["a"])(n);try{for(r.s();!(a=r.n()).done;){o=a.value,u=[],s=Object(i["a"])(o.children);try{for(s.s();!(c=s.n()).done;)l=c.value,u.push({value:l._id,label:l.name})}catch(p){s.e(p)}finally{s.f()}this.typeOptions.push({value:o._id,label:o.name,children:u})}}catch(p){r.e(p)}finally{r.f()}case 6:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"formatDept",value:function(e,t,n){var r,a="未指定",o=Object(i["a"])(this.allDepts);try{for(o.s();!(r=o.n()).done;){var u=r.value;if(u._id===n){a=u.name;break}}}catch(s){o.e(s)}finally{o.f()}return a}},{key:"formatBool",value:function(e,t,n){return n?"是":"否"}},{key:"formatSource",value:function(e,t,n){return n?"自定义":"系统"}}]),n}(f["c"]);y=Object(p["a"])([Object(f["a"])({name:"ExamList",components:{Pagination:d["a"]},filters:{parseTime:function(e){return Object(h["c"])(e)},parseDate:function(e){return e?Object(h["c"])(e,"{y}-{m}-{d}"):"-"},formatCount:function(e){return e||0}}})],y);var x=y,O=x,j=n("0c7c"),k=Object(j["a"])(O,r,a,!1,null,null,null);t["default"]=k.exports},4795:function(e,t,n){var r=n("23e7"),a=n("da84"),i=n("342f"),o=[].slice,u=/MSIE .\./.test(i),s=function(e){return function(t,n){var r=arguments.length>2,a=r?o.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,a)}:t,n)}};r({global:!0,bind:!0,forced:u},{setTimeout:s(a.setTimeout),setInterval:s(a.setInterval)})},"6062b":function(e,t,n){"use strict";var r=n("6d61"),a=n("6566");e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),a)},"63a2":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"i",(function(){return p})),n.d(t,"c",(function(){return f}));var r=n("b32d"),a={withNext:!1,quality:3,a1:"",question:""},i=function(e){return Object(r["a"])({url:"/api/puzzles",method:"post",params:e})},o=function(e,t){return Object(r["a"])({url:"/api/puzzle/".concat(e),method:"get",params:t})},u=function(e){return Object(r["a"])({url:"/api/nextpuzzle",method:"post",data:{id:e}})},s=function(e){return Object(r["a"])({url:"/api/puzzle/save",method:"post",data:e})},c=function(e){return Object(r["a"])({url:"/api/puzzle/".concat(e,"/delete"),method:"post"})},l=function(){return Object(r["a"])({url:"/api/tags",method:"get"})},p=function(e){return Object(r["a"])({url:"/api/tag/save",method:"post",data:{name:e}})},f=function(){return Object(r["a"])({url:"/api/question/categorys",method:"get"})}},6566:function(e,t,n){"use strict";var r=n("9bf2").f,a=n("7c73"),i=n("e2cc"),o=n("0366"),u=n("19aa"),s=n("2266"),c=n("7dd0"),l=n("2626"),p=n("83ab"),f=n("f183").fastKey,d=n("69f3"),m=d.set,h=d.getterFor;e.exports={getConstructor:function(e,t,n,c){var l=e((function(e,r){u(e,l,t),m(e,{type:t,index:a(null),first:void 0,last:void 0,size:0}),p||(e.size=0),void 0!=r&&s(r,e[c],{that:e,AS_ENTRIES:n})})),d=h(t),v=function(e,t,n){var r,a,i=d(e),o=b(e,t);return o?o.value=n:(i.last=o={index:a=f(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=o),r&&(r.next=o),p?i.size++:e.size++,"F"!==a&&(i.index[a]=o)),e},b=function(e,t){var n,r=d(e),a=f(t);if("F"!==a)return r.index[a];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(l.prototype,{clear:function(){var e=this,t=d(e),n=t.index,r=t.first;while(r)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;t.first=t.last=void 0,p?t.size=0:e.size=0},delete:function(e){var t=this,n=d(t),r=b(t,e);if(r){var a=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=a),a&&(a.previous=i),n.first==r&&(n.first=a),n.last==r&&(n.last=i),p?n.size--:t.size--}return!!r},forEach:function(e){var t,n=d(this),r=o(e,arguments.length>1?arguments[1]:void 0,3);while(t=t?t.next:n.first){r(t.value,t.key,this);while(t&&t.removed)t=t.previous}},has:function(e){return!!b(this,e)}}),i(l.prototype,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return v(this,0===e?0:e,t)}}:{add:function(e){return v(this,e=0===e?0:e,e)}}),p&&r(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(e,t,n){var r=t+" Iterator",a=h(t),i=h(r);c(e,t,(function(e,t){m(this,{type:r,target:e,state:a(e),kind:t,last:void 0})}),(function(){var e=i(this),t=e.kind,n=e.last;while(n&&n.removed)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(t)}}},"6d61":function(e,t,n){"use strict";var r=n("23e7"),a=n("da84"),i=n("94ca"),o=n("6eeb"),u=n("f183"),s=n("2266"),c=n("19aa"),l=n("861d"),p=n("d039"),f=n("1c7e"),d=n("d44e"),m=n("7156");e.exports=function(e,t,n){var h=-1!==e.indexOf("Map"),v=-1!==e.indexOf("Weak"),b=h?"set":"add",g=a[e],y=g&&g.prototype,x=g,O={},j=function(e){var t=y[e];o(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!l(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})},k=i(e,"function"!=typeof g||!(v||y.forEach&&!p((function(){(new g).entries().next()}))));if(k)x=n.getConstructor(t,e,h,b),u.REQUIRED=!0;else if(i(e,!0)){var w=new x,z=w[b](v?{}:-0,1)!=w,_=p((function(){w.has(1)})),S=f((function(e){new g(e)})),F=!v&&p((function(){var e=new g,t=5;while(t--)e[b](t,t);return!e.has(-0)}));S||(x=t((function(t,n){c(t,x,e);var r=m(new g,t,x);return void 0!=n&&s(n,r[b],{that:r,AS_ENTRIES:h}),r})),x.prototype=y,y.constructor=x),(_||F)&&(j("delete"),j("has"),h&&j("get")),(F||z)&&j(b),v&&y.clear&&delete y.clear}return O[e]=x,r({global:!0,forced:x!=g},O),d(x,e),v||n.setStrong(x,e,h),x}},bb2f:function(e,t,n){var r=n("d039");e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},db85:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"h",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return u})),n.d(t,"j",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"k",(function(){return l})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"l",(function(){return m})),n.d(t,"c",(function(){return h})),n.d(t,"i",(function(){return v}));var r=n("b32d"),a={name:"",address:"",logo:"",qtypes:[]},i=function(e){return Object(r["a"])({url:"/api/shops",method:"post",params:e})},o=function(e,t){return Object(r["a"])({url:"/api/shop/".concat(e),method:"get",params:t})},u=function(){return Object(r["a"])({url:"/api/myshop",method:"get"})},s=function(e){return Object(r["a"])({url:"/api/shop/save",method:"post",data:e})},c=function(e){return Object(r["a"])({url:"/api/shop/".concat(e,"/delete"),method:"post"})},l=function(e){return Object(r["a"])({url:"/api/shop/gameinfo/save",method:"post",data:e})},p=function(e){return Object(r["a"])({url:"/api/shop/gameinfo",method:"post",data:e})},f=function(e){return Object(r["a"])({url:"/api/shop/gameqr",method:"post",data:e})},d=function(e){return Object(r["a"])({url:"/api/shop/save_qtype",method:"post",data:e})},m=function(e){return Object(r["a"])({url:"/api/shop/publish",method:"post",data:e})},h=function(e){return Object(r["a"])({url:"/api/shop/gametheme",method:"post",data:e})},v=function(e){return Object(r["a"])({url:"/api/shop/gametheme/save",method:"post",data:e})}},f183:function(e,t,n){var r=n("d012"),a=n("861d"),i=n("5135"),o=n("9bf2").f,u=n("90e3"),s=n("bb2f"),c=u("meta"),l=0,p=Object.isExtensible||function(){return!0},f=function(e){o(e,c,{value:{objectID:"O"+ ++l,weakData:{}}})},d=function(e,t){if(!a(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,c)){if(!p(e))return"F";if(!t)return"E";f(e)}return e[c].objectID},m=function(e,t){if(!i(e,c)){if(!p(e))return!0;if(!t)return!1;f(e)}return e[c].weakData},h=function(e){return s&&v.REQUIRED&&p(e)&&!i(e,c)&&f(e),e},v=e.exports={REQUIRED:!1,fastKey:d,getWeakData:m,onFreeze:h};r[c]=!0},fabe:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return u})),n.d(t,"b",(function(){return s}));var r=n("b32d"),a={active:0,beginTime:0,endTime:1924963201e3,timeone:5,name:"",qcount:10,qtypes:[],shop:"",source:0,rewardInfo:[],questions:[]},i=function(e){return Object(r["a"])({url:"/api/exams",method:"post",params:e})},o=function(e,t){return Object(r["a"])({url:"/api/exam/".concat(e),method:"get",params:t})},u=function(e){return Object(r["a"])({url:"/api/exam/save",method:"post",data:e})},s=function(e){return Object(r["a"])({url:"/api/exam/".concat(e,"/delete"),method:"post"})}}}]);
|
|
//# sourceMappingURL=chunk-1461ada7.014b37fd.js.map
|