Browse Source

Merge branch 'dev-shuju' into test

shibei_master
jiangyy 4 years ago
parent
commit
365c87c8a4
  1. 4
      .env.development
  2. 4
      .env.production.sit
  3. 6
      public/index.html
  4. BIN
      src/assets/img/shuju/sight.png
  5. BIN
      src/assets/img/shuju/volunteer1.png
  6. BIN
      src/assets/img/shuju/volunteer2.png
  7. BIN
      src/assets/img/shuju/volunteer3.png
  8. BIN
      src/assets/img/shuju/volunteer4.png
  9. BIN
      src/assets/img/shuju/volunteer5.png
  10. BIN
      src/assets/img/shuju/volunteer6.png
  11. BIN
      src/assets/img/shuju/volunteer7.png
  12. BIN
      src/assets/img/shuju/volunteer8.png
  13. BIN
      src/assets/img/shuju/volunteer9.png
  14. 77
      src/assets/scss/modules/visual/distributionAnalyze.scss
  15. 71
      src/assets/scss/modules/visual/heart.scss
  16. 384
      src/assets/scss/modules/visual/incident-info.scss
  17. 139
      src/assets/scss/modules/visual/issue-info.scss
  18. 15
      src/assets/scss/modules/visual/people.scss
  19. 63
      src/assets/scss/modules/visual/processAnalyze.scss
  20. 34
      src/assets/scss/modules/visual/resibuzz.scss
  21. 28
      src/assets/scss/modules/visual/typeAnalyze.scss
  22. 18
      src/js/ajax.js
  23. 8
      src/router/index.js
  24. 18
      src/utils/request.js
  25. 135
      src/views/components/foldText.vue
  26. 12
      src/views/main-navbar.vue
  27. 52
      src/views/modules/base/resi.vue
  28. 52
      src/views/modules/communityParty/elegant/index.vue
  29. 26
      src/views/modules/communityService/measure/index.vue
  30. 503
      src/views/modules/visual/basicinfo/cpts/demand-info.vue
  31. 705
      src/views/modules/visual/basicinfo/cpts/incident-info.vue
  32. 845
      src/views/modules/visual/basicinfo/cpts/topic-info.vue
  33. 72
      src/views/modules/visual/basicinfo/people.vue
  34. 231
      src/views/modules/visual/communityGovern/cpt/issue-info.vue
  35. 696
      src/views/modules/visual/communityGovern/cpt/project-info.vue
  36. 399
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  37. 18
      src/views/modules/visual/communityGovern/distributionLineOption.js
  38. 337
      src/views/modules/visual/communityGovern/processAnalyze.vue
  39. 11
      src/views/modules/visual/communityGovern/processLineOption.js
  40. 22
      src/views/modules/visual/communityGovern/processPieOption.js
  41. 316
      src/views/modules/visual/communityGovern/resibuzz.vue
  42. 258
      src/views/modules/visual/communityGovern/typeAnalyze.vue
  43. 172
      src/views/modules/visual/communityParty/community.vue
  44. 315
      src/views/modules/visual/communityParty/dialogInfo.vue
  45. 391
      src/views/modules/visual/communityParty/party.vue
  46. 22
      src/views/modules/visual/components/screen-echarts-frame/index.vue
  47. 243
      src/views/modules/visual/components/screen-map/index.vue
  48. 34
      src/views/modules/visual/components/screen-nodata/index.vue
  49. 3
      src/views/modules/visual/components/screen-table/index.vue
  50. 588
      src/views/modules/visual/cpts/analyse.vue
  51. 222
      src/views/modules/visual/cpts/line-chart.vue
  52. 39
      src/views/modules/visual/cpts/tb.vue
  53. 309
      src/views/modules/visual/heart/index.vue
  54. 305
      src/views/modules/visual/measure/dialogInfo.vue
  55. 525
      src/views/modules/visual/measure/service.vue
  56. 411
      src/views/modules/visual/measure/volunteer.vue
  57. 20
      src/views/pages/login.vue

4
.env.development

@ -1,6 +1,6 @@
NODE_ENV=development
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = http://192.168.51.36:8080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api
VUE_APP_NODE_ENV=dev

4
.env.production.sit

@ -1,5 +1,5 @@
NODE_ENV=production
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
VUE_APP_API_SERVER = http://192.168.1.140/api
VUE_APP_NODE_ENV=prod:sit
VUE_APP_PUBLIC_PATH=epmet-oper

6
public/index.html

@ -6,6 +6,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="shortcut icon" href="<%= BASE_URL %>favicon.ico" />
<script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&libraries=service&key=LWBBZ-TIGC3-VFP3L-YNMWH-FJB7T-JFBLO"></script>
<!-- f2图表 -->
<script src="https://gw.alipayobjects.com/os/antv/assets/f2/3.4.2/f2.min.js"></script>
<!-- 站点配置 -->
<script>
@ -36,8 +38,8 @@
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
<script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.140/api'
window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.140/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
// window.SITE_CONFIG['apiURL'] = 'http://118.190.150.119:41080/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api'
</script>

BIN
src/assets/img/shuju/sight.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
src/assets/img/shuju/volunteer1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/img/shuju/volunteer2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/img/shuju/volunteer3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/img/shuju/volunteer4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/img/shuju/volunteer5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/img/shuju/volunteer6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/img/shuju/volunteer7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/img/shuju/volunteer8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/img/shuju/volunteer9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

77
src/assets/scss/modules/visual/distributionAnalyze.scss

@ -77,6 +77,7 @@
.el-range-input {
color: #fff;
background: #06186d;
margin-left: 10px;
}
.el-range-separator {
color: #fff;
@ -115,12 +116,12 @@
display: flex;
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
justify-content: space-between;
height: calc(100vh - 230px);
.g-l {
width: 50%;
height: calc(100vh - 290px);
width: 40%;
height: calc(100vh - 240px);
.echart-line {
margin-left: 30px;
@ -138,7 +139,73 @@
}
.g-r {
width: 50%;
height: calc(100vh - 290px);
width: 55%;
height: calc(100vh - 250px);
.r-map {
position: relative;
height: calc(100vh - 250px - 50px);
width: 100%;
.map {
height: 100%;
width: 100%;
}
}
.r-legend {
display: flex;
justify-content: center;
margin-top: 24px;
align-items: center;
.legend_item {
margin-left: 40px;
display: flex;
align-items: center;
> span {
margin-left: 11px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #d2e7ff;
}
.color {
width: 20px;
height: 10px;
border-radius: 4px;
}
.color0 {
background: #dd2719;
}
.color1 {
background: #edbe00;
}
.color2 {
background: #00e5ed;
}
}
}
}
}
.table-status {
position: relative;
height: 300px;
// 暂无数据
.no-data {
&-img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
}

71
src/assets/scss/modules/visual/heart.scss

@ -0,0 +1,71 @@
@import "../../c/config";
@import "../../c/function";
@import "./c/common";
.g-cpt {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-top: 5px;
}
.m-sizer {
width: 195px;
margin: 10px 0;
margin-left: auto;
> span {
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
}
::v-deep .el-input {
width: 140px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-up:before {
content: "\e78f";
}
}
::v-deep .el-date-editor {
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
.m-tb {
width: 33%;
.title {
padding: 10px;
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;
}
}
.tb {
height: calc(100vh - 230px);
overflow-y: auto;
@include scrollBar;
}
}

384
src/assets/scss/modules/visual/incident-info.scss

@ -0,0 +1,384 @@
@import '../../c/config';
@import '../../c/function';
@import './c/common';
.m-pop {
@include shield;
background-color: rgba(#000, 0.9);
overflow-y: auto;
.wrap {
position: relative;
margin: 120px auto;
width: 1020px;
.title {
padding: 10px;
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;
}
}
.btn-close {
position: absolute;
top: -15px;
right: -15px;
cursor: pointer;
}
.line {
margin: 20px auto;
width: 900px;
height: 1px;
border: 1px dashed #1257c9;
}
.tabs {
margin-top: 30px;
display: flex;
align-items: center;
padding-left: 20px;
padding-left: 58px;
.tab-btn {
width: 30px;
text-align: center;
cursor: pointer;
}
.tab {
margin: 0 5px;
min-width: 76px;
padding: 0 5px;
height: 30px;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257c9;
box-shadow: 0 0 10px 0 inset #1257c9;
border-radius: 2px;
text-align: center;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 30px;
cursor: pointer;
transition: all ease 0.5s;
&.z-on {
background: linear-gradient(90deg, #1a5afd, #009cff);
box-shadow: none;
}
}
}
}
}
.m-info {
padding-left: 62px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 24px;
width: 500px;
.info-title {
margin-top: 30px;
font-size: 20px;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
line-height: 30px;
}
.info-content {
margin: 20px 0;
}
.info-pics {
display: flex;
margin: 20px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
.info-prop {
position: relative;
margin: 10px 0;
display: flex;
padding-left: 15px;
.info-title-2 {
width: 70px;
flex: 0 0 1;
font-size: 14px;
}
> span,
> div {
display: block;
max-width: 300px;
}
&::before {
content: '';
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
}
}
.m-case {
@include scrollBar;
height: 600px;
padding: 20px 0 20px 0;
overflow-y: auto;
}
.m-row {
display: flex;
justify-content: space-between;
}
.m-yanpan {
padding-left: 62px;
padding-right: 0;
min-height: 300px;
}
.m-hint {
position: relative;
height: 300px;
// 暂无数据
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
.m-line {
min-width: 400px;
.stat {
margin: 20px 0 10px;
display: flex;
.stat-item {
width: 33%;
text-align: center;
div {
font-size: 17px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#fff, 0.5);
line-height: 24px;
&.z-weak {
font-size: 12px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#fff, 0.5);
line-height: 24px;
}
}
}
}
}
.m-tb {
padding-left: 62px;
padding-right: 40px;
}
.m-pagination {
box-sizing: border-box;
margin-top: 20px;
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266d1;
color: #000d3f;
}
/deep/ .el-pagination .el-pager li {
background: #002e74;
}
/deep/ .el-pagination .btn-prev {
background: #002e74;
}
/deep/ .el-pagination .btn-next {
background: #002e74;
}
}
.m-process {
width: 400px;
.process-title {
margin-bottom: 25px;
margin-left: -5px;
font-size: 16px;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
line-height: 18px;
}
.list {
position: relative;
box-sizing: border-box;
margin-top: 30px/2;
margin-left: 50px/2;
padding: 0 0 0 30px/2;
width: 680px/2;
border-left: 3px solid #0c81fe;
padding-right: 10px;
&::before {
content: '';
position: absolute;
z-index: 1;
display: block;
top: -2px/2;
left: -2px/2;
width: 5px/2;
height: 20px/2;
background-color: #ffffff;
}
.item {
position: relative;
z-index: 2;
margin-bottom: 8px;
padding-bottom: 8px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #fefefe;
line-height: 24px;
padding-left: 20px;
padding-top: 1px;
&::before {
content: '';
display: block;
position: absolute;
top: -5px;
left: -11px;
width: 18px;
height: 18px;
background: #0c81fe;
border: 4px solid lighten(#0c81fe, 15);
border-radius: 100%;
}
&.z-on {
&::before {
background: #e08400;
border-color: lighten(#e08400, 15);
}
}
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.item-row {
margin-top: -10px;
margin-bottom: 10px;
display: flex;
}
.name {
position: relative;
padding: 0 10px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #fefefe;
line-height: 22px;
height: 22px;
border-radius: 10px 0 10px 0;
background-color: #0c81fe;
// background-color: #e08400;
}
.date {
margin-left: 10px;
font-size: 12px;
font-family: PingFang SC;
font-weight: 500;
color: #7ca1d2;
line-height: 25px;
}
.detail {
@include cs;
font-size: 16px;
line-height: 20px;
margin-bottom: 5px;
display: flex;
.detail-field {
width: 22%;
text-align: justify;
text-align-last: justify;
}
.detail-value {
width: 78%;
.detail-link {
display: inline;
}
}
}
.attachement-list {
padding-left: 80px;
a {
display: block;
cursor: pointer;
color: #4df0ff;
font-size: 14px;
i {
color: #fff;
}
}
}
}
}
}
.m-top {
display: flex;
}

139
src/assets/scss/modules/visual/issue-info.scss

@ -0,0 +1,139 @@
@import '../../c/config';
@import '../../c/function';
@import './c/common';
.m-pop {
@include shield;
background-color: rgba(#000, 0.9);
overflow-y: auto;
.wrap {
position: relative;
margin: 120px auto;
width: 1020px;
.title {
padding: 10px;
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;
}
}
.btn-close {
position: absolute;
top: -10px;
right: -10px;
cursor: pointer;
}
.line {
margin: 20px auto;
width: 900px;
height: 1px;
border: 1px dashed #1257c9;
}
}
}
.m-content {
display: flex;
}
.m-info {
padding-left: 62px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 24px;
width: 50%;
.info-title {
margin-top: 30px;
font-size: 20px;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
line-height: 30px;
}
.info-prop {
position: relative;
margin: 10px 0;
display: flex;
padding-left: 15px;
.info-title-2 {
width: 90px;
flex: 0 0 1;
font-size: 14px;
}
.info-pics {
display: flex;
margin: 10px 0;
img {
display: block;
width: 32%;
height: 90px;
margin-right: 9px;
object-fit: cover;
}
}
> span,
> div {
display: block;
max-width: 300px;
}
&::before {
content: '';
display: block;
position: absolute;
top: 9px;
left: 0;
width: 7px;
height: 7px;
background: #0c81fe;
border-radius: 3px;
margin-right: 10px;
}
}
}
.m-line {
width: 50%;
.stat {
margin: 20px 0 10px;
display: flex;
.stat-item {
width: 33%;
text-align: center;
div {
font-size: 17px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#fff, 0.5);
line-height: 24px;
&.z-weak {
font-size: 12px;
font-family: Source Han Serif SC;
font-weight: 500;
color: rgba(#fff, 0.5);
line-height: 24px;
}
}
}
}
}

15
src/assets/scss/modules/visual/people.scss

@ -633,3 +633,18 @@
background: #002e74;
}
}
.m-hint {
position: relative;
height: 300px;
// 暂无数据
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}

63
src/assets/scss/modules/visual/processAnalyze.scss

@ -77,6 +77,7 @@
width: 100px;
}
.g-pie {
position: relative;
}
}
.l_bottom {
@ -121,6 +122,7 @@
}
.echart-line {
margin-top: 10px;
height: 100%;
}
}
.g-count {
@ -209,6 +211,10 @@
background-color: #082586;
}
}
.r-status:hover {
cursor: pointer;
}
}
.r-legend {
@ -231,9 +237,6 @@
color: #d2e7ff;
}
}
.r-legend:hover {
cursor: pointer;
}
}
.echart-wr {
@ -244,8 +247,56 @@
width: 500px;
height: 100%;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 90%;
}
.g-pie {
position: relative;
.pie-legend {
margin-left: 30px;
margin-top: -40px;
display: flex;
justify-content: center;
.legend_item {
.item_name {
margin-left: 5px;
font-size: 10px;
font-family: PingFang SC;
font-weight: 500;
color: #eff0f1;
}
> img {
margin-top: -10px;
width: 80px;
height: 10px;
}
.item_num {
.item_count {
font-size: 17px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
.item_percent {
margin-left: 12px;
font-size: 8px;
font-family: PingFang SC;
font-weight: 300;
color: #ffffff;
line-height: 18px;
}
}
}
.item_last {
margin-left: 50px;
}
}
}
.table-status {
position: relative;
width: 600px;
margin: auto;
}

34
src/assets/scss/modules/visual/resibuzz.scss

@ -66,35 +66,36 @@
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
height: calc(100vh - 130px);
height: calc(100vh - 180px);
.g-l {
flex-shrink: 0;
width: 600px;
height: calc(100vh - 190px);
height: calc(100vh - 180px);
}
.g-r {
text-align: center;
margin: 40px 19px 20px;
margin: 40px 0 0 19px;
width: calc(100vw - 60px - 600px);
height: calc(100vh - 140px - 20px);
// height: calc(100vh - 170px - 20px);
}
}
.g-r {
.tb {
.m-tb {
position: relative;
height: calc(100vh - 220px);
overflow-y: auto;
@include scrollBar;
height: 100%;
.tb {
height: calc(100vh - 170px - 50px - 50px);
overflow-y: auto;
@include scrollBar;
}
.m-pagination {
position: absolute;
box-sizing: border-box;
right: 0;
bottom: 0;
position: absolute;
right: 5px;
bottom: 5px;
width: 100%;
height: 40px;
display: flex;
@ -133,3 +134,10 @@
height: 90%;
}
}
.table-status {
position: relative;
width: 600px;
margin: auto;
margin-top: 200px;
}

28
src/assets/scss/modules/visual/typeAnalyze.scss

@ -66,35 +66,37 @@
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
height: calc(100vh - 130px);
height: calc(100vh - 180px);
.g-l {
flex-shrink: 0;
width: 600px;
height: calc(100vh - 190px);
height: calc(100vh - 180px);
}
.g-r {
text-align: center;
margin: 40px 19px 20px;
margin: 40px 0 0 19px;
width: calc(100vw - 60px - 600px);
height: calc(100vh - 140px - 20px);
// height: calc(100vh - 140px - 20px);
}
}
.g-r {
.tb {
.m-tb {
position: relative;
height: calc(100vh - 220px);
overflow-y: auto;
@include scrollBar;
height: 100%;
.tb {
height: calc(100vh - 170px - 50px - 50px);
overflow-y: auto;
@include scrollBar;
}
.m-pagination {
position: absolute;
box-sizing: border-box;
right: 0;
bottom: 0;
right: 5px;
bottom: 5px;
width: 100%;
height: 40px;
display: flex;
@ -133,3 +135,7 @@
height: 90%;
}
}
.table-status {
margin-top: 200px;
}

18
src/js/ajax.js

@ -88,16 +88,18 @@ axios.interceptors.request.use(
*/
axios.interceptors.response.use(
(response) => {
if (response.data.code === 401 || response.data.code === 10001 || response.data.code === 10005) {
const code = [10007, 401, 10001, 10005]
if (code.includes(response.data.code) ) {
// debugger;
clearLoginInfo()
localStorage.setItem('userType', 'work')
let userType = localStorage.getItem("userType");
if (userType === 'work'){
router.replace({ name: 'loginWork' })
}else {
router.replace({ name: 'login' })
}
// localStorage.setItem('userType', 'work')
// let userType = localStorage.getItem("userType");
// if (userType === 'work'){
// router.replace({ name: 'loginWork' })
// }else {
// router.replace({ name: 'login' })
// }
router.replace({ name: 'login' })
return Promise.reject(response.data.msg)
}

8
src/router/index.js

@ -316,6 +316,14 @@ router.beforeEach((to, from, next) => {
},
],
},
{
icon: "icon-setting",
id: "2221321fefefaewfa123",
name: "初心互助",
url: "visual/heart/index",
children: [
],
},
];
fnAddDynamicMenuRoutes2(window.SITE_CONFIG["menuShujuList"]);
// next({ ...to, replace: true })

18
src/utils/request.js

@ -51,15 +51,17 @@ http.interceptors.request.use(config => {
* 响应拦截
*/
http.interceptors.response.use(response => {
if (response.data.code === 401 || response.data.code === 10001 || response.data.code === 10005) {
const code = [10007, 401, 10001, 10005]
if (code.includes(response.data.code)) {
clearLoginInfo()
localStorage.setItem('userType', 'work')
let userType = localStorage.getItem("userType");
if (userType === 'work'){
router.replace({ name: 'loginWork' })
}else {
router.replace({ name: 'login' })
}
// localStorage.setItem('userType', 'work')
// let userType = localStorage.getItem("userType");
// if (userType === 'work'){
// router.replace({ name: 'loginWork' })
// }else {
// router.replace({ name: 'login' })
// }
router.replace({ name: 'login' })
return Promise.reject(response.data.msg)
}

135
src/views/components/foldText.vue

@ -0,0 +1,135 @@
<template>
<div class="m-fold_text" :class="initOk ? '' : 'z-init'">
<div
id="cnt"
ref="foldSlot"
class="fold_text-cnt"
:class="isFolded ? 'z-fold-' + row : ''"
>
<slot></slot>
</div>
<div v-if="!noNeedFold" class="fold_text-btn" @click="shiftFold">
{{ isFolded ? "展开" : "收起" }}
</div>
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
export default {
name: "ResiSearch",
props: {
row: {
type: Number,
default: 2,
},
lineHeight: {
type: Number,
default: 24,
},
},
data() {
return {
initOk: false,
isFolded: false,
noNeedFold: false,
};
},
computed: {},
watch: {},
created() {
this.init();
},
methods: {
async init() {
await nextTick();
const height = await this.$refs.foldSlot.offsetHeight;
const { row, lineHeight } = this;
let noNeedFold = height / row < lineHeight;
this.noNeedFold = noNeedFold;
this.isFolded = !noNeedFold;
this.initOk = true;
},
shiftFold() {
let { isFolded } = this;
this.isFolded = !isFolded;
},
},
};
</script>
<style lang="scss" scope>
//
@mixin cs {
&::after {
display: block;
visibility: hidden;
clear: both;
overflow: hidden;
height: 0;
content: "";
}
}
//
@mixin toe {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-wrap: normal;
}
//
@mixin toeM($num) {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: $num;
-webkit-box-orient: vertical;
}
.m-fold_text {
@include cs;
&.z-init {
background-color: rgba(#000, 0.05);
> view {
visibility: hidden;
}
}
.fold_text-cnt {
&.z-fold-1 {
@include toe;
}
&.z-fold-2 {
@include toeM(2);
}
&.z-fold-3 {
@include toeM(3);
}
&.z-fold-4 {
@include toeM(4);
}
&.z-fold-5 {
@include toeM(5);
}
}
.fold_text-btn {
float: right;
margin-right: -4px;
padding: 0 5px;
line-height: 20px;
color: #0c81fe;
cursor: pointer;
}
}
</style>

12
src/views/main-navbar.vue

@ -227,12 +227,12 @@ export default {
}
clearLoginInfo()
if (localStorage.getItem('userType') === 'work') {
this.$router.push({ name: 'loginWork' })
} else {
this.$router.push({ name: 'login' })
}
this.$router.push({ name: 'login' })
// if (localStorage.getItem('userType') === 'work') {
// this.$router.push({ name: 'loginWork' })
// } else {
// this.$router.push({ name: 'login' })
// }
})
.catch(() => {})
})

52
src/views/modules/base/resi.vue

@ -9,7 +9,7 @@
<el-card class="resi-card-table">
<div class="resi-row-btn">
<el-button type="success" size="small" @click="handleAdd">新增</el-button>
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
<el-button type="warning" size="small" :loading="exportBtn" @click="handleExport">{{exportBtnTitle}}</el-button>
<!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
<el-upload
ref="upload"
@ -216,6 +216,8 @@ export default {
},
data() {
return {
exportBtn: false,
exportBtnTitle: '导出',
importBtnTitle: '导入人员数据',
importLoading: false,
rowVisible: false,
@ -314,14 +316,16 @@ export default {
window.URL.revokeObjectURL(url)
}
},
handleExport() {
async handleExport() {
this.exportBtn = true
this.exportBtnTitle = '正在导出...'
let params = {
formCode: 'resi_base_info',
conditions: this.conditions
}
// .post('epmetuser/icresiuser/exportExcel', params)
axios({
await axios({
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/exportExcel',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
@ -329,6 +333,7 @@ export default {
responseType: 'blob'
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
@ -345,8 +350,10 @@ export default {
})
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
this.$message.error('获取导出失败')
})
this.exportBtnTitle = '导出'
this.exportBtn = false
},
//
handleExcelSuccess (res, file) {
@ -377,38 +384,43 @@ export default {
}
return fileType && isLt1M
},
uploadHttpRequest(file) {
async uploadHttpRequest(file) {
this.importLoading = true
this.importBtnTitle = '正在上传中...'
const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) //
axios({
await axios({
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel',
method: 'post',
data: formData,
responseType: 'blob'
})
.then((res) => {
this.importLoading = false
this.importBtnTitle = '导入人员数据'
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
}
this.getTableData()
})
.catch( err => {
console.log('失败', err)
param.onError() //
file.onError() //
this.$message.error('导入失败')
})
this.importLoading = false
this.importBtnTitle = '导入人员数据'
this.$refs.upload.clearFiles()
},
handleClick(tab, event) {
console.log(tab, event)

52
src/views/modules/communityParty/elegant/index.vue

@ -34,7 +34,7 @@
</div>
<div class="resi-row-btn">
<el-button type="success" @click="handleAdd">新增</el-button>
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
<el-button type="warning" size="small" :loading="exportBtn" @click="handleExport">{{ exportBtnTitle }}</el-button>
<el-upload
ref="upload"
class="upload-demo"
@ -197,6 +197,8 @@ export default {
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
importBtnTitle: '导入人员数据',
importLoading: false,
exportBtn: false,
exportBtnTitle: '导出',
tableLoading: false,
btnLoading: false,
uploading: false,
@ -325,47 +327,53 @@ export default {
}
return fileType && isLt1M
},
uploadHttpRequest(file) {
async uploadHttpRequest(file) {
this.importLoading = true
this.importBtnTitle = '正在上传中...'
const formData = new FormData() //FormDataappend('key', value)
formData.append('file', file.file) //
axios({
await axios({
url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/import',
method: 'post',
data: formData,
responseType: 'blob'
})
.then((res) => {
this.importLoading = false
this.importBtnTitle = '导入人员数据'
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
// this.importLoading = false
// this.importBtnTitle = ''
// let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
// console.log('filename', fileName)
// let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
// var url = window.URL.createObjectURL(blob)
// var aLink = document.createElement('a')
// aLink.style.display = 'none'
// aLink.href = url
// aLink.setAttribute('download', fileName)
// document.body.appendChild(aLink)
// aLink.click()
// document.body.removeChild(aLink) //
// window.URL.revokeObjectURL(url) //blob
this.getTableData()
})
.catch( err => {
console.log('失败', err)
param.onError() //
file.onError() //
this.$message.error('导入失败')
})
this.importLoading = false
this.importBtnTitle = '导入人员数据'
this.$refs.upload.clearFiles()
},
handleExport() {
async handleExport() {
this.exportBtn = true
this.exportBtnTitle = '正在导出...'
let params = {
agencyId: this.$store.state.user.agencyId,
pageSize: 9999,
pageNo: this.currentPage
}
// .post('epmetuser/icresiuser/exportExcel', params)
axios({
await axios({
url: window.SITE_CONFIG['apiURL'] + '/resi/partymember/icpartymemberstyle/export',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
@ -389,8 +397,10 @@ export default {
})
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
this.$message.error('获取导出失败')
})
this.exportBtn = false
this.exportBtnTitle = '导出'
},
beforeImgUpload (file) {
const isPNG = (file.type === 'image/png') || (file.type === 'image/jpeg')

26
src/views/modules/communityService/measure/index.vue

@ -299,7 +299,7 @@
type="textarea" clearable class="input-width-textarea" placeholder="请输入内容"></el-input>
</el-form-item>
<el-form-item
v-if="addType === 'appoint' || addType == 'finish' || addType == 'look'"
v-if="addType === 'appoint' || addType == 'finish' || (addType == 'look' && form.serviceShowFlag)"
label="服务方" prop="serviceType">
<template v-if="disabled && addType !== 'appoint'">
<el-input v-model="form.serviceShowName" :disabled="disabled" class="input-width"></el-input>
@ -337,7 +337,10 @@
</el-select>
</template>
</el-form-item>
<template v-if="addType == 'finish' || addType == 'look'">
<el-form-item v-if="addType == 'look' && form.status == 'canceled'" label="取消时间" prop="cancelTime">
<span>{{ form.cancelTime }}</span>
</el-form-item>
<template v-if="addType == 'finish' || (addType == 'look' && form.status == 'finished')">
<el-form-item label="完成情况" prop="finishResult">
<el-radio v-model="form.finishResult"
label="resolved" :disabled="disabled && addType != 'finish'" >已解决</el-radio>
@ -355,12 +358,12 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
@blur="handelBlurServiceTime"
@change="handelBlurServiceTime"
>
</el-date-picker>
</el-form-item>
<el-form-item label="评价" prop="score" class="form-score">
<el-rate v-model="form.score" :disabled="disabled && addType != 'finish'" ></el-rate>
<el-rate v-model="form.score" :allow-half="true" :disabled="disabled && addType != 'finish'" ></el-rate>
</el-form-item>
<el-form-item label="备注" prop="finishDesc">
<el-input v-model="form.finishDesc" :autosize="{ minRows: 2, maxRows: 10}"
@ -373,8 +376,9 @@
</el-form>
<div class="resi-btns">
<el-button size="small" @click="handlerCancle">取消</el-button>
<el-button size="small" @click="handlerCancle">{{ addType != 'look' ? '取消' : '关闭'}}</el-button>
<el-button
v-if="addType != 'look'"
type="primary"
size="small"
:loading="btnLoading"
@ -591,7 +595,7 @@ export default {
serviceType: [{ required: true, message: '服务方不能为空', trigger: 'blur' }],
serviceStartTime: [{ required: true, message: '实际服务时间不能为空', trigger: 'blur' }],
score: [{ required: true, message: '评分不能为空', trigger: 'blur' }],
finishDesc: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
// finishDesc: [{ required: true, message: '', trigger: 'blur' }],
finishResult: [{ required: true, message: '完成情况不能为空', trigger: 'blur' }],
}
}
@ -686,9 +690,9 @@ export default {
},
handelBlurServiceTime(val) {
console.log('val', val)
if (val.value.length > 0) {
this.form.serviceStartTime = val.value[0]
this.form.serviceEndTime = val.value[1]
if (val.length > 0) {
this.form.serviceStartTime = val[0]
this.form.serviceEndTime = val[1]
}
},
@ -714,6 +718,7 @@ export default {
// this.form.demandUserId = ''
this.$delete(this.form, 'demandRecId')
this.selectDemandUser = ''
this.finishServiceTime = ''
for(const n in this.form) {
this.form[n] = ''
}
@ -732,6 +737,9 @@ export default {
if (addType == 'look') {
this.finishServiceTime = row.serviceStartTime && [row.serviceStartTime, row.serviceEndTime] || ''
}
if (addType == 'finish') {
this.form.finishResult = 'resolved'
}
if (addType == 'appoint' && row.serviceType) {
await this.getServiceuserList(row.serviceType)
}

503
src/views/modules/visual/basicinfo/cpts/demand-info.vue

@ -1,503 +0,0 @@
<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="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div
:key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList"
>
<div class="list">
<div class="item" v-if="index == 0">
<span class="item-field">所属网格</span>
<span>{{ gridName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属小区</span>
<span>{{ xiaoquName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属楼宇</span>
<span>{{ louName }}-{{ danyuanName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属家庭</span>
<span>{{ homeName }}</span>
</div>
<div class="item" :key="field.itemId" v-for="field in fieldSubList">
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
info[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
info[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
info[field.columnName] == null ? "--" : info[field.columnName]
}}</span>
</div>
</div>
<div class="line"></div>
</div>
<div class="tabs">
<div
class="tab-btn"
@click="subStartGroupIndex"
v-if="groupList.length > 9"
>
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div
v-show="index >= startGroupIndex && index < startGroupIndex + 9"
class="tab"
:class="groupIndex % groupList.length == index ? 'z-on' : ''"
:key="'tab' + index"
@click="groupIndex = index"
v-for="(item, index) in groupList"
>
{{ item.label }}
</div>
<div
class="tab-btn"
@click="addStartGroupIndex"
v-if="groupList.length > 9"
>
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div
:key="'group' + index"
v-show="groupIndex % groupList.length == index"
v-for="(group, index) in groupList"
>
<div v-if="group.tableName == 'ic_resi_demand' && Array.isArray(allInfo.ic_resi_demand) && allInfo.ic_resi_demand.length>0">
<div
class="list"
:key="'ic_resi_demand' + infoIndex"
v-for="(infoItem, infoIndex) in allInfo.ic_resi_demand"
>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
infoItem[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
infoItem[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
infoItem[field.columnName] == null
? "--"
: infoItem[field.columnName]
}}</span>
</div>
</div>
</div>
<div class="list" v-else>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: getOptionLabel(
field.options,
allInfo[group.tableName][0][field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: allInfo[group.tableName][0][field.columnName]
}}</span>
</div>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import { requestPost } from "@/js/dai/request";
export default {
name: "demandInfo",
props: {
userId: {
type: String,
default: "",
},
gridName: {
type: String,
default: "",
},
},
components: {
cptCard,
},
data() {
return {
fieldList: [],
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
};
},
computed: {
xiaoquName() {
const {
xiaoquList,
info: { VILLAGE_ID },
} = this;
if (Array.isArray(xiaoquList) && xiaoquList.length > 0 && VILLAGE_ID) {
let item = xiaoquList.find((item) => item.value == VILLAGE_ID);
if (item) {
return item.label;
}
}
return "";
},
louName() {
const {
louList,
info: { BUILD_ID },
} = this;
if (Array.isArray(louList) && louList.length > 0 && BUILD_ID) {
let item = louList.find((item) => item.value == BUILD_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
homeName() {
const {
homeList,
info: { HOME_ID },
} = this;
if (Array.isArray(homeList) && homeList.length > 0 && HOME_ID) {
let item = homeList.find((item) => item.value == HOME_ID);
if (item) {
return item.label;
}
}
return "";
},
},
watch: {
userId() {
this.getApiData();
},
},
mounted() {
this.getApiData();
},
methods: {
addStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
this.startGroupIndex = startGroupIndex + 1;
} else {
this.startGroupIndex = groupList.length - 9;
}
},
subStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex > 0) {
this.startGroupIndex = startGroupIndex - 1;
} else {
this.startGroupIndex = 0;
}
},
handleClose() {
this.$emit("close");
},
async getApiData() {
await this.getField();
await this.getInfo();
this.getXiaoquList();
this.getLouList();
this.getDanyuanList();
this.getHomeList();
},
getOptionLabel(options, value, type = "") {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
if (valueArr.length > 0) {
let level1 = options.find((item) => item.value == valueArr[0]);
if (level1) {
if (valueArr.length > 1 && level1.children) {
let level2 = level1.children.find(
(item) => item.value == valueArr[1]
);
if (level2) {
return level1.label + "-" + level2.label;
}
}
return level1.label;
}
}
} else {
return valueArr
.map((val) => {
let item = options.find((item) => item.value == val);
if (item && item.label) {
return item.label;
}
return "--";
})
.join("、");
}
}
return "--";
},
//
async getField() {
const url = "/oper/customize/icform/getcustomerform";
const { data, code, msg } = await requestPost(url, {
dynamic: true,
formCode: "resi_base_info",
});
if (code === 0) {
this.groupList = data.groupList;
this.fieldList = (function (arr) {
let col = [];
let ele = [];
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (item.itemType == "divider" || i == arr.length - 1) {
col.push([...ele]);
ele = [];
} else {
ele.push(item);
}
}
return col;
})(data.itemList);
this.fieldList.forEach((subList, index) => {
subList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.fieldList[index][subIndex].options = await this.getOptions(
item.optionSourceValue
);
}
});
});
} else {
this.$message.error(msg);
}
},
//
async getInfo() {
const url = "/epmetuser/icresiuser/detail";
const { data, code, msg } = await requestPost(url, {
icResiUserId: this.userId,
formCode: "resi_base_info",
});
if (code === 0) {
this.info = data.ic_resi_user[0];
this.allInfo = data;
this.fieldList.forEach((subList, index) => {
subList.forEach((item, subIndex) => {
if (
item.itemType == "radio" &&
item.childGroup &&
this.allInfo[item.tableName] &&
this.allInfo[item.tableName][0][item.columnName] == "1"
) {
this.groupList = [...this.groupList, item.childGroup];
}
});
});
console.log("1111111111111111111111111", this.groupList);
this.groupList.forEach((subList, index) => {
subList.itemList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.groupList[index].itemList[subIndex].options =
await this.getOptions(item.optionSourceValue);
}
});
});
} else {
this.$message.error(msg);
}
},
//
async getOptions(url) {
if (!url) return [];
const { data, code, msg } = await requestPost(url, {});
if (code === 0) {
return data;
} else {
return [];
}
},
async getXiaoquList() {
const url = "/gov/org/icneighborhood/neighborhoodoption";
const { data, code, msg } = await requestPost(url, {
agencyId: this.info.AGENCY_ID,
gridId: this.info.GRID_ID,
});
if (code === 0) {
this.xiaoquList = data;
} else {
this.$message.error(msg);
}
},
async getLouList() {
const url = "/gov/org/icbuilding/buildingoption";
const { data, code, msg } = await requestPost(url, {
neighborHoodId: this.info.VILLAGE_ID,
});
if (code === 0) {
this.louList = data;
} else {
this.$message.error(msg);
}
},
async getDanyuanList() {
const url = "/gov/org/icbuildingunit/unitoption";
const { data, code, msg } = await requestPost(url, {
buildingId: this.info.BUILD_ID,
});
if (code === 0) {
this.danyuanList = data;
} else {
this.$message.error(msg);
}
},
async getHomeList() {
const url = "/gov/org/ichouse/houseoption";
const { data, code, msg } = await requestPost(url, {
unitId: this.info.UNIT_ID,
});
if (code === 0) {
this.homeList = data;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>

705
src/views/modules/visual/basicinfo/cpts/incident-info.vue

@ -4,62 +4,43 @@
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>更多信息</span>
<span>事件详情</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div
:key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList"
>
<div class="list">
<div class="item" v-if="index == 0">
<span class="item-field">所属网格</span>
<span>{{ gridName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属小区</span>
<span>{{ xiaoquName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属楼宇</span>
<span>{{ louName }}-{{ danyuanName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属家庭</span>
<span>{{ homeName }}</span>
</div>
<div class="item" :key="field.itemId" v-for="field in fieldSubList">
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
info[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
info[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
info[field.columnName] == null ? "--" : info[field.columnName]
}}</span>
<div class="m-info">
<div class="info-title">事件内容</div>
<div class="info-content">{{ info.eventContent }}</div>
<div class="info-pics">
<img
:src="src"
:key="src"
v-for="src in info.eventImgs"
@click="watchImg(src)"
/>
</div>
<div class="info-prop">
<span>提交时间</span>
<span>{{ info.eventTime }}</span>
</div>
<div class="info-prop">
<span>报事人</span>
<span>{{ info.eventPeopleName }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="info-prop">
<span>提报给</span>
<div>
<div :key="item" v-for="item in info.eventOrg">{{ item }}</div>
<div :key="item" v-for="item in info.eventPerson">{{ item }}</div>
</div>
</div>
<div class="line"></div>
</div>
<div class="tabs">
@ -89,81 +70,137 @@
</div>
</div>
<div
:key="'group' + index"
v-show="groupIndex % groupList.length == index"
v-for="(group, index) in groupList"
>
<div v-if="group.tableName == 'ic_resi_demand' && Array.isArray(allInfo.ic_resi_demand) && allInfo.ic_resi_demand.length>0">
<div
class="list"
:key="'ic_resi_demand' + infoIndex"
v-for="(infoItem, infoIndex) in allInfo.ic_resi_demand"
>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
infoItem[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
infoItem[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
infoItem[field.columnName] == null
? "--"
: infoItem[field.columnName]
}}</span>
</div>
<div class="m-case">
<div class="m-yanpan" v-if="groupIndex == 0">
<div v-if="info.projectId">
<analyse
v-if="yanPan.loading"
singleTitle="智能随手拍"
:userList="yanPan.houseUserList"
:userName="yanPan.icUserName"
:singleList="yanPan.categoryList"
@user="toUserInfo"
@project="toProjectInfo"
/>
<screen-loading v-else>加载中</screen-loading>
</div>
<div v-else class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
<div class="m-tb" v-if="groupIndex == 1">
<cpt-tb
:col-list="comment.colList"
:loading="comment.loading"
:header="comment.header"
:list="comment.list"
></cpt-tb>
</div>
<div class="list" v-else>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: getOptionLabel(
field.options,
allInfo[group.tableName][0][field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: allInfo[group.tableName][0][field.columnName]
}}</span>
<div v-if="groupIndex == 2">
<div class="m-row" v-if="info.projectId">
<div class="m-info">
<div class="info-prop">
<span>项目标题</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>项目方案</span>
<span>{{ projectInfo.backGround }}</span>
</div>
<div class="info-prop">
<span>内部备注</span>
<span>{{ projectInfo.internalRemark || "--" }}</span>
</div>
<div class="info-prop">
<span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div>
<div class="info-prop" v-if="projectCate.length > 0">
<span>分类</span>
<fold-text :row="3">
<div :key="item.name" v-for="item in projectCate">
{{ item.name }}
</div>
</fold-text>
</div>
<div class="info-prop" v-if="projectTag.length > 0">
<span>标签</span>
<fold-text :row="3">
<div :key="item.name" v-for="item in projectTag">
{{ item.name }}
</div>
</fold-text>
</div>
</div>
<div class="m-process" v-if="projectProcess.length > 0">
<div class="process-title">处理进展</div>
<div class="list">
<div
class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in projectProcess"
>
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.publicReply"
>
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.internalRemark"
>
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{
item.internalRemark
}}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a
:href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile"
>
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-else class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
</div>
@ -174,16 +211,127 @@
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
function iniData() {
return {
groupList: [
{ label: "研判分析" },
{ label: "查看回复" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {
eventTime: "",
eventContent: "",
eventAddress: "",
gridName: "",
isClosed: true,
isResolve: true,
isRollback: true,
eventImgs: [],
eventPerson: [],
eventOrg: [],
eventPeopleName: "",
projectInfo: {
projectId: "",
operationName: "",
operationTime: "",
projectDeclare: "",
},
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "30%",
},
{
align: "left",
width: "50%",
},
],
header: ["回复者", "回复时间", "回复内容"],
list: [],
},
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
epmetUserIdList: [],
houseUserList: [
// {
// icResiUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
}
export default {
name: "demandInfo",
props: {
userId: {
resiEventId: {
type: String,
default: "",
},
gridName: {
epmetUserIdList: {
type: Array,
default: [],
},
icResiUserId: {
type: String,
default: "",
},
@ -191,94 +339,22 @@ export default {
components: {
cptCard,
cptTb,
analyse,
screenLoading,
foldText,
},
data() {
return {
fieldList: [],
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
};
},
data: iniData,
computed: {
xiaoquName() {
const {
xiaoquList,
info: { VILLAGE_ID },
} = this;
if (Array.isArray(xiaoquList) && xiaoquList.length > 0 && VILLAGE_ID) {
let item = xiaoquList.find((item) => item.value == VILLAGE_ID);
if (item) {
return item.label;
}
}
return "";
},
louName() {
const {
louList,
info: { BUILD_ID },
} = this;
if (Array.isArray(louList) && louList.length > 0 && BUILD_ID) {
let item = louList.find((item) => item.value == BUILD_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
homeName() {
const {
homeList,
info: { HOME_ID },
} = this;
if (Array.isArray(homeList) && homeList.length > 0 && HOME_ID) {
let item = homeList.find((item) => item.value == HOME_ID);
if (item) {
return item.label;
}
}
return "";
},
},
computed: {},
watch: {
userId() {
resiEventId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
},
@ -288,6 +364,10 @@ export default {
},
methods: {
watchImg(src) {
window.open(src);
},
addStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
@ -309,121 +389,41 @@ export default {
},
async getApiData() {
await this.getField();
this.getComment();
await this.getInfo();
this.getXiaoquList();
this.getLouList();
this.getDanyuanList();
this.getHomeList();
},
getOptionLabel(options, value, type = "") {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
if (valueArr.length > 0) {
let level1 = options.find((item) => item.value == valueArr[0]);
if (level1) {
if (valueArr.length > 1 && level1.children) {
let level2 = level1.children.find(
(item) => item.value == valueArr[1]
);
if (level2) {
return level1.label + "-" + level2.label;
}
}
return level1.label;
}
}
} else {
return valueArr
.map((val) => {
let item = options.find((item) => item.value == val);
if (item && item.label) {
return item.label;
}
return "--";
})
.join("、");
}
}
return "--";
this.getProjectProcess();
this.getProjectInfo();
this.getProjectCate();
this.getYanPan();
},
//
async getField() {
const url = "/oper/customize/icform/getcustomerform";
async getInfo() {
const url = "/gov/project/resievent/eventdetail-icdata";
const { data, code, msg } = await requestPost(url, {
dynamic: true,
formCode: "resi_base_info",
resiEventId: this.resiEventId,
});
if (code === 0) {
this.groupList = data.groupList;
this.fieldList = (function (arr) {
let col = [];
let ele = [];
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (item.itemType == "divider" || i == arr.length - 1) {
col.push([...ele]);
ele = [];
} else {
ele.push(item);
}
}
return col;
})(data.itemList);
this.fieldList.forEach((subList, index) => {
subList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.fieldList[index][subIndex].options = await this.getOptions(
item.optionSourceValue
);
}
});
});
this.info = data;
} else {
this.$message.error(msg);
}
},
//
async getInfo() {
const url = "/epmetuser/icresiuser/detail";
async getComment() {
const url = "/gov/project/resieventreply/list";
const { data, code, msg } = await requestPost(url, {
icResiUserId: this.userId,
formCode: "resi_base_info",
resiEventId: this.resiEventId,
});
this.comment.loading = false;
if (code === 0) {
this.info = data.ic_resi_user[0];
this.allInfo = data;
this.fieldList.forEach((subList, index) => {
subList.forEach((item, subIndex) => {
if (
item.itemType == "radio" &&
item.childGroup &&
this.allInfo[item.tableName] &&
this.allInfo[item.tableName][0][item.columnName] == "1"
) {
this.groupList = [...this.groupList, item.childGroup];
}
});
});
console.log("1111111111111111111111111", this.groupList);
this.groupList.forEach((subList, index) => {
subList.itemList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.groupList[index].itemList[subIndex].options =
await this.getOptions(item.optionSourceValue);
}
});
this.comment.list = data.map((item) => {
return [item.replyName, item.replyTime, item.replyContent];
});
} else {
this.$message.error(msg);
@ -431,73 +431,120 @@ export default {
},
//
async getOptions(url) {
if (!url) return [];
async getProjectProcess() {
const {
info: { projectInfo },
} = this;
if (!projectInfo || !projectInfo.projectId) return;
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {});
const { data, code, msg } = await requestPost(url, {
projectId: projectInfo.projectId,
});
if (code === 0) {
return data;
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
return [];
this.$message.error(msg);
}
},
async getXiaoquList() {
const url = "/gov/org/icneighborhood/neighborhoodoption";
//
async getProjectInfo() {
const {
info: { projectInfo },
} = this;
if (!projectInfo || !projectInfo.projectId) return;
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
agencyId: this.info.AGENCY_ID,
gridId: this.info.GRID_ID,
projectId: projectInfo.projectId,
});
if (code === 0) {
this.xiaoquList = data;
this.projectInfo = data;
} else {
this.$message.error(msg);
}
},
async getLouList() {
const url = "/gov/org/icbuilding/buildingoption";
async getProjectCate() {
const {
info: { projectInfo },
} = this;
if (!projectInfo || !projectInfo.projectId) return;
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
neighborHoodId: this.info.VILLAGE_ID,
projectId: projectInfo.projectId,
});
if (code === 0) {
this.louList = data;
this.projectCate = data.categoryList;
this.projectTag = data.tagList;
} else {
this.$message.error(msg);
}
},
async getDanyuanList() {
const url = "/gov/org/icbuildingunit/unitoption";
//
async getYanPan() {
const url = "/gov/project/resievent/research-analysis";
const { data, code, msg } = await requestPost(url, {
buildingId: this.info.BUILD_ID,
resiEventId: this.resiEventId,
epmetUserIdList: this.epmetUserIdList,
icResiUserId: this.icResiUserId,
projectId: this.info.projectId,
});
if (code === 0) {
this.danyuanList = data;
data.categoryList = data.projectData.map((item) => {
return {
categoryCode: item.firstCategoryCode,
categoryName: item.firstCategoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.projectTitle,
status: subItem.projectStatus,
statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
resiEventId: subItem.resiEventId,
};
}),
};
});
this.yanPan = { ...this.yanPan, ...data };
this.yanPan.loading = true;
} else {
this.$message.error(msg);
}
},
async getHomeList() {
const url = "/gov/org/ichouse/houseoption";
const { data, code, msg } = await requestPost(url, {
unitId: this.info.UNIT_ID,
toUserInfo(item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
});
},
if (code === 0) {
this.homeList = data;
} else {
this.$message.error(msg);
}
toProjectInfo(item) {
console.log(item);
this.resiEventId = item.resiEventId;
},
},
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

845
src/views/modules/visual/basicinfo/cpts/topic-info.vue

@ -4,62 +4,36 @@
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>更多信息</span>
<span>话题详情</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div
:key="'fieldSubList' + index"
v-for="(fieldSubList, index) in fieldList"
>
<div class="list">
<div class="item" v-if="index == 0">
<span class="item-field">所属网格</span>
<span>{{ gridName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属小区</span>
<span>{{ xiaoquName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属楼宇</span>
<span>{{ louName }}-{{ danyuanName }}</span>
</div>
<div class="item" v-if="index == 0">
<span class="item-field">所属家庭</span>
<span>{{ homeName }}</span>
</div>
<div class="item" :key="field.itemId" v-for="field in fieldSubList">
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
info[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
info[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
info[field.columnName] == null ? "--" : info[field.columnName]
}}</span>
</div>
<div class="m-info">
<div class="info-title">话题内容</div>
<div class="info-content">{{ info.topicContent }}</div>
<div class="info-pics">
<img
:src="src"
:key="src"
v-for="src in info.topicImgs"
@click="watchImg(src)"
/>
</div>
<div class="info-prop">
<span>发布时间</span>
<span>{{ info.releaseTime }}</span>
</div>
<div class="info-prop">
<span>话题地址</span>
<span>{{ info.releaseAddress }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="line"></div>
</div>
<div class="tabs">
@ -89,81 +63,201 @@
</div>
</div>
<div
:key="'group' + index"
v-show="groupIndex % groupList.length == index"
v-for="(group, index) in groupList"
>
<div v-if="group.tableName == 'ic_resi_demand' && Array.isArray(allInfo.ic_resi_demand) && allInfo.ic_resi_demand.length>0">
<div
class="list"
:key="'ic_resi_demand' + infoIndex"
v-for="(infoItem, infoIndex) in allInfo.ic_resi_demand"
>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
infoItem[field.columnName] == null
? "--"
: getOptionLabel(
field.options,
infoItem[field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
infoItem[field.columnName] == null
? "--"
: infoItem[field.columnName]
}}</span>
<div class="m-case">
<div class="m-yanpan" v-if="groupIndex == 0">
<div v-if="issueInfo.projectId">
<analyse
v-if="yanPan.loading"
singleTitle="楼院小组"
:userList="yanPan.houseUserList"
:userName="yanPan.icUserName"
:singleList="yanPan.categoryList"
@user="toUserInfo"
@project="toProjectInfo"
/>
<screen-loading v-else>加载中</screen-loading>
</div>
<div v-else class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
<div class="m-tb" v-if="groupIndex == 1">
<cpt-tb
:col-list="comment.colList"
:loading="comment.loading"
:header="comment.header"
:list="comment.list"
@operate="checkTopicCommentImg"
></cpt-tb>
</div>
<div v-if="groupIndex == 2">
<div class="m-row" v-if="info.issueId">
<div class="m-info">
<div class="info-prop">
<span>议题标题</span>
<span>{{ issueInfo.issueTitle }}</span>
</div>
<div class="info-prop">
<span>议题建议</span>
<span>{{ issueInfo.issueSuggestion }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ issueInfo.belongsGridName || "--" }}</span>
</div>
<div class="info-prop">
<span>议题发起人</span>
<span>{{ issueInfo.issueInitiator }}</span>
</div>
<div class="info-prop">
<span>议题来源</span>
<span>{{ issueInfo.topicInfo.groupName }}</span>
</div>
<div class="info-prop">
<span>转议题时间</span>
<span>{{ issueInfo.shiftIssueTime }}</span>
</div>
</div>
<div class="m-line">
<div class="stat">
<div class="stat-item">
<div>
{{ issueTrend.realityVoteCount }}/{{
issueTrend.shouldVoteCount
}}
</div>
<div class="z-weak">已表决/应表决</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.supportAmount }}</div>
<div class="z-weak">支持</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.oppositionAmount }}</div>
<div class="z-weak">反对</div>
</div>
</div>
<line-chart
v-if="issueChartData.length > 0"
:list="issueChartData"
/>
</div>
</div>
<div v-else class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
<div class="list" v-else>
<div
class="item"
:key="field.itemId"
v-for="field in group.itemList"
>
<span class="item-field">{{ field.label }}</span>
<span
v-if="
field.itemType == 'select' ||
field.itemType == 'radio' ||
field.itemType == 'checkbox' ||
field.itemType == 'cascader'
"
>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: getOptionLabel(
field.options,
allInfo[group.tableName][0][field.columnName],
field.itemType
)
}}</span
>
<span v-else>{{
!allInfo[group.tableName] ||
allInfo[group.tableName][0][field.columnName] == null
? "--"
: allInfo[group.tableName][0][field.columnName]
}}</span>
<div v-if="groupIndex == 3">
<div class="m-row" v-if="issueInfo.projectId">
<div class="m-info">
<div class="info-prop">
<span>项目标题</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>项目方案</span>
<span>{{ projectInfo.backGround }}</span>
</div>
<div class="info-prop">
<span>内部备注</span>
<span>{{ projectInfo.internalRemark || "--" }}</span>
</div>
<div class="info-prop">
<span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div>
<div class="info-prop" v-if="projectCate.length > 0">
<span>分类</span>
<fold-text :row="3">
<div :key="item.name" v-for="item in projectCate">
{{ item.name }}
</div>
</fold-text>
</div>
<div class="info-prop" v-if="projectTag.length > 0">
<span>标签</span>
<fold-text :row="3">
<div :key="item.name" v-for="item in projectTag">
{{ item.name }}
</div>
</fold-text>
</div>
</div>
<div class="m-process" v-if="projectProcess.length > 0">
<div class="process-title">处理进展</div>
<div class="list">
<div
class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in projectProcess"
>
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.publicReply"
>
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div
class="detail"
v-if="item.processName != '转项目' && item.internalRemark"
>
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{
item.internalRemark
}}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a
:href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile"
>
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-else class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
</div>
@ -174,16 +268,153 @@
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import lineChart from "@/views/modules/visual/cpts/line-chart";
import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
function iniData() {
return {
groupList: [
{ label: "研判分析" },
{ label: "话题评论" },
{ label: "查看议题" },
{ label: "查看项目" },
],
groupIndex: 0,
startGroupIndex: 0,
info: {
badgeList: [],
closeDetail: {
closeUserName: "",
closeDateTime: "-1",
closeReason: "",
closeUserHeadPhoto: "",
},
dimension: "",
hiddenDetail: null,
issueId: "",
longitude: "",
releaseAddress: "",
releaseTime: "",
releaseUserHeadPhoto: "",
releaseUserName: "",
shiftIssueFlag: true,
topicContent: "",
topicId: "",
topicImgs: [],
topicStatus: "discussing",
},
comment: {
loading: true,
colList: [
{
align: "center",
width: "20%",
},
{
align: "center",
width: "20%",
},
{
align: "left",
width: "50%",
},
{
align: "left",
width: "10%",
},
],
header: ["评论者", "评论时间", "评论内容", "评论图片"],
list: [],
},
issueInfo: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: true,
projectId: "",
projectStatus: false,
publishIdeaFlag: false,
},
issueTrend: {},
issueChartData: [],
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
epmetUserIdList: [],
houseUserList: [
// {
// icResiUserId: '',
// icUserName: '',
// }
],
categoryList: [],
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
},
};
}
export default {
name: "demandInfo",
props: {
userId: {
topicId: {
type: String,
default: "",
},
gridName: {
epmetUserIdList: {
type: Array,
default: [],
},
icResiUserId: {
type: String,
default: "",
},
@ -191,94 +422,23 @@ export default {
components: {
cptCard,
cptTb,
analyse,
screenLoading,
lineChart,
foldText,
},
data() {
return {
fieldList: [],
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
};
},
data: iniData,
computed: {
xiaoquName() {
const {
xiaoquList,
info: { VILLAGE_ID },
} = this;
if (Array.isArray(xiaoquList) && xiaoquList.length > 0 && VILLAGE_ID) {
let item = xiaoquList.find((item) => item.value == VILLAGE_ID);
if (item) {
return item.label;
}
}
return "";
},
louName() {
const {
louList,
info: { BUILD_ID },
} = this;
if (Array.isArray(louList) && louList.length > 0 && BUILD_ID) {
let item = louList.find((item) => item.value == BUILD_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
danyuanName() {
const {
danyuanList,
info: { UNIT_ID },
} = this;
if (Array.isArray(danyuanList) && danyuanList.length > 0 && UNIT_ID) {
let item = danyuanList.find((item) => item.value == UNIT_ID);
if (item) {
return item.label;
}
}
return "";
},
homeName() {
const {
homeList,
info: { HOME_ID },
} = this;
if (Array.isArray(homeList) && homeList.length > 0 && HOME_ID) {
let item = homeList.find((item) => item.value == HOME_ID);
if (item) {
return item.label;
}
}
return "";
},
},
computed: {},
watch: {
userId() {
topicId() {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
},
@ -288,6 +448,10 @@ export default {
},
methods: {
watchImg(src) {
window.open(src);
},
addStartGroupIndex() {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
@ -309,195 +473,234 @@ export default {
},
async getApiData() {
await this.getField();
this.getComment();
await this.getInfo();
this.getXiaoquList();
this.getLouList();
this.getDanyuanList();
this.getHomeList();
await this.getIssueInfo();
this.getIssueTrend();
this.getProjectProcess();
this.getProjectInfo();
this.getProjectCate();
this.getYanPan();
},
getOptionLabel(options, value, type = "") {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
if (valueArr.length > 0) {
let level1 = options.find((item) => item.value == valueArr[0]);
if (level1) {
if (valueArr.length > 1 && level1.children) {
let level2 = level1.children.find(
(item) => item.value == valueArr[1]
);
if (level2) {
return level1.label + "-" + level2.label;
}
}
return level1.label;
}
}
} else {
return valueArr
.map((val) => {
let item = options.find((item) => item.value == val);
if (item && item.label) {
return item.label;
}
return "--";
})
.join("、");
}
//
async getInfo() {
const url = "/resi/group/topic/gettopicdetail";
const { data, code, msg } = await requestPost(url, {
topicId: this.topicId,
});
if (code === 0) {
this.info = data;
} else {
this.$message.error(msg);
}
return "--";
},
//
async getField() {
const url = "/oper/customize/icform/getcustomerform";
async getComment() {
const url = "/resi/group/comment/getcommentlistoftopic";
const { data, code, msg } = await requestPost(url, {
dynamic: true,
formCode: "resi_base_info",
topicId: this.topicId,
pageNo: 1,
pageSize: 100,
});
this.comment.loading = false;
if (code === 0) {
this.groupList = data.groupList;
this.fieldList = (function (arr) {
let col = [];
let ele = [];
for (let i = 0; i < arr.length; i++) {
let item = arr[i];
if (item.itemType == "divider" || i == arr.length - 1) {
col.push([...ele]);
ele = [];
} else {
ele.push(item);
}
}
return col;
})(data.itemList);
this.fieldList.forEach((subList, index) => {
subList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.fieldList[index][subIndex].options = await this.getOptions(
item.optionSourceValue
);
}
});
this.comment.list = data.map((item) => {
return [
item.commentUserName,
item.commentTime,
item.commentContent,
item.imageList.length > 0
? { type: "operate", list: ["查看"] }
: "",
];
});
this.comment.srcList = data;
} else {
this.$message.error(msg);
}
},
checkTopicCommentImg(index) {
const {
comment: { srcList },
} = this;
if (srcList[index] && srcList[index].imageList) {
this.watchImg(srcList[index].imageList[0].url);
}
},
//
async getInfo() {
const url = "/epmetuser/icresiuser/detail";
async getIssueInfo() {
const {
info: { issueId },
} = this;
if (!issueId) return;
const url = "/resi/hall/issue/detail";
const { data, code, msg } = await requestPost(url, {
icResiUserId: this.userId,
formCode: "resi_base_info",
issueId,
});
if (code === 0) {
this.info = data.ic_resi_user[0];
this.allInfo = data;
this.fieldList.forEach((subList, index) => {
subList.forEach((item, subIndex) => {
if (
item.itemType == "radio" &&
item.childGroup &&
this.allInfo[item.tableName] &&
this.allInfo[item.tableName][0][item.columnName] == "1"
) {
this.groupList = [...this.groupList, item.childGroup];
}
});
});
console.log("1111111111111111111111111", this.groupList);
this.groupList.forEach((subList, index) => {
subList.itemList.forEach(async (item, subIndex) => {
if (item.optionSourceType == "remote" && item.optionSourceValue) {
this.groupList[index].itemList[subIndex].options =
await this.getOptions(item.optionSourceValue);
}
});
});
this.issueInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getOptions(url) {
if (!url) return [];
async getIssueTrend() {
const {
info: { issueId },
} = this;
if (!issueId) return;
const url = "/resi/hall/issue/votingtrend";
const { data, code, msg } = await requestPost(url, {});
const { data, code, msg } = await requestPost(url, {
issueId,
});
if (code === 0) {
return data;
this.issueTrend = data;
let chartData = [];
data.polyLine.forEach((item) => {
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd");
console.log("date:" + date);
chartData.push(
{
date,
value: item.supportIncrement,
type: "支持",
},
{
date,
value: item.oppositionIncrement,
type: "反对",
}
);
});
this.issueChartData = chartData;
} else {
return [];
this.$message.error(msg);
}
},
async getXiaoquList() {
const url = "/gov/org/icneighborhood/neighborhoodoption";
//
async getProjectProcess() {
const { issueInfo } = this;
if (!issueInfo || !issueInfo.projectId) return;
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {
agencyId: this.info.AGENCY_ID,
gridId: this.info.GRID_ID,
projectId: issueInfo.projectId,
});
if (code === 0) {
this.xiaoquList = data;
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
async getLouList() {
const url = "/gov/org/icbuilding/buildingoption";
//
async getProjectInfo() {
const { issueInfo } = this;
if (!issueInfo || !issueInfo.projectId) return;
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
neighborHoodId: this.info.VILLAGE_ID,
projectId: issueInfo.projectId,
});
if (code === 0) {
this.louList = data;
this.projectInfo = data;
} else {
this.$message.error(msg);
}
},
async getDanyuanList() {
const url = "/gov/org/icbuildingunit/unitoption";
async getProjectCate() {
const { issueInfo } = this;
if (!issueInfo || !issueInfo.projectId) return;
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
buildingId: this.info.BUILD_ID,
projectId: issueInfo.projectId,
});
if (code === 0) {
this.danyuanList = data;
this.projectCate = data.categoryList;
this.projectTag = data.tagList;
} else {
this.$message.error(msg);
}
},
async getHomeList() {
const url = "/gov/org/ichouse/houseoption";
//
async getYanPan() {
const url = "/gov/project/project/topic-research-analysis";
if (!this.issueInfo.projectId) return;
const { data, code, msg } = await requestPost(url, {
unitId: this.info.UNIT_ID,
epmetUserIdList: this.epmetUserIdList,
icResiUserId: this.icResiUserId,
projectId: this.issueInfo.projectId,
});
if (code === 0) {
this.homeList = data;
data.categoryList = data.projectData.map((item) => {
return {
categoryCode: item.firstCategoryCode,
categoryName: item.firstCategoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.projectTitle,
status: subItem.projectStatus,
statusName:
subItem.projectStatus == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
topicId: subItem.topicId,
};
}),
};
});
this.yanPan = { ...this.yanPan, ...data };
this.yanPan.loading = true;
} else {
this.$message.error(msg);
}
},
toUserInfo(item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
});
},
toProjectInfo(item) {
console.log(item);
this.topicId = item.topicId;
},
},
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/people.scss" scoped></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

72
src/views/modules/visual/basicinfo/people.vue

@ -365,6 +365,13 @@
>
</el-pagination>
</div>
<div v-if="incident.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
<div class="list-wrap" v-show="showedIncidentOrTopic == 'topic'">
@ -375,8 +382,8 @@
v-for="(item, index) in topic.list"
@click="handleClickTopic(index)"
>
<div class="item-title">{{ item.eventContent }}</div>
<div class="item-date">{{ item.reportTime }}</div>
<div class="item-title">{{ item.topicContent }}</div>
<div class="item-date">{{ item.releaseTime }}</div>
</div>
</div>
@ -391,6 +398,13 @@
>
</el-pagination>
</div>
<div v-if="topic.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
</cpt-card>
</div>
@ -433,6 +447,13 @@
>
</el-pagination>
</div>
<div v-if="point.list.length == 0" class="m-hint">
<img
src="@/assets/img/modules/visual/noData.png"
class="no-data-img"
/>
</div>
</div>
</cpt-card>
</div>
@ -440,26 +461,26 @@
</div>
<demand-info
v-show="showedDemandInfo"
v-if="userId"
v-if="demand.list.length > 0 && showedDemandInfo"
:userId="userId"
:gridName="info.gridName"
queryOrigin="personal-data"
:demandId="demand.srcList[demand.currentIndex].demandRecId"
@close="showedDemandInfo = false"
/>
<incident-info
v-show="incident.showedInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
v-if="incident.list.length > 0 && incident.showedInfo"
:resiEventId="incident.list[incident.currentIndex].resiEventId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="incident.showedInfo = false"
/>
<topic-info
v-show="topic.showedInfo"
v-if="userId"
:userId="userId"
:gridName="info.gridName"
v-if="topic.list.length > 0 && topic.showedInfo"
:topicId="topic.list[topic.currentIndex].topicId"
:epmetUserIdList="info.epmetUserIdList"
:icResiUserId="userId"
@close="topic.showedInfo = false"
/>
</div>
@ -470,7 +491,7 @@ import { Loading } from "element-ui"; //引入Loading服务
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
import demandInfo from "@/views/modules/visual/basicinfo/cpts/demand-info";
import demandInfo from "@/views/modules/visual/measure/dialogInfo";
import incidentInfo from "@/views/modules/visual/basicinfo/cpts/incident-info";
import topicInfo from "@/views/modules/visual/basicinfo/cpts/topic-info";
import cptTb from "@/views/modules/visual/cpts/tb";
@ -485,7 +506,7 @@ export default {
userId: "",
info: {
epmetUserId: "",
epmetUserIdList: [],
financialSituation: { monthlyIncome: "", retirementAmount: "" },
gridName: "",
houseInfo: [],
@ -594,7 +615,7 @@ export default {
cptTb,
demandInfo,
incidentInfo,
topicInfo
topicInfo,
},
watch: {
@ -676,8 +697,8 @@ export default {
async getDemandData() {
const url = "/heart/userdemand/mydemand";
let params = {
epmetUserId: this.info.epmetUserId,
userId: this.userId,
epmetUserIdList: this.info.epmetUserIdList,
icResiUserId: this.userId,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
};
@ -715,10 +736,9 @@ export default {
//
async getIncidentData() {
const url =
"http://yapi.elinkservice.cn/mock/245/gov/project/resievent/pageuserreported";
const url = "/gov/project/resievent/pageuserreported";
let params = {
epmetUserId: this.info.epmetUserId,
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,
pageNo: this.incident.pageNo,
pageSize: this.incident.pageSize,
@ -747,10 +767,9 @@ export default {
//
async getTopicData() {
const url =
"http://yapi.elinkservice.cn/mock/245/gov/project/resievent/pageuserreported";
const url = "/data/aggregator/resigroup/pageusertopic";
let params = {
epmetUserId: this.info.epmetUserId,
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,
pageNo: this.topic.pageNo,
pageSize: this.topic.pageSize,
@ -779,10 +798,9 @@ export default {
//
async getPointData() {
const url =
"http://yapi.elinkservice.cn/mock/245/point/resi/point/pageuserpoint";
const url = "/point/resi/point/pageuserpoint";
let params = {
epmetUserId: this.info.epmetUserId,
epmetUserIdList: this.info.epmetUserIdList,
userId: this.userId,
pageNo: this.point.pageNo,
pageSize: this.point.pageSize,

231
src/views/modules/visual/communityGovern/cpt/issue-info.vue

@ -0,0 +1,231 @@
<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="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="m-content">
<div class="m-info">
<div class="info-prop">
<span class="info-title-2">议题标题</span>
<span>{{ info.issueTitle }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">议题建议</span>
<span>{{ info.issueSuggestion }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">话题内容</span>
<div>
<div>{{ info.topicInfo.topicContent }}</div>
<div v-if="info.topicInfo.topicImgs&&info.topicInfo.topicImgs.length>0"
class="info-pics">
<img :src="src"
:key="src"
v-for="src in info.topicInfo.topicImgs" />
</div>
</div>
</div>
<div class="info-prop">
<span class="info-title-2">转议题时间</span>
<span>{{ info.shiftIssueTime}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">所属网格</span>
<span>{{ info.belongsGridName}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">话题发表人</span>
<span>{{ info.topicInfo.publishedUser}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">议题发起人</span>
<span>{{ info.issueInitiator}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">话题来源</span>
<span>{{ info.topicInfo.groupName}}</span>
</div>
<div class="info-prop">
<span class="info-title-2">话题发表时间</span>
<span>{{ info.topicInfo.publishedTimeShow}}</span>
</div>
</div>
<div class="m-line">
<div class="stat">
<div class="stat-item">
<div>
{{ issueTrend.realityVoteCount }}/{{
issueTrend.shouldVoteCount
}}
</div>
<div class="z-weak">已表决/应表决</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.supportAmount }}</div>
<div class="z-weak">支持</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.oppositionAmount }}</div>
<div class="z-weak">反对</div>
</div>
</div>
<line-chart :list="issueChartData" />
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request";
import lineChart from "@/views/modules/visual/cpts/line-chart";
import dateFormat from "dai-js/tools/dateFormat";
export default {
name: "demandInfo",
props: {
issueId: {
type: String,
default: "",
},
},
components: {
cptCard,
lineChart,
screenLoading,
},
data () {
return {
info: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: false,
projectId: "",
projectStatus: true,
publishIdeaFlag: false,
shiftIssueTime: "",
topicInfo: {
groupId: "",
groupName: "",
groupType: "",
publishedTime: "",
publishedUser: "",
topicContent: "",
topicId: "",
topicImgs: null,
},
},
issueTrend: {},
issueChartData: [],
};
},
computed: {},
watch: {
issueId () {
this.getApiData();
},
},
mounted () {
this.getApiData();
},
methods: {
handleClose () {
this.$emit("close");
},
async getApiData () {
await this.getInfo();
await this.getIssueTrend()
},
//
async getInfo () {
const url = "/resi/hall/issue/detail";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz";
let params = {
issueId: this.issueId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.info = data
this.info.topicInfo.publishedTimeShow = dateFormat(new Date(this.info.topicInfo.publishedTime * 1000), "yyyy-MM-dd")
} else {
this.$message.error(msg);
}
},
//
async getIssueTrend () {
const url = "/resi/hall/issue/votingtrend";
const { data, code, msg } = await requestPost(url, {
issueId: this.issueId,
});
if (code === 0) {
this.issueTrend = data;
let chartData = [];
data.polyLine.forEach((item) => {
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd");
console.log("date:" + date);
chartData.push(
{
date,
value: item.supportIncrement,
type: "支持",
},
{
date,
value: item.oppositionIncrement,
type: "反对",
}
);
});
this.issueChartData = chartData;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/issue-info.scss"
scoped
></style>

696
src/views/modules/visual/communityGovern/cpt/project-info.vue

@ -0,0 +1,696 @@
<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="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="m-top">
<div class="m-info">
<div class="info-prop">
<span>项目标题</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>项目背景</span>
<span>{{ projectInfo.backGround }}</span>
</div>
<div class="info-prop">
<span>项目方案</span>
<span>{{ projectInfo.projectTitle }}</span>
</div>
<div class="info-prop">
<span>内部备注</span>
<span>{{ projectInfo.internalRemark || "--" }}</span>
</div>
<div class="info-prop">
<span>当前处理部门</span>
<span>{{ projectInfo.departmentNameList.join("、") }}</span>
</div>
<div class="info-prop"
v-if="projectCate.length > 0">
<span>分类</span>
<fold-text :row="3">
<div :key="item.name"
v-for="item in projectCate">
{{ item.name }}
</div>
</fold-text>
</div>
<div class="info-prop"
v-if="projectTag.length > 0">
<span>标签</span>
<fold-text :row="3">
<div :key="item.name"
v-for="item in projectTag">
{{ item.name }}
</div>
</fold-text>
</div>
</div>
<div class="m-process"
v-if="projectProcess.length > 0">
<div class="process-title">处理进展</div>
<div class="list">
<div class="item"
:class="index === 0 ? 'z-on' : ''"
:key="item.processId"
v-for="(item, index) in projectProcess">
<div class="item-row">
<div class="name">{{ item.processName }}</div>
<div class="date">
{{ item.processTime }}
</div>
</div>
<div class="detail">
<div class="detail-field">处理部门</div>
<div class="detail-value">{{ item.departmentName }}</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.publicReply">
<div class="detail-field"> </div>
<div class="detail-value">
<fold-text :row="3">{{ item.publicReply }}</fold-text>
</div>
</div>
<div class="detail"
v-if="item.processName != '转项目' && item.internalRemark">
<div class="detail-field">内部备注</div>
<div class="detail-value">
<fold-text :row="3">{{
item.internalRemark
}}</fold-text>
</div>
</div>
<div class="detail">
<div class="attachement-list">
<a :href="att.url"
target="_blank"
:key="att.url"
v-for="att in item.internalFile">
<i class="el-icon-folder-opened"></i>
{{ att.name }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-if="projectInfo.origin!=='agency'"
class="tabs">
<div class="tab-btn"
@click="subStartGroupIndex"
v-if="groupList.length > 9">
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div v-show="index >= startGroupIndex && index < startGroupIndex + 9"
class="tab"
:class="groupIndex % groupList.length == index ? 'z-on' : ''"
:key="'tab' + index"
@click="groupIndex = index"
v-for="(item, index) in groupList">
{{ item.label }}
</div>
<div class="tab-btn"
@click="addStartGroupIndex"
v-if="groupList.length > 9">
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div class="m-case"
v-if="projectInfo.origin!=='agency'">
<div class="m-yanpan"
v-if="groupIndex == 0">
<div v-if="projectId">
<analyse v-if="yanPan.loading"
singleTitle="楼院小组"
:userList="yanPan.homeUserList"
:userName="yanPan.icUserName"
:singleList="yanPan.singleList"
:hasEvent="yanPan.hasEvent"
:moreList="yanPan.moreList"
@user="toUserInfo"
@project="toProjectInfo" />
<screen-loading v-else>加载中</screen-loading>
</div>
<div v-else
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
<div v-if="groupIndex == 1">
<div class="m-row"
v-if="projectInfo.originId">
<div v-if="projectInfo.origin==='issue'"
class="m-info">
<div class="info-prop">
<span>议题标题</span>
<span>{{ issueInfo.issueTitle }}</span>
</div>
<div class="info-prop">
<span>议题建议</span>
<span>{{ issueInfo.issueSuggestion }}</span>
</div>
<div class="info-prop">
<span>所属网格</span>
<span>{{ issueInfo.belongsGridName || "--" }}</span>
</div>
<div class="info-prop">
<span>议题发起人</span>
<span>{{ issueInfo.issueInitiator }}</span>
</div>
<div class="info-prop">
<span>议题来源</span>
<span>{{ issueInfo.topicInfo.groupName }}</span>
</div>
<div class="info-prop">
<span>转议题时间</span>
<span>{{ issueInfo.shiftIssueTime }}</span>
</div>
</div>
<div v-if="projectInfo.origin==='resi_event'"
class="m-info">
<div class="info-title">事件内容</div>
<div class="info-content">{{ info.eventContent }}</div>
<div class="info-pics">
<img :src="src"
:key="src"
v-for="src in info.eventImgs"
@click="watchImg(src)" />
</div>
<div class="info-prop">
<span class="info-title-2">提交时间</span>
<span>{{ info.eventTime }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">报事人</span>
<span>{{ info.eventPeopleName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="info-prop">
<span class="info-title-2">提报给</span>
<div>
<div>{{ info.eventPersonShow}}</div>
<div>{{ info.eventOrgShow}}</div>
</div>
<!-- <span>{{ info.eventPerson.join("、") || "--" }}</span> -->
</div>
</div>
<div v-if="projectInfo.origin==='issue'"
class="m-line">
<div class="stat">
<div class="stat-item">
<div>
{{ issueTrend.realityVoteCount }}/{{
issueTrend.shouldVoteCount
}}
</div>
<div class="z-weak">已表决/应表决</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.supportAmount }}</div>
<div class="z-weak">支持</div>
</div>
<div class="stat-item">
<div>{{ issueTrend.oppositionAmount }}</div>
<div class="z-weak">反对</div>
</div>
</div>
<line-chart v-if="issueChartData.length > 0"
:list="issueChartData" />
</div>
</div>
<div v-else
class="m-hint">
<img src="@/assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import screenLoading from "@/views/modules/visual/cpts/loading";
import { requestPost } from "@/js/dai/request";
import cptTb from "@/views/modules/visual/cpts/tb";
import lineChart from "@/views/modules/visual/cpts/line-chart";
import analyse from "@/views/modules/visual/cpts/analyse";
import foldText from "@/views/components/foldText";
import dateFormat from "dai-js/tools/dateFormat";
function iniData () {
return {
projectIdCopy: this.projectId,
groupList: [
{ label: "研判分析" },
{ label: "项目来源" },
],
groupIndex: 0,
startGroupIndex: 0,
projectProcess: [],
projectInfo: {
backGround: "",
departmentList: [
// { departmentName: "-", staffList: [""] },
],
departmentNameList: [],
internalRemark: "",
isSend: false,
locateAddress: "",
locateDimension: "",
locateLongitude: "",
origin: "",
originId: "",
platformIds: [],
processable: false,
projectId: "",
projectStatus: "pending",
projectTitle: "",
publicReply: "",
returnable: false,
},
issueInfo: {
attitude: "",
belongsGridName: "",
issueIdea: "",
issueInitiator: "",
issueStatus: "",
issueSuggestion: "",
issueTitle: "",
joinVote: true,
projectId: "",
projectStatus: false,
publishIdeaFlag: false,
},
issueTrend: {},
issueChartData: [],
eventInfo: {
eventTime: "",
eventContent: "",
eventAddress: "",
gridName: "",
isClosed: true,
isResolve: true,
isRollback: true,
eventImgs: [],
eventPerson: [],
eventOrg: [],
eventPeopleName: "",
projectInfo: {
projectId: "",
operationName: "",
operationTime: "",
projectDeclare: "",
},
},
projectCate: [],
projectTag: [],
yanPan: {
loading: false,
icResiUserId: "",
houseId: "",
icUserName: "",
homeUserList: [
// {
// homeId: '',
// icUserId: '',
// icUserName: '',
// }
],
singleList: [],//
projectData: [
// {
// firstCategoryCode: '',
// firstCategoryName: '',
// projectList: [],
// }
],
hasEvent: false,
moreList: [],//
},
};
}
export default {
name: "demandInfo",
props: {
projectId: {
type: String,
default: "",
},
userId: {
type: String,
default: "",
},
categoryCodes: {
type: Array,
default: [],
},
},
components: {
cptCard,
cptTb,
analyse,
screenLoading,
lineChart,
foldText,
},
data: iniData,
computed: {},
watch: {
projectId () {
let data = iniData();
Object.keys(data).forEach((k) => {
this[k] = data[k];
});
this.getApiData();
},
// projectIdCopy () {
// },
},
mounted () {
console.log(this.projectIdCopy)
this.getApiData();
},
methods: {
watchImg (src) {
window.open(src);
},
addStartGroupIndex () {
const { startGroupIndex, groupList } = this;
if (startGroupIndex < groupList.length - 9) {
this.startGroupIndex = startGroupIndex + 1;
} else {
this.startGroupIndex = groupList.length - 9;
}
},
subStartGroupIndex () {
const { startGroupIndex, groupList } = this;
if (startGroupIndex > 0) {
this.startGroupIndex = startGroupIndex - 1;
} else {
this.startGroupIndex = 0;
}
},
handleClose () {
this.$emit("close");
},
async getApiData () {
await this.getProjectInfo()
this.getProjectCate();
this.getProjectProcess();
if (this.projectInfo.origin === 'issue') {
this.getIssueInfo();
this.getIssueTrend();
} else if (this.projectInfo.origin === 'resi_event') {
this.getEventInfo()
}
if (this.projectInfo.origin !== 'agency') {
await this.getYanPan();
}
},
//
async getProjectInfo () {
const url = "/gov/project/trace/projectdetail";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectIdCopy,
});
if (code === 0) {
this.projectInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getIssueInfo () {
const url = "/resi/hall/issue/detail";
const { data, code, msg } = await requestPost(url, {
issueId: this.projectInfo.originId,
});
if (code === 0) {
this.issueInfo = data;
} else {
this.$message.error(msg);
}
},
//
async getIssueTrend () {
const url = "/resi/hall/issue/votingtrend";
const { data, code, msg } = await requestPost(url, {
issueId: this.projectInfo.originId,
});
if (code === 0) {
this.issueTrend = data;
let chartData = [];
data.polyLine.forEach((item) => {
let date = dateFormat(new Date(item.voteDate * 1000), "yyyy-MM-dd");
console.log("date:" + date);
chartData.push(
{
date,
value: item.supportIncrement,
type: "支持",
},
{
date,
value: item.oppositionIncrement,
type: "反对",
}
);
});
this.issueChartData = chartData;
} else {
this.$message.error(msg);
}
},
//
async getEventInfo () {
const url = "/gov/project/resievent/eventdetail-icdata";
const { data, code, msg } = await requestPost(url, {
resiEventId: this.projectInfo.originId,
});
if (code === 0) {
if (data.eventOrg && data.eventOrg.length > 0) {
data.eventOrgShow = data.eventOrg.join('、')
}
if (data.eventPerson && data.eventPerson.length > 0) {
data.eventPersonShow = data.eventPerson.join('、')
}
this.info = { ...data };
} else {
this.$message.error(msg);
}
},
//
async getProjectProcess () {
const url = "/gov/project/trace/processlist-v2";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectIdCopy,
});
if (code === 0) {
this.projectProcess = data.map((item) => {
item.processTime = dateFormat(
new Date(item.processTime * 1000),
"yyyy-MM-dd hh:mm"
);
return item;
});
} else {
this.$message.error(msg);
}
},
async getProjectCate () {
const url = "/gov/project/projectcategory/categorytaglist";
const { data, code, msg } = await requestPost(url, {
projectId: this.projectIdCopy,
});
if (code === 0) {
this.projectCate = data.categoryList;
this.projectTag = data.tagList;
} else {
this.$message.error(msg);
}
},
//
async getYanPan () {
const url = "/data/aggregator/project/projectanalysis";
const { data, code, msg } = await requestPost(url, {
categoryCodeList: this.categoryCodes,
userId: this.userId,
projectId: this.projectIdCopy
});
if (code === 0) {
data.icResiUserId = data.icUserId
data.homeUserList.forEach(item => {
item.icResiUserId = item.icUserId
});
let array1 = []
let array2 = []
//
if (data.groupProjectList && data.groupProjectList.length > 0 && data.eventProjectList && data.eventProjectList.length > 0) {
this.yanPan.hasEvent = true
array1 = [...data.groupProjectList]
array2 = [...data.eventProjectList]
} else {
this.yanPan.hasEvent = false
if (data.groupProjectList && data.groupProjectList.length > 0) {
array1 = [...data.groupProjectList]
} else if (data.eventProjectList && data.eventProjectList.length > 0) {
array1 = [...data.eventProjectList]
} else {
array1 = []
}
}
if (array1.length > 0) {
data.singleList = array1.map((item) => {
return {
categoryCode: item.categoryCode,
categoryName: item.categoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.title,
status: subItem.status,
statusName:
subItem.status == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
};
}),
};
});
}
if (array2.length > 0) {
data.moreList = array2.map((item) => {
return {
categoryCode: item.categoryCode,
categoryName: item.categoryName,
showItem: true,
projectList: item.projectList.map((subItem) => {
return {
title: subItem.title,
status: subItem.status,
statusName:
subItem.status == "pending" ? "待处理" : "结案",
projectId: subItem.projectId,
};
}),
};
});
}
this.yanPan = { ...this.yanPan, ...data };
console.log(this.yanPan)
this.yanPan.loading = true;
} else {
this.$message.error(msg);
}
},
toUserInfo (item) {
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${item.icResiUserId}`,
});
},
toProjectInfo (item) {
console.log(item);
this.projectIdCopy = item.projectId;
// let data = iniData();
// Object.keys(data).forEach((k) => {
// this[k] = data[k];
// });
this.getApiData();
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/incident-info.scss"
scoped
></style>

399
src/views/modules/visual/communityGovern/distributionAnalyze.vue

@ -15,8 +15,8 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select">
<el-date-picker v-model="timeRange"
@ -39,12 +39,36 @@
<screen-echarts-frame class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<!-- <div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="lineList.length == 0 && !loading">
<div class="no-data">
<img src="../../../../assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div> -->
</div>
<div class="g-r">111
<!-- <screen-echarts-frame class="echart-wr"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame> -->
<div class="g-r">
<div class="r-map">
<screen-map class="map"
ref="map"
:showPolygonLayer="true"></screen-map>
<div class="r-legend">
<div class="legend_item"
v-for="(item,index) in legendArray"
:key="index">
<div :class="['color','color'+index]"></div>
<span>{{item.name}}</span>
</div>
</div>
</div>
</div>
</div>
@ -57,10 +81,11 @@ import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import screenMap from "@/views/modules/visual/components/screen-map";
import { lineOption } from './distributionLineOption.js'
import * as echarts from 'echarts'
import nextTick from 'dai-js/tools/nextTick'
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
export default {
name: "HomeMap",
@ -91,64 +116,84 @@ export default {
legend: [],
lineData: [820, 932, 901, 934, 1290, 1330, 1320],
lineList: [
// {
// time: '4:00',
// categoryList: [
// {
// categoryCode: '001',
// count: 100,
// color: '#1B51FF',
// name: '1'
// },
// {
// categoryCode: '002',
// count: 200,
// color: '#00E5ED',
// name: '2'
// }
// ]
// },
// {
// time: '5:00',
// categoryList: [
// {
// categoryCode: '001',
// count: 20,
// color: '#1B51FF',
// name: '1'
// },
// {
// categoryCode: '002',
// count: 400,
// color: '#00E5ED',
// name: '2'
// }
// ]
// },
// {
// time: '6:00',
// categoryList: [
// {
// categoryCode: '001',
// count: 50,
// color: '#1B51FF',
// name: '1'
// },
// {
// categoryCode: '002',
// count: 10,
// color: '#00E5ED',
// name: '2'
// }
// ]
// }
],
timeRange: [],
orgId: '',
isfirstInit: true,
mapList: [
{
time: '4:00',
categoryList: [
{
categoryCode: '001',
count: 100,
color: '#1B51FF',
name: '分类1'
},
{
categoryCode: '002',
count: 200,
color: '#00E5ED',
name: '分类2'
}
]
orgId: '3115fc83f1db431008a73c553eef1eb5',
count: 169
},
{
time: '5:00',
categoryList: [
{
categoryCode: '001',
count: 20,
color: '#1B51FF',
name: '分类1'
},
{
categoryCode: '002',
count: 400,
color: '#00E5ED',
name: '分类2'
}
]
orgId: '7e57419e6afcdc910d08124c0a1b4eb9',
count: 149
},
{
time: '6:00',
categoryList: [
{
categoryCode: '001',
count: 50,
color: '#1B51FF',
name: '分类1'
},
{
categoryCode: '002',
count: 10,
color: '#00E5ED',
name: '分类2'
}
]
orgId: 'e56ac695b01d9eed8723bde718071df5',
count: 219
}
],
timeRange: [],
orgId: '',
agencyInfo: {},
subAgencyArray: [],
colorArray: ['#DD2719', '#EDBE00', '#00E5ED'],
colorFillArray: ['rgba(221, 39, 25, 0.24)', 'rgba(237, 190, 0, 0.25)', 'rgba(0, 229, 237, 0.16)'],
legendArray: [],
under: null,
above: null
};
},
@ -161,7 +206,10 @@ export default {
this.userId = this.uid;
this.initData()
await this.getAgencylist()//
this.getApiData();
await nextTick(500)
await this.loadOrgData()
await this.getApiData();
},
methods: {
@ -204,42 +252,191 @@ export default {
async getApiData () {
await this.getLine()
// await this.getTable();
await this.loadMapData();
},
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
//
getAgencylist () {
const url = '/gov/org/customeragency/staffinagencylist'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data.agencyList
this.orgId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data.subAgencyList) {
data.agencyList.subAgencyList = data.subAgencyList
this.casOptions.push(data.agencyList)
this.agencyIdArray.push(this.orgId)
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
},
handleChangeDate (value) {
this.dateId = value
this.getApiData()
},
//
async loadOrgData () {
const url = "/gov/org/agency/maporg"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {
orgId: this.orgId,
level: 'agency'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
// this.agencyInfo = data
// if (!data.latitude) {
// this.agencyInfo.latitude = 36.072227
// }
// if (!data.longitude) {
// this.agencyInfo.longitude = 120.389455
// }
// if (!data.level) {
// this.agencyInfo.level = 'street'
// }
this.subAgencyArray = []
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
} else {
this.subAgencyArray = []
}
} else {
this.$message.error(msg)
}
},
handleChangeDate (value) {
async loadMapData () {
const _that = this
// this.$refs.lineChart.showLoading()
const url = "/gov/project/project/projectdistributionanalysisright";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisright";
let params = {
orgId: this.orgId,
startDate: this.timeRange.length > 0 && this.timeRange[0] || '',
endDate: this.timeRange.length > 0 && this.timeRange[1] || ''
};
this.dateId = value
this.getApiData()
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.legendArray = []
if (data.above) {
this.under = data.under
this.legendArray.push(
{
color: this.colorArray[0],
name: data.under + '以下'
}
)
}
if (data.above) {
this.above = data.above
this.legendArray.push(
{
color: this.colorArray[1],
name: data.under + '-' + data.above
}
)
this.legendArray.push(
{
color: this.colorArray[2],
name: data.above + '以上'
}
)
}
if (data.list && data.list.length > 0) {
this.mapList = data.list
} else {
this.mapList = []
}
this.mapList.forEach(item => {
for (let i = 0; i < this.subAgencyArray.length; i++) {
let agencyItem = this.subAgencyArray[i]
if (item.orgId === agencyItem.id) {
item.longitude = agencyItem.longitude
item.latitude = agencyItem.latitude
item.coordinates = agencyItem.coordinates
if (this.under) {
if (item.count < this.under || item.count === this.under) {
item.color = this.colorArray[0]
item.fillColor = this.colorFillArray[0]
}
if (this.above) {
if (item.count > this.under && item.count < this.above) {
item.color = this.colorArray[1]
item.fillColor = this.colorFillArray[1]
} else {
item.color = this.colorArray[2]
item.fillColor = this.colorFillArray[2]
}
}
}
break
}
}
});
console.log(this.mapList)
this.loadMap()
this.isfirstInit = false
} else {
this.$message.error(msg);
}
},
loadMap () {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, this.mapList, null, null, null, null,)
} else {
this.$refs.map.refreshMap(this.mapList, null)
lineInitOk (dom) {
console.log('line准备好了', dom)
}
},
lineInitOk (dom) {
this.lineInitState = true
},
@ -255,11 +452,10 @@ export default {
// 线
async getLineChart () {
this.$refs.lineChart.clear()
const _that = this
// this.$refs.lineChart.showLoading()
// const url ="/gov/project/project/projectdistributionanalysisleft";
const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft";
this.$refs.lineChart.showLoading()
const url = "/gov/project/project/projectdistributionanalysisleft";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft";
let params = {
orgId: this.orgId,
startDate: this.timeRange.length > 0 && this.timeRange[0] || '',
@ -267,34 +463,36 @@ export default {
};
const { data, code, msg } = await requestPost(url, params);
this.$refs.lineChart.hideLoading()
if (code === 0) {
// pieChart
this.lineOption = lineOption()
if (data && data.length > 0) {
this.lineList = data
this.loadCategoryData()
} else {
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.xaxis },
legend: { data: this.legend },
series: this.series
}, true)
} else {
this.lineList = []
}
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.xaxis },
legend: { data: this.legend },
series: this.series
}, true)
} else {
this.$message.error(msg);
}
},
//
//线
loadCategoryData () {
this.xaxis = []
@ -305,11 +503,12 @@ export default {
let dataArray = new Array(num)
//
this.lineList[0].categoryList.forEach((categoryItem, index) => {
this.legend.push(categoryItem.name)
this.legend.push(categoryItem.categoryName)
dataArray[index] = []
});
//
this.lineList.forEach(item => {
this.xaxis.push(item.time)
@ -325,8 +524,9 @@ export default {
this.lineList[0].categoryList.forEach((categoryItem, index) => {
let object = {
name: categoryItem.name,
name: categoryItem.categoryName,
type: 'line',
smooth: true,
barWidth: 15,
areaStyle: {},
itemStyle: {
@ -345,15 +545,14 @@ export default {
});
console.log(this.series)
},
handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
this.getApiData()
console.log(this.agencyIdArray)
},
@ -369,12 +568,16 @@ export default {
},
},
computed: {},
computed: {
},
components: {
cptCard,
cptTb,
screenEchartsFrame,
screenMap,
ScreenLoading
},
watch: {

18
src/views/modules/visual/communityGovern/distributionLineOption.js

@ -2,6 +2,21 @@ import * as echarts from 'echarts'
export function lineOption () {
return {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
grid: {
left: 70,
top: 40,
right: 50,
bottom: 150
},
legend: {
textStyle: {
color: '#D2E7FF',
@ -10,7 +25,7 @@ export function lineOption () {
},
itemWidth: 20,
itemHeight: 10,
// top: 350,
// top: 650,
bottom: 0,
data: []
},
@ -62,6 +77,7 @@ export function lineOption () {
}
},
series: [
// {
// name: '项目数',
// type: 'line',

337
src/views/modules/visual/communityGovern/processAnalyze.vue

@ -12,17 +12,17 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select">
<el-date-picker v-model="dateId"
<el-date-picker v-model="dateIdShow"
type="date"
:clearable="false"
@change="handleChangeDate"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyyMMdd">
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
@ -41,17 +41,46 @@
<span class="c_today">{{monthIncr}}</span>
</div>
</div>
<div class="g-pie">
<div v-if="!pieNoData && !dataLoading"
class="g-pie">
<screen-echarts-frame class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="pie-legend">
<div :class="['legend_item',{'item_last':index===legendArray.length-1}]"
v-for="(item,index) in legendArray"
:key="index">
<div class="item_name">{{item.name}}</div>
<img :src="item.url" />
<div class="item_num">
<span class="item_count">{{item.count}}</span>
<span class="item_percent">{{item.percent}}</span>
</div>
</div>
</div>
</div>
<screen-nodata class="nodata"
v-if="pieNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="l_bottom">
<div class="bottom_label">近12月新增项目数</div>
<screen-echarts-frame class="echart-line"
<screen-echarts-frame v-if="!lineNoData&& !dataLoading"
class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<screen-nodata class="nodata"
v-if="lineNoData&& !dataLoading"></screen-nodata>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
</div>
<div class="g-r">
@ -91,18 +120,22 @@ import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import screenMap from "@/views/modules/visual/components/screen-map";
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
import { pieOption } from './processPieOption.js'
import { lineOption } from './processLineOption.js'
import nextTick from 'dai-js/tools/nextTick'
export default {
name: "HomeMap",
data () {
return {
showNoData: false,
timer: null,
isfirstInit: true,
dataLoading: true,
pieNoData: false,
lineNoData: false,
isfirstInit: true,//
projectTotal: 0,
dateIncr: 0,
@ -112,7 +145,9 @@ export default {
lineOption: {},
lineInitState: false,
lineColorArray: [],
lineData: [820, 932, 901, 934, 1290, 1330, 1320],
lineData: [],
lineXaxis: [],
lineSeriesData: [],
pieChartS: null,
pieChart: '',
@ -121,12 +156,27 @@ export default {
pieTotal: 0,
colorArray: [],
pieData: [
{ value: 1048, name: '未结案', color: '#FAC126', selected: true },
{ value: 735, name: '已结案', color: '#3DDA83' },
// { value: 1048, name: '', color: '#FAC126', selected: true },
// { value: 735, name: '', color: '#3DDA83' },
],
legendArray: [
{
name: '未结案',
count: 0,
percent: '0%',
url: require('../../../../assets/img/shuju/measure/huang@2x.png')
},
{
name: '已结案',
count: 0,
percent: '0%',
url: require('../../../../assets/img/shuju/measure/lv@2x.png')
}
],
dateId: '',
dateIdShow: '',
agencyId: '',
status: 'pending',//: pendingclosed
agencyInfo: {},
@ -151,26 +201,7 @@ export default {
title: "南宁第二网格",
}
],
projectList2: [
{
agencyId: '',
projectId: '',
origin: '',
status: 'pending',
title: '山东路山东路',
latitude: 36.062227,
longitude: 120.379455,
},
{
agencyId: '',
projectId: '',
origin: '',
status: 'closed',
latitude: 36.082227,
longitude: 120.379455,
title: "山东路",
}
],
iconUrlArray: [],
iconTextStyle: {},
@ -191,118 +222,131 @@ export default {
},
// mixins: [animate]
beforeDestroy () {
this.timer && clearInterval(this.timer)
},
async created () {
},
async mounted () {
this.userId = this.uid;
this.dataLoading = true
//
this.initData()
await this.getWorkUserInfo()
await this.getAgencylist()//
this.getApiData();
//
await this.getProjectTotal()
await this.getLineChart()
await this.loadProjectlist()
this.dataLoading = false
this.assignData()
},
methods: {
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
this.dateId = new Date(time); //
},
async getApiData () {
await this.getProjectTotal()
await this.getLineChart()
await this.loadProjectlist()
await this.getLine()
},
this.assignData()
handleChangeDate (value) {
this.dateId = value
this.getApiData()
},
//
getWorkUserInfo () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!data.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!data.level) {
this.agencyInfo.level = 'street'
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
assignData () {
this.getPie()
this.getLine()
},
handleChangeDate (value) {
this.dateIdShow = value
this.getApiData()
},
//
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
const url = "/gov/org/customeragency/agencygridtree";
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.agencyInfo = data
this.agencyId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
}
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
//
async getProjectTotal () {
// const url = "/data/aggregator/project/projecttotal";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal";
if (this.$refs.pieChart) {
this.$refs.pieChart.showLoading()
this.$refs.pieChart.clear()
}
const url = "/data/aggregator/project/projecttotal";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal";
let params = {
agencyId: '',
agencyId: this.agencyId,
dateId: this.dateId,
};
const { data, code, msg } = await requestPost(url, params);
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
}
if (code === 0) {
this.projectTotal = data.projectTotal
this.dateIncr = data.dateIncr
this.monthIncr = data.monthIncr
this.legendArray = [
{
name: '未结案',
count: data.pendingTotal,
percent: data.pendingRatio,
url: require('../../../../assets/img/shuju/measure/huang@2x.png')
},
{
name: '已结案',
count: data.closedTotal,
percent: data.closedRatio,
url: require('../../../../assets/img/shuju/measure/lv@2x.png')
}
]
this.pieData = [
{
name: "未结案",
value: data.pendingTotal,
selected: true,
},
{
name: "已结案",
value: data.pendingTotal
value: data.closedTotal,
}
]
this.getPie()
} else {
this.$message.error(msg);
}
@ -310,10 +354,10 @@ export default {
//
async loadProjectlist () {
// const url = "/data/aggregator/project/projectstatuslist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectstatuslist";
const url = "/data/aggregator/project/projectstatuslist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectstatuslist";
let params = {
agencyId: '',
agencyId: this.agencyId,
dateId: this.dateId,
status: this.status
};
@ -323,13 +367,13 @@ export default {
if (code === 0) {
// this.projectList = [...data]
if (this.status === 'closed') {
this.projectList = this.projectList1
} else {
this.projectList = this.projectList2
this.projectList = [...data]
// if (this.status === 'closed') {
// this.projectList = this.projectList1
// } else {
// this.projectList = this.projectList2
}
// }
this.projectList.forEach(item => {
item.values_ = {
name: item.title
@ -378,14 +422,11 @@ export default {
},
loadMap () {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle)
this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000)
} else {
this.$refs.map.refreshMap(null, this.projectList)
}
},
@ -395,10 +436,8 @@ export default {
},
pieInitOk (dom) {
this.pieChartS = dom
this.pieInitState = true
},
lineInitOk () {
@ -407,7 +446,7 @@ export default {
},
getLine () {
if (this.lineInitState) {
this.getLineChart()
this.assignLineChart()
} else {
setTimeout(() => {
this.getLine()
@ -416,12 +455,14 @@ export default {
},
// 线
async getLineChart () {
this.$refs.lineChart.clear()
if (this.$refs.lineChart) {
this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading()
}
const _that = this
// this.$refs.pieChart.showLoading()
// const url ="/data/aggregator/project/projectmonthincr";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr";
const url = "/data/aggregator/project/projectmonthincr";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr";
let params = {
agencyId: this.agencyId,
dateId: this.dateId,
@ -431,28 +472,24 @@ export default {
if (code === 0) {
// pieChart
this.lineOption = lineOption()
let xaxis = []
let totalIndexData = []
this.lineXaxis = []
this.lineSeriesData = []
if (data && data.length > 0) {
this.lineNoData = false
data.forEach(item => {
xaxis.push(item.type)
totalIndexData.push(item.value)
this.lineXaxis.push(item.type)
this.lineSeriesData.push(item.value)
});
// this.lineData = data
this.lineData = data
} else {
this.lineNoData = true
}
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: xaxis },
series: [
{ data: totalIndexData },
]
}, true)
if (this.$refs.lineChart) {
this.$refs.lineChart.hideLoading()
}
} else {
this.$message.error(msg);
@ -461,9 +498,22 @@ export default {
},
assignLineChart () {
this.lineOption = lineOption()
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.lineXaxis },
series: [
{ data: this.lineSeriesData },
]
}, true)
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
this.assignPieChart()
} else {
setTimeout(() => {
this.getPie()
@ -471,30 +521,36 @@ export default {
}
},
//
async getPieChart () {
this.$refs.pieChart.clear()
async assignPieChart () {
this.pieTotal = 0
let maxIndex = 0
let maxValue = this.pieData[0].value
const _that = this
// this.$refs.pieChart.showLoading()
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieData.forEach(item => {
this.pieData.forEach((item, index) => {
this.pieTotal = this.pieTotal + item.value
if (item.value > maxValue) {
maxValue = item.value
maxIndex = index
item.selected = true
} else if (index !== 0) {
item.selected = false
}
});
this.pieOption.title.text = this.pieTotal
this.clickPie(0)
this.clickPie(maxIndex)
let fun = function (params) {
_that.clickPie(params.dataIndex)
}
this.$refs.pieChart.handleClick(fun)
},
clickPie (seriesIndex) {
@ -544,7 +600,15 @@ export default {
console.log(this.agencyIdArray)
},
//
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
},
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
@ -565,9 +629,16 @@ export default {
cptTb,
screenEchartsFrame,
screenMap,
ScreenLoading,
ScreenNodata
},
watch: {
dateIdShow () {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
},
uid (id) {
this.userId = id;
},

11
src/views/modules/visual/communityGovern/processLineOption.js

@ -2,7 +2,15 @@ import * as echarts from 'echarts'
export function lineOption () {
return {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
xAxis: {
type: 'category',
// boundaryGap: false,
@ -54,6 +62,7 @@ export function lineOption () {
{
name: '项目数',
type: 'line',
smooth: true,
barWidth: 15,
areaStyle: {},
itemStyle: {

22
src/views/modules/visual/communityGovern/processPieOption.js

@ -23,18 +23,18 @@ const center= ['50%', '200px']
tooltip: {
show: false
},
legend: {
top: 350,
bottom: 0,
itemWidth: 20,
itemHeight: 10,
textStyle: {
color: '#D2E7FF',
fontSize: 16,
lineHeight: 20,
},
// legend: {
// top: 350,
// bottom: 0,
// itemWidth: 20,
// itemHeight: 10,
// textStyle: {
// color: '#D2E7FF',
// fontSize: 16,
// lineHeight: 20,
// },
},
// },
series: [
// 外侧圆环
{

316
src/views/modules/visual/communityGovern/resibuzz.vue

@ -12,8 +12,8 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select status-select">
<el-select v-model="status"
@ -31,10 +31,15 @@
<div class="g-cpt-resi">
<div class="g-l">
<screen-echarts-frame class="echart-wr"
<screen-echarts-frame v-if=" !dataLoading"
class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="g-r">
<div class="m-tb">
@ -43,23 +48,28 @@
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"></cpt-tb>
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
</div>
:list="demand.list"
@operate="toIssueInfo"></cpt-tb>
</div>
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
</div>
</div>
</div>
<issue-info v-if="showIssue"
:issueId="issueId"
@close="showIssue = false" />
</cpt-card>
</template>
@ -69,16 +79,19 @@ import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
import { pieOption } from './resiPieOption.js'
import nextTick from 'dai-js/tools/nextTick'
import issueInfo from "./cpt/issue-info";
export default {
name: "HomeMap",
data () {
return {
showNoData: false,
timer: null,
dataLoading: true,
pieChartS: null,
pieChart: '',
pieOption: {},
@ -86,18 +99,18 @@ export default {
pieTotal: 0,
colorArray: [],
pieData: [
{ count: 1048, categoryName: '城市管理', color: '#1B51FF', selected: true },
{ count: 735, categoryName: '为民服务', color: '#00E5ED' },
{ count: 580, categoryName: '安全监管', color: '#7800FF' },
{ count: 484, categoryName: '民政', color: '#16D783' },
{ count: 300, categoryName: '环境保护', color: '#FF7800' },
{ count: 1048, categoryName: '建设管理', color: '#FFBA00' },
{ count: 735, categoryName: '街道吹哨部门报到', color: '#FFD685' },
{ count: 1580, categoryName: '社会治安综合', color: '#2A00FF' },
{ count: 484, categoryName: '公安交通管理', color: '#C600FF' },
{ count: 300, categoryName: '卫生计生监管执法', color: '#FF2A00' },
{ count: 484, categoryName: '民生', color: '#3DDA83' },
{ count: 300, categoryName: '街道安全', color: '#FAC126' }
// { count: 1048, categoryName: '', color: '#1B51FF', selected: true },
// { count: 735, categoryName: '', color: '#00E5ED' },
// { count: 580, categoryName: '', color: '#7800FF' },
// { count: 484, categoryName: '', color: '#16D783' },
// { count: 300, categoryName: '', color: '#FF7800' },
// { count: 1048, categoryName: '', color: '#FFBA00' },
// { count: 735, categoryName: '', color: '#FFD685' },
// { count: 1580, categoryName: '', color: '#2A00FF' },
// { count: 484, categoryName: '', color: '#C600FF' },
// { count: 300, categoryName: '', color: '#FF2A00' },
// { count: 484, categoryName: '', color: '#3DDA83' },
// { count: 300, categoryName: '', color: '#FAC126' }
],
//voting shift_project closedall
stateArray: [
@ -121,6 +134,8 @@ export default {
status: 'all',
orgId: '',
orgTypeSel: '',
tableList: [],
demand: {
loading: true,
colList: [
@ -174,8 +189,9 @@ export default {
pageSize: 10,
pageNo: 1,
total: 0,
},
showIssue: false,
issueId: '',
casOptions: [],
agencyIdArray: [],
@ -184,7 +200,7 @@ export default {
optionProps: {
multiple: false,
value: 'agencyId',
value: 'orgLevel',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
@ -194,127 +210,115 @@ export default {
},
// mixins: [animate]
beforeDestroy () {
this.timer && clearInterval(this.timer)
},
async mounted () {
this.userId = this.uid;
this.getApiData();
this.dataLoading = true
await this.getAgencylist()//
await this.getApiData()
this.dataLoading = false
this.getPie()
},
methods: {
async getApiData () {
await this.getAgencylist()//
await this.getPie()
await this.getPieChart()
await this.getTable();
},
//
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
const url = "/gov/org/customeragency/agencygridtree";
let params = {};
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.agencyInfo = data
this.orgId = this.agencyInfo.agencyId
this.orgType = this.agencyInfo.level === 'grid' ? 'grid' : 'agency'
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyInfo.orgLevel)
}
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
pieInitOk (dom) {
console.log('pie准备好了', dom)
this.pieChartS = dom
this.pieInitState = true
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async getPieChart () {
this.$refs.pieChart.clear()
this.pieTotal = 0
const _that = this
// this.$refs.pieChart.showLoading()
// const url ="/gov/issue/issue/resibuzz-leftpiechart";
const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz-leftpiechart";
if (this.$refs.pieChart) {
this.$refs.pieChart.clear()
this.$refs.pieChart.showLoading()
}
const url = "/gov/issue/issue/resibuzz-leftpiechart";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz-leftpiechart";
let params = {
orgId: this.orgId,
orgType: this.orgType,
};
const { data, code, msg } = await requestPost(url, params);
// pieChart
if (code === 0) {
// pieChart
this.pieOption = pieOption(this.pieChartS)
if (data && data.length > 0) {
// this.pieData = data
} else {
this.pieData = [{ count: 0, categoryName: '无分类', color: '#00E5ED' }]
}
let maxValue = this.pieData[0].count
let maxIndex = 0
this.pieData[0].selected = true
this.pieData.forEach((item, index) => {
item.name = item.categoryName
item.value = item.count
this.colorArray.push(item.color)
this.pieTotal = this.pieTotal + item.value
if (item.value > maxValue) {
maxValue = item.value
maxIndex = index
item.selected = true
} else if (index !== 0) {
item.selected = false
}
});
this.pieData = data
} else {
this.pieData = []
this.pieOption.title.text = this.pieTotal
this.pieOption.series[1].itemStyle = {
color: function (params) {
return _that.colorArray[params.dataIndex]
}
}
this.clickPie(maxIndex)
let fun = function (params) {
_that.clickPie(params.dataIndex)
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
}
this.$refs.pieChart.handleClick(fun)
} else {
this.$message.error(msg);
}
},
pieInitOk (dom) {
console.log('pie准备好了', dom)
this.pieChartS = dom
this.pieInitState = true
},
getPie () {
if (this.pieInitState) {
this.assignPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
clickPie (seriesIndex) {
this.pieData.forEach((element, index) => {
@ -349,29 +353,87 @@ export default {
}
});
this.pieOption.series[1].data = this.pieData
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
assignPieChart () {
this.pieTotal = 0
if (this.pieData.length > 0) {
this.$refs.pieChart.setNoData(false)
const _that = this
let maxIndex = 0
let maxValue = this.pieData[0].count
this.pieData[0].selected = true
this.pieData.forEach((item, index) => {
item.name = item.categoryName
item.value = item.count
this.colorArray.push(item.color)
this.pieTotal = this.pieTotal + item.value
if (item.value > maxValue) {
maxValue = item.value
maxIndex = index
item.selected = true
} else if (index !== 0) {
item.selected = false
}
});
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieOption.title.text = this.pieTotal
this.pieOption.series[1].itemStyle = {
color: function (params) {
return _that.colorArray[params.dataIndex]
}
}
this.clickPie(maxIndex)
let fun = function (params) {
_that.clickPie(params.dataIndex)
}
this.$refs.pieChart.handleClick(fun)
} else {
this.$refs.pieChart.setNoData(true)
}
},
handleChangeState (index) {
this.getTable()
},
handleChangeAgency (value) {
console.log(value)
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
console.log(this.agencyIdArray)
async handleChangeAgency (value) {
let orgArray = []
let key = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
if (key) {
orgArray = key.split('-')
this.orgId = orgArray[0]
this.orgType = orgArray[1] === 'grid' ? 'grid' : 'agency'
} else {
this.orgId = ''
this.orgType = ''
}
await this.getApiData()
this.assignPieChart()
},
//
async getTable () {
// const url = "/gov/issue/issue/resibuzz";
const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz";
const url = "/gov/issue/issue/resibuzz";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz";
let params = {
status: this.status,
orgId: this.orgId,
orgType: this.orgType,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
};
@ -381,18 +443,19 @@ export default {
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.demand.list = data.list.map((item) => {
return [
{ type: "index" },
item.issueTitle,
item.suggestion,
item.categoryName,
item.status,
item.createdTime,
item.issueOriginator,
item.voteAccount,
item.supportCount,
item.oppositionCount,
item.issueTitle ? item.issueTitle : '',
item.suggestion ? item.suggestion : '',
item.categoryName.join(','),
item.status ? item.status : '',
item.createdTime ? item.createdTime : '',
item.issueOriginator ? item.issueOriginator : '',
item.voteAccount ? item.voteAccount : '',
item.supportCount ? item.supportCount : '',
item.oppositionCount ? item.oppositionCount : '',
{ type: "operate", list: ["查看"] },
];
});
@ -405,8 +468,12 @@ export default {
this.demand.pageNo = val;
this.getTable();
},
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
async toIssueInfo (index) {
const { tableList } = this;
this.issueId = tableList[index].issueId
this.showIssue = true
},
},
props: {
@ -423,6 +490,9 @@ export default {
cptCard,
cptTb,
screenEchartsFrame,
ScreenLoading,
ScreenNodata,
issueInfo
},
watch: {

258
src/views/modules/visual/communityGovern/typeAnalyze.vue

@ -12,18 +12,18 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select ">
<el-date-picker v-model="dateId"
<el-date-picker v-model="dateIdShow"
type="date"
:clearable="false"
@change="handleChangeDate"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyyMMdd">
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
@ -31,10 +31,15 @@
<div class="g-cpt-resi">
<div class="g-l">
<screen-echarts-frame class="echart-wr"
<screen-echarts-frame v-if="!dataLoading"
class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="table-status"
v-if="dataLoading">
<screen-loading>加载中</screen-loading>
</div>
</div>
<div class="g-r">
<div class="m-tb">
@ -43,23 +48,30 @@
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"></cpt-tb>
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
:list="demand.list"
@operate="toProjectInfo"></cpt-tb>
</div>
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
</div>
</div>
</div>
<project-info v-if="showProject"
:projectId="projectId"
:userId="userId"
:categoryCodes="categoryCodes"
@close="showProject = false" />
</cpt-card>
</template>
@ -69,16 +81,16 @@ import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import projectInfo from "./cpt/project-info";
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
import { pieOption } from './typePieOption.js'
import nextTick from 'dai-js/tools/nextTick'
export default {
name: "HomeMap",
data () {
return {
showNoData: false,
timer: null,
dataLoading: true,
pieChartS: null,
pieChart: '',
pieOption: {},
@ -100,6 +112,7 @@ export default {
{ total: 300, categoryName: '街道安全', color: '#FAC126' }
],
dateIdShow: '',
agencyId: '',
dateId: '',
categoryCode: '',
@ -148,8 +161,13 @@ export default {
pageSize: 10,
pageNo: 1,
total: 0,
},
tableList: [],
showProject: false,
userId: '',//
categoryCodes: [],//Id
projectId: '',
casOptions: [],
agencyIdArray: [],
@ -160,6 +178,7 @@ export default {
multiple: false,
value: 'agencyId',
label: 'agencyName',
orgType: 'orgType',
children: 'subAgencyList',
checkStrictly: true
},
@ -168,55 +187,70 @@ export default {
},
// mixins: [animate]
beforeDestroy () {
this.timer && clearInterval(this.timer)
},
async mounted () {
this.userId = this.uid;
this.dataLoading = true
this.initData()
await this.getAgencylist()//
this.getApiData();
await this.getPieChart()
this.dataLoading = false
this.getPie()
},
methods: {
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
this.dateId = new Date(time); //
},
async getApiData () {
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
await this.getPie()
await this.getTable();
},
//
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
const url = "/gov/org/customeragency/agencygridtree";
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
let params = {};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.agencyInfo = data
this.agencyId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
}
} else {
this.$message.error(msg)
this.$message.error(msg);
}
},
handleChangeDate (value) {
},
this.dateId = value
this.getApiData()
async handleChangeDate (value) {
this.dateIdShow = value
await this.getPieChart()
this.getPie()
},
@ -226,23 +260,16 @@ export default {
this.pieInitState = true
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async getPieChart () {
this.$refs.pieChart.clear()
this.pieTotal = 0
const _that = this
// this.$refs.pieChart.showLoading()
// const url ="/data/aggregator/project/projectcategorylist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectcategorylist";
if (this.$refs.pieChart) {
this.$refs.pieChart.showLoading()
}
const url = "/data/aggregator/project/projectcategorylist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectcategorylist";
let params = {
agencyId: this.agencyId,
dateId: this.dateId,
@ -252,15 +279,40 @@ export default {
// pieChart
if (code === 0) {
// pieChart
this.pieOption = pieOption(this.pieChartS)
if (data && data.length > 0) {
// this.pieData = data
this.pieData = data
} else {
this.pieData = [{ total: 0, categoryName: '无分类', color: '#00E5ED' }]
this.pieData = []
}
if (this.$refs.pieChart) {
this.$refs.pieChart.hideLoading()
}
} else {
this.$message.error(msg);
}
},
getPie () {
if (this.pieInitState) {
this.assignPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
assignPieChart () {
if (this.pieData.length > 0) {
this.$refs.pieChart.setNoData(false)
this.$refs.pieChart.clear()
this.pieTotal = 0
const _that = this
// pieChart
this.pieOption = pieOption(this.pieChartS)
let maxValue = this.pieData[0].total
let maxIndex = 0
this.pieData[0].selected = true
@ -274,14 +326,13 @@ export default {
maxValue = item.value
maxIndex = index
item.selected = true
this.categoryCode = item.categoryCode
} else if (index !== 0) {
item.selected = false
}
});
this.pieOption.title.text = this.pieTotal
this.pieOption.series[1].itemStyle = {
color: function (params) {
@ -289,22 +340,18 @@ export default {
}
}
let fun = function (params) {
_that.clickPie(params.dataIndex)
_that.categoryCode = _that.pieData[params.dataIndex].categoryCode
_that.getTable()
}
this.$refs.pieChart.handleClick(fun)
this.clickPie(maxIndex)
} else {
this.$message.error(msg);
this.$refs.pieChart.setNoData(true)
}
},
clickPie (seriesIndex) {
async clickPie (seriesIndex) {
this.pieData.forEach((element, index) => {
if (index === seriesIndex) {
element.label = {
@ -340,20 +387,23 @@ export default {
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
this.categoryCode = this.pieData[seriesIndex].categoryCode
this.getTable()
},
handleChangeAgency (value) {
async handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
this.getApiData()
await this.getPieChart()
this.getPie()
console.log(this.agencyIdArray)
},
//
async getTable () {
// const url = "/data/aggregator/project/categoryprojectlist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/categoryprojectlist";
const url = "/data/aggregator/project/categoryprojectlist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/categoryprojectlist";
let params = {
dateId: this.dateId,
agencyId: this.agencyId,
@ -368,23 +418,29 @@ export default {
if (code === 0) {
this.demand.total = data.total;
this.demand.list = data.list.map((item) => {
//:issue :agency :resi_event
item.originShow = item.origin === 'issue' ? '楼院小组' : item.origin === 'agency' ? '项目立项' : '事件上报'
//: pendingclosed
item.statusShow = item.status === 'pending' ? '待处理' : '已结案'
return [
{ type: "index" },
item.projectCode,
item.categoryNames.join(','),
item.originShow,
item.gridName,
item.statusShow,
item.title,
item.time,
{ type: "operate", list: ["查看"] },
];
});
this.tableList = data.list
if (data.list && data.list.length > 0) {
this.demand.list = data.list.map((item) => {
//:issue :agency :resi_event
item.originShow = item.origin === 'issue' ? '楼院小组' : item.origin === 'agency' ? '项目立项' : '事件上报'
//: pendingclosed
item.statusShow = item.status === 'pending' ? '待处理' : '已结案'
return [
{ type: "index" },
item.projectCode ? item.projectCode : '',
item.categoryNames.join(','),
item.originShow ? item.originShow : '',
item.gridName ? item.gridName : '',
item.statusShow ? item.statusShow : '',
item.title ? item.title : '',
item.time ? item.time : '',
{ type: "operate", list: ["查看"] },
];
});
} else {
this.demand.list = []
}
} else {
this.$message.error(msg);
}
@ -394,8 +450,14 @@ export default {
this.demand.pageNo = val;
this.getTable();
},
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
async toProjectInfo (index) {
const { tableList } = this;
this.projectId = tableList[index].projectId
this.userId = tableList[index].userId
this.categoryCodes = tableList[index].categoryCodes
this.showProject = true
},
},
props: {
@ -412,16 +474,16 @@ export default {
cptCard,
cptTb,
screenEchartsFrame,
projectInfo,
ScreenLoading,
},
watch: {
uid (id) {
this.userId = id;
},
userId () {
this.getApiData();
window.scrollTo(0, 0);
dateIdShow () {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
},
},
};
</script>

172
src/views/modules/visual/communityParty/community.vue

@ -31,28 +31,29 @@
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handleSelectChange"
@clear="handleSelectChange">
:default-time="['00:00:00', '23:59:59']"
>
</el-date-picker>
</div>
</div>
<div class="box-wr box-wr-400">
<div class="box-left">
<div class="box-left-item">
<div class="box-label">组织单位</div>
<div class="box-num">1233</div>
<div v-for="(item, index) in cateInfo" :key="index" class="box-left-item">
<div class="box-label">{{ item.label }}</div>
<div class="box-num">{{ item.value }}</div>
</div>
<div class="box-left-item">
<!-- <div class="box-left-item">
<div class="box-label">组织活动</div>
<div class="box-num">1233</div>
</div>
</div> -->
</div>
<div class="box-right">
<div class="warning-box-bottom">
<screen-table :headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"
:operate="true"></screen-table>
:operate="true"
@look="handleLook"></screen-table>
<div class="pagination">
<el-pagination :current-page="pageNo"
:page-size="pageSize"
@ -67,15 +68,15 @@
</div>
</div>
<div class="second-title">
<div class="second-title-label">党建单位分类统计</div>
<div class="second-title-label">党建单位分</div>
</div>
<div class="box-wr">
<div class="box-left box-left-w400">
<div v-for="item in partyItem"
:key="item.value"
<div v-for="(item, index) in partyItem"
:key="index"
class="box-left-item">
<div class="box-label">{{ item.name }}</div>
<div class="box-label">{{ item.label }}</div>
<div class="box-num"
:style="'color:' + item.color">{{ item.value }}</div>
</div>
@ -89,20 +90,20 @@
:showIconLayer="true"></screen-map>
</div>
<div class="map-tips">
<div v-for="item in partyItem"
:key="item.value"
<div v-for="(item, index) in partyItem"
:key="index"
class="map-tips-item">
<div class="map-tips-icon">
<img :src="item.icon" />
</div>
<div class="map-tips-label">{{ item.name }}</div>
<div class="map-tips-label">{{ item.label }}</div>
</div>
</div>
</div>
</div>
</cpt-card>
<dialog-info v-show="showedMoreInfo"
<dialog-info v-show="showedMoreInfo" :info="detailInfo"
@close="showedMoreInfo = false" />
</div>
</template>
@ -141,6 +142,7 @@ export default {
tableData: [
// [1,'','','2',''],
],
detailId: '',
agencyId: '',
value2: '',
timeRange: '',
@ -180,7 +182,7 @@ export default {
icon: require('../../../../assets/img/shuju/measure/qita.png')
}
],
cateInfo: [],
//
isfirstInit: true,//
agencyInfo: {},//level
@ -223,6 +225,7 @@ export default {
longitude: 120.379455,
}
],
detailInfo: {}
};
},
async mounted () {
@ -231,36 +234,125 @@ export default {
await nextTick(100);
this.loadUnit()
this.getList();
this.getCateCount()
this.getCateType()
await this.getWorkUserInfo()
await this.getMapUnitList()
},
watch: {
timeRange(val) {
console.log('val-www', val)
this.getList();
}
},
methods: {
//
async getList () {
this.visibleLoading = true
const url = "/heart/icpartyactivity/search"
const url = "/heart/icpartyactivity/activitylist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId: this.agencyId,
pageSize: this.pageSize,
pageNo: this.pageNo,
serviceMatter: this.serviceMatter,
startTime: this.timeRange.length > 0 && this.timeRange[0] || '',
endTime: this.timeRange.length > 0 && this.timeRange[1] || ''
startTime: this.timeRange && this.timeRange[0] || '',
endTime: this.timeRange && this.timeRange[1] || ''
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
} else {
this.$message.error(msg)
}
this.visibleLoading = false
},
async getCateCount () {
const url = "/heart/icpartyactivity/statistics"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.cateInfo = data
} else {
this.$message.error(msg)
}
},
async getCateType () {
const url = "/heart/icpartyunit/typestatistics"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.cateInfo = data
const colorItem = {
0: {
color: 'rgba(250, 32, 10, 1)',
icon: require('../../../../assets/img/shuju/measure/ly@2x.png')
},
1: {
color: 'rgba(251, 177, 4, 1)',
icon: require('../../../../assets/img/shuju/measure/lxdj@2x.png')
},
2: {
color: 'rgba(80, 194, 237, 1)',
icon: require('../../../../assets/img/shuju/measure/xq@2x.png')
},
3: {
color: 'rgba(65, 181, 104, 1)',
icon: require('../../../../assets/img/shuju/measure/jgzs@2x.png')
},
4: {
color: 'rgba(192, 21, 195, 1)',
icon: require('../../../../assets/img/shuju/measure/qita.png')
}
}
this.partyItem = data.map((item, index) => {
return {
...item,
...colorItem[index]
}
})
} else {
this.$message.error(msg)
}
},
async getDetail (id) {
const url = "/heart/icpartyactivity/detail"
let params = {
id: id
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.detailInfo = data
} else {
this.$message.error(msg)
}
},
async loadUnit () {
const url = "/heart/icresidemanddict/subcodelist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
@ -328,8 +420,8 @@ export default {
//
async getMapUnitList () {
// const url = "/heart/icpartyunit/distribution"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
const url = "/heart/icpartyunit/distribution"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {
agencyId: this.agencyId
@ -393,7 +485,12 @@ export default {
clickProject (feature) {
console.log('标注信息', feature.values_.properties)
},
async handleLook(val) {
this.detailId = val.id
await this.getDetail(val.id)
this.showedMoreInfo = true
},
handleSelectChange () {
this.getList();
@ -425,6 +522,33 @@ export default {
.card-wr:last-child {
margin-left: 20px;
}
::v-deep .table-body {
overflow: auto;
&::-webkit-scrollbar {
width: 8px;
// background: linear-gradient(270deg, #0063FE, #0095FF);
}
&::-webkit-scrollbar-corner,
/* 滚动条角落 */
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track { /*滚动条的轨道*/
border-radius: 4px;
}
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, .24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
&::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #0063FE, #0095FF);
}
}
}
.card-title {
display: flex;

315
src/views/modules/visual/communityParty/dialogInfo.vue

@ -4,77 +4,62 @@
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>需求详情</span>
<span>活动详情</span>
</div>
<div class="btn-close" @click="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="list-title">需求内容</div>
<!-- <div class="list-title">需求内容</div> -->
<div class="list-wr">
<div class="list">
<div class="item-desc">
<!-- <span class="item-field">所属网格</span> -->
<!-- <div class="item-desc">
<span>市北区同德花园小区物业管理服务公司的同志每天对该小区 公共部位喷洒消毒液进行消毒为杀灭新型冠状病毒近几 天以来市北区</span>
</div>
</div> -->
<div class="item">
<span class="item-field">所属网格</span>
<span>哈哈哈</span>
<span class="item-field">服务事项</span>
<span>{{ info.serviceMatterName }}</span>
</div>
<div class="item">
<span class="item-field">需求类型</span>
<span>的是法撒旦法</span>
<span class="item-field">单位名称</span>
<span>{{ info.unitName }}</span>
</div>
<div class="item">
<span class="item-field">需求状态</span>
<span>第三方士大夫</span>
<span class="item-field">活动标题</span>
<span>{{ info.title }}</span>
</div>
<div class="item">
<span class="item-field">上报类型</span>
<span>撒打发斯蒂芬</span>
<span class="item-field">活动内容</span>
<span class="item-content" v-html="info.content"></span>
</div>
<div class="item">
<span class="item-field"> </span>
<span>撒打发斯蒂芬</span>
<span class="item-field">服务人数</span>
<span>{{ info.peopleCount }}</span>
</div>
<div class="item">
<span class="item-field">上报人联系方式</span>
<span>撒打发斯蒂芬</span>
<span class="item-field">活动时间</span>
<span>{{ info.activityTime }}</span>
</div>
<div class="item">
<span class="item-field">上报时间</span>
<span>2021-09-17 12:52</span>
<span class="item-field">活动坐标</span>
<span>经度{{ info.latitude }} <br />
纬度{{ info.longitude }}</span>
</div>
<div class="item">
<span class="item-field">服务时间</span>
<span>2021-09-17 12:52</span>
<span class="item-field">活动地址</span>
<span>{{ info.address }}</span>
</div>
</div>
<div class="list">
<div class="item">
<span class="item-field">服务方</span>
<span>哈哈哈</span>
</div>
<div class="item">
<span class="item-field">实际服务时间</span>
<span>2021-09-17 12:52 <br/>
2021-09-17 17:52</span>
</div>
<div class="item">
<span class="item-field">完成情况</span>
<span>第三方士大夫</span>
</div>
<div class="item">
<span class="item-field">评价</span>
<span>
<el-rate value="4" disabled></el-rate>
</span>
<span class="item-field">活动结果</span>
<span class="item-content" v-html="info.result"></span>
</div>
</div>
</div>
<div class="tabs">
<!-- <div class="tabs">
<div
class="tab-btn"
>
@ -92,7 +77,11 @@
</div>
</div>
<analyse />
<div style="padding: 30px 0;">
<analyse :single-list="demandList" :single-title="'需求上报'" :more-title="'事件上报'" :user-list="userLists"
:user-name="userName" :has-event="false" :more-list="eventList" />
</div> -->
</cpt-card>
</div>
@ -115,6 +104,7 @@ export default {
type: String,
default: "",
},
info: Object
},
components: {
@ -128,13 +118,215 @@ export default {
groupList: [],
groupIndex: 0,
startGroupIndex: 0,
info: {},
// info: {},
allInfo: {},
xiaoquList: [],
louList: [],
danyuanList: [],
homeList: [],
demandList: [
{
categoryName: '辨明服务',
categoryCode: '1',
showItem: false,
projectList: [
{
title: '不知道写了什么哈哈哈',
status: 'closed',
projectId: '1'
},
{
title: '罗里吧嗦写了什么哈哈哈',
status: 'closed',
projectId: '2'
},
{
title: '胡说八道写了什么哈哈哈',
status: 'closed',
projectId: '1=3'
},
{
title: '费眼飞鱼不知道写了什么哈哈哈',
status: 'closed',
projectId: '1=4'
},
{
title: '狗屁不通不知道写了什么哈哈哈',
status: 'closed',
projectId: '5'
},
{
title: '啦啦啦不知道写了什么哈哈哈',
status: 'closed',
projectId: '6'
}
]
},
{
categoryName: '辨明服务',
categoryCode: '1',
showItem: false,
projectList: [
{
title: '不知道写了什么哈哈哈',
status: 'closed',
projectId: '1'
},
{
title: '罗里吧嗦写了什么哈哈哈',
status: 'closed',
projectId: '2'
},
{
title: '胡说八道写了什么哈哈哈',
status: 'closed',
projectId: '1=3'
},
{
title: '费眼飞鱼不知道写了什么哈哈哈',
status: 'closed',
projectId: '1=4'
},
{
title: '狗屁不通不知道写了什么哈哈哈',
status: 'closed',
projectId: '5'
},
{
title: '啦啦啦不知道写了什么哈哈哈',
status: 'closed',
projectId: '6'
}
]
},
{
categoryName: '辨明服务',
categoryCode: '1',
showItem: false,
projectList: [
{
title: '不知道写了什么哈哈哈',
status: 'closed',
projectId: '1'
},
{
title: '罗里吧嗦写了什么哈哈哈',
status: 'closed',
projectId: '2'
},
{
title: '胡说八道写了什么哈哈哈',
status: 'closed',
projectId: '1=3'
},
{
title: '费眼飞鱼不知道写了什么哈哈哈',
status: 'closed',
projectId: '1=4'
},
{
title: '狗屁不通不知道写了什么哈哈哈',
status: 'closed',
projectId: '5'
},
{
title: '啦啦啦不知道写了什么哈哈哈',
status: 'closed',
projectId: '6'
}
]
}
],
userLists: [
{
homeId: '1',
icUserId: '1',
icUserName: '沾上干'
},
{
homeId: '2',
icUserId: '2',
icUserName: '李四'
},
{
homeId: '3',
icUserId: '3',
icUserName: '王五哈哈'
}
],
userName: '王亚男哈',
eventList: [
{
categoryName: '辨明服务',
categoryCode: '1',
projectList: [
{
title: '不知道写了什么哈哈哈',
status: 'closed',
projectId: '1'
},
{
title: '罗里吧嗦写了什么哈哈哈',
status: 'closed',
projectId: '2'
},
{
title: '胡说八道写了什么哈哈哈',
status: 'closed',
projectId: '1=3'
},
{
title: '费眼飞鱼不知道写了什么哈哈哈',
status: 'closed',
projectId: '1=4'
},
{
title: '狗屁不通不知道写了什么哈哈哈',
status: 'closed',
projectId: '5'
},
{
title: '啦啦啦不知道写了什么哈哈哈',
status: 'closed',
projectId: '6'
}
]
},
{
categoryName: '水煮鱼辨明服务辨明服务',
categoryCode: '4',
projectList: [
{
title: '熟煮雨不知道写了什么哈哈哈',
status: 'pending',
projectId: '4'
}
]
},
{
categoryName: '开心麻花',
categoryCode: '2',
projectList: [
{
title: '不知道开心麻花写了什么哈哈哈',
status: 'closed',
projectId: '1'
}
]
},
{
categoryName: '酸菜鱼',
categoryCode: '3',
projectList: [
{
title: '不知道酸菜鱼写了什么哈哈哈',
status: 'pending',
projectId: '3'
}
]
}
],
};
},
@ -165,6 +357,46 @@ export default {
margin-bottom: 15px;
font-size: 16px;
cursor: pointer;
.item-field {
// width: 100px;
flex-shrink: 0;
}
.item-content {
width: 100%;
max-height: 420px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 8px;
// background: linear-gradient(270deg, #0063FE, #0095FF);
}
&::-webkit-scrollbar-corner,
/* 滚动条角落 */
&::-webkit-scrollbar-thumb,
&::-webkit-scrollbar-track { /*滚动条的轨道*/
border-radius: 4px;
}
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, .24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
&::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #0063FE, #0095FF);
}
}
::v-deep p {
margin: 0;
img {
width: 100%;
height: 100%;
}
}
}
.item-desc {
font-size: 16px;
@ -186,4 +418,5 @@ export default {
padding: 0 32px;
}
</style>

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

@ -4,7 +4,7 @@
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
<el-dropdown trigger="click">
<!-- <el-dropdown trigger="click">
<span class="el-dropdown-link">
全部网格<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
@ -15,18 +15,16 @@
<el-dropdown-item>双皮奶</el-dropdown-item>
<el-dropdown-item>蚵仔煎</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- <div class="title-time">
<div class="title-time-label">选择时间</div>
<div class="">
<el-date-picker
v-model="value2"
type="month"
placeholder="选择月">
</el-date-picker>
</div>
</div> -->
</el-dropdown> -->
<el-cascader
v-model="selectAgency"
:options="propTree"
:props="{ checkStrictly: true }"
:show-all-levels="false"
:getCheckedNodes="getCheckedNodes"
clearable @change="handleCascader">
</el-cascader>
</div>
</div>
<div class="card-echart">
<div class="card-left">
@ -41,13 +39,13 @@
</div>
<div class="echarts-tips echarts-tips-wd50">
<div class="tips-lists">
<div v-for="item in ageItem" :key="item.value" class="tips-items">
<div v-for="(item, index) in ageItem" :key="index" class="tips-items">
<div class="tips-items-title" :class="'tips-items-title' + item.value">
{{ item.name }}
</div>
<div class="tips-items-num">
<div class="tips-item-count">{{item.value}}</div>
<div class="tips-item-has">25%</div>
<div class="tips-item-has">{{ item.radio }}</div>
</div>
</div>
@ -58,19 +56,19 @@
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
:tableData="tableData"
:tableData="ageList"
:visibleLoading="visibleLoading"
:operate="false"
></screen-table>
<div class="pagination">
<el-pagination
:current-page="pageNo"
:page-size="pageSize"
:current-page="agePageNo"
:page-size="agePageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
@size-change="pageSizeChangeHandleAge"
@current-change="pageCurrentChangeHandleAge"
:total="ageTotal"
>
</el-pagination>
</div>
@ -98,8 +96,8 @@
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
:tableData="tableData"
:headerList="headerEduList"
:tableData="eduList"
:visibleLoading="visibleLoading"
:operate="false"
></screen-table>
@ -142,23 +140,35 @@ export default {
},
data() {
return {
warningList: [],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'gridName' },
{ title: "年龄", coulmn: 'buildingName' },
{ title: "手机号码", coulmn: 'neighborhoodName' }
{ title: "姓名", coulmn: 'name' },
{ title: "年龄", coulmn: 'age' },
{ title: "手机号码", coulmn: 'mobile' }
],
headerEduList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'name' },
{ title: "学历", coulmn: 'education' },
{ title: "手机号码", coulmn: 'mobile' }
],
tableData: [
// [1,'','','2',''],
],
noInit: false,
noEduInit: false,
selectAgency: null,
ageTotalCount: 0,
eduTotalCount: 0,
propTree: [],
value2: '',
visibleLoading: true,
pageNo: 1,
pageSize: 10,
agePageNo: 1,
agePageSize: 10,
total: 0,
activeIndex: 0,
activeLevel: "1",
ageTotal: 0,
eduItem: [
{
name: '小学',
@ -221,6 +231,8 @@ export default {
color: 'rgba(255, 186, 0, 1)'
}
],
ageList: [],
eduList: [],
pieAgeChartS: null,
pieEduChartSs: null,
pieAgeOptions: null,
@ -228,12 +240,15 @@ export default {
};
},
async mounted() {
await nextTick(100);
this.initAgeCharts()
this.initEduCharts()
await this.getAgencyList()
this.getAgeCount(this.$store.state.user.agencyId, 'agency')
this.getEduCount(this.$store.state.user.agencyId, 'agency')
// this.initAgeCharts()
// this.initEduCharts()
this.getAgeList(this.$store.state.user.agencyId, 'agency')
this.getEduList(this.$store.state.user.agencyId, 'agency')
// this.initChartType()
this.getBuildingwarnlist();
},
methods: {
pieInitOk (dom) {
@ -252,105 +267,7 @@ export default {
// const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId)
let option = {
// tooltip: {
// show: false,
// trigger: 'item'
// },
// legend: {
// show: false,
// orient: 'vertical',
// top: '40%',
// left: 'right',
// textStyle: {
// color: '#fff'
// }
// },
// title: {
// text: '12000', //80%
// subtext: '',
// left: "center",
// top: "center",
// textStyle: {
// color: "#fff",
// fontSize: 28,
// align: "center"
// },
// subtextStyle: {
// fontSize: 16,
// color: '#fff'
// }
// },
// series: [
// {
// // name: 'Access From',
// type: 'pie',
// // center: ['10%', '50%'],
// radius: ['40%', '60%'],
// avoidLabelOverlap: true,
// // top: top + '%',
// // height: '80%',
// left: 'center',
// width: 400,
// label: {
// show: true,
// position: 'outer',
// alignTo: 'edge',
// formatter: '{a|{c}}\n{r|}\n{name|{b}}',
// minMargin: 5,
// edgeDistance: 20,
// lineHeight: 15,
// color: '#fff',
// fontSize: 12,
// // padding: [5],
// distanceToLabelLine: 10,
// rich: {
// name: {
// padding: [0, 6, 0, 6]
// },
// a: {
// fontSize: 15,
// color: '#fff',
// padding: [0, 6, 0, 6]
// },
// r: {
// backgroundColor: 'auto',
// borderRadius: 6,
// width: 6,
// height: 6,
// // padding: [3, 3, 0, -12]
// }
// }
// },
// emphasis: {
// label: {
// show: true,
// fontSize: '14',
// fontWeight: 'bold'
// }
// },
// labelLine: {
// show: false,
// length: 20,
// length2: 0,
// maxSurfaceAngle: 80,
// lineStyle: {
// cap: 'round'
// }
// },
// labelLayout: function (params) {
// const isLeft = params.labelRect.x < this.pieChartS.getWidth() / 2;
// const points = params.labelLinePoints;
// // Update the end point.
// points[2][0] = isLeft
// ? params.labelRect.x
// : params.labelRect.x + params.labelRect.width;
// return {
// labelLinePoints: points
// };
// },
// data: this.ageItem
// }
// ]
}
this.pieAgeOptions = pieOption(this.pieAgeChartS)
this.clickAgePie(0)
@ -406,6 +323,7 @@ export default {
this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
this.noInit = true
// option && this.$refs.pieChart.setOption(option);
},
@ -535,8 +453,10 @@ export default {
},
clickAgePie (seriesIndex) {
let _code = ''
this.ageItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
element.label = {
show: true,
@ -548,7 +468,7 @@ export default {
}
};
console.log('zlcm')
console.log('zlcm', element)
} else {
element.label = {
show: false,
@ -565,14 +485,23 @@ export default {
}
});
this.pieAgeOptions.title.text = this.ageTotalCount
this.pieAgeOptions.series[1].data = this.ageItem
// this.$refs.pieChart.hideLoading()
this.$refs.ageChart.setOption(this.pieAgeOptions)
if (this.noInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getAgeList(_arr[0], orgType, _code)
}
this.noInit = true
},
clickEduPie (seriesIndex) {
let _code = ''
this.eduItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
element.label = {
show: true,
@ -601,64 +530,187 @@ export default {
}
});
this.pieEduOptions.title.text = this.eduTotalCount
this.pieEduOptions.series[1].data = this.eduItem
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
if (this.noEduInit) {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getEduList(_arr[0], orgType, _code)
}
this.noEduInit = true
},
onClickList(index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
async getAgeCount(orgId, orgType) {
const url = "/epmetuser/icresiuser/partymemberagestatistics";
let params = {
orgId,
orgType
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.ageItem = data.map(item => {
return {
...item,
name: item.label
}
})
data.forEach(item => {
this.ageTotalCount += Number(item.value)
})
this.initAgeCharts()
} else {
}
},
//
async getUserwarnlist() {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
async getEduCount(orgId, orgType) {
const url = "/epmetuser/icresiuser/partymembereducationstatistics";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
orgId,
orgType
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
tableData = data.list.map((item, index) => {
this.eduItem = data.map(item => {
return {
...item,
index: index + 1,
residentNames: item.residentNames || "暂无"
name: item.label
}
});
this.tableData = tableData;
this.total = data.total;
})
data.forEach(item => {
this.eduTotalCount += Number(item.value)
})
this.initEduCharts()
} else {
}
},
//
async getBuildingwarnlist() {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
async getAgeList(orgId, orgType, _code) {
this.visibleLoading = true
const url = "/epmetuser/icresiuser/partymemberagelist";
let params = {
agencyId: this.$store.state.user.agencyId,
orgId,
orgType,
code: _code || '',
pageNo: this.agePageNo,
pageSize: this.agePageSize
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
this.ageList = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
this.ageTotal = data.total
} else {
this.$message.error(msg)
}
// if (_code == 0 || _code) this.noInit = true
this.visibleLoading = false
},
async getEduList(orgId, orgType, _code) {
const url = "/epmetuser/icresiuser/partymembereducationlist";
let params = {
orgId,
orgType,
code: _code || '',
pageNo: this.pageNo,
pageSize: this.pageSize
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.eduList = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
this.total = data.total
} else {
this.$message.error(msg)
}
},
async getAgencyList(node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('data-org----o', data)
this.selectAgency = [`${data.agencyId}-${data.level}`]
let arr = []
arr.push(data)
this.propTree = arr && this.getTreeData(arr)
} else {
}
},
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.subAgencyList) {
if (item.subAgencyList.length === 0) {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: undefined
}
} else _item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
} else {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
}
}
return _item
})
return arr
},
handleCascader(val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getAgeList(_arr[0], orgType)
this.getEduList(_arr[0], orgType)
},
getCheckedNodes(val) {
console.log('val-nnn', val)
},
lazyLoad(node, resolve) {
setTimeout(() => {
this.getAgeList(node, resolve)
}, 500)
},
pageSizeChangeHandleAge(val) {
this.agePageNo = 1
this.agePageSize = val
this.getAgeList()
},
pageCurrentChangeHandleAge (val) {
this.agePageSize = val
this.getAgeList()
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
this.getEduList()
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.getUserwarnlist();
this.getEduList()
},
},
};
@ -723,6 +775,21 @@ export default {
}
}
.title-label {
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 20px;
font-weight: 800;
color: #fff;
background: transparent;
border: 0;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
}
.card-echart {
display: flex;

22
src/views/modules/visual/components/screen-echarts-frame/index.vue

@ -1,15 +1,22 @@
<template>
<div class="screenEchartsFrame"
ref="screenEchartsFrame"></div>
<div>
<div v-show="!noData"
class="screenEchartsFrame"
ref="screenEchartsFrame"></div>
<screen-nodata v-show="noData"
class="nodata"></screen-nodata>
</div>
</template>
<script>
import * as echarts from 'echarts';
import ScreenNodata from "@/views/modules/visual/components/screen-nodata";
export default {
name: 'screen-echarts-frame',
data () {
return {
myChart: ''
myChart: '',
noData: false,
}
},
props: {
@ -28,6 +35,10 @@ export default {
if (this.myChart) this.myChart.dispose()
},
watch: {},
components: {
ScreenNodata,
},
methods: {
initChart () {
@ -43,6 +54,11 @@ export default {
handleClick (fun) {
this.myChart.on('click', fun);
},
//
setNoData (nodata) {
this.noData = nodata
},
//
highLight (index) {

243
src/views/modules/visual/components/screen-map/index.vue

@ -3,8 +3,15 @@
<div class="div_map"
id="map"
ref="map">
<!-- <div id="map"
class="map"></div> -->
</div>
<div id="popup"
style="display: none;"
class="ol-popup">
<a href="#"
id="popup-closer"
class="ol-popup-closer"></a>
<div id="popup-content"
class="popup-content"></div>
</div>
</div>
</template>
@ -24,9 +31,11 @@ import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/int
import { getCenter, boundingExtent } from 'ol/extent.js';
import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js';
import { altKeyOnly, click, pointerMove } from 'ol/events/condition';
import { getDistance } from 'ol/sphere';
import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading
import { requestPost } from "@/js/dai/request";
@ -48,10 +57,6 @@ let iconSource; // icon
let select;//
//url
let polygonColorArray = [
'rgba(210, 2, 2, 0.24)',
'rgba(43, 231, 253, 0.25)',
@ -59,21 +64,20 @@ let polygonColorArray = [
];
//
//
var polygonStyleFunction = (function () {
return function (feature) {
return new Style({
fill: new Fill({
// color: [255, 255, 255, 0.3]
color: polygonColorArray[feature.values_.index - 1]
color: feature.values_.fillColor
}),
stroke: new Stroke({
color: polygonColorArray[feature.values_.index - 1],
width: 3
color: feature.values_.color,
width: 2
}),
text: createTextStyle(feature)
// text: createTextStyle(feature)
});;
};
})()
@ -85,7 +89,8 @@ const vueGis = {
centerPoint: [],//
zoom: 14,//14
minZoom: 1,//
overlay: null,
showPopup: false,
mapInfo: {
},
@ -134,6 +139,7 @@ const vueGis = {
//icon
iconUrlArray: [],
iconTextColor: '#ffffff',
distanceMax: null,//
}
},
@ -142,14 +148,15 @@ const vueGis = {
},
methods: {
//
loadMap (mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray, iconTextStyle) {
//:icon
loadMap (mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray, iconTextStyle, distanceMax) {
this.mapInfo = mapInfo
this.polygonArray = polygonArray
this.polIconUrlArray = polIconUrlArray
this.iconArrays = iconArrays
this.iconUrlArray = iconUrlArray
this.iconTextStyle = iconTextStyle
this.distanceMax = distanceMax
//
this.initMap()
@ -174,6 +181,13 @@ const vueGis = {
this.loadIcon()
}
if (this.isAddOpenlay) {
//icon
this.addOverlay()
}
this.addMapClick()
},
@ -203,26 +217,22 @@ const vueGis = {
//
loadPolygon () {
polygonSource.clear()//
let featureData = []//
if (polygonArray && polygonArray.length > 0) {//
if (this.polygonArray && this.polygonArray.length > 0) {//
let oneData = {}
polygonArray.forEach(polygonItem => {
this.polygonArray.forEach(polygonItem => {
if (polygonItem.coordinates && polygonItem.coordinates !== '') {//
let urlNum = this.getRndBetween(1, 3)
oneData = {
type: 'Feature',
id: polygonItem.id,
properties: {
id: polygonItem.id,
level: polygonItem.level,
name: polygonItem.name,
index: urlNum//
},
properties: { ...polygonItem },
geometry: {
type: 'Polygon',
coordinates: [],
@ -231,19 +241,19 @@ const vueGis = {
let coorArray = polygonItem.coordinates.split(',')//
let itemArray = []//[lon,lat]
let polygonArray = []//[[lon,lat],[lon,lat],[lon,lat]]
let tempPolygonArray = []//[[lon,lat],[lon,lat],[lon,lat]]
coorArray.forEach((item, index) => {
itemArray.push(item)
if (index % 2 == 0) {//
} else {//
polygonArray.push(itemArray)
tempPolygonArray.push(itemArray)
itemArray = []
}
});
oneData.geometry.coordinates.push(polygonArray)
oneData.geometry.coordinates.push(tempPolygonArray)
featureData.push(oneData)
}
});
@ -306,11 +316,12 @@ const vueGis = {
//icon
loadIcon () {
iconSource.clear()//
if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = [];
let iconArraysNew = []
this.iconArrays.forEach((oneIcon, index) => {
let urlNum = this.getRndBetween(1, 3)
//
let iconItem = new Feature({
geometry: new Point([oneIcon.longitude, oneIcon.latitude]),
@ -332,7 +343,16 @@ const vueGis = {
});
iconItem.setStyle(iconStyle);
iconFeatures.push(iconItem);
if (this.distanceMax) {
if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) {
iconFeatures.push(iconItem);
}
} else {
iconFeatures.push(iconItem);
}
});
@ -353,6 +373,20 @@ const vueGis = {
},
//
computedDistance (lon, lat, max) {
let c1 = [2]; c1[0] = lon; c1[1] = lat;
let distance = getDistance(this.centerPoint, c1);
console.log(distance)
return (distance < max || distance === max)
// debugger
// return
// var wgs84Sphere = new ol.Sphere(6378137);
// wgs84Sphere.haversineDistance([120.21592590991689, 30.210793016606],[120.21670777384473, 30.211168525868086]);
},
//
initMap () {
this.setMapLocation()
@ -385,21 +419,8 @@ const vueGis = {
//map
})
let that = this
map.on('singleclick', function (e) {
const feature = map.forEachFeatureAtPixel(e.pixel, function (feature) {
return feature;
});
if (feature) {
console.log(feature)
that.$emit('clickFeature', feature)
}
})
//
const dblClickInteraction = map
.getInteractions()
@ -434,7 +455,6 @@ const vueGis = {
},
//
initPolygonLayer () {
polygonSource = new VectorSource({
@ -522,6 +542,83 @@ const vueGis = {
// });
},
//
addOverlay () {
// 使 DOM
var container = document.getElementById("popup");
var closer = document.getElementById("popup-closer");
var content = document.getElementById("popup-content");
// Overlay
this.overlay = new Overlay({
element: container, // Overlay DOM
autoPan: true, //
autoPanAnimation: {
duration: 250 // 9
},
zIndex: 100
});
// map
map.addOverlay(this.overlay);
let _that = this;
/**
* 为弹窗添加一个响应关闭的函数
*/
closer.onclick = function () {
_that.overlay.setPosition(undefined);
closer.blur();
return false;
};
},
//
addMapClick () {
let _that = this
map.on("click", function (evt) {
const feature = map.forEachFeatureAtPixel(evt.pixel, function (feature) {
return feature;
});
if (feature) {
console.log(feature)
if (_that.clickType === 'back') {
_that.$emit('clickFeature', feature)
} else if (_that.clickType === 'popup') {
_that.$emit('clickFeature', feature)
// _that.overlay.getElement().parentNode.style.display = 'block'
// _that.overlay.getElement().parentNode.parentNode.style.display = 'block'
// content.innerHTML = `
// <p></p>
// <p><p><code> </code> <p>
// <p></p>X&nbsp;&nbsp; Y: `;
// _that.overlay.setPosition(evt.coordinate); // overlay x,y
} else {
console.log('此处没有标注')
}
}
});
},
handleShowPopup (showData, coordinate) {
console.log(this.overlay.getElement())
this.overlay.getElement().style.display = 'block'
this.overlay.getElement().parentNode.style.display = 'block'
this.overlay.getElement().parentNode.parentNode.style.display = 'block'
var content = document.getElementById("popup-content");
content.innerHTML = showData;
this.overlay.setPosition(coordinate); // overlay x,y
},
//
getRndBetween (lowerLimit, upperLimit) {
@ -562,6 +659,17 @@ const vueGis = {
showIconLayer: {
type: Boolean,
default: false
},
//
isAddOpenlay: {
type: Boolean,
default: false
},
//,back:popup:
clickType: {
type: String,
default: 'back'
}
},
@ -603,4 +711,51 @@ export default vueGis;
.ol-overlaycontainer-stopevent {
display: none;
}
.ol-popup {
position: absolute;
background-color: #1257c9;
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
padding: 15px;
border-radius: 10px;
border: 1px solid #1257c9;
bottom: 12px;
left: -50px;
text-align: left;
}
.ol-popup:after,
.ol-popup:before {
top: 100%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.ol-popup:after {
border-top-color: 1257c9;
border-width: 10px;
left: 48px;
margin-left: -10px;
}
.ol-popup:before {
border-top-color: #1257c9;
border-width: 11px;
left: 48px;
margin-left: -11px;
}
.ol-popup-closer {
text-decoration: none;
position: absolute;
top: 2px;
right: 8px;
}
.popup-content {
width: 300px;
}
.ol-popup-closer:after {
content: "✖";
color: rgba(1, 17, 104, 1);
}
</style>

34
src/views/modules/visual/components/screen-nodata/index.vue

@ -0,0 +1,34 @@
<template>
<div class="empty">
<div class="icon"></div>
</div>
</template>
<script>
export default {
data () {
return {}
},
methods: {}
}
</script>
<style scoped lang="scss" rel="stylesheet/scss">
.empty {
width: 100%;
height: calc(100% - 37px);
margin: 15px 0;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 100%;
height: 160px;
background: url("../../../../../assets/img/modules/visual/noData.png")
no-repeat;
background-size: contain;
background-position: 50% 50%;
}
}
</style>

3
src/views/modules/visual/components/screen-table/index.vue

@ -251,6 +251,9 @@ export default {
text-align: center;
width: calc(100% / 5);
cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
.more {
font-size: 18px;
font-weight: 400;

588
src/views/modules/visual/cpts/analyse.vue

@ -0,0 +1,588 @@
<template>
<div class="analyse-container">
<div class="analyse-wr list-wr">
<div class="analys-col">
<div class="analys-family">
<div class="family-title">(家属)</div>
<div v-for="(item, index) in userList"
:key="index"
class="family-item"
@click="handleUser(item)">{{item.icUserName}}</div>
<!-- <div class="family-item">王亚男哈</div>
<div class="family-item">王亚男</div>
<div class="family-item">王亚男哈</div>
<div class="family-item">王亚</div> -->
</div>
</div>
<div class="analys-col">
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/zuo@2x.png" />
</div>
<div class="analys-col">
<div class="analys-person">
<div class="personal-name">{{userName}}</div>
<div class="personal-tips">(案件居民)</div>
</div>
</div>
<template v-if="hasEvent">
<div class="analys-col analys-col-posi">
<img class="analys-up"
src="../../../../assets/img/shuju/measure/up-right.png" />
<img class="analys-up analys-down"
src="../../../../assets/img/shuju/measure/down-right.png" />
</div>
<div class="analys-col">
<div class="cate-list cate-list-more">
<div class="cate-row">
<div class="analys-col">
<div class="analys-cate"
@click="handleTabs('group')">
<div class="label">{{ singleTitle }}</div>
<div class="tips">(反应渠道)</div>
<div class="icon">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div>
</div>
</div>
<div v-if="sourceTab === 'group'"
class="analys-col">
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
</div>
<div class="cate-row">
<div class="analys-col">
<div class="analys-cate"
@click="handleTabs('event')">
<div class="label">{{ moreTitle }}</div>
<div class="tips">(反应渠道)</div>
<div class="icon">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div>
</div>
</div>
<div v-if="sourceTab === 'event'"
class="analys-col">
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
</div>
</div>
</div>
<div class="analys-col analys-col-wr analys-col-more list-wr"
id="scroll-wr">
<div class="cate-list cate-list-child">
<div v-for="(item, index) in tempList"
:key="index"
class="cate-row">
<div class="cate-col">
<div class="analys-cate">
<div class="label">{{item.categoryName}}</div>
<div class="tips">(同类案件)</div>
<div class="icon"
@click="handleShow(item)">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div>
</div>
</div>
<div class="cate-col cate-col-arrow">
<img v-show="item.showItem"
class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
<div class="cate-col cate-col-w100">
<div class="cate-list-w0"
:class="item.showItem && 'cate-list-w100'">
<div class="list list-wr">
<template v-if="item.projectList && item.projectList.length > 0">
<div v-for="(n, i) in item.projectList"
:key="i"
class="item"
@click="handleProject(n)">
<div class="item-status"
:class="'item-status-'+n.status">{{filterStatus(n.status)}}</div>
<div class="item-content">{{n.title}}</div>
</div>
</template>
<div v-else class="no-data">暂无数据</div>
<!-- <div class="item">
<div class="item-status">已结案</div>
<div class="item-content">合肥路与安宁路交合肥路与安宁路交</div>
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<template v-else>
<div class="analys-col">
<img class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
<div class="analys-col">
<div class="analys-cate">
<div class="label">{{ singleTitle }}</div>
<div class="tips">(反应渠道)</div>
<!-- <div class="icon">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div> -->
</div>
</div>
<div class="analys-col">
<img v-if="tempList.length > 1"
class="analys-up"
src="../../../../assets/img/shuju/measure/up-right.png" />
<img v-if="tempList.length != 2"
class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
<img v-if="tempList.length > 1"
class="analys-up analys-down"
src="../../../../assets/img/shuju/measure/down-right.png" />
</div>
<div class="analys-col list-wr"
:class="tempList.length > 2 && 'analys-col-wr' || 'analys-single'"
:style="'padding-top:' + (tempList.length - 3) * 190 + 'px;'">
<div class="cate-list">
<div v-for="(item, index) in tempList"
:key="index"
class="cate-row">
<div class="cate-col">
<div class="analys-cate">
<div class="label">{{item.categoryName}}</div>
<div class="tips">(同类案件)</div>
<div class="icon"
@click="handleShow(item)">
<img src="../../../../assets/img/shuju/measure/gantanhao.png" />
</div>
</div>
</div>
<div class="cate-col cate-col-arrow">
<img v-show="item.showItem"
class="analys-arrow"
src="../../../../assets/img/shuju/measure/you@2x.png" />
</div>
<div class="cate-col cate-col-w100">
<div class="cate-list-w0"
:class="item.showItem && 'cate-list-w100'">
<div class="list list-wr">
<template v-if="item.projectList && item.projectList.length > 0">
<div v-for="(n, i) in item.projectList"
:key="i"
class="item"
@click="handleProject(n)">
<div class="item-status"
:class="'item-status-'+n.status">
{{ n.statusName || filterStatus(n.status)}}
</div>
<div class="item-content">{{n.title}}</div>
</div>
</template>
<div v-else class="no-data">暂无数据</div>
<!-- <div class="item">
<div class="item-status">已结案</div>
<div class="item-content">合肥路与安宁路交合肥路与安宁路交</div>
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
</template>
<script>
// singleList: [
// {
// categoryName: '',
// categoryCode: '1',
// showItem: true,
// projectList: [
// {
// title: '',
// status: 'closed',
// statusName: '',
// projectId: '1'
// }
// ]
// }
// ]
export default {
name: 'Analyse',
props: {
hasEvent: {
type: Boolean, // true
default: false
},
moreTitle: String, // hasEvent true
moreList: Array, // hasEvent true
singleTitle: { //
type: String,
default: '楼院小组'
},
userList: Array, //
userName: String, //
singleList: Array, //
},
data () {
return {
sourceTab: 'group',
tempList: []
}
},
created () {
this.tempList = [...this.singleList]
},
methods: {
filterStatus (status) {
const statusObj = {
pending: '待处理',
closed: '已结案'
}
return statusObj[status]
},
handleTabs (type) {
if (type === 'group') this.tempList = [...this.singleList]
else if (type === 'event') this.tempList = [...this.moreList]
this.sourceTab = type
const _dom = document.getElementById('scroll-wr')
_dom.scrollTop = 0
},
handleProject (item) {
this.$emit('project', item)
},
handleUser (item) {
this.$emit('user', item)
},
handleShow (item) {
item.showItem = !item.showItem
}
}
}
</script>
<style lang="scss" scoped>
.analyse-container {
color: #fff;
.analyse-wr {
display: flex;
align-items: center;
width: 100%;
max-height: 560px;
box-sizing: border-box;
overflow: auto;
.analys-col {
position: relative;
cursor: pointer;
.analys-family {
text-align: center;
.family-title {
margin-bottom: 8px;
}
.family-item {
width: 76px;
box-sizing: border-box;
margin-bottom: 28px;
padding: 8px 0;
font-size: 14px;
color: #fff;
text-align: center;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257c9;
border-radius: 2px;
box-shadow: 0 0 5px 2px rgba(18, 87, 201, 1) inset;
}
}
.analys-up {
display: block;
width: 64px;
height: 99px;
box-sizing: border-box;
margin-bottom: 85px;
}
.analys-down {
margin-top: 85px;
margin-bottom: 0;
}
.analys-arrow {
display: block;
width: 32px;
height: 18px;
box-sizing: border-box;
margin: 0 6px;
}
.analys-person {
width: 154px;
height: 152px;
box-sizing: border-box;
padding-top: 60px;
color: #fff;
text-align: center;
background: url("../../../../assets/img/shuju/measure/zhuhu@2x.png")
no-repeat center;
background-size: cover;
.personal-name {
font-size: 18px;
font-weight: 500;
}
.personal-tips {
margin-top: 6px;
font-size: 14px;
}
}
.analys-cate {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
width: 120px;
min-height: 64px;
box-sizing: border-box;
padding: 14px 20px;
text-align: center;
color: #fff;
cursor: pointer;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257c9;
border-radius: 4px;
box-shadow: 1px 1px 10px 5px rgba(18, 87, 201, 1) inset;
.label {
font-size: 18px;
font-weight: 500;
}
.tips {
margin-top: 6px;
font-size: 14px;
}
.icon {
position: absolute;
right: 4px;
bottom: 4px;
width: 12px;
height: 12px;
img {
display: block;
width: 100%;
height: 100%;
}
}
}
.cate-list {
// padding-top: 200px;
// display: flex;
// flex-direction: column;
// justify-content: space-between;
.cate-row {
display: flex;
align-items: center;
margin-bottom: 20px;
// margin-top: 0;
.cate-col-arrow {
width: 32px;
height: 18px;
// box-sizing: border-box;
margin: 0 6px;
.analys-arrow {
display: block;
width: 32px;
height: 100%;
box-sizing: border-box;
margin: 0 auto;
}
}
.cate-col-w100 {
width: 230px;
.cate-list-w0 {
width: 0;
transition: width 0.2s;
overflow: hidden;
// border: 0;
// padding: 0;
}
.cate-list-w100 {
width: 230px;
// padding: 4px 14px 10px;
// // background: rgba(255, 255, 255, 0);
// border: 1px solid #1257C9;
// overflow: auto;
transition: width 0.2s;
}
}
}
}
.cate-list-more {
// padding-top: 300px;
.cate-row {
margin-bottom: 200px;
// margin-top: 0;
}
.cate-row:last-child {
margin-bottom: 0;
}
}
.cate-list-child {
padding-top: 60px;
}
.list {
width: 230px;
height: 165px;
box-sizing: border-box;
padding: 4px 14px 10px;
background: rgba(255, 255, 255, 0);
border: 1px solid #1257c9;
overflow: auto;
border-radius: 4px;
box-shadow: 1px 1px 10px 5px rgba(18, 87, 201, 1) inset;
.item {
display: flex;
align-items: center;
width: 100%;
box-sizing: border-box;
padding: 8px 0;
color: #fff;
border-bottom: 1px dashed rgba(131, 152, 217, 1);
.item-status {
min-width: 50px;
// height: 15px;
box-sizing: border-box;
margin-right: 8px;
padding: 4px 0 2px;
font-size: 10px;
text-align: center;
// line-height: 15px;
background: #0c5cfe;
border-radius: 2px;
&-pending,
&-canceled {
background: rgba(224, 84, 0, 1);
}
&-assigned,
&-have_order {
background: rgba(9, 163, 125, 1);
}
}
.item-content {
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
}
}
.analys-col-wr {
height: 100%;
box-sizing: border-box;
padding-right: 30px;
overflow: auto;
}
.analys-col-more {
height: 560px;
}
.analys-single {
.list {
height: 235px;
}
.cate-list {
.cate-row {
margin-bottom: 0;
}
}
}
.analys-col-posi {
// .analys-up, .analys-down {
// position: absolute;
// }
.analys-up {
// top: -200px;
// left: -30px;
// margin-bottom: 160px;
}
.analys-down {
// margin-top: 160px;
// margin-bottom: 0;
// top: unset;
// bottom: -200px;
// left: -30px;
}
}
}
}
.no-data {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
color: #fff;
text-align: center;
line-height: 100%;
}
.pad10 {
padding-top: 10px;
}
.list-wr::-webkit-scrollbar {
width: 8px;
// background: linear-gradient(270deg, #0063FE, #0095FF);
}
.list-wr::-webkit-scrollbar-corner,
/* 滚动条角落 */
.list-wr::-webkit-scrollbar-thumb,
.list-wr::-webkit-scrollbar-track {
/*滚动条的轨道*/
border-radius: 4px;
}
.list-wr::-webkit-scrollbar-corner,
.list-wr::-webkit-scrollbar-track {
/* 滚动条轨道 */
background: rgba(12, 129, 254, 0.24);
// box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5);
}
.list-wr::-webkit-scrollbar-thumb {
/* 滚动条手柄 */
background: linear-gradient(270deg, #0063fe, #0095ff);
}
</style>

222
src/views/modules/visual/cpts/line-chart.vue

@ -0,0 +1,222 @@
<template>
<div class="m-chart">
<canvas id="myChart" :width="width" :height="height" />
</div>
</template>
<script>
import nextTick from "dai-js/tools/nextTick";
// iosbug
const fontFamily = "PingFang SC";
const fontSize = 14;
let chart;
let srcData = [];
let textShapeList = [];
const addTextShape = () => {
if (textShapeList.length > 0) {
textShapeList.forEach((item) => {
item.remove(true);
});
textShapeList = [];
}
// 线
const canvas = chart.get("canvas");
const group = canvas.addGroup();
const shapes = {};
function addFn(list) {
const listLength = list.length;
list.forEach(function (obj, index) {
//
if (listLength > 7 && index > 0 && index < listLength - 1) {
if (index % Math.ceil(listLength / 5) != 0) {
return;
}
}
const offsetX = 6;
const offsetY = 1;
const point = chart.getPosition(obj);
const text = group.addShape("text", {
attrs: {
x: obj.type === "支持" ? point.x + 2 * offsetX : point.x - offsetX,
y: point.y + offsetY,
text: obj.value,
textAlign: "center",
textBaseline: "bottom",
fill: "#333",
fontWeight: 500,
fontFamily,
fontSize,
},
});
textShapeList.push(text); // shape, 便
});
}
srcData.sort((a, b) => {
return new Date(a.date).getTime() - new Date(b.date).getTime();
});
let supData = srcData.filter((item) => item.type == "支持");
let oppData = srcData.filter((item) => item.type == "反对");
addFn(supData);
addFn(oppData);
};
const iniChart = function (config, srcData) {
chart = new window.F2.Chart({
id: "myChart",
...config,
});
const supColor = "#FFDA0E";
const oppColor = "#00E5ED";
chart.source(srcData, {
date: {
range: [0, 1],
type: "timeCat",
mask: "MM-DD",
},
value: {
// type: "linear",
},
});
//
chart.axis("date", {
line: {
lineWidth: 1,
stroke: "#E7EEEE",
},
label: {
fontWeight: 500,
fontSize,
fill: "#B5B7BF",
textBaseline: "middle",
},
labelOffset: 25,
country: {
range: [0.1, 0.9], // range 使
},
grid: null,
});
chart.axis("value", {
line: {
lineWidth: 1,
stroke: "#E7EEEE",
},
labelOffset: 20,
label: {
fontWeight: 500,
fontSize,
fill: "#B5B7BF",
},
});
//
chart.legend({
position: "bottom",
align: "center",
offsetY: -30,
custom: true,
nameStyle: {
fill: "#999",
fontWeight: 500,
fontSize,
},
itemWidth: 150,
wordSpace: 25,
items: [
{
name: "支持",
marker(x, y, r, ctx) {
ctx.lineWidth = 10;
ctx.strokeStyle = supColor;
ctx.moveTo(x - r - 15, y);
ctx.lineTo(x + r + 15, y);
ctx.stroke();
ctx.fill();
},
},
{
name: "反对",
marker(x, y, r, ctx) {
ctx.lineWidth = 10;
ctx.strokeStyle = oppColor;
ctx.moveTo(x - r - 15, y);
ctx.lineTo(x + r + 15, y);
ctx.stroke();
ctx.fill();
},
},
],
});
// 线
chart
.line()
.position("date*value")
.color("type", (type) => {
if (type === "支持") {
return supColor;
}
return oppColor;
})
.style("type", {
lineWidth: 1,
})
.animate();
chart.render();
addTextShape();
// chart return
return chart;
};
export default {
name: "chart",
props: {
list: {
type: Array,
default: () => {
return [];
},
},
config: {
type: Object,
default: () => {
return {};
},
},
width: {
type: Number,
default: 400,
},
height: {
type: Number,
default: 260,
},
},
data() {
return {
iniLoading: false,
};
},
watch: {
list(data) {
chart.changeData(data);
srcData = data;
addTextShape();
},
},
async created() {
await nextTick(200);
iniChart(this.config, this.list);
await nextTick(200);
this.iniLoading = true;
},
};
</script>
<style lang="scss" scoped></style>

39
src/views/modules/visual/cpts/tb.vue

@ -21,9 +21,24 @@
<span v-if="typeof item === 'string' || typeof item === 'number'">{{
item
}}</span>
<span v-if="typeof item === 'object' && item.type == 'index'">{{
index + 1
}}</span>
<div v-if="typeof item === 'object' && item.type == 'index'">
<img
v-if="highlightTop3 && index == 0"
src="@/assets/img/shuju/top/1.png"
alt=""
/>
<img
v-else-if="highlightTop3 && index == 1"
src="@/assets/img/shuju/top/2.png"
alt=""
/>
<img
v-else-if="highlightTop3 && index == 2"
src="@/assets/img/shuju/top/3.png"
alt=""
/>
<span v-else>{{ index + 1 }}</span>
</div>
<a
v-else-if="typeof item === 'object' && item.type == 'operate'"
v-for="btn in item.list"
@ -42,10 +57,7 @@
<div class="table-status" v-if="list.length == 0 && !loading">
<div class="no-data">
<img
src="../../../../assets/img/modules/visual/noData.png"
class="no-data-img"
/>
<img src="@/assets/img/modules/visual/noData.png" class="no-data-img" />
</div>
</div>
</div>
@ -109,6 +121,10 @@ export default {
type: Boolean,
default: true,
},
highlightTop3: {
type: Boolean,
default: false,
},
},
data() {
return {};
@ -153,18 +169,21 @@ export default {
&-body {
box-sizing: border-box;
width: 100%;
font-size: 18px;
font-size: 16px;
font-weight: 400;
color: #ffffff;
&-tr {
box-sizing: border-box;
width: 100%;
height: 50px;
min-height: 50px;
.td {
text-align: center;
border: none;
padding: 10px 0;
a {
font-size: 18px;
font-size: 16px;
font-weight: 400;
color: #e4dc00;
position: relative;

309
src/views/modules/visual/heart/index.vue

@ -0,0 +1,309 @@
<template>
<div>
<div class="m-sizer">
<span>时间</span>
<el-date-picker
v-model="monthId"
type="month"
:clearable="false"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyyMM"
>
</el-date-picker>
</div>
<div class="g-cpt">
<div class="m-tb">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>公益达人</span>
</div>
<div class="tb">
<cpt-tb
:highlight-top3="true"
:col-list="tb3.colList"
:loading="tb3.loading"
:header="tb3.header"
:list="tb3.list"
></cpt-tb>
</div>
</cpt-card>
</div>
<div class="m-tb">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>党员先锋</span>
</div>
<div class="tb">
<cpt-tb
:highlight-top3="true"
:col-list="tb2.colList"
:loading="tb2.loading"
:header="tb2.header"
:list="tb2.list"
></cpt-tb>
</div>
</cpt-card>
</div>
<div class="m-tb">
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>动力网格</span>
</div>
<div class="tb">
<cpt-tb
:highlight-top3="true"
:col-list="tb1.colList"
:loading="tb1.loading"
:header="tb1.header"
:list="tb1.list"
></cpt-tb>
</div>
</cpt-card>
</div>
</div>
</div>
</template>
<script>
import { Loading } from "element-ui"; //Loading
import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import nextTick from "dai-js/tools/nextTick";
export default {
name: "heart",
data() {
return {
agencyId: "",
areaCode: "",
monthId: "",
// /
tb1: {
loading: true,
colList: [
{
align: "center",
width: "10%",
},
{
align: "center",
width: "60%",
},
{
align: "center",
width: "30",
},
],
header: ["序号", "网格名称", "活力值"],
list: [],
srcList: [],
currentIndex: 0,
},
// /
tb2: {
loading: true,
colList: [
{
align: "center",
width: "10%",
},
{
align: "center",
width: "30%",
},
{
align: "center",
width: "40%",
},
{
align: "center",
width: "20",
},
],
header: ["序号", "党员姓名", "所属网格", "积分总数"],
list: [],
srcList: [],
currentIndex: 0,
},
// /
tb3: {
loading: true,
colList: [
{
align: "center",
width: "10%",
},
{
align: "center",
width: "30%",
},
{
align: "center",
width: "40%",
},
{
align: "center",
width: "20",
},
],
header: ["序号", "居民姓名", "所属网格", "积分总数"],
list: [],
srcList: [],
currentIndex: 0,
},
};
},
props: {},
computed: {},
components: {
cptCard,
cptTb,
},
watch: {
monthId() {
this.getApiData();
},
},
async mounted() {
this.userId = this.uid;
await nextTick(100);
this.getApiData();
},
methods: {
handleSearch() {},
async getApiData() {
await this.getAgencyInfo();
this.getTb1();
this.getTb2();
this.getTb3();
},
toUserInfo(uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
},
//
async getAgencyInfo() {
const { data, code, msg } = await requestPost(
"/data/report/screen/agency/agencydetail-multic",
{
agencyId: this.$store.state.user.agencyId,
}
);
if (msg === "success" && code === 0) {
this.agencyId = data.agencyId;
this.areaCode = data.areaCode;
}
},
//
async getTb1() {
const { agencyId, areaCode } = this;
const url = "/data/report/screen/index/advancedbranchrank";
let params = {
agencyId,
areaCode,
monthId: this.monthId,
orgType: "agency",
topNum: 50,
};
const { data, code, msg } = await requestPost(url, params);
this.tb1.loading = false;
if (code === 0) {
this.tb1.list = data.map((item) => {
return [{ type: "index" }, item.name, item.scroe];
});
this.tb1.srcList = data;
} else {
this.$message.error(msg);
}
},
//
async getTb2() {
const { agencyId, areaCode } = this;
const url = "/data/report/screen/user/partypointrank";
let params = {
orgId: agencyId,
areaCode,
monthId: this.monthId,
orgType: "agency",
topNum: 50,
};
const { data, code, msg } = await requestPost(url, params);
this.tb2.loading = false;
if (code === 0) {
this.tb2.list = data.map((item) => {
return [
{ type: "index" },
item.userName,
item.gridName,
item.pointTotal,
];
});
this.tb2.srcList = data;
} else {
this.$message.error(msg);
}
},
//
async getTb3() {
const { agencyId, areaCode } = this;
const url = "/data/report/screen/user/userpointrank/withoutpartymember";
let params = {
orgId: agencyId,
areaCode,
monthId: this.monthId,
orgType: "agency",
topNum: 50,
};
const { data, code, msg } = await requestPost(url, params);
this.tb3.loading = false;
if (code === 0) {
this.tb3.list = data.map((item) => {
return [
{ type: "index" },
item.userName,
item.gridName,
item.pointTotal,
];
});
this.tb3.srcList = data;
} else {
this.$message.error(msg);
}
},
},
};
</script>
<style lang="scss" src="@/assets/scss/modules/visual/heart.scss" scoped></style>

305
src/views/modules/visual/measure/dialogInfo.vue

@ -0,0 +1,305 @@
<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="handleClose">
<img src="@/assets/img/shuju/people/close.png" />
</div>
<div class="list-title">需求内容</div>
<div class="list-wr">
<div class="list">
<div class="item-desc">
<!-- <span class="item-field">所属网格</span> -->
<span>{{ info.content }}</span>
</div>
<div class="item">
<span class="item-field">所属网格</span>
<span>{{ info.gridName }}</span>
</div>
<div class="item">
<span class="item-field">需求类型</span>
<span>{{ info.categoryName }}</span>
</div>
<div class="item">
<span class="item-field">需求状态</span>
<span>{{ info.statusName }}</span>
</div>
<div class="item">
<span class="item-field">上报类型</span>
<span>{{ info.reportTypeName }}</span>
</div>
<div class="item">
<span class="item-field"> </span>
<span>{{ info.reportUserName }}</span>
</div>
<div class="item">
<span class="item-field">上报人联系方式</span>
<span>{{ info.reportUserMobile }}</span>
</div>
<div class="item">
<span class="item-field">上报时间</span>
<span>{{ info.reportTime }}</span>
</div>
<div class="item">
<span class="item-field">服务时间</span>
<span>{{ info.wantServiceTime }}</span>
</div>
</div>
<div class="list">
<div class="item" v-if="info.serviceShowFlag">
<span class="item-field">服务方</span>
<span>{{ info.serviceShowName }}</span>
</div>
<template v-if="info.status == 'finished'">
<div class="item">
<span class="item-field">实际服务时间</span>
<span v-if="info.serviceStartTime"
>{{ info.serviceStartTime }} <br />
{{ info.serviceEndTime }}</span
>
</div>
<div class="item">
<span class="item-field">完成情况</span>
<span
>{{ info.finishResult == "resolved" ? "已解决" : "未解决" }}
<br />
{{ info.finishDesc }}</span
>
</div>
<div class="item">
<span class="item-field">评价</span>
<span>
<el-rate :value="info.score" disabled></el-rate>
</span>
</div>
</template>
</div>
</div>
<div class="tabs">
<div class="tab-btn">
<img src="@/assets/img/shuju/people/arrow-double-left.png" />
</div>
<div class="tab z-on">研判分析</div>
<div class="tab-btn">
<img src="@/assets/img/shuju/people/arrow-double-right.png" />
</div>
</div>
<div style="padding: 30px 0">
<analyse
v-if="!loading"
:single-list="demandList"
:single-title="'需求上报'"
:more-title="'事件上报'"
:user-list="userLists"
:user-name="info.demandUserName"
:has-event="false"
:more-list="eventList"
@project="handleToProject"
@user="handleToUser"
/>
</div>
</cpt-card>
</div>
</div>
</template>
<script>
import cptCard from "@/views/modules/visual/cpts/card";
import analyse from "../cpts/analyse.vue";
import { requestPost } from "@/js/dai/request";
export default {
name: "dialogInfo",
props: {
userId: {
type: String,
default: "",
},
demandId: String,
queryOrigin: String,
// info: Object,
},
components: {
cptCard,
analyse,
},
data() {
return {
loading: false,
info: {},
demandList: [
// {
// categoryName: '',
// categoryCode: '1',
// showItem: false,
// projectList: [
// {
// title: '',
// status: 'closed',
// projectId: '1'
// }
//
// ]
// },
],
userLists: [
// {
// homeId: "1",
// icUserId: "1",
// icUserName: "",
// }
],
userName: "王亚男哈",
eventList: [
// {
// categoryName: "",
// categoryCode: "1",
// projectList: [
// {
// title: "",
// status: "closed",
// projectId: "1",
// },
// ],
// },
]
};
},
async mounted() {
await this.getInfo(this.demandId);
},
methods: {
handleClose() {
this.$emit("close");
},
async getInfo(demandId) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = "/heart/userdemand/demandDetail";
let params = {
demandRecId: demandId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
// console.log('data-org----dict', data)
this.info = data;
this.getAnalyse(demandId);
} else {
this.$message.error(msg);
}
},
async getAnalyse(demandId) {
// const url = "/gov/org/customeragency/staffinagencylist";
this.loading = true;
const url = "/heart/userdemand/demand-research-analysis";
let params = {
firstCategoryCode: this.info.firstCategoryCode,
demandRecId: demandId,
icResiUserId: this.info.icResiUserId,
epmetUserIdList: [this.info.epmetUserId],
queryOrigin: this.queryOrigin,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log("data-org----a", data);
this.userLists = data.houseUserList.map((item) => {
return {
...item,
icUserId: item.icResiUserId,
};
});
this.demandList = data.demandData.map((item) => {
return {
...item,
showItem: true,
categoryName: item.firstCategoryName,
categoryCode: item.firstCategoryCode,
projectList: item.demandList.map((n) => {
return {
...n,
title: n.content,
status: n.status,
statusName: n.statusName,
projectId: n.demandRecId,
};
}),
};
});
console.log("demandList-dd", this.demandList);
} else {
this.$message.error(msg);
}
this.loading = false;
},
handleToProject(val) {
console.log("val---v", val);
this.getInfo(val.projectId);
},
handleToUser(val) {
console.log("val-uuu", val);
this.$router.push({
path: `/main-shuju/visual-basicinfo-people/${val.icUserId}`,
});
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/people.scss"
scoped
></style>
<style lang="scss" scoped>
.m-pop {
color: #fff;
.wrap {
.list {
display: block;
width: 50%;
.item {
display: flex;
width: 100%;
box-sizing: border-box;
margin-top: 0;
margin-bottom: 15px;
font-size: 16px;
cursor: pointer;
}
.item-desc {
font-size: 16px;
color: #fff;
margin-bottom: 10px;
line-height: 24px;
}
}
}
.list-title {
width: 100%;
box-sizing: border-box;
padding: 20px 0 10px 62px;
font-size: 20px;
color: #fff;
cursor: pointer;
}
}
.list-wr {
display: flex;
padding: 0 32px;
}
</style>

525
src/views/modules/visual/measure/service.vue

@ -4,26 +4,31 @@
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
全部网格<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>黄金糕</el-dropdown-item>
<el-dropdown-item>狮子头</el-dropdown-item>
<el-dropdown-item>螺蛳粉</el-dropdown-item>
<el-dropdown-item>双皮奶</el-dropdown-item>
<el-dropdown-item>蚵仔煎</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-cascader
v-model="selectAgency"
:options="propTree"
:props="{ checkStrictly: true }"
:show-all-levels="false"
clearable
@change="handleCascader">
</el-cascader>
</div>
<div class="title-time">
<div class="title-time-label">选择时间</div>
<div class="">
<el-date-picker
<div class="second-select">
<!-- <el-date-picker
v-model="value2"
type="month"
placeholder="选择月">
</el-date-picker> -->
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</div>
@ -111,12 +116,15 @@
<div class="echarts-container">
<div id="echartsBox" class="echarts-boxs"></div>
</div>
<div class="ecahrts-button">
<el-button type="warning" size="small" @click="handleExport">导出</el-button>
</div>
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"
@look="handleLook"
></screen-table>
<div class="pagination">
<el-pagination
@ -132,6 +140,12 @@
</div>
</div>
</cpt-card>
<dialog-info
v-if="showedMoreInfo"
:demandId="detailInfo.demandRecId"
:query-origin="'demand-analysis'"
@close="showedMoreInfo = false"
/>
</div>
</template>
@ -140,6 +154,8 @@ import { requestPost } from "@/js/dai/request";
import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
import dialogInfo from './dialogInfo'
import axios from 'axios'
import * as echarts from 'echarts';
export default {
@ -147,41 +163,61 @@ export default {
components: {
cptCard,
screenTable,
dialogInfo
},
data() {
return {
showedMoreInfo: false,
warningList: [],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "需求类型", coulmn: 'gridName' },
{ title: "具体内容", coulmn: 'buildingName' },
{ title: "上报情况", coulmn: 'neighborhoodName' },
{ title: "上报人", coulmn: 'residentNames' },
{ title: "上报时间", coulmn: 'residentNames' },
{ title: "是否认领", coulmn: 'residentNames' },
{ title: "认领方", coulmn: 'residentNames' },
{ title: "认领时间", coulmn: 'residentNames' }
{ title: "状态", coulmn: 'statusName' },
{ title: "所属网格", coulmn: 'gridName' },
{ title: "需求类型", coulmn: 'categoryName' },
{ title: "需求内容", coulmn: 'content' },
{ title: "上报类型", coulmn: 'reportTypeName' },
{ title: "上报人", coulmn: 'reportUserName' },
{ title: "上报时间", coulmn: 'reportTime' },
{ title: "需求人", coulmn: 'demandUserName' },
{ title: "服务方", coulmn: 'serviceName' },
{ title: "服务时间", coulmn: 'wantServiceTime' },
],
categoryList: [],
categoryCode: '',
timeRange: '',
tableData: [
// [1,'','','2',''],
],
reportDict: [],
selectAgency: '',
propTree: [],
value2: '',
visibleLoading: true,
pageNo: 1,
pageSize: 10,
total: 0,
activeIndex: 0,
activeLevel: "1",
detailInfo: {}
};
},
watch: {
timeRange(val) {
console.log('val-www', val)
if (!val) return false
this.handleCascader(this.selectAgency)
}
},
async mounted() {
this.initTime()
await nextTick(100);
this.initCharts()
await this.getAgencyList()
await this.getDict()
this.getServicePie(this.$store.state.user.agencyId, 'agency')
// this.initCharts()
// this.initChartType()
this.getBuildingwarnlist();
// this.getServiceList(this.$store.state.user.agencyId, 'agency');
},
methods: {
initCharts() {
initCharts(xData, yData) {
const eId = document.getElementById('echartsBox')
let _charts = echarts.init(eId)
@ -191,6 +227,38 @@ export default {
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
},
backgroundColor: 'transprant',
borderColor: 'transprant',
textStyle: {
color: '#fff'
},
formatter: params => {
let res;
let arr = []
let total = 0
const xName = params[0].axisValue
this.categoryList.forEach(item => {
if (item.categoryName === xName) {
arr = item.detail
total = item.total
}
})
let title = `<div style='margin-bottom: 10px;'><span>${xName}分类需求</span>${total}个</div>`
let desc = ''
let unit = '个'
arr.forEach(item => {
if (item.legendCode == 'volunteer') unit = '名'
else unit = '个'
if (item.legendCode == 'unfinished') {
desc += `<div><span>尚有 ${item.serviceDemandTotal} 个需求未完成</span></div>`
}else {
desc += `<div><span>共 ${item.totalService} ${unit} ${item.legendName} 完成需求 ${item.serviceDemandTotal} 个</span></div>`
}
})
res= title + desc
return res
}
},
legend: {
@ -209,9 +277,25 @@ export default {
xAxis: {
type: 'category',
axisLabel: {
color: '#fff'
color: '#fff',
interval: 0,
formatter: function(params) {
// const index = params.indexOf('#')
// const newParams = params.slice(0, index)
let newParamsName = params.length > 6 ? params.substring(0, 6) + '...' : params
return newParamsName
}
},
splitLine: {
show: false
},
splitArea: {
show: false
},
axisTick: {
interval: 0
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
data: xData
},
yAxis: {
type: 'value',
@ -223,132 +307,257 @@ export default {
},
// axisLine: false
},
series: [
{
name: '区域化党建单位',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [320, 302, 301, 334, 390, 330, 320]
},
{
name: '社会组织',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '社区自组织',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '志愿者',
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [150, 212, 201, 154, 190, 330, 410]
},
{
name: '未完成',
series: yData
};
option && _charts.setOption(option);
_charts.on('click', params => {
this.clickBar(params)
})
},
async getServicePie(orgId, orgType) {
const url = "/heart/userdemand/category-analysis";
let params = {
orgId,
orgType,
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
console.log('pie-data', data)
const { categoryList, legend } = data
this.categoryList = categoryList
let xData = categoryList.map(item => item.categoryName)
let yData = []
yData = legend.map((item, index) => {
return {
name: item.legendName,
type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
show: false
},
emphasis: {
focus: 'series'
focus: 'none'
},
data: [820, 832, 901, 934, 1290, 1330, 1320]
data: categoryList.map(n => {
return n.detail[index].serviceDemandTotal
})
}
]
};
option && _charts.setOption(option);
},
onClickList(index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
})
console.log('yData', yData)
this.initCharts(xData, yData)
this.categoryCode = categoryList[0].categoryCode
this.getServiceList(orgId, orgType, categoryList[0].categoryCode)
} else {
}
this.visibleLoading = false;
},
//
async getUserwarnlist() {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
async getServiceList(orgId, orgType, _code) {
const url = "/heart/userdemand/pagelist-analysis";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
orgId,
orgType,
pageNo: this.pageNo,
pageSize: this.pageSize,
categoryCode: _code || '',
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
tableData = data.list.map((item, index) => {
const status = {
pending: '待处理',
canceled: '已取消',
assigned: '已派单',
have_order: '已接单',
finished: '已完成',
}
// const type = {
// volunteer: '',
// social_org: '',
// community_org: '',
// party_unit: '',
// }
this.tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1,
residentNames: item.residentNames || "暂无"
statusName: status[item.status],
reportTypeName: this.reportDict.filter(n => n.value === item.reportType)[0].label,
index: index + 1
}
});
this.tableData = tableData;
this.total = data.total;
})
this.total = data.total
} else {
}
this.visibleLoading = false;
},
//
async getBuildingwarnlist() {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
async getAgencyList() {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('data-org----o', data)
this.selectAgency = [`${data.agencyId}-${data.level}`]
let arr = []
arr.push(data)
this.propTree = arr && this.getTreeData(arr)
} else {
this.$message.error(msg)
}
},
async getDict() {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/sys/dict/data/dictlist'
let params = {
agencyId: this.$store.state.user.agencyId,
dictType: 'user_demand_report_type',
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
console.log('data-org----dict', data)
this.reportDict = data
} else {
this.$message.error(msg)
}
},
handleExport() {
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
let params = {
orgId: _arr[0],
orgType: orgType,
categoryCode: this.categoryCode,
startDateId: this.timeRange && this.timeRange[0] || '',
endDateId: this.timeRange && this.timeRange[1] || ''
}
// .post('epmetuser/icresiuser/exportExcel', params)
axios({
url: window.SITE_CONFIG['apiURL'] + '/heart/userdemand/analysis-export',
// url: 'epmetuser/icresiuser/exportExcel',
method: 'post',
data: params,
responseType: 'blob'
})
.then(res => {
console.log('resllll', res)
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
var url = window.URL.createObjectURL(blob)
var aLink = document.createElement('a')
aLink.style.display = 'none'
aLink.href = url
aLink.setAttribute('download', fileName)
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink) //
window.URL.revokeObjectURL(url) //blob
})
.catch((err) => {
console.log('获取导出情失败', err)
return this.$message.error('网络错误')
})
},
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.subAgencyList) {
if (item.subAgencyList.length === 0) {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: undefined
}
} else _item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
} else {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
}
}
return _item
})
return arr
},
initTime() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
console.log('time-rtt', this.timeFormat(start), this.timeFormat(end))
this.timeRange = [this.timeFormat(start), this.timeFormat(end)]
},
timeFormat(date) {
if (!date || typeof date === 'string') {
return false
}
var y = date.getFullYear() //
var m = date.getMonth() + 1 //
if (m < 10) m = '0' + m
var d = date.getDate() //
if (d < 10) d = '0' + d
return y + '-' + m + '-' + d
},
clickBar(params) {
console.log('params---p', params)
let code = ''
this.categoryList.forEach(item => {
if (item.categoryName == params.name) code = item.categoryCode
})
if (code) {
this.categoryCode = code
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.pageNo = 1
this.getServiceList(_arr[0], orgType, code)
}
},
async handleLook(val) {
// this.detailId = val.id
this.detailInfo = val
// await this.getDetail(val.id)
this.showedMoreInfo = true
},
handleCascader(val) {
console.log('val-vvv', val)
if (val.length > 0) {
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServicePie(_arr[0], orgType)
}
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, this.categoryCode)
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.getUserwarnlist();
const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getServiceList(_arr[0], orgType, this.categoryCode)
},
},
};
@ -360,6 +569,9 @@ export default {
scoped
></style>
<style lang="scss" scoped>
.warning-box-bottom {
margin-top: 10px;
}
.card-title {
display: flex;
align-items: center;
@ -413,7 +625,67 @@ export default {
}
}
.title-label {
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 20px;
font-weight: 800;
color: #fff;
background: transparent;
border: 0;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
}
.second-select {
margin: 0 10px 0 0;
::v-deep .el-input {
width: 180px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-up:before {
content: "\e78f";
}
// .el-select__caret:before {
// content: '\E790'
// }
}
::v-deep .el-date-editor {
width: 360px;
position: relative;
background: #06186d;
border: 1px solid #1a64cc;
.el-range-input {
color: #fff;
background: #06186d;
}
.el-range-separator {
color: #fff;
}
.el-range__icon {
position: absolute;
right: 5px;
// float: right;
}
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
.card-echart {
display: flex;
margin-top: 40px;
@ -515,5 +787,14 @@ export default {
height: 400px;
}
.ecahrts-button {
width: 100%;
text-align: right;
::v-deep .el-button--warning {
background: linear-gradient(90deg, #0863EA, #3B9FFC);
border: 0;
}
}
</style>

411
src/views/modules/visual/measure/volunteer.vue

@ -14,13 +14,13 @@
<div class="card-count">
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.partyTotal || 0 }}</div>
<div class="card-count-label">党员数量</div>
</div>
</div>
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.resiTotal || 0 }}</div>
<div class="card-count-label">居民数量</div>
</div>
</div>
@ -40,13 +40,13 @@
<div class="card-count">
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.partyServiceTotal || 0 }}</div>
<div class="card-count-label">党员数量</div>
</div>
</div>
<div class="card-count-item">
<div class="card-count-content">
<div class="card-count-num">6500</div>
<div class="card-count-num">{{ vInfo.resiServiceTotal || 0 }}</div>
<div class="card-count-label">居民数量</div>
</div>
</div>
@ -71,34 +71,25 @@
</div>
</div>
<div class="map-tips">
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">调解员</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">调解员</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">能人达人</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">治安巡逻</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">代办员</div>
</div>
</div>
<div class="card-map">
<screen-map class="map"
ref="map"
@clickFeature="clickProject"
:showIconLayer="true"></screen-map>
@clickFeature="clickMapVolunteer"
:showIconLayer="true"
:clickType="'popup'"
:isAddOpenlay="true"></screen-map>
</div>
<div class="map-tips">
<div class="map-tips-item"
v-for="item in legendArray"
:key="item.optionValue">
<img class="title-icon"
:src="item.url" />
<div class="map-tips-label">{{item.optionLabel}}</div>
</div>
</div>
</cpt-card>
@ -148,58 +139,39 @@ export default {
//
isfirstInit: true,//
agencyInfo: {},//level
unitMapList: [],
unitMapList1: [
{
type: '党建楼宇',
name: '建联单位1',
latitude: 36.062227,
longitude: 120.389455,
},
{
type: '党建楼宇',
name: '建联单位2',
latitude: 36.082227,
longitude: 120.389455,
},
{
type: '机关直属部门',
name: '建联单位3',
latitude: 36.062227,
longitude: 120.379455,
},
{
type: '两新党建',
name: '建联单位4',
latitude: 36.082227,
longitude: 120.379455,
},
{
type: '辖区单位',
name: '建联单位5',
latitude: 36.092227,
longitude: 120.379455,
},
{
type: '其他',
name: '建联单位6',
latitude: 36.102227,
longitude: 120.379455,
}
distributionsList: [],
legendArray: [],
iconUrlArray: [
require('../../../../assets/img/shuju/volunteer1.png'),//
require('../../../../assets/img/shuju/volunteer2.png'),//
require('../../../../assets/img/shuju/volunteer3.png'),//
require('../../../../assets/img/shuju/volunteer4.png'),//
require('../../../../assets/img/shuju/volunteer5.png'),//
require('../../../../assets/img/shuju/volunteer6.png'),//
require('../../../../assets/img/shuju/volunteer7.png'),//
require('../../../../assets/img/shuju/volunteer8.png'),//
require('../../../../assets/img/shuju/volunteer9.png'),//
],
vPersonal: [],
vCount: [],
vpTotal: 0,
vcTotal: 0,
vInfo: {}
};
},
async mounted () {
await nextTick(100);
this.initCharts()
this.initCount()
this.getBuildingwarnlist();
this.getPie()
// this.initCharts()
// this.initCount()
await this.getWorkUserInfo()
await this.getMapUnitList()
},
methods: {
initCharts () {
initCharts (total, data) {
const eId = document.getElementById('echartService')
let _charts = echarts.init(eId)
let option = {
@ -215,7 +187,7 @@ export default {
}
},
title: {
text: '12000', //80%
text: total, //80%
subtext: '志愿者总数',
left: "center",
top: "center",
@ -248,29 +220,14 @@ export default {
}
},
data: [
{
value: 104,
name: '党员',
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
},
{
value: 735,
name: '居民',
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}
]
data: data
}
]
}
option && _charts.setOption(option);
},
initCount () {
initCount (total, data) {
const eId = document.getElementById('echartCount')
let _charts = echarts.init(eId)
let option = {
@ -286,7 +243,7 @@ export default {
}
},
title: {
text: '12000', //80%
text: total, //80%
subtext: '志愿者服务总数',
left: "center",
top: "center",
@ -322,82 +279,65 @@ export default {
}
},
data: [
{
value: 1048,
name: '党员',
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
},
{
value: 735,
name: '居民',
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}
]
data: data
}
]
}
option && _charts.setOption(option);
},
onClickList (index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
},
//
async getUserwarnlist () {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params);
async getPie () {
const url = "/data/report/heart/demand/volunteer/service";
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1,
residentNames: item.residentNames || "暂无"
console.log('data-ddd', data)
this.vInfo = data
const arr = [{
name: '党员数量',
value: data.partyTotal,
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
});
this.tableData = tableData;
this.total = data.total;
}, {
name: '居民数量',
value: data.resiTotal,
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}]
const arr1 = [{
name: '党员数量',
value: data.partyServiceTotal,
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
}, {
name: '居民数量',
value: data.resiServiceTotal,
temStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}]
this.vPersonal = [...arr]
this.vCount = [...arr1]
this.vpTotal = data.volunteerTotal
this.vcTotal = data.serviceTotal
this.initCharts(data.volunteerTotal, arr)
this.initCount(data.serviceTotal, arr1)
} else {
this.$message.error(msg)
}
},
//
async getBuildingwarnlist () {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
} else {
}
},
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
},
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getUserwarnlist();
},
//
@ -427,49 +367,58 @@ export default {
},
//
async getMapUnitList () {
// const url = "/heart/icpartyunit/distribution"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
const url = "/epmetuser/volunteer/distribution"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {
agencyId: this.$store.state.user.agencyId
customerId: this.$store.state.user.customerId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.unitMapList = data
this.unitMapList = this.unitMapList1
this.unitMapList.forEach(item => {
if (item.type === '党建楼宇') {
item.urlIndex = 0
} else if (item.type === '两新党建') {
item.urlIndex = 1
} else if (item.type === '辖区单位') {
item.urlIndex = 2
} else if (item.type === '机关直属部门') {
item.urlIndex = 3
} else if (item.type === '其他') {
item.urlIndex = 4
}
});
this.legendArray = data.legends
this.legendArray.forEach((legendTtem, index) => {
if (index < this.iconUrlArray.length) {
legendTtem.url = this.iconUrlArray[index]
} else {//
legendTtem.url = this.iconUrlArray[0]
}
this.iconUrlArray = [
require('../../../../assets/img/shuju/measure/ly@2x.png'),//
require('../../../../assets/img/shuju/measure/jgzs@2x.png'),//
require('../../../../assets/img/shuju/measure/lxdj@2x.png'),//
require('../../../../assets/img/shuju/measure/xq@2x.png'),//
require('../../../../assets/img/shuju/measure/qita.png')//
]
});
this.legendArray.push({
optionValue: 'other',
optionLabel: '其他',
url: this.iconUrlArray[8]
})
this.distributionsList = data.distributions
this.distributionsList.forEach(item => {
let typeShow = ''
if (item.volunteerCategories.length > 0) {
typeShow = item.volunteerCategories[0]
} else {
typeShow = 'other'
}
item.urlIndex = 0
for (let i = 0; i < this.legendArray.length; i++) {
if (typeShow === this.legendArray[i].optionValue) {
item.urlIndex = i
break;
}
}
});
console.log(this.distributionsList)
//false
this.loadMap()
this.isfirstInit = false
} else {
@ -483,7 +432,7 @@ export default {
loadMap () {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, null, null, this.unitMapList, this.iconUrlArray, null)
this.$refs.map.loadMap(this.agencyInfo, null, null, this.distributionsList, this.iconUrlArray, null)
} else {
this.$refs.map.refreshMap(null, this.unitMapList)
@ -491,8 +440,88 @@ export default {
},
//
clickProject (feature) {
async clickMapVolunteer (feature) {
console.log('标注信息', feature.values_.properties)
if (!feature.values_.properties.info.icResiUserId) {
return false
}
const info = feature.values_.properties.info
const url = "/epmetuser/icresiuser/resi-brief/" + info.icResiUserId
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let coordinate = [info.longitude, info.latitude]
data.gridName = data.gridName ? data.gridName : '--'
data.villageName = data.villageName ? data.villageName : '--'
data.icUserName = data.icUserName ? data.icUserName : '--'
data.mobile = data.mobile ? data.mobile : '--'
data.idCard = data.idCard ? data.idCard : '--'
data.birthday = data.birthday ? data.birthday : '--'
data.contacts = data.contacts ? data.contacts : '--'
data.contactsMobile = data.contactsMobile ? data.contactsMobile : '--'
data.isBdhjShow = data.isBdhj ? data.isBdhj === '0' ? '否' : '是' : '--'
data.genderShow = data.gender ? data.gender === '0' ? '女' : '男' : '--'
let categoriesArray = []
for (let key in data.volunteerCategories) {
categoriesArray.push(data.volunteerCategories[key])
}
if (categoriesArray.length > 0) {
data.categories = categoriesArray.join(',')
} else {
data.categories = '--'
}
let showData = `
<div style='font-size:16px; color:#FFFFFF;'>居民信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>所属网格
<span>`+ data.gridName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>所属小区
<span>`+ data.villageName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>本地户籍
<span>`+ data.isBdhjShow + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>姓名
<span>`+ data.icUserName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>手机
<span>`+ data.mobile + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>性别
<span>`+ data.genderShow + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>身份证号
<span>`+ data.idCard + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>出生日期
<span>`+ data.birthday + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系人
<span>`+ data.contacts + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系人手机
<span>`+ data.contactsMobile + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>志愿者类别
<span>`+ data.categories + `</span>
</div>
`
// console.log(showData)
this.$refs.map.handleShowPopup(showData, coordinate)
} else {
this.$message.error(msg)
}
},
},
};
@ -512,6 +541,7 @@ export default {
.card-wr:last-child {
margin-left: 20px;
}
padding: 25px 21px 15px 24px;
}
.card-title {
display: flex;
@ -519,10 +549,10 @@ export default {
cursor: pointer;
.title-icon {
display: block;
width: 46px;
height: 34px;
width: 36px;
height: 29px;
box-sizing: border-box;
margin-right: 6px;
margin-right: 3px;
}
.title-label {
font-size: 16px;
@ -620,15 +650,21 @@ export default {
.map-tips {
width: 100%;
display: flex;
// justify-content: center;
align-items: center;
flex-wrap: wrap;
padding-top: 10px;
padding-bottom: 20px;
box-sizing: border-box;
padding: 6px 0 0 100px;
// padding-top: 10px;
// padding-bottom: 10px;
.map-tips-item {
display: flex;
align-items: center;
margin-top: 20px;
margin-top: 10px;
margin-right: 40px;
.map-tips-icon {
width: 20px;
height: 10px;
@ -645,11 +681,14 @@ export default {
}
.card-wr-map {
height: calc(100vh - 110px);
// height: calc(100vh - 120px);
text-align: center;
.card-map {
margin-top: 10px;
width: 100%;
height: calc(100vh - 255px);
// height: calc(100vh - 285px);
height: calc(100vh - 315px);
.map {
width: 100%;

20
src/views/pages/login.vue

@ -182,6 +182,26 @@ export default {
const params = {
phone: this.dataForm.phone
}
// this.$http
// .post(url, params).then(({ data })=> {
// console.log('res--comll', data)
// if (data.data.length === 0) {
// //
// this.$message.error('')
// this.endLoading()
// } else if (data.data.length === 1) {
// this.selectCustomer(data.data[0])
// } else {
// this.endLoading()
// this.diaVisible = true
// this.$nextTick(() => {
// this.tableData = data.data
// })
// }
// }).catch((err) => {
// this.endLoading()
// this.$message.error(err)
// })
window.app.ajax.post(
url,
params,

Loading…
Cancel
Save