Browse Source

数据统计123

feature/shundeju_dev
13176889840 3 years ago
parent
commit
b598077aed
  1. 59
      src/views/modules/shequzhili/statics/cEvent.vue
  2. 856
      src/views/modules/shequzhili/statics/gridEvent.vue

59
src/views/modules/shequzhili/statics/cEvent.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="mode-block resi-container"> <div class="mode-block resi-container">
<el-card ref="searchCard" class="search-card"> <el-card ref="searchCard" class="search-card">
<el-form :inline="true" :model="dataForm" size="small"> <el-form ref="searchForm" :inline="true" :model="dataForm" size="small">
<el-form-item label="所属组织" label-width="100px" <el-form-item label="所属组织" label-width="100px"
prop="agencyId"> prop="agencyId">
<el-cascader ref="cascaderUnit" v-model="dataForm.agencyId" :options="optionsA" :props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}" clearable /> <el-cascader ref="cascaderUnit" v-model="dataForm.agencyId" :options="optionsA" :props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}" clearable />
@ -18,6 +18,7 @@
type="daterange" type="daterange"
clearable clearable
size="small" size="small"
:picker-options="pickerOptions"
range-separator="至" range-separator="至"
start-placeholder="选择日期" start-placeholder="选择日期"
end-placeholder="选择日期" end-placeholder="选择日期"
@ -26,6 +27,11 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" class="diy-button--search" @click="handleSearch">查询</el-button> <el-button type="primary" size="small" class="diy-button--search" @click="handleSearch">查询</el-button>
<el-button
class="diy-button--reset"
size="small"
@click="resetForm('searchForm')"
>重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -38,11 +44,12 @@
class="diy-button--reset" class="diy-button--reset"
size="small">导出</el-button> size="small">导出</el-button>
</div> </div>
<el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%" <el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border style="width: 100%"
:height="tableHeight"> :height="tableHeight">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> <!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column min-width="100" prop="orgName" label="网格员数" header-align="center" align="center" /> <el-table-column type="index" label="序号" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="memberCount" label="所属社区" header-align="center" align="center" /> <el-table-column min-width="100" prop="memberCount" label="网格员数" header-align="center" align="center" />
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" /> <el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" /> <el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
<el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" /> <el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" />
@ -52,7 +59,7 @@
<el-pagination <el-pagination
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="pageNo" :current-page="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="pageSize" :page-size="pageSize"
layout="sizes, prev, pager, next, total" layout="sizes, prev, pager, next, total"
@ -61,8 +68,6 @@
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
<el-dialog <el-dialog
title="总计" title="总计"
:visible.sync="totalVisible" :visible.sync="totalVisible"
@ -73,8 +78,8 @@
style="width: 100%" style="width: 100%"
height="200"> height="200">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="orgName" label="网格员数" header-align="center" align="center" /> <el-table-column min-width="100" prop="memberCount" label="网格员数" header-align="center" align="center" />
<el-table-column min-width="100" prop="memberCount" label="所属社区" header-align="center" align="center" /> <el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" /> <el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" /> <el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
<el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" /> <el-table-column min-width="110" prop="projectAve" label="人均上报" header-align="center" align="center" />
@ -98,8 +103,15 @@ export default {
deleteIsBatch: true, deleteIsBatch: true,
exportURL: '/data/stats/factAgencyUserHouseDaily/export' exportURL: '/data/stats/factAgencyUserHouseDaily/export'
}, },
dataListLoading: false,
optionsA: [], optionsA: [],
totalVisible: false, totalVisible: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() > (Date.now() - 3600 * 1000 * 24);
},
},
dataList: [],
timeRange: '', timeRange: '',
dataForm: { dataForm: {
agencyId: '', agencyId: '',
@ -141,7 +153,15 @@ export default {
}, },
}, },
methods: { methods: {
resetForm(formName) {
this.$refs[formName].resetFields();
this.timeRange = "";
this.dataForm.startTime = "";
this.dataForm.endTime = "";
this.dataForm.type = "";
this.pageNo = 1
this.getTableList()
},
handleSearch() { handleSearch() {
this.dataForm.type = 1 this.dataForm.type = 1
this.pageNo = 1 this.pageNo = 1
@ -158,12 +178,12 @@ export default {
this.getTableList(); this.getTableList();
}, },
exportHandle () { exportHandle () {
const url = this.mixinViewModuleOptions.exportURL const url = '/data/aggregator/org/orgProjectDetailList/export'
this.$http({ this.$http({
method: 'GET', method: 'Post',
url, url,
responseType: 'blob', responseType: 'blob',
params: this.dataForm data: this.dataForm
}).then(res => { }).then(res => {
// this.download(res.data, title + '.xls') // this.download(res.data, title + '.xls')
if (res.headers["content-disposition"]) { if (res.headers["content-disposition"]) {
@ -213,9 +233,13 @@ export default {
}, },
getTableList() { getTableList() {
const { user } = this.$store.state const { user } = this.$store.state
const _data = {
...this.dataForm,
pageNo: this.pageNo,
pageSize: this.pageSize
}
this.$http this.$http
.post('/data/aggregator/org/orgProjectDetailList', this.dataForm) .post('/data/aggregator/org/orgProjectDetailList', _data)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
@ -230,6 +254,7 @@ export default {
}, },
getGridList() { getGridList() {
const { user } = this.$store.state const { user } = this.$store.state
this.dataListLoading = true
const params = { const params = {
agencyId: user.agencyId, agencyId: user.agencyId,
client: 'gov' client: 'gov'
@ -252,8 +277,10 @@ export default {
} }
}) })
.catch(() => { .catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
this.dataListLoading = false
}, },
deepTree(arr) { deepTree(arr) {
if (Array.isArray(arr)) { if (Array.isArray(arr)) {

856
src/views/modules/shequzhili/statics/gridEvent.vue

@ -1,566 +1,390 @@
<template> <template>
<div class="div_main"> <div class="mode-block resi-container">
<el-card ref="searchCard" class="search-card">
<div :style="{height:rowHeight}" <el-form ref="searchForm" :inline="true" :model="dataForm" size="small">
class="div_tree"> <el-form-item label="所属组织" label-width="100px"
<el-input placeholder="输入关键字进行过滤" prop="orgId">
v-model="filterText"> <el-cascader ref="cascaderUnit" v-model="orgId"
</el-input> :options="optionsA"
<el-scrollbar :style="{height:treeHeight}" :props="{ checkStrictly: true, emitPath: false,children:'subOrgList',label:'orgName'}"
class="scrollar"> clearable
<el-tree ref="ref_tree" @change="handleCalscChange"/>
v-loading="treeLoading" <!-- <template slot-scope="{ node, data }">
class="filter_tree" <div @click="cascaderClick(data)">
:data="treeData" <span>{{ data.objectName }}</span>
:props="defaultProps" <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
:highlight-current="true" </div>
node-key="id" </template> -->
:default-expanded-keys="openNodes" </el-form-item>
:expand-on-click-node="false" <el-form-item label="时间范围"
:filter-node-method="filterNode" prop="startTime">
@node-click="handleNodeClick"> <el-date-picker v-model="timeRange"
type="daterange"
<span slot-scope="{ node, data }" clearable
class="custom-tree-node"> size="small"
<span :id="data.id">{{ data.showName }}</span> :picker-options="pickerOptions"
</span> range-separator="至"
</el-tree> start-placeholder="选择日期"
</el-scrollbar> end-placeholder="选择日期"
value-format="yyyy-MM-dd">
</div> </el-date-picker>
</el-form-item>
<div :style="{height:rowHeight}" <el-form-item>
class=div_left> <el-button type="primary" size="small" class="diy-button--search" @click="handleSearch">查询</el-button>
<el-button
<div class="div_search marginl-20"> class="diy-button--reset"
<el-form :inline="true" size="small"
ref="ref_searchform" @click="resetForm('searchForm')"
:label-width="'80px'"> >重置</el-button>
<div> </el-form-item>
</el-form>
<el-form-item label="房主姓名" </el-card>
prop="ownerName"> <el-card class="resi-card-table">
<el-input v-model="ownerName" <div class="resi-row-btn">
class="item_width_2" <!-- <el-button @click="totalHandle"
size="small" class="diy-button--add"
clearable size="small">总计</el-button> -->
placeholder="请输入内容"> <el-button @click="exportHandle"
class="diy-button--reset"
</el-input> size="small">导出</el-button>
</el-form-item>
<el-form-item label="联系方式"
prop="ownerPhone">
<el-input v-model="ownerPhone"
class="item_width_2"
size="small"
clearable
placeholder="请输入手机">
</el-input>
</el-form-item>
<el-form-item label="房屋状态"
prop="rentFlag">
<el-select class="item_width_2"
v-model="rentFlag"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in rentList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="房屋用途"
prop="purpose">
<el-select v-model="purpose"
class="item_width_2"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in purposeArr"
:key="item.dictValue"
:label="item.dictName"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注"
prop="remark">
<el-input v-model="remark"
class="item_width_2"
size="small"
clearable
placeholder="请输入备注">
</el-input>
</el-form-item>
<el-form-item label="更新时间"
prop="updateStartDate">
<el-date-picker v-model="updateStartDate"
:picker-options="startPickerOptions"
class="item_width_2"
size="small"
type="date"
value-format="yyyyMMdd"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="updateEndDate"
:picker-options="endPickerOptions"
class="item_width_2 data-tag"
size="small"
type="date"
value-format="yyyyMMdd"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div> </div>
<div class=div_left_table> <el-table class="resi-table" v-loading="dataListLoading" :data="dataList" border style="width: 100%"
:height="tableHeight">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column type="index" label="序号" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="staffName" label="网格员" header-align="center" align="center" />
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div> </div>
</div> </el-card>
<el-dialog
title="总计"
:visible.sync="totalVisible"
width="60%">
<template>
<el-table
:data="tableData"
style="width: 100%"
height="200">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="staffName" label="网格员" header-align="center" align="center" />
<el-table-column min-width="100" prop="orgName" label="所属社区" header-align="center" align="center" />
<el-table-column min-width="100" prop="projectCount" label="上报数量" header-align="center" align="center" />
<el-table-column min-width="110" prop="closedCount" label="办结数" header-align="center" align="center" />
</el-table>
</template>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import CDialog from '@c/CDialog' import { mapGetters } from "vuex";
import { requestPost } from "@/js/dai/request"; // import AddOrUpdate from './factagencyuserhousedaily-add-or-update'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default { export default {
data () { data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.updateStartDate) {
let startTime = new Date(this.updateStartDate)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return { return {
filterText: '', mixinViewModuleOptions: {
treeLoading: true, getDataListURL: '/data/stats/factAgencyUserHouseDaily/page',
treeData: [], getDataListIsPage: true,
openNodes: [], deleteURL: '/data/stats/factAgencyUserHouseDaily',
defaultProps: { deleteIsBatch: true,
children: 'children', exportURL: '/data/stats/factAgencyUserHouseDaily/export'
label: 'showName'
}, },
dataListLoading: false,
selTreeObj: {}, dataList: [],
optionsA: [],
centerPoint: [], totalVisible: false,
staffAgencyId: localStorage.getItem("agencyId"), pickerOptions: {
showImportBtn: false, disabledDate(time) {
return time.getTime() > (Date.now() - 3600 * 1000 * 24);
rentList: [ },
{
value: '1',
label: '出租'
},
{
value: '2',
label: '闲置'
},
{
value: '0',
label: '自住'
},
{
value: '3',
label: '未出售'
},
],
ownerName: '',
ownerPhone: '',
rentFlag: '',
purpose: '',
remark: '',
updateStartDate: '',
updateEndDate: '',
showRoomTable: false,
selObj: {},
purposeArr: [
{ dictValue: '1', dictName: '住宅' },
{ dictValue: '2', dictName: '商业' },
{ dictValue: '3', dictName: '办公' },
{ dictValue: '4', dictName: '工业' },
{ dictValue: '5', dictName: '仓储' },
{ dictValue: '6', dictName: '商住混用' },
{ dictValue: '7', dictName: '其他' }
],
endPickerOptions: {
disabledDate: endDisabledDate
}, },
startPickerOptions: { timeRange: '',
disabledDate: startDisabledDate dataForm: {
orgId: '',
startTime: '',
endTime: '',
orgType: ''
}, },
total: 0,
tableData: [],
pageNo: 1,
pageSize: 20,
orgId: ''
} }
}, },
components: { components: {
CDialog // AddOrUpdate
}, },
async mounted () { created () {
this.treeLoading = true this.getGridList()
this.getTableList()
await this.loadOrgData() // this.getValiheList()
await this.loadTree() },
// await this.loadOpenNode() watch: {
timeRange (val) {
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) if (Array.isArray(val) && val.length == 2) {
if (this.treeData.length > 0) { this.dataForm.startTime = val[0];
this.$nextTick(() => { this.dataForm.endTime = val[1];
// ref_tree ref value node-key } else {
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id); this.dataForm.startTime = "";
}); this.dataForm.endTime = "";
}
} }
this.treeLoading = false
}, },
computed: { computed: {
rowHeight () { ...mapGetters(["clientHeight", "iframeHeight"]),
tableHeight() {
return this.$store.state.inIframe ? this.clientHeight - 140 + this.iframeHeight + 'px' : this.clientHeight - 140 + 'px' const h = this.clientHeight - 360 + this.iframeHeigh;
const _h = this.clientHeight - 360;
return this.$store.state.inIframe ? h : _h;
}, },
treeHeight () {
return this.$store.state.inIframe ? this.clientHeight - 200 + this.iframeHeight + 'px' : this.clientHeight - 200 + 'px'
},
...mapGetters(['clientHeight', 'iframeHeight'])
}, },
methods: { methods: {
handleCalscChange(val) {
handleSearch () { console.log('val-----', val)
// if (this.ownerName || this.ownerPhone || this.rentFlag || this.purpose || this.remark) { const arr = val.split('-')
this.showRoomTable = true this.dataForm.orgId = arr[1]
this.dataForm.orgType = arr[0]
this.$nextTick(() => {
this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj)
})
// } else {
// this.$message.warning('')
// }
}, },
resetForm(formName) {
// this.$refs[formName].resetFields();
resetSearch () { this.timeRange = "";
this.ownerName = '' this.orgId = ''
this.ownerPhone = '' this.dataForm.startTime = "";
this.rentFlag = '' this.dataForm.endTime = "";
this.purpose = '' this.dataForm.orgType = "";
this.remark = '' this.handleSearch();
this.updateStartDate = ''
this.updateEndDate = ''
this.pageSize = 10
this.pageNo = 1
// this.handleNodeClick(this.selObj)
// this.loadTable()
}, },
handleSearch() {
async loadOpenNode () { this.pageNo = 1
const url = "/gov/org/building/tree-ids" this.getTableList()
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.openNodes = data
} else {
this.$message.error(msg)
}
}, },
async loadTree (isRefresh) { handleSizeChange(val) {
const url = "/gov/org/building/treelist" console.log(`每页 ${val}`);
let params = {} this.pageSize = val;
this.getTableList();
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.openNodes = []
this.openNodes.push(data[0].id)
this.treeData = data
if (!isRefresh && data.length > 0) {
this.selTreeObj = data[0]
if (!this.selTreeObj.latitude) {
this.selTreeObj.latitude = this.centerPoint[0]
}
if (!this.selTreeObj.longitude) {
this.selTreeObj.longitude = this.centerPoint[1]
}
}
} else {
this.$message.error(msg)
}
}, },
handleCurrentChange(val) {
// console.log(`当前页: ${val}`);
async loadOrgData () { this.pageNo = val;
const url = "/gov/org/agency/maporg" this.getTableList();
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.centerPoint = []
this.centerPoint.push(data.latitude)
this.centerPoint.push(data.longitude)
} else {
this.$message.error(msg)
}
}, },
exportHandle () {
handleNodeClick (obj) { const url = '/data/aggregator/org/memberProjectInfoList/export'
this.ownerName = '' this.$http({
this.ownerPhone = '' method: 'Post',
this.rentFlag = '' url,
this.purpose = '' responseType: 'blob',
this.remark = '' data: this.dataForm
this.updateStartDate = '' }).then(res => {
this.updateEndDate = '' // this.download(res.data, title + '.xls')
this.showRoomTable = false if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
this.selObj = JSON.parse(JSON.stringify(obj)) console.log('filename', fileName)
this.getTreeObj(obj) let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
this.$nextTick(() => { var aLink = document.createElement('a')
if (obj.level === 'building') {// aLink.style.display = 'none'
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) aLink.href = url
aLink.setAttribute('download', fileName)
} else if (obj.level === 'neighborHood') {// document.body.appendChild(aLink)
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) aLink.click()
document.body.removeChild(aLink) //
} else { window.URL.revokeObjectURL(url) //blob
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) } else this.$message.error('下载失败')
} }).catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
}) })
}, },
cascaderClick (nodeData) {
this.dataForm.agencyId = nodeData.objectId;
this.dataForm.level = nodeData.objectType
this.$refs.cascaderUnit.checkedValue = nodeData.objectId;
this.$refs.cascaderUnit.computePresentText();
this.$refs.cascaderUnit.toggleDropDownVisible(false);
//
async refreshTree () {
this.treeLoading = true
await this.loadTree(this.selTreeObj.id)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
this.treeLoading = false
}, },
totalHandle () {
// this.tableData = []
toNextLevel (row, level) { this.dataForm.type = 0
this.$http
if (level === 'community') { .get('/data/stats/factAgencyUserHouseDaily/total',{params: this.dataForm})
this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data .then(({ data: res }) => {
this.openNodes.push(this.selTreeObj.id) if (res.code !== 0) {
} else { return this.$message.error(res.msg)
this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data } else {
} console.log('获取查询详情成功', res.data)
if (res.data) this.tableData.push(res.data)
}
this.handleNodeClick(this.selTreeObj) })
this.$nextTick(() => { .catch(() => {
// ref_tree ref value node-key return this.$message.error('网络错误')
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id); })
}); this.totalVisible = true
const node = document.getElementById(this.selTreeObj.id) // Iddom
setTimeout(() => {
if (node) {
this.$nextTick(() => {
node.scrollIntoView({ block: 'center' }) // scrollIntoViewdom block: 'center'
})
}
}, 100)
}, },
getTableList() {
// this.dataListLoading = true
getTreeObj (obj) { const { user } = this.$store.state
// const _data = {
// idtype ...this.dataForm,
// idtypeidid pageNo: this.pageNo,
// idtypeid pageSize: this.pageSize
if (obj.level === 'building') {//
let neighborHoodNode = this.$refs.ref_tree.getNode(obj.pid)//
let gridNode = this.$refs.ref_tree.getNode(neighborHoodNode.data.pid)//
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.neighborHoodId = neighborHoodNode.data.id
obj.neighborHoodName = neighborHoodNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else if (obj.level === 'neighborHood') {//
let gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else {
}
if (!obj.latitude) {
obj.latitude = this.centerPoint[0]
}
if (!obj.longitude) {
obj.longitude = this.centerPoint[1]
} }
this.selTreeObj = obj this.$http
console.log(this.selTreeObj) .post('/data/aggregator/org/memberProjectInfoList', _data)
.then(({ data: res }) => {
}, if (res.code !== 0) {
return this.$message.error(res.msg)
filterNode (value, data) { } else {
if (!value) return true; this.dataList = res.data.list
return data.label.indexOf(value) !== -1; this.total = res.data.total
}
})
.catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误')
})
this.dataListLoading = false
}, },
getGridList() {
// const { user } = this.$store.state
startLoading () { const params = {
loading = Loading.service({ agencyId: user.agencyId,
lock: true, // client: 'gov'
text: '正在加载……', // }
background: 'rgba(0,0,0,.7)' // this.$http
}) // .post('/gov/org/userhouse/service/serviceScopeTree')
.post('/data/aggregator/org/agencytree', params)
// .post('/gov/org/customeragency/staffinagencylist')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
// let { agencyList, subAgencyList } = res.data
this.optionsA = this.deepTree(res.data)
// console.log(this.optionsA);
// const _arr = [{...agencyList, subAgencyList: [...subAgencyList] }]
// this.optionsA = this.deepTree(_arr)
console.log('optionsA----', this.optionsA)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
}, },
// deepTree(arr) {
endLoading () { if (Array.isArray(arr)) {
// clearTimeout(timer); return arr.map(item => {
if (loading) { return {
loading.close() ...item,
value: item.orgType + '-' + item.orgId,
subOrgList: item.subOrgList.length > 0 && this.deepTree(item.subOrgList) || null
}
})
} }
} }
},
watch: {
filterText (val) {
this.$refs.ref_tree.filter(val);
}
} }
} }
</script> </script>
<style> <style>
/* .aui-content > .el-tabs > .el-tabs__content { .block{
padding: 0px; position: absolute;
} */ left: 0px;
display: inline-block;
.el-tree-node:focus > .el-tree-node__content { width: 35px;
/* background-color: #ccc !important; */ height: 50px;
color: #2195fe; background: #fff;
}
.cascader-block .el-cascader-node>.el-radio{
display: none;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.div_tree { .blacklist-reason {
/deep/ .el-scrollbar__wrap { width: 100%;
overflow-x: hidden !important; height: 80px;
border: 1px solid #e4e4e4;
border-radius: 4px;
resize: none;
padding: 8px;
box-sizing: border-box;
} }
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
</style> </style>
<style lang="scss" scoped>
@import "@/assets/scss/buttonstyle.scss";
<style lang="scss" scoped > .resi-container .resi-card-table {
.div_main { ::v-deep .el-table th {
display: flex; color: #fff;
} background-color: rgba(33, 149, 254, 1);
.scrollar { // border-right: 1px solid rgba(33, 149, 254, 1);
margin-top: 10px; }
} }
.resi-table {
.div_tree { ::v-deep .el-button--text {
flex: 0 0 280px; text-decoration: underline;
background-color: #ffffff; }
border-radius: 5px; ::v-deep .btn-color-del {
padding: 10px; margin-left: 10px;
overflow-y: hidden; color: rgba(213, 16, 16, 1);
} }
.filter_tree { ::v-deep .btn-color-edit {
overflow-x: auto; color: rgba(0, 167, 169, 1);
} }
}
.form-wr {
.input-width {
width: 260px;
// .div_table { }
// margin-left: 15px; .input-width-textarea {
// // flex: 1; width: 500px;
// width: calc(100% - 300px); }
// background-color: #ffffff; .imsg-list {
// border-radius: 5px; display: flex;
// padding: 10px; align-items: center;
// } .imgs-item {
.div_left { position: relative;
// flex: 1; margin-right: 10px;
width: calc(100% - 300px); .el-icon-delete {
} position: absolute;
.div_left_table { top: 0;
margin-top: 10px; right: 0;
margin-left: 15px; font-size: 18px;
background-color: #ffffff; color: red;
border-radius: 5px; z-index: 3;
padding: 10px; cursor: pointer;
} }
}
}
}
.div-content {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resi-row-btn {
margin-bottom: 13px;
.upload-btn {
display: inline-block;
margin: 0 10px;
}
}
</style> </style>

Loading…
Cancel
Save