diff --git a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/AuthorizeModal.tsx b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/AuthorizeModal.tsx index 3870360..b832b3a 100644 --- a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/AuthorizeModal.tsx +++ b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/AuthorizeModal.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; -import { Form, Input, Modal, Spin, Button, RadioChangeEvent, Popconfirm, message, DatePicker } from 'antd'; +import { Form, Modal, Spin, Button, Popconfirm, message, DatePicker } from 'antd'; import { getAuthorizeList, cancelAuthorize, addAuthorize } from '../service'; import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import moment from 'moment'; @@ -12,7 +12,6 @@ interface AuthorizeModalProps { values: any; type: any; level: any; - // onSubmit: any; onCancel: () => void; } const layout = { @@ -21,22 +20,15 @@ const layout = { }; const AuthorizeModal: React.FC = (props) => { const actionRef = useRef(); - //查看页弹窗visible - const [form] = Form.useForm(); const { title, modalVisible, values, type, level, onCancel } = props;//, onSubmit: handleUpdate //loading const [loading, setLoading] = useState(false); - const [value, setValue] = useState("1"); //授权相关 const [authorizeList, setAuthorizeList] = useState([]); //已授权区域信息 const [unAuthorizeList, setUnAuthorizeList] = useState([]); //未授权区域信息 const [timeModalVisible, setTimeModalVisible] = useState(false); const [modelform] = Form.useForm(); - const onChange = (e: RadioChangeEvent) => { - console.log('radio checked', e.target.value); - setValue(e.target.value); - }; useEffect(() => { diff --git a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/GroupPermission.tsx b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/GroupPermission.tsx index ed3d0af..e3eaf7e 100644 --- a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/GroupPermission.tsx +++ b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/GroupPermission.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef, useState } from 'react'; import ProTable, { ActionType } from '@ant-design/pro-table'; -import { getGroupPageList, saveSiteGroup, delSiteGroup, getAuthorizeList } from '../service'; -import { Button, Card, Form, message, Spin, Popconfirm } from 'antd'; +import { getGroupPageList, saveSiteGroup, delSiteGroup } from '../service'; +import { Button, Form, message, Spin, Popconfirm } from 'antd'; import SiteGroupModal from './SiteGroupModal'; import AuthorizeModal from './AuthorizeModal'; @@ -17,7 +17,6 @@ const GroupPermission: React.FC<{}> = () => { const [type, setType] = useState('cease');//弹窗类型 //授权相关 - const [authorizeList, setAuthorizeList] = useState([]); //授权区域信息 const [isAuthorizeModalVisible, setAuthorizeModalVisible] = useState(false) //控制授权模态框是否显示 let typename = "新增"; @@ -77,7 +76,6 @@ const GroupPermission: React.FC<{}> = () => { // 授权 const setAuthorize = (item: any) => { - selectAuthorizeList(item.id) typename = "编辑"; setEditForm(item); setAuthorizeModalVisible(true) @@ -100,16 +98,6 @@ const GroupPermission: React.FC<{}> = () => { setSping(false); } - // 查询授权区域信息集合 - const selectAuthorizeList = (id: any) => { - //查询当前人员权限下所有现场分组 - getAuthorizeList(id).then(res => { - if (res.code == 200) { - setAuthorizeList(res.data) - } - }); - } - useEffect(() => { }, []) @@ -174,7 +162,6 @@ const GroupPermission: React.FC<{}> = () => { message.success("保存成功!"); setIsEditModalVisible(false); setEditForm({}); - // getSitePerson(); checkRelationRef.current?.reload(); } }); diff --git a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/SiteUserModal.tsx b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/SiteUserModal.tsx index 7dc3a2c..8a9cb88 100644 --- a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/SiteUserModal.tsx +++ b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/SiteUserModal.tsx @@ -6,7 +6,6 @@ import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload' interface SitePersonModalProps { title: any; modalVisible: boolean; - formDisabled: boolean; values: any; onSubmit: any; type: string; @@ -19,7 +18,7 @@ const layout = { }; const SitePersonModal: React.FC = (props) => { const [form] = Form.useForm(); - const { title, modalVisible, formDisabled, type, values, onSubmit: handleUpdate, onCancel, groupList } = props; + const { title, modalVisible, type, values, onSubmit: handleUpdate, onCancel, groupList } = props; //loading const [loading, setLoading] = useState(false); @@ -64,16 +63,11 @@ const SitePersonModal: React.FC = (props) => { const onOk = async () => { const fieldsValue = await form.validateFields(); setLoading(true) - console.log(fieldsValue) if (fieldsValue.groupStatus == 1) { fieldsValue["groupId"] = fieldsValue.groupId.value } fieldsValue["facePicName"] = fieldsValue.personName - // await getFileListByBid(fieldsValue.facePic).then(res => { - // fieldsValue["facePicName"] = res[0].name - // }) - console.log(fieldsValue) await handleUpdate({ ...fieldsValue }).finally(() => { setLoading(false) }); @@ -179,7 +173,7 @@ const SitePersonModal: React.FC = (props) => { }, ]} > - { groupList.map((item: any, index: any) => { return ( diff --git a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/UserPermission.tsx b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/UserPermission.tsx index fc7bdf9..f98e8ed 100644 --- a/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/UserPermission.tsx +++ b/src/pages/ElecEvaluation/EvalSiteManage/SiteUser/components/UserPermission.tsx @@ -1,7 +1,7 @@ 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 { getUserList, saveSiteUser, delSiteUser, getGroupList } from '../service'; +import { Button, Form, message, Spin, Popconfirm } from 'antd'; import SiteUserModal from './SiteUserModal'; import AuthorizeModal from './AuthorizeModal'; @@ -15,12 +15,9 @@ const UserPermission: React.FC<{}> = () => { const [editForm, setEditForm] = useState({}); const [spinning, setSping] = useState(false);//加载遮罩 const [groupList, setGroupList] = useState([]); //省分公司信息 - //下拉框是否可编辑 - const [groupFormDisabled, setGroupFormDisabled] = useState(false); const [type, setType] = useState('cease');//弹窗类型 //授权相关 - const [authorizeList, setAuthorizeList] = useState([]); //授权区域信息 const [isAuthorizeModalVisible, setAuthorizeModalVisible] = useState(false) //控制授权模态框是否显示 let typename = "新增"; @@ -106,7 +103,6 @@ const UserPermission: React.FC<{}> = () => { // 授权 const setAuthorize = (item: any) => { - selectAuthorizeList(item.id) typename = "编辑"; setEditForm(item); setAuthorizeModalVisible(true) @@ -141,17 +137,6 @@ const UserPermission: React.FC<{}> = () => { }); } - - // 查询授权区域信息集合 - const selectAuthorizeList = (id: any) => { - //查询当前人员权限下所有现场分组 - getAuthorizeList(id).then(res => { - if (res.code == 200) { - setAuthorizeList(res.data) - } - }); - } - useEffect(() => { }, []) @@ -208,7 +193,6 @@ const UserPermission: React.FC<{}> = () => { title={typename+"人员信息"} type={type} modalVisible={isEditModalVisible} - formDisabled={groupFormDisabled} groupList={groupList} values={editForm} onSubmit={async (value: any) => { @@ -217,7 +201,6 @@ const UserPermission: React.FC<{}> = () => { message.success("保存成功!"); setIsEditModalVisible(false); setEditForm({}); - // getSiteUser(); checkRelationRef.current?.reload(); } }); @@ -238,17 +221,6 @@ const UserPermission: React.FC<{}> = () => { 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({});