修复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/
email=aixianling@sinoecare.com
always-auth=true
_auth="YWRtaW46YWRtaW4xMjM="
package-lock=false
//192.168.1.87:4873/:_auth="YWRtaW46YWRtaW4xMjM="

View File

@@ -81,17 +81,18 @@ export default {
if (this.isMyGirds) {
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2`
}
if(this.$route.query.action) {
if (this.$route.query.action) {
url = this.$route.query.action
}
this.$http.post(url, null, {params}).then((res) => {
if (res?.data) {
let parents = res.data.map(e => e.parentGirdId)
console.log(parents)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
this.treeInit()
if(this.$route.query.selected) { //确认按钮弹窗报错
this.allData.map((item) => {
if(item.id == this.$route.query.selected) {
if (this.$route.query.selected) { //确认按钮弹窗报错
this.allData.map((item) => {
if (item.id == this.$route.query.selected) {
this.SelectGird = item
}
})
@@ -106,7 +107,10 @@ export default {
params: {girdId: last}
}).then(res => {
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})
}
})
@@ -131,14 +135,14 @@ export default {
let {id: parentGirdId} = row
this.options = this.allData.filter(e => e.parentGirdId == parentGirdId)
this.options.map((item) => item.isChecked = this.selected.includes(item.id))
},
girdNameClick(row, index) {
if (!index) { //第一级别
this.selectList = []
this.treeInit(true)
} else {
this.selectList.splice(index, 8)
this.selectList.splice(index + 1, 8)
this.getGridsByGridMemberAndParent(row)
}
},

View File

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