|
@@ -164,28 +164,51 @@
|
|
|
return result;
|
|
|
},
|
|
|
async provinceChange(val) {
|
|
|
- this.citys = await this.findDept({ fid: val });
|
|
|
+ if(val != '' && val != null) {
|
|
|
+ this.citys = await this.findDept({ fid: val });
|
|
|
+ } else {
|
|
|
+ this.citys = [];
|
|
|
+ this.areas = [];
|
|
|
+ this.countys = [];
|
|
|
+ this.villages = [];
|
|
|
+ }
|
|
|
this.dept2 = '';
|
|
|
this.dept3 = '';
|
|
|
this.dept4 = '';
|
|
|
this.dept5 = '';
|
|
|
},
|
|
|
async cityChange(val) {
|
|
|
- this.areas = await this.findDept({ fid: val });
|
|
|
+ if(val != '' && val != null) {
|
|
|
+ this.areas = await this.findDept({ fid: val });
|
|
|
+ } else {
|
|
|
+ this.areas = [];
|
|
|
+ this.countys = [];
|
|
|
+ this.villages = [];
|
|
|
+ }
|
|
|
+
|
|
|
this.dept3 = '';
|
|
|
this.dept4 = '';
|
|
|
this.dept5 = '';
|
|
|
},
|
|
|
async areaChange(val) {
|
|
|
- this.countys = await this.findDept({ fid: val });
|
|
|
+ if(val != '' && val != null) {
|
|
|
+ this.countys = await this.findDept({ fid: val });
|
|
|
+ } else {
|
|
|
+ this.countys = [];
|
|
|
+ this.villages = [];
|
|
|
+ }
|
|
|
this.dept4 = '';
|
|
|
this.dept5 = '';
|
|
|
},
|
|
|
async countyChange(val) {
|
|
|
- this.villages = await this.findDept({ fid: val });
|
|
|
+ if(val != '' && val != null) {
|
|
|
+ this.villages = await this.findDept({ fid: val });
|
|
|
+ } else {
|
|
|
+ this.villages = [];
|
|
|
+ }
|
|
|
+
|
|
|
this.dept5 = '';
|
|
|
},
|
|
|
-
|
|
|
async loadDeptData(obj) {
|
|
|
const result = await visitDeptPage(obj, 'POST');
|
|
|
this.listData = result;
|