1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d519c4a","chunk-866d2fa0","chunk-b7b74f52","chunk-2d915579","chunk-b7b74f52","chunk-2d0b9d88","chunk-2d216ba7"],{1:function(t,e){},2:function(t,e){},3:function(t,e){},"33fb":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("div",{staticClass:"app-container"},[a("upload-excel-component",{attrs:{"on-success":t.handleSuccess,"before-upload":t.beforeUpload,range:2}}),a("div",{staticStyle:{width:"220px",margin:"20px auto"}},[a("el-button",{staticClass:"p10",staticStyle:{width:"200px",padding:"10px 20px"},attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v(" 提交")])],1),a("h2",{attrs:{align:"center"}},[t._v(" 测试考试时间:"+t._s(t.examAt))]),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.tableData,border:"","highlight-current-row":""}},t._l(t.tableHeader,(function(t){return a("el-table-column",{key:t,attrs:{prop:t,label:t}})})),1)],1)},r=[],i=a("3796"),o={name:"UploadExcel",components:{UploadExcelComponent:i["default"]},data:function(){return{examAt:"",tableData:[],tableHeader:[],tableOther:[]}},props:["list"],methods:{beforeUpload:function(t){var e=t.size/1024/1024<1;return!!e||(this.$message({message:"Please do not upload files larger than 1m in size.",type:"warning"}),!1)},onSubmit:function(){var t=this.examAt,e=[];for(var a in this.tableData){var n=this.tableData[a],r=n["考生身份证号"]||"",i=n["考试成绩"]||0,o=n["证书编码"]||"";if(i>=60&&""==o)return void this.$message.errorMsg("".concat(r," 无证书编码"),2);if(18!=r.length)return void this.$message.errorMsg("".concat(r," 身份证号非法"),2);e.push({cardId:r,score:i,rzCode:o})}e.length<1?this.$message.errorMsg("找不到上传数据",1):this.$emit("uploadOk",t,e)},handleSuccess:function(t){var e=t.results,a=t.header,n=t.other;this.tableData=e,this.tableHeader=a,this.tableOther=n,2!=this.tableOther.length||this.tableOther[1].length<4?this.$message.errorMsg("头部两行丢失",1):(this.examAt=this.tableOther[1][3],console.log(this.examAt,this.tableOther[1]))}}},l=o,s=a("2877"),c=Object(s["a"])(l,n,r,!1,null,null,null);e["default"]=c.exports},"354d":function(t,e,a){"use strict";a.r(e),a.d(e,"getUserApplyList",(function(){return r})),a.d(e,"getUserApplyConfirmList",(function(){return i})),a.d(e,"getUserApplyInfo",(function(){return o})),a.d(e,"confirmUserApplyImg",(function(){return l})),a.d(e,"confirmUserApplyConfirm",(function(){return s})),a.d(e,"getUserApplyUnConfirmList",(function(){return c})),a.d(e,"getTrainExamList",(function(){return u})),a.d(e,"getTrainPlanList",(function(){return d})),a.d(e,"getUserPlanList",(function(){return p})),a.d(e,"getAdminUserPlanList",(function(){return f})),a.d(e,"getAdminOnPlanUserList",(function(){return h})),a.d(e,"postData",(function(){return m})),a.d(e,"getPayLogList",(function(){return g}));var n=a("b775"),r=function(t){return Object(n["default"])({url:"/admin/getUserApplyList",method:"post",data:t})},i=function(t){return Object(n["default"])({url:"/admin/getUserApplyConfirmList",method:"post",data:t})},o=function(t){return Object(n["default"])({url:"/admin/getUserApplyInfo",method:"post",data:t})},l=function(t){return Object(n["default"])({url:"/admin/confirmUserApplyImg",method:"post",data:t})},s=function(t){return Object(n["default"])({url:"/admin/confirmUserApplyConfirm",method:"post",data:t})},c=function(t){return Object(n["default"])({url:"/admin/getUserApplyUnConfirmList",method:"post",data:t})},u=function(t){return Object(n["default"])({url:"/admin/getTrainExamList",method:"post",data:t})},d=function(t){return Object(n["default"])({url:"/admin/getTrainPlanList",method:"post",data:t})},p=function(t){return Object(n["default"])({url:"/admin/getUserPlanList",method:"post",data:t})},f=function(t){return Object(n["default"])({url:"/admin/getAdminUserPlanList",method:"post",data:t})},h=function(t){return Object(n["default"])({url:"/admin/getAdminOnPlanUserList",method:"post",data:t})},m=function(t,e){return Object(n["default"])({url:"/admin/".concat(t),method:"post",data:e})},g=function(t){return Object(n["default"])({url:"/admin/getPayLogList",method:"post",data:t})}},"408a":function(t,e,a){var n=a("e330");t.exports=n(1..valueOf)},"4d62":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("div",{staticStyle:{"font-size":"10px"}},[a("div",{staticClass:"p10"},[a("el-button",{attrs:{type:"primary"},on:{click:t.startUpload}},[t._v("上传成绩")]),a("el-button",{attrs:{type:"primary"},on:{click:t.startDownload}},[t._v("下载成绩")])],1),a("div",{staticClass:"search-term"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"切换分期",prop:"phone"}},[a("el-select",{attrs:{placeholder:"请选择考试分期"},model:{value:t.planId,callback:function(e){t.planId=e},expression:"planId"}},t._l(t.planList,(function(t){return a("el-option",{key:t.planId,attrs:{label:t.name,value:t.planId}})})),1)],1),a("el-form-item",{attrs:{label:"用户名字",prop:"nickname"}},[a("el-input",{attrs:{clearable:""},model:{value:t.searchInfo.nickname,callback:function(e){t.$set(t.searchInfo,"nickname",e)},expression:"searchInfo.nickname"}})],1),a("el-form-item",{attrs:{label:"身份证",prop:"cardId"}},[a("el-input",{attrs:{clearable:""},model:{value:t.searchInfo.cardId,callback:function(e){t.$set(t.searchInfo,"cardId",e)},expression:"searchInfo.cardId"}})],1)],1)],1),a("el-table",{attrs:{data:t.showData.slice(t.page*t.size-t.size,t.page*t.size),border:"",stripe:""}},[a("el-table-column",{attrs:{label:"序号",width:"80",prop:"id",align:"center"}}),a("el-table-column",{attrs:{label:"姓名",prop:"nickname",align:"center",width:"100"}}),a("el-table-column",{attrs:{label:"身份证",prop:"cardId",align:"center",width:"180"}}),a("el-table-column",{attrs:{label:"报考岗位",prop:"courseName",align:"center","min-width":"90"}}),a("el-table-column",{attrs:{label:"分数",prop:"score",align:"center",width:"80"}}),a("el-table-column",{attrs:{label:"测试计划时间",prop:"examAt",align:"center","min-width":"260"}}),a("el-table-column",{attrs:{label:"考试次数",prop:"resitCount",align:"center",width:"80"}}),a("el-table-column",{attrs:{label:"证书编号",prop:"rzCode",align:"center","min-width":"200"}}),a("el-table-column",{attrs:{label:"上传时间",prop:"createAt",align:"center",width:"160"}})],1),a("el-pagination",{style:{float:"right",padding:"20px"},attrs:{"current-page":t.page,"page-size":t.size,"page-sizes":[10,30,50,100],total:t.showData.length,layout:"total, sizes, prev, pager, next, jumper"},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}}),a("el-dialog",{attrs:{title:"上传成绩",center:"",visible:t.uploadDialog,width:"90%"},on:{"update:visible":function(e){t.uploadDialog=e}}},[a("IUploadUserScore",{attrs:{list:t.tableData},on:{uploadOk:t.uploadOk}})],1)],1)},r=[],i=(a("4de4"),a("d3b7"),a("3ca3"),a("ddb0"),a("d81d"),a("354d")),o=a("c466"),l=a("33fb"),s={name:"Api",components:{IUploadUserScore:l["default"]},data:function(){return{listApi:i["getTrainPlanList"],dialogFormVisible:!1,planDialog:!1,uploadDialog:!1,planId:"",page:1,size:10,searchInfo:{nickname:"",cardId:""},planList:[],tableData:[],showData:[]}},watch:{planId:function(t){this.selectTrainPlan(t)},searchInfo:{handler:function(t,e){this.page=1,this.filterData()},deep:!0}},methods:{onSubmit:function(){this.page=1,this.pageSize=10},startUpload:function(){this.planId?this.uploadDialog=!0:this.$message.errorMsg("先选择考试分期",2)},filterData:function(){var t=this.searchInfo,e=t.nickname,a=t.cardId;this.showData=this.tableData.filter((function(t){return(!e||-1!=t.nickname.indexOf(e))&&(!a||-1!=t.cardId.indexOf(a))}))},selectTrainPlan:function(t){var e=this;if(t){this.planId=t;var a={planId:+t};Object(i["postData"])("GetTrainPlanScore",a).then((function(t){200==t.code&&(e.tableData=t.data||[],e.filterData())}))}},getAllTrainPlanList:function(){var t=this;Object(i["postData"])("getAllTrainPlanList",{}).then((function(e){200==e.code&&(t.planList=e.data||[],t.planList.length>0&&t.selectTrainPlan(t.planList[0].planId))}))},startDownload:function(){var t=this;if(this.planId){var e=this.tableData||[];Promise.all([a.e("chunk-0b34d52f"),a.e("chunk-1c6923bb")]).then(a.bind(null,"4bf8")).then((function(a){var n=["姓名","身份证","分期","报考岗位","分数","测试计划时间","证书编号"],r=e.map((function(t){return[t.nickname,t.cardId,t.planName,t.courseName,t.score,t.examAt,t.rzCode]}));t.$message.successMsg("打包完成,生成excel中",2),a.export_json_to_excel({header:n,data:r,filename:Date.now(),autoWidth:!0,bookType:"xlsx"})}))}else this.$message.errorMsg("先选择考试分期",2)},uploadOk:function(t,e){var a=this,n=+this.planId,r={planId:n,list:e,examAt:t};Object(i["postData"])("AddTrainPlanScore",r).then((function(t){200==t.code&&(a.$message.successMsg("导入成功",1),a.uploadDialog=!1)}))},handleCurrentChange:function(t){this.page=t},handleSizeChange:function(t){this.size=t}},filters:{toDate:o["toDate"]},created:function(){this.getAllTrainPlanList()}},c=s,u=(a("62fa"),a("2877")),d=Object(u["a"])(c,n,r,!1,null,"3d4ebaf0",null);e["default"]=d.exports},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,a){var n=a("e330"),r=a("1d80"),i=a("577e"),o=a("5899"),l=n("".replace),s="["+o+"]",c=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),d=function(t){return function(e){var a=i(r(e));return 1&t&&(a=l(a,c,"")),2&t&&(a=l(a,u,"")),a}};t.exports={start:d(1),end:d(2),trim:d(3)}},"62fa":function(t,e,a){"use strict";a("79db")},"79db":function(t,e,a){},a9e3:function(t,e,a){"use strict";var n=a("83ab"),r=a("da84"),i=a("e330"),o=a("94ca"),l=a("6eeb"),s=a("1a2d"),c=a("7156"),u=a("3a9b"),d=a("d9b5"),p=a("c04e"),f=a("d039"),h=a("241c").f,m=a("06cf").f,g=a("9bf2").f,b=a("408a"),y=a("58a8").trim,I="Number",v=r[I],D=v.prototype,x=r.TypeError,w=i("".slice),A=i("".charCodeAt),L=function(t){var e=p(t,"number");return"bigint"==typeof e?e:O(e)},O=function(t){var e,a,n,r,i,o,l,s,c=p(t,"number");if(d(c))throw x("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=y(c),e=A(c,0),43===e||45===e){if(a=A(c,2),88===a||120===a)return NaN}else if(48===e){switch(A(c,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+c}for(i=w(c,2),o=i.length,l=0;l<o;l++)if(s=A(i,l),s<48||s>r)return NaN;return parseInt(i,n)}return+c};if(o(I,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var k,S=function(t){var e=arguments.length<1?0:v(L(t)),a=this;return u(D,a)&&f((function(){b(a)}))?c(Object(e),a,S):e},U=n?h(v):"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(","),M=0;U.length>M;M++)s(v,k=U[M])&&!s(S,k)&&g(S,k,m(v,k));S.prototype=D,D.constructor=S,l(r,I,S)}},c466:function(t,e,a){"use strict";a.r(e),a.d(e,"curDate",(function(){return n})),a.d(e,"formatTimeToStr",(function(){return r})),a.d(e,"toDatetime",(function(){return i})),a.d(e,"toDate",(function(){return o})),a.d(e,"toDateShow",(function(){return l})),a.d(e,"getDate",(function(){return s}));a("ac1f"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),a("25f0");function n(){var t=(new Date).Format("yyyy-MM-dd");return t.toLocaleString()}function r(t,e){var a=new Date(t).Format("yyyy-MM-dd hh:mm:ss");return e&&(a=new Date(t).Format(e)),a.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 l(t){if(!t)return"---";var e=new Date(t).Format("yyyy-MM-dd");return e.toLocaleString()}function s(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 a in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),e)new RegExp("("+a+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[a]:("00"+e[a]).substr((""+e[a]).length)));return t}}}]);
|