Commit 7addb704 authored by zhengke's avatar zhengke

修改

parent c6e68c27
......@@ -699,21 +699,21 @@
</div>
</el-form-item>
<el-form-item :label="$t('system.table_country')">
<el-select :placeholder="$t('visaT.qxzguojia')" filterable v-model="addMsg.Country" class='multiple_input w300' @change="GetSubAreaList(addMsg.Country,1)">
<el-select :placeholder="$t('visaT.qxzguojia')" filterable v-model="addMsg.Country" class='multiple_input w300' @change="GetSubAreaList(addMsg.Country,1),addMsg.Province=0,addMsg.City=0,addMsg.District=0">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in CountryList" :key="childItem.ID" :label="childItem.Name" :value="childItem.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_province')">
<el-select :placeholder="$t('pub.pleaseSel')" filterable class='multiple_input w300' v-model="addMsg.Province" @change="GetSubAreaList(addMsg.Province,2)">
<el-select :placeholder="$t('pub.pleaseSel')" filterable class='multiple_input w300' v-model="addMsg.Province" @change="GetSubAreaList(addMsg.Province,2),addMsg.City=0,addMsg.District=0">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name" :value="childItem.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('hotel.hotel_city')">
<el-select :placeholder="$t('pub.pleaseSel')" filterable class='multiple_input w300' v-model="addMsg.City" @change="GetSubAreaList(addMsg.City,3)">
<el-select :placeholder="$t('pub.pleaseSel')" filterable class='multiple_input w300' v-model="addMsg.City" @change="GetSubAreaList(addMsg.City,3),addMsg.District=0">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name" :value="childItem.ID">
</el-option>
......@@ -1210,13 +1210,13 @@
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
if (this.addMsg.Country > 0) {
this.GetSubAreaList(this.addMsg.Country, 1, 1);
this.GetSubAreaList(this.addMsg.Country, 1);
}
if (this.addMsg.Province > 0) {
this.GetSubAreaList(this.addMsg.Province, 2, 1);
this.GetSubAreaList(this.addMsg.Province, 2);
}
if(this.addMsg.City > 0){
this.GetSubAreaList(this.addMsg.City, 3, 1);
this.GetSubAreaList(this.addMsg.City, 3);
}
if (this.addMsg.OpenPlatform != null) {
if (this.addMsg.OpenPlatform != "") {
......@@ -1369,25 +1369,10 @@
);
},
//获取省份和城市
GetSubAreaList(ID, type, isClear) {
GetSubAreaList(ID, type) {
let msg = {
Id: ID
};
if (type == 1) {
if (isClear != 1) {
this.addMsg.Province = 0;
this.addMsg.City = 0;
this.addMsg.District = 0;
}
} else if (type == 2) {
if (isClear != 1) {
this.addMsg.City = 0;
this.addMsg.District = 0;
}
}
else if (type == 3) {
this.addMsg.District = 0;
}
if (this.addMsg.Country != 0) {
this.apipost(
"dict_post_Destination_GetChildList",
......@@ -1395,8 +1380,11 @@
res => {
if (type == 1) {
this.ProvinceList = res.data.data;
this.CityList=[];
this.district=[];
} else if (type == 2) {
this.CityList = res.data.data;
this.district=[];
}else if (type == 3) {
this.district = res.data.data;
}
......
......@@ -716,7 +716,7 @@
<el-form-item label="国家">
<el-select placeholder="请选择国家" filterable v-model="addMsg.Country" class='multiple_input w300'
@change="GetSubAreaList(addMsg.Country,1)">
@change="GetSubAreaList(addMsg.Country,1),addMsg.Province=0,addMsg.City=0,addMsg.District=0">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in CountryList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
......@@ -725,7 +725,7 @@
</el-form-item>
<el-form-item label="省">
<el-select placeholder="请选择省" filterable class='multiple_input w300' v-model="addMsg.Province"
@change="GetSubAreaList(addMsg.Province,2)">
@change="GetSubAreaList(addMsg.Province,2),addMsg.City=0,addMsg.District=0">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
......@@ -733,7 +733,7 @@
</el-select>
</el-form-item>
<el-form-item label="市">
<el-select placeholder="请选择市" filterable @change="GetSubAreaList(addMsg.City,3)" class='multiple_input w300' v-model="addMsg.City">
<el-select placeholder="请选择市" filterable @change="GetSubAreaList(addMsg.City,3),addMsg.District=0" class='multiple_input w300' v-model="addMsg.City">
<el-option :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
......@@ -1229,13 +1229,13 @@
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
if (this.addMsg.Country > 0) {
this.GetSubAreaList(this.addMsg.Country, 1, 1);
this.GetSubAreaList(this.addMsg.Country, 1);
}
if (this.addMsg.Province > 0) {
this.GetSubAreaList(this.addMsg.Province, 2, 1);
this.GetSubAreaList(this.addMsg.Province, 2);
}
if(this.addMsg.City > 0){
this.GetSubAreaList(this.addMsg.City, 3, 1);
this.GetSubAreaList(this.addMsg.City, 3);
}
if (this.addMsg.OpenPlatform) {
this.OpenPlatformStrings = this.addMsg.OpenPlatform.split(",");
......@@ -1400,25 +1400,10 @@
);
},
//获取省份和城市
GetSubAreaList(ID, type, isClear) {
GetSubAreaList(ID, type) {
let msg = {
Id: ID
};
if (type == 1) {
if (isClear != 1) {
this.addMsg.Province = 0;
this.addMsg.City = 0;
this.addMsg.District = 0;
}
} else if (type == 2) {
if (isClear != 1) {
this.addMsg.City = 0;
this.addMsg.District = 0;
}
}
else if (type == 3) {
this.addMsg.District = 0;
}
if (this.addMsg.Country != 0) {
this.apipost(
"dict_post_Destination_GetChildList",
......@@ -1426,8 +1411,11 @@
res => {
if (type == 1) {
this.ProvinceList = res.data.data;
this.CityList=[];
this.district=[];
} else if (type == 2) {
this.CityList = res.data.data;
this.district=[];
}else if (type == 3) {
this.district = res.data.data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment