|
|
|
@ -12,17 +12,17 @@ |
|
|
|
:key="iscascaderShow" |
|
|
|
:options="casOptions" |
|
|
|
:props="optionProps" |
|
|
|
@change="handleChangeAgency" |
|
|
|
clearable></el-cascader> |
|
|
|
:show-all-levels="false" |
|
|
|
@change="handleChangeAgency"></el-cascader> |
|
|
|
</div> |
|
|
|
<div class="second-select"> |
|
|
|
<el-date-picker v-model="dateId" |
|
|
|
<el-date-picker v-model="dateIdShow" |
|
|
|
type="date" |
|
|
|
:clearable="false" |
|
|
|
@change="handleChangeDate" |
|
|
|
prefix-icon="el-icon-caret-bottom" |
|
|
|
placeholder="选择日期" |
|
|
|
value-format="yyyyMMdd"> |
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
</el-date-picker> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -108,6 +108,7 @@ import screenMap from "@/views/modules/visual/components/screen-map"; |
|
|
|
|
|
|
|
import { pieOption } from './processPieOption.js' |
|
|
|
import { lineOption } from './processLineOption.js' |
|
|
|
import nextTick from 'dai-js/tools/nextTick' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -156,6 +157,7 @@ export default { |
|
|
|
], |
|
|
|
|
|
|
|
dateId: '', |
|
|
|
dateIdShow: '', |
|
|
|
agencyId: '', |
|
|
|
status: 'pending',//状态:待处理 pending,结案closed |
|
|
|
agencyInfo: {}, |
|
|
|
@ -225,16 +227,26 @@ export default { |
|
|
|
|
|
|
|
async mounted () { |
|
|
|
this.userId = this.uid; |
|
|
|
|
|
|
|
this.initData() |
|
|
|
await this.getWorkUserInfo() |
|
|
|
|
|
|
|
// this.agencyInfo = this.$store.state.user |
|
|
|
// this.agencyId = this.agencyInfo.agencyId |
|
|
|
|
|
|
|
// await this.getWorkUserInfo() |
|
|
|
await this.getAgencylist()//获取组织级别 |
|
|
|
this.getApiData(); |
|
|
|
await nextTick(500) |
|
|
|
await this.getApiData(); |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
initData () { |
|
|
|
var time = (new Date).getTime() - 24 * 60 * 60 * 1000; |
|
|
|
this.dateId = new Date(time); // 获取的是前一天日期 |
|
|
|
var nowdate = new Date(time); // 获取的是前一天日期 |
|
|
|
var y = nowdate.getFullYear(); |
|
|
|
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1; |
|
|
|
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate(); |
|
|
|
this.dateIdShow = y + '-' + m + '-' + d; |
|
|
|
|
|
|
|
}, |
|
|
|
async getApiData () { |
|
|
|
@ -245,72 +257,62 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeDate (value) { |
|
|
|
this.dateId = value |
|
|
|
this.dateIdShow = value |
|
|
|
|
|
|
|
this.getApiData() |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取当前管理员信息 |
|
|
|
getWorkUserInfo () { |
|
|
|
const url = '/epmetuser/customerstaff/staffbasicinfo' |
|
|
|
// 获取当前登录人员信息及组织信息 |
|
|
|
getAgencylist () { |
|
|
|
const url = '/gov/org/customeragency/agencygridtree' |
|
|
|
let params = {} |
|
|
|
window.app.ajax.post( |
|
|
|
url, |
|
|
|
params, |
|
|
|
(data, rspMsg) => { |
|
|
|
this.agencyInfo = data |
|
|
|
if (!data.latitude) { |
|
|
|
this.agencyId = this.agencyInfo.agencyId |
|
|
|
if (!this.agencyInfo.latitude) { |
|
|
|
this.agencyInfo.latitude = 36.072227 |
|
|
|
} |
|
|
|
if (!data.longitude) { |
|
|
|
if (!this.agencyInfo.longitude) { |
|
|
|
this.agencyInfo.longitude = 120.389455 |
|
|
|
} |
|
|
|
if (!data.level) { |
|
|
|
if (!this.agencyInfo.level) { |
|
|
|
this.agencyInfo.level = 'street' |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg) |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async getAgencylist () { |
|
|
|
const url = '/gov/org/customeragency/agencylist' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist' |
|
|
|
|
|
|
|
const params = { |
|
|
|
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc' |
|
|
|
customerId: '0c41b272ee9ee95ac6f184ad548a30eb' |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
if (code === 0) { |
|
|
|
//组织级联数据 |
|
|
|
++this.iscascaderShow |
|
|
|
this.casOptions = [] |
|
|
|
this.agencyIdArray.length = [] |
|
|
|
|
|
|
|
if (data) { |
|
|
|
this.casOptions.push(data) |
|
|
|
this.agencyIdArray.push(this.agencyId) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
}, |
|
|
|
(rspMsg, data) => { |
|
|
|
this.$message.error(rspMsg) |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//加载项目 |
|
|
|
async getProjectTotal () { |
|
|
|
// const url = "/data/aggregator/project/projecttotal"; |
|
|
|
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal"; |
|
|
|
this.$refs.pieChart.showLoading() |
|
|
|
const url = "/data/aggregator/project/projecttotal"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal"; |
|
|
|
let params = { |
|
|
|
agencyId: '', |
|
|
|
agencyId: this.agencyId, |
|
|
|
dateId: this.dateId, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
|
|
|
|
this.$refs.pieChart.hideLoading() |
|
|
|
if (code === 0) { |
|
|
|
this.projectTotal = data.projectTotal |
|
|
|
this.dateIncr = data.dateIncr |
|
|
|
@ -339,10 +341,10 @@ export default { |
|
|
|
|
|
|
|
//加载项目 |
|
|
|
async loadProjectlist () { |
|
|
|
// const url = "/data/aggregator/project/projectstatuslist"; |
|
|
|
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectstatuslist"; |
|
|
|
const url = "/data/aggregator/project/projectstatuslist"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectstatuslist"; |
|
|
|
let params = { |
|
|
|
agencyId: '', |
|
|
|
agencyId: this.agencyId, |
|
|
|
dateId: this.dateId, |
|
|
|
status: this.status |
|
|
|
}; |
|
|
|
@ -352,13 +354,13 @@ export default { |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
|
|
// this.projectList = [...data] |
|
|
|
if (this.status === 'closed') { |
|
|
|
this.projectList = this.projectList1 |
|
|
|
} else { |
|
|
|
this.projectList = this.projectList2 |
|
|
|
this.projectList = [...data] |
|
|
|
// if (this.status === 'closed') { |
|
|
|
// this.projectList = this.projectList1 |
|
|
|
// } else { |
|
|
|
// this.projectList = this.projectList2 |
|
|
|
|
|
|
|
} |
|
|
|
// } |
|
|
|
this.projectList.forEach(item => { |
|
|
|
item.values_ = { |
|
|
|
name: item.title |
|
|
|
@ -410,7 +412,7 @@ export default { |
|
|
|
|
|
|
|
if (this.isfirstInit) { |
|
|
|
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray |
|
|
|
this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle) |
|
|
|
this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000) |
|
|
|
} else { |
|
|
|
this.$refs.map.refreshMap(null, this.projectList) |
|
|
|
|
|
|
|
@ -446,18 +448,18 @@ export default { |
|
|
|
// 获取折线图 |
|
|
|
async getLineChart () { |
|
|
|
this.$refs.lineChart.clear() |
|
|
|
|
|
|
|
this.$refs.lineChart.showLoading() |
|
|
|
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 = "/data/aggregator/project/projectmonthincr"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr"; |
|
|
|
let params = { |
|
|
|
agencyId: this.agencyId, |
|
|
|
dateId: this.dateId, |
|
|
|
}; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
this.$refs.lineChart.hideLoading() |
|
|
|
if (code === 0) { |
|
|
|
// 获取pieChart配置 |
|
|
|
this.lineOption = lineOption() |
|
|
|
@ -504,7 +506,7 @@ export default { |
|
|
|
this.$refs.pieChart.clear() |
|
|
|
this.pieTotal = 0 |
|
|
|
const _that = this |
|
|
|
// this.$refs.pieChart.showLoading() |
|
|
|
|
|
|
|
|
|
|
|
// 获取pieChart配置 |
|
|
|
this.pieOption = pieOption(this.pieChartS) |
|
|
|
@ -597,6 +599,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
dateIdShow () { |
|
|
|
|
|
|
|
let dataArray = this.dateIdShow.split('-') |
|
|
|
this.dateId = dataArray.join('') |
|
|
|
}, |
|
|
|
uid (id) { |
|
|
|
this.userId = id; |
|
|
|
}, |
|
|
|
|