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.

198 lines
6.6 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">
<nameSplit :item="nodeConfig" areaName="partyOrgName" peopleName="principalName" pageName="党组织架构" />
</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 :class="[item.children && item.children.length > 0 ? 'wgdzbHover' : 'wgdzb']">
<nameSplit :item="item" areaName="partyOrgName" peopleName="principalName" pageName="党组织架构" />
</div>
<div v-if="item._children" style="text-align: center; cursor: pointer" @click="getChildrenData(item, index, nodeConfig.children)">
<img v-if="item.children && item.children.length > 0" :src="require('@/assets/images/home/sh.png')" alt="" />
<img v-else :src="require('@/assets/images/home/zk.png')" alt="" />
</div>
3 years ago
</div>
<div v-if="item.partyOrgLevel === 8">
<div :class="[item.children && item.children.length > 0 ? 'lydxzHover' : 'lydxz']">
<nameSplit :item="item" areaName="partyOrgName" peopleName="principalName" pageName="党组织架构" />
</div>
<div v-if="item._children" style="text-align: center; cursor: pointer" @click="getChildrenData(item, index, nodeConfig.children)">
<img v-if="item.children && item.children.length > 0" :src="require('@/assets/images/home/sh.png')" alt="" />
<img v-else :src="require('@/assets/images/home/zk.png')" alt="" />
</div>
3 years ago
</div>
<div v-if="item.partyOrgLevel === 9">
<div :class="[item.children && item.children.length > 0 ? 'dyzxhHover' : 'dyzxh']">
<nameSplit :item="item" :flag="flag" areaName="partyOrgName" peopleName="partyOrgName" pageName="党组织架构" />
</div>
<div v-if="item._children" style="text-align: center; cursor: pointer" @click="getChildrenData(item, index, nodeConfig.children)">
<img v-if="item.children && item.children.length > 0" :src="require('@/assets/images/home/sh.png')" alt="" />
<img v-else :src="require('@/assets/images/home/zk.png')" alt="" />
</div>
3 years ago
</div>
<div class="lxjtWrap" v-if="item.partyOrgLevel === 10">
<popHomeTip :item="item" pageName="党组织架构" />
3 years ago
</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>
</template>
<template v-if="index == nodeConfig.children.length - 1">
<div class="top-right-cover-line"></div>
</template>
</div>
</div>
</div>
</div>
<!-- <nodeWrap v-if="nodeConfig.childNode" :nodeConfig.sync="nodeConfig.childNode"></nodeWrap> -->
3 years ago
</div>
</template>
<script>
export default {
props: ["nodeConfig"],
data() {
return {
flag: true,
};
3 years ago
},
mounted() {},
3 years ago
computed: {},
watch: {},
methods: {
getChildrenData(item, idx, arr) {
arr.forEach((element, index) => {
if (index === idx) {
if (element.children) {
element._children = element.children;
element.children = null;
} else {
element.children = element._children;
}
} else {
element.children = null;
}
});
},
},
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;
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%;
3 years ago
}
}
.auto-judge {
.wgdzb {
@include spanLevel;
min-width: 120px;
height: 126px;
text-align: center;
padding-top: 9px;
background-image: url(~@/assets/images/home/zbbg.png);
background-repeat: no-repeat;
background-position: center;
}
.wgdzbHover {
@include spanLevel;
min-width: 120px;
height: 126px;
text-align: center;
padding-top: 9px;
background-image: url(~@/assets/images/home/zbbgClick.png);
// background-size: 100%;
background-repeat: no-repeat;
background-position: center;
3 years ago
}
.lydxz {
@include spanLevel;
// @include normalLevel;
text-align: center;
min-width: 120px;
height: 126px;
padding-top: 25px;
background-image: url(~@/assets/images/home/lydxzTree.png);
background-repeat: no-repeat;
background-position: center;
3 years ago
}
.lydxzHover {
@include spanLevel;
// @include normalLevel;
text-align: center;
min-width: 120px;
height: 126px;
padding-top: 25px;
background-image: url(~@/assets/images/home/lydxzClick.png);
background-repeat: no-repeat;
background-position: center;
}
3 years ago
.dyzxh {
@include spanLevel;
@include normalLevel;
height: 137px;
width: 30px;
writing-mode: tb-rl;
margin-top: -12px;
background-image: url(~@/assets/images/home/dyzxhTree.png);
background-repeat: no-repeat;
3 years ago
}
.dyzxhHover {
@include spanLevel;
@include normalLevel;
height: 137px;
width: 30px;
writing-mode: tb-rl;
margin-top: -12px;
background-image: url(~@/assets/images/home/dyzxhClick.png);
background-repeat: no-repeat;
}
3 years ago
.lxjt {
@include spanLevel;
display: flex;
align-items: center;
justify-content: space-around;
height: 137px;
width: 30px;
writing-mode: tb-rl;
margin-top: -12px;
background-image: url(~@/assets/images/home/dyzxhTree.png);
background-repeat: no-repeat;
3 years ago
}
}
</style>