Commit 1a3e1d2a authored by 皮倩雯's avatar 皮倩雯

fix: '修复图片库展开组件bug'

parent 393b7cd9
Pipeline #54586 canceled with stages
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
AddIntegratedloginSetting, AddIntegratedloginSetting,
GetIntegratedloginSetting, GetIntegratedloginSetting,
} from '@/services/integratedLogin/api'; } from '@/services/integratedLogin/api';
import { PlusOutlined, LoadingOutlined, ConsoleSqlOutlined } from '@ant-design/icons'; import { PlusOutlined, LoadingOutlined } from '@ant-design/icons';
import { get, PUBLISH_SERVICE } from '@/services'; import { get, PUBLISH_SERVICE } from '@/services';
import PreviewModal from './PreviewModal'; import PreviewModal from './PreviewModal';
const { Item } = Form; const { Item } = Form;
...@@ -22,11 +22,11 @@ const colorList = [ ...@@ -22,11 +22,11 @@ const colorList = [
color: '#009C73', color: '#009C73',
headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)', headerColor: 'linear-gradient(0deg, #00845D 0%, #02BF87 100%)',
}, },
{ // {
key: '清澈蓝', // key: '清澈蓝',
color: '#1890FF', // color: '#1890FF',
headerColor: '#1890FF', // headerColor: '#1890FF',
}, // },
]; ];
const Master = props => { const Master = props => {
...@@ -157,9 +157,6 @@ const Master = props => { ...@@ -157,9 +157,6 @@ const Master = props => {
const onOk = props => { const onOk = props => {
if (props) { if (props) {
console.log(props.path);
console.log(process);
console.log(global);
setImageUrl(window.location.origin + `/${props.path}`); setImageUrl(window.location.origin + `/${props.path}`);
setIm(props.path); setIm(props.path);
setKeepImgeUrl(props.path); setKeepImgeUrl(props.path);
......
...@@ -34,15 +34,16 @@ const PreviewModal = props => { ...@@ -34,15 +34,16 @@ const PreviewModal = props => {
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
let bb = []; let bb = [];
res.data.map(i => { let aa = [];
res.data.map((i, a) => {
if (i.files.length > 0) { if (i.files.length > 0) {
bb.push(i); bb.push(i);
aa.push(i.groupName);
} }
}); });
setKeepGroupName(aa);
setImgData(bb); setImgData(bb);
let aa = [];
res.data.map(i => { res.data.map(i => {
aa.push(i.groupName);
i.files.map((j, index) => { i.files.map((j, index) => {
if (keepImgeUrl) { if (keepImgeUrl) {
if (j.path == keepImgeUrl) { if (j.path == keepImgeUrl) {
...@@ -57,7 +58,6 @@ const PreviewModal = props => { ...@@ -57,7 +58,6 @@ const PreviewModal = props => {
} }
}); });
}); });
setKeepGroupName(aa);
} else { } else {
notification.error({ notification.error({
message: '获取失败', message: '获取失败',
...@@ -80,7 +80,7 @@ const PreviewModal = props => { ...@@ -80,7 +80,7 @@ const PreviewModal = props => {
}; };
const handleCollapseChange = key => { const handleCollapseChange = key => {
console.log(key); setKeepGroupName(key);
}; };
return ( return (
...@@ -98,10 +98,9 @@ const PreviewModal = props => { ...@@ -98,10 +98,9 @@ const PreviewModal = props => {
getContainer={false} getContainer={false}
> >
<Collapse <Collapse
style={{ height: '600px' }} style={{ height: '600px', overflow: 'scroll' }}
bordered={false} bordered={false}
// defaultActiveKey={keepGroupName} activeKey={keepGroupName}
activeKey={imgData.map(item => item.groupName)}
onChange={handleCollapseChange} onChange={handleCollapseChange}
> >
{imgData.map((i, j) => { {imgData.map((i, j) => {
...@@ -109,7 +108,6 @@ const PreviewModal = props => { ...@@ -109,7 +108,6 @@ const PreviewModal = props => {
<Panel <Panel
header={i.groupName} header={i.groupName}
key={i.groupName} key={i.groupName}
showArrow={false}
style={{ style={{
marginBottom: '24px', marginBottom: '24px',
overflow: 'hidden', overflow: 'hidden',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment