From abc21d8be404b660718e66217c20bde154d50854 Mon Sep 17 00:00:00 2001 From: hongmye <1014185119@qq.com> Date: Wed, 12 Jun 2024 17:29:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=9B=86=E6=88=90?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../integratedLogin/components/AddModal.js | 6 - .../integratedLogin/components/Master.js | 76 +---------- .../components/PreviewModal.js | 2 - .../components/RolePmSite/index.js | 1 - src/pages/integratedLogin/index.js | 127 ++++++++---------- 5 files changed, 60 insertions(+), 152 deletions(-) diff --git a/src/pages/integratedLogin/components/AddModal.js b/src/pages/integratedLogin/components/AddModal.js index 31e98a77..b3c22a28 100644 --- a/src/pages/integratedLogin/components/AddModal.js +++ b/src/pages/integratedLogin/components/AddModal.js @@ -147,8 +147,6 @@ const AddModal = props => { }; const pickFiled1 = fileds => { - const values = form.getFieldValue(fileds); - console.log('馃殌 ~ values:', values); if (form.getFieldValue(fileds)) { setCheckedList1(form.getFieldValue(fileds).split(',')); setPick(fileds); @@ -311,10 +309,6 @@ const AddModal = props => { wrapperCol: { span: 18 }, }; - const onChange = e => { - setRadio(e); - }; - const beforeUpload = file => { const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/gif'; diff --git a/src/pages/integratedLogin/components/Master.js b/src/pages/integratedLogin/components/Master.js index a6465eac..b829e6ea 100644 --- a/src/pages/integratedLogin/components/Master.js +++ b/src/pages/integratedLogin/components/Master.js @@ -36,28 +36,16 @@ const colorList = [ color: '#00A295', // headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)', }, - // { - // key: '绉戞妧钃�', - // color: '#1890FF', - // // headerColor: 'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)', - // }, - // { - // key: '鐜繚缁�', - // color: '#00B496', - // // headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)', - // }, ]; const Master = props => { const { callBackSubmit = () => {}, visible, onCancel, type, isPanda } = props; const [loading, setLoading] = useState(false); const [form] = Form.useForm(); - const [imgBed, setImgBed] = useState(); const [imageUrl, setImageUrl] = useState(); const [im, setIm] = useState(); const [previewModal, setPreviewModal] = useState(false); const [keepImgeUrl, setKeepImgeUrl] = useState(''); - const [options, setOptions] = useState([]); const [radio, setRadio] = useState(); const [flag, setFlag] = useState(0); const [keepSettings, setKeepSettings] = useState([]); @@ -72,12 +60,10 @@ const Master = props => { }); return oType; }, [isPanda]); - console.log(optionsTemp, 'optionsTemp'); useEffect(() => { if (visible) { appService.GetIntegratedloginSetting().then(res => { if (res.code === 0) { - console.log(res.data); const aa = res.data.title.split('<br/>'); const bb = res.data.qrCodeConfig.split('|'); const displayMode = res.data.displayMode || 'default'; @@ -143,7 +129,6 @@ const Master = props => { if (obj.titlebr) { obj.title = `${obj.title}<br/>${obj.titlebr}`; } - console.log(obj.qrCodename || obj.qrCodeurl); if (validate) { if (!obj.logo) { message.error('璇烽€夋嫨鐧诲綍Logo锛�'); @@ -191,7 +176,6 @@ const Master = props => { } }); } - console.log(obj); }; const layout = { @@ -232,19 +216,6 @@ const Master = props => { setImageUrl(''); setLoading(false); } - - // if (info.file.status === 'done') { - // DownLoadFiles({ module: '鍥惧簱\\绗笁鏂瑰浘鏍�', filePath: info.file.response.data }).then(res => { - // let reader = new FileReader(); - // reader.readAsDataURL(res); - // reader.onload = function() { - // setImageUrl(reader.result); - // }; - // }); - // getBase64(info.file.originFileObj, url => { - // setLoading(false); - // setImageUrl(url); - // }); }; const getBase64 = (img, callback) => { @@ -281,7 +252,6 @@ const Master = props => { }; const onChange = e => { - console.log(e); setRadio(e.target.value); if (e.target.value == '鍦板浘') { setFlag(1); @@ -408,17 +378,7 @@ const Master = props => { <Select placeholder="璇烽€夋嫨棰滆壊" style={{ marginLeft: '3px' }}> {colorList.map(item => ( <Option value={item.color} key={item.color}> - <div style={{ display: 'flex', alignItems: 'center' }}> - {/* <div - style={{ - height: '10px', - width: '10px', - background: item.color, - marginRight: '5px', - }} - /> */} - {`${item.key}`} - </div> + <div style={{ display: 'flex', alignItems: 'center' }}>{`${item.key}`}</div> </Option> ))} </Select> @@ -451,40 +411,6 @@ const Master = props => { </Item> </Col> </Row> - {/* <Item label="灞曠ず鏂瑰紡" name="displayMode"> - <Radio.Group onChange={onChange} value={radio}> - <Radio value="鍗$墖">鍗$墖</Radio> - <Radio value="鍦板浘">鍦板浘</Radio> - </Radio.Group> - </Item> */} - {/* {flag == 1 ? ( - <Item - label="鍦板尯閫夋嫨" - name="mapSettings" - rules={[ - { - required: true, - message: '鍦板尯閫夋嫨涓哄繀濉」', - }, - ]} - > - <Cascader - fieldNames={{ - label: 'name', - value: 'adcode', - children: 'districtList', - }} - multiple - showSearch - options={options} - placeholder="璇烽€夋嫨琛屾斂鍖�" - changeOnSelect - allowClear={false} - /> - </Item> - ) : ( - <></> - )} */} <Row> <Col span={8}> <Item name="qrCodename" label="浜岀淮鐮�" labelCol={{ span: 12 }}> diff --git a/src/pages/integratedLogin/components/PreviewModal.js b/src/pages/integratedLogin/components/PreviewModal.js index 6d0d05ab..a6119e79 100644 --- a/src/pages/integratedLogin/components/PreviewModal.js +++ b/src/pages/integratedLogin/components/PreviewModal.js @@ -18,8 +18,6 @@ const PreviewModal = props => { const [keepGroupName, setKeepGroupName] = useState([]); const update = () => { - console.log(keepImgeUrl); - console.log(imageUrl); appService .GetIntegrationConfigIcon() .then(res => { diff --git a/src/pages/integratedLogin/components/RolePmSite/index.js b/src/pages/integratedLogin/components/RolePmSite/index.js index 2905ad2a..06d86a03 100644 --- a/src/pages/integratedLogin/components/RolePmSite/index.js +++ b/src/pages/integratedLogin/components/RolePmSite/index.js @@ -723,7 +723,6 @@ const RMSComponents = props => { }); setSelected(hhh); } - console.log(checkedListArr); setCheckDataRole(list); setSaveCheckValue(checkedListArr); setCheckedList(checkedListArr); diff --git a/src/pages/integratedLogin/index.js b/src/pages/integratedLogin/index.js index 92af4cba..047cd545 100644 --- a/src/pages/integratedLogin/index.js +++ b/src/pages/integratedLogin/index.js @@ -6,9 +6,6 @@ import { EditTwoTone, DeleteOutlined, PlusOutlined, - SyncOutlined, - FilePdfOutlined, - OrderedListOutlined, LockOutlined, UnlockOutlined, DownOutlined, @@ -22,7 +19,7 @@ import Master from './components/Master'; const path = require('path'); const IntegratedLogin = props => { - let isPanda = props.params?.isPanda || 'true'; + let isPanda = props.params?.isPanda || 'false'; isPanda = isPanda === 'true'; const [loading, setLoading] = useState(false); const [tableData, setTableData] = useState([]); @@ -33,7 +30,6 @@ const IntegratedLogin = props => { const [type, setType] = useState(''); const [masterVisible, setMasterVisible] = useState(false); const [keepSystemName, setKeepSystemName] = useState([]); - const [sortVisible, setSortVisible] = useState(false); const [groupList, setGroupList] = useState([]); // 鍒嗙粍鍒楄〃 const [targetType, setTargetType] = useState(''); const [migrationLoading, setMigrationLoading] = useState(false); @@ -126,80 +122,77 @@ const IntegratedLogin = props => { key: 'action', width: 200, align: 'center', - render: (record, text, index) => { - console.log(record, text, index); - return ( - <Space size="middle"> - {index ? ( - <Tooltip title="涓婂崌"> - <Button icon={<SortDescendingOutlined />} type="text" onClick={() => onSort('up', index)} /> - </Tooltip> - ) : null} - - {index < tableData.length - 1 ? ( - <Tooltip title="涓嬬Щ"> - <Button icon={<SortAscendingOutlined />} type="text" onClick={() => onSort('down', index)} /> - </Tooltip> - ) : null} + render: (record, text, index) => ( + <Space size="middle"> + {index ? ( + <Tooltip title="涓婂崌"> + <Button icon={<SortDescendingOutlined />} type="text" onClick={() => onSort('up', index)} /> + </Tooltip> + ) : null} - <Tooltip title="缂栬緫"> - <EditTwoTone onClick={() => edit(record)} style={{ fontSize: '16px' }} /> + {index < tableData.length - 1 ? ( + <Tooltip title="涓嬬Щ"> + <Button icon={<SortAscendingOutlined />} type="text" onClick={() => onSort('down', index)} /> </Tooltip> - {!record.isEnable ? ( - <Tooltip title="鍋滅敤"> - <Popconfirm - placement="left" - title={ - <p> - 鍚敤绔欑偣 - <span className={styles.redText}>{record.name}</span> - </p> - } - okText="纭" - cancelText="鍙栨秷" - onConfirm={() => freezeUser(record)} - > - <LockOutlined style={{ fontSize: '16px', color: '#e86060' }} /> - </Popconfirm> - </Tooltip> - ) : ( - <Tooltip title="鍚敤"> - <Popconfirm - placement="left" - title={ - <p> - 鍋滅敤绔欑偣 - <span className={styles.redText}>{record.name}</span> - </p> - } - okText="纭" - cancelText="鍙栨秷" - onConfirm={() => freezeUser(record)} - > - <UnlockOutlined style={{ fontSize: '16px', color: '#1890ff' }} /> - </Popconfirm> - </Tooltip> - )} + ) : null} - <Tooltip title="鍒犻櫎"> + <Tooltip title="缂栬緫"> + <EditTwoTone onClick={() => edit(record)} style={{ fontSize: '16px' }} /> + </Tooltip> + {!record.isEnable ? ( + <Tooltip title="鍋滅敤"> <Popconfirm - placement="bottomRight" + placement="left" title={ <p> - 鍗冲皢鍒犻櫎 <span>{record.loginName}</span> - 锛屾槸鍚︾‘璁ゅ垹闄わ紵 + 鍚敤绔欑偣 + <span className={styles.redText}>{record.name}</span> </p> } okText="纭" cancelText="鍙栨秷" - onConfirm={() => dele(record)} + onConfirm={() => freezeUser(record)} > - <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} /> + <LockOutlined style={{ fontSize: '16px', color: '#e86060' }} /> </Popconfirm> </Tooltip> - </Space> - ); - }, + ) : ( + <Tooltip title="鍚敤"> + <Popconfirm + placement="left" + title={ + <p> + 鍋滅敤绔欑偣 + <span className={styles.redText}>{record.name}</span> + </p> + } + okText="纭" + cancelText="鍙栨秷" + onConfirm={() => freezeUser(record)} + > + <UnlockOutlined style={{ fontSize: '16px', color: '#1890ff' }} /> + </Popconfirm> + </Tooltip> + )} + + <Tooltip title="鍒犻櫎"> + <Popconfirm + placement="bottomRight" + title={ + <p> + 鍗冲皢鍒犻櫎 <span>{record.loginName}</span> + 锛屾槸鍚︾‘璁ゅ垹闄わ紵 + </p> + } + okText="纭" + cancelText="鍙栨秷" + onConfirm={() => dele(record)} + > + <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} /> + </Popconfirm> + </Tooltip> + </Space> + ), }, ]; @@ -335,7 +328,6 @@ const IntegratedLogin = props => { id: l, index: lIndex, })); - console.log(list, 'list'); SaveIntegrationIndex(list).then(res => { if (res.code === 0) { message.success('璋冩暣鎴愬姛'); @@ -344,7 +336,6 @@ const IntegratedLogin = props => { res.msg && message.error(res.msg); } }); - console.log('馃殌 ~ list:', list); }; const migration = () => { // 璋冪敤杩佺Щ鎺ュ彛 -- 2.17.1