更新筛选菜单交互 key列表对应编辑状态禁用
This commit is contained in:
parent
20049bd5cb
commit
23fae21d84
|
@ -11,13 +11,26 @@ import Menu from "../menu/main.js"
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(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 = {
|
this.state = {
|
||||||
|
|
||||||
id:props.data.id,
|
id:props.data.id,
|
||||||
label:props.data.label,
|
label:props.data.label,
|
||||||
selectedMenu: props.data.menuList[0],
|
selectedMenu: props.data.menuList[0],
|
||||||
menuList:props.data.menuList,
|
menuList:menuList,
|
||||||
visible:true,
|
visible:true,
|
||||||
menuShow:true,
|
menuShow:true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import FilterSelect from "../filterSelect/main.js"
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
//数据源结构后面可能会变
|
//数据源结构后面可能会变
|
||||||
filterList:props.filterList,
|
filterList:props.filterList,
|
||||||
|
@ -36,7 +37,15 @@ import FilterSelect from "../filterSelect/main.js"
|
||||||
this.state.showItemList.forEach((item,index,arr) => {
|
this.state.showItemList.forEach((item,index,arr) => {
|
||||||
|
|
||||||
if(item.id === id){
|
if(item.id === id){
|
||||||
|
console.log("取消筛选")
|
||||||
|
console.log(this.state.filterList)
|
||||||
|
console.log()
|
||||||
|
|
||||||
|
this.props.onClose();
|
||||||
|
|
||||||
delete this.state.showItemList[index]
|
delete this.state.showItemList[index]
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.setState({showItemList:this.state.showItemList})
|
this.setState({showItemList:this.state.showItemList})
|
||||||
|
@ -58,6 +67,7 @@ import FilterSelect from "../filterSelect/main.js"
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.removeItem(e,id)
|
this.removeItem(e,id)
|
||||||
|
|
||||||
}
|
}
|
||||||
this.setState({showItemList:this.state.showItemList})
|
this.setState({showItemList:this.state.showItemList})
|
||||||
this.setState({menuShow:false})
|
this.setState({menuShow:false})
|
||||||
|
@ -72,6 +82,20 @@ import FilterSelect from "../filterSelect/main.js"
|
||||||
//隐藏菜单
|
//隐藏菜单
|
||||||
hideMenu (e,id) {
|
hideMenu (e,id) {
|
||||||
this.setState({menuShow:false})
|
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() {
|
render() {
|
||||||
|
@ -97,7 +121,7 @@ import FilterSelect from "../filterSelect/main.js"
|
||||||
multiple={true}
|
multiple={true}
|
||||||
visible={this.state.menuShow}
|
visible={this.state.menuShow}
|
||||||
tt={3}
|
tt={3}
|
||||||
onClose = {(e,id)=>{this.hideMenu(e,id)}}
|
onClose = {(e,id)=>{this.onClose(e,id)}}
|
||||||
>
|
>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,6 +39,9 @@ import React from 'react'
|
||||||
if(this.props.multiple)
|
if(this.props.multiple)
|
||||||
{
|
{
|
||||||
arr = this.state.data;
|
arr = this.state.data;
|
||||||
|
console.log("多选")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -671,6 +671,21 @@ onChangeCombinedDate(e){
|
||||||
</span>
|
</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,
|
limit:10,
|
||||||
tabList:[{title:"营销计划列表"}],
|
tabList:[{title:"营销计划列表"}],
|
||||||
distdata:[{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,
|
tableHeight:500,
|
||||||
menuList:[{id:0,name:"状态",check:false}],
|
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});
|
this.setState({grantTotal,receiveTotal,usageTotal,silentTotal,receive_total,usage_total,silent_total});
|
||||||
}
|
}
|
||||||
onFilter(e){
|
onFilter(e){
|
||||||
console.log(e)
|
|
||||||
this.setState({page:1})
|
this.setState({page:1})
|
||||||
this.setState({limit:10})
|
this.setState({limit:10})
|
||||||
this.setState({status:e})
|
|
||||||
let data = {
|
let data = {
|
||||||
page:1,
|
page:1,
|
||||||
limit:10,
|
limit:10,
|
||||||
status:e,
|
status:e,
|
||||||
key_word:this.state.key_word
|
key_word:this.state.key_word
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(e==999)
|
||||||
|
{
|
||||||
|
delete data.status;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.setState({status:e})
|
||||||
|
}
|
||||||
this.getPlanList(data)
|
this.getPlanList(data)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue