Browse Source

更多信息

shibei_master
zhaoyongnian 3 years ago
parent
commit
5f5cdeb3bd
  1. 2
      src/views/modules/visual/basicinfo/cpts/people-more.vue
  2. 19
      src/views/modules/visual/plugin/power/components/house-dialog.vue
  3. 112
      src/views/modules/visual/plugin/power/organization.vue

2
src/views/modules/visual/basicinfo/cpts/people-more.vue

@ -16,7 +16,7 @@
v-for="(fieldSubList, index) in fieldList"> v-for="(fieldSubList, index) in fieldList">
<div class="list"> <div class="list">
<div class="item" <div class="item"
v-if="index == 0"> v-if="index == 0 && gridName">
<span class="item-field">所属网格</span> <span class="item-field">所属网格</span>
<span>{{ gridName }}</span> <span>{{ gridName }}</span>
</div> </div>

19
src/views/modules/visual/plugin/power/components/house-dialog.vue

@ -12,16 +12,22 @@
:tableContentStyle="headerStyle" :tableContentStyle="headerStyle"
:tableData="tableData" :tableData="tableData"
:visibleLoading="visibleLoading" :visibleLoading="visibleLoading"
:operate="false" :operate="true"
@look="handleLook"></screen-table> @look="handleLook"></screen-table>
</div> </div>
</div> </div>
<people-more v-show="showedMoreInfo"
v-if="info.id"
:userId="info.id"
:gridName="''"
@close="showedMoreInfo = false" />
</div> </div>
</template> </template>
<script> <script>
import screenTable from "../../../components/screen-table/index" import screenTable from "../../../components/screen-table/index"
import { requestPost } from "@/js/dai/request" import { requestPost } from "@/js/dai/request"
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
export default { export default {
name: 'info-dialog', name: 'info-dialog',
props: { props: {
@ -36,10 +42,12 @@ export default {
} }
}, },
components: { components: {
screenTable screenTable,
peopleMore
}, },
data () { data () {
return { return {
showedMoreInfo: false,
headerList: [ headerList: [
{ title: "序号", coulmn: 'index' }, { title: "序号", coulmn: 'index' },
{ title: "家庭成员", coulmn: 'name' }, { title: "家庭成员", coulmn: 'name' },
@ -59,7 +67,8 @@ export default {
{ width: '240px' } { width: '240px' }
], ],
tableData: [], tableData: [],
visibleLoading: true visibleLoading: true,
info: {}
} }
}, },
created () { created () {
@ -70,7 +79,9 @@ export default {
this.$emit('close') this.$emit('close')
}, },
async handleLook (val) { async handleLook (val) {
console.log(val) this.info = { ...val }
console.log(JSON.stringify(val))
this.showedMoreInfo = true
}, },
async getInfo () { async getInfo () {
this.visibleLoading = true this.visibleLoading = true

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

@ -1,11 +1,38 @@
<template> <template>
<div class="warning-box"> <div class="warning-box">
<cpt-card> <cpt-card>
<div class="card-title"> <!-- <div class="card-title">
<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">
组织架构 组织架构
</div> </div>
</div> -->
<div class="title">
<img src="../../../../../assets/img/shuju/title-tip.png" />
<span>组织架构</span>
<div class="second-select cascader">
<el-cascader class="customer_cascader"
ref="myCascader"
placeholder="请选择所属组织"
:options="agencytree"
v-model="agencyId"
:show-all-levels="false"
:props="{ expandTrigger: 'hover', emitPath: false, label: 'orgName', value: 'orgId', children: 'subOrgList' }"
clearable/>
</div>
<!-- <div class="second-select ">
<el-date-picker v-model="dateIdShow"
type="date"
:clearable="false"
@change="handleChangeDate"
:picker-options="pickerOptions"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</div> -->
</div> </div>
<div class="card-panel"> <div class="card-panel">
<div class="card-left"> <div class="card-left">
@ -113,6 +140,7 @@ export default {
tableData: [ tableData: [
// [1,'','','2',''], // [1,'','','2',''],
], ],
agencytree: [],
agencyId: '', agencyId: '',
noInit: false, noInit: false,
visibleLoading: false, visibleLoading: false,
@ -141,12 +169,13 @@ export default {
// 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 = '50140d770c578100328792121aa7b3c5' // this.agencyId = '50140d770c578100328792121aa7b3c5'
this.axisStructId = '1518062548749725697' this.axisStructId = '1518062548749725697'
await nextTick(100) await nextTick(100)
this.getStructTree() await this.getAgencylist()//
this.getCount() await this.getStructTree()
this.getMapData() await this.getCount()
await this.getMapData()
}, },
methods: { methods: {
onClickNode (e) { onClickNode (e) {
@ -321,16 +350,85 @@ export default {
// path: `/main-shuju/visual-basicinfo-people/${val.userId}`, // path: `/main-shuju/visual-basicinfo-people/${val.userId}`,
// }) // })
// }, // },
//
async getAgencylist () {
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)
this.agencyId = this.agencytree ? this.agencytree[0].orgId : ''
}
}
} 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;
},
async handleChangeAgency (value) {
let selAgency = this.$refs["myCascader"].getCheckedNodes()[0].data
// this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.agencyName = selAgency.name
this.agencyId = selAgency.agencyId
this.level = selAgency.level === 'grid' ? 'grid' : 'agency'
},
}, },
} }
</script> </script>
<style
lang="scss"
src="@/assets/scss/modules/visual/typeAnalyze.scss"
scoped
></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/personCategory.scss"
scoped
></style>
<style <style
lang="scss" lang="scss"
src="@/assets/scss/modules/visual/warning.scss" src="@/assets/scss/modules/visual/warning.scss"
scoped scoped
></style> ></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.second-select {
margin: 0 10px 0 40px !important;
}
.card-title { .card-title {
display: flex; display: flex;
align-items: center; align-items: center;

Loading…
Cancel
Save