|
|
@@ -252,20 +252,22 @@ export default {
|
|
|
// 保证多选框东区和其他的多选框互斥
|
|
|
clickCheckbox(i) {
|
|
|
let list = this.checkedBoxList;
|
|
|
- let include = list.indexOf("东区");
|
|
|
- console.log(i, include);
|
|
|
- // if (i === 0) {
|
|
|
- // this.checkedBoxList = [];
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (include >= 0) {
|
|
|
- // this.checkedBoxList.splice(0, 1);
|
|
|
- // }
|
|
|
+ let include = list.indexOf("全区");
|
|
|
+ if (i === 0) {
|
|
|
+ this.checkedBoxList = [];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (include >= 0) {
|
|
|
+ this.checkedBoxList.splice(0, 1);
|
|
|
+ }
|
|
|
},
|
|
|
// 点击按区域添加button
|
|
|
addByArea: function () {
|
|
|
if (this.checkedBoxList.length !== 0) {
|
|
|
let strReq = this.checkedBoxList.join(",");
|
|
|
+ if (this.checkedBoxList[0] === '全区') {
|
|
|
+ strReq = ''
|
|
|
+ }
|
|
|
let req = {
|
|
|
localArea: strReq,
|
|
|
};
|
|
|
@@ -565,6 +567,7 @@ export default {
|
|
|
.then((res) => {
|
|
|
if (res.data && res.data.code === 200) {
|
|
|
this.areaList = res.data.data;
|
|
|
+ this.areaList.unshift('全区');
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
}
|