BUG 26284

This commit is contained in:
aixianling
2021-12-31 18:04:00 +08:00
parent 53edae3f26
commit 2a941d4fc9
3 changed files with 47 additions and 41 deletions

View File

@@ -44,7 +44,7 @@
<div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">起租日期</span>
<div class="value" @click="dateShow=true">
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ houseInfo.startDate || '请选择' }}</span>
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ $dateFormat(houseInfo.startDate,'YYYY-MM-DD') || '请选择' }}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
@@ -167,9 +167,6 @@ export default {
let {id} = this.$route.query
id && this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if (res?.data) {
if (res.data.startDate) {
res.data.startDate = res.data.startDate.substring(0, 10)
}
this.houseInfo = res.data
}
})
@@ -193,7 +190,7 @@ export default {
this.houseInfo[this.formName] = e[0].value
},
dateConfirm(e) {
this.houseInfo.startDate = `${e.year}-${e.month}-${e.day}`
this.houseInfo.startDate = `${e.year}-${e.month}-${e.day} 00:00:00`
}
}
}

View File

@@ -69,7 +69,7 @@
<div class="row-item center">
<span class="right-line"></span>
<span class="left-line"></span>
<h3>{{ houseInfo.startDate }}</h3>
<h3>{{ $dateFormat(houseInfo.startDate,'YYYY-MM-DD') }}</h3>
<p>起租日期</p>
</div>
<div class="row-item right">
@@ -228,10 +228,7 @@ export default {
getHouseDetail(id) {
this.houseId = id
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if (res.code == 0) {
if (res.data.startDate) {
res.data.startDate = res.data.startDate.substring(0, 10)
}
if (res?.data) {
this.houseInfo = res.data
this.show = true
}

View File

@@ -12,7 +12,7 @@
<img src="./img/local-icon.png" alt="">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24" />
<u-icon name="arrow-down" color="#666" size="24"/>
</AiAreaPicker>
</div>
</AiTopFixed>
@@ -24,15 +24,15 @@
<img src="./img/monitor-icon.png" alt="" class="monitor-icon">
</div>
<div class="item">
<h3>{{count.online || 0}}</h3>
<h3>{{ count.online || 0 }}</h3>
<p>在线</p>
</div>
<div class="item">
<h3>{{count.sum - count.online || 0}}</h3>
<h3>{{ count.sum - count.online || 0 }}</h3>
<p>离线</p>
</div>
<div class="item">
<h3>{{onlineRate*100 || 0}}%</h3>
<h3>{{ onlineRate * 100 || 0 }}%</h3>
<p>在线率</p>
</div>
</div>
@@ -53,7 +53,7 @@
<div class="item" v-for="(item, index) in list" :key="index" @click="showMonitor(item)">
<img class="img" :src="item.indexUrl" alt="" v-if="item.deviceStatus == 1">
<img class="img" src="./img/offline.png" alt="" v-else>
<p>{{item.name}}</p>
<p>{{ item.name }}</p>
<img class="icon" src="./img/play-icon.png" alt="" v-if="item.deviceStatus == 1">
<img class="icon" src="./img/not-play-icon.png" alt="" v-else>
</div>
@@ -63,7 +63,8 @@
</template>
<script>
import echarts from 'echarts'
import { mapState } from 'vuex'
import {mapState} from 'vuex'
export default {
name: "AppVideoSurveillance",
appName: "视频监控",
@@ -83,7 +84,7 @@ export default {
offlineRate: ''
}
},
computed: { ...mapState(['user']) },
computed: {...mapState(['user'])},
methods: {
getMonitors(nodeId, queryType = 0) {
this.monitors = []
@@ -112,7 +113,7 @@ export default {
this.list = res.data.list
this.count = res.data.count
this.onlineRate = (this.count.online / this.count.sum).toFixed(2)
this.offlineRate = (1-this.onlineRate).toFixed(2)
this.offlineRate = (1 - this.onlineRate).toFixed(2)
this.initEchart()
}
})
@@ -122,7 +123,7 @@ export default {
this.getList()
},
showMonitor(row) {
if(row.deviceStatus != 1) return
if (row.deviceStatus != 1) return
uni.navigateTo({url: `./monitorDetail?id=${row.id}`})
},
initEchart() {
@@ -145,21 +146,21 @@ export default {
show: false
},
data: [
{ value: this.onlineRate},
{ value: this.offlineRate},
{value: this.onlineRate},
{value: this.offlineRate},
],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
},
normal:{
color:function(params) {
normal: {
color: function (params) {
//自定义颜色
var colorList = ['#3192F4','#ccc',];
var colorList = ['#3192F4', '#ccc',];
return colorList[params.dataIndex]
}
}
}
}
}
@@ -251,31 +252,36 @@ export default {
}
}
.area-content{
.area-content {
display: inline-block;
width: 100%;
line-height: 64px;
img{
img {
width: 42px;
vertical-align: middle;
margin-right: 16px;
}
.u-icon{
.u-icon {
margin-left: 6px;
}
}
.num-content{
.num-content {
width: calc(100% - 40px);
height: 164px;
background: #EEE;
border-radius: 16px;
margin: 32px 0 0 20px;
display: flex;
.item{
.item {
flex: 1;
text-align: center;
position: relative;
.monitor-icon{
.monitor-icon {
width: 48px;
height: 48px;
position: absolute;
@@ -284,7 +290,8 @@ export default {
margin-left: -24px;
margin-top: -24px;
}
h3{
h3 {
font-size: 44px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
@@ -292,7 +299,8 @@ export default {
line-height: 60px;
margin-top: 32px;
}
p{
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
@@ -301,12 +309,13 @@ export default {
}
}
.list-content{
.list-content {
width: 100%;
padding: 38px 0 0 20px;
box-sizing: border-box;
overflow: hidden;
.item{
.item {
display: inline-block;
width: calc(50% - 36px);
margin-right: 36px;
@@ -314,13 +323,15 @@ export default {
position: relative;
margin-bottom: 32px;
vertical-align: top;
.img{
.img {
width: 100%;
height: 218px;
margin-bottom: 8px;
border-radius: 16px;
}
p{
p {
width: 100%;
font-size: 34px;
font-family: PingFangSC-Regular, PingFang SC;
@@ -328,7 +339,8 @@ export default {
line-height: 48px;
word-break: break-all;
}
.icon{
.icon {
width: 40px;
height: 48px;
position: absolute;