对接接口

master
LiuJiaNan 2026-04-07 15:52:33 +08:00
parent ba265470a7
commit a7307c5bc9
79 changed files with 1744 additions and 1005 deletions

View File

@ -30,7 +30,7 @@
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"zy-react-library": "^1.2.20" "zy-react-library": "^1.2.23"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^5.4.1", "@antfu/eslint-config": "^5.4.1",

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const closedCardPortList = declareRequest( export const closedCardPortList = declareRequest(
"closedCardPortLoading", "closedCardPortLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/closedCheckpointInfo/list",
); );
export const closedCardPortInfo = declareRequest( export const closedCardPortInfo = declareRequest(
"closedCardPortLoading", "closedCardPortLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/closedCheckpointInfo/{id}",
); );
export const closedCardPortAdd = declareRequest( export const closedCardPortAdd = declareRequest(
"closedCardPortLoading", "closedCardPortLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/closedCheckpointInfo/save",
); );
export const closedCardPortUpdate = declareRequest( export const closedCardPortUpdate = declareRequest(
"closedCardPortLoading", "closedCardPortLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/closedCheckpointInfo/edit",
); );
export const closedCardPortDelete = declareRequest( export const closedCardPortDelete = declareRequest(
"closedCardPortLoading", "closedCardPortLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/closedCheckpointInfo/{id}",
); );
export const closedCardPortDeleteBatch = declareRequest( export const closedCardPortDeleteBatch = declareRequest(
"closedCardPortLoading", "closedCardPortLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/closedCheckpointInfo/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const communicationGuaranteeOrganizationList = declareRequest( export const communicationGuaranteeOrganizationList = declareRequest(
"communicationGuaranteeOrganizationLoading", "communicationGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/communicationSecurityAgency/list",
); );
export const communicationGuaranteeOrganizationInfo = declareRequest( export const communicationGuaranteeOrganizationInfo = declareRequest(
"communicationGuaranteeOrganizationLoading", "communicationGuaranteeOrganizationLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/communicationSecurityAgency/{id}",
); );
export const communicationGuaranteeOrganizationAdd = declareRequest( export const communicationGuaranteeOrganizationAdd = declareRequest(
"communicationGuaranteeOrganizationLoading", "communicationGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/communicationSecurityAgency/save",
); );
export const communicationGuaranteeOrganizationUpdate = declareRequest( export const communicationGuaranteeOrganizationUpdate = declareRequest(
"communicationGuaranteeOrganizationLoading", "communicationGuaranteeOrganizationLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/communicationSecurityAgency/edit",
); );
export const communicationGuaranteeOrganizationDelete = declareRequest( export const communicationGuaranteeOrganizationDelete = declareRequest(
"communicationGuaranteeOrganizationLoading", "communicationGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/communicationSecurityAgency/{id}",
); );
export const communicationGuaranteeOrganizationDeleteBatch = declareRequest( export const communicationGuaranteeOrganizationDeleteBatch = declareRequest(
"communicationGuaranteeOrganizationLoading", "communicationGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/communicationSecurityAgency/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const drainageWellList = declareRequest( export const drainageWellList = declareRequest(
"drainageWellLoading", "drainageWellLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/drainageWellInfo/list",
); );
export const drainageWellInfo = declareRequest( export const drainageWellInfo = declareRequest(
"drainageWellLoading", "drainageWellLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/drainageWellInfo/{id}",
); );
export const drainageWellAdd = declareRequest( export const drainageWellAdd = declareRequest(
"drainageWellLoading", "drainageWellLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/drainageWellInfo/save",
); );
export const drainageWellUpdate = declareRequest( export const drainageWellUpdate = declareRequest(
"drainageWellLoading", "drainageWellLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/drainageWellInfo/edit",
); );
export const drainageWellDelete = declareRequest( export const drainageWellDelete = declareRequest(
"drainageWellLoading", "drainageWellLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/drainageWellInfo/{id}",
); );
export const drainageWellDeleteBatch = declareRequest( export const drainageWellDeleteBatch = declareRequest(
"drainageWellLoading", "drainageWellLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/drainageWellInfo/ids?ids={ids}",
); );

View File

@ -2,45 +2,45 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const emergencyAddressBookList = declareRequest( export const emergencyAddressBookList = declareRequest(
"emergencyAddressBookLoading", "emergencyAddressBookLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyContactGroup/list",
); );
export const emergencyAddressBookInfo = declareRequest( export const emergencyAddressBookInfo = declareRequest(
"emergencyAddressBookLoading", "emergencyAddressBookLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyContactGroup/{id}",
); );
export const emergencyAddressBookAdd = declareRequest( export const emergencyAddressBookAdd = declareRequest(
"emergencyAddressBookLoading", "emergencyAddressBookLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyContactGroup/save",
); );
export const emergencyAddressBookUpdate = declareRequest( export const emergencyAddressBookUpdate = declareRequest(
"emergencyAddressBookLoading", "emergencyAddressBookLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyContactGroup/edit",
); );
export const emergencyAddressBookDelete = declareRequest( export const emergencyAddressBookDelete = declareRequest(
"emergencyAddressBookLoading", "emergencyAddressBookLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyContactGroup/{id}",
); );
export const emergencyAddressBookMemberList = declareRequest( export const emergencyAddressBookMemberList = declareRequest(
"emergencyAddressBookMemberLoading", "emergencyAddressBookMemberLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyContactPerson/list",
); );
export const emergencyAddressBookMemberInfo = declareRequest( export const emergencyAddressBookMemberInfo = declareRequest(
"emergencyAddressBookMemberLoading", "emergencyAddressBookMemberLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyContactPerson/{id}",
); );
export const emergencyAddressBookMemberAdd = declareRequest( export const emergencyAddressBookMemberAdd = declareRequest(
"emergencyAddressBookMemberLoading", "emergencyAddressBookMemberLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyContactPerson/save",
); );
export const emergencyAddressBookMemberUpdate = declareRequest( export const emergencyAddressBookMemberUpdate = declareRequest(
"emergencyAddressBookMemberLoading", "emergencyAddressBookMemberLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyContactPerson/edit",
); );
export const emergencyAddressBookMemberDelete = declareRequest( export const emergencyAddressBookMemberDelete = declareRequest(
"emergencyAddressBookMemberLoading", "emergencyAddressBookMemberLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyContactPerson/{id}",
); );
export const emergencyAddressBookMemberDeleteBatch = declareRequest( export const emergencyAddressBookMemberDeleteBatch = declareRequest(
"emergencyAddressBookMemberLoading", "emergencyAddressBookMemberLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyContactPerson/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const emergencyEquipmentList = declareRequest( export const emergencyEquipmentList = declareRequest(
"emergencyEquipmentLoading", "emergencyEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyEquipmentManagement/list",
); );
export const emergencyEquipmentInfo = declareRequest( export const emergencyEquipmentInfo = declareRequest(
"emergencyEquipmentLoading", "emergencyEquipmentLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyEquipmentManagement/{id}",
); );
export const emergencyEquipmentAdd = declareRequest( export const emergencyEquipmentAdd = declareRequest(
"emergencyEquipmentLoading", "emergencyEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyEquipmentManagement/save",
); );
export const emergencyEquipmentUpdate = declareRequest( export const emergencyEquipmentUpdate = declareRequest(
"emergencyEquipmentLoading", "emergencyEquipmentLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyEquipmentManagement/edit",
); );
export const emergencyEquipmentDelete = declareRequest( export const emergencyEquipmentDelete = declareRequest(
"emergencyEquipmentLoading", "emergencyEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyEquipmentManagement/{id}",
); );
export const emergencyEquipmentDeleteBatch = declareRequest( export const emergencyEquipmentDeleteBatch = declareRequest(
"emergencyEquipmentLoading", "emergencyEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyEquipmentManagement/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const emergencyRescueTeamList = declareRequest( export const emergencyRescueTeamList = declareRequest(
"emergencyRescueTeamLoading", "emergencyRescueTeamLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueTeamManagement/list",
); );
export const emergencyRescueTeamInfo = declareRequest( export const emergencyRescueTeamInfo = declareRequest(
"emergencyRescueTeamLoading", "emergencyRescueTeamLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyRescueTeamManagement/{id}",
); );
export const emergencyRescueTeamAdd = declareRequest( export const emergencyRescueTeamAdd = declareRequest(
"emergencyRescueTeamLoading", "emergencyRescueTeamLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueTeamManagement/save",
); );
export const emergencyRescueTeamUpdate = declareRequest( export const emergencyRescueTeamUpdate = declareRequest(
"emergencyRescueTeamLoading", "emergencyRescueTeamLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyRescueTeamManagement/edit",
); );
export const emergencyRescueTeamDelete = declareRequest( export const emergencyRescueTeamDelete = declareRequest(
"emergencyRescueTeamLoading", "emergencyRescueTeamLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueTeamManagement/{id}",
); );
export const emergencyRescueTeamDeleteBatch = declareRequest( export const emergencyRescueTeamDeleteBatch = declareRequest(
"emergencyRescueTeamLoading", "emergencyRescueTeamLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueTeamManagement/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const emergencyShelterList = declareRequest( export const emergencyShelterList = declareRequest(
"emergencyShelterLoading", "emergencyShelterLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/placeInfo/list",
); );
export const emergencyShelterInfo = declareRequest( export const emergencyShelterInfo = declareRequest(
"emergencyShelterLoading", "emergencyShelterLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/placeInfo/{id}",
); );
export const emergencyShelterAdd = declareRequest( export const emergencyShelterAdd = declareRequest(
"emergencyShelterLoading", "emergencyShelterLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/placeInfo/save",
); );
export const emergencyShelterUpdate = declareRequest( export const emergencyShelterUpdate = declareRequest(
"emergencyShelterLoading", "emergencyShelterLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/placeInfo/edit",
); );
export const emergencyShelterDelete = declareRequest( export const emergencyShelterDelete = declareRequest(
"emergencyShelterLoading", "emergencyShelterLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/placeInfo/{id}",
); );
export const emergencyShelterDeleteBatch = declareRequest( export const emergencyShelterDeleteBatch = declareRequest(
"emergencyShelterLoading", "emergencyShelterLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/placeInfo/ids?ids={ids}",
); );

View File

@ -2,29 +2,29 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const enterpriseEmergencyOrganizationList = declareRequest( export const enterpriseEmergencyOrganizationList = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/enterpriseEmergencyAgency/list",
); );
export const enterpriseEmergencyOrganizationListAll = declareRequest( export const enterpriseEmergencyOrganizationListAll = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Post > @/emergencyRescue", "Get > /emergencyRescue/enterpriseEmergencyAgency/listAll",
); );
export const enterpriseEmergencyOrganizationInfo = declareRequest( export const enterpriseEmergencyOrganizationInfo = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/enterpriseEmergencyAgency/{id}",
); );
export const enterpriseEmergencyOrganizationAdd = declareRequest( export const enterpriseEmergencyOrganizationAdd = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/enterpriseEmergencyAgency/save",
); );
export const enterpriseEmergencyOrganizationUpdate = declareRequest( export const enterpriseEmergencyOrganizationUpdate = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/enterpriseEmergencyAgency/edit",
); );
export const enterpriseEmergencyOrganizationDelete = declareRequest( export const enterpriseEmergencyOrganizationDelete = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/enterpriseEmergencyAgency/{id}",
); );
export const enterpriseEmergencyOrganizationDeleteBatch = declareRequest( export const enterpriseEmergencyOrganizationDeleteBatch = declareRequest(
"enterpriseEmergencyOrganizationLoading", "enterpriseEmergencyOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/enterpriseEmergencyAgency/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const enterpriseEmergencyPersonnelList = declareRequest( export const enterpriseEmergencyPersonnelList = declareRequest(
"enterpriseEmergencyPersonnelLoading", "enterpriseEmergencyPersonnelLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/enterpriseEmergencyPersonnel/list",
); );
export const enterpriseEmergencyPersonnelInfo = declareRequest( export const enterpriseEmergencyPersonnelInfo = declareRequest(
"enterpriseEmergencyPersonnelLoading", "enterpriseEmergencyPersonnelLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/enterpriseEmergencyPersonnel/{id}",
); );
export const enterpriseEmergencyPersonnelAdd = declareRequest( export const enterpriseEmergencyPersonnelAdd = declareRequest(
"enterpriseEmergencyPersonnelLoading", "enterpriseEmergencyPersonnelLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/enterpriseEmergencyPersonnel/save",
); );
export const enterpriseEmergencyPersonnelUpdate = declareRequest( export const enterpriseEmergencyPersonnelUpdate = declareRequest(
"enterpriseEmergencyPersonnelLoading", "enterpriseEmergencyPersonnelLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/enterpriseEmergencyPersonnel/edit",
); );
export const enterpriseEmergencyPersonnelDelete = declareRequest( export const enterpriseEmergencyPersonnelDelete = declareRequest(
"enterpriseEmergencyPersonnelLoading", "enterpriseEmergencyPersonnelLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/enterpriseEmergencyPersonnel/{id}",
); );
export const enterpriseEmergencyPersonnelDeleteBatch = declareRequest( export const enterpriseEmergencyPersonnelDeleteBatch = declareRequest(
"enterpriseEmergencyPersonnelLoading", "enterpriseEmergencyPersonnelLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/enterpriseEmergencyPersonnel/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const expertEmergencyRescueExpertList = declareRequest( export const expertEmergencyRescueExpertList = declareRequest(
"expertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueExpert/list",
); );
export const expertEmergencyRescueExpertInfo = declareRequest( export const expertEmergencyRescueExpertInfo = declareRequest(
"expertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyRescueExpert/{id}",
); );
export const expertEmergencyRescueExpertAdd = declareRequest( export const expertEmergencyRescueExpertAdd = declareRequest(
"expertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueExpert/save",
); );
export const expertEmergencyRescueExpertUpdate = declareRequest( export const expertEmergencyRescueExpertUpdate = declareRequest(
"expertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyRescueExpert/edit",
); );
export const expertEmergencyRescueExpertDelete = declareRequest( export const expertEmergencyRescueExpertDelete = declareRequest(
"expertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueExpert/{id}",
); );
export const expertEmergencyRescueExpertDeleteBatch = declareRequest( export const expertEmergencyRescueExpertDeleteBatch = declareRequest(
"expertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueExpert/ids?ids={ids}",
); );

View File

@ -2,41 +2,41 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const expertEmergencyRescueExpertGroupList = declareRequest( export const expertEmergencyRescueExpertGroupList = declareRequest(
"expertEmergencyRescueExpertGroupLoading", "expertEmergencyRescueExpertGroupLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueExpertGroup/list",
); );
export const expertEmergencyRescueExpertGroupInfo = declareRequest( export const expertEmergencyRescueExpertGroupInfo = declareRequest(
"expertEmergencyRescueExpertGroupLoading", "expertEmergencyRescueExpertGroupLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyRescueExpertGroup/{id}",
); );
export const expertEmergencyRescueExpertGroupAdd = declareRequest( export const expertEmergencyRescueExpertGroupAdd = declareRequest(
"expertEmergencyRescueExpertGroupLoading", "expertEmergencyRescueExpertGroupLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueExpertGroup/save",
); );
export const expertEmergencyRescueExpertGroupUpdate = declareRequest( export const expertEmergencyRescueExpertGroupUpdate = declareRequest(
"expertEmergencyRescueExpertGroupLoading", "expertEmergencyRescueExpertGroupLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyRescueExpertGroup/edit",
); );
export const expertEmergencyRescueExpertGroupDelete = declareRequest( export const expertEmergencyRescueExpertGroupDelete = declareRequest(
"expertEmergencyRescueExpertGroupLoading", "expertEmergencyRescueExpertGroupLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueExpertGroup/{id}",
); );
export const expertEmergencyRescueExpertGroupDeleteBatch = declareRequest( export const expertEmergencyRescueExpertGroupDeleteBatch = declareRequest(
"expertEmergencyRescueExpertGroupLoading", "expertEmergencyRescueExpertGroupLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueExpertGroup/ids?ids={ids}",
); );
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertList = declareRequest( export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertList = declareRequest(
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueExpertGroupRel/list",
); );
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertAdd = declareRequest( export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertAdd = declareRequest(
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueExpertGroupRel/save",
); );
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDelete = declareRequest( export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDelete = declareRequest(
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueExpertGroupRel/{id}",
); );
export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDeleteBatch = declareRequest( export const expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDeleteBatch = declareRequest(
"expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading", "expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueExpertGroupRel/ids?ids={ids}",
); );

View File

@ -2,49 +2,49 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const expertEmergencyRescueTeamList = declareRequest( export const expertEmergencyRescueTeamList = declareRequest(
"expertEmergencyRescueTeamLoading", "expertEmergencyRescueTeamLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueTeam/list",
); );
export const expertEmergencyRescueTeamInfo = declareRequest( export const expertEmergencyRescueTeamInfo = declareRequest(
"expertEmergencyRescueTeamLoading", "expertEmergencyRescueTeamLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyRescueTeam/{id}",
); );
export const expertEmergencyRescueTeamAdd = declareRequest( export const expertEmergencyRescueTeamAdd = declareRequest(
"expertEmergencyRescueTeamLoading", "expertEmergencyRescueTeamLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescueTeam/save",
); );
export const expertEmergencyRescueTeamUpdate = declareRequest( export const expertEmergencyRescueTeamUpdate = declareRequest(
"expertEmergencyRescueTeamLoading", "expertEmergencyRescueTeamLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyRescueTeam/edit",
); );
export const expertEmergencyRescueTeamDelete = declareRequest( export const expertEmergencyRescueTeamDelete = declareRequest(
"expertEmergencyRescueTeamLoading", "expertEmergencyRescueTeamLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueTeam/{id}",
); );
export const expertEmergencyRescueTeamDeleteBatch = declareRequest( export const expertEmergencyRescueTeamDeleteBatch = declareRequest(
"expertEmergencyRescueTeamLoading", "expertEmergencyRescueTeamLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescueTeam/ids?ids={ids}",
); );
export const expertEmergencyRescuePersonnelList = declareRequest( export const expertEmergencyRescuePersonnelList = declareRequest(
"expertEmergencyRescuePersonnelLoading", "expertEmergencyRescuePersonnelLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescuePersonnel/list",
); );
export const expertEmergencyRescuePersonnelInfo = declareRequest( export const expertEmergencyRescuePersonnelInfo = declareRequest(
"expertEmergencyRescuePersonnelLoading", "expertEmergencyRescuePersonnelLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/emergencyRescuePersonnel/{id}",
); );
export const expertEmergencyRescuePersonnelAdd = declareRequest( export const expertEmergencyRescuePersonnelAdd = declareRequest(
"expertEmergencyRescuePersonnelLoading", "expertEmergencyRescuePersonnelLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/emergencyRescuePersonnel/save",
); );
export const expertEmergencyRescuePersonnelUpdate = declareRequest( export const expertEmergencyRescuePersonnelUpdate = declareRequest(
"expertEmergencyRescuePersonnelLoading", "expertEmergencyRescuePersonnelLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/emergencyRescuePersonnel/edit",
); );
export const expertEmergencyRescuePersonnelDelete = declareRequest( export const expertEmergencyRescuePersonnelDelete = declareRequest(
"expertEmergencyRescuePersonnelLoading", "expertEmergencyRescuePersonnelLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescuePersonnel/{id}",
); );
export const expertEmergencyRescuePersonnelDeleteBatch = declareRequest( export const expertEmergencyRescuePersonnelDeleteBatch = declareRequest(
"expertEmergencyRescuePersonnelLoading", "expertEmergencyRescuePersonnelLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/emergencyRescuePersonnel/ids?ids={ids}",
); );

