Merge branch 'mcy_new' into zoom_pic
# Conflicts: # making_school_asignment_app/lib/page/home_page/children/read_over/widget/annotate_list.dart # making_school_asignment_app/pubspec.yaml
This commit is contained in:
commit
d1fd1fb1bc
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 69 B |
|
|
@ -29,7 +29,7 @@
|
||||||
type="application/octet-stream" />
|
type="application/octet-stream" />
|
||||||
</item> -->
|
</item> -->
|
||||||
<item>
|
<item>
|
||||||
<title>Version 1.0.1+2</title>
|
<title>Version 1.0.3+4</title>
|
||||||
#发行说明-读取html方式(2选1)
|
#发行说明-读取html方式(2选1)
|
||||||
<!-- <sparkle:releaseNotesLink>
|
<!-- <sparkle:releaseNotesLink>
|
||||||
https://your_domain/your_path/release_notes.html
|
https://your_domain/your_path/release_notes.html
|
||||||
|
|
@ -38,18 +38,18 @@
|
||||||
<description>
|
<description>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<ul>
|
<ul>
|
||||||
<li>1、优化批阅提示</li>
|
<li>1、修复已知BUG</li>
|
||||||
<li>2、优化启动图和展示页面</li>
|
<li>2、优化操作布局</li>
|
||||||
</ul>
|
</ul>
|
||||||
]]>
|
]]>
|
||||||
</description>
|
</description>
|
||||||
<pubDate>Sun, 16 Feb 2024 12:00:00 +0800</pubDate>
|
<pubDate>Fri, 14 Mar 2025 12:00:00 +0800</pubDate>
|
||||||
#你更新程序的地址
|
#你更新程序的地址
|
||||||
<enclosure url="https://dpc-job-oss.23544.com/infra-app/making_school_asignment_app/1.0.1/3/making_school_asignment_app-1.0.1+2-windows-setup.exe"
|
<enclosure url="https://dpc-job-oss.23544.com/infra-app/making_school_asignment_app/1.0.3/3/making_school_asignment_app-1.0.3+4-windows-setup.exe"
|
||||||
sparkle:dsaSignature="MEUCIG2O7ZNPeIs/fi2GF/UCRvooqIZMFjLPyfGsIqTnmfHkAiEAuFusRpYjkf05fqBv3nQqfyy8Y8u6ub5X+QWZU7NJ5qU="
|
sparkle:dsaSignature="MEYCIQCuU0BodcdWrF+WoJrWRpY8P1pfK+dKkvrl3ZJ5KxnDdAIhAIWqp7VBNO9IaKFj2ypQ+s7DWurBUSaf6MTvexMmuvX+"
|
||||||
sparkle:version="1.0.1+2"
|
|
||||||
sparkle:os="windows"
|
|
||||||
length="0"
|
length="0"
|
||||||
|
sparkle:version="1.0.3+4"
|
||||||
|
sparkle:os="windows"
|
||||||
type="application/octet-stream" />
|
type="application/octet-stream" />
|
||||||
</item>
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
|
|
|
||||||
|
|
@ -495,7 +495,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = 6;
|
||||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -503,7 +503,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1;
|
MARKETING_VERSION = 3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "com.yuanxuan.makingS--buneng--choolAsignmentApp";
|
PRODUCT_BUNDLE_IDENTIFIER = "com.yuanxuan.makingS--buneng--choolAsignmentApp";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|
@ -689,7 +689,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = 6;
|
||||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -697,7 +697,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1;
|
MARKETING_VERSION = 3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|
@ -719,7 +719,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = 6;
|
||||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -727,7 +727,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1;
|
MARKETING_VERSION = 3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,13 @@ class AppVersion extends Object {
|
||||||
this.appFileUrl,
|
this.appFileUrl,
|
||||||
this.description,
|
this.description,
|
||||||
) {
|
) {
|
||||||
if (appFileUrl != null) appFileUrl = RequestConfig.imgUrl + appFileUrl!;
|
if (appFileUrl != null && ftuType != 2) {
|
||||||
|
appFileUrl = RequestConfig.imgUrl + appFileUrl!;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
factory AppVersion.fromJson(Map<String, dynamic> srcJson) => _$AppVersionFromJson(srcJson);
|
factory AppVersion.fromJson(Map<String, dynamic> srcJson) =>
|
||||||
|
_$AppVersionFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AppVersionToJson(this);
|
Map<String, dynamic> toJson() => _$AppVersionToJson(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ class TheError extends Interceptor {
|
||||||
message = '请求发送超时';
|
message = '请求发送超时';
|
||||||
break;
|
break;
|
||||||
case DioExceptionType.receiveTimeout:
|
case DioExceptionType.receiveTimeout:
|
||||||
message = '接收超时时发生';
|
message = '接收超时';
|
||||||
break;
|
break;
|
||||||
case DioExceptionType.badResponse:
|
case DioExceptionType.badResponse:
|
||||||
if (error.response == null) {
|
if (error.response == null) {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ import 'upgradeLogic.dart';
|
||||||
|
|
||||||
class DownloadApk {
|
class DownloadApk {
|
||||||
/// 下载安卓更新包
|
/// 下载安卓更新包
|
||||||
static Future<File?> _downloadAndroid(context, UpdateAppEvent event, UpgradeLogic logic) async {
|
static Future<File?> _downloadAndroid(
|
||||||
|
context, UpdateAppEvent event, UpgradeLogic logic) async {
|
||||||
/// 创建存储文件
|
/// 创建存储文件
|
||||||
Directory? storageDir = await getExternalStorageDirectory();
|
Directory? storageDir = await getExternalStorageDirectory();
|
||||||
final storagePath = storageDir?.path ?? '/';
|
final storagePath = storageDir?.path ?? '/';
|
||||||
|
|
@ -47,10 +48,12 @@ class DownloadApk {
|
||||||
print(e);
|
print(e);
|
||||||
// toPrint(val: e);
|
// toPrint(val: e);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 安装apk
|
// 安装apk
|
||||||
static Future<bool> installApk(context, UpdateAppEvent event, UpgradeLogic logic) async {
|
static Future<bool> installApk(
|
||||||
|
context, UpdateAppEvent event, UpgradeLogic logic) async {
|
||||||
try {
|
try {
|
||||||
logic.loadingApk.value = true;
|
logic.loadingApk.value = true;
|
||||||
File? _apkFile = await _downloadAndroid(context, event, logic);
|
File? _apkFile = await _downloadAndroid(context, event, logic);
|
||||||
|
|
@ -73,7 +76,9 @@ class DownloadApk {
|
||||||
actions: [
|
actions: [
|
||||||
MaterialButton(
|
MaterialButton(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
child: const Text("我已知晓", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
|
child: const Text("我已知晓",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontWeight: FontWeight.bold)),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -87,12 +92,15 @@ class DownloadApk {
|
||||||
// 其他方式下载
|
// 其他方式下载
|
||||||
// await SystemNavigator.pop(); // 退出APP
|
// await SystemNavigator.pop(); // 退出APP
|
||||||
var options = ['应用市场更新APP', '浏览器下载并安装APP'];
|
var options = ['应用市场更新APP', '浏览器下载并安装APP'];
|
||||||
var uri = Uri.parse('market://details?id=com.example.marking_app'); // 应用市场URI
|
var uri =
|
||||||
if (!await canLaunchUrl(uri)) options.removeAt(0); // 如果不能打开应用市场 就屏蔽掉 这个安装方式
|
Uri.parse('market://details?id=${event.packageName}'); // 应用市场URI
|
||||||
String? option = await UpgradePermission.showCustomModalBottomSheet(context, options);
|
if (!await canLaunchUrl(uri))
|
||||||
|
options.removeAt(0); // 如果不能打开应用市场 就屏蔽掉 这个安装方式
|
||||||
|
String? option = await UpgradePermission.showCustomModalBottomSheet(
|
||||||
|
context, options);
|
||||||
if (option == '应用市场更新APP') await launchUrl(uri);
|
if (option == '应用市场更新APP') await launchUrl(uri);
|
||||||
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(event.link));
|
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(event.link));
|
||||||
} catch (e) {}
|
} catch (_) {}
|
||||||
});
|
});
|
||||||
|
|
||||||
print('安装执行完成了..............0.0');
|
print('安装执行完成了..............0.0');
|
||||||
|
|
@ -107,7 +115,8 @@ class DownloadApk {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 展示下载进度
|
/// 展示下载进度
|
||||||
static void showDownloadProgress(context, num received, num total, UpgradeLogic logic) {
|
static void showDownloadProgress(
|
||||||
|
context, num received, num total, UpgradeLogic logic) {
|
||||||
if (total != -1) {
|
if (total != -1) {
|
||||||
double progress = double.parse((received / total).toStringAsFixed(2));
|
double progress = double.parse((received / total).toStringAsFixed(2));
|
||||||
// debugPrint('下载进度$progress');
|
// debugPrint('下载进度$progress');
|
||||||
|
|
@ -122,7 +131,8 @@ class RestartWidget extends StatefulWidget {
|
||||||
const RestartWidget({super.key, required this.child});
|
const RestartWidget({super.key, required this.child});
|
||||||
|
|
||||||
static restartApp(BuildContext context) {
|
static restartApp(BuildContext context) {
|
||||||
final _RestartWidgetState? state = context.findAncestorStateOfType<_RestartWidgetState>();
|
final _RestartWidgetState? state =
|
||||||
|
context.findAncestorStateOfType<_RestartWidgetState>();
|
||||||
state?.restartApp();
|
state?.restartApp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
* @LastEditors: Please set LastEditors
|
* @LastEditors: Please set LastEditors
|
||||||
* @LastEditTime: 2021-01-12 15:08:43
|
* @LastEditTime: 2021-01-12 15:08:43
|
||||||
*/
|
*/
|
||||||
import 'package:auto_updater/auto_updater.dart';
|
|
||||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/app_upgrade/DownloadApk.dart';
|
import 'package:making_school_asignment_app/common/utils/app_upgrade/DownloadApk.dart';
|
||||||
|
|
@ -34,7 +33,8 @@ class UpdateDialog extends Dialog {
|
||||||
final UpdateAppEvent updateAppEvent;
|
final UpdateAppEvent updateAppEvent;
|
||||||
final String deviceInfo;
|
final String deviceInfo;
|
||||||
|
|
||||||
const UpdateDialog({super.key, required this.updateAppEvent, required this.deviceInfo});
|
const UpdateDialog(
|
||||||
|
{super.key, required this.updateAppEvent, required this.deviceInfo});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -72,11 +72,17 @@ class UpdateDialog extends Dialog {
|
||||||
HtmlWidget(
|
HtmlWidget(
|
||||||
updateAppEvent.description,
|
updateAppEvent.description,
|
||||||
customStylesBuilder: (element) {
|
customStylesBuilder: (element) {
|
||||||
return {'color': '#666666', 'font-weight': 'normal', 'text-decoration': 'none'};
|
return {
|
||||||
|
'color': '#666666',
|
||||||
|
'font-weight': 'normal',
|
||||||
|
'text-decoration': 'none'
|
||||||
|
};
|
||||||
},
|
},
|
||||||
onLoadingBuilder: (context, element, loadingProgress) => const CircularProgressIndicator(),
|
onLoadingBuilder: (context, element, loadingProgress) =>
|
||||||
|
const CircularProgressIndicator(),
|
||||||
renderMode: RenderMode.column,
|
renderMode: RenderMode.column,
|
||||||
textStyle: TextStyle(fontSize: 14.sp, color: Colors.black87),
|
textStyle:
|
||||||
|
TextStyle(fontSize: 14.sp, color: Colors.black87),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -97,7 +103,9 @@ class UpdateDialog extends Dialog {
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () async => false,
|
onWillPop: () async => false,
|
||||||
child: UpdateDialog(updateAppEvent: updateAppEvent, deviceInfo: updateAppEvent.deviceInfo),
|
child: UpdateDialog(
|
||||||
|
updateAppEvent: updateAppEvent,
|
||||||
|
deviceInfo: updateAppEvent.deviceInfo),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
@ -136,7 +144,10 @@ class DownloadProgress extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
height: 6.h,
|
height: 6.h,
|
||||||
),
|
),
|
||||||
quickText('更新中...', size: 12.sp, fontWeight: FontWeight.w500, color: const Color.fromRGBO(90, 90, 90, 1))
|
quickText('更新中...',
|
||||||
|
size: 12.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: const Color.fromRGBO(90, 90, 90, 1))
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
@ -152,7 +163,7 @@ class DownloadButton extends StatelessWidget {
|
||||||
|
|
||||||
// 打开浏览器或者对应的对应市场进行下载
|
// 打开浏览器或者对应的对应市场进行下载
|
||||||
Future<bool> toLaunch(UpdateAppEvent data) async {
|
Future<bool> toLaunch(UpdateAppEvent data) async {
|
||||||
var uri = Uri.parse('market://details?id=com.yuanxuan.making_school_asignment_app');
|
var uri = Uri.parse('market://details?id=${updateAppEvent.packageName}');
|
||||||
if (await canLaunchUrl(uri)) {
|
if (await canLaunchUrl(uri)) {
|
||||||
// 跳进对应的应用市场进行更新操作
|
// 跳进对应的应用市场进行更新操作
|
||||||
return await launchUrl(uri);
|
return await launchUrl(uri);
|
||||||
|
|
@ -181,15 +192,20 @@ class DownloadButton extends StatelessWidget {
|
||||||
width: 245.w,
|
width: 245.w,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(42.h)),
|
borderRadius: BorderRadius.all(Radius.circular(42.h)),
|
||||||
gradient: LinearGradient(colors: [primaryColor, primaryColor.withOpacity(0.7)]),
|
gradient: LinearGradient(
|
||||||
|
colors: [primaryColor, primaryColor.withOpacity(0.7)]),
|
||||||
),
|
),
|
||||||
child: MaterialButton(
|
child: MaterialButton(
|
||||||
onPressed: () => easyThrottle('DownloadButton_App_Upgrade', duration: const Duration(milliseconds: 1000), () async {
|
onPressed: () => easyThrottle('DownloadButton_App_Upgrade',
|
||||||
if (deviceInfo == "android" && updateAppEvent.equipment == Equipment.android) {
|
duration: const Duration(milliseconds: 1000), () async {
|
||||||
|
if (deviceInfo == "android" &&
|
||||||
|
updateAppEvent.equipment == Equipment.android) {
|
||||||
// 权限检查 判断是否有读写内存的权限
|
// 权限检查 判断是否有读写内存的权限
|
||||||
bool flag = await UpgradePermission(updateAppEvent.deviceInfo).checkPermission(context, updateAppEvent);
|
bool flag = await UpgradePermission(updateAppEvent.deviceInfo)
|
||||||
|
.checkPermission(context, updateAppEvent);
|
||||||
if (flag) {
|
if (flag) {
|
||||||
flag = await DownloadApk.installApk(context, updateAppEvent, logic);
|
flag = await DownloadApk.installApk(
|
||||||
|
context, updateAppEvent, logic);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
print('执行到了重置更新按钮的地方....');
|
print('执行到了重置更新按钮的地方....');
|
||||||
logic.downloadRatio.value = 0.0; // 更新失败重置 更新按钮
|
logic.downloadRatio.value = 0.0; // 更新失败重置 更新按钮
|
||||||
|
|
@ -201,8 +217,10 @@ class DownloadButton extends StatelessWidget {
|
||||||
}
|
}
|
||||||
// await FlutterClipboard.copy(updateAppEvent.link);
|
// await FlutterClipboard.copy(updateAppEvent.link);
|
||||||
// setTimeOut(1000, () => ToastUtils.showInfo('下载链接已经复制到设备,可前往浏览器下载安装'));
|
// setTimeOut(1000, () => ToastUtils.showInfo('下载链接已经复制到设备,可前往浏览器下载安装'));
|
||||||
} else if (deviceInfo == "ios" && updateAppEvent.equipment == Equipment.ios) {
|
} else if (deviceInfo == "ios" &&
|
||||||
|
updateAppEvent.equipment == Equipment.ios) {
|
||||||
try {
|
try {
|
||||||
|
print(updateAppEvent.link);
|
||||||
await launchUrlString(updateAppEvent.link);
|
await launchUrlString(updateAppEvent.link);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('进来更新报错$e');
|
print('进来更新报错$e');
|
||||||
|
|
@ -214,7 +232,8 @@ class DownloadButton extends StatelessWidget {
|
||||||
// await autoUpdater.setScheduledCheckInterval(0);
|
// await autoUpdater.setScheduledCheckInterval(0);
|
||||||
// }
|
// }
|
||||||
}),
|
}),
|
||||||
child: quickText(!logic.loadingApk.value ? '立即体验' : '正在下载...', size: 16.sp, color: Colors.white, fontWeight: FontWeight.w500),
|
child: quickText(!logic.loadingApk.value ? '立即体验' : '正在下载...',
|
||||||
|
size: 16.sp, color: Colors.white, fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,15 @@ class UpgradePermission {
|
||||||
// 其他方式下载
|
// 其他方式下载
|
||||||
// await SystemNavigator.pop(); // 退出APP
|
// await SystemNavigator.pop(); // 退出APP
|
||||||
var options = ['应用市场更新APP', '浏览器下载并安装APP'];
|
var options = ['应用市场更新APP', '浏览器下载并安装APP'];
|
||||||
var uri = Uri.parse('market://details?id=com.example.marking_app'); // 应用市场URI
|
var uri = Uri.parse('market://details?id=${updateAppEvent.packageName}'); // 应用市场URI
|
||||||
// if (!await canLaunchUrl(uri)) options.removeAt(0); // 如果不能打开应用市场 就屏蔽掉 这个安装方式
|
// if (!await canLaunchUrl(uri)) options.removeAt(0); // 如果不能打开应用市场 就屏蔽掉 这个安装方式
|
||||||
String? option = await showCustomModalBottomSheet(context, options);
|
String? option = await showCustomModalBottomSheet(context, options);
|
||||||
if (option == '应用市场更新APP') {
|
if (option == '应用市场更新APP') {
|
||||||
if (await canLaunchUrl(uri))
|
if (await canLaunchUrl(uri)) {
|
||||||
await launchUrl(uri);
|
await launchUrl(uri);
|
||||||
else
|
} else {
|
||||||
await AppInstaller.goStore('com.example.marking_app', 'iOSAppId');
|
await AppInstaller.goStore(updateAppEvent.packageName, 'iOSAppId');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(updateAppEvent.link));
|
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(updateAppEvent.link));
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppVersion? result = await getClient().getLastAppVersion('making_school_asignment_app', deviceType);
|
AppVersion? result = await getClient()
|
||||||
|
.getLastAppVersion('making_school_asignment_app', deviceType);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
//获取当前版本
|
//获取当前版本
|
||||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
|
|
@ -60,8 +61,11 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
|
||||||
'systemType': deviceType,
|
'systemType': deviceType,
|
||||||
'description': result.description ?? 'APP新版本更新'
|
'description': result.description ?? 'APP新版本更新'
|
||||||
};
|
};
|
||||||
UpdateAppEvent updateAppEvent = UpdateAppEvent.fromJson(json, localVersion, deviceInfo, appName, packageName, typeName: 'systemType');
|
UpdateAppEvent updateAppEvent = UpdateAppEvent.fromJson(
|
||||||
|
json, localVersion, deviceInfo, appName, packageName,
|
||||||
|
typeName: 'systemType');
|
||||||
if (updateAppEvent.upgrade) {
|
if (updateAppEvent.upgrade) {
|
||||||
|
if (Platform.isAndroid) {
|
||||||
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||||
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
||||||
Permission storagePermission;
|
Permission storagePermission;
|
||||||
|
|
@ -70,13 +74,18 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
|
||||||
} else {
|
} else {
|
||||||
storagePermission = Permission.storage;
|
storagePermission = Permission.storage;
|
||||||
}
|
}
|
||||||
PermissionDescribeUtil.instance.toLaunchPermissionRequest(
|
await PermissionDescribeUtil.instance.toLaunchPermissionRequest(
|
||||||
context,
|
Get.context ?? context,
|
||||||
title: '储存权限请求',
|
title: '储存权限请求',
|
||||||
describe: "为了提供更好的服务,需要获取到存储权限用于保存APP升级文件APK,进行升级",
|
describe: "为了提供更好的服务,需要获取到存储权限用于保存APP升级文件APK,进行升级",
|
||||||
permissions: [storagePermission],
|
permissions: [storagePermission],
|
||||||
);
|
);
|
||||||
await UpdateDialog.showUpdateDialog(context, updateAppEvent);
|
}
|
||||||
|
|
||||||
|
await UpdateDialog.showUpdateDialog(
|
||||||
|
Get.context ?? context,
|
||||||
|
updateAppEvent,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,18 @@ class PermissionDescribePage extends StatefulWidget {
|
||||||
final String describe;
|
final String describe;
|
||||||
final List<Permission> permissions;
|
final List<Permission> permissions;
|
||||||
|
|
||||||
const PermissionDescribePage({required this.title, required this.describe, required this.permissions, super.key});
|
const PermissionDescribePage(
|
||||||
|
{required this.title,
|
||||||
|
required this.describe,
|
||||||
|
required this.permissions,
|
||||||
|
super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<PermissionDescribePage> createState() => _PermissionDescribePageState();
|
State<PermissionDescribePage> createState() => _PermissionDescribePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _PermissionDescribePageState extends State<PermissionDescribePage> with WidgetsBindingObserver {
|
class _PermissionDescribePageState extends State<PermissionDescribePage>
|
||||||
|
with WidgetsBindingObserver {
|
||||||
Timer? _timerPermission;
|
Timer? _timerPermission;
|
||||||
bool theOpenAppSettings = false;
|
bool theOpenAppSettings = false;
|
||||||
int theExecutionFrequency = 0;
|
int theExecutionFrequency = 0;
|
||||||
|
|
@ -132,7 +137,9 @@ class _PermissionDescribePageState extends State<PermissionDescribePage> with Wi
|
||||||
|
|
||||||
/// 权限发起请求
|
/// 权限发起请求
|
||||||
/// @param List<Permission> permissions 权限集合
|
/// @param List<Permission> permissions 权限集合
|
||||||
Future<List<Permission>> getStoragePermission(BuildContext context, List<Permission> permissions, [int executionFrequency = 0]) async {
|
Future<List<Permission>> getStoragePermission(
|
||||||
|
BuildContext context, List<Permission> permissions,
|
||||||
|
[int executionFrequency = 0]) async {
|
||||||
Map<Permission, PermissionStatus> statusRes = await permissions.request();
|
Map<Permission, PermissionStatus> statusRes = await permissions.request();
|
||||||
|
|
||||||
List<Permission> permanentRefusal = []; // 永久拒绝
|
List<Permission> permanentRefusal = []; // 永久拒绝
|
||||||
|
|
@ -173,7 +180,8 @@ class _PermissionDescribePageState extends State<PermissionDescribePage> with Wi
|
||||||
executionFrequency++;
|
executionFrequency++;
|
||||||
}
|
}
|
||||||
if (executionFrequency <= 1) {
|
if (executionFrequency <= 1) {
|
||||||
var res = await getStoragePermission(context, [key], executionFrequency);
|
var res =
|
||||||
|
await getStoragePermission(context, [key], executionFrequency);
|
||||||
permanentRefusal.addAll(res);
|
permanentRefusal.addAll(res);
|
||||||
} else {
|
} else {
|
||||||
permanentRefusal.add(key);
|
permanentRefusal.add(key);
|
||||||
|
|
@ -231,12 +239,10 @@ class PermissionDescribeUtil {
|
||||||
|
|
||||||
PermissionDescribeUtil._internal();
|
PermissionDescribeUtil._internal();
|
||||||
|
|
||||||
static get instance {
|
static get instance => _instance ??= PermissionDescribeUtil._internal();
|
||||||
return _instance ??= PermissionDescribeUtil._internal();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 发起权限请求
|
/// 发起权限请求
|
||||||
void toLaunchPermissionRequest(
|
Future<void> toLaunchPermissionRequest(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required String title,
|
required String title,
|
||||||
required String describe,
|
required String describe,
|
||||||
|
|
|
||||||
|
|
@ -121,13 +121,36 @@ class Utils {
|
||||||
|
|
||||||
for (var stu in data.students) {
|
for (var stu in data.students) {
|
||||||
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
|
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
|
||||||
stu.kgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
// stu.kgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
||||||
|
// stu.kgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
||||||
|
stu.kgtStu!.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
stu.kgtOkCount = stu.kgtStu!.where((w) => w.state == 3).length;
|
stu.kgtOkCount = stu.kgtStu!.where((w) => w.state == 3).length;
|
||||||
stu.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
|
stu.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
|
||||||
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
|
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
|
||||||
|
|
||||||
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
|
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
|
||||||
stu.zgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
// stu.zgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
||||||
|
stu.zgtStu!.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
//正确
|
//正确
|
||||||
stu.zgtOkCount = stu.zgtStu!.where((w) => w.state == 3).length;
|
stu.zgtOkCount = stu.zgtStu!.where((w) => w.state == 3).length;
|
||||||
//错误
|
//错误
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,9 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
],
|
],
|
||||||
|
elevation: 0,
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Obx(() {
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
|
||||||
child: Obx(() {
|
|
||||||
return EasyRefresh(
|
return EasyRefresh(
|
||||||
firstRefresh: false,
|
firstRefresh: false,
|
||||||
taskIndependence: true,
|
taskIndependence: true,
|
||||||
|
|
@ -63,9 +62,9 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
mainAxisSpacing: 10.r,
|
mainAxisSpacing: 0.r,
|
||||||
crossAxisSpacing: 10.r,
|
crossAxisSpacing: 0.r,
|
||||||
childAspectRatio: 556 / 112,
|
childAspectRatio: 556 / 90,
|
||||||
),
|
),
|
||||||
children:
|
children:
|
||||||
List.generate(state.studentList.length, (index) {
|
List.generate(state.studentList.length, (index) {
|
||||||
|
|
@ -85,8 +84,10 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
BorderRadius.all(Radius.circular(0.r)),
|
||||||
color: Colors.white,
|
color: Colors.transparent,
|
||||||
|
border: Border(left: BorderSide(width:
|
||||||
|
(index + 1)%2 == 0? 1.r:0,color: const Color(0xFFA5A5A5)),bottom: BorderSide(width: 1.r,color: const Color(0xFFA5A5A5)))
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
|
|
@ -241,7 +242,9 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||||
|
child: ListView.builder(
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
StudentItem item = state.studentList[index];
|
StudentItem item = state.studentList[index];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
|
|
@ -416,11 +419,11 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: state.studentList.length,
|
itemCount: state.studentList.length,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: const MyEmptyWidget(),
|
: const MyEmptyWidget(),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import 'package:making_school_asignment_app/page/home_page/children/quick_data_c
|
||||||
import 'job_report_logic.dart';
|
import 'job_report_logic.dart';
|
||||||
|
|
||||||
class JobReportPage extends StatefulWidget {
|
class JobReportPage extends StatefulWidget {
|
||||||
const JobReportPage({Key? key}) : super(key: key);
|
const JobReportPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<JobReportPage> createState() => _JobReportPageState();
|
State<JobReportPage> createState() => _JobReportPageState();
|
||||||
|
|
@ -26,8 +26,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation){
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
|
@ -76,8 +75,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
//完成率、正确率
|
//完成率、正确率
|
||||||
TopCount(
|
TopCount(state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value, state.subject),
|
||||||
state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value,state.subject),
|
|
||||||
//客观题、主观题
|
//客观题、主观题
|
||||||
KgtZgtTable(
|
KgtZgtTable(
|
||||||
studentCount: state.dataCount.studentCount!,
|
studentCount: state.dataCount.studentCount!,
|
||||||
|
|
@ -88,7 +86,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0),
|
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0),
|
||||||
kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0),
|
kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0),
|
||||||
zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0),
|
zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0),
|
||||||
subject:state.subject),
|
subject: state.subject),
|
||||||
// 掌握知识点的情况
|
// 掌握知识点的情况
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
|
|
@ -97,7 +95,8 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
data: state.homeData,
|
data: state.homeData,
|
||||||
className: state.classData.value.className,
|
className: state.classData.value.className,
|
||||||
homeworkId: state.homeworkId.value,
|
homeworkId: state.homeworkId.value,
|
||||||
subject:state.subject,)),
|
subject: state.subject,
|
||||||
|
)),
|
||||||
// 掌握知识点的情况
|
// 掌握知识点的情况
|
||||||
/* Container(
|
/* Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
|
|
@ -120,8 +119,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ class KnowledgePoint extends StatefulWidget {
|
||||||
final String className;
|
final String className;
|
||||||
final String homeworkId;
|
final String homeworkId;
|
||||||
final int subject;
|
final int subject;
|
||||||
KnowledgePoint({Key? key, required this.knowsList, required this.data, required this.className, required this.homeworkId,required this.subject}) : super(key: key);
|
const KnowledgePoint(
|
||||||
|
{super.key, required this.knowsList, required this.data, required this.className, required this.homeworkId, required this.subject});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<KnowledgePoint> createState() => _KnowledgePointState();
|
State<KnowledgePoint> createState() => _KnowledgePointState();
|
||||||
|
|
@ -23,7 +24,7 @@ class KnowledgePoint extends StatefulWidget {
|
||||||
class _KnowledgePointState extends State<KnowledgePoint> {
|
class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
void goQuickCheckPersonalPath(studentId) {
|
void goQuickCheckPersonalPath(studentId) {
|
||||||
if (studentId != null) {
|
if (studentId != null) {
|
||||||
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': studentId, 'homeworkId': widget.homeworkId,'subject':widget.subject});
|
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': studentId, 'homeworkId': widget.homeworkId, 'subject': widget.subject});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -208,7 +209,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
child: quickText('知识点掌握情况', color: const Color.fromRGBO(92, 92, 92, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
child: quickText('知识点掌握情况', color: const Color.fromRGBO(92, 92, 92, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: widget.knowsList.isNotEmpty? ListView(
|
child: widget.knowsList.isNotEmpty
|
||||||
|
? ListView(
|
||||||
children: widget.knowsList.value.map((item) {
|
children: widget.knowsList.value.map((item) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(bottom: 15.h, left: 15.r, right: 15.r),
|
margin: EdgeInsets.only(bottom: 15.h, left: 15.r, right: 15.r),
|
||||||
|
|
@ -252,8 +254,9 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10.w),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
List<Questions> ques =
|
List<Questions> ques = widget.data.questions
|
||||||
widget.data.questions.where((w) => w.knows.indexWhere((k) => k.knowledgeId == item.knowledgeId) > -1).toList();
|
.where((w) => w.knows.indexWhere((k) => k.knowledgeId == item.knowledgeId) > -1)
|
||||||
|
.toList();
|
||||||
List<Students> array2 = [...widget.data.students];
|
List<Students> array2 = [...widget.data.students];
|
||||||
for (var stu in array2) {
|
for (var stu in array2) {
|
||||||
stu.queDtls = widget.data.dtls
|
stu.queDtls = widget.data.dtls
|
||||||
|
|
@ -265,9 +268,15 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
int ttlCount = stu.queDtls!.length;
|
int ttlCount = stu.queDtls!.length;
|
||||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
||||||
stu.queDtls!.sort((a, b) {
|
stu.queDtls!.sort((a, b) {
|
||||||
num num1 = num.parse(a.questionNo);
|
try {
|
||||||
num num2 = num.parse(b.questionNo);
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
return num1.compareTo(num2);
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,7 +299,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}).toList()): MyEmptyWidget(imgWidth: 100.r, imgHeight: 100.r, font: 8.sp),
|
}).toList())
|
||||||
|
: MyEmptyWidget(imgWidth: 100.r, imgHeight: 100.r, font: 8.sp),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
||||||
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
|
|
||||||
import 'knowledge_points_grasp_state.dart';
|
import 'knowledge_points_grasp_state.dart';
|
||||||
|
|
||||||
|
|
@ -27,9 +29,15 @@ class KnowledgePointsGraspLogic extends GetxController with RequestToolMixin, Ge
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
void getList() async {
|
||||||
List<KnowledgePointsGrasp> data = await getClient().getKnowledgeReport(state.dateStart, state.dateEnd, textController.text,state.classId,state.subject);
|
try {
|
||||||
|
ToastUtils.showLoading();
|
||||||
|
List<KnowledgePointsGrasp> data =
|
||||||
|
await getClient().getKnowledgeReport(state.dateStart, state.dateEnd, textController.text, state.classId, state.subject);
|
||||||
state.dataList.value = data;
|
state.dataList.value = data;
|
||||||
EasyLoading.dismiss();
|
} catch (_) {
|
||||||
|
} finally {
|
||||||
|
ToastUtils.dismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
||||||
|
|
@ -15,7 +17,7 @@ import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||||
import 'knowledge_points_grasp_logic.dart';
|
import 'knowledge_points_grasp_logic.dart';
|
||||||
|
|
||||||
class KnowledgePointsGraspPage extends StatefulWidget {
|
class KnowledgePointsGraspPage extends StatefulWidget {
|
||||||
const KnowledgePointsGraspPage({Key? key}) : super(key: key);
|
const KnowledgePointsGraspPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<KnowledgePointsGraspPage> createState() => _KnowledgePointsGraspPageState();
|
State<KnowledgePointsGraspPage> createState() => _KnowledgePointsGraspPageState();
|
||||||
|
|
@ -27,16 +29,15 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation){
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333))),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Get.back(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
|
|
@ -56,7 +57,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
|
border: Border.all(width: 1.r, color: const Color(0xFFDDDDDD)),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
|
@ -79,17 +80,14 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () => easyThrottle('zshi_shi_dian_cx', () {
|
||||||
state.page = 1;
|
Utils.hideKeyboard();
|
||||||
logic.getList();
|
logic.refreshController.callRefresh();
|
||||||
},
|
}),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 50.r,
|
width: 50.r,
|
||||||
height: 30.r,
|
height: 30.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(4.r), color: Theme.of(context).primaryColor),
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: Theme.of(context).primaryColor,
|
|
||||||
),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'查询',
|
'查询',
|
||||||
|
|
@ -176,7 +174,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
'dateEnd': state.dateEnd,
|
'dateEnd': state.dateEnd,
|
||||||
'knowledgeId': item.knowledgeId,
|
'knowledgeId': item.knowledgeId,
|
||||||
'knowledgeName': item.knowledgeName,
|
'knowledgeName': item.knowledgeName,
|
||||||
'subject':state.subject
|
'subject': state.subject
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -194,7 +192,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
item.knowledgeName,
|
item.knowledgeName,
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
width: 49.r,
|
width: 49.r,
|
||||||
|
|
@ -211,11 +209,16 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
'${item.count}次',
|
'${item.count}次',
|
||||||
style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor),
|
style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor),
|
||||||
),
|
),
|
||||||
Image.asset(
|
SizedBox(width: 1.w),
|
||||||
'assets/images/job_data_right_icon.png',
|
Padding(
|
||||||
width: 10.r,
|
padding: EdgeInsets.only(top: 2.h),
|
||||||
height: 10.r,
|
child: Icon(Icons.chevron_right, size: 12.r, color: Theme.of(context).primaryColor),
|
||||||
),
|
),
|
||||||
|
// Image.asset(
|
||||||
|
// 'assets/images/job_data_right_icon.png',
|
||||||
|
// width: 10.r,
|
||||||
|
// height: 10.r,
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -226,7 +229,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
),
|
),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '正确率:',
|
title: '正确率:',
|
||||||
color: Color(0xFFB2DA93),
|
color: const Color(0xFFB2DA93),
|
||||||
percent: item.correctRate / 100,
|
percent: item.correctRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import 'package:making_school_asignment_app/page/global_widget/show_student_list
|
||||||
import 'knowledge_points_grasp_detail_logic.dart';
|
import 'knowledge_points_grasp_detail_logic.dart';
|
||||||
|
|
||||||
class KnowledgePointsGraspDetailPage extends StatefulWidget {
|
class KnowledgePointsGraspDetailPage extends StatefulWidget {
|
||||||
const KnowledgePointsGraspDetailPage({Key? key}) : super(key: key);
|
const KnowledgePointsGraspDetailPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<KnowledgePointsGraspDetailPage> createState() => _KnowledgePointsGraspDetailPageState();
|
State<KnowledgePointsGraspDetailPage> createState() => _KnowledgePointsGraspDetailPageState();
|
||||||
|
|
@ -70,18 +70,17 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation){
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Obx(() {
|
title: Obx(() {
|
||||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
||||||
}),
|
}),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Get.back(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
|
|
@ -132,7 +131,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.publishTime.substring(0, 10),
|
item.publishTime.substring(0, 10),
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -140,7 +139,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
item.homeworkName,
|
item.homeworkName,
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||||
)),
|
)),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -148,16 +147,16 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
showImg(item.questionPicture, context);
|
showImg(item.questionPicture, context);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 49.r,
|
|
||||||
height: 22.r,
|
height: 22.r,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 4.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF8B8B8B)),
|
border: Border.all(width: 1.r, color: const Color(0xFF8B8B8B)),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'第${item.questionNo}题',
|
'第${item.questionNo}题',
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8B8B8B)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -184,13 +183,13 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
width: 56.r,
|
width: 56.r,
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFE9FFD9),
|
color: const Color(0xFFE9FFD9),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
quickText('正确率', color: Color(0xFF313131), size: 10.sp),
|
quickText('正确率', color: const Color(0xFF313131), size: 10.sp),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/job_data_right_icon.png',
|
'assets/images/job_data_right_icon.png',
|
||||||
width: 8.r,
|
width: 8.r,
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,9 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'客观题',
|
'客观题',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.r,
|
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 20.r),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
percent: double.parse(widget.kgtCorrectRate) / 100,
|
percent: double.parse(widget.kgtCorrectRate) / 100,
|
||||||
|
|
@ -80,19 +78,17 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
||||||
lineHeight: 10.h,
|
lineHeight: 10.h,
|
||||||
marginEdg: EdgeInsets.only(top: 5.h),
|
marginEdg: EdgeInsets.only(top: 5.h),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 10.r),
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: widget.kgReport.length > 10 ? 300.r : widget.kgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
height: widget.kgReport.length > 10 ? 300.r : widget.kgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
||||||
child: ReportTable(
|
child: ReportTable(
|
||||||
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率','标准答案', '优先批阅概况'],
|
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率', '标准答案', '优先批阅概况'],
|
||||||
bodyList: widget.kgReport,
|
bodyList: widget.kgReport,
|
||||||
fixedCols: 1,
|
fixedCols: 1,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
jobId: widget.homeworkId,
|
jobId: widget.homeworkId,
|
||||||
studentCount: widget.studentCount,
|
studentCount: widget.studentCount,
|
||||||
subject:widget.subject,
|
subject: widget.subject,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (widget.kgReport.isEmpty) MyEmptyWidget(imgWidth: 100.r, imgHeight: 100.r, font: 8.sp),
|
if (widget.kgReport.isEmpty) MyEmptyWidget(imgWidth: 100.r, imgHeight: 100.r, font: 8.sp),
|
||||||
|
|
@ -135,12 +131,12 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
||||||
marginEdg: EdgeInsets.only(top: 5.h),
|
marginEdg: EdgeInsets.only(top: 5.h),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height:10.r,
|
height: 10.r,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: widget.zgReport.length > 10 ? 300.r : widget.zgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
height: widget.zgReport.length > 10 ? 300.r : widget.zgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
||||||
child: ReportTable(
|
child: ReportTable(
|
||||||
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率', '查看原题', '优先批阅概况','作答效率'],
|
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率', '查看原题', '优先批阅概况', '作答效率'],
|
||||||
bodyList: widget.zgReport,
|
bodyList: widget.zgReport,
|
||||||
fixedCols: 1,
|
fixedCols: 1,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
contentPadding: EdgeInsets.all(20.r),
|
contentPadding: EdgeInsets.all(20.r),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: MediaQuery.of(context).size.width * 0.5,
|
width: MediaQuery.of(context).size.width * 0.5,
|
||||||
height: MediaQuery.of(context).size.height * 0.4,
|
height: MediaQuery.of(context).size.height * 0.4,
|
||||||
|
|
@ -65,43 +64,46 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'作答效率',
|
'作答效率',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 15.sp, color: const Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
||||||
fontSize: 15.sp,
|
|
||||||
color: const Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical:20.r,horizontal: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 10.r),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
mapIcon(const Color(0xFFB8A1FF)),
|
mapIcon(const Color(0xFFB8A1FF)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('优'),
|
mapTxt('优'),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
mapIcon(const Color(0xFF4CC793)),
|
mapIcon(const Color(0xFF4CC793)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('良'),
|
mapTxt('良'),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
mapIcon(const Color(0xFF90E0BE)),
|
mapIcon(const Color(0xFF90E0BE)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('中'),
|
mapTxt('中'),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
mapIcon(const Color(0xFFFF6B6B)),
|
mapIcon(const Color(0xFFFF6B6B)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('差'),
|
mapTxt('差'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child:
|
child: PieChart(
|
||||||
|
|
||||||
PieChart(
|
|
||||||
PieChartData(
|
PieChartData(
|
||||||
borderData: FlBorderData(show: true),
|
borderData: FlBorderData(show: true),
|
||||||
sectionsSpace: 0,
|
sectionsSpace: 0,
|
||||||
centerSpaceRadius: 0,
|
centerSpaceRadius: 0,
|
||||||
sections: List.generate(overallTitles.length,(index) {
|
sections: List.generate(overallTitles.length, (index) {
|
||||||
var e = overallTitles[index];
|
var e = overallTitles[index];
|
||||||
return PieChartSectionData(
|
return PieChartSectionData(
|
||||||
color: colorMap[index],
|
color: colorMap[index],
|
||||||
|
|
@ -151,20 +153,14 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void showPeopleListDialog(
|
void showPeopleListDialog({required BuildContext context, required String title, required String questionNo, required List arr, List? dcList}) {
|
||||||
{required BuildContext context,
|
|
||||||
required String title,
|
|
||||||
required String questionNo,
|
|
||||||
required List arr,
|
|
||||||
List? dcList}) {
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||||
contentPadding: EdgeInsets.all(20.r),
|
contentPadding: EdgeInsets.all(20.r),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: MediaQuery.of(context).size.width * 0.7,
|
width: MediaQuery.of(context).size.width * 0.7,
|
||||||
height: MediaQuery.of(context).size.height * 0.7,
|
height: MediaQuery.of(context).size.height * 0.7,
|
||||||
|
|
@ -174,10 +170,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 15.sp, color: const Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
||||||
fontSize: 15.sp,
|
|
||||||
color: const Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -187,18 +180,15 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
widget.isZG == true ? '主观题' : '客观题',
|
widget.isZG == true ? '主观题' : '客观题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'―',
|
'―',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'第$questionNo题',
|
'第$questionNo题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -213,27 +203,21 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'未作答人',
|
'未作答人',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'答对人数',
|
'答对人数',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'答错人',
|
'答错人',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
))),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
@ -241,8 +225,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
padding: EdgeInsets.only(left: 15.r),
|
padding: EdgeInsets.only(left: 15.r),
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -256,60 +239,41 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
var item = arr[index];
|
var item = arr[index];
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r),
|
padding: EdgeInsets.symmetric(vertical: 5.r),
|
||||||
color:
|
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||||
index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goQuickCheckPersonalPath(
|
goQuickCheckPersonalPath(item['noAnswerStudents'].studentId);
|
||||||
item['noAnswerStudents']
|
|
||||||
.studentId);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item['noAnswerStudents']
|
item['noAnswerStudents']?.studentName ?? '--',
|
||||||
?.studentName ??
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
)))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goQuickCheckPersonalPath(
|
goQuickCheckPersonalPath(item['answerOkStudents'].studentId);
|
||||||
item['answerOkStudents']
|
|
||||||
.studentId);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item['answerOkStudents']
|
item['answerOkStudents']?.studentName ?? '--',
|
||||||
?.studentName ??
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
)))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goQuickCheckPersonalPath(
|
goQuickCheckPersonalPath(item['answerNgStudents'].studentId);
|
||||||
item['answerNgStudents']
|
|
||||||
.studentId);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item['answerNgStudents']
|
item['answerNgStudents']?.studentName ?? '--',
|
||||||
?.studentName ??
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
)))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -330,16 +294,11 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
goQuickCheckPersonalPath(item.studentId);
|
goQuickCheckPersonalPath(item.studentId);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 15.r),
|
||||||
vertical: 5.r, horizontal: 15.r),
|
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||||
color: index.isOdd
|
|
||||||
? Colors.white
|
|
||||||
: Color(0xFFF0F0F0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
item.studentName! ?? '--',
|
item.studentName! ?? '--',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -357,65 +316,56 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
|
|
||||||
void goQuickCheckPersonalPath(id) {
|
void goQuickCheckPersonalPath(id) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
Get.toNamed(Routes.studentPersonalPage,
|
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': id, 'homeworkId': widget.jobId, 'subject': widget.subject});
|
||||||
arguments: {'studentId': id, 'homeworkId': widget.jobId,'subject':widget.subject});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void zdHandle(BuildContext context, String title, String questionNo,
|
void zdHandle(BuildContext context, String title, String questionNo, List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
||||||
List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
|
||||||
List list = [];
|
List list = [];
|
||||||
// Questions student = Questions('','',-1,-1,'',-1,'','',[],-1,-1,[] as double?);
|
// Questions student = Questions('','',-1,-1,'',-1,'','',[],-1,-1,[] as double?);
|
||||||
if (noAnswerStudents.length > answerNgStudents.length &&
|
if (noAnswerStudents.length > answerNgStudents.length && noAnswerStudents.length > answerOkStudents.length) {
|
||||||
noAnswerStudents.length > answerOkStudents.length) {
|
|
||||||
for (int i = 0; i < noAnswerStudents.length; i++) {
|
for (int i = 0; i < noAnswerStudents.length; i++) {
|
||||||
var obj = {
|
var obj = {
|
||||||
'noAnswerStudents': noAnswerStudents[i],
|
'noAnswerStudents': noAnswerStudents[i],
|
||||||
'answerNgStudents':
|
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
'answerOkStudents': answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||||
'answerOkStudents':
|
|
||||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
|
||||||
};
|
};
|
||||||
list.add(obj);
|
list.add(obj);
|
||||||
}
|
}
|
||||||
} else if (answerNgStudents.length > noAnswerStudents.length &&
|
} else if (answerNgStudents.length > noAnswerStudents.length && answerNgStudents.length > answerOkStudents.length) {
|
||||||
answerNgStudents.length > answerOkStudents.length) {
|
|
||||||
for (int i = 0; i < answerNgStudents.length; i++) {
|
for (int i = 0; i < answerNgStudents.length; i++) {
|
||||||
var obj = {
|
var obj = {
|
||||||
'noAnswerStudents':
|
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
|
||||||
'answerNgStudents': answerNgStudents[i],
|
'answerNgStudents': answerNgStudents[i],
|
||||||
'answerOkStudents':
|
'answerOkStudents': answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
|
||||||
};
|
};
|
||||||
list.add(obj);
|
list.add(obj);
|
||||||
}
|
}
|
||||||
} else if (answerOkStudents.length > noAnswerStudents.length &&
|
} else if (answerOkStudents.length > noAnswerStudents.length && answerOkStudents.length > answerNgStudents.length) {
|
||||||
answerOkStudents.length > answerNgStudents.length) {
|
|
||||||
for (int i = 0; i < answerOkStudents.length; i++) {
|
for (int i = 0; i < answerOkStudents.length; i++) {
|
||||||
var obj = {
|
var obj = {
|
||||||
'noAnswerStudents':
|
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||||
'answerNgStudents':
|
'answerOkStudents': answerOkStudents[i]
|
||||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
};
|
||||||
|
list.add(obj);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < answerOkStudents.length; i++) {
|
||||||
|
var obj = {
|
||||||
|
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||||
|
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||||
'answerOkStudents': answerOkStudents[i]
|
'answerOkStudents': answerOkStudents[i]
|
||||||
};
|
};
|
||||||
list.add(obj);
|
list.add(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showPeopleListDialog(
|
showPeopleListDialog(context: context, title: title, questionNo: questionNo, arr: list, dcList: []);
|
||||||
context: context,
|
|
||||||
title: title,
|
|
||||||
questionNo: questionNo,
|
|
||||||
arr: list,
|
|
||||||
dcList: []);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dcHandle(
|
void dcHandle(BuildContext context, String title, String questionNo, List arr) {
|
||||||
BuildContext context, String title, String questionNo, List arr) {
|
showPeopleListDialog(context: context, title: title, questionNo: questionNo, arr: arr);
|
||||||
showPeopleListDialog(
|
|
||||||
context: context, title: title, questionNo: questionNo, arr: arr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
DataRow _getRow(int index, [Color? color]) {
|
||||||
|
|
@ -428,28 +378,18 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.questionNo.toString(),
|
child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text('${item.answerRate.toStringAsFixed(0)}%',
|
child: Text('${item.answerRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
zdHandle(
|
zdHandle(context, '作答人数', item.questionNo.toString(), item.noAnswerStudents, item.answerNgStudents, item.answerOkStudents);
|
||||||
context,
|
|
||||||
'作答人数',
|
|
||||||
item.questionNo.toString(),
|
|
||||||
item.noAnswerStudents,
|
|
||||||
item.answerNgStudents,
|
|
||||||
item.answerOkStudents);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -457,9 +397,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text('${item.answerCount}/${widget.studentCount}',
|
Text('${item.answerCount}/${widget.studentCount}', style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/green_right_icon.png',
|
'assets/images/green_right_icon.png',
|
||||||
width: 12.r,
|
width: 12.r,
|
||||||
|
|
@ -470,19 +408,16 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text('${item.correctRate.toStringAsFixed(0)}%',
|
child: Text('${item.correctRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text('${item.okRate.toStringAsFixed(0)}%',
|
child: Text('${item.okRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
|
|
@ -494,30 +429,20 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
if (item.questionPicture == null) {
|
if (item.questionPicture == null) {
|
||||||
ToastUtils.showInfo('当前试题没有原题');
|
ToastUtils.showInfo('当前试题没有原题');
|
||||||
} else {
|
} else {
|
||||||
ImageDialog.showImgDialog(
|
ImageDialog.showImgDialog(context, item.questionPicture);
|
||||||
context, item.questionPicture);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text('原题',
|
child: Text('原题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
)
|
)
|
||||||
: Text(item.answer,
|
: Text(item.answer,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// List<String> parts = item.priorityGeneral.split('人');
|
// List<String> parts = item.priorityGeneral.split('人');
|
||||||
dcHandle(context, '优先批阅答错人', item.questionNo.toString(),
|
dcHandle(context, '优先批阅答错人', item.questionNo.toString(), item.priorityInfo);
|
||||||
item.priorityInfo);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -525,9 +450,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text('${item.priorityInfo.length}人答错',
|
Text('${item.priorityInfo.length}人答错', style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/green_right_icon.png',
|
'assets/images/green_right_icon.png',
|
||||||
width: 12.r,
|
width: 12.r,
|
||||||
|
|
@ -548,18 +471,10 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
showAnswerEfficiency(item.overallTitles);
|
showAnswerEfficiency(item.overallTitles);
|
||||||
},
|
},
|
||||||
child: Text('查看',
|
child: Text('查看',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
)
|
)
|
||||||
: Text(item.answer,
|
: Text(item.answer,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|
@ -577,16 +492,12 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
dataRowHeight: 40.r,
|
dataRowHeight: 40.r,
|
||||||
bottomMargin: 0,
|
bottomMargin: 0,
|
||||||
border: const TableBorder(
|
border: const TableBorder(
|
||||||
horizontalInside: BorderSide(
|
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
bottom: BorderSide(
|
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||||
verticalInside: BorderSide(
|
headingRowDecoration: const BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
fixedColumnsColor: const Color(0xFFE6E6E6),
|
||||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
|
||||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
|
||||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
fixedCornerColor: Colors.grey[400],
|
||||||
minWidth: widget.headList.length > 6
|
minWidth: widget.headList.length > 6
|
||||||
? 80.r * widget.headList.length
|
? 80.r * widget.headList.length
|
||||||
|
|
@ -601,38 +512,46 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
columns: List.generate(widget.headList.length, (index) {
|
||||||
var item = widget.headList[index];
|
var item = widget.headList[index];
|
||||||
return DataColumn2(
|
return DataColumn2(
|
||||||
label: index == 3 ?
|
label: index == 3
|
||||||
Row(
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(item,
|
Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
SizedBox(
|
||||||
SizedBox(width: 2.r,),
|
width: 2.r,
|
||||||
|
),
|
||||||
const Tooltip(
|
const Tooltip(
|
||||||
message: '答对人数/作答人数',
|
message: '答对人数/作答人数',
|
||||||
triggerMode: TooltipTriggerMode.tap,
|
triggerMode: TooltipTriggerMode.tap,
|
||||||
preferBelow:false,
|
preferBelow: false,
|
||||||
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
|
child: Icon(
|
||||||
|
Icons.info_outline_rounded,
|
||||||
|
color: Colors.grey,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
):
|
)
|
||||||
index == 4 ?Row(
|
: index == 4
|
||||||
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(item,
|
Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
SizedBox(
|
||||||
SizedBox(width: 2.r,),
|
width: 2.r,
|
||||||
|
),
|
||||||
const Tooltip(
|
const Tooltip(
|
||||||
message: '答对人数/总人数',
|
message: '答对人数/总人数',
|
||||||
triggerMode: TooltipTriggerMode.tap,
|
triggerMode: TooltipTriggerMode.tap,
|
||||||
preferBelow:false,
|
preferBelow: false,
|
||||||
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
|
child: Icon(
|
||||||
|
Icons.info_outline_rounded,
|
||||||
|
color: Colors.grey,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
):
|
)
|
||||||
Center(
|
: Center(
|
||||||
child: Text(item,
|
child: Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
),
|
||||||
// size: ColumnSize.S,
|
// size: ColumnSize.S,
|
||||||
fixedWidth: index == 0
|
fixedWidth: index == 0
|
||||||
|
|
@ -640,26 +559,28 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
: widget.headList.length > 6
|
: widget.headList.length > 6
|
||||||
? 80.r
|
? 80.r
|
||||||
: isPadFlag
|
: isPadFlag
|
||||||
? (MediaQuery.of(context).size.width - 8.r) /
|
? (MediaQuery.of(context).size.width - 8.r) / widget.headList.length
|
||||||
widget.headList.length
|
|
||||||
: 85.r,
|
: 85.r,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, const Color(0xFFF5F5F5))));
|
||||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget mapIcon(Color bgColor){
|
Widget mapIcon(Color bgColor) {
|
||||||
return Container(
|
return Container(
|
||||||
width: 12.r,
|
width: 12.r,
|
||||||
height: 12.r,
|
height: 12.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: bgColor,
|
color: bgColor,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Widget mapTxt(String title){
|
|
||||||
return Text(title,style: TextStyle(fontSize: 12.sp,color: Color(0xFF525252),fontWeight: FontWeight.w400),);
|
Widget mapTxt(String title) {
|
||||||
|
return Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xFF525252), fontWeight: FontWeight.w400),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -22,26 +22,38 @@ part 'annotate_list.g.dart';
|
||||||
class AnnotateList extends StatefulWidget {
|
class AnnotateList extends StatefulWidget {
|
||||||
final int tabIndex;
|
final int tabIndex;
|
||||||
final int assessType;
|
final int assessType;
|
||||||
const AnnotateList({super.key, required this.tabIndex, required this.assessType});
|
|
||||||
|
const AnnotateList(
|
||||||
|
{Key? key, required this.tabIndex, required this.assessType})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AnnotateList> createState() => _AnnotateListState();
|
State<AnnotateList> createState() => _AnnotateListState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, SingleTickerProviderStateMixin {
|
class _AnnotateListState extends State<AnnotateList>
|
||||||
|
with RequestToolMixin, SingleTickerProviderStateMixin {
|
||||||
late RxString customTimeStr = '自定义'.obs;
|
late RxString customTimeStr = '自定义'.obs;
|
||||||
int active = 1;
|
int active = 1;
|
||||||
late RxList<Items> unAnnotateList = RxList();
|
late RxList<Items> unAnnotateList = RxList();
|
||||||
late RxList<Items> annotateList = RxList();
|
late RxList<Items> annotateList = RxList();
|
||||||
late int page = 1;
|
late int page = 1;
|
||||||
|
|
||||||
late TabController tabController2;
|
|
||||||
|
|
||||||
|
late TabController tabController2;
|
||||||
/* 待阅卷 */
|
/* 待阅卷 */
|
||||||
late final EasyRefreshController refreshController1;
|
late final EasyRefreshController refreshController1;
|
||||||
late final EasyRefreshController refreshController2;
|
late final EasyRefreshController refreshController2;
|
||||||
WorkStudentParams params = WorkStudentParams(assessType: 0, pageSize: 10);
|
WorkStudentParams params = WorkStudentParams(
|
||||||
WorkStudentParams params2 = WorkStudentParams(assessType: 0, pageSize: 10);
|
assessType: 0,
|
||||||
|
pageSize: 10,
|
||||||
|
);
|
||||||
|
WorkStudentParams params2 = WorkStudentParams(
|
||||||
|
assessType: 0,
|
||||||
|
pageSize: 10,
|
||||||
|
startDate: Utils.getWeekStartDate().toString().substring(0, 10),
|
||||||
|
endDate: Utils.getWeekEndDate().toString().substring(0, 10),
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -55,6 +67,7 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
getUnAnnotateList();
|
getUnAnnotateList();
|
||||||
getAnnotateList();
|
getAnnotateList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//待批阅列表
|
//待批阅列表
|
||||||
|
|
@ -68,7 +81,6 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
print('state.unAnnotateList.length=${unAnnotateList.length}');
|
print('state.unAnnotateList.length=${unAnnotateList.length}');
|
||||||
}
|
}
|
||||||
|
|
||||||
//已批阅列表
|
//已批阅列表
|
||||||
void getAnnotateList() async {
|
void getAnnotateList() async {
|
||||||
WorkStudent data = WorkStudent([], 0);
|
WorkStudent data = WorkStudent([], 0);
|
||||||
|
|
@ -81,7 +93,6 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
print('state.annotateList.length=${annotateList.length}');
|
print('state.annotateList.length=${annotateList.length}');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 刷新方法
|
/// 刷新方法
|
||||||
Future<void> onMyRefresh(EasyRefreshController controller, int tab) async {
|
Future<void> onMyRefresh(EasyRefreshController controller, int tab) async {
|
||||||
/* params.page = RequestConfig.basePage.page;
|
/* params.page = RequestConfig.basePage.page;
|
||||||
|
|
@ -116,29 +127,42 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
if (widget.tabIndex == 1)
|
if(widget.tabIndex == 1)
|
||||||
JobConditionFilter(
|
Obx(() {
|
||||||
|
return JobConditionFilter(
|
||||||
customTimeStr: customTimeStr.value,
|
customTimeStr: customTimeStr.value,
|
||||||
controller: tabController2,
|
controller: tabController2,
|
||||||
hasAll: true,
|
hasAll: true,
|
||||||
jobType: 1,
|
jobType: 1,
|
||||||
customTime: tabController2.index != 3 || (params2.startDate == null && params2.endDate == null)
|
customTime: tabController2.index != 2 ||
|
||||||
|
(params2.startDate == null && params2.endDate == null)
|
||||||
? null
|
? null
|
||||||
: PickerDateRange(
|
: PickerDateRange(
|
||||||
params2.startDate == null ? null : DateTime.parse(params2.startDate!),
|
params2.startDate == null ? null : DateTime.parse(
|
||||||
params2.endDate == null ? null : DateTime.parse(params2.endDate!),
|
params2.startDate!),
|
||||||
|
params2.endDate == null ? null : DateTime.parse(
|
||||||
|
params2.endDate!),
|
||||||
),
|
),
|
||||||
onTimeFilter: (String? startTime, String? endTime) {
|
onTimeFilter: (String? startTime, String? endTime) {
|
||||||
if (startTime == null && endTime == null && tabController2.index == 3) {
|
if (startTime == null && endTime == null &&
|
||||||
|
tabController2.index == 2) {
|
||||||
tabController2.animateTo(0);
|
tabController2.animateTo(0);
|
||||||
}
|
params2.endDate =
|
||||||
|
Utils.getWeekEndDate().toString().substring(0, 10);
|
||||||
|
params2.startDate =
|
||||||
|
Utils.getWeekStartDate().toString().substring(0, 10);
|
||||||
|
customTimeStr.value = '自定义';
|
||||||
|
} else {
|
||||||
params2.endDate = endTime;
|
params2.endDate = endTime;
|
||||||
params2.startDate = startTime;
|
params2.startDate = startTime;
|
||||||
|
}
|
||||||
page = 1;
|
page = 1;
|
||||||
|
EasyLoading.show(status: 'loading...');
|
||||||
if (widget.tabIndex == 0) {
|
if (widget.tabIndex == 0) {
|
||||||
getUnAnnotateList();
|
getUnAnnotateList();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -148,19 +172,25 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
||||||
},
|
},
|
||||||
refreshTime: (value) {
|
refreshTime: (value) {
|
||||||
if (value != null && value.startDate != null) {
|
if (value != null && value.startDate != null) {
|
||||||
customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? '';
|
customTimeStr.value =
|
||||||
|
value.startDate?.toString().substring(0, 10) ?? '';
|
||||||
|
|
||||||
if (value.endDate != null) {
|
if (value.endDate != null) {
|
||||||
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) {
|
if (!Utils.isPad() &&
|
||||||
customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
|
value.startDate!.year == value.endDate!.year) {
|
||||||
|
customTimeStr.value =
|
||||||
|
'${value.startDate.toString().substring(5, 10)}~${value
|
||||||
|
.endDate.toString().substring(5, 10)}';
|
||||||
} else {
|
} else {
|
||||||
customTimeStr.value = '${customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
|
customTimeStr.value =
|
||||||
|
'${customTimeStr.value}~${value.endDate?.toString()
|
||||||
|
.substring(0, 10)}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}),
|
}),
|
||||||
Expanded(
|
Expanded(child: IndexedStack(
|
||||||
child: IndexedStack(
|
|
||||||
index: widget.tabIndex,
|
index: widget.tabIndex,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
$EasyRefresh(
|
$EasyRefresh(
|
||||||
|
|
@ -192,8 +222,10 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
||||||
@swidget
|
@swidget
|
||||||
Widget $easyRefresh({
|
Widget $easyRefresh({
|
||||||
required EasyRefreshController controller,
|
required EasyRefreshController controller,
|
||||||
required Future<void> Function(EasyRefreshController controller, int tab) onRefresh,
|
required Future<
|
||||||
required Future<void> Function(EasyRefreshController controller, int tab) onLoad,
|
void> Function(EasyRefreshController controller, int tab) onRefresh,
|
||||||
|
required Future<
|
||||||
|
void> Function(EasyRefreshController controller, int tab) onLoad,
|
||||||
required List<Items> data,
|
required List<Items> data,
|
||||||
required int tab,
|
required int tab,
|
||||||
required int type,
|
required int type,
|
||||||
|
|
@ -213,7 +245,8 @@ Widget $easyRefresh({
|
||||||
footer: TaurusFooter(),
|
footer: TaurusFooter(),
|
||||||
child: completed && isPadFlag
|
child: completed && isPadFlag
|
||||||
? GridView(
|
? GridView(
|
||||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
padding: EdgeInsets.only(
|
||||||
|
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
mainAxisSpacing: 10.h,
|
mainAxisSpacing: 10.h,
|
||||||
|
|
@ -223,14 +256,25 @@ Widget $easyRefresh({
|
||||||
children: List.generate(data.length, (index) {
|
children: List.generate(data.length, (index) {
|
||||||
Items item = data[index];
|
Items item = data[index];
|
||||||
String subjectName = EnumUtils.formatSubject(item.subject);
|
String subjectName = EnumUtils.formatSubject(item.subject);
|
||||||
return $reviewedItem(jobTaskItem: item, type: type, subjectName: subjectName, collectFun: collectFun, tabIndex: tab - 1);
|
return $reviewedItem(jobTaskItem: item,
|
||||||
|
type: type,
|
||||||
|
subjectName: subjectName,
|
||||||
|
collectFun: collectFun,
|
||||||
|
tabIndex: tab - 1);
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
padding: EdgeInsets.only(
|
||||||
|
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
Items item = data[index];
|
Items item = data[index];
|
||||||
return TaskListItem(completed: completed, jobTaskItem: item, type: type, collectFun: collectFun, tabIndex: tab - 1);
|
return TaskListItem(
|
||||||
|
completed: completed,
|
||||||
|
jobTaskItem: item,
|
||||||
|
type: type,
|
||||||
|
collectFun: collectFun,
|
||||||
|
tabIndex: tab - 1
|
||||||
|
);
|
||||||
},
|
},
|
||||||
itemCount: data.length,
|
itemCount: data.length,
|
||||||
),
|
),
|
||||||
|
|
@ -252,7 +296,8 @@ Widget $reviewedItem({
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.annotateClassPage, arguments: {
|
Get.toNamed(Routes.annotateClassPage,
|
||||||
|
arguments: {
|
||||||
'id': jobTaskItem.id,
|
'id': jobTaskItem.id,
|
||||||
'name': jobTaskItem.name,
|
'name': jobTaskItem.name,
|
||||||
'grade': jobTaskItem.grade,
|
'grade': jobTaskItem.grade,
|
||||||
|
|
@ -262,7 +307,7 @@ Widget $reviewedItem({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(right: 5.w),
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
@ -279,8 +324,11 @@ Widget $reviewedItem({
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
// 顶部任务名称
|
// 顶部任务名称
|
||||||
Row(
|
Padding(
|
||||||
|
padding: padEdg,
|
||||||
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 32.w,
|
width: 32.w,
|
||||||
|
|
@ -288,30 +336,36 @@ Widget $reviewedItem({
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
padding: EdgeInsets.only(left: 2.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: type == 1 ? const Color(0xFFB2DA93) : const Color(0xFFEF8714),
|
color: type == 1 ? const Color(0xFF4CC793) : const Color
|
||||||
|
.fromRGBO(255, 175, 56, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(6.r),
|
topLeft: Radius.circular(14.r),
|
||||||
topRight: Radius.circular(0.r),
|
topRight: Radius.circular(3.r),
|
||||||
bottomLeft: Radius.circular(0.r),
|
bottomLeft: Radius.circular(4.r),
|
||||||
bottomRight: Radius.circular(12.r),
|
bottomRight: Radius.circular(4.r),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(top: 0.h, right: 4.w),
|
margin: EdgeInsets.only(top: 3.h, right: 4.w),
|
||||||
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
|
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white,
|
||||||
|
size: 10.sp),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: quickText(jobTaskItem.name, size: 14.sp, color: const Color.fromRGBO(70, 70, 70, 1), maxLines: 2),
|
child: quickText(jobTaskItem.name, size: 14.sp,
|
||||||
|
color: const Color.fromRGBO(70, 70, 70, 1),
|
||||||
|
maxLines: 2),
|
||||||
),
|
),
|
||||||
if (jobTaskItem.isFixed!)
|
if (jobTaskItem.isFixed!)
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 3.r),
|
padding: EdgeInsets.only(top: 3.r),
|
||||||
child: Text(
|
child: Text(
|
||||||
'已订正',
|
'已订正',
|
||||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFFF16262)),
|
style: TextStyle(
|
||||||
|
fontSize: 10.sp, color: const Color(0xFFF16262)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: padEdg,
|
padding: padEdg,
|
||||||
|
|
@ -319,26 +373,31 @@ Widget $reviewedItem({
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
quickText(
|
quickText(
|
||||||
DateTime.parse(jobTaskItem.publishTime).toString().substring(0, 10),
|
DateTime.parse(jobTaskItem.publishTime).toString().substring(
|
||||||
|
0, 10),
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 10.sp,
|
size: 10.sp,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
quickText(' / ', color: const Color(0xFF8C68FF), size: 10.sp, fontWeight: FontWeight.w500),
|
quickText(' / ', color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
|
size: 10.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
quickText(
|
quickText(
|
||||||
'参与班级:',
|
'参与班级:',
|
||||||
color: const Color(0xFF8C68FF),
|
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
size: 9.sp,
|
size: 9.sp,
|
||||||
),
|
),
|
||||||
quickText(
|
quickText(
|
||||||
'${jobTaskItem.classCount}',
|
'${jobTaskItem.classCount}',
|
||||||
color: const Color(0xFF8C68FF),
|
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
size: 10.sp,
|
size: 10.sp,
|
||||||
),
|
),
|
||||||
quickText(' / ', color: const Color(0xFF8C68FF), size: 10.sp, fontWeight: FontWeight.w500),
|
quickText(' / ', color: const Color.fromRGBO(116, 145, 253, 1),
|
||||||
|
size: 10.sp,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
quickText(
|
quickText(
|
||||||
'科目:$subjectName',
|
'科目:$subjectName',
|
||||||
color: const Color(0xFF8C68FF),
|
color: const Color.fromRGBO(116, 145, 253, 1),
|
||||||
size: 9.sp,
|
size: 9.sp,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -355,7 +414,8 @@ Widget $reviewedItem({
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 6.h),
|
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r),
|
||||||
|
bottomRight: Radius.circular(6.r)),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
boxShadow: const [
|
boxShadow: const [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
|
@ -367,7 +427,7 @@ Widget $reviewedItem({
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
/*if (!jobTaskItem.isFixed!)
|
if (!jobTaskItem.isFixed!)
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|
@ -381,23 +441,31 @@ Widget $reviewedItem({
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(right: BorderSide(width: 1.r, color: const Color(0xFFDCDCDC))),
|
border: Border(right: BorderSide(
|
||||||
|
width: 1.r, color: const Color(0xFFDCDCDC))),
|
||||||
|
),
|
||||||
|
child: quickText(
|
||||||
|
'收集订正', color: const Color(0xFF4CC793), size: 11.sp),
|
||||||
),
|
),
|
||||||
child: quickText('收集订正', color: const Color(0xFF8C68FF), size: 11.sp),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),*/
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.jobReportPage,
|
Get.toNamed(Routes.jobReportPage,
|
||||||
arguments: {'title': jobTaskItem.name, 'homeworkId': jobTaskItem.id, 'grade': jobTaskItem.grade});
|
arguments: {
|
||||||
|
'title': jobTaskItem.name,
|
||||||
|
'homeworkId': jobTaskItem.id,
|
||||||
|
'grade': jobTaskItem.grade
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: quickText('查看报告', color: const Color.fromRGBO(118, 118, 118, 1), size: 11.sp),
|
child: quickText(
|
||||||
|
'查看报告', color: const Color.fromRGBO(118, 118, 118, 1),
|
||||||
|
size: 11.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,35 @@ class StudentPersonalLogic extends GetxController with RequestToolMixin {
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
state.studentId = Get.arguments['studentId'];
|
state.studentId = Get.arguments['studentId'];
|
||||||
state.subject = Get.arguments['subject']??-1;
|
state.subject = Get.arguments['subject'] ?? -1;
|
||||||
state.homeworkId = Get.arguments['homeworkId'];
|
state.homeworkId = Get.arguments['homeworkId'];
|
||||||
getInfo();
|
getInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getInfo() async {
|
void getInfo() async {
|
||||||
StudentPersonalInfo data = await getClient().getStudentHomework(state.homeworkId, state.studentId);
|
StudentPersonalInfo data = await getClient().getStudentHomework(state.homeworkId, state.studentId);
|
||||||
|
data.kgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
data.zgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
state.studentInfo.value = data;
|
state.studentInfo.value = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||||
import 'student_personal_logic.dart';
|
import 'student_personal_logic.dart';
|
||||||
|
|
||||||
class StudentPersonalPage extends StatefulWidget {
|
class StudentPersonalPage extends StatefulWidget {
|
||||||
const StudentPersonalPage({Key? key}) : super(key: key);
|
const StudentPersonalPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StudentPersonalPage> createState() => _StudentPersonalPageState();
|
State<StudentPersonalPage> createState() => _StudentPersonalPageState();
|
||||||
|
|
@ -54,8 +54,11 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// RouterManager.router.navigateTo(context,
|
// RouterManager.router.navigateTo(context,
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
||||||
Get.toNamed(Routes.studentWorkDetailPage,
|
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||||
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName,'subject':state.subject});
|
'studentId': state.studentInfo.value.studentId,
|
||||||
|
'studentName': state.studentInfo.value.studentName,
|
||||||
|
'subject': state.subject
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,44 @@ class StudentWorkDetailLogic extends GetxController with RequestToolMixin, GetSi
|
||||||
studentId: state.studentId,
|
studentId: state.studentId,
|
||||||
dateStart: state.dateStart,
|
dateStart: state.dateStart,
|
||||||
dateEnd: state.dateEnd,
|
dateEnd: state.dateEnd,
|
||||||
subject:state.subject,
|
subject: state.subject,
|
||||||
pageNumber: state.page,
|
pageNumber: state.page,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
);
|
);
|
||||||
StudentHistory data = await getClient().getStudentHistory(params);
|
StudentHistory data = await getClient().getStudentHistory(params);
|
||||||
|
data.items.items.forEach((e) {
|
||||||
|
e.kgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
e.zgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
state.studentData.value = data;
|
state.studentData.value = data;
|
||||||
for (var element in state.studentData.value.items.items) {
|
/* state.kgtLine.value = [{'id':0,'rate':0}];
|
||||||
|
state.zgtLine.value = [{'id':0,'rate':0}];
|
||||||
|
state.allLine.value = [{'id':0,'rate':0}];*/
|
||||||
|
state.kgtLine.value = [];
|
||||||
|
state.zgtLine.value = [];
|
||||||
|
state.allLine.value = [];
|
||||||
|
for (var i = 0; i < state.studentData.value.items.items.length; i++) {
|
||||||
|
var element = state.studentData.value.items.items[i];
|
||||||
int num = 0;
|
int num = 0;
|
||||||
for (var item in element.kgtList) {
|
for (var item in element.kgtList) {
|
||||||
if (item.state == 0) {
|
if (item.state == 0) {
|
||||||
|
|
@ -52,7 +83,12 @@ class StudentWorkDetailLogic extends GetxController with RequestToolMixin, GetSi
|
||||||
if (num == (element.kgtList.length + element.zgtList.length)) {
|
if (num == (element.kgtList.length + element.zgtList.length)) {
|
||||||
element.allNotDone = true;
|
element.allNotDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.kgtLine.add({'id': i + 1, 'rate': (element.kgtCorrectRate / 100 * 5).toStringAsFixed(2)});
|
||||||
|
state.zgtLine.add({'id': i + 1, 'rate': (element.zgtCorrectRate / 100 * 5).toStringAsFixed(2)});
|
||||||
|
state.allLine.add({'id': i + 1, 'rate': (element.correctRate / 100 * 5).toStringAsFixed(2)});
|
||||||
}
|
}
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,7 @@ class StudentWorkDetailState {
|
||||||
late RxString customTimeStr = '自定义'.obs;
|
late RxString customTimeStr = '自定义'.obs;
|
||||||
late Rx<StudentHistory> studentData = Rx(StudentHistory(0, 0, Items([], 0), 0));
|
late Rx<StudentHistory> studentData = Rx(StudentHistory(0, 0, Items([], 0), 0));
|
||||||
late final int subject;
|
late final int subject;
|
||||||
|
late RxList kgtLine = [].obs;
|
||||||
|
late RxList zgtLine = [].obs;
|
||||||
|
late RxList allLine = [].obs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
|
|
@ -9,6 +10,7 @@ import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
|
import 'package:making_school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
|
||||||
|
import 'package:making_school_asignment_app/page/home_page/children/student_work_detail/widget/line_chart.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/widget/progress_bar.dart';
|
import 'package:making_school_asignment_app/page/home_page/widget/progress_bar.dart';
|
||||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||||
|
|
@ -124,16 +126,22 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
/* Text(
|
||||||
'总览:',
|
'总览:',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
|
),*/
|
||||||
|
SizedBox(height: 10.r,),
|
||||||
|
SizedBox(
|
||||||
|
height: 200.r,
|
||||||
|
child: LineChartCon(isShowingMainData: true,lineNum: 3,line1:state.kgtLine.value,line2: state.zgtLine.value,line3: state.allLine.value,),
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 20.r,),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '客观题正确率:',
|
title: '客观题正确率:',
|
||||||
color:Theme.of(context).primaryColor,
|
color:const Color(0xFF4DE6BF),
|
||||||
percent: state.studentData.value.kgtCorrectRate / 100,
|
percent: state.studentData.value.kgtCorrectRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
|
|
@ -145,7 +153,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '总正确率:',
|
title: '总正确率:',
|
||||||
color: Theme.of(context).primaryColor,
|
color: const Color(0xFF1890FF),
|
||||||
percent: state.studentData.value.correctRate / 100,
|
percent: state.studentData.value.correctRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
|
|
@ -153,6 +161,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return JobConditionFilter(
|
return JobConditionFilter(
|
||||||
controller: logic.tabController,
|
controller: logic.tabController,
|
||||||
|
|
@ -221,8 +230,8 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
height: 10.r,
|
height: 10.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||||
// color: Color(0xFF4CC793),
|
color: const Color(0xFF00B386),
|
||||||
border: Border.all(width: 1.r, color: Theme.of(context).primaryColor),
|
border: Border.all(width: 1.r, color: const Color(0xFF00B386)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -240,8 +249,8 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
height: 10.r,
|
height: 10.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||||
// color: Color(0xFFFF7474),
|
color: const Color(0xFFCB191B),
|
||||||
border: Border.all(width: 1.r, color: Color(0xFFFF7474)),
|
border: Border.all(width: 1.r, color: const Color(0xFFCB191B)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -422,7 +431,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
'客:',
|
'客:',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF5B5B5B)),
|
color: const Color(0xFF5B5B5B)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 5.r,
|
width: 5.r,
|
||||||
|
|
@ -444,16 +453,18 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
width: 25.r,
|
width: 25.r,
|
||||||
height: 25.r,
|
height: 25.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: subjective.state == 3
|
||||||
|
?const Color(0xFF00B386):subjective.state == 2
|
||||||
|
? const Color(0xFFCB191B):Colors.transparent,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
width: 1.r,
|
width: 1.r,
|
||||||
color: subjective.state == 0
|
color: subjective.state == 0
|
||||||
? Color(0xFFDDDDDD)
|
? const Color(0xFFDDDDDD)
|
||||||
: subjective.state == 3
|
: subjective.state == 3
|
||||||
?Theme.of(context).primaryColor
|
?const Color(0xFF00B386)
|
||||||
: subjective.state == 2
|
: subjective.state == 2
|
||||||
? Color(0xFFFF7474)
|
? const Color(0xFFCB191B)
|
||||||
: Color(0xFF666666)),
|
: const Color(0xFF666666)),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12.5.r))),
|
borderRadius: BorderRadius.all(Radius.circular(12.5.r))),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
@ -464,16 +475,15 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
color: subjective
|
color: subjective
|
||||||
.state ==
|
.state ==
|
||||||
0
|
0
|
||||||
? Color(
|
? const Color(
|
||||||
0xFFDDDDDD)
|
0xFFDDDDDD)
|
||||||
: subjective.state ==
|
: subjective.state ==
|
||||||
3
|
3
|
||||||
? Theme.of(context).primaryColor
|
? Colors.white
|
||||||
: subjective.state ==
|
: subjective.state ==
|
||||||
2
|
2
|
||||||
? Color(
|
?Colors.white
|
||||||
0xFFFF7474)
|
: const Color(
|
||||||
: Color(
|
|
||||||
0xFF666666)),
|
0xFF666666)),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
|
@ -484,7 +494,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
'无',
|
'无',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF5B5B5B)),
|
color: const Color(0xFF5B5B5B)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -499,7 +509,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
'主:',
|
'主:',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF5B5B5B)),
|
color: const Color(0xFF5B5B5B)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 5.r,
|
width: 5.r,
|
||||||
|
|
@ -521,16 +531,18 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
width: 25.r,
|
width: 25.r,
|
||||||
height: 25.r,
|
height: 25.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.transparent,
|
color: subjective.state == 3
|
||||||
|
? const Color(0xFF00B386):subjective.state == 2
|
||||||
|
? const Color(0xFFCB191B):Colors.transparent,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
width: 1.r,
|
width: 1.r,
|
||||||
color: subjective.state == 0
|
color: subjective.state == 0
|
||||||
? Color(0xFFDDDDDD)
|
? const Color(0xFFDDDDDD)
|
||||||
: subjective.state == 3
|
: subjective.state == 3
|
||||||
? Theme.of(context).primaryColor
|
? const Color(0xFF00B386)
|
||||||
: subjective.state == 2
|
: subjective.state == 2
|
||||||
? Color(0xFFFF7474)
|
? const Color(0xFFCB191B)
|
||||||
: Color(0xFF666666)),
|
: const Color(0xFF666666)),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12.5.r))),
|
borderRadius: BorderRadius.all(Radius.circular(12.5.r))),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
@ -541,16 +553,15 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
color: subjective
|
color: subjective
|
||||||
.state ==
|
.state ==
|
||||||
0
|
0
|
||||||
? Color(
|
? const Color(
|
||||||
0xFFDDDDDD)
|
0xFFDDDDDD)
|
||||||
: subjective.state ==
|
: subjective.state ==
|
||||||
3
|
3
|
||||||
? Theme.of(context).primaryColor
|
? Colors.white
|
||||||
: subjective.state ==
|
: subjective.state ==
|
||||||
2
|
2
|
||||||
? Color(
|
? Colors.white
|
||||||
0xFFFF7474)
|
: const Color(
|
||||||
: Color(
|
|
||||||
0xFF666666)),
|
0xFF666666)),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
|
|
@ -561,25 +572,25 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
'无',
|
'无',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF5B5B5B)),
|
color: const Color(0xFF5B5B5B)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '客观题正确率:',
|
title: '客观题正确率:',
|
||||||
color: Color(0xFFB2DA93),
|
color: const Color(0xFFB2DA93),
|
||||||
percent: item.kgtCorrectRate / 100,
|
percent: item.kgtCorrectRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '主观题正确率:',
|
title: '主观题正确率:',
|
||||||
color: Color(0xFFB2DA93),
|
color: const Color(0xFFB2DA93),
|
||||||
percent: item.zgtCorrectRate / 100,
|
percent: item.zgtCorrectRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '总正确率:',
|
title: '总正确率:',
|
||||||
color: Color(0xFFB2DA93),
|
color: const Color(0xFFB2DA93),
|
||||||
percent: item.correctRate / 100,
|
percent: item.correctRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
|
|
|
||||||
|
|
@ -70,14 +70,14 @@ class _JobConditionFilterState extends State<JobConditionFilter> {
|
||||||
customTimeStr: widget.customTimeStr,
|
customTimeStr: widget.customTimeStr,
|
||||||
hasAll: widget.hasAll,
|
hasAll: widget.hasAll,
|
||||||
onTap: (int val) async {
|
onTap: (int val) async {
|
||||||
if (val == 0 && widget.hasAll == true) {
|
if (val == 3 && widget.hasAll == true) {
|
||||||
widget.onTimeFilter(null, null);
|
widget.onTimeFilter(null, null);
|
||||||
} else if ((val == 1 && widget.hasAll == true) || (val == 0 && widget.hasAll == false)) {
|
} else if ((val == 0 && widget.hasAll == true) || (val == 0 && widget.hasAll == false)) {
|
||||||
widget.onTimeFilter(
|
widget.onTimeFilter(
|
||||||
Utils.getWeekStartDate().toString().substring(0, 10),
|
Utils.getWeekStartDate().toString().substring(0, 10),
|
||||||
Utils.getWeekEndDate().toString().substring(0, 10),
|
Utils.getWeekEndDate().toString().substring(0, 10),
|
||||||
);
|
);
|
||||||
} else if ((val == 2 && widget.hasAll == true) || (val == 1 && widget.hasAll == false)) {
|
} else if ((val == 1 && widget.hasAll == true) || (val == 1 && widget.hasAll == false)) {
|
||||||
widget.onTimeFilter(
|
widget.onTimeFilter(
|
||||||
getMonthStartDate().toString().substring(0, 10),
|
getMonthStartDate().toString().substring(0, 10),
|
||||||
getMonthEndDate().toString().substring(0, 10),
|
getMonthEndDate().toString().substring(0, 10),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,237 @@
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
class LineChartCon extends StatefulWidget {
|
||||||
|
final bool isShowingMainData;
|
||||||
|
final int lineNum;
|
||||||
|
final List? line1;
|
||||||
|
final List? line2;
|
||||||
|
final List? line3;
|
||||||
|
|
||||||
|
LineChartCon(
|
||||||
|
{required this.isShowingMainData,
|
||||||
|
required this.lineNum,
|
||||||
|
this.line1,
|
||||||
|
this.line2,
|
||||||
|
this.line3});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LineChartCon> createState() => _LineChartConState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LineChartConState extends State<LineChartCon> {
|
||||||
|
double maxX = 0.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
getMaxX(){
|
||||||
|
if (widget.lineNum > 2) {
|
||||||
|
if (widget.line3!.length > widget.line2!.length &&
|
||||||
|
widget.line3!.length > widget.line1!.length) {
|
||||||
|
maxX = double.parse(widget.line3!.length.toString());
|
||||||
|
} else if (widget.line2!.length > widget.line3!.length &&
|
||||||
|
widget.line2!.length > widget.line1!.length) {
|
||||||
|
maxX = double.parse(widget.line2!.length.toString());
|
||||||
|
} else {
|
||||||
|
maxX = double.parse(widget.line1!.length.toString());
|
||||||
|
}
|
||||||
|
} else if (widget.lineNum > 1) {
|
||||||
|
|
||||||
|
}
|
||||||
|
print('maxx=======$maxX');
|
||||||
|
return maxX;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
return LineChart(
|
||||||
|
LineChartData(
|
||||||
|
lineTouchData: const LineTouchData(enabled: false),
|
||||||
|
gridData: gridData,
|
||||||
|
titlesData: titlesData1,
|
||||||
|
borderData: borderData,
|
||||||
|
lineBarsData: lineBarsData1,
|
||||||
|
minX: 1,
|
||||||
|
maxX: getMaxX()>0? getMaxX():3,
|
||||||
|
maxY: 6,
|
||||||
|
minY: 0,
|
||||||
|
),
|
||||||
|
duration: const Duration(milliseconds: 250),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
FlTitlesData get titlesData1 => FlTitlesData(
|
||||||
|
bottomTitles: AxisTitles(
|
||||||
|
sideTitles: bottomTitles,
|
||||||
|
),
|
||||||
|
rightTitles: const AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
|
topTitles: const AxisTitles(
|
||||||
|
sideTitles: SideTitles(showTitles: false),
|
||||||
|
),
|
||||||
|
leftTitles: AxisTitles(
|
||||||
|
sideTitles: leftTitles(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<LineChartBarData> get lineBarsData1 => [
|
||||||
|
lineChartBarData1_1,
|
||||||
|
lineChartBarData1_2,
|
||||||
|
lineChartBarData1_3,
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget leftTitleWidgets(double value, TitleMeta meta) {
|
||||||
|
String text;
|
||||||
|
switch (value.toInt()) {
|
||||||
|
case 0:
|
||||||
|
text = '0';
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
text = '20%';
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
text = '40%';
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
text = '60%';
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
text = '80%';
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
text = '100%';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Text(text, style: TextStyle(fontSize: 12.sp, color: const Color(0xFF070707)), textAlign: TextAlign.left);
|
||||||
|
|
||||||
|
/* return SideTitleWidget(
|
||||||
|
axisSide: meta.axisSide,
|
||||||
|
child: Text(
|
||||||
|
'${value}',
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF070707)),
|
||||||
|
),
|
||||||
|
);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
SideTitles leftTitles() => SideTitles(
|
||||||
|
getTitlesWidget: leftTitleWidgets,
|
||||||
|
showTitles: true,
|
||||||
|
interval: 1,
|
||||||
|
reservedSize: 50,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget bottomTitleWidgets(double value, TitleMeta meta) {
|
||||||
|
return SideTitleWidget(
|
||||||
|
axisSide: meta.axisSide,
|
||||||
|
space: 10,
|
||||||
|
child: Text(
|
||||||
|
value.toString() == '0.0' ? '' : value.toStringAsFixed(0),
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: const Color.fromRGBO(39, 39, 39, 0.5),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
SideTitles get bottomTitles => SideTitles(
|
||||||
|
showTitles: true,
|
||||||
|
reservedSize: 32,
|
||||||
|
interval: 1,
|
||||||
|
getTitlesWidget: bottomTitleWidgets,
|
||||||
|
);
|
||||||
|
|
||||||
|
FlGridData get gridData => const FlGridData(
|
||||||
|
show: true, drawVerticalLine: false, horizontalInterval: 1.0);
|
||||||
|
|
||||||
|
FlBorderData get borderData => FlBorderData(
|
||||||
|
show: true,
|
||||||
|
border: const Border(
|
||||||
|
bottom: BorderSide(color: Colors.transparent, width: 1),
|
||||||
|
left: BorderSide(color: Colors.transparent),
|
||||||
|
right: BorderSide(color: Colors.transparent),
|
||||||
|
top: BorderSide(color: Colors.transparent),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
LineChartBarData get lineChartBarData1_1 => LineChartBarData(
|
||||||
|
isCurved: true,
|
||||||
|
curveSmoothness: 0,
|
||||||
|
color: const Color(0xFF4DE6BF),
|
||||||
|
barWidth: 2,
|
||||||
|
isStrokeCapRound: true,
|
||||||
|
dotData: const FlDotData(show: false),
|
||||||
|
belowBarData: BarAreaData(show: false),
|
||||||
|
spots: List.generate(widget.line1!.length, (index){
|
||||||
|
var element = widget.line1![index];
|
||||||
|
return FlSpot(double.parse(element['id'].toString()), double.parse(element['rate'].toString()));
|
||||||
|
})
|
||||||
|
/* const [
|
||||||
|
FlSpot(1, 0),
|
||||||
|
FlSpot(3, 1.5),
|
||||||
|
FlSpot(5, 1.4),
|
||||||
|
FlSpot(7, 3.4),
|
||||||
|
FlSpot(10, 2),
|
||||||
|
FlSpot(12, 2.2),
|
||||||
|
FlSpot(13, 1.8),
|
||||||
|
],*/
|
||||||
|
);
|
||||||
|
|
||||||
|
LineChartBarData get lineChartBarData1_2 => LineChartBarData(
|
||||||
|
isCurved: true,
|
||||||
|
curveSmoothness: 0,
|
||||||
|
color: Theme.of(context).primaryColor,
|
||||||
|
barWidth: 2,
|
||||||
|
isStrokeCapRound: true,
|
||||||
|
dotData: const FlDotData(show: false),
|
||||||
|
belowBarData: BarAreaData(
|
||||||
|
show: false,
|
||||||
|
color: Colors.yellow,
|
||||||
|
),
|
||||||
|
spots: List.generate(widget.line2!.length, (index){
|
||||||
|
var element = widget.line2![index];
|
||||||
|
return FlSpot(double.parse(element['id'].toString()), double.parse(element['rate'].toString()));
|
||||||
|
})
|
||||||
|
/* const [
|
||||||
|
FlSpot(1, 1),
|
||||||
|
FlSpot(3, 2.8),
|
||||||
|
FlSpot(7, 1.2),
|
||||||
|
FlSpot(10, 2.8),
|
||||||
|
FlSpot(12, 2.6),
|
||||||
|
FlSpot(13, 3.9),
|
||||||
|
],*/
|
||||||
|
);
|
||||||
|
|
||||||
|
LineChartBarData get lineChartBarData1_3 => LineChartBarData(
|
||||||
|
isCurved: true,
|
||||||
|
curveSmoothness: 0,
|
||||||
|
color: const Color(0xFF1890FF),
|
||||||
|
barWidth: 2,
|
||||||
|
isStrokeCapRound: true,
|
||||||
|
dotData: const FlDotData(show: false),
|
||||||
|
belowBarData: BarAreaData(show: false),
|
||||||
|
spots: List.generate(widget.line3!.length, (index){
|
||||||
|
var element = widget.line3![index];
|
||||||
|
return FlSpot(double.parse(element['id'].toString()), double.parse(element['rate'].toString()));
|
||||||
|
})
|
||||||
|
/* const [
|
||||||
|
FlSpot(1, 2.8),
|
||||||
|
FlSpot(3, 1.9),
|
||||||
|
FlSpot(6, 3),
|
||||||
|
FlSpot(10, 1.3),
|
||||||
|
FlSpot(13, 2.5),
|
||||||
|
],*/
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -33,10 +33,10 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: const Color(0xFF8C68FF),
|
color: const Color(0xFF4CC793),
|
||||||
),
|
),
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
labelColor:const Color(0xFF8C68FF),
|
labelColor: const Color(0xFF4CC793),
|
||||||
unselectedLabelColor: const Color(0xFF505E6E),
|
unselectedLabelColor: const Color(0xFF505E6E),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||||
|
|
@ -44,15 +44,15 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
||||||
indicator: UnderlineTabIndicator(
|
indicator: UnderlineTabIndicator(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
width: 2.r,
|
width: 2.r,
|
||||||
color:const Color(0xFF8C68FF)
|
color:const Color(0xFF4CC793)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
tabs: <Widget>[
|
tabs: <Widget>[
|
||||||
if(widget.hasAll == true)
|
|
||||||
const Tab(text: '全部'),
|
|
||||||
const Tab(text: '近一周'),
|
const Tab(text: '近一周'),
|
||||||
const Tab(text: '近一月'),
|
const Tab(text: '近一月'),
|
||||||
Tab(text: widget.customTimeStr),
|
Tab(text: widget.customTimeStr),
|
||||||
|
if(widget.hasAll == true)
|
||||||
|
const Tab(text: '全部'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
||||||
width: 20.r,
|
width: 20.r,
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child:
|
child: menuItem(bgImg: 'assets/images/home_bg_02.png', name: '知识点掌握', url: Routes.studentHistoryWorkPage, page: 'points'),
|
||||||
menuItem(bgImg: 'assets/images/home_bg_02.png', name: '知识点点掌握', url: Routes.studentHistoryWorkPage, page: 'points'),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
import app_installer
|
||||||
|
import app_settings
|
||||||
import auto_updater_macos
|
import auto_updater_macos
|
||||||
import connectivity_plus
|
import connectivity_plus
|
||||||
import device_info_plus
|
import device_info_plus
|
||||||
|
|
@ -14,6 +16,8 @@ import sqflite
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
|
AppInstallerPlugin.register(with: registry.registrar(forPlugin: "AppInstallerPlugin"))
|
||||||
|
AppSettingsPlugin.register(with: registry.registrar(forPlugin: "AppSettingsPlugin"))
|
||||||
AutoUpdaterMacosPlugin.register(with: registry.registrar(forPlugin: "AutoUpdaterMacosPlugin"))
|
AutoUpdaterMacosPlugin.register(with: registry.registrar(forPlugin: "AutoUpdaterMacosPlugin"))
|
||||||
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
||||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.0+1
|
version: 1.0.4+5
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.4.1 <4.0.0'
|
sdk: '>=3.4.1 <4.0.0'
|
||||||
|
|
@ -48,7 +48,7 @@ dependencies:
|
||||||
# http请求插件
|
# http请求插件
|
||||||
dio: ^5.4.2+1
|
dio: ^5.4.2+1
|
||||||
# 网络缓存图片
|
# 网络缓存图片
|
||||||
cached_network_image: ^3.3.1
|
cached_network_image: ^3.2.1
|
||||||
# 上拉加载和下拉刷新的组件
|
# 上拉加载和下拉刷新的组件
|
||||||
flutter_easyrefresh: ^2.2.2
|
flutter_easyrefresh: ^2.2.2
|
||||||
photo_view: ^0.15.0
|
photo_view: ^0.15.0
|
||||||
|
|
@ -75,7 +75,7 @@ dependencies:
|
||||||
badges: ^3.1.2
|
badges: ^3.1.2
|
||||||
# 图表
|
# 图表
|
||||||
fl_chart: ^0.68.0
|
fl_chart: ^0.68.0
|
||||||
data_table_2: ^2.5.10
|
data_table_2: 2.5.10
|
||||||
flutter_staggered_grid_view: ^0.7.0
|
flutter_staggered_grid_view: ^0.7.0
|
||||||
dropdown_button2: ^2.3.9
|
dropdown_button2: ^2.3.9
|
||||||
syncfusion_flutter_datepicker: ^25.2.5
|
syncfusion_flutter_datepicker: ^25.2.5
|
||||||
|
|
@ -97,28 +97,28 @@ dependencies:
|
||||||
icons_launcher: ^2.1.7
|
icons_launcher: ^2.1.7
|
||||||
app_settings: ^5.1.1
|
app_settings: ^5.1.1
|
||||||
device_info_plus: ^11.1.0
|
device_info_plus: ^11.1.0
|
||||||
zoom_widget: ^2.0.1
|
|
||||||
zoom_pinch_overlay: ^1.4.3
|
|
||||||
flutter_html_2: ^0.1.0
|
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_lints: ^4.0.0
|
retrofit_generator: ^8.1.0
|
||||||
retrofit_generator: ^9.0.0
|
|
||||||
build_runner: ^2.4.10
|
build_runner: ^2.4.10
|
||||||
json_serializable: ^6.6.2
|
json_serializable: ^6.6.2
|
||||||
# 分离样式
|
# 分离样式
|
||||||
functional_widget: ^0.10.2
|
functional_widget: ^0.10.2
|
||||||
|
# The "flutter_lints" package below contains a set of recommended lints to
|
||||||
|
# encourage good coding practices. The lint set provided by the package is
|
||||||
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
|
# package. See that file for information about deactivating specific lint
|
||||||
|
# rules and activating additional ones.
|
||||||
|
flutter_lints: ^3.0.0
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|
||||||
# The following section is specific to Flutter packages.
|
# The following section is specific to Flutter packages.
|
||||||
# dependency_overrides:
|
|
||||||
# collection: ^1.19.0
|
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
|
|
||||||
# The following line ensures that the Material Icons font is
|
# The following line ensures that the Material Icons font is
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||||
Win32Window::Point origin(10, 10);
|
Win32Window::Point origin(10, 10);
|
||||||
// Win32Window::Size size(1280, 720);
|
// Win32Window::Size size(1280, 720);
|
||||||
Win32Window::Size size(700, 900);
|
Win32Window::Size size(700, 900);
|
||||||
if (!window.Create(L"making_school_asignment_app", origin, size)) {
|
if (!window.Create(L"", origin, size)) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
window.SetQuitOnClose(true);
|
window.SetQuitOnClose(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue