监管端增加按钮权限
parent
2a46b1361e
commit
4394bbcb10
|
|
@ -31,7 +31,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.30"
|
"zy-react-library": "^1.2.32"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyAddressBookList"], {
|
const { tableProps, getData } = useTable(props["emergencyAddressBookList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
usePagination: false,
|
usePagination: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-enterprise-emergency-address-book-member") && (
|
{(props.isRecord || props.permission("qyd-enterprise-emergency-address-book-member")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertList"], {
|
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -110,7 +110,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-expert-emergency-rescue-expert-view") && (
|
{(props.isRecord || props.permission("qyd-expert-emergency-rescue-expert-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertGroupList"], {
|
const { tableProps, getData } = useTable(props["expertEmergencyRescueExpertGroupList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -109,7 +109,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-expert-emergency-rescue-group-view") && (
|
{(props.isRecord || props.permission("qyd-expert-emergency-rescue-group-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -119,7 +119,7 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-expert-emergency-rescue-group-member-manage") && (
|
{(props.isRecord || props.permission("qyd-expert-emergency-rescue-group-member-manage")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["expertEmergencyRescueTeamList"], {
|
const { tableProps, getData } = useTable(props["expertEmergencyRescueTeamList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -112,7 +112,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-expert-emergency-rescue-team-view") && (
|
{(props.isRecord || props.permission("qyd-expert-emergency-rescue-team-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -122,7 +122,7 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-expert-emergency-rescue-team-emergency-rescue-personnel") && (
|
{(props.isRecord || props.permission("qyd-expert-emergency-rescue-team-emergency-rescue-personnel")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["enterpriseEmergencyOrganizationList"], {
|
const { tableProps, getData } = useTable(props["enterpriseEmergencyOrganizationList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -113,7 +113,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-enterprise-emergency-org-personnel") && (
|
{(props.isRecord || props.permission("qyd-enterprise-emergency-org-personnel")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -123,7 +123,7 @@ function List(props) {
|
||||||
查看人员
|
查看人员
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-enterprise-emergency-org-view") && (
|
{(props.isRecord || props.permission("qyd-enterprise-emergency-org-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["enterpriseEmergencyPersonnelList"], {
|
const { tableProps, getData } = useTable(props["enterpriseEmergencyPersonnelList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -111,7 +111,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-enterprise-emergency-personnel-view") && (
|
{(props.isRecord || props.permission("qyd-enterprise-emergency-personnel-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyRescueTeamList"], {
|
const { tableProps, getData } = useTable(props["emergencyRescueTeamList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["communicationGuaranteeOrganizationList"], {
|
const { tableProps, getData } = useTable(props["communicationGuaranteeOrganizationList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -110,7 +110,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-communication-guarantee-org-view") && (
|
{(props.isRecord || props.permission("qyd-communication-guarantee-org-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["medicalGuaranteeOrganizationList"], {
|
const { tableProps, getData } = useTable(props["medicalGuaranteeOrganizationList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -118,7 +118,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-medical-guarantee-org-view") && (
|
{(props.isRecord || props.permission("qyd-medical-guarantee-org-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["technicalSupportGuaranteeOrganizationList"], {
|
const { tableProps, getData } = useTable(props["technicalSupportGuaranteeOrganizationList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -116,7 +116,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-technical-support-org-view") && (
|
{(props.isRecord || props.permission("qyd-technical-support-org-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["transportGuaranteeOrganizationList"], {
|
const { tableProps, getData } = useTable(props["transportGuaranteeOrganizationList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -110,7 +110,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-transport-guarantee-org-view") && (
|
{(props.isRecord || props.permission("qyd-transport-guarantee-org-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["dutyLogList"], {
|
const { tableProps, getData } = useTable(props["dutyLogList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -113,7 +113,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-duty-log-view") && (
|
{(props.isRecord || props.permission("qyd-duty-log-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ function List(props) {
|
||||||
const { tableProps, getData } = useTable(props["schedulingRegistrationListAll"], {
|
const { tableProps, getData } = useTable(props["schedulingRegistrationListAll"], {
|
||||||
form,
|
form,
|
||||||
usePagination: false,
|
usePagination: false,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
form,
|
form,
|
||||||
params: { likeEmergencyCaseType: 1, corpinfoId: query.corpinfoId },
|
params: { likeEmergencyCaseType: 1, corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -123,7 +123,7 @@ function List(props) {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-case-library-download") && (
|
{(props.isRecord || props.permission("qyd-case-library-download")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
form,
|
form,
|
||||||
params: { likeEmergencyCaseType: 4, corpinfoId: query.corpinfoId },
|
params: { likeEmergencyCaseType: 4, corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -122,7 +122,7 @@ function List(props) {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-generation-process-download") && (
|
{(props.isRecord || props.permission("qyd-generation-process-download")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
form,
|
form,
|
||||||
params: { likeEmergencyCaseType: 3, corpinfoId: query.corpinfoId },
|
params: { likeEmergencyCaseType: 3, corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -121,7 +121,7 @@ function List(props) {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-hazardous-chemicals-download") && (
|
{(props.isRecord || props.permission("qyd-hazardous-chemicals-download")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
const { tableProps, getData } = useTable(props["emergencyKnowledgeLibraryList"], {
|
||||||
form,
|
form,
|
||||||
params: { likeEmergencyCaseType: 2, corpinfoId: query.corpinfoId },
|
params: { likeEmergencyCaseType: 2, corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -120,7 +120,7 @@ function List(props) {
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-hazardous-goods-download") && (
|
{(props.isRecord || props.permission("qyd-hazardous-goods-download")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function List(props) {
|
||||||
occurrenceStartTime: formData.occurrenceTime?.[0],
|
occurrenceStartTime: formData.occurrenceTime?.[0],
|
||||||
occurrenceEndTime: formData.occurrenceTime?.[1],
|
occurrenceEndTime: formData.occurrenceTime?.[1],
|
||||||
}),
|
}),
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onRescue = async (id) => {
|
const onRescue = async (id) => {
|
||||||
|
|
@ -94,7 +94,7 @@ function List(props) {
|
||||||
是否救援
|
是否救援
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-event-report-view") && (
|
{(props.isRecord || props.permission("qyd-event-report-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["closedCardPortList"], {
|
const { tableProps, getData } = useTable(props["closedCardPortList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -109,7 +109,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-closed-card-port-view") && (
|
{(props.isRecord || props.permission("qyd-closed-card-port-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["drainageWellList"], {
|
const { tableProps, getData } = useTable(props["drainageWellList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -112,7 +112,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-drainage-well-view") && (
|
{(props.isRecord || props.permission("qyd-drainage-well-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyEquipmentList"], {
|
const { tableProps, getData } = useTable(props["emergencyEquipmentList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -111,7 +111,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-emergency-equipment-view") && (
|
{(props.isRecord || props.permission("qyd-emergency-equipment-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyShelterList"], {
|
const { tableProps, getData } = useTable(props["emergencyShelterList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -109,7 +109,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-emergency-shelter-view") && (
|
{(props.isRecord || props.permission("qyd-emergency-shelter-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["materialEquipmentList"], {
|
const { tableProps, getData } = useTable(props["materialEquipmentList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -113,8 +113,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-material-equipment-facilities-equipment")
|
{(props.isRecord || props.permission("qyd-material-equipment-facilities-equipment")) && (
|
||||||
&& (
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -124,8 +123,7 @@ function List(props) {
|
||||||
查看设施设备
|
查看设施设备
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-material-equipment-rescue-equipment")
|
{(props.isRecord || props.permission("qyd-material-equipment-rescue-equipment")) && (
|
||||||
&& (
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -135,7 +133,7 @@ function List(props) {
|
||||||
查看救援装备
|
查看救援装备
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-material-equipment-material") && (
|
{(props.isRecord || props.permission("qyd-material-equipment-material")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -145,7 +143,7 @@ function List(props) {
|
||||||
查看物资
|
查看物资
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission("qyd-material-equipment-view") && (
|
{(props.isRecord || props.permission("qyd-material-equipment-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ function List(props) {
|
||||||
drillStartTime: formData.drillTime?.[0],
|
drillStartTime: formData.drillTime?.[0],
|
||||||
drillEndTime: formData.drillTime?.[1],
|
drillEndTime: formData.drillTime?.[1],
|
||||||
}),
|
}),
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -115,7 +115,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-enterprise-emergency-exercise-view") && (
|
{(props.isRecord || props.permission("qyd-enterprise-emergency-exercise-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["emergencyPlanList"], {
|
const { tableProps, getData } = useTable(props["emergencyPlanList"], {
|
||||||
form,
|
form,
|
||||||
params: { corpinfoId: query.corpinfoId },
|
params: { corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -109,7 +109,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("qyd-enterprise-emergency-plan-view") && (
|
{(props.isRecord || props.permission("qyd-enterprise-emergency-plan-view")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["enterprisePlanBasicInfoList"], {
|
const { tableProps, getData } = useTable(props["enterprisePlanBasicInfoList"], {
|
||||||
form,
|
form,
|
||||||
params: { processStatus: props.processStatus || 0, corpinfoId: query.corpinfoId },
|
params: { processStatus: props.processStatus || 0, corpId: query.corpinfoId },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -51,7 +51,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
{(!props.processStatus && props.permission("qyd-enterprise-plan-add")) && (
|
{(!props.isRecord && !props.processStatus && props.permission("qyd-enterprise-plan-add")) && (
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon={(<AddIcon />)}
|
icon={(<AddIcon />)}
|
||||||
|
|
@ -80,7 +80,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{(props.processStatus !== 2 && props.permission(props.viewBtn || "qyd-enterprise-plan-view")) && (
|
{(props.isRecord || (props.processStatus !== 2 && props.permission(props.viewBtn || "qyd-enterprise-plan-view"))) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -90,7 +90,7 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{(props.processStatus === 2 && props.permission("qyd-enterprise-plan-audit-audit")) && (
|
{(!props.isRecord && props.processStatus === 2 && props.permission("qyd-enterprise-plan-audit-audit")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -100,7 +100,7 @@ function List(props) {
|
||||||
审核
|
审核
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{(record.auditFlag === "3" && props.permission(props.reasonsRefusalBtn || "qyd-enterprise-plan-reasons-refusal")) && (
|
{(record.auditFlag === "3" && (props.isRecord || props.permission(props.reasonsRefusalBtn || "qyd-enterprise-plan-reasons-refusal"))) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -111,7 +111,7 @@ function List(props) {
|
||||||
驳回原因
|
驳回原因
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{(!props.processStatus && props.permission("qyd-enterprise-plan-edit")) && (
|
{(!props.isRecord && !props.processStatus && props.permission("qyd-enterprise-plan-edit")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -121,7 +121,7 @@ function List(props) {
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{(!props.processStatus && props.permission("qyd-enterprise-plan-del")) && (
|
{(!props.isRecord && !props.processStatus && props.permission("qyd-enterprise-plan-del")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
danger
|
danger
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
import { Button, Space } from "antd";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
|
|
@ -32,6 +33,8 @@ function List(props) {
|
||||||
width: 150,
|
width: 150,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
{props.permission("jgd-emergency-address-book") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -40,6 +43,8 @@ function List(props) {
|
||||||
>
|
>
|
||||||
应急救援人列表
|
应急救援人列表
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -49,4 +54,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,42 +30,36 @@ function List(props) {
|
||||||
title: "救援队伍数",
|
title: "救援队伍数",
|
||||||
dataIndex: "emergencyRescueTeamCount",
|
dataIndex: "emergencyRescueTeamCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-expert-emergency-rescue-team"),
|
||||||
onClick={() => {
|
url: `./expertEmergencyRescueTeam/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./expertEmergencyRescueTeam/list?corpinfoId=${record.corpinfoId}`);
|
text: record.emergencyRescueTeamCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.emergencyRescueTeamCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应急救援专家数",
|
title: "应急救援专家数",
|
||||||
dataIndex: "emergencyRescueExpertCount",
|
dataIndex: "emergencyRescueExpertCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-expert-emergency-rescue-expert"),
|
||||||
onClick={() => {
|
url: `./expertEmergencyRescueExpert/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./expertEmergencyRescueExpert/list?corpinfoId=${record.corpinfoId}`);
|
text: record.emergencyRescueExpertCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.emergencyRescueExpertCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应急救援专家组数",
|
title: "应急救援专家组数",
|
||||||
dataIndex: "emergencyRescueExpertGroupCount",
|
dataIndex: "emergencyRescueExpertGroupCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-expert-emergency-rescue-expert-group"),
|
||||||
onClick={() => {
|
url: `./expertEmergencyRescueExpertGroup/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./expertEmergencyRescueExpertGroup/list?corpinfoId=${record.corpinfoId}`);
|
text: record.emergencyRescueExpertGroupCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.emergencyRescueExpertGroupCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -74,4 +69,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,28 +30,24 @@ function List(props) {
|
||||||
title: "应急机构数",
|
title: "应急机构数",
|
||||||
dataIndex: "enterpriseEmergencyAgencyCount",
|
dataIndex: "enterpriseEmergencyAgencyCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-enterprise-emergency-organization"),
|
||||||
onClick={() => {
|
url: `./enterpriseEmergencyOrganization/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./enterpriseEmergencyOrganization/list?corpinfoId=${record.corpinfoId}`);
|
text: record.enterpriseEmergencyAgencyCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.enterpriseEmergencyAgencyCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应急救援人数",
|
title: "应急救援人数",
|
||||||
dataIndex: "enterpriseEmergencyPersonnelCount",
|
dataIndex: "enterpriseEmergencyPersonnelCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-enterprise-emergency-personnel"),
|
||||||
onClick={() => {
|
url: `./enterpriseEmergencyPersonnel/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./enterpriseEmergencyPersonnel/list?corpinfoId=${record.corpinfoId}`);
|
text: record.enterpriseEmergencyPersonnelCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.enterpriseEmergencyPersonnelCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -60,4 +57,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,14 +30,12 @@ function List(props) {
|
||||||
title: "救援队伍数量",
|
title: "救援队伍数量",
|
||||||
dataIndex: "emergencyRescueTeamManagementCount",
|
dataIndex: "emergencyRescueTeamManagementCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-emergency-rescue-team"),
|
||||||
onClick={() => {
|
url: `./emergencyRescueTeam/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./emergencyRescueTeam/list?corpinfoId=${record.corpinfoId}`);
|
text: record.emergencyRescueTeamManagementCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.emergencyRescueTeamManagementCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -46,4 +45,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,56 +30,48 @@ function List(props) {
|
||||||
title: "运输保障机构",
|
title: "运输保障机构",
|
||||||
dataIndex: "transportSecurityAgencyCount",
|
dataIndex: "transportSecurityAgencyCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-transport-guarantee-organization"),
|
||||||
onClick={() => {
|
url: `./transportGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./transportGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`);
|
text: record.transportSecurityAgencyCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.transportSecurityAgencyCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "医疗保障机构",
|
title: "医疗保障机构",
|
||||||
dataIndex: "medicalSecurityAgencyCount",
|
dataIndex: "medicalSecurityAgencyCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-medical-guarantee-organization"),
|
||||||
onClick={() => {
|
url: `./medicalGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./medicalGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`);
|
text: record.medicalSecurityAgencyCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.medicalSecurityAgencyCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "通讯保障机构",
|
title: "通讯保障机构",
|
||||||
dataIndex: "communicationSecurityAgencyCount",
|
dataIndex: "communicationSecurityAgencyCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-communication-guarantee-organization"),
|
||||||
onClick={() => {
|
url: `./communicationGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./communicationGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`);
|
text: record.communicationSecurityAgencyCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.communicationSecurityAgencyCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "技术支持机构",
|
title: "技术支持机构",
|
||||||
dataIndex: "technicalSupportAgencyCount",
|
dataIndex: "technicalSupportAgencyCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-technical-support-guarantee-organization"),
|
||||||
onClick={() => {
|
url: `./technicalSupportGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./technicalSupportGuaranteeOrganization/list?corpinfoId=${record.corpinfoId}`);
|
text: record.technicalSupportAgencyCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.technicalSupportAgencyCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -88,4 +81,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
import { Button, Space } from "antd";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
|
|
@ -33,6 +34,8 @@ function List(props) {
|
||||||
width: 100,
|
width: 100,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
|
<Space>
|
||||||
|
{props.permission("jgd-event-report") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -41,6 +44,8 @@ function List(props) {
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -50,4 +55,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,56 +30,48 @@ function List(props) {
|
||||||
title: "案例库数",
|
title: "案例库数",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-case"),
|
||||||
onClick={() => {
|
url: `./case/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./case/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "危险货物品数",
|
title: "危险货物品数",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-hazardous-goods"),
|
||||||
onClick={() => {
|
url: `./hazardousGoods/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./hazardousGoods/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "危化品数",
|
title: "危化品数",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-hazardous-chemicals"),
|
||||||
onClick={() => {
|
url: `./hazardousChemicals/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./hazardousChemicals/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "生产工艺数",
|
title: "生产工艺数",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-generation-process"),
|
||||||
onClick={() => {
|
url: `./generationProcess/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./generationProcess/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -88,4 +81,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Space } from "antd";
|
import { Button, Space } from "antd";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
|
|
@ -29,6 +30,7 @@ function List(props) {
|
||||||
title: "操作",
|
title: "操作",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
{props.permission("jgd-duty-log") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -37,6 +39,8 @@ function List(props) {
|
||||||
>
|
>
|
||||||
值班日志
|
值班日志
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
|
{props.permission("jgd-scheduling-registration") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -45,6 +49,7 @@ function List(props) {
|
||||||
>
|
>
|
||||||
排班登记记录
|
排班登记记录
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
@ -55,4 +60,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -28,7 +29,14 @@ function List(props) {
|
||||||
{
|
{
|
||||||
title: "救援次数",
|
title: "救援次数",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => <Button type="link">{record.todo}</Button>,
|
render: (_, record) => (
|
||||||
|
permissionButtonByStatistics({
|
||||||
|
permission: props.permission("jgd-rescue"),
|
||||||
|
url: `./todo/list?corpinfoId=${record.corpinfoId}`,
|
||||||
|
text: record.todo,
|
||||||
|
history: props.history,
|
||||||
|
})
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
|
|
@ -37,4 +45,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,84 +30,72 @@ function List(props) {
|
||||||
title: "应急装备数",
|
title: "应急装备数",
|
||||||
dataIndex: "emergencyEquipmentCount",
|
dataIndex: "emergencyEquipmentCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-emergency-equipment"),
|
||||||
onClick={() => {
|
url: `./emergencyEquipment/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./emergencyEquipment/list?corpinfoId=${record.corpinfoId}`);
|
text: record.emergencyEquipmentCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.emergencyEquipmentCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "物资装备库数",
|
title: "物资装备库数",
|
||||||
dataIndex: "materialEquipmentCount",
|
dataIndex: "materialEquipmentCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-material-equipment"),
|
||||||
onClick={() => {
|
url: `./materialEquipment/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./materialEquipment/list?corpinfoId=${record.corpinfoId}`);
|
text: record.materialEquipmentCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.materialEquipmentCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应急避难场所数",
|
title: "应急避难场所数",
|
||||||
dataIndex: "placeInfoCount",
|
dataIndex: "placeInfoCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-emergency-shelter"),
|
||||||
onClick={() => {
|
url: `./emergencyShelter/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./emergencyShelter/list?corpinfoId=${record.corpinfoId}`);
|
text: record.placeInfoCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.placeInfoCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "消防物资数",
|
title: "消防物资数",
|
||||||
dataIndex: "fireFightingCount",
|
dataIndex: "fireFightingCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-firefighting-equipment"),
|
||||||
onClick={() => {
|
url: `./firefightingEquipment/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./firefightingEquipment/list?corpinfoId=${record.corpinfoId}`);
|
text: record.fireFightingCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.fireFightingCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "排水井数",
|
title: "排水井数",
|
||||||
dataIndex: "drainageWellCount",
|
dataIndex: "drainageWellCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-drainage-well"),
|
||||||
onClick={() => {
|
url: `./drainageWell/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./drainageWell/list?corpinfoId=${record.corpinfoId}`);
|
text: record.drainageWellCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.drainageWellCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "封闭卡口数",
|
title: "封闭卡口数",
|
||||||
dataIndex: "closedCheckpointInfoCount",
|
dataIndex: "closedCheckpointInfoCount",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-closed-card-port"),
|
||||||
onClick={() => {
|
url: `./closedCardPort/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./closedCardPort/list?corpinfoId=${record.corpinfoId}`);
|
text: record.closedCheckpointInfoCount,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.closedCheckpointInfoCount}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -116,4 +105,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,14 +30,12 @@ function List(props) {
|
||||||
title: "应急演练次数",
|
title: "应急演练次数",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-emergency-exercise"),
|
||||||
onClick={() => {
|
url: `./emergencyExercise/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./emergencyExercise/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -46,4 +45,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,14 +30,12 @@ function List(props) {
|
||||||
title: "应急预案数量",
|
title: "应急预案数量",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-emergency-plan"),
|
||||||
onClick={() => {
|
url: `./emergencyPlan/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./emergencyPlan/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -46,4 +45,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import ListPage from "~/pages/Container/Enterprise/PlanAndDrill/EnterprisePlan/List";
|
import ListPage from "~/pages/Container/Enterprise/PlanAndDrill/EnterprisePlan/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return (<ListPage processStatus={1} headerTitle="企业预案" {...props} />);
|
return (<ListPage processStatus={1} isRecord headerTitle="企业预案" {...props} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default List;
|
export default List;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button } from "antd";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_STATISTICS } from "~/enumerate/namespace";
|
import { NS_STATISTICS } from "~/enumerate/namespace";
|
||||||
|
import { permissionButtonByStatistics } from "~/utils";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
|
|
@ -29,14 +30,12 @@ function List(props) {
|
||||||
title: "企业预案数量",
|
title: "企业预案数量",
|
||||||
dataIndex: "todo",
|
dataIndex: "todo",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
permissionButtonByStatistics({
|
||||||
type="link"
|
permission: props.permission("jgd-enterprise-plan"),
|
||||||
onClick={() => {
|
url: `./enterprisePlan/list?corpinfoId=${record.corpinfoId}`,
|
||||||
props.history.push(`./enterprisePlan/list?corpinfoId=${record.corpinfoId}`);
|
text: record.todo,
|
||||||
}}
|
history: props.history,
|
||||||
>
|
})
|
||||||
{record.todo}
|
|
||||||
</Button>
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -46,4 +45,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STATISTICS], true)(List);
|
export default Connect([NS_STATISTICS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { Button } from "antd";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计页面权限按钮组件
|
||||||
|
* @param {object} options - 配置选项
|
||||||
|
* @param {boolean} options.permission - 权限标识
|
||||||
|
* @param {object} options.history - history 对象
|
||||||
|
* @param {string|number} options.text - 按钮显示文本
|
||||||
|
* @param {string} options.url - 跳转路径
|
||||||
|
* @returns {JSX.Element} 有权限时返回 Button 组件,无权限时返回 span 标签
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* permissionButtonByStatistics({
|
||||||
|
* permission: props.permission(""),
|
||||||
|
* url: "",
|
||||||
|
* text: "",
|
||||||
|
* history: props.history,
|
||||||
|
* })
|
||||||
|
*/
|
||||||
|
export function permissionButtonByStatistics({ permission, history, text, url }) {
|
||||||
|
return (
|
||||||
|
permission
|
||||||
|
? (
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
history.push(url);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{text}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
: <span>{text}</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue