Browse Source

Merge branch 'dev_pli_power_axis' of http://121.42.41.42:7070/r/epmet-oper-gov into dev_pli_power_axis

shibei_master
YUJT 3 years ago
parent
commit
e348a8e68b
  1. 242
      src/views/modules/plugins/power/kernelhousehold.vue
  2. 180
      src/views/modules/plugins/power/kernelhouseholdForm.vue
  3. 222
      src/views/modules/plugins/power/kernelhouseholdTable.vue
  4. 33
      src/views/modules/visual/plugin/power/components/info-dialog.vue
  5. 317
      src/views/modules/visual/plugin/power/components/screen-org-tree.vue
  6. 79
      src/views/modules/visual/plugin/power/organization.vue

242
src/views/modules/plugins/power/kernelhousehold.vue

@ -0,0 +1,242 @@
<template>
<div>
<div class="div_search">
<el-form :rules="dataRule" :inline="true">
<el-form-item label="所属组织" prop="deptName">
<el-cascader
style="width:350px"
placeholder="请选择所属组织"
:options="agencytree"
v-model="agencyId"
:props="{ expandTrigger: 'hover', label: 'orgName', value: 'orgId', children: 'subOrgList' }"
clearable/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="loadTree()">加载动力主轴</el-button>
</el-form-item>
</el-form>
</div>
<div class="div_main">
<div :style="{height:rowHeight}"
class="div_tree">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-scrollbar :style="{height:treeHeight}"
class="scrollar">
<el-tree ref="ref_tree"
v-loading="treeLoading"
class="filter_tree"
:data="treeData"
:props="defaultProps"
:highlight-current="true"
node-key="id"
:expand-on-click-node="false"
default-expand-all
:filter-node-method="filterNode"
@node-click="handleNodeClick">
</el-tree>
</el-scrollbar>
</div>
<div :style="{height:rowHeight}"
class="div_table">
<kernelhousehold-table :axisStructId="axisStructId" ref="ref_communityTable"></kernelhousehold-table>
</div>
</div>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import kernelhouseholdTable from './kernelhouseholdTable'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
data () {
return {
agencytree: [], //
agencyId: '',
filterText: '',
treeLoading: false,
treeData: [],
defaultProps: {
children: 'children',
label: 'name'
},
selTreeObj: {},
centerPoint: [],
axisStructId: '' // id
}
},
async mounted () {
// this.treeLoading = true
// await this.loadTree()
await this.getAgencyTree()
// this.treeLoading = false
},
computed: {
rowHeight () {
return this.$store.state.inIframe ? this.clientHeight - 230 + this.iframeHeight + 'px' : this.clientHeight - 230 + 'px'
},
treeHeight () {
return this.$store.state.inIframe ? this.clientHeight - 310 + this.iframeHeight + 'px' : this.clientHeight - 310 + 'px'
},
...mapGetters(['clientHeight', 'iframeHeight']),
dataRule () {
return {
deptName:[
{ required: true, message: "请选择", trigger: "blur" }
]
}
}
},
methods: {
async loadTree () {
this.axisStructId = ''
if (this.agencyId.length === 0 || !this.agencyId) {
return this.$message.error('请选择所属组织')
}
this.treeLoading = true
const url = "/pli/power/data/axis/structTree"
let params = {
agencyId: this.agencyId[this.agencyId.length-1]
}
const { data, code, msg } = await requestPost(url, params)
this.treeLoading = false
if (code === 0) {
this.treeData = data
} else {
this.$message.error(msg)
}
},
handleNodeClick (obj) {
this.axisStructId = obj.id
},
filterNode (value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
//
async getAgencyTree(){
const url = '/data/aggregator/org/agencytree'
let params = {
agencyId:this.agencyId,
client:'gov'
}
const { data, code, msg } = await requestPost(url,params)
if (code === 0) {
let _data
if (data) {
_data = this.removeByOrgType(data, 'agency')
if (_data) {
this.agencytree = this.removeEmptySubOrgList(_data)
}
}
} else {
this.$message.error(msg)
}
},
removeByOrgType (orgArray, orgType) {
if (orgArray && orgArray.length > 0) {
for (let p = orgArray.length - 1; p >= 0; p--) {
let orgInfo = orgArray[p]
if (orgInfo) {
if (orgInfo.orgType !== orgType) {
orgArray.splice(p, 1)
} else {
this.removeByOrgType(orgInfo.subOrgList, orgType)
}
}
}
}
return orgArray
},
removeEmptySubOrgList (orgArray) {
orgArray.forEach((orgInfo) => {
if (orgInfo && orgInfo.subOrgList) {
if (orgInfo.subOrgList.length === 0) {
orgInfo.subOrgList = undefined
} else {
this.removeEmptySubOrgList(orgInfo.subOrgList)
}
}
})
return orgArray;
}
},
watch: {
filterText (val) {
this.$refs.ref_tree.filter(val);
}
},
components: {
kernelhouseholdTable, CDialog
}
}
</script>
<style lang="scss" scoped >
.div_search {
width: calc(100% - 5px);
background: #ffffff;
border-radius: 4px;
padding: 30px 20px 5px;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1);
}
.div_main {
margin-top: 10px;
display: flex;
}
.scrollar {
margin-top: 10px;
}
.div_tree {
flex: 0 0 280px;
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
overflow-y: hidden;
}
.filter_tree {
overflow-x: auto;
}
.div_table {
margin-left: 15px;
// flex: 1;
width: calc(100% - 300px);
background-color: #ffffff;
border-radius: 5px;
padding: 10px;
}
.div_btn {
margin-top: 20px;
}
.row {
padding: 10px;
}
</style>
<style>
/* .aui-content > .el-tabs > .el-tabs__content {
padding: 0px;
} */
.el-tree-node:focus > .el-tree-node__content {
/* background-color: #ccc !important; */
color: #2195fe;
}
</style>
<style lang="scss" scoped>
.div_tree {
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
}
</style>

180
src/views/modules/plugins/power/kernelhouseholdForm.vue

@ -0,0 +1,180 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房屋</div>
<div class="resi-cell-value">
<el-input v-model="keyword"
style="width:350px"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入“小区名称,楼号,如:亿联小区,1号楼">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
</div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
@selection-change="selectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column prop="houseName"
label="房屋名称">
</el-table-column>
<el-table-column prop="neighborHoodName"
label="所属小区">
</el-table-column>
<el-table-column prop="buildingName"
label="所属楼栋">
</el-table-column>
<el-table-column prop="ownerName"
label="房主姓名">
</el-table-column>
<el-table-column prop="ownerPhone"
label="房主电话">
</el-table-column>
</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>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<el-button size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { requestPost } from "@/js/dai/request";
export default {
data () {
return {
btnDisable: false,
keyword: '',
//
tableData: [],
tableLoading: false,
selection: [],
total: 0,
pageSize: 20,
pageNo: 0,
}
},
props: {
axisStructId: { // id
type: String,
default: ''
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeight : this.clientHeight - 410
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
components: {},
// mounted () {
// this.tableLoading = true
// this.loadTable()
// },
methods: {
//
handleSearch() {
this.tableLoading = true
this.loadTable()
},
selectionChange (selection) {
this.selection = []
selection.forEach(element => {
this.selection.push(element.houseId)
});
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
async handleComfirm () {
if (this.selection.length === 0 || !this.selection) {
return this.$message.error('请选择房屋')
}
const url = "/pli/power/kernelHousehold/bind";
let params = {
axisStructId: this.axisStructId,
houseIdList: this.selection
}
const { data, code, msg } = await requestPost(url, params);
this.tableLoading = false
if (code === 0) {
this.$emit('dialogOk')
}
},
//
handleCancle () {
this.$emit('dialogCancle')
},
//
async loadTable () {
const url = "/gov/org/house/search";
let params = {
keyword: this.keyword,
pageSize: this.pageSize,
pageNo: this.pageNo
}
const { data, code, msg } = await requestPost(url, params);
this.tableLoading = false
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list ? data.list.map((item) => { return item }) : []
}
}
},
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>
<style lang="scss" scoped>
.div_btn{
display: flex;
align-items: center;
justify-content: center;
}
</style>

222
src/views/modules/plugins/power/kernelhouseholdTable.vue

@ -0,0 +1,222 @@
<template>
<div>
<div class="div_search">
<div class="resi-cell">
<div class="resi-cell-label">房主姓名</div>
<div class="resi-cell-value">
<el-input v-model="ownerName"
class="resi-cell-input"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</div>
</div>
<el-button style="margin-left:10px"
class="diy-button--search"
size="small"
@click="handleSearch">查询</el-button>
</div>
<div class="div_btn">
<el-button style=""
class="diy-button--add"
size="small"
@click="handleAdd">绑定</el-button>
</div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column prop="ownerName"
label="姓名"
width="100">
</el-table-column>
<el-table-column prop="address"
label="地址">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="80"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
class="div-table-button--delete"
size="small"
@click="handleDelete(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</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>
<!-- 修改弹出框 -->
<el-dialog :visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="diaClose">
<kernelhousehold-form ref="ref_form"
@dialogCancle="addFormCancle"
@dialogOk="addFormOk"
:axisStructId="axisStructId"></kernelhousehold-form>
</el-dialog>
</div>
</template>
<script>
import KernelhouseholdForm from './kernelhouseholdForm'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
export default {
data () {
return {
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: false,
ownerName: '',
tableData: [],
//form
formShow: false,
formTitle: '绑定'
}
},
components: {
KernelhouseholdForm
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeight : this.clientHeight - 410
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
async loadTable () {
this.tableLoading = true
const url = "/pli/power/kernelHousehold/page"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
axisStructId: this.axisStructId,
ownerName: this.ownerName
}
const { data, code, msg, total } = await requestPost(url, params)
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list ? data.list.map((item) => { return item }) : []
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
//
async handleDelete (id) {
this.$confirm("确认删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.deleteKernelhousehold(id)
}).catch(err => {
console.log('取消删除')
})
},
async deleteKernelhousehold (id) {
const url = "/pli/power/kernelHousehold/delete"
const { data, code, msg } = await requestPost(url, [id])
if (code === 0) {
this.$message({
type: "success",
message: "删除成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
handleSearch () {
if (!this.axisStructId) {
return this.$message.error('请选择动力主轴节点')
}
this.loadTable()
},
diaClose () {
// this.$refs.ref_form.resetData()
this.formShow = false
},
handleAdd () {
if (this.axisStructId) {
this.formShow = true
} else {
return this.$message.error('请选择动力主轴节点')
}
},
addFormCancle () {
this.formShow = false
},
addFormOk () {
this.formShow = false
this.loadTable()
},
},
props: {
axisStructId: {
type: String,
default: '',
}
},
watch: {
axisStructId (newName) {
if (newName) {
this.pageSize = 20
this.pageNo = 1
this.loadTable()
} else {
this.pageSize = 20
this.pageNo = 0
this.total = 0;
this.tableData = []
}
}
},
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>
<style >
.el-message.is-closable .el-message__content {
line-height: 20px;
}
</style>

33
src/views/modules/visual/plugin/power/components/info-dialog.vue

@ -5,21 +5,22 @@
<img class="title-icon" src="../../../../../../assets/img/shuju/title-tip.png" /> <img class="title-icon" src="../../../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">信息详情</div> <div class="title-label">信息详情</div>
</div> </div>
<div class="info-dialog-content"> <div class="info-dialog-content" v-if="infoDetail">
<div class="info-dialog-content-item"> <div class="info-dialog-content-item">
<img class="info-dialog-content-item-img" src=""> <img class="info-dialog-content-item-img" :src="infoDetail.avatar">
<div class="info-dialog-content-item-info"> <div class="info-dialog-content-item-info">
<div class="info-dialog-content-item-info-name">杨磊{{axisStructId}}</div> <div class="info-dialog-content-item-info-name">{{infoDetail.name}}</div>
<div class="info-dialog-content-item-info-mobile">手机号1500000000</div> <div class="info-dialog-content-item-info-mobile">手机号{{infoDetail.mobile}}</div>
<div class="info-dialog-content-item-info-mobile">类别社区书记</div> <div class="info-dialog-content-item-info-mobile">类别{{infoDetail.categoryName}}</div>
</div> </div>
</div> </div>
<div class="info-dialog-content-intro" style="margin-top: 30px;">简介xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div> <div class="info-dialog-content-intro" style="margin-top: 30px;">简介{{infoDetail.introduction}}</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { requestPost } from "@/js/dai/request"
export default { export default {
name: 'info-dialog', name: 'info-dialog',
props: { props: {
@ -46,6 +47,11 @@ export default {
this.getInfo() this.getInfo()
} }
}, },
data () {
return {
infoDetail: {}
}
},
created () { created () {
this.getInfo() this.getInfo()
}, },
@ -53,8 +59,19 @@ export default {
closeDialog () { closeDialog () {
this.$emit('close') this.$emit('close')
}, },
getInfo () { async getInfo () {
console.log(this.axisStructId, this.leaderId) // console.log(this.axisStructId, this.leaderId)
const url = "/pli/power/data/axis/leader"
let params = {
axisStructId: this.axisStructId,
leaderId: this.leaderId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.infoDetail = data
} else {
this.$message.error(msg)
}
} }
} }
} }

317
src/views/modules/visual/plugin/power/components/screen-org-tree.vue

@ -5,12 +5,12 @@
<div class="level-1-row-item"> <div class="level-1-row-item">
<img class="level-1-row-item-line" src="../../../../../../assets/img/plugins/zuo.png"> <img class="level-1-row-item-line" src="../../../../../../assets/img/plugins/zuo.png">
<div class="level-1-row-item-content"> <div class="level-1-row-item-content">
<div class="level-1-row-item-content-info"> <div class="level-1-row-item-content-info" @click.stop="onClickNode(level1.id)">
<img src="../../../../../../assets/img/plugins/dangqi.png" class="level-1-row-item-content-info-icon"> <img src="../../../../../../assets/img/plugins/dangqi.png" class="level-1-row-item-content-info-icon">
<div class="level-1-row-item-content-info-text"> <div class="level-1-row-item-content-info-text">
<div class="level-1-row-item-content-info-text-title">{{level1.name}}</div> <div class="level-1-row-item-content-info-text-title">{{level1.name}}</div>
<div class="level-1-row-item-content-info-text-leader">书记: {{level1.leaderName}} <div class="level-1-row-item-content-info-text-leader">书记: {{level1.leaderName}}
<img src="../../../../../../assets/img/plugins/shuoming-X.png" class="level-1-row-item-content-info-text-leader-icon" @click="onShowInfoDialog(level1.id, level1.leaderId, $event)"> <img src="../../../../../../assets/img/plugins/shuoming-X.png" class="level-1-row-item-content-info-text-leader-icon" @click.stop="onShowInfoDialog(level1.id, level1.leaderId, $event)">
</div> </div>
</div> </div>
</div> </div>
@ -20,21 +20,21 @@
</div> </div>
</div> </div>
<div class="level-2-row"> <div class="level-2-row">
<div class="level-2-row-item" v-for="(level2, index2) in level1.children" :key="index2"> <div class="level-2-row-item" v-for="(level2, index2) in level1.children" :key="index2" @click.stop="onClickNode(level2.id)">
<img class="level-2-row-item-top" src="../../../../../../assets/img/plugins/jiantou-A.png"> <img class="level-2-row-item-top" src="../../../../../../assets/img/plugins/jiantou-A.png">
<div class="level-2-row-item-content"> <div class="level-2-row-item-content">
<img src="../../../../../../assets/img/plugins/danghui.png" class="level-2-row-item-content-icon"> <img src="../../../../../../assets/img/plugins/danghui.png" class="level-2-row-item-content-icon">
<div class="level-2-row-item-content-title">{{level2.name}}</div> <div class="level-2-row-item-content-title">{{level2.name}}</div>
<div class="level-2-row-item-content-leader">书记: {{level2.leaderName}} <div class="level-2-row-item-content-leader">书记: {{level2.leaderName}}
<img src="../../../../../../assets/img/plugins/shuoming-X.png" class="level-2-row-item-content-leader-icon" @click="onShowInfoDialog(level2.id, level2.leaderId, $event)"> <img src="../../../../../../assets/img/plugins/shuoming-X.png" class="level-2-row-item-content-leader-icon" @click.stop="onShowInfoDialog(level2.id, level2.leaderId, $event)">
</div> </div>
</div> </div>
<img class="level-2-row-item-bottom" src="../../../../../../assets/img/plugins/jiantou-X.png"> <img class="level-2-row-item-bottom" src="../../../../../../assets/img/plugins/jiantou-X.png">
<div class="level-3-item" v-for="(level3, index3) in level2.children" :key="index3"> <div class="level-3-item" v-for="(level3, index3) in level2.children" :key="index3" @click.stop="onClickNode(level3.id)">
<img src="../../../../../../assets/img/plugins/dian.png" class="level-3-item-icon"> <img src="../../../../../../assets/img/plugins/dian.png" class="level-3-item-icon">
<div class="level-3-item-title">{{level3.name}}</div> <div class="level-3-item-title">{{level3.name}}</div>
<div class="level-3-item-leader">{{level3.leaderName}}</div> <div class="level-3-item-leader">{{level3.leaderName}}</div>
<img class="level-3-item-leader-icon" src="../../../../../../assets/img/plugins/shuoming-X.png" @click="onShowInfoDialog(level3.id, level3.leaderId, $event)"> <img class="level-3-item-leader-icon" src="../../../../../../assets/img/plugins/shuoming-X.png" @click.stop="onShowInfoDialog(level3.id, level3.leaderId, $event)">
</div> </div>
</div> </div>
</div> </div>
@ -57,156 +57,161 @@ export default {
components: { components: {
infoDialog infoDialog
}, },
data() { props: {
return { list: {
list: [ type: Array
{
id: '0',
name: '兴德路社区党委',
leaderId: '0',
leaderName: '杨磊',
children: [
{
id: '1',
name: '第一党支部',
leaderId: '1',
leaderName: '吴红',
children: [
{
id: '11',
name: '第一党小组第一党小组第一党小组',
leaderId: '11',
leaderName: '吴红',
children: []
},
{
id: '12',
name: '第二党小组',
leaderId: '12',
leaderName: '牟振华',
children: []
},
{
id: '31',
name: '第三党小组',
leaderId: '31',
leaderName: '吴红',
children: []
},
{
id: '42',
name: '第四党小组',
leaderId: '42',
leaderName: '牟振华',
children: []
}
]
},
{
id: '2',
name: '第二党支部',
leaderId: '2',
leaderName: '吴红',
children: [
{
id: '21',
name: '第一党小组',
leaderId: '21',
leaderName: '吴红',
children: []
},
{
id: '22',
name: '第二党小组',
leaderId: '22',
leaderName: '牟振华',
children: []
},
{
id: '31',
name: '第三党小组',
leaderId: '31',
leaderName: '吴红',
children: []
},
{
id: '42',
name: '第四党小组',
leaderId: '42',
leaderName: '牟振华',
children: []
} }
]
},
{
id: '3',
name: '第三党支部',
leaderId: '3',
leaderName: '吴红',
children: [
{
id: '31',
name: '第一党小组',
leaderId: '31',
leaderName: '吴红',
children: []
}, },
{ data() {
id: '32', return {
name: '第二党小组', // list: [
leaderId: '32', // {
leaderName: '牟振华', // id: '0',
children: [] // name: '',
} // leaderId: '0',
] // leaderName: '',
}, // children: [
{ // {
id: '4', // id: '1',
name: '第四党支部', // name: '',
leaderId: '4', // leaderId: '1',
leaderName: '吴红', // leaderName: '',
children: [ // children: [
{ // {
id: '41', // id: '11',
name: '第一党小组', // name: '',
leaderId: '41', // leaderId: '11',
leaderName: '吴红', // leaderName: '',
children: [] // children: []
}, // },
{ // {
id: '42', // id: '12',
name: '第二党小组', // name: '',
leaderId: '42', // leaderId: '12',
leaderName: '牟振华', // leaderName: '',
children: [] // children: []
} // },
] // {
}, // id: '31',
{ // name: '',
id: '5', // leaderId: '31',
name: '第五党支部', // leaderName: '',
leaderId: '5', // children: []
leaderName: '吴红', // },
children: [ // {
{ // id: '42',
id: '51', // name: '',
name: '第一党小组', // leaderId: '42',
leaderId: '51', // leaderName: '',
leaderName: '吴红', // children: []
children: [] // }
}, // ]
{ // },
id: '52', // {
name: '第二党小组', // id: '2',
leaderId: '52', // name: '',
leaderName: '牟振华', // leaderId: '2',
children: [] // leaderName: '',
} // children: [
] // {
} // id: '21',
] // name: '',
} // leaderId: '21',
], // leaderName: '',
// children: []
// },
// {
// id: '22',
// name: '',
// leaderId: '22',
// leaderName: '',
// children: []
// },
// {
// id: '31',
// name: '',
// leaderId: '31',
// leaderName: '',
// children: []
// },
// {
// id: '42',
// name: '',
// leaderId: '42',
// leaderName: '',
// children: []
// }
// ]
// },
// {
// id: '3',
// name: '',
// leaderId: '3',
// leaderName: '',
// children: [
// {
// id: '31',
// name: '',
// leaderId: '31',
// leaderName: '',
// children: []
// },
// {
// id: '32',
// name: '',
// leaderId: '32',
// leaderName: '',
// children: []
// }
// ]
// },
// {
// id: '4',
// name: '',
// leaderId: '4',
// leaderName: '',
// children: [
// {
// id: '41',
// name: '',
// leaderId: '41',
// leaderName: '',
// children: []
// },
// {
// id: '42',
// name: '',
// leaderId: '42',
// leaderName: '',
// children: []
// }
// ]
// },
// {
// id: '5',
// name: '',
// leaderId: '5',
// leaderName: '',
// children: [
// {
// id: '51',
// name: '',
// leaderId: '51',
// leaderName: '',
// children: []
// },
// {
// id: '52',
// name: '',
// leaderId: '52',
// leaderName: '',
// children: []
// }
// ]
// }
// ]
// }
// ],
showInfo: false, // showInfo: false, //
pos: { x: 0, y: 0 }, // pos: { x: 0, y: 0 }, //
axisStructId: '', // id axisStructId: '', // id
@ -223,6 +228,10 @@ export default {
this.pos.x = e.layerX this.pos.x = e.layerX
this.pos.y = e.layerY this.pos.y = e.layerY
this.showInfo = true this.showInfo = true
},
onClickNode (id) {
console.log(id)
this.$emit('onClickNode', { id: id })
} }
}, },
} }

79
src/views/modules/visual/plugin/power/organization.vue

@ -11,10 +11,12 @@
<div class="card-left"> <div class="card-left">
<!-- <div class="card-item-title">小标题</div> --> <!-- <div class="card-item-title">小标题</div> -->
<div class="card-left-top"> <div class="card-left-top">
<screen-org-tree></screen-org-tree> <screen-org-tree :list="list" @onClickNode="onClickNode"></screen-org-tree>
</div> </div>
<div class="card-left-bottom"> <div class="card-left-bottom">
<screen-table :headerList="headerList" <screen-table :headerStyle="headerStyle"
:headerList="headerList"
:tableContentStyle="headerStyle"
:tableData="tableData" :tableData="tableData"
:visibleLoading="visibleLoading" :visibleLoading="visibleLoading"
:operate="true" :operate="true"
@ -38,7 +40,7 @@
<template v-slot:title>{{item.title}}</template> <template v-slot:title>{{item.title}}</template>
</screen-top-count> </screen-top-count>
</div> </div>
<div class="card-title" style="margin-left: 20px; margin-bottom: 10px;"> <div class="card-title" style="margin-left: 20px; margin-bottom: 20px; margin-top: 20px;">
<img class="title-icon" src="../../../../../assets/img/shuju/title-tip.png" /> <img class="title-icon" src="../../../../../assets/img/shuju/title-tip.png" />
<div class="title-label"> <div class="title-label">
网格分布 网格分布
@ -90,9 +92,14 @@ export default {
data() { data() {
return { return {
headerList: [ headerList: [
{ title: "序号", coulmn: 'index' }, { title: "序号", coulmn: 'index', width: '100px' },
{ title: "活动标题", coulmn: 'title' }, { title: "党员", coulmn: 'ownerName' },
{ title: "单位名称", coulmn: 'unitName' } { title: "地址", coulmn: 'address' }
],
headerStyle: [
{ width: '100px' },
{ width: '200px' },
{ width: '400px' }
], ],
tableData: [ tableData: [
// [1,'','','2',''], // [1,'','','2',''],
@ -101,7 +108,7 @@ export default {
noInit: false, noInit: false,
visibleLoading: true, visibleLoading: true,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 5,
total: 0, total: 0,
list: [], list: [],
countList: { countList: {
@ -111,19 +118,27 @@ export default {
partyMemberNum: { index: 3, title: '党员数', value: '0' }, partyMemberNum: { index: 3, title: '党员数', value: '0' },
serviceStationNum: { index: 4, title: '网格党群服务站实体阵地数', value: '0' }, serviceStationNum: { index: 4, title: '网格党群服务站实体阵地数', value: '0' },
volunteerTeamNum: { index: 5, title: '志愿者队伍', value: '0' } volunteerTeamNum: { index: 5, title: '志愿者队伍', value: '0' }
} },
axisStructId: '', //
} }
}, },
async mounted() { async mounted() {
this.showInfo = false this.showInfo = false
const { user } = this.$store.state // const { user } = this.$store.state
this.agencyId = user.agencyId // this.agencyId = user.agencyId
console.log('agencyId-------', this.agencyId) // console.log('agencyId-------', this.agencyId)
this.agencyId = '1495655378069753857'
this.axisStructId = '1517389077596463106'
await nextTick(100) await nextTick(100)
this.getStructTree()
this.getCount() this.getCount()
this.getList() this.getMapData()
}, },
methods: { methods: {
onClickNode (e) {
this.axisStructId = e.id
this.getList()
},
async handleLook (val) { async handleLook (val) {
console.log(val.id) console.log(val.id)
}, },
@ -137,18 +152,17 @@ export default {
this.getList() this.getList()
}, },
getList() { getList() {
this.tableData = []
this.visibleLoading = true this.visibleLoading = true
let params = { let params = {
agencyId: this.agencyId, axisStructId: this.axisStructId,
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
serviceMatter: '',
startTime: '',
endTime: ''
} }
const url = "/heart/icpartyactivity/activitylist" const url = "/pli/power/data/kernelHousehold/list"
this.$http.post(url, params).then(res => { this.$http.post(url, params).then(res => {
this.tableData = res.data.data.list.map((item, index) => { this.total = parseInt(res.data.total)
this.tableData = res.data.data.map((item, index) => {
return { return {
...item, ...item,
index: index + 1 index: index + 1
@ -173,6 +187,32 @@ export default {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
async getStructTree() {
const url = "/pli/power/data/axis/structTree"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.list = data
this.axisStructId = this.list[0].id
this.getList()
} else {
this.$message.error(msg)
}
},
getMapData() {
let params = {
axisStructId: this.axisStructId,
limit: 99
}
const url = "/pli/power/data/kernelHousehold/listPosition"
this.$http.post(url, params).then(res => {
console.log(res.data.data)
}).catch(err => {
this.$message.error(err)
})
},
// handleClickRow(val) { // handleClickRow(val) {
// console.log('click-row----', val) // console.log('click-row----', val)
// this.$router.push({ // this.$router.push({
@ -261,6 +301,9 @@ export default {
background: #002e74; background: #002e74;
} }
} }
/deep/ .warning-table .table {
min-height: 300px;
}
} }
} }
.card-right { .card-right {

Loading…
Cancel
Save