Commit 35fd2f04 authored by 成旭东's avatar 成旭东

fix

parent 62644adf
Pipeline #28054 passed with stage
in 2 minutes 46 seconds
/* eslint-disable react/no-array-index-key */
/* eslint-disable no-plusplus */ /* eslint-disable no-plusplus */
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
...@@ -110,10 +111,11 @@ const DrawerForm = (props: any) => { ...@@ -110,10 +111,11 @@ const DrawerForm = (props: any) => {
> >
<Select <Select
showSearch showSearch
filterOption={false}
onSearch={searchProject} onSearch={searchProject}
onChange={changeProject} onChange={changeProject}
> >
{estateData.list.map((item: any, index: any) => ( {estateData.map((item: any, index: any) => (
<Option key={index} value={item.id}> <Option key={index} value={item.id}>
{item.name} {item.name}
</Option> </Option>
...@@ -254,14 +256,7 @@ const VideoList: React.FC<any> = (props) => { ...@@ -254,14 +256,7 @@ const VideoList: React.FC<any> = (props) => {
}, },
}); });
const [estateData, setEstateData] = useState({ const [estateData, setEstateData] = useState([]);
list: [],
pagination: {
pageSize: 10,
current: 1,
total: 0,
},
});
// 获取楼盘数据 // 获取楼盘数据
const getProjectList = (params = {}) => { const getProjectList = (params = {}) => {
...@@ -274,14 +269,7 @@ const VideoList: React.FC<any> = (props) => { ...@@ -274,14 +269,7 @@ const VideoList: React.FC<any> = (props) => {
if (ret.error) { if (ret.error) {
message.error(ret.error); message.error(ret.error);
} else { } else {
setEstateData({ setEstateData(ret.data || [])
list: ret.data,
pagination: {
pageSize: ret.size,
current: ret.page,
total: ret.total,
},
})
} }
} }
}); });
...@@ -403,7 +391,7 @@ const VideoList: React.FC<any> = (props) => { ...@@ -403,7 +391,7 @@ const VideoList: React.FC<any> = (props) => {
// 编辑视频 // 编辑视频
const editeVideo = (obj: any) => { const editeVideo = (obj: any) => {
const currentEstateData = estateData.list.map((item: any) => item.id); const currentEstateData = estateData.map((item: any) => item.id);
if (!currentEstateData.includes(obj.project_id)) { if (!currentEstateData.includes(obj.project_id)) {
getProjectList({ getProjectList({
......
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