版本整合

This commit is contained in:
1147192855@qq.com 2024-05-28 16:54:30 +08:00
parent 8874d64281
commit ae92209b99
495 changed files with 9117 additions and 4793 deletions

View File

@ -1,33 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
- platform: android
create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
- platform: ios
create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@ -1,73 +0,0 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.example.school_asignment_app"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.school_asignment_app"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
// minSdkVersion flutter.minSdkVersion
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

View File

@ -1,6 +0,0 @@
package com.example.school_asignment_app
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@ -1,31 +0,0 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -1,3 +0,0 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

View File

@ -1,11 +0,0 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

View File

@ -1,6 +0,0 @@
import 'package:school_asignment_app/common/request/rest_dio.dart';
import 'package:school_asignment_app/common/api/retrofit_client.dart';
mixin RequestToolMixin {
RetrofitClient getClient() => RequestTool.instance.getClient();
}

View File

@ -1,55 +0,0 @@
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
import 'annotate_class_state.dart';
class AnnotateClassLogic extends GetxController with RequestToolMixin{
final AnnotateClassState state = AnnotateClassState();
@override
void onInit(){
super.onInit();
state.homeworkId.value = Get.arguments['id']??'';
state.name.value = Get.arguments['name']??'';
state.grade = Get.arguments['grade'];
state.completed.value = Get.arguments['completed']??false;
EasyLoading.show(status: 'loading...');
getList();
}
void getList() async{
List<AnnotatedClass> data = await getClient(). getAnnotatedClassList(state.homeworkId.value);
state.classList.value = data;
for (var element in state.classList.value) {
int commitStudentCount = 0;
int noCommitStudentCount = 0;
for (var student in element.students) {
if(student.state == 0){
noCommitStudentCount ++;
}else{
commitStudentCount ++;
}
}
element.commitStudentCount = commitStudentCount;
element.noCommitStudentCount = noCommitStudentCount;
}
EasyLoading.dismiss();
}
void goQuickDataCheck(item){
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});
}
}

View File

@ -1,95 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
import 'package:get/get.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/widget/annotate_item.dart';
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
import 'annotate_class_logic.dart';
import 'widget/completed_annotate_item.dart';
class AnnotateClassPage extends StatefulWidget {
const AnnotateClassPage({Key? key}) : super(key: key);
@override
State<AnnotateClassPage> createState() => _AnnotateClassPageState();
}
class _AnnotateClassPageState extends State<AnnotateClassPage> {
final logic = Get.find<AnnotateClassLogic>();
final state = Get.find<AnnotateClassLogic>().state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
backgroundColor: Colors.white,
title: Obx(() {
return Text(state.name.value,
style:
TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
}),
centerTitle: true,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
actions: const [
ReturnToHomepage(),
],
),
body: Padding(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: Obx(() {
return
state.completed.value? Utils.isPad()?GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, //widget
mainAxisSpacing: 10.h,
crossAxisSpacing: 6.w,
childAspectRatio: 1.48 //1widget
),
children: state.classList.map((taskItem) {
return CompletedAnnotateItem(taskItem:taskItem,logic: logic,);
}).toList(),
):ListView.builder(
itemCount: state.classList.length,
itemBuilder: (context, index) {
AnnotatedClass taskItem = state.classList[index];
return CompletedAnnotateItem(taskItem:taskItem,logic: logic,);
}):
Utils.isPad()?MasonryGridView.count(
crossAxisCount: 2, //
mainAxisSpacing: 4.w, //
crossAxisSpacing: 4.h, //
itemCount: state.classList.length,
itemBuilder: (context, index) {
AnnotatedClass item = state.classList[index];
return AnnotateItem(item: item,font: 8.sp,name: state.name.value,logic: logic,);
},
):
ListView.builder(
itemCount: state.classList.length,
itemBuilder: (context, index) {
AnnotatedClass item = state.classList[index];
return AnnotateItem(item: item,font: 12.sp,name: state.name.value,logic: logic,);
});
}),
),
);
}
@override
void dispose() {
Get.delete<AnnotateClassLogic>();
super.dispose();
}
}

View File

@ -1,241 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/utils/enum_untils.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_logic.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_state.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/widget/item_btn.dart';
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
class AnnotateItem extends StatefulWidget {
final AnnotatedClass item;
final double font;
final String name;
final AnnotateClassLogic logic;
const AnnotateItem({Key? key, required this.item,required this.font,required this.name,required this.logic}) : super(key: key);
@override
State<AnnotateItem> createState() => _AnnotateItemState();
}
class _AnnotateItemState extends State<AnnotateItem> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(top: 10.r),
margin: EdgeInsets.only(bottom: 10.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadiusDirectional.circular(4.r),
boxShadow: const [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.15), blurRadius: 10)],
),
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.r),
child: Row(
children: [
Text(
'${EnumUtils.formatGrade(widget.item.grade)}${widget.item.className}',
style: TextStyle(
fontSize: widget.font,
color: const Color(0xFF000000)),
),
const Spacer(),
Text(
'已交:${widget.item.commitStudentCount}',
style: TextStyle(
fontSize: widget.font - 2.sp,
color: const Color(0xFF6888FD)),
),
SizedBox(
width: 20.r,
),
Text(
'未交:${widget.item.noCommitStudentCount}',
style: TextStyle(
fontSize: widget.font - 2.sp,
color: const Color(0xFFFF5656)),
),
],
),
),
SizedBox(
height: 10.r,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 8.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children:
widget.item.finishTime != null ?
[
Expanded(
flex:4,
child:ItemBtn(title: "收藏夹",font: widget.font - 2.sp,
clickFunction: (){
},),
),
const Expanded(flex: 1, child: SizedBox()),
const Expanded(flex: 4, child: SizedBox()),
const Expanded(flex: 1, child: SizedBox()),
const Expanded(flex: 4, child: SizedBox()),
]:[
Expanded(
flex: 4,
child: ItemBtn(title: "一键批阅",font: widget.font - 2.sp,
clickFunction: (){
},),
),
const Expanded(flex: 1,child: Text(''),),
Expanded(
flex:4,
child: ItemBtn(title: "数据快查",font: widget.font - 2.sp,clickFunction: (){
widget.logic.goQuickDataCheck(widget.item);
},),
),
const Expanded(flex: 1,child: Text(''),),
Expanded(
flex:4,
child: ItemBtn(title: "收藏夹",font: widget.font - 2.sp,
clickFunction: (){
},),
),
],
),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 14.r),
child: Row(
children: [
Expanded(
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 8.h,
animationDuration: 2500,
percent: widget.item.annotateRate / 100,
linearGradient: LinearGradient(
tileMode: TileMode.mirror,
stops: const [0.0, 1.0],
colors: widget.item.annotateRate / 100 != 1
? [Theme.of(context).primaryColor.withOpacity(0.1), Theme.of(context).primaryColor]
: [
const Color.fromRGBO(144, 224, 190, 1).withOpacity(0.1),
const Color.fromRGBO(144, 224, 190, 1),
],
),
// linearStrokeCap: LinearStrokeCap.butt,
// progressColor: Theme.of(context).primaryColor,
backgroundColor: const Color.fromRGBO(232, 232, 232, 1),
barRadius: Radius.circular(10.r),
),
),
SizedBox(width: 7.w),
quickText('${widget.item.annotateRate}%',
size: widget.font - 2.sp, color: const Color.fromRGBO(70, 70, 70, 1))
],
),
),
ProgressBar(
title: '客观题正确率:',
color: const Color(0xFFB8C7FF),
percent: widget.item.kgtCorrectRate / 100,
marginEdg: EdgeInsets.zero,
padingEdg: EdgeInsets.only(top: 8.h,left: 14.r,right: 14.r),
fontSize:widget.font - 2.sp),
ProgressBar(
title: '主观题正确率:',
color: const Color(0xFFB8C7FF),
percent: widget.item.zgtCorrectRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 10.r),
marginEdg: EdgeInsets.only(top: 8.h),
fontSize:widget.font - 2.sp),
ProgressBar(
title: '总正确率:',
color: const Color(0xFFB8C7FF),
percent: widget.item.correctRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 10.r),
marginEdg: EdgeInsets.only(top: 8.h),
fontSize:widget.font - 2.sp),
Container(
margin: EdgeInsets.only(top: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(4.r), bottomRight: Radius.circular(4.r)),
color: Colors.white,
boxShadow: const [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.15),
offset: Offset(0, -0.0001), //y轴偏移量
blurRadius: 4, //
spreadRadius: 0, //
)
],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children:
widget.item.finishTime != null ?
[
Expanded(
child: InkWell(
onTap: () {
widget.logic.goQuickDataCheck(widget.item);
},
child: Container(
alignment: Alignment.center,
child: quickText('数据快查', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font),
),
),
),
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
Expanded(
child: InkWell(
onTap: () {
widget.logic.gojobReport(widget.item);
},
child: Container(
alignment: Alignment.center,
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font),
),
)),
]
:
[
Expanded(
child: InkWell(
onTap: () {},
child: Container(
alignment: Alignment.center,
child: quickText('批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
),
),
),
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
Expanded(
child: InkWell(
onTap: () {},
child: Container(
alignment: Alignment.center,
child: quickText('结束批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
),
)),
],
),
)
],
),
);
}
}

View File

@ -1,353 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/student_item.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
import 'class_student_logic.dart';
class ClassStudentPage extends StatefulWidget {
const ClassStudentPage({Key? key}) : super(key: key);
@override
State<ClassStudentPage> createState() => _ClassStudentPageState();
}
class _ClassStudentPageState extends State<ClassStudentPage> {
final logic = Get.find<ClassStudentLogic>();
final state = Get
.find<ClassStudentLogic>()
.state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
backgroundColor: Colors.white,
title: Obx(() {
return Text(
state.title.value,
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
);
}),
centerTitle: true,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
actions: const [
ReturnToHomepage(),
],
),
body: Padding(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: Obx(() {
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
logic.getList();
},
child: state.studentList.isNotEmpty
? Utils.isPad()
? GridView(
shrinkWrap: true,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 10.r,
crossAxisSpacing: 10.r,
childAspectRatio: 556 / 112,
),
children: List.generate(state.studentList.length, (index) {
StudentItem item = state.studentList[index];
return InkWell(
onTap: () {
// RouterManager.router.navigateTo(context,
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
Get.toNamed(Routes.studentWorkDetailPage,arguments: {'studentName':item.name,'studentId':item.id});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.r),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
item.name,
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF6888FD)),
)),
state.page == 'answerTrajectory' ? Container(
height: 20.r,
width: 70.r,
decoration: BoxDecoration(
border: Border.all(
width: 1.r, color: const Color(0xFFFFA41E)),
borderRadius: BorderRadius.all(
Radius.circular(20.r)),
),
child: Center(child: Text('详情', style: TextStyle(
fontSize: 10.r, color: Color(0xFFFFA41E))),
)) : state.page == 'history' ? Container(
height: 20.r,
width: 70.r,
decoration: BoxDecoration(
color: const Color(0xFF6888FD),
borderRadius: BorderRadius.all(
Radius.circular(20.r))
),
child: Center(child: Text('历史作业', style: TextStyle(
fontSize: 10.r, color: Colors.white),)),
) :
item.priorityAnnotate
?
InkWell(
onTap: () {
logic.setJobReadLevel(
item.id, false);
EasyLoading.show(
status: 'loading...');
},
child: Container(
height: 20.r,
width: 80.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
color: const Color(0xFFB7FFE0),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 3.r),
child: Image.asset(
'assets/images/youx_icon_active.png',
width: 14.r, height: 14.r,),
),
Padding(
padding: EdgeInsets.only(
top: 2.r, left: 4.r),
child: Text(
'优先批阅',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF4CC793)),
),
),
],
),
),
)
: InkWell(
onTap: () {
logic.setJobReadLevel(
item.id, true);
EasyLoading.show(
status: 'loading...');
},
child: Container(
height: 20.r,
width: 80.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
color: const Color(0xFFE1E1E1),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 3.r),
child: Image.asset(
'assets/images/youx_icon_default.png',
width: 14.r, height: 14.r,),
),
Padding(
padding: EdgeInsets.only(
top: 2.r, left: 4.r),
child: Text(
'优先批阅',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF8A9691)),
),
),
],
),
),
),
],
),
),
);
}),
)
: ListView.builder(
itemBuilder: (context, index) {
StudentItem item = state.studentList[index];
return InkWell(
onTap: () {
// RouterManager.router.navigateTo(context,
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
Get.toNamed(Routes.studentWorkDetailPage,arguments: {'studentName':item.name,'studentId':item.id});
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 20.r, horizontal: 15.r),
margin: EdgeInsets.only(bottom: 15.r),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: Colors.white,
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
item.name,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF6888FD)),
)),
state.page == 'answerTrajectory' ? Container(
height: 24.r,
width: 72.r,
decoration: BoxDecoration(
border: Border.all(
width: 1.r, color: Color(0xFFFFA41E)),
borderRadius: BorderRadius.all(
Radius.circular(20.r)),
),
child: Center(child: Text('详情', style: TextStyle(
fontSize: 10.r, color: Color(0xFFFFA41E))),
)) : state.page == 'history' ? Container(
height: 24.r,
width: 82.r,
decoration: BoxDecoration(
color: Color(0xFF6888FD),
borderRadius: BorderRadius.all(
Radius.circular(20.r))
),
child: Center(child: Text('历史作业', style: TextStyle(
fontSize: 10.r, color: Colors.white),)),
) :
item.priorityAnnotate
? InkWell(
onTap: () {
logic.setJobReadLevel(
item.id, false);
EasyLoading.show(
status: 'loading...');
},
child: Container(
height: 24.r,
width: 82.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
color: Color(0xFFB7FFE0),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 3.r),
child: Image.asset(
'assets/images/youx_icon_active.png',
width: 14.r, height: 14.r,),
),
Padding(
padding: EdgeInsets.only(
top: 2.r, left: 4.r),
child: Text(
'优先批阅',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF4CC793)),
),
),
],
),
),
)
: InkWell(
onTap: () {
logic.setJobReadLevel(
item.id, true);
EasyLoading.show(
status: 'loading...');
},
child: Container(
height: 24.r,
width: 82.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
color: const Color(0xFFE1E1E1),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 3.r),
child: Image.asset(
'assets/images/youx_icon_default.png',
width: 14.r, height: 14.r,),
),
Padding(
padding: EdgeInsets.only(
top: 2.r, left: 4.r),
child: Text(
'优先批阅',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF8A9691)),
),
),
],
),
),
),
],
),
),
);
},
itemCount: state.studentList.length,
)
: const MyEmptyWidget(),
);
}),
),
);
}
@override
void dispose() {
Get.delete<ClassStudentLogic>();
super.dispose();
}
}

View File

@ -1,54 +0,0 @@
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'job_report_state.dart';
class JobReportLogic extends GetxController with RequestToolMixin {
final JobReportState state = JobReportState();
@override
void onInit(){
super.onInit();
state.title.value = Get.arguments['title']??'';
state.homeworkId.value = Get.arguments['homeworkId']??'';
state.classId.value = Get.arguments['classId']??'';
state.className.value = Get.arguments['className']??'';
state.grade = Get.arguments['grade']??'';
EasyLoading.show(status: 'loading...');
getClass();
}
void getClass() async{
List<AnnotatedClass> data = await getClient(). getAnnotatedClassList(state.homeworkId.value);
state.involveClasses.value = data;
state.involveClasses.value = [state.classData.value, ...(data ?? [])];
for (var element in state.involveClasses) {
if (element.className == state.className.value && element.grade == state.grade ) {
state.classData.value = element;
}
}
getWorkData();
}
void getWorkData() async{
HomeworkDetails data = await getClient(). getHomeworkDetails(state.homeworkId.value,state.classData.value.classId != '-1' ? state.classData.value.classId : '');
state.dataCount = Utils.getHomeworkData(data);
state.homeData = data;
state.kgReport.value = data.questions.where((w)=>w.questionType == 1).toList();
state.zgReport.value = data.questions.where((w)=>w.questionType == 2).toList();
state.studentList.value = [...data.students];
state.knowsList.value = data.knows;
state.hasData.value = true;
EasyLoading.dismiss();
state.studentList.sort((a, b) {
int num1 = a.kgtOkCount!+a.zgtOkCount!;
int num2 = b.kgtOkCount!+b.zgtOkCount!;
return num2.compareTo(num1);
});
}
}

View File

