Browse Source

Merge branch 'tree' into dev

feature
mk 2 years ago
parent
commit
db5df0dc13
  1. 69
      src/components/JwTree/nodeWrap.vue
  2. 2
      src/views/dataBoard/cpts/details/jmxq.vue
  3. 2
      src/views/dataBoard/cpts/details/smyd.vue
  4. 2
      src/views/dataBoard/cpts/details/xqwmz.vue
  5. 24
      src/views/dataBoard/cpts/details/yxwxfw.vue
  6. 9
      src/views/dataBoard/cpts/event-details.vue
  7. 2
      src/views/dataBoard/cpts/personnel/modules/businessTables/complaint.vue
  8. 3
      src/views/dataBoard/cpts/personnel/modules/businessTables/reporting-events.vue
  9. 413
      src/views/dataBoard/organizational/index.vue
  10. 25
      src/views/dataBoard/organizational/jwTree/index.vue
  11. 4
      src/views/dataBoard/overview/index.vue

69
src/components/JwTree/nodeWrap.vue

@ -18,28 +18,29 @@
<div class="auto-judge">
<div v-if="getOnerSixLevelFlag(item)">
<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" />
</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="" />
<div v-if="item.childCount>0" style="text-align: center; cursor: pointer" @click="getChildrenData(item, index, nodeConfig.children)">
<img v-if=" item.zkFlag" :src="require('@/assets/images/home/sh.png')" alt="" />
<img v-else :src="require('@/assets/images/home/zk.png')" alt="" />
</div>
</div>
<div v-if="item.level === 'building_chief'">
<div :class="[item.children && item.children.length > 0 ? 'lydxzHover' : 'lydxz']">
<nameSplit :item="item" areaName="organizationName" peopleName="name" pageName="居委组织架构" />
<nameSplit :item="item" areaName="organizationName" peopleName="name" />
</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="" />
<div v-if="item.childCount>0" style="text-align: center; cursor: pointer" @click="getChildrenData(item, index, nodeConfig.children)">
<img v-if=" item.zkFlag " :src="require('@/assets/images/home/sh.png')" alt="" />
<img v-else :src="require('@/assets/images/home/zk.png')" alt="" />
</div>
</div>
<div v-if="item.level === 'unit_chief' || item.level === 'public_welfare_post'">
<div @click="gotoPersonnel(item.resiId, '居委组织架构')" :class="[item.children && item.children.length > 0 ? 'dyzxhHover' : 'dyzxh', 'gotoDesc']" :title="item.organizationName">
{{ spliceNameFun(item.organizationName, 3) }}
<div v-if="item.level === 'unit_chief'">
<div @click="gotoPersonnel(item)" :class="[item.categoryWarn === 'red' ? 'dyzxhRed' : item.categoryWarn === 'yellow' ? 'dyzxhYellow' : item.categoryWarn === 'green' ? 'dyzxhGreen' : '', item.children && item.children.length > 0 ? 'dyzxhHover' : 'dyzxh']" :title="item.organizationName">
<!-- {{ spliceNameFun(item.organizationName, 3) }} -->
{{ item.organizationName }}
</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="" />
<div v-if="item.childCount>0" style="text-align: center; cursor: pointer" @click="getChildrenData(item, index, nodeConfig.children)">
<img v-if=" item.zkFlag" :src="require('@/assets/images/home/sh.png')" alt="" />
<img v-else :src="require('@/assets/images/home/zk.png')" alt="" />
</div>
</div>
@ -61,6 +62,7 @@
</div>
</template>
<script>
import { requestGet } from "@/js/dai/request";
export default {
props: ["nodeConfig"],
data() {
@ -69,7 +71,9 @@ export default {
sixLevelArr: ["province", "city", "district", "street", "community", "grid_manager"],
};
},
mounted() {},
mounted() {
},
computed: {},
watch: {},
methods: {
@ -84,21 +88,54 @@ export default {
return this.sixLevelArr.includes(item.level);
},
getChildrenData(item, idx, arr) {
arr.forEach((element, index) => {
async getChildrenData(item, idx, arr) {
if(item.level != "street"){
let url = '/gov/org/organizational/neighborhood/getNeighborhoodCommitteeOrgTreeListByLevel'
let parm = {
orgId:item.id,
level:item.level
}
const {data,code,msg} = await requestGet(url,parm)
if(code === 0){
this.$EventBus.$emit('handelClickJWNode',data)
data.forEach(item=>{
item.zkFlag = !item.childCount>0
})
arr.forEach((element, index) => {
if (index === idx) {
if (element.children) {
console.log('element存在的话',element);
element.zkFlag = true;
element.children = null;
} else {
element.zkFlag = false;
console.log('element不存在的话',element);
element.children = data;
}
} else {
element.children = null;
}
});
}
}else{
arr.forEach((element, index) => {
if (index === idx) {
console.log(element.zkFlag);
if (element.children) {
element._children = element.children;
element.zkFlag = true;
element.children = null;
} else {
element.children = element._children;
}
} else {
element.zkFlag = false;
element.children = null;
}
});
}
},
gotoPersonnel(id, name) {
if (id) {
this.$router.push({ path: `/organizational/orgPersonnel/${name}`, query: { user_id: id } });

2
src/views/dataBoard/cpts/details/jmxq.vue

@ -190,7 +190,7 @@ export default {
}
.eventWrap {
width: 1094px;
// width: 1094px;
height: 798px;
overflow-y: auto;
overflow-x: hidden;

2
src/views/dataBoard/cpts/details/smyd.vue

@ -207,7 +207,7 @@ export default {
}
.eventWrap {
width: 1094px;
// width: 1094px;
max-height: 798px;
overflow-y: auto;
overflow-x: hidden;

2
src/views/dataBoard/cpts/details/xqwmz.vue

@ -291,7 +291,7 @@ export default {
}
.eventWrap {
width: 1094px;
// width: 1094px;
max-height: 798px;
overflow-y: auto;
overflow-x: hidden;

24
src/views/dataBoard/cpts/details/yxwxfw.vue

@ -30,7 +30,7 @@
</div>
<div class="eventItem">
<span>所属组织</span>
<span>{{ formData.principalName }}</span>
<span>{{ formData.agencyName || '--'}}</span>
</div>
<div class="eventItem">
<span>服务类型</span>
@ -99,7 +99,7 @@ export default {
item: {},
loading: false,
loading1: false,
activities: [],
// activities: [],
zuziTypes: {
community_org: "社区自组织",
ic_user_volunteer: "志愿者",
@ -180,16 +180,16 @@ export default {
this.$message.error(msg);
}
});
this.$http
.post("/governance/icEvent/process", { icEventId: id })
.then((res) => {
const { code, data, msg } = res.data;
if (code === 0) {
this.activities = data;
} else {
this.$message.error(msg);
}
});
// this.$http
// .post("/governance/icEvent/process", { icEventId: id })
// .then((res) => {
// const { code, data, msg } = res.data;
// if (code === 0) {
// this.activities = data;
// } else {
// this.$message.error(msg);
// }
// });
},
},
};

9
src/views/dataBoard/cpts/event-details.vue

@ -221,6 +221,10 @@ export default {
type: Boolean,
default: false,
},
formType: {
type: String,
default: false,
},
},
data() {
@ -267,7 +271,7 @@ export default {
getDetailsData(id) {
this.loading = true;
this.$http
.post("/governance/icEvent/detail", {icEventId: id})
.post(`/governance/${this.formType == '12345'?'icEvent':'icEventOld'}/detail`, {icEventId: id})
.then((res) => {
const {code, data, msg} = res.data;
if (code === 0) {
@ -279,10 +283,9 @@ export default {
}
});
},
getProcessData(id) {
this.$http
.post("/governance/icEvent/process", {icEventId: id})
.post(`/governance/${this.formType == '12345'?'icEvent':'icEventOld'}/process`, {icEventId: id})
.then((res) => {
const {code, data, msg} = res.data;
if (code === 0) {

2
src/views/dataBoard/cpts/personnel/modules/businessTables/complaint.vue

@ -17,7 +17,7 @@
<img width="268px" height="128px" src="~@/assets/images/overview/zanwu.png" />
<div style="color: #fff">暂无数据</div>
</div>
<eventDetails :showDialog="showDialog" :id="rowId" @close="close" />
<eventDetails :showDialog="showDialog" :id="rowId" @close="close" :formType="'12345'" />
<Pagination
v-show="total > 0"
:total="total"

3
src/views/dataBoard/cpts/personnel/modules/businessTables/reporting-events.vue

@ -23,7 +23,7 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<eventDetails :showDialog="showDialog" :id="this.rowId" @close="close" />
<eventDetails :showDialog="showDialog" :formType="'event'" :id="this.rowId" @close="close" />
</div>
</template>
@ -45,6 +45,7 @@ export default {
total: 0,
rowId: null,
showDialog: false,
};
},
created() {},

413
src/views/dataBoard/organizational/index.vue

@ -47,419 +47,10 @@ export default {
path: "/organizational/gridTree",
},
],
cardList: [
{
title: "社区党委",
key: "1",
name: "南昌路社区党委 (党委书记:解书记)",
children: [
{
title: "网格党支部",
name: "第一网格党支部(支部书记:王艺发)",
key: "1",
children: [
{
title: "楼院党小组",
name: "第一楼院党小组 (组长:韩文国)",
key: "1",
},
{
title: "楼院党小组",
name: "第二楼院党小组 (组长:褚丽兰)",
key: "2",
},
],
},
{
title: "网格党支部",
name: "第二网格党支部 (支部书记:尤芬紫)",
key: "2",
children: [
{
title: "楼院党小组",
name: "第一楼院党小组 (组长:韩文国)",
key: "1",
},
{
title: "楼院党小组",
name: "第二楼院党小组 (组长:褚丽兰)",
key: "2",
},
],
},
{
title: "网格党支部",
name: "第三网格党支部 (支部书记:凤桥强)",
key: "3",
children: [
{
title: "楼院党小组",
name: "第一楼院党小组 (组长:韩文国)",
key: "1",
},
{
title: "楼院党小组",
name: "第二楼院党小组 (组长:褚丽兰)",
key: "2",
},
{
title: "楼院党小组",
name: "第三楼院党小组 (组长:王丽丽)",
key: "3",
},
],
},
],
},
],
cardList: [],
nowVal: 100,
nodeConfig: {
partyOrgName: "市北区委",
partyOrgLevel: 1,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 1,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 2,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 2,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 3,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 3,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 4,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 4,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 5,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 5,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 6,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 6,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 7,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 7,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 8,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 8,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 9,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 9,
children: [
{
partyOrgName: "市北区委",
partyOrgLevel: 10,
partyOrgPid: "0",
principalName: "栾秀杰",
laneLevel: 10,
},
],
},
],
},
],
},
],
},
],
},
],
},
],
},
],
},
],
// title: "",
// name: "()",
// key: "1",
// children: [
// {
// title: "",
// name: " ",
// type: 2,
// children: [
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// ],
// },
// {
// title: "",
// name: " ",
// type: 3,
// children: [
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// children: [
// {
// title: "",
// type: 5,
// name: "",
// },
// {
// title: "",
// type: 5,
// name: "",
// },
// {
// title: "",
// type: 5,
// name: "",
// },
// {
// title: "",
// type: 5,
// name: "",
// },
// ],
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// ],
// },
// {
// title: "",
// name: " ",
// type: 3,
// children: [
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// {
// title: "",
// type: 3,
// name: " ",
// children: [
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// {
// title: "",
// type: 4,
// name: "",
// },
// ],
// },
// ],
// },
// ],
},
nodeConfig: {},
};
},
computed: {},

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

@ -1,3 +1,4 @@
<!-- 调用树组件 -->
<template>
<div class="wrap">
<!-- v-on:wheel="zoomSize" :style="'transform: scale(' + nowVal / 100 + ');'" -->
@ -10,8 +11,8 @@
<div class="contentList"></div>
</el-col>
<el-col :span="21">
<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>
<div class="dingflow-design overflow-hidden" :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>
</div>
</el-col>
</el-row>
@ -46,6 +47,12 @@ export default {
// if (orgId) {
// this.getTreeData();
// }
this.$EventBus.$on('handelClickJWNode', (val) => {
this.levelArr.push(val[0].level)
const myArray = [...new Set(this.levelArr)];
this.treeHeight = myArray.length * 180 + 220;
this.levelArr = this.getLevelArrNum(myArray);
})
this.getTreeData();
},
methods: {
@ -73,7 +80,6 @@ export default {
}
return arr;
},
//
getDataPLevel(data) {
data.forEach((item) => {
@ -82,7 +88,7 @@ export default {
this.getDataPLevel(item.children);
}
});
const myArray = [...new Set(this.levelArr)];
const myArray = [...new Set(this.levelArr)].filter(item=>item!='village');
this.treeHeight = myArray.length * 180 + 220;
this.levelArr = this.getLevelArrNum(myArray);
},
@ -94,9 +100,9 @@ export default {
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);
item.zkFlag = true
item.children = item.children;
this.hideChildrenData(item.children);
}
});
this.nodeConfig = newData[0];
@ -280,7 +286,7 @@ export default {
.flowLevel-5 {
top: 775px;
height: 180px !important;
line-height: 130px;
line-height: 180px;
div {
padding-left: 80px;
@ -401,4 +407,7 @@ export default {
}
}
}
.overflow-hidden{
overflow-y: hidden;
}
</style>

4
src/views/dataBoard/overview/index.vue

@ -73,8 +73,8 @@
-- bmysxqk = 不满意事项情况
-- xqwwcqk = 需求未完成情况
-->
<!-- <MapDialog v-if="isShowMapDialog" ref="MapDialog" :currentLevelData="currentLevelData" :type="mapType"
@close="isShowMapDialog = false"/> -->
<MapDialog v-if="isShowMapDialog" ref="MapDialog" :currentLevelData="currentLevelData" :type="mapType"
@close="isShowMapDialog = false"/>
<cpt-loading v-show="false"/>
<MapResourceInfo ref="MapResourceInfo" :currentLevelData="currentLevelData"/>
</div>

Loading…
Cancel
Save