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

页面修改

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