Compare commits

..

No commits in common. "3b11d2609e00078a3c12abd79b04bf09db15a434" and "d059f6f0a3ffebd0d3d7cfebe907a29d2bb5db0e" have entirely different histories.

13 changed files with 37 additions and 57 deletions

View File

@ -9,8 +9,8 @@
import 'package:making_school_asignment_app/common/job/common/base_page.dart';
class RequestConfig {
// static const _devBaseUrl = "http://192.168.2.119:1091"; //
static const _devBaseUrl = "https://dpc-teacher-api.23544.com"; //
static const _devBaseUrl = "http://192.168.2.119:1091"; //
// static const _devBaseUrl = "https://dpc-teacher-api.23544.com"; //
// static const _proBaseUrl = "http://192.168.2.119:1091"; //
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; //
static const imgUrl = 'https://dpc-job-oss.23544.com/';

View File

@ -144,7 +144,7 @@ class HomeworkFavs extends Object {
int templateId;
@JsonKey(name: 'questionNo')
String? questionNo;
int? questionNo;
@JsonKey(name: 'subjectiveAnswer')
String? subjectiveAnswer;

View File

@ -152,7 +152,7 @@ class PaperStudents extends Object {
@JsonSerializable()
class StudentQuestions extends Object {
@JsonKey(name: 'questionNo')
String questionNo;
int questionNo;
//
@JsonKey(name: 'score')

View File

@ -14,7 +14,7 @@ class FavorParam extends Object {
int templateId;
@JsonKey(name: 'questionNo')
String questionNo;
int questionNo;
@JsonKey(name: 'isFav')
bool isFav;

View File

@ -35,7 +35,7 @@ class ReviewSubmissionParams extends Object {
@JsonSerializable()
class StudentScores extends Object {
@JsonKey(name: 'questionNo')
String questionNo;
int questionNo;
@JsonKey(name: 'studentScore')
int studentScore;

View File

@ -26,8 +26,6 @@ mixin EventBusMixin<T> {
// 线
void eventCancel() {
try{
_subscription?.cancel();
}catch(_){}
_subscription?.cancel();
}
}

View File

@ -98,9 +98,9 @@ class AuthInterceptor extends Interceptor {
headers["x-Authorization"] = xToken!;
}
/* if ((userInfo?.isExpired() ?? false) && userInfo?.termYear != '') {
if ((userInfo?.isExpired() ?? false) && userInfo?.termYear != '') {
headers["term-year"] = userInfo!.termYear;
}*/
}
options.headers = headers;
return super.onRequest(options, handler);

View File

@ -113,13 +113,13 @@ class Utils {
for (var stu in data.students) {
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
stu.kgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
stu.kgtStu!.sort((a, b) => a.questionNo.compareTo(b.questionNo));
stu.kgtOkCount = stu.kgtStu!.where((w) => w.state == 3).length;
stu.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
stu.zgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
stu.zgtStu!.sort((a, b) => a.questionNo.compareTo(b.questionNo));
stu.zgtOkCount = stu.zgtStu!.where((w) => w.state == 3).length;
stu.zgtErrorCount = stu.zgtStu!.where((w) => w.state == 2).length;
stu.zgtUnrated = stu.zgtStu!.where((w) => w.state == 1).length;

View File

@ -14,13 +14,13 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
final AnnotateClassState state = AnnotateClassState();
late final EasyRefreshController refreshController;
final HomeLogic homeController = Get.find();
late ReadOverLogic readOverController;
late ReadOverLogic readOverController ;
@override
void onInit() {
super.onInit();
state.preIndex = Get.arguments['tabIndex'] ?? 3;
if (state.preIndex != 3) {
if(state.preIndex != 3){
// readOverController = Get.find();
}
refreshController = EasyRefreshController();
@ -35,11 +35,9 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
}
void getList() async {
List<AnnotatedClass> data =
await getClient().getAnnotatedClassList(state.homeworkId.value);
List<AnnotatedClass> data = await getClient().getAnnotatedClassList(state.homeworkId.value);
state.classList.value = data;
/* print('state.classList[0]=${state.classList[0].finishTime}');
print('state.classList[1]=${state.classList[1].finishTime}');*/
for (var element in state.classList.value) {
int commitStudentCount = 0;
int noCommitStudentCount = 0;
@ -56,29 +54,23 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
EasyLoading.dismiss();
}
//
void getAllCorrect(classId) async {
void getAllCorrect(classId) async{
EasyLoading.show(status: 'loading...');
try {
await getClient()
.getAllCorrect(state.homeworkId.value, classId)
.then((e) {
getList();
});
await getClient().getAllCorrect(state.homeworkId.value,classId);
getList();
} catch (e) {
EasyLoading.dismiss();
ToastUtils.showError('操作失败,请重试');
}
}
//
void getOverAnnotate(classId) async {
void getOverAnnotate(classId) async{
EasyLoading.show(status: 'loading...');
try {
await getClient().overAnnotate(state.homeworkId.value, classId).then((e) {
getList();
});
await getClient().overAnnotate(state.homeworkId.value,classId);
getList();
} catch (e) {
EasyLoading.dismiss();
ToastUtils.showError('操作失败,请重试');
@ -86,26 +78,19 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
}
void goQuickDataCheck(item) {
Get.toNamed(Routes.quickDataCheckPage, arguments: {
'homeworkId': state.homeworkId.value,
'classId': item.classId,
'grade': state.grade,
'className': item.className
});
Get.toNamed(Routes.quickDataCheckPage,
arguments: {'homeworkId': state.homeworkId.value, 'classId': item.classId, 'grade': state.grade, 'className': item.className});
}
void gojobReport(item) {
Get.toNamed(Routes.jobReportPage, arguments: {
'title': state.name.value,
'homeworkId': state.homeworkId.value,
'grade': state.grade,
'className': item.className
});
Get.toNamed(Routes.jobReportPage,
arguments: {'title': state.name.value, 'homeworkId': state.homeworkId.value, 'grade': state.grade, 'className': item.className});
}
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
}

View File

@ -30,7 +30,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
RxInt defaultIndex = 0.obs;
RxList<HomeworkFavs> imageList = RxList();
late PageController pageController;
late Rx<HomeworkFavs> currentStudent = Rx(HomeworkFavs('','','',-1,-1,'','',-1,'',-1,'-1','',''));
late Rx<HomeworkFavs> currentStudent = Rx(HomeworkFavs('','','',-1,-1,'','',-1,'',-1,-1,'',''));
@override
void initState() {

View File

@ -107,8 +107,6 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
state.data.value = data;
state.handwritings = [];
state.studentQuestions.value = data.studentQuestions;
} catch (e) {
print('获取数据报错了:$e');
ToastUtils.showError('获取试题数据出错,请重试');
@ -118,7 +116,6 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
ToastUtils.dismiss();
}
}
//

View File

@ -157,8 +157,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
children: List.generate(item.queDtls!.length, (index) {
Dtls kgInfo = item.queDtls![index];
return Container(
width: 20.r,
height: 20.r,
width: 14.r,
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? const Color(0xFFD3D3D3)
@ -167,7 +167,7 @@ class _KnowledgePointState extends State<KnowledgePoint> {
: kgInfo.state == 2
? const Color(0xFFFF7474)
: const Color(0xFF4CC793),
borderRadius: BorderRadius.all(Radius.circular(10.r))),
borderRadius: BorderRadius.all(Radius.circular(7.r))),
child: Center(
child: Text(
kgInfo.questionNo.toString(),
@ -264,8 +264,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
int ttlCount = stu.queDtls!.length;
stu.okRate = Utils.calcRate(okCount, ttlCount);
stu.queDtls!.sort((a, b) {
num num1 = num.parse(a.questionNo);
num num2 = num.parse(b.questionNo);
String num1 = a.questionNo;
String num2 = b.questionNo;
return num1.compareTo(num2);
});
}

View File

@ -43,8 +43,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
index: index,
color: color != null
? item.allNotDone!
? WidgetStateProperty.all(const Color(0xFFFFD79C))
: WidgetStateProperty.all(color)
? MaterialStateProperty.all(Color(0xFFFFD79C))
: MaterialStateProperty.all(color)
: null,
cells: [
DataCell(InkWell(
@ -143,8 +143,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
children: List.generate(item.zgtStu!.length, (index) {
Dtls kgInfo = item.zgtStu![index];
return Container(
width: 20.r,
height: 20.r,
width: 14.r,
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? const Color(0xFFD3D3D3)
@ -153,7 +153,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
: kgInfo.state == 2
? const Color(0xFFFF7474)
: const Color(0xFF4CC793),
borderRadius: BorderRadius.all(Radius.circular(10.r))),
borderRadius: BorderRadius.all(Radius.circular(7.r))),
child: Center(
child: Text(
kgInfo.questionNo.toString(),