36f11ab2 by 杨炀

no message

1 parent 4276d1ac
......@@ -578,7 +578,10 @@ function switchTabletype() {
tableType.value = 0
}
}
let hasPproperty=''
let hasPlevel=''
let hasAlmighty={}
let hasPpropertyLength=0
watch(projectIds, (newVal, oldVal) => {
let currProject = {}
if (newVal.length > oldVal.length) {
......@@ -592,31 +595,60 @@ watch(projectIds, (newVal, oldVal) => {
}
}
if(newVal.length>0){
console.log(currProject.pproperty,currProject.plevel)
for(let pp of projectList.value){
if(
(currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))||
(currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))||
(currProject.pproperty&&pp.plevel&&currProject.pproperty=='A'&&pp.plevel!='6')||
(currProject.pproperty&&pp.plevel&&currProject.pproperty=='B'&&(pp.plevel!='2'&&pp.plevel!='4'))||
(currProject.pproperty&&pp.plevel&&currProject.pproperty=='C'&&(pp.plevel!='2'&&pp.plevel!='4'))||
(currProject.plevel&&pp.pproperty&&currProject.plevel=='6'&&pp.pproperty!='A')||
(currProject.plevel&&pp.pproperty&&currProject.plevel=='4'&&(pp.pproperty!='B'&&pp.pproperty!='C'))||
(currProject.plevel&&pp.pproperty&&currProject.plevel=='2'&&(pp.pproperty!='B'&&pp.pproperty!='C'))
){
console.log(pp.pproperty,pp.plevel)
pp.disabled = true
}else if((currProject.almightyFlag=='1'&&pp.almightyFlag=='1')&&(currProject.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)){
console.log(pp.name)
pp.disabled = true
}else {
pp.disabled = false
hasPproperty=''
hasPlevel=''
hasAlmighty={}
hasPpropertyLength=0
for(let hh of projectList.value){
if(projectIds.value.indexOf(hh.id)>-1&&hh.pproperty){
hasPproperty = hh.pproperty
hasPpropertyLength = hh.danceTypeDetailStr.split(',').length
}
if(projectIds.value.indexOf(hh.id)>-1&&hh.plevel){
hasPlevel = hh.plevel
}
if(projectIds.value.indexOf(hh.id)>-1&&hh.almightyFlag=='1'){
hasAlmighty = hh
}
}
console.log(hasPproperty,hasPlevel,hasPpropertyLength)
filterProjectList(currProject)
} else {
resetProjectList()
}
})
function filterProjectList(currProject){
for(let pp of projectList.value){
if(
(currProject.pproperty&&pp.pproperty&&(pp.pproperty!=currProject.pproperty))
||(currProject.plevel&&pp.plevel&&(pp.plevel!=currProject.plevel))
||(pp.pproperty==hasPproperty)&&(pp.danceTypeDetailStr.split(',').length<hasPpropertyLength)
||(hasPproperty&&pp.pproperty&&pp.pproperty!=hasPproperty)
||(hasPlevel&&pp.plevel&&pp.plevel!=hasPlevel)
){
pp.disabled = true
} else if((hasAlmighty.almightyFlag=='1'&&pp.almightyFlag=='1')
&&(hasAlmighty.danceTypeDetailStr.split(',').length!=pp.danceTypeDetailStr.split(',').length)
){
console.log(pp.name)
pp.disabled = true
}else {
pp.disabled = false
}
}
}
// function refilterProjectList() {
// let arr = [] //已选项目
// for(let p of projectList.value){
// if(projectIds.value.indexOf(p.id)>-1){
// arr.push(p)
// }
// }
// for(let a of arr){
// filterProjectList(a)
// }
// }
function resetProjectList(){
for(var p of projectList.value){
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!