From 86567716bf2dd9fd6f6842054516c0ae3c3252da Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 8 Dec 2021 17:14:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/modules/visual/processAnalyze.scss | 92 +++++++++++----- src/assets/scss/modules/visual/resibuzz.scss | 53 ++++++--- .../visual/communityGovern/processAnalyze.vue | 54 ++++----- .../visual/communityGovern/resibuzz.vue | 103 +++--------------- 4 files changed, 145 insertions(+), 157 deletions(-) diff --git a/src/assets/scss/modules/visual/processAnalyze.scss b/src/assets/scss/modules/visual/processAnalyze.scss index 6aaea54c6..3a3a0f23b 100644 --- a/src/assets/scss/modules/visual/processAnalyze.scss +++ b/src/assets/scss/modules/visual/processAnalyze.scss @@ -19,23 +19,43 @@ span { display: block; } - .customer_cascader { - margin-left: 10px; - width: 280px; - } - .customer_select { - margin-left: 10px; + .second-title { display: flex; - justify-content: flex-start; - - > span { - width: auto; - font-size: 22px; - font-family: PingFang SC; - font-weight: 800; - color: #ffffff; - line-height: 34px; + align-items: center; + + .second-select { + margin: 0 10px 0 40px; + + ::v-deep .el-input { + width: 140px; + height: 36px; + .el-input__inner { + height: 100%; + padding: 0 10px; + color: #fff; + line-height: 36px; + background: #06186d; + border: 1px solid #1a64cc; + } + .el-icon-arrow-up:before { + content: '\e78f'; + } + } + ::v-deep .el-date-editor { + .el-input__prefix { + left: unset; + right: 5px; + } + } + } + .cascader { + ::v-deep .el-input { + width: 220px; + } + } + .second-select:last-child { + margin-left: 0; } } } @@ -43,8 +63,6 @@ .g-cpt-resi { display: flex; flex-direction: row; - // flex-wrap: wrap; - // justify-content: center; height: calc(100vh - 170px); .g-l { @@ -64,15 +82,6 @@ .l_bottom { height: calc(100vh - 230px - 385px); margin-top: 20px; - > span { - font-size: 18px; - font-family: PingFang SC; - font-weight: 800; - color: #ffffff; - } - .echart-line { - margin-top: 10px; - } } } @@ -83,6 +92,37 @@ height: calc(100vh - 160px - 20px); } } + +.l_bottom { + .bottom_label { + position: relative; + padding-left: 40px; + font-size: 16px; + font-weight: 500; + color: #fff; + } + .bottom_label::after { + content: ''; + position: absolute; + top: 50%; + left: 20px; + width: 12px; + height: 12px; + box-sizing: border-box; + margin-top: -6px; + background: #2865fa; + border-radius: 50%; + } + > span { + font-size: 18px; + font-family: PingFang SC; + font-weight: 800; + color: #ffffff; + } + .echart-line { + margin-top: 10px; + } +} .g-count { margin-top: 104px; margin-left: 52px; diff --git a/src/assets/scss/modules/visual/resibuzz.scss b/src/assets/scss/modules/visual/resibuzz.scss index a5a03d3e1..a5c3918e1 100644 --- a/src/assets/scss/modules/visual/resibuzz.scss +++ b/src/assets/scss/modules/visual/resibuzz.scss @@ -19,27 +19,46 @@ span { display: block; } - .customer_cascader { - margin-left: 10px; - width: 280px; + + .second-select { + margin: 0 10px 0 40px; + + ::v-deep .el-input { + width: 140px; + height: 36px; + .el-input__inner { + height: 100%; + padding: 0 10px; + color: #fff; + line-height: 36px; + background: #06186d; + border: 1px solid #1a64cc; + } + .el-icon-arrow-up:before { + content: '\e78f'; + } + } + ::v-deep .el-date-editor { + .el-input__prefix { + left: unset; + right: 5px; + } + } } - .customer_select { - position: absolute; - right: 20px; - top: 30px; - display: flex; - justify-content: flex-start; - - > span { - width: auto; - font-size: 22px; - font-family: PingFang SC; - font-weight: 800; - color: #ffffff; - line-height: 34px; + .cascader { + ::v-deep .el-input { + width: 220px; } } + .status-select { + position: absolute; + top: 20px; + right: 10px; + } + .second-select:last-child { + margin-left: 0; + } } .g-cpt-resi { diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue index d5f482582..86b0d733c 100644 --- a/src/views/modules/visual/communityGovern/processAnalyze.vue +++ b/src/views/modules/visual/communityGovern/processAnalyze.vue @@ -3,27 +3,27 @@
项目处理分析 - - -
- - - - - + +
+
+ +
+
+ + +
@@ -47,7 +47,7 @@
- 近12月新增项目数折线图 +
党建单位分类统计
@@ -125,7 +125,7 @@ export default { }, ], - status: 'all', + dateId: '', agencyId: '', casOptions: [], @@ -150,11 +150,16 @@ export default { async mounted () { this.userId = this.uid; + this.initData() this.getApiData(); }, methods: { + initData () { + var time = (new Date).getTime() - 24 * 60 * 60 * 1000; + this.dateId = new Date(time); // 获取的是前一天日期 + }, async getApiData () { await this.getAgencylist()//获取组织级别 await this.getProjectTotal() @@ -190,7 +195,7 @@ export default { const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal"; let params = { agencyId: '', - dateId: '', + dateId: this.dateId, }; const { data, code, msg } = await requestPost(url, params); @@ -265,7 +270,6 @@ export default { this.lineData = [0] } - debugger this.$refs.lineChart.setOption(this.lineOption) } else { this.$message.error(msg); diff --git a/src/views/modules/visual/communityGovern/resibuzz.vue b/src/views/modules/visual/communityGovern/resibuzz.vue index 2d1ea2e2c..9032eed2d 100644 --- a/src/views/modules/visual/communityGovern/resibuzz.vue +++ b/src/views/modules/visual/communityGovern/resibuzz.vue @@ -3,17 +3,19 @@
居民热议 - -
+
+ +
+
@@ -25,8 +27,8 @@
-
+
- From 8ef6c262afb282773fb592e6d257a75c1bb0801d Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 8 Dec 2021 17:50:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visual/communityGovern/processAnalyze.vue | 29 +- .../communityGovern/processLineOption.js | 69 ++- .../communityGovern/processPieOption.js | 57 +- .../visual/communityGovern/resibuzz.vue | 12 - .../components/screen-map/basicInfoMain.vue | 523 ++++++++++++++++++ 5 files changed, 648 insertions(+), 42 deletions(-) create mode 100644 src/views/modules/visual/components/screen-map/basicInfoMain.vue diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue index 86b0d733c..1517c4536 100644 --- a/src/views/modules/visual/communityGovern/processAnalyze.vue +++ b/src/views/modules/visual/communityGovern/processAnalyze.vue @@ -95,6 +95,7 @@ export default { lineColorArray: [], lineData: [820, 932, 901, 934, 1290, 1330, 1320], + pieChartS: null, pieChart: '', pieOption: {}, pieInitState: false, @@ -227,8 +228,9 @@ export default { } }, - pieInitOk () { + pieInitOk (dom) { console.log('pie准备好了') + this.pieChartS = dom this.pieInitState = true }, @@ -252,10 +254,11 @@ export default { const _that = this // this.$refs.pieChart.showLoading() - // const url ="/gov/issue/issue/resibuzz-leftpiechart"; - const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz-leftpiechart"; + // const url ="/data/aggregator/project/projectmonthincr"; + const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr"; let params = { agencyId: this.agencyId, + dateId: this.dateId, }; const { data, code, msg } = await requestPost(url, params); @@ -263,14 +266,28 @@ export default { if (code === 0) { // 获取pieChart配置 this.lineOption = lineOption() + let xaxis = [] + let totalIndexData = [] if (data && data.length > 0) { + data.forEach(item => { + xaxis.push(item.type) + totalIndexData.push(item.value) + }); // this.lineData = data } else { - this.lineData = [0] + } + this.$refs.lineChart.setOption(this.lineOption, true) + this.$refs.lineChart.setOption({ + xAxis: { data: xaxis }, + series: [ + { data: totalIndexData }, + + ] + }, true) + - this.$refs.lineChart.setOption(this.lineOption) } else { this.$message.error(msg); } @@ -295,7 +312,7 @@ export default { // this.$refs.pieChart.showLoading() // 获取pieChart配置 - this.pieOption = pieOption() + this.pieOption = pieOption(this.pieChartS) this.pieData.forEach(item => { this.pieTotal = this.pieTotal + item.value diff --git a/src/views/modules/visual/communityGovern/processLineOption.js b/src/views/modules/visual/communityGovern/processLineOption.js index 0d094b5c5..ef7dec010 100644 --- a/src/views/modules/visual/communityGovern/processLineOption.js +++ b/src/views/modules/visual/communityGovern/processLineOption.js @@ -1,21 +1,76 @@ - +import * as echarts from 'echarts' export function lineOption () { return { + xAxis: { type: 'category', - boundaryGap: false, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + // boundaryGap: false, + axisLabel: { + color: '#8ec7dc', + fontSize: 16 + }, + axisTick: { + show: false + }, + axisLine: { + lineStyle: { + color: '#0c4b59' + } + } }, yAxis: { - type: 'value' + nameTextStyle: { + color: '#8ec7dc', + fontSize: 18 + }, + splitNumber: 4, + minInterval: 1, + show: true, + type: 'value', + axisLabel: { + color: '#8ec7dc', + fontSize: 18 + }, + axisTick: { + show: false + }, + splitLine: { + lineStyle: { + color: ['#145968'], + type: 'dotted' + } + }, + axisLine: { + show: true, + symbol: ['none', 'arrow'], + symbolOffset: [0, 15], + lineStyle: { + color: '#0c4b59' + } + } }, series: [ { - data: [820, 932, 901, 934, 1290, 1330, 1320], + name: '项目数', type: 'line', - areaStyle: {} - } + barWidth: 15, + areaStyle: {}, + itemStyle: { + color: new echarts.graphic.LinearGradient( + 0, 1, 0, 0, + [ + { offset: 0, color: 'rgba(121, 55, 255, 0)' }, + { offset: 1, color: '#6339FF' } + ] + ) + } + }, + // { + // data: [820, 932, 901, 934, 1290, 1330, 1320], + // type: 'line', + // areaStyle: {} + // } ] } diff --git a/src/views/modules/visual/communityGovern/processPieOption.js b/src/views/modules/visual/communityGovern/processPieOption.js index a58528b73..0ab2bfd2c 100644 --- a/src/views/modules/visual/communityGovern/processPieOption.js +++ b/src/views/modules/visual/communityGovern/processPieOption.js @@ -1,5 +1,5 @@ -export function pieOption () { +export function pieOption (_charts) { const center= ['50%', '200px'] return { title: { @@ -85,33 +85,56 @@ const center= ['50%', '200px'] left: 'center', width: 400, label: { - position: 'outer', - // alignTo: 'edge', - formatter: '{a|{c}}\n\n{name|{b}}', - // minMargin: 100, - // edgeDistance: 0, - // lineHeight: 20, + // show: false, + position: 'outside', + alignTo: 'edge', + // formatter: '{a|{c}}\n\n{name|{b}}', + formatter: '{a|{c}}\n{r|}\n{name|{b}}', + minMargin: 5, + edgeDistance: 1, + lineHeight: 15, color: '#fff', fontSize: 12, - distanceToLabelLine: -60, + // distanceToLabelLine: -60, rich: { + name: { + padding: [0, 6, 0, 6] + }, a: { - fontSize: '30px', - color: ' #00F5FE', - + fontSize: 30, + color: '#fff', + padding: [0, 6, 6, 6] }, - b: { - lineHeight: 0, - fontSize: '20px', - color: ' #FFFFFF' - + r: { + backgroundColor: 'auto', + borderRadius: 6, + width: 6, + height: 6, + // padding: [3, 3, 0, -12] } } }, labelLine: { + show: false, smooth: 0.2, length: 30, - length2: 90 + length2: 0, + maxSurfaceAngle: 80 + }, + labelLayout: function (params) { + + const isLeft = params.labelRect.x < _charts.getWidth() / 2; + const points = params.labelLinePoints; + // Update the end point. + if (points) { + points[2][0] = isLeft + ? params.labelRect.x + : params.labelRect.x + params.labelRect.width; + } + + return { + labelLinePoints: points + }; }, itemStyle: { color:function(params) { diff --git a/src/views/modules/visual/communityGovern/resibuzz.vue b/src/views/modules/visual/communityGovern/resibuzz.vue index 9032eed2d..8b7406b6e 100644 --- a/src/views/modules/visual/communityGovern/resibuzz.vue +++ b/src/views/modules/visual/communityGovern/resibuzz.vue @@ -318,18 +318,6 @@ export default { }; console.log('zhilma') - // element.labelLayout = (params) => { - // const isLeft = params.labelRect.x < this.pieChartS.getWidth() / 2; - // const points = params.labelLinePoints; - // console.log('isLeft', isLeft, points) - // // Update the end point. - // points[2][0] = isLeft - // ? params.labelRect.x - // : params.labelRect.x + params.labelRect.width; - // return { - // labelLinePoints: points - // }; - // } } else { element.label = { diff --git a/src/views/modules/visual/components/screen-map/basicInfoMain.vue b/src/views/modules/visual/components/screen-map/basicInfoMain.vue new file mode 100644 index 000000000..6f48ebd46 --- /dev/null +++ b/src/views/modules/visual/components/screen-map/basicInfoMain.vue @@ -0,0 +1,523 @@ + + + + + + + \ No newline at end of file From 39d8122ae93207f7e7ff450b09f42a60d972213a Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 9 Dec 2021 14:21:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=B9=9D=E5=B0=8F=E5=9C=BA=E6=89=80?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/communityService/ninePlaces/team/team.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/modules/communityService/ninePlaces/team/team.vue b/src/views/modules/communityService/ninePlaces/team/team.vue index a828b7aea..9f93a0a0f 100644 --- a/src/views/modules/communityService/ninePlaces/team/team.vue +++ b/src/views/modules/communityService/ninePlaces/team/team.vue @@ -304,8 +304,11 @@ export default { this.tableData = data.list this.tableData.forEach(item => { - let timeArray = item.time.split(' ') - item.time = timeArray[0] + if (item.time) { + let timeArray = item.time.split(' ') + item.time = timeArray[0] + } + }); } else { this.$message.error(msg) From b65febdb4b558abd4247b58232bcb444837d3a85 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Thu, 9 Dec 2021 14:21:37 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .env.production.sit | 4 +- public/index.html | 3 +- .../visual/communityGovern/processAnalyze.vue | 2 + .../communityGovern/processPieOption.js | 2 +- .../{basicInfoMain.vue => index copy.vue} | 35 +- .../visual/components/screen-map/index.vue | 612 ++++++++++++++++++ 7 files changed, 635 insertions(+), 27 deletions(-) rename src/views/modules/visual/components/screen-map/{basicInfoMain.vue => index copy.vue} (94%) create mode 100644 src/views/modules/visual/components/screen-map/index.vue diff --git a/.env.development b/.env.development index 5431a9bc0..2ad1156bb 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ NODE_ENV=development -# VUE_APP_API_SERVER = http://118.190.150.119:41080/api -VUE_APP_API_SERVER = http://192.168.1.140/api +VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api +# VUE_APP_API_SERVER = http://192.168.1.140/api # VUE_APP_API_SERVER = http://192.168.51.36:8080/api # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api VUE_APP_NODE_ENV=dev diff --git a/.env.production.sit b/.env.production.sit index 6e5b4e9b6..de86de77c 100644 --- a/.env.production.sit +++ b/.env.production.sit @@ -1,5 +1,5 @@ NODE_ENV=production -# VUE_APP_API_SERVER = http://118.190.150.119:41080/api -VUE_APP_API_SERVER = http://192.168.1.140/api +VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api +# VUE_APP_API_SERVER = http://192.168.1.140/api VUE_APP_NODE_ENV=prod:sit VUE_APP_PUBLIC_PATH=epmet-oper \ No newline at end of file diff --git a/public/index.html b/public/index.html index a156e9391..99efda61b 100644 --- a/public/index.html +++ b/public/index.html @@ -36,7 +36,8 @@ <% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %> diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue index 1517c4536..10f8da5db 100644 --- a/src/views/modules/visual/communityGovern/processAnalyze.vue +++ b/src/views/modules/visual/communityGovern/processAnalyze.vue @@ -73,6 +73,7 @@ import { requestPost } from "@/js/dai/request"; import cptCard from "@/views/modules/visual/cpts/card"; import cptTb from "@/views/modules/visual/cpts/tb"; import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame"; +import screenMap from "@/views/modules/visual/components/screen-map"; import { pieOption } from './processPieOption.js' import { lineOption } from './processLineOption.js' @@ -397,6 +398,7 @@ export default { cptCard, cptTb, screenEchartsFrame, + screenMap, }, watch: { diff --git a/src/views/modules/visual/communityGovern/processPieOption.js b/src/views/modules/visual/communityGovern/processPieOption.js index 0ab2bfd2c..840629157 100644 --- a/src/views/modules/visual/communityGovern/processPieOption.js +++ b/src/views/modules/visual/communityGovern/processPieOption.js @@ -81,7 +81,7 @@ const center= ['50%', '200px'] avoidLabelOverlap: false, // top: top + '%', // height: '80%', - selectedMode: 'single', + // selectedMode: 'single', left: 'center', width: 400, label: { diff --git a/src/views/modules/visual/components/screen-map/basicInfoMain.vue b/src/views/modules/visual/components/screen-map/index copy.vue similarity index 94% rename from src/views/modules/visual/components/screen-map/basicInfoMain.vue rename to src/views/modules/visual/components/screen-map/index copy.vue index 6f48ebd46..09217e026 100644 --- a/src/views/modules/visual/components/screen-map/basicInfoMain.vue +++ b/src/views/modules/visual/components/screen-map/index copy.vue @@ -38,10 +38,10 @@ let loading;//加载动画 let map; let mapView; let gaodeMapLayer;//背景地图图层 -let polygonLayer;//变电站标注图层 +let polygonLayer;//区域标注图层 let iconLayer; // icon标注图层 let iconSource; // icon -let polygonSource;//变电站标注多边形 +let polygonSource;//标注多边形 let select;//选中标注 @@ -120,18 +120,6 @@ const vueGis = { currentCoordinate: null, overlay: null, - //右侧搜索 - searchName: "", - - //右侧列表 - listData: [],//得到的数据 - listDatashow: [],//处理成一行两列的数据 - - //下钻层级记录 - runNum: 0, - runAgencyArray: [], - selUserId: '', - } }, @@ -275,7 +263,7 @@ const vueGis = { let oneArray = [x, y] this.iconCoordinators.push(oneArray) // debugger - //视频监控样式 + let oneCctv = new Feature({ geometry: new Point([x, y]), id: oneIcon.id_, @@ -290,8 +278,6 @@ const vueGis = { // anchor: [0.5, 0.5], // imgSize: [32, 32], scale: 0.5, - // src: "/img/largeScreen/icon_camra.png" - // src: "https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20211116/a219130b6bc74b0b80b5ddb0fce0892a.png" src: iconUrlArray[oneIcon.values_.index - 1] }) }); @@ -468,11 +454,18 @@ const vueGis = { }, }, props: { + //是否显示多边形图层 + showPolygonLayer: { + type: Boolean, + default: false + }, + + //是否显示标注 + showIconLayer: { + type: Boolean, + default: false + } - // vueFlag: { - // type: String, - // default: "alarm" - // } }, computed: { diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue new file mode 100644 index 000000000..4dfac221a --- /dev/null +++ b/src/views/modules/visual/components/screen-map/index.vue @@ -0,0 +1,612 @@ + + + + + + + \ No newline at end of file