mcy_new #1
Binary file not shown.
|
After Width: | Height: | Size: 69 B |
|
|
@ -29,7 +29,7 @@
|
|||
type="application/octet-stream" />
|
||||
</item> -->
|
||||
<item>
|
||||
<title>Version 1.0.1+2</title>
|
||||
<title>Version 1.0.3+4</title>
|
||||
#发行说明-读取html方式(2选1)
|
||||
<!-- <sparkle:releaseNotesLink>
|
||||
https://your_domain/your_path/release_notes.html
|
||||
|
|
@ -38,18 +38,18 @@
|
|||
<description>
|
||||
<![CDATA[
|
||||
<ul>
|
||||
<li>1、优化批阅提示</li>
|
||||
<li>2、优化启动图和展示页面</li>
|
||||
<li>1、修复已知BUG</li>
|
||||
<li>2、优化操作布局</li>
|
||||
</ul>
|
||||
]]>
|
||||
</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"
|
||||
sparkle:dsaSignature="MEUCIG2O7ZNPeIs/fi2GF/UCRvooqIZMFjLPyfGsIqTnmfHkAiEAuFusRpYjkf05fqBv3nQqfyy8Y8u6ub5X+QWZU7NJ5qU="
|
||||
sparkle:version="1.0.1+2"
|
||||
sparkle:os="windows"
|
||||
<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="MEYCIQCuU0BodcdWrF+WoJrWRpY8P1pfK+dKkvrl3ZJ5KxnDdAIhAIWqp7VBNO9IaKFj2ypQ+s7DWurBUSaf6MTvexMmuvX+"
|
||||
length="0"
|
||||
sparkle:version="1.0.3+4"
|
||||
sparkle:os="windows"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
</channel>
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
CURRENT_PROJECT_VERSION = 6;
|
||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
|
@ -503,7 +503,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1;
|
||||
MARKETING_VERSION = 3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.yuanxuan.makingS--buneng--choolAsignmentApp";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
@ -689,7 +689,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
CURRENT_PROJECT_VERSION = 6;
|
||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
|
@ -697,7 +697,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1;
|
||||
MARKETING_VERSION = 3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
|
@ -719,7 +719,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
CURRENT_PROJECT_VERSION = 6;
|
||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
|
@ -727,7 +727,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1;
|
||||
MARKETING_VERSION = 3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.makingSchoolAsignmentApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
|
|
|||
|
|
@ -44,10 +44,13 @@ class AppVersion extends Object {
|
|||
this.appFileUrl,
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class TheError extends Interceptor {
|
|||
message = '请求发送超时';
|
||||
break;
|
||||
case DioExceptionType.receiveTimeout:
|
||||
message = '接收超时时发生';
|
||||
message = '接收超时';
|
||||
break;
|
||||
case DioExceptionType.badResponse:
|
||||
if (error.response == null) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ import 'upgradeLogic.dart';
|
|||
|
||||
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();
|
||||
final storagePath = storageDir?.path ?? '/';
|
||||
|
|
@ -47,10 +48,12 @@ class DownloadApk {
|
|||
print(e);
|
||||
// toPrint(val: e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// 安装apk
|
||||
static Future<bool> installApk(context, UpdateAppEvent event, UpgradeLogic logic) async {
|
||||
static Future<bool> installApk(
|
||||
context, UpdateAppEvent event, UpgradeLogic logic) async {
|
||||
try {
|
||||
logic.loadingApk.value = true;
|
||||
File? _apkFile = await _downloadAndroid(context, event, logic);
|
||||
|
|
@ -73,7 +76,9 @@ class DownloadApk {
|
|||
actions: [
|
||||
MaterialButton(
|
||||
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(),
|
||||
),
|
||||
],
|
||||
|
|
@ -87,12 +92,15 @@ class DownloadApk {
|
|||
// 其他方式下载
|
||||
// await SystemNavigator.pop(); // 退出APP
|
||||
var options = ['应用市场更新APP', '浏览器下载并安装APP'];
|
||||
var uri = Uri.parse('market://details?id=com.example.marking_app'); // 应用市场URI
|
||||
if (!await canLaunchUrl(uri)) options.removeAt(0); // 如果不能打开应用市场 就屏蔽掉 这个安装方式
|
||||
String? option = await UpgradePermission.showCustomModalBottomSheet(context, options);
|
||||
var uri =
|
||||
Uri.parse('market://details?id=${event.packageName}'); // 应用市场URI
|
||||
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.parse(event.link));
|
||||
} catch (e) {}
|
||||
} catch (_) {}
|
||||
});
|
||||
|
||||
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) {
|
||||
double progress = double.parse((received / total).toStringAsFixed(2));
|
||||
// debugPrint('下载进度$progress');
|
||||
|
|
@ -122,7 +131,8 @@ class RestartWidget extends StatefulWidget {
|
|||
const RestartWidget({super.key, required this.child});
|
||||
|
||||
static restartApp(BuildContext context) {
|
||||
final _RestartWidgetState? state = context.findAncestorStateOfType<_RestartWidgetState>();
|
||||
final _RestartWidgetState? state =
|
||||
context.findAncestorStateOfType<_RestartWidgetState>();
|
||||
state?.restartApp();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
* @LastEditors: Please set LastEditors
|
||||
* @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:get/get.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 String deviceInfo;
|
||||
|
||||
const UpdateDialog({super.key, required this.updateAppEvent, required this.deviceInfo});
|
||||
const UpdateDialog(
|
||||
{super.key, required this.updateAppEvent, required this.deviceInfo});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -72,11 +72,17 @@ class UpdateDialog extends Dialog {
|
|||
HtmlWidget(
|
||||
updateAppEvent.description,
|
||||
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,
|
||||
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) {
|
||||
return WillPopScope(
|
||||
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(
|
||||
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 {
|
||||
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)) {
|
||||
// 跳进对应的应用市场进行更新操作
|
||||
return await launchUrl(uri);
|
||||
|
|
@ -181,15 +192,20 @@ class DownloadButton extends StatelessWidget {
|
|||
width: 245.w,
|
||||
decoration: BoxDecoration(
|
||||
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(
|
||||
onPressed: () => easyThrottle('DownloadButton_App_Upgrade', duration: const Duration(milliseconds: 1000), () async {
|
||||
if (deviceInfo == "android" && updateAppEvent.equipment == Equipment.android) {
|
||||
onPressed: () => easyThrottle('DownloadButton_App_Upgrade',
|
||||
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) {
|
||||
flag = await DownloadApk.installApk(context, updateAppEvent, logic);
|
||||
flag = await DownloadApk.installApk(
|
||||
context, updateAppEvent, logic);
|
||||
if (!flag) {
|
||||
print('执行到了重置更新按钮的地方....');
|
||||
logic.downloadRatio.value = 0.0; // 更新失败重置 更新按钮
|
||||
|
|
@ -201,8 +217,10 @@ class DownloadButton extends StatelessWidget {
|
|||
}
|
||||
// await FlutterClipboard.copy(updateAppEvent.link);
|
||||
// setTimeOut(1000, () => ToastUtils.showInfo('下载链接已经复制到设备,可前往浏览器下载安装'));
|
||||
} else if (deviceInfo == "ios" && updateAppEvent.equipment == Equipment.ios) {
|
||||
} else if (deviceInfo == "ios" &&
|
||||
updateAppEvent.equipment == Equipment.ios) {
|
||||
try {
|
||||
print(updateAppEvent.link);
|
||||
await launchUrlString(updateAppEvent.link);
|
||||
} catch (e) {
|
||||
print('进来更新报错$e');
|
||||
|
|
@ -214,7 +232,8 @@ class DownloadButton extends StatelessWidget {
|
|||
// 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
|
||||
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); // 如果不能打开应用市场 就屏蔽掉 这个安装方式
|
||||
String? option = await showCustomModalBottomSheet(context, options);
|
||||
if (option == '应用市场更新APP') {
|
||||
if (await canLaunchUrl(uri))
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
else
|
||||
await AppInstaller.goStore('com.example.marking_app', 'iOSAppId');
|
||||
} else {
|
||||
await AppInstaller.goStore(updateAppEvent.packageName, 'iOSAppId');
|
||||
}
|
||||
}
|
||||
if (option == '浏览器下载并安装APP') await launchUrl(Uri.parse(updateAppEvent.link));
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
|
|||
return;
|
||||
}
|
||||
|
||||
AppVersion? result = await getClient().getLastAppVersion('making_school_asignment_app', deviceType);
|
||||
AppVersion? result = await getClient()
|
||||
.getLastAppVersion('making_school_asignment_app', deviceType);
|
||||
if (result != null) {
|
||||
//获取当前版本
|
||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||
|
|
@ -60,23 +61,31 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
|
|||
'systemType': deviceType,
|
||||
'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) {
|
||||
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
||||
Permission storagePermission;
|
||||
if (androidInfo.version.sdkInt >= 33) {
|
||||
storagePermission = Permission.manageExternalStorage;
|
||||
} else {
|
||||
storagePermission = Permission.storage;
|
||||
if (Platform.isAndroid) {
|
||||
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
|
||||
Permission storagePermission;
|
||||
if (androidInfo.version.sdkInt >= 33) {
|
||||
storagePermission = Permission.manageExternalStorage;
|
||||
} else {
|
||||
storagePermission = Permission.storage;
|
||||
}
|
||||
await PermissionDescribeUtil.instance.toLaunchPermissionRequest(
|
||||
Get.context ?? context,
|
||||
title: '储存权限请求',
|
||||
describe: "为了提供更好的服务,需要获取到存储权限用于保存APP升级文件APK,进行升级",
|
||||
permissions: [storagePermission],
|
||||
);
|
||||
}
|
||||
PermissionDescribeUtil.instance.toLaunchPermissionRequest(
|
||||
context,
|
||||
title: '储存权限请求',
|
||||
describe: "为了提供更好的服务,需要获取到存储权限用于保存APP升级文件APK,进行升级",
|
||||
permissions: [storagePermission],
|
||||
|
||||
await UpdateDialog.showUpdateDialog(
|
||||
Get.context ?? context,
|
||||
updateAppEvent,
|
||||
);
|
||||
await UpdateDialog.showUpdateDialog(context, updateAppEvent);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -12,13 +12,18 @@ class PermissionDescribePage extends StatefulWidget {
|
|||
final String describe;
|
||||
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
|
||||
State<PermissionDescribePage> createState() => _PermissionDescribePageState();
|
||||
}
|
||||
|
||||
class _PermissionDescribePageState extends State<PermissionDescribePage> with WidgetsBindingObserver {
|
||||
class _PermissionDescribePageState extends State<PermissionDescribePage>
|
||||
with WidgetsBindingObserver {
|
||||
Timer? _timerPermission;
|
||||
bool theOpenAppSettings = false;
|
||||
int theExecutionFrequency = 0;
|
||||
|
|
@ -132,7 +137,9 @@ class _PermissionDescribePageState extends State<PermissionDescribePage> with Wi
|
|||
|
||||
/// 权限发起请求
|
||||
/// @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();
|
||||
|
||||
List<Permission> permanentRefusal = []; // 永久拒绝
|
||||
|
|
@ -173,7 +180,8 @@ class _PermissionDescribePageState extends State<PermissionDescribePage> with Wi
|
|||
executionFrequency++;
|
||||
}
|
||||
if (executionFrequency <= 1) {
|
||||
var res = await getStoragePermission(context, [key], executionFrequency);
|
||||
var res =
|
||||
await getStoragePermission(context, [key], executionFrequency);
|
||||
permanentRefusal.addAll(res);
|
||||
} else {
|
||||
permanentRefusal.add(key);
|
||||
|
|
@ -231,12 +239,10 @@ class PermissionDescribeUtil {
|
|||
|
||||
PermissionDescribeUtil._internal();
|
||||
|
||||
static get instance {
|
||||
return _instance ??= PermissionDescribeUtil._internal();
|
||||
}
|
||||
static get instance => _instance ??= PermissionDescribeUtil._internal();
|
||||
|
||||
/// 发起权限请求
|
||||
void toLaunchPermissionRequest(
|
||||
Future<void> toLaunchPermissionRequest(
|
||||
BuildContext context, {
|
||||
required String title,
|
||||
required String describe,
|
||||
|
|
|
|||
|
|
@ -121,13 +121,36 @@ class Utils {
|
|||
|
||||
for (var stu in data.students) {
|
||||
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
|
||||
stu.kgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
||||
// stu.kgtStu!.sort((a, b) => 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.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
|
||||
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
|
||||
|
||||
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
|
||||
stu.zgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
|
||||
// stu.zgtStu!.sort((a, b) => 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;
|
||||
//错误
|
||||
|
|
|
|||
|
|
@ -44,205 +44,208 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
child: state.studentList.isNotEmpty
|
||||
? Utils.isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children:
|
||||
List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id,
|
||||
'subject':state.subject,
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Theme.of(context).primaryColor),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFB2DA93)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFB2DA93))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
body: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
child: state.studentList.isNotEmpty
|
||||
? Utils.isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 0.r,
|
||||
crossAxisSpacing: 0.r,
|
||||
childAspectRatio: 556 / 90,
|
||||
),
|
||||
children:
|
||||
List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id,
|
||||
'subject':state.subject,
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(0.r)),
|
||||
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(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Theme.of(context).primaryColor),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
Theme.of(context).primaryColor,
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFB2DA93)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFEBE4FF),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Theme.of(context).primaryColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
color: Color(0xFFB2DA93))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
Theme.of(context).primaryColor,
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFEBE4FF),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Theme.of(context).primaryColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
child: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
|
|
@ -414,13 +417,13 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: state.studentList.length,
|
||||
)
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
},
|
||||
itemCount: state.studentList.length,
|
||||
),
|
||||
)
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import 'package:making_school_asignment_app/page/home_page/children/quick_data_c
|
|||
import 'job_report_logic.dart';
|
||||
|
||||
class JobReportPage extends StatefulWidget {
|
||||
const JobReportPage({Key? key}) : super(key: key);
|
||||
const JobReportPage({super.key});
|
||||
|
||||
@override
|
||||
State<JobReportPage> createState() => _JobReportPageState();
|
||||
|
|
@ -26,102 +26,100 @@ class _JobReportPageState extends State<JobReportPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
centerTitle: true,
|
||||
title: Center(child: Obx(() {
|
||||
return quickText(
|
||||
'${state.title.value}作业报告',
|
||||
size: 14.sp,
|
||||
color: const Color.fromRGBO(51, 51, 51, 1),
|
||||
);
|
||||
})),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Obx(() {
|
||||
if (state.hasData.value) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
// 下拉框
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Obx(() {
|
||||
return DropdownSelection(
|
||||
involveClasses: state.involveClasses.value,
|
||||
classData: state.classData.value,
|
||||
call: (AnnotatedClass item) {
|
||||
state.classData.value = item;
|
||||
if (item.grade == -1) state.classData.value = state.defaultClass;
|
||||
logic.getWorkData();
|
||||
});
|
||||
}),
|
||||
// Expanded(child: Text('')),
|
||||
],
|
||||
),
|
||||
),
|
||||
//完成率、正确率
|
||||
TopCount(
|
||||
state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value,state.subject),
|
||||
//客观题、主观题
|
||||
KgtZgtTable(
|
||||
studentCount: state.dataCount.studentCount!,
|
||||
homeworkId: state.homeworkId.value,
|
||||
kgReport: state.kgReport,
|
||||
zgReport: state.zgReport,
|
||||
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
|
||||
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0),
|
||||
kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0),
|
||||
zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0),
|
||||
subject:state.subject),
|
||||
// 掌握知识点的情况
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: KnowledgePoint(
|
||||
knowsList: state.knowsList,
|
||||
data: state.homeData,
|
||||
className: state.classData.value.className,
|
||||
homeworkId: state.homeworkId.value,
|
||||
subject:state.subject,)),
|
||||
// 掌握知识点的情况
|
||||
/* Container(
|
||||
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
centerTitle: true,
|
||||
title: Center(child: Obx(() {
|
||||
return quickText(
|
||||
'${state.title.value}作业报告',
|
||||
size: 14.sp,
|
||||
color: const Color.fromRGBO(51, 51, 51, 1),
|
||||
);
|
||||
})),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Obx(() {
|
||||
if (state.hasData.value) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
// 下拉框
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Obx(() {
|
||||
return DropdownSelection(
|
||||
involveClasses: state.involveClasses.value,
|
||||
classData: state.classData.value,
|
||||
call: (AnnotatedClass item) {
|
||||
state.classData.value = item;
|
||||
if (item.grade == -1) state.classData.value = state.defaultClass;
|
||||
logic.getWorkData();
|
||||
});
|
||||
}),
|
||||
// Expanded(child: Text('')),
|
||||
],
|
||||
),
|
||||
),
|
||||
//完成率、正确率
|
||||
TopCount(state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value, state.subject),
|
||||
//客观题、主观题
|
||||
KgtZgtTable(
|
||||
studentCount: state.dataCount.studentCount!,
|
||||
homeworkId: state.homeworkId.value,
|
||||
kgReport: state.kgReport,
|
||||
zgReport: state.zgReport,
|
||||
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
|
||||
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0),
|
||||
kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0),
|
||||
zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0),
|
||||
subject: state.subject),
|
||||
// 掌握知识点的情况
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: KnowledgePoint(
|
||||
knowsList: state.knowsList,
|
||||
data: state.homeData,
|
||||
className: state.classData.value.className,
|
||||
homeworkId: state.homeworkId.value,
|
||||
subject: state.subject,
|
||||
)),
|
||||
// 掌握知识点的情况
|
||||
/* Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: $OverallPerformance(data.studentCount, data.overallTitles)),
|
||||
// 单位时间答题情况
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: $UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos)),*/
|
||||
// 人员数据概况
|
||||
Container(margin: EdgeInsets.symmetric(horizontal: 10.r), child: PersonnelDataOverview(studentList: state.studentList.value)),
|
||||
// 人员数据概况
|
||||
Container(margin: EdgeInsets.symmetric(horizontal: 10.r), child: PersonnelDataOverview(studentList: state.studentList.value)),
|
||||
|
||||
SizedBox(
|
||||
height: 30.r,
|
||||
),
|
||||
],
|
||||
SizedBox(
|
||||
height: 30.r,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Padding(padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 2 - 200.r), child: const MyEmptyWidget());
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
);
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Padding(padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 2 - 200.r), child: const MyEmptyWidget());
|
||||
}
|
||||
}),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@ class KnowledgePoint extends StatefulWidget {
|
|||
final String className;
|
||||
final String homeworkId;
|
||||
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
|
||||
State<KnowledgePoint> createState() => _KnowledgePointState();
|
||||
|
|
@ -23,7 +24,7 @@ class KnowledgePoint extends StatefulWidget {
|
|||
class _KnowledgePointState extends State<KnowledgePoint> {
|
||||
void goQuickCheckPersonalPath(studentId) {
|
||||
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,89 +209,98 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
|||
child: quickText('知识点掌握情况', color: const Color.fromRGBO(92, 92, 92, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
||||
),
|
||||
Expanded(
|
||||
child: widget.knowsList.isNotEmpty? ListView(
|
||||
children: widget.knowsList.value.map((item) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(bottom: 15.h, left: 15.r, right: 15.r),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: Row(
|
||||
child: widget.knowsList.isNotEmpty
|
||||
? ListView(
|
||||
children: widget.knowsList.value.map((item) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(bottom: 15.h, left: 15.r, right: 15.r),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
quickText(item.knowledgeName, size: 12.sp, color: const Color.fromRGBO(152, 152, 152, 1)),
|
||||
quickText('${item.okRate!.toStringAsFixed(0)}%', size: 12.sp, color: const Color.fromRGBO(64, 64, 64, 1)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.w),
|
||||
const Expanded(flex: 1, child: SizedBox()),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 3.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
quickText(item.knowledgeName, size: 12.sp, color: const Color.fromRGBO(152, 152, 152, 1)),
|
||||
quickText('${item.okRate!.toStringAsFixed(0)}%', size: 12.sp, color: const Color.fromRGBO(64, 64, 64, 1)),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.w),
|
||||
const Expanded(flex: 1, child: SizedBox()),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 3.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: LinearPercentIndicator(
|
||||
padding: EdgeInsets.zero,
|
||||
animation: true,
|
||||
lineHeight: 10.h,
|
||||
animationDuration: 2500,
|
||||
percent: item.okRate! / 100,
|
||||
progressColor: Theme.of(context).primaryColor,
|
||||
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
|
||||
barRadius: Radius.circular(10.r),
|
||||
)),
|
||||
SizedBox(width: 10.w),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
List<Questions> ques =
|
||||
widget.data.questions.where((w) => w.knows.indexWhere((k) => k.knowledgeId == item.knowledgeId) > -1).toList();
|
||||
List<Students> array2 = [...widget.data.students];
|
||||
for (var stu in array2) {
|
||||
stu.queDtls = widget.data.dtls
|
||||
.where((w) =>
|
||||
w.studentId == stu.studentId &&
|
||||
ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1)
|
||||
.toList();
|
||||
int okCount = stu.queDtls!.where((w) => w.state == 3).length;
|
||||
int ttlCount = stu.queDtls!.length;
|
||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
||||
stu.queDtls!.sort((a, b) {
|
||||
num num1 = num.parse(a.questionNo);
|
||||
num num2 = num.parse(b.questionNo);
|
||||
return num1.compareTo(num2);
|
||||
});
|
||||
}
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: LinearPercentIndicator(
|
||||
padding: EdgeInsets.zero,
|
||||
animation: true,
|
||||
lineHeight: 10.h,
|
||||
animationDuration: 2500,
|
||||
percent: item.okRate! / 100,
|
||||
progressColor: Theme.of(context).primaryColor,
|
||||
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
|
||||
barRadius: Radius.circular(10.r),
|
||||
)),
|
||||
SizedBox(width: 10.w),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
List<Questions> ques = widget.data.questions
|
||||
.where((w) => w.knows.indexWhere((k) => k.knowledgeId == item.knowledgeId) > -1)
|
||||
.toList();
|
||||
List<Students> array2 = [...widget.data.students];
|
||||
for (var stu in array2) {
|
||||
stu.queDtls = widget.data.dtls
|
||||
.where((w) =>
|
||||
w.studentId == stu.studentId &&
|
||||
ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1)
|
||||
.toList();
|
||||
int okCount = stu.queDtls!.where((w) => w.state == 3).length;
|
||||
int ttlCount = stu.queDtls!.length;
|
||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
||||
stu.queDtls!.sort((a, b) {
|
||||
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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showPeopleListDialog(
|
||||
context: context,
|
||||
title: item.knowledgeName,
|
||||
arr: array2,
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
quickText('查看', size: 12.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
|
||||
Icon(Icons.arrow_forward_ios, size: 11.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
|
||||
showPeopleListDialog(
|
||||
context: context,
|
||||
title: item.knowledgeName,
|
||||
arr: array2,
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
quickText('查看', size: 12.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
|
||||
Icon(Icons.arrow_forward_ios, size: 11.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}).toList()): 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: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/utils/toast_utils.dart';
|
||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||
|
||||
import 'knowledge_points_grasp_state.dart';
|
||||
|
||||
|
|
@ -27,9 +29,15 @@ class KnowledgePointsGraspLogic extends GetxController with RequestToolMixin, Ge
|
|||
}
|
||||
|
||||
void getList() async {
|
||||
List<KnowledgePointsGrasp> data = await getClient().getKnowledgeReport(state.dateStart, state.dateEnd, textController.text,state.classId,state.subject);
|
||||
state.dataList.value = data;
|
||||
EasyLoading.dismiss();
|
||||
try {
|
||||
ToastUtils.showLoading();
|
||||
List<KnowledgePointsGrasp> data =
|
||||
await getClient().getKnowledgeReport(state.dateStart, state.dateEnd, textController.text, state.classId, state.subject);
|
||||
state.dataList.value = data;
|
||||
} catch (_) {
|
||||
} finally {
|
||||
ToastUtils.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package: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/page/global_widget/MyEmptyWidget.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';
|
||||
|
||||
class KnowledgePointsGraspPage extends StatefulWidget {
|
||||
const KnowledgePointsGraspPage({Key? key}) : super(key: key);
|
||||
const KnowledgePointsGraspPage({super.key});
|
||||
|
||||
@override
|
||||
State<KnowledgePointsGraspPage> createState() => _KnowledgePointsGraspPageState();
|
||||
|
|
@ -27,145 +29,141 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(15.r),
|
||||
// height: 30.r,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: TextField(
|
||||
controller: logic.textController,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: TextStyle(
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入知识点名称",
|
||||
hintStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
labelStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333))),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(15.r),
|
||||
// height: 30.r,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
border: Border.all(width: 1.r, color: const Color(0xFFDDDDDD)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: TextField(
|
||||
controller: logic.textController,
|
||||
textInputAction: TextInputAction.next,
|
||||
style: TextStyle(
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
fontSize: 10.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入知识点名称",
|
||||
hintStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
labelStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
state.page = 1;
|
||||
logic.getList();
|
||||
},
|
||||
child: Container(
|
||||
width: 50.r,
|
||||
height: 30.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'查询',
|
||||
style: TextStyle(fontSize: 12.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
return JobConditionFilter(
|
||||
jobType: 1,
|
||||
controller: logic.tabController,
|
||||
customTimeStr: state.customTimeStr.value,
|
||||
customTime: logic.tabController.index != 2 ||
|
||||
((state.dateEnd == null || state.dateEnd == '') && (state.dateStart == null || state.dateStart == ''))
|
||||
? null
|
||||
: PickerDateRange(
|
||||
state.dateStart == null || state.dateStart == '' ? null : DateTime.parse(state.dateStart!),
|
||||
state.dateEnd == null || state.dateEnd == '' ? null : DateTime.parse(state.dateEnd!),
|
||||
),
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
if (startTime == null && endTime == null) {
|
||||
if (logic.tabController.index == 2) {
|
||||
logic.tabController.animateTo(0);
|
||||
}
|
||||
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
|
||||
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
|
||||
state.customTimeStr.value = '自定义';
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () => easyThrottle('zshi_shi_dian_cx', () {
|
||||
Utils.hideKeyboard();
|
||||
logic.refreshController.callRefresh();
|
||||
}),
|
||||
child: Container(
|
||||
width: 50.r,
|
||||
height: 30.r,
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(4.r), color: Theme.of(context).primaryColor),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'查询',
|
||||
style: TextStyle(fontSize: 12.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Obx(() {
|
||||
return JobConditionFilter(
|
||||
jobType: 1,
|
||||
controller: logic.tabController,
|
||||
customTimeStr: state.customTimeStr.value,
|
||||
customTime: logic.tabController.index != 2 ||
|
||||
((state.dateEnd == null || state.dateEnd == '') && (state.dateStart == null || state.dateStart == ''))
|
||||
? null
|
||||
: PickerDateRange(
|
||||
state.dateStart == null || state.dateStart == '' ? null : DateTime.parse(state.dateStart!),
|
||||
state.dateEnd == null || state.dateEnd == '' ? null : DateTime.parse(state.dateEnd!),
|
||||
),
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
if (startTime == null && endTime == null) {
|
||||
if (logic.tabController.index == 2) {
|
||||
logic.tabController.animateTo(0);
|
||||
}
|
||||
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
|
||||
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
|
||||
state.customTimeStr.value = '自定义';
|
||||
} else {
|
||||
state.dateStart = startTime ?? '';
|
||||
state.dateEnd = endTime ?? '';
|
||||
}
|
||||
state.page = 1;
|
||||
logic.getList();
|
||||
// _refreshController2.callRefresh();
|
||||
},
|
||||
refreshTime: (value) {
|
||||
if (value != null && value.startDate != null) {
|
||||
state.customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? '';
|
||||
if (value.endDate != null) {
|
||||
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) {
|
||||
state.customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
|
||||
} else {
|
||||
state.dateStart = startTime ?? '';
|
||||
state.dateEnd = endTime ?? '';
|
||||
state.customTimeStr.value = '${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
}),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
state.page = 1;
|
||||
logic.getList();
|
||||
// _refreshController2.callRefresh();
|
||||
},
|
||||
refreshTime: (value) {
|
||||
if (value != null && value.startDate != null) {
|
||||
state.customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? '';
|
||||
if (value.endDate != null) {
|
||||
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) {
|
||||
state.customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
|
||||
} else {
|
||||
state.customTimeStr.value = '${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
|
||||
}
|
||||
}
|
||||
onLoad: () async {
|
||||
if (state.page < state.totalPages) {
|
||||
state.page += 1;
|
||||
logic.getList();
|
||||
}
|
||||
},
|
||||
);
|
||||
}),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
state.page = 1;
|
||||
logic.getList();
|
||||
},
|
||||
onLoad: () async {
|
||||
if (state.page < state.totalPages) {
|
||||
state.page += 1;
|
||||
logic.getList();
|
||||
}
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: state.dataList.value.length,
|
||||
itemBuilder: (context, index) {
|
||||
KnowledgePointsGrasp item = state.dataList[index];
|
||||
|
|
@ -176,7 +174,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
'dateEnd': state.dateEnd,
|
||||
'knowledgeId': item.knowledgeId,
|
||||
'knowledgeName': item.knowledgeName,
|
||||
'subject':state.subject
|
||||
'subject': state.subject
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
|
|
@ -193,9 +191,9 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.knowledgeName,
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||
)),
|
||||
item.knowledgeName,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||
)),
|
||||
Container(
|
||||
width: 49.r,
|
||||
height: 22.r,
|
||||
|
|
@ -211,11 +209,16 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
'${item.count}次',
|
||||
style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor),
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/job_data_right_icon.png',
|
||||
width: 10.r,
|
||||
height: 10.r,
|
||||
SizedBox(width: 1.w),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 2.h),
|
||||
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(
|
||||
title: '正确率:',
|
||||
color: Color(0xFFB2DA93),
|
||||
color: const Color(0xFFB2DA93),
|
||||
percent: item.correctRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
|
|
@ -235,15 +238,15 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
),
|
||||
);
|
||||
})
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
],
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import 'package:making_school_asignment_app/page/global_widget/show_student_list
|
|||
import 'knowledge_points_grasp_detail_logic.dart';
|
||||
|
||||
class KnowledgePointsGraspDetailPage extends StatefulWidget {
|
||||
const KnowledgePointsGraspDetailPage({Key? key}) : super(key: key);
|
||||
const KnowledgePointsGraspDetailPage({super.key});
|
||||
|
||||
@override
|
||||
State<KnowledgePointsGraspDetailPage> createState() => _KnowledgePointsGraspDetailPageState();
|
||||
|
|
@ -70,42 +70,41 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
|||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
onLoad: () async {
|
||||
// getList();
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
onLoad: () async {
|
||||
// getList();
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: state.dataList.length,
|
||||
itemBuilder: (context, index) {
|
||||
KnowledgeReportDetail item = state.dataList[index];
|
||||
|
|
@ -132,32 +131,32 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
|||
children: [
|
||||
Text(
|
||||
item.publishTime.substring(0, 10),
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.homeworkName,
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||
)),
|
||||
item.homeworkName,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||
)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
showImg(item.questionPicture, context);
|
||||
},
|
||||
child: Container(
|
||||
width: 49.r,
|
||||
height: 22.r,
|
||||
padding: EdgeInsets.symmetric(horizontal: 4.w),
|
||||
decoration: BoxDecoration(
|
||||
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: Text(
|
||||
'第${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,
|
||||
height: 20.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFE9FFD9),
|
||||
color: const Color(0xFFE9FFD9),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
quickText('正确率', color: Color(0xFF313131), size: 10.sp),
|
||||
quickText('正确率', color: const Color(0xFF313131), size: 10.sp),
|
||||
Image.asset(
|
||||
'assets/images/job_data_right_icon.png',
|
||||
width: 8.r,
|
||||
|
|
@ -243,12 +242,12 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
|||
),
|
||||
);
|
||||
})
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -57,11 +57,9 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
|||
children: [
|
||||
Text(
|
||||
'客观题',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.r,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(height: 20.r),
|
||||
ProgressBar(
|
||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||
percent: double.parse(widget.kgtCorrectRate) / 100,
|
||||
|
|
@ -80,19 +78,17 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
|||
lineHeight: 10.h,
|
||||
marginEdg: EdgeInsets.only(top: 5.h),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
SizedBox(height: 10.r),
|
||||
SizedBox(
|
||||
height: widget.kgReport.length > 10 ? 300.r : widget.kgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
||||
child: ReportTable(
|
||||
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率','标准答案', '优先批阅概况'],
|
||||
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率', '标准答案', '优先批阅概况'],
|
||||
bodyList: widget.kgReport,
|
||||
fixedCols: 1,
|
||||
fixedRows: 1,
|
||||
jobId: widget.homeworkId,
|
||||
studentCount: widget.studentCount,
|
||||
subject:widget.subject,
|
||||
subject: widget.subject,
|
||||
),
|
||||
),
|
||||
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),
|
||||
),
|
||||
SizedBox(
|
||||
height:10.r,
|
||||
height: 10.r,
|
||||
),
|
||||
SizedBox(
|
||||
height: widget.zgReport.length > 10 ? 300.r : widget.zgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
||||
child: ReportTable(
|
||||
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率', '查看原题', '优先批阅概况','作答效率'],
|
||||
headList: const ['题', '作答率', '作答人数', '作答正确率', '全班正确率', '查看原题', '优先批阅概况', '作答效率'],
|
||||
bodyList: widget.zgReport,
|
||||
fixedCols: 1,
|
||||
fixedRows: 1,
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
contentPadding: EdgeInsets.all(20.r),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
content: SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.5,
|
||||
height: MediaQuery.of(context).size.height * 0.4,
|
||||
|
|
@ -65,49 +64,52 @@ class _ReportTableState extends State<ReportTable> {
|
|||
children: [
|
||||
Text(
|
||||
'作答效率',
|
||||
style: TextStyle(
|
||||
fontSize: 15.sp,
|
||||
color: const Color(0xFF3C3C3C),
|
||||
fontWeight: FontWeight.w500),
|
||||
style: TextStyle(fontSize: 15.sp, color: const Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical:20.r,horizontal: 10.r),
|
||||
padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 10.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
mapIcon(const Color(0xFFB8A1FF)),
|
||||
SizedBox(width: 5.r,),
|
||||
mapIcon(const Color(0xFFB8A1FF)),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
mapTxt('优'),
|
||||
const Spacer(),
|
||||
mapIcon(const Color(0xFF4CC793)),
|
||||
SizedBox(width: 5.r,),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
mapTxt('良'),
|
||||
const Spacer(),
|
||||
mapIcon(const Color(0xFF90E0BE)),
|
||||
SizedBox(width: 5.r,),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
mapTxt('中'),
|
||||
const Spacer(),
|
||||
mapIcon(const Color(0xFFFF6B6B)),
|
||||
SizedBox(width: 5.r,),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
mapTxt('差'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
|
||||
PieChart(
|
||||
child: PieChart(
|
||||
PieChartData(
|
||||
borderData: FlBorderData(show: true),
|
||||
sectionsSpace: 0,
|
||||
centerSpaceRadius: 0,
|
||||
sections: List.generate(overallTitles.length,(index) {
|
||||
sections: List.generate(overallTitles.length, (index) {
|
||||
var e = overallTitles[index];
|
||||
return PieChartSectionData(
|
||||
color: colorMap[index],
|
||||
value: e.count / widget.studentCount * 100,
|
||||
radius: 110,
|
||||
// borderSide:BorderSide(color: const Color(0xFF273366),width: 0.5.r),
|
||||
// borderSide:BorderSide(color: const Color(0xFF273366),width: 0.5.r),
|
||||
// title: e.title + (Utils.doubleToStringAsFixed(e.count / widget.studentCount * 100) + '%'),
|
||||
title: e.title + e.count.toString(),
|
||||
titleStyle: TextStyle(fontSize: 12.sp, color: Color(0xFFFFFFFF)),
|
||||
|
|
@ -151,20 +153,14 @@ class _ReportTableState extends State<ReportTable> {
|
|||
});
|
||||
}
|
||||
|
||||
void showPeopleListDialog(
|
||||
{required BuildContext context,
|
||||
required String title,
|
||||
required String questionNo,
|
||||
required List arr,
|
||||
List? dcList}) {
|
||||
void showPeopleListDialog({required BuildContext context, required String title, required String questionNo, required List arr, List? dcList}) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||
contentPadding: EdgeInsets.all(20.r),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
content: SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.7,
|
||||
height: MediaQuery.of(context).size.height * 0.7,
|
||||
|
|
@ -174,10 +170,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
Center(
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 15.sp,
|
||||
color: const Color(0xFF3C3C3C),
|
||||
fontWeight: FontWeight.w500),
|
||||
style: TextStyle(fontSize: 15.sp, color: const Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
|
@ -187,18 +180,15 @@ class _ReportTableState extends State<ReportTable> {
|
|||
children: [
|
||||
Text(
|
||||
widget.isZG == true ? '主观题' : '客观题',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||
),
|
||||
Text(
|
||||
'―',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||
),
|
||||
Text(
|
||||
'第$questionNo题',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -213,27 +203,21 @@ class _ReportTableState extends State<ReportTable> {
|
|||
child: Center(
|
||||
child: Text(
|
||||
'未作答人',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF6A6A6A)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||
))),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'答对人数',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF6A6A6A)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||
))),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Center(
|
||||
child: Text(
|
||||
'答错人',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF6A6A6A)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||
))),
|
||||
],
|
||||
)
|
||||
|
|
@ -241,8 +225,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
padding: EdgeInsets.only(left: 15.r),
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
|
@ -256,60 +239,41 @@ class _ReportTableState extends State<ReportTable> {
|
|||
var item = arr[index];
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r),
|
||||
color:
|
||||
index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
goQuickCheckPersonalPath(
|
||||
item['noAnswerStudents']
|
||||
.studentId);
|
||||
goQuickCheckPersonalPath(item['noAnswerStudents'].studentId);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
item['noAnswerStudents']
|
||||
?.studentName ??
|
||||
'--',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF323232)),
|
||||
item['noAnswerStudents']?.studentName ?? '--',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||
)))),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
goQuickCheckPersonalPath(
|
||||
item['answerOkStudents']
|
||||
.studentId);
|
||||
goQuickCheckPersonalPath(item['answerOkStudents'].studentId);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
item['answerOkStudents']
|
||||
?.studentName ??
|
||||
'--',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF323232)),
|
||||
item['answerOkStudents']?.studentName ?? '--',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||
)))),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
goQuickCheckPersonalPath(
|
||||
item['answerNgStudents']
|
||||
.studentId);
|
||||
goQuickCheckPersonalPath(item['answerNgStudents'].studentId);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
item['answerNgStudents']
|
||||
?.studentName ??
|
||||
'--',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF323232)),
|
||||
item['answerNgStudents']?.studentName ?? '--',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||
)))),
|
||||
],
|
||||
),
|
||||
|
|
@ -330,16 +294,11 @@ class _ReportTableState extends State<ReportTable> {
|
|||
goQuickCheckPersonalPath(item.studentId);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 5.r, horizontal: 15.r),
|
||||
color: index.isOdd
|
||||
? Colors.white
|
||||
: Color(0xFFF0F0F0),
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 15.r),
|
||||
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||
child: Text(
|
||||
item.studentName! ?? '--',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF323232)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
@ -357,65 +316,56 @@ class _ReportTableState extends State<ReportTable> {
|
|||
|
||||
void goQuickCheckPersonalPath(id) {
|
||||
if (id != null) {
|
||||
Get.toNamed(Routes.studentPersonalPage,
|
||||
arguments: {'studentId': id, 'homeworkId': widget.jobId,'subject':widget.subject});
|
||||
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': id, 'homeworkId': widget.jobId, 'subject': widget.subject});
|
||||
}
|
||||
}
|
||||
|
||||
void zdHandle(BuildContext context, String title, String questionNo,
|
||||
List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
||||
void zdHandle(BuildContext context, String title, String questionNo, List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
||||
List list = [];
|
||||
// Questions student = Questions('','',-1,-1,'',-1,'','',[],-1,-1,[] as double?);
|
||||
if (noAnswerStudents.length > answerNgStudents.length &&
|
||||
noAnswerStudents.length > answerOkStudents.length) {
|
||||
if (noAnswerStudents.length > answerNgStudents.length && noAnswerStudents.length > answerOkStudents.length) {
|
||||
for (int i = 0; i < noAnswerStudents.length; i++) {
|
||||
var obj = {
|
||||
'noAnswerStudents': noAnswerStudents[i],
|
||||
'answerNgStudents':
|
||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||
'answerOkStudents':
|
||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||
'answerOkStudents': answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||
};
|
||||
list.add(obj);
|
||||
}
|
||||
} else if (answerNgStudents.length > noAnswerStudents.length &&
|
||||
answerNgStudents.length > answerOkStudents.length) {
|
||||
} else if (answerNgStudents.length > noAnswerStudents.length && answerNgStudents.length > answerOkStudents.length) {
|
||||
for (int i = 0; i < answerNgStudents.length; i++) {
|
||||
var obj = {
|
||||
'noAnswerStudents':
|
||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||
'answerNgStudents': answerNgStudents[i],
|
||||
'answerOkStudents':
|
||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||
'answerOkStudents': answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||
};
|
||||
list.add(obj);
|
||||
}
|
||||
} else if (answerOkStudents.length > noAnswerStudents.length &&
|
||||
answerOkStudents.length > answerNgStudents.length) {
|
||||
} else if (answerOkStudents.length > noAnswerStudents.length && answerOkStudents.length > answerNgStudents.length) {
|
||||
for (int i = 0; i < answerOkStudents.length; i++) {
|
||||
var obj = {
|
||||
'noAnswerStudents':
|
||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||
'answerNgStudents':
|
||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||
'answerOkStudents': answerOkStudents[i]
|
||||
};
|
||||
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]
|
||||
};
|
||||
list.add(obj);
|
||||
}
|
||||
}
|
||||
|
||||
showPeopleListDialog(
|
||||
context: context,
|
||||
title: title,
|
||||
questionNo: questionNo,
|
||||
arr: list,
|
||||
dcList: []);
|
||||
showPeopleListDialog(context: context, title: title, questionNo: questionNo, arr: list, dcList: []);
|
||||
}
|
||||
|
||||
void dcHandle(
|
||||
BuildContext context, String title, String questionNo, List arr) {
|
||||
showPeopleListDialog(
|
||||
context: context, title: title, questionNo: questionNo, arr: arr);
|
||||
void dcHandle(BuildContext context, String title, String questionNo, List arr) {
|
||||
showPeopleListDialog(context: context, title: title, questionNo: questionNo, arr: arr);
|
||||
}
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
|
|
@ -428,28 +378,18 @@ class _ReportTableState extends State<ReportTable> {
|
|||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo.toString(),
|
||||
style:
|
||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||
child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text('${item.answerRate.toStringAsFixed(0)}%',
|
||||
style:
|
||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||
child: Text('${item.answerRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
zdHandle(
|
||||
context,
|
||||
'作答人数',
|
||||
item.questionNo.toString(),
|
||||
item.noAnswerStudents,
|
||||
item.answerNgStudents,
|
||||
item.answerOkStudents);
|
||||
zdHandle(context, '作答人数', item.questionNo.toString(), item.noAnswerStudents, item.answerNgStudents, item.answerOkStudents);
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
|
|
@ -457,9 +397,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('${item.answerCount}/${widget.studentCount}',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||
Text('${item.answerCount}/${widget.studentCount}', style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||
Image.asset(
|
||||
'assets/images/green_right_icon.png',
|
||||
width: 12.r,
|
||||
|
|
@ -470,19 +408,16 @@ class _ReportTableState extends State<ReportTable> {
|
|||
),
|
||||
),
|
||||
)),
|
||||
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text('${item.correctRate.toStringAsFixed(0)}%',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||
child: Text('${item.correctRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text('${item.okRate.toStringAsFixed(0)}%',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||
child: Text('${item.okRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
|
|
@ -494,30 +429,20 @@ class _ReportTableState extends State<ReportTable> {
|
|||
if (item.questionPicture == null) {
|
||||
ToastUtils.showInfo('当前试题没有原题');
|
||||
} else {
|
||||
ImageDialog.showImgDialog(
|
||||
context, item.questionPicture);
|
||||
ImageDialog.showImgDialog(context, item.questionPicture);
|
||||
}
|
||||
},
|
||||
child: Text('原题',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: widget.isZG == true
|
||||
? const Color(0xFFFF8A00)
|
||||
: Theme.of(context).primaryColor)),
|
||||
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||
)
|
||||
: Text(item.answer,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: widget.isZG == true
|
||||
? const Color(0xFFFF8A00)
|
||||
: Theme.of(context).primaryColor)),
|
||||
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
// List<String> parts = item.priorityGeneral.split('人');
|
||||
dcHandle(context, '优先批阅答错人', item.questionNo.toString(),
|
||||
item.priorityInfo);
|
||||
dcHandle(context, '优先批阅答错人', item.questionNo.toString(), item.priorityInfo);
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
|
|
@ -525,9 +450,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('${item.priorityInfo.length}人答错',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||
Text('${item.priorityInfo.length}人答错', style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||
Image.asset(
|
||||
'assets/images/green_right_icon.png',
|
||||
width: 12.r,
|
||||
|
|
@ -548,18 +471,10 @@ class _ReportTableState extends State<ReportTable> {
|
|||
showAnswerEfficiency(item.overallTitles);
|
||||
},
|
||||
child: Text('查看',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: widget.isZG == true
|
||||
? const Color(0xFFFF8A00)
|
||||
: Theme.of(context).primaryColor)),
|
||||
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||
)
|
||||
: Text(item.answer,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: widget.isZG == true
|
||||
? const Color(0xFFFF8A00)
|
||||
: Theme.of(context).primaryColor)),
|
||||
style: TextStyle(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,
|
||||
bottomMargin: 0,
|
||||
border: const TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: const BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: const Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
minWidth: widget.headList.length > 6
|
||||
? 80.r * widget.headList.length
|
||||
|
|
@ -601,65 +512,75 @@ class _ReportTableState extends State<ReportTable> {
|
|||
columns: List.generate(widget.headList.length, (index) {
|
||||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: index == 3 ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item,
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
||||
SizedBox(width: 2.r,),
|
||||
const Tooltip(
|
||||
message: '答对人数/作答人数',
|
||||
triggerMode: TooltipTriggerMode.tap,
|
||||
preferBelow:false,
|
||||
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
|
||||
],
|
||||
):
|
||||
index == 4 ?Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item,
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
||||
SizedBox(width: 2.r,),
|
||||
const Tooltip(
|
||||
message: '答对人数/总人数',
|
||||
triggerMode: TooltipTriggerMode.tap,
|
||||
preferBelow:false,
|
||||
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
|
||||
],
|
||||
):
|
||||
Center(
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
label: index == 3
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||
SizedBox(
|
||||
width: 2.r,
|
||||
),
|
||||
const Tooltip(
|
||||
message: '答对人数/作答人数',
|
||||
triggerMode: TooltipTriggerMode.tap,
|
||||
preferBelow: false,
|
||||
child: Icon(
|
||||
Icons.info_outline_rounded,
|
||||
color: Colors.grey,
|
||||
)),
|
||||
],
|
||||
)
|
||||
: index == 4
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||
SizedBox(
|
||||
width: 2.r,
|
||||
),
|
||||
const Tooltip(
|
||||
message: '答对人数/总人数',
|
||||
triggerMode: TooltipTriggerMode.tap,
|
||||
preferBelow: false,
|
||||
child: Icon(
|
||||
Icons.info_outline_rounded,
|
||||
color: Colors.grey,
|
||||
)),
|
||||
],
|
||||
)
|
||||
: Center(
|
||||
child: Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: index == 0
|
||||
? 40.r
|
||||
: widget.headList.length > 6
|
||||
? 80.r
|
||||
: isPadFlag
|
||||
? (MediaQuery.of(context).size.width - 8.r) /
|
||||
widget.headList.length
|
||||
? (MediaQuery.of(context).size.width - 8.r) / widget.headList.length
|
||||
: 85.r,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, const Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
||||
Widget mapIcon(Color bgColor){
|
||||
return Container(
|
||||
width: 12.r,
|
||||
height: 12.r,
|
||||
decoration: BoxDecoration(
|
||||
color: bgColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
);
|
||||
Widget mapIcon(Color bgColor) {
|
||||
return Container(
|
||||
width: 12.r,
|
||||
height: 12.r,
|
||||
decoration: BoxDecoration(
|
||||
color: bgColor,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget mapTxt(String title) {
|
||||
return Text(
|
||||
title,
|
||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFF525252), fontWeight: FontWeight.w400),
|
||||
);
|
||||
}
|
||||
Widget mapTxt(String title){
|
||||
return Text(title,style: TextStyle(fontSize: 12.sp,color: Color(0xFF525252),fontWeight: FontWeight.w400),);
|
||||
}
|
||||
|
|
@ -22,26 +22,38 @@ part 'annotate_list.g.dart';
|
|||
class AnnotateList extends StatefulWidget {
|
||||
final int tabIndex;
|
||||
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
|
||||
State<AnnotateList> createState() => _AnnotateListState();
|
||||
}
|
||||
|
||||
class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, SingleTickerProviderStateMixin {
|
||||
class _AnnotateListState extends State<AnnotateList>
|
||||
with RequestToolMixin, SingleTickerProviderStateMixin {
|
||||
late RxString customTimeStr = '自定义'.obs;
|
||||
int active = 1;
|
||||
late RxList<Items> unAnnotateList = RxList();
|
||||
late RxList<Items> annotateList = RxList();
|
||||
late int page = 1;
|
||||
|
||||
late TabController tabController2;
|
||||
|
||||
late TabController tabController2;
|
||||
/* 待阅卷 */
|
||||
late final EasyRefreshController refreshController1;
|
||||
late final EasyRefreshController refreshController2;
|
||||
WorkStudentParams params = WorkStudentParams(assessType: 0, pageSize: 10);
|
||||
WorkStudentParams params2 = WorkStudentParams(assessType: 0, pageSize: 10);
|
||||
WorkStudentParams params = WorkStudentParams(
|
||||
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
|
||||
void initState() {
|
||||
|
|
@ -55,6 +67,7 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
|||
EasyLoading.show(status: 'loading...');
|
||||
getUnAnnotateList();
|
||||
getAnnotateList();
|
||||
|
||||
}
|
||||
|
||||
//待批阅列表
|
||||
|
|
@ -68,7 +81,6 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
|||
EasyLoading.dismiss();
|
||||
print('state.unAnnotateList.length=${unAnnotateList.length}');
|
||||
}
|
||||
|
||||
//已批阅列表
|
||||
void getAnnotateList() async {
|
||||
WorkStudent data = WorkStudent([], 0);
|
||||
|
|
@ -81,7 +93,6 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
|||
EasyLoading.dismiss();
|
||||
print('state.annotateList.length=${annotateList.length}');
|
||||
}
|
||||
|
||||
/// 刷新方法
|
||||
Future<void> onMyRefresh(EasyRefreshController controller, int tab) async {
|
||||
/* params.page = RequestConfig.basePage.page;
|
||||
|
|
@ -116,51 +127,70 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
|||
}*/
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
if (widget.tabIndex == 1)
|
||||
JobConditionFilter(
|
||||
customTimeStr: customTimeStr.value,
|
||||
controller: tabController2,
|
||||
hasAll: true,
|
||||
jobType: 1,
|
||||
customTime: tabController2.index != 3 || (params2.startDate == null && params2.endDate == null)
|
||||
? null
|
||||
: PickerDateRange(
|
||||
params2.startDate == null ? null : DateTime.parse(params2.startDate!),
|
||||
params2.endDate == null ? null : DateTime.parse(params2.endDate!),
|
||||
),
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
if (startTime == null && endTime == null && tabController2.index == 3) {
|
||||
tabController2.animateTo(0);
|
||||
}
|
||||
params2.endDate = endTime;
|
||||
params2.startDate = startTime;
|
||||
page = 1;
|
||||
if (widget.tabIndex == 0) {
|
||||
getUnAnnotateList();
|
||||
} else {
|
||||
getAnnotateList();
|
||||
}
|
||||
// refreshController2.callRefresh();
|
||||
},
|
||||
refreshTime: (value) {
|
||||
if (value != null && value.startDate != null) {
|
||||
customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? '';
|
||||
if(widget.tabIndex == 1)
|
||||
Obx(() {
|
||||
return JobConditionFilter(
|
||||
customTimeStr: customTimeStr.value,
|
||||
controller: tabController2,
|
||||
hasAll: true,
|
||||
jobType: 1,
|
||||
customTime: tabController2.index != 2 ||
|
||||
(params2.startDate == null && params2.endDate == null)
|
||||
? null
|
||||
: PickerDateRange(
|
||||
params2.startDate == null ? null : DateTime.parse(
|
||||
params2.startDate!),
|
||||
params2.endDate == null ? null : DateTime.parse(
|
||||
params2.endDate!),
|
||||
),
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
if (startTime == null && endTime == null &&
|
||||
tabController2.index == 2) {
|
||||
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.startDate = startTime;
|
||||
}
|
||||
page = 1;
|
||||
EasyLoading.show(status: 'loading...');
|
||||
if (widget.tabIndex == 0) {
|
||||
getUnAnnotateList();
|
||||
} else {
|
||||
getAnnotateList();
|
||||
}
|
||||
// refreshController2.callRefresh();
|
||||
},
|
||||
refreshTime: (value) {
|
||||
if (value != null && value.startDate != null) {
|
||||
customTimeStr.value =
|
||||
value.startDate?.toString().substring(0, 10) ?? '';
|
||||
|
||||
if (value.endDate != null) {
|
||||
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) {
|
||||
customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
|
||||
} else {
|
||||
customTimeStr.value = '${customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
|
||||
if (value.endDate != null) {
|
||||
if (!Utils.isPad() &&
|
||||
value.startDate!.year == value.endDate!.year) {
|
||||
customTimeStr.value =
|
||||
'${value.startDate.toString().substring(5, 10)}~${value
|
||||
.endDate.toString().substring(5, 10)}';
|
||||
} else {
|
||||
customTimeStr.value =
|
||||
'${customTimeStr.value}~${value.endDate?.toString()
|
||||
.substring(0, 10)}';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
Expanded(
|
||||
child: IndexedStack(
|
||||
});
|
||||
}),
|
||||
Expanded(child: IndexedStack(
|
||||
index: widget.tabIndex,
|
||||
children: <Widget>[
|
||||
$EasyRefresh(
|
||||
|
|
@ -192,8 +222,10 @@ class _AnnotateListState extends State<AnnotateList> with RequestToolMixin, Sing
|
|||
@swidget
|
||||
Widget $easyRefresh({
|
||||
required EasyRefreshController controller,
|
||||
required Future<void> Function(EasyRefreshController controller, int tab) onRefresh,
|
||||
required Future<void> Function(EasyRefreshController controller, int tab) onLoad,
|
||||
required Future<
|
||||
void> Function(EasyRefreshController controller, int tab) onRefresh,
|
||||
required Future<
|
||||
void> Function(EasyRefreshController controller, int tab) onLoad,
|
||||
required List<Items> data,
|
||||
required int tab,
|
||||
required int type,
|
||||
|
|
@ -213,27 +245,39 @@ Widget $easyRefresh({
|
|||
footer: TaurusFooter(),
|
||||
child: completed && isPadFlag
|
||||
? GridView(
|
||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 1.81 //宽高比为1时,子widget
|
||||
),
|
||||
children: List.generate(data.length, (index) {
|
||||
Items item = data[index];
|
||||
String subjectName = EnumUtils.formatSubject(item.subject);
|
||||
return $reviewedItem(jobTaskItem: item, type: type, subjectName: subjectName, collectFun: collectFun, tabIndex: tab - 1);
|
||||
}),
|
||||
)
|
||||
padding: EdgeInsets.only(
|
||||
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 1.81 //宽高比为1时,子widget
|
||||
),
|
||||
children: List.generate(data.length, (index) {
|
||||
Items item = data[index];
|
||||
String subjectName = EnumUtils.formatSubject(item.subject);
|
||||
return $reviewedItem(jobTaskItem: item,
|
||||
type: type,
|
||||
subjectName: subjectName,
|
||||
collectFun: collectFun,
|
||||
tabIndex: tab - 1);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||
itemBuilder: (context, index) {
|
||||
Items item = data[index];
|
||||
return TaskListItem(completed: completed, jobTaskItem: item, type: type, collectFun: collectFun, tabIndex: tab - 1);
|
||||
},
|
||||
itemCount: data.length,
|
||||
),
|
||||
padding: EdgeInsets.only(
|
||||
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||
itemBuilder: (context, index) {
|
||||
Items item = data[index];
|
||||
return TaskListItem(
|
||||
completed: completed,
|
||||
jobTaskItem: item,
|
||||
type: type,
|
||||
collectFun: collectFun,
|
||||
tabIndex: tab - 1
|
||||
);
|
||||
},
|
||||
itemCount: data.length,
|
||||
),
|
||||
onRefresh: () => onRefresh(controller, tab),
|
||||
onLoad: () => onLoad(controller, tab),
|
||||
);
|
||||
|
|
@ -252,17 +296,18 @@ Widget $reviewedItem({
|
|||
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.annotateClassPage, arguments: {
|
||||
'id': jobTaskItem.id,
|
||||
'name': jobTaskItem.name,
|
||||
'grade': jobTaskItem.grade,
|
||||
'subject': jobTaskItem.subject,
|
||||
'completed': true,
|
||||
'tabIndex': tabIndex
|
||||
});
|
||||
Get.toNamed(Routes.annotateClassPage,
|
||||
arguments: {
|
||||
'id': jobTaskItem.id,
|
||||
'name': jobTaskItem.name,
|
||||
'grade': jobTaskItem.grade,
|
||||
'subject': jobTaskItem.subject,
|
||||
'completed': true,
|
||||
'tabIndex': tabIndex
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(right: 5.w),
|
||||
padding: EdgeInsets.only(top: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
color: Colors.white,
|
||||
|
|
@ -279,38 +324,47 @@ Widget $reviewedItem({
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// 顶部任务名称
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 32.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 2.w),
|
||||
decoration: BoxDecoration(
|
||||
color: type == 1 ? const Color(0xFFB2DA93) : const Color(0xFFEF8714),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(6.r),
|
||||
topRight: Radius.circular(0.r),
|
||||
bottomLeft: Radius.circular(0.r),
|
||||
bottomRight: Radius.circular(12.r),
|
||||
Padding(
|
||||
padding: padEdg,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
children: [
|
||||
Container(
|
||||
width: 32.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 2.w),
|
||||
decoration: BoxDecoration(
|
||||
color: type == 1 ? const Color(0xFF4CC793) : const Color
|
||||
.fromRGBO(255, 175, 56, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(14.r),
|
||||
topRight: Radius.circular(3.r),
|
||||
bottomLeft: Radius.circular(4.r),
|
||||
bottomRight: Radius.circular(4.r),
|
||||
),
|
||||
),
|
||||
margin: EdgeInsets.only(top: 3.h, right: 4.w),
|
||||
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white,
|
||||
size: 10.sp),
|
||||
),
|
||||
margin: EdgeInsets.only(top: 0.h, right: 4.w),
|
||||
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
|
||||
),
|
||||
Expanded(
|
||||
child: quickText(jobTaskItem.name, size: 14.sp, color: const Color.fromRGBO(70, 70, 70, 1), maxLines: 2),
|
||||
),
|
||||
if (jobTaskItem.isFixed!)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 3.r),
|
||||
child: Text(
|
||||
'已订正',
|
||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFFF16262)),
|
||||
Expanded(
|
||||
child: quickText(jobTaskItem.name, size: 14.sp,
|
||||
color: const Color.fromRGBO(70, 70, 70, 1),
|
||||
maxLines: 2),
|
||||
),
|
||||
if (jobTaskItem.isFixed!)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 3.r),
|
||||
child: Text(
|
||||
'已订正',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: const Color(0xFFF16262)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
|
|
@ -319,26 +373,31 @@ Widget $reviewedItem({
|
|||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
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),
|
||||
size: 10.sp,
|
||||
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(
|
||||
'参与班级:',
|
||||
color: const Color(0xFF8C68FF),
|
||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||
size: 9.sp,
|
||||
),
|
||||
quickText(
|
||||
'${jobTaskItem.classCount}',
|
||||
color: const Color(0xFF8C68FF),
|
||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||
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(
|
||||
'科目:$subjectName',
|
||||
color: const Color(0xFF8C68FF),
|
||||
color: const Color.fromRGBO(116, 145, 253, 1),
|
||||
size: 9.sp,
|
||||
),
|
||||
],
|
||||
|
|
@ -355,7 +414,8 @@ Widget $reviewedItem({
|
|||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||
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,
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
|
|
@ -367,7 +427,7 @@ Widget $reviewedItem({
|
|||
],
|
||||
),
|
||||
child: Row(children: [
|
||||
/*if (!jobTaskItem.isFixed!)
|
||||
if (!jobTaskItem.isFixed!)
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: GestureDetector(
|
||||
|
|
@ -381,23 +441,31 @@ Widget $reviewedItem({
|
|||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
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(0xFF8C68FF), size: 11.sp),
|
||||
child: quickText(
|
||||
'收集订正', color: const Color(0xFF4CC793), size: 11.sp),
|
||||
),
|
||||
),
|
||||
),*/
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
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(
|
||||
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() {
|
||||
super.onInit();
|
||||
state.studentId = Get.arguments['studentId'];
|
||||
state.subject = Get.arguments['subject']??-1;
|
||||
state.subject = Get.arguments['subject'] ?? -1;
|
||||
state.homeworkId = Get.arguments['homeworkId'];
|
||||
getInfo();
|
||||
}
|
||||
|
||||
void getInfo() async {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import 'package:making_school_asignment_app/routes/app_pages.dart';
|
|||
import 'student_personal_logic.dart';
|
||||
|
||||
class StudentPersonalPage extends StatefulWidget {
|
||||
const StudentPersonalPage({Key? key}) : super(key: key);
|
||||
const StudentPersonalPage({super.key});
|
||||
|
||||
@override
|
||||
State<StudentPersonalPage> createState() => _StudentPersonalPageState();
|
||||
|
|
@ -54,8 +54,11 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
|||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName,'subject':state.subject});
|
||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||
'studentId': state.studentInfo.value.studentId,
|
||||
'studentName': state.studentInfo.value.studentName,
|
||||
'subject': state.subject
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
|
|
|
|||
|
|
@ -31,13 +31,44 @@ class StudentWorkDetailLogic extends GetxController with RequestToolMixin, GetSi
|
|||
studentId: state.studentId,
|
||||
dateStart: state.dateStart,
|
||||
dateEnd: state.dateEnd,
|
||||
subject:state.subject,
|
||||
subject: state.subject,
|
||||
pageNumber: state.page,
|
||||
pageSize: 10,
|
||||
);
|
||||
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;
|
||||
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;
|
||||
for (var item in element.kgtList) {
|
||||
if (item.state == 0) {
|
||||
|
|
@ -52,7 +83,12 @@ class StudentWorkDetailLogic extends GetxController with RequestToolMixin, GetSi
|
|||
if (num == (element.kgtList.length + element.zgtList.length)) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,4 +17,7 @@ class StudentWorkDetailState {
|
|||
late RxString customTimeStr = '自定义'.obs;
|
||||
late Rx<StudentHistory> studentData = Rx(StudentHistory(0, 0, Items([], 0), 0));
|
||||
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_easyloading/flutter_easyloading.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/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/line_chart.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:syncfusion_flutter_datepicker/datepicker.dart';
|
||||
|
|
@ -124,16 +126,22 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
/* Text(
|
||||
'总览:',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Theme.of(context).primaryColor,
|
||||
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(
|
||||
title: '客观题正确率:',
|
||||
color:Theme.of(context).primaryColor,
|
||||
color:const Color(0xFF4DE6BF),
|
||||
percent: state.studentData.value.kgtCorrectRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
|
|
@ -145,7 +153,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
ProgressBar(
|
||||
title: '总正确率:',
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: const Color(0xFF1890FF),
|
||||
percent: state.studentData.value.correctRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
|
|
@ -153,6 +161,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
),
|
||||
);
|
||||
}),
|
||||
|
||||
Obx(() {
|
||||
return JobConditionFilter(
|
||||
controller: logic.tabController,
|
||||
|
|
@ -221,8 +230,8 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
height: 10.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||
// color: Color(0xFF4CC793),
|
||||
border: Border.all(width: 1.r, color: Theme.of(context).primaryColor),
|
||||
color: const Color(0xFF00B386),
|
||||
border: Border.all(width: 1.r, color: const Color(0xFF00B386)),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
|
@ -240,8 +249,8 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
height: 10.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||
// color: Color(0xFFFF7474),
|
||||
border: Border.all(width: 1.r, color: Color(0xFFFF7474)),
|
||||
color: const Color(0xFFCB191B),
|
||||
border: Border.all(width: 1.r, color: const Color(0xFFCB191B)),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
|
@ -422,7 +431,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
'客:',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF5B5B5B)),
|
||||
color: const Color(0xFF5B5B5B)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
|
|
@ -444,16 +453,18 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
width: 25.r,
|
||||
height: 25.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
color: subjective.state == 3
|
||||
?const Color(0xFF00B386):subjective.state == 2
|
||||
? const Color(0xFFCB191B):Colors.transparent,
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: subjective.state == 0
|
||||
? Color(0xFFDDDDDD)
|
||||
? const Color(0xFFDDDDDD)
|
||||
: subjective.state == 3
|
||||
?Theme.of(context).primaryColor
|
||||
?const Color(0xFF00B386)
|
||||
: subjective.state == 2
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF666666)),
|
||||
? const Color(0xFFCB191B)
|
||||
: const Color(0xFF666666)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(12.5.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
|
|
@ -464,16 +475,15 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
color: subjective
|
||||
.state ==
|
||||
0
|
||||
? Color(
|
||||
? const Color(
|
||||
0xFFDDDDDD)
|
||||
: subjective.state ==
|
||||
3
|
||||
? Theme.of(context).primaryColor
|
||||
? Colors.white
|
||||
: subjective.state ==
|
||||
2
|
||||
? Color(
|
||||
0xFFFF7474)
|
||||
: Color(
|
||||
?Colors.white
|
||||
: const Color(
|
||||
0xFF666666)),
|
||||
)),
|
||||
);
|
||||
|
|
@ -484,7 +494,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
'无',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF5B5B5B)),
|
||||
color: const Color(0xFF5B5B5B)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -499,7 +509,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
'主:',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF5B5B5B)),
|
||||
color: const Color(0xFF5B5B5B)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
|
|
@ -521,16 +531,18 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
width: 25.r,
|
||||
height: 25.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
color: subjective.state == 3
|
||||
? const Color(0xFF00B386):subjective.state == 2
|
||||
? const Color(0xFFCB191B):Colors.transparent,
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: subjective.state == 0
|
||||
? Color(0xFFDDDDDD)
|
||||
? const Color(0xFFDDDDDD)
|
||||
: subjective.state == 3
|
||||
? Theme.of(context).primaryColor
|
||||
? const Color(0xFF00B386)
|
||||
: subjective.state == 2
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF666666)),
|
||||
? const Color(0xFFCB191B)
|
||||
: const Color(0xFF666666)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(12.5.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
|
|
@ -541,16 +553,15 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
color: subjective
|
||||
.state ==
|
||||
0
|
||||
? Color(
|
||||
? const Color(
|
||||
0xFFDDDDDD)
|
||||
: subjective.state ==
|
||||
3
|
||||
? Theme.of(context).primaryColor
|
||||
? Colors.white
|
||||
: subjective.state ==
|
||||
2
|
||||
? Color(
|
||||
0xFFFF7474)
|
||||
: Color(
|
||||
? Colors.white
|
||||
: const Color(
|
||||
0xFF666666)),
|
||||
)),
|
||||
);
|
||||
|
|
@ -561,25 +572,25 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
'无',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF5B5B5B)),
|
||||
color: const Color(0xFF5B5B5B)),
|
||||
),
|
||||
],
|
||||
),
|
||||
ProgressBar(
|
||||
title: '客观题正确率:',
|
||||
color: Color(0xFFB2DA93),
|
||||
color: const Color(0xFFB2DA93),
|
||||
percent: item.kgtCorrectRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
ProgressBar(
|
||||
title: '主观题正确率:',
|
||||
color: Color(0xFFB2DA93),
|
||||
color: const Color(0xFFB2DA93),
|
||||
percent: item.zgtCorrectRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
ProgressBar(
|
||||
title: '总正确率:',
|
||||
color: Color(0xFFB2DA93),
|
||||
color: const Color(0xFFB2DA93),
|
||||
percent: item.correctRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
|
|
|
|||
|
|
@ -70,14 +70,14 @@ class _JobConditionFilterState extends State<JobConditionFilter> {
|
|||
customTimeStr: widget.customTimeStr,
|
||||
hasAll: widget.hasAll,
|
||||
onTap: (int val) async {
|
||||
if (val == 0 && widget.hasAll == true) {
|
||||
if (val == 3 && widget.hasAll == true) {
|
||||
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(
|
||||
Utils.getWeekStartDate().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(
|
||||
getMonthStartDate().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),
|
||||
],*/
|
||||
);
|
||||
}
|
||||
|
|
@ -13,10 +13,10 @@ class PersonalDetailTopBar extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
||||
@override
|
||||
void initState(){
|
||||
super.initState();
|
||||
}
|
||||
@override
|
||||
void initState(){
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -33,26 +33,26 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
|||
labelStyle: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: const Color(0xFF8C68FF),
|
||||
color: const Color(0xFF4CC793),
|
||||
),
|
||||
isScrollable: true,
|
||||
labelColor:const Color(0xFF8C68FF),
|
||||
labelColor: const Color(0xFF4CC793),
|
||||
unselectedLabelColor: const Color(0xFF505E6E),
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||
onTap: widget.onTap,
|
||||
indicator: UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
width: 2.r,
|
||||
color:const Color(0xFF8C68FF)
|
||||
width: 2.r,
|
||||
color:const Color(0xFF4CC793)
|
||||
),
|
||||
),
|
||||
tabs: <Widget>[
|
||||
if(widget.hasAll == true)
|
||||
const Tab(text: '全部'),
|
||||
const Tab(text: '近一周'),
|
||||
const Tab(text: '近一月'),
|
||||
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,
|
||||
),
|
||||
Expanded(
|
||||
child:
|
||||
menuItem(bgImg: 'assets/images/home_bg_02.png', name: '知识点点掌握', url: Routes.studentHistoryWorkPage, page: 'points'),
|
||||
child: menuItem(bgImg: 'assets/images/home_bg_02.png', name: '知识点掌握', url: Routes.studentHistoryWorkPage, page: 'points'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import app_installer
|
||||
import app_settings
|
||||
import auto_updater_macos
|
||||
import connectivity_plus
|
||||
import device_info_plus
|
||||
|
|
@ -14,6 +16,8 @@ import sqflite
|
|||
import url_launcher_macos
|
||||
|
||||
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"))
|
||||
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
||||
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
|
||||
# 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.
|
||||
version: 1.0.0+1
|
||||
version: 1.0.4+5
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.1 <4.0.0'
|
||||
|
|
@ -48,7 +48,7 @@ dependencies:
|
|||
# http请求插件
|
||||
dio: ^5.4.2+1
|
||||
# 网络缓存图片
|
||||
cached_network_image: ^3.3.1
|
||||
cached_network_image: ^3.2.1
|
||||
# 上拉加载和下拉刷新的组件
|
||||
flutter_easyrefresh: ^2.2.2
|
||||
photo_view: ^0.15.0
|
||||
|
|
@ -75,7 +75,7 @@ dependencies:
|
|||
badges: ^3.1.2
|
||||
# 图表
|
||||
fl_chart: ^0.68.0
|
||||
data_table_2: ^2.5.10
|
||||
data_table_2: 2.5.10
|
||||
flutter_staggered_grid_view: ^0.7.0
|
||||
dropdown_button2: ^2.3.9
|
||||
syncfusion_flutter_datepicker: ^25.2.5
|
||||
|
|
@ -97,28 +97,28 @@ dependencies:
|
|||
icons_launcher: ^2.1.7
|
||||
app_settings: ^5.1.1
|
||||
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:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^4.0.0
|
||||
retrofit_generator: ^9.0.0
|
||||
retrofit_generator: ^8.1.0
|
||||
build_runner: ^2.4.10
|
||||
json_serializable: ^6.6.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
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter packages.
|
||||
# dependency_overrides:
|
||||
# collection: ^1.19.0
|
||||
|
||||
flutter:
|
||||
|
||||
# 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::Size size(1280, 720);
|
||||
Win32Window::Size size(700, 900);
|
||||
if (!window.Create(L"making_school_asignment_app", origin, size)) {
|
||||
if (!window.Create(L"", origin, size)) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
window.SetQuitOnClose(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue