新现场人员
This commit is contained in:
@ -54,7 +54,7 @@ export const elecBidEvaluation = [
|
||||
routes: [
|
||||
{//评标现场管理->评标场所人员维护
|
||||
path: '/ElecEvaluation/EvalSiteManage/SitePerson',
|
||||
component: './ElecEvaluation/EvalSiteManage/SitePerson'
|
||||
component: './ElecEvaluation/EvalSiteManage/SiteUser'
|
||||
},
|
||||
{//评标现场管理->人员报道情况查询
|
||||
path: '/ElecEvaluation/EvalSiteManage/PersonReport',
|
||||
|
@ -1,40 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
/**
|
||||
* 查询数据并分页
|
||||
* @param params
|
||||
*/
|
||||
export async function getList(params?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/page', {
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function getPlaceList() { // 列表
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/elec/eval/place/userlimit/list', {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param params
|
||||
*/
|
||||
export async function saveSitePerson(data?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/save', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
*/
|
||||
export async function delSitePerson(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/delete?id='+id, {
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,352 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Form, Input, Modal, Spin, Button, RadioChangeEvent, Popconfirm, message, DatePicker } from 'antd';
|
||||
import { getAuthorizeList, cancelAuthorize, addAuthorize } from '../service';
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import moment from 'moment';
|
||||
import { dateTimeFormatter } from '@/utils/DateUtils';
|
||||
|
||||
|
||||
interface AuthorizeModalProps {
|
||||
title: any;
|
||||
modalVisible: boolean;
|
||||
values: any;
|
||||
type: any;
|
||||
level: any;
|
||||
// onSubmit: any;
|
||||
onCancel: () => void;
|
||||
}
|
||||
const layout = {
|
||||
labelCol: { span: 7 },
|
||||
wrapperCol: { span: 12 },
|
||||
};
|
||||
const AuthorizeModal: React.FC<AuthorizeModalProps> = (props) => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
//查看页弹窗visible
|
||||
const [form] = Form.useForm();
|
||||
const { title, modalVisible, values, type, level, onCancel } = props;//, onSubmit: handleUpdate
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [value, setValue] = useState<string>("1");
|
||||
//授权相关
|
||||
const [authorizeList, setAuthorizeList] = useState<any>([]); //已授权区域信息
|
||||
const [unAuthorizeList, setUnAuthorizeList] = useState<any>([]); //未授权区域信息
|
||||
const [timeModalVisible, setTimeModalVisible] = useState<boolean>(false);
|
||||
const [modelform] = Form.useForm();
|
||||
|
||||
const onChange = (e: RadioChangeEvent) => {
|
||||
console.log('radio checked', e.target.value);
|
||||
setValue(e.target.value);
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
console.log(values)
|
||||
console.log(type)
|
||||
getAuthList()
|
||||
}, [values])
|
||||
|
||||
|
||||
// 编辑页面赋值
|
||||
const getAuthList = () => {
|
||||
//查询当前已授权未授权区域
|
||||
getAuthorizeList(values.id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setAuthorizeList(res.data.authorizeAreaList)
|
||||
setUnAuthorizeList(res.data.unauthorizeAreaList)
|
||||
}
|
||||
});
|
||||
}
|
||||
const authorizeColumns: ProColumns<any>[] = [
|
||||
{
|
||||
title: '序号',
|
||||
valueType: 'index',
|
||||
width: '7%',
|
||||
},
|
||||
{
|
||||
title: '区域名称',
|
||||
dataIndex: 'areaName',
|
||||
key: 'areaName',
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: '区域类型',
|
||||
dataIndex: 'areaType',
|
||||
key: 'areaType',
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'busiType',
|
||||
key: 'busiType',
|
||||
width: '10%',
|
||||
},
|
||||
{
|
||||
title: '权限有效时间',
|
||||
dataIndex: 'startDateStr',
|
||||
key: 'startDateStr',
|
||||
width: '10%',
|
||||
hideInTable: type === 'site_manager',
|
||||
},
|
||||
{
|
||||
title: '权限结束时间',
|
||||
dataIndex: 'endDateStr',
|
||||
key: 'endDateStr',
|
||||
width: '10%',
|
||||
hideInTable: type === 'site_manager',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: '8%',
|
||||
render: (text, record, _, action) => (
|
||||
<Popconfirm placement="topRight" title={"确定取消授权么?"} onConfirm={async () => { delAuthorize(record.id); }} okText="确定" cancelText="取消" ><a > 取消授权 </a></Popconfirm>
|
||||
),
|
||||
},
|
||||
];
|
||||
const unAuthorizeColumns: ProColumns<any>[] = [
|
||||
{
|
||||
title: '序号',
|
||||
valueType: 'index',
|
||||
width: '7%',
|
||||
},
|
||||
{
|
||||
title: '区域名称',
|
||||
dataIndex: 'areaName',
|
||||
key: 'areaName',
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: '区域类型',
|
||||
dataIndex: 'areaType',
|
||||
key: 'areaType',
|
||||
width: '10%',
|
||||
render: (text: any, record: any) => {
|
||||
if (record.areaType == "eval_room") {
|
||||
return (<>评标室</>)
|
||||
} else if (record.areaType == "report_area") {
|
||||
return (<>报道区</>)
|
||||
} else {
|
||||
return (<></>)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'busiType',
|
||||
key: 'busiType',
|
||||
width: '10%',
|
||||
render: (text: any, record: any) => {
|
||||
if (type == "site_manager") {
|
||||
return (<>现场管理人员</>)
|
||||
} else {
|
||||
return (<>现场临时人员</>)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: '8%',
|
||||
render: (text: any, record: any) => {
|
||||
if (type == "site_manager") {
|
||||
return (<><a onClick={() => savaAuth(record)}>授权</a></>)
|
||||
} else {
|
||||
return (<><a onClick={() => addTempAuthModule(record)}>授权</a></>)
|
||||
}
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
// 临时权限区域授权时间页面赋值
|
||||
const addTempAuthModule = (item: any) => {
|
||||
modelform.setFieldsValue({
|
||||
"areaId": item.id,
|
||||
"placeId": item.placeId,
|
||||
"areaType": item.areaType,
|
||||
"busiId": values.id,
|
||||
"busiType": level
|
||||
})
|
||||
setTimeModalVisible(true)
|
||||
setLoading(false);
|
||||
}
|
||||
const delAuthorize = (id: any) => { // 删除
|
||||
setLoading(true);
|
||||
cancelAuthorize(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setLoading(false);
|
||||
message.success('成功');
|
||||
actionRef.current?.reload();
|
||||
getAuthList();
|
||||
modelform.resetFields()
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
});;
|
||||
}
|
||||
//临时权限区域授权
|
||||
const savaTempAuth = async () => {
|
||||
|
||||
if (moment(modelform.getFieldValue("authorizeEndDate")).format(dateTimeFormatter) <= moment(modelform.getFieldValue("authorizeStartDate")).format(dateTimeFormatter)) {
|
||||
message.info("结束时间需晚于开始时间");
|
||||
return;
|
||||
}
|
||||
const modelFromData = {
|
||||
"areaId": modelform.getFieldValue("areaId"),
|
||||
"placeId": modelform.getFieldValue("placeId"),
|
||||
"busiId": modelform.getFieldValue("busiId"),
|
||||
"busiType": modelform.getFieldValue("busiType"),
|
||||
"areaType": modelform.getFieldValue("areaType"),
|
||||
"authorizeStartDate": modelform.getFieldValue("authorizeStartDate").format("yyyy-MM-DD HH:mm:ss").toString(),
|
||||
"authorizeEndDate": modelform.getFieldValue("authorizeEndDate").format("yyyy-MM-DD HH:mm:ss").toString()
|
||||
}
|
||||
setLoading(true);
|
||||
addAuthorize(modelFromData).then(res => {
|
||||
if (res?.code == 200) {
|
||||
setLoading(false);
|
||||
setTimeModalVisible(false);
|
||||
message.success('成功');
|
||||
actionRef.current?.reload();
|
||||
getAuthList();
|
||||
modelform.resetFields()
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
//管理权限区域授权
|
||||
const savaAuth = (item: any) => {
|
||||
const modelFromData = {
|
||||
"areaId": item.id,
|
||||
"placeId": item.placeId,
|
||||
"areaType": item.areaType,
|
||||
"busiId": values.id,
|
||||
"busiType": level
|
||||
}
|
||||
setLoading(true);
|
||||
addAuthorize(modelFromData).then(res => {
|
||||
if (res?.code == 200) {
|
||||
setLoading(false);
|
||||
setTimeModalVisible(false);
|
||||
message.success('成功');
|
||||
actionRef.current?.reload();
|
||||
getAuthList();
|
||||
modelform.resetFields()
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const renderFooter = () => {
|
||||
return (
|
||||
<>
|
||||
<Button onClick={onCancel}>关闭</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
const rule = (mes: any) => {//创建修改 规则
|
||||
return [
|
||||
{
|
||||
required: true,
|
||||
message: `请录入${mes}`,
|
||||
},
|
||||
]
|
||||
}
|
||||
function disabledDate(current: any) {//日期选择
|
||||
// Can not select days before today and today
|
||||
return current && current < moment().startOf('day');
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
destroyOnClose={true}
|
||||
title={title}
|
||||
visible={modalVisible}
|
||||
onCancel={() => onCancel()}
|
||||
width={"60%"}
|
||||
centered
|
||||
footer={renderFooter()}
|
||||
>
|
||||
<Spin spinning={loading}>
|
||||
|
||||
<div style={{ height: '42px', lineHeight: '42px' }}>
|
||||
<h3 className='scd-title' style={{ float: 'left', }}>已授权区域信息</h3>
|
||||
</div>
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
columns={authorizeColumns}
|
||||
options={false}
|
||||
size='small'
|
||||
search={false}
|
||||
rowKey="id"
|
||||
dataSource={authorizeList}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||
/>
|
||||
|
||||
<div style={{ height: '42px', lineHeight: '42px' }}>
|
||||
<h3 className='scd-title' style={{ float: 'left', }}>未授权区域信息</h3>
|
||||
</div>
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
columns={unAuthorizeColumns}
|
||||
options={false}
|
||||
size='small'
|
||||
search={false}
|
||||
rowKey="id"
|
||||
dataSource={unAuthorizeList}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||
/>
|
||||
</Spin>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="权限期限管理"
|
||||
centered
|
||||
visible={timeModalVisible}
|
||||
onCancel={() => setTimeModalVisible(false)}
|
||||
onOk={() => savaTempAuth()}
|
||||
width={800}
|
||||
footer={[
|
||||
<Button onClick={() => setTimeModalVisible(false)}>取消</Button>,
|
||||
<Button key="submit" type="primary" onClick={() => savaTempAuth()}>确定</Button>,
|
||||
]}
|
||||
>
|
||||
<Spin spinning={loading} delay={300}>
|
||||
<Form {...layout} name="basic" form={modelform}>
|
||||
<Form.Item
|
||||
name="authorizeStartDate"
|
||||
label={`权限开始时间`}
|
||||
rules={rule('权限开始时间')}
|
||||
>
|
||||
<DatePicker
|
||||
format="YYYY-MM-DD"
|
||||
disabledDate={disabledDate}
|
||||
showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }}
|
||||
showNow={false}
|
||||
style={{ width: "90%" }}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="authorizeEndDate"
|
||||
label={`权限结束时间`}
|
||||
rules={rule('权限结束时间')}
|
||||
>
|
||||
<DatePicker
|
||||
format="YYYY-MM-DD"
|
||||
disabledDate={disabledDate}
|
||||
showTime={{ defaultValue: moment('23:59:59', 'HH:mm:ss') }}
|
||||
showNow={false}
|
||||
style={{ width: "90%" }}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default AuthorizeModal;
|
@ -1,12 +1,12 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import ProTable, { ActionType } from '@ant-design/pro-table';
|
||||
import { getList, saveSitePerson, delSitePerson, getPlaceList } from './service';
|
||||
import { getGroupPageList, saveSiteGroup, delSiteGroup, getAuthorizeList } from '../service';
|
||||
import { Button, Card, Form, message, Spin, Popconfirm } from 'antd';
|
||||
import SitePersonModal from './components/SitePersonModal';
|
||||
import { downloadFile } from '@/utils/DownloadUtils';
|
||||
import SiteGroupModal from './SiteGroupModal';
|
||||
import AuthorizeModal from './AuthorizeModal';
|
||||
|
||||
|
||||
const SitePersonList: React.FC<{}> = () => {
|
||||
const GroupPermission: React.FC<{}> = () => {
|
||||
const checkRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
||||
const [isEditModalVisible, setIsEditModalVisible] = useState<boolean>(false) //控制新增或编辑模态框是否显示
|
||||
const [form] = Form.useForm();//新增模块form
|
||||
@ -14,10 +14,11 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
//单条数据
|
||||
const [editForm, setEditForm] = useState<any>({});
|
||||
const [spinning, setSping] = useState<boolean>(false);//加载遮罩
|
||||
const [placeList, setPlaceList] = useState<any>([]); //省分公司信息
|
||||
//下拉框是否可编辑
|
||||
const [placeFormDisabled, setPlaceFormDisabled] = useState<any>(false);
|
||||
const [type, setType] = useState<any>('cease');//弹窗类型
|
||||
|
||||
//授权相关
|
||||
const [authorizeList, setAuthorizeList] = useState<any>([]); //授权区域信息
|
||||
const [isAuthorizeModalVisible, setAuthorizeModalVisible] = useState<boolean>(false) //控制授权模态框是否显示
|
||||
let typename = "新增";
|
||||
|
||||
|
||||
@ -25,40 +26,33 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
{
|
||||
title: '序号',
|
||||
valueType: 'index',
|
||||
width: 80,
|
||||
width: '10%',
|
||||
search: false,
|
||||
},
|
||||
// {
|
||||
// title: '评标场所编号',
|
||||
// dataIndex: 'eroomNum',
|
||||
// },
|
||||
{
|
||||
title: '评标场所名称',
|
||||
dataIndex: 'eroomName',
|
||||
search: false,
|
||||
},
|
||||
// {
|
||||
// title: '人员类型',
|
||||
// dataIndex: 'bank',
|
||||
// },
|
||||
{
|
||||
title: '人员姓名',
|
||||
dataIndex: 'personName',
|
||||
title: '分组名称',
|
||||
dataIndex: 'groupName',
|
||||
width: '30%',
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
dataIndex: 'identityCard',
|
||||
width: 300,
|
||||
ellipsis: true,
|
||||
title: '分组类型',
|
||||
dataIndex: 'groupType',
|
||||
width: '30%',
|
||||
valueEnum: {
|
||||
"site_manager": { text: '现场管理人员' },
|
||||
"site_temp": { text: '现场临时人员' },
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
search: false,
|
||||
width: '30%',
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
<a onClick={() => setFormVals(record)}>编辑</a>
|
||||
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delPerson(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||
<a onClick={() => setAuthorize(record)}>授权管理</a>
|
||||
<Popconfirm placement="topRight" title={"当前分组下所有人员将会同时删除,确定删除么?"} onConfirm={async () => { delPerson(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -67,7 +61,7 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
|
||||
const delPerson = (id: any) => { // 删除
|
||||
setSping(true);
|
||||
delSitePerson(id).then(res => {
|
||||
delSiteGroup(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setSping(false);
|
||||
message.success('删除成功');
|
||||
@ -81,6 +75,15 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
});;
|
||||
}
|
||||
|
||||
// 授权
|
||||
const setAuthorize = (item: any) => {
|
||||
selectAuthorizeList(item.id)
|
||||
typename = "编辑";
|
||||
setEditForm(item);
|
||||
setAuthorizeModalVisible(true)
|
||||
setSping(false);
|
||||
}
|
||||
|
||||
// 编辑页面赋值
|
||||
const setFormVals = (item: any) => {
|
||||
typename = "编辑";
|
||||
@ -97,20 +100,24 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
setSping(false);
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
//查询当前人员权限下所有评标场所
|
||||
getPlaceList().then(res => {
|
||||
// 查询授权区域信息集合
|
||||
const selectAuthorizeList = (id: any) => {
|
||||
//查询当前人员权限下所有现场分组
|
||||
getAuthorizeList(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setPlaceList(res.data)
|
||||
setAuthorizeList(res.data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="confirm zjl-entrust" style={{ height: window.innerHeight - 169, overflowY: 'auto' }}>
|
||||
<Spin spinning={spinning}>
|
||||
<Card title="评标场所人员管理">
|
||||
|
||||
<ProTable
|
||||
actionRef={checkRelationRef}
|
||||
@ -134,7 +141,7 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
pageNo: params.current,
|
||||
}
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
getList(trueParams).then(res => {
|
||||
getGroupPageList(trueParams).then(res => {
|
||||
if (res.code === 200) {
|
||||
resolve({
|
||||
data: res.data.records,
|
||||
@ -153,19 +160,16 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
}}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||
/>
|
||||
</Card>
|
||||
{/* 新增及编辑银行账号Modal */}
|
||||
{/* 新增及编辑Modal */}
|
||||
{
|
||||
isEditModalVisible ?
|
||||
<SitePersonModal
|
||||
title={typename+"人员信息"}
|
||||
<SiteGroupModal
|
||||
title={typename+"分组信息"}
|
||||
type={type}
|
||||
modalVisible={isEditModalVisible}
|
||||
formDisabled={placeFormDisabled}
|
||||
placeList={placeList}
|
||||
values={editForm}
|
||||
onSubmit={async (value: any) => {
|
||||
await saveSitePerson(value).then((res: any) => {
|
||||
await saveSiteGroup(value).then((res: any) => {
|
||||
if (res.success === true) {
|
||||
message.success("保存成功!");
|
||||
setIsEditModalVisible(false);
|
||||
@ -179,13 +183,30 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
setIsEditModalVisible(!isEditModalVisible);
|
||||
setEditForm({});
|
||||
}}
|
||||
></SitePersonModal>
|
||||
></SiteGroupModal>
|
||||
: null
|
||||
}
|
||||
{/* 授权Modal */}
|
||||
{
|
||||
isAuthorizeModalVisible ?
|
||||
<AuthorizeModal
|
||||
title={"授权管理"}
|
||||
modalVisible={isAuthorizeModalVisible}
|
||||
values={editForm}
|
||||
type={editForm.groupType}
|
||||
level={"group"}
|
||||
onCancel={() => {
|
||||
setAuthorizeModalVisible(!isAuthorizeModalVisible);
|
||||
setEditForm({});
|
||||
}}
|
||||
></AuthorizeModal>
|
||||
: null
|
||||
}
|
||||
|
||||
</Spin>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default SitePersonList;
|
||||
export default GroupPermission;
|
@ -0,0 +1,131 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Form, Input, Modal, Spin, Button, Radio, RadioChangeEvent, Popconfirm } from 'antd';
|
||||
|
||||
|
||||
interface SitePersonModalProps {
|
||||
title: any;
|
||||
modalVisible: boolean;
|
||||
values: any;
|
||||
onSubmit: any;
|
||||
type: string;
|
||||
onCancel: () => void;
|
||||
}
|
||||
const layout = {
|
||||
labelCol: { span: 7 },
|
||||
wrapperCol: { span: 12 },
|
||||
};
|
||||
const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const { title, modalVisible, type, values, onSubmit: handleUpdate, onCancel } = props;
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [value, setValue] = useState<string>("1");
|
||||
|
||||
const onChange = (e: RadioChangeEvent) => {
|
||||
console.log('radio checked', e.target.value);
|
||||
setValue(e.target.value);
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
console.log(values)
|
||||
if (JSON.stringify(values) !== "{}") {
|
||||
form.setFieldsValue({
|
||||
"id": values.id,
|
||||
"groupName": values.groupName,
|
||||
"groupType": values.groupType,
|
||||
});
|
||||
}
|
||||
}, [values])
|
||||
|
||||
|
||||
|
||||
const onOk = async () => {
|
||||
const fieldsValue = await form.validateFields();
|
||||
setLoading(true)
|
||||
await handleUpdate({ ...fieldsValue }).finally(() => {
|
||||
setLoading(false)
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const renderFooter = () => {
|
||||
if (type == "read") {
|
||||
return (
|
||||
<>
|
||||
<Button onClick={onCancel}>关闭</Button>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Popconfirm
|
||||
placement="topRight"
|
||||
title={"如变更分组类型,需要用户进入授权管理重新授权,是否继续?"}
|
||||
onConfirm={async () => { onOk(); }}
|
||||
okText="确定"
|
||||
cancelText="取消" >
|
||||
<Button type="primary" loading={loading} >确认</Button>
|
||||
</Popconfirm>
|
||||
<Button onClick={onCancel}>取消</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
destroyOnClose={true}
|
||||
title={title}
|
||||
visible={modalVisible}
|
||||
onCancel={() => onCancel()}
|
||||
width={"60%"}
|
||||
centered
|
||||
footer={renderFooter()}
|
||||
>
|
||||
<Spin spinning={loading}>
|
||||
<Form
|
||||
{...layout}
|
||||
name="nest-messages"
|
||||
form={form}
|
||||
preserve={false}
|
||||
>
|
||||
<Form.Item name="id" label="id" hidden>
|
||||
<Input hidden />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="分组名称"
|
||||
name="groupName"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="分组类型"
|
||||
name="groupType"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
{/* 1-男性,2-女性 */}
|
||||
<Radio.Group onChange={onChange} value={value}>
|
||||
<Radio value="site_manager">现场管理人员</Radio>
|
||||
<Radio value="site_temp">现场临时人员 </Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
|
||||
</Form>
|
||||
</Spin>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default SitePersonModal;
|
@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Form, Input, Modal, Spin, Select, Button, Radio, RadioChangeEvent } from 'antd';
|
||||
import { Form, Input, Modal, Spin, Select, Button, Radio, RadioChangeEvent, Popconfirm } from 'antd';
|
||||
import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload';
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ interface SitePersonModalProps {
|
||||
onSubmit: any;
|
||||
type: string;
|
||||
onCancel: () => void;
|
||||
placeList: any[];
|
||||
groupList: any[];
|
||||
}
|
||||
const layout = {
|
||||
labelCol: { span: 7 },
|
||||
@ -19,25 +19,41 @@ const layout = {
|
||||
};
|
||||
const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const { title, modalVisible, formDisabled, type, values, onSubmit: handleUpdate, onCancel, placeList } = props;
|
||||
const { title, modalVisible, formDisabled, type, values, onSubmit: handleUpdate, onCancel, groupList } = props;
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [value, setValue] = useState<string>("1");
|
||||
|
||||
const onChange = (e: RadioChangeEvent) => {
|
||||
const [sexValue, setSexValue] = useState<string>("1");
|
||||
const onSexChange = (e: RadioChangeEvent) => {
|
||||
console.log('radio checked', e.target.value);
|
||||
setValue(e.target.value);
|
||||
setSexValue(e.target.value);
|
||||
};
|
||||
|
||||
const [typeValue, setTypeValue] = useState<string>("");
|
||||
const onTypeChange = (e: RadioChangeEvent) => {
|
||||
console.log('radio checked', e.target.value);
|
||||
setTypeValue(e.target.value);
|
||||
};
|
||||
|
||||
const [groupValue, setGroupValue] = useState<string>("");
|
||||
const onGroupChange = (e: RadioChangeEvent) => {
|
||||
console.log('radio checked', e.target.value);
|
||||
setGroupValue(e.target.value);
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (JSON.stringify(values) !== "{}") {
|
||||
setGroupValue(values.groupStatus);
|
||||
form.setFieldsValue({
|
||||
"id": values.id,
|
||||
"evalPlaceId": { label: values.eroomName, value: values.evalPlaceId },
|
||||
"groupStatus": values.groupStatus,
|
||||
"groupId": { label: values.groupName, value: values.groupId },
|
||||
"facePic": values.facePic,
|
||||
"sex": values.sex,
|
||||
"personType": values.personType,
|
||||
"personName": values.personName,
|
||||
"workUnit": values.workUnit,
|
||||
"identityCard": values.identityCard
|
||||
});
|
||||
}
|
||||
@ -48,8 +64,10 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
const onOk = async () => {
|
||||
const fieldsValue = await form.validateFields();
|
||||
setLoading(true)
|
||||
fieldsValue["evalPlaceId"] = fieldsValue.evalPlaceId.value
|
||||
console.log(fieldsValue)
|
||||
if (fieldsValue.groupStatus == 1) {
|
||||
fieldsValue["groupId"] = fieldsValue.groupId.value
|
||||
}
|
||||
fieldsValue["facePicName"] = fieldsValue.personName
|
||||
|
||||
// await getFileListByBid(fieldsValue.facePic).then(res => {
|
||||
@ -72,7 +90,14 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Button type="primary" loading={loading} onClick={onOk}>确认</Button>
|
||||
<Popconfirm
|
||||
placement="topRight"
|
||||
title={"在未关联分组情况下,如变更信息,需要用户进入授权管理重新授权,是否继续?"}
|
||||
onConfirm={async () => { onOk(); }}
|
||||
okText="确定"
|
||||
cancelText="取消" >
|
||||
<Button type="primary" loading={loading} >确认</Button>
|
||||
</Popconfirm>
|
||||
<Button onClick={onCancel}>取消</Button>
|
||||
</>
|
||||
);
|
||||
@ -99,24 +124,6 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
<Form.Item name="id" label="id" hidden>
|
||||
<Input hidden />
|
||||
</Form.Item>
|
||||
<Form.Item name="evalPlaceId" label="选择评标场所"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Select placeholder="请选择评标场所" labelInValue disabled={formDisabled}>
|
||||
{
|
||||
placeList.map((item: any, index: any) => {
|
||||
return (
|
||||
<Select.Option value={item.id}>{item.placeName}</Select.Option>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="人员姓名"
|
||||
@ -146,6 +153,65 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="是否关联分组"
|
||||
name="groupStatus"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
{/* 0-否,1-是 */}
|
||||
<Radio.Group onChange={onGroupChange} value={groupValue}>
|
||||
<Radio value={0}>否</Radio>
|
||||
<Radio value={1}>是 </Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
|
||||
{groupValue == "1" ?
|
||||
<Form.Item name="groupId" label="选择分组"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Select placeholder="请选择所属分组" labelInValue disabled={formDisabled}>
|
||||
{
|
||||
groupList.map((item: any, index: any) => {
|
||||
return (
|
||||
<Select.Option value={item.id}>{item.groupName}</Select.Option>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
: null
|
||||
}
|
||||
|
||||
{groupValue == "0" ?
|
||||
<Form.Item
|
||||
label="人员类型"
|
||||
name="personType"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Radio.Group onChange={onTypeChange} value={typeValue}>
|
||||
<Radio value="site_manager">现场管理人员</Radio>
|
||||
<Radio value="site_temp">现场临时人员 </Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
: null
|
||||
}
|
||||
|
||||
|
||||
<Form.Item
|
||||
label="性别"
|
||||
name="sex"
|
||||
@ -157,11 +223,24 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
]}
|
||||
>
|
||||
{/* 1-男性,2-女性 */}
|
||||
<Radio.Group onChange={onChange} value={value}>
|
||||
<Radio.Group onChange={onSexChange} value={sexValue}>
|
||||
<Radio value="1">男性</Radio>
|
||||
<Radio value="2">女性 </Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="单位"
|
||||
name="workUnit"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="人脸照片"
|
||||
name="facePic"
|
@ -0,0 +1,265 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import ProTable, { ActionType } from '@ant-design/pro-table';
|
||||
import { getUserList, saveSiteUser, delSiteUser, getGroupList, getAuthorizeList } from '../service';
|
||||
import { Button, Card, Form, message, Spin, Popconfirm } from 'antd';
|
||||
import SiteUserModal from './SiteUserModal';
|
||||
import AuthorizeModal from './AuthorizeModal';
|
||||
|
||||
|
||||
const UserPermission: React.FC<{}> = () => {
|
||||
const checkRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
||||
const [isEditModalVisible, setIsEditModalVisible] = useState<boolean>(false) //控制新增或编辑模态框是否显示
|
||||
const [form] = Form.useForm();//新增模块form
|
||||
// const [editForm] = Form.useForm();//编辑模块form
|
||||
//单条数据
|
||||
const [editForm, setEditForm] = useState<any>({});
|
||||
const [spinning, setSping] = useState<boolean>(false);//加载遮罩
|
||||
const [groupList, setGroupList] = useState<any>([]); //省分公司信息
|
||||
//下拉框是否可编辑
|
||||
const [groupFormDisabled, setGroupFormDisabled] = useState<any>(false);
|
||||
const [type, setType] = useState<any>('cease');//弹窗类型
|
||||
|
||||
//授权相关
|
||||
const [authorizeList, setAuthorizeList] = useState<any>([]); //授权区域信息
|
||||
const [isAuthorizeModalVisible, setAuthorizeModalVisible] = useState<boolean>(false) //控制授权模态框是否显示
|
||||
|
||||
let typename = "新增";
|
||||
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号',
|
||||
valueType: 'index',
|
||||
width: 80,
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '人员姓名',
|
||||
dataIndex: 'personName',
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
dataIndex: 'identityCard',
|
||||
width: 300,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '分组名称',
|
||||
dataIndex: 'groupName',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'workUnit',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '人员类型',
|
||||
dataIndex: 'personType',
|
||||
valueEnum: {
|
||||
"site_manager": { text: '现场管理人员' },
|
||||
"site_temp": { text: '现场临时人员' },
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
search: false,
|
||||
render: (text: any, record: any) => {
|
||||
// 是否关联分组:0-否,1-是
|
||||
if (record.groupStatus == '0') {
|
||||
return (
|
||||
<>
|
||||
<a onClick={() => setFormVals(record)}>编辑</a>
|
||||
<a onClick={() => setAuthorize(record)}>授权管理</a>
|
||||
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delUser(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||
</>
|
||||
)
|
||||
} else if (record.groupStatus == '1') {
|
||||
return (
|
||||
<>
|
||||
<a onClick={() => setFormVals(record)}>编辑</a>
|
||||
<Popconfirm placement="topRight" title={"确定删除么?"} onConfirm={async () => { delUser(record.id); }} okText="确定" cancelText="取消" ><a > 删除 </a></Popconfirm>
|
||||
</>
|
||||
)
|
||||
} else {
|
||||
return(<></>)
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
const delUser = (id: any) => { // 删除
|
||||
setSping(true);
|
||||
delSiteUser(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setSping(false);
|
||||
message.success('删除成功');
|
||||
checkRelationRef.current?.reload();
|
||||
} else {
|
||||
setSping(false);
|
||||
form.resetFields()
|
||||
}
|
||||
}).finally(() => {
|
||||
setSping(false);
|
||||
});;
|
||||
}
|
||||
|
||||
// 授权
|
||||
const setAuthorize = (item: any) => {
|
||||
selectAuthorizeList(item.id)
|
||||
typename = "编辑";
|
||||
setEditForm(item);
|
||||
setAuthorizeModalVisible(true)
|
||||
setSping(false);
|
||||
}
|
||||
|
||||
// 编辑页面赋值
|
||||
const setFormVals = (item: any) => {
|
||||
typename = "编辑";
|
||||
selectGroupList();
|
||||
setEditForm(item);
|
||||
setType("edit");
|
||||
setIsEditModalVisible(true)
|
||||
setSping(false);
|
||||
}
|
||||
|
||||
// 新增页面
|
||||
const insertSiteUser = () => {
|
||||
selectGroupList();
|
||||
setType("insert");
|
||||
setIsEditModalVisible(true)
|
||||
setSping(false);
|
||||
}
|
||||
|
||||
// 查询分组集合
|
||||
const selectGroupList = () => {
|
||||
//查询当前人员权限下所有现场分组
|
||||
getGroupList().then(res => {
|
||||
if (res.code == 200) {
|
||||
setGroupList(res.data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询授权区域信息集合
|
||||
const selectAuthorizeList = (id: any) => {
|
||||
//查询当前人员权限下所有现场分组
|
||||
getAuthorizeList(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setAuthorizeList(res.data)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="confirm zjl-entrust" style={{ height: window.innerHeight - 169, overflowY: 'auto' }}>
|
||||
<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) => {
|
||||
let trueParams = {
|
||||
...params,
|
||||
pageNo: params.current,
|
||||
}
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
getUserList(trueParams).then(res => {
|
||||
if (res.code === 200) {
|
||||
resolve({
|
||||
data: res.data.records,
|
||||
success: res.success,
|
||||
total: res.data.total,
|
||||
})
|
||||
} else {
|
||||
resolve({
|
||||
data: [],
|
||||
success: false,
|
||||
total: 0,
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
}}
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||
/>
|
||||
{/* 新增及编辑银行账号Modal */}
|
||||
{
|
||||
isEditModalVisible ?
|
||||
<SiteUserModal
|
||||
title={typename+"人员信息"}
|
||||
type={type}
|
||||
modalVisible={isEditModalVisible}
|
||||
formDisabled={groupFormDisabled}
|
||||
groupList={groupList}
|
||||
values={editForm}
|
||||
onSubmit={async (value: any) => {
|
||||
await saveSiteUser(value).then((res: any) => {
|
||||
if (res.success === true) {
|
||||
message.success("保存成功!");
|
||||
setIsEditModalVisible(false);
|
||||
setEditForm({});
|
||||
// getSiteUser();
|
||||
checkRelationRef.current?.reload();
|
||||
}
|
||||
});
|
||||
}}
|
||||
onCancel={() => {
|
||||
setIsEditModalVisible(!isEditModalVisible);
|
||||
setEditForm({});
|
||||
}}
|
||||
></SiteUserModal>
|
||||
: null
|
||||
}
|
||||
{/* 授权Modal */}
|
||||
{
|
||||
isAuthorizeModalVisible ?
|
||||
<AuthorizeModal
|
||||
title={"授权管理"}
|
||||
modalVisible={isAuthorizeModalVisible}
|
||||
values={editForm}
|
||||
type={editForm.personType}
|
||||
level={"user"}
|
||||
// onSubmit={async (value: any) => {
|
||||
// await saveSiteGroup(value).then((res: any) => {
|
||||
// if (res.success === true) {
|
||||
// message.success("保存成功!");
|
||||
// setAuthorizeModalVisible(false);
|
||||
// setEditForm({});
|
||||
// // getSitePerson();
|
||||
// checkRelationRef.current?.reload();
|
||||
// }
|
||||
// });
|
||||
// }}
|
||||
onCancel={() => {
|
||||
setAuthorizeModalVisible(!isAuthorizeModalVisible);
|
||||
setEditForm({});
|
||||
}}
|
||||
></AuthorizeModal>
|
||||
: null
|
||||
}
|
||||
|
||||
</Spin>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
export default UserPermission;
|
29
src/pages/ElecEvaluation/EvalSiteManage/SiteUser/index.tsx
Normal file
29
src/pages/ElecEvaluation/EvalSiteManage/SiteUser/index.tsx
Normal file
@ -0,0 +1,29 @@
|
||||
import { Card, Tabs } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
import GroupPermission from './components/GroupPermission';
|
||||
import UserPermission from './components/UserPermission';
|
||||
import '@/assets/zjl_style.less';
|
||||
const SiteUserTab: React.FC<{}> = () => {
|
||||
const [keys, setKeys] = useState<any>('1');
|
||||
const { TabPane } = Tabs;
|
||||
const onChange = (data: any) => {
|
||||
setKeys(data);
|
||||
};
|
||||
return (
|
||||
<Card
|
||||
bodyStyle={{ padding: '0px 24px' }}
|
||||
style={{ borderRadius: 6 }}
|
||||
className="revenue"
|
||||
>
|
||||
<Tabs defaultActiveKey="1" tabBarGutter={48} style={{ padding: 0 }} onChange={onChange}>
|
||||
<TabPane tab="分组权限管理" key="1">
|
||||
{keys == '1' ? <GroupPermission /> : null}
|
||||
</TabPane>
|
||||
<TabPane tab="人员权限管理" key="2">
|
||||
{keys == '2' ? <UserPermission /> : null}
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
export default SiteUserTab;
|
168
src/pages/ElecEvaluation/EvalSiteManage/SiteUser/service.ts
Normal file
168
src/pages/ElecEvaluation/EvalSiteManage/SiteUser/service.ts
Normal file
@ -0,0 +1,168 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
|
||||
/**
|
||||
* 查询分组数据并分页
|
||||
* @param params
|
||||
*/
|
||||
export async function getGroupPageList(params?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/group/page', {
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分组
|
||||
* @param params
|
||||
*/
|
||||
export async function saveSiteGroup(data?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/group/save', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分组
|
||||
* @param params
|
||||
*/
|
||||
export async function delSiteGroup(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/group/delete?id='+id, {
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 查询现场人员数据并分页
|
||||
* @param params
|
||||
*/
|
||||
export async function getUserList(params?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/user/page', {
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增现场人员
|
||||
* @param params
|
||||
*/
|
||||
export async function saveSiteUser(data?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/user/save', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除现场人员
|
||||
* @param params
|
||||
*/
|
||||
export async function delSiteUser(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/user/delete?id='+id, {
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分组
|
||||
* @param params
|
||||
*/
|
||||
export async function getGroupList() {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/group/list', {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询授权信息
|
||||
* @param params
|
||||
*/
|
||||
export async function getAuthorizeList(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site//authorize/info?id='+id, {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消授权
|
||||
* @param params
|
||||
*/
|
||||
export async function cancelAuthorize(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/authorize/cancel?id='+id, {
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消授权
|
||||
* @param params
|
||||
*/
|
||||
export async function addAuthorize(params: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/authorize/add', {
|
||||
method: 'POST',
|
||||
data:params
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询数据并分页
|
||||
* @param params
|
||||
*/
|
||||
export async function getList(params?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/page', {
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function getPlaceList() { // 列表
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/elec/eval/place/userlimit/list', {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param params
|
||||
*/
|
||||
export async function saveSitePerson(data?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/save', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
*/
|
||||
export async function delSitePerson(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/delete?id='+id, {
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user