Commit c7a2c67d by York

样式 历史问题调整 增加提示性语言

parent e9d7e7c9
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
class Api { class Api {
static var IS_DEBUG = true; static var IS_DEBUG = true;
// static String URL = static String URL =
// IS_DEBUG ? "https://special.sxyztech.cn/" : "http://192.168.19.165:2222/"; IS_DEBUG ? "https://special.sxyztech.cn/" : "http://192.168.19.165:2222/";
///演示 ip ///演示 ip
// static String URL = "http://47.92.138.92:8009/"; // static String URL = "http://47.92.138.92:8009/";
// static String URL = "http://192.168.19.164:8087/"; // static String URL = "http://192.168.19.165:2222/";
static String URL = "http://192.168.19.215:8181/"; // static String URL = "http://192.168.19.215:8181/";
static String START_URL = "special/a/", static String START_URL = "special/a/",
END_URL = "__ajax=true&mobileLogin=true"; END_URL = "__ajax=true&mobileLogin=true";
......
...@@ -1311,11 +1311,12 @@ class HttpUtils { ...@@ -1311,11 +1311,12 @@ class HttpUtils {
} }
///获取练习题库 ///获取练习题库
static Future getTestQuestions( static Future getTestQuestions(BuildContext context, typeId, positionType,
BuildContext context, typeId, questionNum, dxNum, pdNum) async { questionNum, dxNum, pdNum) async {
Map<String, dynamic> params = { Map<String, dynamic> params = {
'user.id': StorageUtil.getInstance().getUserId(), 'user.id': StorageUtil.getInstance().getUserId(),
'type.id': typeId, 'type.id': typeId,
'positionType': positionType,
'questionNum': questionNum, 'questionNum': questionNum,
'dxNum': dxNum, 'dxNum': dxNum,
'pdNum': pdNum 'pdNum': pdNum
......
class RoleList {
String? id;
String? name;
}
...@@ -87,7 +87,7 @@ class _ExamResultPageState extends State<ExamResultPage> { ...@@ -87,7 +87,7 @@ class _ExamResultPageState extends State<ExamResultPage> {
])), ])),
), ),
Container( Container(
height: 300, height: 350,
width: double.infinity, width: double.infinity,
margin: margin:
const EdgeInsets.only(top: 5, left: 15, right: 15, bottom: 15), const EdgeInsets.only(top: 5, left: 15, right: 15, bottom: 15),
...@@ -98,28 +98,34 @@ class _ExamResultPageState extends State<ExamResultPage> { ...@@ -98,28 +98,34 @@ class _ExamResultPageState extends State<ExamResultPage> {
), ),
child: Column( child: Column(
children: [ children: [
const Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Container(
height: 40,
),
const Text(
'—————— ', '—————— ',
style: TextStyle(color: ColorConst.grayf5Color), style: TextStyle(color: ColorConst.grayf5Color),
), ),
Text('本次考核成绩'), const Text(
Text( '本次考核成绩',
style: TextStyle(fontSize: 16),
),
const Text(
' ——————', ' ——————',
style: TextStyle(color: ColorConst.grayf5Color), style: TextStyle(color: ColorConst.grayf5Color),
) )
], ],
), ),
const SizedBox(height: 10), // const SizedBox(height: 10),
Text( Text(
examResultDataBo!.score!.round().toString(), examResultDataBo!.score!.round().toString(),
style: TextStyle( style: TextStyle(
color: examResultDataBo!.score! >= 90 color: examResultDataBo!.score! >= 90
? Colors.green ? Colors.green
: Colors.red, : Colors.red,
fontSize: 20, fontSize: 50,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
......
...@@ -37,11 +37,13 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin { ...@@ -37,11 +37,13 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin {
List<ExamQuestionTestList>? examQuestionDList = []; //选择题 List<ExamQuestionTestList>? examQuestionDList = []; //选择题
List<ExamQuestionTestList>? examQuestionPList = []; //判断题 List<ExamQuestionTestList>? examQuestionPList = []; //判断题
TestSubmitBo? mTestSubmitBo; TestSubmitBo? mTestSubmitBo;
var positionType = '';
@override @override
void initState() { void initState() {
super.initState(); super.initState();
mTestSubmitBo = widget.arguments['mTestSubmitBo']; mTestSubmitBo = widget.arguments['mTestSubmitBo'];
positionType = widget.arguments['positionType'];
getQuestionsData(); getQuestionsData();
_controller = AnimationController( _controller = AnimationController(
...@@ -57,7 +59,7 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin { ...@@ -57,7 +59,7 @@ class TestPageState extends State<TestPage> with TickerProviderStateMixin {
///获取考核试卷 ///获取考核试卷
void getQuestionsData() { void getQuestionsData() {
HttpUtils.getTestQuestions( HttpUtils.getTestQuestions(
context, mTestSubmitBo!.mEquiList!.id, "0", "0", "0") context, mTestSubmitBo!.mEquiList!.id, positionType, "0", "0", "0")
.then((value) { .then((value) {
TestQuestionsBo listBo = value; TestQuestionsBo listBo = value;
if (mounted) { if (mounted) {
......
...@@ -40,6 +40,7 @@ import 'package:special_equipment_flutter/widgets/custom_button.dart'; ...@@ -40,6 +40,7 @@ import 'package:special_equipment_flutter/widgets/custom_button.dart';
import 'package:special_equipment_flutter/widgets/divider_custom.dart'; import 'package:special_equipment_flutter/widgets/divider_custom.dart';
import 'package:special_equipment_flutter/widgets/easy_refresh_header1.dart'; import 'package:special_equipment_flutter/widgets/easy_refresh_header1.dart';
import 'package:special_equipment_flutter/widgets/emptyI_img_widget.dart'; import 'package:special_equipment_flutter/widgets/emptyI_img_widget.dart';
import 'package:special_equipment_flutter/widgets/tip.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../../common/color_const.dart'; import '../../common/color_const.dart';
...@@ -170,6 +171,7 @@ class _HomePageState extends State<HomePage> ...@@ -170,6 +171,7 @@ class _HomePageState extends State<HomePage>
BannerListBo mBannerListBo = value; BannerListBo mBannerListBo = value;
if (mounted) { if (mounted) {
setState(() { setState(() {
bannerList!.clear();
List<Data>? mList = mBannerListBo.data; List<Data>? mList = mBannerListBo.data;
for (var item in mList!) { for (var item in mList!) {
if (item.advertisPosition == "0") { if (item.advertisPosition == "0") {
...@@ -367,6 +369,11 @@ class _HomePageState extends State<HomePage> ...@@ -367,6 +369,11 @@ class _HomePageState extends State<HomePage>
header: TaurusHeaders(), header: TaurusHeaders(),
onRefresh: () async { onRefresh: () async {
setState(() { setState(() {
// Future.delayed(const Duration(seconds: 2), () {
// // 延迟执行的代码
// getBannerList();
// });
getBannerList();
getCount(); getCount();
getDeviceData(); getDeviceData();
...@@ -975,25 +982,7 @@ class _HomePageState extends State<HomePage> ...@@ -975,25 +982,7 @@ class _HomePageState extends State<HomePage>
// buildTitle(Icons.equalizer, '考核练习'), // buildTitle(Icons.equalizer, '考核练习'),
// buildSliverGridExamination() // buildSliverGridExamination()
if (name == '考核练习') ...[ if (name == '考核练习') ...[
Container( const Tip('小提示:【安全监察人】向各单位开启监督抽查【考核】'),
alignment: Alignment.centerLeft,
margin: const EdgeInsets.only(left: 10, right: 10, top: 10),
padding: const EdgeInsets.only(
left: 5, right: 5, top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.orange[50],
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(5),
topRight: Radius.circular(5),
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5)),
),
child: const Text(
softWrap: true,
'小提示:【安全监察人】会对各单位监督抽查【考核】.',
style: TextStyle(color: Colors.orange, fontSize: 13),
),
),
] ]
], ],
))); )));
...@@ -1656,8 +1645,10 @@ class _HomePageState extends State<HomePage> ...@@ -1656,8 +1645,10 @@ class _HomePageState extends State<HomePage>
// if (value != null && value) {} // if (value != null && value) {}
// }); // });
Get.toNamed(RouteString.TEST_SETTING_PAGE, arguments: {}) Get.toNamed(RouteString.TEST_SETTING_PAGE, arguments: {
?.then((value) { 'roles': roleNamesText(unitId),
'unitType': unitId
})?.then((value) {
if (value != null && value) {} if (value != null && value) {}
}); });
break; break;
...@@ -1886,12 +1877,16 @@ class _HomePageState extends State<HomePage> ...@@ -1886,12 +1877,16 @@ class _HomePageState extends State<HomePage>
centerTitle: true, centerTitle: true,
background: Stack( background: Stack(
children: [ children: [
// Image.asset('assets/home/top_bg_icon.png', if (bannerList!.isEmpty) ...[
// width: MediaQuery.of(context).size.width, fit: BoxFit.fill), Image.asset('assets/banner/banner0.png',
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
fit: BoxFit.fill)
] else ...[
CardSwiper( CardSwiper(
bannerList: bannerList, bannerList: bannerList,
), )
],
Positioned( Positioned(
bottom: SizeConfig.isIpad()! ? 190 : 5, bottom: SizeConfig.isIpad()! ? 190 : 5,
// left: SizeConfig.isIpad()! // left: SizeConfig.isIpad()!
......
...@@ -41,7 +41,7 @@ class EquipmentPersonnelTable extends StatelessWidget { ...@@ -41,7 +41,7 @@ class EquipmentPersonnelTable extends StatelessWidget {
), ),
child: Column( child: Column(
children: [ children: [
buildTitle(Icons.compare, '设备人员对比'), buildTitle(Icons.compare, '设备人员对比表格'),
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
margin: const EdgeInsets.only(left: 5, right: 5, top: 5), margin: const EdgeInsets.only(left: 5, right: 5, top: 5),
...@@ -57,7 +57,7 @@ class EquipmentPersonnelTable extends StatelessWidget { ...@@ -57,7 +57,7 @@ class EquipmentPersonnelTable extends StatelessWidget {
), ),
child: const Text( child: const Text(
softWrap: true, softWrap: true,
'设备人员对比表格,是对比每个设备是否配备了相关负责人员,请在【用户设置】内配置相关负责人员.', '小提示:对比每个设备是否配备了相关负责人员,请在【用户设置】内配置相关负责人员.',
style: TextStyle(color: Colors.orange, fontSize: 13), style: TextStyle(color: Colors.orange, fontSize: 13),
), ),
), ),
......
...@@ -12,6 +12,7 @@ import 'package:special_equipment_flutter/utils/toast_utils.dart'; ...@@ -12,6 +12,7 @@ import 'package:special_equipment_flutter/utils/toast_utils.dart';
import 'package:special_equipment_flutter/widgets/custom_button.dart'; import 'package:special_equipment_flutter/widgets/custom_button.dart';
import 'package:special_equipment_flutter/widgets/custom_textfield.dart'; import 'package:special_equipment_flutter/widgets/custom_textfield.dart';
import 'package:special_equipment_flutter/widgets/divider_custom.dart'; import 'package:special_equipment_flutter/widgets/divider_custom.dart';
import 'package:special_equipment_flutter/widgets/tip.dart';
///公司账号注册 ///公司账号注册
class RegisterPage2 extends StatefulWidget { class RegisterPage2 extends StatefulWidget {
...@@ -118,24 +119,11 @@ class _RegisterPage2State extends State<RegisterPage2> { ...@@ -118,24 +119,11 @@ class _RegisterPage2State extends State<RegisterPage2> {
onChanged: (text) { onChanged: (text) {
if (text.length >= 6) {} if (text.length >= 6) {}
}), }),
Container( const Tip(
width: 1080,
margin: const EdgeInsets.only(left: 5, right: 5, top: 5),
padding:
const EdgeInsets.only(left: 5, right: 5, top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.orange[50],
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(5),
topRight: Radius.circular(5),
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5)),
),
child: const Text(
softWrap: true,
'登录名仅支持字母+数字组合、纯字母、6-20位', '登录名仅支持字母+数字组合、纯字母、6-20位',
style: TextStyle(color: Colors.orange, fontSize: 12), marginTop: 5,
), marginLeft: 5,
marginRight: 5,
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
...@@ -157,23 +145,11 @@ class _RegisterPage2State extends State<RegisterPage2> { ...@@ -157,23 +145,11 @@ class _RegisterPage2State extends State<RegisterPage2> {
controller: passwordText, controller: passwordText,
focusNode: passwordFocusNode, focusNode: passwordFocusNode,
isNoChinese: true), isNoChinese: true),
Container( const Tip(
margin: const EdgeInsets.only(left: 5, right: 5, top: 5),
padding:
const EdgeInsets.only(left: 5, right: 5, top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.orange[50],
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(5),
topRight: Radius.circular(5),
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5)),
),
child: const Text(
softWrap: true,
'密码至少包含以下 5 种类别:大写字母、小写字母、数字、特殊符号( @#*. )、8-20位', '密码至少包含以下 5 种类别:大写字母、小写字母、数字、特殊符号( @#*. )、8-20位',
style: TextStyle(color: Colors.orange, fontSize: 12), marginTop: 5,
), marginLeft: 5,
marginRight: 5,
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
Container( Container(
...@@ -194,6 +170,8 @@ class _RegisterPage2State extends State<RegisterPage2> { ...@@ -194,6 +170,8 @@ class _RegisterPage2State extends State<RegisterPage2> {
controller: okPasswordText, controller: okPasswordText,
focusNode: okPasswordFocusNode, focusNode: okPasswordFocusNode,
isNoChinese: true), isNoChinese: true),
const Tip('请填写简易的【登录名和密码】,避免忘记',
marginTop: 5, marginLeft: 5, marginRight: 5),
const SizedBox(height: 8), const SizedBox(height: 8),
Container( Container(
margin: const EdgeInsets.only(left: 5, right: 5), margin: const EdgeInsets.only(left: 5, right: 5),
......
...@@ -17,6 +17,7 @@ import 'package:special_equipment_flutter/utils/toast_utils.dart'; ...@@ -17,6 +17,7 @@ import 'package:special_equipment_flutter/utils/toast_utils.dart';
import 'package:special_equipment_flutter/widgets/emptyI_img_widget.dart'; import 'package:special_equipment_flutter/widgets/emptyI_img_widget.dart';
import 'package:special_equipment_flutter/widgets/first_refresh_widget.dart'; import 'package:special_equipment_flutter/widgets/first_refresh_widget.dart';
import 'package:special_equipment_flutter/widgets/number_to_chinese.dart'; import 'package:special_equipment_flutter/widgets/number_to_chinese.dart';
import 'package:special_equipment_flutter/widgets/tip.dart';
import '../../../../common/color_const.dart'; import '../../../../common/color_const.dart';
import '../../../../widgets/custom_button.dart'; import '../../../../widgets/custom_button.dart';
...@@ -142,31 +143,17 @@ class _InspectListSyPageState extends State<InspectListSyPage> ...@@ -142,31 +143,17 @@ class _InspectListSyPageState extends State<InspectListSyPage>
backgroundColor: Colors.grey[100], backgroundColor: Colors.grey[100],
body: Column( body: Column(
children: [ children: [
Container( Tip(
alignment: Alignment.centerLeft,
margin: const EdgeInsets.only(left: 10, right: 10, top: 10),
padding:
const EdgeInsets.only(left: 5, right: 5, top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.orange[50],
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(5),
topRight: Radius.circular(5),
bottomLeft: Radius.circular(5),
bottomRight: Radius.circular(5)),
),
child: Text(
softWrap: true,
type == '1' type == '1'
? '小提示:当天新建的设备和用户,会在第二天生成【日管控】任务.' ? '小提示:当天新建的设备和用户,会在第二天生成【日管控】任务'
: type == '2' : type == '2'
? '小提示:【周排查】可在 每周四-周日 完成任务.' ? '小提示:周排查【每周四-周日】完成排查任务'
: type == '3' : type == '3'
? '小提示:【月调度】可在 每月25日-月底 完成任务.' ? '小提示:月调度【每月25日-月底】完成调度任务'
: '', : '',
style: const TextStyle(color: Colors.orange, fontSize: 14), marginTop: 5,
), marginLeft: 10,
), marginRight: 10),
Expanded( Expanded(
flex: 1, flex: 1,
child: EasyRefresh( child: EasyRefresh(
......
...@@ -11,6 +11,7 @@ import 'package:special_equipment_flutter/utils/string_utils.dart'; ...@@ -11,6 +11,7 @@ import 'package:special_equipment_flutter/utils/string_utils.dart';
import 'package:special_equipment_flutter/utils/toast_utils.dart'; import 'package:special_equipment_flutter/utils/toast_utils.dart';
import 'package:special_equipment_flutter/widgets/custom_button.dart'; import 'package:special_equipment_flutter/widgets/custom_button.dart';
import 'package:special_equipment_flutter/widgets/custom_textfield.dart'; import 'package:special_equipment_flutter/widgets/custom_textfield.dart';
import 'package:special_equipment_flutter/widgets/tip.dart';
import '../../../model/user_list.dart'; import '../../../model/user_list.dart';
...@@ -287,6 +288,8 @@ class _UserSettingsPageState extends State<UserSettingsPage> { ...@@ -287,6 +288,8 @@ class _UserSettingsPageState extends State<UserSettingsPage> {
controller: okPasswordText, controller: okPasswordText,
focusNode: okPasswordFocusNode, focusNode: okPasswordFocusNode,
isNoChinese: true), isNoChinese: true),
const Tip('请填写简易的【登录名和密码】,避免忘记',
marginTop: 5, marginLeft: 5, marginRight: 5),
const SizedBox(height: 8), const SizedBox(height: 8),
const Row(children: [ const Row(children: [
Icon(Icons.drive_file_rename_outline_rounded, Icon(Icons.drive_file_rename_outline_rounded,
......
import 'package:flutter/material.dart';
///分割线
class Tip extends StatelessWidget {
final String? text;
final double? marginTop, marginBottom, marginLeft, marginRight;
final MaterialColor? color;
final double? width;
const Tip(this.text,
{super.key,
this.width=double.infinity,
this.color = Colors.orange,
this.marginTop = 10,
this.marginBottom = 0,
this.marginLeft = 10,
this.marginRight = 10});
@override
Widget build(BuildContext context) {
return Container(
width: width!,
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(
top: marginTop!,
bottom: marginBottom!,
left: marginLeft!,
right: marginRight!),
// margin: const EdgeInsets.only(left: 5, right: 10, top: 10),
padding: const EdgeInsets.only(left: 5, right: 5, top: 3, bottom: 3),
decoration: BoxDecoration(
color: Colors.orange[50],
borderRadius: const BorderRadius.all(Radius.circular(5)),
),
child: Text(
softWrap: true,
text!,
style: TextStyle(color: color!, fontSize: 13),
),
);
}
}
...@@ -138,7 +138,8 @@ flutter: ...@@ -138,7 +138,8 @@ flutter:
- assets/examine/no_pass_icon.png - assets/examine/no_pass_icon.png
- assets/examine/examine_gary_icon.png - assets/examine/examine_gary_icon.png
- assets/examine/history_icon.png - assets/examine/history_icon.png
- assets/name.pdf - assets/banner/banner0.png
- assets/banner/banner1.png
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment