|
@ -6,43 +6,6 @@ import VideoCard from './videoCard' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const VideoScreen = (props) => { |
|
|
const VideoScreen = (props) => { |
|
|
const [pageSize, setPageSize] = useState(4) //每页视频数量 |
|
|
|
|
|
const [queryData, setQueryData] = useState([{ label: '全部', value: '全部', key: '0' }]) //查询树状数据 |
|
|
|
|
|
const [leftTree, setLefTtree] = useState([{ label: '全部', value: '全部', key: '0' }]) //左侧树状数据 |
|
|
|
|
|
const [playData, setPlayData] = useState([]) //视频数据 |
|
|
|
|
|
const [queryValue, setQueryValue] = useState(['全部']) //查询条件 |
|
|
|
|
|
const [leftValue, setLeftValue] = useState() // |
|
|
|
|
|
|
|
|
|
|
|
const api = useRef(); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
let query = [] |
|
|
|
|
|
treeData?.map(v => [ |
|
|
|
|
|
query.push({ label: v.label, value: v.value, key: v.key }) |
|
|
|
|
|
]) |
|
|
|
|
|
setQueryData([{ label: '全部', value: '全部', key: '0', children: query }]) |
|
|
|
|
|
|
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
if (treeData && queryValue.includes('全部')) { |
|
|
|
|
|
setLefTtree(treeData) |
|
|
|
|
|
} else { |
|
|
|
|
|
let leftData = [] |
|
|
|
|
|
queryValue.map(item => leftData.push(treeData?.find(({ value }) => item == value))) //获取左侧树状数据 |
|
|
|
|
|
setLefTtree([{ label: '全部', value: '全部', key: '0', children: leftData }]) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, [queryData, queryValue]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
|
|
|
|
setLeftValue() |
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const treeData = [{ |
|
|
const treeData = [{ |
|
|
label: '公司', |
|
|
label: '公司', |
|
|
value: '公司', |
|
|
value: '公司', |
|
@ -102,7 +65,7 @@ const VideoScreen = (props) => { |
|
|
content: ['5442542542', '452345', '234524525'], |
|
|
content: ['5442542542', '452345', '234524525'], |
|
|
serialNo: "F61504020", |
|
|
serialNo: "F61504020", |
|
|
type: "yingshi", |
|
|
type: "yingshi", |
|
|
yingshiToken: "at.7pl4c5orb9fpndtlbjpsn5m11szujnf7-1laxxre0ob-010o8fw-kqeuwthva" |
|
|
yingshiToken: "at.7pl4c5orb9fpndtlbjpsn5m11szujnf7-1laxxre0ob-010o8fw-kqeuwthva", |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
@ -128,6 +91,43 @@ const VideoScreen = (props) => { |
|
|
] |
|
|
] |
|
|
}] |
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
const [pageSize, setPageSize] = useState(4) //每页视频数量 |
|
|
|
|
|
const [queryData, setQueryData] = useState([{ label: '全部', value: '全部', key: '0' }]) //查询树状数据 |
|
|
|
|
|
const [leftTree, setLefTtree] = useState([{ label: '全部', value: '全部', key: '0', children: treeData}]) //左侧树状数据 |
|
|
|
|
|
const [playData, setPlayData] = useState([]) //视频数据 |
|
|
|
|
|
const [queryValue, setQueryValue] = useState(['全部']) //查询条件 |
|
|
|
|
|
const [leftValue, setLeftValue] = useState() // |
|
|
|
|
|
|
|
|
|
|
|
const api = useRef(); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
let query = [] |
|
|
|
|
|
treeData?.map(v => [ |
|
|
|
|
|
query.push({ label: v.label, value: v.value, key: v.key }) |
|
|
|
|
|
]) |
|
|
|
|
|
setQueryData([{ label: '全部', value: '全部', key: '0', children: query }]) |
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
if (treeData && queryValue.includes('全部')) { |
|
|
|
|
|
setLefTtree(treeData) |
|
|
|
|
|
} else { |
|
|
|
|
|
let leftData = [] |
|
|
|
|
|
queryValue.map(item => leftData.push(treeData?.find(({ value }) => item == value))) //获取左侧树状数据 |
|
|
|
|
|
setLefTtree([{ label: '全部', value: '全部', key: '0', children: leftData }]) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, [queryData, queryValue]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
setLeftValue() |
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//搜索条件赛选样式 |
|
|
//搜索条件赛选样式 |
|
|
const screen = { width: 193, marginRight: 20, marginBottom: 16, color: "#fff", }; |
|
|
const screen = { width: 193, marginRight: 20, marginBottom: 16, color: "#fff", }; |
|
|
|
|
|
|
|
@ -214,6 +214,9 @@ const VideoScreen = (props) => { |
|
|
console.log(e); |
|
|
console.log(e); |
|
|
setLeftValue(e) |
|
|
setLeftValue(e) |
|
|
}} |
|
|
}} |
|
|
|
|
|
onSelect={(e)=>{ |
|
|
|
|
|
console.log(e); |
|
|
|
|
|
}} |
|
|
style={{ width: 150, color: '#FFFFFF' }} |
|
|
style={{ width: 150, color: '#FFFFFF' }} |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|