|
@@ -69,6 +69,13 @@
|
|
|
<view class="title">答题时长</view>
|
|
|
<canvas canvas-id="Canvas2"></canvas>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="item" v-show="reportdata.score">
|
|
|
+ <view class="title">试卷得分
|
|
|
+ <text>(含简答和案例题)</text>
|
|
|
+ </view>
|
|
|
+ <canvas canvas-id="Canvas3"></canvas>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -159,6 +166,29 @@ export default {
|
|
|
context2.draw();
|
|
|
}
|
|
|
|
|
|
+ if(this.reportdata.score) {
|
|
|
+ var context3 = uni.createCanvasContext('Canvas3');
|
|
|
+ this.context3 = context3;
|
|
|
+ context3.setStrokeStyle('#EEEEEE');
|
|
|
+ context3.setLineWidth(caculateX * 20);
|
|
|
+ context3.arc(caculateX * 90, caculateX * 90, caculateX * 80, 0, 2 * Math.PI, true);
|
|
|
+ context3.stroke();
|
|
|
+ context3.beginPath();
|
|
|
+ context3.setStrokeStyle('#32D74B');
|
|
|
+ context3.setFillStyle('#32D74B');
|
|
|
+ context3.setTextAlign('center');
|
|
|
+ context3.setTextBaseline('middle');
|
|
|
+ context3.setLineCap('round');
|
|
|
+ context3.setFontSize(caculateX * 64);
|
|
|
+ context3.fillText((this.reportdata.performance + this.reportdata.score), caculateX * 90, caculateX * 90, caculateX * 180);
|
|
|
+ context3.setFillStyle('#999999');
|
|
|
+ context3.setFontSize(caculateX * 20);
|
|
|
+ context3.fillText(`满分${this.reportdata.totalScore}`, caculateX * 90, caculateX * 130, caculateX * 180);
|
|
|
+ context3.arc(caculateX * 90, caculateX * 90, caculateX * 80, -Math.PI/2, -Math.PI/2 + ((this.reportdata.performance + this.reportdata.score) / this.reportdata.totalScore) * 2 * Math.PI, false);
|
|
|
+ context3.stroke();
|
|
|
+ context3.draw();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
});
|
|
|
}
|