(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2dc03871","chunk-b7b74f52","chunk-4aaf9a2f","chunk-b7b74f52","chunk-f6657b32","chunk-2d0bb266","chunk-2d0ac361","chunk-2d216ba7","chunk-2d0a4474"],{"0680":function(t,e,r){"use strict";r.r(e),r.d(e,"getDict",(function(){return i}));var n=r("1da1"),a=(r("96cf"),r("4360")),i=function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,a["store"].dispatch("dictionary/getDictionary",e);case 2:return t.abrupt("return",a["store"].getters["dictionary/getDictionary"][e]);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},1925:function(t,e,r){"use strict";r.r(e),r.d(e,"searchApi",(function(){return a}));var n=r("b775"),a=function(t){return Object(n["default"])({url:"/admin/search",method:"post",data:t})}},"270d2":function(t,e,r){"use strict";r("66b5")},"39f0":function(t,e,r){"use strict";r.r(e),r.d(e,"findExam",(function(){return a})),r.d(e,"addExam",(function(){return i})),r.d(e,"getWxGroupList",(function(){return o})),r.d(e,"getWxUserGroupList",(function(){return s})),r.d(e,"getWxAnswerList",(function(){return u})),r.d(e,"postData",(function(){return l}));var n=r("b775"),a=function(t){return Object(n["default"])({url:"/admin/findExam",method:"post",data:t})},i=function(t){return Object(n["default"])({url:"/admin/addExam",method:"post",data:t})},o=function(t){return Object(n["default"])({url:"/admin/getWxGroupList",method:"post",data:t})},s=function(t){return Object(n["default"])({url:"/admin/getWxUserGroupList",method:"post",data:t})},u=function(t){return Object(n["default"])({url:"/admin/getWxAnswerList",method:"post",data:t})},l=function(t,e){return Object(n["default"])({url:"/admin/".concat(t),method:"post",data:e})}},"408a":function(t,e,r){var n=r("e330");t.exports=n(1..valueOf)},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,r){var n=r("e330"),a=r("1d80"),i=r("577e"),o=r("5899"),s=n("".replace),u="["+o+"]",l=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),f=function(t){return function(e){var r=i(a(e));return 1&t&&(r=s(r,l,"")),2&t&&(r=s(r,c,"")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},"66b5":function(t,e,r){},"7d57":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"button-box clearflex"},[r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogFormVisible=!0}}},[t._v("新增题库")])],1),r("div",{staticClass:"search-term"},[r("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.searchInfo}})],1),r("el-table",{attrs:{data:t.tableData,border:"",stripe:""}},[r("el-table-column",{attrs:{label:"ID",width:"70",prop:"groupId"}}),r("el-table-column",{attrs:{label:"训练题库",prop:"name"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[n.edit?r("el-input",{staticClass:"edit-input",attrs:{size:"small"},model:{value:n.title,callback:function(e){t.$set(n,"title",e)},expression:"row.title"}}):r("span",[t._v(t._s(n.title))])]}}])}),r("el-table-column",{attrs:{label:"考试题数",prop:"marks"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[n.edit?r("el-input",{attrs:{type:"number",size:"small"},model:{value:n.counter,callback:function(e){t.$set(n,"counter",e)},expression:"row.counter"}}):r("span",[t._v(t._s(n.counter))])]}}])}),r("el-table-column",{attrs:{label:"考试时长[秒]",prop:"marks"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[n.edit?r("el-input",{attrs:{type:"number",size:"small"},model:{value:n.duration,callback:function(e){t.$set(n,"duration",e)},expression:"row.duration"}}):r("span",[t._v(t._s(n.duration))])]}}])}),r("el-table-column",{attrs:{label:"开放时间",prop:"startAt"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[n.edit?r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",align:"left"},model:{value:n.fromDate,callback:function(e){t.$set(n,"fromDate",e)},expression:"row.fromDate"}}):r("span",[t._v(t._s(n.fromDate))])]}}])}),r("el-table-column",{attrs:{label:"过期时间",prop:"endAt"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[n.edit?r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",align:"left"},model:{value:n.toDate,callback:function(e){t.$set(n,"toDate",e)},expression:"row.toDate"}}):r("span",[t._v(t._s(n.toDate))])]}}])}),r("el-table-column",{attrs:{align:"center",width:"160px",label:"操作","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row,a=e.$index;return[n.edit?r("el-button",{attrs:{type:"success",size:"small",icon:"el-icon-circle-check"},on:{click:function(e){return t.confirmEdit(n,a)}}},[t._v("提交")]):t._e(),n.edit?r("el-button",{staticClass:"cancel-btn",attrs:{size:"small",icon:"el-icon-refresh",type:"warning"},on:{click:function(e){return t.cancelEdit(n,a)}}},[t._v("取消")]):t._e(),n.edit?t._e():r("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(e){return t.initEdit(n,a)}}},[t._v("编辑")]),n.edit?t._e():r("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-info"},on:{click:function(e){return t.gotoPaper(n.groupId)}}},[t._v("管理")])]}}])})],1),r("el-pagination",{style:{float:"right",padding:"20px"},attrs:{"current-page":t.page,"page-size":t.pageSize,"page-sizes":[10,30,50,100],total:t.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}}),r("el-dialog",{attrs:{title:"新增题库",center:"",visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[r("el-form",{ref:"elForm",attrs:{model:t.form,rules:t.rules,"label-width":"120px"}},[r("el-form-item",{attrs:{label:"训练题库",prop:"title"}},[r("el-input",{staticClass:"user-form-item",attrs:{type:"text",clearable:""},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),r("el-form-item",{attrs:{label:"考题数",prop:"counter"}},[r("el-input",{staticClass:"user-form-item",attrs:{type:"number",clearable:""},model:{value:t.form.counter,callback:function(e){t.$set(t.form,"counter",e)},expression:"form.counter"}})],1),r("el-form-item",{attrs:{label:"时长[秒]",prop:"duration"}},[r("el-input",{staticClass:"user-form-item",attrs:{type:"number",clearable:""},model:{value:t.form.duration,callback:function(e){t.$set(t.form,"duration",e)},expression:"form.duration"}})],1),r("el-form-item",{attrs:{label:"开始时间",prop:"fromDate"}},[r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",align:"left"},model:{value:t.form.fromDate,callback:function(e){t.$set(t.form,"fromDate",e)},expression:"form.fromDate"}})],1),r("el-form-item",{attrs:{label:"结束时间",prop:"toDate"}},[r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",align:"left"},model:{value:t.form.toDate,callback:function(e){t.$set(t.form,"toDate",e)},expression:"form.toDate"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:t.addGroup}},[t._v("确 定")])],1)],1)],1)},a=[],i=r("1da1"),o=(r("b0c0"),r("96cf"),r("39f0")),s=r("c466"),u=r("a4a2"),l=(r("ed08"),r("5f17")),c={name:"Api",data:function(){return{listApi:o["getWxGroupList"],dialogFormVisible:!1,dialogTitle:"新增广告",boolVal:[0,1],form:{id:0,title:"",fromDate:"",counter:10,toDate:"",duration:300},searchInfo:{},page:1,total:10,pageSize:10,tableData:[],rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],counter:[{required:!0,message:"请输入题数",trigger:"blur"}],fromDate:[{required:!0,message:"请输入开始时间",trigger:"blur"}],toDate:[{required:!0,message:"请输入结束时间",trigger:"blur"}],duration:[{required:!0,message:"请输入时长",trigger:"blur"}]}}},components:{DropSearch:l["default"]},mixins:[u["default"]],methods:{onSubmit:function(){this.page=1,this.pageSize=10,this.getTableData()},cancelEdit:function(t,e){t=Object.assign(t,t.temp),t.edit=!1,delete t["temp"]},initEdit:function(t,e){var r=Object.assign({},t);t.edit=!0,t.temp=r},doCreateCategory:function(){var t=this;this.$refs.addAd.validate(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:n=Object.assign({},t.form),n.starime=Object(s["toDatetime"])(n.end_time),n.end_time=n.startTime+60*n.duration,createCategory(n).then((function(e){t.$message.successMsg("新增成功",1),t.dialogFormVisible=!1,t.getTableData()}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},confirmEdit:function(t){var e=this,r=Object.assign({},t);Object(o["postData"])("addWxGroup",r).then((function(r){200==r.code&&(t.edit=!1,delete t["temp"],e.$message.successMsg("编辑成功",1))}))},handleSizeChange:function(t){this.pageSize=t,this.getTableData()},handleCurrentChange:function(t){this.page=t,this.getTableData()},okGroup:function(t){console.log("groupName",t),this.form.groupId=t.id,this.form.groupName=t.name},gotoPaper:function(t){this.$router.push({name:"exam_paper",query:{groupId:t}})},addGroup:function(){var t=this;this.$refs["elForm"].validate((function(e){if(e){var r=Object.assign({},t.form);r.duration=+r.duration,r.counter=+r.counter,Object(o["postData"])("addWxGroup",r).then((function(e){200==e.code&&(t.dialogFormVisible=!1,t.$message.successMsg("新增成功",1),t.getTableData())}))}}))}},filters:{toDatetime:s["toDatetime"]},created:function(){this.getTableData()}},f=c,d=(r("270d2"),r("2877")),p=Object(d["a"])(f,n,a,!1,null,"54b3df37",null);e["default"]=p.exports},a4a2:function(t,e,r){"use strict";r.r(e);var n=r("5530"),a=r("1da1"),i=(r("96cf"),r("4de4"),r("d3b7"),r("159b"),r("d81d"),r("0680"));r("c466"),r("ed08");e["default"]={data:function(){return{page:1,total:10,size:10,tableData:[],searchInfo:{isFinish:0}}},watch:{},methods:{filterDict:function(t,e){var r=this[e+"Options"]&&this[e+"Options"].filter((function(e){return e.value==t}));return r&&r[0]&&r[0].label},getDict:function(t){var e=this;return Object(a["a"])(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["getDict"])(t);case 2:return n=r.sent,e[t+"Options"]=n,r.abrupt("return",n);case 5:case"end":return r.stop()}}),r)})))()},handleSizeChange:function(t){this.size=t,this.getTableData()},handleCurrentChange:function(t){this.page=t,this.getTableData()},handleSelectAll:function(t){console.log("handleSelectAll",t),this[t].forEach((function(t){t._selected=!0}))},handleSelectNull:function(t){console.log("handleSelectNull",t),this[t].forEach((function(t){t._selected=!1}))},handleChangeItem:function(t,e,r){this[t][e]=r(this[t][e])},getAllTableData:function(t){var e=Object(n["a"])({size:1e4,from:0},this.searchInfo);this.listApi(e).then((function(e){t(e)}))},getTableData:function(){var t=arguments,e=this;return Object(a["a"])(regeneratorRuntime.mark((function r(){var a,i,o,s,u;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=t.length>0&&void 0!==t[0]?t[0]:e.page,i=t.length>1&&void 0!==t[1]?t[1]:e.size,o=(a-1)*i,s=Object(n["a"])({size:i,from:o},e.searchInfo),r.next=6,e.listApi(s);case 6:u=r.sent,200==u.code&&(e.tableData=u.data.list.map((function(t){return t.edit=!1,t._selected=!1,t})),e.total=u.data.total);case 8:case"end":return r.stop()}}),r)})))()}}}},a9e3:function(t,e,r){"use strict";var n=r("83ab"),a=r("da84"),i=r("e330"),o=r("94ca"),s=r("6eeb"),u=r("1a2d"),l=r("7156"),c=r("3a9b"),f=r("d9b5"),d=r("c04e"),p=r("d039"),m=r("241c").f,g=r("06cf").f,b=r("9bf2").f,h=r("408a"),v=r("58a8").trim,y="Number",D=a[y],x=D.prototype,k=a.TypeError,w=i("".slice),_=i("".charCodeAt),S=function(t){var e=d(t,"number");return"bigint"==typeof e?e:E(e)},E=function(t){var e,r,n,a,i,o,s,u,l=d(t,"number");if(f(l))throw k("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=v(l),e=_(l,0),43===e||45===e){if(r=_(l,2),88===r||120===r)return NaN}else if(48===e){switch(_(l,1)){case 66:case 98:n=2,a=49;break;case 79:case 111:n=8,a=55;break;default:return+l}for(i=w(l,2),o=i.length,s=0;sa)return NaN;return parseInt(i,n)}return+l};if(o(y,!D(" 0o1")||!D("0b1")||D("+0x1"))){for(var M,O=function(t){var e=arguments.length<1?0:D(S(t)),r=this;return c(x,r)&&p((function(){h(r)}))?l(Object(e),r,O):e},I=n?m(D):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),j=0;I.length>j;j++)u(D,M=I[j])&&!u(O,M)&&b(O,M,g(D,M));O.prototype=x,x.constructor=O,s(a,y,O)}},c466:function(t,e,r){"use strict";r.r(e),r.d(e,"curDate",(function(){return n})),r.d(e,"formatTimeToStr",(function(){return a})),r.d(e,"toDatetime",(function(){return i})),r.d(e,"toDate",(function(){return o})),r.d(e,"toDateShow",(function(){return s})),r.d(e,"getDate",(function(){return u}));r("ac1f"),r("00b4"),r("5319"),r("4d63"),r("c607"),r("2c3e"),r("25f0");function n(){var t=(new Date).Format("yyyy-MM-dd");return t.toLocaleString()}function a(t,e){var r=new Date(t).Format("yyyy-MM-dd hh:mm:ss");return e&&(r=new Date(t).Format(e)),r.toLocaleString()}function i(t){if(!t)return"2020-01-01 00:00:00";var e=new Date(t).Format("yyyy-MM-dd hh:mm:ss");return e.toLocaleString()}function o(t){if(!t)return"2020-01-01";var e=new Date(t).Format("yyyy-MM-dd");return e.toLocaleString()}function s(t){if(!t)return"---";var e=new Date(t).Format("yyyy-MM-dd");return e.toLocaleString()}function u(t){var e=new Date;return e.setDate(e.getDate()+t),o(e)}Date.prototype.Format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[r]:("00"+e[r]).substr((""+e[r]).length)));return t}}}]);