Commit 905b306f authored by jiaorz's avatar jiaorz

官网活动修改

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