View File

@ -2,97 +2,97 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const materialEquipmentList = declareRequest( export const materialEquipmentList = declareRequest(
"materialEquipmentLoading", "materialEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/materialEquipmentWarehouse/list",
); );
export const materialEquipmentInfo = declareRequest( export const materialEquipmentInfo = declareRequest(
"materialEquipmentLoading", "materialEquipmentLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/materialEquipmentWarehouse/{id}",
); );
export const materialEquipmentAdd = declareRequest( export const materialEquipmentAdd = declareRequest(
"materialEquipmentLoading", "materialEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/materialEquipmentWarehouse/save",
); );
export const materialEquipmentUpdate = declareRequest( export const materialEquipmentUpdate = declareRequest(
"materialEquipmentLoading", "materialEquipmentLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/materialEquipmentWarehouse/edit",
); );
export const materialEquipmentDelete = declareRequest( export const materialEquipmentDelete = declareRequest(
"materialEquipmentLoading", "materialEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/materialEquipmentWarehouse/{id}",
); );
export const materialEquipmentDeleteBatch = declareRequest( export const materialEquipmentDeleteBatch = declareRequest(
"materialEquipmentLoading", "materialEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/materialEquipmentWarehouse/ids?ids={ids}",
); );
export const facilitiesEquipmentList = declareRequest( export const facilitiesEquipmentList = declareRequest(
"facilitiesEquipmentLoading", "facilitiesEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/equipmentFacility/list",
); );
export const facilitiesEquipmentInfo = declareRequest( export const facilitiesEquipmentInfo = declareRequest(
"facilitiesEquipmentLoading", "facilitiesEquipmentLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/equipmentFacility/{id}",
); );
export const facilitiesEquipmentAdd = declareRequest( export const facilitiesEquipmentAdd = declareRequest(
"facilitiesEquipmentLoading", "facilitiesEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/equipmentFacility/save",
); );
export const facilitiesEquipmentUpdate = declareRequest( export const facilitiesEquipmentUpdate = declareRequest(
"facilitiesEquipmentLoading", "facilitiesEquipmentLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/equipmentFacility/edit",
); );
export const facilitiesEquipmentDelete = declareRequest( export const facilitiesEquipmentDelete = declareRequest(
"facilitiesEquipmentLoading", "facilitiesEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/equipmentFacility/{id}",
); );
export const facilitiesEquipmentDeleteBatch = declareRequest( export const facilitiesEquipmentDeleteBatch = declareRequest(
"facilitiesEquipmentLoading", "facilitiesEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/equipmentFacility/ids?ids={ids}",
); );
export const rescueEquipmentList = declareRequest( export const rescueEquipmentList = declareRequest(
"rescueEquipmentLoading", "rescueEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/rescueEquipment/list",
); );
export const rescueEquipmentInfo = declareRequest( export const rescueEquipmentInfo = declareRequest(
"rescueEquipmentLoading", "rescueEquipmentLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/rescueEquipment/{id}",
); );
export const rescueEquipmentAdd = declareRequest( export const rescueEquipmentAdd = declareRequest(
"rescueEquipmentLoading", "rescueEquipmentLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/rescueEquipment/save",
); );
export const rescueEquipmentUpdate = declareRequest( export const rescueEquipmentUpdate = declareRequest(
"rescueEquipmentLoading", "rescueEquipmentLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/rescueEquipment/edit",
); );
export const rescueEquipmentDelete = declareRequest( export const rescueEquipmentDelete = declareRequest(
"rescueEquipmentLoading", "rescueEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/rescueEquipment/{id}",
); );
export const rescueEquipmentDeleteBatch = declareRequest( export const rescueEquipmentDeleteBatch = declareRequest(
"rescueEquipmentLoading", "rescueEquipmentLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/rescueEquipment/ids?ids={ids}",
); );
export const materialList = declareRequest( export const materialList = declareRequest(
"materialLoading", "materialLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/material/list",
); );
export const materialInfo = declareRequest( export const materialInfo = declareRequest(
"materialLoading", "materialLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/material/{id}",
); );
export const materialAdd = declareRequest( export const materialAdd = declareRequest(
"materialLoading", "materialLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/material/save",
); );
export const materialUpdate = declareRequest( export const materialUpdate = declareRequest(
"materialLoading", "materialLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/material/edit",
); );
export const materialDelete = declareRequest( export const materialDelete = declareRequest(
"materialLoading", "materialLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/material/{id}",
); );
export const materialDeleteBatch = declareRequest( export const materialDeleteBatch = declareRequest(
"materialLoading", "materialLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/material/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const medicalGuaranteeOrganizationList = declareRequest( export const medicalGuaranteeOrganizationList = declareRequest(
"medicalGuaranteeOrganizationLoading", "medicalGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/medicalSecurityAgency/list",
); );
export const medicalGuaranteeOrganizationInfo = declareRequest( export const medicalGuaranteeOrganizationInfo = declareRequest(
"medicalGuaranteeOrganizationLoading", "medicalGuaranteeOrganizationLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/medicalSecurityAgency/{id}",
); );
export const medicalGuaranteeOrganizationAdd = declareRequest( export const medicalGuaranteeOrganizationAdd = declareRequest(
"medicalGuaranteeOrganizationLoading", "medicalGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/medicalSecurityAgency/save",
); );
export const medicalGuaranteeOrganizationUpdate = declareRequest( export const medicalGuaranteeOrganizationUpdate = declareRequest(
"medicalGuaranteeOrganizationLoading", "medicalGuaranteeOrganizationLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/medicalSecurityAgency/edit",
); );
export const medicalGuaranteeOrganizationDelete = declareRequest( export const medicalGuaranteeOrganizationDelete = declareRequest(
"medicalGuaranteeOrganizationLoading", "medicalGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/medicalSecurityAgency/{id}",
); );
export const medicalGuaranteeOrganizationDeleteBatch = declareRequest( export const medicalGuaranteeOrganizationDeleteBatch = declareRequest(
"medicalGuaranteeOrganizationLoading", "medicalGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/medicalSecurityAgency/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const technicalSupportGuaranteeOrganizationList = declareRequest( export const technicalSupportGuaranteeOrganizationList = declareRequest(
"technicalSupportGuaranteeOrganizationLoading", "technicalSupportGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/technicalSupportAgency/list",
); );
export const technicalSupportGuaranteeOrganizationInfo = declareRequest( export const technicalSupportGuaranteeOrganizationInfo = declareRequest(
"technicalSupportGuaranteeOrganizationLoading", "technicalSupportGuaranteeOrganizationLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/technicalSupportAgency/{id}",
); );
export const technicalSupportGuaranteeOrganizationAdd = declareRequest( export const technicalSupportGuaranteeOrganizationAdd = declareRequest(
"technicalSupportGuaranteeOrganizationLoading", "technicalSupportGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/technicalSupportAgency/save",
); );
export const technicalSupportGuaranteeOrganizationUpdate = declareRequest( export const technicalSupportGuaranteeOrganizationUpdate = declareRequest(
"technicalSupportGuaranteeOrganizationLoading", "technicalSupportGuaranteeOrganizationLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/technicalSupportAgency/edit",
); );
export const technicalSupportGuaranteeOrganizationDelete = declareRequest( export const technicalSupportGuaranteeOrganizationDelete = declareRequest(
"technicalSupportGuaranteeOrganizationLoading", "technicalSupportGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/technicalSupportAgency/{id}",
); );
export const technicalSupportGuaranteeOrganizationDeleteBatch = declareRequest( export const technicalSupportGuaranteeOrganizationDeleteBatch = declareRequest(
"technicalSupportGuaranteeOrganizationLoading", "technicalSupportGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/technicalSupportAgency/ids?ids={ids}",
); );

View File

@ -2,25 +2,25 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const transportGuaranteeOrganizationList = declareRequest( export const transportGuaranteeOrganizationList = declareRequest(
"transportGuaranteeOrganizationLoading", "transportGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/transportSecurityAgency/list",
); );
export const transportGuaranteeOrganizationInfo = declareRequest( export const transportGuaranteeOrganizationInfo = declareRequest(
"transportGuaranteeOrganizationLoading", "transportGuaranteeOrganizationLoading",
"Get > /emergencyRescue", "Get > /emergencyRescue/transportSecurityAgency/{id}",
); );
export const transportGuaranteeOrganizationAdd = declareRequest( export const transportGuaranteeOrganizationAdd = declareRequest(
"transportGuaranteeOrganizationLoading", "transportGuaranteeOrganizationLoading",
"Post > @/emergencyRescue", "Post > @/emergencyRescue/transportSecurityAgency/save",
); );
export const transportGuaranteeOrganizationUpdate = declareRequest( export const transportGuaranteeOrganizationUpdate = declareRequest(
"transportGuaranteeOrganizationLoading", "transportGuaranteeOrganizationLoading",
"Put > @/emergencyRescue", "Put > @/emergencyRescue/transportSecurityAgency/edit",
); );
export const transportGuaranteeOrganizationDelete = declareRequest( export const transportGuaranteeOrganizationDelete = declareRequest(
"transportGuaranteeOrganizationLoading", "transportGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/transportSecurityAgency/{id}",
); );
export const transportGuaranteeOrganizationDeleteBatch = declareRequest( export const transportGuaranteeOrganizationDeleteBatch = declareRequest(
"transportGuaranteeOrganizationLoading", "transportGuaranteeOrganizationLoading",
"Delete > @/emergencyRescue", "Delete > @/emergencyRescue/transportSecurityAgency/ids?ids={ids}",
); );

View File

@ -11,6 +11,8 @@ require("zy-react-library/css/common.less");
dayjs.locale("zh-cn"); dayjs.locale("zh-cn");
setJJBCommonAntdMessage(message); setJJBCommonAntdMessage(message);
window.mapLongitude = "119.69457721306945";
window.mapLatitude = "39.940504336846665";
const app = setup(); const app = setup();
getFileUrlFromServer(); getFileUrlFromServer();

View File

