Commit 905b306f authored by jiaorz's avatar jiaorz

官网活动修改

parent db836313
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="城市"> <el-form-item label="城市">
<el-select class="filter-item" v-model="listQuery.addrCity" placeholder="请选择城市"> <el-select class="filter-item" v-model="listQuery.addrCity" placeholder="请选择城市" @change='getCityValue'>
<el-option v-for="item in cityRegions4Query" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in cityRegions4Query" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="城镇"> <el-form-item label="城镇">
<el-select class="filter-item" v-model="listQuery.addrTown" placeholder="请选择城市"> <el-select class="filter-item" v-model="listQuery.addrTown" placeholder="请选择城市">
<el-option v-for="item in cityRegions4Query" :key="item.id" :label="item.name" :value="item.id"></el-option> <el-option v-for="item in cityTown4Query" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
<el-button v-if="form.showTitle == '途径地编辑'" type="danger" @click="deleteHandler()">删除</el-button> <el-button v-if="form.showTitle == '目的地编辑'" type="danger" @click="deleteHandler()">删除</el-button>
<el-button type="primary" @click="okHandler('form')">确 定</el-button> <el-button type="primary" @click="okHandler('form')">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -258,6 +258,12 @@ ...@@ -258,6 +258,12 @@
} }
return getSonRegionByCodes(this.listQuery.addrProvince); return getSonRegionByCodes(this.listQuery.addrProvince);
}, },
cityTown4Query() {
if (!this.$utils.isInteger(this.listQuery.addrCity)) {
return null;
}
return getSonRegionByCodes(this.listQuery.addrCity);
},
}, },
methods: { methods: {
/** /**
...@@ -303,6 +309,9 @@ ...@@ -303,6 +309,9 @@
getValue(e){ getValue(e){
this.listQuery.addrCity = undefined; this.listQuery.addrCity = undefined;
}, },
getCityValue(e){
this.listQuery.addrTown = undefined
},
/** /**
* 确定 * 确定
* */ * */
...@@ -335,9 +344,10 @@ ...@@ -335,9 +344,10 @@
}); });
return; return;
} }
this.form.province = this.listQuery.addrProvince; console.log(this.listQuery)
this.form.city = this.listQuery.addrCity; this.form.provinceCode = this.listQuery.addrProvince;
this.form.town = this.listQuery.addrTown this.form.cityCode = this.listQuery.addrCity;
this.form.townCode = this.listQuery.addrTown
set[formName].validate(valid => { set[formName].validate(valid => {
if (valid) { if (valid) {
this.$emit(this.form.eventName, this.form); this.$emit(this.form.eventName, this.form);
...@@ -418,7 +428,7 @@ ...@@ -418,7 +428,7 @@
//地址描述(string)= //地址描述(string)=
// console.log(rs.address); //这里打印可以看到里面的详细地址信息,可以根据需求选择想要的 // console.log(rs.address); //这里打印可以看到里面的详细地址信息,可以根据需求选择想要的
// console.log(rs.addressComponents);//结构化的地址描述(object) // console.log(rs.addressComponents);//结构化的地址描述(object)
console.log(rs.addressComponents.province); //省 console.log(rs.addressComponents); //省
console.log(rs.addressComponents.city); //城市 console.log(rs.addressComponents.city); //城市
console.log(rs.addressComponents.district); //区县 console.log(rs.addressComponents.district); //区县
console.log(rs.addressComponents.street); //街道 console.log(rs.addressComponents.street); //街道
......
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
crtTime:undefined, crtTime:undefined,
actDesc:undefined, actDesc:undefined,
willNum:undefined, willNum:undefined,
location:undefined, location:0,
rank:undefined, rank:undefined,
type:undefined, type:undefined,
banner:undefined, banner:undefined,
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
addressStr:{ addressStr:{
type: 'string', type: 'string',
required: true, required: true,
message: '请输入营地地址', message: '请输入活动地址',
} }
}, },
checkList:[],//已选中的标签 checkList:[],//已选中的标签
...@@ -334,16 +334,16 @@ create(formName){ ...@@ -334,16 +334,16 @@ create(formName){
startTime: this.form.startTime,//客服电话 startTime: this.form.startTime,//客服电话
endTime: this.form.endTime,//联系电话 endTime: this.form.endTime,//联系电话
regCloseTime: this.form.regCloseTime,//省份 regCloseTime: this.form.regCloseTime,//省份
provinceCode: this.form.provinceCode,//省份名称 provinceCode: this.campsiteObj.province,//省份名称
province: this.form.province,//市编号 province: this.campsiteObj.provinceName,//市编号
cityName: this.form.cityName,//市名称 cityName: this.campsiteObj.cityName,//市名称
cityCode: this.form.cityCode,//详细地址 cityCode: this.campsiteObj.city,//详细地址
city:this.form.city, city:this.campsiteObj.cityName,
townCode:this.form.townCode, townCode:this.campsiteObj.townCode,
town:this.form.town, town:this.campsiteObj.town,
address:this.form.address, address:this.campsiteObj.address,
latitude: this.form.latitude, latitude: this.campsiteObj.latitude,
longitude: this.form.longitude, longitude: this.campsiteObj.longitude,
limitNum:this.form.limitNum, limitNum:this.form.limitNum,
isShow:this.form.isShow, isShow:this.form.isShow,
isOpenReg:this.form.isOpenReg, isOpenReg:this.form.isOpenReg,
...@@ -493,7 +493,7 @@ create(formName){ ...@@ -493,7 +493,7 @@ create(formName){
* */ * */
selectDestination(){ selectDestination(){
let that = this; let that = this;
this.campsiteObj.showTitle = "营地地址编辑"; this.campsiteObj.showTitle = "活动地址编辑";
this.campsiteObj.eventName ='campsiteEvent'; this.campsiteObj.eventName ='campsiteEvent';
this.campsiteObj.keyword = this.campsiteObj.address; this.campsiteObj.keyword = this.campsiteObj.address;
this.showCampsiteVisible = true; this.showCampsiteVisible = true;
......
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