Commit 7addb704 authored by zhengke's avatar zhengke

修改

parent c6e68c27
...@@ -699,21 +699,21 @@ ...@@ -699,21 +699,21 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system.table_country')"> <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 :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 v-for="childItem in CountryList" :key="childItem.ID" :label="childItem.Name" :value="childItem.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_province')"> <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 :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 v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name" :value="childItem.ID">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_city')"> <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 :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 v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name" :value="childItem.ID">
</el-option> </el-option>
...@@ -1210,13 +1210,13 @@ ...@@ -1210,13 +1210,13 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (this.addMsg.Country > 0) { if (this.addMsg.Country > 0) {
this.GetSubAreaList(this.addMsg.Country, 1, 1); this.GetSubAreaList(this.addMsg.Country, 1);
} }
if (this.addMsg.Province > 0) { if (this.addMsg.Province > 0) {
this.GetSubAreaList(this.addMsg.Province, 2, 1); this.GetSubAreaList(this.addMsg.Province, 2);
} }
if(this.addMsg.City > 0){ 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 != null) {
if (this.addMsg.OpenPlatform != "") { if (this.addMsg.OpenPlatform != "") {
...@@ -1369,25 +1369,10 @@ ...@@ -1369,25 +1369,10 @@
); );
}, },
//获取省份和城市 //获取省份和城市
GetSubAreaList(ID, type, isClear) { GetSubAreaList(ID, type) {
let msg = { let msg = {
Id: ID 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) { if (this.addMsg.Country != 0) {
this.apipost( this.apipost(
"dict_post_Destination_GetChildList", "dict_post_Destination_GetChildList",
...@@ -1395,8 +1380,11 @@ ...@@ -1395,8 +1380,11 @@
res => { res => {
if (type == 1) { if (type == 1) {
this.ProvinceList = res.data.data; this.ProvinceList = res.data.data;
this.CityList=[];
this.district=[];
} else if (type == 2) { } else if (type == 2) {
this.CityList = res.data.data; this.CityList = res.data.data;
this.district=[];
}else if (type == 3) { }else if (type == 3) {
this.district = res.data.data; this.district = res.data.data;
} }
......
...@@ -716,7 +716,7 @@ ...@@ -716,7 +716,7 @@
<el-form-item label="国家"> <el-form-item label="国家">
<el-select placeholder="请选择国家" filterable v-model="addMsg.Country" class='multiple_input w300' <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 :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in CountryList" :key="childItem.ID" :label="childItem.Name" <el-option v-for="childItem in CountryList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID"> :value="childItem.ID">
...@@ -725,7 +725,7 @@ ...@@ -725,7 +725,7 @@
</el-form-item> </el-form-item>
<el-form-item label="省"> <el-form-item label="省">
<el-select placeholder="请选择省" filterable class='multiple_input w300' v-model="addMsg.Province" <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 :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name" <el-option v-for="childItem in ProvinceList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID"> :value="childItem.ID">
...@@ -733,7 +733,7 @@ ...@@ -733,7 +733,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="市"> <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 :label="$t('pub.unlimitedSel')" :value='SelectDefaultValue'></el-option>
<el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name" <el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID"> :value="childItem.ID">
...@@ -1229,13 +1229,13 @@ ...@@ -1229,13 +1229,13 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (this.addMsg.Country > 0) { if (this.addMsg.Country > 0) {
this.GetSubAreaList(this.addMsg.Country, 1, 1); this.GetSubAreaList(this.addMsg.Country, 1);
} }
if (this.addMsg.Province > 0) { if (this.addMsg.Province > 0) {
this.GetSubAreaList(this.addMsg.Province, 2, 1); this.GetSubAreaList(this.addMsg.Province, 2);
} }
if(this.addMsg.City > 0){ if(this.addMsg.City > 0){
this.GetSubAreaList(this.addMsg.City, 3, 1); this.GetSubAreaList(this.addMsg.City, 3);
} }
if (this.addMsg.OpenPlatform) { if (this.addMsg.OpenPlatform) {
this.OpenPlatformStrings = this.addMsg.OpenPlatform.split(","); this.OpenPlatformStrings = this.addMsg.OpenPlatform.split(",");
...@@ -1400,25 +1400,10 @@ ...@@ -1400,25 +1400,10 @@
); );
}, },
//获取省份和城市 //获取省份和城市
GetSubAreaList(ID, type, isClear) { GetSubAreaList(ID, type) {
let msg = { let msg = {
Id: ID 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) { if (this.addMsg.Country != 0) {
this.apipost( this.apipost(
"dict_post_Destination_GetChildList", "dict_post_Destination_GetChildList",
...@@ -1426,8 +1411,11 @@ ...@@ -1426,8 +1411,11 @@
res => { res => {
if (type == 1) { if (type == 1) {
this.ProvinceList = res.data.data; this.ProvinceList = res.data.data;
this.CityList=[];
this.district=[];
} else if (type == 2) { } else if (type == 2) {
this.CityList = res.data.data; this.CityList = res.data.data;
this.district=[];
}else if (type == 3) { }else if (type == 3) {
this.district = res.data.data; 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