Browse Source

事件处理分析

shibei_master
jiangyy 3 years ago
parent
commit
48c5cf3abb
  1. 395
      src/views/modules/visual/communityGovern/shijianchuli/event-info.vue
  2. 2
      src/views/modules/visual/communityGovern/shijianchuli/pieOption.js
  3. 185
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue

395
src/views/modules/visual/communityGovern/shijianchuli/event-info.vue

@ -0,0 +1,395 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>详情</span>
</div>
<div class="btn-close"
@click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="m-top">
<div class="m-info">
<div class="info-prop">
<span>所属网格</span>
<span>{{ eventInfo.gridName }}</span>
</div>
<div class="info-prop">
<span>上报时间</span>
<span>{{ eventInfo.reportTime }}</span>
</div>
<div class="info-prop">
<span>事件内容</span>
<span>{{ eventInfo.eventContent || "--" }}</span>
</div>
<div class="info-prop">
<span>音频</span>
<!-- <span>{{ eventInfo.departmentNameList.join("、") }}</span> -->
</div>
<div class="info-prop">
<span>反映渠道</span>
<span>{{ eventInfo.sourceTypeName || "--" }}</span>
</div>
<div class="info-prop">
<span>地址</span>
<span>{{ eventInfo.address || "--" }}</span>
</div>
<div class="info-prop">
<span>报事人</span>
<span>{{ eventInfo.reporterName || "--" }}</span>
</div>
<div class="info-prop">
<span>手机号</span>
<span>{{ eventInfo.reporterMobile || "--" }}</span>
</div>
<div class="info-prop">
<span>身份证号</span>
<span>{{ eventInfo.reporterIdCard || "--" }}</span>
</div>
</div>
<div class="m-process"
v-if="eventProcess.length > 0">
<div class="process-title">处理进展</div>
<div class="list">
<div class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in eventProcess">
<div class="item-row">
<div class="name">{{ item.serviceShowName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.wantServiceTime }}</div>
</div>
<!-- <div class="detail"
v-if="item.processName != '转项目' && item.wantServiceTime">
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.wantServiceTime }}</fold-text>
</div>
</div> -->
<div class="detail"
v-if="item.processName != '转项目' && item.internalRemark">
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{ item.internalRemark }}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a :href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile">
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tabs">
<div class="tab"
:class="groupIndex % groupList.length == index ? 'z-on' : ''"
:key="'tab' + index"
@click="groupIndex = index"
v-for="(item, index) in groupList">
{{ item.label }}
</div>
</div>
<div class="m-case">
<div class="m-yanpan">
<div v-if="eventId || true">
<screen-loading v-if="!yanPan.loading">加载中</screen-loading>
<analyse v-else-if="yanPan.singleTitle"
:singleTitle="yanPan.singleTitle"
:userList="yanPan.dependents"
:userName="yanPan.reportorName"
:singleList="yanPan.singleList"
:hasEvent="yanPan.hasEvent"
@user="toUserInfo"
@project="toProjectInfo" />
<div v-else
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import lineChart from "@/views/modules/visual/cpts/line-chart";
import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
groupList: [{ label: "研判分析" }],
groupIndex: 0,
startGroupIndex: 0,
eventProcess: [],
eventInfo: {
gridId: "",
gridName: '',
reportTime: [],
eventContent: "",
imageUrls: [],
voiceUrls: [],
sourceType: '',
address: '',
reportUserId: "",
reporterName: "",
reporterMobile: "",
reporterIdCard: "",
},
yanPan: {
loading: false,
reportorName: "",
dependents: [],
categoryId: '',
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
hasEvent: false,
singleTitle: "",
singleList: [], //
},
};
}
export default {
name: "demandInfo",
props: {
eventId: {
type: String,
default: "",
},
},
components: {
cptCard,
cptTb,
analyse,
screenLoading,
lineChart,
foldText,
},
data: iniData,
computed: {},
watch: {
eventId () {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
// eventId () {
// },
},
mounted () {
console.log(this.eventId);
this.getApiData();
},
methods: {
watchImg (src) {
window.open(src);
},
handleClose () {
this.$emit("close");
},
async getApiData () {
await this.getEventInfo();
this.getEventProcess();
await this.getYanPan();
await this.getYanPanList();
this.yanPan.loading = true;
},
//
async getEventInfo () {
// const url = "/gov/project/icEvent/processAnalysis/eventDetail/"+ this.eventId;
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/eventDetail/" + this.eventId;
const { data, code, msg } = await requestPost(url, {
eventId: this.eventId,
});
if (code === 0) {
this.eventInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getEventProcess () {
// const url = "/gov/project/icEvent/processAnalysis/processes/" + this.eventId;
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/processes/" + this.eventId;
const { data, code, msg } = await requestPost(url, {
eventId: this.eventId,
});
if (code === 0) {
this.eventProcess = data.map((item) => {
item.operateTime = dateFormat(
new Date(item.operateTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
//
async getYanPan () {
// const url = "/gov/project/icEvent/processAnalysis/analysis/" + this.eventId;
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/analysis/" + this.eventId;
let param = {}
const { data, code, msg } = await requestPost(url, param);
if (code === 0) {
data.dependents.forEach((item) => {
item.icResiUserId = item.id;
item.icUserName = item.name;
});
//
this.yanPan.singleTitle = "楼院小组";
this.yanPan.hasEvent = false;
this.yanPan = { ...this.yanPan, ...data };
console.log(this.yanPan);
} else {
this.$message.error(msg);
}
},
//
async getYanPanList () {
// const url = "/gov/project/icEvent/processAnalysis/categoryEventList" ;
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/categoryEventList";
let param = {
categoryId: this.yanPan.categoryId,
pageNo: 0,
pageSize: 50
}
const { data, code, msg } = await requestPost(url, param);
this.yanPan.loading = true;
if (code === 0) {
let oneData = {
categoryCode: 111,
categoryName: 111,
showItem: true,
projectList: data.list.map((subItem) => {
return {
title: 111,
status: subItem.address,
statusName: subItem.status == "pending" ? "待处理" : "结案",
eventId: '01',
};
}),
}
let aaa = {
singleList: [oneData]
}
this.yanPan = { ...this.yanPan, ...aaa };
console.log(this.yanPan);
} else {
this.$message.error(msg);
}
},
toUserInfo (item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
});
},
toProjectInfo (item) {
console.log(item);
this.eventId = item.eventId;
// let data = iniData();
// Object.keys(data).forEach((k) => {
// this[k] = data[k];
// });
this.getApiData();
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

2
src/views/modules/visual/communityGovern/shijianchuli/pieOption.js

@ -89,7 +89,7 @@ const center= ['50%', '200px']
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
formatter: '{a|{c}%}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: 1,
lineHeight: 15,

185
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue

@ -23,7 +23,7 @@
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="handleChangeState(index)">
@click.native="handleChangeDate(index)">
</el-option>
</el-select>
</div>
@ -61,10 +61,10 @@
:key="index">
<div class="item_name">{{item.name}}</div>
<img :src="item.url" />
<div class="item_num">
<!-- <div class="item_num">
<span class="item_count">{{item.count}}</span>
<span class="item_percent">{{item.percent}}</span>
</div>
</div> -->
</div>
</div>
@ -99,7 +99,7 @@
:loading="demand.loading"
:header="demand.header"
:list="demand.list"
@operate="toIssueInfo"></cpt-tb>
@operate="toEventInfo"></cpt-tb>
</div>
<div class="m-pagination">
@ -115,6 +115,10 @@
</div>
</div>
<event-info v-if="showProject"
:eventId="eventId"
@close="showProject = false" />
</cpt-card>
</template>
@ -127,6 +131,7 @@ import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
import eventInfo from "./event-info";
import { pieOption } from './pieOption.js'
import { lineOption } from './lineOption.js'
@ -143,8 +148,8 @@ export default {
isfirstInit: true,//
projectTotal: 0,
dateIncr: 0,
monthIncr: 0,
processingCount: 0,
processingRatio: 0,
lineChart: '',
lineOption: {},
@ -158,8 +163,8 @@ export default {
pieChart: '',
pieOption: {},
pieInitState: false,
pieTotal: 0,
colorArray: [],
pieData: [],
legendArray: [
@ -178,10 +183,13 @@ export default {
],
timeRange: [],
agencyId: '',
dataType: '5',
agencyInfo: {},
orgId: '',
orgType: '',
queryStartTime: '',
queryEndTime: '',
processStatus: 'closed_case',
dataType: '5',
casOptions: [],
agencyIdArray: [],
@ -263,6 +271,9 @@ export default {
total: 0,
},
showProject: false,
eventId: '',
};
},
// mixins: [animate]
@ -298,7 +309,25 @@ export default {
},
async handleChangeState (index) {
async handleChangeDate (index) {
const end = new Date();
let start = new Date();
if (index === '1') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
} else if (index === '2') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
} else if (index === '3') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
} else if (index === '4') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 183);
}
if (index != '5') {
this.queryStartTime = start
this.queryEndTime = end
}
await this.getApiData()
this.assignPieChart()
@ -325,17 +354,7 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.agencyInfo = data
this.agencyId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
this.orgId = data.agencyId
//
++this.iscascaderShow
@ -344,7 +363,7 @@ export default {
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
this.agencyIdArray.push(this.orgId)
}
} else {
@ -360,11 +379,13 @@ export default {
this.$refs.pieChart.clear()
}
const url = "/data/aggregator/project/projecttotal";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal";
// const url = "/gov/project/icEvent/processAnalysis/processStatusRatio";
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/processStatusRatio";
let params = {
agencyId: this.agencyId,
dateId: this.dateIdShow,
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
};
const { data, code, msg } = await requestPost(url, params);
@ -372,18 +393,17 @@ export default {
this.$refs.pieChart.hideLoading()
}
if (code === 0) {
this.projectTotal = data.projectTotal
this.dateIncr = data.dateIncr
this.monthIncr = data.monthIncr
this.projectTotal = 99999
this.legendArray = [
{
name: '未结案',
name: '已完成',
count: data.pendingTotal,
percent: data.pendingRatio,
url: require('@/assets/img/shuju/measure/huang@2x.png')
},
{
name: '已结案',
name: '处理中',
count: data.closedTotal,
percent: data.closedRatio,
url: require('@/assets/img/shuju/measure/lv@2x.png')
@ -391,14 +411,15 @@ export default {
]
this.pieData = [
{
name: "未结案",
value: data.pendingTotal,
name: "已完成",
value: 90,
},
{
name: "已结案",
value: data.closedTotal,
}
name: "处理中",
value: 45,
},
]
} else {
@ -408,12 +429,14 @@ export default {
//
async getTable () {
const url = "/gov/issue/issue/resibuzz";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz";
// const url = "/gov/project/icEvent/processAnalysis/eventList";
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/eventList";
let params = {
status: 'pending',
processStatus: this.processStatus,
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
};
@ -425,18 +448,16 @@ export default {
this.demand.total = data.total;
this.tableList = data.list
this.demand.list = data.list.map((item) => {
this.demand.list = data.list.map((item, index) => {
return [
item.sort ? item.sort : '--',
item.issueTitle ? item.issueTitle : '',
item.suggestion ? item.suggestion : '',
item.categoryName.join(','),
item.status ? item.status : '',
item.createdTime ? item.createdTime : '',
item.issueOriginator ? item.issueOriginator : '',
item.voteAccount ? item.voteAccount : '',
item.supportCount ? item.supportCount : 0,
item.oppositionCount ? item.oppositionCount : 0,
index + 1,
item.gridName ? item.gridName : '',
item.eventContent ? item.eventContent : '',
item.sourceTypeName ? item.sourceTypeName : '',
item.reportUserName ? item.reportUserName : '',
item.mobile ? item.mobile : 'processing',
item.status ? item.status === 'closed_case' ? '已完成' : '处理中' : '',
{ type: "operate", list: ["查看"] },
];
});
@ -451,10 +472,11 @@ export default {
},
async toIssueInfo (index) {
toEventInfo (index) {
const { tableList } = this;
this.issueId = tableList[index].issueId
this.showIssue = true
this.eventId = tableList[index].eventId
this.showProject = true
},
@ -484,11 +506,13 @@ export default {
}
const _that = this
// this.$refs.pieChart.showLoading()
const url = "/data/aggregator/project/projectmonthincr";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr";
// const url = "/gov/project/icEvent/processAnalysis/monthlyIncrement";
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/monthlyIncrement";
let params = {
agencyId: this.agencyId,
dateId: this.dateIdShow,
orgId: this.orgId,
orgType: this.orgType,
queryStartTime: this.queryStartTime,
queryEndTime: this.queryEndTime,
};
const { data, code, msg } = await requestPost(url, params);
@ -501,8 +525,8 @@ export default {
if (data && data.length > 0) {
this.lineNoData = false
data.forEach(item => {
this.lineXaxis.push(item.type)
this.lineSeriesData.push(item.value)
this.lineXaxis.push(item.monthName)
this.lineSeriesData.push(item.increment)
});
this.lineData = data
@ -546,26 +570,17 @@ export default {
//
async assignPieChart () {
this.pieTotal = 0
let maxIndex = 0
let maxValue = this.pieData[0].value
const _that = this
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieData.forEach((item, index) => {
this.pieTotal = this.pieTotal + item.value
if (item.value > maxValue) {
maxValue = item.value
maxIndex = index
item.selected = true
} else if (index !== 0) {
item.selected = false
}
});
this.pieData[0].selected = true
this.pieData[1].selected = false
this.pieOption.title.text = this.pieTotal
this.pieOption.title.text = this.projectTotal
this.clickPie(maxIndex)
@ -577,6 +592,12 @@ export default {
},
clickPie (seriesIndex) {
if (seriesIndex === 0) {
this.processStatus = 'closed_case'
} else {
this.processStatus = 'processing'
}
this.pieData.forEach((element, index) => {
if (index === seriesIndex) {
element.label = {
@ -606,12 +627,13 @@ export default {
}
});
this.pieOption.series[1].data = this.pieData
this.demand.pageNo = 0
this.getTable()
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
handleChangeAgency (value) {
let orgArray = []
@ -627,12 +649,6 @@ export default {
this.getApiData()
// this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
// this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
// this.getApiData()
// console.log(this.agencyIdArray)
},
//
@ -645,9 +661,6 @@ export default {
this.dateIdShow = y + '-' + m + '-' + d;
},
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
},
},
props: {
uid: {
@ -663,7 +676,7 @@ export default {
cptCard,
cptTb,
screenEchartsFrame,
eventInfo,
ScreenLoading,
ScreenNodata
},

Loading…
Cancel
Save