Browse Source

组织架构部分修改提交

feature
PLUTO 2 years ago
parent
commit
92ff0af651
  1. 4
      .env.development
  2. BIN
      src/assets/images/home/lydxzClick.png
  3. BIN
      src/assets/images/home/lydxzTree.png
  4. BIN
      src/assets/images/home/sh.png
  5. BIN
      src/assets/images/home/zbbg.png
  6. BIN
      src/assets/images/home/zbbgClick.png
  7. BIN
      src/assets/images/home/zk.png
  8. 66
      src/components/JwTree/nodeWrap.vue
  9. 21
      src/components/NameSplit/index.vue
  10. 18
      src/components/Tree/nodeWrap.vue
  11. 21
      src/views/dataBoard/organizational/dangTree/index.vue
  12. 54
      src/views/dataBoard/organizational/jwTree/index.vue
  13. 4
      vue.config.js

4
.env.development

@ -1,7 +1,7 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_API_SERVER = https://epmet-preview.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-preview.elinkservice.cn/api
# VUE_APP_API_SERVER = http://localhost:8080/api VUE_APP_API_SERVER = http://localhost:9001/api
# VUE_APP_API_SERVER = http://192.168.1.140/api # VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = http://219.146.91.110:30801/api # VUE_APP_API_SERVER = http://219.146.91.110:30801/api
# VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api # VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api

BIN
src/assets/images/home/lydxzClick.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/assets/images/home/lydxzTree.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
src/assets/images/home/sh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

BIN
src/assets/images/home/zbbg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/assets/images/home/zbbgClick.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/images/home/zk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

66
src/components/JwTree/nodeWrap.vue

