数据快查

This commit is contained in:
machuanyu 2024-07-03 10:46:05 +08:00
parent 04a9c53699
commit 77b08d935d
9 changed files with 26 additions and 17 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -12,6 +12,7 @@ class ItemBtn extends StatelessWidget {
return SizedBox( return SizedBox(
height:25.r, height:25.r,
child: ElevatedButton( child: ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
overlayColor:WidgetStateProperty.all( overlayColor:WidgetStateProperty.all(
const Color(0xFFE8E8E8)), const Color(0xFFE8E8E8)),
@ -26,7 +27,9 @@ class ItemBtn extends StatelessWidget {
)), )),
padding: WidgetStateProperty.all( padding: WidgetStateProperty.all(
EdgeInsets.zero, EdgeInsets.zero,
)), ),
elevation: WidgetStateProperty.all(0),
),
onPressed: () { onPressed: () {
clickFunction!(); clickFunction!();
}, },

View File

@ -18,6 +18,7 @@ class _PersonnelDataOverviewState extends State<PersonnelDataOverview> {
List<String> noAnswerCounts = []; List<String> noAnswerCounts = [];
List<String> rankings = []; List<String> rankings = [];
Map<String, List<dynamic>> mapData = {}; Map<String, List<dynamic>> mapData = {};
final scrollController = ScrollController();
@override @override
void initState() { void initState() {
@ -64,12 +65,14 @@ class _PersonnelDataOverviewState extends State<PersonnelDataOverview> {
Scrollbar( Scrollbar(
thickness: 8.w, thickness: 8.w,
thumbVisibility: true, thumbVisibility: true,
trackVisibility: true, // trackVisibility: true,
radius: Radius.circular(10.r), radius: Radius.circular(10.r),
controller: ScrollController(), //使 controller: scrollController, //使
child: SingleChildScrollView( child: SingleChildScrollView(
controller: scrollController,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
primary: true, // primary: true,
// physics: const BouncingScrollPhysics(),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [

View File

@ -25,7 +25,7 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
showList.value = widget.jobData!; showList.value = [...widget.jobData!];
for (var e in widget.jobData!) { for (var e in widget.jobData!) {
if (e.priorityAnnotate!) { if (e.priorityAnnotate!) {
followList.add(e); followList.add(e);
@ -47,18 +47,21 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
sortType.value = !sortType.value;
sortLevel.value = false;
if (widget.jobData == null) return; if (widget.jobData == null) return;
showList.value = [...widget.jobData!];
if (!sortType.value) { if (!sortType.value) {
showList.sort((a, b) {
return a.state.compareTo(b.state);
});
} else {
showList.sort((a, b) { showList.sort((a, b) {
return b.state.compareTo(a.state); return b.state.compareTo(a.state);
}); });
} else {
showList.sort((a, b) {
return a.state.compareTo(b.state);
});
} }
sortType.value = !sortType.value;
sortLevel.value = false;
}, },
child: Obx(() { child: Obx(() {
return Row( return Row(
@ -94,16 +97,16 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
if (widget.jobData!.isEmpty) return; if (widget.jobData!.isEmpty) return;
if (!sortLevel.value) { if (!sortLevel.value) {
showList.value = followList.value; showList.value = followList.value;
sortType.value = false;
} else { } else {
widget.jobData!.sort((a, b) { showList.value = [...widget.jobData!];
int num1 = a.state; showList.sort((a, b) {
int num2 = b.state; return b.state.compareTo(a.state);
return num2.compareTo(num1);
}); });
showList.value = widget.jobData!;
sortType.value = true;
} }
sortLevel.value = !sortLevel.value; sortLevel.value = !sortLevel.value;
sortType.value = false;
}, },
child: Obx(() { child: Obx(() {
return Row( return Row(