2 lines
9.2 KiB
JavaScript
2 lines
9.2 KiB
JavaScript
/* empty css */import{n as h}from"./vueComponentNormalizer.9ef17bb1.js";import{F as x}from"./FormLayout.c7820bdd.js";import{T as y}from"./TableLayout.05a39499.js";import{D as w}from"./DialogLayout.e3af3567.js";import{Q as b}from"./QueryInput.7afa399e.js";/* empty css *//* empty css */import{g as C,c as $,p as S}from"./onlineTest.d650e810.js";/* empty css */import"./ActionBar.1725b1a3.js";/* empty css *//* empty css */import"./index.51e15757.js";var T=function(){var n,a,o,s,r,l,m,_,u,c,d,v,t=this,p=t.$createElement,e=t._self._c||p;return e("div",{staticClass:"v-page classify_page"},[e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.paper_list_loading,expression:"paper_list_loading"}],staticClass:"v-ctx"},[e("FormLayout",{ref:"formLayoutRef",attrs:{items:t.formItems,model:t.form,rules:t.rules,"label-width":"70px","label-position":"right",inline:!0},scopedSlots:t._u([{key:"title",fn:function(){return[e("QueryInput",{on:{query:t.pagingFindList},model:{value:t.form.title,callback:function(i){t.$set(t.form,"title",i)},expression:"form.title"}})]},proxy:!0},{key:"btns",fn:function(){},proxy:!0}])}),e("TableLayout",{attrs:{column:t.column,data:t.table_data,pageInfo:t.page_info},on:{"current-change":function(i){return t.pagingChange({currentPage:i})},"size-change":function(i){return t.pagingChange({pageSize:i})}},scopedSlots:t._u([{key:"examStartTime",fn:function(i){return[e("div",[e("p",[t._v("\u5F00\u59CB\u65F6\u95F4\uFF1A"+t._s(i.row.examStartTime))]),e("p",[t._v("\u7ED3\u675F\u65F6\u95F4\uFF1A"+t._s(i.row.examEndTime))])])]}},{key:"passPercent",fn:function(i){return[e("p",[t._v(t._s(Math.round(i.row.passPercent*i.row.totalScore/100)))])]}},{key:"myDuration",fn:function(i){return[e("p",[t._v(t._s(t.formatTime(i.row.myDuration)))])]}},{key:"status",fn:function(i){return[e("div",{staticClass:"exam-status",style:{"background-color":i.row.examTimes-i.row.myTimes<=0?"#999999":["#10a6b4","#01c883","#999999"][i.row.status]}},[i.row.examTimes-i.row.myTimes<=0?e("span",[t._v(" \u5DF2\u7ED3\u675F ")]):e("span",[t._v(" "+t._s(["\u5F85\u5F00\u8003","\u5DF2\u5F00\u59CB","\u5DF2\u7ED3\u675F"][i.row.status])+" ")])])]}},{key:"action",fn:function(i){return[i.row.status==1&&i.row.examTimes-i.row.myTimes>0?e("el-button",{staticStyle:{color:"#02c761 !important"},attrs:{type:"text",icon:"i-x-zxks-canjiakaoshi"},on:{click:function(f){return t.toExamHandler(1,i.row)}}},[t._v("\u53C2\u52A0\u8003\u8BD5")]):t._e(),i.row.status<1?e("el-button",{attrs:{type:"text",icon:"i-j-rgpj-xiangqing"},on:{click:function(f){return t.toExamHandler(2,i.row)}}},[t._v(" \u67E5\u770B\u8BE6\u60C5 ")]):t._e(),i.row.status==2||i.row.examTimes-i.row.myTimes<=0?e("el-button",{attrs:{type:"text",icon:"i-j-fbks-yulan"},on:{click:function(f){return t.lookLastExam(i.row)}}},[t._v("\u67E5\u770B\u7B54\u5377 ")]):t._e()]}}])})],1),e("DialogLayout",{attrs:{title:t.is_show_info?"\u8003\u8BD5\u8BE6\u60C5":"\u786E\u8BA4\u8003\u8BD5",visible:t.exam_info_dialog_show,width:"600px",actionBarOption:{noCencel:((n=t.current_exam)===null||n===void 0?void 0:n.status)==0,noConfirm:((a=t.current_exam)===null||a===void 0?void 0:a.status)==0}},on:{onCancel:function(i){t.exam_info_dialog_show=!1,t.current_exam=null},onConfirm:t.toExamPaper}},[e("div",[e("div",{staticClass:"gy-form mb"},[e("div",{staticClass:"gy-form-item mb"},[e("div",{staticClass:"gy-label"},[t._v(" \u8003\u8BD5\u5F00\u59CB\u65F6\u95F4\uFF1A ")]),e("div",[t._v(" "+t._s((o=t.current_exam)===null||o===void 0?void 0:o.examStartTime)+" ")])]),e("div",{staticClass:"gy-form-item mb"},[e("div",{staticClass:"gy-label"},[t._v(" \u8003\u8BD5\u7ED3\u675F\u65F6\u95F4\uFF1A ")]),e("div",[t._v(" "+t._s((s=t.current_exam)===null||s===void 0?void 0:s.examEndTime)+" ")])]),e("div",{staticClass:"gy-form-item"},[e("div",{staticClass:"gy-label"},[t._v(" \u8003\u8BD5\u65F6\u957F\uFF1A ")]),e("div",[e("span",{staticClass:"red"},[t._v(" "+t._s((r=t.current_exam)===null||r===void 0?void 0:r.examDuration))]),t._v("\u5206\u949F ")])])]),e("div",{staticClass:"gy-form inline mb"},[e("div",{staticClass:"gy-form-item"},[e("div",{staticClass:"gy-label"},[t._v(" \u8003\u8BD5\u603B\u5206\uFF1A ")]),e("div",{staticClass:"red"},[t._v(" "+t._s((l=t.current_exam)===null||l===void 0?void 0:l.totalScore)+" ")])]),e("div",{staticClass:"gy-form-item"},[e("div",{staticClass:"gy-label"},[t._v(" \u53CA\u683C\u5206\uFF1A ")]),e("div",{staticClass:"red"},[t._v(" "+t._s(Math.round(((m=t.current_exam)===null||m===void 0?void 0:m.totalScore)*((_=t.current_exam)===null||_===void 0?void 0:_.passPercent)/100))+" ")])])]),e("div",{staticClass:"gy-form inline mb"},[e("div",{staticClass:"gy-form-item"},[e("div",{staticClass:"gy-label"},[t._v(" \u8003\u8BD5\u6B21\u6570\uFF1A ")]),e("div",{staticClass:"red"},[t._v(" "+t._s((u=t.current_exam)===null||u===void 0?void 0:u.examTimes)+"\u6B21")])]),e("div",{staticClass:"gy-form-item"},[e("div",{staticClass:"gy-label"},[t._v(" \u5269\u4F59\u6B21\u6570\uFF1A ")]),e("div",{staticClass:"red"},[t._v(" "+t._s(((c=t.current_exam)===null||c===void 0?void 0:c.examTimes)-((d=t.current_exam)===null||d===void 0?void 0:d.myTimes))+"\u6B21")])])]),e("div",{staticClass:"gy-form mb"},[e("div",{staticClass:"gy-form-item"},[e("div",{staticClass:"gy-label"},[t._v(" \u8003\u8BD5\u63CF\u8FF0\uFF1A ")]),e("div",{staticClass:"gy-in"},[t._v(" "+t._s((v=t.current_exam)===null||v===void 0?void 0:v.examDesc)+" ")])])])])])],1)},k=[];const L={components:{TableLayout:y,FormLayout:x,QueryInput:b,DialogLayout:w},data:()=>({table_data:[],page_info:{currentPage:1,pageSize:10,total:0},paper_list_loading:!1,form:{title:""},is_show_info:!1,exam_info_dialog_show:!1,current_exam:null}),created(){this.formItems=[{prop:"title"},{prop:"btns",model:{class:"gy-btns"}}],this.rules={},this.column=[{prop:"title",label:"\u8003\u8BD5\u540D\u79F0","min-width":130,align:"center","show-overflow-tooltip":!0},{prop:"classify",label:"\u8003\u8BD5\u5206\u7C7B","min-width":80,align:"center","show-overflow-tooltip":!0},{prop:"totalScore",label:"\u603B\u5206","min-width":60,align:"center","show-overflow-tooltip":!0},{prop:"passPercent",label:"\u53CA\u683C\u5206","min-width":60,align:"center","show-overflow-tooltip":!0},{prop:"myScore",label:"\u6210\u7EE9","min-width":50,align:"center","show-overflow-tooltip":!0},{prop:"myDuration",label:"\u8003\u8BD5\u7528\u65F6","min-width":80,align:"center","show-overflow-tooltip":!0},{prop:"mistakes",label:"\u9519\u9898","min-width":50,align:"center","show-overflow-tooltip":!0},{prop:"examStartTime",label:"\u8003\u8BD5\u65F6\u95F4","min-width":220,align:"center","show-overflow-tooltip":!0},{prop:"status",label:"\u72B6\u6001",width:80,align:"center","show-overflow-tooltip":!0},{prop:"action",label:"\u64CD\u4F5C",width:200,align:"center"}]},activated(){this.pagingFindList()},methods:{downLoadThisPdf(n){this.$message.info(n)},lookLastExam(n){this.paper_list_loading=!0,C(n.id).then(a=>{if(a.data==null)return this.$message.error("\u8BE5\u573A\u8003\u8BD5\u6CA1\u6709\u67E5\u8BE2\u5230\u60A8\u7684\u8003\u8BD5\u8BB0\u5F55");this.$router.push({path:"/assessment-evaluation/online-test/begin-online-exam/"+a.data.id,query:{preview:1}})}).finally(a=>{this.paper_list_loading=!1})},formatTime(n){const a=n/1e3;let o=Math.floor(a/60/60);o=o.toString().padStart(2,"0");let s=Math.floor(a/60)%60;s=s.toString().padStart(2,"0");let r=Math.floor(a)%60;return r=r.toString().padStart(2,"0"),`${o}:${s}:${r}`},toExamPaper(){var n,a;if(this.is_show_info)this.exam_info_dialog_show=!1;else if(+this.current_exam.status==1){if(((n=this.current_exam)==null?void 0:n.examTimes)-((a=this.current_exam)==null?void 0:a.myTimes)<=0)return this.$message.error("\u60A8\u5DF2\u6CA1\u6709\u8BE5\u573A\u8003\u8BD5\u7684\u8003\u8BD5\u673A\u4F1A");$({onlineExamId:this.current_exam.id}).then(o=>{o.data&&(this.$message("\u5F00\u59CB\u8003\u8BD5\uFF0C\u672C\u6B21\u8003\u8BD5\u5C06\u8BA1\u5165\u8003\u8BD5\u6B21\u6570"),this.$router.push({path:"/assessment-evaluation/online-test/begin-online-exam/"+o.data.id}))}),this.exam_info_dialog_show=!1}else{if(+this.current_exam.status==0)return this.$message.error("\u8003\u8BD5\u6682\u672A\u5F00\u59CB");if(+this.current_exam.status==2)return this.$message.error("\u8003\u8BD5\u5DF2\u7ED3\u675F")}},toExamHandler(n=2,a){n===2?this.is_show_info=!0:n===1&&(this.is_show_info=!1),this.current_exam=a,this.exam_info_dialog_show=!0},pagingChange(n){typeof n.currentPage!="number"&&typeof n.pageSize!="number"||(this.page_info={...this.page_info,...n},this.pagingFindList())},initPageInfo(){this.page_info={currentPage:1,pageSize:this.page_info.pageSize,total:0}},pagingFindList(n){n instanceof PointerEvent&&this.initPageInfo(),this.paper_list_loading=!0,S({...this.page_info,...this.form}).then(a=>{const{currentPage:o,pageSize:s,total:r}=a.data;this.table_data=a.data.data,this.table_data.length===0&&this.page_info.currentPage!=1&&(this.initPageInfo(),this.pagingFindList()),this.page_info={currentPage:o,pageSize:s,total:r}}).finally(a=>{this.paper_list_loading=!1})}}},g={};var P=h(L,T,k,!1,E,"992af0f0",null,null);function E(n){for(let a in g)this[a]=g[a]}const G=function(){return P.exports}();export{G as default};
|