|
@@ -121,10 +121,6 @@ export default {
|
|
this.$watch('InformatioType', () =>{
|
|
this.$watch('InformatioType', () =>{
|
|
this.selectcheckboxGroup3.status = [];
|
|
this.selectcheckboxGroup3.status = [];
|
|
this.selectcheckboxGroup3.list = [];
|
|
this.selectcheckboxGroup3.list = [];
|
|
- this.Country = false;
|
|
|
|
- if(this.InformatioType[0] =='全部类型'){
|
|
|
|
- this.Country = true;
|
|
|
|
- }
|
|
|
|
this.groupData3.forEach( (v,i) =>{
|
|
this.groupData3.forEach( (v,i) =>{
|
|
if(!Array.isArray(this.selectcheckboxGroup3.list[i])){
|
|
if(!Array.isArray(this.selectcheckboxGroup3.list[i])){
|
|
this.selectcheckboxGroup3.list[i] = [];
|
|
this.selectcheckboxGroup3.list[i] = [];
|
|
@@ -141,30 +137,36 @@ export default {
|
|
this.selectcheckboxGroup3.status[i] = true
|
|
this.selectcheckboxGroup3.status[i] = true
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- let current = this.InformatioType.find(n =>n === v.title);
|
|
|
|
|
|
+
|
|
|
|
+ let current = this.InformatioType.find(n =>{
|
|
|
|
+ let reg = new RegExp(n);
|
|
|
|
+ console.log(reg,"ddddd")
|
|
|
|
+ if(v.title.match(reg)){
|
|
|
|
+ return n
|
|
|
|
+ }
|
|
|
|
+ });
|
|
if(current !== undefined){
|
|
if(current !== undefined){
|
|
this.selectcheckboxGroup3.list[i].push(current);
|
|
this.selectcheckboxGroup3.list[i].push(current);
|
|
this.selectcheckboxGroup3.status[i] = true;
|
|
this.selectcheckboxGroup3.status[i] = true;
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
|
|
this.checkboxGroup2 = this.boxData.buyerclass;
|
|
this.checkboxGroup2 = this.boxData.buyerclass;
|
|
console.log(this.checkboxGroup2);
|
|
console.log(this.checkboxGroup2);
|
|
- // scribeKey().then(res => {
|
|
|
|
- // res.data.data.map(v => {
|
|
|
|
- // let arr1 = [];
|
|
|
|
- // for(let i=0; i<v.a_key.length;i++) {
|
|
|
|
- // arr1.push(v.a_key[i].key)
|
|
|
|
- // }
|
|
|
|
- // this.groupData6.push({
|
|
|
|
- // s_item: v.s_item,
|
|
|
|
- // keys: String(arr1.join(",").replace(/,/g, "、"))
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
|
|
+ scribeKey().then(res => {
|
|
|
|
+ res.data.data.map(v => {
|
|
|
|
+ let arr1 = [];
|
|
|
|
+ for(let i=0; i<v.a_key.length;i++) {
|
|
|
|
+ arr1.push(v.a_key[i].key)
|
|
|
|
+ }
|
|
|
|
+ this.groupData6.push({
|
|
|
|
+ s_item: v.s_item,
|
|
|
|
+ keys: String(arr1.join(",").replace(/,/g, "、"))
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -192,13 +194,13 @@ export default {
|
|
if(this.digs ==3){
|
|
if(this.digs ==3){
|
|
let arr = '';
|
|
let arr = '';
|
|
if(this.Country){
|
|
if(this.Country){
|
|
|
|
+ arr = '全部类型'
|
|
|
|
+ }else{
|
|
this.selectcheckboxGroup3.list.forEach( v =>{
|
|
this.selectcheckboxGroup3.list.forEach( v =>{
|
|
if(v.length>0){
|
|
if(v.length>0){
|
|
arr += `${v.join('、')}、`
|
|
arr += `${v.join('、')}、`
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
- arr = '全部类型'
|
|
|
|
}
|
|
}
|
|
arr = arr.replace(/(.*)、/,'$1');
|
|
arr = arr.replace(/(.*)、/,'$1');
|
|
let newArr = arr.split('、');
|
|
let newArr = arr.split('、');
|
|
@@ -230,6 +232,13 @@ export default {
|
|
},
|
|
},
|
|
//信息类型全部选择
|
|
//信息类型全部选择
|
|
handleCheckAllChange(val,i){
|
|
handleCheckAllChange(val,i){
|
|
|
|
+ let newVal;
|
|
|
|
+ if(val.title == '招标预告'){
|
|
|
|
+ newVal = '预告'
|
|
|
|
+ }
|
|
|
|
+ if(val.title == '拟建项目'){
|
|
|
|
+ newVal = '拟建'
|
|
|
|
+ }
|
|
if(val.list){
|
|
if(val.list){
|
|
if(this.selectcheckboxGroup3.list[i].length == 0){
|
|
if(this.selectcheckboxGroup3.list[i].length == 0){
|
|
this.selectcheckboxGroup3.list.splice(i,1,val.list)
|
|
this.selectcheckboxGroup3.list.splice(i,1,val.list)
|
|
@@ -241,18 +250,31 @@ export default {
|
|
this.selectcheckboxGroup3.status.splice(i,1,status)
|
|
this.selectcheckboxGroup3.status.splice(i,1,status)
|
|
}else{
|
|
}else{
|
|
if(this.selectcheckboxGroup3.list[i].length == 0){
|
|
if(this.selectcheckboxGroup3.list[i].length == 0){
|
|
- this.selectcheckboxGroup3.list[i].push(val.title)
|
|
|
|
|
|
+ this.selectcheckboxGroup3.list[i].push(newVal)
|
|
}else{
|
|
}else{
|
|
this.selectcheckboxGroup3.list.splice(i,1,[])
|
|
this.selectcheckboxGroup3.list.splice(i,1,[])
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ this.computerAll();
|
|
},
|
|
},
|
|
//单个选择
|
|
//单个选择
|
|
handleCheckedCitiesChange(value,i) {
|
|
handleCheckedCitiesChange(value,i) {
|
|
let checkedCount = value.list.length;
|
|
let checkedCount = value.list.length;
|
|
let status = checkedCount === this.selectcheckboxGroup3.list[i].length;
|
|
let status = checkedCount === this.selectcheckboxGroup3.list[i].length;
|
|
- this.selectcheckboxGroup3.status.splice(i,1,status)
|
|
|
|
|
|
+ this.selectcheckboxGroup3.status.splice(i,1,status);
|
|
|
|
+ this.computerAll();
|
|
|
|
+ },
|
|
|
|
+ //计算是否是全选
|
|
|
|
+ computerAll(){
|
|
|
|
+ let nums = 0;
|
|
|
|
+ this.selectcheckboxGroup3.list.forEach(v =>{
|
|
|
|
+ nums += v.length;
|
|
|
|
+ })
|
|
|
|
+ if(nums == 0){
|
|
|
|
+ this.Country = true;
|
|
|
|
+ }else{
|
|
|
|
+ this.Country = false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|