6f50fbae by zhangmeng

Merge branch 'dev' into dev-dev

2 parents 14ab21a2 2e2f1498
...@@ -578,7 +578,10 @@ function switchTabletype() { ...@@ -578,7 +578,10 @@ function switchTabletype() {
578 tableType.value = 0 578 tableType.value = 0
579 } 579 }
580 } 580 }
581 581 let hasPproperty=''
582 let hasPlevel=''
583 let hasAlmighty={}
584 let hasPpropertyLength=0
582 watch(projectIds, (newVal, oldVal) => { 585 watch(projectIds, (newVal, oldVal) => {
583 let currProject = {} 586 let currProject = {}
584 if (newVal.length > oldVal.length) { 587 if (newVal.length > oldVal.length) {
...@@ -592,31 +595,60 @@ watch(projectIds, (newVal, oldVal) => { ...@@ -592,31 +595,60 @@ watch(projectIds, (newVal, oldVal) => {
592 } 595 }
593 } 596 }
594 if(newVal.length>0){ 597 if(newVal.length>0){
595 console.log(currProject.pproperty,currProject.plevel) 598 hasPproperty=''
596 for(let pp of projectList.value){ 599 hasPlevel=''
597 if( 600 hasAlmighty={}
598 (currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))|| 601 hasPpropertyLength=0
599 (currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))|| 602 for(let hh of projectList.value){
600 (currProject.pproperty&&pp.plevel&&currProject.pproperty=='A'&&pp.plevel!='6')|| 603 if(projectIds.value.indexOf(hh.id)>-1&&hh.pproperty){
601 (currProject.pproperty&&pp.plevel&&currProject.pproperty=='B'&&(pp.plevel!='2'&&pp.plevel!='4'))|| 604 hasPproperty = hh.pproperty
602 (currProject.pproperty&&pp.plevel&&currProject.pproperty=='C'&&(pp.plevel!='2'&&pp.plevel!='4'))|| 605 hasPpropertyLength = hh.danceTypeDetailStr.split(',').length
603 (currProject.plevel&&pp.pproperty&&currProject.plevel=='6'&&pp.pproperty!='A')|| 606 }
604 (currProject.plevel&&pp.pproperty&&currProject.plevel=='4'&&(pp.pproperty!='B'&&pp.pproperty!='C'))|| 607 if(projectIds.value.indexOf(hh.id)>-1&&hh.plevel){
605 (currProject.plevel&&pp.pproperty&&currProject.plevel=='2'&&(pp.pproperty!='B'&&pp.pproperty!='C')) 608 hasPlevel = hh.plevel
606 ){ 609 }
607 console.log(pp.pproperty,pp.plevel) 610 if(projectIds.value.indexOf(hh.id)>-1&&hh.almightyFlag=='1'){
608 pp.disabled = true 611 hasAlmighty = hh
609 }else if((currProject.almightyFlag=='1'&&pp.almightyFlag=='1')&&(currProject.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)){
610 console.log(pp.name)
611 pp.disabled = true
612 }else {
613 pp.disabled = false
614 } 612 }
615 } 613 }
614 console.log(hasPproperty,hasPlevel,hasPpropertyLength)
615 filterProjectList(currProject)
616 } else { 616 } else {
617 resetProjectList() 617 resetProjectList()
618 } 618 }
619 }) 619 })
620
621 function filterProjectList(currProject){
622 for(let pp of projectList.value){
623 if(
624 (currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))
625 ||(currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))
626 ||(pp.pproperty==hasPproperty)&&(pp.danceTypeDetailStr.split(',').length<hasPpropertyLength)
627 ||(hasPproperty&&pp.pproperty&&pp.pproperty!=hasPproperty)
628 ||(hasPlevel&&pp.plevel&&pp.plevel!=hasPlevel)
629 ){
630 pp.disabled = true
631 } else if((hasAlmighty.almightyFlag=='1'&&pp.almightyFlag=='1')
632 &&(hasAlmighty.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)
633 ){
634 console.log(pp.name)
635 pp.disabled = true
636 }else {
637 pp.disabled = false
638 }
639 }
640 }
641 // function refilterProjectList() {
642 // let arr = [] //已选项目
643 // for(let p of projectList.value){
644 // if(projectIds.value.indexOf(p.id)>-1){
645 // arr.push(p)
646 // }
647 // }
648 // for(let a of arr){
649 // filterProjectList(a)
650 // }
651 // }
620 function resetProjectList(){ 652 function resetProjectList(){
621 for(var p of projectList.value){ 653 for(var p of projectList.value){
622 p.disabled = false 654 p.disabled = false
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!