@ -29,12 +29,13 @@ function List(props) {
const { tableProps, getData } = useTable(props["emergencyAddressBookList"], { const { tableProps, getData } = useTable(props["emergencyAddressBookList"], {
form, form,
usePagination: false,
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.groupName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["emergencyAddressBookDelete"]({ id: record.id }); const { success } = await props["emergencyAddressBookDelete"]({ id: record.id });
if (success) { if (success) {
@ -49,7 +50,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "通讯录名称" }, { name: "likeGroupName", label: "通讯录名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -70,8 +71,8 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "组名称", dataIndex: "todo" }, { title: "组名称", dataIndex: "groupName" },
{ title: "组类型", dataIndex: "todo" }, { title: "组类型", dataIndex: "groupTypeName" },
{ {
title: "操作", title: "操作",
width: 300, width: 300,
@ -112,8 +113,8 @@ function List(props) {
onClick={() => { onClick={() => {
setAddModalVisible(true); setAddModalVisible(true);
setAddModalType("addChild"); setAddModalType("addChild");
setParentId(record.parentId); setParentId(record.id);
setParentName(record.parentName); setParentName(record.groupName);
}} }}
> >
添加下级通讯组 添加下级通讯组
@ -137,6 +138,7 @@ function List(props) {
setParentId(defaultParentId); setParentId(defaultParentId);
setParentName(defaultParentName); setParentName(defaultParentName);
setCurrentId(""); setCurrentId("");
setAddModalType("");
}} }}
/> />
) )
@ -163,6 +165,7 @@ const AddModalComponent = (props) => {
const { success } = await props[props.id ? "emergencyAddressBookUpdate" : "emergencyAddressBookAdd"]({ const { success } = await props[props.id ? "emergencyAddressBookUpdate" : "emergencyAddressBookAdd"]({
...values, ...values,
parentId: props.parentId, parentId: props.parentId,
parentName: props.parentName,
id: props.id, id: props.id,
}); });
if (success) { if (success) {
@ -186,8 +189,20 @@ const AddModalComponent = (props) => {
loading={props.emergencyAddressBook.emergencyAddressBookLoading} loading={props.emergencyAddressBook.emergencyAddressBookLoading}
options={[ options={[
{ key: "parentName", label: "上级通讯录", render: (<Tag color="#4096ff">{props.parentName}</Tag>) }, { key: "parentName", label: "上级通讯录", render: (<Tag color="#4096ff">{props.parentName}</Tag>) },
{ name: "todo", label: "通讯录名称" }, { name: "groupName", label: "通讯录名称" },
{ name: "todo", label: "组类型", render: (<DictionarySelect dictValue="emergencyAddressBookGroupType" />) }, {
name: "groupType",
label: "组类型",
render: (
<DictionarySelect
dictValue="emergencyAddressBookGroupType"
onGetLabel={(label) => {
form.setFieldValue("groupTypeName", label);
}}
/>
),
},
{ name: "groupTypeName", label: "组类型", onlyForLabel: true },
]} ]}
labelCol={{ span: 10 }} labelCol={{ span: 10 }}
span={24} span={24}

View File

@ -24,18 +24,15 @@ function List(props) {
const { tableProps, getData } = useTable(props["emergencyAddressBookMemberList"], { const { tableProps, getData } = useTable(props["emergencyAddressBookMemberList"], {
form, form,
params: { emergencyRescueExpertId: query.id }, params: { likeContactGroupId: query.id },
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.personName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["emergencyAddressBookMemberDelete"]({ const { success } = await props["emergencyAddressBookMemberDelete"]({ id: record.id });
id: record.id,
emergencyRescueExpertId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -53,10 +50,7 @@ function List(props) {
title: "删除确认", title: "删除确认",
content: "确认要删除吗?", content: "确认要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["emergencyAddressBookMemberDeleteBatch"]({ const { success } = await props["emergencyAddressBookMemberDeleteBatch"]({ ids: selectedRowKeys });
ids: selectedRowKeys,
emergencyRescueExpertId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -69,8 +63,8 @@ function List(props) {
<Page headerTitle="成员管理"> <Page headerTitle="成员管理">
<Search <Search
options={[ options={[
{ name: "todo", label: "人员姓名" }, { name: "personName", label: "人员姓名" },
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) }, { name: "gender", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -106,15 +100,15 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "姓名", dataIndex: "todo" }, { title: "姓名", dataIndex: "personName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
{ title: "移动电话", dataIndex: "todo" }, { title: "移动电话", dataIndex: "mobilePhone" },
{ title: "办公电话", dataIndex: "todo" }, { title: "办公电话", dataIndex: "officePhone" },
{ title: "所属部门", dataIndex: "todo" }, { title: "所属部门", dataIndex: "department" },
{ title: "职务", dataIndex: "todo" }, { title: "职务", dataIndex: "position" },
{ {
title: "操作", title: "操作",
width: 300, width: 150,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <Space>
@ -155,7 +149,7 @@ function List(props) {
addModalVisible && ( addModalVisible && (
<AddModal <AddModal
id={currentId} id={currentId}
emergencyRescueExpertId={query.id} contactGroupId={query.id}
getData={getData} getData={getData}
onCancel={() => { onCancel={() => {
setAddModalVisible(false); setAddModalVisible(false);
@ -197,7 +191,7 @@ const AddModalComponent = (props) => {
const { success } = await props[props.id ? "emergencyAddressBookMemberUpdate" : "emergencyAddressBookMemberAdd"]({ const { success } = await props[props.id ? "emergencyAddressBookMemberUpdate" : "emergencyAddressBookMemberAdd"]({
...values, ...values,
id: props.id, id: props.id,
emergencyRescueExpertId: props.emergencyRescueExpertId, contactGroupId: props.contactGroupId,
}); });
if (success) { if (success) {
message.success(`${props.id ? "编辑" : "添加"}成功`); message.success(`${props.id ? "编辑" : "添加"}成功`);
@ -219,12 +213,24 @@ const AddModalComponent = (props) => {
<FormBuilder <FormBuilder
loading={props.emergencyAddressBook.emergencyAddressBookMemberLoading} loading={props.emergencyAddressBook.emergencyAddressBookMemberLoading}
options={[ options={[
{ name: "todo", label: "姓名" }, { name: "personName", label: "姓名" },
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) }, {
{ name: "todo", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] }, name: "gender",
{ name: "todo", label: "移动电话", rules: [{ pattern: PHONE, message: "请输入正确的移动电话" }] }, label: "性别",
{ name: "todo", label: "所属部门" }, render: (
{ name: "todo", label: "职务" }, <DictionarySelect
dictValue="sys_sex_enum"
onGetLabel={(label) => {
form.setFieldValue("genderName", label);
}}
/>
),
},
{ name: "genderName", label: "性别名称", onlyForLabel: true },
{ name: "officePhone", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] },
{ name: "mobilePhone", label: "移动电话", rules: [{ pattern: PHONE, message: "请输入正确的移动电话" }] },
{ name: "department", label: "所属部门" },
{ name: "position", label: "职务" },
]} ]}
labelCol={{ span: 8 }} labelCol={{ span: 8 }}
span={24} span={24}
@ -265,12 +271,12 @@ const ViewModalComponent = (props) => {
column={1} column={1}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "姓名", children: info.todo }, { label: "姓名", children: info.personName },
{ label: "性别", children: info.todo }, { label: "性别", children: info.genderName },
{ label: "办公电话", children: info.todo }, { label: "办公电话", children: info.officePhone },
{ label: "移动电话", children: info.todo }, { label: "移动电话", children: info.mobilePhone },
{ label: "所属部门", children: info.todo }, { label: "所属部门", children: info.department },
{ label: "职务", children: info.todo }, { label: "职务", children: info.position },
]} ]}
/> />
</Modal> </Modal>

View File

@ -44,40 +44,125 @@ function Add(props) {
loading={props.expertEmergencyRescueExpert.expertEmergencyRescueExpertLoading} loading={props.expertEmergencyRescueExpert.expertEmergencyRescueExpertLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "专家姓名", rules: [{ required: true, message: "请输入专家姓名" }] }, { name: "expertName", label: "专家姓名", rules: [{ required: true, message: "请输入专家姓名" }] },
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) }, {
{ name: "todo", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] }, name: "gender",
{ name: "todo", label: "出生日期", render: FORM_ITEM_RENDER_ENUM.DATE }, label: "性别",
{ name: "todo", label: "专家类型", render: (<DictionarySelect dictValue="emergencyRescueExpertType" />) }, render: (
{ name: "todo", label: "专家密级", render: (<DictionarySelect dictValue="emergencyRescueExpertLevel" />) }, <DictionarySelect
{ name: "todo", label: "职称" }, dictValue="sys_sex_enum"
{ name: "todo", label: "专业类型" }, onGetLabel={(label) => {
{ name: "todo", label: "民族", render: (<BasicSelect data={nation} />) }, form.setFieldValue("genderName", label);
{ name: "todo", label: "政治面貌", render: (<DictionarySelect dictValue="zhengzhimianmao" />) }, }}
{ name: "todo", label: "最高学历", render: (<DictionarySelect dictValue="wenhuachengdu" />) }, />
{ name: "todo", label: "参加工作时间", render: FORM_ITEM_RENDER_ENUM.DATE }, ),
{ name: "todo", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] }, },
{ name: "todo", label: "家庭电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的家庭电话" }] }, { name: "genderName", label: "性别名称", onlyForLabel: true },
{ name: "todo", label: "移动电话", rules: [{ pattern: PHONE, message: "请输入正确的移动电话" }] }, { name: "idCardNo", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] }, { name: "birthDate", label: "出生日期", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "todo", label: "电子邮箱", rules: [{ type: "email", message: "请输入正确的电子邮箱" }] }, {
{ name: "todo", label: "健康状况" }, name: "expertType",
{ name: "todo", label: "行政职务", render: (<DictionarySelect dictValue="administrativePosition" />) }, label: "专家类型",
{ name: "todo", label: "专家组职务" }, render: (
{ name: "todo", label: "家庭住址" }, <DictionarySelect
{ name: "todo", label: "籍贯" }, dictValue="emergencyRescueExpertType"
{ name: "todo", label: "户口所在地" }, onGetLabel={(label) => {
{ name: "todo", label: "通讯地址" }, form.setFieldValue("expertTypeName", label);
{ name: "todo", label: "毕业院校" }, }}
{ name: "todo", label: "工作单位" }, />
{ name: "todo", label: "单位主管部门" }, ),
{ name: "todo", label: "单位邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的单位邮编" }] }, },
{ name: "todo", label: "排序号", render: FORM_ITEM_RENDER_ENUM.NUMBER }, { name: "expertTypeName", label: "专家类型名称", onlyForLabel: true },
{ name: "todo", label: "专家特长" }, {
{ name: "todo", label: "主要成果" }, name: "expertSecurityLevel",
{ name: "todo", label: "应急工作经历" }, label: "专家密级",
{ name: "todo", label: "工作简历概述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, render: (
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, <DictionarySelect
dictValue="emergencyRescueExpertLevel"
onGetLabel={(label) => {
form.setFieldValue("expertSecurityLevelName", label);
}}
/>
),
},
{ name: "expertSecurityLevelName", label: "专家密级名称", onlyForLabel: true },
{ name: "professionalTitle", label: "职称" },
{ name: "professionalType", label: "专业类型" },
{
name: "nation",
label: "民族",
render: (
<BasicSelect
data={nation}
idKey="bianma"
onGetLabel={(label) => {
form.setFieldValue("nationName", label);
}}
/>
),
},
{ name: "nationName", label: "民族名称", onlyForLabel: true },
{
name: "politicalStatus",
label: "政治面貌",
render: (
<DictionarySelect
dictValue="zhengzhimianmao"
onGetLabel={(label) => {
form.setFieldValue("politicalStatusName", label);
}}
/>
),
},
{ name: "politicalStatusName", label: "政治面貌名称", onlyForLabel: true },
{
name: "highestEducation",
label: "最高学历",
render: (
<DictionarySelect
dictValue="wenhuachengdu"
onGetLabel={(label) => {
form.setFieldValue("highestEducationName", label);
}}
/>
),
},
{ name: "highestEducationName", label: "最高学历名称", onlyForLabel: true },
{ name: "workStartDate", label: "参加工作时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "officePhone", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] },
{ name: "homePhone", label: "家庭电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的家庭电话" }] },
{ name: "mobilePhone", label: "移动电话", rules: [{ pattern: PHONE, message: "请输入正确的移动电话" }] },
{ name: "fax", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
{ name: "email", label: "电子邮箱", rules: [{ type: "email", message: "请输入正确的电子邮箱" }] },
{ name: "healthStatus", label: "健康状况" },
{
name: "administrativePosition",
label: "行政职务",
render: (
<DictionarySelect
dictValue="administrativePosition"
onGetLabel={(label) => {
form.setFieldValue("administrativePositionName", label);
}}
/>
),
},
{ name: "administrativePositionName", label: "行政职务名称", onlyForLabel: true },
{ name: "expertGroupPosition", label: "专家组职务" },
{ name: "homeAddress", label: "家庭住址" },
{ name: "nativePlace", label: "籍贯" },
{ name: "registeredResidence", label: "户口所在地" },
{ name: "mailingAddress", label: "通讯地址" },
{ name: "graduatedSchool", label: "毕业院校" },
{ name: "workUnit", label: "工作单位" },
{ name: "unitSupervisorDepartment", label: "单位主管部门" },
{ name: "unitPostalCode", label: "单位邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的单位邮编" }] },
{ name: "sortOrder", label: "排序号", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "expertise", label: "专家特长" },
{ name: "mainAchievements", label: "主要成果" },
{ name: "emergencyWorkExperience", label: "应急工作经历" },
{ name: "workResume", label: "工作简历概述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "remarks", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.expertName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescueExpertDelete"]({ id: record.id }); const { success } = await props["expertEmergencyRescueExpertDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "专家姓名" }, { name: "likeExpertName", label: "专家姓名" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,11 +90,11 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "专家姓名", dataIndex: "todo" }, { title: "专家姓名", dataIndex: "expertName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
{ title: "专家类型", dataIndex: "todo" }, { title: "专家类型", dataIndex: "expertTypeName" },
{ title: "办公电话", dataIndex: "todo" }, { title: "办公电话", dataIndex: "officePhone" },
{ title: "移动电话", dataIndex: "todo" }, { title: "移动电话", dataIndex: "mobilePhone" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,40 +27,40 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "专家姓名", children: info.todo }, { label: "专家姓名", children: info.expertName },
{ label: "性别", children: info.todo }, { label: "性别", children: info.genderName },
{ label: "身份证号", children: info.todo }, { label: "身份证号", children: info.idCardNo },
{ label: "出生日期", children: info.todo }, { label: "出生日期", children: info.birthDate },
{ label: "专家类型", children: info.todo }, { label: "专家类型", children: info.expertTypeName },
{ label: "专家密级", children: info.todo }, { label: "专家密级", children: info.expertSecurityLevelName },
{ label: "职称", children: info.todo }, { label: "职称", children: info.professionalTitle },
{ label: "专业类型", children: info.todo }, { label: "专业类型", children: info.professionalType },
{ label: "民族", children: info.todo }, { label: "民族", children: info.nationName },
{ label: "政治面貌", children: info.todo }, { label: "政治面貌", children: info.politicalStatusName },
{ label: "最高学历", children: info.todo }, { label: "最高学历", children: info.highestEducationName },
{ label: "参加工作时间", children: info.todo }, { label: "参加工作时间", children: info.workStartDate },
{ label: "办公电话", children: info.todo }, { label: "办公电话", children: info.officePhone },
{ label: "家庭电话", children: info.todo }, { label: "家庭电话", children: info.homePhone },
{ label: "移动电话", children: info.todo }, { label: "移动电话", children: info.mobilePhone },
{ label: "传真", children: info.todo }, { label: "传真", children: info.fax },
{ label: "电子邮箱", children: info.todo }, { label: "电子邮箱", children: info.email },
{ label: "健康状况", children: info.todo }, { label: "健康状况", children: info.healthStatus },
{ label: "行政职务", children: info.todo }, { label: "行政职务", children: info.administrativePositionName },
{ label: "专家组职务", children: info.todo }, { label: "专家组职务", children: info.expertGroupPosition },
{ label: "家庭住址", children: info.todo }, { label: "家庭住址", children: info.homeAddress },
{ label: "籍贯", children: info.todo }, { label: "籍贯", children: info.nativePlace },
{ label: "户口所在地", children: info.todo }, { label: "户口所在地", children: info.registeredResidence },
{ label: "通讯地址", children: info.todo }, { label: "通讯地址", children: info.mailingAddress },
{ label: "毕业院校", children: info.todo }, { label: "毕业院校", children: info.graduatedSchool },
{ label: "工作单位", children: info.todo }, { label: "工作单位", children: info.workUnit },
{ label: "单位主管部门", children: info.todo }, { label: "单位主管部门", children: info.unitSupervisorDepartment },
{ label: "单位邮编", children: info.todo }, { label: "单位邮编", children: info.unitPostalCode },
{ label: "排序号", children: info.todo }, { label: "排序号", children: info.sortOrder },
{ label: "专家特长", children: info.todo }, { label: "专家特长", children: info.expertise },
{ label: "主要成果", children: info.todo }, { label: "主要成果", children: info.mainAchievements },
{ label: "应急工作经历", children: info.todo }, { label: "应急工作经历", children: info.emergencyWorkExperience },
{ label: "工作简历概述", children: info.todo, span: 2 }, { label: "工作简历概述", children: info.workResume, span: 2 },
{ label: "备注", children: info.todo, span: 2 }, { label: "备注", children: info.remarks, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -42,27 +42,51 @@ function Add(props) {
loading={props.expertEmergencyRescueExpertGroup.expertEmergencyRescueExpertGroupLoading} loading={props.expertEmergencyRescueExpertGroup.expertEmergencyRescueExpertGroupLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "专家组名称", rules: [{ required: true, message: "请输入专家组名称" }] }, { name: "groupName", label: "专家组名称", rules: [{ required: true, message: "请输入专家组名称" }] },
{ name: "todo", label: "专家组类型", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupType" />) }, {
{ name: "todo", label: "专家组级别", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupLevel" />) }, name: "groupType",
{ name: "todo", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的联系电话" }] }, label: "专家组类型",
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] }, render: (
{ name: "todo", label: "人数", render: FORM_ITEM_RENDER_ENUM.NUMBER }, <DictionarySelect
{ name: "todo", label: "组建单位" }, dictValue="emergencyRescueExpertGroupType"
{ name: "todo", label: "组件单位邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的组件单位邮编" }] }, onGetLabel={(label) => {
{ name: "todo", label: "组建单位地址", span: 24 }, form.setFieldValue("groupTypeName", label);
{ name: "todo", label: "负责人" }, }}
{ name: "todo", label: "负责人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" }] }, />
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] }, ),
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] }, },
{ name: "todo", label: "联系人" }, { name: "groupTypeName", label: "专家组类型名称", onlyForLabel: true },
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] }, {
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] }, name: "groupLevel",
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] }, label: "专家组级别",
{ name: "todo", label: "联系人电子邮箱", rules: [{ type: "email", message: "请输入正确的联系人电子邮箱" }] }, render: (
{ name: "todo", label: "排序号", render: FORM_ITEM_RENDER_ENUM.NUMBER }, <DictionarySelect
{ name: "todo", label: "专家组介绍", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, dictValue="emergencyRescueExpertGroupLevel"
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, onGetLabel={(label) => {
form.setFieldValue("groupLevelName", label);
}}
/>
),
},
{ name: "groupLevelName", label: "专家组级别名称", onlyForLabel: true },
{ name: "contactPhone", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的联系电话" }] },
{ name: "fax", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
{ name: "memberCount", label: "人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "establishUnit", label: "组建单位" },
{ name: "establishUnitPostalCode", label: "组件单位邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的组件单位邮编" }] },
{ name: "establishUnitAddress", label: "组建单位地址", span: 24 },
{ name: "leaderName", label: "负责人" },
{ name: "leaderOfficePhone", label: "负责人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" }] },
{ name: "leaderMobilePhone", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] },
{ name: "leaderHomePhone", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] },
{ name: "contactPerson", label: "联系人" },
{ name: "contactOfficePhone", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
{ name: "contactMobilePhone", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
{ name: "contactHomePhone", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
{ name: "contactEmail", label: "联系人电子邮箱", rules: [{ type: "email", message: "请输入正确的联系人电子邮箱" }] },
{ name: "sortOrder", label: "排序号", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "groupIntroduction", label: "专家组介绍", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "remarks", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -22,7 +22,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.groupName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescueExpertGroupDelete"]({ id: record.id }); const { success } = await props["expertEmergencyRescueExpertGroupDelete"]({ id: record.id });
if (success) { if (success) {
@ -55,8 +55,8 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "专家组名称" }, { name: "likeGroupName", label: "专家组名称" },
{ name: "todo", label: "专家组类型", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupType" />) }, { name: "groupTypeName", label: "专家组类型", render: (<DictionarySelect dictValue="emergencyRescueExpertGroupType" />) },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -92,8 +92,8 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "专家组名称", dataIndex: "todo" }, { title: "专家组名称", dataIndex: "groupName" },
{ title: "组类型", dataIndex: "todo" }, { title: "组类型", dataIndex: "groupTypeName" },
{ {
title: "操作", title: "操作",
width: 200, width: 200,

View File

@ -19,18 +19,15 @@ function List(props) {
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertList"], { const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertList"], {
form, form,
params: { emergencyRescueExpertGroupId: query.id }, params: { likeGroupId: query.id },
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.expertName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDelete"]({ const { success } = await props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDelete"]({ id: record.id });
id: record.id,
emergencyRescueExpertGroupId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -48,10 +45,7 @@ function List(props) {
title: "删除确认", title: "删除确认",
content: "确认要删除吗?", content: "确认要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDeleteBatch"]({ const { success } = await props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertDeleteBatch"]({ ids: selectedRowKeys });
ids: selectedRowKeys,
emergencyRescueExpertGroupId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -64,7 +58,7 @@ function List(props) {
<Page headerTitle="成员管理"> <Page headerTitle="成员管理">
<Search <Search
options={[ options={[
{ name: "todo", label: "专家姓名" }, { name: "expertName", label: "专家姓名" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -100,11 +94,11 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "专家姓名", dataIndex: "todo" }, { title: "专家姓名", dataIndex: "expertName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
{ title: "专家类型", dataIndex: "todo" }, { title: "专家类型", dataIndex: "expertTypeName" },
{ title: "办公电话", dataIndex: "todo" }, { title: "办公电话", dataIndex: "officePhone" },
{ title: "移动电话", dataIndex: "todo" }, { title: "移动电话", dataIndex: "mobilePhone" },
{ {
title: "操作", title: "操作",
width: 100, width: 100,
@ -129,7 +123,7 @@ function List(props) {
{ {
addModalVisible && ( addModalVisible && (
<AddModal <AddModal
emergencyRescueExpertGroupId={query.emergencyRescueExpertGroupId} groupId={query.groupId}
getData={getData} getData={getData}
onCancel={() => { onCancel={() => {
setAddModalVisible(false); setAddModalVisible(false);
@ -156,8 +150,8 @@ const AddModalComponent = (props) => {
return message.warning("请选择要添加的记录"); return message.warning("请选择要添加的记录");
} }
const { success } = props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertAdd"]({ const { success } = props["expertEmergencyRescueExpertGroupDownExpertEmergencyRescueExpertAdd"]({
ids: selectedRowKeys, expertId: selectedRowKeys,
emergencyRescueExpertGroupId: props.emergencyRescueExpertGroupId, groupId: props.groupId,
}); });
if (success) { if (success) {
message.success("添加成功"); message.success("添加成功");
@ -178,7 +172,7 @@ const AddModalComponent = (props) => {
> >
<Search <Search
options={[ options={[
{ name: "todo", label: "专家姓名" }, { name: "likeExpertName", label: "专家姓名" },
]} ]}
labelCol={{ span: 10 }} labelCol={{ span: 10 }}
form={form} form={form}
@ -195,8 +189,8 @@ const AddModalComponent = (props) => {
options={false} options={false}
disabledResizer={true} disabledResizer={true}
columns={[ columns={[
{ title: "姓名", dataIndex: "todo" }, { title: "姓名", dataIndex: "expertName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
]} ]}
{...tableProps} {...tableProps}
/> />

View File

@ -27,27 +27,27 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "专家组名称", children: info.todo }, { label: "专家组名称", children: info.groupName },
{ label: "专家组类型", children: info.todo }, { label: "专家组类型", children: info.groupTypeName },
{ label: "专家组级别", children: info.todo }, { label: "专家组级别", children: info.groupLevelName },
{ label: "联系电话", children: info.todo }, { label: "联系电话", children: info.contactPhone },
{ label: "传真", children: info.todo }, { label: "传真", children: info.fax },
{ label: "人数", children: info.todo }, { label: "人数", children: info.memberCount },
{ label: "组建单位", children: info.todo }, { label: "组建单位", children: info.establishUnit },
{ label: "组件单位邮编", children: info.todo }, { label: "组件单位邮编", children: info.establishUnitPostalCode },
{ label: "组建单位地址", children: info.todo, span: 24 }, { label: "组建单位地址", children: info.establishUnitAddress, span: 24 },
{ label: "负责人", children: info.todo }, { label: "负责人", children: info.leaderName },
{ label: "负责人办公电话", children: info.todo }, { label: "负责人办公电话", children: info.leaderOfficePhone },
{ label: "负责人移动电话", children: info.todo }, { label: "负责人移动电话", children: info.leaderMobilePhone },
{ label: "负责人住宅电话", children: info.todo }, { label: "负责人住宅电话", children: info.leaderHomePhone },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人办公电话", children: info.todo }, { label: "联系人办公电话", children: info.contactOfficePhone },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactMobilePhone },
{ label: "联系人住宅电话", children: info.todo }, { label: "联系人住宅电话", children: info.contactHomePhone },
{ label: "联系人电子邮箱", children: info.todo }, { label: "联系人电子邮箱", children: info.contactEmail },
{ label: "排序号", children: info.todo }, { label: "排序号", children: info.sortOrder },
{ label: "专家组介绍", children: info.todo, span: 24 }, { label: "专家组介绍", children: info.groupIntroduction, span: 24 },
{ label: "备注", children: info.todo, span: 24 }, { label: "备注", children: info.remarks, span: 24 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -21,7 +21,10 @@ function Add(props) {
return; return;
const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: query.id }); const { data } = await props["expertEmergencyRescueTeamInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
useEffect(() => { useEffect(() => {
@ -31,6 +34,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "expertEmergencyRescueTeamUpdate" : "expertEmergencyRescueTeamAdd"]({ const { success } = await props[query.id ? "expertEmergencyRescueTeamUpdate" : "expertEmergencyRescueTeamAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -45,51 +49,143 @@ function Add(props) {
loading={props.expertEmergencyRescueTeam.expertEmergencyRescueTeamLoading} loading={props.expertEmergencyRescueTeam.expertEmergencyRescueTeamLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "救援队名称", rules: [{ required: true, message: "请输入救援队名称" }] }, { name: "teamName", label: "救援队名称", rules: [{ required: true, message: "请输入救援队名称" }] },
{ name: "todo", label: "地址" }, { name: "address", label: "地址" },
{ name: "todo", label: "类型", render: (<DictionarySelect dictValue="emergencyRescueTeamType" />) },
{ name: "todo", label: "级别", render: (<DictionarySelect dictValue="emergencyRescueTeamLevel" />) },
{ name: "todo", label: "密级", render: (<DictionarySelect dictValue="emergencyRescueTeamSecretLevel" />) },
{ name: "todo", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "所属区域", render: (<AreaCascader />), span: 24 },
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{ {
name: "todo", name: "teamType",
label: "类型",
render: (
<DictionarySelect
dictValue="emergencyRescueTeamType"
onGetLabel={(label) => {
form.setFieldValue("teamTypeName", label);
}}
/>
),
},
{ name: "teamTypeName", label: "类型名称", onlyForLabel: true },
{
name: "teamLevel",
label: "级别",
render: (
<DictionarySelect
dictValue="emergencyRescueTeamLevel"
onGetLabel={(label) => {
form.setFieldValue("teamLevelName", label);
}}
/>
),
},
{ name: "teamLevelName", label: "级别名称", onlyForLabel: true },
{
name: "securityLevel",
label: "密级",
render: (
<DictionarySelect
dictValue="emergencyRescueTeamSecretLevel"
onGetLabel={(label) => {
form.setFieldValue("securityLevelName", label);
}}
/>
),
},
{ name: "securityLevelName", label: "密级名称", onlyForLabel: true },
{ name: "officePhone", label: "办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{
name: "regionCode",
label: "所属区域",
render: (
<AreaCascader
changeOnSelect
onGetNodePaths={(nodes) => {
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
}}
/>
),
span: 24,
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{ key: "map", customizeRender: true, render: (<Map type="cesium" />), span: 24 },
{ name: "leaderName", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{
name: "leaderOfficePhone",
label: "负责人办公电话", label: "负责人办公电话",
rules: [ rules: [
{ required: true, message: "请输入负责人办公电话" }, { required: true, message: "请输入负责人办公电话" },
{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }, { pattern: TEL_PHONE, message: "请输入正确的电话号码" },
], ],
}, },
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "联系人" },
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "联系人邮箱", rules: [{ type: "email", message: "请输入正确的邮箱地址" }], span: 24 },
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真号码" }] },
{ name: "todo", label: "主管单位名称", render: (<DepartmentSelectTree />) },
{ name: "todo", label: "主管单位地址" },
{ name: "todo", label: "总人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "成立时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "todo", label: "应急通讯方式", span: 24 },
{ name: "todo", label: "主要职责", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ name: "todo", label: "主要装备描述", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ name: "todo", label: "专长描述", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ name: "todo", label: "应急救援经历", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ {
name: "todo", name: "leaderMobilePhone",
label: "资质等级", label: "负责人移动电话",
render: (<DictionarySelect dictValue="emergencyRescueTeamQualificationLevel" />), rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }],
}, },
{ name: "todo", label: "预计准备时间", render: FORM_ITEM_RENDER_ENUM.DATE }, {
{ name: "todo", label: "集合出发地点" }, name: "leaderHomePhone",
{ name: "todo", label: "自备交通工具" }, label: "负责人住宅电话",
{ name: "todo", label: "需要后备支援", span: 24 }, rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
{ name: "todo", label: "备注", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, },
{ name: "contactPerson", label: "联系人" },
{
name: "contactOfficePhone",
label: "联系人办公电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
},
{
name: "contactMobilePhone",
label: "联系人移动电话",
rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }],
},
{
name: "contactHomePhone",
label: "联系人住宅电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
},
{
name: "contactEmail",
label: "联系人邮箱",
rules: [{ type: "email", message: "请输入正确的邮箱地址" }],
span: 24,
},
{ name: "postalCode", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
{ name: "fax", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真号码" }] },
{
name: "supervisorUnit",
label: "主管单位",
render: (
<DepartmentSelectTree onGetLabel={(label) => {
form.setFieldValue("supervisorUnitName", label);
}}
/>
),
},
{ name: "supervisorUnitName", label: "主管单位名称", onlyForLabel: true },
{ name: "supervisorUnitAddress", label: "主管单位地址" },
{ name: "totalPeople", label: "总人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "establishDate", label: "成立时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "emergencyCommunication", label: "应急通讯方式", span: 24 },
{ name: "mainDuty", label: "主要职责", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ name: "mainEquipmentDesc", label: "主要装备描述", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ name: "specialtyDesc", label: "专长描述", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ name: "rescueExperience", label: "应急救援经历", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{
name: "qualificationLevel",
label: "资质等级",
render: (
<DictionarySelect
dictValue="emergencyRescueTeamQualificationLevel"
onGetLabel={(label) => {
form.setFieldValue("qualificationLevelName", label);
}}
/>
),
},
{ name: "qualificationLevelName", label: "资质等级名称", onlyForLabel: true },
{ name: "estimatedPrepareTime", label: "预计准备时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "assemblyLocation", label: "集合出发地点" },
{ name: "selfProvidedVehicle", label: "自备交通工具" },
{ name: "needBackupSupport", label: "需要后备支援", span: 24 },
{ name: "remarks", label: "备注", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -29,7 +29,7 @@ function Add(props) {
const { success } = await props[query.id ? "expertEmergencyRescuePersonnelUpdate" : "expertEmergencyRescuePersonnelAdd"]({ const { success } = await props[query.id ? "expertEmergencyRescuePersonnelUpdate" : "expertEmergencyRescuePersonnelAdd"]({
...values, ...values,
id: query.id, id: query.id,
emergencyRescueTeamId: query.emergencyRescueTeamId, teamId: query.teamId,
}); });
if (success) { if (success) {
message.success(query.id ? "编辑成功" : "新增成功"); message.success(query.id ? "编辑成功" : "新增成功");
@ -42,15 +42,35 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.expertEmergencyRescueTeam.expertEmergencyRescuePersonnelLoading} loading={props.expertEmergencyRescueTeam.expertEmergencyRescuePersonnelLoading}
options={[ options={[
{ name: "todo", label: "姓名" }, { name: "personnelName", label: "姓名" },
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" />) }, {
{ name: "todo", label: "年龄", render: FORM_ITEM_RENDER_ENUM.NUMBER }, name: "gender",
{ name: "todo", label: "手机号", render: FORM_ITEM_RENDER_ENUM.NUMBER, rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] }, label: "性别",
{ name: "todo", label: "办公电话", render: FORM_ITEM_RENDER_ENUM.NUMBER, rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }] }, render: (
{ name: "todo", label: "救援队职位名称" }, <DictionarySelect
{ name: "todo", label: "所在单位名称" }, dictValue="sys_sex_enum"
{ name: "todo", label: "所在单位岗位名称" }, onGetLabel={(label) => {
{ name: "todo", label: "描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, form.setFieldValue("genderName", label);
}}
/>
),
},
{ name: "genderName", label: "性别名称", onlyForLabel: true },
{ name: "age", label: "年龄", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{
name: "mobilePhone",
label: "手机号",
rules: [{ pattern: PHONE, message: "请输入正确的手机号" }],
},
{
name: "officePhone",
label: "办公电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的办公电话" }],
},
{ name: "teamPosition", label: "救援队职位名称" },
{ name: "companyName", label: "所在单位名称" },
{ name: "companyPosition", label: "所在单位岗位名称" },
{ name: "description", label: "描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -18,18 +18,15 @@ function List(props) {
const { tableProps, getData } = useTable(props["expertEmergencyRescuePersonnelList"], { const { tableProps, getData } = useTable(props["expertEmergencyRescuePersonnelList"], {
form, form,
params: { emergencyRescueTeamId: query.id }, params: { likeTeamId: query.id },
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.personnelName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescuePersonnelDelete"]({ const { success } = await props["expertEmergencyRescuePersonnelDelete"]({ id: record.id });
id: record.id,
emergencyRescueTeamId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -47,10 +44,7 @@ function List(props) {
title: "删除确认", title: "删除确认",
content: "确认要删除吗?", content: "确认要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescuePersonnelDeleteBatch"]({ const { success } = await props["expertEmergencyRescuePersonnelDeleteBatch"]({ ids: selectedRowKeys });
ids: selectedRowKeys,
emergencyRescueTeamId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -63,7 +57,7 @@ function List(props) {
<Page headerTitle="应急救援人"> <Page headerTitle="应急救援人">
<Search <Search
options={[ options={[
{ name: "todo", label: "人员姓名" }, { name: "personnelName", label: "人员姓名" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -82,7 +76,7 @@ function List(props) {
type="primary" type="primary"
icon={(<AddIcon />)} icon={(<AddIcon />)}
onClick={() => { onClick={() => {
props.history.push(`./add?emergencyRescueTeamId=${query.id}`); props.history.push(`./add?teamId=${query.id}`);
}} }}
> >
新增 新增
@ -99,14 +93,14 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "姓名", dataIndex: "todo" }, { title: "姓名", dataIndex: "personnelName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
{ title: "年龄", dataIndex: "todo" }, { title: "年龄", dataIndex: "age" },
{ title: "手机号", dataIndex: "todo" }, { title: "手机号", dataIndex: "mobilePhone" },
{ title: "座机电话号", dataIndex: "todo" }, { title: "座机电话号", dataIndex: "officePhone" },
{ title: "救援队职位名称", dataIndex: "todo" }, { title: "救援队职位名称", dataIndex: "teamPosition" },
{ title: "所在单位名称", dataIndex: "todo" }, { title: "所在单位名称", dataIndex: "companyName" },
{ title: "所在单位岗位名称", dataIndex: "todo" }, { title: "所在单位岗位名称", dataIndex: "companyPosition" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,
@ -124,7 +118,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./add?id=${record.id}&emergencyRescueTeamId=${query.id}`); props.history.push(`./add?id=${record.id}&teamId=${query.id}`);
}} }}
> >
编辑 编辑

View File

@ -27,15 +27,15 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "姓名", children: info.todo }, { label: "姓名", children: info.personnelName },
{ label: "性别", children: info.todo }, { label: "性别", children: info.genderName },
{ label: "年龄", children: info.todo }, { label: "年龄", children: info.age },
{ label: "手机号", children: info.todo }, { label: "手机号", children: info.mobilePhone },
{ label: "办公电话", children: info.todo }, { label: "办公电话", children: info.officePhone },
{ label: "救援队职位名称", children: info.todo }, { label: "救援队职位名称", children: info.teamPosition },
{ label: "所在单位名称", children: info.todo }, { label: "所在单位名称", children: info.companyName },
{ label: "所在单位岗位名称", children: info.todo }, { label: "所在单位岗位名称", children: info.companyPosition },
{ label: "描述", children: info.todo, span: 2 }, { label: "描述", children: info.description, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.teamName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["expertEmergencyRescueTeamDelete"]({ id: record.id }); const { success } = await props["expertEmergencyRescueTeamDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "队伍名称" }, { name: "likeTeamName", label: "队伍名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,16 +90,16 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "队伍名称", dataIndex: "todo" }, { title: "队伍名称", dataIndex: "teamName" },
{ title: "队伍类型", dataIndex: "todo" }, { title: "队伍类型", dataIndex: "teamTypeName" },
{ title: "队伍级别", dataIndex: "todo" }, { title: "队伍级别", dataIndex: "teamLevelName" },
{ title: "队伍地址", dataIndex: "todo" }, { title: "队伍地址", dataIndex: "address" },
{ title: "负责人办公电话", dataIndex: "todo" }, { title: "负责人办公电话", dataIndex: "leaderOfficePhone" },
{ title: "负责人移动电话", dataIndex: "todo" }, { title: "负责人移动电话", dataIndex: "leaderMobilePhone" },
{ title: "负责人固定电话", dataIndex: "todo" }, { title: "负责人固定电话", dataIndex: "leaderHomePhone" },
{ {
title: "操作", title: "操作",
width: 200, width: 300,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <Space>

View File

@ -27,41 +27,41 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "救援队名称", children: info.todo }, { label: "救援队名称", children: info.teamName },
{ label: "地址", children: info.todo }, { label: "地址", children: info.address },
{ label: "类型", children: info.todo }, { label: "类型", children: info.teamTypeName },
{ label: "级别", children: info.todo }, { label: "级别", children: info.teamLevelName },
{ label: "密级", children: info.todo }, { label: "密级", children: info.securityLevelName },
{ label: "办公电话", children: info.todo }, { label: "办公电话", children: info.officePhone },
{ label: "所属区域", children: info.todo, span: 2 }, { label: "所属区域", children: info.regionCodeName, span: 2 },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "负责人", children: info.todo }, { label: "负责人", children: info.leaderName },
{ label: "负责人办公电话", children: info.todo }, { label: "负责人办公电话", children: info.leaderOfficePhone },
{ label: "负责人移动电话", children: info.todo }, { label: "负责人移动电话", children: info.leaderMobilePhone },
{ label: "负责人住宅电话", children: info.todo }, { label: "负责人住宅电话", children: info.leaderHomePhone },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人办公电话", children: info.todo }, { label: "联系人办公电话", children: info.contactOfficePhone },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactMobilePhone },
{ label: "联系人住宅电话", children: info.todo }, { label: "联系人住宅电话", children: info.contactHomePhone },
{ label: "联系人邮箱", children: info.todo, span: 2 }, { label: "联系人邮箱", children: info.contactEmail, span: 2 },
{ label: "邮编", children: info.todo }, { label: "邮编", children: info.postalCode },
{ label: "传真", children: info.todo }, { label: "传真", children: info.fax },
{ label: "主管单位名称", children: info.todo }, { label: "主管单位", children: info.supervisorUnitName },
{ label: "主管单位地址", children: info.todo }, { label: "主管单位地址", children: info.supervisorUnitAddress },
{ label: "总人数", children: info.todo }, { label: "总人数", children: info.totalPeople },
{ label: "成立时间", children: info.todo }, { label: "成立时间", children: info.establishDate },
{ label: "应急通讯方式", children: info.todo, span: 2 }, { label: "应急通讯方式", children: info.emergencyCommunication, span: 2 },
{ label: "主要职责", children: info.todo, span: 2 }, { label: "主要职责", children: info.mainDuty, span: 2 },
{ label: "主要装备描述", children: info.todo, span: 2 }, { label: "主要装备描述", children: info.mainEquipmentDesc, span: 2 },
{ label: "专长描述", children: info.todo, span: 2 }, { label: "专长描述", children: info.specialtyDesc, span: 2 },
{ label: "应急救援经历", children: info.todo, span: 2 }, { label: "应急救援经历", children: info.rescueExperience, span: 2 },
{ label: "资质等级", children: info.todo }, { label: "资质等级", children: info.qualificationLevelName },
{ label: "预计准备时间", children: info.todo }, { label: "预计准备时间", children: info.estimatedPrepareTime },
{ label: "集合出发地点", children: info.todo }, { label: "集合出发地点", children: info.assemblyLocation },
{ label: "自备交通工具", children: info.todo }, { label: "自备交通工具", children: info.selfProvidedVehicle },
{ label: "需要后备支援", children: info.todo, span: 2 }, { label: "需要后备支援", children: info.needBackupSupport, span: 2 },
{ label: "备注", children: info.todo, span: 2 }, { label: "备注", children: info.remarks, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -20,7 +20,10 @@ function Add(props) {
return; return;
const { data } = await props["enterpriseEmergencyOrganizationInfo"]({ id: query.id }); const { data } = await props["enterpriseEmergencyOrganizationInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
useEffect(() => { useEffect(() => {
@ -30,6 +33,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "enterpriseEmergencyOrganizationUpdate" : "enterpriseEmergencyOrganizationAdd"]({ const { success } = await props[query.id ? "enterpriseEmergencyOrganizationUpdate" : "enterpriseEmergencyOrganizationAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -44,18 +48,54 @@ function Add(props) {
loading={props.enterpriseEmergencyOrganization.enterpriseEmergencyOrganizationLoading} loading={props.enterpriseEmergencyOrganization.enterpriseEmergencyOrganizationLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "机构名称", rules: [{ required: true, message: "请输入机构名称" }], span: 24 }, { name: "agencyName", label: "机构名称", rules: [{ required: true, message: "请输入机构名称" }], span: 24 },
{ {
name: "todo", name: "agencyType",
label: "机构类型", label: "机构类型",
render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationType" />), render: (
<DictionarySelect
dictValue="enterpriseEmergencyOrganizationType"
onGetLabel={(label) => {
form.setFieldValue("agencyTypeName", label);
}}
/>
),
}, },
{ name: "todo", label: "机构级别", render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationLevel" />) }, { name: "agencyTypeName", label: "机构类型名称", onlyForLabel: true },
{ name: "todo", label: "机构职责", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, {
{ name: "todo", label: "值班电话", rules: [{ required: true, message: "请输入值班电话" }, { pattern: TEL_PHONE, message: "请输入正确的值班电话" }] }, name: "agencyLevel",
{ name: "todo", label: "所属区域", render: (<AreaCascader />) }, label: "机构级别",
{ name: "todo", label: "所属单位", span: 24 }, render: (
{ key: "map", customizeRender: true, render: (<Map />), span: 24 }, <DictionarySelect
dictValue="enterpriseEmergencyOrganizationLevel"
onGetLabel={(label) => {
form.setFieldValue("agencyLevelName", label);
}}
/>
),
},
{ name: "agencyLevelName", label: "机构级别名称", onlyForLabel: true },
{ name: "agencyDuty", label: "机构职责", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{
name: "dutyPhone",
label: "值班电话",
rules: [{ required: true, message: "请输入值班电话" }, { pattern: TEL_PHONE, message: "请输入正确的值班电话" }],
},
{
name: "regionCode",
label: "所属区域",
render: (
<AreaCascader
changeOnSelect
onGetNodePaths={(nodes) => {
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
}}
/>
),
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{ name: "companyName", label: "所属单位", span: 24 },
{ key: "map", customizeRender: true, render: (<Map type="cesium" />), span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -22,7 +22,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.agencyName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["enterpriseEmergencyOrganizationDelete"]({ id: record.id }); const { success } = await props["enterpriseEmergencyOrganizationDelete"]({ id: record.id });
if (success) { if (success) {
@ -55,8 +55,8 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "机构名称" }, { name: "likeAgencyName", label: "机构名称" },
{ name: "todo", label: "机构类型", render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationType" />) }, { name: "agencyType", label: "机构类型", render: (<DictionarySelect dictValue="enterpriseEmergencyOrganizationType" />) },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -92,12 +92,12 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "机构名称", dataIndex: "todo" }, { title: "机构名称", dataIndex: "agencyName" },
{ title: "机构类型", dataIndex: "todo" }, { title: "机构类型", dataIndex: "agencyTypeName" },
{ title: "机构级别", dataIndex: "todo" }, { title: "机构级别", dataIndex: "agencyLevelName" },
{ title: "所属区域", dataIndex: "todo" }, { title: "所属区域", dataIndex: "regionCodeName" },
{ title: "所属单位", dataIndex: "todo" }, { title: "所属单位", dataIndex: "companyName" },
{ title: "值班电话", dataIndex: "todo" }, { title: "值班电话", dataIndex: "dutyPhone" },
{ {
title: "操作", title: "操作",
width: 200, width: 200,

View File

@ -9,19 +9,19 @@ function List(props) {
const query = useGetUrlQuery(); const query = useGetUrlQuery();
const { tableProps } = useTable(props["enterpriseEmergencyPersonnelList"], { const { tableProps } = useTable(props["enterpriseEmergencyPersonnelList"], {
params: { enterpriseEmergencyOrganizationId: query.id }, params: { likeAgencyId: query.id },
}); });
return ( return (
<Page headerTitle="查看人员"> <Page headerTitle="查看人员">
<Table <Table
columns={[ columns={[
{ title: "姓名", dataIndex: "todo" }, { title: "姓名", dataIndex: "userName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
{ title: "行政职务", dataIndex: "todo" }, { title: "行政职务", dataIndex: "administrativePosition" },
{ title: "行政级别", dataIndex: "todo" }, { title: "行政级别", dataIndex: "administrativeLevel" },
{ title: "身份证号", dataIndex: "todo" }, { title: "身份证号", dataIndex: "idCardNo" },
{ title: "联系电话", dataIndex: "todo" }, { title: "联系电话", dataIndex: "contactPhone" },
]} ]}
{...tableProps} {...tableProps}
/> />

View File

@ -27,15 +27,15 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "机构名称", children: info.todo, span: 2 }, { label: "机构名称", children: info.agencyName, span: 2 },
{ label: "机构类型", children: info.todo }, { label: "机构类型", children: info.agencyTypeName },
{ label: "机构级别", children: info.todo }, { label: "机构级别", children: info.agencyLevelName },
{ label: "机构职责", children: info.todo, span: 2 }, { label: "机构职责", children: info.agencyDuty, span: 2 },
{ label: "值班电话", children: info.todo }, { label: "值班电话", children: info.dutyPhone },
{ label: "所属区域", children: info.todo }, { label: "所属区域", children: info.regionCodeName },
{ label: "所属单位", children: info.todo, span: 2 }, { label: "所属单位", children: info.companyName, span: 2 },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
]} ]}
/> />
</Spin> </Spin>

View File

@ -3,21 +3,24 @@ import { message } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj"; import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useDictionary from "zy-react-library/hooks/useDictionary";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo"; import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
import { ID_NUMBER, PHONE } from "zy-react-library/regular"; import { ID_NUMBER, PHONE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION, NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace"; import { NS_ENTERPRISE_EMERGENCY_ORGANIZATION, NS_ENTERPRISE_EMERGENCY_PERSONNEL } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const query = useGetUrlQuery(); const query = useGetUrlQuery();
const { getUserInfo } = useGetUserInfo(); const { getUserInfo } = useGetUserInfo();
const { getDictionary } = useDictionary();
const [form] = FormBuilder.useForm(); const [form] = FormBuilder.useForm();
const [enterpriseEmergencyOrganizationList, setEnterpriseEmergencyOrganizationList] = useState([]); const [enterpriseEmergencyOrganizationList, setEnterpriseEmergencyOrganizationList] = useState([]);
const [userInfo, setUserInfo] = useState({}); const [userInfo, setUserInfo] = useState({});
const [genderDictionary, setGenderDictionary] = useState([]);
const getEnterpriseEmergencyOrganizationList = async () => { const getEnterpriseEmergencyOrganizationList = async () => {
const { data } = await props["enterpriseEmergencyOrganizationListAll"](); const { data } = await props["enterpriseEmergencyOrganizationListAll"]();
@ -38,6 +41,8 @@ function Add(props) {
(async () => { (async () => {
const userInfo = await getUserInfo(); const userInfo = await getUserInfo();
setUserInfo(userInfo); setUserInfo(userInfo);
const genderDictionary = await getDictionary({ dictValue: "sys_sex_enum" });
setGenderDictionary(genderDictionary);
})(); })();
}, []); }, []);
@ -58,29 +63,45 @@ function Add(props) {
loading={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading} loading={props.enterpriseEmergencyPersonnel.enterpriseEmergencyPersonnelLoading}
options={[ options={[
{ {
name: "todo", name: "agencyId",
label: "所属机构", label: "所属机构",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: enterpriseEmergencyOrganizationList, items: enterpriseEmergencyOrganizationList,
itemsField: { labelKey: "agencyName", valueKey: "id" },
componentProps: {
onChange: (value) => {
form.setFieldValue("agencyName", getLabelName({
list: enterpriseEmergencyOrganizationList,
status: value,
nameKey: "agencyName",
idKey: "id",
}));
}, },
},
},
{ name: "agencyName", label: "所属机构名称", onlyForLabel: true },
{ {
name: "todo", name: "userId",
label: "用户", label: "用户",
render: ( render: (
<PersonnelSelect <PersonnelSelect
params={{ departmentId: userInfo.departmentId }} params={{ departmentId: userInfo.departmentId }}
onGetOption={(option) => { onGetOption={(option) => {
form.setFieldValue("todo", option.sex || "UNKNOWN"); // 设置到性别字段,兜底使用 UNKNOWN const genderItem = genderDictionary.find(item => item.dictLabel === option.sex);
form.setFieldValue("genderName", genderItem?.dictLabel || "未知");
form.setFieldValue("gender", genderItem?.dictValue || "UNKNOWN");
}} }}
/> />
), ),
}, },
{ name: "todo", label: "排序", render: FORM_ITEM_RENDER_ENUM.NUMBER }, { name: "userName", label: "用户名称", onlyForLabel: true },
{ name: "todo", label: "性别", render: (<DictionarySelect dictValue="sys_sex_enum" disabled />) }, { name: "sortOrder", label: "排序", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "行政职务" }, { name: "genderName", label: "性别", componentProps: { disabled: true } },
{ name: "todo", label: "行政级别" }, { name: "gender", label: "性别ID", onlyForLabel: true },
{ name: "todo", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] }, { name: "administrativePosition", label: "行政职务" },
{ name: "todo", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的联系电话" }] }, { name: "administrativeLevel", label: "行政级别" },
{ name: "idCardNo", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
{ name: "contactPhone", label: "联系电话", rules: [{ pattern: PHONE, message: "请输入正确的联系电话" }] },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.userName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["enterpriseEmergencyPersonnelDelete"]({ id: record.id }); const { success } = await props["enterpriseEmergencyPersonnelDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "姓名" }, { name: "userName", label: "姓名" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,12 +90,12 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "姓名", dataIndex: "todo" }, { title: "姓名", dataIndex: "userName" },
{ title: "性别", dataIndex: "todo" }, { title: "性别", dataIndex: "genderName" },
{ title: "行政职务", dataIndex: "todo" }, { title: "行政职务", dataIndex: "administrativePosition" },
{ title: "行政级别", dataIndex: "todo" }, { title: "行政级别", dataIndex: "administrativeLevel" },
{ title: "身份证号", dataIndex: "todo" }, { title: "身份证号", dataIndex: "idCardNo" },
{ title: "联系电话", dataIndex: "todo" }, { title: "联系电话", dataIndex: "contactPhone" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,14 +27,14 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "所属机构", children: info.todo }, { label: "所属机构", children: info.agencyName },
{ label: "用户", children: info.todo }, { label: "用户", children: info.userName },
{ label: "排序", children: info.todo }, { label: "排序", children: info.sortOrder },
{ label: "性别", children: info.todo }, { label: "性别", children: info.genderName },
{ label: "行政职务", children: info.todo }, { label: "行政职务", children: info.administrativePosition },
{ label: "行政级别", children: info.todo }, { label: "行政级别", children: info.administrativeLevel },
{ label: "身份证号", children: info.todo }, { label: "身份证号", children: info.idCardNo },
{ label: "联系电话", children: info.todo }, { label: "联系电话", children: info.contactPhone },
]} ]}
/> />
</Spin> </Spin>

View File

@ -41,25 +41,89 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.emergencyRescueTeam.emergencyRescueTeamLoading} loading={props.emergencyRescueTeam.emergencyRescueTeamLoading}
options={[ options={[
{ name: "todo", label: "队伍名称" }, { name: "teamName", label: "队伍名称" },
{ name: "todo", label: "队伍类别", render: (<DictionarySelect dictValue="emergencyRescueTeamType1" />) }, {
{ name: "todo", label: "队伍属性", render: (<DictionarySelect dictValue="emergencyRescueTeamAttr1" />) }, name: "teamCategory",
{ name: "todo", label: "队伍级别", render: (<DictionarySelect dictValue="emergencyRescueTeamLevel1" />) }, label: "队伍类别",
{ name: "todo", label: "队伍等级", render: (<DictionarySelect dictValue="emergencyRescueTeamGrade1" />) }, render: (
{ name: "todo", label: "成立日期", render: FORM_ITEM_RENDER_ENUM.DATE }, <DictionarySelect
{ name: "todo", label: "服务区域" }, dictValue="emergencyRescueTeamType1"
{ name: "todo", label: "地址" }, onGetLabel={(label) => {
{ name: "todo", label: "负责人姓名" }, form.setFieldValue("teamCategoryName", label);
{ name: "todo", label: "负责人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] }, }}
{ name: "todo", label: "应急值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的应急值班电话" }] }, />
{ name: "todo", label: "总人数", render: FORM_ITEM_RENDER_ENUM.NUMBER }, ),
{ name: "todo", label: "指战人数", render: FORM_ITEM_RENDER_ENUM.NUMBER }, },
{ name: "todo", label: "车辆数", render: FORM_ITEM_RENDER_ENUM.NUMBER }, { name: "teamCategoryName", label: "队伍类别名称", onlyForLabel: true },
{ name: "todo", label: "后勤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER }, {
{ name: "todo", label: "救援专业", render: (<DictionarySelect dictValue="rescueProfession" />) }, name: "teamAttribute",
{ name: "todo", label: "队员信息", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, label: "队伍属性",
{ name: "todo", label: "专场描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, render: (
{ name: "todo", label: "队员简介", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, <DictionarySelect
dictValue="emergencyRescueTeamAttr1"
onGetLabel={(label) => {
form.setFieldValue("teamAttributeName", label);
}}
/>
),
},
{ name: "teamAttributeName", label: "队伍属性名称", onlyForLabel: true },
{
name: "teamLevel",
label: "队伍级别",
render: (
<DictionarySelect
dictValue="emergencyRescueTeamLevel1"
onGetLabel={(label) => {
form.setFieldValue("teamLevelName", label);
}}
/>
),
},
{ name: "teamLevelName", label: "队伍级别名称", onlyForLabel: true },
{
name: "teamGrade",
label: "队伍等级",
render: (
<DictionarySelect
dictValue="emergencyRescueTeamGrade1"
onGetLabel={(label) => {
form.setFieldValue("teamGradeName", label);
}}
/>
),
},
{ name: "teamGradeName", label: "队伍等级名称", onlyForLabel: true },
{ name: "establishDate", label: "成立日期", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "serviceRegion", label: "服务区域" },
{ name: "address", label: "地址" },
{ name: "leaderName", label: "负责人姓名" },
{ name: "leaderPhone", label: "负责人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
{
name: "emergencyDutyPhone",
label: "应急值班电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的应急值班电话" }],
},
{ name: "totalPeople", label: "总人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "commanderCount", label: "指战人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "vehicleCount", label: "车辆数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "logisticsCount", label: "后勤人数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{
name: "rescueMajor",
label: "救援专业",
render: (
<DictionarySelect
dictValue="rescueProfession"
onGetLabel={(label) => {
form.setFieldValue("rescueMajorName", label);
}}
/>
),
},
{ name: "rescueMajorName", label: "救援专业名称", onlyForLabel: true },
{ name: "memberInfo", label: "队员信息", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "specialtyDesc", label: "专场描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "memberIntroduction", label: "队员简介", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.teamName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["emergencyRescueTeamDelete"]({ id: record.id }); const { success } = await props["emergencyRescueTeamDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "队伍名称" }, { name: "likeTeamName", label: "队伍名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,12 +90,12 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "队伍名称", dataIndex: "todo" }, { title: "队伍名称", dataIndex: "teamName" },
{ title: "队伍类别", dataIndex: "todo" }, { title: "队伍类别", dataIndex: "teamCategoryName" },
{ title: "队伍属性", dataIndex: "todo" }, { title: "队伍属性", dataIndex: "teamAttributeName" },
{ title: "队伍级别", dataIndex: "todo" }, { title: "队伍级别", dataIndex: "teamLevelName" },
{ title: "救援专业", dataIndex: "todo" }, { title: "救援专业", dataIndex: "rescueMajorName" },
{ title: "队伍负责人姓名", dataIndex: "todo" }, { title: "队伍负责人姓名", dataIndex: "leaderName" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,25 +27,25 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "队伍名称", children: info.todo }, { label: "队伍名称", children: info.teamName },
{ label: "队伍类别", children: info.todo }, { label: "队伍类别", children: info.teamCategoryName },
{ label: "队伍属性", children: info.todo }, { label: "队伍属性", children: info.teamAttributeName },
{ label: "队伍级别", children: info.todo }, { label: "队伍级别", children: info.teamLevelName },
{ label: "队伍等级", children: info.todo }, { label: "队伍等级", children: info.teamGradeName },
{ label: "成立日期", children: info.todo }, { label: "成立日期", children: info.establishDate },
{ label: "服务区域", children: info.todo }, { label: "服务区域", children: info.serviceRegion },
{ label: "地址", children: info.todo }, { label: "地址", children: info.address },
{ label: "负责人姓名", children: info.todo }, { label: "负责人姓名", children: info.leaderName },
{ label: "负责人电话", children: info.todo }, { label: "负责人电话", children: info.leaderPhone },
{ label: "应急值班电话", children: info.todo }, { label: "应急值班电话", children: info.emergencyDutyPhone },
{ label: "总人数", children: info.todo }, { label: "总人数", children: info.totalPeople },
{ label: "指战人数", children: info.todo }, { label: "指战人数", children: info.commanderCount },
{ label: "车辆数", children: info.todo }, { label: "车辆数", children: info.vehicleCount },
{ label: "后勤人数", children: info.todo }, { label: "后勤人数", children: info.logisticsCount },
{ label: "救援专业", children: info.todo }, { label: "救援专业", children: info.rescueMajorName },
{ label: "队员信息", children: info.todo, span: 2 }, { label: "队员信息", children: info.memberInfo, span: 2 },
{ label: "专场描述", children: info.todo, span: 2 }, { label: "专场描述", children: info.specialtyDesc, span: 2 },
{ label: "队员简介", children: info.todo, span: 2 }, { label: "队员简介", children: info.memberIntroduction, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -21,7 +21,10 @@ function Add(props) {
return; return;
const { data } = await props["communicationGuaranteeOrganizationInfo"]({ id: query.id }); const { data } = await props["communicationGuaranteeOrganizationInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
useEffect(() => { useEffect(() => {
@ -31,6 +34,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "communicationGuaranteeOrganizationUpdate" : "communicationGuaranteeOrganizationAdd"]({ const { success } = await props[query.id ? "communicationGuaranteeOrganizationUpdate" : "communicationGuaranteeOrganizationAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -45,45 +49,100 @@ function Add(props) {
loading={props.communicationGuaranteeOrganization.communicationGuaranteeOrganizationLoading} loading={props.communicationGuaranteeOrganization.communicationGuaranteeOrganizationLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "通讯机构名称", rules: [{ required: true, message: "请输入通讯机构名称" }] }, { name: "agencyName", label: "通讯机构名称", rules: [{ required: true, message: "请输入通讯机构名称" }] },
{ {
name: "todo", name: "agencyType",
label: "通讯机构类型", label: "通讯机构类型",
render: (<DictionarySelect dictValue="communicationGuaranteeOrganizationType" />), render: (
<DictionarySelect
dictValue="communicationGuaranteeOrganizationType"
onGetLabel={(label) => {
form.setFieldValue("agencyTypeName", label);
}}
/>
),
}, },
{ name: "todo", label: "通讯机构级别" }, { name: "agencyTypeName", label: "通讯机构类型名称", onlyForLabel: true },
{ name: "todo", label: "地址" }, { name: "agencyLevel", label: "通讯机构级别" },
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] }, { name: "address", label: "地址" },
{ name: "todo", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] }, { name: "postalCode", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] }, { name: "dutyPhone", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
{ name: "todo", label: "所属区域", render: (<AreaCascader />) }, { name: "fax", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
{ name: "todo", label: "应急通讯车数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "应急发电车数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "卫星电话数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "基站总数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "应急通讯方式", span: 24 },
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{ {
name: "todo", name: "regionCode",
label: "所属区域",
render: (
<AreaCascader
changeOnSelect
onGetNodePaths={(nodes) => {
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
}}
/>
),
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{ key: "map", customizeRender: true, render: (<Map type="cesium" />), span: 24 },
{ name: "emergencyCommunicationVehicleCount", label: "应急通讯车数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "emergencyGeneratorVehicleCount", label: "应急发电车数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "satellitePhoneCount", label: "卫星电话数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "baseStationTotalCount", label: "基站总数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "emergencyCommunicationMode", label: "应急通讯方式", span: 24 },
{ name: "leaderName", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{
name: "leaderOfficePhone",
label: "负责人办公电话", label: "负责人办公电话",
rules: [ rules: [
{ required: true, message: "请输入负责人办公电话" }, { required: true, message: "请输入负责人办公电话" },
{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" }, { pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" },
], ],
}, },
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] }, {
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] }, name: "leaderMobilePhone",
{ name: "todo", label: "联系人" }, label: "负责人移动电话",
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] }, rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }],
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] }, },
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] }, {
{ name: "todo", label: "联系人邮箱", rules: [{ type: "email", message: "请输入正确的联系人邮箱" }], span: 24 }, name: "leaderHomePhone",
{ name: "todo", label: "主管单位", render: (<DepartmentSelectTree />) }, label: "负责人住宅电话",
{ name: "todo", label: "主管单位地址" }, rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }],
{ name: "todo", label: "企业基本情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, },
{ name: "todo", label: "应急能力描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, { name: "contactPerson", label: "联系人" },
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, {
name: "contactOfficePhone",
label: "联系人办公电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }],
},
{
name: "contactMobilePhone",
label: "联系人移动电话",
rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }],
},
{
name: "contactHomePhone",
label: "联系人住宅电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }],
},
{
name: "contactEmail",
label: "联系人邮箱",
rules: [{ type: "email", message: "请输入正确的联系人邮箱" }],
span: 24,
},
{
name: "supervisorUnit",
label: "主管单位",
render: (
<DepartmentSelectTree onGetLabel={(label) => {
form.setFieldValue("supervisorUnitName", label);
}}
/>
),
},
{ name: "supervisorUnitName", label: "主管单位名称", onlyForLabel: true },
{ name: "supervisorUnitAddress", label: "主管单位地址" },
{ name: "enterpriseBasicInfo", label: "企业基本情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "emergencyCapacityDesc", label: "应急能力描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "remarks", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.agencyName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["communicationGuaranteeOrganizationDelete"]({ id: record.id }); const { success } = await props["communicationGuaranteeOrganizationDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "机构名称" }, { name: "likeAgencyName", label: "机构名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,11 +90,11 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "通讯机构名称", dataIndex: "todo" }, { title: "通讯机构名称", dataIndex: "agencyName" },
{ title: "通讯机构类型", dataIndex: "todo" }, { title: "通讯机构类型", dataIndex: "agencyTypeName" },
{ title: "通讯机构级别", dataIndex: "todo" }, { title: "通讯机构级别", dataIndex: "agencyLevel" },
{ title: "地址", dataIndex: "todo" }, { title: "地址", dataIndex: "address" },
{ title: "值班电话", dataIndex: "todo" }, { title: "值班电话", dataIndex: "dutyPhone" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,35 +27,35 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "通讯机构名称", children: info.todo }, { label: "通讯机构名称", children: info.agencyName },
{ label: "通讯机构类型", children: info.todo }, { label: "通讯机构类型", children: info.agencyTypeName },
{ label: "通讯机构级别", children: info.todo }, { label: "通讯机构级别", children: info.agencyLevel },
{ label: "地址", children: info.todo }, { label: "地址", children: info.address },
{ label: "邮编", children: info.todo }, { label: "邮编", children: info.postalCode },
{ label: "值班电话", children: info.todo }, { label: "值班电话", children: info.dutyPhone },
{ label: "传真", children: info.todo }, { label: "传真", children: info.fax },
{ label: "所属区域", children: info.todo }, { label: "所属区域", children: info.regionCodeName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "应急通讯车数", children: info.todo }, { label: "应急通讯车数", children: info.emergencyCommunicationVehicleCount },
{ label: "应急发电车数", children: info.todo }, { label: "应急发电车数", children: info.emergencyGeneratorVehicleCount },
{ label: "卫星电话数", children: info.todo }, { label: "卫星电话数", children: info.satellitePhoneCount },
{ label: "基站总数", children: info.todo }, { label: "基站总数", children: info.baseStationTotalCount },
{ label: "应急通讯方式", children: info.todo, span: 2 }, { label: "应急通讯方式", children: info.emergencyCommunicationMode, span: 2 },
{ label: "负责人", children: info.todo }, { label: "负责人", children: info.leaderName },
{ label: "负责人办公电话", children: info.todo }, { label: "负责人办公电话", children: info.leaderOfficePhone },
{ label: "负责人移动电话", children: info.todo }, { label: "负责人移动电话", children: info.leaderMobilePhone },
{ label: "负责人住宅电话", children: info.todo }, { label: "负责人住宅电话", children: info.leaderHomePhone },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人办公电话", children: info.todo }, { label: "联系人办公电话", children: info.contactOfficePhone },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactMobilePhone },
{ label: "联系人住宅电话", children: info.todo }, { label: "联系人住宅电话", children: info.contactHomePhone },
{ label: "联系人邮箱", children: info.todo, span: 2 }, { label: "联系人邮箱", children: info.contactEmail, span: 2 },
{ label: "主管单位", children: info.todo }, { label: "主管单位", children: info.supervisorUnitName },
{ label: "主管单位地址", children: info.todo }, { label: "主管单位地址", children: info.supervisorUnitAddress },
{ label: "企业基本情况", children: info.todo, span: 2 }, { label: "企业基本情况", children: info.enterpriseBasicInfo, span: 2 },
{ label: "应急能力描述", children: info.todo, span: 2 }, { label: "应急能力描述", children: info.emergencyCapacityDesc, span: 2 },
{ label: "备注", children: info.todo, span: 2 }, { label: "备注", children: info.remarks, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -21,7 +21,10 @@ function Add(props) {
return; return;
const { data } = await props["medicalGuaranteeOrganizationInfo"]({ id: query.id }); const { data } = await props["medicalGuaranteeOrganizationInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
useEffect(() => { useEffect(() => {
@ -31,6 +34,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "medicalGuaranteeOrganizationUpdate" : "medicalGuaranteeOrganizationAdd"]({ const { success } = await props[query.id ? "medicalGuaranteeOrganizationUpdate" : "medicalGuaranteeOrganizationAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -45,45 +49,95 @@ function Add(props) {
loading={props.medicalGuaranteeOrganization.medicalGuaranteeOrganizationLoading} loading={props.medicalGuaranteeOrganization.medicalGuaranteeOrganizationLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "医疗机构名称", rules: [{ required: true, message: "请输入医疗机构名称" }] }, { name: "agencyName", label: "医疗机构名称", rules: [{ required: true, message: "请输入医疗机构名称" }] },
{ {
name: "todo", name: "agencyType",
label: "医疗机构类型", label: "医疗机构类型",
render: (<DictionarySelect dictValue="medicalGuaranteeOrganizationType" />), render: (
<DictionarySelect
dictValue="medicalGuaranteeOrganizationType"
onGetLabel={(label) => {
form.setFieldValue("agencyTypeName", label);
}}
/>
),
}, },
{ name: "todo", label: "医疗机构级别" }, { name: "agencyTypeName", label: "医疗机构类型名称", onlyForLabel: true },
{ name: "todo", label: "地址" }, { name: "agencyLevel", label: "医疗机构级别" },
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] }, { name: "address", label: "地址" },
{ name: "todo", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] }, { name: "postalCode", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
{ name: "todo", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] }, { name: "fax", label: "传真", rules: [{ pattern: TEL_PHONE, message: "请输入正确的传真" }] },
{ name: "todo", label: "所属区域", render: (<AreaCascader />) }, { name: "dutyPhone", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
{ name: "todo", label: "病床数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "医生数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "护士数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "急救车辆数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "应急通讯方式", span: 24 },
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{ {
name: "todo", name: "regionCode",
label: "所属区域",
render: (
<AreaCascader
changeOnSelect
onGetNodePaths={(nodes) => {
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
}}
/>
),
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{ key: "map", customizeRender: true, render: (<Map type="cesium" />), span: 24 },
{ name: "bedCount", label: "病床数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "doctorCount", label: "医生数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "nurseCount", label: "护士数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "ambulanceCount", label: "急救车辆数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "emergencyCommunication", label: "应急通讯方式", span: 24 },
{ name: "leaderName", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{
name: "leaderOfficePhone",
label: "负责人办公电话", label: "负责人办公电话",
rules: [ rules: [
{ required: true, message: "请输入负责人办公电话" }, { required: true, message: "请输入负责人办公电话" },
{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" }, { pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" },
], ],
}, },
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] }, {
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] }, name: "leaderMobilePhone",
{ name: "todo", label: "联系人" }, label: "负责人移动电话",
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] }, rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }],
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] }, },
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] }, {
{ name: "todo", label: "主管单位", render: (<DepartmentSelectTree />) }, name: "leaderHomePhone",
{ name: "todo", label: "主管单位地址" }, label: "负责人住宅电话",
{ name: "todo", label: "特色", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }],
{ name: "todo", label: "主要医疗设备" }, },
{ name: "todo", label: "抗震设防列数" }, { name: "contactPerson", label: "联系人" },
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, {
name: "contactOfficePhone",
label: "联系人办公电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }],
},
{
name: "contactMobilePhone",
label: "联系人移动电话",
rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }],
},
{
name: "contactHomePhone",
label: "联系人住宅电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }],
},
{
name: "supervisorUnit",
label: "主管单位",
render: (
<DepartmentSelectTree onGetLabel={(label) => {
form.setFieldValue("supervisorUnitName", label);
}}
/>
),
},
{ name: "supervisorUnitName", label: "主管单位名称", onlyForLabel: true },
{ name: "supervisorUnitAddress", label: "主管单位地址" },
{ name: "features", label: "特色", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "mainMedicalEquipment", label: "主要医疗设备" },
{ name: "anticoagulationTreatmentCount", label: "抗震设防列数", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "remarks", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -1,5 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Space } from "antd"; import { Button, message, Modal, Space } from "antd";
import dayjs from "dayjs";
import { useState } from "react"; import { useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon"; import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
@ -21,7 +22,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.agencyName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["medicalGuaranteeOrganizationDelete"]({ id: record.id }); const { success } = await props["medicalGuaranteeOrganizationDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +55,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "机构名称" }, { name: "likeAgencyName", label: "机构名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,14 +91,18 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "医疗机构名称", dataIndex: "todo" }, { title: "医疗机构名称", dataIndex: "agencyName" },
{ title: "医疗结构类型", dataIndex: "todo" }, { title: "医疗结构类型", dataIndex: "agencyTypeName" },
{ title: "医疗机构级别", dataIndex: "todo" }, { title: "医疗机构级别", dataIndex: "agencyLevel" },
{ title: "地址", dataIndex: "todo" }, { title: "地址", dataIndex: "address" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系人固定电话", dataIndex: "todo" }, { title: "联系人固定电话", dataIndex: "contactHomePhone" },
{ title: "联系人移动电话", dataIndex: "todo" }, { title: "联系人移动电话", dataIndex: "contactMobilePhone" },
{ title: "修改时间", dataIndex: "todo" }, {
title: "修改时间",
dataIndex: "updateTime",
render: (_, record) => dayjs(record.updateTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,35 +27,35 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "医疗机构名称", children: info.todo }, { label: "医疗机构名称", children: info.agencyName },
{ label: "医疗机构类型", children: info.todo }, { label: "医疗机构类型", children: info.agencyTypeName },
{ label: "医疗机构级别", children: info.todo }, { label: "医疗机构级别", children: info.agencyLevel },
{ label: "地址", children: info.todo }, { label: "地址", children: info.address },
{ label: "邮编", children: info.todo }, { label: "邮编", children: info.postalCode },
{ label: "传真", children: info.todo }, { label: "传真", children: info.fax },
{ label: "值班电话", children: info.todo }, { label: "值班电话", children: info.dutyPhone },
{ label: "所属区域", children: info.todo }, { label: "所属区域", children: info.regionCodeName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "病床数", children: info.todo }, { label: "病床数", children: info.bedCount },
{ label: "医生数", children: info.todo }, { label: "医生数", children: info.doctorCount },
{ label: "护士数", children: info.todo }, { label: "护士数", children: info.nurseCount },
{ label: "急救车辆数", children: info.todo }, { label: "急救车辆数", children: info.ambulanceCount },
{ label: "应急通讯方式", children: info.todo, span: 2 }, { label: "应急通讯方式", children: info.emergencyCommunication, span: 2 },
{ label: "负责人", children: info.todo }, { label: "负责人", children: info.leaderName },
{ label: "负责人办公电话", children: info.todo }, { label: "负责人办公电话", children: info.leaderOfficePhone },
{ label: "负责人移动电话", children: info.todo }, { label: "负责人移动电话", children: info.leaderMobilePhone },
{ label: "负责人住宅电话", children: info.todo }, { label: "负责人住宅电话", children: info.leaderHomePhone },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人办公电话", children: info.todo }, { label: "联系人办公电话", children: info.contactOfficePhone },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactMobilePhone },
{ label: "联系人住宅电话", children: info.todo }, { label: "联系人住宅电话", children: info.contactHomePhone },
{ label: "主管单位", children: info.todo }, { label: "主管单位", children: info.supervisorUnitName },
{ label: "主管单位地址", children: info.todo }, { label: "主管单位地址", children: info.supervisorUnitAddress },
{ label: "特色", children: info.todo, span: 2 }, { label: "特色", children: info.features, span: 2 },
{ label: "主要医疗设备", children: info.todo }, { label: "主要医疗设备", children: info.mainMedicalEquipment },
{ label: "抗震设防列数", children: info.todo }, { label: "抗震设防列数", children: info.anticoagulationTreatmentCount },
{ label: "备注", children: info.todo, span: 2 }, { label: "备注", children: info.remarks, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -19,7 +19,10 @@ function Add(props) {
return; return;
const { data } = await props["technicalSupportGuaranteeOrganizationInfo"]({ id: query.id }); const { data } = await props["technicalSupportGuaranteeOrganizationInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
useEffect(() => { useEffect(() => {
@ -29,6 +32,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "technicalSupportGuaranteeOrganizationUpdate" : "technicalSupportGuaranteeOrganizationAdd"]({ const { success } = await props[query.id ? "technicalSupportGuaranteeOrganizationUpdate" : "technicalSupportGuaranteeOrganizationAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -43,18 +47,30 @@ function Add(props) {
loading={props.technicalSupportGuaranteeOrganization.technicalSupportGuaranteeOrganizationLoading} loading={props.technicalSupportGuaranteeOrganization.technicalSupportGuaranteeOrganizationLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "机构名称", rules: [{ required: true, message: "请输入机构名称" }], span: 24 }, { name: "agencyName", label: "机构名称", rules: [{ required: true, message: "请输入机构名称" }], span: 24 },
{ name: "todo", label: "地址" }, { name: "address", label: "地址" },
{ name: "todo", label: "所属区域", render: (<AreaCascader />) }, {
{ key: "map", customizeRender: true, render: (<Map />), span: 24 }, name: "regionCode",
{ name: "todo", label: "联系人" }, label: "所属区域",
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] }, render: (
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] }, <AreaCascader
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] }, changeOnSelect
{ name: "todo", label: "运输方式", span: 24 }, onGetNodePaths={(nodes) => {
{ name: "todo", label: "载重", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
{ name: "todo", label: "所用燃料", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, }}
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, />
),
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{ key: "map", customizeRender: true, render: (<Map type="cesium" />), span: 24 },
{ name: "contactPerson", label: "联系人" },
{ name: "contactOfficePhone", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] },
{ name: "contactMobilePhone", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] },
{ name: "contactHomePhone", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] },
{ name: "transportMode", label: "运输方式", span: 24 },
{ name: "loadCapacity", label: "载重", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "fuelType", label: "所用燃料", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "remarks", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -1,5 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Space } from "antd"; import { Button, message, Modal, Space } from "antd";
import dayjs from "dayjs";
import { useState } from "react"; import { useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon"; import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
@ -21,7 +22,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.agencyName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["technicalSupportGuaranteeOrganizationDelete"]({ id: record.id }); const { success } = await props["technicalSupportGuaranteeOrganizationDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +55,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "机构名称" }, { name: "likeAgencyName", label: "机构名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,12 +91,16 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "机构名称", dataIndex: "todo" }, { title: "机构名称", dataIndex: "agencyName" },
{ title: "地址", dataIndex: "todo" }, { title: "地址", dataIndex: "address" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系人固定电话", dataIndex: "todo" }, { title: "联系人固定电话", dataIndex: "contactOfficePhone" },
{ title: "联系人移动电话", dataIndex: "todo" }, { title: "联系人移动电话", dataIndex: "contactMobilePhone" },
{ title: "修改时间", dataIndex: "todo" }, {
title: "修改时间",
dataIndex: "updateTime",
render: (_, record) => dayjs(record.updateTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,19 +27,19 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "机构名称", children: info.todo, span: 2 }, { label: "机构名称", children: info.agencyName, span: 2 },
{ label: "地址", children: info.todo }, { label: "地址", children: info.address },
{ label: "所属区域", children: info.todo }, { label: "所属区域", children: info.regionCodeName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人办公电话", children: info.todo }, { label: "联系人办公电话", children: info.contactOfficePhone },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactMobilePhone },
{ label: "联系人住宅电话", children: info.todo }, { label: "联系人住宅电话", children: info.contactHomePhone },
{ label: "运输方式", children: info.todo, span: 2 }, { label: "运输方式", children: info.transportMode, span: 2 },
{ label: "载重", children: info.todo, span: 2 }, { label: "载重", children: info.loadCapacity, span: 2 },
{ label: "所用燃料", children: info.todo, span: 2 }, { label: "所用燃料", children: info.fuelType, span: 2 },
{ label: "备注", children: info.todo, span: 2 }, { label: "备注", children: info.remarks, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -21,7 +21,10 @@ function Add(props) {
return; return;
const { data } = await props["transportGuaranteeOrganizationInfo"]({ id: query.id }); const { data } = await props["transportGuaranteeOrganizationInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
useEffect(() => { useEffect(() => {
@ -31,6 +34,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "transportGuaranteeOrganizationUpdate" : "transportGuaranteeOrganizationAdd"]({ const { success } = await props[query.id ? "transportGuaranteeOrganizationUpdate" : "transportGuaranteeOrganizationAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -45,42 +49,97 @@ function Add(props) {
loading={props.transportGuaranteeOrganization.transportGuaranteeOrganizationLoading} loading={props.transportGuaranteeOrganization.transportGuaranteeOrganizationLoading}
useAutoGenerateRequired={false} useAutoGenerateRequired={false}
options={[ options={[
{ name: "todo", label: "运输机构名称", rules: [{ required: true, message: "请输入运输机构名称" }] }, { name: "agencyName", label: "运输机构名称", rules: [{ required: true, message: "请输入运输机构名称" }] },
{ {
name: "todo", name: "agencyType",
label: "运输机构类型", label: "运输机构类型",
render: (<DictionarySelect dictValue="transportGuaranteeOrganizationType" />), render: (
<DictionarySelect
dictValue="transportGuaranteeOrganizationType"
onGetLabel={(label) => {
form.setFieldValue("agencyTypeName", label);
}}
/>
),
}, },
{ name: "todo", label: "运输机构级别" }, { name: "agencyTypeName", label: "运输机构类型名称", onlyForLabel: true },
{ name: "todo", label: "地址" }, { name: "agencyLevel", label: "运输机构级别" },
{ name: "todo", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] }, { name: "address", label: "地址" },
{ name: "todo", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] }, { name: "postalCode", label: "邮编", rules: [{ pattern: POSTAL_CODE, message: "请输入正确的邮编" }] },
{ name: "todo", label: "应急运输方式" }, { name: "dutyPhone", label: "值班电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的值班电话" }] },
{ name: "todo", label: "所属区域", render: (<AreaCascader />) }, { name: "emergencyTransportMode", label: "应急运输方式" },
{ key: "map", customizeRender: true, render: (<Map />), span: 24 },
{ name: "todo", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{ {
name: "todo", name: "regionCode",
label: "所属区域",
render: (
<AreaCascader
changeOnSelect
onGetNodePaths={(nodes) => {
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
}}
/>
),
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{ key: "map", customizeRender: true, render: (<Map type="cesium" />), span: 24 },
{ name: "leaderName", label: "负责人", rules: [{ required: true, message: "请输入负责人" }] },
{
name: "leaderOfficePhone",
label: "负责人办公电话", label: "负责人办公电话",
rules: [ rules: [
{ required: true, message: "请输入负责人办公电话" }, { required: true, message: "请输入负责人办公电话" },
{ pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" }, { pattern: TEL_PHONE, message: "请输入正确的负责人办公电话" },
], ],
}, },
{ name: "todo", label: "负责人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }] }, {
{ name: "todo", label: "负责人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }] }, name: "leaderMobilePhone",
{ name: "todo", label: "联系人" }, label: "负责人移动电话",
{ name: "todo", label: "联系人办公电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }] }, rules: [{ pattern: PHONE, message: "请输入正确的负责人移动电话" }],
{ name: "todo", label: "联系人移动电话", rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }] }, },
{ name: "todo", label: "联系人住宅电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }] }, {
{ name: "todo", label: "联系人邮箱", rules: [{ type: "email", message: "请输入正确的联系人邮箱" }], span: 24 }, name: "leaderHomePhone",
{ name: "todo", label: "主管单位", render: (<DepartmentSelectTree />) }, label: "负责人住宅电话",
{ name: "todo", label: "主管单位地址" }, rules: [{ pattern: TEL_PHONE, message: "请输入正确的负责人住宅电话" }],
{ name: "todo", label: "企业基本情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, },
{ name: "todo", label: "客运能力" }, { name: "contactPerson", label: "联系人" },
{ name: "todo", label: "货运能力" }, {
{ name: "todo", label: "应急能力描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, name: "contactOfficePhone",
{ name: "todo", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, label: "联系人办公电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人办公电话" }],
},
{
name: "contactMobilePhone",
label: "联系人移动电话",
rules: [{ pattern: PHONE, message: "请输入正确的联系人移动电话" }],
},
{
name: "contactHomePhone",
label: "联系人住宅电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的联系人住宅电话" }],
},
{
name: "contactEmail",
label: "联系人邮箱",
rules: [{ type: "email", message: "请输入正确的联系人邮箱" }],
span: 24,
},
{
name: "supervisorUnit",
label: "主管单位",
render: (
<DepartmentSelectTree onGetLabel={(label) => {
form.setFieldValue("supervisorUnitName", label);
}}
/>
),
},
{ name: "supervisorUnitName", label: "主管单位名称", onlyForLabel: true },
{ name: "supervisorUnitAddress", label: "主管单位地址" },
{ name: "enterpriseBasicInfo", label: "企业基本情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "passengerCapacity", label: "客运能力" },
{ name: "freightCapacity", label: "货运能力" },
{ name: "emergencyCapacityDesc", label: "应急能力描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "remarks", label: "备注", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.agencyName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["transportGuaranteeOrganizationDelete"]({ id: record.id }); const { success } = await props["transportGuaranteeOrganizationDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "机构名称" }, { name: "likeAgencyName", label: "机构名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,11 +90,11 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "运输机构名称", dataIndex: "todo" }, { title: "运输机构名称", dataIndex: "agencyName" },
{ title: "运输机构类型", dataIndex: "todo" }, { title: "运输机构类型", dataIndex: "agencyTypeName" },
{ title: "运输机构级别", dataIndex: "todo" }, { title: "运输机构级别", dataIndex: "agencyLevel" },
{ title: "地址", dataIndex: "todo" }, { title: "地址", dataIndex: "address" },
{ title: "值班电话", dataIndex: "todo" }, { title: "值班电话", dataIndex: "dutyPhone" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,32 +27,32 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "运输机构名称", children: info.todo }, { label: "运输机构名称", children: info.agencyName },
{ label: "运输机构类型", children: info.todo }, { label: "运输机构类型", children: info.agencyTypeName },
{ label: "运输机构级别", children: info.todo }, { label: "运输机构级别", children: info.agencyLevel },
{ label: "地址", children: info.todo }, { label: "地址", children: info.address },
{ label: "邮编", children: info.todo }, { label: "邮编", children: info.postalCode },
{ label: "值班电话", children: info.todo }, { label: "值班电话", children: info.dutyPhone },
{ label: "应急运输方式", children: info.todo }, { label: "应急运输方式", children: info.emergencyTransportMode },
{ label: "所属区域", children: info.todo }, { label: "所属区域", children: info.regionCodeName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "负责人", children: info.todo }, { label: "负责人", children: info.leaderName },
{ label: "负责人办公电话", children: info.todo }, { label: "负责人办公电话", children: info.leaderOfficePhone },
{ label: "负责人移动电话", children: info.todo }, { label: "负责人移动电话", children: info.leaderMobilePhone },
{ label: "负责人住宅电话", children: info.todo }, { label: "负责人住宅电话", children: info.leaderHomePhone },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人办公电话", children: info.todo }, { label: "联系人办公电话", children: info.contactOfficePhone },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactMobilePhone },
{ label: "联系人住宅电话", children: info.todo }, { label: "联系人住宅电话", children: info.contactHomePhone },
{ label: "联系人邮箱", children: info.todo, span: 2 }, { label: "联系人邮箱", children: info.contactEmail, span: 2 },
{ label: "主管单位", children: info.todo }, { label: "主管单位", children: info.supervisorUnitName },
{ label: "主管单位地址", children: info.todo }, { label: "主管单位地址", children: info.supervisorUnitAddress },
{ label: "企业基本情况", children: info.todo, span: 2 }, { label: "企业基本情况", children: info.enterpriseBasicInfo, span: 2 },
{ label: "客运能力", children: info.todo }, { label: "客运能力", children: info.passengerCapacity },
{ label: "货运能力", children: info.todo }, { label: "货运能力", children: info.freightCapacity },
{ label: "应急能力描述", children: info.todo, span: 2 }, { label: "应急能力描述", children: info.emergencyCapacityDesc, span: 2 },
{ label: "备注", children: info.todo, span: 2 }, { label: "备注", children: info.remarks, span: 2 },
]} ]}
/> />
</Spin> </Spin>

View File

@ -41,12 +41,12 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.closedCardPort.closedCardPortLoading} loading={props.closedCardPort.closedCardPortLoading}
options={[ options={[
{ name: "todo", label: "卡口名称" }, { name: "checkpointName", label: "卡口名称" },
{ name: "todo", label: "详情地址" }, { name: "address", label: "详情地址" },
{ name: "todo", label: "联系人" }, { name: "contactPerson", label: "联系人" },
{ name: "todo", label: "联系人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] }, { name: "contactPhone", label: "联系人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
{ key: "map", customizeRender: true, span: 24, render: (<Map />) }, { key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
{ name: "todo", label: "描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, { name: "remarks", label: "描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.checkpointName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["closedCardPortDelete"]({ id: record.id }); const { success } = await props["closedCardPortDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "卡口名称" }, { name: "likeCheckpointName", label: "卡口名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,10 +90,10 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "卡口名称", dataIndex: "todo" }, { title: "卡口名称", dataIndex: "checkpointName" },
{ title: "地址", dataIndex: "todo" }, { title: "地址", dataIndex: "address" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系电话", dataIndex: "todo" }, { title: "联系电话", dataIndex: "contactPhone" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,13 +27,13 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "卡口名称", children: info.todo }, { label: "卡口名称", children: info.checkpointName },
{ label: "详情地址", children: info.todo }, { label: "详情地址", children: info.address },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人电话", children: info.todo }, { label: "联系人电话", children: info.contactPhone },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "描述", children: info.todo }, { label: "描述", children: info.remarks },
]} ]}
/> />
</Spin> </Spin>

View File

@ -41,12 +41,29 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.drainageWell.drainageWellLoading} loading={props.drainageWell.drainageWellLoading}
options={[ options={[
{ name: "todo", label: "排水井名称" }, { name: "wellName", label: "排水井名称" },
{ name: "todo", label: "类型", render: (<DictionarySelect dictValue="drainageWellType" />) }, {
{ name: "todo", label: "详情地址", required: false, span: 24 }, name: "wellType",
{ name: "todo", label: "联系人", required: false }, label: "类型",
{ name: "todo", label: "联系人固定电话", required: false, rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] }, render: (
{ key: "map", customizeRender: true, span: 24, render: (<Map />) }, <DictionarySelect
dictValue="drainageWellType"
onGetLabel={(label) => {
form.setFieldValue("wellTypeName", label);
}}
/>
),
},
{ name: "wellTypeName", label: "类型名称", onlyForLabel: true },
{ name: "detailAddress", label: "详情地址", required: false, span: 24 },
{ name: "contactPerson", label: "联系人", required: false },
{
name: "contactPhoneFixed",
label: "联系人固定电话",
required: false,
rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
},
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -22,7 +22,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.wellName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["drainageWellDelete"]({ id: record.id }); const { success } = await props["drainageWellDelete"]({ id: record.id });
if (success) { if (success) {
@ -55,8 +55,8 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "排水井名称" }, { name: "likeWellName", label: "排水井名称" },
{ name: "todo", label: "类型", render: (<DictionarySelect dictValue="drainageWellType" />) }, { name: "wellType", label: "类型", render: (<DictionarySelect dictValue="drainageWellType" />) },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -92,11 +92,11 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "排水井名称", dataIndex: "todo" }, { title: "排水井名称", dataIndex: "wellName" },
{ title: "类型", dataIndex: "todo" }, { title: "类型", dataIndex: "wellTypeName" },
{ title: "所在地址", dataIndex: "todo" }, { title: "所在地址", dataIndex: "detailAddress" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系人电话", dataIndex: "todo" }, { title: "联系人电话", dataIndex: "contactPhoneFixed" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,13 +27,13 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "排水井名称", children: info.todo }, { label: "排水井名称", children: info.wellName },
{ label: "类型", children: info.todo }, { label: "类型", children: info.wellTypeName },
{ label: "详情地址", children: info.todo, span: 2 }, { label: "详情地址", children: info.detailAddress, span: 2 },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人固定电话", children: info.todo }, { label: "联系人固定电话", children: info.contactPhoneFixed },
]} ]}
/> />
</Spin> </Spin>

View File

@ -18,7 +18,10 @@ function Add(props) {
return; return;
const { data } = await props["emergencyEquipmentInfo"]({ id: query.id }); const { data } = await props["emergencyEquipmentInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
validityDate: [data.validityStartDate, data.validityEndDate],
});
}; };
useEffect(() => { useEffect(() => {
@ -28,6 +31,8 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "emergencyEquipmentUpdate" : "emergencyEquipmentAdd"]({ const { success } = await props[query.id ? "emergencyEquipmentUpdate" : "emergencyEquipmentAdd"]({
...values, ...values,
validityStartDate: values.validityDate[0],
validityEndDate: values.validityDate[1],
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -41,16 +46,28 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.emergencyEquipment.emergencyEquipmentLoading} loading={props.emergencyEquipment.emergencyEquipmentLoading}
options={[ options={[
{ name: "todo", label: "装备名称" }, { name: "equipmentName", label: "装备名称" },
{ name: "todo", label: "装备类别", render: (<DictionarySelect dictValue="emergencyEquipmentCategory" />) }, {
{ name: "todo", label: "规格型号" }, name: "equipmentCategory",
{ name: "todo", label: "技术性能指标" }, label: "装备类别",
{ name: "todo", label: "保养周期" }, render: (
{ name: "todo", label: "有效期", render: FORM_ITEM_RENDER_ENUM.DATE }, <DictionarySelect
{ name: "todo", label: "用途说明", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, dictValue="emergencyEquipmentCategory"
{ name: "todo", label: "存放场所", span: 24 }, onGetLabel={(label) => {
{ name: "todo", label: "负责保管人姓名" }, form.setFieldValue("equipmentCategoryName", label);
{ name: "todo", label: "负责保管人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] }, }}
/>
),
},
{ name: "equipmentCategoryName", label: "装备类别名称", onlyForLabel: true },
{ name: "specModel", label: "规格型号" },
{ name: "technicalPerformance", label: "技术性能指标" },
{ name: "maintenanceCycle", label: "保养周期" },
{ name: "validityDate", label: "有效期", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{ name: "usageDescription", label: "用途说明", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ name: "storageLocation", label: "存放场所", span: 24 },
{ name: "custodianName", label: "负责保管人姓名" },
{ name: "custodianPhone", label: "负责保管人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -22,7 +22,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.equipmentName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["emergencyEquipmentDelete"]({ id: record.id }); const { success } = await props["emergencyEquipmentDelete"]({ id: record.id });
if (success) { if (success) {
@ -55,8 +55,8 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "装备名称" }, { name: "likeEquipmentName", label: "装备名称" },
{ name: "todo", label: "装备类别", render: (<DictionarySelect dictValue="emergencyEquipmentCategory" />) }, { name: "equipmentCategory", label: "装备类别", render: (<DictionarySelect dictValue="emergencyEquipmentCategory" />) },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -92,10 +92,10 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "装备名称", dataIndex: "todo" }, { title: "装备名称", dataIndex: "equipmentName" },
{ title: "装备类别", dataIndex: "todo" }, { title: "装备类别", dataIndex: "equipmentCategoryName" },
{ title: "规格型号", dataIndex: "todo" }, { title: "规格型号", dataIndex: "specModel" },
{ title: "用途", dataIndex: "todo" }, { title: "用途", dataIndex: "usageDescription" },
{ {
title: "操作", title: "操作",
width: 200, width: 200,

View File

@ -27,16 +27,16 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "装备名称", children: info.todo }, { label: "装备名称", children: info.equipmentName },
{ label: "装备类别", children: info.todo }, { label: "装备类别", children: info.equipmentCategoryName },
{ label: "规格型号", children: info.todo }, { label: "规格型号", children: info.specModel },
{ label: "技术性能指标", children: info.todo }, { label: "技术性能指标", children: info.technicalPerformance },
{ label: "保养周期", children: info.todo }, { label: "保养周期", children: info.maintenanceCycle },
{ label: "有效期", children: info.todo }, { label: "有效期", children: `${info.validityStartDate} - ${info.validityEndDate}` },
{ label: "用途说明", children: info.todo }, { label: "用途说明", children: info.usageDescription },
{ label: "存放场所", children: info.todo }, { label: "存放场所", children: info.storageLocation },
{ label: "负责保管人姓名", children: info.todo }, { label: "负责保管人姓名", children: info.custodianName },
{ label: "负责保管人电话", children: info.todo }, { label: "负责保管人电话", children: info.custodianPhone },
]} ]}
/> />
</Spin> </Spin>

View File

@ -9,6 +9,7 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { PHONE, TEL_PHONE } from "zy-react-library/regular"; import { PHONE, TEL_PHONE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import { NS_EMERGENCY_SHELTER, NS_GLOBAL } from "~/enumerate/namespace"; import { NS_EMERGENCY_SHELTER, NS_GLOBAL } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
@ -22,7 +23,10 @@ function Add(props) {
return; return;
const { data } = await props["emergencyShelterInfo"]({ id: query.id }); const { data } = await props["emergencyShelterInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue({
...data,
regionCode: data.regionCode ? data.regionCode.split(",") : [],
});
}; };
const getCorpInfoList = async () => { const getCorpInfoList = async () => {
@ -38,6 +42,7 @@ function Add(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props[query.id ? "emergencyShelterUpdate" : "emergencyShelterAdd"]({ const { success } = await props[query.id ? "emergencyShelterUpdate" : "emergencyShelterAdd"]({
...values, ...values,
regionCode: values.regionCode.join(","),
id: query.id, id: query.id,
}); });
if (success) { if (success) {
@ -51,23 +56,68 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.emergencyShelter.emergencyShelterLoading} loading={props.emergencyShelter.emergencyShelterLoading}
options={[ options={[
{ name: "todo", label: "避难所名称" }, { name: "placeName", label: "避难所名称" },
{ name: "todo", label: "场所类型", render: (<DictionarySelect dictValue="emergencyShelterType" />) },
{ name: "todo", label: "详情地址", required: false, span: 24 },
{ key: "map", customizeRender: true, span: 24, render: (<Map />) },
{ name: "todo", label: "联系人" },
{ name: "todo", label: "联系人固定电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "联系人移动电话", required: false, rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] },
{ name: "todo", label: "企业名称", required: false },
{ name: "todo", label: "所属区域", render: (<AreaCascader />), required: false },
{ {
name: "todo", name: "placeType",
label: "场所类型",
render: (
<DictionarySelect
dictValue="emergencyShelterType"
onGetLabel={(label) => {
form.setFieldValue("placeTypeName", label);
}}
/>
),
},
{ name: "placeTypeName", label: "场所类型名称", onlyForLabel: true },
{ name: "detailAddress", label: "详情地址", required: false, span: 24 },
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
{ name: "contactPerson", label: "联系人" },
{
name: "contactPhoneFixed",
label: "联系人固定电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
},
{
name: "contactPhoneMobile",
label: "联系人移动电话",
required: false,
rules: [{ pattern: PHONE, message: "请输入正确的手机号" }],
},
{ name: "enterpriseName", label: "企业名称", required: false },
{
name: "regionCode",
label: "所属区域",
render: (
<AreaCascader
changeOnSelect
onGetNodePaths={(nodes) => {
form.setFieldValue("regionCodeName", nodes.map(node => node.label).join("/"));
}}
/>
),
required: false,
},
{ name: "regionCodeName", label: "所属区域名称", onlyForLabel: true },
{
name: "affiliatedUnit",
label: "所属单位", label: "所属单位",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: corpInfoList, items: corpInfoList,
itemsField: { labelKey: "corpName", valueKey: "id" }, itemsField: { labelKey: "corpName", valueKey: "id" },
required: false, required: false,
componentProps: {
onChange: (value) => {
form.setFieldValue("affiliatedUnitName", getLabelName({
list: corpInfoList,
status: value,
idKey: "id",
nameKey: "corpName",
}));
}, },
},
},
{ name: "affiliatedUnitName", label: "所属单位名称", onlyForLabel: true },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.placeName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["emergencyShelterDelete"]({ id: record.id }); const { success } = await props["emergencyShelterDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,7 +54,7 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "避难所名称" }, { name: "likePlaceName", label: "避难所名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -90,10 +90,10 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "避难所名称", dataIndex: "todo" }, { title: "避难所名称", dataIndex: "placeName" },
{ title: "场所类型", dataIndex: "todo" }, { title: "场所类型", dataIndex: "placeTypeName" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系人固定电话", dataIndex: "todo" }, { title: "联系人固定电话", dataIndex: "contactPhoneFixed" },
{ {
title: "操作", title: "操作",
width: 150, width: 150,

View File

@ -27,17 +27,17 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "避难所名称", children: info.todo }, { label: "避难所名称", children: info.placeName },
{ label: "场所类型", children: info.todo }, { label: "场所类型", children: info.placeTypeName },
{ label: "详情地址", children: info.todo, span: 2 }, { label: "详情地址", children: info.detailAddress, span: 2 },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人固定电话", children: info.todo }, { label: "联系人固定电话", children: info.contactPhoneFixed },
{ label: "联系人移动电话", children: info.todo }, { label: "联系人移动电话", children: info.contactPhoneMobile },
{ label: "企业名称", children: info.todo }, { label: "企业名称", children: info.enterpriseName },
{ label: "所属区域", children: info.todo }, { label: "所属区域", children: info.regionCodeName },
{ label: "所属单位", children: info.todo }, { label: "所属单位", children: info.affiliatedUnitName },
]} ]}
/> />
</Spin> </Spin>

View File

@ -41,15 +41,15 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.materialEquipment.materialEquipmentLoading} loading={props.materialEquipment.materialEquipmentLoading}
options={[ options={[
{ name: "todo", label: "资源库名称" }, { name: "warehouseName", label: "资源库名称" },
{ name: "todo", label: "所在地点" }, { name: "address", label: "所在地点" },
{ name: "todo", label: "存放资源类别" }, { name: "resourceCategory", label: "存放资源类别" },
{ name: "todo", label: "资源数量", render: FORM_ITEM_RENDER_ENUM.NUMBER }, { name: "resourceQuantity", label: "资源数量", render: FORM_ITEM_RENDER_ENUM.NUMBER },
{ name: "todo", label: "联系人" }, { name: "contactPerson", label: "联系人" },
{ name: "todo", label: "联系人电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] }, { name: "contactPhone", label: "联系人电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "联系手机号", rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] }, { name: "contactMobile", label: "联系手机号", rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] },
{ name: "todo", label: "企业名称" }, { name: "companyName", label: "企业名称" },
{ key: "map", customizeRender: true, span: 24, render: (<Map />) }, { key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -52,7 +52,7 @@ function Add(props) {
...values, ...values,
fileId, fileId,
id: query.id, id: query.id,
materialEquipmentId: query.materialEquipmentId, warehouseId: query.warehouseId,
}); });
if (success) { if (success) {
message.success(query.id ? "编辑成功" : "新增成功"); message.success(query.id ? "编辑成功" : "新增成功");
@ -65,19 +65,31 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.materialEquipment.facilitiesEquipmentLoading || getFileLoading || deleteFileLoading || uploadFileLoading} loading={props.materialEquipment.facilitiesEquipmentLoading || getFileLoading || deleteFileLoading || uploadFileLoading}
options={[ options={[
{ name: "todo", label: "设备名称" }, { name: "equipmentName", label: "设备名称" },
{ name: "todo", label: "设备类型", render: (<DictionarySelect dictValue="materialsEquipmentType" />) },
{ key: "map", customizeRender: true, span: 24, render: (<Map />) },
{ name: "todo", label: "联系人" },
{ name: "todo", label: "联系人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
{ name: "todo", label: "第二联系人", required: false },
{ {
name: "todo", name: "equipmentType",
label: "设备类型",
render: (
<DictionarySelect
dictValue="materialsEquipmentType"
onGetLabel={(label) => {
form.setFieldValue("equipmentTypeName", label);
}}
/>
),
},
{ name: "equipmentTypeName", label: "设备类型名称", onlyForLabel: true },
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
{ name: "contactPerson", label: "联系人" },
{ name: "contactPhone", label: "联系人电话", rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }] },
{ name: "secondContactPerson", label: "第二联系人", required: false },
{
name: "secondContactPhone",
label: "第二联系人电话", label: "第二联系人电话",
rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }], rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }],
required: false, required: false,
}, },
{ name: "todo", label: "概述", required: false, render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 }, { name: "summary", label: "概述", required: false, render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
{ {
name: "files", name: "files",
label: "附件", label: "附件",

View File

@ -1,5 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Space } from "antd"; import { Button, message, Modal, Space } from "antd";
import dayjs from "dayjs";
import { useState } from "react"; import { useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon"; import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
@ -18,15 +19,15 @@ function List(props) {
const { tableProps, getData } = useTable(props["facilitiesEquipmentList"], { const { tableProps, getData } = useTable(props["facilitiesEquipmentList"], {
form, form,
params: { materialEquipmentId: query.id }, params: { likeWarehouseId: query.id },
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.equipmentName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["facilitiesEquipmentDelete"]({ id: record.id, materialEquipmentId: query.id }); const { success } = await props["facilitiesEquipmentDelete"]({ id: record.id });
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -44,10 +45,7 @@ function List(props) {
title: "删除确认", title: "删除确认",
content: "确认要删除吗?", content: "确认要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["facilitiesEquipmentDeleteBatch"]({ const { success } = await props["facilitiesEquipmentDeleteBatch"]({ ids: selectedRowKeys });
ids: selectedRowKeys,
materialEquipmentId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -60,7 +58,7 @@ function List(props) {
<Page headerTitle="设施设备"> <Page headerTitle="设施设备">
<Search <Search
options={[ options={[
{ name: "todo", label: "设备名称" }, { name: "equipmentName", label: "设备名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -79,7 +77,7 @@ function List(props) {
type="primary" type="primary"
icon={(<AddIcon />)} icon={(<AddIcon />)}
onClick={() => { onClick={() => {
props.history.push(`./add?materialEquipmentId=${query.id}`); props.history.push(`./add?warehouseId=${query.id}`);
}} }}
> >
新增 新增
@ -96,11 +94,15 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "设备名称", dataIndex: "todo" }, { title: "设备名称", dataIndex: "equipmentName" },
{ title: "设备类型", dataIndex: "todo" }, { title: "设备类型", dataIndex: "equipmentTypeName" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系人固定电话", dataIndex: "todo" }, { title: "联系人固定电话", dataIndex: "contactPhone" },
{ title: "修改时间", dataIndex: "todo" }, {
title: "修改时间",
dataIndex: "updateTime",
render: (_, record) => dayjs(record.updateTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ {
title: "操作", title: "操作",
width: 150, width: 150,
@ -118,7 +120,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./add?id=${record.id}&materialEquipmentId=${query.id}`); props.history.push(`./add?id=${record.id}&warehouseId=${query.id}`);
}} }}
> >
编辑 编辑

View File

@ -4,44 +4,67 @@ import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import PreviewImg from "zy-react-library/components/PreviewImg"; import PreviewImg from "zy-react-library/components/PreviewImg";
import PreviewPdf from "zy-react-library/components/PreviewPdf"; import PreviewPdf from "zy-react-library/components/PreviewPdf";
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useGetFile from "zy-react-library/hooks/useGetFile";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { getFileSuffix } from "zy-react-library/utils"; import { getFileSuffix } from "zy-react-library/utils";
import { NS_MATERIAL_EQUIPMENT } from "~/enumerate/namespace"; import { NS_MATERIAL_EQUIPMENT } from "~/enumerate/namespace";
function View(props) { function View(props) {
const query = useGetUrlQuery(); const query = useGetUrlQuery();
const { loading: getFileLoading, getFile } = useGetFile();
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});
const getData = async () => { const getData = async () => {
const { data } = await props["facilitiesEquipmentInfo"]({ id: query.id }); const { data } = await props["facilitiesEquipmentInfo"]({ id: query.id });
setInfo(data); const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[701], eqForeignKey: data.fileId });
setInfo({
...data,
files,
});
}; };
useEffect(() => { useEffect(() => {
getData(); getData();
}, []); }, []);
const previewFile = (files = []) => {
const pdfFile = [];
const imgFile = [];
for (let i = 0; i < files.length; i++) {
const file = files[i];
if (getFileSuffix(file.fileName) === "pdf")
pdfFile.push(file);
else
imgFile.push(file);
}
return (
<>
<PreviewPdf files={pdfFile} />
<PreviewImg files={imgFile} />
</>
);
};
return ( return (
<Page headerTitle="查看"> <Page headerTitle="查看">
<Spin spinning={props.materialEquipment.facilitiesEquipmentLoading}> <Spin spinning={props.materialEquipment.facilitiesEquipmentLoading || getFileLoading}>
<Descriptions <Descriptions
bordered bordered
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "设备名称", children: info.todo }, { label: "设备名称", children: info.equipmentName },
{ label: "设备类型", children: info.todo }, { label: "设备类型", children: info.equipmentTypeName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人电话", children: info.todo }, { label: "联系人电话", children: info.contactPhone },
{ label: "第二联系人", children: info.todo }, { label: "第二联系人", children: info.secondContactPerson },
{ label: "第二联系人电话", children: info.todo }, { label: "第二联系人电话", children: info.secondContactPhone },
{ label: "概述", children: info.todo }, { label: "概述", children: info.summary },
{ label: "附件", children: getFileSuffix(info.todo) === "pdf" { label: "附件", children: previewFile(info.files) },
? <PreviewPdf files={info.todo} />
: <PreviewImg files={info.todo} /> },
]} ]}
/> />
</Spin> </Spin>

View File

@ -21,7 +21,7 @@ function List(props) {
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.warehouseName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["materialEquipmentDelete"]({ id: record.id }); const { success } = await props["materialEquipmentDelete"]({ id: record.id });
if (success) { if (success) {
@ -54,9 +54,9 @@ function List(props) {
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
options={[ options={[
{ name: "todo", label: "资源库名称" }, { name: "likeWarehouseName", label: "资源库名称" },
{ name: "todo", label: "所在地点" }, { name: "address", label: "所在地点" },
{ name: "todo", label: "联系人" }, { name: "contactPerson", label: "联系人" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -92,15 +92,15 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "资源库名称", dataIndex: "todo" }, { title: "资源库名称", dataIndex: "warehouseName" },
{ title: "所在地点", dataIndex: "todo" }, { title: "所在地点", dataIndex: "address" },
{ title: "存放资源类别", dataIndex: "todo" }, { title: "存放资源类别", dataIndex: "resourceCategory" },
{ title: "资源数量", dataIndex: "todo" }, { title: "资源数量", dataIndex: "resourceQuantity" },
{ title: "联系人", dataIndex: "todo" }, { title: "联系人", dataIndex: "contactPerson" },
{ title: "联系人电话", dataIndex: "todo" }, { title: "联系人电话", dataIndex: "contactPhone" },
{ {
title: "操作", title: "操作",
width: 300, width: 400,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <Space>

View File

@ -8,6 +8,7 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { PHONE, TEL_PHONE } from "zy-react-library/regular"; import { PHONE, TEL_PHONE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import { NS_GLOBAL, NS_MATERIAL_EQUIPMENT } from "~/enumerate/namespace"; import { NS_GLOBAL, NS_MATERIAL_EQUIPMENT } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
@ -20,7 +21,7 @@ function Add(props) {
if (!query.id) if (!query.id)
return; return;
const { data } = await props["facilitiesEquipmentInfo"]({ id: query.id }); const { data } = await props["materialInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue(data);
}; };
@ -38,7 +39,7 @@ function Add(props) {
const { success } = await props[query.id ? "materialUpdate" : "materialAdd"]({ const { success } = await props[query.id ? "materialUpdate" : "materialAdd"]({
...values, ...values,
id: query.id, id: query.id,
materialEquipmentId: query.materialEquipmentId, warehouseId: query.warehouseId,
}); });
if (success) { if (success) {
message.success(query.id ? "编辑成功" : "新增成功"); message.success(query.id ? "编辑成功" : "新增成功");
@ -51,26 +52,49 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.materialEquipment.materialLoading} loading={props.materialEquipment.materialLoading}
options={[ options={[
{ name: "todo", label: "物资名称" }, { name: "materialName", label: "物资名称" },
{ name: "todo", label: "物资类别", render: (<DictionarySelect dictValue="materialType" />) },
{ key: "map", customizeRender: true, span: 24, render: (<Map />) },
{ name: "todo", label: "负责保管人" },
{ name: "todo", label: "保管人固定电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ {
name: "todo", name: "materialCategory",
label: "物资类别",
render: (
<DictionarySelect
dictValue="materialType"
onGetLabel={(label) => {
form.setFieldValue("materialCategoryName", label);
}}
/>
),
},
{ name: "materialCategoryName", label: "物资类别名称", onlyForLabel: true },
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
{ name: "custodian", label: "负责保管人" },
{ name: "custodianFixedPhone", label: "保管人固定电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{
name: "custodianMobilePhone",
label: "保管人移动电话", label: "保管人移动电话",
required: false, required: false,
rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }], rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }],
}, },
{ name: "todo", label: "企业名称", required: false }, { name: "companyName", label: "企业名称", required: false },
{ {
name: "todo", name: "affiliatedUnit",
label: "采集单位", label: "采集单位",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: corpInfoList, items: corpInfoList,
itemsField: { labelKey: "corpName", valueKey: "id" }, itemsField: { labelKey: "corpName", valueKey: "id" },
required: false, required: false,
componentProps: {
onChange: (value) => {
form.setFieldValue("affiliatedUnitName", getLabelName({
list: corpInfoList,
status: value,
idKey: "id",
nameKey: "corpName",
}));
}, },
},
},
{ name: "affiliatedUnitName", label: "采集单位名称", onlyForLabel: true },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -1,5 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Space } from "antd"; import { Button, message, Modal, Space } from "antd";
import dayjs from "dayjs";
import { useState } from "react"; import { useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon"; import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
@ -18,15 +19,15 @@ function List(props) {
const { tableProps, getData } = useTable(props["materialList"], { const { tableProps, getData } = useTable(props["materialList"], {
form, form,
params: { materialEquipmentId: query.id }, params: { likeWarehouseId: query.id },
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.materialName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["materialDelete"]({ id: record.id, materialEquipmentId: query.id }); const { success } = await props["materialDelete"]({ id: record.id });
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -44,7 +45,7 @@ function List(props) {
title: "删除确认", title: "删除确认",
content: "确认要删除吗?", content: "确认要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["materialDeleteBatch"]({ ids: selectedRowKeys, materialEquipmentId: query.id }); const { success } = await props["materialDeleteBatch"]({ ids: selectedRowKeys });
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -57,7 +58,7 @@ function List(props) {
<Page headerTitle="物资"> <Page headerTitle="物资">
<Search <Search
options={[ options={[
{ name: "todo", label: "物资名称" }, { name: "materialName", label: "物资名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -76,7 +77,7 @@ function List(props) {
type="primary" type="primary"
icon={(<AddIcon />)} icon={(<AddIcon />)}
onClick={() => { onClick={() => {
props.history.push(`./add?materialEquipmentId=${query.id}`); props.history.push(`./add?warehouseId=${query.id}`);
}} }}
> >
新增 新增
@ -93,12 +94,16 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "物资名称", dataIndex: "todo" }, { title: "物资名称", dataIndex: "materialName" },
{ title: "物资类别", dataIndex: "todo" }, { title: "物资类别", dataIndex: "materialCategoryName" },
{ title: "负责保管人", dataIndex: "todo" }, { title: "负责保管人", dataIndex: "custodian" },
{ title: "负责保管人固定电话", dataIndex: "todo" }, { title: "负责保管人固定电话", dataIndex: "custodianFixedPhone" },
{ title: "负责保管人移动电话", dataIndex: "todo" }, { title: "负责保管人移动电话", dataIndex: "custodianMobilePhone" },
{ title: "修改时间", dataIndex: "todo" }, {
title: "修改时间",
dataIndex: "updateTime",
render: (_, record) => dayjs(record.updateTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ {
title: "操作", title: "操作",
width: 150, width: 150,
@ -116,7 +121,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./add?id=${record.id}&materialEquipmentId=${query.id}`); props.history.push(`./add?id=${record.id}&warehouseId=${query.id}`);
}} }}
> >
编辑 编辑

View File

@ -27,15 +27,15 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "物资名称", children: info.todo }, { label: "物资名称", children: info.materialName },
{ label: "物资类别", children: info.todo }, { label: "物资类别", children: info.materialCategoryName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "负责保管人", children: info.todo }, { label: "负责保管人", children: info.custodian },
{ label: "保管人固定电话", children: info.todo }, { label: "保管人固定电话", children: info.custodianFixedPhone },
{ label: "保管人移动电话", children: info.todo }, { label: "保管人移动电话", children: info.custodianMobilePhone },
{ label: "企业名称", children: info.todo }, { label: "企业名称", children: info.companyName },
{ label: "采集单位", children: info.todo }, { label: "采集单位", children: info.affiliatedUnitName },
]} ]}
/> />
</Spin> </Spin>

View File

@ -8,6 +8,7 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { PHONE, TEL_PHONE } from "zy-react-library/regular"; import { PHONE, TEL_PHONE } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import { NS_GLOBAL, NS_MATERIAL_EQUIPMENT } from "~/enumerate/namespace"; import { NS_GLOBAL, NS_MATERIAL_EQUIPMENT } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
@ -20,7 +21,7 @@ function Add(props) {
if (!query.id) if (!query.id)
return; return;
const { data } = await props["facilitiesEquipmentInfo"]({ id: query.id }); const { data } = await props["rescueEquipmentInfo"]({ id: query.id });
form.setFieldsValue(data); form.setFieldsValue(data);
}; };
@ -38,7 +39,7 @@ function Add(props) {
const { success } = await props[query.id ? "rescueEquipmentUpdate" : "rescueEquipmentAdd"]({ const { success } = await props[query.id ? "rescueEquipmentUpdate" : "rescueEquipmentAdd"]({
...values, ...values,
id: query.id, id: query.id,
materialEquipmentId: query.materialEquipmentId, warehouseId: query.warehouseId,
}); });
if (success) { if (success) {
message.success(query.id ? "编辑成功" : "新增成功"); message.success(query.id ? "编辑成功" : "新增成功");
@ -51,26 +52,53 @@ function Add(props) {
<FormBuilder <FormBuilder
loading={props.materialEquipment.rescueEquipmentLoading} loading={props.materialEquipment.rescueEquipmentLoading}
options={[ options={[
{ name: "todo", label: "装备名称" }, { name: "equipmentName", label: "装备名称" },
{ name: "todo", label: "装备类别", render: (<DictionarySelect dictValue="rescueEquipmentType" />) },
{ key: "map", customizeRender: true, span: 24, render: (<Map />) },
{ name: "todo", label: "负责保管人" },
{ name: "todo", label: "保管人固定电话", rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }] },
{ {
name: "todo", name: "equipmentCategory",
label: "装备类别",
render: (
<DictionarySelect
dictValue="rescueEquipmentType"
onGetLabel={(label) => {
form.setFieldValue("equipmentCategoryName", label);
}}
/>
),
},
{ name: "equipmentCategoryName", label: "装备类别名称", onlyForLabel: true },
{ key: "map", customizeRender: true, span: 24, render: (<Map type="cesium" />) },
{ name: "custodian", label: "负责保管人" },
{
name: "custodianFixedPhone",
label: "保管人固定电话",
rules: [{ pattern: TEL_PHONE, message: "请输入正确的电话号码" }],
},
{
name: "custodianMobilePhone",
label: "保管人移动电话", label: "保管人移动电话",
required: false, required: false,
rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }], rules: [{ pattern: PHONE, message: "请输入正确的电话号码" }],
}, },
{ name: "todo", label: "企业名称", required: false }, { name: "companyName", label: "企业名称", required: false },
{ {
name: "todo", name: "affiliatedUnit",
label: "所属单位", label: "所属单位",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: corpInfoList, items: corpInfoList,
itemsField: { labelKey: "corpName", valueKey: "id" }, itemsField: { labelKey: "corpName", valueKey: "id" },
required: false, required: false,
componentProps: {
onChange: (value) => {
form.setFieldValue("affiliatedUnitName", getLabelName({
list: corpInfoList,
status: value,
idKey: "id",
nameKey: "corpName",
}));
}, },
},
},
{ name: "affiliatedUnitName", label: "所属单位名称", onlyForLabel: true },
]} ]}
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}

View File

@ -1,5 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Space } from "antd"; import { Button, message, Modal, Space } from "antd";
import dayjs from "dayjs";
import { useState } from "react"; import { useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon"; import DeleteIcon from "zy-react-library/components/Icon/DeleteIcon";
@ -18,15 +19,15 @@ function List(props) {
const { tableProps, getData } = useTable(props["rescueEquipmentList"], { const { tableProps, getData } = useTable(props["rescueEquipmentList"], {
form, form,
params: { materialEquipmentId: query.id }, params: { likeWarehouseId: query.id },
}); });
const onDelete = (record) => { const onDelete = (record) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: `确定要删除【${record.todo}】吗`, content: `确定要删除【${record.equipmentName}】吗`,
onOk: async () => { onOk: async () => {
const { success } = await props["rescueEquipmentDelete"]({ id: record.id, materialEquipmentId: query.id }); const { success } = await props["rescueEquipmentDelete"]({ id: record.id });
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -44,10 +45,7 @@ function List(props) {
title: "删除确认", title: "删除确认",
content: "确认要删除吗?", content: "确认要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["rescueEquipmentDeleteBatch"]({ const { success } = await props["rescueEquipmentDeleteBatch"]({ ids: selectedRowKeys });
ids: selectedRowKeys,
materialEquipmentId: query.id,
});
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -60,7 +58,7 @@ function List(props) {
<Page headerTitle="救援装备"> <Page headerTitle="救援装备">
<Search <Search
options={[ options={[
{ name: "todo", label: "装备名称" }, { name: "equipmentName", label: "装备名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
@ -79,7 +77,7 @@ function List(props) {
type="primary" type="primary"
icon={(<AddIcon />)} icon={(<AddIcon />)}
onClick={() => { onClick={() => {
props.history.push(`./add?materialEquipmentId=${query.id}`); props.history.push(`./add?warehouseId=${query.id}`);
}} }}
> >
新增 新增
@ -96,12 +94,16 @@ function List(props) {
</Space> </Space>
)} )}
columns={[ columns={[
{ title: "装备名称", dataIndex: "todo" }, { title: "装备名称", dataIndex: "equipmentName" },
{ title: "装备类别", dataIndex: "todo" }, { title: "装备类别", dataIndex: "equipmentCategoryName" },
{ title: "负责保管人", dataIndex: "todo" }, { title: "负责保管人", dataIndex: "custodian" },
{ title: "负责保管人固定电话", dataIndex: "todo" }, { title: "负责保管人固定电话", dataIndex: "custodianFixedPhone" },
{ title: "负责保管人移动电话", dataIndex: "todo" }, { title: "负责保管人移动电话", dataIndex: "custodianMobilePhone" },
{ title: "修改时间", dataIndex: "todo" }, {
title: "修改时间",
dataIndex: "updateTime",
render: (_, record) => dayjs(record.updateTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ {
title: "操作", title: "操作",
width: 150, width: 150,
@ -119,7 +121,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./add?id=${record.id}&materialEquipmentId=${query.id}`); props.history.push(`./add?id=${record.id}&warehouseId=${query.id}`);
}} }}
> >
编辑 编辑

View File

@ -27,15 +27,15 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "装备名称", children: info.todo }, { label: "装备名称", children: info.equipmentName },
{ label: "装备类别", children: info.todo }, { label: "装备类别", children: info.equipmentCategoryName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
{ label: "负责保管人", children: info.todo }, { label: "负责保管人", children: info.custodian },
{ label: "保管人固定电话", children: info.todo }, { label: "保管人固定电话", children: info.custodianFixedPhone },
{ label: "保管人移动电话", children: info.todo }, { label: "保管人移动电话", children: info.custodianMobilePhone },
{ label: "企业名称", children: info.todo }, { label: "企业名称", children: info.companyName },
{ label: "所属单位", children: info.todo }, { label: "所属单位", children: info.affiliatedUnitName },
]} ]}
/> />
</Spin> </Spin>

View File

@ -27,16 +27,16 @@ function View(props) {
column={2} column={2}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "资源库名称", children: info.todo }, { label: "资源库名称", children: info.warehouseName },
{ label: "所在地点", children: info.todo }, { label: "所在地点", children: info.address },
{ label: "存放资源类别", children: info.todo }, { label: "存放资源类别", children: info.resourceCategory },
{ label: "资源数量", children: info.todo }, { label: "资源数量", children: info.resourceQuantity },
{ label: "联系人", children: info.todo }, { label: "联系人", children: info.contactPerson },
{ label: "联系人电话", children: info.todo }, { label: "联系人电话", children: info.contactPhone },
{ label: "联系手机号", children: info.todo }, { label: "联系手机号", children: info.contactMobile },
{ label: "企业名称", children: info.todo }, { label: "企业名称", children: info.companyName },
{ label: "经度", children: info.todo }, { label: "经度", children: info.longitude },
{ label: "纬度", children: info.todo }, { label: "纬度", children: info.latitude },
]} ]}
/> />
</Spin> </Spin>