Browse Source

事件处理分析部分联调

shibei_master
jianjun 3 years ago
parent
commit
8e9fb5c84f
  1. 52
      src/views/modules/visual/communityGovern/shijianchuli/event-info.vue
  2. 68
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue

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

@ -19,7 +19,7 @@
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>上报时间</span> <span>上报时间</span>
<span>{{ eventInfo.reportTime }}</span> <span>{{ eventInfo.createdTime }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
@ -40,15 +40,15 @@
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>报事人</span> <span>报事人</span>
<span>{{ eventInfo.reporterName || "--" }}</span> <span>{{ eventInfo.name || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>手机号</span> <span>手机号</span>
<span>{{ eventInfo.reporterMobile || "--" }}</span> <span>{{ eventInfo.mobile || "--" }}</span>
</div> </div>
<div class="info-prop"> <div class="info-prop">
<span>身份证号</span> <span>身份证号</span>
<span>{{ eventInfo.reporterIdCard || "--" }}</span> <span>{{ eventInfo.idCard || "--" }}</span>
</div> </div>
</div> </div>
@ -62,7 +62,7 @@
:key="item.processId" :key="item.processId"
v-for="(item, index) in eventProcess"> v-for="(item, index) in eventProcess">
<div class="item-row"> <div class="item-row">
<div class="name">{{ item.serviceShowName }}</div> <div class="name">{{ item.processName }}</div>
<div class="date"> <div class="date">
{{ item.processTime }} {{ item.processTime }}
</div> </div>
@ -70,7 +70,7 @@
<div class="detail"> <div class="detail">
<div class="detail-field">处理部门</div> <div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.wantServiceTime }}</div> <div class="detail-value">{{ item.departmentName }}</div>
</div> </div>
<!-- <div class="detail" <!-- <div class="detail"
@ -163,16 +163,16 @@ function iniData () {
eventInfo: { eventInfo: {
gridId: "", gridId: "",
gridName: '', gridName: '',
reportTime: [], createdTime: [],
eventContent: "", eventContent: "",
imageUrls: [], imageUrls: [],
voiceUrls: [], voiceUrls: [],
sourceType: '', sourceType: '',
address: '', address: '',
reportUserId: "", reportUserId: "",
reporterName: "", name: "",
reporterMobile: "", mobile: "",
reporterIdCard: "", idCard: "",
}, },
@ -262,11 +262,11 @@ export default {
// //
async getEventInfo () { async getEventInfo () {
// const url = "/gov/project/icEvent/processAnalysis/eventDetail/"+ this.eventId; const url = "/gov/project/icEvent/detail";
const url = "http://yapi.elinkservice.cn/mock/245/api/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, { const { data, code, msg } = await requestPost(url, {
eventId: this.eventId, icEventId: this.eventId,
}); });
if (code === 0) { if (code === 0) {
@ -276,19 +276,19 @@ export default {
} }
}, },
// //
async getEventProcess () { async getEventProcess () {
// const url = "/gov/project/icEvent/processAnalysis/processes/" + this.eventId; const url = "/gov/project/icEvent/process";
const url = "http://yapi.elinkservice.cn/mock/245/api/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, { const { data, code, msg } = await requestPost(url, {
eventId: this.eventId, icEventId: this.eventId,
}); });
if (code === 0) { if (code === 0) {
this.eventProcess = data.map((item) => { this.eventProcess = data.map((item) => {
item.operateTime = dateFormat( item.processTime = dateFormat(
new Date(item.operateTime * 1000), new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm" "yyyy-MM-dd hh:mm"
); );
return item; return item;
@ -300,8 +300,8 @@ export default {
// //
async getYanPan () { async getYanPan () {
// const url = "/gov/project/icEvent/processAnalysis/analysis/" + this.eventId; 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; //const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/analysis/" + this.eventId;
let param = {} let param = {}
const { data, code, msg } = await requestPost(url, param); const { data, code, msg } = await requestPost(url, param);
@ -328,14 +328,14 @@ export default {
}, },
// //
async getYanPanList () { async getYanPanList () {
// const url = "/gov/project/icEvent/processAnalysis/categoryEventList" ; const url = "/api/gov/project/icEvent/processAnalysis/categoryEventList";
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/categoryEventList"; //const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/categoryEventList";
let param = { let param = {
categoryId: this.yanPan.categoryId, categoryPids: this.yanPan.categoryId,
pageNo: 0, pageNo: 1,
pageSize: 50 pageSize: 10
} }
const { data, code, msg } = await requestPost(url, param); const { data, code, msg } = await requestPost(url, param);

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

@ -23,12 +23,12 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@click.native="handleChangeDate(index)"> @click.native="handleChangeDate(item.value)">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div v-if="dataType==='5'" <div v-if="dataType==='0'"
class="second-select range-data"> class="second-select range-data">
<el-date-picker v-model="timeRange" <el-date-picker v-model="timeRange"
@ -38,7 +38,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom" prefix-icon="el-icon-caret-bottom"
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyyMMdd" value-format="yyyy-MM-dd"
@change="handleSelectChange"> @change="handleSelectChange">
</el-date-picker> </el-date-picker>
</div> </div>
@ -136,6 +136,7 @@ import eventInfo from "./event-info";
import { pieOption } from './pieOption.js' import { pieOption } from './pieOption.js'
import { lineOption } from './lineOption.js' import { lineOption } from './lineOption.js'
import nextTick from 'dai-js/tools/nextTick' import nextTick from 'dai-js/tools/nextTick'
import dateFormat from "dai-js/tools/dateFormat";
export default { export default {
@ -185,11 +186,11 @@ export default {
timeRange: [], timeRange: [],
orgId: '', orgId: '',
orgType: '', orgType: 'agency',
queryStartTime: '', queryStartTime: '',
queryEndTime: '', queryEndTime: '',
processStatus: 'closed_case', processStatus: 'closed_case',
dataType: '5', dataType: '1',
casOptions: [], casOptions: [],
agencyIdArray: [], agencyIdArray: [],
@ -221,8 +222,8 @@ export default {
value: '4' value: '4'
}, },
{ {
label: '不限', label: '自定义',
value: '5' value: '0'
}, },
], ],
@ -289,6 +290,7 @@ export default {
// //
this.initData() this.initData()
await this.getAgencylist()// await this.getAgencylist()//
this.handleChangeDate(this.dataType)
// //
await this.getProjectTotal() await this.getProjectTotal()
await this.getLineChart() await this.getLineChart()
@ -310,11 +312,11 @@ export default {
}, },
async handleChangeDate (index) { async handleChangeDate (index) {
const end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();
if (index === '1') {// if (index === '1') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 365); start.setFullYear(start.getFullYear() -1);
console.log(start.getDate())
} else if (index === '2') {// } else if (index === '2') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
@ -324,13 +326,15 @@ export default {
} else if (index === '4') {// } else if (index === '4') {//
start.setTime(start.getTime() - 3600 * 1000 * 24 * 183); start.setTime(start.getTime() - 3600 * 1000 * 24 * 183);
} }
if (index != '5') { if (index != '0') {
this.queryStartTime = start this.queryStartTime = dateFormat(start,'yyyy-MM-dd')
this.queryEndTime = end this.queryEndTime = dateFormat(end,'yyyy-MM-dd')
}
if (index !== '0'){
await this.getApiData()
this.assignPieChart()
} }
await this.getApiData()
this.assignPieChart()
}, },
@ -341,13 +345,15 @@ export default {
handleSelectChange (value) { handleSelectChange (value) {
console.log(value) console.log(value)
this.queryStartTime = value[0]
this.queryEndTime = value[1]
this.getApiData(); this.getApiData();
}, },
// //
async getAgencylist () { async getAgencylist () {
// const url = "/gov/org/customeragency/agencygridtree"; const url = "/gov/org/customeragency/agencygridtree";
const url = '/gov/org/customeragency/agencylist' //const url = '/gov/org/customeragency/agencylist'
let params = {}; let params = {};
@ -379,8 +385,8 @@ export default {
this.$refs.pieChart.clear() this.$refs.pieChart.clear()
} }
// const url = "/gov/project/icEvent/processAnalysis/processStatusRatio"; const url = "/gov/project/icEvent/processAnalysis/processStatusRatio";
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/processStatusRatio"; //const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/processStatusRatio";
let params = { let params = {
orgId: this.orgId, orgId: this.orgId,
orgType: this.orgType, orgType: this.orgType,
@ -393,19 +399,19 @@ export default {
this.$refs.pieChart.hideLoading() this.$refs.pieChart.hideLoading()
} }
if (code === 0) { if (code === 0) {
this.projectTotal = 99999 this.projectTotal = parseInt(data.processingCount) + parseInt(data.closedCount);
this.legendArray = [ this.legendArray = [
{ {
name: '已完成', name: '已完成',
count: data.pendingTotal, count: data.closedCount,
percent: data.pendingRatio, percent: data.closedRatio,
url: require('@/assets/img/shuju/measure/huang@2x.png') url: require('@/assets/img/shuju/measure/huang@2x.png')
}, },
{ {
name: '处理中', name: '处理中',
count: data.closedTotal, count: data.processingCount,
percent: data.closedRatio, percent: data.pendingRatio,
url: require('@/assets/img/shuju/measure/lv@2x.png') url: require('@/assets/img/shuju/measure/lv@2x.png')
} }
] ]
@ -414,11 +420,11 @@ export default {
{ {
name: "已完成", name: "已完成",
value: 90, value: 70//parseInt(data.closedRatio*100)
}, },
{ {
name: "处理中", name: "处理中",
value: 45, value: 30//parseInt(data.pendingRatio*100)
}, },
] ]
@ -429,8 +435,8 @@ export default {
// //
async getTable () { async getTable () {
// const url = "/gov/project/icEvent/processAnalysis/eventList"; const url = "/gov/project/icEvent/processAnalysis/eventList";
const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/processAnalysis/eventList"; //const url = "http://yapi.elinkservice.cn/mock/245/gov/project/icEvent/processAnalysis/eventList";
let params = { let params = {
processStatus: this.processStatus, processStatus: this.processStatus,
orgId: this.orgId, orgId: this.orgId,
@ -456,7 +462,7 @@ export default {
item.sourceTypeName ? item.sourceTypeName : '', item.sourceTypeName ? item.sourceTypeName : '',
item.reportUserName ? item.reportUserName : '', item.reportUserName ? item.reportUserName : '',
item.mobile ? item.mobile : 'processing', item.mobile ? item.mobile : 'processing',
item.status ? item.status === 'closed_case' ? '已完成' : '处理中' : '', item.processStatus ? item.processStatus === 'closed_case' ? '已完成' : '处理中' : '',
{ type: "operate", list: ["查看"] }, { type: "operate", list: ["查看"] },
]; ];
@ -506,8 +512,8 @@ export default {
} }
const _that = this const _that = this
// this.$refs.pieChart.showLoading() // this.$refs.pieChart.showLoading()
// const url = "/gov/project/icEvent/processAnalysis/monthlyIncrement"; const url = "/gov/project/icEvent/processAnalysis/monthlyIncrement";
const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/monthlyIncrement"; //const url = "http://yapi.elinkservice.cn/mock/245/api/gov/project/icEvent/processAnalysis/monthlyIncrement";
let params = { let params = {
orgId: this.orgId, orgId: this.orgId,
orgType: this.orgType, orgType: this.orgType,

Loading…
Cancel
Save