@ -1,299 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:percent_indicator/linear_percent_indicator.dart';
import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
class KnowledgePoint extends StatefulWidget {
final RxList<Knows> knowsList;
final HomeworkDetails data;
final String className;
final String homeworkId;
KnowledgePoint({Key? key,required this.knowsList,required this.data,required this.className,required this.homeworkId}) : super(key: key);
@override
State<KnowledgePoint> createState() => _KnowledgePointState();
}
class _KnowledgePointState extends State<KnowledgePoint> {
void goQuickCheckPersonalPath(studentId) {
if (studentId != null) {
Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':studentId,'homeworkId':widget.homeworkId});
}
}
void showPeopleListDialog(
{required BuildContext context,
required String title,
required List<Students> arr,}) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
backgroundColor:const Color(0xFFFFFFFF),
contentPadding: EdgeInsets.all(20.r),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15.r))),
content: SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).size.height * 0.7,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Text(
title,
style: TextStyle(
fontSize: 15.sp,
color: const Color(0xFF3C3C3C),
fontWeight: FontWeight.w500),
),
),
SizedBox(
height: 10.r,
),
Row(
children: [
Expanded(
flex: 2,
child: Center(
child: Text(
'姓名',
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF6A6A6A)),
))),
SizedBox(width: 10.r,),
Expanded(
flex: 1,
child: Center(
child: Text(
'班级',
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF6A6A6A)),
))),
SizedBox(width: 10.r,),
Expanded(
flex: 2,
child: Center(
child: Text(
'掌握度',
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF6A6A6A)),
))),
SizedBox(width: 10.r,),
Expanded(
flex: 3,
child: Center(
child: Text(
'掌握情况',
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF6A6A6A)),
))),
],
),
SizedBox(
height: 5.r,
),
arr.isNotEmpty? Expanded(
child: ListView.builder(
shrinkWrap: true,
itemBuilder: (context, index) {
var item = arr[index];
return Container(
padding: EdgeInsets.symmetric(vertical: 5.r),
color: const Color(0xFFF0F0F0),
margin:EdgeInsets.only(bottom: 2.r),
child: Row(
children: [
Expanded(
flex: 2,
child: InkWell(
onTap: () {
goQuickCheckPersonalPath(
item.studentId);
},
child: Center(
child: Text(
item.studentName!,
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF323232)),
)))),
SizedBox(width: 10.r,),
Expanded(
flex: 1,
child: Center(
child: Text(
widget.className == ''?'全部': widget.className,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF323232)),
))),
SizedBox(width: 10.r,),
Expanded(
flex: 2,
child: Center(
child: Text(
'${item.okRate!.toStringAsFixed(0)}%',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF323232)),
))),
SizedBox(width: 10.r,),
Expanded(
flex: 3,
child: Padding(
padding: EdgeInsets.symmetric(vertical: 2.r, horizontal: 5.r),
child: SingleChildScrollView(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 5,
runSpacing: 3,
children: List.generate(item.queDtls!.length, (index) {
Dtls kgInfo = item.queDtls![index];
return Container(
width: 14.r,
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? const Color(0xFFD3D3D3)
: kgInfo.state == 1?Colors.white:kgInfo.state == 2
? const Color(0xFFFF7474)
: const Color(0xFF4CC793),
borderRadius: BorderRadius.all(Radius.circular(7.r))),
child: Center(
child: Text(
kgInfo.questionNo.toString(),
style: TextStyle(
fontSize: 8.sp,
color: kgInfo.state == 1
? Color(0xFF525252)
: Colors.white),
)),
);
})),
),
),),
],
),
);
},
itemCount: arr.length,
),
): const MyEmptyWidget()
],
),
),
);
});
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 10.h),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
constraints: BoxConstraints(maxHeight: 320.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),
child: Column(
children: [
Container(
margin: EdgeInsets.only(bottom: 24.h),
child: quickText('知识点掌握情况', color: const Color.fromRGBO(92, 92, 92, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
Expanded(
child: ListView(children: widget.knowsList.value.map((item) {
return Container(
margin: EdgeInsets.only(bottom: 15.h, left: 15.r, right: 15.r),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Expanded(
flex: 10,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
quickText(item.knowledgeName,
size: 12.sp, color: const Color.fromRGBO(152, 152, 152, 1)),
quickText('${item.okRate!.toStringAsFixed(0)}%',
size: 12.sp, color: const Color.fromRGBO(64, 64, 64, 1)),
],
),
),
SizedBox(width: 10.w),
const Expanded(flex: 1, child: SizedBox()),
],
),
SizedBox(height: 3.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 10,
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 10.h,
animationDuration: 2500,
percent: item.okRate! / 100,
progressColor: Theme.of(context).primaryColor,
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
barRadius: Radius.circular(10.r),
)),
SizedBox(width: 10.w),
InkWell(
onTap: () {
List<Questions> ques = widget.data.questions.where((w) => w.knows.indexWhere((k) => k.knowledgeId == item.knowledgeId) > -1).toList();
List<Students> array2 = [...widget.data.students];
for(var stu in array2){
stu.queDtls = widget.data.dtls.where((w) => w.studentId == stu.studentId && ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1).toList();
int okCount = stu.queDtls!.where((w) => w.state == 3).length;
int ttlCount = stu.queDtls!.length;
stu.okRate = Utils.calcRate(okCount, ttlCount);
stu.queDtls!.sort((a, b) {
int num1 = a.questionNo;
int num2 = b.questionNo;
return num1.compareTo(num2);
});
}
showPeopleListDialog(
context: context,
title: item.knowledgeName,
arr: array2,);
},
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
quickText('查看', size: 12.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
Icon(Icons.arrow_forward_ios, size: 11.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
],
),
),
],
)
],
),
);
}).toList()),
),
],
));
}
}

View File

@ -1,265 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/knowledge_points_grasp.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
import 'package:school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
import 'knowledge_points_grasp_logic.dart';
class KnowledgePointsGraspPage extends StatefulWidget {
const KnowledgePointsGraspPage({Key? key}) : super(key: key);
@override
State<KnowledgePointsGraspPage> createState() =>
_KnowledgePointsGraspPageState();
}
class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
final logic = Get.find<KnowledgePointsGraspLogic>();
final state = Get
.find<KnowledgePointsGraspLogic>()
.state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
backgroundColor: Colors.white,
title: Text('知识点掌握',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
centerTitle: true,
leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
actions: const [
ReturnToHomepage(),
],
elevation: 0,
),
body: Column(
children: [
Container(
margin: EdgeInsets.all(15.r),
height: 30.r,
child: Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(left: 10.r, right: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.r),
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
color: Colors.white,
),
child: TextField(
controller: logic.textController,
textInputAction: TextInputAction.next,
style: TextStyle(
color: const Color.fromRGBO(80, 87, 103, 1),
fontSize: 10.sp,
),
decoration: InputDecoration(
hintText: "请输入知识点名称",
hintStyle: TextStyle(fontSize: 10.sp,
color: const Color.fromRGBO(153, 153, 153, 1)),
labelStyle: TextStyle(fontSize: 10.sp,
color: const Color.fromRGBO(148, 163, 182, 1)),
border: InputBorder.none,
),
),
),
),
SizedBox(width: 10.r,),
InkWell(
onTap: () {
state.page = 1;
logic.getList();
},
child: Container(
width: 50.r,
height: 30.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r),
color: Color(0xFF6888FD),
),
child: Center(
child: Text('查询', style: TextStyle(
fontSize: 12.sp, color: Colors.white),),
),
),
)
],
),
),
Obx(() {
return JobConditionFilter(
jobType: 1,
controller: logic.tabController,
customTimeStr: state.customTimeStr.value,
customTime: logic.tabController.index != 2 ||
((state.dateEnd == null || state.dateEnd == '') &&
(state.dateStart == null || state.dateStart == ''))
? null
: PickerDateRange(
state.dateStart == null || state.dateStart == ''
? null
: DateTime
.parse(state.dateStart!),
state.dateEnd == null || state.dateEnd == '' ? null : DateTime
.parse(state.dateEnd!),
),
onTimeFilter: (String? startTime, String? endTime) {
EasyLoading.show(status: 'loading...');
if (startTime == null && endTime == null) {
if (logic.tabController.index == 2) {
logic.tabController.animateTo(0);
}
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
state.customTimeStr.value = '自定义';
} else {
state.dateStart = startTime ?? '';
state.dateEnd = endTime ?? '';
}
state.page = 1;
logic.getList();
// _refreshController2.callRefresh();
},
refreshTime: (value) {
if (value != null && value.startDate != null) {
state.customTimeStr.value =
value.startDate?.toString().substring(0, 10) ?? '';
if (value.endDate != null) {
if (!Utils.isPad() &&
value.startDate!.year == value.endDate!.year) {
state.customTimeStr.value =
'${value.startDate.toString().substring(5, 10)}~${value
.endDate.toString().substring(5, 10)}';
} else {
state.customTimeStr.value =
'${state.customTimeStr.value}~${value.endDate?.toString()
.substring(0, 10)}';
}
}
}
},);
}),
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.r),
child: Obx(() {
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
state.page = 1;
logic.getList();
},
onLoad: () async {
if (state.page < state.totalPages) {
state.page += 1;
logic.getList();
}
},
child: state.dataList.isNotEmpty
? ListView.builder(
itemCount: state.dataList.value.length,
itemBuilder: (context, index) {
KnowledgePointsGrasp item = state.dataList[index];
return InkWell(
onTap: () {
Get.toNamed(Routes.knowledgePointsGraspDetailPage,arguments: {'dateStart':state.dateStart,'dateEnd':state.dateEnd,'knowledgeId':item.knowledgeId,'knowledgeName':item.knowledgeName});
},
child: Container(
margin: EdgeInsets.symmetric(
vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(
vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.r)),
color: Colors.white),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Text(
item.knowledgeName,
style: TextStyle(fontSize: 14.sp,
color: Color(0xFF505050)),
)),
Container(
width: 49.r,
height: 22.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(20.r)),
border: Border.all(width: 1.r,
color: Color(0xFF6888FD)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment
.center,
children: [
Text(
'${item.count}',
style: TextStyle(fontSize: 10.sp,
color: Color(0xFF6888FD)),
),
Image.asset(
'assets/images/right_icon_blue.png',
width: 8.r, height: 8.r,),
],
),
),
],
),
SizedBox(height: 10.r,),
ProgressBar(
title: '正确率:',
color: Color(0xFF90E0BE),
percent: item.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
),
),
);
})
: const MyEmptyWidget(),
);
}),
),
),
],
),
);
}
@override
void dispose() {
Get.delete<KnowledgePointsGraspLogic>();
super.dispose();
}
}

View File

@ -1,16 +0,0 @@
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/job/knowledge_report_detail.dart';
class KnowledgePointsGraspDetailState {
KnowledgePointsGraspDetailState() {
///Initialize variables
}
late String dateStart = '';
late String dateEnd = '';
late int knowledgeId = 0;
late RxList<KnowledgeReportDetail> dataList=RxList();
late RxList<Students> studentList=RxList();
late RxString knowledgeName=''.obs;
}

View File

@ -1,293 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:school_asignment_app/common/job/knowledge_report_detail.dart';
import 'package:school_asignment_app/common/utils/toast_utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/page/global_widget/show_student_list.dart';
import 'knowledge_points_grasp_detail_logic.dart';
class KnowledgePointsGraspDetailPage extends StatefulWidget {
const KnowledgePointsGraspDetailPage({Key? key}) : super(key: key);
@override
State<KnowledgePointsGraspDetailPage> createState() =>
_KnowledgePointsGraspDetailPageState();
}
class _KnowledgePointsGraspDetailPageState
extends State<KnowledgePointsGraspDetailPage> {
final logic = Get.find<KnowledgePointsGraspDetailLogic>();
final state = Get
.find<KnowledgePointsGraspDetailLogic>()
.state;
@override
Widget build(BuildContext context) {
void showImg(imgUrl, context) {
if (imgUrl != null && imgUrl != '') {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
insetPadding:
EdgeInsets.symmetric(vertical: 55.r, horizontal: 45.r),
contentPadding: EdgeInsets.all(0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15.r))),
content: Container(
width: MediaQuery
.of(context)
.size
.width,
// height: MediaQuery.of(context).size.height,
child: Image.network(imgUrl),
),
);
},
);
} else {
ToastUtils.showError('暂无图片');
}
EasyLoading.dismiss();
}
void showStudent(homeworkId, templateId, questionNo, title) async {
logic.getStudents(homeworkId, templateId, questionNo);
showDialog(
context: context,
builder: (BuildContext context) {
return Obx(() {
return ShowStudentList(title: title,
studentList: state.studentList.value,
homeworkId: homeworkId,);
});
},
);
EasyLoading.dismiss();
}
return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
backgroundColor: Colors.white,
title: Obx(() {
return Text(state.knowledgeName.value,
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
}),
centerTitle: true,
leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
actions: const [
ReturnToHomepage(),
],
elevation: 0,
),
body: Padding(
padding: EdgeInsets.symmetric(vertical: 10.r),
child: Obx(() {
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
logic.getList();
},
onLoad: () async {
// getList();
},
child: state.dataList.isNotEmpty
? ListView.builder(
itemCount: state.dataList.length,
itemBuilder: (context, index) {
KnowledgeReportDetail item = state.dataList[index];
return InkWell(
onTap: () {
/* RouterManager.router.navigateTo(
context,
RouterManager.quickCheckPersonalPath +
'?jobId=${item.jobName}&studentId=$studentId',
transition: getTransition(),
);*/
},
child: Container(
margin: EdgeInsets.symmetric(
vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(
vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: Colors.white),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
item.publishTime.substring(0, 10),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF505050)),
),
SizedBox(
width: 10.r,
),
Expanded(
child: Text(
item.homeworkName,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF505050)),
)),
InkWell(
onTap: () {
EasyLoading.show(status: 'loading...');
showImg(item.questionPicture, context);
},
child: Container(
width: 49.r,
height: 22.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(20.r)),
border: Border.all(
width: 1.r,
color: Color(0xFF8B8B8B)),
),
child: Center(
child: Text(
'${item.questionNo}',
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF8B8B8B)),
),
),
),
),
],
),
SizedBox(
height: 10.r,
),
Container(
margin: EdgeInsets.only(top: 8.h),
padding: EdgeInsets.zero,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
EasyLoading.show(status: 'loading...');
showStudent(
item.homeworkId, item.templateId,
item.questionNo, item.homeworkName);
},
child: Container(
margin: EdgeInsets.only(right: 6.r),
width: 56.r,
height: 20.r,
decoration: BoxDecoration(
color: Color(0xFFD4FFED),
borderRadius:
BorderRadius.circular(20.r),
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
quickText('正确率',
color: Color(0xFF4CC793),
size: 10.sp),
Image.asset(
'assets/images/icon_back_green.png',
width: 8.r,
height: 8.r,
)
],
)),
),
Expanded(
flex: 1,
child: Container(
child: Row(
children: [
Expanded(
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(
10.r),
),
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 8.h,
animationDuration: 2500,
percent:
item.correctRate / 100,
progressColor:
Color(0xFF90E0BE),
backgroundColor:
Color(0xFFE8E8E8),
barRadius:
Radius.circular(10.r),
),
),
),
SizedBox(width: 4.w),
quickText(
'${item.correctRate.toStringAsFixed(
0)}%',
size: 10.sp,
color: Color(0xFF606060))
],
),
),
),
],
),
),
/* progressBar(context,
title: '正确率 >',
color: Color(0xFF90E0BE),
percent: item.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h),
studentCall:showStudent(item.questionId,item.jobName),
),*/
],
),
),
);
})
: const MyEmptyWidget(),
);
}),
),
);
}
@override
void dispose() {
Get.delete<KnowledgePointsGraspDetailLogic>();
super.dispose();
}
}

View File

@ -1,34 +0,0 @@
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'quick_data_check_state.dart';
class QuickDataCheckLogic extends GetxController with RequestToolMixin{
final QuickDataCheckState state = QuickDataCheckState();
@override
void onInit(){
super.onInit();
state.homeworkId.value = Get.arguments['homeworkId']??'';
state.classId.value = Get.arguments['classId']??'';
state.className.value = Get.arguments['className']??'';
state.grade = Get.arguments['grade'];
EasyLoading.show(status: 'loading...');
getWorkData();
}
void getWorkData() async{
HomeworkDetails data = await getClient(). getHomeworkDetails(state.homeworkId.value,state.classId.value);
state.dataCount = Utils.getHomeworkData(data);
state.homeData = data;
state.kgReport.value = data.questions.where((w)=>w.questionType == 1).toList();
state.zgReport.value = data.questions.where((w)=>w.questionType == 2).toList();
state.studentList.value = data.students;
state.hasData.value = true;
EasyLoading.dismiss();
}
}

View File

@ -1,360 +0,0 @@
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:school_asignment_app/common/utils/enum_untils.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/quick_data_check_bottom.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/report_table.dart';
import 'quick_data_check_logic.dart';
class QuickDataCheckPage extends StatefulWidget {
const QuickDataCheckPage({Key? key}) : super(key: key);
@override
State<QuickDataCheckPage> createState() => _QuickDataCheckPageState();
}
class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
final logic = Get.find<QuickDataCheckLogic>();
final state = Get
.find<QuickDataCheckLogic>()
.state;
@override
Widget build(BuildContext context) {
return AnnotatedRegion(
value: const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarIconBrightness: Brightness.light,
statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.dark,
),
child: Container(
padding: EdgeInsets.only(top: MediaQuery
.of(context)
.padding
.top),
height: MediaQuery
.of(context)
.size
.height,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xFF6889FD),
Color(0xFFF5F5F5),
],
stops: [
0.09,
0.3
])),
child:
Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
IconButton(
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
onPressed: () => Navigator.of(context).pop(),
),
Expanded(
child: Padding(
padding: EdgeInsets.only(right: 8.r),
child: Center(
child: Text(
'数据快查',
style: TextStyle(
fontSize: 14.sp, color: Colors.white),
)),
)),
const ReturnToHomepage(bgColor: Colors.white,),
],
),
SizedBox(height: 10.r),
Obx(() {
if (state.hasData.value) {
return Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: EdgeInsets.only(left: 14.r, top: 2.r),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'assets/images/job_report_class_icon.png',
width: 22.r,
height: 22.r,
),
SizedBox(
width: 6.r,
),
Obx(() {
return Text(
'${EnumUtils.formatGrade(
state.grade)}${state.className.value}',
style: TextStyle(
fontSize: 14.r, color: Colors.white),
);
})
],
),
),
Container(
padding: EdgeInsets.symmetric(
vertical: 15.r, horizontal: 15.r),
margin: EdgeInsets.symmetric(
vertical: 10.r, horizontal: 14.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.all(Radius.circular(6.r))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 2.r,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 12.r,
height: 12.r,
decoration: BoxDecoration(
color: const Color(0xFF4CC793),
borderRadius: BorderRadius.all(
Radius.circular(7.r))),
),
SizedBox(
width: 6.r,
),
Text(
'已提交',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF333333)),
),
SizedBox(
width: 35.r,
),
Container(
width: 12.r,
height: 12.r,
decoration: BoxDecoration(
color: const Color(0xFF6888FD),
borderRadius: BorderRadius.all(
Radius.circular(7.r))),
),
SizedBox(
width: 6.r,
),
Text(
'未提交',
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF333333)),
)
],
),
SizedBox(
height: 2.r,
),
//
SizedBox(
height: MediaQuery
.of(context)
.size
.width * 0.3,
child: PieChart(
PieChartData(
borderData: FlBorderData(show: false),
sectionsSpace: 0,
centerSpaceRadius:
MediaQuery
.of(context)
.size
.width * 0.06,
sections: [
PieChartSectionData(
color: const Color(0xFF4CC793),
value: state.dataCount
.studentSubmitCount! /
state.dataCount.studentCount! *
100,
radius:
MediaQuery
.of(context)
.size
.width *
0.07 +
5,
title: '${state.dataCount
.studentSubmitCount}',
titleStyle: TextStyle(
fontSize: 14.sp,
color: Colors.white,
),
),
PieChartSectionData(
color: const Color(0xFF6888FD),
value: (state.dataCount
.studentCount! - state.dataCount
.studentSubmitCount!) /
state.dataCount.studentCount! *
100,
radius:
MediaQuery
.of(context)
.size
.width *
0.07,
title: '${state.dataCount
.studentCount! - state.dataCount
.studentSubmitCount!}',
titleStyle: TextStyle(
fontSize: 14.sp,
color: Colors.white,
),
),
],
),
),
),
//
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'客观题答题进度',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF8B8B8B)),
),
Text(
'${state.dataCount.kgtAnswerRate!
.toStringAsFixed(0)}%',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF333333)),
),
],
),
SizedBox(height: 6.r),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 10,
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 9.h,
animationDuration: 2500,
percent: state.dataCount
.kgtAnswerRate! / 100,
progressColor: const Color(
0xFFFF7F22),
backgroundColor: const Color(
0xFFEAEAEA),
barRadius: Radius.circular(10.r),
)),
],
),
SizedBox(height: 20.r),
//
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'主观题答题进度',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF8B8B8B)),
),
Text(
'${state.dataCount.zgtAnswerRate!
.toStringAsFixed(0)}%',
style: TextStyle(
fontSize: 10.sp,
color: const Color(0xFF333333)),
),
],
),
SizedBox(height: 6.r),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 10,
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 9.h,
animationDuration: 2500,
percent: state.dataCount
.zgtAnswerRate! / 100,
progressColor: const Color(
0xFFFF7F22),
backgroundColor: const Color(
0xFFEAEAEA),
barRadius: Radius.circular(10.r),
)),
],
),
],
),
),
QuickDataCheckBottom(jobData: state.studentList.value,
jobId: state.homeworkId.value,
kgCount: state.dataCount.kgtDtlCount!,
zgCount: state.dataCount.zgtDtlCount!,),
//
KgtZgtTable(studentCount:state.dataCount.studentCount!,homeworkId:state.homeworkId.value,kgReport: state.kgReport,zgReport: state.zgReport,kgtOkRate:state.dataCount.kgtOkRate!
.toStringAsFixed(0),zgtOkRate:state.dataCount.zgtOkRate!
.toStringAsFixed(0)),
],
),
));
} else {
return Padding(
padding: EdgeInsets.only(
top: MediaQuery
.of(context)
.size
.height / 2 - 200.r),
child: const MyEmptyWidget()
);
}
})
],
),
),
);
}
@override
void dispose() {
Get.delete<QuickDataCheckLogic>();
super.dispose();
}
}

View File

