Browse Source

优化

shibei_master
ZhaoTongYao 3 years ago
parent
commit
16b7736fb6
  1. 33
      src/views/modules/visual/plugin/power/components/info-dialog.vue
  2. 317
      src/views/modules/visual/plugin/power/components/screen-org-tree.vue
  3. 79
      src/views/modules/visual/plugin/power/organization.vue

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" />
<div class="title-label">信息详情</div>
</div>
<div class="info-dialog-content">
<div class="info-dialog-content" v-if="infoDetail">
<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-name">杨磊{{axisStructId}}</div>
<div class="info-dialog-content-item-info-mobile">手机号1500000000</div>
<div class="info-dialog-content-item-info-mobile">类别社区书记</div>
<div class="info-dialog-content-item-info-name">{{infoDetail.name}}</div>
<div class="info-dialog-content-item-info-mobile">手机号{{infoDetail.mobile}}</div>
<div class="info-dialog-content-item-info-mobile">类别{{infoDetail.categoryName}}</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>
</template>
<script>
import { requestPost } from "@/js/dai/request"
export default {
name: 'info-dialog',
props: {
@ -46,6 +47,11 @@ export default {
this.getInfo()
}
},
data () {
return {
infoDetail: {}
}
},
created () {
this.getInfo()
},
@ -53,8 +59,19 @@ export default {
closeDialog () {
this.$emit('close')
},
getInfo () {
console.log(this.axisStructId, this.leaderId)
async getInfo () {
// 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">
<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-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">
<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-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>
@ -20,21 +20,21 @@
</div>
</div>
<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">
<div class="level-2-row-item-content">
<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-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>
<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">
<div class="level-3-item-title">{{level3.name}}</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>
@ -57,156 +57,161 @@ export default {
components: {
infoDialog
},
props: {
list: {
type: Array
}
},
data() {
return {
list: [
{
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: []
},
{
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: []
}
]
}
]
}
],
// list: [
// {
// 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: []
// },
// {
// 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, //
pos: { x: 0, y: 0 }, //
axisStructId: '', // id
@ -223,6 +228,10 @@ export default {
this.pos.x = e.layerX
this.pos.y = e.layerY
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-item-title">小标题</div> -->
<div class="card-left-top">
<screen-org-tree></screen-org-tree>
<screen-org-tree :list="list" @onClickNode="onClickNode"></screen-org-tree>
</div>
<div class="card-left-bottom">
<screen-table :headerList="headerList"
<screen-table :headerStyle="headerStyle"
:headerList="headerList"
:tableContentStyle="headerStyle"
:tableData="tableData"
:visibleLoading="visibleLoading"
:operate="true"
@ -38,7 +40,7 @@
<template v-slot:title>{{item.title}}</template>
</screen-top-count>
</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" />
<div class="title-label">
网格分布
@ -90,9 +92,14 @@ export default {
data() {
return {
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "活动标题", coulmn: 'title' },
{ title: "单位名称", coulmn: 'unitName' }
{ title: "序号", coulmn: 'index', width: '100px' },
{ title: "党员", coulmn: 'ownerName' },
{ title: "地址", coulmn: 'address' }
],
headerStyle: [
{ width: '100px' },
{ width: '200px' },
{ width: '400px' }
],
tableData: [
// [1,'','','2',''],
@ -101,7 +108,7 @@ export default {
noInit: false,
visibleLoading: true,
pageNo: 1,
pageSize: 10,
pageSize: 5,
total: 0,
list: [],
countList: {
@ -111,19 +118,27 @@ export default {
partyMemberNum: { index: 3, title: '党员数', value: '0' },
serviceStationNum: { index: 4, title: '网格党群服务站实体阵地数', value: '0' },
volunteerTeamNum: { index: 5, title: '志愿者队伍', value: '0' }
}
},
axisStructId: '', //
}
},
async mounted() {
this.showInfo = false
const { user } = this.$store.state
this.agencyId = user.agencyId
console.log('agencyId-------', this.agencyId)
// const { user } = this.$store.state
// this.agencyId = user.agencyId
// console.log('agencyId-------', this.agencyId)
this.agencyId = '1495655378069753857'
this.axisStructId = '1517389077596463106'
await nextTick(100)
this.getStructTree()
this.getCount()
this.getList()
this.getMapData()
},
methods: {
onClickNode (e) {
this.axisStructId = e.id
this.getList()
},
async handleLook (val) {
console.log(val.id)
},
@ -137,18 +152,17 @@ export default {
this.getList()
},
getList() {
this.tableData = []
this.visibleLoading = true
let params = {
agencyId: this.agencyId,
axisStructId: this.axisStructId,
pageSize: this.pageSize,
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.tableData = res.data.data.list.map((item, index) => {
this.total = parseInt(res.data.total)
this.tableData = res.data.data.map((item, index) => {
return {
...item,
index: index + 1
@ -173,6 +187,32 @@ export default {
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) {
// console.log('click-row----', val)
// this.$router.push({
@ -261,6 +301,9 @@ export default {
background: #002e74;
}
}
/deep/ .warning-table .table {
min-height: 300px;
}
}
}
.card-right {

Loading…
Cancel
Save