Browse Source

对了些接口,先提交一版

master
mk 2 years ago
parent
commit
2372d0657f
  1. 1
      .gitignore
  2. 2
      package.json
  3. 178
      src/api/bssbApi.js
  4. 23
      src/api/hulianApi.js
  5. BIN
      src/assets/icon/ansc.png
  6. BIN
      src/assets/icon/csgl.png
  7. BIN
      src/assets/icon/yjcz.png
  8. BIN
      src/assets/images/dlzz.png
  9. BIN
      src/assets/images/dyfc.png
  10. BIN
      src/assets/images/mapBg.png
  11. BIN
      src/assets/images/zzjg.png
  12. 161
      src/components/screen-title-dropdown-menu/index.vue
  13. 18
      src/components/screen-title/index.vue
  14. 932
      src/data/index.js
  15. 20
      src/utils/config.js
  16. 56
      src/utils/requestBssb.js
  17. 56
      src/utils/requestHl.js
  18. 112
      src/views/agencySelect.vue
  19. 17
      src/views/screenCenter/markerJson.json
  20. 266
      src/views/screenCenter/screenCenter.vue
  21. 3
      src/views/screenCenter/shibei.json
  22. 233
      src/views/screenLeft/left1.vue
  23. 11
      src/views/screenLeft/left2.vue
  24. 82
      src/views/screenLeft/left3.vue
  25. 60
      src/views/screenRight/lineOption.js
  26. 2
      src/views/screenRight/pieOption.js
  27. 185
      src/views/screenRight/right1.vue
  28. 373
      src/views/screenRight/right2.vue
  29. 348
      src/views/screenRight/right3.vue
  30. 14
      vue.config.js

1
.gitignore

@ -22,3 +22,4 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
dist.zip

2
package.json

