|
|
@ -6,13 +6,20 @@ |
|
|
|
src="../../../../assets/img/shuju/title-tip.png" /> |
|
|
|
<div class="title-label"> |
|
|
|
区域化党建 |
|
|
|
<el-cascader |
|
|
|
v-model="selectAgency" |
|
|
|
:options="propTree" |
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
:show-all-levels="false" |
|
|
|
clearable |
|
|
|
@change="handleCascader"> |
|
|
|
</el-cascader> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="second-title"> |
|
|
|
<div class="second-title-label">党建单位分类统计</div> |
|
|
|
<div class="second-select"> |
|
|
|
<el-select v-model="serviceMatter" |
|
|
|
clearable |
|
|
|
placeholder="请选择" |
|
|
|
@change="handleSelectChange" |
|
|
|
@clear="handleSelectChange"> |
|
|
@ -31,6 +38,7 @@ |
|
|
|
end-placeholder="结束日期" |
|
|
|
prefix-icon="el-icon-caret-bottom" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
:clearable="false" |
|
|
|
:default-time="['00:00:00', '23:59:59']" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
@ -147,13 +155,15 @@ export default { |
|
|
|
value2: '', |
|
|
|
timeRange: '', |
|
|
|
visibleLoading: true, |
|
|
|
serviceMatter: '', |
|
|
|
serviceMatter: 'all', |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
total: 0, |
|
|
|
activeIndex: 0, |
|
|
|
activeLevel: "1", |
|
|
|
selectAgency: '', |
|
|
|
unitList: [], |
|
|
|
propTree: [], |
|
|
|
partyItem: [ |
|
|
|
{ |
|
|
|
name: '楼宇党建', |
|
|
@ -231,33 +241,37 @@ export default { |
|
|
|
async mounted () { |
|
|
|
const { user } = this.$store.state |
|
|
|
this.agencyId = user.agencyId |
|
|
|
console.log('agencyId-------', this.agencyId) |
|
|
|
this.initTime() |
|
|
|
await nextTick(100); |
|
|
|
await this.getAgencyList() |
|
|
|
this.loadUnit() |
|
|
|
this.getList(); |
|
|
|
this.getList(this.agencyId) |
|
|
|
this.getCateCount() |
|
|
|
this.getCateType() |
|
|
|
|
|
|
|
await this.getWorkUserInfo() |
|
|
|
await this.getMapUnitList() |
|
|
|
await this.getMapUnitList(this.agencyId) |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
timeRange(val) { |
|
|
|
console.log('val-www', val) |
|
|
|
this.getList(); |
|
|
|
this.getList(this.agencyId); |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
//具体人员列表 |
|
|
|
async getList () { |
|
|
|
async getList (agencyId) { |
|
|
|
this.visibleLoading = true |
|
|
|
|
|
|
|
const url = "/heart/icpartyactivity/activitylist" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" |
|
|
|
let params = { |
|
|
|
agencyId: this.agencyId, |
|
|
|
agencyId, |
|
|
|
pageSize: this.pageSize, |
|
|
|
pageNo: this.pageNo, |
|
|
|
serviceMatter: this.serviceMatter, |
|
|
|
serviceMatter: this.serviceMatter == 'all' ? '' : this.serviceMatter, |
|
|
|
startTime: this.timeRange && this.timeRange[0] || '', |
|
|
|
endTime: this.timeRange && this.timeRange[1] || '' |
|
|
|
} |
|
|
@ -277,6 +291,55 @@ export default { |
|
|
|
} |
|
|
|
this.visibleLoading = false |
|
|
|
}, |
|
|
|
async getAgencyList() { |
|
|
|
// const url = "/gov/org/customeragency/staffinagencylist"; |
|
|
|
// const url = '/gov/org/customeragency/agencygridtree' |
|
|
|
const url = '/gov/org/customeragency/staffinagencylist' |
|
|
|
// let params = { |
|
|
|
// agencyId: this.$store.state.user.agencyId, |
|
|
|
// }; |
|
|
|
const { data, code, msg } = await requestPost(url); |
|
|
|
if (code === 0) { |
|
|
|
console.log('data-org----o', data) |
|
|
|
let { agencyList, subAgencyList } = data |
|
|
|
this.selectAgency = [`${agencyList.agencyId}-${agencyList.level}`] |
|
|
|
let arr = [] |
|
|
|
agencyList.subAgencyList = subAgencyList |
|
|
|
arr.push(agencyList) |
|
|
|
this.propTree = arr && this.getTreeData(arr) |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
getTreeData(data){ |
|
|
|
if (!Array.isArray(data)) return [] |
|
|
|
let arr = data.map(item => { |
|
|
|
let _item = {} |
|
|
|
if (item.subAgencyList) { |
|
|
|
if (item.subAgencyList.length === 0) { |
|
|
|
_item = { |
|
|
|
label: item.agencyName, |
|
|
|
value: item.agencyId + '-' + item.level, |
|
|
|
level: item.level, |
|
|
|
children: undefined |
|
|
|
} |
|
|
|
} else _item = { |
|
|
|
label: item.agencyName, |
|
|
|
value: item.agencyId + '-' + item.level, |
|
|
|
level: item.level, |
|
|
|
children: this.getTreeData(item.subAgencyList)} |
|
|
|
} else { |
|
|
|
_item = { |
|
|
|
label: item.agencyName, |
|
|
|
value: item.agencyId + '-' + item.level, |
|
|
|
level: item.level, |
|
|
|
} |
|
|
|
} |
|
|
|
return _item |
|
|
|
}) |
|
|
|
return arr |
|
|
|
}, |
|
|
|
async getCateCount () { |
|
|
|
|
|
|
|
const url = "/heart/icpartyactivity/statistics" |
|
|
@ -352,7 +415,35 @@ export default { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleCascader(val) { |
|
|
|
console.log('val-vvv', val) |
|
|
|
if (val.length > 0) { |
|
|
|
const _arr = val[val.length - 1].split('-') |
|
|
|
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' |
|
|
|
this.getList(_arr[0]) |
|
|
|
this.getMapUnitList(_arr[0]) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
initTime() { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
|
|
console.log('time-rtt', this.timeFormat(start), this.timeFormat(end)) |
|
|
|
this.timeRange = [this.timeFormat(start), this.timeFormat(end)] |
|
|
|
}, |
|
|
|
timeFormat(date) { |
|
|
|
if (!date || typeof date === 'string') { |
|
|
|
return false |
|
|
|
} |
|
|
|
var y = date.getFullYear() //年 |
|
|
|
var m = date.getMonth() + 1 //月 |
|
|
|
if (m < 10) m = '0' + m |
|
|
|
var d = date.getDate() //日 |
|
|
|
if (d < 10) d = '0' + d |
|
|
|
|
|
|
|
return y + '-' + m + '-' + d + ' 00:00:00' |
|
|
|
}, |
|
|
|
async loadUnit () { |
|
|
|
const url = "/heart/icresidemanddict/subcodelist" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option" |
|
|
@ -365,7 +456,10 @@ export default { |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.unitList = data |
|
|
|
|
|
|
|
this.unitList.unshift({ |
|
|
|
label: '全部', |
|
|
|
value: 'all' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
@ -419,12 +513,12 @@ export default { |
|
|
|
// }, |
|
|
|
|
|
|
|
//获取联建单位分布图 |
|
|
|
async getMapUnitList () { |
|
|
|
async getMapUnitList (agencyId) { |
|
|
|
const url = "/heart/icpartyunit/distribution" |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" |
|
|
|
|
|
|
|
let params = { |
|
|
|
agencyId: this.agencyId |
|
|
|
agencyId |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
@ -492,7 +586,7 @@ export default { |
|
|
|
this.showedMoreInfo = true |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectChange () { |
|
|
|
handleSelectChange (val) { |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
pageSizeChangeHandleNew (val) { |
|
|
@ -562,8 +656,22 @@ export default { |
|
|
|
margin-right: 6px; |
|
|
|
} |
|
|
|
.title-label { |
|
|
|
font-size: 16px; |
|
|
|
font-size: 20px; |
|
|
|
font-weight: 800; |
|
|
|
::v-deep .el-input { |
|
|
|
width: 180px; |
|
|
|
margin-left: 10px; |
|
|
|
.el-input__inner { |
|
|
|
font-size: 18px; |
|
|
|
font-weight: 800; |
|
|
|
color: #fff; |
|
|
|
background: transparent; |
|
|
|
border: 0; |
|
|
|
} |
|
|
|
.el-icon-arrow-down::before { |
|
|
|
content: "\e790"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
::v-deep .el-dropdown { |
|
|
|
font-size: 16px; |
|
|
|