@ -1,311 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:percent_indicator/percent_indicator.dart';
import 'package:school_asignment_app/common/job/work_student.dart';
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:school_asignment_app/common/utils/enum_untils.dart';
import 'package:school_asignment_app/common/utils/toast_utils.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_logic.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
class TaskListItem extends StatefulWidget {
final bool completed;
final Items jobTaskItem;
final int type;
final ReadOverLogic logic;
const TaskListItem({Key? key,required this.completed,required this.jobTaskItem,required this.type,required this.logic}) : super(key: key);
@override
State<TaskListItem> createState() => _TaskListItemState();
}
class _TaskListItemState extends State<TaskListItem>{
@override
Widget build(BuildContext context) {
return widget.completed
? InkWell(
onTap: () {
Get.toNamed(Routes.annotateClassPage,arguments: {'id': widget.jobTaskItem.id,'name': widget.jobTaskItem.name,'grade': widget.jobTaskItem.grade,'completed':true});
},
child: Container(
width: double.infinity,
padding: EdgeInsets.only(top: 20.h),
margin: EdgeInsets.only(bottom: 12.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.r),
color: const Color.fromRGBO(255, 255, 255, 1),
boxShadow: const [
BoxShadow(
color: Color.fromRGBO(210, 216, 241, 1),
offset: Offset.zero, //y轴偏移量
blurRadius: 5.8, //
spreadRadius: 0, //
)
],
),
child: Column(
children: [
//
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: Utils.isPad() ? 32.w : 36.w,
height: 18.h,
alignment: Alignment.center,
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
decoration: BoxDecoration(
color: const Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r),
bottomLeft: Radius.circular(4.r),
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
child: quickText('作业', color: Colors.white, size: 10.sp),
),
Expanded(
child: quickText(
widget.jobTaskItem.name,
maxLines: 2,
size: 16.sp,
color: const Color.fromRGBO(70, 70, 70, 1),
fontWeight: FontWeight.bold,
),
)
],
),
),
SizedBox(height: 12.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0,10),
color: const Color.fromRGBO(97, 97, 97, 1),
size: 12.sp,
fontWeight: FontWeight.w500,
),
quickText(' / ', color: const Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.w500),
quickText(
'参与班级:${widget.jobTaskItem.classCount}',
color: const Color.fromRGBO(76, 199, 147, 1),
size: 12.sp,
fontWeight: FontWeight.w600,
),
quickText(' / ', color: const Color.fromRGBO(116, 145, 253, 1), size: 12.sp, fontWeight: FontWeight.w500),
quickText(
'科目:${EnumUtils.formatSubject(widget.jobTaskItem.subject)}' ,
color: const Color.fromRGBO(116, 145, 253, 1),
size: 12.sp,
fontWeight: FontWeight.w600,
),
const Expanded(child: SizedBox()),
/* FavoriteButton(
jobTaskItem.id,
jobTaskItem.title,
margin: EdgeInsets.zero,
isRow: false,
),*/
],
),
),
SizedBox(height: 20.h),
Container(
padding: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
color: Colors.white,
boxShadow: const [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.15),
offset: Offset(0, -0.0001), //y轴偏移量
blurRadius: 4, //
spreadRadius: 0, //
)
],
),
child: Row(children: [
Expanded(
child: InkWell(
onTap: (){},
child: Container(
alignment: Alignment.center,
child: quickText('查看报告', color: const Color.fromRGBO(118, 118, 118, 1), size: 13.sp),
),
)),
]),
),
],
),
),
)
:
InkWell(
onTap: () {
Get.toNamed(Routes.annotateClassPage,arguments: {'id':widget.jobTaskItem.id,'name':widget.jobTaskItem.name,'grade':widget.jobTaskItem.grade});
},
child: Stack(
alignment: const FractionalOffset(0.95, 0),
children: [
Container(
margin: EdgeInsets.only(bottom: 16.h),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.r),
color: const Color.fromRGBO(255, 255, 255, 1),
boxShadow: const [
BoxShadow(
color: Color.fromRGBO(210, 216, 241, 1),
offset: Offset.zero, //y轴偏移量
blurRadius: 5.8, //
spreadRadius: 0, //
)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 30.h),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: Utils.isPad() ? 32.w : 38.w,
height: 18.h,
alignment: Alignment.center,
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
decoration: BoxDecoration(
color: widget.type == 1
? const Color.fromRGBO(104, 136, 253, 1)
: const Color.fromRGBO(255, 175, 56, 1),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r),
bottomLeft: Radius.circular(4.r),
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
child: quickText(widget.type == 1?'作业':'考试', color: Colors.white, size: 10.sp),
),
Expanded(
child: quickText(
widget.jobTaskItem.name,
maxLines: 2,
size: Utils.isPad() ? 14.sp : 16.sp,
color: const Color.fromRGBO(70, 70, 70, 1),
fontWeight: FontWeight.bold,
),
)
],
),
SizedBox(height: 10.h),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
quickText(
EnumUtils.formatSubject(widget.jobTaskItem.subject),
color: const Color.fromRGBO(97, 97, 97, 1),
size: 12.sp,
),
quickText(' / ',
color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
quickText(
'10',
color: const Color.fromRGBO(97, 97, 97, 1),
size: 13.sp,
),
],
),
),
quickText(' / ',
color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0,10),
color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp),
],
),
SizedBox(height: 10.h),
InkWell(
onTap: (){
if(!widget.jobTaskItem.isFixed!){
EasyLoading.show(status:'loading...');
widget.logic.getCollect(widget.jobTaskItem);
}
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 4.r,horizontal: 20.r),
decoration: BoxDecoration(
color: widget.jobTaskItem.isFixed!?Color(0xFFF4F4F4):Color(0xFFF2FFFA),
border: Border.all(width: 1.r,color:widget.jobTaskItem.isFixed!?Colors.transparent:Color(0xFF4CC793)),
borderRadius: BorderRadius.all(Radius.circular(20.r)),
),
child: Text(widget.jobTaskItem.isFixed!?'已订正':'收集订正',style: TextStyle(fontSize: 10.sp,color: const Color(0xFF4CC793)),),
),
),
// FavoriteButton(jobTaskItem.id, jobTaskItem.title),
],
),
),
Container(
padding: EdgeInsets.all(9.r),
decoration: const BoxDecoration(shape: BoxShape.circle, color: Colors.white),
child: CircularPercentIndicator(
radius: 40.r,
lineWidth: 10.r,
animation: true,
percent: widget.jobTaskItem.annotateRate==null?0:widget.jobTaskItem.annotateRate! / 100,
center: Text.rich(TextSpan(children: [
TextSpan(
text: Utils.getDoubleRemoveZero(widget.jobTaskItem.annotateRate, '0'),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16.sp,
color: Theme.of(context).primaryColor,
),
),
TextSpan(
text: "%",
style: TextStyle(color: const Color.fromRGBO(70, 70, 70, 1), fontSize: 12.sp, fontWeight: FontWeight.bold),
),
])),
circularStrokeCap: CircularStrokeCap.round,
// progressColor: Theme.of(context).primaryColor,
linearGradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
tileMode: TileMode.clamp,
stops: const [0.0, 1.0],
colors: [
Theme.of(context).primaryColor.withOpacity(0.1),
Theme.of(context).primaryColor,
],
),
backgroundColor: const Color.fromRGBO(244, 244, 244, 1),
),
),
],
),
);
}
}

View File

@ -1,598 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/student_history.dart';
import 'package:school_asignment_app/common/utils/enum_untils.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
import 'package:school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
import 'student_work_detail_logic.dart';
class StudentWorkDetailPage extends StatefulWidget {
const StudentWorkDetailPage({Key? key}) : super(key: key);
@override
State<StudentWorkDetailPage> createState() => _StudentWorkDetailPageState();
}
class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
final logic = Get.find<StudentWorkDetailLogic>();
final state = Get
.find<StudentWorkDetailLogic>()
.state;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
backgroundColor: Colors.white,
title: Text('${state.studentName}作业详情',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
centerTitle: true,
leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
actions: const [
ReturnToHomepage(),
],
elevation: 0,
),
body: Column(
children: [
Container(
height: 1.r,
width: MediaQuery
.of(context)
.size
.width,
color: Color.fromRGBO(179, 179, 179, 0.3),
),
Container(
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 2.r),
child: Row(
children: [
InkWell(
onTap: () {
EasyLoading.show(status: 'loading...');
state.page = 1;
state.totalPages = 0;
state.isJob.value = true;
logic.getList();
},
child: SizedBox(
width: (MediaQuery
.of(context)
.size
.width - 1.r) / 2,
height: 40.r,
child: Obx(() {
return Center(
child: Text(
'作业',
style: TextStyle(fontSize: 14.sp,
color: state.isJob.value
? Color(0xFF7491FD)
: Color(0xFF505E6E)),
));
}),
),
),
Container(
height: 40.r,
width: 1.r,
color: Color.fromRGBO(179, 179, 179, 0.3),
),
InkWell(
onTap: () {
EasyLoading.show(status: 'loading...');
state.isJob.value = false;
state.page = 1;
state.totalPages = 0;
logic.getList();
},
child: SizedBox(
width: (MediaQuery
.of(context)
.size
.width - 1.r) / 2,
height: 40.r,
child: Center(
child: Obx(() {
return Text(
'考试',
style: TextStyle(
fontSize: 14.sp, color: !state.isJob.value
? Color(0xFF7491FD)
: Color(0xFF505E6E)),
);
})),
),
),
],
),
),
Obx(() {
return Container(
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
padding: EdgeInsets.only(
top: 10.r, left: 10.r, right: 10.r, bottom: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.r)),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'总览:',
style: TextStyle(fontSize: 12.sp,
color: Color(0xFF7491FD),
fontWeight: FontWeight.w600),
),
ProgressBar(
title: '客观题正确率:',
color: Color(0xFFB8C7FF),
percent: state.studentData.value.kgtCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
ProgressBar(
title: '主观题正确率:',
color: Color(0xFFB8C7FF),
percent: state.studentData.value.zgtCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
ProgressBar(
title: '总正确率:',
color: Color(0xFFB8C7FF),
percent: state.studentData.value.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
),
);
}),
Obx(() {
return JobConditionFilter(
controller: logic.tabController,
jobType: state.isJob.value ? 1 : 2,
customTimeStr: state.customTimeStr.value,
customTime: logic.tabController.index != 2 ||
((state.dateEnd == null || state.dateEnd == '') &&
(state.dateStart == null || state.dateStart == ''))
? null
: PickerDateRange(
state.dateStart == null || state.dateStart == ''
? null
: DateTime
.parse(state.dateStart!),
state.dateEnd == null || state.dateEnd == '' ? null : DateTime
.parse(state.dateEnd!),
),
onTimeFilter: (String? startTime, String? endTime) {
EasyLoading.show(status: 'loading...');
if (startTime == null && endTime == null) {
if (logic.tabController.index == 2) {
logic.tabController.animateTo(0);
}
state.dateStart =
Utils.getWeekStartDate().toString().substring(0, 10);
state.dateEnd =
Utils.getWeekEndDate().toString().substring(0, 10);
state.customTimeStr.value = '自定义';
} else {
state.dateStart = startTime ?? '';
state.dateEnd = endTime ?? '';
}
state.page = 1;
logic.getList();
},
refreshTime: (value) {
if (value != null && value.startDate != null) {
state.customTimeStr.value =
value.startDate?.toString().substring(0, 10) ?? '';
if (value.endDate != null) {
if (!Utils.isPad() &&
value.startDate!.year == value.endDate!.year) {
state.customTimeStr.value =
'${value.startDate.toString().substring(5, 10)}~${value
.endDate.toString().substring(5, 10)}';
} else {
state.customTimeStr.value =
'${state.customTimeStr.value}~${value.endDate
?.toString()
.substring(
0, 10)}';
}
}
}
});
}),
Padding(
padding: EdgeInsets.only(top: 14.r, right: 14.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
'注:',
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
Container(
width: 10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
// color: Color(0xFF4CC793),
border: Border.all(width: 1.r, color: Color(0xFF4CC793)),
),
),
SizedBox(
width: 2.r,
),
Text(
'正确',
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
SizedBox(
width: 15.r,
),
Container(
width: 10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
// color: Color(0xFFFF7474),
border: Border.all(width: 1.r, color: Color(0xFFFF7474)),
),
),
SizedBox(
width: 2.r,
),
Text(
'错误',
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
SizedBox(
width: 15.r,
),
Container(
width: 10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
// color: Color(0xFF666666),
border: Border.all(width: 1.r, color: Color(0xFF666666)),
// border: Border.all(width: 1.r,color: Colors.grey),
/* boxShadow: [
BoxShadow(
color: Colors.grey,
offset: Offset(1.w, 1.h), //y轴偏移量
blurRadius: 4, //
spreadRadius: 0.1, //
)
],*/
),
),
SizedBox(
width: 2.r,
),
Text(
'已作答未批阅',
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
SizedBox(
width: 15.r,
),
Container(
width: 10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
// color: Color(0xFFDDDDDD),
),
),
SizedBox(
width: 2.r,
),
Text(
'未做',
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
],
),
),
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.r),
child: Obx(() {
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
state.page = 1;
logic.getList();
},
onLoad: () async {
if (state.page < state.totalPages) {
state.page += 1;
logic.getList();
}
},
child: state.studentData.value.items.items.isNotEmpty
? ListView.builder(
itemCount: state.studentData.value.items.items.length,
itemBuilder: (context, index) {
StudentItems item = state.studentData.value.items
.items[index];
return InkWell(
onTap: () {
Get.toNamed(Routes.studentPersonalPage, arguments: {
'homeworkId': item.id,
'studentId': state.studentId
});
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 5.r,
horizontal: 14.r),
padding: EdgeInsets.symmetric(vertical: 14.r,
horizontal: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.r)),
color: item.allNotDone
? const Color(0xFFFFEDD3)
: Colors.white),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width: 32.w,
height: 18.h,
alignment: Alignment.center,
padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration(
color: state.isJob.value ? const Color
.fromRGBO(
104, 136, 253, 1) : const Color(
0xFFFFA116),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r),
bottomLeft: Radius.circular(4.r),
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
child: Text(
state.isJob.value ? '作业' : '考试',
style: TextStyle(
fontSize: 10.sp,
color: Colors.white),
),
),
Expanded(
child: Text(
item.name,
style: TextStyle(fontSize: 12.sp,
color: Color(0xFF464646)),
)),
// SizedBox(width: 5.r,),
// Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),),
Container(
width: 40.r,
height: 20.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
border: Border.all(
width: 1.r,
color: Color(0xFF4CC793)),
),
child: Center(
child: Text(
EnumUtils.formatSubject(
item.subject),
style: TextStyle(fontSize: 10.sp,
color: Color(0xFF4CC793)),
)),
),
],
),
SizedBox(
height: 10.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'客:',
style: TextStyle(fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
SizedBox(
width: 5.r,
),
item.kgtList.isNotEmpty
? Expanded(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 8,
runSpacing: 5,
children: List.generate(
item.kgtList.length, (i) {
KgtList subjective = item
.kgtList[i];
return Container(
width: 20.r,
height: 20.r,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.r,
color: subjective.state == 0
? Color(0xFFDDDDDD)
: subjective.state == 3
? Color(0xFF4CC793)
: subjective.state == 2
? Color(0xFFFF7474)
: Color(0xFF666666)),
borderRadius: BorderRadius.all(
Radius.circular(10.r))),
child: Center(
child: Text(
subjective.questionNo
.toString(),
style: TextStyle(
fontSize: 10.r,
color: subjective.state ==
0
? Color(0xFFDDDDDD)
: subjective.state ==
3
? Color(0xFF4CC793)
: subjective.state ==
2
? Color(0xFFFF7474)
: Color(0xFF666666)),
)),
);
}),
),
)
: Text(
'',
style: TextStyle(fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
],
),
SizedBox(
height: 10.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'主:',
style: TextStyle(fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
SizedBox(
width: 5.r,
),
item.zgtList.isNotEmpty
? Expanded(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 8,
runSpacing: 5,
children: List.generate(
item.zgtList.length, (i) {
ZgtList subjective = item
.zgtList[i];
return Container(
width: 20.r,
height: 20.r,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.r,
color: subjective.state == 0
? Color(0xFFDDDDDD)
: subjective.state == 3
? Color(0xFF4CC793)
: subjective.state == 2
? Color(0xFFFF7474)
: Color(0xFF666666)),
borderRadius: BorderRadius.all(
Radius.circular(10.r))),
child: Center(
child: Text(
subjective.questionNo
.toString(),
style: TextStyle(
fontSize: 10.r,
color: subjective.state ==
0
? Color(0xFFDDDDDD)
: subjective.state ==
3
? Color(0xFF4CC793)
: subjective.state ==
2
? Color(0xFFFF7474)
: Color(0xFF666666)),
)),
);
}),
),
)
: Text(
'',
style: TextStyle(fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
],
),
ProgressBar(
title: '客观题正确率:',
color: Color(0xFF90E0BE),
percent: item.kgtCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
ProgressBar(
title: '主观题正确率:',
color: Color(0xFF90E0BE),
percent: item.zgtCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
ProgressBar(
title: '总正确率:',
color: Color(0xFF90E0BE),
percent: item.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
),
),
);
})
: const MyEmptyWidget(),
);
}),
),
),
],
),
);
}
@override
void dispose() {
Get.delete<StudentWorkDetailLogic>();
super.dispose();
}
}

View File