@ -17,19 +17,31 @@
<div class="condition-node-box"> <div class="condition-node-box">
<div class="auto-judge"> <div class="auto-judge">
<div v-if="getOnerSixLevelFlag(item)"> <div v-if="getOnerSixLevelFlag(item)">
<div class="wgdzb"> <div :class="[item.children && item.children.length > 0 ? 'wgdzbHover' : 'wgdzb']">
<nameSplit :item="item" areaName="organizationName" peopleName="name" pageName="居委组织架构" /> <nameSplit :item="item" areaName="organizationName" peopleName="name" pageName="居委组织架构" />
</div> </div>
<div v-if="item._children" style="text-align: center" @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>
</div> </div>
<div v-if="item.level === 'building_chief'"> <div v-if="item.level === 'building_chief'">
<div class="lydxz"> <div :class="[tem.children && item.children.length > 0 ? 'lydxzHover' : 'lydxz']">
<nameSplit :item="item" areaName="organizationName" peopleName="name" pageName="居委组织架构" /> <nameSplit :item="item" areaName="organizationName" peopleName="name" pageName="居委组织架构" />
</div> </div>
<div v-if="item._children" style="text-align: center" @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>
</div> </div>
<div v-if="item.level === 'unit_chief' || item.level === 'public_welfare_post'"> <div v-if="item.level === 'unit_chief' || item.level === 'public_welfare_post'">
<div @click="gotoPersonnel(item.resiId, '居委组织架构')" class="dyzxh gotoDesc" :title="item.organizationName"> <div @click="gotoPersonnel(item.resiId, '居委组织架构')" class="dyzxh gotoDesc" :title="item.organizationName">
{{ spliceNameFun(item.organizationName, 3) }} {{ spliceNameFun(item.organizationName, 3) }}
</div> </div>
<div v-if="item._children" style="text-align: center" @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>
</div> </div>
</div> </div>
</div> </div>
@ -80,6 +92,29 @@ export default {
return this.sixLevelArr.includes(item.level); return this.sixLevelArr.includes(item.level);
}, },
getChildrenData(item, idx, arr) {
// if (!item._children) {
// this.$message({
// message: "",
// type: "error",
// });
// return;
// }
// arritem_childrenitem.children
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;
}
});
},
gotoPersonnel(id, name) { gotoPersonnel(id, name) {
if (id) { if (id) {
this.$router.push(`/organizational/orgPersonnel/${name}`); this.$router.push(`/organizational/orgPersonnel/${name}`);
@ -134,23 +169,42 @@ export default {
.auto-judge { .auto-judge {
.wgdzb { .wgdzb {
@include spanLevel; @include spanLevel;
width: 132px; width: 90px;
height: 96px; height: 126px;
text-align: center; text-align: center;
padding-top: 5px; padding-top: 5px;
background-image: url(~@/assets/images/home/zbbg.png); background-image: url(~@/assets/images/home/zbbg.png);
background-size: 100%; background-size: 100%;
} }
.wgdzbHover {
@include spanLevel;
width: 90px;
height: 126px;
text-align: center;
padding-top: 5px;
background-image: url(~@/assets/images/home/zbbgClick.png);
background-size: 100%;
}
.lydxz { .lydxz {
@include spanLevel; @include spanLevel;
// @include normalLevel; // @include normalLevel;
text-align: center; text-align: center;
width: 216px; width: 90px;
height: 50px; height: 98px;
padding-top: 5px; padding-top: 5px;
background-image: url(~@/assets/images/home/lydxzTree.png); background-image: url(~@/assets/images/home/lydxzTree.png);
background-size: 100%; background-size: 100%;
} }
.lydxzHover {
@include spanLevel;
// @include normalLevel;
text-align: center;
width: 90px;
height: 98px;
padding-top: 5px;
background-image: url(~@/assets/images/home/lydxzClick.png);
background-size: 100%;
}
.dyzxh { .dyzxh {
@include spanLevel; @include spanLevel;
@include normalLevel; @include normalLevel;

21
src/components/NameSplit/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="node-com"> <div class="node-com">
<div v-if="!flag" :title="getAllName(item[areaName])">{{ spliceNameFun(item[areaName], 8) }}</div> <div v-if="!flag" class="nodeTitle" :title="getAllName(item[areaName])">{{ spliceNameFun(item[areaName], 4) }}</div>
<div class="name_more" v-if="item[peopleName] && !item[peopleName].includes(',')" @click="gotoPersonnel(item.resiId)" :title="getAllName(item[peopleName])">{{ spliceNameFun(item[peopleName], 12) }}</div> <div class="name_more peoName" v-if="item[peopleName] && !item[peopleName].includes(',')" @click="gotoPersonnel(item.resiId)" :title="getAllName(item[peopleName])">{{ spliceNameFun(item[peopleName], 12) }}</div>
<div class="name_more" v-if="item[peopleName] && item[peopleName].includes(',')"> <div class="name_more" v-if="item[peopleName] && item[peopleName].includes(',')">
<span v-for="(i, k) in getItemNameArr(item[peopleName])" :key="i" @click="gotoPersonnel(item.resiId.split(',')[k])" :title="getAllName(i)">{{ spliceNameFun(i, 12) }}{{ k === getItemNameArr(item[peopleName]).length - 1 ? "" : "," }}</span> <span v-for="(i, k) in getItemNameArr(item[peopleName])" :key="i" @click="gotoPersonnel(item.resiId.split(',')[k])" :title="getAllName(i)">{{ spliceNameFun(i, 12) }}{{ k === getItemNameArr(item[peopleName]).length - 1 ? "" : "," }}</span>
<popTips :item="item" :pageName="pageName" /> <popTips :item="item" :pageName="pageName" />
@ -47,9 +47,6 @@ export default {
}, },
spliceNameFun(row, num) { spliceNameFun(row, num) {
if (row && row.length > num) {
return row.substring(0, num) + "...";
}
return row; return row;
}, },
gotoPersonnel(id) { gotoPersonnel(id) {
@ -65,6 +62,20 @@ export default {
<style scope lang="scss"> <style scope lang="scss">
.node-com { .node-com {
padding: 0 12px;
.nodeTitle {
font-size: 16px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
.peoName {
font-size: 14px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
opacity: 0.8;
}
.name_more { .name_more {
cursor: pointer; cursor: pointer;
span { span {

18
src/components/Tree/nodeWrap.vue

@ -48,7 +48,7 @@
</div> </div>
</div> </div>
</div> </div>
<nodeWrap v-if="nodeConfig.childNode" :nodeConfig.sync="nodeConfig.childNode"></nodeWrap> <!-- <nodeWrap v-if="nodeConfig.childNode" :nodeConfig.sync="nodeConfig.childNode"></nodeWrap> -->
</div> </div>
</template> </template>
<script> <script>
@ -64,12 +64,12 @@ export default {
watch: {}, watch: {},
methods: { methods: {
getChildrenData(item) { getChildrenData(item) {
// if (item.children) { if (item.children) {
// item._children = item.children; item._children = item.children;
// item.children = null; item.children = null;
// } else { } else {
// item.children = item._children; item.children = item._children;
// } }
}, },
}, },
}; };
@ -103,8 +103,8 @@ export default {
.auto-judge { .auto-judge {
.wgdzb { .wgdzb {
@include spanLevel; @include spanLevel;
width: 132px; width: 90px;
height: 96px; height: 128px;
text-align: center; text-align: center;
padding-top: 5px; padding-top: 5px;
background-image: url(~@/assets/images/home/zbbg.png); background-image: url(~@/assets/images/home/zbbg.png);

21
src/views/dataBoard/organizational/dangTree/index.vue

@ -74,6 +74,22 @@ export default {
const myArray = [...new Set(this.levelArr)]; const myArray = [...new Set(this.levelArr)];
this.levelArr = this.getLevelArrNum(myArray); this.levelArr = this.getLevelArrNum(myArray);
}, },
hideChildrenData(data) {
const newData = [...data];
newData.forEach((item) => {
if (item.laneLevel === 1) {
this.hideChildrenData(item.children);
}
if (item.children && item.children.length > 0 && item.laneLevel >= 2) {
item._children = item.children;
item.children = null;
this.hideChildrenData(item._children);
}
});
console.log(newData);
},
// //
getTreeData() { getTreeData() {
this.loading = true; this.loading = true;
@ -87,7 +103,8 @@ export default {
this.$message.error("暂无数据"); this.$message.error("暂无数据");
return; return;
} }
this.nodeConfig = data[0]; // this.nodeConfig = data[0];
this.hideChildrenData(data);
this.getDataPLevel(data); this.getDataPLevel(data);
this.loading = false; this.loading = false;
} else { } else {
@ -193,7 +210,7 @@ export default {
.flowLevel-6, .flowLevel-6,
.flowLevel-7 { .flowLevel-7 {
@include flowLevwlCommon; @include flowLevwlCommon;
height: 126px; height: 160px;
} }
.flowLevel-2 { .flowLevel-2 {

54
src/views/dataBoard/organizational/jwTree/index.vue

@ -2,7 +2,7 @@
<div class="wrap"> <div class="wrap">
<!-- v-on:wheel="zoomSize" :style="'transform: scale(' + nowVal / 100 + ');'" --> <!-- v-on:wheel="zoomSize" :style="'transform: scale(' + nowVal / 100 + ');'" -->
<div class="content"> <div class="content">
<div v-for="(item, index) in levelArr" :key="item" :class="[item === 'unit_chief' ? 'lastLevel' : '', item === 'public_welfare_post' ? 'lastLevel1' : '', `flowLevel-${index + 1}`]" :style="{ height: item === 'building_chief' ? '90px' : '', lineHeight: item === 'building_chief' ? '90px' : '' }"> <div v-for="(item, index) in levelArr" :key="item" :class="[item === 'unit_chief' ? 'lastLevel' : '', item === 'public_welfare_post' ? 'lastLevel1' : '', `flowLevel-${index + 1}`]" :style="{ height: item === 'building_chief' ? '150px' : '', lineHeight: item === 'building_chief' ? '150px' : '' }">
<div :class="[item === 'building_chief' ? 'otherTop' : '']">{{ getTitleNameMapFun(item) }}</div> <div :class="[item === 'building_chief' ? 'otherTop' : '']">{{ getTitleNameMapFun(item) }}</div>
</div> </div>
<el-row> <el-row>
@ -10,7 +10,7 @@
<div class="contentList"></div> <div class="contentList"></div>
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<div class="dingflow-design" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 21, 64, 0.3)"> <div class="dingflow-design" :style="{ height: treeHeight + 'px' }" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 21, 64, 0.3)">
<nodeWrapJw :nodeConfig.sync="nodeConfig"></nodeWrapJw> <nodeWrapJw :nodeConfig.sync="nodeConfig"></nodeWrapJw>
</div> </div>
</el-col> </el-col>
@ -27,6 +27,7 @@ export default {
loading: false, loading: false,
levelArr: [], levelArr: [],
nowVal: 100, nowVal: 100,
treeHeight: 300,
nodeConfig: {}, nodeConfig: {},
}; };
}, },
@ -82,8 +83,25 @@ export default {
} }
}); });
const myArray = [...new Set(this.levelArr)]; const myArray = [...new Set(this.levelArr)];
this.treeHeight = myArray.length * 180 + 100;
this.levelArr = this.getLevelArrNum(myArray); this.levelArr = this.getLevelArrNum(myArray);
}, },
hideChildrenData(data) {
const newData = [...data];
newData.forEach((item) => {
if (item.laneLevel === 1) {
this.hideChildrenData(item.children);
}
if (item.children && item.children.length > 0 && item.laneLevel >= 2) {
item._children = item.children;
item.children = null;
this.hideChildrenData(item._children);
}
});
this.nodeConfig = newData[0];
},
// //
getTreeData() { getTreeData() {
this.loading = true; this.loading = true;
@ -97,8 +115,8 @@ export default {
this.$message.error("暂无数据"); this.$message.error("暂无数据");
return; return;
} }
this.nodeConfig = data[0];
this.getDataPLevel(data); this.getDataPLevel(data);
this.hideChildrenData(data);
this.loading = false; this.loading = false;
} else { } else {
this.loading = false; this.loading = false;
@ -167,7 +185,7 @@ export default {
} }
.lastLevel { .lastLevel {
height: 145px !important; height: 160px !important;
margin-top: -45px !important; margin-top: -45px !important;
} }
.lastLevel1 { .lastLevel1 {
@ -202,19 +220,19 @@ export default {
.flowLevel-6, .flowLevel-6,
.flowLevel-7 { .flowLevel-7 {
@include flowLevwlCommon; @include flowLevwlCommon;
height: 126px; height: 180px;
} }
.flowLevel-2 { .flowLevel-2 {
top: 181px; top: 181px;
line-height: 110px; line-height: 180px;
div { div {
padding-left: 80px; padding-left: 80px;
&::after { &::after {
@include flowLevelAfter; @include flowLevelAfter;
top: 26px; top: 60px;
left: 15px; left: 15px;
width: 180px; width: 180px;
height: 60px; height: 60px;
@ -224,15 +242,15 @@ export default {
} }
.flowLevel-3 { .flowLevel-3 {
top: 329px; top: 379px;
line-height: 120px; line-height: 185px;
div { div {
padding-left: 80px; padding-left: 80px;
&::after { &::after {
@include flowLevelAfter; @include flowLevelAfter;
top: 31px; top: 62px;
left: 15px; left: 15px;
width: 180px; width: 180px;
height: 60px; height: 60px;
@ -242,7 +260,7 @@ export default {
} }
.flowLevel-4 { .flowLevel-4 {
top: 475px; top: 577px;
line-height: 128px; line-height: 128px;
div { div {
@ -250,7 +268,7 @@ export default {
&::after { &::after {
@include flowLevelAfter; @include flowLevelAfter;
top: 35px; top: 43px;
left: 15px; left: 15px;
width: 180px; width: 180px;
height: 60px; height: 60px;
@ -260,7 +278,7 @@ export default {
} }
.flowLevel-5 { .flowLevel-5 {
top: 623px; top: 775px;
line-height: 130px; line-height: 130px;
div { div {
@ -278,15 +296,15 @@ export default {
} }
.flowLevel-6 { .flowLevel-6 {
top: 771px; top: 991px;
line-height: 130px; line-height: 171px;
div { div {
padding-left: 80px; padding-left: 80px;
&::after { &::after {
@include flowLevelAfter; @include flowLevelAfter;
top: 35px; top: 55px;
left: 15px; left: 15px;
width: 180px; width: 180px;
height: 60px; height: 60px;
@ -296,7 +314,7 @@ export default {
} }
.flowLevel-7 { .flowLevel-7 {
top: 922px; top: 1161px;
line-height: 130px; line-height: 130px;
div { div {
@ -315,7 +333,7 @@ export default {
.otherTop { .otherTop {
&::after { &::after {
top: 15px !important; top: 43px !important;
} }
} }

4
vue.config.js

@ -36,8 +36,8 @@ module.exports = {
}, },
"/api": { "/api": {
// target: "http://219.146.91.110:30801", // 测试地址 // target: "http://219.146.91.110:30801", // 测试地址
// target: "http://localhost:8080", // 本地地址 target: "http://localhost:8080", // 本地地址
target: "https://epmet-preview.elinkservice.cn", // 演示地址 // target: "https://epmet-preview.elinkservice.cn", // 演示地址
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^api": "", "^api": "",

Loading…
Cancel
Save