Files
Electron_Test/front/assets/index.430aaa6d.js
2024-04-07 09:46:14 +08:00

2 lines
5.9 KiB
JavaScript

import{E as f,a as v,b as g,c as x,d as w,e as y}from"./ExamDetailsMistakesPercent.5d7a33ed.js";import{C as d}from"./index.bb5f1b0a.js";import{f as l}from"./index.70d38b82.js";import{n}from"./vueComponentNormalizer.9ef17bb1.js";/* empty css *//* empty css */import{T as b}from"./TableLayout.05a39499.js";import{D as $}from"./DialogLayout.e3af3567.js";/* empty css */import"./index.51e15757.js";/* empty css */import"./ActionBar.1725b1a3.js";/* empty css */var E=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"chart",attrs:{"data-title":"\u8003\u8BD5\u4E22\u5206\u9898\u578B\u7EDF\u8BA1"}})},D=[];const S={methods:{async findData(t){var a,r,i,c;const e=await l("exam-mistakes-type-percent");(r=(a=this.chart)==null?void 0:a.destroy)==null||r.call(a),this.chart=new d({padding:[30,0],container:this.$el,autoFit:!0,height:300}),this.chart.scale("percent",{formatter:o=>(o=o*100+"%",o)}),this.chart.coordinate("theta",{radius:.75,innerRadius:.6}),this.chart.tooltip({showTitle:!1,showMarkers:!1,itemTpl:'<li class="g2-tooltip-list-item"><span style="background-color:{color};" class="g2-tooltip-marker"></span>{name}: {value}</li>'}),this.chart.interval().adjust("stack").position("percent").color("item").label("percent",o=>({content:s=>`${(o*100).toFixed(2)}%`})).tooltip("item*percent*count",(o,s,_)=>(s=_,{name:o,value:s+"\u6B21"})),this.chart.interaction("element-active"),this.chart.data(e),this.chart.annotation().html({position:["50%","50%"],html:`<div style="color:#8c8c8c;font-size: 14px;text-align: center;width: 10em;">\u4E22\u5206\u9898<br><span style="color:#8c8c8c;font-size:20px">${(c=(i=e==null?void 0:e[0])==null?void 0:i.total)!=null?c:0}</span>\u9053</div>`,alignX:"middle",alignY:"middle"}),this.chart.render()}},mounted(){this.findData()}},u={};var k=n(S,E,D,!1,C,null,null,null);function C(t){for(let e in u)this[e]=u[e]}const P=function(){return k.exports}();var T=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"gy-chart chart",attrs:{"data-title":"\u672C\u573A\u8003\u8BD5\u6210\u7EE9\u7EDF\u8BA1"}})},I=[];const z={props:{exam:{}},watch:{exam:{deep:!0,immediate:!0,handler(t){t&&this.$nextTick(()=>{this.findData(t.examId)})}}},methods:{async findData(t){this.chart&&this.chart.destroy(),this.chart=new d({container:this.$el,autoFit:!0,height:500,padding:[50,20,50,20]}),this.chart.scale("value",{alias:"\u5206\u6570"});const e=await l("exam-details-score-order-tower",{noCatch:!0,examId:t});e.forEach(a=>{this.chart.annotation().text({position:[a.type,a.value],content:a.value,style:{textAlign:"center"},offsetY:-5})}),this.chart.data(e),this.chart.axis("type",{tickLine:{alignTick:!1}}),this.chart.axis("value",!1),this.chart.tooltip({showMarkers:!1}),this.chart.interval().position("type*value"),this.chart.interaction("element-active"),this.chart.render()}}},h={};var M=n(z,T,I,!1,F,null,null,null);function F(t){for(let e in h)this[e]=h[e]}const j=function(){return M.exports}();var L=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"block"},[a("TableLayout",{attrs:{column:t.column,data:t.table_data,pageInfo:t.pageInfo,height:300},on:{"current-change":function(r){return t.pagingChange({currentPage:r})},"size-change":function(r){return t.pagingChange({pageSize:r})}},scopedSlots:t._u([{key:"action",fn:function(r){return[a("el-button",{attrs:{type:"text"},on:{click:function(i){return t.lookPaper(r.row)}}},[t._v("\u67E5\u770B")])]}}])}),a("DialogLayout",{attrs:{visible:t.show,width:"900px",title:"\u8BE6\u60C5"},on:{onCancel:t.onCancel,onConfirm:t.onCancel}},[a("div",{staticClass:"chart-layout"},[a("ExamDetailsScorePercent",{attrs:{exam:t.currentExam}}),a("ExamDetailsMistakesPercent",{attrs:{exam:t.currentExam}}),a("ExamDetailsScoreOrderTower",{attrs:{exam:t.currentExam}})],1)])],1)},R=[];const A={components:{TableLayout:b,ExamDetailsScorePercent:f,DialogLayout:$,ExamDetailsMistakesPercent:v,ExamDetailsScoreOrderTower:j},data:t=>({column:[{prop:"historyId",label:"\u5E8F\u53F7",align:"center","show-overflow-tooltip":!0},{prop:"title",label:"\u8003\u8BD5\u540D\u79F0",align:"center","show-overflow-tooltip":!0},{prop:"startTime",label:"\u5F00\u59CB\u65F6\u95F4",align:"center","show-overflow-tooltip":!0},{prop:"score",label:"\u8003\u8BD5\u6210\u7EE9",align:"center","show-overflow-tooltip":!0},{prop:"isPass",label:"\u8003\u8BD5\u72B6\u6001",align:"center","show-overflow-tooltip":!0},{prop:"duration",label:"\u8003\u8BD5\u7528\u65F6",align:"center","show-overflow-tooltip":!0},{prop:"examScore",label:"\u8003\u8BD5\u603B\u5206",width:150,align:"center","show-overflow-tooltip":!0},{prop:"totalStudent",label:"\u672C\u573A\u8003\u8BD5\u4EBA\u6570",width:250,align:"center","show-overflow-tooltip":!0},{prop:"action",label:"\u64CD\u4F5C",minWidth:100,align:"center","show-overflow-tooltip":!0}],table_data:[],currentExam:null,pageInfo:{currentPage:1,pageSize:5,total:0,layout:"total, prev, pager, next, jumper"},show:!1}),mounted(){this.findData()},methods:{onCancel(){this.show=!1},lookPaper(t){this.currentExam=t,this.show=!0},async findData(){const t=await l("exam-details-table",{...this.pageInfo});this.table_data=t.data,this.pageInfo.total=t.total,this.pageInfo.currentPage=t.currentPage,this.pageInfo.pageSize=t.pageSize},pagingChange(t){typeof t.currentPage!="number"&&typeof t.pageSize!="number"||(this.pageInfo={...this.pageInfo,...t},this.findData())}}},p={};var O=n(A,L,R,!1,Y,null,null,null);function Y(t){for(let e in p)this[e]=p[e]}const H=function(){return O.exports}(),W={render(t){return t("div",[[g,x,w,y,P],[H]][this.$store.statistic_tab_active].map(t))}};let X,q;const m={};var B=n(W,X,q,!1,G,null,null,null);function G(t){for(let e in m)this[e]=m[e]}const it=function(){return B.exports}();export{it as default};