@ -1,163 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/class_item.dart';
import 'package:school_asignment_app/common/utils/enum_untils.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
class StudentGroupList extends StatelessWidget {
final List<ClassItem> studentGroups;
final Function goNextPage;
final Widget? rightBtn;
const StudentGroupList(this.studentGroups, this.goNextPage,
{Key? key,this.rightBtn})
: super(key: key);
@override
Widget build(BuildContext context) {
return Obx(() {
return studentGroups != null && studentGroups.isNotEmpty
? Utils.isPad()
? GridView(
shrinkWrap: true,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 10.r,
crossAxisSpacing: 10.r,
childAspectRatio: 556 / 112,
),
children: List.generate(studentGroups.length, (index) {
ClassItem item = studentGroups[index];
return InkWell(
onTap: () {
goNextPage(item.classId,'${EnumUtils.formatGrade(item.grade)}${item.className}',item.subject);
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.r)),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(right: 8.r),
child: Text(
'${EnumUtils.formatGrade(item.grade)}${item.className}',
style: TextStyle(
fontSize: 10.sp, color: Color(0xFF6888FD)),
),
),
const Spacer(),
/*Expanded(
child: Text(
classNames,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF999999),
overflow: TextOverflow.ellipsis,
),
textAlign: TextAlign.end,
),
),*/
rightBtn != null
? rightBtn!
: Container(
margin: EdgeInsets.only(left: 5.r),
height: 20.r,
width: 55.r,
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF6888FD),
),
child: Center(
child: Text(
'详情',
style: TextStyle(
fontSize: 10.sp, color: Colors.white),
),
),
)
],
),
),
);
}),
)
: ListView.builder(
shrinkWrap: true,
itemBuilder: (context, index) {
ClassItem item = studentGroups[index];
return InkWell(
onTap: () {
goNextPage(item.classId,'${EnumUtils.formatGrade(item.grade)}${item.className}',item.subject);
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15.r, horizontal: 10.r),
margin: EdgeInsets.only(bottom: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.r)),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(right: 8.r),
child: Text(
'${EnumUtils.formatGrade(item.grade)}${item.className}',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF6888FD)),
),
),
const Spacer(),
/* Expanded(
child: Text(
classNames,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF999999),
overflow: TextOverflow.ellipsis,
),
textAlign: TextAlign.end,
),
),*/
rightBtn != null
? rightBtn!
: Container(
margin: EdgeInsets.only(left: 5.r),
height: 24.r,
width: 55.r,
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF6888FD),
),
child: Center(
child: Text(
'详情',
style: TextStyle(
fontSize: 10.sp, color: Colors.white),
),
),
)
],
),
),
);
},
itemCount: studentGroups.length,
)
: Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).size.height / 2 - 200.r),
child: const MyEmptyWidget(),
);
});
}
}

View File

@ -1,55 +0,0 @@
import 'package:get/get.dart';
import 'package:school_asignment_app/page/global_widget/other_page.dart';
import 'package:school_asignment_app/page/global_widget/start_page.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_binding.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_view.dart';
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_binding.dart';
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_view.dart';
import 'package:school_asignment_app/page/home_page/children/job_report/job_report_binding.dart';
import 'package:school_asignment_app/page/home_page/children/job_report/job_report_view.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_binding.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_view.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_binding.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_view.dart';
import 'package:school_asignment_app/page/home_page/children/my_info.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_binding.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_view.dart';
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_binding.dart';
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_view.dart';
import 'package:school_asignment_app/page/home_page/children/student_history_work/student_history_work_binding.dart';
import 'package:school_asignment_app/page/home_page/children/student_history_work/student_history_work_view.dart';
import 'package:school_asignment_app/page/home_page/children/student_personal/student_personal_binding.dart';
import 'package:school_asignment_app/page/home_page/children/student_personal/student_personal_view.dart';
import 'package:school_asignment_app/page/home_page/children/student_work_detail/student_work_detail_binding.dart';
import 'package:school_asignment_app/page/home_page/children/student_work_detail/student_work_detail_view.dart';
import 'package:school_asignment_app/page/home_page/home_binding.dart';
import 'package:school_asignment_app/page/home_page/home_view.dart';
import 'package:school_asignment_app/page/login_page/children/agreement_page.dart';
import 'package:school_asignment_app/page/login_page/login_binding.dart';
import 'package:school_asignment_app/page/login_page/login_view.dart';
import 'package:school_asignment_app/page/work_page/work_binding.dart';
import 'package:school_asignment_app/page/work_page/work_view.dart';
part 'app_routes.dart';
abstract class AppPages {
static final pages = [
GetPage(name: Routes.login, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition),
GetPage(name: Routes.agreementPage, page: () => const AgreementPage(), binding: LoginBinding(), transition: Transition.noTransition),
GetPage(name: Routes.home, page: () => const HomePage(), binding: HomeBinding(), transition: Transition.noTransition),
GetPage(name: Routes.startPage, page: () => const StartPage(), binding: StartPageIndexBinding(), transition: Transition.noTransition),
GetPage(name: Routes.myInfo, page: () => const MyInfo(), transition: Transition.noTransition),
GetPage(name: Routes.work, page: () => const WorkPage(), binding: WorkBinding(), transition: Transition.noTransition),
GetPage(name: Routes.otherPage, page: () => const OhterPage(), transition: Transition.noTransition),
GetPage(name: Routes.readOverPage, page: () => const ReadOverPage(), binding: ReadOverBinding(), transition: Transition.noTransition),
GetPage(name: Routes.studentHistoryWorkPage, page: () => const StudentHistoryWorkPage(), binding: StudentHistoryWorkBinding(), transition: Transition.noTransition),
GetPage(name: Routes.classStudentPage, page: () => const ClassStudentPage(), binding: ClassStudentBinding(), transition: Transition.noTransition),
GetPage(name: Routes.annotateClassPage, page: () => const AnnotateClassPage(), binding: AnnotateClassBinding(), transition: Transition.noTransition),
GetPage(name: Routes.quickDataCheckPage, page: () => const QuickDataCheckPage(), binding: QuickDataCheckBinding(), transition: Transition.noTransition),
GetPage(name: Routes.jobReportPage, page: () => const JobReportPage(), binding: JobReportBinding(), transition: Transition.noTransition),
GetPage(name: Routes.studentPersonalPage, page: () => const StudentPersonalPage(), binding: StudentPersonalBinding(), transition: Transition.noTransition),
GetPage(name: Routes.studentWorkDetailPage, page: () => const StudentWorkDetailPage(), binding: StudentWorkDetailBinding(), transition: Transition.noTransition),
GetPage(name: Routes.knowledgePointsGraspPage, page: () => const KnowledgePointsGraspPage(), binding: KnowledgePointsGraspBinding(), transition: Transition.noTransition),
GetPage(name: Routes.knowledgePointsGraspDetailPage, page: () => const KnowledgePointsGraspDetailPage(), binding: KnowledgePointsGraspDetailBinding(), transition: Transition.noTransition),
];
}

View File

@ -16,9 +16,6 @@ migrate_working_dir/
*.iws
.idea/
# 编译文件不上传
*.g.dart
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
@ -30,7 +27,6 @@ migrate_working_dir/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
@ -45,18 +41,3 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
/.fvm/flutter_sdk
lib/common/api/retrofit_client.g.dart
lib/common/job/user_info.g.dart
lib/common/job/user_info.g.dart
lib/common/job/user_login.g.dart
lib/common/job/common/upload_img_secret_key.g.dart
lib/common/job/common/base_structure_result.g.dart
lib/common/job/common/base_page.g.dart
lib/common/job/common/base_page_report.g.dart
lib/common/job/common/base_page_data.g.dart
lib/common/job/common/base_page_data_report.g.dart
/.fvm/flutter_sdk
.fvm/fvm_config.json
pubspec.lock
pubspec.lock

View File

@ -0,0 +1,45 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: android
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: ios
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: linux
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: macos
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: web
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: windows
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@ -1,4 +1,4 @@
# school_asignment_app
# making_school_asignment_app
A new Flutter project.

View File

@ -13,8 +13,7 @@ linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code

View File

@ -0,0 +1,87 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "1"
}
def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
namespace = "com.yuanxuan.making_school_asignment_app"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
debug {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.yuanxuan.making_school_asignment_app"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName
}
buildTypes {
// release {
// // TODO: Add your own signing config for the release build.
// // Signing with the debug keys for now, so `flutter run --release` works.
// signingConfig = signingConfigs.debug
// }
release {
signingConfig signingConfigs.release
minifyEnabled false //
shrinkResources false //
}
debug {
signingConfig signingConfigs.debug
minifyEnabled false //
shrinkResources false //
}
}
}
flutter {
source = "../.."
}

View File

@ -1,12 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="school_asignment_app"
android:label="making_school_asignment_app"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
@ -30,4 +31,15 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>

View File

@ -0,0 +1,5 @@
package com.yuanxuan.making_school_asignment_app
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity()

View File

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 544 B

View File

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 442 B

View File

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 721 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,18 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip

View File

@ -0,0 +1,25 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}
include ":app"

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 750 B

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 862 B

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

Before

Width:  |  Height:  |  Size: 886 B

After

Width:  |  Height:  |  Size: 886 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 639 B

After

Width:  |  Height:  |  Size: 639 B

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 669 B

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 857 B

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 843 B

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 391 KiB

Some files were not shown because too many files have changed in this diff Show More