@ -4,7 +4,9 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"dev": "vue-cli-service serve --port 8080",
"build": "vue-cli-service build",
"build:prod": "vue-cli-service build --mode production",
"lint": "vue-cli-service lint"
},
"dependencies": {

178
src/api/bssbApi.js

@ -0,0 +1,178 @@
import request from 'utils/requestBssb'
import config from 'utils/config'
const baseURL = config.screenBaseUrl
// 大屏-街道社区下拉
export function getOptionList(data) {
return request({
baseURL,
url: '/sys/screen/dept/option/list',
method: 'GET',
params: data
})
}
// 大屏-数据统计
export function getItemdailystatis(data) {
return request({
baseURL,
url: '/events/itemstatis/itemdailystatis',
method: 'POST',
data: data
})
}
// 大屏-类别分析
export function getCategoryAnalysis(data) {
return request({
baseURL,
url: '/events/itemScreen/categoryAnalysis',
method: 'GET',
params: data
})
}
// 大屏-汇总统计
export function getEventStat(data) {
return request({
baseURL,
url: '/events/screen/getEventStat',
method: 'POST',
data: data
})
}
// 大屏-事件&结案数统计柱状图
export function getEventBar(data) {
return request({
baseURL,
url: '/events/screen/getEventBar',
method: 'POST',
data: data
})
}
// 大屏-效能评价
export function getEfficiencyEvaluation(data) {
return request({
baseURL,
url: '/events/screen/getEfficiencyEvaluation',
method: 'POST',
data: data
})
}
// 大屏-满意度统计
export function getEvaluationTotal(data) {
return request({
baseURL,
url: '/events/itemScreen/evaluationTotal',
method: 'GET',
params: data
})
}
// 大屏-满意度趋势
export function getEvaluationTrend(data) {
return request({
baseURL,
url: '/events/itemScreen/evaluationTrend',
method: 'GET',
params: data
})
}
// 大屏-解决率统计
export function getResolveTotal(data) {
return request({
baseURL,
url: '/events/itemScreen/resolveTotal',
method: 'GET',
params: data
})
}
// 大屏-解决率趋势
export function getResolveTrend(data) {
return request({
baseURL,
url: '/events/itemScreen/resolveTrend',
method: 'GET',
params: data
})
}
// 大屏-响应率统计
export function getXylTotal(data) {
return request({
baseURL,
url: '/events/itemScreen/responseSixHoursTotal',
method: 'GET',
params: data
})
}
// 大屏-响应率趋势
export function getXylTrend(data) {
return request({
baseURL,
url: '/events/itemScreen/responseSixHoursTrend',
method: 'GET',
params: data
})
}
// 大屏-回复率统计
export function getHflTotal(data) {
return request({
baseURL,
url: '/events/itemScreen/replyTotal',
method: 'GET',
params: data
})
}
// 大屏-回复率趋势
export function getHflTrend(data) {
return request({
baseURL,
url: '/events/itemScreen/replyTrend',
method: 'GET',
params: data
})
}
// 难点事件
export function getItemPageList(data) {
return request({
baseURL,
url: '/events/itemScreen/responseSixHoursTotal',
method: 'GET',
params: data
})
}
// 数据统计-列表
export function getItemStatisListPage(data) {
return request({
baseURL,
url: '/events/item/getItemStatisListPage',
method: 'GET',
params: data
})
}
// 详情
export function getItemStatisListDetail(id) {
return request({
baseURL,
url: `/events/item/getItemStatisListDetail/${id}`,
method: 'GET'
})
}
// 获取地图点位
export function getItemListByAddress(data) {
return request({
baseURL,
url: '/events/item/getItemListByAddress',
method: 'GET',
params: data
})
}

23
src/api/hulianApi.js

@ -0,0 +1,23 @@
import request from 'utils/requestHl'
import config from 'utils/config'
const baseURL = config.hulianUrl
// 党员风采列表 入参agencyId: "1175270520603930625"pageNo: 1pageSize: 10
export function getDyfcList(data) {
return request({
baseURL,
url: '/resi/partymember/icpartymemberstyle/screen/showlist',
method: 'POST',
data: data
})
}
export function getIcpartyactivity(data) {
return request({
baseURL,
url: '/heart/icpartyactivity/screen/search',
method: 'POST',
data: data
})
}

BIN
src/assets/icon/ansc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/assets/icon/csgl.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/assets/icon/yjcz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/assets/images/dlzz.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 139 KiB

BIN
src/assets/images/dyfc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

BIN
src/assets/images/mapBg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/assets/images/zzjg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

161
src/components/screen-title-dropdown-menu/index.vue

@ -0,0 +1,161 @@
<template>
<div class="screen-dropdown-menu"
:style="{height: dropdownMenuVisible ? dataList.length > 4 ? '260px' : `${dataList.length * 50 }px` : '0px', opacity: dropdownMenuVisible ? '1' : '0', '--top': top }">
<div class="screen-dropdown-menu-border"
:style="{overflowY: dataList.length > 5 ? 'auto' : 'hidden'}">
<div :class="['screen-dropdown-menu-item', item.select ? 'screen-dropdown-menu-item-active' : '']"
@click.stop="onChooseItem(item)"
v-for="item in dataList"
:key="item.value">{{item.label}}</div>
</div>
<!-- <div class="screen-dropdown-menu-arrow"></div> -->
</div>
</template>
<script>
export default {
name: 'screen-dropdown-menu',
data () {
return {
dataList: [],
dropdownMenuVisible: true
}
},
props: {
menuList: {
type: Array,
required: true,
default: () => []
},
defaultSelected: {
type: String | Number,
default: () => ''
},
visible: {
type: Boolean,
default: () => false
},
top: {
type: String,
default: '60px'
}
},
watch: {
//
menuList: {
immediate: true,
handler: function (value) {
if (value.length > 0) {
value.forEach(item => {
item.select = false
})
this.dataList = value
}
}
},
// item
defaultSelected: {
immediate: true,
handler: function (value) {
this.dataList.forEach(item => {
if (item.value === value) {
item.select = true
}
})
}
},
//
visible: {
immediate: true,
handler: function (value) {
this.dropdownMenuVisible = value
}
}
},
methods: {
onChooseItem (item) {
this.dataList.forEach(data => {
if (data.value === item.value) {
data.select = true
} else {
data.select = false
}
})
this.$emit('onChooseItem', item)
this.dropdownMenuVisible = false
this.$emit('update:visible', false)
}
}
}
</script>
<style lang="scss" scoped>
.screen-dropdown-menu {
width: 100%;
position: absolute;
// box-shadow: 0 2px 12px 0 #5c7bc7;
border: 1px solid #00a4b9;
background: rgba(4, 39, 50, 0.8);
z-index: 100;
left: 0;
top: var(--top);
border-radius: 4px;
max-height: 260px;
transition: height 0.1s linear, opacity 0.1s linear;
&-border {
width: 100%;
height: 100%;
overflow-y: auto;
border-radius: 4px;
box-sizing: border-box;
// padding: 10px 0 0;
&::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
&::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
background: linear-gradient(-90deg, #09b8e5 0%, #09f0e3 99%);
border-radius: 3px;
}
&::-webkit-scrollbar-track {
/*滚动条里面轨道*/
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #428ba2;
border-radius: 3px;
}
}
&-item {
width: 100%;
height: 30px;
border-radius: 15px;
line-height: 50px;
text-align: left;
color: #fff;
font-size: 14px;
box-sizing: border-box;
padding: 0 12px;
&:hover {
color: #fff;
background: rgba(0, 205, 236);
}
}
.screen-dropdown-menu-item-active {
color: #fff;
background: rgba(0, 205, 236);
}
&-arrow {
position: absolute;
width: 0px;
height: 0px;
top: -12px;
left: 35px;
border: 6px solid transparent;
border-bottom: 6px solid #061a3b;
}
}
</style>

18
src/components/screen-title/index.vue

@ -1,19 +1,20 @@
<template>
<div class="screen-title">
<img v-if="type==='long'"
class="screen-title-image"
src="./../../assets/icon/title-content.png" />
<img v-else
class="screen-title-image"
src="./../../assets/icon/title-content-half.png" />
<div class="screen-title-name"> {{titleName}}</div>
<img v-if="type === 'long'" class="screen-title-image" src="./../../assets/icon/title-content.png" />
<img v-else class="screen-title-image" src="./../../assets/icon/title-content-half.png" />
<div class="screen-title-name"> {{ titleName }}
<slot >
</slot>
</div>
</div>
</template>
<script>
export default {
name: 'screen-title',
data () {
data() {
return {
dataList: [],
dropdownMenuVisible: true
@ -51,6 +52,7 @@ export default {
&-image {
height: 100%;
}
&-name {
position: absolute;
top: 10px;

932
src/data/index.js

@ -200,76 +200,870 @@ export function loadYtalList() {
export function loadXjphList() {
let xjphList = [
{
no: '1',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
},
{
no: '2',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
},
{
no: '3',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
},
{
no: '4',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
},
{
no: '5',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
},
{
no: '6',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
},
{
no: '7',
unit: '敦化路社区',
dys: 460,
hts: 1960,
yts: 1376,
sqs: 8760,
jal: '92.5%',
myl: '98.1%'
"closedCount": 5287,
"closedRatio": "",
"deptId": "1202770845325680641",
"deptLevel": "street_party",
"deptName": "大港街道",
"developClosedCount": 0,
"developCount": 1,
"eventCount": 5900,
"gridCommunityDealNum": 0,
"lawClosedCount": 6,
"lawCount": 6,
"livelihoodClosedCount": 5281,
"livelihoodCount": 5893,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 4874,
"closedRatio": "",
"deptId": "1202772380386418690",
"deptLevel": "street_party",
"deptName": "即墨路街道",
"developClosedCount": 6,
"developCount": 7,
"eventCount": 5104,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 4,
"livelihoodClosedCount": 4868,
"livelihoodCount": 5093,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2567,
"closedRatio": "",
"deptId": "1202773126666346497",
"deptLevel": "street_party",
"deptName": "辽宁路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 2776,
"gridCommunityDealNum": 0,
"lawClosedCount": 10,
"lawCount": 12,
"livelihoodClosedCount": 2557,
"livelihoodCount": 2764,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2861,
"closedRatio": "",
"deptId": "1202807417920118785",
"deptLevel": "street_party",
"deptName": "兴隆路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 4194,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 1,
"livelihoodClosedCount": 2861,
"livelihoodCount": 4193,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 1212,
"closedRatio": "",
"deptId": "1202807894611156993",
"deptLevel": "street_party",
"deptName": "延安路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 1384,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 1,
"livelihoodClosedCount": 1212,
"livelihoodCount": 1383,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2088,
"closedRatio": "",
"deptId": "1202808896642965506",
"deptLevel": "street_party",
"deptName": "湖岛街道",
"developClosedCount": 0,
"developCount": 2,
"eventCount": 2261,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 2088,
"livelihoodCount": 2259,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2166,
"closedRatio": "",
"deptId": "1202809196967714817",
"deptLevel": "street_party",
"deptName": "登州路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 2367,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 2166,
"livelihoodCount": 2367,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 3605,
"closedRatio": "",
"deptId": "1202809665031069697",
"deptLevel": "street_party",
"deptName": "水清沟街道",
"developClosedCount": 0,
"developCount": 1,
"eventCount": 3983,
"gridCommunityDealNum": 0,
"lawClosedCount": 16,
"lawCount": 20,
"livelihoodClosedCount": 3589,
"livelihoodCount": 3962,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 3008,
"closedRatio": "",
"deptId": "1202810125645340674",
"deptLevel": "street_party",
"deptName": "台东街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 3303,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 4,
"livelihoodClosedCount": 3008,
"livelihoodCount": 3299,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 3207,
"closedRatio": "",
"deptId": "1202832857363734529",
"deptLevel": "street_party",
"deptName": "阜新路街道",
"developClosedCount": 2,
"developCount": 3,
"eventCount": 3686,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 4,
"livelihoodClosedCount": 3205,
"livelihoodCount": 3679,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 3565,
"closedRatio": "",
"deptId": "1202861407361916929",
"deptLevel": "street_party",
"deptName": "四方街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 4078,
"gridCommunityDealNum": 0,
"lawClosedCount": 2,
"lawCount": 2,
"livelihoodClosedCount": 3563,
"livelihoodCount": 4076,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2299,
"closedRatio": "",
"deptId": "1202862725098987522",
"deptLevel": "street_party",
"deptName": "开平路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 2550,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 2299,
"livelihoodCount": 2550,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 1910,
"closedRatio": "",
"deptId": "1202863114506559489",
"deptLevel": "street_party",
"deptName": "宁夏路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 2121,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 1910,
"livelihoodCount": 2121,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 4772,
"closedRatio": "",
"deptId": "1202833155025100801",
"deptLevel": "street_party",
"deptName": "镇江路街道",
"developClosedCount": 0,
"developCount": 2,
"eventCount": 5227,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 4772,
"livelihoodCount": 5225,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 4168,
"closedRatio": "",
"deptId": "1202864568952774658",
"deptLevel": "street_party",
"deptName": "海伦路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 4606,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 2,
"livelihoodClosedCount": 4168,
"livelihoodCount": 4604,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2972,
"closedRatio": "",
"deptId": "1202865998832951297",
"deptLevel": "street_party",
"deptName": "敦化路街道",
"developClosedCount": 0,
"developCount": 1,
"eventCount": 3193,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 2972,
"livelihoodCount": 3192,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 855,
"closedRatio": "",
"deptId": "1202867167428960257",
"deptLevel": "street_party",
"deptName": "双山街道",
"developClosedCount": 0,
"developCount": 1,
"eventCount": 962,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 2,
"livelihoodClosedCount": 855,
"livelihoodCount": 959,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 4874,
"closedRatio": "",
"deptId": "1202833750767263745",
"deptLevel": "street_party",
"deptName": "洛阳路街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 5217,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 4874,
"livelihoodCount": 5217,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 4372,
"closedRatio": "",
"deptId": "1202868026502111233",
"deptLevel": "street_party",
"deptName": "辽源路街道",
"developClosedCount": 25,
"developCount": 13,
"eventCount": 4703,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 14,
"livelihoodClosedCount": 4347,
"livelihoodCount": 4676,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 1889,
"closedRatio": "",
"deptId": "1202869594882400257",
"deptLevel": "street_party",
"deptName": "河西街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 2045,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 0,
"livelihoodClosedCount": 1889,
"livelihoodCount": 2045,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 2680,
"closedRatio": "",
"deptId": "1202870413757341698",
"deptLevel": "street_party",
"deptName": "合肥路街道",
"developClosedCount": 23,
"developCount": 16,
"eventCount": 2995,
"gridCommunityDealNum": 0,
"lawClosedCount": 0,
"lawCount": 12,
"livelihoodClosedCount": 2657,
"livelihoodCount": 2967,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
},
{
"closedCount": 3251,
"closedRatio": "",
"deptId": "1202834397902233601",
"deptLevel": "street_party",
"deptName": "浮山新区街道",
"developClosedCount": 0,
"developCount": 0,
"eventCount": 3591,
"gridCommunityDealNum": 0,
"lawClosedCount": 5,
"lawCount": 7,
"livelihoodClosedCount": 3246,
"livelihoodCount": 3584,
"peopleNum": 0,
"redCount": 0,
"resolveCount": 0,
"resolveRatio": "",
"responseCount": 0,
"responseRatio": "",
"satisfiedCount": 0,
"satisfiedRatio": "",
"scheduleClosedCount": 0,
"scheduleClosedRatio": "",
"unAcceptCount": 0,
"yellowCount": 0
}
]
]
return xjphList
}
export function loadXjph1List(){
let xjphList = [
{
"closedCount": 4873,
"closedRatio": "95.5%",
"deptId": "1202772380386418690",
"deptLevel": "street_party",
"deptName": "即墨路街道",
"eventCount": 5104,
"responseCount": 5104,
"responseRatio": "100.0%",
"satisfiedCount": 4872,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 4873,
"closedRatio": "93.4%",
"deptId": "1202833750767263745",
"deptLevel": "street_party",
"deptName": "洛阳路街道",
"eventCount": 5217,
"responseCount": 5217,
"responseRatio": "100.0%",
"satisfiedCount": 4873,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 2972,
"closedRatio": "93.1%",
"deptId": "1202865998832951297",
"deptLevel": "street_party",
"deptName": "敦化路街道",
"eventCount": 3193,
"responseCount": 3190,
"responseRatio": "99.9%",
"satisfiedCount": 2970,
"satisfiedRatio": "99.9%"
},
{
"closedCount": 4372,
"closedRatio": "93.0%",
"deptId": "1202868026502111233",
"deptLevel": "street_party",
"deptName": "辽源路街道",
"eventCount": 4703,
"responseCount": 4703,
"responseRatio": "100.0%",
"satisfiedCount": 4370,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 2567,
"closedRatio": "92.5%",
"deptId": "1202773126666346497",
"deptLevel": "street_party",
"deptName": "辽宁路街道",
"eventCount": 2776,
"responseCount": 2774,
"responseRatio": "99.9%",
"satisfiedCount": 2551,
"satisfiedRatio": "99.4%"
},
{
"closedCount": 1889,
"closedRatio": "92.4%",
"deptId": "1202869594882400257",
"deptLevel": "street_party",
"deptName": "河西街道",
"eventCount": 2045,
"responseCount": 2044,
"responseRatio": "100.0%",
"satisfiedCount": 1889,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 2088,
"closedRatio": "92.3%",
"deptId": "1202808896642965506",
"deptLevel": "street_party",
"deptName": "湖岛街道",
"eventCount": 2261,
"responseCount": 2261,
"responseRatio": "100.0%",
"satisfiedCount": 2088,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 2166,
"closedRatio": "91.5%",
"deptId": "1202809196967714817",
"deptLevel": "street_party",
"deptName": "登州路街道",
"eventCount": 2367,
"responseCount": 2364,
"responseRatio": "99.9%",
"satisfiedCount": 2166,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 4772,
"closedRatio": "91.3%",
"deptId": "1202833155025100801",
"deptLevel": "street_party",
"deptName": "镇江路街道",
"eventCount": 5227,
"responseCount": 5218,
"responseRatio": "99.8%",
"satisfiedCount": 4772,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 3008,
"closedRatio": "91.1%",
"deptId": "1202810125645340674",
"deptLevel": "street_party",
"deptName": "台东街道",
"eventCount": 3303,
"responseCount": 3303,
"responseRatio": "100.0%",
"satisfiedCount": 3003,
"satisfiedRatio": "99.8%"
},
{
"closedCount": 4168,
"closedRatio": "90.5%",
"deptId": "1202864568952774658",
"deptLevel": "street_party",
"deptName": "海伦路街道",
"eventCount": 4606,
"responseCount": 4590,
"responseRatio": "99.7%",
"satisfiedCount": 4168,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 3251,
"closedRatio": "90.5%",
"deptId": "1202834397902233601",
"deptLevel": "street_party",
"deptName": "浮山新区街道",
"eventCount": 3591,
"responseCount": 3589,
"responseRatio": "99.9%",
"satisfiedCount": 3249,
"satisfiedRatio": "99.9%"
},
{
"closedCount": 3605,
"closedRatio": "90.5%",
"deptId": "1202809665031069697",
"deptLevel": "street_party",
"deptName": "水清沟街道",
"eventCount": 3983,
"responseCount": 3981,
"responseRatio": "99.9%",
"satisfiedCount": 3600,
"satisfiedRatio": "99.9%"
},
{
"closedCount": 2299,
"closedRatio": "90.2%",
"deptId": "1202862725098987522",
"deptLevel": "street_party",
"deptName": "开平路街道",
"eventCount": 2550,
"responseCount": 2549,
"responseRatio": "100.0%",
"satisfiedCount": 2299,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 1910,
"closedRatio": "90.1%",
"deptId": "1202863114506559489",
"deptLevel": "street_party",
"deptName": "宁夏路街道",
"eventCount": 2121,
"responseCount": 2109,
"responseRatio": "99.4%",
"satisfiedCount": 1909,
"satisfiedRatio": "99.9%"
},
{
"closedCount": 5287,
"closedRatio": "89.6%",
"deptId": "1202770845325680641",
"deptLevel": "street_party",
"deptName": "大港街道",
"eventCount": 5900,
"responseCount": 5900,
"responseRatio": "100.0%",
"satisfiedCount": 5287,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 2680,
"closedRatio": "89.5%",
"deptId": "1202870413757341698",
"deptLevel": "street_party",
"deptName": "合肥路街道",
"eventCount": 2995,
"responseCount": 2992,
"responseRatio": "99.9%",
"satisfiedCount": 2680,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 855,
"closedRatio": "88.9%",
"deptId": "1202867167428960257",
"deptLevel": "street_party",
"deptName": "双山街道",
"eventCount": 962,
"responseCount": 962,
"responseRatio": "100.0%",
"satisfiedCount": 855,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 1212,
"closedRatio": "87.6%",
"deptId": "1202807894611156993",
"deptLevel": "street_party",
"deptName": "延安路街道",
"eventCount": 1384,
"responseCount": 1384,
"responseRatio": "100.0%",
"satisfiedCount": 1211,
"satisfiedRatio": "99.9%"
},
{
"closedCount": 3564,
"closedRatio": "87.4%",
"deptId": "1202861407361916929",
"deptLevel": "street_party",
"deptName": "四方街道",
"eventCount": 4078,
"responseCount": 4070,
"responseRatio": "99.8%",
"satisfiedCount": 3564,
"satisfiedRatio": "100.0%"
},
{
"closedCount": 3207,
"closedRatio": "87.0%",
"deptId": "1202832857363734529",
"deptLevel": "street_party",
"deptName": "阜新路街道",
"eventCount": 3686,
"responseCount": 3684,
"responseRatio": "99.9%",
"satisfiedCount": 3200,
"satisfiedRatio": "99.8%"
},
{
"closedCount": 2861,
"closedRatio": "68.2%",
"deptId": "1202807417920118785",
"deptLevel": "street_party",
"deptName": "兴隆路街道",
"eventCount": 4194,
"responseCount": 4150,
"responseRatio": "99.0%",
"satisfiedCount": 2861,
"satisfiedRatio": "100.0%"
}
]
return xjphList
}

20
src/utils/config.js

@ -2,6 +2,7 @@ export default {
apiUrl: getApiUrl(), // 获取接口的baseURL
screenBaseUrl: getScreenBaseUrl(), // 获取接口转发的baseURL
shibeiConfig: getShibeiScreenConfig(), // 市北大屏高德地图配置
hulianUrl:getApiHulian(),
reproductionConfig: getReproductionConfig(), // 标准版大屏-演示版本高德地图配置
electronPackageurl: getElectronPackageUrl() // 客户端版本更新路径
}
@ -9,12 +10,12 @@ export default {
function getScreenBaseUrl() {
// 需要区分 客户端生产环境、web端生产环境、本地开发环境
if (process.env.VUE_APP_SCREEN === 'dev') {
return 'http://192.168.1.58:10001'
return 'https://epdc-shibei.elinkservice.cn/epdc-api'
} else if (
process.env.VUE_APP_SCREEN === 'prod' ||
process.env.NODE_ENV === 'production'
) {
return 'http://192.168.1.58:10001' // 生产机 域名地址
return 'https://epdc-shibei.elinkservice.cn/epdc-api' // 生产机 域名地址
} else {
return '/screenBaseUrl'
}
@ -28,7 +29,20 @@ function getApiUrl() {
process.env.VUE_APP_SCREEN === 'prod' ||
process.env.NODE_ENV === 'production'
) {
return 'http://192.168.1.58:10001/api' // 生产机 域名地址
return 'https://epdc-shibei.elinkservice.cn/ring-screen' // 生产机 域名地址
} else {
return '/api'
}
}
function getApiHulian() {
// 需要区分 客户端生产环境、web端生产环境、本地开发环境
if (process.env.NODE_ENV === 'development') {
return 'https://epdc-shibei.elinkservice.cn/api'
} else if (
process.env.VUE_APP_SCREEN === 'prod' ||
process.env.NODE_ENV === 'production'
) {
return 'https://epdc-shibei.elinkservice.cn/api' //市北互联平台
} else {
return '/api'
}

56
src/utils/requestBssb.js

@ -0,0 +1,56 @@
import axios from 'axios'
import config from './config'
import { Message } from 'element-ui'
// import { getCookie } from 'utils/cookie'
const request = axios.create({
baseURL: config.screenBaseUrl,
timeout: 60 * 1000
})
// 添加一个请求拦截器
request.interceptors.request
.use
// (config) => {
// if (getCookie('token')) {
// config.headers.Authorization = `Bearer ${getCookie('token')}`
// }
// return config
// },
// (err) => {
// return Promise.reject(err)
// }
()
// 添加一个响应拦截器
request.interceptors.response.use(
(response) => {
if (
(response.data.code === 0 && response.data.msg === 'success') ||
(response.data.code === 200 && response.data.msg === 'success') ||
(response.data.status === 200 && response.data.message === 'success')
) {
return response.data
} else {
if (response.data.code === 401) {
Message({
type: 'error',
message: response.data.msg
})
setTimeout(() => {
window.localStorage.removeItem('token')
// router.push({ path: '/login' })
}, 400)
return Promise.reject(new Error('error'))
} else {
return Promise.reject(response.data)
}
}
},
(err) => {
window.localStorage.removeItem('token')
return Promise.reject(err)
}
)
export default request

56
src/utils/requestHl.js

@ -0,0 +1,56 @@
import axios from 'axios'
import config from './config'
import { Message } from 'element-ui'
// import { getCookie } from 'utils/cookie'
const request = axios.create({
baseURL: config.hulianUrl,
timeout: 60 * 1000
})
// 添加一个请求拦截器
request.interceptors.request
.use
// (config) => {
// if (getCookie('token')) {
// config.headers.Authorization = `Bearer ${getCookie('token')}`
// }
// return config
// },
// (err) => {
// return Promise.reject(err)
// }
()
// 添加一个响应拦截器
request.interceptors.response.use(
(response) => {
if (
(response.data.code === 0 && response.data.msg === 'success') ||
(response.data.code === 200 && response.data.msg === 'success') ||
(response.data.status === 200 && response.data.message === 'success')
) {
return response.data
} else {
if (response.data.code === 401) {
Message({
type: 'error',
message: response.data.msg
})
setTimeout(() => {
window.localStorage.removeItem('token')
// router.push({ path: '/login' })
}, 400)
return Promise.reject(new Error('error'))
} else {
return Promise.reject(response.data)
}
}
},
(err) => {
window.localStorage.removeItem('token')
return Promise.reject(err)
}
)
export default request

112
src/views/agencySelect.vue

@ -1,35 +1,22 @@
<template>
<div class="agency-select"
style="margin-top:-107px;width: 100%">
<div class="name-item">{{cityName}}</div>
<div class="name-item">{{district.label}}</div>
<div class="item"
ref="street"
@click="onChangeStreet">
<div>{{selectStreet.label === '全部党工委' ? '党工委' : selectStreet.label}}</div>
<svg-icon icon-class="bottom-sword"
fill="#8ec6d8">
<div class="agency-select" style="margin-top:-107px;width: 100%">
<div class="name-item">{{ cityName }}</div>
<div class="name-item">{{ district.label }}</div>
<div class="item" ref="street" @click="onChangeStreet">
<div>{{ selectStreet.label === '全部党工委' ? '党工委' : selectStreet.label }}</div>
<svg-icon icon-class="bottom-sword" fill="#8ec6d8">
</svg-icon>
<screen-dropdown-menu top="45px"
:menuList="streetList"
:visible.sync="streetDropMenuVisible"
:defaultSelected="selectStreet.value"
@onChooseItem="onChooseStreet">
<screen-dropdown-menu top="45px" :menuList="streetList" :visible.sync="streetDropMenuVisible"
:defaultSelected="selectStreet.value" @onChooseItem="onChooseStreet" style="border-radius: 30px;">
</screen-dropdown-menu>
</div>
<div class="item"
ref="community"
@click="onChangeCommunity">
<div>{{selectCommunity.label === '全部社区' ? '社区' : selectCommunity.label}}</div>
<svg-icon icon-class="bottom-sword"
fill="#8ec6d8">
<div class="item" ref="community" @click="onChangeCommunity">
<div>{{ selectCommunity.label === '全部社区' ? '社区' : selectCommunity.label }}</div>
<svg-icon icon-class="bottom-sword" fill="#8ec6d8">
</svg-icon>
<screen-dropdown-menu top="45px"
:menuList="communityList"
:visible.sync="communityDropMenuVisible"
:defaultSelected="selectCommunity.value"
@onChooseItem="onChooseCommunity">
<screen-dropdown-menu top="45px" :menuList="communityList" :visible.sync="communityDropMenuVisible"
:defaultSelected="selectCommunity.value" @onChooseItem="onChooseCommunity">
</screen-dropdown-menu>
</div>
</div>
@ -38,9 +25,10 @@
<script>
import { getOrgTree } from "api/index"
import { mapGetters, mapActions } from 'vuex'
import { getOptionList } from '../api/bssbApi'
export default {
name: "agency-select",
data () {
data() {
return {
cityName: '青岛市•',
district: {
@ -77,10 +65,10 @@ export default {
computed: {
...mapGetters(['shibeiAId', 'shibeiName', 'shibeiAgencyType'])
},
created () {
this.getOrgTree()
created() {
this.getOrgTree('street_party')
},
mounted () {
mounted() {
window.addEventListener('click', e => {
if (this.$refs.street && !this.$refs.street.contains(e.target)) {
if (this.streetDropMenuVisible) {
@ -97,7 +85,7 @@ export default {
})
},
watch: {
shibeiAId (value) {
shibeiAId(value) {
}
},
@ -110,41 +98,50 @@ export default {
set_shibeiMapCenter: 'SET_SHIBEIMAPCENTER'
}),
//
async getOrgTree () {
async getOrgTree(type, pid) {
try {
const res = await getOrgTree()
this.district.label = res.data.label
this.district.value = res.data.value
this.district.centerMark = res.data.centerMark
this.streetList = [...this.streetList, ...res.data.children]
this.communityList = []
const { data, code, msg } = await getOptionList({ typeKey: type, pid: pid })
if (type == 'street_party') {
if (code == 0) {
let arr = data.map(item => ({ label: item.name, value: item.id }))
this.streetList = [...this.streetList, ...arr]
this.communityList = []
}
} else {
if (code == 0) {
let arr = data.map(item => ({ label: item.name, value: item.id }))
this.communityList = [...this.communityList, ...arr]
}
}
} catch (err) {
console.error(err)
}
},
onChooseStreet (streetItem) {
onChooseStreet(streetItem) {
console.log(streetItem);
this.selectStreet = {
label: streetItem.label,
value: streetItem.value,
centerMark: streetItem.centerMark || streetItem.center || []
// centerMark: streetItem.centerMark || streetItem.center || []
}
this.selectCommunity = {
label: '全部社区',
value: '',
center: []
// center: []
}
this.communityList = []
this.communityList.push({
label: "全部社区",
value: "",
center: [],
children: []
})
this.communityList = [...this.communityList, ...streetItem.children]
this.getOrgTree('community_party', streetItem.value)
// this.communityList = []
// this.communityList.push({
// label: "",
// value: "",
// center: [],
// children: []
// })
// this.communityList = [...this.communityList, ...streetItem.children]
this.getCommunityList()
if (this.selectStreet.value) {
this.set_shibeiAgencyName(this.selectStreet.label)
@ -162,8 +159,10 @@ export default {
}
},
getCommunityList() {
onChooseCommunity (communityItem) {
},
onChooseCommunity(communityItem) {
this.selectCommunity = {
label: communityItem.label,
@ -185,11 +184,11 @@ export default {
}
},
onChangeStreet () {
onChangeStreet() {
this.streetDropMenuVisible = !this.streetDropMenuVisible
},
onChangeCommunity () {
onChangeCommunity() {
this.communityDropMenuVisible = !this.communityDropMenuVisible
},
}
@ -197,5 +196,4 @@ export default {
</script>
<style lang="scss" src="style/agencySelect.scss" scoped></style>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

17
src/views/screenCenter/markerJson.json

@ -6,11 +6,12 @@
"type": "Feature",
"properties": {
"name": "居民",
"type": "marker"
"type": "marker",
"resiNum":"8"
},
"geometry": {
"type": "Point",
"coordinates": [120.38120686849, 36.110575900608]
"coordinates": [120.3337627495665, 36.097438422309494]
}
},
{
@ -21,7 +22,17 @@
},
"geometry": {
"type": "Point",
"coordinates": [120.386000162761, 36.106518283421]
"coordinates":[120.31935953776099, 36.08052585178]
}
},{
"type": "Feature",
"properties": {
"name": "居民",
"type": "marker"
},
"geometry": {
"type": "Point",
"coordinates":[120.3327688259555, 36.079975585938]
}
},
{

266
src/views/screenCenter/screenCenter.vue

@ -1,8 +1,7 @@
<template>
<div class="screen-center">
<div id="map"
style="height: 100%;width: 100%;position: relative;min-width:1000px">
<div style="position: absolute;left:16%;top: 10px;cursor: pointer;z-index: 100;color: #fff;font-size: 40px;">
<div id="map" style="height: 100%;width: 100%;position: relative;min-width:1000px">
<!-- <div style="position: absolute;left:16%;top: 10px;cursor: pointer;z-index: 100;color: #fff;font-size: 40px;">
<div style="display: flex;justify-content: space-around;flex-direction: row;width: 30vw;">
<div v-for="item in topNum"
:key="item.value"
@ -18,49 +17,42 @@
</div>
</div>
</div>
</div> -->
<div @click="initialization" style="position: absolute;left: 100px;bottom: 100px;cursor: pointer;z-index: 100;">
<el-image style="width: 50px; height: 50px;" :src="require('../../assets/back.png')" fit="fill"></el-image>
</div>
<div @click="initialization"
style="position: absolute;left: 100px;bottom: 100px;cursor: pointer;z-index: 100;">
<el-image style="width: 50px; height: 50px;"
:src="require('../../assets/back.png')"
fit="fill"></el-image>
</div>
<div style="position: absolute;right:50px;bottom:50px;z-index: 100;border-radius: 16px;padding:20px; border: 1px solid #045775;font-size: 40px;color: #fff;height: 400px;display: flex;flex-direction: column;justify-content: space-around;"
v-if="layersIndex==3">
<div v-for="item in buttonPiece"
:key="item.value"
style="display: flex;align-items: center;cursor: pointer;padding: 8px 0;"
@click="selectType(item.value,item.label)"
:style="{background: item.value==buttonIndex?'linear-gradient(to top, rgba(16, 98, 130,1), rgba(16, 98, 130,0))':''}">
<el-image style="width: 40px; height: 40px;margin-right: 12px;"
:src="require('../../assets/ling.png')"
fit="fill"></el-image>
{{item.label}}
<div
style="position: absolute;right:50px;bottom:50px;z-index: 100;border-radius: 16px;padding:20px; border: 1px solid #045775;font-size: 40px;color: #fff;height: 400px;display: flex;flex-direction: column;justify-content: space-around;">
<div v-for="item in buttonPiece" :key="item.value"
style="display: flex;align-items: center;cursor: pointer;padding: 8px 0;"
@click="selectType(item.value, item.label)"
:style="{ background: item.value == buttonIndex ? 'linear-gradient(to top, rgba(16, 98, 130,1), rgba(16, 98, 130,0))' : '' }">
<el-image style="width: 40px; height: 40px;margin-right: 12px;" :src="require('../../assets/ling.png')"
fit="fill"></el-image>
{{ item.label }}
</div>
</div>
<div v-if="showFirst"
style="position: absolute;right:1200px;bottom:200px;z-index: 100;padding:20px;font-size: 40px;color: #fff;height: 500px;display: flex;flex-direction: column;justify-content:space-around;border-radius: 16px;padding:20px; border: 1px solid #045775;align-items: center;background-color: rgba(5, 36, 49,0.5);">
<div style="margin-bottom: 24px;display: flex;justify-content: space-between;align-items: center;width: 100%;">
style="position: absolute;right:1200px;bottom:200px;z-index: 100;padding:20px;font-size: 40px;color: #fff;height: 500px;display: flex;flex-direction: column;justify-content:space-around;border-radius: 16px;padding:20px; border: 1px solid #045775;align-items: center;background-color: rgba(5, 36, 49,0.5);">
<div
style="margin-bottom: 24px;display: flex;justify-content: space-between;align-items: center;width: 100%;">
<div>
</div>
<div>
微网格信息
</div>
<div style="color: #fff;cursor: pointer;"
@click="close">
<div style="color: #fff;cursor: pointer;" @click="close">
x
</div>
</div>
<div v-for="item in microgridArr"
:key="item.value"
style="display: flex;flex-direction: row;align-items: center;cursor: pointer;padding: 4px;"
@click="microgridDetails(item)"
:style="{background: item.value==microgridIndex?'linear-gradient(to right, rgba(16, 98, 130,1), rgba(16, 98, 130,0))':''}">
<div v-for="item in microgridArr" :key="item.value"
style="display: flex;flex-direction: row;align-items: center;cursor: pointer;padding: 4px;"
@click="microgridDetails(item)"
:style="{ background: item.value == microgridIndex ? 'linear-gradient(to right, rgba(16, 98, 130,1), rgba(16, 98, 130,0))' : '' }">
<div style="margin-right:80px">
<el-image style="width: 40px; height: 40px;margin-right: 12px;vertical-align: text-top;"
:src="require('../../assets/ling.png')"
fit="fill"></el-image>
:src="require('../../assets/ling.png')" fit="fill"></el-image>
{{ item.label }}
</div>
<div>
@ -69,48 +61,46 @@
</div>
</div>
<div v-if="showMicrogridDetails"
style="position: absolute;right:400px;bottom:100px;z-index: 100;padding:20px;font-size: 40px;color: #fff;height: auto;display: flex;flex-direction: column;border-radius: 16px;padding:20px; border: 1px solid #045775;background-color: rgba(7, 100, 133,0.5);">
style="position: absolute;right:400px;bottom:100px;z-index: 100;padding:20px;font-size: 40px;color: #fff;height: auto;display: flex;flex-direction: column;border-radius: 16px;padding:20px; border: 1px solid #045775;background-color: rgba(7, 100, 133,0.5);">
<div style="margin-bottom: 38px;">
<div
style="background: linear-gradient(to right, rgba(6, 227, 218,1), rgba(6, 227, 218,0));display: flex;justify-content: space-between;flex-direction: row;padding: 12px;margin-bottom: 38px;">
style="background: linear-gradient(to right, rgba(6, 227, 218,1), rgba(6, 227, 218,0));display: flex;justify-content: space-between;flex-direction: row;padding: 12px;margin-bottom: 38px;">
<div>
{{ microgridObj.firstTitle||"--" }}
{{ microgridObj.firstTitle || "--" }}
</div>
<div style="color: #fff;cursor: pointer;"
@click="showMicrogridDetails=false">
<div style="color: #fff;cursor: pointer;" @click="showMicrogridDetails = false">
x
</div>
</div>
<div>
<div style="margin-bottom: 38px;">
微网格长{{microgridObj.leader}}
微网格长{{ microgridObj.leader }}
</div>
<div style="margin-bottom: 38px;">
性别{{microgridObj.gender}}
性别{{ microgridObj.gender }}
</div>
<div style="margin-bottom: 38px;">
电话{{microgridObj.phone}}
电话{{ microgridObj.phone }}
</div>
<div style="margin-bottom: 38px;">
住址{{microgridObj.address}}
住址{{ microgridObj.address }}
</div>
</div>
</div>
<div>
<div
style="background: linear-gradient(to right, rgba(6, 227, 218,1), rgba(6, 227, 218,0));display: flex;justify-content: space-between;flex-direction: row;padding: 12px;margin-bottom: 38px;">
style="background: linear-gradient(to right, rgba(6, 227, 218,1), rgba(6, 227, 218,0));display: flex;justify-content: space-between;flex-direction: row;padding: 12px;margin-bottom: 38px;">
<div>
{{ microgridObj.secondTitle||"--" }}
{{ microgridObj.secondTitle || "--" }}
</div>
<div>
总数{{ microgridObj.total||"--" }}
总数{{ microgridObj.total || "--" }}
</div>
</div>
<div style="max-width: 700px;min-width: 700px;overflow-x: clip; text-overflow:ellipsis;white-space: nowrap;">
<div v-for="item in microgridObj.list"
:key="item.value"
style="margin-bottom: 30px;cursor: pointer;"
:title="item.label">
<div
style="max-width: 700px;min-width: 700px;overflow-x: clip; text-overflow:ellipsis;white-space: nowrap;">
<div v-for="item in microgridObj.list" :key="item.value"
style="margin-bottom: 30px;cursor: pointer;" :title="item.label">
<span style="margin-right: 12px;">
{{ item.value }}
</span>
@ -121,10 +111,8 @@
</div>
</div>
<div style="display: flex;justify-content: flex-end;">
<el-pagination background
layout="prev, pager, next"
:total="microgridObj.total"
@current-change="handleCurrentChange">
<el-pagination background layout="prev, pager, next" :total="microgridObj.total"
@current-change="handleCurrentChange">
</el-pagination>
</div>
@ -197,18 +185,18 @@ export default {
value: 3,
label: "党支部"
},
{
value: 4,
label: "用户"
},
{
value: 5,
label: "党员"
},
{
value: 6,
label: "事件"
}
// {
// value: 4,
// label: ""
// },
// {
// value: 5,
// label: ""
// },
// {
// value: 6,
// label: ""
// }
],
buttonIndex: 0,
markerJson: null,
@ -429,6 +417,13 @@ export default {
},
mounted() {
this.shibeiJson = require('./shibei.json');
console.log(this.shibeiJson);
for (let i in this.shibeiJson.features) {
this.shibeiJson.features[i].properties.resiNum = '88',
this.shibeiJson.features[i].properties.houseNum = '66'
this.shibeiJson.features[i].properties.partNum = '第一党支部'
}
console.log(this.shibeiJson.features);
this.markerJson = require('./markerJson.json');
this.init()
this.microgridObj.list = JSON.parse(JSON.stringify(this.microgridObjCopy.list)).slice(0, 5)
@ -453,7 +448,7 @@ export default {
},
methods: {
init() {
// map
// map
mapboxgl.accessToken = "pk.eyJ1IjoiZGp4YyIsImEiOiJjanlxdzNlbW0wNHNyM29yMzZibHczOHlpIn0.TOUXgB6IHHhnmA6RsL6pWw";
this.map = new mapboxgl.Map({
container: 'map', // container id
@ -465,9 +460,11 @@ export default {
pitch: 40,
style: {
version: 8,
sources: {},
sources: {
},
glyphs: "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
layers: []
layers: [
],
}
});
const _this = this;
@ -479,6 +476,9 @@ export default {
});
_this.map.on("click", "shibeiPolygonLayer", function (e) {
const features = _this.map.queryRenderedFeatures(e.point);
if (_this.layersIndex === 3) {
_this.showFirst = true
}
if (features.length > 0) {
_this.features = features[0]
if (features[0]["properties"]["type"] && features[0]["properties"]["type"] == "marker") {
@ -501,12 +501,17 @@ export default {
if (_this.map.getLayer("SinglePolygonLayer")) {
_this.map.removeLayer("SinglePolygonLayer")
_this.map.removeLayer("SingleTextLayer")
_this.map.removeSource("SinglePolygonSource")
}
if (_this.map.getLayer("text_JSON_layer-num")) {
_this.map.removeLayer("text_JSON_layer-num")
}
for (let i = 8; i <= 18; i++) {
if (_this.map.getLayer("lineBufferLayer-" + i)) {
_this.map.removeLayer("lineBufferLayer-" + i)
_this.map.removeSource("lineBufferSource-" + i)
}
}
}
@ -557,17 +562,16 @@ export default {
'type': 'geojson',
'data': geojson
});
this.map.addLayer({
'id': 'shibeiPolygonLayer',
'type': 'fill-extrusion',
'source': 'shibeiPolygonSource',
'paint': {
'fill-extrusion-vertical-gradient': true,
'fill-extrusion-color': "#1d597b",
'fill-extrusion-color': "#00466e",
'fill-extrusion-height': 300,
'fill-extrusion-base': 0,
'fill-extrusion-opacity': 1
'fill-extrusion-opacity': 0.2 //
}
});
this.map.addLayer({
@ -582,7 +586,7 @@ export default {
},
"layout": {
"text-field": "{name}",
'text-size': 40
'text-size': 25
}
});
},
@ -657,15 +661,37 @@ export default {
"maxzoom": (i + 1),
'paint': {
'fill-extrusion-vertical-gradient': true,
'fill-extrusion-color': '#4bbdd8',
'fill-extrusion-color': '#00e4fa',
'fill-extrusion-height': 310, //
'fill-extrusion-base': 300,//
'fill-extrusion-opacity': 0.3
}
});
// this.map.addLayer({
// id: 'shibeiPolylineShadow-',
// type: 'fill-extrusion',
// source: 'lineBufferSource-' + i,
// paint: {
// 'fill-extrusion-color': [
// 'interpolate',
// ['linear'],
// ['get', 'height'],
// 0, '#05c3e3', //
// // 300, '#0089aa' //
// ],
// 'fill-extrusion-height': 310, //
// 'fill-extrusion-base': 300, //
// 'fill-extrusion-opacity': 0.3, //
// },
// light: null, // null
// },)
}
},
initialization() {
if (this.map.getLayer("text_JSON_layer-num")) {
//
this.map.removeLayer("text_JSON_layer-num");
}
if (this.map.getLayer("shibeiPolygonLayer")) {
this.map.removeLayer("shibeiPolygonLayer")
this.map.removeLayer("text_JSON_layer")
@ -676,6 +702,7 @@ export default {
this.map.removeLayer("SingleTextLayer")
this.map.removeSource("SinglePolygonSource")
}
for (let i = 8; i <= 18; i++) {
if (this.map.getLayer("lineBufferLayer-" + i)) {
this.map.removeLayer("lineBufferLayer-" + i)
@ -700,18 +727,73 @@ export default {
this.close();
},
selectType(value, label) {
if (value === this.buttonIndex) {
this.buttonIndex = 0
this.makeMarkers(this.markerJson)
return
}
// if (value === this.buttonIndex) {
// this.buttonIndex = 0
// this.makeMarkers(this.markerJson)
// return
// }
this.buttonIndex = value
if (this.map.getLayer('text_JSON_layer-num')) {
this.map.removeLayer('text_JSON_layer-num');
}
let json = {
"type": "FeatureCollection",
"features": JSON.parse(JSON.stringify(this.markerJson.features)).filter(f => {
return f.properties.name == label
})
}
if (value == 1) {
this.map.addLayer({
id: "text_JSON_layer-num",
type: "symbol",
source: "shibeiPolygonSource",
// minzoom: 5,
// maxzoom: 22,
interactive: true,
paint: {
'text-color': '#fff',
},
"layout": {
"text-field": "{resiNum}",
'text-size': 25,
'text-offset': [0, -1.5]
}
});
} else if (value == 2) {
this.map.addLayer({
id: "text_JSON_layer-num",
type: "symbol",
source: "shibeiPolygonSource",
// minzoom: 5,
// maxzoom: 22,
interactive: true,
paint: {
'text-color': '#fff',
},
"layout": {
"text-field": "{houseNum}",
'text-size': 25,
'text-offset': [0, -1.5]
}
});
} else if (value == 3) {
this.map.addLayer({
id: "text_JSON_layer-num",
type: "symbol",
source: "shibeiPolygonSource",
// minzoom: 5,
// maxzoom: 22,
interactive: true,
paint: {
'text-color': '#fff',
},
"layout": {
"text-field": "{partNum}",
'text-size': 25,
'text-offset': [0, -1.5]
}
});
}
this.makeMarkers(json)
},
getBoundary(id) {
@ -807,15 +889,34 @@ export default {
source: "pointDimension",
layout: {
"icon-image": "markIcon",
"icon-size": 2,
"icon-size": 1,
},
// paint: {
// "circle-radius": 4,
// "circle-color": "#B42222"
// }
});
_this.layersIndex = 3
});
//
_this.map.addLayer({
id: "pointDimension-text",
type: "symbol",
source: "pointDimension",
layout: {
"text-field": "{resiNum}", //
"text-size": 15,
"text-offset": [0, -5], //
// "text-background-color": "#000", //
// "text-background-opacity": 0.7, //
},
paint: {
"text-color": "#fff", //
"text-halo-width": 10, //
"text-halo-color": "#000", //
},
});
})
_this.layersIndex = 3
},
makeMarker(json) {
const _this = this;
@ -868,10 +969,15 @@ export default {
.screen-center {
flex: 1;
min-width: 1000px;
background: url('../../assets/images/mapBg.png') no-repeat;
background-size: 100% 100%;
}
::v-deep .mapboxgl-ctrl {
display: none !important;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #0aabca;
}

3
src/views/screenCenter/shibei.json

@ -1059,7 +1059,8 @@
[120.328454589844, 36.112235243056]
]
]
]
],
"cneter":[120.3337627495665, 36.097438422309494]
}
},
{

233
src/views/screenLeft/left1.vue

@ -3,105 +3,84 @@
<div class='b-dlzz'>
<screen-title :titleName="'动力主轴'"></screen-title>
<div class="dlzz-tree">
<el-image style="width: 90%; height: 85%;"
:src="require('../../assets/images/dlzz.png')"
@click="goShowDlzz"></el-image>
<el-image style="width: 90%; height: 85%;" :src="require('../../assets/images/dlzz.png')"
@click="goShowDlzz"></el-image>
</div>
<div class="dlzz-static">
<div class="dlzz-static-item">
<img class="item-img"
src="./../../assets/icon/dlzz-lyxz.png" />
<img class="item-img" src="./../../assets/icon/dlzz-lyxz.png" />
<div class="item-content">
<div class="item-title">{{lyxz.title}}</div>
<div class="item-num">{{lyxz.num}}</div>
<div class="item-title">{{ lyxz.title }}</div>
<div class="item-num">{{ lyxz.num }}</div>
</div>
</div>
<div class="dlzz-static-item">
<img class="item-img"
src="./../../assets/icon/dlzz-lyxz.png" />
<img class="item-img" src="./../../assets/icon/dlzz-lyxz.png" />
<div class="item-content">
<div class="item-title">{{dyzx.title}}</div>
<div class="item-num">{{dyzx.num}}</div>
<div class="item-title">{{ dyzx.title }}</div>
<div class="item-num">{{ dyzx.num }}</div>
</div>
</div>
<div class="dlzz-static-item">
<img class="item-img"
src="./../../assets/icon/dlzz-lyxz.png" />
<img class="item-img" src="./../../assets/icon/dlzz-lyxz.png" />
<div class="item-content">
<div class="item-title">{{dqff.title}}</div>
<div class="item-num">{{dqff.num}}</div>
<div class="item-title">{{ dqff.title }}</div>
<div class="item-num">{{ dqff.num }}</div>
</div>
</div>
<div class="dlzz-static-item">
<img class="item-img"
src="./../../assets/icon/dlzz-lyxz.png" />
<img class="item-img" src="./../../assets/icon/dlzz-lyxz.png" />
<div class="item-content">
<div class="item-title">{{yz.title}}</div>
<div class="item-num">{{yz.num}}</div>
<div class="item-title">{{ yz.title }}</div>
<div class="item-num">{{ yz.num }}</div>
</div>
</div>
</div>
</div>
<div class='b-dyfc'>
<screen-title :titleName="'党员风采'"></screen-title>
<div class="b-dyfc-scroll"
v-on:mouseover="onHover($event)"
v-on:mouseout="onHover">
<div style="overflow: hidden">
<screen-popup bottom="80px"
left="120px"
height="300px"
width="500px"
:showContent="showContent"
:visible.sync="popupVisible">
</screen-popup>
<vue-seamless-scroll :class-option="optionHover"
:data="dyfcList">
<div class="dyfc-main">
<div class="dyfc-item"
v-for="(item,index) in dyfcList"
:key="'dyfc'+index">
<img src="./../../assets/icon/dyfc1.png" />
<div class="dyfc-item-row1">
<div class="item-name">{{item.name}}</div>
<div class="item-type">{{item.categoryName}}</div>
</div>
<div class="dyfc-item-row2">{{item.gridName}}</div>
<div class="dyfc-item-row3"
:data-obj="JSON.stringify(item)"
:id="index+1">{{item.mainDeed}}
</div>
</div>
</div>
</vue-seamless-scroll>
</div>
<screen-title :titleName="'阵地信息'"></screen-title>
<div class="flex">
<div :class="['item', { 'item-active': active === 1 }]" @click="active = 1">地物</div>
<div :class="['item', { 'item-active': active === 2 }]" @click="active = 2">房子</div>
</div>
</div>
<el-dialog :visible.sync="ifShowDlzz"
width="90%"
:modal="false">
<div class="table" v-if="active == 2">
<screen-custom-table :headerColor="'#BDE8FF'" :headerHeight="'36px'" :bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'" :tableHeight="80" :showTableLine="true" :dataList="dataListResult"
:isChangeColor=false :rowColor="'rgba(11,68,135,0.16)'" :noData="noData" :pageSize="pageSize"
:headerList="headerList">
</screen-custom-table>
</div>
<div class="tudi" v-else>
<div class="item"><img src="../../assets/icon/yjcz.png" alt=""> <span>公园</span><img src="" alt=""> <span><b
style="color:#FFBF36;">27</b></span></div>
<div class="item"><img src="../../assets/icon/ansc.png" alt=""> <span>医院</span><img src="" alt=""> <span><b
style="color:#FD7000;">27</b></span></div>
<div class="item"><img src="../../assets/icon/csgl.png" alt=""> <span>学校</span><img src="" alt=""> <span><b
style="color: #0bdbc0;;">27</b></span></div>
<div class="item"><img src="../../assets/icon/csgl.png" alt=""> <span>健身活动</span><img src="" alt=""> <span><b
style="color: #0bdbc0;;">27</b></span></div>
</div>
<el-dialog :visible.sync="ifShowDlzz" width="90%" :modal="false">
<div style="color: #fff;display: flex; align-items: center;
justify-content: center;flex-direction: column;">
<div class="first"
justify-content: center;flex-direction: column;">
<el-image style="width: 100%; height: 100%;margin-right: 8px;"
:src="require('../../assets/images/zzjg.png')"></el-image>
<!-- <div class="first"
@click="NodeClick(null,{label:'市北区委'})">
<el-image style="width: 80px; height: 60px;margin-right: 8px;"
:src="require('../../assets/images/hq.png')"></el-image>
{{list.label}}
</div>
<div>
</div> -->
<!-- <div>
<el-image style="width: 130px; height: 90px;"
:src="require('../../assets/images/xx.png')"></el-image>
</div>
</div> -->
<!-- <div style="display: flex;flex-wrap: nowrap;max-width: 100%;overflow-x: auto;margin-bottom: 12px;">
<div class="second"
v-for="(item,index) in list.children"
@ -110,12 +89,13 @@
</div>
</div> -->
<vue2-org-tree :data="list"
<!-- <vue2-org-tree :data="list"
class="orgTree"
style="max-width: 100%;overflow-x: auto;background-color: #03374c;font-size: 30px;"
@on-node-click="NodeClick" />
@on-node-click="NodeClick" /> -->
</div>
</el-dialog>
</div>
</template>
@ -147,7 +127,7 @@ export default {
//
optionHover: {
step: 1, //
step: 0.1, //
limitMoveNum: 3, // this.dataList.length
hoverStop: true, // stop
direction: 2, // 0 1 2 3
@ -161,6 +141,11 @@ export default {
popupVisible: false,
ifShowDlzz: false,
list: {},
active: 1,
headerList: [{ title: '街道', width: '1000px' }, { title: '房子总数', width: '800px' }, { title: '操作', width: '800px' }],
pageSize: 4,
noData: false,
dataListResult: [['敦化路街道', '1860', '查看'], ['浮山新区街道', '1340', '查看'], ['延安路街道', '1752', '查看'], ['大港路街道', '1654', '查看'], ['海伦路街道', '1524', '查看'],]
}
},
computed: {
@ -385,6 +370,7 @@ export default {
justify-content: center;
align-items: center;
}
.dlzz-static {
background: #03364b;
@ -395,6 +381,7 @@ export default {
&-item {
display: flex;
.item-img {
height: 50px;
width: 50px;
@ -445,11 +432,12 @@ export default {
margin-left: 10px;
cursor: pointer;
> img {
>img {
height: 110px;
width: 190px;
display: block;
}
&-row1 {
margin-top: 10px;
display: flex;
@ -492,6 +480,7 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
// &-row3:hover {
// overflow: visible;
// }
@ -500,6 +489,7 @@ export default {
}
}
}
.first {
background-image: linear-gradient(#055b8d, #0695b7);
width: fit-content;
@ -509,6 +499,7 @@ export default {
font-size: 40px;
cursor: pointer;
}
.second {
background-image: linear-gradient(#055b8d, #0695b7);
width: fit-content;
@ -518,31 +509,131 @@ export default {
margin-right: 12px;
white-space: nowrap;
}
.flex {
display: flex;
margin-bottom: 10px;
.item {
color: #fff;
width: 100px;
height: 30px;
line-height: 30px;
text-align: center;
background: linear-gradient(to top, #0174a2, #025b7d);
margin-left: 10px;
margin-top: 10px;
font-size: 300;
cursor: pointer;
}
.item-active {
background: linear-gradient(to top, #0d82b0, #035f83);
font-weight: 400;
}
}
.tudi {
display: flex;
justify-content: space-around;
color: #A3B9DA;
font-size: 16px;
height: 192px;
.item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
b {
font-size: 32px;
}
}
}
.table {
height: 15px;
}
::v-deep {
.el-dialog {
background-color: #03374c;
}
.el-dialog__headerbtn {
font-size: 63px;
color: #09e5ea;
}
.org-tree-node-label-inner {
background-image: linear-gradient(#055b8d, #0695b7);
cursor: pointer;
}
.org-tree-node:not(:first-child):before,
.org-tree-node:not(:last-child):after {
border-top: 1px solid #188eb6;
}
.org-tree-node:after {
border-left: 1px solid #188eb6;
}
.org-tree-node-children:before {
border-left: 1px solid #188eb6;
}
.org-tree-node-label .org-tree-node-label-inner {
padding: 20px 25px;
// font-size: 34px;
}
}
.screen-custom-table {
::v-deep ul {
.table-body .scroll-view .table-tr+.table-tr {
border: none;
}
.table-header {
font-size: 16px;
font-family: PingFang-SC-Bold;
}
.table-body {
height: 200px;
.table-tr {
margin-top: 12px;
// background-image: url('./../assets/icon/tableTdBg.png');
// background-size: 100% 100%;
}
// .table-tr:nth-child(2n) {
// background: rgba(11, 68, 135, 0.1);
// &:hover {
// .table-td {
// color: #fff !important;
// }
// }
// }
// .table-tr:nth-child(2n + 1) {
// &:hover {
// .table-td {
// color: #fff !important;
// }
// }
// }
// .table-tr {
// .table-td:nth-child(2) {
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
// }
// }
}
}
}
</style>

11
src/views/screenLeft/left2.vue

@ -147,7 +147,8 @@
<div class="grid-member">
<div class="grid-member-title">{{'专职网格员'}}</div>
<div v-if="isStreet"
<!-- v-if="isStreet" -->
<div
class="grid-member-main">
<div class="memberitem"
v-for="(item,index) in memberLeftList"
@ -172,10 +173,10 @@
<div class="frame-arrow2">
<img src="./../../assets/icon/arrow2.png" />
</div>
<!-- v-if="isStreet" -->
<div class="grid-member">
<div class="grid-member-title">{{'专职网格管理员'}}</div>
<div v-if="isStreet"
<div
class="grid-member-main">
<div class="memberitem"
v-for="(item,index) in memberRightList"
@ -230,8 +231,8 @@ export default {
name: "screen-left2",
data () {
return {
communityName: "社区",
gridName: "网格",
communityName: "即墨路街道-恩县路社区",
gridName: "恩县路社区-第一网格",
gridList: [
{
name: '第一网格',

82
src/views/screenLeft/left3.vue

@ -5,19 +5,15 @@
<div class="container">
<div class="static">
<div class="static-num">32</div>
<div class="static-title">{{'联建单位总数'}}</div>
<div class="static-title">{{ '联建单位总数' }}</div>
</div>
<div class="chartsGl"
id="charts"></div>
<div class="chartsGl" id="charts"></div>
<!-- 饼图下面的底座 -->
<div class="buttomCharts"></div>
<div class="legend">
<div class="legend-item"
v-for="(item,index) in optionData"
:key="index">
<div class="item-icon"
:style="{background:item.itemStyle.color}"></div>
<div class="item-name">{{item.name}}</div>
<div class="legend-item" v-for="(item, index) in optionData" :key="index">
<div class="item-icon" :style="{ background: item.itemStyle.color }"></div>
<div class="item-name">{{ item.name }}</div>
</div>
</div>
</div>
@ -25,17 +21,9 @@
<div class='b-ljhd'>
<screen-title :titleName="'联建活动'"></screen-title>
<div class="table">
<screen-custom-table :headerColor="'#BDE8FF'"
:headerHeight="'36px'"
:bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'"
:tableHeight="99"
:dataList="dataListResult"
:isChangeColor=false
:rowColor="'rgba(11,68,135,0.16)'"
:noData="noData"
:pageSize="pageSize"
:headerList="headerList">
<screen-custom-table :headerColor="'#BDE8FF'" :headerHeight="'36px'" :bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'" :tableHeight="99" :dataList="dataListResult" :isChangeColor=false
:rowColor="'rgba(11,68,135,0.16)'" :noData="noData" :pageSize="pageSize" :headerList="headerList">
</screen-custom-table>
</div>
</div>
@ -47,10 +35,10 @@ import * as echarts from 'echarts'
import 'echarts-gl'
import { loadLjhdList } from './../../data/index'
import { getIcpartyactivity } from '../../api/hulianApi'
export default {
name: "screen-left3",
data () {
data() {
return {
//+
optionData: [
@ -90,37 +78,38 @@ export default {
],
headerList: ['所属网格', { title: '活动标题', width: '1000px' }, '单位名称', { title: '人员', width: '200px' }, '活动时间'],
dataList: [],
dataListResult: [],
noData: false,
pageSize: 8
}
},
mounted () {
this.dataList = loadLjhdList()
mounted() {
this.getIcpartyactivity()
this.$nextTick(function () {
this.initChart();
this.initList()
});
},
methods: {
initList () {
this.dataListResult = []
this.dataList.forEach(element => {
this.dataListResult.push([
element.gridName,
element.title,
element.unitName,
element.member,
element.data,
])
});
console.log(this.dataListResult)
async getIcpartyactivity() {
let params = {
agencyId: '1175270520603930625',
pageSize: 50,
pageNo: 1
}
const { data, msg, code } = await getIcpartyactivity(params)
if (code == 0) {
this.dataListResult = data.list.map(item => [item.gridName, item.title, item.unitName, item.peopleCount, item.activityTime])
if(this.dataListResult.length === 0){
this.noData = true
}
} else {
console.log(msg);
}
},
initChart () {
initChart() {
//3d
let myChart = echarts.init(document.getElementById('charts'));
// option ; getPie3D(01)
@ -132,7 +121,7 @@ export default {
},
// pieData internalDiameterRatio:
getPie3D (pieData, internalDiameterRatio) {
getPie3D(pieData, internalDiameterRatio) {
let that = this;
let series = [];
let sumValue = 0;
@ -281,7 +270,7 @@ export default {
},
//3d
getHeight3D (series, height) {
getHeight3D(series, height) {
series.sort((a, b) => {
return (b.pieData.value - a.pieData.value);
})
@ -289,7 +278,7 @@ export default {
},
// series-surface.parametricEquation
getParametricEquation (startRatio, endRatio, isSelected, isHovered, k, h) {
getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, h) {
//
let midRatio = (startRatio + endRatio) / 2;
let startRadian = startRatio * Math.PI * 2;
@ -349,7 +338,7 @@ export default {
},
//
fomatFloat (num, n) {
fomatFloat(num, n) {
var f = parseFloat(num);
if (isNaN(f)) {
return false;
@ -369,7 +358,7 @@ export default {
},
//
bindListen (myChart) {
bindListen(myChart) {
let that = this;
let selectedIndex = '';
let hoveredIndex = '';
@ -481,5 +470,4 @@ export default {
}
</script>
<style lang="scss" src="style/left3.scss" scoped></style>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

60
src/views/screenRight/lineOption.js

@ -2,7 +2,7 @@ import * as echarts from 'echarts'
export function lineOption() {
return {
color: ['#FFB10A', '#71F3FB'],
color: ['#71F3FB', '#FFB10A','#9232f0'],
title: {
// text: 'Gradient Stacked Area Chart'
},
@ -16,12 +16,14 @@ export function lineOption() {
}
},
legend: {
// data: ['党员建群', '党成员'],
// color: ['#FFB10A', '#71F3FB'],
data: ['非常满意', '基本满意','不满意'],
color: ['#71F3FB', '#FFB10A','#9232f0'],
data: [
{ color: '#FFB10A', name: '党成员' },
{ color: '#71F3FB', name: '党员建群' }
{ color: '#71F3FB', name: '非常满意' },
{ color: '#FFB10A', name: '基本满意' },
{ color: '#9232f0', name: '不满意' },
],
icon: 'rect',
itemWidth: 12, // 长方形宽度
itemHeight: 4, // 长方形高度
@ -40,13 +42,7 @@ export function lineOption() {
{
type: 'category',
boundaryGap: false,
data: [
'敦化路街道',
'南宁路街道',
'洛阳路街道',
'华阳路街道',
'黄台路街道'
],
data: [],
offset: 5,
axisLine: {
lineStyle: {
@ -68,7 +64,7 @@ export function lineOption() {
],
series: [
{
name: '党成员',
name: '非常满意',
type: 'line',
smooth: true,
@ -92,16 +88,16 @@ export function lineOption() {
emphasis: {
focus: 'series'
},
data: [120, 282, 111, 234, 220]
data: []
},
{
name: '党员建群',
name: '基本满意',
type: 'line',
smooth: false,
lineStyle: {
width: 3,
color: '#ffb10a'
color: '#FFB10A'
},
showSymbol: false,
// areaStyle: {
@ -120,7 +116,37 @@ export function lineOption() {
emphasis: {
focus: 'series'
},
data: [50, 20, 40, 10, 60]
data: []
},
{
name: '不满意',
type: 'line',
smooth: false,
lineStyle: {
width: 3,
color: '#9232f0'
},
showSymbol: false,
// areaStyle: {
// opacity: 0.8,
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: '#ffb10a'
// },
// {
// offset: 1,
// color: '#bf9e58'
// }
// ])
// },
emphasis: {
focus: 'series'
},
data: [
// 50, 20, 40, 10, 60
]
}
]
}

2
src/views/screenRight/pieOption.js

@ -8,7 +8,7 @@ export function pieOption() {
left: 'center',
textStyle: {
width: '100%',
fontSize: 30,
fontSize: 20,
fontStyle: 'italic',
color: '#00E0FB'
},

185
src/views/screenRight/right1.vue

@ -21,8 +21,46 @@
</div>
</div>
<div class='b-ytal'>
<div class='b-dyfc'>
<screen-title :titleName="'党员风采'"></screen-title>
<div class="b-dyfc-scroll"
v-on:mouseover="onHover($event)"
v-on:mouseout="onHover">
<div style="overflow: hidden">
<screen-popup bottom="80px"
left="4200px"
height="300px"
width="500px"
:showContent="showContent"
:visible.sync="popupVisible">
</screen-popup>
<vue-seamless-scroll :class-option="optionHover"
:data="dyfcList">
<div class="dyfc-main">
<div class="dyfc-item"
v-for="(item,index) in dyfcList"
:key="'dyfc'+index">
<img :src="item.imageList[0]" v-if="item.imageList.length >0"/>
<img src="../../assets/images/dyfc.png" v-else alt="">
<div class="dyfc-item-row2">{{item.gridName}} </div>
<div class="dyfc-item-row3"
:data-obj="JSON.stringify(item)"
:id="index+1">{{item.mainDeed}}
</div>
</div>
</div>
</vue-seamless-scroll>
</div>
</div>
</div>
<!-- <div class='b-ytal'>
<screen-title :titleName="'议题案例'"></screen-title>
<div @mouseenter="tableMouseEnter"
@mouseleave="tableMouseLeave"
class="ytal-list">
@ -36,13 +74,14 @@
</div>
</div>
</div>
</div>
</div> -->
</div>
</template>
<script>
import {getDyfcList} from '../../api/hulianApi'
import { loadYtalList } from './../../data/index'
import { mapGetters } from "vuex";
export default {
name: "screen-right1",
data () {
@ -75,8 +114,21 @@ export default {
},
],
ytalList: [],
optionHover: {
step: 1, //
limitMoveNum: 3, // this.dataList.length
hoverStop: true, // stop
direction: 2, // 0 1 2 3
openWatch: true, // dom
singleHeight: 0, // (0) direction => 0/1
singleWidth: 0, // (0) direction => 2/3
waitTime: 2000, // (1000ms)
},
top: 0,
popupVisible: false,
dyfcList:[],
showContent: '',
scrollTime: 0,
transition: 'top 1s linear',
timer: '',
@ -87,6 +139,9 @@ export default {
mounted () {
this.ytalList = loadYtalList()
},
created(){
this.getDyfcList()
},
watch: {
ytalList: {
immediate: true,
@ -98,7 +153,18 @@ export default {
clearInterval(this.timer)
}
}
}
},
shibeiAId: {
handler() {
if (this.shibeiAId !== "") {
this.getDyfcList()
}
},
immediate: true,
},
},
computed: {
...mapGetters(["shibeiAId"]),
},
methods: {
tableMouseEnter () {
@ -137,9 +203,118 @@ export default {
}
}, 5000)
},
async getDyfcList() {
let params ={
agencyId:this.shibeiAId || '1175270520603930625',
pageSize:50,
pageNo:1
}
const {data,code,msg} = await getDyfcList(params)
if(code == 0){
this.dyfcList = data.list
}else{
console.log(msg);
}
},
onHover(e) {
console.log(e.target.className)
if (e.target.className === 'dyfc-item-row3') {
// console.log(e.target);
let index = e.target.id;
let item = JSON.parse(e.target.dataset.obj);
this.showContent = this.dyfcList[index - 1].mainDeed
this.popupVisible = true
console.log(this.popupVisible);
} else if (e.target.className === 'screen-popup-content') {
this.popupVisible = true
} else {
this.popupVisible = false
}
},
}
}
</script>
<style lang="scss" src="style/right1.scss" scoped></style>
<style lang="scss" scoped>
.b-dyfc {
box-sizing: border-box;
margin-top: 8px;
margin-left: 1px;
&-scroll {
overflow: hidden;
padding: 0 10px;
.dyfc-main {
margin-top: 16px;
display: flex;
justify-content: space-around;
.dyfc-item {
padding: 10px 11px 18px 11px;
width: 190px;
height: 230px;
background: rgba(68, 216, 243, 0.16);
// opacity: 0.16;
margin-left: 10px;
cursor: pointer;
> img {
height: 110px;
width: 190px;
display: block;
}
&-row1 {
margin-top: 10px;
display: flex;
justify-content: space-between;
.item-name {
font-size: 18px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #ffffff;
}
.item-type {
font-size: 14px;
font-family: Alibaba PuHuiTi;
font-weight: 300;
color: #00eccd;
}
}
&-row2 {
margin-top: 10px;
font-size: 16px;
font-family: Alibaba PuHuiTi;
font-weight: 300;
color: #c1e8ff;
}
&-row3 {
position: relative;
margin-top: 13px;
font-size: 16px;
font-family: Alibaba PuHuiTi;
font-weight: 300;
color: #ffffff;
line-height: 24px;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
// &-row3:hover {
// overflow: visible;
// }
}
}
}
}
</style>

373
src/views/screenRight/right2.vue

@ -1,220 +1,309 @@
<template>
<div class="bg-content right2">
<div class='b-dyxf'>
<screen-title :titleName="'党员先锋模范'"></screen-title>
<div class="dyxf-main">
<div class="b-dyxf">
<screen-title :titleName="'概览'"></screen-title>
<div class="dyxf-main" v-if="proportion">
<div class="dyxf-pie">
<screen-echarts-frame class="pie"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="pie-title">{{'党员参与议题'}}</div>
<screen-echarts-frame class="pie" @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame>
<!-- <div class="pie-title">{{ '党员参与议题' }}</div> -->
</div>
<div class="dyxf-static">
<div class='dyxf-static-row'>
<div class="dyxf-static-row">
<div class="static-item">
<div class="item-title">{{'党员发布话题'}}</div>
<div class="item-title">{{ "满意度" }}</div>
<div class="item-num">
<div class="num-left">{{'53,788'}}</div>
<div class="num-right">{{'82.21%'}}</div>
<div class="num-left">{{ evaluationTotal }}</div>
<div class="num-right">{{ evaluationProportion + '%' }}</div>
</div>
</div>
<div class="static-item item2">
<div class="item-title">{{'党员发布议题'}}</div>
<div class="item-title">{{ "解决率" }}</div>
<div class="item-num">
<div class="num-left">{{'22,024'}}</div>
<div class="num-right">{{'24.14%'}}</div>
<div class="num-left">{{ resolveTotal }}</div>
<div class="num-right">{{ resolveProportion + '%' }}</div>
</div>
</div>
</div>
<div class='dyxf-static-row row2'>
<div class="dyxf-static-row row2">
<div class="static-item">
<div class="item-title">{{'议题转诉求'}}</div>
<div class="item-title">{{ "按期响应率" }}</div>
<div class="item-num">
<div class="num-left">{{'5,302'}}</div>
<div class="num-right">{{'66.74%'}}</div>
<div class="num-left">{{ xylTotal }}</div>
<div class="num-right">{{ xylProportion + '%' }}</div>
</div>
</div>
<div class="static-item item2">
<div class="item-title">{{'解决诉求'}}</div>
<div class="item-title">{{ "按期回复率" }}</div>
<div class="item-num">
<div class="num-left">{{'5,136'}}</div>
<div class="num-right">{{'67.11%'}}</div>
<div class="num-left">{{ hflTotal }}</div>
<div class="num-right">{{ hflProportion + '%' }}</div>
</div>
</div>
</div>
</div>
</div>
<div v-else>
<screen-loading style="width: 620px;height: 290px;" >加载中...</screen-loading>
</div>
</div>
<div class='b-dyqz'>
<screen-title :titleName="'党员联系群众'"></screen-title>
<div class="b-dyqz">
<screen-title :titleName="'满意度'">
<!-- <slot>
<screen-dropdown-menu top="45px"
:menuList="option"
:visible.sync="streetDropMenuVisible"
:defaultSelected="selectStreet.value"
@onChooseItem="onChooseStreet" style="border-radius: 30px;">
</screen-dropdown-menu>
</slot> -->
</screen-title>
<div class="dyqz-main">
<screen-echarts-frame class="line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<screen-echarts-frame class="line" @myChartMethod="lineInitOk" ref="lineChart"></screen-echarts-frame>
</div>
</div>
<div class='b-xjph'>
<screen-title :titleName="'先进排行榜单'"></screen-title>
<div class="b-xjph">
<screen-title :titleName="'效能评价'"></screen-title>
<div class="table">
<screen-custom-table :headerColor="'#BDE8FF'"
:headerHeight="'36px'"
:bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'"
:tableHeight="104"
:showTableLine="true"
:dataList="dataListResult"
:isChangeColor=false
:rowColor="'rgba(11,68,135,0.16)'"
:noData="noData"
:pageSize="pageSize"
:headerList="headerList">
<screen-custom-table :headerColor="'#BDE8FF'" :headerHeight="'36px'" :bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'" :tableHeight="104" :showTableLine="true" :dataList="dataListResult"
:isChangeColor="false" :rowColor="'rgba(11,68,135,0.16)'" :noData="noData" :pageSize="pageSize"
:headerList="headerList">
</screen-custom-table>
</div>
</div>
</div>
</template>
<script>
import { pieOption } from './pieOption.js'
import { lineOption } from './lineOption.js'
import { mapGetters } from 'vuex'
import { loadXjphList } from './../../data/index'
import { pieOption } from "./pieOption.js";
import { lineOption } from "./lineOption.js";
import { mapGetters } from "vuex";
import {
getEvaluationTrend,
getEfficiencyEvaluation,
getResolveTotal,
getEvaluationTotal,
getXylTotal,
getHflTotal
} from "../../../src/api/bssbApi";
export default {
name: "screen-right2",
data () {
data() {
return {
showNoData: false,
timer: null,
pieChart: '',
pieOption: {},
pieInitState: false,
lineChart: '',
lineChartFlag: false,
lineOption: {},
lineInitState: false,
headerList: [{ title: '排名', width: '400px' }, { title: '单位', width: '1000px' }, '党员数', '话题数', '议题数', '诉求数', { title: '结案率', color: '#00E099' }, { title: '满意率', color: '#FFB400' }],
dataList: [],
headerList: [
{ title: "排名", width: "400px" },
{ title: "街道", width: "1000px" },
{ title: "结案率", color: "#00E099" },
{ title: "响应率", color: "#00E099" },
{ title: "满意率", color: "#FFB400" },
],
dataListResult: [],
noData: false,
pageSize: 5
pageSize: 5,
deptId_: "",
selectStreet: {
value: 1,
},
option: [
{ label: "满意率", value: 1 },
{ label: "解决率", value: 2 },
{ label: "按期响应率", value: 3 },
{ label: "按期回复率", value: 4 },
],
streetDropMenuVisible: true,
resolveTotal: '',
resolveProportion: '',
evaluationTotal: '',
evaluationProportion: '',
xylTotal: '',
xylProportion: '',
hflTotal: '',
hflProportion: '',
proportion: ''
}
},
computed: {
...mapGetters(['shibeiAId'])
...mapGetters(["shibeiAId"]),
},
watch: {
shibeiAId: {
handler () {
if (this.shibeiAId !== '') {
this.getData()
handler() {
if (this.shibeiAId !== "") {
this.getData();
}
},
immediate: true
}
immediate: true,
},
},
mounted () {
this.dataList = loadXjphList()
this.$nextTick(function () {
this.initList()
});
mounted() {
this.getData();
},
methods: {
initList () {
this.dataListResult = []
this.dataList.forEach(element => {
this.dataListResult.push([
element.no,
element.unit,
element.dys,
element.hts,
element.yts,
element.sqs,
element.jal,
element.myl,
])
});
console.log(this.dataListResult)
},
getData () {
this.getPie()
this.getLine()
getLineChart() {
const params = {};
params.deptId = this.deptId_;
const currentDate = new Date();
params.yearMonth = currentDate.getFullYear()
this.lineChartFlag = false;
getEvaluationTrend(params)
.then((res) => {
this.evaluationTrend = res.data;
this.$refs.lineChart.clear();
this.lineOption = lineOption();
this.lineOption.series[0].data = this.evaluationTrend.fcmyArr;
this.lineOption.series[1].data = this.evaluationTrend.jbmyArr;
this.lineOption.series[2].data = this.evaluationTrend.bmyArr;
this.lineOption.xAxis[0].data = this.evaluationTrend.xValue;
this.lineChartFlag = true;
this.$refs.lineChart.setOption(this.lineOption);
})
.catch((err) => {
this.lineChartFlag = true;
console.log(err);
});
},
pieInitOk () {
this.pieInitState = true
},
lineInitOk () {
this.lineInitState = true
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
onChooseStreet(streetItem) {
this.selectStreet = {
label: streetItem.label,
value: streetItem.value,
centerMark: streetItem.centerMark || streetItem.center || [],
};
this.selectCommunity = {
label: "全部社区",
value: "",
center: [],
};
if (this.selectStreet.value) {
this.set_shibeiAgencyName(this.selectStreet.label);
this.set_shibeiAgencyType("community");
this.set_shibeiMapCenter(this.selectStreet.center);
this.set_shibeiAgencyId(this.selectStreet.value);
} else {
setTimeout(() => {
this.getPie()
}, 500)
}
},
//
async getPieChart () {
getData() {
this.getEfficiencyEvaluation();
this.fetchData();
this.getLine();
},
//
getEfficiencyEvaluation() {
let params = {
deptId: this.shibeiAId || "1175270520603930625",
statType: "1",
startDate: "",
endDate: "",
type: "1",
peopleFlag: "",
};
getEfficiencyEvaluation(params).then(res => {
if (res.code == 0) {
this.dataListResult = res.data.map((item, index) => [index + 1, item.deptName, item.closedRatio, item.responseRatio, item.satisfiedRatio])
if (this.dataListResult.length === 0) {
this.noData = true
}
}
})
},
async fetchData() {
try {
const params = {
deptId: this.shibeiAId || '1175270520603930625',
startTime: '',
endTime: '',
peopleFlag: '',
};
this.$refs.pieChart.clear()
const resolveTotal = await getResolveTotal(params);
const evaluationTotal = await getEvaluationTotal(params);
const xylTotal = await getXylTotal(params);
const hflTotal = await getHflTotal(params);
// pieChart
this.pieOption = pieOption()
const val1 = 80
const val2 = 20
this.pieOption.title.text = `84%`
this.resolveTotal = this.calculateSum(resolveTotal.data, ["基本解决", "解决"]);
const resolveTotalNum = this.calculateTotalNum(resolveTotal.data);
this.pieOption.series[1].data[0].value = 80
this.pieOption.series[1].data[1].value = 20
this.resolveProportion = this.calculateProportion(this.resolveTotal, resolveTotalNum);
this.evaluationTotal = this.calculateSum(evaluationTotal.data, ["非常满意", "基本满意"]);
const evaluationTotalNum = this.calculateTotalNum(evaluationTotal.data);
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
getLine () {
if (this.lineInitState) {
this.getLineChart()
} else {
setTimeout(() => {
this.getLine()
}, 500)
}
},
//
async getLineChart () {
this.evaluationProportion = this.calculateProportion(this.evaluationTotal, evaluationTotalNum);
this.$refs.lineChart.clear()
this.xylTotal = xylTotal.data.find(item => item.name === '按期响应').value;
const xylValue = xylTotal.data.find(item => item.name === '按期响应').total;
this.xylProportion = this.calculateProportion(this.xylTotal,xylValue );
// // pieChart
this.lineOption = lineOption()
// const val1 = 80
// const val2 = 20
// this.lineOption.title.text = `84%`
this.hflTotal = hflTotal.data.find(item => item.name === '按时回复').value;
const hflValue = hflTotal.data.find(item => item.name === '按时回复').total;
this.hflProportion = this.calculateProportion(this.hflTotal,hflValue );
// this.lineOption.series[1].data[0].value = 80
// this.lineOption.series[1].data[1].value = 20
const hflProportion = parseFloat(this.hflProportion) || 0;
const xylProportion = parseFloat(this.xylProportion) || 0;
const evaluationProportion = parseFloat(this.evaluationProportion) || 0;
const resolveProportion = parseFloat(this.resolveProportion) || 0;
this.proportion = (hflProportion + xylProportion + evaluationProportion + resolveProportion) / 4;
await this.getPieChart()
} catch (error) {
console.error('Error fetching data:', error);
}
},
calculateSum(data, names) {
return data.reduce((sum, item) => {
if (names.includes(item.name)) {
return sum + parseInt(item.value, 10);
}
return sum;
}, 0);
},
calculateTotalNum(data) {
return data.reduce((sum, item) => sum + parseInt(item.value, 10), 0);
},
// // this.$refs.pieChart.hideLoading()
this.$refs.lineChart.setOption(this.lineOption)
calculateProportion(part, whole) {
return ((part / whole) * 100).toFixed(2);
},
pieInitOk() {
this.pieInitState = true;
},
lineInitOk() {
this.lineInitState = true;
},
//
async getPieChart() {
this.$refs.pieChart.clear();
// pieChart
this.pieOption = pieOption();
this.pieOption.title.text = this.proportion + '%'
this.pieOption.series[1].data[0].value = this.proportion;
this.pieOption.series[1].data[1].value = 100 - this.proportion ;
this.$refs.pieChart.setOption(this.pieOption);
},
}
}
getLine() {
if (this.lineInitState) {
this.getLineChart();
} else {
setTimeout(() => {
this.getLine();
}, 500);
}
},
},
};
</script>
<style src="style/right2.scss" lang="scss" scoped>
</style>
<style src="style/right2.scss" lang="scss" scoped></style>

348
src/views/screenRight/right3.vue

@ -2,35 +2,34 @@
<div class="bg-content right3">
<div class='b-row1'>
<div b-sjtj>
<screen-title :titleName="'数据统计'"
style="width:310px"
:type="'short'"
:ifShowDropdown="true"></screen-title>
<div class="dataStatistics">
<screen-title :titleName="'数据统计'" style="width:310px" :type="'short'" :ifShowDropdown="true"></screen-title>
<div class="dataStatistics" v-if="dataTotal">
<div>
<div style="display: flex;">
<el-image style="width: 120px; height: 100px;margin-right: 8px;"
:src="require('../../assets/images/dataicon.png')"></el-image>
:src="require('../../assets/images/dataicon.png')"></el-image>
<div style="color:#fff;font-weight: 600;">
<div style="font-size: 24px;margin-bottom: 6px;">
{{format(dataTotal)}}
<div style="font-size: 24px;margin-bottom: 6px;" >
{{ format(dataTotal) }}
</div>
<div style="font-size: 16px;">总数</div>
</div>
</div>
<div>
<div style="display: flex;flex-direction: row;width: 100%;flex-wrap: wrap;justify-content: space-between;">
<div v-for="item in type"
:key="item.id"
style="width: 33%;display: flex;margin-bottom: 18px;">
<div
style="display: flex;flex-direction: row;width: 100%;flex-wrap: wrap;justify-content: space-between;">
<div v-for="item in type" :key="item.id"
style="width: 33%;display: flex;margin-bottom: 18px;">
<div :style="{width: '8px',height: '8px',backgroundColor:item.color,margin:'8px 8px 0 0'}"></div>
<div
:style="{ width: '8px', height: '8px', backgroundColor: item.color, margin: '8px 8px 0 0' }">
</div>
<div>
<div>
<span style="color:#188ab3;font-size: 18px;">{{ item.title }}</span>
</div>
<div style="color: #fff;font-size: 20px;">
{{format(item.num ) }}
{{ format(item.num) }}
</div>
</div>
</div>
@ -38,40 +37,36 @@
</div>
</div>
</div>
<div v-else>
<screen-loading style="width: 290px;height: 290px;" >加载中...</screen-loading>
</div>
</div>
<div b-myd>
<screen-title :titleName="'满意度'"
style="width:310px"
:type="'short'"></screen-title>
<div class="Satisfaction">
<div style="width: 290px;height: 290px;"
ref="chart"></div>
<screen-title :titleName="'满意度'" style="width:310px" :type="'short'"></screen-title>
<div class="Satisfaction" v-if="charData.length">
<div style="width: 290px;height: 290px;" ref="chart"></div>
</div>
<div v-else>
<screen-loading style="width: 290px;height: 290px;" >加载中...</screen-loading>
</div>
</div>
</div>
<div class='b-row2'>
<div b-sjlx>
<screen-title :titleName="'事件类型分析'"
style="width:310px"
:type="'short'"></screen-title>
<div class="Satisfaction">
<div style="width: 290px;height: 290px;"
ref="charts"></div>
<div >
<screen-title :titleName="'事件类型分析'" style="width:310px" :type="'short'" ></screen-title>
<div class="Satisfaction" v-if="charsData.length">
<div style="width: 290px;height: 290px;" ref="charts"></div>
</div>
<div v-else>
<screen-loading style="width: 290px;height: 290px;" >加载中...</screen-loading>
</div>
</div>
<div b-dxal>
<screen-title :titleName="'典型案例'"
style="width:310px"
:type="'short'"></screen-title>
<div @mouseenter="tableMouseEnter"
@mouseleave="tableMouseLeave"
class="ytal-list">
<div class="ytal-list-tran"
:style="{top: top, transition: transition}">
<div class="ytal-item"
v-for="(item,index) in ytalList"
:key="index">
<div class="ytal-item-detail">{{item.detail}}</div>
<screen-title :titleName="'典型案例'" style="width:310px" :type="'short'"></screen-title>
<div @mouseenter="tableMouseEnter" @mouseleave="tableMouseLeave" class="ytal-list">
<div class="ytal-list-tran" :style="{ top: top, transition: transition }">
<div class="ytal-item" v-for="(item, index) in ytalList" :key="index">
<div class="ytal-item-detail">{{ item.detail }}</div>
<div class="ytal-item-line"></div>
</div>
</div>
@ -79,31 +74,31 @@
</div>
</div>
<div class='b-hztj'>
<screen-title :titleName="'汇总统计'"></screen-title>
<screen-title :titleName="'汇总统计'">
<slot>
<div class="flex">
<div class="item"> <span>民生</span>{{totalLivelihoodCount|| 0}} </div>
<div class="item"> <span>发展</span>{{developCountTotal || 0}} </div>
<div class="item"> <span>执法</span> {{lawCountCountTotal || 0}}</div>
</div>
</slot>
</screen-title>
<div class="table">
<screen-custom-table :headerColor="'#BDE8FF'"
:headerHeight="'36px'"
:bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'"
:tableHeight="104"
:showTableLine="true"
:dataList="dataListResult"
:isChangeColor=false
:rowColor="'rgba(11,68,135,0.16)'"
:noData="noData"
:pageSize="pageSize"
:headerList="headerList">
<screen-custom-table :headerColor="'#BDE8FF'" :headerHeight="'36px'" :bodyTdColor="'#FFFFFF'"
:bodyTdFontSize="'18px'" :tableHeight="104" :showTableLine="true" :dataList="eventStatList"
:isChangeColor=false :rowColor="'rgba(11,68,135,0.16)'" :noData="noData" :pageSize="pageSize"
:headerList="headerList">
</screen-custom-table>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
import { loadXjphList, loadYtalList } from './../../data/index';
import { getItemdailystatis, getCategoryAnalysis, getEventStat,getEvaluationTotal } from '../../../src/api/bssbApi'
import { mapGetters } from 'vuex'
export default {
name: "screen-right3",
data() {
@ -113,78 +108,40 @@ export default {
{ id: 2, name: "测试测试测试" },
{ id: 3, name: "测试测试" },
],
dataTotal: 27054,
dataTotal: 0,
type: [{
id: 0,
title: "待响应",
num: 20,
num: 0,
color: "#f54f05"
}, {
id: 1,
title: "处理中",
num: 542,
num: 0,
color: "#00f097"
}, {
id: 2,
title: "已结案",
num: 26492,
num: 0,
color: "#00c3ff"
}, {
id: 3,
title: "红灯事件",
num: 21,
num: 0,
color: "#ff1466"
}, {
id: 4,
title: "黄灯事件",
num: 4,
num: 0,
color: "#f1be01"
}, {
id: 5,
title: "绿灯事件",
num: 537,
num: 0,
color: "#08c42c"
}],
charData: [
{
name: '不满意',
value: 20
},
{
name: '非常满意',
value: 45
},
{
name: '基本满意',
value: 35
}
],
charsData: [
{
name: '城市管理',
value: 20
},
{
name: '居民生活',
value: 45
},
{
name: '城管执法',
value: 35
},
{
name: '环境保护',
value: 20
},
{
name: '交通运输',
value: 45
},
{
name: '其他',
value: 35
}
],
charData: [],
charsData: [],//
chart: null,
charts: null,
ytalList: [],
@ -198,24 +155,31 @@ export default {
dataList: [],
dataListResult: [],
headerList: [{ title: '排名', width: '400px' }, { title: '街道', width: '1000px' }, { title: '诉求总数', width: '800px' }, { title: '民生诉求', width: '800px' }, { title: '发展诉求', width: '800px' }, '执法', { title: '响应率', color: '#00E099' }, { title: '办事率', color: '#FFB400' }],
headerList: [{ title: '街道', width: '1000px' }, { title: '诉求总数', width: '800px' }, { title: '民生诉求', width: '800px' }, { title: '发展诉求', width: '800px' }, '执法'],
noData: false,
eventStatList: [],//
lawCountCountTotal:0,
developCountTotal:0,
totalLivelihoodCount:0
}
},
mounted() {
this.renderChart()
this.renderCharts()
async mounted() {
const _this = this
window.addEventListener("resize", () => {
_this.chart.resize();
_this.charts.resize();
});
await this.getItemdailystatis()//
await this.getEventStat()//
await this.getEvaluationTotal()//
await this.getCategoryAnalysis()//
_this.ytalList = loadYtalList()
_this.dataList = loadXjphList()
_this.$nextTick(function () {
_this.initList()
this.renderChart()
this.renderCharts()
this.initList()
});
},
watch: {
@ -229,12 +193,122 @@ export default {
clearInterval(this.timer)
}
}
},
shibeiAId: {
handler() {
if (this.shibeiAId != '') {
this.getItemdailystatis()
this.getCategoryAnalysis()
this.getEventStat()
this.getEvaluationTotal()
this.initList()
this.renderChart()
this.renderCharts()
}
}
}
},
computed: {
...mapGetters(['shibeiAId'])
},
methods: {
async getEvaluationTotal(){
try {
let parm = {
endTime: "",
peopleFlag: "",// 1 2 3 4
startTime: "",
deptId: this.shibeiAId || '1175270520603930625'
}
let { data, code, msg } = await getEvaluationTotal(parm)
if (code == 0) {
this.charData = data
} else {
console.log(msg);
}
} catch (err) {
console.log(err);
}
},
//
async getEventStat() {
try {
let parm = {
endTime: "",
statType: "1",// 1 2 3 4
startTime: "",
deptId: this.shibeiAId || '1175270520603930625'
}
let { data, code, msg } = await getEventStat(parm)
if (code == 0) {
this.eventStatList = data
if(this.eventStatList.length === 0){
this.noData = true
}
} else {
console.log(msg);
}
} catch (err) {
console.log(err);
}
},
//
async getCategoryAnalysis() {
try {
let parm = {
endTime: "",
peopleFlag: "",
startTime: "",
deptId: this.shibeiAId || '1175270520603930625'
}
let { data, code, msg } = await getCategoryAnalysis(parm)
if (code == 0) {
this.charsData = data
} else {
console.log(msg);
}
} catch (err) {
console.log(err);
}
},
format(num) {
var reg = /\d{1,3}(?=(\d{3})+$)/g;
return (num + '').replace(reg, '$&,');
return (num + '').replace(reg, '$&,') || '--';
},
async getItemdailystatis() {
try {
let parm = {
endTime: "",
peopleFlag: "",
startTime: "",
deptId: this.shibeiAId || '1175270520603930625'
}
let { data, code, msg } = await getItemdailystatis(parm)
if (code == 0) {
const idMap = {
0: 'pendingTotal',
1: 'processingTotal',
2: 'closedTotal',
3: 'redTotal',
4: 'yellowTotal',
5: 'greenTotal',
};
this.type.forEach(item => {
const propertyName = idMap[item.id];
if (propertyName !== undefined && data.hasOwnProperty(propertyName)) {
item.num = data[propertyName];
}
});
this.dataTotal = data.total
} else {
console.log(msg);
}
} catch (err) {
console.log(err);
}
},
renderChart() {
const chart = echarts.init(this.$refs.chart);
@ -251,7 +325,7 @@ export default {
color: ["#f14f0c", "#15aae4", "#16e49c"],
tooltip: {
trigger: "item",
formatter: "{b}:{d}%"
formatter: "{b}:{c}"
},
series: [
{
@ -327,7 +401,8 @@ export default {
itemWidth: 8,//
itemHeight: 8,//
itemGap: 20,//
top: 200,
top: 180,
left: 20,
textStyle: {//
color: "#fff",
fontSize: 14,
@ -428,20 +503,26 @@ export default {
}, 5000)
},
initList() {
this.dataListResult = []
this.dataList.forEach(element => {
this.dataListResult.push([
element.no,
element.unit,
element.dys,
element.hts,
element.yts,
element.sqs,
element.jal,
element.myl,
])
});
//
if(this.eventStatList.length === 0)return
this.totalLivelihoodCount = this.eventStatList.reduce((sum, element) => {
return sum + element.livelihoodCount;
}, 0);
//
this.developCountTotal = this.eventStatList.reduce((sum, element) => {
return sum + element.developCount;
}, 0);
//
this.lawCountCountTotal = this.eventStatList.reduce((sum, element) => {
return sum + element.lawCount;
}, 0);
this.eventStatList = this.eventStatList.map(element => [
element.deptName,
element.eventCount,
element.livelihoodCount,
element.developCount,
element.lawCount,
]);
},
}
}
@ -452,9 +533,11 @@ export default {
.right3 {
margin-left: 12px;
}
.b-row1 {
height: 328px;
display: flex;
.dataStatistics {
padding: 24px 0 0 24px;
}
@ -464,6 +547,21 @@ export default {
}
}
.flex {
display: flex;
font-size: 14px;
font-style: normal;
position: absolute;
right: -458px;
top: 7px;
font-family: Alibaba PuHuiTi;
font-weight: 300;
.item {
margin-right: 10px;
}
}
.b-row2 {
height: 327px;
display: flex;

14
vue.config.js

@ -20,7 +20,7 @@ function diffOutputDir() {
function diffPublicPath() {
if (process.env.NODE_ENV === 'production') {
return '/public/frontend'
return '/ring-screen'
} else if (process.env.VUE_APP_SCREEN === 'beta') {
return '/vue_egg_ssr'
} else if (process.env.VUE_APP_SCREEN === 'dev') {
@ -30,7 +30,7 @@ function diffPublicPath() {
module.exports = defineConfig({
// 资源根路径
// publicPath: diffPublicPath(), //部署应用包时的基本URL, 用法和webpack本身的output.publicPath一致.
publicPath: diffPublicPath(), //部署应用包时的基本URL, 用法和webpack本身的output.publicPath一致.
// 打包根路径
// outputDir: diffOutputDir(), // npm run build 打包构建后存放的目录
@ -80,11 +80,11 @@ module.exports = defineConfig({
// 修复HMR
config.resolve.symlinks(true)
// 打包结果分析
if (process.env.NODE_ENV === 'development') {
config
.plugin('webpack-bundle-analyzer')
.use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
}
// if (process.env.NODE_ENV === 'development') {
// config
// .plugin('webpack-bundle-analyzer')
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
// }
},
// 调整 webpack 配置

Loading…
Cancel
Save