mcy_new #1
|
|
@ -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/';
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class HomeworkFavs extends Object {
|
|||
int templateId;
|
||||
|
||||
@JsonKey(name: 'questionNo')
|
||||
int? questionNo;
|
||||
String? questionNo;
|
||||
|
||||
@JsonKey(name: 'subjectiveAnswer')
|
||||
String? subjectiveAnswer;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class PaperStudents extends Object {
|
|||
@JsonSerializable()
|
||||
class StudentQuestions extends Object {
|
||||
@JsonKey(name: 'questionNo')
|
||||
int questionNo;
|
||||
String questionNo;
|
||||
|
||||
// 总分
|
||||
@JsonKey(name: 'score')
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class FavorParam extends Object {
|
|||
int templateId;
|
||||
|
||||
@JsonKey(name: 'questionNo')
|
||||
int questionNo;
|
||||
String questionNo;
|
||||
|
||||
@JsonKey(name: 'isFav')
|
||||
bool isFav;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class ReviewSubmissionParams extends Object {
|
|||
@JsonSerializable()
|
||||
class StudentScores extends Object {
|
||||
@JsonKey(name: 'questionNo')
|
||||
int questionNo;
|
||||
String questionNo;
|
||||
|
||||
@JsonKey(name: 'studentScore')
|
||||
int studentScore;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ mixin EventBusMixin<T> {
|
|||
|
||||
// 关闭监听总线事件
|
||||
void eventCancel() {
|
||||
try{
|
||||
_subscription?.cancel();
|
||||
}catch(_){}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) => a.questionNo.compareTo(b.questionNo));
|
||||
stu.kgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(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) => a.questionNo.compareTo(b.questionNo));
|
||||
stu.zgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(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;
|
||||
|
|
|
|||
|
|
@ -35,9 +35,11 @@ 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;
|
||||
|
|
@ -54,23 +56,29 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
|||
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
//一键批阅
|
||||
void getAllCorrect(classId) async {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
try {
|
||||
await getClient().getAllCorrect(state.homeworkId.value,classId);
|
||||
await getClient()
|
||||
.getAllCorrect(state.homeworkId.value, classId)
|
||||
.then((e) {
|
||||
getList();
|
||||
});
|
||||
} catch (e) {
|
||||
EasyLoading.dismiss();
|
||||
ToastUtils.showError('操作失败,请重试');
|
||||
}
|
||||
}
|
||||
|
||||
//结束批阅
|
||||
void getOverAnnotate(classId) async {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
try {
|
||||
await getClient().overAnnotate(state.homeworkId.value,classId);
|
||||
await getClient().overAnnotate(state.homeworkId.value, classId).then((e) {
|
||||
getList();
|
||||
});
|
||||
} catch (e) {
|
||||
EasyLoading.dismiss();
|
||||
ToastUtils.showError('操作失败,请重试');
|
||||
|
|
@ -78,19 +86,26 @@ 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();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
|||
state.data.value = data;
|
||||
state.handwritings = [];
|
||||
state.studentQuestions.value = data.studentQuestions;
|
||||
|
||||
|
||||
} catch (e) {
|
||||
print('获取数据报错了:$e');
|
||||
ToastUtils.showError('获取试题数据出错,请重试');
|
||||
|
|
@ -116,6 +118,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
|||
|
||||
ToastUtils.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 取消全部评分
|
||||
|
|
|
|||
|
|
@ -157,8 +157,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
|||
children: List.generate(item.queDtls!.length, (index) {
|
||||
Dtls kgInfo = item.queDtls![index];
|
||||
return Container(
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
width: 20.r,
|
||||
height: 20.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(7.r))),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.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) {
|
||||
String num1 = a.questionNo;
|
||||
String num2 = b.questionNo;
|
||||
num num1 = num.parse(a.questionNo);
|
||||
num num2 = num.parse(b.questionNo);
|
||||
return num1.compareTo(num2);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
index: index,
|
||||
color: color != null
|
||||
? item.allNotDone!
|
||||
? MaterialStateProperty.all(Color(0xFFFFD79C))
|
||||
: MaterialStateProperty.all(color)
|
||||
? WidgetStateProperty.all(const Color(0xFFFFD79C))
|
||||
: WidgetStateProperty.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: 14.r,
|
||||
height: 14.r,
|
||||
width: 20.r,
|
||||
height: 20.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(7.r))),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
kgInfo.questionNo.toString(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue