更新
This commit is contained in:
姜棚 2021-11-27 18:07:24 +08:00
parent 599f08beef
commit 979b446480
4 changed files with 72 additions and 32 deletions

View File

@ -81,9 +81,11 @@ export default class add extends React.Component{
let temp=[] let temp=[]
for(let i = 0;i < this.state.keys.length;i++) for(let i = 0;i < this.state.keys.length;i++)
{ {
let data = null
let data = this.refs[this.state.keys[i]].submit(); if(this.refs[this.state.keys[i]])
{
data = this.refs[this.state.keys[i]].submit();
}
if(data) if(data)
{ {
temp.push(data) temp.push(data)
@ -94,7 +96,6 @@ export default class add extends React.Component{
return; return;
} }
} }
console.log("第二部过了")
let obj = { let obj = {
@ -106,8 +107,6 @@ export default class add extends React.Component{
await addPlanStep(plan_id,obj).then((res)=>{ await addPlanStep(plan_id,obj).then((res)=>{
handelResponse(res,(req,msg)=>{ handelResponse(res,(req,msg)=>{
this.setState({curstep:3}) this.setState({curstep:3})
console.log("第二部")
sessionStorage.setItem("step2", JSON.stringify(temp)) sessionStorage.setItem("step2", JSON.stringify(temp))
this.setState({card_visible:true}) this.setState({card_visible:true})
return; return;
@ -117,8 +116,6 @@ export default class add extends React.Component{
}) })
} }
console.log("第三部")
if(this.state.curstep == 3){ if(this.state.curstep == 3){
let data = this.refs.step3.submit(); let data = this.refs.step3.submit();
@ -180,9 +177,14 @@ export default class add extends React.Component{
closeStep(index){ closeStep(index){
delete this.state.keys[index]; // delete this.state.keys[index];
this.setState({keys:this.state.keys})
_.remove(this.state.keys, (n)=>{
return n == this.state.keys[index];
});
this.setState({keys:this.state.keys})
console.log(this.state.keys)
} }

View File

@ -568,7 +568,7 @@ onChangeCombinedDate(e){
ComponentHandler={(com,rowData)=>{ ComponentHandler={(com,rowData)=>{
if(com == "switch") if(com == "switch")
{ {
return <Switch size="small" checked={rowData.status==4?true:false} onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>; return <Switch size="small" checked={rowData.status==4?true:false} disabled={rowData.status >= 6 ? true :false } onChange={(e)=>{this.onSwitchChange(e,rowData)}}></Switch>;
} }
if(com == "status") if(com == "status")
@ -577,7 +577,21 @@ onChangeCombinedDate(e){
} }
if(com == "edit") if(com == "edit")
{ {
return <span>
let str2 = <span>
<a className="grid-link disabled" >编辑</a>
<Dropdown position={DropdownPosition.RightTop }>
<DropdownClickTrigger>
<div className="linkmore disabled"> 更多 <Icon type={"down"} /> </div>
</DropdownClickTrigger>
<DropdownContent>
</DropdownContent>
</Dropdown>
</span>
let str = <span>
<a className="grid-link" onClick={(e)=>{this.onEditRow(e,rowData)}} >编辑</a> <a className="grid-link" onClick={(e)=>{this.onEditRow(e,rowData)}} >编辑</a>
<Dropdown position={DropdownPosition.RightTop } > <Dropdown position={DropdownPosition.RightTop } >
<DropdownClickTrigger> <DropdownClickTrigger>
@ -594,6 +608,10 @@ onChangeCombinedDate(e){
</DropdownContent> </DropdownContent>
</Dropdown> </Dropdown>
</span> </span>
return rowData.status >= 6 ? str2 : str
} }
}} }}
/> />

View File

@ -12,5 +12,7 @@
color: #2B66F2; color: #2B66F2;
cursor: pointer; cursor: pointer;
} }
.linkmore.disabled ,.grid-link.disabled{
color: #000000;
}
} }

View File

@ -633,7 +633,11 @@ export default class acclist extends React.Component{
} }
if(com == "opearo") if(com == "opearo")
{ {
return <span>
let str = <span>
<a className="grid-link" onClick={(e)=>{this.onEdit(e,rowData)} } >编辑</a> <a className="grid-link" onClick={(e)=>{this.onEdit(e,rowData)} } >编辑</a>
<Dropdown position={DropdownPosition.RightTop }> <Dropdown position={DropdownPosition.RightTop }>
<DropdownClickTrigger> <DropdownClickTrigger>
@ -649,6 +653,20 @@ export default class acclist extends React.Component{
</DropdownContent> </DropdownContent>
</Dropdown> </Dropdown>
</span> </span>
let str2 = <span>
<a className="grid-link" >编辑</a>
<Dropdown position={DropdownPosition.RightTop }>
<DropdownClickTrigger>
<div className="linkmore"> 更多 <Icon type={"down"} /> </div>
</DropdownClickTrigger>
<DropdownContent>
</DropdownContent>
</Dropdown>
</span>
return str
} }
}} }}
/> />