no message
This commit is contained in:
parent
a481b05782
commit
8a1d7a1dec
|
|
@ -54,6 +54,60 @@
|
||||||
<div class="content unicode" style="display: block;">
|
<div class="content unicode" style="display: block;">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame-1</div>
|
||||||
|
<div class="code-name">&#xe62c;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame-2</div>
|
||||||
|
<div class="code-name">&#xe62a;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame</div>
|
||||||
|
<div class="code-name">&#xe62b;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame 2223726</div>
|
||||||
|
<div class="code-name">&#xe63f;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame 2223727</div>
|
||||||
|
<div class="code-name">&#xe640;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame 2223723</div>
|
||||||
|
<div class="code-name">&#xe641;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame 2223725</div>
|
||||||
|
<div class="code-name">&#xe642;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame 2223728</div>
|
||||||
|
<div class="code-name">&#xe643;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">Frame 2223724</div>
|
||||||
|
<div class="code-name">&#xe644;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">Frame</div>
|
<div class="name">Frame</div>
|
||||||
|
|
@ -414,9 +468,9 @@
|
||||||
<pre><code class="language-css"
|
<pre><code class="language-css"
|
||||||
>@font-face {
|
>@font-face {
|
||||||
font-family: 'iconfont';
|
font-family: 'iconfont';
|
||||||
src: url('iconfont.woff2?t=1710142362036') format('woff2'),
|
src: url('iconfont.woff2?t=1718091057560') format('woff2'),
|
||||||
url('iconfont.woff?t=1710142362036') format('woff'),
|
url('iconfont.woff?t=1718091057560') format('woff'),
|
||||||
url('iconfont.ttf?t=1710142362036') format('truetype');
|
url('iconfont.ttf?t=1718091057560') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
|
|
@ -442,6 +496,87 @@
|
||||||
<div class="content font-class">
|
<div class="content font-class">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-Frame-114"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame-1
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-Frame-114
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-Frame-25"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame-2
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-Frame-25
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-Frame15"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-Frame15
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-Frame2223726"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame 2223726
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-Frame2223726
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-Frame2223727"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame 2223727
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-Frame2223727
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-Frame2223723"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame 2223723
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-Frame2223723
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-Frame2223725"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame 2223725
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-Frame2223725
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-Frame2223728"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame 2223728
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-Frame2223728
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-Frame2223724"></span>
|
||||||
|
<div class="name">
|
||||||
|
Frame 2223724
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-Frame2223724
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-Frame14"></span>
|
<span class="icon iconfont icon-Frame14"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
|
|
@ -982,6 +1117,78 @@
|
||||||
<div class="content symbol">
|
<div class="content symbol">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-Frame-114"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame-1</div>
|
||||||
|
<div class="code-name">#icon-Frame-114</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-Frame-25"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame-2</div>
|
||||||
|
<div class="code-name">#icon-Frame-25</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-Frame15"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame</div>
|
||||||
|
<div class="code-name">#icon-Frame15</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-Frame2223726"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame 2223726</div>
|
||||||
|
<div class="code-name">#icon-a-Frame2223726</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-Frame2223727"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame 2223727</div>
|
||||||
|
<div class="code-name">#icon-a-Frame2223727</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-Frame2223723"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame 2223723</div>
|
||||||
|
<div class="code-name">#icon-a-Frame2223723</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-Frame2223725"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame 2223725</div>
|
||||||
|
<div class="code-name">#icon-a-Frame2223725</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-Frame2223728"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame 2223728</div>
|
||||||
|
<div class="code-name">#icon-a-Frame2223728</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-Frame2223724"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">Frame 2223724</div>
|
||||||
|
<div class="code-name">#icon-a-Frame2223724</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-Frame14"></use>
|
<use xlink:href="#icon-Frame14"></use>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 3423846 */
|
font-family: "iconfont"; /* Project id 3423846 */
|
||||||
src: url('iconfont.woff2?t=1710142362036') format('woff2'),
|
src: url('iconfont.woff2?t=1718091057560') format('woff2'),
|
||||||
url('iconfont.woff?t=1710142362036') format('woff'),
|
url('iconfont.woff?t=1718091057560') format('woff'),
|
||||||
url('iconfont.ttf?t=1710142362036') format('truetype');
|
url('iconfont.ttf?t=1718091057560') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
|
@ -13,6 +13,42 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-Frame-114:before {
|
||||||
|
content: "\e62c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-Frame-25:before {
|
||||||
|
content: "\e62a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-Frame15:before {
|
||||||
|
content: "\e62b";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-Frame2223726:before {
|
||||||
|
content: "\e63f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-Frame2223727:before {
|
||||||
|
content: "\e640";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-Frame2223723:before {
|
||||||
|
content: "\e641";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-Frame2223725:before {
|
||||||
|
content: "\e642";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-Frame2223728:before {
|
||||||
|
content: "\e643";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-a-Frame2223724:before {
|
||||||
|
content: "\e644";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-Frame14:before {
|
.icon-Frame14:before {
|
||||||
content: "\e63e";
|
content: "\e63e";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,69 @@
|
||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "40679475",
|
||||||
|
"name": "Frame-1",
|
||||||
|
"font_class": "Frame-114",
|
||||||
|
"unicode": "e62c",
|
||||||
|
"unicode_decimal": 58924
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "40679413",
|
||||||
|
"name": "Frame-2",
|
||||||
|
"font_class": "Frame-25",
|
||||||
|
"unicode": "e62a",
|
||||||
|
"unicode_decimal": 58922
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "40679411",
|
||||||
|
"name": "Frame",
|
||||||
|
"font_class": "Frame15",
|
||||||
|
"unicode": "e62b",
|
||||||
|
"unicode_decimal": 58923
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39942228",
|
||||||
|
"name": "Frame 2223726",
|
||||||
|
"font_class": "a-Frame2223726",
|
||||||
|
"unicode": "e63f",
|
||||||
|
"unicode_decimal": 58943
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39942227",
|
||||||
|
"name": "Frame 2223727",
|
||||||
|
"font_class": "a-Frame2223727",
|
||||||
|
"unicode": "e640",
|
||||||
|
"unicode_decimal": 58944
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39942225",
|
||||||
|
"name": "Frame 2223723",
|
||||||
|
"font_class": "a-Frame2223723",
|
||||||
|
"unicode": "e641",
|
||||||
|
"unicode_decimal": 58945
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39942224",
|
||||||
|
"name": "Frame 2223725",
|
||||||
|
"font_class": "a-Frame2223725",
|
||||||
|
"unicode": "e642",
|
||||||
|
"unicode_decimal": 58946
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39942226",
|
||||||
|
"name": "Frame 2223728",
|
||||||
|
"font_class": "a-Frame2223728",
|
||||||
|
"unicode": "e643",
|
||||||
|
"unicode_decimal": 58947
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "39942223",
|
||||||
|
"name": "Frame 2223724",
|
||||||
|
"font_class": "a-Frame2223724",
|
||||||
|
"unicode": "e644",
|
||||||
|
"unicode_decimal": 58948
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "39483566",
|
"icon_id": "39483566",
|
||||||
"name": "Frame",
|
"name": "Frame",
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:get/get_connect/http/src/request/request.dart';
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
part 'do_paper_details_result.g.dart';
|
part 'do_paper_details_result.g.dart';
|
||||||
|
|
@ -127,33 +128,43 @@ class StudentQuestions extends Object {
|
||||||
@JsonKey(name: 'questionNo')
|
@JsonKey(name: 'questionNo')
|
||||||
int questionNo;
|
int questionNo;
|
||||||
|
|
||||||
|
// 总分
|
||||||
@JsonKey(name: 'score')
|
@JsonKey(name: 'score')
|
||||||
int? score;
|
int? score;
|
||||||
|
|
||||||
|
// 分值步长
|
||||||
@JsonKey(name: 'scoreStep')
|
@JsonKey(name: 'scoreStep')
|
||||||
int? scoreStep;
|
int? scoreStep;
|
||||||
|
|
||||||
|
// 是否已经批阅
|
||||||
@JsonKey(name: 'isNeedAnnotate')
|
@JsonKey(name: 'isNeedAnnotate')
|
||||||
bool isNeedAnnotate;
|
bool isNeedAnnotate;
|
||||||
|
|
||||||
|
// 学生得分
|
||||||
@JsonKey(name: 'studentScore')
|
@JsonKey(name: 'studentScore')
|
||||||
int? studentScore;
|
int? studentScore;
|
||||||
|
|
||||||
|
// 是否正确
|
||||||
@JsonKey(name: 'isCorrect')
|
@JsonKey(name: 'isCorrect')
|
||||||
bool? isCorrect;
|
bool? isCorrect;
|
||||||
|
|
||||||
|
// 正确率
|
||||||
@JsonKey(name: 'correctRate')
|
@JsonKey(name: 'correctRate')
|
||||||
int correctRate;
|
int correctRate;
|
||||||
|
|
||||||
StudentQuestions(
|
@JsonKey(name: 'height')
|
||||||
this.questionNo,
|
double height;
|
||||||
|
|
||||||
|
StudentQuestions({
|
||||||
|
required this.height,
|
||||||
|
required this.questionNo,
|
||||||
|
required this.correctRate,
|
||||||
|
required this.isNeedAnnotate,
|
||||||
this.score,
|
this.score,
|
||||||
this.scoreStep,
|
this.scoreStep,
|
||||||
this.isNeedAnnotate,
|
|
||||||
this.studentScore,
|
this.studentScore,
|
||||||
this.isCorrect,
|
this.isCorrect,
|
||||||
this.correctRate,
|
});
|
||||||
);
|
|
||||||
|
|
||||||
factory StudentQuestions.fromJson(Map<String, dynamic> srcJson) => _$StudentQuestionsFromJson(srcJson);
|
factory StudentQuestions.fromJson(Map<String, dynamic> srcJson) => _$StudentQuestionsFromJson(srcJson);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
part 'do_test_questions_image_info.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class TestQuestionsImageInfo extends Object {
|
||||||
|
@JsonKey(name: 'boxHeight')
|
||||||
|
double boxHeight;
|
||||||
|
|
||||||
|
@JsonKey(name: 'boxWidth')
|
||||||
|
double boxWidth;
|
||||||
|
|
||||||
|
@JsonKey(name: 'imageWidth') // 图片原始宽
|
||||||
|
double imageWidth;
|
||||||
|
|
||||||
|
@JsonKey(name: 'imageHeight') // 图片原始高
|
||||||
|
double imageHeight;
|
||||||
|
|
||||||
|
@JsonKey(name: 'url')
|
||||||
|
String url;
|
||||||
|
|
||||||
|
@JsonKey(name: 'actualImgWidth') // 实际展示图片宽度
|
||||||
|
double actualImgWidth;
|
||||||
|
|
||||||
|
@JsonKey(name: 'actualImgHeight') // 实际展示图片高度
|
||||||
|
double actualImgHeight;
|
||||||
|
|
||||||
|
@JsonKey(name: 'remainingHeight') // 视图剩余高度 实际展示图片展示高度下 剩余高度.(若伟负数就是超出视图的高度值)
|
||||||
|
double remainingHeight;
|
||||||
|
|
||||||
|
// 基准
|
||||||
|
@JsonKey(name: 'scaleRatio')
|
||||||
|
double scaleRatio;
|
||||||
|
|
||||||
|
// 缩放比例
|
||||||
|
@JsonKey(name: 'zoom')
|
||||||
|
double zoom;
|
||||||
|
|
||||||
|
TestQuestionsImageInfo({
|
||||||
|
required this.url,
|
||||||
|
required this.boxWidth,
|
||||||
|
required this.boxHeight,
|
||||||
|
required this.imageWidth,
|
||||||
|
required this.imageHeight,
|
||||||
|
this.scaleRatio = 1,
|
||||||
|
this.zoom = 1,
|
||||||
|
this.actualImgWidth = 0,
|
||||||
|
this.actualImgHeight = 0,
|
||||||
|
this.remainingHeight = 0,
|
||||||
|
}) {
|
||||||
|
// 图片已视图宽为基准,高度自适应可滑动 图片的实际宽高都需要乘此基准值
|
||||||
|
scaleRatio = boxWidth / imageWidth;
|
||||||
|
actualImgWidth = imageWidth * scaleRatio;
|
||||||
|
actualImgHeight = imageHeight * scaleRatio;
|
||||||
|
remainingHeight = boxHeight - actualImgHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
factory TestQuestionsImageInfo.fromJson(Map<String, dynamic> srcJson) => _$TestQuestionsImageInfoFromJson(srcJson);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this);
|
||||||
|
}
|
||||||
|
|
@ -20,6 +20,9 @@ Widget $theCachedNetworkImage(ImageWidgetBuilder imageBuilder, {required String
|
||||||
imageUrl: imageUrl,
|
imageUrl: imageUrl,
|
||||||
imageBuilder: imageBuilder,
|
imageBuilder: imageBuilder,
|
||||||
placeholder: (context, url) => Center(child: SpinKitWave(color: Theme.of(context).primaryColor, size: 50.r)),
|
placeholder: (context, url) => Center(child: SpinKitWave(color: Theme.of(context).primaryColor, size: 50.r)),
|
||||||
|
errorListener: (e) {
|
||||||
|
print('图片报错.............$e');
|
||||||
|
},
|
||||||
errorWidget: (context, url, error) {
|
errorWidget: (context, url, error) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => (useImgRefsh.imageKey.value = UniqueKey()),
|
onTap: () => (useImgRefsh.imageKey.value = UniqueKey()),
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
|
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
|
||||||
|
|
||||||
import '../configuration_files/index.dart';
|
import '../configuration_files/index.dart';
|
||||||
|
|
||||||
|
|
@ -53,101 +54,154 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double iconSize = 24.sp;
|
double iconSize = 18.sp;
|
||||||
Color actionColor = Colors.white;
|
Color actionColor = Colors.white;
|
||||||
Color defaultColor = const Color.fromRGBO(132, 146, 163, 1);
|
Color defaultColor = const Color.fromRGBO(132, 146, 163, 1);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: _animationController.value * 44.h,
|
height: _animationController.value * 64.h,
|
||||||
color: const Color.fromRGBO(83, 83, 83, 1),
|
color: const Color.fromRGBO(83, 83, 83, 1),
|
||||||
padding: EdgeInsets.symmetric(vertical: 1.h),
|
// padding: EdgeInsets.symmetric(vertical: 1.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 8,
|
flex: 7,
|
||||||
child: Row(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
Expanded(
|
||||||
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
child: Row(
|
||||||
// if (jobNotesModel != null) {
|
children: [
|
||||||
// return AchievementView(
|
// 注解笔
|
||||||
// elevation: 5,
|
Expanded(
|
||||||
// duration: Duration(seconds: 1),
|
child: SizedBox(
|
||||||
// title: "笔记回显提示",
|
width: double.infinity,
|
||||||
// subTitle: "当前正处于笔记回显",
|
height: double.infinity,
|
||||||
// color: Theme.of(context).primaryColor,
|
child: IconButton(
|
||||||
// ).show(context);
|
icon: Obx(() {
|
||||||
// }
|
return Icon(
|
||||||
// easyThrottle('setSwitchBrush', () => ref.read(annotationGraffitiSwitchProvider.notifier).setSwitchBrush());
|
const IconData(0xe635, fontFamily: "AlibabaIcon"),
|
||||||
_logicControl.pen.value = !_logicControl.pen.value;
|
size: iconSize,
|
||||||
}),
|
color: _logicControl.pen.value ? actionColor : defaultColor,
|
||||||
child: Obx(() {
|
);
|
||||||
return Icon(
|
}),
|
||||||
const IconData(0xe635, fontFamily: "AlibabaIcon"),
|
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {
|
||||||
size: iconSize,
|
_logicControl.gestureMove.value = false;
|
||||||
color: _logicControl.pen.value ? actionColor : defaultColor,
|
_logicControl.pen.value = !_logicControl.pen.value;
|
||||||
);
|
}),
|
||||||
}),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
||||||
|
// 滑动试题
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: IconButton(
|
||||||
|
icon: Obx(
|
||||||
|
() {
|
||||||
|
return Icon(
|
||||||
|
const IconData(0xe636, fontFamily: "AlibabaIcon"),
|
||||||
|
size: iconSize,
|
||||||
|
color: _logicControl.gestureMove.value ? actionColor : defaultColor,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {
|
||||||
|
_logicControl.pen.value = false;
|
||||||
|
_logicControl.gestureMove.value = !_logicControl.gestureMove.value;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
||||||
|
// 全对按钮
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: TextButton(
|
||||||
|
child: quickText('全 对', color: Colors.white, size: 12.sp),
|
||||||
|
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () {}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
Container(width: double.infinity, color: Colors.white, height: 0.5.h),
|
||||||
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
Expanded(
|
||||||
// if (jobNotesModel != null) {
|
child: Row(
|
||||||
// return AchievementView(
|
children: [
|
||||||
// elevation: 5,
|
// 撤销上一步
|
||||||
// duration: Duration(seconds: 1),
|
Expanded(
|
||||||
// title: "笔记回显提示",
|
child: SizedBox(
|
||||||
// subTitle: "当前正处于笔记回显",
|
width: double.infinity,
|
||||||
// color: Theme.of(context).primaryColor,
|
height: double.infinity,
|
||||||
// ).show(context);
|
child: IconButton(
|
||||||
// }
|
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {}),
|
||||||
// easyThrottle('setSwitchBrush', () => ref.read(annotationGraffitiSwitchProvider.notifier).setSwitchBrush());
|
icon: Icon(const IconData(0xe638, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
||||||
_logicControl.pen.value = !_logicControl.pen.value;
|
),
|
||||||
}),
|
),
|
||||||
child: Icon(const IconData(0xe638, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
),
|
||||||
),
|
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
||||||
InkWell(
|
Expanded(
|
||||||
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
child: SizedBox(
|
||||||
_logicControl.gestureMove.value = !_logicControl.gestureMove.value;
|
width: double.infinity,
|
||||||
}),
|
height: double.infinity,
|
||||||
// IconData(0xe62f, fontFamily: "AlibabaIcon")
|
child: IconButton(
|
||||||
child: Icon(const IconData(0xe636, fontFamily: "AlibabaIcon"),
|
icon: Icon(const IconData(0xe637, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
||||||
size: iconSize, color: _logicControl.gestureMove.value ? actionColor : defaultColor),
|
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {}),
|
||||||
),
|
),
|
||||||
InkWell(
|
),
|
||||||
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
),
|
||||||
// 清空全部 TODO
|
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
||||||
}),
|
// 全错按钮
|
||||||
child: Icon(const IconData(0xe637, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () {}),
|
||||||
|
child: quickText('全 错', color: Colors.white, size: 12.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Container(
|
child: Row(
|
||||||
child: InkWell(
|
children: [
|
||||||
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
Expanded(
|
||||||
// if (jobNotesModel != null) {
|
child: SizedBox(
|
||||||
// return AchievementView(
|
width: double.infinity,
|
||||||
// elevation: 5,
|
height: double.infinity,
|
||||||
// duration: Duration(seconds: 1),
|
child: TextButton(
|
||||||
// title: "笔记回显提示",
|
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () {}),
|
||||||
// subTitle: "当前正处于笔记回显",
|
child: quickText('取 消', size: 12.sp, color: Colors.white),
|
||||||
// color: Theme.of(context).primaryColor,
|
),
|
||||||
// ).show(context);
|
),
|
||||||
// }
|
|
||||||
// easyThrottle('setSwitchBrush', () => ref.read(annotationGraffitiSwitchProvider.notifier).setSwitchBrush());
|
|
||||||
_logicControl.opControl.value = !_logicControl.opControl.value;
|
|
||||||
}),
|
|
||||||
child: Icon(
|
|
||||||
const IconData(0xe639, fontFamily: "AlibabaIcon"),
|
|
||||||
size: iconSize,
|
|
||||||
color: _logicControl.opControl.value ? actionColor : defaultColor,
|
|
||||||
),
|
),
|
||||||
),
|
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: double.infinity,
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () {}),
|
||||||
|
child: quickText('提 交', size: 12.sp, color: const Color.fromRGBO(76, 199, 147, 1)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
|
||||||
tooltip: "继续批阅",
|
tooltip: "继续批阅",
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
onPressed: callFun,
|
onPressed: callFun,
|
||||||
child: Icon(Icons.flip_camera_android_outlined, size: 30.sp, color: Theme.of(context).primaryColor),
|
child: Icon(Icons.flip_camera_android_outlined, size: 20.sp, color: Theme.of(context).primaryColor),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Expanded(
|
return Expanded(
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
|
|
@ -6,9 +8,12 @@ import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/config/request_config.dart';
|
import 'package:making_school_asignment_app/common/config/request_config.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_result.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_result.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/job/marking_models/do_test_questions_image_info.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/cached_network_img.dart';
|
import 'package:making_school_asignment_app/common/utils/cached_network_img.dart';
|
||||||
|
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/children/homework_review/configuration_files/index.dart';
|
import 'package:making_school_asignment_app/page/home_page/children/homework_review/configuration_files/index.dart';
|
||||||
|
import 'package:percent_indicator/linear_percent_indicator.dart';
|
||||||
|
|
||||||
import 'dropdown_switch_students_type.dart';
|
import 'dropdown_switch_students_type.dart';
|
||||||
|
|
||||||
|
|
@ -28,131 +33,283 @@ class _QuestionPaperViewState extends State<QuestionPaperView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
|
return Row(
|
||||||
var maxWidth = constraints.maxWidth;
|
children: [
|
||||||
var maxHeight = constraints.maxHeight;
|
// 试题图片视图
|
||||||
return Stack(
|
Expanded(
|
||||||
children: [
|
flex: 7,
|
||||||
$MainBox(maxWidth, maxHeight),
|
child: LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
Positioned(
|
var maxWidth = constraints.maxWidth;
|
||||||
left: 3.w,
|
var maxHeight = constraints.maxHeight;
|
||||||
top: (maxHeight / 2) - 20.h,
|
return Stack(
|
||||||
child: Obx(() {
|
children: [
|
||||||
LastPage? lastPageVal = sateData.data.value?.lastPage;
|
// 主图
|
||||||
if (lastPageVal == null) return const SizedBox();
|
$QuestionImageView(maxWidth, maxHeight, sateData),
|
||||||
|
// 继续批阅按钮
|
||||||
|
Positioned(right: 3.w, bottom: 4.h, child: const $ContinueToReview(isFloatingAction: true)),
|
||||||
|
// 上一题按钮
|
||||||
|
Positioned(
|
||||||
|
left: 2.w,
|
||||||
|
top: (maxHeight / 2) - 20.h,
|
||||||
|
child: Obx(() {
|
||||||
|
LastPage? lastPageVal = sateData.data.value?.lastPage;
|
||||||
|
if (lastPageVal == null) return const SizedBox();
|
||||||
|
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
heroTag: '点击前往上一题',
|
heroTag: '点击前往上一题',
|
||||||
tooltip: '点击前往上一题',
|
tooltip: '点击前往上一题',
|
||||||
focusColor: Theme.of(context).primaryColor,
|
focusColor: Theme.of(context).primaryColor,
|
||||||
backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1),
|
backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1),
|
||||||
elevation: 6.r,
|
elevation: 6.r,
|
||||||
onPressed: () => easyThrottle('TestQuestionSwitch', () {
|
onPressed: () => easyThrottle('TestQuestionSwitch', () {
|
||||||
var param = sateData.param.value;
|
var param = sateData.param.value;
|
||||||
param.studentId = lastPageVal.studentId;
|
param.studentId = lastPageVal.studentId;
|
||||||
param.templateId = lastPageVal.templateId;
|
param.templateId = lastPageVal.templateId;
|
||||||
sateData.param.value = DoPaperDetailsParam.fromJson(param.toJson());
|
sateData.param.value = DoPaperDetailsParam.fromJson(param.toJson());
|
||||||
}),
|
}),
|
||||||
child: Icon(Icons.arrow_back_ios, color: Colors.white, size: 22.sp),
|
child: Icon(Icons.arrow_back_ios, color: Colors.white, size: 22.sp),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
Positioned(
|
// 下一题按钮
|
||||||
right: 2.w,
|
Positioned(
|
||||||
top: (maxHeight / 2) - 20.h,
|
right: 2.w,
|
||||||
child: Obx(() {
|
top: (maxHeight / 2) - 20.h,
|
||||||
NextPage? nextPageVal = sateData.data.value?.nextPage;
|
child: Obx(() {
|
||||||
if (nextPageVal == null) return const SizedBox();
|
NextPage? nextPageVal = sateData.data.value?.nextPage;
|
||||||
|
if (nextPageVal == null) return const SizedBox();
|
||||||
|
|
||||||
return FloatingActionButton(
|
return FloatingActionButton(
|
||||||
heroTag: '点击前往下一题',
|
heroTag: '点击前往下一题',
|
||||||
tooltip: '点击前往下一题',
|
tooltip: '点击前往下一题',
|
||||||
elevation: 6.r,
|
elevation: 6.r,
|
||||||
backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1),
|
backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1),
|
||||||
onPressed: () => easyThrottle('TestQuestionSwitch', () {
|
onPressed: () => easyThrottle('TestQuestionSwitch', () {
|
||||||
var param = sateData.param.value;
|
var param = sateData.param.value;
|
||||||
param.studentId = nextPageVal.studentId;
|
param.studentId = nextPageVal.studentId;
|
||||||
param.templateId = nextPageVal.templateId;
|
param.templateId = nextPageVal.templateId;
|
||||||
sateData.param.value = DoPaperDetailsParam.fromJson(param.toJson());
|
sateData.param.value = DoPaperDetailsParam.fromJson(param.toJson());
|
||||||
}),
|
}),
|
||||||
child: Icon(Icons.arrow_forward_ios, color: Colors.white, size: 22.sp),
|
child: Icon(Icons.arrow_forward_ios, color: Colors.white, size: 22.sp),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
});
|
}),
|
||||||
|
),
|
||||||
|
// 试题题号视图
|
||||||
|
Expanded(flex: 2, child: $QuestionNumberView(sateData)),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
// 试题题号视图
|
||||||
Widget $mainBox(double maxWidth, double maxHeight) {
|
@hwidget
|
||||||
final sateData = Get.find<HomeworkReviewLogic>().state;
|
Widget $questionNumberView(BuildContext context, HomeworkReviewState sateData) {
|
||||||
final scrollController = useScrollController();
|
final scrollControllerNum = useScrollController(); // 试题题号区域
|
||||||
// 可选:添加滚动监听
|
|
||||||
useEffect(() {
|
|
||||||
scrollController.addListener(() {
|
|
||||||
// 执行滚动相关的逻辑,例如打印滚动位置
|
|
||||||
print(scrollController.offset);
|
|
||||||
});
|
|
||||||
// 返回一个清理函数,在组件销毁时移除监听
|
|
||||||
return () => scrollController.dispose();
|
|
||||||
}, [scrollController]);
|
|
||||||
|
|
||||||
// ScrollController? controller;
|
useEffect(() {
|
||||||
return Row(
|
StreamSubscription listenVal = sateData.slide.listen((e) => scrollControllerNum.jumpTo(e));
|
||||||
children: [
|
|
||||||
Expanded(
|
// 返回一个清理函数,在组件销毁时移除监听
|
||||||
flex: 7,
|
return () {
|
||||||
child: Stack(
|
listenVal.cancel();
|
||||||
alignment: const FractionalOffset(0.94, 0.94),
|
};
|
||||||
children: [
|
}, []);
|
||||||
Container(
|
|
||||||
width: maxWidth,
|
return Container(
|
||||||
height: maxHeight,
|
height: double.infinity,
|
||||||
alignment: Alignment.center,
|
decoration: BoxDecoration(
|
||||||
child: SingleChildScrollView(
|
color: const Color.fromRGBO(159, 159, 159, 0.97),
|
||||||
controller: scrollController,
|
boxShadow: [
|
||||||
physics: const BouncingScrollPhysics(),
|
BoxShadow(
|
||||||
padding: EdgeInsets.zero,
|
color: const Color.fromRGBO(46, 91, 255, 0.2),
|
||||||
scrollDirection: Axis.vertical, // 设置垂直滚动
|
offset: Offset(0, 8.w), //阴影y轴偏移量
|
||||||
child: Obx(() {
|
blurRadius: 1, //阴影模糊程度
|
||||||
var imageUrl = sateData.data.value?.zgtAnswer;
|
spreadRadius: 2, //阴影扩散程度
|
||||||
if (imageUrl == null) return const SizedBox();
|
)
|
||||||
return $TheCachedNetworkImage(
|
],
|
||||||
(context, imageProvider) {
|
),
|
||||||
Image imageWidget = Image(image: imageProvider, fit: BoxFit.fitWidth);
|
child: SingleChildScrollView(
|
||||||
// imageStream?.removeListener(theImageStreamListener);
|
controller: scrollControllerNum,
|
||||||
// imageStream = imageWidget.image.resolve(ImageConfiguration())..addListener(theImageStreamListener);
|
physics: const BouncingScrollPhysics(),
|
||||||
return imageWidget;
|
padding: EdgeInsets.zero,
|
||||||
},
|
scrollDirection: Axis.vertical, // 设置垂直滚动
|
||||||
imageUrl: RequestConfig.imgUrl + imageUrl,
|
child: Obx(() {
|
||||||
);
|
var imageVal = sateData.imageScale.value;
|
||||||
}),
|
if (imageVal == null) return const SizedBox();
|
||||||
),
|
var studentQuestions = sateData.data.value?.studentQuestions;
|
||||||
),
|
return Padding(
|
||||||
// 继续批阅按钮
|
padding: EdgeInsets.only(top: imageVal.remainingHeight > 0 ? imageVal.remainingHeight / 2 : 0),
|
||||||
const $ContinueToReview(isFloatingAction: true)
|
child: Column(
|
||||||
],
|
children: studentQuestions?.asMap().keys.map((e) => $ScoringQuestionsView(studentQuestions[e], imageVal.scaleRatio)).toList() ?? [],
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(bottom: 14.h, top: 6.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color.fromRGBO(159, 159, 159, 0.97),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(46, 91, 255, 0.2),
|
|
||||||
offset: Offset(0, 8.w), //阴影y轴偏移量
|
|
||||||
blurRadius: 1, //阴影模糊程度
|
|
||||||
spreadRadius: 2, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
}),
|
||||||
],
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 单道题得分框
|
||||||
|
@hwidget
|
||||||
|
Widget $scoringQuestionsView(BuildContext context, StudentQuestions item, double scaleRatio) {
|
||||||
|
var studentScore = useState<int?>(item.studentScore);
|
||||||
|
|
||||||
|
useValueChanged<int?, void>(studentScore.value, (_, __) {
|
||||||
|
item.studentScore = studentScore.value;
|
||||||
|
});
|
||||||
|
return Container(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
height: item.height * scaleRatio,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
// 对
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
padding: EdgeInsets.only(top: 7.h, bottom: 3.h),
|
||||||
|
backgroundColor: const Color.fromRGBO(237, 237, 237, 1), // 设置背景色
|
||||||
|
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero), // 去除圆角
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
size: 22.sp,
|
||||||
|
color: studentScore.value == 2 ? const Color.fromRGBO(255, 152, 0, 1) : const Color.fromRGBO(114, 114, 114, 1),
|
||||||
|
const IconData(0xe62b, fontFamily: "AlibabaIcon"),
|
||||||
|
),
|
||||||
|
onPressed: () => easyThrottle('scoring_homework_questions', () {
|
||||||
|
studentScore.value = studentScore.value == 2 ? null : 2;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 半
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
padding: EdgeInsets.only(top: 7.h, bottom: 3.h),
|
||||||
|
backgroundColor: const Color.fromRGBO(237, 237, 237, 1), // 设置背景色
|
||||||
|
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero), // 去除圆角
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
size: 22.sp,
|
||||||
|
color: studentScore.value == 1 ? const Color.fromRGBO(255, 152, 0, 1) : const Color.fromRGBO(114, 114, 114, 1),
|
||||||
|
const IconData(0xe62c, fontFamily: "AlibabaIcon"),
|
||||||
|
),
|
||||||
|
onPressed: () => easyThrottle('scoring_homework_questions', () {
|
||||||
|
studentScore.value = studentScore.value == 1 ? null : 1;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// 错
|
||||||
|
Expanded(
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
padding: EdgeInsets.only(top: 7.h, bottom: 3.h),
|
||||||
|
backgroundColor: const Color.fromRGBO(237, 237, 237, 1), // 设置背景色
|
||||||
|
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero), // 去除圆角
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
size: 22.sp,
|
||||||
|
color: studentScore.value == 0 ? const Color.fromRGBO(255, 152, 0, 1) : const Color.fromRGBO(114, 114, 114, 1),
|
||||||
|
const IconData(0xe62a, fontFamily: "AlibabaIcon"),
|
||||||
|
),
|
||||||
|
onPressed: () => easyThrottle('scoring_homework_questions', () {
|
||||||
|
studentScore.value = studentScore.value == 0 ? null : 0;
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 1.1.w),
|
||||||
|
quickText('${item.questionNo}', color: Theme.of(context).primaryColor.withOpacity(0.7), size: 8.sp),
|
||||||
|
if (item.correctRate > 0) quickText(' 正确率', color: Colors.grey, size: 5.sp),
|
||||||
|
if (item.correctRate > 0)
|
||||||
|
Expanded(
|
||||||
|
child: LinearPercentIndicator(
|
||||||
|
lineHeight: 6.h,
|
||||||
|
percent: item.correctRate / 100,
|
||||||
|
barRadius: Radius.circular(1.2.r),
|
||||||
|
alignment: MainAxisAlignment.center,
|
||||||
|
progressColor: const Color.fromRGBO(76, 199, 147, 0.6),
|
||||||
|
backgroundColor: const Color(0xFFB8C7CB).withOpacity(0.35),
|
||||||
|
center: quickText("${item.correctRate}%", size: 5.sp, align: TextAlign.center, color: Colors.white),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 试题图片视图
|
||||||
|
@hwidget
|
||||||
|
Widget $questionImageView(double maxWidth, double maxHeight, HomeworkReviewState sateData) {
|
||||||
|
final scrollControllerQuestion = useScrollController(); // 试题图片区域
|
||||||
|
ImageStream? imageStream;
|
||||||
|
|
||||||
|
ImageStreamListener imageStreamListener = ImageStreamListener((ImageInfo info, bool _) {
|
||||||
|
print('屏幕宽高:宽:${maxWidth}, 高:${maxHeight}');
|
||||||
|
print('图片的宽高:width:${info.image.width.toDouble()};高:${info.image.height.toDouble()}');
|
||||||
|
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
sateData.imageScale.value = TestQuestionsImageInfo(
|
||||||
|
boxWidth: maxWidth,
|
||||||
|
boxHeight: maxHeight,
|
||||||
|
imageWidth: info.image.width.toDouble(),
|
||||||
|
imageHeight: info.image.height.toDouble(),
|
||||||
|
url: sateData.data.value!.zgtAnswer,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 可选:添加滚动监听
|
||||||
|
useEffect(() {
|
||||||
|
scrollControllerQuestion.addListener(() {
|
||||||
|
// 执行滚动相关的逻辑,例如打印滚动位置
|
||||||
|
sateData.slide.value = scrollControllerQuestion.offset;
|
||||||
|
});
|
||||||
|
// 返回一个清理函数,在组件销毁时移除监听
|
||||||
|
return () {
|
||||||
|
imageStream?.removeListener(imageStreamListener);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
height: maxHeight,
|
||||||
|
// padding: EdgeInsets.only(bottom: 2.h, top: 2.h),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
controller: scrollControllerQuestion,
|
||||||
|
physics: const BouncingScrollPhysics(),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
scrollDirection: Axis.vertical, // 设置垂直滚动
|
||||||
|
child: Obx(() {
|
||||||
|
var imageUrl = sateData.data.value?.zgtAnswer;
|
||||||
|
print(imageUrl);
|
||||||
|
if (imageUrl == null) return const SizedBox();
|
||||||
|
|
||||||
|
// return Container(
|
||||||
|
// color: Colors.green,
|
||||||
|
// height: 394.45145018915514,
|
||||||
|
// );
|
||||||
|
return $TheCachedNetworkImage(
|
||||||
|
(context, imageProvider) {
|
||||||
|
Image imageWidget = Image(image: imageProvider, fit: BoxFit.fitWidth);
|
||||||
|
imageStream?.removeListener(imageStreamListener);
|
||||||
|
imageStream = imageWidget.image.resolve(const ImageConfiguration())..addListener(imageStreamListener);
|
||||||
|
|
||||||
|
return imageWidget;
|
||||||
|
},
|
||||||
|
imageUrl: RequestConfig.imgUrl + imageUrl,
|
||||||
|
// imageUrl: 'https://cdn3-banquan.ituchong.com/weili/image/l/2000260200787476490.jpeg',
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_result.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_result.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/job/marking_models/do_test_questions_image_info.dart';
|
||||||
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||||
|
|
||||||
|
|
@ -14,6 +15,8 @@ class HomeworkReviewState {
|
||||||
// late String homeworkName;
|
// late String homeworkName;
|
||||||
late Rx<DoPaperDetailsParam> param;
|
late Rx<DoPaperDetailsParam> param;
|
||||||
late Rx<DoPaperDetailsResult?> data;
|
late Rx<DoPaperDetailsResult?> data;
|
||||||
|
late Rx<double> slide; // 滑动位置
|
||||||
|
late Rx<TestQuestionsImageInfo?> imageScale;
|
||||||
|
|
||||||
// late String dateEnd = '';
|
// late String dateEnd = '';
|
||||||
// late int knowledgeId = 0;
|
// late int knowledgeId = 0;
|
||||||
|
|
@ -40,6 +43,7 @@ class HomeworkReviewBinding extends Bindings {
|
||||||
|
|
||||||
class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
||||||
late StreamSubscription<DoPaperDetailsParam> _paramListen;
|
late StreamSubscription<DoPaperDetailsParam> _paramListen;
|
||||||
|
late StreamSubscription<DoPaperDetailsResult?> _dataListen;
|
||||||
final HomeworkReviewState state = HomeworkReviewState();
|
final HomeworkReviewState state = HomeworkReviewState();
|
||||||
final HomeworkReviewAnnotationsControlState annotationState = HomeworkReviewAnnotationsControlState();
|
final HomeworkReviewAnnotationsControlState annotationState = HomeworkReviewAnnotationsControlState();
|
||||||
|
|
||||||
|
|
@ -53,13 +57,18 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
||||||
subject: Get.arguments['subject'],
|
subject: Get.arguments['subject'],
|
||||||
).obs;
|
).obs;
|
||||||
state.data = Rx<DoPaperDetailsResult?>(null);
|
state.data = Rx<DoPaperDetailsResult?>(null);
|
||||||
|
state.imageScale = Rx<TestQuestionsImageInfo?>(null);
|
||||||
|
state.slide = 0.0.obs;
|
||||||
getData();
|
getData();
|
||||||
// 参数变化更新作业详情
|
// 参数变化更新作业详情
|
||||||
_paramListen = state.param.listen((e) => getData());
|
_paramListen = state.param.listen((e) => getData());
|
||||||
|
// 试题数据
|
||||||
|
_dataListen = state.data.listen((e) => state.imageScale.value = null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void disposeId(Object id) {
|
void disposeId(Object id) {
|
||||||
|
_dataListen.cancel();
|
||||||
_paramListen.cancel();
|
_paramListen.cancel();
|
||||||
super.disposeId(id);
|
super.disposeId(id);
|
||||||
}
|
}
|
||||||
|
|
@ -68,6 +77,13 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
||||||
var timerControl = Timer(const Duration(milliseconds: 300), () => ToastUtils.showLoading());
|
var timerControl = Timer(const Duration(milliseconds: 300), () => ToastUtils.showLoading());
|
||||||
try {
|
try {
|
||||||
DoPaperDetailsResult? data = await getClient().getDoPaperDetails(state.param.value);
|
DoPaperDetailsResult? data = await getClient().getDoPaperDetails(state.param.value);
|
||||||
|
// var studentQuestions = data.studentQuestions;
|
||||||
|
// // 第0个的下标数据不需要处理
|
||||||
|
// for (var i = 0; i < studentQuestions.length; i++) {
|
||||||
|
// var item = studentQuestions[i];
|
||||||
|
|
||||||
|
// item.topHeight = itemPre.height;
|
||||||
|
// }
|
||||||
state.data.value = data;
|
state.data.value = data;
|
||||||
} finally {
|
} finally {
|
||||||
if (timerControl.isActive) timerControl.cancel();
|
if (timerControl.isActive) timerControl.cancel();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue