11.15 电子评标室模块增加权限字

This commit is contained in:
jl-zhoujl2
2022-11-15 10:28:57 +08:00
parent ad2470755e
commit 9b5b689e45
10 changed files with 253 additions and 243 deletions

View File

@ -7,6 +7,7 @@ import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservatio
import { getRecordData, getSiteList } from './service';
import { isEmpty } from '@/utils/CommonUtils';
import { getSessionRoleData } from '@/utils/session';
import { btnAuthority } from '@/utils/authority';
const orange_bg = { background: '#ffbc83', color: '#333333', cursor: 'pointer', width: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
const light_orange_bg = { background: '#faf7e5' };
@ -45,7 +46,7 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
onCell: (record) => {
return {
style: record[ite.id]?.iskssj ? orange_bg : light_orange_bg,
onClick: record[ite.id]?.iskssj ? () => onCellClick(record[ite.id]) : void 0,
onClick: !btnAuthority(["ebtp-appointment", "ebtp-site-admin"]) && record[ite.id]?.iskssj ? () => onCellClick(record[ite.id]) : void 0,
}
},
render: (_: any, record: any) => {
@ -86,14 +87,14 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
<div>
{tableData.length > 0 && (
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: 16 }}>
<Space>
{!btnAuthority(["ebtp-appointment", "ebtp-site-admin"]) && <Space>
<Button key="last-week" size='small' type="primary" onClick={() => weekChange("0")}>
</Button>
<Button key="after-week" size='small' type="primary" onClick={() => weekChange("1")}>
</Button>
</Space>
</Space>}
<Space size="middle">
<div style={align_middle}><Tag color="#faf7e5" style={tag_size}></Tag>{roleCode == "ebtp-appointment" ? "会议室" : "电子评标室"}</div>
<div style={align_middle}><Tag color="#ffbc83" style={tag_size}></Tag>{roleCode == "ebtp-appointment" ? "会议室" : "电子评标室"}</div>
@ -172,15 +173,15 @@ export default () => {
<Card title={roleCode == "ebtp-appointment" ? "会议室预约情况" : "评标室预约情况"} bodyStyle={{ padding: '16px 0px', height: window.innerHeight - 120, overflowY: 'auto' }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 36px 16px' }}>
<Space>
<Button key="yuyue" type="primary" onClick={() => createMeet()}>
{!btnAuthority(["ebtp-appointment", "ebtp-site-admin"]) && <Button key="yuyue" type="primary" onClick={() => createMeet()}>
</Button>
</Button>}
{roleCode == "ebtp-appointment" ? (//预约人员
<Button key="myyuyue" onClick={() => MyReserveContent()}>
</Button>
) : (
<Button key="yuyueconfirm" onClick={() => viewMeetContent()}>
!btnAuthority(["ebtp-site-admin"]) && <Button key="yuyueconfirm" onClick={() => viewMeetContent()}>
</Button>
)}