11.15 电子评标室模块增加权限字
This commit is contained in:
@ -3,6 +3,7 @@ import { message, PageHeader, Button, Spin } from 'antd';
|
|||||||
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
|
||||||
import { getPage, handleAlarm } from './service';
|
import { getPage, handleAlarm } from './service';
|
||||||
import ViewEvalAlarmUpdateModal from '../../Evaluation/BidControl/BidControlManager/components/ViewEvalAlarmUpdateModal';
|
import ViewEvalAlarmUpdateModal from '../../Evaluation/BidControl/BidControlManager/components/ViewEvalAlarmUpdateModal';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
|
|
||||||
interface alarmData {
|
interface alarmData {
|
||||||
@ -82,10 +83,10 @@ const AbnormalAalarm: React.FC<{}> = () => {
|
|||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
if (record.type === "1") {
|
if (record.type === "1") {
|
||||||
if (record.status === "0") {
|
if (record.status === "0") {
|
||||||
return <Button type="text" onClick={() => { handle(record); }}>处理</Button>
|
return !btnAuthority(["ebtp-site-supervision"]) && <Button type="text" onClick={() => { handle(record); }}>处理</Button>
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return (<Button type='text' onClick={() => { EnvData(record); setViewDetailModalVisible(true); }}>查看详情</Button>
|
return (!btnAuthority(["ebtp-site-supervision"]) && <Button type='text' onClick={() => { EnvData(record); setViewDetailModalVisible(true); }}>查看详情</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservatio
|
|||||||
import { getRecordData, getSiteList } from './service';
|
import { getRecordData, getSiteList } from './service';
|
||||||
import { isEmpty } from '@/utils/CommonUtils';
|
import { isEmpty } from '@/utils/CommonUtils';
|
||||||
import { getSessionRoleData } from '@/utils/session';
|
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 orange_bg = { background: '#ffbc83', color: '#333333', cursor: 'pointer', width: '100%', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' };
|
||||||
const light_orange_bg = { background: '#faf7e5' };
|
const light_orange_bg = { background: '#faf7e5' };
|
||||||
@ -45,7 +46,7 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
onCell: (record) => {
|
onCell: (record) => {
|
||||||
return {
|
return {
|
||||||
style: record[ite.id]?.iskssj ? orange_bg : light_orange_bg,
|
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) => {
|
render: (_: any, record: any) => {
|
||||||
@ -86,14 +87,14 @@ const ScreenTable = (props: { record: any, onCellClick: (id: any) => void, refre
|
|||||||
<div>
|
<div>
|
||||||
{tableData.length > 0 && (
|
{tableData.length > 0 && (
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', paddingBottom: 16 }}>
|
<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 key="last-week" size='small' type="primary" onClick={() => weekChange("0")}>
|
||||||
上一周
|
上一周
|
||||||
</Button>
|
</Button>
|
||||||
<Button key="after-week" size='small' type="primary" onClick={() => weekChange("1")}>
|
<Button key="after-week" size='small' type="primary" onClick={() => weekChange("1")}>
|
||||||
下一周
|
下一周
|
||||||
</Button>
|
</Button>
|
||||||
</Space>
|
</Space>}
|
||||||
<Space size="middle">
|
<Space size="middle">
|
||||||
<div style={align_middle}><Tag color="#faf7e5" style={tag_size}></Tag>可预约{roleCode == "ebtp-appointment" ? "会议室" : "电子评标室"}</div>
|
<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>
|
<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' }}>
|
<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' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 36px 16px' }}>
|
||||||
<Space>
|
<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" ? (//预约人员
|
{roleCode == "ebtp-appointment" ? (//预约人员
|
||||||
<Button key="myyuyue" onClick={() => MyReserveContent()}>
|
<Button key="myyuyue" onClick={() => MyReserveContent()}>
|
||||||
我的预约
|
我的预约
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button key="yuyueconfirm" onClick={() => viewMeetContent()}>
|
!btnAuthority(["ebtp-site-admin"]) && <Button key="yuyueconfirm" onClick={() => viewMeetContent()}>
|
||||||
查看预约详情
|
查看预约详情
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
@ -7,6 +7,7 @@ import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils';
|
|||||||
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { dateTimeFormatter } from '@/utils/DateUtils';
|
import { dateTimeFormatter } from '@/utils/DateUtils';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
const MyReserve: React.FC<{}> = () => {
|
const MyReserve: React.FC<{}> = () => {
|
||||||
const meetingRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
const meetingRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
||||||
@ -139,7 +140,7 @@ const MyReserve: React.FC<{}> = () => {
|
|||||||
search: false,
|
search: false,
|
||||||
render: (text: any, record: any) => {
|
render: (text: any, record: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-appointment"]) && <>
|
||||||
<Button type="text" onClick={() => viewMeet(record)} danger>
|
<Button type="text" onClick={() => viewMeet(record)} danger>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
@ -211,7 +212,7 @@ const MyReserve: React.FC<{}> = () => {
|
|||||||
>
|
>
|
||||||
{searchConfig?.searchText}
|
{searchConfig?.searchText}
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
!btnAuthority(["ebtp-appointment"]) && <Button
|
||||||
key="addText"
|
key="addText"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => createMeet()}
|
onClick={() => createMeet()}
|
||||||
|
@ -7,6 +7,7 @@ import { getURLInformation, isNotEmpty } from '@/utils/CommonUtils';
|
|||||||
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
import MeetingReservation from '@/components/ElecBidEvaluation/MeetingReservation';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { dateTimeFormatter } from '@/utils/DateUtils';
|
import { dateTimeFormatter } from '@/utils/DateUtils';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
const { TabPane } = Tabs;
|
const { TabPane } = Tabs;
|
||||||
const statusEnum = {
|
const statusEnum = {
|
||||||
@ -166,7 +167,7 @@ const Index: React.FC<{}> = () => {
|
|||||||
search: false,
|
search: false,
|
||||||
render: (text: any, record: any) => {
|
render: (text: any, record: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-site-admin"]) && <>
|
||||||
<Button type="text" onClick={() => viewMeet(record)} danger>
|
<Button type="text" onClick={() => viewMeet(record)} danger>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
@ -254,7 +255,7 @@ const Index: React.FC<{}> = () => {
|
|||||||
search: false,
|
search: false,
|
||||||
render: (text: any, record: any) => {
|
render: (text: any, record: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-site-admin"]) && <>
|
||||||
<Button type="text" onClick={() => viewMeet(record)} danger>
|
<Button type="text" onClick={() => viewMeet(record)} danger>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
@ -392,7 +393,7 @@ const Index: React.FC<{}> = () => {
|
|||||||
>
|
>
|
||||||
{searchConfig?.searchText}
|
{searchConfig?.searchText}
|
||||||
</Button>,
|
</Button>,
|
||||||
<Button
|
!btnAuthority(["ebtp-site-admin"]) && <Button
|
||||||
key="addText"
|
key="addText"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => createMeet()}
|
onClick={() => createMeet()}
|
||||||
|
@ -3,6 +3,7 @@ import ProTable, { ActionType } from '@ant-design/pro-table';
|
|||||||
import { getList } from './service';
|
import { getList } from './service';
|
||||||
import { Card, Spin } from 'antd';
|
import { Card, Spin } from 'antd';
|
||||||
import PersonReportModal from './components/PersonReportModal';
|
import PersonReportModal from './components/PersonReportModal';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
const PersonReport: React.FC<{}> = () => {
|
const PersonReport: React.FC<{}> = () => {
|
||||||
const checkRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
const checkRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
||||||
@ -86,7 +87,7 @@ const PersonReport: React.FC<{}> = () => {
|
|||||||
width: 80,
|
width: 80,
|
||||||
render: (text: any, record: any) => {
|
render: (text: any, record: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-site-admin"]) && <>
|
||||||
<a onClick={() => setFormVals(record)}>查看详情</a>
|
<a onClick={() => setFormVals(record)}>查看详情</a>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,7 @@ import { getGroupPageList, saveSiteGroup, delSiteGroup } from '../service';
|
|||||||
import { Button, Form, message, Spin, Popconfirm } from 'antd';
|
import { Button, Form, message, Spin, Popconfirm } from 'antd';
|
||||||
import SiteGroupModal from './SiteGroupModal';
|
import SiteGroupModal from './SiteGroupModal';
|
||||||
import AuthorizeModal from './AuthorizeModal';
|
import AuthorizeModal from './AuthorizeModal';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
|
|
||||||
const GroupPermission: React.FC<{}> = () => {
|
const GroupPermission: React.FC<{}> = () => {
|
||||||
@ -48,7 +49,7 @@ const GroupPermission: React.FC<{}> = () => {
|
|||||||
width: '30%',
|
width: '30%',
|
||||||
render: (text: any, record: any) => {
|
render: (text: any, record: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-site-admin"]) && <>
|
||||||
<a onClick={() => setFormVals(record)}>编辑</a>
|
<a onClick={() => setFormVals(record)}>编辑</a>
|
||||||
<a onClick={() => setAuthorize(record)}>授权管理</a>
|
<a onClick={() => setAuthorize(record)}>授权管理</a>
|
||||||
<Popconfirm placement="topRight" title={"当前分组下所有人员将会同时删除,确定删除么?"} onConfirm={async () => { delPerson(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
<Popconfirm placement="topRight" title={"当前分组下所有人员将会同时删除,确定删除么?"} onConfirm={async () => { delPerson(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||||
@ -104,93 +105,93 @@ const GroupPermission: React.FC<{}> = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="confirm zjl-entrust" style={{ height: window.innerHeight - 169, overflowY: 'auto' }}>
|
<div className="confirm zjl-entrust" style={{ height: window.innerHeight - 169, overflowY: 'auto' }}>
|
||||||
<Spin spinning={spinning}>
|
<Spin spinning={spinning}>
|
||||||
|
|
||||||
<ProTable
|
|
||||||
actionRef={checkRelationRef}
|
|
||||||
columns={columns}
|
|
||||||
options={false}
|
|
||||||
size='small'
|
|
||||||
search={{
|
|
||||||
labelWidth: 100,
|
|
||||||
// defaultCollapsed: false,//是否展开搜索条件
|
|
||||||
optionRender: (searchConfig, formProps, dom) => [
|
|
||||||
...dom.reverse(),
|
|
||||||
<Button key="out" type="primary" onClick={() => insertSitePerson()}>
|
|
||||||
新增
|
|
||||||
</Button>,
|
|
||||||
],
|
|
||||||
}}
|
|
||||||
|
|
||||||
request={(params) => {
|
<ProTable
|
||||||
let trueParams = {
|
actionRef={checkRelationRef}
|
||||||
...params,
|
columns={columns}
|
||||||
pageNo: params.current,
|
options={false}
|
||||||
}
|
size='small'
|
||||||
return new Promise<any>((resolve, reject) => {
|
search={{
|
||||||
getGroupPageList(trueParams).then(res => {
|
labelWidth: 100,
|
||||||
if (res.code === 200) {
|
// defaultCollapsed: false,//是否展开搜索条件
|
||||||
resolve({
|
optionRender: (searchConfig, formProps, dom) => [
|
||||||
data: res.data.records,
|
...dom.reverse(),
|
||||||
success: res.success,
|
!btnAuthority(["ebtp-site-admin"]) && <Button key="out" type="primary" onClick={() => insertSitePerson()}>
|
||||||
total: res.data.total,
|
新增
|
||||||
})
|
</Button>,
|
||||||
} else {
|
],
|
||||||
resolve({
|
}}
|
||||||
data: [],
|
|
||||||
success: false,
|
request={(params) => {
|
||||||
total: 0,
|
let trueParams = {
|
||||||
})
|
...params,
|
||||||
|
pageNo: params.current,
|
||||||
}
|
}
|
||||||
})
|
return new Promise<any>((resolve, reject) => {
|
||||||
});
|
getGroupPageList(trueParams).then(res => {
|
||||||
}}
|
if (res.code === 200) {
|
||||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
resolve({
|
||||||
/>
|
data: res.data.records,
|
||||||
{/* 新增及编辑Modal */}
|
success: res.success,
|
||||||
{
|
total: res.data.total,
|
||||||
isEditModalVisible ?
|
})
|
||||||
<SiteGroupModal
|
} else {
|
||||||
title={typename+"分组信息"}
|
resolve({
|
||||||
type={type}
|
data: [],
|
||||||
modalVisible={isEditModalVisible}
|
success: false,
|
||||||
values={editForm}
|
total: 0,
|
||||||
onSubmit={async (value: any) => {
|
})
|
||||||
await saveSiteGroup(value).then((res: any) => {
|
|
||||||
if (res.success === true) {
|
|
||||||
message.success("保存成功!");
|
|
||||||
setIsEditModalVisible(false);
|
|
||||||
setEditForm({});
|
|
||||||
checkRelationRef.current?.reload();
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}}
|
});
|
||||||
onCancel={() => {
|
}}
|
||||||
setIsEditModalVisible(!isEditModalVisible);
|
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||||
setEditForm({});
|
/>
|
||||||
}}
|
{/* 新增及编辑Modal */}
|
||||||
></SiteGroupModal>
|
{
|
||||||
: null
|
isEditModalVisible ?
|
||||||
}
|
<SiteGroupModal
|
||||||
{/* 授权Modal */}
|
title={typename + "分组信息"}
|
||||||
{
|
type={type}
|
||||||
isAuthorizeModalVisible ?
|
modalVisible={isEditModalVisible}
|
||||||
<AuthorizeModal
|
values={editForm}
|
||||||
title={"授权管理"}
|
onSubmit={async (value: any) => {
|
||||||
modalVisible={isAuthorizeModalVisible}
|
await saveSiteGroup(value).then((res: any) => {
|
||||||
values={editForm}
|
if (res.success === true) {
|
||||||
type={editForm.groupType}
|
message.success("保存成功!");
|
||||||
level={"group"}
|
setIsEditModalVisible(false);
|
||||||
onCancel={() => {
|
setEditForm({});
|
||||||
setAuthorizeModalVisible(!isAuthorizeModalVisible);
|
checkRelationRef.current?.reload();
|
||||||
setEditForm({});
|
}
|
||||||
}}
|
});
|
||||||
></AuthorizeModal>
|
}}
|
||||||
: null
|
onCancel={() => {
|
||||||
}
|
setIsEditModalVisible(!isEditModalVisible);
|
||||||
|
setEditForm({});
|
||||||
|
}}
|
||||||
|
></SiteGroupModal>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
{/* 授权Modal */}
|
||||||
|
{
|
||||||
|
isAuthorizeModalVisible ?
|
||||||
|
<AuthorizeModal
|
||||||
|
title={"授权管理"}
|
||||||
|
modalVisible={isAuthorizeModalVisible}
|
||||||
|
values={editForm}
|
||||||
|
type={editForm.groupType}
|
||||||
|
level={"group"}
|
||||||
|
onCancel={() => {
|
||||||
|
setAuthorizeModalVisible(!isAuthorizeModalVisible);
|
||||||
|
setEditForm({});
|
||||||
|
}}
|
||||||
|
></AuthorizeModal>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -4,6 +4,7 @@ import { getUserList, saveSiteUser, delSiteUser, getGroupList } from '../service
|
|||||||
import { Button, Form, message, Spin, Popconfirm } from 'antd';
|
import { Button, Form, message, Spin, Popconfirm } from 'antd';
|
||||||
import SiteUserModal from './SiteUserModal';
|
import SiteUserModal from './SiteUserModal';
|
||||||
import AuthorizeModal from './AuthorizeModal';
|
import AuthorizeModal from './AuthorizeModal';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
|
|
||||||
const UserPermission: React.FC<{}> = () => {
|
const UserPermission: React.FC<{}> = () => {
|
||||||
@ -65,7 +66,7 @@ const UserPermission: React.FC<{}> = () => {
|
|||||||
// 是否关联分组:0-否,1-是
|
// 是否关联分组:0-否,1-是
|
||||||
if (record.groupStatus == '0') {
|
if (record.groupStatus == '0') {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-site-admin"]) && <>
|
||||||
<a onClick={() => setFormVals(record)}>编辑</a>
|
<a onClick={() => setFormVals(record)}>编辑</a>
|
||||||
<a onClick={() => setAuthorize(record)}>授权管理</a>
|
<a onClick={() => setAuthorize(record)}>授权管理</a>
|
||||||
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delUser(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delUser(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||||
@ -73,13 +74,13 @@ const UserPermission: React.FC<{}> = () => {
|
|||||||
)
|
)
|
||||||
} else if (record.groupStatus == '1') {
|
} else if (record.groupStatus == '1') {
|
||||||
return (
|
return (
|
||||||
<>
|
!btnAuthority(["ebtp-site-admin"]) && <>
|
||||||
<a onClick={() => setFormVals(record)}>编辑</a>
|
<a onClick={() => setFormVals(record)}>编辑</a>
|
||||||
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delUser(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delUser(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return(<></>)
|
return (<></>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -142,94 +143,94 @@ const UserPermission: React.FC<{}> = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="confirm zjl-entrust" style={{ height: window.innerHeight - 169, overflowY: 'auto' }}>
|
<div className="confirm zjl-entrust" style={{ height: window.innerHeight - 169, overflowY: 'auto' }}>
|
||||||
<Spin spinning={spinning}>
|
<Spin spinning={spinning}>
|
||||||
|
|
||||||
<ProTable
|
|
||||||
actionRef={checkRelationRef}
|
|
||||||
columns={columns}
|
|
||||||
options={false}
|
|
||||||
size='small'
|
|
||||||
search={{
|
|
||||||
labelWidth: 100,
|
|
||||||
// defaultCollapsed: false,//是否展开搜索条件
|
|
||||||
optionRender: (searchConfig, formProps, dom) => [
|
|
||||||
...dom.reverse(),
|
|
||||||
<Button key="out" type="primary" onClick={() => insertSiteUser()}>
|
|
||||||
新增
|
|
||||||
</Button>,
|
|
||||||
],
|
|
||||||
}}
|
|
||||||
|
|
||||||
request={(params) => {
|
<ProTable
|
||||||
let trueParams = {
|
actionRef={checkRelationRef}
|
||||||
...params,
|
columns={columns}
|
||||||
pageNo: params.current,
|
options={false}
|
||||||
}
|
size='small'
|
||||||
return new Promise<any>((resolve, reject) => {
|
search={{
|
||||||
getUserList(trueParams).then(res => {
|
labelWidth: 100,
|
||||||
if (res.code === 200) {
|
// defaultCollapsed: false,//是否展开搜索条件
|
||||||
resolve({
|
optionRender: (searchConfig, formProps, dom) => [
|
||||||
data: res.data.records,
|
...dom.reverse(),
|
||||||
success: res.success,
|
!btnAuthority(["ebtp-site-admin"]) && <Button key="out" type="primary" onClick={() => insertSiteUser()}>
|
||||||
total: res.data.total,
|
新增
|
||||||
})
|
</Button>,
|
||||||
} else {
|
],
|
||||||
resolve({
|
}}
|
||||||
data: [],
|
|
||||||
success: false,
|
request={(params) => {
|
||||||
total: 0,
|
let trueParams = {
|
||||||
})
|
...params,
|
||||||
|
pageNo: params.current,
|
||||||
}
|
}
|
||||||
})
|
return new Promise<any>((resolve, reject) => {
|
||||||
});
|
getUserList(trueParams).then(res => {
|
||||||
}}
|
if (res.code === 200) {
|
||||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
resolve({
|
||||||
/>
|
data: res.data.records,
|
||||||
{/* 新增及编辑银行账号Modal */}
|
success: res.success,
|
||||||
{
|
total: res.data.total,
|
||||||
isEditModalVisible ?
|
})
|
||||||
<SiteUserModal
|
} else {
|
||||||
title={typename+"人员信息"}
|
resolve({
|
||||||
type={type}
|
data: [],
|
||||||
modalVisible={isEditModalVisible}
|
success: false,
|
||||||
groupList={groupList}
|
total: 0,
|
||||||
values={editForm}
|
})
|
||||||
onSubmit={async (value: any) => {
|
|
||||||
await saveSiteUser(value).then((res: any) => {
|
|
||||||
if (res.success === true) {
|
|
||||||
message.success("保存成功!");
|
|
||||||
setIsEditModalVisible(false);
|
|
||||||
setEditForm({});
|
|
||||||
checkRelationRef.current?.reload();
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}}
|
});
|
||||||
onCancel={() => {
|
}}
|
||||||
setIsEditModalVisible(!isEditModalVisible);
|
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||||
setEditForm({});
|
/>
|
||||||
}}
|
{/* 新增及编辑银行账号Modal */}
|
||||||
></SiteUserModal>
|
{
|
||||||
: null
|
isEditModalVisible ?
|
||||||
}
|
<SiteUserModal
|
||||||
{/* 授权Modal */}
|
title={typename + "人员信息"}
|
||||||
{
|
type={type}
|
||||||
isAuthorizeModalVisible ?
|
modalVisible={isEditModalVisible}
|
||||||
<AuthorizeModal
|
groupList={groupList}
|
||||||
title={"授权管理"}
|
values={editForm}
|
||||||
modalVisible={isAuthorizeModalVisible}
|
onSubmit={async (value: any) => {
|
||||||
values={editForm}
|
await saveSiteUser(value).then((res: any) => {
|
||||||
type={editForm.personType}
|
if (res.success === true) {
|
||||||
level={"user"}
|
message.success("保存成功!");
|
||||||
onCancel={() => {
|
setIsEditModalVisible(false);
|
||||||
setAuthorizeModalVisible(!isAuthorizeModalVisible);
|
setEditForm({});
|
||||||
setEditForm({});
|
checkRelationRef.current?.reload();
|
||||||
}}
|
}
|
||||||
></AuthorizeModal>
|
});
|
||||||
: null
|
}}
|
||||||
}
|
onCancel={() => {
|
||||||
|
setIsEditModalVisible(!isEditModalVisible);
|
||||||
|
setEditForm({});
|
||||||
|
}}
|
||||||
|
></SiteUserModal>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
{/* 授权Modal */}
|
||||||
|
{
|
||||||
|
isAuthorizeModalVisible ?
|
||||||
|
<AuthorizeModal
|
||||||
|
title={"授权管理"}
|
||||||
|
modalVisible={isAuthorizeModalVisible}
|
||||||
|
values={editForm}
|
||||||
|
type={editForm.personType}
|
||||||
|
level={"user"}
|
||||||
|
onCancel={() => {
|
||||||
|
setAuthorizeModalVisible(!isAuthorizeModalVisible);
|
||||||
|
setEditForm({});
|
||||||
|
}}
|
||||||
|
></AuthorizeModal>
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -5,6 +5,7 @@ import React, { useRef, useState } from 'react';
|
|||||||
import { useHistory } from 'umi';
|
import { useHistory } from 'umi';
|
||||||
import ViewModal from '../../ViewModal';
|
import ViewModal from '../../ViewModal';
|
||||||
import { getPage } from '../../service';
|
import { getPage } from '../../service';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线监督列表
|
* 在线监督列表
|
||||||
@ -115,7 +116,7 @@ const OnlineSupervision: React.FC<{}> = () => {
|
|||||||
width: '9%',
|
width: '9%',
|
||||||
render: (_: any, record: any) =>
|
render: (_: any, record: any) =>
|
||||||
(
|
(
|
||||||
<>
|
!btnAuthority(["ebtp-site-supervision"]) && <>
|
||||||
<Button
|
<Button
|
||||||
key="viewDetails"
|
key="viewDetails"
|
||||||
type="text"
|
type="text"
|
||||||
@ -153,7 +154,7 @@ const OnlineSupervision: React.FC<{}> = () => {
|
|||||||
spinSet(true);
|
spinSet(true);
|
||||||
return await getPage({
|
return await getPage({
|
||||||
...params,
|
...params,
|
||||||
pageNo: pageData.pageNo,
|
pageNo: pageData.pageNo,
|
||||||
pageSize: pageData.pageSize,
|
pageSize: pageData.pageSize,
|
||||||
queryType: 1,
|
queryType: 1,
|
||||||
areaRoomName: params.areaName
|
areaRoomName: params.areaName
|
||||||
|
@ -5,6 +5,7 @@ import React, { useRef, useState } from 'react';
|
|||||||
import { useHistory } from 'umi';
|
import { useHistory } from 'umi';
|
||||||
import ViewModal from '../../ViewModal';
|
import ViewModal from '../../ViewModal';
|
||||||
import { getPage } from '../../service';
|
import { getPage } from '../../service';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预约项目列表
|
* 预约项目列表
|
||||||
@ -21,7 +22,7 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
});
|
});
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const viewModalRef = useRef(null);
|
const viewModalRef = useRef(null);
|
||||||
|
|
||||||
//查看详情
|
//查看详情
|
||||||
const viewDetails = (record: any) => {
|
const viewDetails = (record: any) => {
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
@ -34,51 +35,51 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const columns: ProColumns<any>[] = [
|
const columns: ProColumns<any>[] = [
|
||||||
{
|
{
|
||||||
valueType: 'index',
|
valueType: 'index',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
width: '20%',
|
width: '20%',
|
||||||
hideInSearch: false,
|
hideInSearch: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '项目编号',
|
title: '项目编号',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'projectNum',
|
dataIndex: 'projectNum',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '标段',
|
title: '标段',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'packageNames',
|
dataIndex: 'packageNames',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '评审室名称',
|
title: '评审室名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'areaName',
|
dataIndex: 'areaName',
|
||||||
hideInSearch: false,
|
hideInSearch: false,
|
||||||
width: '10%',
|
width: '10%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预计评标开始时间',
|
title: '预计评标开始时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'reserveStartDate',
|
dataIndex: 'reserveStartDate',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
width: '15%',
|
width: '15%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '预计评标结束时间',
|
title: '预计评标结束时间',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'reserveEndDate',
|
dataIndex: 'reserveEndDate',
|
||||||
hideInSearch: true,
|
hideInSearch: true,
|
||||||
width: '9.5%',
|
width: '9.5%',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@ -113,7 +114,7 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
width: '4.5%',
|
width: '4.5%',
|
||||||
render: (_: any, record: any) =>
|
render: (_: any, record: any) =>
|
||||||
(
|
(
|
||||||
<>
|
!btnAuthority(["ebtp-site-supervision"]) && <>
|
||||||
<Button
|
<Button
|
||||||
key="viewDetails"
|
key="viewDetails"
|
||||||
type="text"
|
type="text"
|
||||||
@ -142,7 +143,7 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
spinSet(true);
|
spinSet(true);
|
||||||
return await getPage({
|
return await getPage({
|
||||||
...params,
|
...params,
|
||||||
pageNo: pageData.pageNo,
|
pageNo: pageData.pageNo,
|
||||||
pageSize: pageData.pageSize,
|
pageSize: pageData.pageSize,
|
||||||
queryType: 0,
|
queryType: 0,
|
||||||
areaRoomName: params.areaName
|
areaRoomName: params.areaName
|
||||||
@ -158,8 +159,8 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
isNotEmpty(window.location.search) && history.push(window.location.pathname);
|
isNotEmpty(window.location.search) && history.push(window.location.pathname);
|
||||||
spinSet(false);
|
spinSet(false);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pagination={{
|
pagination={{
|
||||||
defaultPageSize: 10,
|
defaultPageSize: 10,
|
||||||
@ -174,7 +175,7 @@ const ReservedItems: React.FC<{}> = () => {
|
|||||||
rowKey={"id"}
|
rowKey={"id"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ViewModal modalVisible = {visible} showStatus={false} onCancel = {()=> closeViewDetails()} ref = {viewModalRef}/>
|
<ViewModal modalVisible={visible} showStatus={false} onCancel={() => closeViewDetails()} ref={viewModalRef} />
|
||||||
</Spin>
|
</Spin>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { isNotEmpty } from '@/utils/CommonUtils';
|
import { isNotEmpty } from '@/utils/CommonUtils';
|
||||||
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
||||||
import { Button, Spin, message } from 'antd';
|
import { Button, Spin, message, Card } from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import { useHistory } from 'umi';
|
import { useHistory } from 'umi';
|
||||||
import ViewModal from '../ViewModal';
|
import ViewModal from '../ViewModal';
|
||||||
import { getPage } from '../service';
|
import { getPage } from '../service';
|
||||||
|
import { btnAuthority } from '@/utils/authority';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 事后监督列表
|
* 事后监督列表
|
||||||
@ -117,7 +118,7 @@ const PostSupervision: React.FC<{}> = () => {
|
|||||||
width: '10%',
|
width: '10%',
|
||||||
render: (_: any, record: any) =>
|
render: (_: any, record: any) =>
|
||||||
(
|
(
|
||||||
<>
|
!btnAuthority(["ebtp-after-supervision"]) && <>
|
||||||
<Button
|
<Button
|
||||||
key="viewDetails"
|
key="viewDetails"
|
||||||
type="text"
|
type="text"
|
||||||
@ -143,7 +144,7 @@ const PostSupervision: React.FC<{}> = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Spin spinning={spin}>
|
<Spin spinning={spin}>
|
||||||
<div className="zjl-entrust confirm">
|
<Card className="zjl-entrust confirm">
|
||||||
<ProTable
|
<ProTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
options={false}
|
options={false}
|
||||||
@ -155,7 +156,7 @@ const PostSupervision: React.FC<{}> = () => {
|
|||||||
spinSet(true);
|
spinSet(true);
|
||||||
return await getPage({
|
return await getPage({
|
||||||
...params,
|
...params,
|
||||||
pageNo: pageData.pageNo,
|
pageNo: pageData.pageNo,
|
||||||
pageSize: pageData.pageSize,
|
pageSize: pageData.pageSize,
|
||||||
queryType: 2,
|
queryType: 2,
|
||||||
areaRoomName: params.areaName
|
areaRoomName: params.areaName
|
||||||
@ -186,7 +187,7 @@ const PostSupervision: React.FC<{}> = () => {
|
|||||||
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
onReset={() => { pageDataSet({ pageNo: 1, pageSize: 10 }) }}
|
||||||
rowKey={"id"}
|
rowKey={"id"}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Card>
|
||||||
<ViewModal modalVisible={visible} showStatus={true} onCancel={() => closeViewDetails()} ref={viewModalRef} />
|
<ViewModal modalVisible={visible} showStatus={true} onCancel={() => closeViewDetails()} ref={viewModalRef} />
|
||||||
</Spin>
|
</Spin>
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user