3 changed files with 425 additions and 0 deletions
@ -0,0 +1,83 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div class=""> |
||||
|
<el-row type="flex" > |
||||
|
<el-col :span="24"> |
||||
|
<span class="htgl_info_label">所属网格:</span> {{htglDetailData.gridName||'--'}} |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row type="flex" > |
||||
|
<el-col :span="24" style="display: flex;"> |
||||
|
<span class="htgl_info_label">话题内容:</span> <section style="flex:1">{{htglDetailData.topicContent||'--'}}</section> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row type="flex" > |
||||
|
<el-col :span="24" style="display: flex;"> |
||||
|
<span class="img_label">图片:</span> |
||||
|
<section v-for="(item,index) in htglDetailData.topicImages" :key="index" > |
||||
|
<img :src="item" alt="" width="150px" height="75px" style="margin-left:16px;" /> |
||||
|
</section> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row type="flex" > |
||||
|
<el-col :span="24"> |
||||
|
<span class="htgl_info_label">话题发表人:</span> {{htglDetailData.releaseUserName||'--'}} |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row type="flex" > |
||||
|
<el-col :span="24"> |
||||
|
<span class="htgl_info_label">发布时间:</span> {{htglDetailData.releaseTime||'--'}} |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row type="flex" > |
||||
|
<el-col :span="24"> |
||||
|
<span class="htgl_info_label">当前支持:</span>{{htglDetailData.supportCount||'--'}}票,反对: {{htglDetailData.oppositionCount||'--'}}票 |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return {}; |
||||
|
}, |
||||
|
props:{ |
||||
|
htglDetailData:{ |
||||
|
type:Object, |
||||
|
default:{} |
||||
|
}, |
||||
|
topicId:{ |
||||
|
type:String, |
||||
|
default:'' |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
methods: {}, |
||||
|
components: {}, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.img_label{ |
||||
|
display: inline-block; |
||||
|
height: 75px; |
||||
|
vertical-align: top; |
||||
|
width: 90px; |
||||
|
text-align: right; |
||||
|
margin-right: 6px; |
||||
|
} |
||||
|
.htgl_info_label{ |
||||
|
display: inline-block; |
||||
|
width: 90px; |
||||
|
text-align: right; |
||||
|
margin-right: 6px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,331 @@ |
|||||
|
<template> |
||||
|
<div class="div_main"> |
||||
|
<div class="div_search"> |
||||
|
<el-form |
||||
|
:inline="true" |
||||
|
:model="formData" |
||||
|
ref="ref_searchform" |
||||
|
:label-width="'100px'" |
||||
|
> |
||||
|
<div> |
||||
|
<el-form-item label="所属组织" prop="orgId" > |
||||
|
<el-cascader |
||||
|
class="item_width_2" |
||||
|
ref="myCascader" |
||||
|
size="small" |
||||
|
v-model="agencyIdArray" |
||||
|
:options="orgOptions" |
||||
|
:props="orgOptionProps" |
||||
|
:show-all-levels="false" |
||||
|
></el-cascader> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="话题内容" prop="topicContent"> |
||||
|
<el-input |
||||
|
class="item_width_2" |
||||
|
size="small" |
||||
|
v-model="formData.topicContent" |
||||
|
clearable |
||||
|
placeholder="请输入" |
||||
|
> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<el-form-item label="话题发表人" prop="userName"> |
||||
|
<el-input |
||||
|
class="item_width_2" |
||||
|
size="small" |
||||
|
v-model="formData.userName" |
||||
|
clearable |
||||
|
placeholder="请输入" |
||||
|
> |
||||
|
</el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="发布时间" prop="startTime"> |
||||
|
<el-date-picker v-model="formData.startDate" |
||||
|
class="item_width_2" |
||||
|
size="small" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
value="yyyy-MM-dd" |
||||
|
placeholder="开始时间"> |
||||
|
</el-date-picker> |
||||
|
<span class="data-tag">至</span> |
||||
|
<el-date-picker v-model="formData.endDate" |
||||
|
class="item_width_2 data-tag" |
||||
|
size="small" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
value="yyyy-MM-dd" |
||||
|
placeholder="结束时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-button |
||||
|
style="margin-left: 30px" |
||||
|
size="small" |
||||
|
class="diy-button--search" |
||||
|
@click="handleSearch" |
||||
|
>查询</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
style="margin-left: 10px" |
||||
|
size="small" |
||||
|
class="diy-button--reset" |
||||
|
@click="resetSearch" |
||||
|
>重置</el-button |
||||
|
> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
|
||||
|
<div class="div_table"> |
||||
|
<el-table |
||||
|
border |
||||
|
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
||||
|
class="table" |
||||
|
:data="tableData" |
||||
|
style="width: 100%" |
||||
|
:height="maxTableHeight" |
||||
|
> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="序号" |
||||
|
fixed="left" |
||||
|
type="index" |
||||
|
align="center" |
||||
|
width="50" |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="gridName" |
||||
|
align="center" |
||||
|
label="所属网格" |
||||
|
:show-overflow-tooltip="true" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="topicContent" |
||||
|
label="话题内容" |
||||
|
min-width="150" |
||||
|
align="center" |
||||
|
:show-overflow-tooltip="true" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="releaseUserName" |
||||
|
align="center" |
||||
|
min-width="150" |
||||
|
label="话题发表人" |
||||
|
:show-overflow-tooltip="true" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column |
||||
|
prop="releaseTime" |
||||
|
align="center" |
||||
|
width="180" |
||||
|
:show-overflow-tooltip="true" |
||||
|
label="发布时间" |
||||
|
> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column fixed="right" label="操作" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<!-- <el-button v-if="scope.row.issueStatus==='voting'&& agencyId===scope.row.orgId" |
||||
|
@click="handleDispose(scope.row)" |
||||
|
type="text" size="small" |
||||
|
class="div-table-button--edit">处理</el-button> --> |
||||
|
|
||||
|
<el-button @click="handleWatch(scope.row)" type="text" size="small" |
||||
|
>查看</el-button |
||||
|
> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<div> |
||||
|
<el-pagination |
||||
|
@size-change="handleSizeChange" |
||||
|
@current-change="handleCurrentChange" |
||||
|
:current-page.sync="pageNo" |
||||
|
:page-sizes="[20, 50, 100, 200]" |
||||
|
:page-size="parseInt(pageSize)" |
||||
|
layout="sizes, prev, pager, next, total" |
||||
|
:total="total" |
||||
|
> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</div> |
||||
|
<el-dialog |
||||
|
title="话题详情" |
||||
|
:visible.sync="dialogVisible" |
||||
|
width="60%" |
||||
|
> |
||||
|
<htgl-info |
||||
|
:htglDetailData="htglDetailData" |
||||
|
:topicId="topicId" |
||||
|
> |
||||
|
|
||||
|
</htgl-info> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from "vuex"; |
||||
|
import { requestPost } from "@/js/dai/request"; |
||||
|
import htglInfo from "./cpts/htglInfo.vue" |
||||
|
import axios from "axios"; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
orgOptions: [], |
||||
|
orgOptionProps: { |
||||
|
multiple: false, |
||||
|
value: 'agencyId', |
||||
|
label: 'agencyName', |
||||
|
children: 'subAgencyList', |
||||
|
checkStrictly: true |
||||
|
}, |
||||
|
formData: { |
||||
|
topicContent: '', |
||||
|
userName: '', |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
}, |
||||
|
topicId:'', |
||||
|
tableData:[], |
||||
|
dialogVisible:false, |
||||
|
agencyIdArray: [], |
||||
|
htglDetailData:{}, |
||||
|
pageNo: 1, |
||||
|
pageSize: window.localStorage.getItem("pageSize") || 20, |
||||
|
total: 1, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getTableData() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.getOrgTreeList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
async getOrgTreeList() { |
||||
|
const url = "/gov/org/customeragency/agencygridtree"; |
||||
|
|
||||
|
let params = { |
||||
|
agencyId: this.agencyId, |
||||
|
purpose: "query", |
||||
|
}; |
||||
|
|
||||
|
const { data, code, msg } = await requestPost(url, params); |
||||
|
|
||||
|
if (code === 0) { |
||||
|
this.orgOptions = []; |
||||
|
this.orgOptions.push(data); |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
handleSizeChange (val) { |
||||
|
|
||||
|
this.pageSize = val; |
||||
|
window.localStorage.setItem("pageSize", val); |
||||
|
this.getTableData(); |
||||
|
}, |
||||
|
handleCurrentChange (val) { |
||||
|
this.pageNo = val; |
||||
|
this.getTableData(); |
||||
|
}, |
||||
|
handleSearch (val) { |
||||
|
this.pageNo = 1; |
||||
|
this.getTableData(); |
||||
|
}, |
||||
|
|
||||
|
resetSearch () { |
||||
|
this.agencyIdArray = [] |
||||
|
this.formData = { |
||||
|
topicContent: '', |
||||
|
userName: '', |
||||
|
startDate: '', |
||||
|
endDate: '', |
||||
|
} |
||||
|
this.pageNo = 1 |
||||
|
}, |
||||
|
|
||||
|
async getTableData () { |
||||
|
const url = "/resi/group/ytTopic/topicList"; |
||||
|
var gridId = '' |
||||
|
const { pageSize, pageNo, formData } = this; |
||||
|
if(this.agencyIdArray.length ==1){ |
||||
|
gridId = this.agencyIdArray.join() |
||||
|
}else if(this.agencyIdArray.length ==2){ |
||||
|
gridId = this.agencyIdArray.splice(1).join() |
||||
|
}else if(this.agencyIdArray.length ==3){ |
||||
|
gridId = this.agencyIdArray.splice(2).join() |
||||
|
}else if(this.agencyIdArray.length ==4){ |
||||
|
gridId = this.agencyIdArray.splice(3).join() |
||||
|
}else{ |
||||
|
this.agencyIdArray = [] |
||||
|
} |
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
pageSize, |
||||
|
pageNo, |
||||
|
gridId, |
||||
|
source:'1', |
||||
|
...formData, |
||||
|
}); |
||||
|
if (code === 0) { |
||||
|
this.total = data.total || 0; |
||||
|
this.tableData = data.list |
||||
|
? data.list.map((item) => { |
||||
|
return item; |
||||
|
}) |
||||
|
: []; |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
async handleWatch (row) { |
||||
|
this.topicId = row.topicId |
||||
|
this.dialogVisible = true |
||||
|
const url = "/resi/group/ytTopic/topicDetail"; |
||||
|
const { data, code, msg } = await requestPost(url, { |
||||
|
topicId: this.topicId, |
||||
|
}); |
||||
|
if (code === 0) { |
||||
|
this.htglDetailData = { ...data }; |
||||
|
} else { |
||||
|
this.$message.error(msg); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
components: { |
||||
|
htglInfo |
||||
|
}, |
||||
|
computed: { |
||||
|
maxTableHeight () { |
||||
|
return this.$store.state.inIframe |
||||
|
? this.clientHeight - 360 + this.iframeHeigh |
||||
|
: this.clientHeight - 360; |
||||
|
}, |
||||
|
...mapGetters(["clientHeight", "iframeHeight"]), |
||||
|
}, |
||||
|
watch: {}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/assets/scss/buttonstyle.scss"; |
||||
|
@import "@/assets/scss/modules/management/list-main.scss"; |
||||
|
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
||||
|
::v-deep .el-row{ |
||||
|
margin-bottom: 16px; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue