Browse Source

Merge branch 'dev_zxc_hsjcd_add' into dev

dev-用户反馈
zxc 3 years ago
parent
commit
ddc237493d
  1. 3
      .env.development
  2. 11
      src/assets/scss/modules/visual/command.scss
  3. 320
      src/assets/scss/modules/visual/commandOld.scss
  4. 8
      src/views/modules/communityParty/regionalParty/units.vue
  5. 43
      src/views/modules/plugins/point/icpointnucleicmonitoring.vue
  6. 11
      src/views/modules/shequzhili/csgltc/csgl.vue
  7. 9
      src/views/modules/shequzhili/csgltc/csglDetail.vue
  8. 8
      src/views/modules/shequzhili/csgltc/csglForm.vue
  9. 12
      src/views/modules/shequzhili/ggfwtc/ggfw.vue
  10. 20
      src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue
  11. 10
      src/views/modules/shequzhili/ggfwtc/ggfwForm.vue
  12. 92
      src/views/modules/visual/command/cpts/popup.vue
  13. 309
      src/views/modules/visual/command/cpts/yantai-sidemenu1.vue
  14. 309
      src/views/modules/visual/command/cpts/yantai-sidemenu2.vue
  15. 931
      src/views/modules/visual/command/index.vue
  16. 881
      src/views/modules/visual/command/indexOld.vue
  17. 425
      src/views/modules/visual/communityParty/crateForm.vue
  18. 325
      src/views/modules/visual/communityParty/party.vue

3
.env.development

@ -1,6 +1,7 @@
NODE_ENV=development
# VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/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 = https://epmet-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api

11
src/assets/scss/modules/visual/command.scss

@ -193,6 +193,13 @@
width: 360px;
height: calc(825px - 15px);
.menu {
position: relative;
width: 100%;
margin-bottom: 20px;
// height: calc((825px - 15px - 20px) / 2);
}
.title {
margin-bottom: 10px;
padding: 4px 0;
@ -212,9 +219,9 @@
}
}
.list {
.wrap {
margin-right: -8px;
height: calc(825px - 120px);
height: calc(825px - 45px);
overflow-y: auto;
overflow-x: hidden;
@include scrollBar;

320
src/assets/scss/modules/visual/commandOld.scss

@ -0,0 +1,320 @@
@import "../../c/config";
@import "../../c/function";
@import "./c/common";
.m-crumb {
margin-left: 10px;
height: 40px;
line-height: 35px;
.router_line {
width: 212px;
height: 1px;
border: 1px solid #ffffff;
opacity: 0.09;
/* opacity: 0.09; */
}
.div_router {
font-size: 16px;
font-weight: bold;
.router_parents {
color: #a0c3d9;
.arrow {
padding: 0 5px;
}
}
.router_parents:hover {
cursor: pointer;
}
.router_child {
color: #ffffff;
}
}
}
.g-cnt {
display: flex;
/deep/ .ol-viewport {
border-radius: 5px;
}
/deep/ .ol-overlaycontainer-stopevent {
display: none;
}
}
.m-map {
box-sizing: border-box;
width: 100%;
height: calc(825px - 15px);
color: #fff;
position: relative;
}
.m-mapmenu {
position: absolute;
z-index: 100;
left: 20px;
top: 20px;
}
.m-search {
position: absolute;
z-index: 4;
left: 0;
right: 0;
top: 30px;
width: 630px;
margin: 0 auto;
.input {
width: 100%;
background-color: #fff;
border-radius: 8px;
display: flex;
align-items: center;
overflow: hidden;
border: 1px solid #5aafff;
box-shadow: 0px 4px 8px 0px rgba(147, 147, 147, 0.26);
> input {
width: 400px;
border: none;
line-height: 45px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 400;
color: #333333;
}
.i-search {
margin: 0 16px;
width: 24px;
height: 24px;
}
.i-close {
margin-left: 15px;
opacity: 0.2;
width: 20px;
cursor: pointer;
}
.btn {
margin-left: auto;
width: 120px;
height: 53px;
line-height: 53px;
background: #0082fb;
border-radius: 0px 8px 8px 0px;
color: #fff;
text-align: center;
font-size: 22px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
cursor: pointer;
}
}
.result {
position: relative;
box-sizing: border-box;
padding: 0 15px;
width: 509px;
background: rgba(#020340, 0.58);
border-radius: 8px;
.result-item {
position: relative;
padding: 12px 0;
border-bottom: 1px solid rgba(#fff, 0.2);
.result-panel {
position: absolute;
box-sizing: border-box;
padding: 15px;
left: 509px - 10px;
top: 0;
width: 500px;
background: rgba(#020340, 0.58);
border-radius: 8px;
}
.result-type {
margin-bottom: 10px;
font-size: 20px;
line-height: 30px;
font-family: PingFang SC;
font-weight: bold;
color: #00f0ff;
}
.result-more {
position: absolute;
right: 0;
top: 20px;
width: 50px;
height: 22px;
text-align: center;
line-height: 22px;
background: #dd8d02;
border-radius: 2px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
cursor: pointer;
}
.result-li {
line-height: 28px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
cursor: pointer;
@include toe;
i {
margin-right: 5px;
}
span {
width: 100%;
}
}
}
}
}
.m-sidemenu {
margin-left: 20px;
width: 360px;
height: calc(825px - 15px);
.title {
margin-bottom: 10px;
padding: 4px 0;
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
display: flex;
align-items: center;
img {
display: block;
margin-right: 5px;
}
span {
display: block;
}
}
.list {
margin-right: -8px;
height: calc(825px - 120px);
overflow-y: auto;
overflow-x: hidden;
@include scrollBar;
}
}
.m-sidebar {
position: absolute;
right: 0;
top: 50px;
z-index: 1000;
width: 370px;
height: 470px;
overflow: hidden;
pointer-events: none;
.wrap {
display: flex;
justify-content: flex-start;
align-items: center;
background-color: rgba(rgb(173, 173, 173), 0);
transform: translateX(-5px);
transition: all ease 1s;
border-radius: 4px;
pointer-events: auto;
}
.wrap-hidden {
transform: translateX(339px);
}
.div_agency_list {
width: 320px;
height: 470px;
color: #fff;
background: url("../../../img/modules/visual/box-2.png") no-repeat center;
background-size: 100% 100%;
padding: 45px 20px 35px 20px;
.agency_main {
height: 100%;
position: relative;
}
.agency_main {
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
}
.no-data-img {
text-align: center;
margin-top: 50px;
margin-left: 15px;
}
.agency_list {
.agency_item {
// height: 60px;
padding: 15px 0;
font-size: 17px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
// line-height: 50px;
padding-left: 12px;
display: flex;
flex-direction: row;
align-items: center;
// padding-top: 15px;
.agency_item_name {
// line-height: 20px;
}
}
.agency_item_on {
background: #08216c;
border-radius: 2px;
}
.agency_item:hover {
cursor: pointer;
background-color: #011168;
border-radius: 4px 0 0 4px;
border: none;
box-shadow: 0 0 10px inset #1a5afd;
border-radius: 2px;
}
}
}
.arrow_tip {
margin-right: -2px;
margin-left: 10px;
> img {
width: 22px;
height: 176px;
}
}
.arrow_tip:hover {
cursor: pointer;
}
}

8
src/views/modules/communityParty/regionalParty/units.vue

@ -166,18 +166,18 @@
label="在职党员数"
width="100">
</el-table-column>
<el-table-column prop="satisfaction"
<!-- <el-table-column prop="satisfaction"
header-align="center"
align="center"
label="群众满意度"
width="100">
</el-table-column>
<el-table-column prop="score"
</el-table-column> -->
<!-- <el-table-column prop="score"
header-align="center"
align="center"
label="积分"
width="80">
</el-table-column>
</el-table-column> -->
<el-table-column prop="remark"
header-align="center"
align="center"

43
src/views/modules/plugins/point/icpointnucleicmonitoring.vue

@ -153,13 +153,34 @@
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="enableFlag"
label="禁用/启用"
header-align="center"
align="center"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-for="(item, index) in enableFlagList"
:key="item.value"
:value="item.label"
v-if="scope.row.enableFlag == item.value">
{{ item.label }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
header-align="center"
align="center"
width="150"
width="180"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
class="div-table-button--detail"
@click="enableOrDisabled(scope.row.id)"
>{{ scope.row.enableFlag === 'enable' ? '禁用' : '启用' }}</el-button
>
<el-button
type="text"
size="small"
@ -243,6 +264,16 @@ export default {
mixins: [mixinViewModule],
data() {
return {
enableFlagList: [
{
value: 'enable',
label: '启用'
},
{
value: 'disabled',
label: '禁用'
}
],
dataForm: {
name: "",
mobile: "",
@ -361,6 +392,16 @@ export default {
diaClose() {
this.sendNoticeFormShow = false;
},
// /
enableOrDisabled(id) {
this.$http
.post(`/epmetuser/appPoint/enableOrDisabled/` + id)
.then(({ data: res }) => {
})
.catch(() => {});
this.loadTable();
},
// /
addOrUpdateHandle(id, title) {
this.dialogTitle = title;

11
src/views/modules/shequzhili/csgltc/csgl.vue

@ -367,15 +367,20 @@ export default {
},
handleDetail (row) {
this.detailShow = true
// this.detailShow = true
// this.$nextTick(() => {
// this.$refs.ref_detail.initForm(row)
// })
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_detail.initForm(row)
this.$refs.ref_form.initForm('detail', row.icCityManagementId)
})
},
handleAdd () {
this.formTitle = '新增'
this.formShow = 'edit'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null)
})

9
src/views/modules/shequzhili/csgltc/csglDetail.vue

@ -5,6 +5,7 @@
<el-form ref="ref_form"
:inline="true"
:model="formData"
:disabled="formType==='detail'"
class="form">
<el-form-item label="场所名称:"
@ -89,7 +90,8 @@ export default {
},
components: {},
async mounted () {
await this.initMap()
},
methods: {
@ -102,6 +104,10 @@ export default {
async initForm (row) {
this.startLoading()
this.formData = { ...row }
console.log(map)
if (!map) {
this.initMap()
}
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
@ -111,6 +117,7 @@ export default {
// init
initMap () {
console.log('initMap')
//
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)

8
src/views/modules/shequzhili/csgltc/csglForm.vue

@ -157,8 +157,8 @@ export default {
areaCovered: '',//
capacity: 0,//
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519, //
longitude: null, //
latitude: null, //
principal: '',
mobile: ''
},
@ -292,11 +292,15 @@ export default {
initMap () {
//
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.formData.latitude = latitude
this.formData.longitude = longitude
//
var center = new window.TMap.LatLng(latitude, longitude);
// var center = new window.TMap.LatLng(36.52799, 120.7553)

12
src/views/modules/shequzhili/ggfwtc/ggfw.vue

@ -387,9 +387,15 @@ export default {
},
handleDetail (row) {
this.detailShow = true
// this.detailShow = true
// this.$nextTick(() => {
// this.$refs.ref_detail.initForm(row)
// })
this.formTitle = '详情'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_detail.initForm(row)
this.$refs.ref_form.initForm('detail', row.icPublicServiceId)
})
},
@ -411,7 +417,7 @@ export default {
handleAdd () {
this.formTitle = '新增'
this.formShow = 'edit'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('add', null)
})

20
src/views/modules/shequzhili/ggfwtc/ggfwDetail.vue

@ -88,7 +88,10 @@ export default {
},
components: {},
mounted () {
this.initMap()
if (!map) {
this.initMap()
}
},
methods: {
@ -101,6 +104,10 @@ export default {
async initForm (row) {
this.startLoading()
this.formData = { ...row }
debugger
if (!map) {
this.initMap()
}
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude))
this.setMarker(this.formData.latitude, this.formData.longitude)
@ -110,8 +117,14 @@ export default {
// init
initMap () {
let { latitude, longitude } = this.$store.state.user;
console.log('lat' + latitude + ',lon' + longitude)
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
//
var center = new window.TMap.LatLng(36.0722275, 120.38945519)
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), {
center: center, //
@ -135,7 +148,8 @@ export default {
this.handleMoveCenter()
})
this.handleMoveCenter()
this.convert()
console.log('initMap')
// this.convert()
},
setMarker (lat, lng) {

10
src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

@ -138,8 +138,8 @@ export default {
areaCovered: '',//
capacity: '',//
address: '', //
longitude: 36.0722275, //
latitude: 120.38945519, //
longitude: null, //
latitude: null, //
principal: '',
mobile: ''
},
@ -277,6 +277,8 @@ export default {
latitude = 39.9088810666821;
longitude = 116.39743841556731;
}
this.formData.latitude = latitude
this.formData.longitude = longitude
//
var center = new window.TMap.LatLng(latitude, longitude);
// map TMap.Map()
@ -301,8 +303,8 @@ export default {
map.on('panend', () => {
this.handleMoveCenter()
})
// this.handleMoveCenter()
this.convert()
this.handleMoveCenter()
// this.convert()
},
setMarker (lat, lng) {

92
src/views/modules/visual/command/cpts/popup.vue

@ -150,6 +150,62 @@
</div>
</div>
<div
v-if="
placeType === 'nucleic_point'
"
>
<div class="info-title">核酸检测点信息</div>
<div class="item">
检测点名称
<span>{{ info.name || "--" }}</span>
</div>
<div class="item">
所属组织
<span>{{ info.orgName || "--" }}</span>
</div>
<div class="item">
服务时间
<span>{{ info.serveTime || "--" }}</span>
</div>
<div class="item">
咨询电话
<span>{{ info.mobile || "--" }}</span>
</div>
<div class="item">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span>{{ info.address || "--" }}</span>
</div>
</div>
<div
v-if="
placeType === 'vaccine_point'
"
>
<div class="info-title">疫苗接种点信息</div>
<div class="item">
接种点名称
<span>{{ info.name || "--" }}</span>
</div>
<div class="item">
接种时间
<span>{{ info.inoculationDate || "--" }}</span>
<div v-if="info.moStartTime && info.afStartTime">
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
上午{{ info.moStartTime || "--" }}{{info.moEndTime || '--'}}</span>&nbsp;
<span>&nbsp;&nbsp;&nbsp;下午{{ info.afStartTime || "--" }}{{info.afEndTime || '--'}}</span>
</div>
</div>
<div class="item">
咨询电话
<span>{{ info.mobile || "--" }}</span>
</div>
<div class="item">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span>{{ info.address || "--" }}</span>
</div>
</div>
<div v-if="placeType === 'event'">
<div class="info-title">难点痛点</div>
<div class="item">
@ -550,6 +606,14 @@ export default {
//
await this.loadEnterprisePartrol(item);
}
if (placeType === "vaccine_point") {
//
await this.loadVaccinePoint(item);
}
if (placeType === "nucleic_point") {
//
await this.loadHesuanPoint(item);
}
this.placeType = item.placeType;
this.srcItem = item;
this.hidden = false;
@ -769,6 +833,34 @@ export default {
this.$message.error(msg);
}
},
async loadVaccinePoint(info) {
const url = "/epmetuser/icPointVaccinesInoculation/" + info.id;
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/enterprise/detail"
const { data, code, msg } = await requestPost(url);
if (code === 0) {
// debugger
this.info = JSON.parse(JSON.stringify(data));
} else {
this.$message.error(msg);
}
},
async loadHesuanPoint(info) {
const url = "/epmetuser/icPointNucleicMonitoring/" + info.id;
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/enterprise/detail"
const { data, code, msg } = await requestPost(url);
if (code === 0) {
// debugger
this.info = JSON.parse(JSON.stringify(data));
} else {
this.$message.error(msg);
}
},
async loadGroupRent(info) {
const url = "/gov/org/ichouse/" + info.id;

309
src/views/modules/visual/command/cpts/yantai-sidemenu1.vue

@ -0,0 +1,309 @@
<template>
<div class="m-menu">
<div class="list">
<div
class="item"
:key="'menu1' + item.coverageType"
v-for="item in menuList.slice(0, 2)"
>
<div
class="info"
:class="{ 'z-on': item.selected }"
@click="selectAll(item)"
>
<div class="name">
{{ item.coverageName }}
<i v-if="item.quantity">({{ item.quantity }})</i>
</div>
<div
class="i-arrow"
:class="{ 'z-unfold': !item.folded }"
@click.stop="item.folded = !item.folded"
>
<img src="@/assets/img/shuju/command/arrow-right.png" />
</div>
</div>
<div
v-show="!item.folded"
class="granditem"
:key="'menu3' + granditem.categoryKey"
v-for="granditem in item.categories"
>
<div
class="info"
:class="{ 'z-on': granditem.selected }"
@click="granditem.selected = !granditem.selected"
>
<div class="i-ico">
<img
v-if="grandIcoList[granditem.categoryKey]"
:src="grandIcoList[granditem.categoryKey]"
/>
</div>
<div class="name">
{{ granditem.categoryName }}
<i v-if="granditem.quantity">({{ granditem.quantity }})</i>
</div>
</div>
</div>
<div
v-show="!item.folded"
class="subitem"
:key="'menu2' + subitem.placeType"
v-for="subitem in item.placeTypesInAnalysis"
>
<div
class="info"
:class="{ 'z-on': subitem.selected }"
@click="selectAll(subitem)"
>
<div class="i-ico">
<img
v-if="subitem.placeType == 'xxxxx'"
src="@/assets/img/shuju/command/fuwusheshi.png"
/>
<img
v-if="subitem.placeType == 'enterprise_patrol'"
src="@/assets/img/shuju/command/qishiyedanweixuncha.png"
/>
<img
v-if="subitem.placeType == 'group_rent'"
src="@/assets/img/shuju/command/qunzufang.png"
/>
<img
v-if="subitem.placeType == 'community_org'"
src="@/assets/img/shuju/command/shequzizhuzi.png"
/>
<img
v-if="subitem.placeType == 'superior_resource'"
src="@/assets/img/shuju/command/youshiziyuan.png"
/>
<img
v-if="subitem.placeType == 'volunteer'"
src="@/assets/img/shuju/command/zhiyuanzhe.png"
/>
<img
v-if="subitem.placeType == 'dangerous_chemicals'"
src="@/assets/img/shuju/command/zhongdianweihuapinqiye.png"
/>
<img
v-if="subitem.placeType == 'party_unit'"
src="@/assets/img/shuju/command/lianjiandanwei.png"
/>
</div>
<div class="name">
{{ subitem.placeTypeName }}
<i v-if="subitem.quantity">({{ subitem.quantity }})</i>
</div>
<div
class="i-arrow"
:class="{ 'z-unfold': !subitem.folded }"
@click.stop="subitem.folded = !subitem.folded"
>
<img src="@/assets/img/shuju/command/arrow-right.png" />
</div>
</div>
<div
v-show="!subitem.folded"
class="granditem"
:key="'menu3' + granditem.categoryKey"
v-for="granditem in subitem.categories"
>
<div
class="info"
:class="{ 'z-on': granditem.selected }"
@click="granditem.selected = !granditem.selected"
>
<div class="i-ico">
<img
v-if="grandIcoList[granditem.categoryKey]"
:src="grandIcoList[granditem.categoryKey]"
/>
</div>
<div class="name">
{{ granditem.categoryName }}
<i v-if="granditem.quantity">({{ granditem.quantity }})</i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
export default {
name: "sidemenu",
props: {
grandIcoList: {
type: Object,
default: () => ({}),
},
orgId: {
type: String,
default: "",
},
},
data() {
return {
menuList: [],
};
},
computed: {},
watch: {
menuList: {
handler(newValue, oldValue) {
// console.log("------------------------------------", newValue);
if (oldValue.length != 0) {
this.$emit("change", newValue);
}
},
deep: true,
// immediate: true
},
orgId() {
this.requestList();
},
},
mounted() {
this.requestList();
},
methods: {
selectAll(item) {
item.selected = !item.selected;
item.categories.forEach((subitem) => {
subitem.selected = item.selected;
});
if (item.placeTypesInAnalysis) {
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.selected = item.selected;
subitem.categories.forEach((subitem2) => {
subitem2.selected = item.selected;
});
});
}
},
//
async requestList() {
const url = "/data/aggregator/coverage/analysis/resourceCategories";
let params = {
agencyId: this.orgId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.menuList = data.map((item) => {
item.selected = false;
item.folded = true;
item.categories.forEach((subitem) => {
subitem.selected = false;
});
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.selected = false;
subitem.folded = true;
subitem.categories.forEach((granditem) => {
granditem.selected = false;
});
});
return item;
});
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
.m-menu {
padding-top: 10px;
.list {
.item {
position: relative;
z-index: 2;
line-height: 60px;
color: rgba(#fff, 0.8);
.z-on {
color: #ffffff;
background-color: #041267;
font-weight: bold;
box-shadow: 0 0 30px 5px inset #22f;
}
.info {
position: relative;
font-size: 18px;
width: 100%;
padding-left: 10px;
display: flex;
align-items: center;
cursor: pointer;
.i-ico {
position: relative;
width: 35px;
height: 35px;
margin-right: 4px;
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 2px;
margin: auto;
}
}
.i-arrow {
margin-left: auto;
margin-right: 20px;
&.z-unfold {
transform: rotate(90deg);
}
}
&:hover {
box-shadow: 0 0 30px 5px inset #22f;
background-color: darken(#104ba4, 12);
}
}
.subitem,
.granditem {
> .info {
padding-left: 20px;
font-size: 16px;
}
.granditem {
> .info {
padding-left: 40px;
}
}
}
}
}
}
</style>

309
src/views/modules/visual/command/cpts/yantai-sidemenu2.vue

@ -0,0 +1,309 @@
<template>
<div class="m-menu">
<div class="list">
<div
class="item"
:key="'menu1' + item.coverageType"
v-for="item in menuList.slice(2)"
>
<div
class="info"
:class="{ 'z-on': item.selected }"
@click="selectAll(item)"
>
<div class="name">
{{ item.coverageName }}
<i v-if="item.quantity">({{ item.quantity }})</i>
</div>
<div
class="i-arrow"
:class="{ 'z-unfold': !item.folded }"
@click.stop="item.folded = !item.folded"
>
<img src="@/assets/img/shuju/command/arrow-right.png" />
</div>
</div>
<div
v-show="!item.folded"
class="granditem"
:key="'menu3' + granditem.categoryKey"
v-for="granditem in item.categories"
>
<div
class="info"
:class="{ 'z-on': granditem.selected }"
@click="granditem.selected = !granditem.selected"
>
<div class="i-ico">
<img
v-if="grandIcoList[granditem.categoryKey]"
:src="grandIcoList[granditem.categoryKey]"
/>
</div>
<div class="name">
{{ granditem.categoryName }}
<i v-if="granditem.quantity">({{ granditem.quantity }})</i>
</div>
</div>
</div>
<div
v-show="!item.folded"
class="subitem"
:key="'menu2' + subitem.placeType"
v-for="subitem in item.placeTypesInAnalysis"
>
<div
class="info"
:class="{ 'z-on': subitem.selected }"
@click="selectAll(subitem)"
>
<div class="i-ico">
<img
v-if="subitem.placeType == 'xxxxx'"
src="@/assets/img/shuju/command/fuwusheshi.png"
/>
<img
v-if="subitem.placeType == 'enterprise_patrol'"
src="@/assets/img/shuju/command/qishiyedanweixuncha.png"
/>
<img
v-if="subitem.placeType == 'group_rent'"
src="@/assets/img/shuju/command/qunzufang.png"
/>
<img
v-if="subitem.placeType == 'community_org'"
src="@/assets/img/shuju/command/shequzizhuzi.png"
/>
<img
v-if="subitem.placeType == 'superior_resource'"
src="@/assets/img/shuju/command/youshiziyuan.png"
/>
<img
v-if="subitem.placeType == 'volunteer'"
src="@/assets/img/shuju/command/zhiyuanzhe.png"
/>
<img
v-if="subitem.placeType == 'dangerous_chemicals'"
src="@/assets/img/shuju/command/zhongdianweihuapinqiye.png"
/>
<img
v-if="subitem.placeType == 'party_unit'"
src="@/assets/img/shuju/command/lianjiandanwei.png"
/>
</div>
<div class="name">
{{ subitem.placeTypeName }}
<i v-if="subitem.quantity">({{ subitem.quantity }})</i>
</div>
<div
class="i-arrow"
:class="{ 'z-unfold': !subitem.folded }"
@click.stop="subitem.folded = !subitem.folded"
>
<img src="@/assets/img/shuju/command/arrow-right.png" />
</div>
</div>
<div
v-show="!subitem.folded"
class="granditem"
:key="'menu3' + granditem.categoryKey"
v-for="granditem in subitem.categories"
>
<div
class="info"
:class="{ 'z-on': granditem.selected }"
@click="granditem.selected = !granditem.selected"
>
<div class="i-ico">
<img
v-if="grandIcoList[granditem.categoryKey]"
:src="grandIcoList[granditem.categoryKey]"
/>
</div>
<div class="name">
{{ granditem.categoryName }}
<i v-if="granditem.quantity">({{ granditem.quantity }})</i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
export default {
name: "sidemenu",
props: {
grandIcoList: {
type: Object,
default: () => ({}),
},
orgId: {
type: String,
default: "",
},
},
data() {
return {
menuList: [],
};
},
computed: {},
watch: {
menuList: {
handler(newValue, oldValue) {
// console.log("------------------------------------", newValue);
if (oldValue.length != 0) {
this.$emit("change", newValue);
}
},
deep: true,
// immediate: true
},
orgId() {
this.requestList();
},
},
mounted() {
this.requestList();
},
methods: {
selectAll(item) {
item.selected = !item.selected;
item.categories.forEach((subitem) => {
subitem.selected = item.selected;
});
if (item.placeTypesInAnalysis) {
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.selected = item.selected;
subitem.categories.forEach((subitem2) => {
subitem2.selected = item.selected;
});
});
}
},
//
async requestList() {
const url = "/data/aggregator/coverage/analysis/resourceCategories";
let params = {
agencyId: this.orgId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.menuList = data.map((item) => {
item.selected = false;
item.folded = true;
item.categories.forEach((subitem) => {
subitem.selected = false;
});
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.selected = false;
subitem.folded = true;
subitem.categories.forEach((granditem) => {
granditem.selected = false;
});
});
return item;
});
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" scoped>
.m-menu {
padding-top: 10px;
.list {
.item {
position: relative;
z-index: 2;
line-height: 60px;
color: rgba(#fff, 0.8);
.z-on {
color: #ffffff;
background-color: #041267;
font-weight: bold;
box-shadow: 0 0 30px 5px inset #22f;
}
.info {
position: relative;
font-size: 18px;
width: 100%;
padding-left: 10px;
display: flex;
align-items: center;
cursor: pointer;
.i-ico {
position: relative;
width: 35px;
height: 35px;
margin-right: 4px;
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 2px;
margin: auto;
}
}
.i-arrow {
margin-left: auto;
margin-right: 20px;
&.z-unfold {
transform: rotate(90deg);
}
}
&:hover {
box-shadow: 0 0 30px 5px inset #22f;
background-color: darken(#104ba4, 12);
}
}
.subitem,
.granditem {
> .info {
padding-left: 20px;
font-size: 16px;
}
.granditem {
> .info {
padding-left: 40px;
}
}
}
}
}
}
</style>

931
src/views/modules/visual/command/index.vue

@ -0,0 +1,931 @@
<template>
<div style="position: relative">
<!-- 组织路由 -->
<div class="m-crumb">
<div class="router_line"></div>
<div class="div_router">
<span
class="router_parents"
v-for="(item, index) in runAgencyArray"
@click="handleClickAgency(index)"
:key="index"
>{{ item.name }}<span class="arrow">></span></span
>
<span class="router_child">{{ orgData.name }}</span>
</div>
</div>
<div class="g-cnt">
<div class="m-map" @click="handleClickMapBox">
<grid-map
ref="map"
v-if="orgData.id"
@clickAgency="clickAgencyItem"
@clickDotBtn="handleClickDotBtn"
:srcGridData="orgData"
:dotList="dotList"
:dotIcoList="dotIcoList"
:dotList2="dotList2"
:dotIcoList2="dotIcoList2"
:gridCountData="gridCountData"
:pitch="0"
/>
<div class="m-mapmenu">
<sidemenu-left
:orgId="orgId"
@change="handleChangeMenuLeft"
></sidemenu-left>
</div>
<div class="m-search">
<div class="input">
<img class="i-search" src="@/assets/img/shuju/command/search.png" />
<input
type="text"
placeholder="请输入"
@keyup.enter="handleSearch"
v-model="searchName"
/>
<img
v-show="searchName"
class="i-close"
@click="clearSearch"
src="@/assets/img/shuju/command/close.png"
/>
<div class="btn" @click="handleSearch">搜索</div>
</div>
<div class="result" v-if="showedSearchResult">
<template v-for="item in searchResult">
<div
:key="'searchResult' + item.type"
class="result-item"
v-show="item.list.length > 0"
>
<div class="result-type">{{ item.title }}</div>
<div
class="result-more"
@click.stop="handleClickSearchResultMore(item)"
v-show="item.allList.length > 2"
>
更多
</div>
<div class="result-ul">
<div
class="result-li z-toe"
:key="item.type + 'li' + index"
v-for="(li, index) in item.list"
@click.stop="handleClickSearchLi(li, item)"
>
<span v-if="item.type == 'position'">{{
li.name + " " + li.address
}}</span>
<span v-if="item.type == 'resi'">{{
li.name + "(" + li.idCard + ")"
}}</span>
<span v-if="item.type == 'event'">{{
li.eventContent
}}</span>
<span v-if="item.type == 'resource'">{{ li.name }}</span>
</div>
</div>
<div class="result-panel" v-show="item.showedMore">
<div class="result-type">{{ item.title }}</div>
<div class="result-ul">
<div
class="result-li z-toe"
:key="item.type + 'li2_' + index"
v-for="(li, index) in item.allList"
@click.stop="handleClickSearchLi(li, item)"
>
<span v-if="item.type == 'position'">{{
li.name + " " + li.address
}}</span>
<span v-if="item.type == 'resi'">{{
li.name + "(" + li.idCard + ")"
}}</span>
<span v-if="item.type == 'event'">{{
li.eventContent
}}</span>
<span v-if="item.type == 'resource'">{{ li.name }}</span>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
<div class="m-sidebar" v-show="false">
<div class="wrap" :class="[{ 'wrap-hidden': !showAgencyList }]">
<div @click="hideAgencyList" class="arrow_tip">
<img src="@/assets/img/modules/visual/popup.png" alt />
</div>
<div class="div_agency_list">
<div class="agency_main">
<el-scrollbar
style="height: 98%"
wrap-style="overflow-x:hidden"
>
<div v-if="subAgencyArray.length > 0" class="agency_list">
<div
v-for="(item, index) in subAgencyArray"
:key="index"
@click="clickAgencyItem(item, index)"
:class="[
'agency_item',
{ agency_item_on: index % 2 == 0 },
]"
>
<div class="agency_item_name">{{ item.name }}</div>
</div>
</div>
<div v-else>
<img
src="@/assets/img/modules/visual/noData.png"
alt=""
srcset=""
class="no-data-img"
/>
</div>
</el-scrollbar>
</div>
</div>
</div>
</div>
</div>
<div class="m-sidemenu">
<cpt-card>
<div class="wrap">
<div class="menu">
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>指挥调度</span>
</div>
<div class="list">
<sidemenu1
:orgId="orgId"
@change="handleChangeMenu1"
:grandIcoList="dotIcoList"
></sidemenu1>
</div>
</div>
<div class="menu">
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>15分钟生活圈</span>
</div>
<div class="list">
<sidemenu2
:orgId="orgId"
@change="handleChangeMenu2"
:grandIcoList="dotIcoList"
></sidemenu2>
</div>
</div>
</div>
</cpt-card>
</div>
</div>
<event-info
v-if="pageType === 'watch-event'"
ref="ref_event"
:eventId="eventId"
@handleClose="handleClose"
/>
<service-info
v-if="pageType === 'create-service'"
ref="ref_service"
:default-data="serviceDefaultData"
@handleClose="handleClose"
/>
<demand-info
v-if="pageType === 'create-demand'"
ref="ref_demand"
:icResiUserId="icResiUserId"
:selGridId="selGridId"
@handleClose="handleClose"
/>
<qsydw
v-if="pageType === 'watch-xuncha'"
ref="ref_xuncha"
:enterpriseId="enterpriseId"
@handleClose="handleClose"
/>
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; //Loading
import { requestPost } from "@/js/dai/request";
import People from "@/views/modules/visual/basicinfo/people";
import cptCard from "@/views/modules/visual/cpts/card";
import gridMap from "@/views/modules/visual/command/cpts/map";
import sidemenu1 from "@/views/modules/visual/command/cpts/yantai-sidemenu1";
import sidemenu2 from "@/views/modules/visual/command/cpts/yantai-sidemenu2";
import sidemenuLeft from "@/views/modules/visual/command/cpts/sidemenu-left";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
import eventInfo from "@/views/modules/visual/command/cpts/eventInfo";
import serviceInfo from "@/views/modules/visual/command/cpts/serviceInfo";
import demandInfo from "@/views/modules/visual/command/cpts/demandInfo";
import qsydw from "@/views/modules/visual/command/cpts/qsydw";
let loading; //
function iniSearchResult() {
return [
{
type: "position",
title: "地点",
showedMore: false,
list: [],
allList: [],
},
{
type: "resi",
title: "居民",
showedMore: false,
list: [],
allList: [],
},
{
type: "event",
title: "事件",
showedMore: false,
list: [],
allList: [],
},
{
type: "resource",
title: "资源",
showedMore: false,
list: [],
allList: [],
},
];
}
export default {
name: "HomeMap",
components: {
People,
cptCard,
ScreenLoading,
gridMap,
sidemenu1,
sidemenu2,
sidemenuLeft,
eventInfo,
serviceInfo,
demandInfo,
qsydw,
},
props: {},
computed: {
...mapGetters(["clientHeight"]),
},
data() {
return {
showAgencyList: false,
orgData: {}, //
orgId: "",
orgLevel: "",
subAgencyArray: [], //
//
runNum: 0,
runAgencyArray: [],
selUserId: "",
dotList: [],
categoryKeys: [[], []],
coverageTypes: [[], []],
dotIcoList: {
anzhibangjiao: require("@/assets/img/shuju/command/ico/anzhibangjiao.png"),
buliangqingshaonian: require("@/assets/img/shuju/command/ico/buliangqingshaonian.png"),
shequjiaozheng: require("@/assets/img/shuju/command/ico/shequjiaozheng.png"),
resi_xfry: require("@/assets/img/shuju/command/ico/resi_xfry.png"),
xidurenyuan: require("@/assets/img/shuju/command/ico/xidurenyuan.png"),
xiejiaorenyuan: require("@/assets/img/shuju/command/ico/xiejiaorenyuan.png"),
zhaoshizhaohuojingshenbing: require("@/assets/img/shuju/command/ico/zhaoshizhaohuojingshenbing.png"),
enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico/enterprise_patrol_unqualified.png"),
yjdw: require("@/assets/img/shuju/command/ico/yjdw.png"),
sr_gy: require("@/assets/img/shuju/command/ico/sr_gy.png"),
sr_gc: require("@/assets/img/shuju/command/ico/sr_gc.png"),
whdw: require("@/assets/img/shuju/command/ico/whdw.png"),
sr_ggld: require("@/assets/img/shuju/command/ico/sr_ggld.png"),
lwh: require("@/assets/img/shuju/command/ico/lwh.png"),
sr_tyc: require("@/assets/img/shuju/command/ico/sr_tyc.png"),
lyjlb: require("@/assets/img/shuju/command/ico/lyjlb.png"),
sr_yjy: require("@/assets/img/shuju/command/ico/sr_yjy.png"),
zaxld: require("@/assets/img/shuju/command/ico/zaxld.png"),
other: require("@/assets/img/shuju/command/ico/other.png"),
sr_jzz: require("@/assets/img/shuju/command/ico/sr_jzz.png"),
sr_djc: require("@/assets/img/shuju/command/ico/sr_djc.png"),
sr_rfqck: require("@/assets/img/shuju/command/ico/sr_rfqck.png"),
ep_lg: require("@/assets/img/shuju/command/ico/ep_lg.png"),
sr_xfz: require("@/assets/img/shuju/command/ico/sr_xfz.png"),
pu_jgzsbm: require("@/assets/img/shuju/command/ico/pu_jgzsbm.png"),
ep_qt: require("@/assets/img/shuju/command/ico/ep_qt.png"),
sr_others: require("@/assets/img/shuju/command/ico/sr_others.png"),
cm_others: require("@/assets/img/shuju/command/ico/cm_others.png"),
ps_others: require("@/assets/img/shuju/command/ico/ps_others.png"),
ps_nat: require("@/assets/img/shuju/command/ico/ps_nat.png"),
ps_vaccine: require("@/assets/img/shuju/command/ico/ps_vaccine.png"),
gr_czw: require("@/assets/img/shuju/command/ico/gr_czw.png"),
ep_cycs: require("@/assets/img/shuju/command/ico/ep_cycs.png"),
dc_jyz: require("@/assets/img/shuju/command/ico/dc_jyz.png"),
ep_gwylcs: require("@/assets/img/shuju/command/ico/ep_gwylcs.png"),
dc_jqz: require("@/assets/img/shuju/command/ico/dc_jqz.png"),
dc_whpdw: require("@/assets/img/shuju/command/ico/dc_whpdw.png"),
ep_wb: require("@/assets/img/shuju/command/ico/ep_wb.png"),
ep_mrxycs: require("@/assets/img/shuju/command/ico/ep_mrxycs.png"),
dc_yqhjz: require("@/assets/img/shuju/command/ico/dc_yqhjz.png"),
dc_jzgd: require("@/assets/img/shuju/command/ico/dc_jzgd.png"),
ep_scjgqy: require("@/assets/img/shuju/command/ico/ep_scjgqy.png"),
cm_nmsc: require("@/assets/img/shuju/command/ico/cm_nmsc.png"),
event_tdnd: require("@/assets/img/shuju/command/ico/event_tdnd.png"),
cm_bhsc: require("@/assets/img/shuju/command/ico/cm_bhsc.png"),
cm_cjsc: require("@/assets/img/shuju/command/ico/cm_cjsc.png"),
ep_lssd: require("@/assets/img/shuju/command/ico/ep_lssd.png"),
resi_szry: require("@/assets/img/shuju/command/ico/resi_szry.png"),
ps_lyy: require("@/assets/img/shuju/command/ico/ps_lyy.png"),
resi_snry: require("@/assets/img/shuju/command/ico/resi_snry.png"),
ps_mzb: require("@/assets/img/shuju/command/ico/ps_mzb.png"),
ps_zs: require("@/assets/img/shuju/command/ico/ps_zs.png"),
ps_wss: require("@/assets/img/shuju/command/ico/ps_wss.png"),
ps_jjz: require("@/assets/img/shuju/command/ico/ps_jjz.png"),
ep_xx: require("@/assets/img/shuju/command/ico/ep_xx.png"),
ep_yy: require("@/assets/img/shuju/command/ico/ep_yy.png"),
volunteer_nengrendaren: require("@/assets/img/shuju/command/ico/volunteer_nengrendaren.png"),
volunteer_daibanyuan: require("@/assets/img/shuju/command/ico/volunteer_daibanyuan.png"),
volunteer_tiaojieyuan: require("@/assets/img/shuju/command/ico/volunteer_tiaojieyuan.png"),
volunteer_caijiyuan: require("@/assets/img/shuju/command/ico/volunteer_caijiyuan.png"),
volunteer_zhianxunluo: require("@/assets/img/shuju/command/ico/volunteer_zhianxunluo.png"),
volunteer_others: require("@/assets/img/shuju/command/ico/volunteer_others.png"),
volunteer_dangyuanzhongxinhu: require("@/assets/img/shuju/command/ico/volunteer_dangyuanzhongxinhu.png"),
pu_0: require("@/assets/img/shuju/command/ico/pu_0.png"),
pu_1: require("@/assets/img/shuju/command/ico/pu_1.png"),
pu_2: require("@/assets/img/shuju/command/ico/pu_2.png"),
pu_3: require("@/assets/img/shuju/command/ico/pu_3.png"),
pu_4: require("@/assets/img/shuju/command/ico/pu_4.png"),
pu_5: require("@/assets/img/shuju/command/ico/pu_5.png"),
pu_6: require("@/assets/img/shuju/command/ico/pu_6.png"),
pu_7: require("@/assets/img/shuju/command/ico/pu_7.png"),
},
gridCountData: [],
dotList2: [],
categoryKeys2: [],
coverageTypes2: [],
categoryNames2: [],
dotIcoList2: {
event_tdnd: require("@/assets/img/shuju/command/ico3/event_tdnd.png"),
enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png"),
resi_xfry: require("@/assets/img/shuju/command/ico3/resi_xfry.png"),
xiejiaorenyuan: require("@/assets/img/shuju/command/ico3/xiejiaorenyuan.png"),
zhaoshizhaohuojingshenbing: require("@/assets/img/shuju/command/ico3/zhaoshizhaohuojingshenbing.png"),
buliangqingshaonian: require("@/assets/img/shuju/command/ico3/buliangqingshaonian.png"),
shequjiaozheng: require("@/assets/img/shuju/command/ico3/shequjiaozheng.png"),
xidurenyuan: require("@/assets/img/shuju/command/ico3/xidurenyuan.png"),
IS_DBH: require("@/assets/img/shuju/command/ico3/IS_DBH.png"),
IS_YLFN: require("@/assets/img/shuju/command/ico3/IS_YLFN.png"),
IS_OLD_PEOPLE: require("@/assets/img/shuju/command/ico3/IS_OLD_PEOPLE.png"),
IS_UNEMPLOYED: require("@/assets/img/shuju/command/ico3/IS_UNEMPLOYED.png"),
IS_DB: require("@/assets/img/shuju/command/ico3/IS_DB.png"),
IS_MB: require("@/assets/img/shuju/command/ico3/IS_MB.png"),
anzhibangjiao: require("@/assets/img/shuju/command/ico3/anzhibangjiao.png"),
IS_KC: require("@/assets/img/shuju/command/ico3/IS_KC.png"),
IS_XFRY: require("@/assets/img/shuju/command/ico3/IS_XFRY.png"),
IS_SD: require("@/assets/img/shuju/command/ico3/IS_SD.png"),
IS_SN: require("@/assets/img/shuju/command/ico3/IS_SN.png"),
IS_SZ: require("@/assets/img/shuju/command/ico3/IS_SZ.png"),
IS_SPECIAL: require("@/assets/img/shuju/command/ico3/IS_SPECIAL.png"),
IS_UNITED_FRONT: require("@/assets/img/shuju/command/ico3/IS_UNITED_FRONT.png"),
IS_VOLUNTEER: require("@/assets/img/shuju/command/ico3/IS_VOLUNTEER.png"),
IS_VETERANS: require("@/assets/img/shuju/command/ico3/IS_VETERANS.png"),
IS_ENSURE_HOUSE: require("@/assets/img/shuju/command/ico3/IS_ENSURE_HOUSE.png"),
IS_CJ: require("@/assets/img/shuju/command/ico3/IS_CJ.png"),
IS_PARTY: require("@/assets/img/shuju/command/ico3/IS_PARTY.png"),
IS_XJC: require("@/assets/img/shuju/command/ico3/IS_XJC.png"),
},
searchName: "",
showedSearchResult: false,
searchResult: iniSearchResult(),
pageType: "",
icResiUserId: "",
selGridId: "",
eventId: "",
enterpriseId: "",
serviceDefaultData: null,
};
},
watch: {
categoryKeys() {
this.requestMapDot();
},
categoryKeys2() {
this.requestMapDot2();
},
searchName(val) {
this.showedSearchResult = false;
this.searchResult = iniSearchResult();
if (val == "") {
this.$refs.map.removeDotMarker();
}
},
},
async mounted() {
//
await this.loadOrgData();
await this.requestMapDot();
await this.requestMapDot2();
},
methods: {
handleClickDotBtn(type, info) {
if (type == "create-service") {
//
if (
info.placeType == "volunteer" ||
info.placeType == "community_org" ||
info.placeType == "party_unit"
) {
this.serviceDefaultData = {
serviceOrgType:
info.placeType == "volunteer"
? "ic_user_volunteer"
: info.placeType,
serviceOrgId: info.id,
};
} else if (info.placeType == "grid") {
this.serviceDefaultData = {
scopeIdArray: [info.id],
};
}
} else if (type == "watch-resi") {
// this.toSubAgency("people", info.icResiUserId);
this.icResiUserId = info.icResiUserId;
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${info.icResiUserId}`,
});
//
} else if (type == "watch-event") {
//
this.eventId = info.icEventId;
} else if (type == "create-demand") {
//
this.icResiUserId = info.icResiUserId;
this.selGridId = info.gridId;
} else if (type == "watch-xuncha") {
this.enterpriseId = info.enterpriseId;
}
this.pageType = type;
},
handleClose() {
this.pageType = "";
},
handleClickMapBox() {
this.showedSearchResult = false;
},
handleTo(item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people-list`,
query: {
columnName: item.columnName,
label: item.label,
id: this.orgId,
level: this.orgLevel,
},
});
},
hideAgencyList() {
this.showAgencyList = !this.showAgencyList;
},
//
async loadOrgData() {
const url = "/gov/org/agency/maporg";
let params = {
orgId: this.orgId,
level: this.orgLevel,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgData = data;
this.orgId = this.orgData.id;
this.orgLevel = this.orgData.level;
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children;
} else {
this.subAgencyArray = [];
}
} else {
this.$message.error(msg);
}
},
handleChangeMenuLeft(obj) {
this.coverageTypes2 = [obj.coverageType];
this.categoryKeys2 = [obj.categoryKey];
this.placeType2 = obj.placeType;
this.categoryNames2 = [obj.categoryName];
console.log(obj);
},
handleChangeMenu1(list) {
console.log("handleChangeMenu", list);
let categoryKeys = [];
let coverageTypes = [];
list.forEach((item) => {
if (item.selected) {
coverageTypes.push(item.coverageType);
}
item.categories.forEach((subitem) => {
if (subitem.selected) {
coverageTypes.push(item.coverageType);
categoryKeys.push(subitem.categoryKey);
}
});
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.categories.forEach((subitem2) => {
if (subitem2.selected) {
categoryKeys.push(subitem2.categoryKey);
coverageTypes.push(subitem2.coverageType);
}
});
});
});
this.categoryKeys[0] = [...new Set(categoryKeys)];
this.coverageTypes[0] = [...new Set(coverageTypes)];
this.requestMapDot();
},
handleChangeMenu2(list) {
console.log("handleChangeMenu", list);
let categoryKeys = [];
let coverageTypes = [];
list.forEach((item) => {
if (item.selected) {
coverageTypes.push(item.coverageType);
}
item.categories.forEach((subitem) => {
if (subitem.selected) {
coverageTypes.push(item.coverageType);
categoryKeys.push(subitem.categoryKey);
}
});
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.categories.forEach((subitem2) => {
if (subitem2.selected) {
categoryKeys.push(subitem2.categoryKey);
coverageTypes.push(subitem2.coverageType);
}
});
});
});
this.categoryKeys[1] = [...new Set(categoryKeys)];
this.coverageTypes[1] = [...new Set(coverageTypes)];
this.requestMapDot();
},
async requestMapDot() {
if (!this.orgId) return;
const url = "/data/aggregator/coverage/dataList";
let params = {
orgId: this.orgId,
orgType: "agency",
coverageTypes: [...this.coverageTypes[0], ...this.coverageTypes[1]],
categoryKeys: [...this.categoryKeys[0], ...this.categoryKeys[1]],
isPage: false,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.dotList = data.list;
} else {
this.$message.error(msg);
}
},
async requestMapDot2() {
if (!this.orgId) return;
this.requestMapDot2Count();
const url = "/data/aggregator/coverage/dataList-left";
let params = {
orgId: this.orgId,
orgType: "agency",
coverageTypes: this.coverageTypes2,
categoryKeys: this.categoryKeys2,
isPage: false,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.dotList2 = data.list.map((item) => {
item.categoryKey = this.categoryKeys2[0];
return item;
});
} else {
this.$message.error(msg);
}
},
async requestMapDot2Count() {
if (!this.placeType2) {
return (this.gridCountData = []);
}
const url = "/data/aggregator/coverage/dataList-left-subtotal";
let params = {
orgId: this.orgId,
orgType: "agency",
coverageType: this.coverageTypes2[0],
categoryKey: this.categoryKeys2[0],
placeType: this.placeType2,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridCountData = [
...data.map((item) => ({
...item,
categoryName: this.categoryNames2[0],
})),
];
} else {
this.$message.error(msg);
}
},
//list
refreshInfoList(selId, type) {
this.orgId = selId;
this.level = "";
},
//
handleClickAgency(index) {
//
if (this.orgLevel === "neighborHood") {
this.$nextTick(() => {
// id
this.$refs.ref_community.handleCloseAllUser();
});
}
const cutNum = this.runAgencyArray.length - index; //
this.runNum = this.runNum - cutNum;
this.orgData = this.runAgencyArray[index];
for (let i = 0; i < cutNum; i++) {
this.runAgencyArray.pop();
}
this.orgId = this.orgData.id;
this.orgLevel = this.orgData.level;
if (this.orgLevel === "people") {
} else if (this.orgLevel === "neighborHood") {
//
} else {
this.$nextTick(() => {
this.refreshMap(true);
this.$forceUpdate();
});
}
},
//
clickAgencyItem(item, index) {
console.log(item);
if (item.level == "grid") {
} else {
let e = {
selected: [],
};
let one = {
values_: item,
};
e.selected.push(one);
this.toSubAgency("polygon", e);
}
},
// type:polygon / people
async toSubAgency(type, e) {
//neighborHood
if (type === "people") {
this.runNum++;
this.runAgencyArray.push(this.orgData);
this.orgLevel = "people";
this.selUserId = e;
this.orgId = "";
this.orgData = {
id: "",
level: "people",
name: "人员档案",
};
} else {
if (!e) {
return false;
}
if (!e.selected[0]) {
return false;
}
this.runNum++;
this.runAgencyArray.push(this.orgData);
this.subAgencyArray.forEach((item) => {
if (item.id === e.selected[0].values_.id) {
this.orgId = item.id;
this.orgLevel = item.level;
this.orgData = item;
}
});
if (this.orgLevel === "neighborHood") {
this.requestMapDot();
this.$nextTick(() => {
// id
this.$refs.ref_community.initData(
this.orgData.id,
this.orgData.name
);
});
} else {
this.refreshMap(true);
}
}
},
//
async refreshMap(isRefreshView) {
//
await this.loadOrgData();
await this.requestMapDot();
await this.requestMapDot2();
},
async handleSearch() {
const { searchName } = this;
if (!searchName) {
return this.$message.error("请输入搜索内容");
}
await this.searchPos();
const url = "/data/aggregator/coverage/search";
let params = {
name: searchName,
pageSize: 10,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.userInfos.forEach((item) => {
item.placeType = "resi";
item.id = item.icUserId;
});
data.eventInfos.forEach((item) => {
item.placeType = "event";
item.id = item.eventId;
});
data.resourceInfos.forEach((item) => {
item.placeType = item.resourceType;
item.id = item.resourceId;
});
this.searchResult[1].list = data.userInfos.slice(0, 2);
this.searchResult[1].allList = data.userInfos;
this.searchResult[2].list = data.eventInfos.slice(0, 2);
this.searchResult[2].allList = data.eventInfos;
this.searchResult[3].list = data.resourceInfos.slice(0, 2);
this.searchResult[3].allList = data.resourceInfos;
console.log("检索", this.searchResult);
if (this.searchResult.every((item) => item.list.length == 0)) {
this.$message.error("未检索到相关内容");
} else {
this.showedSearchResult = true;
}
} else {
this.$message.error(msg);
}
},
clearSearch() {
this.searchName = "";
this.$refs.map.removeDotMarker();
},
async searchPos() {
let data = await this.$refs.map.searchPos(this.searchName);
console.log("检索位置", data);
if (
data &&
data.poiList &&
Array.isArray(data.poiList.pois) &&
data.poiList.pois.length > 0
) {
let list = data.poiList.pois.map((item) => {
item.longitude = item.location.lng;
item.latitude = item.location.lat;
return item;
});
this.searchResult[0].list = list.slice(0, 2);
this.searchResult[0].allList = list;
}
},
handleClickSearchLi(li) {
console.log("handleClickSearchLi", li);
if (!li.longitude) {
return this.$message.error("请先设置坐标");
}
this.$refs.map.setDotMarker(li, [
parseFloat(li.longitude),
parseFloat(li.latitude),
]);
this.showedSearchResult = false;
},
handleClickSearchResultMore(item) {
console.log(item);
let res = !item.showedMore;
if (res) {
this.searchResult.forEach((item) => (item.showedMore = false));
}
item.showedMore = !item.showedMore;
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
//clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/command.scss"
scoped
></style>

881
src/views/modules/visual/command/indexOld.vue

@ -0,0 +1,881 @@
<template>
<div style="position: relative">
<!-- 组织路由 -->
<div class="m-crumb">
<div class="router_line"></div>
<div class="div_router">
<span
class="router_parents"
v-for="(item, index) in runAgencyArray"
@click="handleClickAgency(index)"
:key="index"
>{{ item.name }}<span class="arrow">></span></span
>
<span class="router_child">{{ orgData.name }}</span>
</div>
</div>
<div class="g-cnt">
<div class="m-map" @click="handleClickMapBox">
<grid-map
ref="map"
v-if="orgData.id"
@clickAgency="clickAgencyItem"
@clickDotBtn="handleClickDotBtn"
:srcGridData="orgData"
:dotList="dotList"
:dotIcoList="dotIcoList"
:dotList2="dotList2"
:dotIcoList2="dotIcoList2"
:gridCountData="gridCountData"
:pitch="0"
/>
<div class="m-mapmenu">
<sidemenu-left
:orgId="orgId"
@change="handleChangeMenuLeft"
></sidemenu-left>
</div>
<div class="m-search">
<div class="input">
<img class="i-search" src="@/assets/img/shuju/command/search.png" />
<input
type="text"
placeholder="请输入"
@keyup.enter="handleSearch"
v-model="searchName"
/>
<img
v-show="searchName"
class="i-close"
@click="clearSearch"
src="@/assets/img/shuju/command/close.png"
/>
<div class="btn" @click="handleSearch">搜索</div>
</div>
<div class="result" v-if="showedSearchResult">
<template v-for="item in searchResult">
<div
:key="'searchResult' + item.type"
class="result-item"
v-show="item.list.length > 0"
>
<div class="result-type">{{ item.title }}</div>
<div
class="result-more"
@click.stop="handleClickSearchResultMore(item)"
v-show="item.allList.length > 2"
>
更多
</div>
<div class="result-ul">
<div
class="result-li z-toe"
:key="item.type + 'li' + index"
v-for="(li, index) in item.list"
@click.stop="handleClickSearchLi(li, item)"
>
<span v-if="item.type == 'position'">{{
li.name + " " + li.address
}}</span>
<span v-if="item.type == 'resi'">{{
li.name + "(" + li.idCard + ")"
}}</span>
<span v-if="item.type == 'event'">{{
li.eventContent
}}</span>
<span v-if="item.type == 'resource'">{{ li.name }}</span>
</div>
</div>
<div class="result-panel" v-show="item.showedMore">
<div class="result-type">{{ item.title }}</div>
<div class="result-ul">
<div
class="result-li z-toe"
:key="item.type + 'li2_' + index"
v-for="(li, index) in item.allList"
@click.stop="handleClickSearchLi(li, item)"
>
<span v-if="item.type == 'position'">{{
li.name + " " + li.address
}}</span>
<span v-if="item.type == 'resi'">{{
li.name + "(" + li.idCard + ")"
}}</span>
<span v-if="item.type == 'event'">{{
li.eventContent
}}</span>
<span v-if="item.type == 'resource'">{{ li.name }}</span>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
<div class="m-sidebar" v-show="false">
<div class="wrap" :class="[{ 'wrap-hidden': !showAgencyList }]">
<div @click="hideAgencyList" class="arrow_tip">
<img src="@/assets/img/modules/visual/popup.png" alt />
</div>
<div class="div_agency_list">
<div class="agency_main">
<el-scrollbar
style="height: 98%"
wrap-style="overflow-x:hidden"
>
<div v-if="subAgencyArray.length > 0" class="agency_list">
<div
v-for="(item, index) in subAgencyArray"
:key="index"
@click="clickAgencyItem(item, index)"
:class="[
'agency_item',
{ agency_item_on: index % 2 == 0 },
]"
>
<div class="agency_item_name">{{ item.name }}</div>
</div>
</div>
<div v-else>
<img
src="@/assets/img/modules/visual/noData.png"
alt=""
srcset=""
class="no-data-img"
/>
</div>
</el-scrollbar>
</div>
</div>
</div>
</div>
</div>
<div class="m-sidemenu">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>指挥调度</span>
</div>
<div class="list">
<sidemenu
:orgId="orgId"
@change="handleChangeMenu"
:grandIcoList="dotIcoList"
></sidemenu>
</div>
</cpt-card>
</div>
</div>
<event-info
v-if="pageType === 'watch-event'"
ref="ref_event"
:eventId="eventId"
@handleClose="handleClose"
/>
<service-info
v-if="pageType === 'create-service'"
ref="ref_service"
:default-data="serviceDefaultData"
@handleClose="handleClose"
/>
<demand-info
v-if="pageType === 'create-demand'"
ref="ref_demand"
:icResiUserId="icResiUserId"
:selGridId="selGridId"
@handleClose="handleClose"
/>
<qsydw
v-if="pageType === 'watch-xuncha'"
ref="ref_xuncha"
:enterpriseId="enterpriseId"
@handleClose="handleClose"
/>
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
import { mapGetters } from "vuex";
import { Loading } from "element-ui"; //Loading
import { requestPost } from "@/js/dai/request";
import People from "@/views/modules/visual/basicinfo/people";
import cptCard from "@/views/modules/visual/cpts/card";
import gridMap from "@/views/modules/visual/command/cpts/map";
import sidemenu from "@/views/modules/visual/command/cpts/sidemenu";
import sidemenuLeft from "@/views/modules/visual/command/cpts/sidemenu-left";
import ScreenLoading from "@/views/modules/visual/cpts/loading";
import eventInfo from "@/views/modules/visual/command/cpts/eventInfo";
import serviceInfo from "@/views/modules/visual/command/cpts/serviceInfo";
import demandInfo from "@/views/modules/visual/command/cpts/demandInfo";
import qsydw from "@/views/modules/visual/command/cpts/qsydw";
let loading; //
function iniSearchResult() {
return [
{
type: "position",
title: "地点",
showedMore: false,
list: [],
allList: [],
},
{
type: "resi",
title: "居民",
showedMore: false,
list: [],
allList: [],
},
{
type: "event",
title: "事件",
showedMore: false,
list: [],
allList: [],
},
{
type: "resource",
title: "资源",
showedMore: false,
list: [],
allList: [],
},
];
}
export default {
name: "HomeMap",
components: {
People,
cptCard,
ScreenLoading,
gridMap,
sidemenu,
sidemenuLeft,
eventInfo,
serviceInfo,
demandInfo,
qsydw,
},
props: {},
computed: {
...mapGetters(["clientHeight"]),
},
data() {
return {
showAgencyList: false,
orgData: {}, //
orgId: "",
orgLevel: "",
subAgencyArray: [], //
//
runNum: 0,
runAgencyArray: [],
selUserId: "",
dotList: [],
categoryKeys: [],
coverageTypes: [],
dotIcoList: {
anzhibangjiao: require("@/assets/img/shuju/command/ico/anzhibangjiao.png"),
buliangqingshaonian: require("@/assets/img/shuju/command/ico/buliangqingshaonian.png"),
shequjiaozheng: require("@/assets/img/shuju/command/ico/shequjiaozheng.png"),
resi_xfry: require("@/assets/img/shuju/command/ico/resi_xfry.png"),
xidurenyuan: require("@/assets/img/shuju/command/ico/xidurenyuan.png"),
xiejiaorenyuan: require("@/assets/img/shuju/command/ico/xiejiaorenyuan.png"),
zhaoshizhaohuojingshenbing: require("@/assets/img/shuju/command/ico/zhaoshizhaohuojingshenbing.png"),
enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico/enterprise_patrol_unqualified.png"),
yjdw: require("@/assets/img/shuju/command/ico/yjdw.png"),
sr_gy: require("@/assets/img/shuju/command/ico/sr_gy.png"),
sr_gc: require("@/assets/img/shuju/command/ico/sr_gc.png"),
whdw: require("@/assets/img/shuju/command/ico/whdw.png"),
sr_ggld: require("@/assets/img/shuju/command/ico/sr_ggld.png"),
lwh: require("@/assets/img/shuju/command/ico/lwh.png"),
sr_tyc: require("@/assets/img/shuju/command/ico/sr_tyc.png"),
lyjlb: require("@/assets/img/shuju/command/ico/lyjlb.png"),
sr_yjy: require("@/assets/img/shuju/command/ico/sr_yjy.png"),
zaxld: require("@/assets/img/shuju/command/ico/zaxld.png"),
other: require("@/assets/img/shuju/command/ico/other.png"),
sr_jzz: require("@/assets/img/shuju/command/ico/sr_jzz.png"),
sr_djc: require("@/assets/img/shuju/command/ico/sr_djc.png"),
sr_rfqck: require("@/assets/img/shuju/command/ico/sr_rfqck.png"),
ep_lg: require("@/assets/img/shuju/command/ico/ep_lg.png"),
sr_xfz: require("@/assets/img/shuju/command/ico/sr_xfz.png"),
pu_jgzsbm: require("@/assets/img/shuju/command/ico/pu_jgzsbm.png"),
ep_qt: require("@/assets/img/shuju/command/ico/ep_qt.png"),
sr_others: require("@/assets/img/shuju/command/ico/sr_others.png"),
cm_others: require("@/assets/img/shuju/command/ico/cm_others.png"),
ps_others: require("@/assets/img/shuju/command/ico/ps_others.png"),
ps_nat: require("@/assets/img/shuju/command/ico/ps_nat.png"),
ps_vaccine: require("@/assets/img/shuju/command/ico/ps_vaccine.png"),
gr_czw: require("@/assets/img/shuju/command/ico/gr_czw.png"),
ep_cycs: require("@/assets/img/shuju/command/ico/ep_cycs.png"),
dc_jyz: require("@/assets/img/shuju/command/ico/dc_jyz.png"),
ep_gwylcs: require("@/assets/img/shuju/command/ico/ep_gwylcs.png"),
dc_jqz: require("@/assets/img/shuju/command/ico/dc_jqz.png"),
dc_whpdw: require("@/assets/img/shuju/command/ico/dc_whpdw.png"),
ep_wb: require("@/assets/img/shuju/command/ico/ep_wb.png"),
ep_mrxycs: require("@/assets/img/shuju/command/ico/ep_mrxycs.png"),
dc_yqhjz: require("@/assets/img/shuju/command/ico/dc_yqhjz.png"),
dc_jzgd: require("@/assets/img/shuju/command/ico/dc_jzgd.png"),
ep_scjgqy: require("@/assets/img/shuju/command/ico/ep_scjgqy.png"),
cm_nmsc: require("@/assets/img/shuju/command/ico/cm_nmsc.png"),
event_tdnd: require("@/assets/img/shuju/command/ico/event_tdnd.png"),
cm_bhsc: require("@/assets/img/shuju/command/ico/cm_bhsc.png"),
cm_cjsc: require("@/assets/img/shuju/command/ico/cm_cjsc.png"),
ep_lssd: require("@/assets/img/shuju/command/ico/ep_lssd.png"),
resi_szry: require("@/assets/img/shuju/command/ico/resi_szry.png"),
ps_lyy: require("@/assets/img/shuju/command/ico/ps_lyy.png"),
resi_snry: require("@/assets/img/shuju/command/ico/resi_snry.png"),
ps_mzb: require("@/assets/img/shuju/command/ico/ps_mzb.png"),
ps_zs: require("@/assets/img/shuju/command/ico/ps_zs.png"),
ps_wss: require("@/assets/img/shuju/command/ico/ps_wss.png"),
ps_jjz: require("@/assets/img/shuju/command/ico/ps_jjz.png"),
ep_xx: require("@/assets/img/shuju/command/ico/ep_xx.png"),
ep_yy: require("@/assets/img/shuju/command/ico/ep_yy.png"),
volunteer_nengrendaren: require("@/assets/img/shuju/command/ico/volunteer_nengrendaren.png"),
volunteer_daibanyuan: require("@/assets/img/shuju/command/ico/volunteer_daibanyuan.png"),
volunteer_tiaojieyuan: require("@/assets/img/shuju/command/ico/volunteer_tiaojieyuan.png"),
volunteer_caijiyuan: require("@/assets/img/shuju/command/ico/volunteer_caijiyuan.png"),
volunteer_zhianxunluo: require("@/assets/img/shuju/command/ico/volunteer_zhianxunluo.png"),
volunteer_others: require("@/assets/img/shuju/command/ico/volunteer_others.png"),
volunteer_dangyuanzhongxinhu: require("@/assets/img/shuju/command/ico/volunteer_dangyuanzhongxinhu.png"),
pu_0: require("@/assets/img/shuju/command/ico/pu_0.png"),
pu_1: require("@/assets/img/shuju/command/ico/pu_1.png"),
pu_2: require("@/assets/img/shuju/command/ico/pu_2.png"),
pu_3: require("@/assets/img/shuju/command/ico/pu_3.png"),
pu_4: require("@/assets/img/shuju/command/ico/pu_4.png"),
pu_5: require("@/assets/img/shuju/command/ico/pu_5.png"),
pu_6: require("@/assets/img/shuju/command/ico/pu_6.png"),
pu_7: require("@/assets/img/shuju/command/ico/pu_7.png"),
},
gridCountData: [],
dotList2: [],
categoryKeys2: [],
coverageTypes2: [],
categoryNames2: [],
dotIcoList2: {
event_tdnd: require("@/assets/img/shuju/command/ico3/event_tdnd.png"),
enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png"),
resi_xfry: require("@/assets/img/shuju/command/ico3/resi_xfry.png"),
xiejiaorenyuan: require("@/assets/img/shuju/command/ico3/xiejiaorenyuan.png"),
zhaoshizhaohuojingshenbing: require("@/assets/img/shuju/command/ico3/zhaoshizhaohuojingshenbing.png"),
buliangqingshaonian: require("@/assets/img/shuju/command/ico3/buliangqingshaonian.png"),
shequjiaozheng: require("@/assets/img/shuju/command/ico3/shequjiaozheng.png"),
xidurenyuan: require("@/assets/img/shuju/command/ico3/xidurenyuan.png"),
IS_DBH: require("@/assets/img/shuju/command/ico3/IS_DBH.png"),
IS_YLFN: require("@/assets/img/shuju/command/ico3/IS_YLFN.png"),
IS_OLD_PEOPLE: require("@/assets/img/shuju/command/ico3/IS_OLD_PEOPLE.png"),
IS_UNEMPLOYED: require("@/assets/img/shuju/command/ico3/IS_UNEMPLOYED.png"),
IS_DB: require("@/assets/img/shuju/command/ico3/IS_DB.png"),
IS_MB: require("@/assets/img/shuju/command/ico3/IS_MB.png"),
anzhibangjiao: require("@/assets/img/shuju/command/ico3/anzhibangjiao.png"),
IS_KC: require("@/assets/img/shuju/command/ico3/IS_KC.png"),
IS_XFRY: require("@/assets/img/shuju/command/ico3/IS_XFRY.png"),
IS_SD: require("@/assets/img/shuju/command/ico3/IS_SD.png"),
IS_SN: require("@/assets/img/shuju/command/ico3/IS_SN.png"),
IS_SZ: require("@/assets/img/shuju/command/ico3/IS_SZ.png"),
IS_SPECIAL: require("@/assets/img/shuju/command/ico3/IS_SPECIAL.png"),
IS_UNITED_FRONT: require("@/assets/img/shuju/command/ico3/IS_UNITED_FRONT.png"),
IS_VOLUNTEER: require("@/assets/img/shuju/command/ico3/IS_VOLUNTEER.png"),
IS_VETERANS: require("@/assets/img/shuju/command/ico3/IS_VETERANS.png"),
IS_ENSURE_HOUSE: require("@/assets/img/shuju/command/ico3/IS_ENSURE_HOUSE.png"),
IS_CJ: require("@/assets/img/shuju/command/ico3/IS_CJ.png"),
IS_PARTY: require("@/assets/img/shuju/command/ico3/IS_PARTY.png"),
IS_XJC: require("@/assets/img/shuju/command/ico3/IS_XJC.png"),
},
searchName: "",
showedSearchResult: false,
searchResult: iniSearchResult(),
pageType: "",
icResiUserId: "",
selGridId: "",
eventId: "",
enterpriseId: "",
serviceDefaultData: null,
};
},
watch: {
categoryKeys() {
this.requestMapDot();
},
categoryKeys2() {
this.requestMapDot2();
},
searchName(val) {
this.showedSearchResult = false;
this.searchResult = iniSearchResult();
if (val == "") {
this.$refs.map.removeDotMarker();
}
},
},
async mounted() {
//
await this.loadOrgData();
await this.requestMapDot();
await this.requestMapDot2();
},
methods: {
handleClickDotBtn(type, info) {
if (type == "create-service") {
//
if (
info.placeType == "volunteer" ||
info.placeType == "community_org" ||
info.placeType == "party_unit"
) {
this.serviceDefaultData = {
serviceOrgType:
info.placeType == "volunteer"
? "ic_user_volunteer"
: info.placeType,
serviceOrgId: info.id,
};
} else if (info.placeType == "grid") {
this.serviceDefaultData = {
scopeIdArray: [info.id],
};
}
} else if (type == "watch-resi") {
// this.toSubAgency("people", info.icResiUserId);
this.icResiUserId = info.icResiUserId;
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${info.icResiUserId}`,
});
//
} else if (type == "watch-event") {
//
this.eventId = info.icEventId;
} else if (type == "create-demand") {
//
this.icResiUserId = info.icResiUserId;
this.selGridId = info.gridId;
} else if (type == "watch-xuncha") {
this.enterpriseId = info.enterpriseId;
}
this.pageType = type;
},
handleClose() {
this.pageType = "";
},
handleClickMapBox() {
this.showedSearchResult = false;
},
handleTo(item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people-list`,
query: {
columnName: item.columnName,
label: item.label,
id: this.orgId,
level: this.orgLevel,
},
});
},
hideAgencyList() {
this.showAgencyList = !this.showAgencyList;
},
//
async loadOrgData() {
const url = "/gov/org/agency/maporg";
let params = {
orgId: this.orgId,
level: this.orgLevel,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgData = data;
this.orgId = this.orgData.id;
this.orgLevel = this.orgData.level;
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children;
} else {
this.subAgencyArray = [];
}
} else {
this.$message.error(msg);
}
},
handleChangeMenuLeft(obj) {
this.coverageTypes2 = [obj.coverageType];
this.categoryKeys2 = [obj.categoryKey];
this.placeType2 = obj.placeType;
this.categoryNames2 = [obj.categoryName];
console.log(obj);
},
handleChangeMenu(list) {
console.log("handleChangeMenu", list);
let categoryKeys = [];
let coverageTypes = [];
list.forEach((item) => {
if (item.selected) {
coverageTypes.push(item.coverageType);
}
item.categories.forEach((subitem) => {
if (subitem.selected) {
coverageTypes.push(item.coverageType);
categoryKeys.push(subitem.categoryKey);
}
});
item.placeTypesInAnalysis.forEach((subitem) => {
subitem.categories.forEach((subitem2) => {
if (subitem2.selected) {
categoryKeys.push(subitem2.categoryKey);
coverageTypes.push(subitem2.coverageType);
}
});
});
});
this.categoryKeys = [...new Set(categoryKeys)];
this.coverageTypes = [...new Set(coverageTypes)];
this.requestMapDot();
},
async requestMapDot() {
if (!this.orgId) return;
const url = "/data/aggregator/coverage/dataList";
let params = {
orgId: this.orgId,
orgType: "agency",
coverageTypes: this.coverageTypes,
categoryKeys: this.categoryKeys,
isPage: false,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.dotList = data.list;
} else {
this.$message.error(msg);
}
},
async requestMapDot2() {
if (!this.orgId) return;
this.requestMapDot2Count();
const url = "/data/aggregator/coverage/dataList-left";
let params = {
orgId: this.orgId,
orgType: "agency",
coverageTypes: this.coverageTypes2,
categoryKeys: this.categoryKeys2,
isPage: false,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.dotList2 = data.list.map((item) => {
item.categoryKey = this.categoryKeys2[0];
return item;
});
} else {
this.$message.error(msg);
}
},
async requestMapDot2Count() {
if (!this.placeType2) {
return (this.gridCountData = []);
}
const url = "/data/aggregator/coverage/dataList-left-subtotal";
let params = {
orgId: this.orgId,
orgType: "agency",
coverageType: this.coverageTypes2[0],
categoryKey: this.categoryKeys2[0],
placeType: this.placeType2,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridCountData = [
...data.map((item) => ({
...item,
categoryName: this.categoryNames2[0],
})),
];
} else {
this.$message.error(msg);
}
},
//list
refreshInfoList(selId, type) {
this.orgId = selId;
this.level = "";
},
//
handleClickAgency(index) {
//
if (this.orgLevel === "neighborHood") {
this.$nextTick(() => {
// id
this.$refs.ref_community.handleCloseAllUser();
});
}
const cutNum = this.runAgencyArray.length - index; //
this.runNum = this.runNum - cutNum;
this.orgData = this.runAgencyArray[index];
for (let i = 0; i < cutNum; i++) {
this.runAgencyArray.pop();
}
this.orgId = this.orgData.id;
this.orgLevel = this.orgData.level;
if (this.orgLevel === "people") {
} else if (this.orgLevel === "neighborHood") {
//
} else {
this.$nextTick(() => {
this.refreshMap(true);
this.$forceUpdate();
});
}
},
//
clickAgencyItem(item, index) {
console.log(item);
if (item.level == "grid") {
} else {
let e = {
selected: [],
};
let one = {
values_: item,
};
e.selected.push(one);
this.toSubAgency("polygon", e);
}
},
// type:polygon / people
async toSubAgency(type, e) {
//neighborHood
if (type === "people") {
this.runNum++;
this.runAgencyArray.push(this.orgData);
this.orgLevel = "people";
this.selUserId = e;
this.orgId = "";
this.orgData = {
id: "",
level: "people",
name: "人员档案",
};
} else {
if (!e) {
return false;
}
if (!e.selected[0]) {
return false;
}
this.runNum++;
this.runAgencyArray.push(this.orgData);
this.subAgencyArray.forEach((item) => {
if (item.id === e.selected[0].values_.id) {
this.orgId = item.id;
this.orgLevel = item.level;
this.orgData = item;
}
});
if (this.orgLevel === "neighborHood") {
this.requestMapDot();
this.$nextTick(() => {
// id
this.$refs.ref_community.initData(
this.orgData.id,
this.orgData.name
);
});
} else {
this.refreshMap(true);
}
}
},
//
async refreshMap(isRefreshView) {
//
await this.loadOrgData();
await this.requestMapDot();
await this.requestMapDot2();
},
async handleSearch() {
const { searchName } = this;
if (!searchName) {
return this.$message.error("请输入搜索内容");
}
await this.searchPos();
const url = "/data/aggregator/coverage/search";
let params = {
name: searchName,
pageSize: 10,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
data.userInfos.forEach((item) => {
item.placeType = "resi";
item.id = item.icUserId;
});
data.eventInfos.forEach((item) => {
item.placeType = "event";
item.id = item.eventId;
});
data.resourceInfos.forEach((item) => {
item.placeType = item.resourceType;
item.id = item.resourceId;
});
this.searchResult[1].list = data.userInfos.slice(0, 2);
this.searchResult[1].allList = data.userInfos;
this.searchResult[2].list = data.eventInfos.slice(0, 2);
this.searchResult[2].allList = data.eventInfos;
this.searchResult[3].list = data.resourceInfos.slice(0, 2);
this.searchResult[3].allList = data.resourceInfos;
console.log("检索", this.searchResult);
if (this.searchResult.every((item) => item.list.length == 0)) {
this.$message.error("未检索到相关内容");
} else {
this.showedSearchResult = true;
}
} else {
this.$message.error(msg);
}
},
clearSearch() {
this.searchName = "";
this.$refs.map.removeDotMarker();
},
async searchPos() {
let data = await this.$refs.map.searchPos(this.searchName);
console.log("检索位置", data);
if (
data &&
data.poiList &&
Array.isArray(data.poiList.pois) &&
data.poiList.pois.length > 0
) {
let list = data.poiList.pois.map((item) => {
item.longitude = item.location.lng;
item.latitude = item.location.lat;
return item;
});
this.searchResult[0].list = list.slice(0, 2);
this.searchResult[0].allList = list;
}
},
handleClickSearchLi(li) {
console.log("handleClickSearchLi", li);
if (!li.longitude) {
return this.$message.error("请先设置坐标");
}
this.$refs.map.setDotMarker(li, [
parseFloat(li.longitude),
parseFloat(li.latitude),
]);
this.showedSearchResult = false;
},
handleClickSearchResultMore(item) {
console.log(item);
let res = !item.showedMore;
if (res) {
this.searchResult.forEach((item) => (item.showedMore = false));
}
item.showedMore = !item.showedMore;
},
//
startLoading() {
loading = Loading.service({
lock: true, //
text: "正在加载……", //
background: "rgba(0,0,0,.7)", //
});
},
//
endLoading() {
//clearTimeout(timer);
if (loading) {
loading.close();
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/command.scss"
scoped
></style>

425
src/views/modules/visual/communityParty/crateForm.vue

@ -0,0 +1,425 @@
<template>
<div class="m-pop">
<div class="wrap">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>党员信息</span>
</div>
<div class="btn-close"
@click="handleCancle">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="m-top">
<div class="m-info-left">
<div class="m-info">
<div class="info-prop">
<span>所属党组织</span>
<span>{{ form.orgName }}</span>
</div>
<div class="info-prop">
<span>姓名</span>
<span>{{ form.name }}</span>
</div>
<div class="info-prop">
<span>手机号</span>
<span>{{ form.mobile }}</span>
</div>
<div class="info-prop">
<span>身份证</span>
<span>{{ form.idCard }}</span>
</div>
<div class="info-prop">
<span>地址</span>
<span>{{ form.address|| "--" }}</span>
</div>
<div class="info-prop">
<span>流动党员</span>
<span>{{ form.isLd==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span>备注</span>
<span>{{ form.remark || "--" }}</span>
</div>
</div>
</div>
<div class="m-info-right">
<div class="m-info">
<div class="info-prop">
<span>党员中心户</span>
<span>{{ form.isDyzxh==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span>免学习</span>
<span>{{ form.isMxx==='1'?'是':'否' }}</span>
</div>
<div class="info-prop">
<span>职务</span>
<span>{{ form.postName|| "--" }}</span>
</div>
<div class="info-prop">
<span>文化程度</span>
<span>{{ form.cultureName || "--" }}</span>
</div>
<div class="info-prop">
<span>入党时间</span>
<span>{{ form.rdsj || "--" }}</span>
</div>
<div class="info-prop">
<span>党员流动号</span>
<span>{{ form.ldzh || "--" }}</span>
</div>
</div>
</div>
</div>
<div class="m-btn">
<div style="margin-top: 20px; text-align: center;">
<el-button size="small"
:disabled="false"
@click="handleCancle">取消</el-button>
<el-button v-if="form.icResiUser != null && form.icResiUser != ''"
type="primary"
:disabled="false"
size="small"
@click="jump(form.icResiUser)">查看更多</el-button>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import { isCard, isMobile } from '@/utils/validate'
import { computedCard } from '@/utils/index'
import cptCard from "@/views/modules/visual/cpts/card";
export default {
components: {
cptCard
},
props: {
partyList: {
type: Array,
default: () => []
},
info: {
type: Object,
default: () => { }
},
disabled: {
type: Boolean,
default: false
}
},
data () {
let checkMObile = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入手机号'))
} else {
if (!isMobile(value)) {
callback(new Error('手机号格式不正确'))
}
callback()
}
}
let checkIdCard = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入身份证'))
} else {
if (!isCard(value)) {
callback(new Error('身份证号格式不正确'))
}
callback()
}
}
return {
activesName: 'first',
isAuto: false,
formItemWd: '100%',
partymenberid: '',
partyProps: {
label: 'partyOrgName',
value: 'id',
emitPath: false
},
zwList: [
{
label: '普通党员',
value: '0'
},
{
label: '支部书记',
value: '1'
},
{
label: '支部委员',
value: '2'
},
{
label: '党委委员',
value: '3'
},
],
form: {
icResiUser: '',
name: '',
mobile: '',
idCard: '',
address: '',
rdsj: '',
sszb: '',
isLd: '0',
ldzh: '',
partyZw: '0',
isDyzxh: '0',
isMxx: '0',
culture: '',
remark: ''
},
eduList: [],
rules: {
sszb: [{ required: true, message: '所属党组织不能为空', trigger: 'blur' }],
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
mobile: [{ required: true, validator: checkMObile, trigger: 'blur' }],
idCard: [{ required: true, validator: checkIdCard, trigger: 'blur' }],
},
partyOrgs: []
}
},
watch: {
info: {
handler (val) {
if (Object.keys(val).length > 0) {
this.form = { ...val }
if (val.icResiUserId || val.icResiUser) this.isAuto = true
console.log('val----------in', val)
console.log('isAuto----------in', this.isAuto)
this.partyOrgs = val.orgPids.split(':')
console.log('partyOrgs-----', this.partyOrgs)
this.partymenberid = val.id
}
},
immediate: true
}
},
created () {
this.getEduList()
console.log('partyList', this.partyList)
},
mounted () {
// const w = document.getElementsByClassName('dialog-h-content')[0]
// this.formItemWd = w.clientWidth + 'px'
},
destroyed () {
// this.$refs['ruleForm'].resetFields()
},
methods: {
handleCancle () {
// this.$refs['ruleForm'].resetFields()
this.$emit('cancle')
},
handleValidBlur (n) {
if (!isCard(this.form.idCard)) return
const { age } = computedCard(this.form.idCard)
this.form.isMxx = age >= 70 ? '1' : '0'
this.validateResi()
},
async getEduList () {
await this.$http
.post('/sys/dict/data/education')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.eduList = res.data
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async validateResi () {
const params = {
idCard: this.form.idCard,
agencyId: this.$store.state.user.agencyId
}
await this.$http
.post('/epmetuser/icresiuser/getUserByIdCard', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
const { address, icResiUserId } = res.data
if (icResiUserId) {
this.form.address = address
this.isAuto = true
} else {
this.form.address = ''
this.isAuto = false
}
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
hadnleSubmitbase () {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
if (Object.keys(this.info).length > 0) this.editBase()
else this.saveBase()
} else {
console.log('error submit!!');
return false;
}
});
},
handleSavePoints (data) {
const _data = { ...data }
const params = {
..._data,
baseOptions: data.baseOptions.length > 0 ? data.baseOptions.toString() : '',
reviewOptions: data.reviewOptions.length > 0 ? data.reviewOptions.toString() : '',
inspireOptions: data.inspireOptions.length > 0 ? data.inspireOptions.toString() : '',
warnOptions: data.warnOptions.length > 0 ? data.warnOptions.toString() : ''
}
this.savePoints(params)
},
async jump (icResiUserId) {
this.$emit('saveBase', icResiUserId)
},
async saveBase () {
const params = {
...this.form
}
await this.$http
.post('/resi/partymember/icPartyMember/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
this.partymenberid = res.data
this.$emit('saveBase', true)
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async editBase () {
const params = {
...this.form
}
await this.$http
.post('/resi/partymember/icPartyMember/update', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
this.partymenberid = res.data
this.$emit('saveBase', true)
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async savePoints (form) {
const params = {
...form,
partyMemberId: this.partymenberid
}
let url = ''
if (form.id) url = '/resi/partymember/icPartyMemberPoint/update'
else url = '/resi/partymember/icPartyMemberPoint/save'
await this.$http
.post(url, params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
},
async saveRecord (form) {
const params = {
...form,
partyMemberId: this.partymenberid
}
await this.$http
.post('/resi/partymember/icPartyMemberPoint/save', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.$message.success('保存成功')
}
})
.catch(err => {
console.log('err', err)
return this.$message.error('网络错误')
})
}
}
}
</script>
<style lang="scss" scoped>
.input-width-textarea {
width: 400px;
}
.input-width {
width: 220px;
}
.flex-div {
display: flex;
// justify-content: space-between;
}
.wd50 {
width: 50%;
}
.pdl40 {
padding-left: 40px;
}
.pd0 {
padding: 0 !important;
}
</style>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

325
src/views/modules/visual/communityParty/party.vue

@ -2,7 +2,8 @@
<div class="warning-box">
<cpt-card :min-full-screen="true">
<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">
党员信息统计&nbsp;&nbsp;
<!-- <el-cascader
@ -13,18 +14,18 @@
:getCheckedNodes="getCheckedNodes"
clearable @change="handleCascader">
</el-cascader> -->
<el-cascader
v-model="partyOrgs"
:options="partyOrgList"
:props="{
<el-cascader v-model="partyOrgs"
:options="partyOrgList"
:props="{
label: 'partyOrgName',
value: 'id',
checkStrictly: true
}"
:show-all-levels="false"
clearable @change="handlePartyCascader">
}"
:show-all-levels="false"
clearable
@change="handlePartyCascader">
</el-cascader>
</div>
</div>
</div>
<div class="card-echart">
<div class="card-left">
@ -33,14 +34,17 @@
<div class="echart-wr">
<!-- <div class="echart-cicle"></div> -->
<screen-echarts-frame class="echart-org"
@myChartMethod="pieInitOk"
ref="ageChart"></screen-echarts-frame>
@myChartMethod="pieInitOk"
ref="ageChart"></screen-echarts-frame>
<!-- <div id="echartOrg" class="echart-org"></div> -->
</div>
<div class="echarts-tips echarts-tips-wd50">
<div class="tips-lists">
<div v-for="(item, index) in ageItem" :key="index" class="tips-items">
<div class="tips-items-title" :class="'tips-items-title' + item.code">
<div v-for="(item, index) in ageItem"
:key="index"
class="tips-items">
<div class="tips-items-title"
:class="'tips-items-title' + item.code">
{{ item.name }}
</div>
<div class="tips-items-num">
@ -48,34 +52,33 @@
<div class="tips-item-has">{{ item.radio }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport('age')">导出</el-button>
<el-button type="warning"
size="small"
@click="handleExport('age')">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
:tableData="ageList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleAgeLoading"
:operate="false"
@row="handleClickRow"
></screen-table>
<screen-table :headerList="headerList"
:tableData="ageList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleAgeLoading"
:operate="false"
@row="handleClickRow"></screen-table>
<div class="pagination">
<el-pagination hide-on-single-page
:current-page="agePageNo"
:page-size="agePageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleAge"
@current-change="pageCurrentChangeHandleAge"
:total="ageTotal"
>
:current-page="agePageNo"
:page-size="agePageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleAge"
@current-change="pageCurrentChangeHandleAge"
:total="ageTotal">
</el-pagination>
</div>
</div>
@ -87,50 +90,71 @@
<!-- <div class="echart-cicle echart-cicle0"></div> -->
<!-- <div id="echartType" class="echart-org"></div> -->
<screen-echarts-frame class="echart-org"
@myChartMethod="pieInitOks"
ref="eduChart"></screen-echarts-frame>
@myChartMethod="pieInitOks"
ref="eduChart"></screen-echarts-frame>
</div>
<div v-if="false" class="echarts-tips">
<div v-if="false"
class="echarts-tips">
<div class="tips-list">
<div v-for="item in eduItem" :key="item.value" class="tips-item">
<div class="tips-item-icon" :style="'background:' + item.color"></div>
<div v-for="item in eduItem"
:key="item.value"
class="tips-item">
<div class="tips-item-icon"
:style="'background:' + item.color"></div>
<div class="tips-item-text">{{item.name}}</div>
</div>
</div>
</div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport('edu')">导出</el-button>
<el-button type="warning"
size="small"
@click="handleExport('edu')">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerEduList"
:tableData="eduList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleLoading"
:operate="false"
@row="handleClickRow"
></screen-table>
<screen-table :headerList="headerEduList"
:tableData="eduList"
:headerStyle="headerStyle"
:tableContentStyle="headerStyle"
:visibleLoading="visibleLoading"
:operate="false"
@row="handleClickRow"></screen-table>
<div class="pagination">
<el-pagination hide-on-single-page
:current-page="pageNo"
:page-size="pageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
>
:current-page="pageNo"
:page-size="pageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total">
</el-pagination>
</div>
</div>
</div>
</div>
</cpt-card>
<crate-form v-if="memberDialog"
:info="memberDetailInfo"
:partyList="optionsG"
:disabled="disabled"
@saveBase="jumpDetail"
@cancle="handlerCancle" />
<!-- <el-dialog
title="党员信息"
:visible.sync="memberDialog"
width="60%"
top="5vh"
class="dialog-h"
append-to-body
:close-on-click-modal="false"
:before-close="handlerCancle">
<crate-form v-if="memberDialog" :info="memberDetailInfo" :partyList="optionsG" :disabled="disabled"
@saveBase="jumpDetail" @cancle="handlerCancle" />
</el-dialog> -->
</div>
</template>
@ -140,6 +164,7 @@ import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import screenEchartsFrame from "../components/screen-echarts-frame";
import crateForm from './crateForm.vue';
import { pieOption } from './options'
import * as echarts from 'echarts';
@ -148,10 +173,15 @@ export default {
components: {
cptCard,
screenTable,
screenEchartsFrame
screenEchartsFrame,
crateForm
},
data() {
data () {
return {
memberDialog: false,
disabled: true,
memberDetailInfo: {},
optionsG: [],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'name' },
@ -272,7 +302,7 @@ export default {
pieEduOptions: null
};
},
async mounted() {
async mounted () {
await nextTick(100);
// await this.getAgencyList()
await this.getPartyOggList()
@ -280,16 +310,41 @@ export default {
// this.getEduCount(this.$store.state.user.agencyId, 'agency')
// this.getAgeList(this.$store.state.user.agencyId, 'agency')
// this.getEduList(this.$store.state.user.agencyId, 'agency')
this.getAgeCount()
this.getAgeCount()
this.getEduCount()
this.getAgeList()
this.getEduList()
// this.initAgeCharts()
// this.initEduCharts()
// this.initChartType()
},
async created () {
this.getGridList('query')
},
methods: {
handleSearch () {
this.memberDialog = false
},
handlerCancle () {
this.memberDialog = false
},
async getGridList (type, agencyId) {
const { user } = await this.$store.state
// addorupdate query
await this.$http
.get('/resi/partymember/icPartyOrg/getSearchTreelist', { params: { agencyId: agencyId || user.agencyId } })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.optionsG = this.deepArrTOnull(res.data)
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
pieInitOk (dom) {
console.log('pie准备好了', dom)
this.pieAgeChartS = dom
@ -302,11 +357,11 @@ export default {
// this.pieInitState = true
},
initAgeCharts() {
initAgeCharts () {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
}
this.pieAgeOptions = pieOption(this.pieAgeChartS)
this.clickAgePie(0)
@ -332,11 +387,11 @@ export default {
// option && this.$refs.pieChart.setOption(option);
},
initEduCharts() {
initEduCharts () {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
}
let legend = {
show: true,
@ -394,7 +449,7 @@ export default {
// option && this.$refs.pieChart.setOption(option);
},
clickAgePie (seriesIndex) {
let _code = ''
let isClick = false
@ -402,7 +457,7 @@ export default {
this.ageItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
if (!this.noInit) isClick = false
else {
element.isClick = !element.isClick
@ -514,10 +569,10 @@ export default {
}
this.noEduInit = true
},
async getAgeCount(orgId, orgType) {
async getAgeCount (orgId, orgType) {
// const url = "/epmetuser/icresiuser/partymemberagestatistics";
const url = '/resi/partymember/icPartyMember/partymemberagestatistics'
let params = {
@ -567,7 +622,7 @@ export default {
} else {
}
},
async getEduCount(orgId, orgType) {
async getEduCount (orgId, orgType) {
// const url = "/epmetuser/icresiuser/partymembereducationstatistics";
const url = '/resi/partymember/icPartyMember/partymembereducationstatistics'
let params = {
@ -591,8 +646,8 @@ export default {
} else {
}
},
async getAgeList(orgId, orgType, _code) {
async getAgeList (orgId, orgType, _code) {
this.visibleAgeLoading = true
// const url = "/epmetuser/icresiuser/partymemberagelist";
const url = '/resi/partymember/icPartyMember/partymemberagelist'
@ -618,7 +673,7 @@ export default {
// if (_code == 0 || _code) this.noInit = true
this.visibleAgeLoading = false
},
async getEduList(orgId, orgType, _code) {
async getEduList (orgId, orgType, _code) {
this.visibleLoading = true
// const url = "/epmetuser/icresiuser/partymembereducationlist";
const url = '/resi/partymember/icPartyMember/partymembereducationlist'
@ -644,34 +699,34 @@ export default {
}
this.visibleLoading = false
},
async getPartyOggList(node, resolve) {
async getPartyOggList (node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
// const url = '/gov/org/customeragency/agencygridtree'
// const url = '/resi/partymember/icPartyOrg/getTreelist'
const url ='/resi/partymember/icPartyOrg/getSearchTreelist'
const url = '/resi/partymember/icPartyOrg/getSearchTreelist'
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestGet(url, params);
console.log('data-orgparty----o', data)
if (code === 0) {
this.partyOrgList = this.deepArrTOnull(data)
} else {
}
},
deepArrTOnull(arr) {
deepArrTOnull (arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
children: (item.children.length > 0 && this.deepArrTOnull(item.children)) || null
}
})
return a
},
async getAgencyList(node, resolve) {
async getAgencyList (node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
@ -690,25 +745,26 @@ export default {
} else {
}
},
getTreeData(data){
getTreeData (data) {
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.subAgencyList) {
if (item.subAgencyList.length === 0) {
_item = {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: undefined
children: undefined
}
} else _item = {
} else _item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
children: this.getTreeData(item.subAgencyList)
}
} else {
_item = {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
@ -718,19 +774,37 @@ export default {
})
return arr
},
handleClickRow(val) {
console.log('click-row----', val)
if (!val.icResiUser) {
return this.$message.warning('该党员居民信息未完善')
}
handleClickRow (val) {
this.getDetail(val.userId)
this.memberDialog = true
},
jumpDetail (val) {
this.memberDialog = false
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${val.icResiUser}`,
path: `/main-shuju/visual-basicinfo-people/${val}`,
});
},
handleCascader(val) {
getDetail (id) {
let params = {
id,
}
this.$http
.post(`/resi/partymember/icPartyMember/${id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.memberDetailInfo = { ...res.data }
}
})
.catch((err) => {
return this.$message.error('网络错误')
})
},
handleCascader (val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
const orgType = _arr[1] !== 'grid' ? 'agency' : 'grid'
this.agencyId = _arr[0]
this.orgType = orgType
this.noInit = false
@ -742,7 +816,7 @@ export default {
this.getAgeList(_arr[0], orgType)
this.getEduList(_arr[0], orgType)
},
handlePartyCascader(val) {
handlePartyCascader (val) {
console.log('val-vvvpppppp', val)
this.noInit = false
this.noEduInit = false
@ -762,17 +836,17 @@ export default {
this.getAgeList('')
this.getEduList('')
}
},
getCheckedNodes(val) {
getCheckedNodes (val) {
console.log('val-nnn', val)
},
lazyLoad(node, resolve) {
lazyLoad (node, resolve) {
setTimeout(() => {
this.getAgeList(node, resolve)
}, 500)
},
pageSizeChangeHandleAge(val) {
pageSizeChangeHandleAge (val) {
this.agePageNo = 1
this.agePageSize = val
this.getAgeList(this.agencyId, this.orgType, this.ageCode)
@ -781,22 +855,22 @@ export default {
this.agePageNo = val
this.getAgeList(this.agencyId, this.orgType, this.ageCode)
},
pageSizeChangeHandleNew(val) {
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
this.getEduList(this.agencyId, this.orgType, this.eduCode)
},
pageCurrentChangeHandleNew(val) {
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getEduList(this.agencyId, this.orgType, this.eduCode)
},
async handleExport(type) {
async handleExport (type) {
const urls = {
age: '/epmetuser/icresiuser/partymemberagelist/export',
edu: '/epmetuser/icresiuser/partymembereducationlist/export'
}
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
const orgType = _arr[1] !== 'grid' ? 'agency' : 'grid'
let params = {
orgId: _arr[0],
orgType: orgType,
@ -878,8 +952,8 @@ export default {
color: #fff;
line-height: 24px;
text-align: center;
background: #06186D;
border: 1px solid #1A64CC;
background: #06186d;
border: 1px solid #1a64cc;
border-radius: 2px;
}
.el-input__prefix {
@ -891,15 +965,13 @@ export default {
line-height: 24px;
}
}
}
}
.title-label {
.title-label {
font-size: 22px;
font-family: PingFang SC;
font-weight: 800;
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 18px;
@ -909,7 +981,7 @@ export default {
border: 1px solid #1a64cc;
}
.el-icon-arrow-down::before {
content: "\e790";
content: "\e790";
}
}
}
@ -937,7 +1009,7 @@ export default {
color: #fff;
}
.card-left-title::after {
content: '';
content: "";
position: absolute;
top: 50%;
left: 20px;
@ -945,7 +1017,7 @@ export default {
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
background: #2865fa;
border-radius: 50%;
}
.echart-wr {
@ -988,7 +1060,10 @@ export default {
.echarts-tips-wd50 {
width: 320px;
}
.tips-list, .tips-item, .tips-lists, .tips-items-num {
.tips-list,
.tips-item,
.tips-lists,
.tips-items-num {
display: flex;
align-items: center;
}
@ -1008,12 +1083,12 @@ export default {
height: 10px;
box-sizing: border-box;
margin-right: 8px;
background: #1B51FF;
background: #1b51ff;
border-radius: 2px;
}
.tips-item-text {
font-size: 16px;
color: #D2E7FF;
color: #d2e7ff;
}
}
}
@ -1034,19 +1109,24 @@ export default {
box-sizing: border-box;
padding-left: 6px;
font-size: 16px;
color: #EFF0F1;
background: url('../../../../assets/img/shuju/measure/huang@2x.png') no-repeat left bottom;
color: #eff0f1;
background: url("../../../../assets/img/shuju/measure/huang@2x.png")
no-repeat left bottom;
&1 {
background: url('../../../../assets/img/shuju/measure/lv@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/lv@2x.png")
no-repeat left bottom;
}
&2 {
background: url('../../../../assets/img/shuju/measure/zi@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/zi@2x.png")
no-repeat left bottom;
}
&3 {
background: url('../../../../assets/img/shuju/measure/lan@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/lan@2x.png")
no-repeat left bottom;
}
&4 {
background: url('../../../../assets/img/shuju/measure/lanlv@2x.png') no-repeat left bottom;
background: url("../../../../assets/img/shuju/measure/lanlv@2x.png")
no-repeat left bottom;
}
}
.tips-items-num {
@ -1074,8 +1154,7 @@ export default {
padding-right: 30px;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
background: linear-gradient(90deg, #0863ea, #3b9ffc);
border: 0;
}
}

Loading…
Cancel
Save