Commit 951dd423 authored by 罗超's avatar 罗超

地区管理优化

parent b47c16e1
......@@ -32,6 +32,9 @@
.flex {
display: flex;
}
.cover {
height: 30px;
}
</style>
<template>
<!--契约管理-->
......@@ -83,8 +86,7 @@
</el-table-column>
<el-table-column prop="ParentName" label="封面图" header-align="center" align="center">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.date }}</span>
<img class="cover" v-if="scope.row.ImageList && scope.row.ImageList.length" :src="scope.row.ImageList[0]" />
</template>
</el-table-column>
<el-table-column label="操作" header-align="center" align="center">
......@@ -183,7 +185,7 @@
</div>
</el-dialog>
<el-dialog title="选择目的地" :visible.sync="areaVisible" center width="600px">
<area-select @change="changeSelectArea"></area-select>
<area-select @change="changeSelectArea" ref="areaSelect"></area-select>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="addArea">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn" @click="areaVisible = false">{{$t('pub.cancelBtn')}}</button>
......@@ -389,7 +391,9 @@ import uploadImg from '../../pubComponents/uploadImg'
}],
DestinationList: [],
}
this.$refs.uploadImg.ImageList = []
this.$nextTick(() => {
this.$refs.uploadImg.ImageList = []
})
},
//新增、修改广告
submitForm(formName) {
......@@ -440,6 +444,7 @@ import uploadImg from '../../pubComponents/uploadImg'
clickArea(index, type) {
if (type) {
this.areaVisible = true
this.$refs.areaSelect.reset()
} else {
this.addMsg.DestinationList.splice(index, 1)
if(this.addMsg.Level === 2 && this.addMsg.DestinationList.length < 1) {
......
......@@ -12,12 +12,15 @@
:value="childItem.ID">
</el-option>
</el-select>
<el-select placeholder="市" filterable @change="emitChange(addMsg.City, 3)"
<el-select placeholder="市" filterable @change="GetSubAreaList(addMsg.City, 3)"
class='multiple_input w100' v-model="addMsg.City">
<el-option v-for="childItem in CityList" :key="childItem.ID" :label="childItem.Name"
:value="childItem.ID">
</el-option>
</el-select>
<el-select placeholder="区" class='multiple_input w100' v-model="addMsg.District" @change="emitChange(addMsg.District, 4)" filterable>
<el-option v-for="item in district" :key="item.ID" :label="item.Name" :value="item.ID"></el-option>
</el-select>
</div>
</template>
<style scoped>
......@@ -27,7 +30,12 @@
export default {
data() {
return {
addMsg: {},
addMsg: {
Country: '',
Province: '',
City: '',
District: '',
},
CountryList: [],
ProvinceList: [],
CityList: [],
......@@ -38,6 +46,17 @@ export default {
this.GetCounrty();
},
methods: {
reset() {
this.addMsg = {
Country: '',
Province: '',
City: '',
District: '',
}
this.ProvinceList = []
this.CityList = []
this.district = []
},
//获取国家
GetCounrty() {
this.apipost(
......@@ -80,8 +99,10 @@ export default {
info = this.CountryList.find(item => item.ID === ID)
} else if(type === 2) {
info = this.ProvinceList.find(item => item.ID === ID)
} else if(type === 3) {
info = this.CityList.find(item => item.ID === ID)
} else {
info= this.CityList.find(item => item.ID === ID)
info= this.district.find(item => item.ID === ID)
}
this.$emit('change', info)
}
......
......@@ -17,7 +17,9 @@
</div>
</div>
</div>
<div><div class="reimg-add">
</div>
<div class="add-img">
<div class="reimg-add">
<i class="iconfont icon-img_haha bigAdd"></i>
<div class="ad-one">
<div class="re-upload">
......@@ -29,7 +31,7 @@
<!-- 选择系统图片 -->
<!-- <div class="re-find" @click="addImgOpen"><i class="iconfont icon-img_cz"></i></div> -->
</div>
</div></div>
</div>
</div>
</div>
<!-- <el-upload class="upload-demo" :http-request="UploadImage" :multiple="false"
......
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