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=''
599 hasPlevel=''
600 hasAlmighty={}
601 hasPpropertyLength=0
602 for(let hh of projectList.value){
603 if(projectIds.value.indexOf(hh.id)>-1&&hh.pproperty){
604 hasPproperty = hh.pproperty
605 hasPpropertyLength = hh.danceTypeDetailStr.split(',').length
606 }
607 if(projectIds.value.indexOf(hh.id)>-1&&hh.plevel){
608 hasPlevel = hh.plevel
609 }
610 if(projectIds.value.indexOf(hh.id)>-1&&hh.almightyFlag=='1'){
611 hasAlmighty = hh
612 }
613 }
614 console.log(hasPproperty,hasPlevel,hasPpropertyLength)
615 filterProjectList(currProject)
616 } else {
617 resetProjectList()
618 }
619 })
620
621 function filterProjectList(currProject){
596 for(let pp of projectList.value){ 622 for(let pp of projectList.value){
597 if( 623 if(
598 (currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))|| 624 (currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))
599 (currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))|| 625 ||(currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))
600 (currProject.pproperty&&pp.plevel&&currProject.pproperty=='A'&&pp.plevel!='6')|| 626 ||(pp.pproperty==hasPproperty)&&(pp.danceTypeDetailStr.split(',').length<hasPpropertyLength)
601 (currProject.pproperty&&pp.plevel&&currProject.pproperty=='B'&&(pp.plevel!='2'&&pp.plevel!='4'))|| 627 ||(hasPproperty&&pp.pproperty&&pp.pproperty!=hasPproperty)
602 (currProject.pproperty&&pp.plevel&&currProject.pproperty=='C'&&(pp.plevel!='2'&&pp.plevel!='4'))|| 628 ||(hasPlevel&&pp.plevel&&pp.plevel!=hasPlevel)
603 (currProject.plevel&&pp.pproperty&&currProject.plevel=='6'&&pp.pproperty!='A')||
604 (currProject.plevel&&pp.pproperty&&currProject.plevel=='4'&&(pp.pproperty!='B'&&pp.pproperty!='C'))||
605 (currProject.plevel&&pp.pproperty&&currProject.plevel=='2'&&(pp.pproperty!='B'&&pp.pproperty!='C'))
606 ){ 629 ){
607 console.log(pp.pproperty,pp.plevel)
608 pp.disabled = true 630 pp.disabled = true
609 }else if((currProject.almightyFlag=='1'&&pp.almightyFlag=='1')&&(currProject.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)){ 631 } else if((hasAlmighty.almightyFlag=='1'&&pp.almightyFlag=='1')
632 &&(hasAlmighty.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)
633 ){
610 console.log(pp.name) 634 console.log(pp.name)
611 pp.disabled = true 635 pp.disabled = true
612 }else { 636 }else {
613 pp.disabled = false 637 pp.disabled = false
614 } 638 }
615 } 639 }
616 } else { 640 }
617 resetProjectList() 641 // function refilterProjectList() {
618 } 642 // let arr = [] //已选项目
619 }) 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!