From 45bfab9f8bb53625728d0e0e94c0cd48af5111c4 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 14 Dec 2021 13:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/modules/visual/issue-info.scss | 135 +++++++++ .../scss/modules/visual/processAnalyze.scss | 6 + src/assets/scss/modules/visual/resibuzz.scss | 7 + .../visual/communityGovern/cpt/issue-info.vue | 229 +++++++++++++++ .../visual/communityGovern/processAnalyze.vue | 241 ++++++++-------- .../communityGovern/processLineOption.js | 11 +- .../visual/communityGovern/resibuzz.vue | 272 ++++++++++-------- .../visual/communityGovern/typeAnalyze.vue | 58 ++-- .../visual/components/screen-map/index.vue | 7 +- .../visual/components/screen-nodata/index.vue | 34 +++ .../modules/visual/measure/volunteer.vue | 31 +- 11 files changed, 753 insertions(+), 278 deletions(-) create mode 100644 src/assets/scss/modules/visual/issue-info.scss create mode 100644 src/views/modules/visual/communityGovern/cpt/issue-info.vue create mode 100644 src/views/modules/visual/components/screen-nodata/index.vue diff --git a/src/assets/scss/modules/visual/issue-info.scss b/src/assets/scss/modules/visual/issue-info.scss new file mode 100644 index 000000000..da6031fb7 --- /dev/null +++ b/src/assets/scss/modules/visual/issue-info.scss @@ -0,0 +1,135 @@ +@import '../../c/config'; +@import '../../c/function'; +@import './c/common'; + +.m-pop { + @include shield; + background-color: rgba(#000, 0.9); + overflow-y: auto; + + .wrap { + position: relative; + margin: 120px auto; + width: 1020px; + + .title { + padding: 10px; + font-size: 22px; + font-family: PingFang SC; + font-weight: 800; + color: #ffffff; + display: flex; + align-items: center; + + img { + display: block; + margin-right: 5px; + } + span { + display: block; + } + } + + .btn-close { + position: absolute; + top: -10px; + right: -10px; + cursor: pointer; + } + + .line { + margin: 20px auto; + width: 900px; + height: 1px; + border: 1px dashed #1257c9; + } + } +} + +.m-content { + display: flex; +} + +.m-info { + padding-left: 62px; + font-size: 16px; + font-family: PingFang SC; + font-weight: 400; + color: #ffffff; + line-height: 24px; + width: 50%; + + .info-title { + margin-top: 30px; + font-size: 20px; + font-family: PingFang SC; + font-weight: bold; + color: #ffffff; + line-height: 30px; + } + + .info-prop { + position: relative; + margin: 10px 0; + display: flex; + padding-left: 15px; + + .info-pics { + display: flex; + margin: 20px 0; + img { + display: block; + width: 32%; + height: 90px; + margin-right: 9px; + object-fit: cover; + } + } + > span, + > div { + display: block; + max-width: 300px; + } + + &::before { + content: ''; + display: block; + position: absolute; + top: 9px; + left: 0; + width: 7px; + height: 7px; + background: #0c81fe; + border-radius: 3px; + margin-right: 10px; + } + } +} + +.m-line { + width: 50%; + + .stat { + margin: 20px 0 10px; + display: flex; + .stat-item { + width: 33%; + text-align: center; + + div { + font-size: 17px; + font-family: Source Han Serif SC; + font-weight: 500; + color: rgba(#fff, 0.5); + line-height: 24px; + &.z-weak { + font-size: 12px; + font-family: Source Han Serif SC; + font-weight: 500; + color: rgba(#fff, 0.5); + line-height: 24px; + } + } + } + } +} diff --git a/src/assets/scss/modules/visual/processAnalyze.scss b/src/assets/scss/modules/visual/processAnalyze.scss index 0cd1f8227..07c430f5e 100644 --- a/src/assets/scss/modules/visual/processAnalyze.scss +++ b/src/assets/scss/modules/visual/processAnalyze.scss @@ -293,3 +293,9 @@ } } } + +.table-status { + position: relative; + width: 600px; + margin: auto; +} diff --git a/src/assets/scss/modules/visual/resibuzz.scss b/src/assets/scss/modules/visual/resibuzz.scss index 138c09e20..91ff77054 100644 --- a/src/assets/scss/modules/visual/resibuzz.scss +++ b/src/assets/scss/modules/visual/resibuzz.scss @@ -134,3 +134,10 @@ height: 90%; } } + +.table-status { + position: relative; + width: 600px; + margin: auto; + margin-top: 200px; +} diff --git a/src/views/modules/visual/communityGovern/cpt/issue-info.vue b/src/views/modules/visual/communityGovern/cpt/issue-info.vue new file mode 100644 index 000000000..61df95682 --- /dev/null +++ b/src/views/modules/visual/communityGovern/cpt/issue-info.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue index 4e2e852d2..ec2ca8c87 100644 --- a/src/views/modules/visual/communityGovern/processAnalyze.vue +++ b/src/views/modules/visual/communityGovern/processAnalyze.vue @@ -41,7 +41,8 @@ {{monthIncr}} -
+
@@ -60,12 +61,26 @@
+ +
+ 加载中 +
+
近12月新增项目数
- + +
+ 加载中 +
@@ -105,6 +120,8 @@ import cptCard from "@/views/modules/visual/cpts/card"; import cptTb from "@/views/modules/visual/cpts/tb"; import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame"; import screenMap from "@/views/modules/visual/components/screen-map"; +import ScreenLoading from "@/views/modules/visual/components/screen-loading"; +import ScreenNodata from "@/views/modules/visual/components/screen-nodata"; import { pieOption } from './processPieOption.js' import { lineOption } from './processLineOption.js' @@ -115,9 +132,10 @@ export default { name: "HomeMap", data () { return { - showNoData: false, - timer: null, - isfirstInit: true, + dataLoading: true, + pieNoData: false, + lineNoData: false, + isfirstInit: true,//记录地图是否第一次加载 projectTotal: 0, dateIncr: 0, @@ -127,7 +145,9 @@ export default { lineOption: {}, lineInitState: false, lineColorArray: [], - lineData: [820, 932, 901, 934, 1290, 1330, 1320], + lineData: [], + lineXaxis: [], + lineSeriesData: [], pieChartS: null, pieChart: '', @@ -136,9 +156,8 @@ export default { pieTotal: 0, colorArray: [], pieData: [ - { value: 1048, name: '未结案', color: '#FAC126', selected: true }, - { value: 735, name: '已结案', color: '#3DDA83' }, - + // { value: 1048, name: '未结案', color: '#FAC126', selected: true }, + // { value: 735, name: '已结案', color: '#3DDA83' }, ], legendArray: [ @@ -182,26 +201,7 @@ export default { title: "南宁第二网格", } ], - projectList2: [ - { - agencyId: '', - projectId: '', - origin: '', - status: 'pending', - title: '山东路山东路', - latitude: 36.062227, - longitude: 120.379455, - }, - { - agencyId: '', - projectId: '', - origin: '', - status: 'closed', - latitude: 36.082227, - longitude: 120.379455, - title: "山东路", - } - ], + iconUrlArray: [], iconTextStyle: {}, @@ -222,87 +222,88 @@ export default { }, // mixins: [animate] beforeDestroy () { - this.timer && clearInterval(this.timer) + }, + async created () { - async mounted () { - this.userId = this.uid; + }, + async mounted () { + this.dataLoading = true + //初始化时间、各组件 this.initData() + await this.getAgencylist()//获取组织级别 + //获取服务器数据 + await this.getProjectTotal() + await this.getLineChart() + await this.loadProjectlist() + this.dataLoading = false - // this.agencyInfo = this.$store.state.user - // this.agencyId = this.agencyInfo.agencyId + this.assignData() - // await this.getWorkUserInfo() - await this.getAgencylist()//获取组织级别 - await nextTick(500) - await this.getApiData(); }, methods: { - initData () { - var time = (new Date).getTime() - 24 * 60 * 60 * 1000; - var nowdate = new Date(time); // 获取的是前一天日期 - var y = nowdate.getFullYear(); - var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1; - var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate(); - this.dateIdShow = y + '-' + m + '-' + d; - - }, async getApiData () { await this.getProjectTotal() + await this.getLineChart() await this.loadProjectlist() - await this.getLine() }, + assignData () { + this.getPie() + this.getLine() + }, + handleChangeDate (value) { this.dateIdShow = value - this.getApiData() }, // 获取当前登录人员信息及组织信息 - getAgencylist () { - const url = '/gov/org/customeragency/agencygridtree' - let params = {} - window.app.ajax.post( - url, - params, - (data, rspMsg) => { - this.agencyInfo = data - this.agencyId = this.agencyInfo.agencyId - if (!this.agencyInfo.latitude) { - this.agencyInfo.latitude = 36.072227 - } - if (!this.agencyInfo.longitude) { - this.agencyInfo.longitude = 120.389455 - } - if (!this.agencyInfo.level) { - this.agencyInfo.level = 'street' - } + async getAgencylist () { + const url = "/gov/org/customeragency/agencygridtree"; - //组织级联数据 - ++this.iscascaderShow - this.casOptions = [] - this.agencyIdArray.length = [] + let params = {}; - if (data) { - this.casOptions.push(data) - this.agencyIdArray.push(this.agencyId) - } + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.agencyInfo = data + this.agencyId = this.agencyInfo.agencyId + if (!this.agencyInfo.latitude) { + this.agencyInfo.latitude = 36.072227 + } + if (!this.agencyInfo.longitude) { + this.agencyInfo.longitude = 120.389455 + } + if (!this.agencyInfo.level) { + this.agencyInfo.level = 'street' + } - }, - (rspMsg, data) => { - this.$message.error(rspMsg) + //组织级联数据 + ++this.iscascaderShow + this.casOptions = [] + this.agencyIdArray.length = [] + + if (data) { + this.casOptions.push(data) + this.agencyIdArray.push(this.agencyId) } - ) + + } else { + this.$message.error(msg); + } }, //加载项目 async getProjectTotal () { - this.$refs.pieChart.showLoading() + if (this.$refs.pieChart) { + this.$refs.pieChart.showLoading() + this.$refs.pieChart.clear() + } + const url = "/data/aggregator/project/projecttotal"; // const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal"; let params = { @@ -311,8 +312,9 @@ export default { }; const { data, code, msg } = await requestPost(url, params); - - this.$refs.pieChart.hideLoading() + if (this.$refs.pieChart) { + this.$refs.pieChart.hideLoading() + } if (code === 0) { this.projectTotal = data.projectTotal this.dateIncr = data.dateIncr @@ -331,9 +333,6 @@ export default { } ] - this.getPie() - - } else { this.$message.error(msg); } @@ -409,14 +408,11 @@ export default { }, loadMap () { - if (this.isfirstInit) { //mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000) } else { this.$refs.map.refreshMap(null, this.projectList) - - } }, @@ -426,10 +422,8 @@ export default { }, pieInitOk (dom) { - this.pieChartS = dom this.pieInitState = true - }, lineInitOk () { @@ -438,7 +432,7 @@ export default { }, getLine () { if (this.lineInitState) { - this.getLineChart() + this.assignLineChart() } else { setTimeout(() => { this.getLine() @@ -447,8 +441,10 @@ export default { }, // 获取折线图 async getLineChart () { - this.$refs.lineChart.clear() - this.$refs.lineChart.showLoading() + if (this.$refs.lineChart) { + this.$refs.lineChart.clear() + this.$refs.lineChart.showLoading() + } const _that = this // this.$refs.pieChart.showLoading() const url = "/data/aggregator/project/projectmonthincr"; @@ -459,31 +455,27 @@ export default { }; const { data, code, msg } = await requestPost(url, params); - this.$refs.lineChart.hideLoading() + if (code === 0) { // 获取pieChart配置 - this.lineOption = lineOption() - let xaxis = [] - let totalIndexData = [] + + this.lineXaxis = [] + this.lineSeriesData = [] if (data && data.length > 0) { + this.lineNoData = false data.forEach(item => { - xaxis.push(item.type) - totalIndexData.push(item.value) + this.lineXaxis.push(item.type) + this.lineSeriesData.push(item.value) }); - // this.lineData = data + this.lineData = data } else { - + this.lineNoData = true } - this.$refs.lineChart.setOption(this.lineOption, true) - this.$refs.lineChart.setOption({ - xAxis: { data: xaxis }, - series: [ - { data: totalIndexData }, - - ] - }, true) + if (this.$refs.lineChart) { + this.$refs.lineChart.hideLoading() + } } else { this.$message.error(msg); @@ -492,9 +484,21 @@ export default { }, + assignLineChart () { + this.lineOption = lineOption() + this.$refs.lineChart.setOption(this.lineOption, true) + this.$refs.lineChart.setOption({ + xAxis: { data: this.lineXaxis }, + series: [ + { data: this.lineSeriesData }, + + ] + }, true) + }, + getPie () { if (this.pieInitState) { - this.getPieChart() + this.assignPieChart() } else { setTimeout(() => { this.getPie() @@ -502,12 +506,11 @@ export default { } }, // 获取饼状图 - async getPieChart () { - this.$refs.pieChart.clear() + async assignPieChart () { + this.pieTotal = 0 const _that = this - // 获取pieChart配置 this.pieOption = pieOption(this.pieChartS) @@ -575,7 +578,15 @@ export default { console.log(this.agencyIdArray) }, - + //初始化时间 + initData () { + var time = (new Date).getTime() - 24 * 60 * 60 * 1000; + var nowdate = new Date(time); // 获取的是前一天日期 + var y = nowdate.getFullYear(); + var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1; + var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate(); + this.dateIdShow = y + '-' + m + '-' + d; + }, toUserInfo (uid) { this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }); @@ -596,6 +607,8 @@ export default { cptTb, screenEchartsFrame, screenMap, + ScreenLoading, + ScreenNodata }, watch: { diff --git a/src/views/modules/visual/communityGovern/processLineOption.js b/src/views/modules/visual/communityGovern/processLineOption.js index ef7dec010..04b4f9503 100644 --- a/src/views/modules/visual/communityGovern/processLineOption.js +++ b/src/views/modules/visual/communityGovern/processLineOption.js @@ -2,7 +2,15 @@ import * as echarts from 'echarts' export function lineOption () { return { - + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross', + label: { + backgroundColor: '#6a7985' + } + } + }, xAxis: { type: 'category', // boundaryGap: false, @@ -54,6 +62,7 @@ export function lineOption () { { name: '项目数', type: 'line', + smooth: true, barWidth: 15, areaStyle: {}, itemStyle: { diff --git a/src/views/modules/visual/communityGovern/resibuzz.vue b/src/views/modules/visual/communityGovern/resibuzz.vue index 8d79875bd..84e9e9c08 100644 --- a/src/views/modules/visual/communityGovern/resibuzz.vue +++ b/src/views/modules/visual/communityGovern/resibuzz.vue @@ -31,10 +31,16 @@
- - + +
+ 加载中 +
@@ -43,7 +49,8 @@ + :list="demand.list" + @operate="toIssueInfo">
@@ -59,6 +66,11 @@
+ + + @@ -68,17 +80,20 @@ import { requestPost } from "@/js/dai/request"; import cptCard from "@/views/modules/visual/cpts/card"; import cptTb from "@/views/modules/visual/cpts/tb"; import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame"; - +import ScreenLoading from "@/views/modules/visual/components/screen-loading"; +import ScreenNodata from "@/views/modules/visual/components/screen-nodata"; import { pieOption } from './resiPieOption.js' import nextTick from 'dai-js/tools/nextTick' +import issueInfo from "./cpt/issue-info"; export default { name: "HomeMap", data () { return { - showNoData: false, - timer: null, + dataLoading: true, + pieNoData: false, + pieChartS: null, pieChart: '', pieOption: {}, @@ -86,18 +101,18 @@ export default { pieTotal: 0, colorArray: [], pieData: [ - { count: 1048, categoryName: '城市管理', color: '#1B51FF', selected: true }, - { count: 735, categoryName: '为民服务', color: '#00E5ED' }, - { count: 580, categoryName: '安全监管', color: '#7800FF' }, - { count: 484, categoryName: '民政', color: '#16D783' }, - { count: 300, categoryName: '环境保护', color: '#FF7800' }, - { count: 1048, categoryName: '建设管理', color: '#FFBA00' }, - { count: 735, categoryName: '街道吹哨部门报到', color: '#FFD685' }, - { count: 1580, categoryName: '社会治安综合', color: '#2A00FF' }, - { count: 484, categoryName: '公安交通管理', color: '#C600FF' }, - { count: 300, categoryName: '卫生计生监管执法', color: '#FF2A00' }, - { count: 484, categoryName: '民生', color: '#3DDA83' }, - { count: 300, categoryName: '街道安全', color: '#FAC126' } + // { count: 1048, categoryName: '城市管理', color: '#1B51FF', selected: true }, + // { count: 735, categoryName: '为民服务', color: '#00E5ED' }, + // { count: 580, categoryName: '安全监管', color: '#7800FF' }, + // { count: 484, categoryName: '民政', color: '#16D783' }, + // { count: 300, categoryName: '环境保护', color: '#FF7800' }, + // { count: 1048, categoryName: '建设管理', color: '#FFBA00' }, + // { count: 735, categoryName: '街道吹哨部门报到', color: '#FFD685' }, + // { count: 1580, categoryName: '社会治安综合', color: '#2A00FF' }, + // { count: 484, categoryName: '公安交通管理', color: '#C600FF' }, + // { count: 300, categoryName: '卫生计生监管执法', color: '#FF2A00' }, + // { count: 484, categoryName: '民生', color: '#3DDA83' }, + // { count: 300, categoryName: '街道安全', color: '#FAC126' } ], //voting 已转项目:shift_project 已关闭:closed,全部:all stateArray: [ @@ -122,6 +137,7 @@ export default { status: 'all', orgId: '', orgTypeSel: '', + tableList: [], demand: { loading: true, colList: [ @@ -175,8 +191,9 @@ export default { pageSize: 10, pageNo: 1, total: 0, - }, + showIssue: true, + issueId: 'cf48b7dc70ef4c319fd9c71890d9dbbb', casOptions: [], agencyIdArray: [], @@ -195,86 +212,71 @@ export default { }, // mixins: [animate] beforeDestroy () { - this.timer && clearInterval(this.timer) + }, async mounted () { - this.userId = this.uid; + this.dataLoading = true await this.getAgencylist()//获取组织级别 - await nextTick(500) - this.getApiData(); + await this.getApiData() + + this.dataLoading = false + + this.getPie() }, methods: { async getApiData () { - - await this.getPie() + await this.getPieChart() await this.getTable(); }, // 获取当前登录人员信息及组织信息 - getAgencylist () { - const url = '/gov/org/customeragency/agencygridtree' - let params = {} - window.app.ajax.post( - url, - params, - (data, rspMsg) => { - this.agencyInfo = data - this.orgId = this.agencyInfo.agencyId - this.orgType = this.agencyInfo.level === 'grid' ? 'grid' : 'agency' - - - if (!this.agencyInfo.latitude) { - this.agencyInfo.latitude = 36.072227 - } - if (!this.agencyInfo.longitude) { - this.agencyInfo.longitude = 120.389455 - } - if (!this.agencyInfo.level) { - this.agencyInfo.level = 'street' - } + async getAgencylist () { + const url = "/gov/org/customeragency/agencygridtree"; + let params = {}; - //组织级联数据 - ++this.iscascaderShow - this.casOptions = [] - this.agencyIdArray.length = [] + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.agencyInfo = data + this.orgId = this.agencyInfo.agencyId + this.orgType = this.agencyInfo.level === 'grid' ? 'grid' : 'agency' - if (data) { - this.casOptions.push(data) - this.agencyIdArray.push(this.agencyInfo.orgLevel) - } - }, - (rspMsg, data) => { - this.$message.error(rspMsg) + if (!this.agencyInfo.latitude) { + this.agencyInfo.latitude = 36.072227 + } + if (!this.agencyInfo.longitude) { + this.agencyInfo.longitude = 120.389455 + } + if (!this.agencyInfo.level) { + this.agencyInfo.level = 'street' } - ) - }, + //组织级联数据 + ++this.iscascaderShow + this.casOptions = [] + this.agencyIdArray.length = [] - pieInitOk (dom) { - console.log('pie准备好了', dom) - this.pieChartS = dom - this.pieInitState = true + if (data) { + this.casOptions.push(data) + this.agencyIdArray.push(this.agencyInfo.orgLevel) + } - }, - getPie () { - if (this.pieInitState) { - this.getPieChart() } else { - setTimeout(() => { - this.getPie() - }, 500) + this.$message.error(msg); } + + }, // 获取饼状图 async getPieChart () { - this.$refs.pieChart.clear() - this.pieTotal = 0 - const _that = this - // this.$refs.pieChart.showLoading() + if (this.$refs.pieChart) { + this.$refs.pieChart.clear() + this.$refs.pieChart.showLoading() + } + const url = "/gov/issue/issue/resibuzz-leftpiechart"; // const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz-leftpiechart"; let params = { @@ -286,54 +288,40 @@ export default { const { data, code, msg } = await requestPost(url, params); if (code === 0) { - // 获取pieChart配置 - this.pieOption = pieOption(this.pieChartS) if (data && data.length > 0) { + this.pieData = data } else { - this.pieData = [{ count: 0, categoryName: '无分类', color: '#00E5ED' }] - } + this.pieData = [] - let maxValue = this.pieData[0].count - let maxIndex = 0 - this.pieData[0].selected = true - - this.pieData.forEach((item, index) => { - item.name = item.categoryName - item.value = item.count - this.colorArray.push(item.color) - this.pieTotal = this.pieTotal + item.value - - if (item.value > maxValue) { - maxValue = item.value - maxIndex = index - item.selected = true - } else if (index !== 0) { - item.selected = false - } - - }); - - - this.pieOption.title.text = this.pieTotal - this.pieOption.series[1].itemStyle = { - color: function (params) { - return _that.colorArray[params.dataIndex] - } } - this.clickPie(maxIndex) - let fun = function (params) { - _that.clickPie(params.dataIndex) + if (this.$refs.pieChart) { + this.$refs.pieChart.hideLoading() } - this.$refs.pieChart.handleClick(fun) + } else { this.$message.error(msg); } + }, + + pieInitOk (dom) { + console.log('pie准备好了', dom) + this.pieChartS = dom + this.pieInitState = true }, + getPie () { + if (this.pieInitState) { + this.assignPieChart() + } else { + setTimeout(() => { + this.getPie() + }, 500) + } + }, clickPie (seriesIndex) { this.pieData.forEach((element, index) => { @@ -368,28 +356,76 @@ export default { } }); this.pieOption.series[1].data = this.pieData - // this.$refs.pieChart.hideLoading() + this.$refs.pieChart.setOption(this.pieOption) }, + assignPieChart () { + + this.pieTotal = 0 + + if (this.pieData.length > 0) { + this.pieNoData = false + const _that = this + let maxIndex = 0 + let maxValue = this.pieData[0].count + + this.pieData[0].selected = true + + this.pieData.forEach((item, index) => { + item.name = item.categoryName + item.value = item.count + this.colorArray.push(item.color) + this.pieTotal = this.pieTotal + item.value + + if (item.value > maxValue) { + maxValue = item.value + maxIndex = index + item.selected = true + } else if (index !== 0) { + item.selected = false + } + + }); + // 获取pieChart配置 + this.pieOption = pieOption(this.pieChartS) + this.pieOption.title.text = this.pieTotal + this.pieOption.series[1].itemStyle = { + color: function (params) { + return _that.colorArray[params.dataIndex] + } + } + this.clickPie(maxIndex) + + let fun = function (params) { + _that.clickPie(params.dataIndex) + } + this.$refs.pieChart.handleClick(fun) + } else { + this.pieNoData = true + } + + }, + handleChangeState (index) { this.getTable() }, - handleChangeAgency (value) { + async handleChangeAgency (value) { let orgArray = [] let key = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '' if (key) { orgArray = key.split('-') this.orgId = orgArray[0] - this.orgType = orgArray[1] + this.orgType = orgArray[1] === 'grid' ? 'grid' : 'agency' } else { this.orgId = '' this.orgType = '' } - this.getApiData() + await this.getApiData() + this.assignPieChart() }, @@ -410,6 +446,7 @@ export default { if (code === 0) { this.demand.total = data.total; + this.tableList = data.list this.demand.list = data.list.map((item) => { return [ { type: "index" }, @@ -434,8 +471,12 @@ export default { this.demand.pageNo = val; this.getTable(); }, - toUserInfo (uid) { - this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }); + + async toIssueInfo (index) { + const { tableList } = this; + this.issueId = tableList[index].issueId + this.showIssue = true + }, }, props: { @@ -452,6 +493,9 @@ export default { cptCard, cptTb, screenEchartsFrame, + ScreenLoading, + ScreenNodata, + issueInfo }, watch: { diff --git a/src/views/modules/visual/communityGovern/typeAnalyze.vue b/src/views/modules/visual/communityGovern/typeAnalyze.vue index 61e1bfd6a..d6a9d6299 100644 --- a/src/views/modules/visual/communityGovern/typeAnalyze.vue +++ b/src/views/modules/visual/communityGovern/typeAnalyze.vue @@ -194,40 +194,38 @@ export default { }, // 获取当前登录人员信息及组织信息 - getAgencylist () { - const url = '/gov/org/customeragency/agencygridtree' - let params = {} - window.app.ajax.post( - url, - params, - (data, rspMsg) => { - this.agencyInfo = data - this.agencyId = this.agencyInfo.agencyId - if (!this.agencyInfo.latitude) { - this.agencyInfo.latitude = 36.072227 - } - if (!this.agencyInfo.longitude) { - this.agencyInfo.longitude = 120.389455 - } - if (!this.agencyInfo.level) { - this.agencyInfo.level = 'street' - } + async getAgencylist () { + const url = "/gov/org/customeragency/agencygridtree"; - //组织级联数据 - ++this.iscascaderShow - this.casOptions = [] - this.agencyIdArray.length = [] + let params = {}; - if (data) { - this.casOptions.push(data) - this.agencyIdArray.push(this.agencyId) - } + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.agencyInfo = data + this.agencyId = this.agencyInfo.agencyId + if (!this.agencyInfo.latitude) { + this.agencyInfo.latitude = 36.072227 + } + if (!this.agencyInfo.longitude) { + this.agencyInfo.longitude = 120.389455 + } + if (!this.agencyInfo.level) { + this.agencyInfo.level = 'street' + } - }, - (rspMsg, data) => { - this.$message.error(rspMsg) + //组织级联数据 + ++this.iscascaderShow + this.casOptions = [] + this.agencyIdArray.length = [] + + if (data) { + this.casOptions.push(data) + this.agencyIdArray.push(this.agencyId) } - ) + + } else { + this.$message.error(msg); + } }, diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue index 107a66222..3e593ed55 100644 --- a/src/views/modules/visual/components/screen-map/index.vue +++ b/src/views/modules/visual/components/screen-map/index.vue @@ -49,10 +49,6 @@ let iconSource; // icon let select;//选中标注 -//url图标 - - - let polygonColorArray = [ 'rgba(210, 2, 2, 0.24)', 'rgba(43, 231, 253, 0.25)', @@ -60,8 +56,7 @@ let polygonColorArray = [ ]; -//变电站标注样式 - +//多边形标注样式 var polygonStyleFunction = (function () { return function (feature) { return new Style({ diff --git a/src/views/modules/visual/components/screen-nodata/index.vue b/src/views/modules/visual/components/screen-nodata/index.vue new file mode 100644 index 000000000..9c34b2535 --- /dev/null +++ b/src/views/modules/visual/components/screen-nodata/index.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/views/modules/visual/measure/volunteer.vue b/src/views/modules/visual/measure/volunteer.vue index a39f7e784..e51142979 100644 --- a/src/views/modules/visual/measure/volunteer.vue +++ b/src/views/modules/visual/measure/volunteer.vue @@ -71,6 +71,12 @@
+
+ +
-
- -
-
@@ -487,6 +486,7 @@ export default { .card-wr:last-child { margin-left: 20px; } + padding: 25px 21px 15px 24px; } .card-title { display: flex; @@ -494,10 +494,10 @@ export default { cursor: pointer; .title-icon { display: block; - width: 46px; - height: 34px; + width: 36px; + height: 29px; box-sizing: border-box; - margin-right: 6px; + margin-right: 3px; } .title-label { font-size: 16px; @@ -593,17 +593,20 @@ export default { } .map-tips { - width: 100%; + width: 700px; display: flex; + justify-content: start; flex-wrap: wrap; padding-top: 10px; padding-bottom: 20px; .map-tips-item { display: flex; + align-items: center; - margin-top: 20px; + margin-top: 10px; margin-right: 40px; + .map-tips-icon { width: 20px; height: 10px; @@ -621,10 +624,12 @@ export default { .card-wr-map { height: calc(100vh - 110px); + text-align: center; .card-map { + margin-top: 10px; width: 100%; - height: calc(100vh - 255px); + height: calc(100vh - 295px); .map { width: 100%;