Browse Source

Merge remote-tracking branch 'origin/dev_1114' into dev_1114

master
李鹏飞 6 years ago
parent
commit
2e81e2dd3c
  1. 90
      src/views/modules/group/group.vue
  2. 32
      src/views/modules/group/topic-detail.vue

90
src/views/modules/group/group.vue

@ -195,48 +195,66 @@ export default {
return row.groupCategory === '0' ? '党员群' : row.groupCategory === '1' ? '自建群' : '未知'
},
ban (id) {
this.postForm.state = 15
this.postForm.id = id
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.getDataList()
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500
})
this.$confirm('确定禁言社群?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.postForm.state = 15
this.postForm.id = id
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.getDataList()
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500
})
}).catch(() => { })
}).catch(() => { })
},
liftTheBan (id) {
this.postForm.state = 10
this.postForm.id = id
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.getDataList()
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500
})
this.$confirm('确定解禁社群?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.postForm.state = 10
this.postForm.id = id
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.getDataList()
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500
})
}).catch(() => { })
}).catch(() => { })
},
disband (id) {
this.postForm.state = 20
this.postForm.id = id
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.getDataList()
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500
})
this.$confirm('确定解散社群?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.postForm.state = 20
this.postForm.id = id
this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.getDataList()
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500
})
}).catch(() => { })
}).catch(() => { })
},
look (id) {

32
src/views/modules/group/topic-detail.vue

@ -14,10 +14,10 @@
@click="clickImg(url)">
</el-image>
</el-form-item>
<el-form-item label="地址:" prop="ownGrid">
<el-form-item label="所属网格:" prop="allDeptNames">
<div>{{dataForm.allDeptNames}}</div>
</el-form-item>
<el-form-item label="议题来源:" prop="createdTime">
<el-form-item label="话题来源:" prop="groupName">
<div>{{dataForm.groupName}}</div>
</el-form-item>
<el-form-item label="发言人:" prop="nickName">
@ -27,6 +27,10 @@
<el-button type="primary" @click="innerVisible = true">点击查看评论</el-button>
</el-form-item>
</el-form>
<div class="container">
<div class="location"><span style="font-weight: bold;color: #606266">上报位置:</span> {{dataForm.topicAddress}}</div>
<div id="map"></div>
</div>
</div>
<div style="width: 100%; text-align:center; float:left;">
<el-button size="medium" style="width: 95px" type="primary" @click="back">返回</el-button>
@ -60,6 +64,7 @@
</template>
<script>
import BMap from 'BMap'
import 'element-ui/lib/theme-chalk/timeline.css'
import 'element-ui/lib/theme-chalk/timeline-item.css'
import 'element-ui/lib/theme-chalk/image.css'
@ -70,6 +75,7 @@ export default {
dataForm: {
id: ''
},
previewImgList: [],
order: '',
orderField: '',
pageIndex: 1,
@ -86,6 +92,14 @@ export default {
back () {
this.$parent.selectComponent = 'TopicList'
},
initBmap (latitude, longitude) {
this.map = new BMap.Map('map')
const point = new BMap.Point(longitude, latitude)
var marker = new BMap.Marker(point)
this.map.addOverlay(marker)
this.map.centerAndZoom(point, 13)
this.map.enableScrollWheelZoom(true)
},
clickImg (url) {
this.previewImgList = []
this.previewImgList.push(url)
@ -109,6 +123,7 @@ export default {
...this.dataForm,
...res.data
}
this.initBmap(this.dataForm.topicLatitude, this.dataForm.topicLongitude)
}).catch(() => {})
},
pageSizeChangeHandleNew (val) {
@ -210,6 +225,19 @@ export default {
background: #fff;
}
}
.container {
width: 40%;
height: 100%;
float: right;
.location {
height: 30px;
line-height: 30px;
}
#map {
width: 100%;
height: calc(100% - 30px);
}
}
}
.project-progress {
width: 20%;

Loading…
Cancel
Save