epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

269 lines
9.0 KiB

3 years ago
<template>
<div>
<div class="node-wrap" v-if="nodeConfig.laneLevel === 1">
3 years ago
<div class="node-wrap-box">
<div class="node-box-after">
<div class="nodeBoxTop" @click="gotoPersonnel">{{ spliceNameFun(nodeConfig, 18) }}</div>
3 years ago
</div>
</div>
</div>
<div class="branch-wrap">
<div class="branch-box-wrap">
<div class="branch-box">
<div class="col-box" v-for="(item, index) in nodeConfig.children" :key="index">
<div class="condition-node">
<div class="condition-node-box">
<div class="auto-judge">
<div v-if="item.laneLevel >= 2 && item.laneLevel <= 7 && item.partyOrgLevel < 8">
<div @click="gotoPersonnel" class="wgdzb" :title="getAllName(item)">{{ spliceNameFun(item, 18) }}</div>
3 years ago
</div>
<div v-if="item.partyOrgLevel === 8">
<div @click="gotoPersonnel" class="lydxz" :title="getAllName(item)">
{{ spliceNameFun(item, 18) }}
</div>
3 years ago
</div>
<div v-if="item.partyOrgLevel === 9">
<div @click="gotoPersonnel" class="dyzxh" :title="item.principalName">
{{ spliceNameFun(item, 3) }}
</div>
3 years ago
</div>
<div class="lxjtWrap" v-if="item.partyOrgLevel === 10">
<el-popover popper-class="popperClass" placement="right" trigger="hover">
3 years ago
<div class="popperList">
<div style="margin-bottom: 13px">家庭类别</div>
<div class="listMsg" v-for="item in homeTypeArr" :key="item">
<img :src="require(`@/assets/images/home/${getHomeTypesMap(item)[1]}.png`)" alt="" />
<span style="margin-left: 3px">{{ getHomeTypesMap(item)[0] }}</span>
3 years ago
</div>
<!-- <div class="listMsg">
3 years ago
<img src="@/assets/images/home/cjr.png" alt="" />
<span>残疾人</span>
</div>
<div class="listMsg">
<img src="@/assets/images/home/kclr.png" alt="" />
<span>空巢老人</span>
</div> -->
3 years ago
</div>
<div @click="gotoPersonnel" @mouseover="getHomeTypes(item.id)" slot="reference" class="lxjt" :title="item.principalName">
{{ spliceNameFun(item, 3) }}
3 years ago
<img src="@/assets/images/home/cjr.png" alt="" />
</div>
3 years ago
</el-popover>
</div>
</div>
</div>
</div>
<nodeWrap v-if="item.children" :nodeConfig.sync="item"></nodeWrap>
<template v-if="index == 0">
<div class="top-left-cover-line"></div>
<!-- <div class="bottom-left-cover-line"></div> -->
</template>
<template v-if="index == nodeConfig.children.length - 1">
<div class="top-right-cover-line"></div>
<!-- <div class="bottom-right-cover-line"></div> -->
</template>
</div>
</div>
<!-- <addNode :childNodeP.sync="nodeConfig.childNode"></addNode> -->
</div>
</div>
<nodeWrap v-if="nodeConfig.childNode" :nodeConfig.sync="nodeConfig.childNode"></nodeWrap>
</div>
</template>
<script>
// import { mapState, mapMutations } from "vuex";
export default {
props: ["nodeConfig"],
data() {
return {
homeTypeArr: [],
};
3 years ago
},
mounted() {},
computed: {},
watch: {},
methods: {
getAllName(item) {
return item.partyOrgName + item.principalName;
},
spliceNameFun(row, num) {
let allName = row.principalName ? row.principalNam : "";
if (num === 18) {
allName = row.partyOrgName + row.principalName;
}
if (allName.length > num) {
return allName.substring(0, num) + "...";
}
return allName;
},
// 家庭类别Map
getHomeTypesMap(item) {
const homeTypeMap = new Map([
["partyFlag", { name: "党员", icon: "dy" }],
["subsistenceAllowanceFlag", { name: "低保人员", icon: "dbry" }],
["ensureHouseFlag", { name: "保障房人员", icon: "bzfry" }],
["unemployedFlag", { name: "失业人员", icon: "syry" }],
["fertileWomanFlag", { name: "育龄妇女", icon: "ylfn" }],
["veteranFlag", { name: "退役军人", icon: "tyjr" }],
["unitedFrontFlag", { name: "统战人员", icon: "tzry" }],
["petitionOfficerFlag", { name: "信访人员", icon: "xfry" }],
["volunteerFlag", { name: "志愿者", icon: "zyz" }],
["oldPeopleFlag", { name: "老年人", icon: "lnr" }],
["emptyNesterFlag", { name: "空巢老人", icon: "kclr" }],
["specialSupportFlag", { name: "特扶人员", icon: "tfry" }],
["disabledFlag", { name: "失能人员", icon: "snry" }],
["dementedFlag", { name: "失智人员", icon: "szry" }],
["disabilityFlag", { name: "残疾人", icon: "cjr" }],
["seriousIllnessFlag", { name: "大病人员", icon: "dbry" }],
["chronicDiseaseFlag", { name: "慢性病人员", icon: "mxbry" }],
["specialCrowdFlag", { name: "特殊人群", icon: "tsry" }],
["tenantFlag", { name: "租户", icon: "zh" }],
["floatingFlag", { name: "流动人员", icon: "ldry" }],
["liveAloneFlag", { name: "独居老人", icon: "kclr" }],
["publicWelfareFlag", { name: "公益岗人员", icon: "gyg" }],
]);
return [homeTypeMap.get(item).name, homeTypeMap.get(item).icon];
},
getHomeTypes(id) {
this.$http.get(`/actual/base/organizational/structure/getResidentCategoryByHouseId?houseId=${"1495582904602800129"}`).then((res) => {
const { code, data } = res.data;
if (code === 0) {
const newItem = data[0];
const itemNumOne = Object.keys(newItem).filter((key) => newItem[key] === 1);
this.homeTypeArr = itemNumOne;
}
});
},
gotoPersonnel() {
this.$router.push("/organizational/orgPersonnel");
},
3 years ago
},
};
</script>
<style scoped lang="scss">
@mixin spanLevel {
font-size: 14px;
color: #fff;
word-break: break-all;
}
@mixin normalLevel {
display: flex;
align-items: center;
justify-content: space-around;
}
3 years ago
.node-box-after {
.nodeBoxTop {
3 years ago
font-size: 14px;
cursor: pointer;
3 years ago
position: relative;
color: #fff;
display: inline-block;
width: 168px;
height: 164px;
padding-top: 10px;
text-align: center;
background-image: url(~@/assets/images/home/firstLevel.png);
background-size: 100%;
// &::after {
// position: absolute;
// content: "";
// display: block;
// top: -7px;
// left: -16px;
// width: 168px;
// height: 164px;
// background-image: url(~@/assets/images/home/firstLevel.png);
// background-size: 100%;
// }
3 years ago
}
}
.auto-judge {
.wgdzb {
@include spanLevel;
3 years ago
width: 132px;
height: 96px;
text-align: center;
padding-top: 5px;
background-image: url(~@/assets/images/home/zbbg.png);
background-size: 100%;
// &::after {
// position: absolute;
// content: "";
// display: block;
// top: -7px;
// left: 0;
// width: 132px;
// height: 96px;
// background-image: url(~@/assets/images/home/zbbg.png);
// background-size: 100%;
// }
3 years ago
}
.lydxz {
@include spanLevel;
@include normalLevel;
width: 216px;
3 years ago
height: 50px;
padding-top: 5px;
background-image: url(~@/assets/images/home/lydxzTree.png);
background-size: 100%;
// &::after {
// position: absolute;
// content: "";
// display: block;
// top: -2px;
// left: -40px;
// width: 216px;
// height: 50px;
// background-image: url(~@/assets/images/home/lydxzTree.png);
// background-size: 100%;
// }
3 years ago
}
.dyzxh {
@include spanLevel;
@include normalLevel;
3 years ago
height: 118px;
width: 30px;
writing-mode: tb-rl;
margin-top: -12px;
background-image: url(~@/assets/images/home/dyzxhTree.png);
background-size: 100%;
// &::after {
// position: absolute;
// content: "";
// display: block;
// top: -19px;
// left: -8px;
// width: 30px;
// height: 118px;
// background-image: url(~@/assets/images/home/dyzxhTree.png);
// background-size: 100%;
// }
3 years ago
}
.lxjt {
@include spanLevel;
display: flex;
align-items: center;
justify-content: space-around;
3 years ago
height: 118px;
width: 30px;
writing-mode: tb-rl;
margin-top: -12px;
background-image: url(~@/assets/images/home/dyzxhTree.png);
background-size: 100%;
// &::after {
// position: absolute;
// content: "";
// display: block;
// top: -19px;
// left: -8px;
// width: 30px;
// height: 118px;
// }
3 years ago
}
}
</style>