Files
Obosky_Ronghua/serve/front/assets/index.b6618dcb.js
2023-10-17 09:15:30 +08:00

2 lines
7.1 KiB
JavaScript

/* empty css */import{n as s}from"./vueComponentNormalizer.9ef17bb1.js";import{F as l}from"./FormLayout.c7820bdd.js";import{T as u}from"./TableLayout.05a39499.js";/* empty css */import{Q as p}from"./QueryInput.7afa399e.js";/* empty css *//* empty css */import{g as m,c,a as _}from"./onlineTest.1d86eb4e.js";import{h as f,j as h}from"./paper.4b971da3.js";import{d}from"./data-report.0c7c73f2.js";/* empty css *//* empty css */import"./index.f5168bf8.js";import"./index.2adbb9ac.js";var g=function(){var t=this,a=t.$createElement,e=t._self._c||a;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(){return[e("el-button",{attrs:{round:"",type:"primary"},on:{click:t.createSimuTest}},[t._v("\u65B0\u5EFA\u8003\u8BD5")])]},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":["#10a6b4","#01c883","#999999"][i.row.status]}},[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?e("el-button",{staticStyle:{color:"#02c761 !important"},attrs:{type:"text",icon:"i-x-zxks-canjiakaoshi"},on:{click:function(n){return t.toExamHandler(1,i.row)}}},[t._v("\u53C2\u52A0\u8003\u8BD5")]):t._e(),e("el-button",{attrs:{type:"text",icon:"i-j-fbks-yulan"},on:{click:function(n){return t.lookLastExam(i.row)}}},[t._v("\u67E5\u770B\u7B54\u5377 ")]),e("el-button",{staticStyle:{color:"#f04343 !important"},attrs:{type:"text",icon:"i-j-ksap-shanchu"},on:{click:function(n){return t.deletePapers(n,i.row)}}},[t._v("\u5220\u9664")])]}}])})],1)])},x=[];const v={components:{TableLayout:u,FormLayout:l,QueryInput:p},data:()=>({table_data:[],page_info:{currentPage:1,pageSize:10,total:0},paper_list_loading:!1,form:{title:"",isPractive:1},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:"\u8BD5\u5377\u540D",align:"center","show-overflow-tooltip":!0},{prop:"totalScore",label:"\u603B\u5206","min-width":80,align:"center","show-overflow-tooltip":!0},{prop:"passPercent",label:"\u53CA\u683C\u5206","min-width":80,align:"center","show-overflow-tooltip":!0},{prop:"myScore",label:"\u6210\u7EE9","min-width":80,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":80,align:"center","show-overflow-tooltip":!0},{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4",width:150,align:"center","show-overflow-tooltip":!0},{prop:"action",label:"\u64CD\u4F5C",width:260,align:"center","show-overflow-tooltip":!0}]},activated(){this.pagingFindList()},methods:{deletePapers(t,a){let e=this.tableSelectionsList;a&&(e=[a]);const i="\u786E\u8BA4\u5220\u9664\u5417?";this.$confirm(i,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(n=>{this.paper_list_loading=!0,f(e.map(o=>o.id)).then(o=>{this.pagingFindList(),this.paper_list_loading=!1})}).catch(n=>{})},createSimuTest(){this.$router.push({path:"/assessment-evaluation/simulation-test/add-sim-test"})},lookLastExam(t){this.paper_list_loading=!0,m(t.studentOnlineExamId).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(t){const a=t/1e3;let e=Math.floor(a/60/60);e=e.toString().padStart(2,"0");let i=Math.floor(a/60)%60;i=i.toString().padStart(2,"0");let n=Math.floor(a)%60;return n=n.toString().padStart(2,"0"),`${e}:${i}:${n}`},toExamPaper(){var t,a;if(this.is_show_info)this.exam_info_dialog_show=!1;else if(+this.current_exam.status==1){if(((t=this.current_exam)==null?void 0:t.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");c({onlineExamId:this.current_exam.id}).then(e=>{e.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/"+e.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(t=2,a){this.current_exam=a,_({onlineExamId:this.current_exam.studentOnlineExamId}).then(e=>{e.data&&(this.$message.success("\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/"+e.data.id}))})},pagingChange(t){typeof t.currentPage!="number"&&typeof t.pageSize!="number"||(this.page_info={...this.page_info,...t},this.pagingFindList())},initPageInfo(){this.page_info={currentPage:1,pageSize:this.page_info.pageSize,total:0}},pagingFindList(t){t instanceof PointerEvent&&this.initPageInfo(),this.paper_list_loading=!0,h({...this.page_info,...this.form}).then(a=>{const{currentPage:e,pageSize:i,total:n}=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:e,pageSize:i,total:n}}).finally(a=>{this.paper_list_loading=!1})}},mixins:[d("MOCK_EXAMINATION")]},r={};var y=s(v,g,x,!1,w,"44a1b9bd",null,null);function w(t){for(let a in r)this[a]=r[a]}const H=function(){return y.exports}();export{H as default};