2026.7.1 重点作业修改
parent
457ae0089a
commit
94e77e2b04
Binary file not shown.
|
After Width: | Height: | Size: 370 KiB |
|
|
@ -26,7 +26,7 @@ class HiddenDangerTabPage extends StatefulWidget {
|
||||||
|
|
||||||
class _HiddenDangerTabPageState extends State<HiddenDangerTabPage> {
|
class _HiddenDangerTabPageState extends State<HiddenDangerTabPage> {
|
||||||
|
|
||||||
final String bannerAsset = 'assets/images/key_tasks_banner.jpg';
|
final String bannerAsset = 'assets/images/hidden_danger_banner.png';
|
||||||
late List<AppSection> defaultSections;
|
late List<AppSection> defaultSections;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -657,7 +657,7 @@ class _KeyTasksHiddenDangerDetailState extends State<KeyTasksHiddenDangerDetail>
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
_buildInfoItem(
|
_buildInfoItem(
|
||||||
'下发人',
|
'下发人',
|
||||||
pd["hiddenPenaltyCO"]['penalizedUserName'] ?? '',
|
pd["hiddenPenaltyCO"]['findUserName'] ?? '',
|
||||||
),
|
),
|
||||||
Divider(height: 1),
|
Divider(height: 1),
|
||||||
_buildInfoItem(
|
_buildInfoItem(
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import 'package:qhd_prevention/customWidget/ItemWidgetFactory.dart';
|
||||||
import 'package:qhd_prevention/customWidget/center_multi_picker.dart';
|
import 'package:qhd_prevention/customWidget/center_multi_picker.dart';
|
||||||
|
|
||||||
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
import 'package:qhd_prevention/customWidget/custom_button.dart';
|
||||||
|
import 'package:qhd_prevention/customWidget/dotted_border_box.dart';
|
||||||
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
import 'package:qhd_prevention/customWidget/item_list_widget.dart';
|
||||||
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
import 'package:qhd_prevention/customWidget/toast_util.dart';
|
||||||
import 'package:qhd_prevention/http/ApiService.dart';
|
import 'package:qhd_prevention/http/ApiService.dart';
|
||||||
|
|
@ -54,6 +55,9 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
|
|
||||||
// 添加一个 key 的状态变量
|
// 添加一个 key 的状态变量
|
||||||
GlobalKey _mapPreviewKey = GlobalKey();
|
GlobalKey _mapPreviewKey = GlobalKey();
|
||||||
|
// 处罚人员设置
|
||||||
|
late List<dynamic> inspectorList = [];
|
||||||
|
bool _isEdit = false; // 禁止修改
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -297,6 +301,75 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
if(inspectorList.isNotEmpty)...[
|
||||||
|
const SizedBox(height: 6,),
|
||||||
|
Card(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
left: 10,
|
||||||
|
right: 10,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 3,
|
||||||
|
height: 15,
|
||||||
|
color: Colors.blue,
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
"处罚人员设置",
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// if (widget.type==2)
|
||||||
|
// CustomButton(
|
||||||
|
// text: " 添加 ",
|
||||||
|
// height: 30,
|
||||||
|
// padding: const EdgeInsets.symmetric(
|
||||||
|
// vertical: 2,
|
||||||
|
// horizontal: 5,
|
||||||
|
// ),
|
||||||
|
// backgroundColor: Colors.blue,
|
||||||
|
// onPressed: () {
|
||||||
|
// _addInspector();
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 10),
|
||||||
|
ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: inspectorList.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return _personUnitItem(
|
||||||
|
inspectorList[index],
|
||||||
|
index,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
if(widget.type==2)...[
|
if(widget.type==2)...[
|
||||||
const SizedBox(height: 10,),
|
const SizedBox(height: 10,),
|
||||||
CustomButton(
|
CustomButton(
|
||||||
|
|
@ -555,7 +628,62 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
return Padding(padding: EdgeInsets.all(8), child: Center(child: Text(text, style: TextStyle(fontWeight: FontWeight.bold))));
|
return Padding(padding: EdgeInsets.all(8), child: Center(child: Text(text, style: TextStyle(fontWeight: FontWeight.bold))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _personUnitItem(Map item, int index) {
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
child: DottedBorderBox(
|
||||||
|
child: SizedBox(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
ItemListWidget.selectableLineTitleTextRightButton(
|
||||||
|
isRequired: _isEdit,
|
||||||
|
label: '处罚人部门:',
|
||||||
|
isEditable: _isEdit,
|
||||||
|
onTapClean: () {
|
||||||
|
ToastUtil.showNormal(context, '已清除');
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
text: item['departmentName'] ?? '请选择',
|
||||||
|
onTap: () {
|
||||||
|
// chooseUnitHandle('$index', null, true,);//_isLoginJGD ? {'enterpriseType': [1, 2],} : null, true,);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Divider(),
|
||||||
|
ItemListWidget.selectableLineTitleTextRightButton(
|
||||||
|
isRequired: _isEdit,
|
||||||
|
label: '处罚人:',
|
||||||
|
isEditable: _isEdit,
|
||||||
|
text: item['userName'] ?? '请选择',
|
||||||
|
onTap: () {
|
||||||
|
// choosePersonHandle('$index');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (index > 0 && _isEdit)
|
||||||
|
// Positioned(
|
||||||
|
// top: 0,
|
||||||
|
// left: 0,
|
||||||
|
// child: GestureDetector(
|
||||||
|
// onTap: () => _removeCheckPerson(index),
|
||||||
|
// child: Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Colors.red,
|
||||||
|
// borderRadius: BorderRadius.circular(12),
|
||||||
|
// ),
|
||||||
|
// padding: const EdgeInsets.all(4),
|
||||||
|
// child: const Icon(Icons.close, size: 10, color: Colors.white),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
String _getHouseAssignment(final item) {
|
String _getHouseAssignment(final item) {
|
||||||
|
|
@ -707,6 +835,11 @@ class _KeyTasksConfirmDetailPageState extends State<KeyTasksConfirmDetailPage> {
|
||||||
upKeyTasksData["longitude"]=pd['longitude']??'';
|
upKeyTasksData["longitude"]=pd['longitude']??'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((pd['keyProjectPenaltyPersonnelList']??[]).isNotEmpty){
|
||||||
|
inspectorList.addAll(pd['keyProjectPenaltyPersonnelList']);
|
||||||
|
upKeyTasksData['keyProjectPenaltyPersonnelAddCmdList'] = inspectorList;
|
||||||
|
}
|
||||||
|
|
||||||
final fileData = await FileApi.getImagePath(pd['keyProjectId'], UploadFileType.keyProjectSafetyManagementAgreement);
|
final fileData = await FileApi.getImagePath(pd['keyProjectId'], UploadFileType.keyProjectSafetyManagementAgreement);
|
||||||
if (fileData['success']) {
|
if (fileData['success']) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue