Commit 09e27d12 authored by 黄奎's avatar 黄奎

页面修改

parent 4c619660
......@@ -262,8 +262,7 @@
:placeholder="$t('hotel.hotel_province')">
<el-option v-for="item in provinceList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.CityId" class="w150" filterable
:placeholder="$t('hotel.hotel_city')">
<el-select v-model="msg.CityId" class="w150" filterable :placeholder="$t('hotel.hotel_city')">
<el-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
......@@ -271,8 +270,7 @@
<li>
<button class="hollowFixedBtn" type="button"
@click="resetPageIndex(),getList()">{{$t('pub.searchBtn')}}</button>
<button class="normalBtn" type="button"
@click="outerVisible=true,initMsg()">{{$t('pub.addBtn')}}</button>
<button class="normalBtn" type="button" @click="outerVisible=true,initMsg()">{{$t('pub.addBtn')}}</button>
</li>
</ul>
</div>
......@@ -324,7 +322,7 @@
{{item.CityName}}
</td>
<td>
<img :src="item.ImgCover" style="width:50px;height:30px"/>
<img :src="item.ImgCover" style="width:50px;height:30px" />
</td>
<td>
{{item.UpdateName}}
......@@ -387,8 +385,7 @@
</el-select>
</el-form-item>
<el-form-item label="市">
<el-select v-model="addMsg.CityId" class="w217" filterable
:placeholder="$t('hotel.hotel_city')">
<el-select v-model="addMsg.CityId" class="w217" filterable :placeholder="$t('hotel.hotel_city')">
<el-option v-for="item in cityList2" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item>
......@@ -398,10 +395,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<button
class="hollowFixedBtn"
@click="outerVisible = false"
>{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="outerVisible = false">{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="normalBtn" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
......@@ -422,27 +416,27 @@
provinceList: [],
cityList: [],
provinceList2:[],
provinceList2: [],
cityList2: [],
msg: {
pageIndex: 1,
pageSize: 14,
Name: "",
CountryId: 651,
ProviceId: '',
CityId: '',
ProviceId: 0,
CityId: 0,
total: 0,
currentPage: 1,
Id: 0
},
addMsg: {
Id: 0,
Name: '',
ImgCover: '',
Content: '',
CountryId:0,
ProviceId:0,
CityId:0
Name: 0,
ImgCover: "",
Content: "",
CountryId: 0,
ProviceId: 0,
CityId: 0
},
editorOption: {
modules: {
......@@ -501,7 +495,7 @@
this.msg.total = res.data.data.count;
this.noData = !this.msg.total > 0;
this.DataList = res.data.data.pageData;
this.outerVisible=false;
this.outerVisible = false;
}
},
null
......@@ -550,13 +544,14 @@
this.initMsg()
},
//初始化
initMsg(){
this.addMsg = {
Id:0,
Name:'',
ImgCover:'',
Content:''
};
initMsg() {
this.addMsg.Id = 0;
this.addMsg.Name = "";
this.addMsg.ImgCover = "";
this.addMsg.Content = "";
this.addMsg.CountryId = 0;
this.addMsg.ProviceId = 0;
this.addMsg.CityId = 0;
},
submitForm(addMsg) {
//提交创建、修改表单
......@@ -578,10 +573,7 @@
this.Success(res.data.message);
this.getList();
this.outerVisible = false;
this.addMsg.Id = 0;
this.addMsg.Name = "";
this.addMsg.ImgCover = "";
this.addMsg.Content = "";
this.initMsg();
} else {
this.Error(res.data.message);
}
......@@ -601,6 +593,9 @@
this.addMsg.Name = res.data.data.Name;
this.addMsg.ImgCover = res.data.data.ImgCover;
this.addMsg.Content = res.data.data.Content;
this.addMsg.CountryId = res.data.data.CountryId;
this.addMsg.ProviceId = res.data.data.ProviceId;
this.addMsg.CityId = res.data.data.CityId;
this.outerVisible = true;
}
},
......@@ -643,16 +638,16 @@
);
}
},
getProvinceListTwo(ID, type){
//根据省份获取城市
getProvinceListTwo(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.addMsg.ProviceId = "";
this.addMsg.CityId = "";
this.addMsg.ProviceId = "0";
this.addMsg.CityId = "0";
} else if (type == 2) {
this.addMsg.CityId = "";
this.addMsg.CityId = "0";
}
if (this.addMsg.CountryId !== "") {
this.apipost(
......@@ -663,7 +658,6 @@
this.provinceList2 = res.data.data;
} else if (type == 2) {
this.cityList2 = res.data.data;
console.log(this.cityList2,'this.cityList2');
}
},
err => {}
......@@ -673,7 +667,7 @@
},
mounted() {
this.getCountryList();
this.getProvinceList(651,1);
this.getProvinceList(651, 1);
},
created() {
if (this.$route.query.hasOwnProperty("cache")) {
......
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