修复BUG

This commit is contained in:
aixianling
2023-09-11 11:08:13 +08:00
parent 7aa9601f22
commit 568ffbb825
3 changed files with 70 additions and 56 deletions

2
.npmrc
View File

@@ -1,5 +1,5 @@
registry=http://192.168.1.87:4873/ registry=http://192.168.1.87:4873/
email=aixianling@sinoecare.com email=aixianling@sinoecare.com
always-auth=true always-auth=true
_auth="YWRtaW46YWRtaW4xMjM="
package-lock=false package-lock=false
//192.168.1.87:4873/:_auth="YWRtaW46YWRtaW4xMjM="

View File

@@ -81,17 +81,18 @@ export default {
if (this.isMyGirds) { if (this.isMyGirds) {
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2` url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2`
} }
if(this.$route.query.action) { if (this.$route.query.action) {
url = this.$route.query.action url = this.$route.query.action
} }
this.$http.post(url, null, {params}).then((res) => { this.$http.post(url, null, {params}).then((res) => {
if (res?.data) { if (res?.data) {
let parents = res.data.map(e => e.parentGirdId) let parents = res.data.map(e => e.parentGirdId)
console.log(parents)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)})) this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
this.treeInit() this.treeInit()
if(this.$route.query.selected) { //确认按钮弹窗报错 if (this.$route.query.selected) { //确认按钮弹窗报错
this.allData.map((item) => { this.allData.map((item) => {
if(item.id == this.$route.query.selected) { if (item.id == this.$route.query.selected) {
this.SelectGird = item this.SelectGird = item
} }
}) })
@@ -106,7 +107,10 @@ export default {
params: {girdId: last} params: {girdId: last}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
this.selectList = [{girdName: '可选范围', id: ''}, res.data.filter(e => !!this.allData.find(a => a.id == e.id))].flat() this.selectList = [{
girdName: '可选范围',
id: ''
}, res.data.filter(e => !!this.allData.find(a => a.id == e.id))].flat()
this.getGridsByGridMemberAndParent({id: last}) this.getGridsByGridMemberAndParent({id: last})
} }
}) })
@@ -138,7 +142,7 @@ export default {
this.selectList = [] this.selectList = []
this.treeInit(true) this.treeInit(true)
} else { } else {
this.selectList.splice(index, 8) this.selectList.splice(index + 1, 8)
this.getGridsByGridMemberAndParent(row) this.getGridsByGridMemberAndParent(row)
} }
}, },

View File

@@ -2,15 +2,9 @@
<div class="statistics"> <div class="statistics">
<AiTopFixed> <AiTopFixed>
<div class="select-gird"> <div class="select-gird">
<!-- <AiPagePicker type="gird" v-model="selectGird" valueObj nodeKey="id" class="right-span" @change="handleSelectGird" <AiPagePicker type="gird" valueObj nodeKey="id" formType="2" @select="handleSelectGird" class="right-span"
action="/app/apppatrolreportinfo/listByInfo"> action="/app/apppatrolreportinfo/listByInfo">
<AiMore v-model="selectGird.girdName"/>
</AiPagePicker> -->
<AiPagePicker type="gird" valueObj nodeKey="id" formType="2" @select="handleSelectGird" class="right-span" action="/app/appgirdmemberinfo/queryMyGirdList">
<AiMore v-model="selectGird.girdName" icon="arrow-right" placeholder="选择网格"/> <AiMore v-model="selectGird.girdName" icon="arrow-right" placeholder="选择网格"/>
<!-- <span :class="searchGrid.girdName ? 'grid-name' : 'grid-name color-999'">{{searchGrid.girdName || '所属网格'}}</span>
<u-icon name="close-circle" color="#999" size="34" style="margin-left: 4px" v-if="searchGrid.girdName" @click.stop="clearGrid" />
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px" v-else /> -->
</AiPagePicker> </AiPagePicker>
</div> </div>
</AiTopFixed> </AiTopFixed>
@@ -19,15 +13,15 @@
<div class="title">概况总览</div> <div class="title">概况总览</div>
<div class="el-row"> <div class="el-row">
<div class="item" v-for="(item, index) in todayList" :key="index" @click="toList(item)"> <div class="item" v-for="(item, index) in todayList" :key="index" @click="toList(item)">
<h2>{{item.value}}</h2> <h2>{{ item.value }}</h2>
<p>{{item.label}}</p> <p>{{ item.label }}</p>
</div> </div>
</div> </div>
</div> </div>
<div class="info-content"> <div class="info-content">
<div class="title">事件办结率</div> <div class="title">事件办结率</div>
<div class="echart-content" id="finish" v-if="showFinish"></div> <div class="echart-content" id="finish" v-if="showFinish"></div>
<div class="num" v-if="showFinish">{{finshNum || 0}}%</div> <div class="num" v-if="showFinish">{{ finshNum || 0 }}%</div>
<AiEmpty v-else></AiEmpty> <AiEmpty v-else></AiEmpty>
</div> </div>
@@ -40,7 +34,8 @@
<div class="info-content"> <div class="info-content">
<div class="title">巡查事件分类 <div class="title">巡查事件分类
<!-- <div class="type-select" :style="statusInfo.name ? '' : 'color:#999;'" @click="show=true">{{statusInfo.name || '请选择'}}<u-icon name="arrow-right"></u-icon></div> --> <!-- <div class="type-select" :style="statusInfo.name ? '' : 'color:#999;'" @click="show=true">{{statusInfo.name || '请选择'}}<u-icon name="arrow-right"></u-icon></div> -->
<u-select v-model="show" :list="$dict.getDict('clapEventStatusHistory')" value-name="dictValue" label-name="dictName" @confirm="selectStatus"></u-select> <u-select v-model="show" :list="$dict.getDict('clapEventStatusHistory')" value-name="dictValue"
label-name="dictName" @confirm="selectStatus"></u-select>
</div> </div>
<AiEmpty v-if="!typeData.length"></AiEmpty> <AiEmpty v-if="!typeData.length"></AiEmpty>
<div class="echart-content" id="type" v-else></div> <div class="echart-content" id="type" v-else></div>
@@ -53,6 +48,7 @@
<script> <script>
import {mapState} from 'vuex' import {mapState} from 'vuex'
import echarts from 'echarts' import echarts from 'echarts'
export default { export default {
props: {}, props: {},
data() { data() {
@@ -98,15 +94,15 @@ export default {
name: key, name: key,
value: res.data.finishCountMap[key] value: res.data.finishCountMap[key]
} }
if(res.data.finishCountMap[key] > 0) { if (res.data.finishCountMap[key] > 0) {
this.showFinish = true this.showFinish = true
} }
this.finishData.push(info) this.finishData.push(info)
}) })
if(this.showFinish) { if (this.showFinish) {
var num = res.data.finishCountMap['累计事件办结']/res.data.finishCountMap['累计事件上报'] var num = res.data.finishCountMap['累计事件办结'] / res.data.finishCountMap['累计事件上报']
this.finshNum = Number(num*100).toFixed(2) this.finshNum = Number(num * 100).toFixed(2)
} }
@@ -124,13 +120,13 @@ export default {
}) })
this.$nextTick(() => { this.$nextTick(() => {
if(this.showFinish) { if (this.showFinish) {
this.finishChartInit() this.finishChartInit()
} }
if(this.trendData.length) { if (this.trendData.length) {
this.trendChartInit() this.trendChartInit()
} }
if(this.typeData.length) { if (this.typeData.length) {
this.typeChartInit() this.typeChartInit()
} }
}) })
@@ -210,7 +206,7 @@ export default {
data: this.trendDataX data: this.trendDataX
}, },
yAxis: { yAxis: {
axisLine:{ //y轴 axisLine: { //y轴
show: false show: false
}, },
axisTick: { axisTick: {
@@ -234,7 +230,7 @@ export default {
areaStyle: {//覆盖区域的渐变色 areaStyle: {//覆盖区域的渐变色
normal: { normal: {
color: { color: {
type: 'linear',x: 0,y: 0,x2: 0,y2: 1, type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
colorStops: [ colorStops: [
{ {
offset: 0, color: 'rgba(58,132,255, 0.8)' // 0% 处的颜色 offset: 0, color: 'rgba(58,132,255, 0.8)' // 0% 处的颜色
@@ -252,9 +248,9 @@ export default {
color: '#2891FF' color: '#2891FF'
} }
}, },
itemStyle : { itemStyle: {
normal : { normal: {
color:'#2891FF', color: '#2891FF',
} }
} }
} }
@@ -306,9 +302,9 @@ export default {
this.getStatistics() this.getStatistics()
}, },
toList(row) { toList(row) {
var searchType = '', typeList= ['', '', '累计上报', '今日上报', '今日办结', '办理中'] var searchType = '', typeList = ['', '', '累计上报', '今日上报', '今日办结', '办理中']
typeList.map((item, index) => { typeList.map((item, index) => {
if(item == row.label) { if (item == row.label) {
return searchType = index return searchType = index
} }
}) })
@@ -325,40 +321,47 @@ export default {
.statstics-content { .statstics-content {
padding: 30px 30px 0; padding: 30px 30px 0;
} }
::v-deep .AiTopFixed { ::v-deep .AiTopFixed {
.content { .content {
background-color: #3975C6; background-color: #3975C6;
color: #fff; color: #fff;
} }
.icon-img{
.icon-img {
width: 48px; width: 48px;
height: 48px; height: 48px;
} }
} }
::v-deep .AiMore{
span{ ::v-deep .AiMore {
span {
color: #fff; color: #fff;
} }
} }
.info-content{
.info-content {
width: 100%; width: 100%;
background: #FFF; background: #FFF;
border-radius: 16px; border-radius: 16px;
margin-bottom: 24px; margin-bottom: 24px;
position: relative; position: relative;
padding-bottom: 32px; padding-bottom: 32px;
.title{
.title {
font-size: 32px; font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333; color: #333;
line-height: 48px; line-height: 48px;
padding: 24px 16px 24px 24px; padding: 24px 16px 24px 24px;
img{
img {
float: right; float: right;
width: 40px; width: 40px;
height: 40px; height: 40px;
} }
.type-select { .type-select {
font-size: 26px; font-size: 26px;
position: absolute; position: absolute;
@@ -369,13 +372,16 @@ export default {
line-height: 48px; line-height: 48px;
} }
} }
.el-row{
.el-row {
display: flex; display: flex;
padding: 32px 0 60px 0; padding: 32px 0 60px 0;
.item{
.item {
flex: 1; flex: 1;
text-align: center; text-align: center;
h2{
h2 {
font-size: 64px; font-size: 64px;
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold; font-weight: bold;
@@ -383,7 +389,8 @@ export default {
line-height: 64px; line-height: 64px;
margin-bottom: 8px; margin-bottom: 8px;
} }
p{
p {
font-size: 28px; font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
color: #999; color: #999;
@@ -391,10 +398,12 @@ export default {
} }
} }
} }
.echart-content { .echart-content {
width: 100%; width: 100%;
height: 500px; height: 500px;
} }
.num { .num {
position: absolute; position: absolute;
left: 50%; left: 50%;
@@ -406,7 +415,8 @@ export default {
text-align: center; text-align: center;
} }
} }
.pad-b120{
.pad-b120 {
background-color: #F3F7F8; background-color: #F3F7F8;
padding-bottom: 120px; padding-bottom: 120px;
} }