6 changed files with 350 additions and 55 deletions
@ -0,0 +1,247 @@ |
|||
<template> |
|||
<div style="margin-top:10px"> |
|||
<div v-if="pageType==='list'"> |
|||
<el-table :data="tableData" border class="m-table-item" style="width: 100%" |
|||
@selection-change="handleSelectionChange" height="500px"> |
|||
<el-table-column label="" fixed="left" type="selection" align="center" width="50" /> |
|||
<el-table-column prop="workOrderNum" align="center" label="工单编号" :show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="categoryAllName" label="事件类别" min-width="140" align="center" |
|||
:show-overflow-tooltip="true" /> |
|||
<el-table-column prop="eventContent" label="事件描述" align="center" :show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="name" label="报件人" align="center" :show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="mobile" align="center" width="110" label="联系电话"> |
|||
<!-- <template slot-scope="scope"> |
|||
<el-button |
|||
v-if="scope.row.reportUserId !== null && scope.row.reportUserId !== ''" |
|||
@click="handleLook(scope.row)" |
|||
type="text" |
|||
size="small" |
|||
> |
|||
{{ scope.row.phone }} |
|||
</el-button> |
|||
<span v-else> |
|||
{{ scope.row.phone }} |
|||
</span> |
|||
</template> --> |
|||
</el-table-column> |
|||
<el-table-column prop="statusName" align="center" width="110" label="指派状态" |
|||
:show-overflow-tooltip="true"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.status === 'unassigned'" style="color: #ff6600;">未指派</span> |
|||
<span v-else-if="scope.row.status === 'assigned'">已指派</span> |
|||
<span v-else-if="scope.row.operationType === '13'" style="color: #ff0000;">已退件</span> |
|||
<!-- <span v-else-if="scope.row.status ==='closed_case'">已办结</span> |
|||
<span v-else="scope.row.status ==='processing'">处理中</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="operationTypeName" align="center" width="110" label="办理状态" |
|||
:show-overflow-tooltip="true"> |
|||
<template slot-scope="scope"> |
|||
<span |
|||
:style="{ color: getFontColor(scope.row.operationType) }">{{ scope.row.operationTypeName }}</span> |
|||
|
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="operationStep" align="center" width="150" label="最新办理进展" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="deptName" align="center" width="110" label="指派部门" :show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="deptName" align="center" width="110" label="指派部门" :show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column prop="limitTime" align="center" width="110" label="办结时限(部门)" |
|||
:show-overflow-tooltip="true"> |
|||
</el-table-column> |
|||
<el-table-column fixed="right" label="操作" align="center" width="200px" prop="status"> |
|||
<template slot-scope="scope"> |
|||
<el-button @click="handleWatch(scope.row)" type="text" size="small" class="">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<div> |
|||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|||
:current-page.sync="pageNo" :page-sizes="[20, 30, 50]" :page-size="pageSize" |
|||
layout="sizes, prev, pager, next, total" :total="total"></el-pagination> |
|||
</div> |
|||
</div> |
|||
<div v-if="pageType==='info'" style="overflow-y: scroll;"> |
|||
<event-info style="overflow: scroll;" v-if="pageType==='info'" ref="eleEditForm" :pageType="pageType" :eventId="eventId" :eventDetailData="eventDetailData" |
|||
@handleClose="handleClose" @handleOk="handleOk" @dialogOk="handleEditSuccess" /> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
<script> |
|||
import eventInfo from "../../../shequzhili/event/cpts/event-info.vue"; |
|||
import { requestPost, requestGet } from "@/js/dai/request"; |
|||
import { completeList } from "@/js/columns/constants"; |
|||
export default { |
|||
//数据 |
|||
data() { |
|||
return { |
|||
eventId:"", |
|||
pageType:"list", |
|||
formData: { |
|||
agencyId:"", |
|||
gridId: "", |
|||
sourceType: "", |
|||
eventContent: "", |
|||
name: "", |
|||
mobile: "", |
|||
startTime: "", |
|||
endTime: "", |
|||
limitStartTime: "", |
|||
limitEndTime: "", |
|||
status: "", |
|||
firstIdList: [], |
|||
secondIdList: [], |
|||
workOrderNum: "", |
|||
departId:"", |
|||
content:"", |
|||
mobile:"" |
|||
}, |
|||
eventDetailData:"", |
|||
pageNo: 0, |
|||
pageSize:window.localStorage.getItem('pageSize') || 20, |
|||
total: 0, |
|||
tableData: [], |
|||
}; |
|||
}, |
|||
//创建前 |
|||
created() { }, |
|||
async mounted() { |
|||
await this.getTableData() |
|||
}, |
|||
//方法 |
|||
methods: { |
|||
handleClose() { |
|||
this.pageType = "list"; |
|||
this.eventId = ""; |
|||
this.getTableData(); |
|||
}, |
|||
|
|||
async handleWatch(row) { |
|||
console.log((row,"row")); |
|||
this.eventId = row.icEventId; |
|||
const url = "/governance/icEvent/detail"; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
icEventId: this.eventId, |
|||
}); |
|||
if (code === 0) { |
|||
this.eventDetailData = { ...data }; |
|||
this.pageType = "info"; |
|||
} else { |
|||
this.$message.error(msg); |
|||
} |
|||
}, |
|||
getFontColor(operationType){ |
|||
if(operationType=='11'){ |
|||
return '#09af44' |
|||
}else if(operationType=='13'){ |
|||
return '#FF0000' |
|||
}else{ |
|||
return '#000000' |
|||
} |
|||
}, |
|||
handleSelectionChange(val) { |
|||
this.multipleSelection = []; |
|||
val.forEach((element) => { |
|||
this.multipleSelection.push(element.icEventId); |
|||
}); |
|||
}, |
|||
handleSizeChange(val) { |
|||
this.pageSize = val; |
|||
this.getTableData(); |
|||
}, |
|||
handelClickDetail(row) { |
|||
this.$emit('handelClickDetail', row); |
|||
}, |
|||
handlClickEdit(row){ |
|||
this.$emit('handelClickEdit', row); |
|||
}, |
|||
handleCurrentChange(val) { |
|||
this.pageNo = val; |
|||
this.getTableData(); |
|||
}, |
|||
// 查看 |
|||
handleLook(row) { |
|||
let { name,reportUserId } = row |
|||
const resiId = reportUserId; |
|||
this.$store.dispatch('saveData', { name,resiId }); |
|||
this.$router.push({ name: 'jumin-huaxiang' }); |
|||
this.$store.state.contentTabs = this.$store.state.contentTabs.map(item => { |
|||
if (item.name === "jumin-huaxiang") { |
|||
return {...item, title: name }; |
|||
} |
|||
return item; |
|||
}); |
|||
}, |
|||
async getTableData() { |
|||
try { |
|||
const url = "/governance/dwdEvent/list"; |
|||
if(this.recId){ |
|||
this.formData.firstIdList = [this.recId]; |
|||
} |
|||
if(this.departId){ |
|||
this.formData.departId = this.departId; |
|||
} |
|||
if(this.communityId){ |
|||
this.formData.agencyId = this.communityId; |
|||
} |
|||
if(this.address){ |
|||
this.formData.eventContent = this.address; |
|||
} |
|||
if(this.mobile){ |
|||
this.formData.mobile = this.mobile; |
|||
} |
|||
const { pageSize, pageNo, formData } = this; |
|||
const { data, code, msg } = await requestPost(url, { |
|||
pageSize, |
|||
pageNo, |
|||
...formData, |
|||
}); |
|||
if (code == 0) { |
|||
this.tableData = data.list; |
|||
this.total = data.total; |
|||
} else { |
|||
console.log(err); |
|||
} |
|||
} catch (err) { |
|||
console.log(err); |
|||
} |
|||
}, |
|||
}, |
|||
//子组件注册 |
|||
components: {eventInfo}, |
|||
//计算 |
|||
computed: {}, |
|||
props: { |
|||
recId:{ |
|||
type:String, |
|||
default:'' |
|||
}, |
|||
communityId:{ |
|||
type:String, |
|||
default:'' |
|||
}, |
|||
address:{ |
|||
type:String, |
|||
default:'' |
|||
}, |
|||
mobile:{ |
|||
type:String, |
|||
default:'' |
|||
}, |
|||
departId:{ |
|||
type:String, |
|||
default:'' |
|||
} |
|||
}, |
|||
//监听 |
|||
watch: {}, |
|||
} |
|||
</script> |
|||
<style lang="scss"></style> |
|||
Loading…
Reference in new issue