2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c01eabb6"],{"04a9":function(t,e,n){},"333d":function(t,e,n){"use strict";var r=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)},i=[],a=n("d4ec"),o=n("bee2"),u=n("262e"),s=n("2caf"),c=n("9ab4"),l=n("1b40"),f=(n("4795"),function(t,e,n,r){return t/=r/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)}}(),p=function(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t},h=function(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop},m=function(t,e,n){var r=h(),i=t-r,a=20,o=0;e="undefined"===typeof e?500:e;var u=function t(){o+=a;var u=f(o,r,i,e);p(u),o<e?d(t):n&&"function"===typeof n&&n()};u()},v=function(t){Object(u["a"])(n,t);var e=Object(s["a"])(n);function n(){return Object(a["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&&m(0,800)}},{key:"handleCurrentChange",value:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&m(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")),O=Object(y["a"])(g,r,i,!1,null,"2f4afb68",null);e["a"]=O.exports},"34cc":function(t,e,n){"use strict";n("04a9")},4795:function(t,e,n){var r=n("23e7"),i=n("da84"),a=n("342f"),o=[].slice,u=/MSIE .\./.test(a),s=function(t){return function(e,n){var r=arguments.length>2,i=r?o.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:u},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},"4f10":function(t,e,n){"use strict";n.r(e);var r=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:"分类",prop:"key"}},[n("el-cascader",{attrs:{options:t.typeOptions,filterable:"",clearable:"",size:"medium"},model:{value:t.filterForm.typeSelect,callback:function(e){t.$set(t.filterForm,"typeSelect",e)},expression:"filterForm.typeSelect"}})],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:"/question/create"}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["question:edit"],expression:"['question: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 r=e.row;return[n("span",[t._v(t._s(t._f("parseTime")(r.createtime)))])]}}])}),n("el-table-column",{attrs:{label:"分类"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("span",[t._v(t._s(r.category))])]}}])}),n("el-table-column",{attrs:{"min-width":"200px",label:"名称"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("router-link",{staticClass:"link-type",attrs:{to:"/question/edit/"+r._id}},[n("span",[t._v(t._s(r.question))])])]}}])}),n("el-table-column",{attrs:{label:"答案"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("span",[t._v(t._s(r.a1))])]}}])}),n("el-table-column",{attrs:{label:"混淆答案"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[n("span",[t._v(t._s(r.a2||"")+" "+t._s(r.a3||"")+" "+t._s(r.a4||""))])]}}])}),n("el-table-column",{attrs:{label:"Tags"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return t._l(r.groups,(function(e){return n("el-tag",{key:e},[t._v(t._s(e))])}))}}])}),n("el-table-column",{attrs:{align:"center",width:"180",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("router-link",{attrs:{to:"/question/edit/"+e.row._id}},[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["question:edit"],expression:"['question:edit']"}],attrs:{type:"primary",size:"small",icon:"el-icon-edit"}},[t._v(" 编辑 ")])],1),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["question:delete"],expression:"['question: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)},i=[],a=n("b85c"),o=n("1da1"),u=n("d4ec"),s=n("bee2"),c=n("262e"),l=n("2caf"),f=(n("96cf"),n("d3b7"),n("6062b"),n("3ca3"),n("ddb0"),n("a434"),n("b0c0"),n("9ab4")),d=n("1b40"),p=n("333d"),h=n("db85"),m=n("d257"),v=n("63a2"),b=function(t){Object(c["a"])(n,t);var e=Object(l["a"])(n);function n(){var t;return Object(u["a"])(this,n),t=e.apply(this,arguments),t.total=0,t.list=[],t.listLoading=!0,t.allDepts=[],t.listQuery={page:1,limit:20,key:"",tag:"",sub_tag:"",groups:""},t.typeOptions=[],t.tagSet=new Set,t.tagOptions=[],t.filterForm={key:"",typeSelect:[]},t}return Object(s["a"])(n,[{key:"created",value:function(){this.getList(),this.getRemoteTags(),this.getRemoteCategory()}},{key:"getList",value:function(){var t=Object(o["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(v["f"])(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:"handleDelete",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.$index,r=e.row,t.next=3,this.$confirm("确认删除该记录?","Warning",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:return t.next=5,Object(v["b"])(r._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:"search",value:function(){this.filterData()}},{key:"filterData",value:function(){this.listQuery.key=this.filterForm.key,this.filterForm.typeSelect.length>0&&(this.listQuery.tag=this.filterForm.typeSelect[0]),this.filterForm.typeSelect.length>1&&(this.listQuery.sub_tag=this.filterForm.typeSelect[1]),this.listQuery.page=1,this.getList()}},{key:"resetFilterForm",value:function(){this.$refs.filterForm.resetFields()}},{key:"getRemoteDeptList",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(h["h"])({key:e});case 2:if(n=t.sent,r=n.data,r.records){t.next=6;break}return t.abrupt("return");case 6:this.allDepts=r.records;case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"getRemoteTags",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(v["d"])();case 2:e=t.sent,n=e.data,console.log(n),this.tagSet=new Set(n),this.tagOptions=n;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getRemoteCategory",value:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e,n,r,i,o,u,s,c,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(v["c"])();case 2:e=t.sent,n=e.data,r=Object(a["a"])(n);try{for(r.s();!(i=r.n()).done;){o=i.value,u=[],s=Object(a["a"])(o.children);try{for(s.s();!(c=s.n()).done;)l=c.value,u.push({value:l._id,label:l.name})}catch(f){s.e(f)}finally{s.f()}this.typeOptions.push({value:o._id,label:o.name,children:u})}}catch(f){r.e(f)}finally{r.f()}case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()}]),n}(d["c"]);b=Object(f["a"])([Object(d["a"])({name:"QuestionList",components:{Pagination:p["a"]},filters:{parseTime:function(t){return Object(m["c"])(t)},parseDate:function(t){return t?Object(m["c"])(t,"{y}-{m}-{d}"):"-"},formatCount:function(t){return t||0}}})],b);var g=b,y=g,O=n("0c7c"),j=Object(O["a"])(y,r,i,!1,null,null,null);e["default"]=j.exports},"6062b":function(t,e,n){"use strict";var r=n("6d61"),i=n("6566");t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},"63a2":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"f",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"i",(function(){return f})),n.d(e,"c",(function(){return d}));var r=n("b32d"),i={withNext:!1,quality:3,a1:"",question:""},a=function(t){return Object(r["a"])({url:"/api/puzzles",method:"post",params:t})},o=function(t,e){return Object(r["a"])({url:"/api/puzzle/".concat(t),method:"get",params:e})},u=function(t){return Object(r["a"])({url:"/api/nextpuzzle",method:"post",data:{id:t}})},s=function(t){return Object(r["a"])({url:"/api/puzzle/save",method:"post",data:t})},c=function(t){return Object(r["a"])({url:"/api/puzzle/".concat(t,"/delete"),method:"post"})},l=function(){return Object(r["a"])({url:"/api/tags",method:"get"})},f=function(t){return Object(r["a"])({url:"/api/tag/save",method:"post",data:{name:t}})},d=function(){return Object(r["a"])({url:"/api/question/categorys",method:"get"})}},6566:function(t,e,n){"use strict";var r=n("9bf2").f,i=n("7c73"),a=n("e2cc"),o=n("0366"),u=n("19aa"),s=n("2266"),c=n("7dd0"),l=n("2626"),f=n("83ab"),d=n("f183").fastKey,p=n("69f3"),h=p.set,m=p.getterFor;t.exports={getConstructor:function(t,e,n,c){var l=t((function(t,r){u(t,l,e),h(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),void 0!=r&&s(r,t[c],{that:t,AS_ENTRIES:n})})),p=m(e),v=function(t,e,n){var r,i,a=p(t),o=b(t,e);return o?o.value=n:(a.last=o={index:i=d(e,!0),key:e,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=o),r&&(r.next=o),f?a.size++:t.size++,"F"!==i&&(a.index[i]=o)),t},b=function(t,e){var n,r=p(t),i=d(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return a(l.prototype,{clear:function(){var t=this,e=p(t),n=e.index,r=e.first;while(r)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete n[r.index],r=r.next;e.first=e.last=void 0,f?e.size=0:t.size=0},delete:function(t){var e=this,n=p(e),r=b(e,t);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==r&&(n.first=i),n.last==r&&(n.last=a),f?n.size--:e.size--}return!!r},forEach:function(t){var e,n=p(this),r=o(t,arguments.length>1?arguments[1]:void 0,3);while(e=e?e.next:n.first){r(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!b(this,t)}}),a(l.prototype,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&r(l.prototype,"size",{get:function(){return p(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",i=m(e),a=m(r);c(t,e,(function(t,e){h(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){var t=a(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},"6d61":function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),a=n("94ca"),o=n("6eeb"),u=n("f183"),s=n("2266"),c=n("19aa"),l=n("861d"),f=n("d039"),d=n("1c7e"),p=n("d44e"),h=n("7156");t.exports=function(t,e,n){var m=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),b=m?"set":"add",g=i[t],y=g&&g.prototype,O=g,j={},k=function(t){var e=y[t];o(y,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})},w=a(t,"function"!=typeof g||!(v||y.forEach&&!f((function(){(new g).entries().next()}))));if(w)O=n.getConstructor(e,t,m,b),u.REQUIRED=!0;else if(a(t,!0)){var x=new O,_=x[b](v?{}:-0,1)!=x,S=f((function(){x.has(1)})),z=d((function(t){new g(t)})),F=!v&&f((function(){var t=new g,e=5;while(e--)t[b](e,e);return!t.has(-0)}));z||(O=e((function(e,n){c(e,O,t);var r=h(new g,e,O);return void 0!=n&&s(n,r[b],{that:r,AS_ENTRIES:m}),r})),O.prototype=y,y.constructor=O),(S||F)&&(k("delete"),k("has"),m&&k("get")),(F||_)&&k(b),v&&y.clear&&delete y.clear}return j[t]=O,r({global:!0,forced:O!=g},j),p(O,t),v||n.setStrong(O,t,m),O}},bb2f:function(t,e,n){var r=n("d039");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},db85:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"h",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return u})),n.d(e,"j",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"k",(function(){return l})),n.d(e,"f",(function(){return f})),n.d(e,"g",(function(){return d})),n.d(e,"m",(function(){return p})),n.d(e,"l",(function(){return h})),n.d(e,"c",(function(){return m})),n.d(e,"i",(function(){return v}));var r=n("b32d"),i={name:"",address:"",logo:"",qtypes:[]},a=function(t){return Object(r["a"])({url:"/api/shops",method:"post",params:t})},o=function(t,e){return Object(r["a"])({url:"/api/shop/".concat(t),method:"get",params:e})},u=function(){return Object(r["a"])({url:"/api/myshop",method:"get"})},s=function(t){return Object(r["a"])({url:"/api/shop/save",method:"post",data:t})},c=function(t){return Object(r["a"])({url:"/api/shop/".concat(t,"/delete"),method:"post"})},l=function(t){return Object(r["a"])({url:"/api/shop/gameinfo/save",method:"post",data:t})},f=function(t){return Object(r["a"])({url:"/api/shop/gameinfo",method:"post",data:t})},d=function(t){return Object(r["a"])({url:"/api/shop/gameqr",method:"post",data:t})},p=function(t){return Object(r["a"])({url:"/api/shop/save_qtype",method:"post",data:t})},h=function(t){return Object(r["a"])({url:"/api/shop/publish",method:"post",data:t})},m=function(t){return Object(r["a"])({url:"/api/shop/gametheme",method:"post",data:t})},v=function(t){return Object(r["a"])({url:"/api/shop/gametheme/save",method:"post",data:t})}},f183:function(t,e,n){var r=n("d012"),i=n("861d"),a=n("5135"),o=n("9bf2").f,u=n("90e3"),s=n("bb2f"),c=u("meta"),l=0,f=Object.isExtensible||function(){return!0},d=function(t){o(t,c,{value:{objectID:"O"+ ++l,weakData:{}}})},p=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,c)){if(!f(t))return"F";if(!e)return"E";d(t)}return t[c].objectID},h=function(t,e){if(!a(t,c)){if(!f(t))return!0;if(!e)return!1;d(t)}return t[c].weakData},m=function(t){return s&&v.REQUIRED&&f(t)&&!a(t,c)&&d(t),t},v=t.exports={REQUIRED:!1,fastKey:p,getWeakData:h,onFreeze:m};r[c]=!0}}]);
|
|
//# sourceMappingURL=chunk-c01eabb6.27ab833d.js.map
|