12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78405549"],{"049d":function(t,e,a){"use strict";var n=a("d2be"),i=a.n(n);i.a},"0aed":function(t,e,a){"use strict";a("aaba");var n=a("bf16"),i=a("86d4"),r=a("238a"),l=a("f6b4"),o=a("cb3d"),s=a("8714"),c=o("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),p=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var a="ab".split(t);return 2===a.length&&"a"===a[0]&&"b"===a[1]}();t.exports=function(t,e,a){var f=o(t),d=!r((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),h=d?!r((function(){var e=!1,a=/a/;return a.exec=function(){return e=!0,null},"split"===t&&(a.constructor={},a.constructor[c]=function(){return a}),a[f](""),!e})):void 0;if(!d||!h||"replace"===t&&!u||"split"===t&&!p){var g=/./[f],v=a(l,f,""[t],(function(t,e,a,n,i){return e.exec===s?d&&!i?{done:!0,value:g.call(e,a,n)}:{done:!0,value:t.call(a,e,n)}:{done:!1}})),b=v[0],m=v[1];n(String.prototype,t,b),i(RegExp.prototype,f,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},"129d":function(t,e,a){"use strict";var n=a("46fc"),i=a.n(n);i.a},"2fd4":function(t,e,a){var n=a("fb68"),i=a("75c4"),r=a("cb3d")("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==i(t))}},"46fc":function(t,e,a){},6475: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("section",{staticClass:"apply"},[a("p",[t._v("在线培训 > 试卷管理")]),a("div",{staticClass:"filter"},[a("el-form",{attrs:{"label-width":"80px",inline:!0,size:"small"}},[a("el-form-item",{attrs:{label:"试卷名称"}},[a("el-input",{attrs:{placeholder:"试卷名称"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),a("el-form-item",{attrs:{label:"类别"}},[a("Subject",{on:{subChange:t.subChange}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getData}},[t._v("搜索")]),a("el-button",{attrs:{type:"primary"}},[t._v("新增")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("导入")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.list,height:"450px",border:""}},[a("el-table-column",{attrs:{prop:"title",label:"试卷名称"}}),a("el-table-column",{attrs:{prop:"subject_item",label:"培训项目"}}),a("el-table-column",{attrs:{prop:"total_time",width:"80",label:"考试时间"}}),a("el-table-column",{attrs:{prop:"total_score",width:"80",label:"满分"}}),a("el-table-column",{attrs:{prop:"ctime",label:"创建时间"}}),a("el-table-column",{attrs:{prop:"zip",width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(a){return t.$router.push({path:"/papers/detail",query:{id:e.row.id}})}}},[t._v("查看")]),a("el-button",{attrs:{size:"mini",type:"warning"}},[t._v("编辑")]),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1),a("Page",{ref:"pageButton",attrs:{total:t.total},on:{pageChange:t.gopage}}),a("el-dialog",{attrs:{title:"导入试卷",center:"",visible:t.dialogVisible,width:"40%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("p",{staticStyle:{"text-align":"center"}},[t._v("请先下载模板,按模板格式填写好试题数据然后上传。\n "),a("a",{staticStyle:{color:"#409eff"},attrs:{href:"https://www.scxjc.club/paper.xlsx"}},[t._v("点击下载模板")]),a("br"),a("br"),a("input",{staticStyle:{width:"160px"},attrs:{id:"file",type:"file"}})]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.upload("file")}}},[t._v("确 定")])],1)])],1)},i=[],r=a("9973"),l=a("fa7e"),o={components:{Page:r["a"],Subject:l["a"]},data:function(){return{form:{name:"",page:1,page_size:20},activeName:"1",total:1,list:[],loading:!1,dialogVisible:!1}},methods:{gopage:function(t){t&&(this.form.page_size=t),this.form.page=this.$refs.pageButton.page,this.getData()},subChange:function(t){this.form.subject_item=t.join("|")},getData:function(){var t=this,e=this.form;this.loading=!0,this.$api.getPaperList(e).then((function(e){t.list=e.data.data.list,t.total=e.data.data.total,t.loading=!1}))},upload:function(t){var e=this,a=document.getElementById(t).files,n=new FormData;n.append("file",a[0]),this.$api.uploadPaper(n).then((function(t){0==t.data.code?(e.dialogVisible=!1,e.getData(),e.$message({message:"上传成功!",type:"success"})):e.$message.error(t.data.message)}))},del:function(t){var e=this;this.$confirm("确定删除吗","提示",{type:"warning"}).then((function(){e.$api.deletePaper({id:t}).then((function(t){e.$message({message:"删除成功",type:"success"}),e.getData()}))}))}},created:function(){this.getData()}},s=o,c=(a("eb55"),a("4023")),u=Object(c["a"])(s,n,i,!1,null,null,null);e["default"]=u.exports},7108:function(t,e,a){"use strict";var n=a("7e23"),i=RegExp.prototype.exec;t.exports=function(t,e){var a=t.exec;if("function"===typeof a){var r=a.call(t,e);if("object"!==typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==n(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},8714:function(t,e,a){"use strict";var n=a("f1fe"),i=RegExp.prototype.exec,r=String.prototype.replace,l=i,o="lastIndex",s=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[o]||0!==e[o]}(),c=void 0!==/()??/.exec("")[1],u=s||c;u&&(l=function(t){var e,a,l,u,p=this;return c&&(a=new RegExp("^"+p.source+"$(?!\\s)",n.call(p))),s&&(e=p[o]),l=i.call(p,t),s&&l&&(p[o]=p.global?l.index+l[0].length:e),c&&l&&l.length>1&&r.call(l[0],a,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(l[u]=void 0)})),l}),t.exports=l},9973:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-pagination",{attrs:{background:"","page-size":20,"page-sizes":[20,30,40,50,60,70,80,90,100],layout:"sizes,total,prev, pager, next",total:t.total},on:{"current-change":t.getData,"size-change":t.handleSizeChange}})},i=[],r={data:function(){return{page:1}},props:{total:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}}},l=r,o=(a("129d"),a("4023")),s=Object(o["a"])(l,n,i,!1,null,null,null);e["a"]=s.exports},"9a33":function(t,e,a){"use strict";var n=a("2fd4"),i=a("69b3"),r=a("f63e"),l=a("e754"),o=a("eafa"),s=a("7108"),c=a("8714"),u=a("238a"),p=Math.min,f=[].push,d="split",h="length",g="lastIndex",v=4294967295,b=!u((function(){RegExp(v,"y")}));a("0aed")("split",2,(function(t,e,a,u){var m;return m="c"=="abbc"[d](/(b)*/)[1]||4!="test"[d](/(?:)/,-1)[h]||2!="ab"[d](/(?:ab)*/)[h]||4!="."[d](/(.?)(.?)/)[h]||"."[d](/()()/)[h]>1||""[d](/.?/)[h]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!n(t))return a.call(i,t,e);var r,l,o,s=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,d=void 0===e?v:e>>>0,b=new RegExp(t.source,u+"g");while(r=c.call(b,i)){if(l=b[g],l>p&&(s.push(i.slice(p,r.index)),r[h]>1&&r.index<i[h]&&f.apply(s,r.slice(1)),o=r[0][h],p=l,s[h]>=d))break;b[g]===r.index&&b[g]++}return p===i[h]?!o&&b.test("")||s.push(""):s.push(i.slice(p)),s[h]>d?s.slice(0,d):s}:"0"[d](void 0,0)[h]?function(t,e){return void 0===t&&0===e?[]:a.call(this,t,e)}:a,[function(a,n){var i=t(this),r=void 0==a?void 0:a[e];return void 0!==r?r.call(a,i,n):m.call(String(i),a,n)},function(t,e){var n=u(m,t,this,e,m!==a);if(n.done)return n.value;var c=i(t),f=String(this),d=r(c,RegExp),h=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(b?"y":"g"),x=new d(b?c:"^(?:"+c.source+")",g),y=void 0===e?v:e>>>0;if(0===y)return[];if(0===f.length)return null===s(x,f)?[f]:[];var w=0,_=0,C=[];while(_<f.length){x.lastIndex=b?_:0;var k,S=s(x,b?f:f.slice(_));if(null===S||(k=p(o(x.lastIndex+(b?0:_)),f.length))===w)_=l(f,_,h);else{if(C.push(f.slice(w,_)),C.length===y)return C;for(var $=1;$<=S.length-1;$++)if(C.push(S[$]),C.length===y)return C;_=w=k}}return C.push(f.slice(w)),C}]}))},aaba:function(t,e,a){"use strict";var n=a("8714");a("e46b")({target:"RegExp",proto:!0,forced:n!==/./.exec},{exec:n})},cc57:function(t,e,a){var n=a("064e").f,i=Function.prototype,r=/^\s*function ([^ (]*)/,l="name";l in i||a("149f")&&n(i,l,{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},d2be:function(t,e,a){},e754:function(t,e,a){"use strict";var n=a("fc81")(!0);t.exports=function(t,e,a){return e+(a?n(t,e).length:1)}},eb55:function(t,e,a){"use strict";var n=a("fe8b"),i=a.n(n);i.a},f1fe:function(t,e,a){"use strict";var n=a("69b3");t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},fa7e:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.subject_id?a("span",[a("el-cascader",{staticClass:"sub",attrs:{props:t.props1,clearable:"",placeholder:"请选择作业类别 / 准操项目",options:t.data},on:{change:t.handleChange},model:{value:t.value1,callback:function(e){t.value1=e},expression:"value1"}})],1):a("span",[t.value?a("el-cascader",{staticClass:"sub",attrs:{props:t.props,placeholder:"请选择培训科目 / 作业类别 / 准操项目",options:t.data},on:{change:t.handleChange},model:{value:t.value1,callback:function(e){t.value1=e},expression:"value1"}}):a("el-cascader",{staticClass:"sub",attrs:{props:t.props1,clearable:"",placeholder:"请选择培训科目 / 作业类别 / 准操项目",options:t.data},on:{change:t.handleChange},model:{value:t.value1,callback:function(e){t.value1=e},expression:"value1"}})],1)},i=[],r=(a("9a33"),a("cc57"),{data:function(){return{data:[],value1:[],props:{label:"name",checkStrictly:!0,value:"id"},props1:{label:"name",checkStrictly:!0,value:"name"}}},props:{value:"",subvalue:"",subject_id:""},methods:{getData:function(t){var e=this;this.$api.getSubList().then((function(t){var a=t.data.data;if(e.subject_id)for(var n=0;n<a.length;n++)a[n].id==e.subject_id&&(e.data=a[n].children);else e.data=t.data.data}))},handleChange:function(t){var e="",a=this;if(t.length>=3&&isNaN(t[0])){var n=this.data.filter((function(e){return e.name==t[0]})),i=n[0].children.filter((function(e){return e.name==t[1]})),r=i[0].children.filter((function(e){return e.name==t[2]}));e=r[0].id}setTimeout((function(){var n=document.querySelector(".el-input__inner").value,i=n.split(" / ");console.log(n),a.$emit("subChange",i,e,t)}),100)}},created:function(){this.getData(),this.value&&(this.value1=this.value),this.subvalue&&(this.value1=this.subvalue.split("|"))}}),l=r,o=(a("049d"),a("4023")),s=Object(o["a"])(l,n,i,!1,null,null,null);e["a"]=s.exports},fc81:function(t,e,a){var n=a("ee21"),i=a("f6b4");t.exports=function(t){return function(e,a){var r,l,o=String(i(e)),s=n(a),c=o.length;return s<0||s>=c?t?"":void 0:(r=o.charCodeAt(s),r<55296||r>56319||s+1===c||(l=o.charCodeAt(s+1))<56320||l>57343?t?o.charAt(s):r:t?o.slice(s,s+2):l-56320+(r-55296<<10)+65536)}}},fe8b:function(t,e,a){}}]);
- //# sourceMappingURL=chunk-78405549.68efdbe2.js.map
|