diff --git a/src/project/weiyang/AppPatrolReport/AppPatrolReport.vue b/src/project/weiyang/AppPatrolReport/AppPatrolReport.vue index ca0640f..d2f2761 100644 --- a/src/project/weiyang/AppPatrolReport/AppPatrolReport.vue +++ b/src/project/weiyang/AppPatrolReport/AppPatrolReport.vue @@ -32,10 +32,10 @@ export default { customNavigation: true, data() { return { - component: 'Statistics', + component: 'List', params: {}, refresh: true, - tabIndex: 1, + tabIndex: 0, tabs: [ { img: 'https://cdn.sinoecare.com/i/2024/07/17/6697387277fa3.png', diff --git a/src/project/weiyang/AppPatrolReport/Detail.vue b/src/project/weiyang/AppPatrolReport/Detail.vue index 51240df..91b143f 100644 --- a/src/project/weiyang/AppPatrolReport/Detail.vue +++ b/src/project/weiyang/AppPatrolReport/Detail.vue @@ -123,7 +123,7 @@ export default { id: '', doItShow: false, evaluation: {}, - isShowBtn: false, + isShowBtn: false, //统计列表进页面不显示操作按钮 backgroundNavbar: { background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat', backgroundSize: 'cover', diff --git a/src/project/weiyang/AppPatrolReport/List.vue b/src/project/weiyang/AppPatrolReport/List.vue index 0c1d815..db87afc 100644 --- a/src/project/weiyang/AppPatrolReport/List.vue +++ b/src/project/weiyang/AppPatrolReport/List.vue @@ -42,7 +42,7 @@ -
+
@@ -185,7 +185,6 @@ export default { height: 100%; padding: 0; width: 100vw; - background-color: #F4F5FA; .top-tab { width: calc(100% - 64px); diff --git a/src/project/weiyang/AppPatrolReport/Statistics.vue b/src/project/weiyang/AppPatrolReport/Statistics.vue index ceda559..0f72e12 100644 --- a/src/project/weiyang/AppPatrolReport/Statistics.vue +++ b/src/project/weiyang/AppPatrolReport/Statistics.vue @@ -14,38 +14,30 @@
-
-
概况总览
-
-
-

{{ item.value }}

-

{{ item.label }}

-
+
+
+
{{ item.label }}
+

{{ item.value }}

+
事件办结率
-
事件办结率
- - -
{{ finshNum || 0 }}%
+
- +
巡查上报趋势图
-
巡查上报趋势图
+ -
- -
-
巡查事件分类 +
巡查事件分类 - -
+ +
+
-
@@ -112,13 +104,10 @@ export default { var num = res.data.finishCountMap['累计事件办结'] / res.data.finishCountMap['累计事件上报'] this.finshNum = Number(num * 100).toFixed(2) } - - res.data.dateCountList.map((item) => { this.trendData.push(item.ecount) this.trendDataX.push(item.ymd) }) - res.data.groupList.map((item) => { var info = { name: item.groupName, @@ -127,66 +116,20 @@ export default { this.typeData.push(info) }) - this.$nextTick(() => { - if (this.showFinish) { - this.finishChartInit('finish') - var finish = { - categories: ["2018","2019","2020","2021","2022","2023"], - series: [ - { - name: "目标值", - data: [35,36,31,33,13,34] - }, - { - name: "完成量", - data: [18,27,21,24,6,28] - } - ] - }; - this.drawCharts('finish', this.finishData) - } - // if (this.trendData.length) { - // this.trendChartInit() - // } - // if (this.typeData.length) { - // this.typeChartInit() - // } - }) + if (this.showFinish) { + this.finishChartInit('finish') + } + if (this.trendData.length) { + this.trendChartInit('trend') + } + if (this.typeData.length) { + this.typeChartInit('type') + } + } }) }, - drawCharts(id, data) { - const ctx = uni.createCanvasContext(id, this); - uChartsInstance[id] = new uCharts({ - type: "ring", - context: ctx, - width: 346, - height: 232, - series: {series: data}, - animation: true, - background: "#FFFFFF", - color: ["#4B87FE", "#4AC98E", "#FF8002"], - padding: [15, 10, 0, 15], - enableScroll: false, - legend: {}, - xAxis: { - disableGrid: true, - }, - yAxis: { - gridType: "dash", - dashLength: 2, - }, - extra: { - line: { - type: "straight", - width: 2, - activeType: "hollow", - }, - }, - }); - }, - getGirdInfo() { this.$instance.post(`/app/apppatrolreportinfo/getRootByGirdMember`).then((res) => { if (res.code == 0) { @@ -198,19 +141,18 @@ export default { } }) }, - finishChartInit(id) { - console.log(this.finishData) - console.log(new uCharts()) - const ctx = uni.createCanvasContext(id, this); + var ctx = uni.createCanvasContext(id, this); uChartsInstance[id] = new uCharts({ type: "ring", + width: 350, + height: 250, context: ctx, - width: 346, - height: 232, - series: { - data: [{"name":"一班","value":50},{"name":"二班","value":30},{"name":"三班","value":20},{"name":"四班","value":18},{"name":"五班","value":8}] - }, + series: [ + { + data: this.finishData + } + ], animation: true, rotate: false, rotateLock: false, @@ -221,147 +163,113 @@ export default { enableScroll: false, legend: { show: true, - position: "right", + position: "bottom", lineHeight: 25 }, + title: { + name: "办结率", + fontSize: 12, + color: "#222" + }, subtitle: { - name: "70%", - fontSize: 25, - color: "#7cb5ec" + name: this.finshNum+'%', + fontSize: 20, + color: "#5C8FFA" }, extra: { ring: { - ringWidth: 60, + ringWidth: 40, activeOpacity: 0.5, activeRadius: 10, offsetAngle: 0, - labelWidth: 15, + labelWidth: 5, border: false, - borderWidth: 3, + borderWidth: 2, borderColor: "#FFFFFF" } } - }); + }) }, - - trendChartInit() { - this.trendChart = echarts.init(document.getElementById('trend')) - var option2 = { - grid: { - left: '5%', - right: '5%', - bottom: '3%', - containLabel: true + trendChartInit(id) { + const ctx = uni.createCanvasContext(id, this); + uChartsInstance[id] = new uCharts({ + type: "line", + context: ctx, + width: 346, + height: 232, + categories: this.trendDataX, + series: [ + { + name: '', + data: this.trendData + } + ], + animation: true, + background: "#FFFFFF", + color: ["#2891FF"], + padding: [15, 10, 0, 15], + enableScroll: false, + legend: { + show: false }, xAxis: { - type: 'category', - boundaryGap: false, - axisLine: { - lineStyle: { - color: '#E1E5EF', //x轴的颜色 - width: 1, //轴线的宽度 - }, - }, - axisLabel: { - show: true, - textStyle: { - color: '#666', - }, - }, - data: this.trendDataX + disableGrid: true, }, yAxis: { - axisLine: { //y轴 - show: false - }, - axisTick: { - show: false - }, - axisLabel: { - show: true, - textStyle: { - color: '#666', - }, - }, - type: 'value', + gridType: "dash", + dashLength: 2, }, - tooltip: { - trigger: 'axis' + linearType: 'custom', + serie: { + linearColor: '#5B8FF9' }, - series: [ - { - data: this.trendData, - type: 'line', - areaStyle: {//覆盖区域的渐变色 - normal: { - color: { - type: 'linear', x: 0, y: 0, x2: 0, y2: 1, - colorStops: [ - { - offset: 0, color: 'rgba(58,132,255, 0.8)' // 0% 处的颜色 - }, - { - offset: 1, color: 'rgba(58,132,255, 0)' // 100% 处的颜色 - } - ], - global: false // 缺省为 false - }, - } - }, - lineStyle: { - normal: { - color: '#2891FF' - } - }, - itemStyle: { - normal: { - color: '#2891FF', - } - } - } - ] - }; - this.trendChart.setOption(option2) + extra: { + line: { + type: "straight", + width: 2, + activeType: "hollow", + }, + }, + }); }, - - - - - - - - - typeChartInit() { - this.typeChart = echarts.init(document.getElementById('type')) - var option3 = { - tooltip: { - trigger: 'item' - }, + typeChartInit(id) { + var ctx = uni.createCanvasContext(id, this); + uChartsInstance[id] = new uCharts({ + type: "ring", + width: 350, + height: 250, + context: ctx, series: [ { - name: '巡查事件分类', - type: 'pie', - radius: ['0%', '70%'], - itemStyle: { - normal: { - color: function (colors) { - var colorList = ['#2891FF', '#FF8700', '#83B5F7', '#7E94F6', '#85E3D5', '#2891FF']; - return colorList[colors.dataIndex]; - } - }, - }, - data: this.typeData, - emphasis: { - itemStyle: { - shadowBlur: 10, - shadowOffsetX: 0, - shadowColor: 'rgba(0, 0, 0, 0.5)', - } - } + data: this.typeData } - ] - }; - this.typeChart.setOption(option3) + ], + animation: true, + rotate: false, + rotateLock: false, + background: "#FFFFFF", + color: ['#2891FF', '#FF8700', '#83B5F7', '#7E94F6', '#85E3D5', '#2891FF'], + padding: [5,5,5,5], + dataLabel: true, + enableScroll: false, + legend: { + show: true, + position: "bottom", + lineHeight: 25 + }, + extra: { + ring: { + ringWidth: 40, + activeOpacity: 0.5, + activeRadius: 10, + offsetAngle: 0, + labelWidth: 5, + border: false, + borderWidth: 2, + borderColor: "#FFFFFF" + } + } + }) }, selectStatus(e) { this.statusInfo.name = e[0].label @@ -379,7 +287,7 @@ export default { return searchType = index } }) - uni.navigateTo({url: `./StatisticsList?title=${row.label}&searchType=${searchType}&girdId=${this.selectGird.id}`}) + uni.navigateTo({url: `./StatisticsList?searchType=${searchType}&girdId=${this.selectGird.id}`}) } }, } @@ -387,6 +295,7 @@ export default { diff --git a/src/project/weiyang/AppPeopleList/PeopleList.vue b/src/project/weiyang/AppPeopleList/PeopleList.vue index 93ceed6..fe1d354 100644 --- a/src/project/weiyang/AppPeopleList/PeopleList.vue +++ b/src/project/weiyang/AppPeopleList/PeopleList.vue @@ -317,8 +317,6 @@ export default { border-top-right-radius: 16px; } - - // .top-tabs { // width: 100%; // padding: 0 32px;