Compare commits
No commits in common. "6719526cd2af1e8e81f056dd78b9dfd6aba86f77" and "0149e0761fc023ca1a0279874b26e8db3471b63b" have entirely different histories.
6719526cd2
...
0149e0761f
|
|
@ -18,20 +18,17 @@ class MarkingTextQuestionJobTabParams extends Object {
|
||||||
@JsonKey(name: 'studentId')
|
@JsonKey(name: 'studentId')
|
||||||
int? studentId;
|
int? studentId;
|
||||||
|
|
||||||
@JsonKey(name: 'defaultFirst')
|
|
||||||
bool? isDefaultFirst;
|
|
||||||
|
|
||||||
MarkingTextQuestionJobTabParams({
|
MarkingTextQuestionJobTabParams({
|
||||||
required this.taskId,
|
required this.taskId,
|
||||||
required this.pageIndex,
|
required this.pageIndex,
|
||||||
this.isDefaultFirst,
|
|
||||||
this.paperId,
|
this.paperId,
|
||||||
this.studentId,
|
this.studentId,
|
||||||
this.nextPageIndex,
|
this.nextPageIndex,
|
||||||
this.previousPageIndex,
|
this.previousPageIndex,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory MarkingTextQuestionJobTabParams.fromJson(Map<String, dynamic> srcJson) => _$MarkingTextQuestionJobTabParamsFromJson(srcJson);
|
factory MarkingTextQuestionJobTabParams.fromJson(Map<String, dynamic> srcJson) =>
|
||||||
|
_$MarkingTextQuestionJobTabParamsFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MarkingTextQuestionJobTabParamsToJson(this);
|
Map<String, dynamic> toJson() => _$MarkingTextQuestionJobTabParamsToJson(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
|
||||||
if (doMarkingInfo.value == null) return Container();
|
if (doMarkingInfo.value == null) return Container();
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
print('点击了...');
|
||||||
List<JobConcernedWithStudent>? students = await getStudents();
|
List<JobConcernedWithStudent>? students = await getStudents();
|
||||||
if (students == null) return;
|
if (students == null) return;
|
||||||
students = students..sort((e, e1) => e.studentName.compareTo(e1.studentName));
|
students = students..sort((e, e1) => e.studentName.compareTo(e1.studentName));
|
||||||
|
|
@ -236,7 +237,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
});
|
});
|
||||||
|
|
||||||
// 当前tab改变时
|
// 当前tab改变时
|
||||||
useValueChanged<JobPageTab?, String>(_useSwitchStudentAndType.currentTab.value, (_oldValue, __) {
|
useValueChanged<JobPageTab?, String>(_useSwitchStudentAndType.currentTab.value, (_, __) {
|
||||||
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
||||||
JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value;
|
JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value;
|
||||||
if (studentBus != null && studentBus.pageIndex == thePageIndex) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据
|
if (studentBus != null && studentBus.pageIndex == thePageIndex) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据
|
||||||
|
|
@ -312,6 +313,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
_useSwitchStudentAndType.eventCancel();
|
_useSwitchStudentAndType.eventCancel();
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
print(_useSwitchStudentAndType.tabs.value.firstWhereOrNull((e) => e.finishCount < e.total)?.toJson());
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r),
|
padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -522,7 +524,6 @@ class ExamPaperAndScoringView extends StatefulHookConsumerWidget {
|
||||||
class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringView> with EventBusMixin, CommonMixin {
|
class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringView> with EventBusMixin, CommonMixin {
|
||||||
final GlobalKey<JobPictureOverviewState> scaffoldKeyPictureOverview = GlobalKey<JobPictureOverviewState>();
|
final GlobalKey<JobPictureOverviewState> scaffoldKeyPictureOverview = GlobalKey<JobPictureOverviewState>();
|
||||||
Future<MarkingTextQuestionJob?>? _future; // 考试试卷
|
Future<MarkingTextQuestionJob?>? _future; // 考试试卷
|
||||||
MarkingTextQuestionJob? theJobData;
|
|
||||||
bool firstLoading = true;
|
bool firstLoading = true;
|
||||||
JobDoSynchroTab? synchroTabs;
|
JobDoSynchroTab? synchroTabs;
|
||||||
late RemoveListener _doJobObtainGradingDataProviderListener; // 批注关闭监听
|
late RemoveListener _doJobObtainGradingDataProviderListener; // 批注关闭监听
|
||||||
|
|
@ -538,18 +539,13 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
eventOn(callback: (eventVal) {
|
eventOn(callback: (eventVal) {
|
||||||
switch (eventVal.runtimeType) {
|
switch (eventVal.runtimeType) {
|
||||||
case MarkingTextQuestionJobTabParamsBus:
|
case MarkingTextQuestionJobTabParamsBus:
|
||||||
var theEventVal = eventVal as MarkingTextQuestionJobTabParamsBus;
|
MarkingTextQuestionJobTabParamsBus theEventVal = eventVal as MarkingTextQuestionJobTabParamsBus;
|
||||||
bool? isDefaultFirst;
|
|
||||||
if (theJobData != null) {
|
|
||||||
isDefaultFirst = theJobData!.pageIndex < theEventVal.pageIndex;
|
|
||||||
}
|
|
||||||
ref.read(doJobObtainGradingDataProvider.notifier).setVal(MarkingTextQuestionJobTabParams(
|
ref.read(doJobObtainGradingDataProvider.notifier).setVal(MarkingTextQuestionJobTabParams(
|
||||||
pageIndex: theEventVal.pageIndex,
|
pageIndex: theEventVal.pageIndex,
|
||||||
taskId: theEventVal.taskId,
|
taskId: theEventVal.taskId,
|
||||||
studentId: theEventVal.studentId,
|
studentId: theEventVal.studentId,
|
||||||
previousPageIndex: theEventVal.previousPageIndex,
|
previousPageIndex: theEventVal.previousPageIndex,
|
||||||
nextPageIndex: theEventVal.nextPageIndex,
|
nextPageIndex: theEventVal.nextPageIndex,
|
||||||
isDefaultFirst: isDefaultFirst,
|
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case JobDoSynchroTab:
|
case JobDoSynchroTab:
|
||||||
|
|
@ -577,7 +573,6 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
BaseStructureResult<MarkingTextQuestionJob> _result = await _client.getJobTabOfExam(params);
|
BaseStructureResult<MarkingTextQuestionJob> _result = await _client.getJobTabOfExam(params);
|
||||||
if (_result.success) {
|
if (_result.success) {
|
||||||
var jobDetails = _result.data;
|
var jobDetails = _result.data;
|
||||||
theJobData = jobDetails;
|
|
||||||
if (jobDetails != null) {
|
if (jobDetails != null) {
|
||||||
jobDetails.previousPageIndex = synchroTabs?.getPreviousPageIndex(jobDetails.pageIndex - 1);
|
jobDetails.previousPageIndex = synchroTabs?.getPreviousPageIndex(jobDetails.pageIndex - 1);
|
||||||
jobDetails.nextPageIndex = synchroTabs?.getNextPageIndex(jobDetails.pageIndex - 1);
|
jobDetails.nextPageIndex = synchroTabs?.getNextPageIndex(jobDetails.pageIndex - 1);
|
||||||
|
|
@ -618,7 +613,6 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
pageIndex: jobData.pageIndex,
|
pageIndex: jobData.pageIndex,
|
||||||
nextPageIndex: jobData.nextPageIndex,
|
nextPageIndex: jobData.nextPageIndex,
|
||||||
previousPageIndex: jobData.previousPageIndex,
|
previousPageIndex: jobData.previousPageIndex,
|
||||||
isDefaultFirst: true,
|
|
||||||
);
|
);
|
||||||
if (model.paperId == 0 && jobData.nextPageIndex != null) {
|
if (model.paperId == 0 && jobData.nextPageIndex != null) {
|
||||||
// 切换题型页面
|
// 切换题型页面
|
||||||
|
|
@ -635,7 +629,6 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
paperId: jobData.prevId,
|
paperId: jobData.prevId,
|
||||||
nextPageIndex: jobData.nextPageIndex,
|
nextPageIndex: jobData.nextPageIndex,
|
||||||
previousPageIndex: jobData.previousPageIndex,
|
previousPageIndex: jobData.previousPageIndex,
|
||||||
isDefaultFirst: false,
|
|
||||||
);
|
);
|
||||||
if (model.paperId == 0 && jobData.previousPageIndex != null) {
|
if (model.paperId == 0 && jobData.previousPageIndex != null) {
|
||||||
model.paperId = null;
|
model.paperId = null;
|
||||||
|
|
@ -671,6 +664,8 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
final double containerHeight = constraints.maxHeight; // 展示区域总宽度
|
final double containerHeight = constraints.maxHeight; // 展示区域总宽度
|
||||||
|
|
||||||
if (jobData == null) return Container(); // 没有试题展示缩略图
|
if (jobData == null) return Container(); // 没有试题展示缩略图
|
||||||
|
|
||||||
|
// print('容器宽度:${containerWidth};容器高度:${containerHeight}');
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
JobPictureOverview(
|
JobPictureOverview(
|
||||||
|
|
@ -865,12 +860,7 @@ Widget $examPaperAndScoringKeyboardView(
|
||||||
if (question.accuracy > 0)
|
if (question.accuracy > 0)
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||||
child: quickText(
|
child: quickText('正确率:${question.accuracy}%', size: 8.sp, color: Colors.white, align: TextAlign.end),
|
||||||
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
|
|
||||||
size: 8.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
align: TextAlign.end,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -1073,7 +1063,7 @@ Widget $examPaperAndScoringKeyboardView(
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget $materialBtn({required Widget child, Color? bgc, Color? splashColor, GestureTapCallback? onTap, BorderRadiusGeometry? borderRadius}) {
|
Widget $materialBtn({required Widget child, Color? bgc, Color? splashColor, GestureTapCallback? onTap, BorderRadius? borderRadius}) {
|
||||||
return Material(
|
return Material(
|
||||||
color: bgc,
|
color: bgc,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue