diff --git a/src/components/filterSelect/main.js b/src/components/filterSelect/main.js index 44eea430..042b9e71 100644 --- a/src/components/filterSelect/main.js +++ b/src/components/filterSelect/main.js @@ -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, } diff --git a/src/components/filterbar/main.js b/src/components/filterbar/main.js index c554f0dd..2b961978 100644 --- a/src/components/filterbar/main.js +++ b/src/components/filterbar/main.js @@ -9,6 +9,7 @@ import FilterSelect from "../filterSelect/main.js" export default class filterbar extends React.Component { constructor(props) { super(props); + this.state = { //数据源结构后面可能会变 @@ -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)}} > diff --git a/src/components/menu/main.js b/src/components/menu/main.js index 3a5cc7cb..59ea9950 100644 --- a/src/components/menu/main.js +++ b/src/components/menu/main.js @@ -39,6 +39,9 @@ import React from 'react' if(this.props.multiple) { arr = this.state.data; + console.log("多选") + + } else { diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index 9f798aab..0975cd4a 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -671,6 +671,21 @@ onChangeCombinedDate(e){ + if(rowData.status >= 6 ) + { + str2 =
编辑 + + +
{ + }}> 更多
+
+ + + + +
+
+ } diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 6e89264c..cc7afb37 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -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) }