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