|
|
|
@ -4,11 +4,10 @@ |
|
|
|
<div class="div_search"> |
|
|
|
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'80px'"> |
|
|
|
<div> |
|
|
|
<el-form-item label="所属组织" prop="gridId"> |
|
|
|
<el-form-item label="所属组织" prop="orgId"> |
|
|
|
<el-cascader |
|
|
|
class="customer_cascader" |
|
|
|
ref="myCascader" |
|
|
|
filterable |
|
|
|
clearable |
|
|
|
v-model="formData.orgId" |
|
|
|
:options="orgOptions" |
|
|
|
@ -67,7 +66,7 @@ |
|
|
|
<div class="content"> |
|
|
|
<div class="name">{{ item.name }}</div> |
|
|
|
<div class="num">{{ item.value }}</div> |
|
|
|
<div class="unit" :style="{ color: color[index] }">{{ item.value / 100 }}%</div> |
|
|
|
<div class="unit" :style="{ color: color[index] }">{{ item.radio }}%</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -125,7 +124,6 @@ |
|
|
|
:detailId="detailId" |
|
|
|
:detailData="detailData" |
|
|
|
@handleClose="handleClose" |
|
|
|
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -160,7 +158,8 @@ export default { |
|
|
|
return time.getTime() > nowData; |
|
|
|
}; |
|
|
|
return { |
|
|
|
orgType:"agency", |
|
|
|
orgId: '', |
|
|
|
orgType: 'agency', |
|
|
|
dialogVisible: false, |
|
|
|
detailId: '', |
|
|
|
detailData: {}, |
|
|
|
@ -169,7 +168,9 @@ export default { |
|
|
|
user: {}, |
|
|
|
gridList: [], //所属网格list--场所区域 |
|
|
|
tableData: [], |
|
|
|
formData: {}, |
|
|
|
formData: { |
|
|
|
orgId: '' |
|
|
|
}, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: window.localStorage.getItem('pageSize') || 20, |
|
|
|
total: 1, |
|
|
|
@ -190,6 +191,7 @@ export default { |
|
|
|
value: 'agencyId', |
|
|
|
label: 'agencyName', |
|
|
|
children: 'subAgencyList', |
|
|
|
emitPath: false, |
|
|
|
checkStrictly: true |
|
|
|
}, |
|
|
|
TableHeight: '', |
|
|
|
@ -241,11 +243,11 @@ export default { |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
handleSearch(val) { |
|
|
|
console.log("val",val); |
|
|
|
if(this.formData.orgId.length==0){ |
|
|
|
this.formData.orgId=""; |
|
|
|
let tmp = this.formData.orgId; |
|
|
|
if (!tmp && typeof tmp != 'undefined' && tmp != 0) { |
|
|
|
this.formData.orgId = ''; |
|
|
|
} |
|
|
|
console.log(this.formData); |
|
|
|
|
|
|
|
this.pageNo = 1; |
|
|
|
this.placeType = ''; |
|
|
|
this.getTableData(); |
|
|
|
@ -288,7 +290,7 @@ export default { |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
async getsubData() { |
|
|
|
console.log("this.orgType",this.orgType) |
|
|
|
console.log('this.orgType', this.orgType); |
|
|
|
this.$refs.pieChart.showLoading(); |
|
|
|
let url = '/gov/org/enterprise/count-type'; |
|
|
|
let param = { |
|
|
|
@ -327,7 +329,14 @@ export default { |
|
|
|
let data = [...this.pieData.list]; |
|
|
|
this.chartData.name = data.map(item => item.placeTypeName); |
|
|
|
this.chartData.data = data.map(item => { |
|
|
|
return { value: item.total, id: item.agencyId, placeType: item.placeType, name: item.placeTypeName }; |
|
|
|
return { |
|
|
|
value: item.total, |
|
|
|
id: item.agencyId, |
|
|
|
placeType: item.placeType, |
|
|
|
name: item.placeTypeName, |
|
|
|
radio: item.total == 0 ? '0' : ((item.total / this.pieData.total) * 100).toFixed(2) |
|
|
|
}; |
|
|
|
console.log(item, this.pieData.total); |
|
|
|
}); |
|
|
|
|
|
|
|
console.log('chartData', this.chartData); |
|
|
|
@ -444,7 +453,9 @@ export default { |
|
|
|
data: { |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
...formData |
|
|
|
orgId: this.formData.orgId, |
|
|
|
orgType: this.orgType, |
|
|
|
placeType: this.placeType |
|
|
|
}, |
|
|
|
responseType: 'blob' |
|
|
|
}) |
|
|
|
@ -475,7 +486,7 @@ export default { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} else { |
|
|
|
// console.log('获取组织树成功', res.data); |
|
|
|
console.log('获取组织树成功', res.data); |
|
|
|
// let { agencyList, subAgencyList } = res.data; |
|
|
|
// const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]; |
|
|
|
// this.orgOptions = this.deepTree(_arr); |
|
|
|
@ -489,12 +500,10 @@ export default { |
|
|
|
}, |
|
|
|
handleChangeAgency(val) { |
|
|
|
let obj = this.$refs['myCascader'].getCheckedNodes()[0].data; |
|
|
|
console.log(obj); |
|
|
|
this.formData.orgId = obj.agencyId; |
|
|
|
if (obj.level == 'grid') { |
|
|
|
this.orgType = 'grid'; |
|
|
|
if (obj) { |
|
|
|
this.orgType = obj.level === 'grid' ? 'grid' : 'agency'; |
|
|
|
} else { |
|
|
|
this.orgType = "agency"; |
|
|
|
this.orgType = ''; |
|
|
|
} |
|
|
|
}, |
|
|
|
deepTree(arr) { |
|
|
|
|