Commit 4c619660 authored by zhengke's avatar zhengke

修改

parent 3ebcfff5
...@@ -251,12 +251,28 @@ ...@@ -251,12 +251,28 @@
</el-input> </el-input>
</span> </span>
</li> </li>
<li>
<span>
<em>{{$t('system.quety_area')}}</em>
<el-select v-model="msg.CountryId" clearable class="w150" filterable
@change="getProvinceList(msg.CountryId,1)" :placeholder="$t('hotel.hotel_country')">
<el-option v-for="item in countryList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
<el-select v-model="msg.ProviceId" class="w150" filterable @change="getProvinceList(msg.ProviceId,2)"
: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-option v-for="item in cityList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</span>
</li>
<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>
...@@ -269,6 +285,15 @@ ...@@ -269,6 +285,15 @@
<th width="150"> <th width="150">
名称 名称
</th> </th>
<th>
国家名称
</th>
<th>
省份名称
</th>
<th>
城市名称
</th>
<th width="150"> <th width="150">
封面 封面
</th> </th>
...@@ -289,6 +314,15 @@ ...@@ -289,6 +314,15 @@
<td> <td>
{{item.Name}} {{item.Name}}
</td> </td>
<td>
{{item.CountryName}}
</td>
<td>
{{item.ProviceName}}
</td>
<td>
{{item.CityName}}
</td>
<td> <td>
<img :src="item.ImgCover" style="width:50px;height:30px"/> <img :src="item.ImgCover" style="width:50px;height:30px"/>
</td> </td>
...@@ -309,7 +343,7 @@ ...@@ -309,7 +343,7 @@
</td> </td>
</tr> </tr>
<tr v-if="!(DataList && DataList.length>0)"> <tr v-if="!(DataList && DataList.length>0)">
<td colspan="6"> <td colspan="9">
暂无数据... 暂无数据...
</td> </td>
</tr> </tr>
...@@ -340,6 +374,25 @@ ...@@ -340,6 +374,25 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="国家">
<el-select v-model="addMsg.CountryId" clearable class="w217" filterable
@change="getProvinceListTwo(addMsg.CountryId,1)" :placeholder="$t('hotel.hotel_country')">
<el-option v-for="item in countryList" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item>
<el-form-item label="省">
<el-select v-model="addMsg.ProviceId" class="w217" filterable @change="getProvinceListTwo(addMsg.ProviceId,2)"
:placeholder="$t('hotel.hotel_province')">
<el-option v-for="item in provinceList2" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</el-form-item>
<el-form-item label="市">
<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>
<el-form-item label="攻略内容" prop="lotteryRules"> <el-form-item label="攻略内容" prop="lotteryRules">
<quill-editor class="w595" :options="editorOption" v-model="addMsg.Content"></quill-editor> <quill-editor class="w595" :options="editorOption" v-model="addMsg.Content"></quill-editor>
</el-form-item> </el-form-item>
...@@ -360,21 +413,24 @@ ...@@ -360,21 +413,24 @@
export default { export default {
data() { data() {
return { return {
countryList: "",
provinceList: "",
cityList: "",
DataList: "", DataList: "",
noData: false, noData: false,
loading: true, loading: true,
outerVisible: false, outerVisible: false,
defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"', defaultImg: 'this.src="' + require("../../assets/img/bg_z1@2x.png") + '"',
countryList: [],
provinceList: [],
cityList: [],
provinceList2:[],
cityList2: [],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 14, pageSize: 14,
Name: "", Name: "",
QCountry: 0, CountryId: 651,
QProvince: 0, ProviceId: '',
QCity: 0, CityId: '',
total: 0, total: 0,
currentPage: 1, currentPage: 1,
Id: 0 Id: 0
...@@ -383,7 +439,10 @@ ...@@ -383,7 +439,10 @@
Id: 0, Id: 0,
Name: '', Name: '',
ImgCover: '', ImgCover: '',
Content: '' Content: '',
CountryId:0,
ProviceId:0,
CityId:0
}, },
editorOption: { editorOption: {
modules: { modules: {
...@@ -548,9 +607,73 @@ ...@@ -548,9 +607,73 @@
null null
); );
}, },
//获取国家
getCountryList() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
this.countryList = res.data.data;
},
err => {}
);
},
getProvinceList(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.msg.ProviceId = "";
this.msg.CityId = "";
} else if (type == 2) {
this.msg.CityId = "";
}
if (this.msg.CountryId !== "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
}
},
err => {}
);
}
},
getProvinceListTwo(ID, type){
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.addMsg.ProviceId = "";
this.addMsg.CityId = "";
} else if (type == 2) {
this.addMsg.CityId = "";
}
if (this.addMsg.CountryId !== "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList2 = res.data.data;
} else if (type == 2) {
this.cityList2 = res.data.data;
console.log(this.cityList2,'this.cityList2');
}
},
err => {}
);
}
}
}, },
mounted() { mounted() {
//this.getCountryList(); this.getCountryList();
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