|
|
|
@ -7,6 +7,7 @@ import { getReviewGroupByNew } from '@/api/componentMarket';
|
|
|
|
import { componentRelease, componentRevoke } from '@/api/componentRelease';
|
|
|
|
import { componentRelease, componentRevoke } from '@/api/componentRelease';
|
|
|
|
import { ComponentItem } from '@/api/interface';
|
|
|
|
import { ComponentItem } from '@/api/interface';
|
|
|
|
import AddComponentModal from '@/pages/componentDevelopment/componentList/addComponentModal';
|
|
|
|
import AddComponentModal from '@/pages/componentDevelopment/componentList/addComponentModal';
|
|
|
|
|
|
|
|
import PublishComponentModal from '@/pages/componentDevelopment/componentList/publishComponentModal';
|
|
|
|
import HandleButtonGroup from '@/pages/componentDevelopment/componentList/handleButtonGroup';
|
|
|
|
import HandleButtonGroup from '@/pages/componentDevelopment/componentList/handleButtonGroup';
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
componentStatusConstant,
|
|
|
|
componentStatusConstant,
|
|
|
|
@ -32,6 +33,8 @@ const GlobalVarContainer = () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
|
|
|
|
|
const [publishModalVisible, setPublishModalVisible] = useState(false);
|
|
|
|
|
|
|
|
const [selectedPublishComponent, setSelectedPublishComponent] = useState(null);
|
|
|
|
const [mode, setMode] = useState<'create' | 'edit' | 'copy'>('create'); // 添加模式状态
|
|
|
|
const [mode, setMode] = useState<'create' | 'edit' | 'copy'>('create'); // 添加模式状态
|
|
|
|
const [searchValue, setSearchValue] = useState(''); // 添加搜索状态
|
|
|
|
const [searchValue, setSearchValue] = useState(''); // 添加搜索状态
|
|
|
|
const [componentStatus, setComponentStatus] = useState(''); // 添加组件状态筛选
|
|
|
|
const [componentStatus, setComponentStatus] = useState(''); // 添加组件状态筛选
|
|
|
|
@ -135,8 +138,8 @@ const GlobalVarContainer = () => {
|
|
|
|
row={record}
|
|
|
|
row={record}
|
|
|
|
index={index}
|
|
|
|
index={index}
|
|
|
|
onHandlePublishComponent={(row) => {
|
|
|
|
onHandlePublishComponent={(row) => {
|
|
|
|
// TODO: 实现发布组件逻辑
|
|
|
|
setSelectedPublishComponent(row);
|
|
|
|
console.log('Handle publish component', row);
|
|
|
|
setPublishModalVisible(true);
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
onGoToReview={(row) => {
|
|
|
|
onGoToReview={(row) => {
|
|
|
|
// TODO: 实现查看审核逻辑
|
|
|
|
// TODO: 实现查看审核逻辑
|
|
|
|
@ -465,6 +468,19 @@ const GlobalVarContainer = () => {
|
|
|
|
onReFresh={fetchComponentData}
|
|
|
|
onReFresh={fetchComponentData}
|
|
|
|
mode={mode} // 传递模式
|
|
|
|
mode={mode} // 传递模式
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*发布组件弹窗*/}
|
|
|
|
|
|
|
|
<PublishComponentModal
|
|
|
|
|
|
|
|
visible={publishModalVisible}
|
|
|
|
|
|
|
|
componentInfo={selectedPublishComponent}
|
|
|
|
|
|
|
|
onCancel={() => {
|
|
|
|
|
|
|
|
setPublishModalVisible(false);
|
|
|
|
|
|
|
|
setSelectedPublishComponent(null);
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
onSuccess={() => {
|
|
|
|
|
|
|
|
fetchComponentData();
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|