Compare commits
No commits in common. "9421c6e90e950ca4e58bd523e2c4e8c771b9c906" and "264687d57fa7d2ddd4d8da25db71b78df16b7d86" have entirely different histories.
9421c6e90e
...
264687d57f
|
|
@ -51,4 +51,3 @@ making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view
|
||||||
making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.g.dart
|
making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.g.dart
|
||||||
making_school_asignment_app/lib/common/api/retrofit_client.g.dart
|
making_school_asignment_app/lib/common/api/retrofit_client.g.dart
|
||||||
making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.g.dart
|
making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.g.dart
|
||||||
.vscode/settings.json
|
|
||||||
|
|
|
||||||
|
|
@ -54,60 +54,6 @@
|
||||||
<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>
|
||||||
|
|
@ -468,9 +414,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=1718091057560') format('woff2'),
|
src: url('iconfont.woff2?t=1710142362036') format('woff2'),
|
||||||
url('iconfont.woff?t=1718091057560') format('woff'),
|
url('iconfont.woff?t=1710142362036') format('woff'),
|
||||||
url('iconfont.ttf?t=1718091057560') format('truetype');
|
url('iconfont.ttf?t=1710142362036') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
|
|
@ -496,87 +442,6 @@
|
||||||
<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">
|
||||||
|
|
@ -1117,78 +982,6 @@
|
||||||
<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=1718091057560') format('woff2'),
|
src: url('iconfont.woff2?t=1710142362036') format('woff2'),
|
||||||
url('iconfont.woff?t=1718091057560') format('woff'),
|
url('iconfont.woff?t=1710142362036') format('woff'),
|
||||||
url('iconfont.ttf?t=1718091057560') format('truetype');
|
url('iconfont.ttf?t=1710142362036') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
|
@ -13,42 +13,6 @@
|
||||||
-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,69 +5,6 @@
|
||||||
"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.
|
|
@ -2,7 +2,6 @@ import 'package:dio/dio.dart' hide Headers;
|
||||||
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/favor_param.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/favor_param.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/review_submission_params.dart';
|
|
||||||
import 'package:retrofit/retrofit.dart';
|
import 'package:retrofit/retrofit.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
|
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/class_item.dart';
|
import 'package:making_school_asignment_app/common/job/class_item.dart';
|
||||||
|
|
@ -114,13 +113,10 @@ abstract class RetrofitClient {
|
||||||
|
|
||||||
//收藏夹列表
|
//收藏夹列表
|
||||||
@GET("/api/hms/FavStudent/GetList")
|
@GET("/api/hms/FavStudent/GetList")
|
||||||
Future<BasePageData<HomeworkFavs>> getFavList(@Query('HomeworkName') String homeworkName, @Query('ClassId') String classId);
|
Future<BasePageData<HomeworkFavs>> getFavList(
|
||||||
|
@Query('HomeworkName') String homeworkName, @Query('ClassId') String classId);
|
||||||
|
|
||||||
//一键批阅 (默认未批阅的题目全部正确)
|
//一键批阅 (默认未批阅的题目全部正确)
|
||||||
@POST("/api/hms/Annotate/AllCorrect")
|
@POST("/api/hms/Annotate/AllCorrect")
|
||||||
Future getAllCorrect(@Field() String homeworkId, @Field() String classId);
|
Future getAllCorrect(@Field() String homeworkId,@Field() String classId);
|
||||||
|
|
||||||
// 批阅提交
|
|
||||||
@POST("/api/hms/Annotate/AnnotateSubmit")
|
|
||||||
Future reviewSubmission(@Body() ReviewSubmissionParams param);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
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';
|
||||||
|
|
@ -128,43 +127,33 @@ 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;
|
||||||
|
|
||||||
@JsonKey(name: 'height')
|
StudentQuestions(
|
||||||
double height;
|
this.questionNo,
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'review_submission_params.g.dart';
|
|
||||||
|
|
||||||
@JsonSerializable(includeIfNull: false)
|
|
||||||
class ReviewSubmissionParams extends Object {
|
|
||||||
@JsonKey(name: 'homeworkId')
|
|
||||||
String homeworkId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'templateId')
|
|
||||||
int templateId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentScores')
|
|
||||||
List<StudentScores> studentScores;
|
|
||||||
|
|
||||||
@JsonKey(name: 'pictureBytes')
|
|
||||||
String? zgtAnnotate;
|
|
||||||
|
|
||||||
ReviewSubmissionParams({
|
|
||||||
required this.homeworkId,
|
|
||||||
required this.templateId,
|
|
||||||
required this.studentId,
|
|
||||||
required this.studentScores,
|
|
||||||
this.zgtAnnotate,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory ReviewSubmissionParams.fromJson(Map<String, dynamic> srcJson) => _$ReviewSubmissionParamsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ReviewSubmissionParamsToJson(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class StudentScores extends Object {
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentScore')
|
|
||||||
int studentScore;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isCorrect')
|
|
||||||
bool isCorrect;
|
|
||||||
|
|
||||||
StudentScores({
|
|
||||||
required this.questionNo,
|
|
||||||
required this.studentScore,
|
|
||||||
required this.isCorrect,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory StudentScores.fromJson(Map<String, dynamic> srcJson) => _$StudentScoresFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentScoresToJson(this);
|
|
||||||
}
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
|
||||||
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
|
||||||
|
|
||||||
part 'cached_network_img.g.dart';
|
|
||||||
|
|
||||||
@hwidget
|
|
||||||
Widget $theCachedNetworkImage(ImageWidgetBuilder imageBuilder, {required String imageUrl}) {
|
|
||||||
UseCachedImgRefresh useImgRefsh = UseCachedImgRefresh.use();
|
|
||||||
|
|
||||||
return CachedNetworkImage(
|
|
||||||
key: useImgRefsh.imageKey.value,
|
|
||||||
cacheKey: imageUrl,
|
|
||||||
fit: BoxFit.fitWidth,
|
|
||||||
width: double.infinity,
|
|
||||||
imageUrl: imageUrl,
|
|
||||||
imageBuilder: imageBuilder,
|
|
||||||
placeholder: (context, url) => Center(child: SpinKitWave(color: Theme.of(context).primaryColor, size: 50.r)),
|
|
||||||
errorListener: (e) {
|
|
||||||
print('图片报错.............$e');
|
|
||||||
},
|
|
||||||
errorWidget: (context, url, error) {
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () => (useImgRefsh.imageKey.value = UniqueKey()),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset('assets/images/test_paper_loading_failed.png'),
|
|
||||||
quickText('加载失败,点击重试', color: const Color.fromRGBO(148, 163, 182, 1), size: 12.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// CachedNetworkImage 重新加载图片
|
|
||||||
class UseCachedImgRefresh {
|
|
||||||
ValueNotifier<int> refreshNumber;
|
|
||||||
ValueNotifier<Key> imageKey;
|
|
||||||
|
|
||||||
UseCachedImgRefresh._({required this.refreshNumber, required this.imageKey});
|
|
||||||
|
|
||||||
// 工厂构造函数
|
|
||||||
factory UseCachedImgRefresh.use() {
|
|
||||||
return UseCachedImgRefresh._(refreshNumber: useState(0), imageKey: useState(UniqueKey()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -23,11 +23,12 @@ class AnnotateItem extends StatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AnnotateItemState extends State<AnnotateItem> {
|
class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
|
|
||||||
Future<bool> confirmDialog() async {
|
Future<bool> confirmDialog() async {
|
||||||
return await showDialog(
|
return await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AlertDialog(
|
builder: (context) => AlertDialog(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0), // 设置圆角大小
|
borderRadius: BorderRadius.circular(10.0), // 设置圆角大小
|
||||||
),
|
),
|
||||||
actionsPadding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
actionsPadding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
||||||
|
|
@ -50,9 +51,9 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
),
|
),
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'确定',
|
'确定',
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
))),
|
))),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// 执行操作
|
// 执行操作
|
||||||
Get.back(result: true);
|
Get.back(result: true);
|
||||||
|
|
@ -71,9 +72,9 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
),
|
),
|
||||||
child: const Center(
|
child: const Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'取消',
|
'取消',
|
||||||
style: TextStyle(color: Color(0xFF666666)),
|
style: TextStyle(color: Color(0xFF666666)),
|
||||||
))),
|
))),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -128,15 +129,10 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: ItemBtn(
|
child: ItemBtn(
|
||||||
title: "收藏夹${widget.item.homeworkFavs.isNotEmpty ? '(${widget.item.homeworkFavs.length})' : ''}",
|
title: "收藏夹${widget.item.homeworkFavs.isNotEmpty?'(${ widget.item.homeworkFavs.length})':''}",
|
||||||
font: widget.font - 2.sp,
|
font: widget.font - 2.sp,
|
||||||
clickFunction: () {
|
clickFunction: () {
|
||||||
Get.toNamed(Routes.favStudentPage, arguments: {
|
Get.toNamed(Routes.favStudentPage,arguments: {'homeworkName':widget.name,'classId':widget.item.classId,'homeworkId':widget.logic.state.homeworkId.value,'grade':widget.item.grade});
|
||||||
'homeworkName': widget.name,
|
|
||||||
'classId': widget.item.classId,
|
|
||||||
'homeworkId': widget.logic.state.homeworkId.value,
|
|
||||||
'grade': widget.item.grade
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -151,10 +147,12 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
child: ItemBtn(
|
child: ItemBtn(
|
||||||
title: "一键批阅",
|
title: "一键批阅",
|
||||||
font: widget.font - 2.sp,
|
font: widget.font - 2.sp,
|
||||||
clickFunction: () async {
|
clickFunction: () async{
|
||||||
var confim = await confirmDialog();
|
var confim =
|
||||||
|
await confirmDialog();
|
||||||
if (confim) {
|
if (confim) {
|
||||||
widget.logic.getAllCorrect(widget.item.classId);
|
widget.logic.getAllCorrect(
|
||||||
|
widget.item.classId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
@ -180,15 +178,10 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: ItemBtn(
|
child: ItemBtn(
|
||||||
title: "收藏夹${widget.item.homeworkFavs.isNotEmpty ? '(${widget.item.homeworkFavs.length})' : ''}",
|
title: "收藏夹${widget.item.homeworkFavs.isNotEmpty?'(${ widget.item.homeworkFavs.length})':''}",
|
||||||
font: widget.font - 2.sp,
|
font: widget.font - 2.sp,
|
||||||
clickFunction: () {
|
clickFunction: () {
|
||||||
Get.toNamed(Routes.favStudentPage, arguments: {
|
Get.toNamed(Routes.favStudentPage,arguments: {'homeworkName':widget.name,'classId':widget.item.classId,'homeworkId':widget.logic.state.homeworkId.value,'grade':widget.item.grade});
|
||||||
'homeworkName': widget.name,
|
|
||||||
'classId': widget.item.classId,
|
|
||||||
'homeworkId': widget.logic.state.homeworkId.value,
|
|
||||||
'grade': widget.item.grade
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -294,7 +287,6 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
print('批阅..........');
|
|
||||||
Get.toNamed(Routes.reviewHomework, arguments: {
|
Get.toNamed(Routes.reviewHomework, arguments: {
|
||||||
'homeworkId': widget.homeworkId,
|
'homeworkId': widget.homeworkId,
|
||||||
'homeworkName': widget.name,
|
'homeworkName': widget.name,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ 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';
|
||||||
|
|
||||||
|
|
@ -18,7 +17,6 @@ class BottomAnnotationSwitch extends StatefulWidget {
|
||||||
|
|
||||||
class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with SingleTickerProviderStateMixin {
|
class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with SingleTickerProviderStateMixin {
|
||||||
late AnimationController _animationController; // 动画
|
late AnimationController _animationController; // 动画
|
||||||
final _homeworkLogic = Get.find<HomeworkReviewLogic>();
|
|
||||||
final _logicControl = Get.find<HomeworkReviewLogic>().annotationState;
|
final _logicControl = Get.find<HomeworkReviewLogic>().annotationState;
|
||||||
StreamSubscription? _opControllisten;
|
StreamSubscription? _opControllisten;
|
||||||
|
|
||||||
|
|
@ -55,154 +53,101 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double iconSize = 18.sp;
|
double iconSize = 24.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 * 64.h,
|
height: _animationController.value * 44.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: 7,
|
flex: 8,
|
||||||
child: Column(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
InkWell(
|
||||||
child: Row(
|
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
||||||
children: [
|
// if (jobNotesModel != null) {
|
||||||
// 注解笔
|
// return AchievementView(
|
||||||
Expanded(
|
// elevation: 5,
|
||||||
child: SizedBox(
|
// duration: Duration(seconds: 1),
|
||||||
width: double.infinity,
|
// title: "笔记回显提示",
|
||||||
height: double.infinity,
|
// subTitle: "当前正处于笔记回显",
|
||||||
child: IconButton(
|
// color: Theme.of(context).primaryColor,
|
||||||
icon: Obx(() {
|
// ).show(context);
|
||||||
return Icon(
|
// }
|
||||||
const IconData(0xe635, fontFamily: "AlibabaIcon"),
|
// easyThrottle('setSwitchBrush', () => ref.read(annotationGraffitiSwitchProvider.notifier).setSwitchBrush());
|
||||||
size: iconSize,
|
_logicControl.pen.value = !_logicControl.pen.value;
|
||||||
color: _logicControl.pen.value ? actionColor : defaultColor,
|
}),
|
||||||
);
|
child: Obx(() {
|
||||||
}),
|
return Icon(
|
||||||
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {
|
const IconData(0xe635, fontFamily: "AlibabaIcon"),
|
||||||
_logicControl.gestureMove.value = false;
|
size: iconSize,
|
||||||
_logicControl.pen.value = !_logicControl.pen.value;
|
color: _logicControl.pen.value ? actionColor : defaultColor,
|
||||||
}),
|
);
|
||||||
),
|
}),
|
||||||
),
|
|
||||||
),
|
|
||||||
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', () => _homeworkLogic.allWrongRating()),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Container(width: double.infinity, color: Colors.white, height: 0.5.h),
|
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);
|
||||||
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {}),
|
// }
|
||||||
icon: Icon(const IconData(0xe638, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
// easyThrottle('setSwitchBrush', () => ref.read(annotationGraffitiSwitchProvider.notifier).setSwitchBrush());
|
||||||
),
|
_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),
|
),
|
||||||
Expanded(
|
InkWell(
|
||||||
child: SizedBox(
|
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
||||||
width: double.infinity,
|
_logicControl.gestureMove.value = !_logicControl.gestureMove.value;
|
||||||
height: double.infinity,
|
}),
|
||||||
child: IconButton(
|
// IconData(0xe62f, fontFamily: "AlibabaIcon")
|
||||||
icon: Icon(const IconData(0xe637, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
child: Icon(const IconData(0xe636, fontFamily: "AlibabaIcon"),
|
||||||
onPressed: () => easyThrottle('homework_bottom_action_bar_annotations', () {}),
|
size: iconSize, color: _logicControl.gestureMove.value ? actionColor : defaultColor),
|
||||||
),
|
),
|
||||||
),
|
InkWell(
|
||||||
),
|
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
||||||
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
// 清空全部 TODO
|
||||||
// 全错按钮
|
}),
|
||||||
Expanded(
|
child: Icon(const IconData(0xe637, fontFamily: "AlibabaIcon"), size: iconSize, color: defaultColor),
|
||||||
child: SizedBox(
|
|
||||||
width: double.infinity,
|
|
||||||
height: double.infinity,
|
|
||||||
child: TextButton(
|
|
||||||
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.allPairs()),
|
|
||||||
child: quickText('全 错', color: Colors.white, size: 12.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 2,
|
||||||
child: Row(
|
child: Container(
|
||||||
children: [
|
child: InkWell(
|
||||||
Expanded(
|
onTap: () => easyThrottle('BottomAnnotationSwitch', () {
|
||||||
child: SizedBox(
|
// if (jobNotesModel != null) {
|
||||||
width: double.infinity,
|
// return AchievementView(
|
||||||
height: double.infinity,
|
// elevation: 5,
|
||||||
child: TextButton(
|
// duration: Duration(seconds: 1),
|
||||||
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
|
// title: "笔记回显提示",
|
||||||
child: quickText('取 消', size: 12.sp, color: Colors.white),
|
// subTitle: "当前正处于笔记回显",
|
||||||
),
|
// 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', () => _homeworkLogic.submit()),
|
|
||||||
child: quickText('提 交', size: 12.sp, color: const Color.fromRGBO(76, 199, 147, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,12 @@
|
||||||
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';
|
||||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.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/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';
|
||||||
|
|
||||||
|
|
@ -33,290 +26,78 @@ class _QuestionPaperViewState extends State<QuestionPaperView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
children: [
|
var maxWidth = constraints.maxWidth;
|
||||||
// 试题图片视图
|
var maxHeight = constraints.maxHeight;
|
||||||
Expanded(
|
return Stack(
|
||||||
flex: 7,
|
children: [
|
||||||
child: LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
|
$MainBox(maxWidth, maxHeight),
|
||||||
var maxWidth = constraints.maxWidth;
|
Positioned(
|
||||||
var maxHeight = constraints.maxHeight;
|
left: 3.w,
|
||||||
return Stack(
|
top: (maxHeight / 2) - 20.h,
|
||||||
children: [
|
child: Obx(() {
|
||||||
// 主图
|
LastPage? lastPageVal = sateData.data.value?.lastPage;
|
||||||
$QuestionImageView(maxWidth, maxHeight, sateData),
|
if (lastPageVal == null) return const SizedBox();
|
||||||
// 继续批阅按钮
|
|
||||||
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(
|
||||||
Positioned(
|
right: 2.w,
|
||||||
right: 2.w,
|
top: (maxHeight / 2) - 20.h,
|
||||||
top: (maxHeight / 2) - 20.h,
|
child: Obx(() {
|
||||||
child: Obx(() {
|
NextPage? nextPageVal = sateData.data.value?.nextPage;
|
||||||
NextPage? nextPageVal = sateData.data.value?.nextPage;
|
if (nextPageVal == null) return const SizedBox();
|
||||||
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)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 试题题号视图
|
|
||||||
@hwidget
|
@hwidget
|
||||||
Widget $questionNumberView(BuildContext context, HomeworkReviewState sateData) {
|
Widget $mainBox(double maxWidth, double maxHeight) {
|
||||||
final scrollControllerNum = useScrollController(); // 试题题号区域
|
|
||||||
|
|
||||||
useEffect(() {
|
|
||||||
StreamSubscription listenVal = sateData.slide.listen((e) => scrollControllerNum.jumpTo(e));
|
|
||||||
|
|
||||||
// 返回一个清理函数,在组件销毁时移除监听
|
|
||||||
return () {
|
|
||||||
listenVal.cancel();
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return Container(
|
|
||||||
height: double.infinity,
|
|
||||||
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, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
controller: scrollControllerNum,
|
|
||||||
physics: const BouncingScrollPhysics(),
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
scrollDirection: Axis.vertical, // 设置垂直滚动
|
|
||||||
child: Obx(() {
|
|
||||||
var imageVal = sateData.imageScale.value;
|
|
||||||
if (imageVal == null) return const SizedBox();
|
|
||||||
var studentQuestions = sateData.studentQuestions.value;
|
|
||||||
print('书哈哈哈...');
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.only(top: imageVal.remainingHeight > 0 ? imageVal.remainingHeight / 2 : 0),
|
|
||||||
child: Column(
|
|
||||||
children: studentQuestions?.asMap().keys.map((e) => $ScoringQuestionsView(studentQuestions[e], imageVal.scaleRatio)).toList() ?? [],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 单道题得分框
|
|
||||||
@hwidget
|
|
||||||
Widget $scoringQuestionsView(BuildContext context, StudentQuestions item, double scaleRatio) {
|
|
||||||
var studentScore = useState<int?>(item.studentScore);
|
|
||||||
|
|
||||||
useValueChanged<int?, void>(studentScore.value, (_, __) {
|
|
||||||
item.studentScore = studentScore.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
useValueChanged<StudentQuestions, void>(item, (_, __) {
|
|
||||||
studentScore.value = item.studentScore;
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
return () {};
|
return () {};
|
||||||
}, []);
|
}, []);
|
||||||
|
return Stack(
|
||||||
return Container(
|
alignment: const FractionalOffset(0.94, 0.94),
|
||||||
alignment: Alignment.topCenter,
|
children: [
|
||||||
height: item.height * scaleRatio,
|
Container(
|
||||||
child: Stack(
|
width: maxWidth,
|
||||||
children: [
|
height: maxHeight,
|
||||||
Row(
|
color: Colors.yellow,
|
||||||
children: [
|
),
|
||||||
// 对
|
// 继续批阅按钮
|
||||||
Expanded(
|
const $ContinueToReview(isFloatingAction: true)
|
||||||
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 _) {
|
|
||||||
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',
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
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/job/marking_models/review_submission_params.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';
|
||||||
|
|
||||||
|
|
@ -17,9 +14,6 @@ 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<List<StudentQuestions>?> studentQuestions;
|
|
||||||
late Rx<double> slide; // 滑动位置
|
|
||||||
late Rx<TestQuestionsImageInfo?> imageScale;
|
|
||||||
|
|
||||||
// late String dateEnd = '';
|
// late String dateEnd = '';
|
||||||
// late int knowledgeId = 0;
|
// late int knowledgeId = 0;
|
||||||
|
|
@ -46,7 +40,6 @@ 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();
|
||||||
|
|
||||||
|
|
@ -60,19 +53,13 @@ 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.studentQuestions = Rx<List<StudentQuestions>?>(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);
|
||||||
}
|
}
|
||||||
|
|
@ -81,90 +68,11 @@ 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;
|
||||||
state.studentQuestions.value = data.studentQuestions;
|
|
||||||
} finally {
|
} finally {
|
||||||
if (timerControl.isActive) timerControl.cancel();
|
if (timerControl.isActive) timerControl.cancel();
|
||||||
|
|
||||||
ToastUtils.dismiss();
|
ToastUtils.dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消全部评分
|
|
||||||
void cancelAllRatings() {
|
|
||||||
var studentQuestions = state.studentQuestions.value;
|
|
||||||
if (state.data.value?.studentQuestions.isEmpty ?? true) return;
|
|
||||||
List<StudentQuestions> data = [];
|
|
||||||
for (var e in studentQuestions!) {
|
|
||||||
var newe = StudentQuestions.fromJson(e.toJson());
|
|
||||||
newe.studentScore = null;
|
|
||||||
data.add(newe);
|
|
||||||
}
|
|
||||||
state.studentQuestions.value = data;
|
|
||||||
state.data.value?.studentQuestions = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 全对评分
|
|
||||||
void allPairs([int score = 2]) async {
|
|
||||||
var studentQuestions = state.studentQuestions.value;
|
|
||||||
if (state.data.value?.studentQuestions.isEmpty ?? true) return;
|
|
||||||
List<StudentQuestions> data = [];
|
|
||||||
for (var e in studentQuestions!) {
|
|
||||||
var newe = StudentQuestions.fromJson(e.toJson());
|
|
||||||
newe.studentScore = score;
|
|
||||||
data.add(newe);
|
|
||||||
}
|
|
||||||
state.studentQuestions.value = data;
|
|
||||||
state.data.value?.studentQuestions = data;
|
|
||||||
await submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 全错评分
|
|
||||||
void allWrongRating([int score = 0]) async {
|
|
||||||
var studentQuestions = state.studentQuestions.value;
|
|
||||||
if (state.data.value?.studentQuestions.isEmpty ?? true) return;
|
|
||||||
List<StudentQuestions> data = [];
|
|
||||||
for (var e in studentQuestions!) {
|
|
||||||
var newe = StudentQuestions.fromJson(e.toJson());
|
|
||||||
newe.studentScore = score;
|
|
||||||
data.add(newe);
|
|
||||||
}
|
|
||||||
state.studentQuestions.value = data;
|
|
||||||
state.data.value?.studentQuestions = data;
|
|
||||||
await submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 提交打分
|
|
||||||
/// allPairs
|
|
||||||
Future<void> submit() async {
|
|
||||||
var data = state.data.value;
|
|
||||||
if (data == null) return;
|
|
||||||
if (state.data.value?.studentQuestions.isEmpty ?? true) return;
|
|
||||||
var studentQuestions = state.data.value!.studentQuestions;
|
|
||||||
var noRatingElement = studentQuestions.firstWhereOrNull((e) => e.studentScore == null);
|
|
||||||
if (noRatingElement != null) {
|
|
||||||
ToastUtils.showInfo('${noRatingElement.questionNo}题请评分');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// TODO 请求提交加载框是否需要 如何防止重复提交
|
|
||||||
await getClient().reviewSubmission(ReviewSubmissionParams(
|
|
||||||
homeworkId: state.param.value.homeworkId,
|
|
||||||
templateId: data.templateId,
|
|
||||||
studentId: data.studentId,
|
|
||||||
studentScores: studentQuestions.map((e) {
|
|
||||||
var studentScore = e.studentScore!;
|
|
||||||
return StudentScores(
|
|
||||||
isCorrect: studentScore == 2,
|
|
||||||
questionNo: e.questionNo,
|
|
||||||
studentScore: studentScore,
|
|
||||||
);
|
|
||||||
}).toList()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class _HomeworkReviewState extends State<HomeworkReview> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
// SystemChrome.setPreferredOrientations([DeviceOrientation.portraitDown]);
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitDown]);
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -81,7 +81,6 @@ dependencies:
|
||||||
syncfusion_flutter_datepicker: ^25.2.5
|
syncfusion_flutter_datepicker: ^25.2.5
|
||||||
easy_debounce: ^2.0.3 # 防抖节流
|
easy_debounce: ^2.0.3 # 防抖节流
|
||||||
flutter_hooks: ^0.20.5
|
flutter_hooks: ^0.20.5
|
||||||
flutter_spinkit: ^5.2.1
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue