更新筛选菜单交互 key列表对应编辑状态禁用
This commit is contained in:
parent
20049bd5cb
commit
23fae21d84
|
@ -11,13 +11,26 @@ import Menu from "../menu/main.js"
|
|||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
props.data.menuList[0].check = true;
|
||||
console.log("数据777")
|
||||
console.log(props.data.menuList)
|
||||
|
||||
let menuList = _.map(props.data.menuList,(item)=>{
|
||||
item.check = false;
|
||||
return item
|
||||
})
|
||||
|
||||
|
||||
|
||||
menuList[0].check = true;
|
||||
|
||||
console.log(menuList)
|
||||
|
||||
this.state = {
|
||||
|
||||
id:props.data.id,
|
||||
label:props.data.label,
|
||||
selectedMenu: props.data.menuList[0],
|
||||
menuList:props.data.menuList,
|
||||
menuList:menuList,
|
||||
visible:true,
|
||||
menuShow:true,
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import FilterSelect from "../filterSelect/main.js"
|
|||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
|
||||
this.state = {
|
||||
//数据源结构后面可能会变
|
||||
filterList:props.filterList,
|
||||
|
@ -36,7 +37,15 @@ import FilterSelect from "../filterSelect/main.js"
|
|||
this.state.showItemList.forEach((item,index,arr) => {
|
||||
|
||||
if(item.id === id){
|
||||
console.log("取消筛选")
|
||||
console.log(this.state.filterList)
|
||||
console.log()
|
||||
|
||||
this.props.onClose();
|
||||
|
||||
delete this.state.showItemList[index]
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
this.setState({showItemList:this.state.showItemList})
|
||||
|
@ -58,6 +67,7 @@ import FilterSelect from "../filterSelect/main.js"
|
|||
}
|
||||
else{
|
||||
this.removeItem(e,id)
|
||||
|
||||
}
|
||||
this.setState({showItemList:this.state.showItemList})
|
||||
this.setState({menuShow:false})
|
||||
|
@ -72,6 +82,20 @@ import FilterSelect from "../filterSelect/main.js"
|
|||
//隐藏菜单
|
||||
hideMenu (e,id) {
|
||||
this.setState({menuShow:false})
|
||||
|
||||
|
||||
|
||||
}
|
||||
onClose(){
|
||||
|
||||
console.log("取消")
|
||||
|
||||
this.setState({menuShow:false})
|
||||
let menuList = _.map(this.state.menuList,(item)=>{
|
||||
item.check = false;
|
||||
return item
|
||||
})
|
||||
this.setState({menuList:menuList})
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -97,7 +121,7 @@ import FilterSelect from "../filterSelect/main.js"
|
|||
multiple={true}
|
||||
visible={this.state.menuShow}
|
||||
tt={3}
|
||||
onClose = {(e,id)=>{this.hideMenu(e,id)}}
|
||||
onClose = {(e,id)=>{this.onClose(e,id)}}
|
||||
>
|
||||
</Menu>
|
||||
</div>
|
||||
|
|
|
@ -39,6 +39,9 @@ import React from 'react'
|
|||
if(this.props.multiple)
|
||||
{
|
||||
arr = this.state.data;
|
||||
console.log("多选")
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -671,6 +671,21 @@ onChangeCombinedDate(e){
|
|||
</span>
|
||||
|
||||
|
||||
if(rowData.status >= 6 )
|
||||
{
|
||||
str2 =<div> <a className="grid-link" style={{color:"#d8dbdd"}} >编辑</a>
|
||||
<Dropdown position={DropdownPosition.RightTop }>
|
||||
<DropdownClickTrigger>
|
||||
<div className="linkmore" style={{"padding-left":"2px",color:"#d8dbdd"}} onClick={(e)=>{
|
||||
}}> 更多 <Icon type={"down"} /> </div>
|
||||
</DropdownClickTrigger>
|
||||
<DropdownContent>
|
||||
|
||||
|
||||
</DropdownContent>
|
||||
</Dropdown>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export default class acclist extends React.Component{
|
|||
limit:10,
|
||||
tabList:[{title:"营销计划列表"}],
|
||||
distdata:[{title:'士大夫大师傅'}],
|
||||
filterList:[{id:0,label:"状态",menuList:[{id:0,name:"创建中"},{id:2,name:"审核中"},{id:3,name:"待生效"},{id:4,name:"进行中"},{id:5,name:"暂停中"},{id:6,name:"已完结"}]},
|
||||
filterList:[{id:0,label:"状态",menuList:[{id:999,name:"全部"},{id:0,name:"创建中"},{id:2,name:"审核中"},{id:3,name:"待生效"},{id:4,name:"进行中"},{id:5,name:"暂停中"},{id:6,name:"已完结"}]},
|
||||
],
|
||||
tableHeight:500,
|
||||
menuList:[{id:0,name:"状态",check:false}],
|
||||
|
@ -456,16 +456,23 @@ export default class acclist extends React.Component{
|
|||
this.setState({grantTotal,receiveTotal,usageTotal,silentTotal,receive_total,usage_total,silent_total});
|
||||
}
|
||||
onFilter(e){
|
||||
console.log(e)
|
||||
this.setState({page:1})
|
||||
this.setState({limit:10})
|
||||
this.setState({status:e})
|
||||
|
||||
let data = {
|
||||
page:1,
|
||||
limit:10,
|
||||
status:e,
|
||||
key_word:this.state.key_word
|
||||
}
|
||||
|
||||
if(e==999)
|
||||
{
|
||||
delete data.status;
|
||||
}
|
||||
else{
|
||||
this.setState({status:e})
|
||||
}
|
||||
this.getPlanList(data)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue