Compare commits

...

6 Commits

Author SHA1 Message Date
1147192855@qq.com 4c78d903a1 Merge branch 'main' into job_new_demand
# Conflicts:
#	.gitignore
2024-04-15 18:22:40 +08:00
豌杂 abb0d41d39 no message 2024-04-15 14:04:20 +08:00
1147192855@qq.com a614c90458 no message 2024-04-15 13:40:43 +08:00
1147192855@qq.com c43e75fafd 处理无法切换下一题BUG 2024-04-15 11:47:28 +08:00
1147192855@qq.com ecfb2c33b6 更新此次批阅优化问题 2024-04-12 12:20:36 +08:00
1147192855@qq.com d5249ba0af 处理异常 2024-04-12 10:03:42 +08:00
29 changed files with 86 additions and 73 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -352,7 +352,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -360,7 +360,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.102;
MARKETING_VERSION = 1.0.104;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -490,7 +490,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -498,7 +498,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.102;
MARKETING_VERSION = 1.0.104;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -520,7 +520,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 21;
DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -528,7 +528,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.102;
MARKETING_VERSION = 1.0.104;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -1,3 +1,4 @@
import 'package:collection/collection.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:marking_app/common/model/job/job_page_tab.dart';
@ -14,14 +15,21 @@ class JobDoSynchroTab extends Object {
Map<String, dynamic> toJson() => _$JobDoSynchroTabToJson(this);
/// tab下一个tab的pageIndex
int? getNextPageIndex([int? indexLocated]) {
if (indexLocated == null) return null;
return indexLocated == tabs.length - 1 ? null : tabs[indexLocated + 1].pageIndex;
int? getNextPageIndex([int? pageIndex]) {
if (pageIndex == null) return null;
var _index = tabs.indexWhere((e) => e.pageIndex == pageIndex);
if (_index == -1) return null;
return _index == tabs.length - 1 ? null : tabs[_index + 1].pageIndex;
}
/// tab上一个tab的pageIndex
int? getPreviousPageIndex([int? indexLocated]) {
if (indexLocated == null) return null;
return indexLocated == 0 ? null : tabs[indexLocated - 1].pageIndex;
int? getPreviousPageIndex([int? pageIndex]) {
if (pageIndex == null) return null;
var _index = tabs.indexWhere((e) => e.pageIndex == pageIndex);
if (_index == -1) return null;
pageIndex = _index == 0 ? null : tabs[_index - 1].pageIndex;
print('这是上一页的数据:${pageIndex}');
return pageIndex;
}
}

View File

@ -290,7 +290,9 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
var _currentTab = _useSwitchStudentAndType.currentTab.value;
var _pageIndex = _currentTab?.pageIndex;
if (_currentTab == null || _pageIndex == null) return;
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
if (_currentTab.finishCount < _currentTab.total) {
if (_currentTab.finishCount + 1 == _currentTab.total) {
var _currentTabNew =
_useSwitchStudentAndType.tabs.value.firstWhereOrNull((e) => e.pageIndex != _currentTab.pageIndex && e.finishCount != e.total);
@ -302,7 +304,10 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
_theCurrentPage.finishCount += 1;
_useSwitchStudentAndType.tabs.value = _useSwitchStudentAndType.tabs.value.map((e) => JobPageTab.fromJson(e.toJson())).toList();
}
}
_useSwitchStudentAndType.eventFire(model: params);
});
break;
default:
}
@ -396,7 +401,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 4,
flex: isPad() ? 4 : 5,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
@ -415,9 +420,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
() {
var _currentTabNew = _useSwitchStudentAndType.tabs.value.firstWhere((e) => e.finishCount < e.total);
_useSwitchStudentAndType.eventFire(
model: MarkingTextQuestionJobTabParamsBus(taskId, _currentTabNew.pageIndex),
);
_useSwitchStudentAndType.eventFire(model: MarkingTextQuestionJobTabParamsBus(taskId, _currentTabNew.pageIndex));
},
),
child: quickText(
@ -468,41 +471,6 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
),
],
),
// InkWell(
// onTap: () => easyThrottle(
// 'prioritize_homework_review',
// () => !_useSwitchStudentAndType.isFirst.value
// ? _useSwitchStudentAndType.jobPriorityReviewJoin(jobId)
// : _useSwitchStudentAndType.jobPriorityReviewCancel(jobId)),
// child:
// Row(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Stack(
// alignment: const FractionalOffset(0.52, 0.24),
// children: [
// Icon(
// const IconData(0xe63d, fontFamily: "AlibabaIcon"),
// size: 12.sp,
// color: _useSwitchStudentAndType.isFirst.value
// ? Color.fromRGBO(76, 199, 147, 1)
// : Color.fromRGBO(164, 164, 164, 1),
// ),
// quickText('优先', size: 4.sp, color: Colors.white),
// ],
// ),
// SizedBox(width: 1.2.w),
// quickText(
// '优先批阅',
// size: 10.sp,
// color: _useSwitchStudentAndType.isFirst.value
// ? Color.fromRGBO(76, 199, 147, 1)
// : Color.fromRGBO(164, 164, 164, 1),
// ),
// ],
// ),
// ),
),
],
),
@ -541,7 +509,14 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
var theEventVal = eventVal as MarkingTextQuestionJobTabParamsBus;
bool? isDefaultFirst;
if (theJobData != null) {
isDefaultFirst = theJobData!.pageIndex < theEventVal.pageIndex;
isDefaultFirst = theJobData!.pageIndex == theEventVal.pageIndex ? null : theJobData!.pageIndex < theEventVal.pageIndex;
} else {
if (synchroTabs?.tabs.isNotEmpty ?? false) {
var _theTab = synchroTabs?.tabs.firstWhereOrNull((e) => e.pageIndex == theEventVal.pageIndex);
if (_theTab != null && _theTab.finishCount == _theTab.total) {
isDefaultFirst = false;
}
}
}
ref.read(doJobObtainGradingDataProvider.notifier).setVal(MarkingTextQuestionJobTabParams(
pageIndex: theEventVal.pageIndex,
@ -579,8 +554,8 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
var jobDetails = _result.data;
theJobData = jobDetails;
if (jobDetails != null) {
jobDetails.previousPageIndex = synchroTabs?.getPreviousPageIndex(jobDetails.pageIndex - 1);
jobDetails.nextPageIndex = synchroTabs?.getNextPageIndex(jobDetails.pageIndex - 1);
jobDetails.previousPageIndex = synchroTabs?.getPreviousPageIndex(jobDetails.pageIndex);
jobDetails.nextPageIndex = synchroTabs?.getNextPageIndex(jobDetails.pageIndex);
//
try {
//
@ -618,8 +593,15 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
pageIndex: jobData.pageIndex,
nextPageIndex: jobData.nextPageIndex,
previousPageIndex: jobData.previousPageIndex,
isDefaultFirst: true,
);
if (jobData.nextId == 0 && (synchroTabs?.tabs.isNotEmpty ?? false)) {
var _pageIndex = jobData.pageIndex;
var _tabIndex = synchroTabs!.tabs.indexWhere((e) => e.pageIndex == _pageIndex);
if (_tabIndex != -1 && _tabIndex + 1 <= synchroTabs!.tabs.length - 1) {
model.isDefaultFirst = true;
}
}
if (model.paperId == 0 && jobData.nextPageIndex != null) {
//
model.paperId = null;
@ -635,8 +617,16 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
paperId: jobData.prevId,
nextPageIndex: jobData.nextPageIndex,
previousPageIndex: jobData.previousPageIndex,
isDefaultFirst: false,
);
if (jobData.prevId == 0 && (synchroTabs?.tabs.isNotEmpty ?? false)) {
var _pageIndex = jobData.pageIndex;
var _tabIndex = synchroTabs!.tabs.indexWhere((e) => e.pageIndex == _pageIndex);
if (_tabIndex != -1 && _tabIndex - 1 >= 0 && _tabIndex - 1 <= synchroTabs!.tabs.length - 1) {
model.isDefaultFirst = false;
}
}
if (model.paperId == 0 && jobData.previousPageIndex != null) {
model.paperId = null;
model.pageIndex = jobData.previousPageIndex!;

View File

@ -99,8 +99,12 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
}
/// tab类型数据
Future<JobPageTab?> refreshQuestionTypeData(BuildContext context, {required int taskId, required Function() exitCallback}) async {
List<JobPageTab>? tabDatas = await getDataForTestpaper(taskId: taskId, synchronization: false);
Future<JobPageTab?> refreshQuestionTypeData(BuildContext context,
{required int taskId, required Function() exitCallback, bool getNewData = true}) async {
List<JobPageTab>? tabDatas = tabs.value;
if (getNewData) {
tabDatas = await getDataForTestpaper(taskId: taskId, synchronization: false);
}
if (tabDatas?.isNotEmpty ?? false) {
JobPageTab? tabJob = tabDatas!.firstWhereOrNull((e) => e.finishCount < e.total);
if (tabJob == null && !exitPromptFlag.value) {
@ -124,9 +128,20 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
exitCallback();
} else {
//
if (!getNewData) return tabJob;
tabs.value = tabDatas;
if (tabJob != null) currentTab.value = tabJob;
if (tabJob == null && exitPromptFlag.value) ToastUtils.showSuccess('最后一题提交成功');
if (tabJob == null && exitPromptFlag.value) {
var _thePageIndex = currentTab.value?.pageIndex;
if (_thePageIndex != null) {
var _theIndex = tabDatas.indexWhere((e) => e.pageIndex == _thePageIndex);
if (_theIndex != -1 && _theIndex < tabDatas.length - 1) {
currentTab.value = tabDatas[_theIndex + 1];
return tabJob;
}
}
ToastUtils.showSuccess('最后一题提交成功');
}
return tabJob;
}
}

View File

@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.102
version: 1.0.104
environment:
sdk: ">=2.17.1 <3.0.0"