字段类型修改
This commit is contained in:
parent
d6aaf1c647
commit
c63fb86ea3
|
|
@ -9,8 +9,8 @@
|
||||||
import 'package:making_school_asignment_app/common/job/common/base_page.dart';
|
import 'package:making_school_asignment_app/common/job/common/base_page.dart';
|
||||||
|
|
||||||
class RequestConfig {
|
class RequestConfig {
|
||||||
static const _devBaseUrl = "http://192.168.2.119:1091"; // 开发
|
// static const _devBaseUrl = "http://192.168.2.119:1091"; // 开发
|
||||||
// static const _devBaseUrl = "https://dpc-teacher-api.23544.com"; // 开发
|
static const _devBaseUrl = "https://dpc-teacher-api.23544.com"; // 开发
|
||||||
// static const _proBaseUrl = "http://192.168.2.119:1091"; // 生产
|
// static const _proBaseUrl = "http://192.168.2.119:1091"; // 生产
|
||||||
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; // 生产
|
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; // 生产
|
||||||
static const imgUrl = 'https://dpc-job-oss.23544.com/';
|
static const imgUrl = 'https://dpc-job-oss.23544.com/';
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ class HomeworkFavs extends Object {
|
||||||
int templateId;
|
int templateId;
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
@JsonKey(name: 'questionNo')
|
||||||
int? questionNo;
|
String? questionNo;
|
||||||
|
|
||||||
@JsonKey(name: 'subjectiveAnswer')
|
@JsonKey(name: 'subjectiveAnswer')
|
||||||
String? subjectiveAnswer;
|
String? subjectiveAnswer;
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ class PaperStudents extends Object {
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class StudentQuestions extends Object {
|
class StudentQuestions extends Object {
|
||||||
@JsonKey(name: 'questionNo')
|
@JsonKey(name: 'questionNo')
|
||||||
int questionNo;
|
String questionNo;
|
||||||
|
|
||||||
// 总分
|
// 总分
|
||||||
@JsonKey(name: 'score')
|
@JsonKey(name: 'score')
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class FavorParam extends Object {
|
||||||
int templateId;
|
int templateId;
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
@JsonKey(name: 'questionNo')
|
||||||
int questionNo;
|
String questionNo;
|
||||||
|
|
||||||
@JsonKey(name: 'isFav')
|
@JsonKey(name: 'isFav')
|
||||||
bool isFav;
|
bool isFav;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class ReviewSubmissionParams extends Object {
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class StudentScores extends Object {
|
class StudentScores extends Object {
|
||||||
@JsonKey(name: 'questionNo')
|
@JsonKey(name: 'questionNo')
|
||||||
int questionNo;
|
String questionNo;
|
||||||
|
|
||||||
@JsonKey(name: 'studentScore')
|
@JsonKey(name: 'studentScore')
|
||||||
int studentScore;
|
int studentScore;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,8 @@ mixin EventBusMixin<T> {
|
||||||
|
|
||||||
// 关闭监听总线事件
|
// 关闭监听总线事件
|
||||||
void eventCancel() {
|
void eventCancel() {
|
||||||
_subscription?.cancel();
|
try{
|
||||||
|
_subscription?.cancel();
|
||||||
|
}catch(_){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,13 +113,13 @@ class Utils {
|
||||||
|
|
||||||
for (var stu in data.students) {
|
for (var stu in data.students) {
|
||||||
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
|
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.kgtOkCount = stu.kgtStu!.where((w) => w.state == 3).length;
|
||||||
stu.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
|
stu.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
|
||||||
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
|
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
|
||||||
|
|
||||||
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
|
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.zgtOkCount = stu.zgtStu!.where((w) => w.state == 3).length;
|
||||||
stu.zgtErrorCount = stu.zgtStu!.where((w) => w.state == 2).length;
|
stu.zgtErrorCount = stu.zgtStu!.where((w) => w.state == 2).length;
|
||||||
stu.zgtUnrated = stu.zgtStu!.where((w) => w.state == 1).length;
|
stu.zgtUnrated = stu.zgtStu!.where((w) => w.state == 1).length;
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,13 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||||
final AnnotateClassState state = AnnotateClassState();
|
final AnnotateClassState state = AnnotateClassState();
|
||||||
late final EasyRefreshController refreshController;
|
late final EasyRefreshController refreshController;
|
||||||
final HomeLogic homeController = Get.find();
|
final HomeLogic homeController = Get.find();
|
||||||
late ReadOverLogic readOverController ;
|
late ReadOverLogic readOverController;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
state.preIndex = Get.arguments['tabIndex'] ?? 3;
|
state.preIndex = Get.arguments['tabIndex'] ?? 3;
|
||||||
if(state.preIndex != 3){
|
if (state.preIndex != 3) {
|
||||||
// readOverController = Get.find();
|
// readOverController = Get.find();
|
||||||
}
|
}
|
||||||
refreshController = EasyRefreshController();
|
refreshController = EasyRefreshController();
|
||||||
|
|
@ -35,9 +35,11 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
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;
|
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) {
|
for (var element in state.classList.value) {
|
||||||
int commitStudentCount = 0;
|
int commitStudentCount = 0;
|
||||||
int noCommitStudentCount = 0;
|
int noCommitStudentCount = 0;
|
||||||
|
|
@ -54,23 +56,29 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
//一键批阅
|
//一键批阅
|
||||||
void getAllCorrect(classId) async{
|
void getAllCorrect(classId) async {
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
try {
|
try {
|
||||||
await getClient().getAllCorrect(state.homeworkId.value,classId);
|
await getClient()
|
||||||
getList();
|
.getAllCorrect(state.homeworkId.value, classId)
|
||||||
|
.then((e) {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
ToastUtils.showError('操作失败,请重试');
|
ToastUtils.showError('操作失败,请重试');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//结束批阅
|
//结束批阅
|
||||||
void getOverAnnotate(classId) async{
|
void getOverAnnotate(classId) async {
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
try {
|
try {
|
||||||
await getClient().overAnnotate(state.homeworkId.value,classId);
|
await getClient().overAnnotate(state.homeworkId.value, classId).then((e) {
|
||||||
getList();
|
getList();
|
||||||
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
ToastUtils.showError('操作失败,请重试');
|
ToastUtils.showError('操作失败,请重试');
|
||||||
|
|
@ -78,19 +86,26 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
void goQuickDataCheck(item) {
|
void goQuickDataCheck(item) {
|
||||||
Get.toNamed(Routes.quickDataCheckPage,
|
Get.toNamed(Routes.quickDataCheckPage, arguments: {
|
||||||
arguments: {'homeworkId': state.homeworkId.value, 'classId': item.classId, 'grade': state.grade, 'className': item.className});
|
'homeworkId': state.homeworkId.value,
|
||||||
|
'classId': item.classId,
|
||||||
|
'grade': state.grade,
|
||||||
|
'className': item.className
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void gojobReport(item) {
|
void gojobReport(item) {
|
||||||
Get.toNamed(Routes.jobReportPage,
|
Get.toNamed(Routes.jobReportPage, arguments: {
|
||||||
arguments: {'title': state.name.value, 'homeworkId': state.homeworkId.value, 'grade': state.grade, 'className': item.className});
|
'title': state.name.value,
|
||||||
|
'homeworkId': state.homeworkId.value,
|
||||||
|
'grade': state.grade,
|
||||||
|
'className': item.className
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
refreshController.dispose();
|
refreshController.dispose();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
RxInt defaultIndex = 0.obs;
|
RxInt defaultIndex = 0.obs;
|
||||||
RxList<HomeworkFavs> imageList = RxList();
|
RxList<HomeworkFavs> imageList = RxList();
|
||||||
late PageController pageController;
|
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
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,8 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
||||||
state.data.value = data;
|
state.data.value = data;
|
||||||
state.handwritings = [];
|
state.handwritings = [];
|
||||||
state.studentQuestions.value = data.studentQuestions;
|
state.studentQuestions.value = data.studentQuestions;
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('获取数据报错了:$e');
|
print('获取数据报错了:$e');
|
||||||
ToastUtils.showError('获取试题数据出错,请重试');
|
ToastUtils.showError('获取试题数据出错,请重试');
|
||||||
|
|
@ -116,6 +118,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
ToastUtils.dismiss();
|
ToastUtils.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消全部评分
|
// 取消全部评分
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
children: List.generate(item.queDtls!.length, (index) {
|
children: List.generate(item.queDtls!.length, (index) {
|
||||||
Dtls kgInfo = item.queDtls![index];
|
Dtls kgInfo = item.queDtls![index];
|
||||||
return Container(
|
return Container(
|
||||||
width: 14.r,
|
width: 20.r,
|
||||||
height: 14.r,
|
height: 20.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: kgInfo.state == 0
|
color: kgInfo.state == 0
|
||||||
? const Color(0xFFD3D3D3)
|
? const Color(0xFFD3D3D3)
|
||||||
|
|
@ -167,7 +167,7 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
: kgInfo.state == 2
|
: kgInfo.state == 2
|
||||||
? const Color(0xFFFF7474)
|
? const Color(0xFFFF7474)
|
||||||
: const Color(0xFF4CC793),
|
: const Color(0xFF4CC793),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
borderRadius: BorderRadius.all(Radius.circular(10.r))),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
kgInfo.questionNo.toString(),
|
kgInfo.questionNo.toString(),
|
||||||
|
|
@ -264,8 +264,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
int ttlCount = stu.queDtls!.length;
|
int ttlCount = stu.queDtls!.length;
|
||||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
||||||
stu.queDtls!.sort((a, b) {
|
stu.queDtls!.sort((a, b) {
|
||||||
String num1 = a.questionNo;
|
num num1 = num.parse(a.questionNo);
|
||||||
String num2 = b.questionNo;
|
num num2 = num.parse(b.questionNo);
|
||||||
return num1.compareTo(num2);
|
return num1.compareTo(num2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
index: index,
|
index: index,
|
||||||
color: color != null
|
color: color != null
|
||||||
? item.allNotDone!
|
? item.allNotDone!
|
||||||
? MaterialStateProperty.all(Color(0xFFFFD79C))
|
? WidgetStateProperty.all(const Color(0xFFFFD79C))
|
||||||
: MaterialStateProperty.all(color)
|
: WidgetStateProperty.all(color)
|
||||||
: null,
|
: null,
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
|
|
@ -143,8 +143,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
children: List.generate(item.zgtStu!.length, (index) {
|
children: List.generate(item.zgtStu!.length, (index) {
|
||||||
Dtls kgInfo = item.zgtStu![index];
|
Dtls kgInfo = item.zgtStu![index];
|
||||||
return Container(
|
return Container(
|
||||||
width: 14.r,
|
width: 20.r,
|
||||||
height: 14.r,
|
height: 20.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: kgInfo.state == 0
|
color: kgInfo.state == 0
|
||||||
? const Color(0xFFD3D3D3)
|
? const Color(0xFFD3D3D3)
|
||||||
|
|
@ -153,7 +153,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
: kgInfo.state == 2
|
: kgInfo.state == 2
|
||||||
? const Color(0xFFFF7474)
|
? const Color(0xFFFF7474)
|
||||||
: const Color(0xFF4CC793),
|
: const Color(0xFF4CC793),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
borderRadius: BorderRadius.all(Radius.circular(10.r))),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
kgInfo.questionNo.toString(),
|
kgInfo.questionNo.toString(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue