Browse Source

1101,修改了数据不是真数据问题,优化了数据展示

master
xiaoheiiskinder 1 year ago
parent
commit
945d888c3d
17 changed files with 317 additions and 105 deletions
  1. +1
    -1
      config/index.js
  2. +1
    -1
      dist/index.html
  3. +1
    -1
      src/components/deviceLi.vue
  4. +1
    -1
      src/components/personLi.vue
  5. +2
    -1
      src/store/index.js
  6. +6
    -1
      src/views/dataScreen/Tourist.vue
  7. +18
    -7
      src/views/dataScreen/centerChartBottom.vue
  8. +1
    -1
      src/views/dataScreen/leftChartBottom.vue
  9. +24
    -8
      src/views/dataScreen/leftChartOne.vue
  10. +1
    -8
      src/views/dataScreen/rightChartTop.vue
  11. +2
    -1
      src/views/dataScreen/rightChartcenter.vue
  12. +5
    -1
      src/views/dataScreen/rightChartcentertwo.vue
  13. +94
    -24
      src/views/doorLock.vue
  14. +50
    -19
      src/views/room.vue
  15. +41
    -15
      src/views/userManagement.vue
  16. +60
    -14
      src/views/visualization/flatsIndex.vue
  17. +9
    -1
      static/config.js

+ 1
- 1
config/index.js View File

@ -30,7 +30,7 @@ module.exports = {
}
}
},
host: '192.168.1.28',
host: '192.168.1.2',
port: 8082,
autoOpenBrowser: false,
errorOverlay: true,


+ 1
- 1
dist/index.html View File

@ -1 +1 @@
<!DOCTYPE html><html><head><meta http-equiv=Content-Language><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta http-equiv=Content-Type content="text/html;charset=utf-8"><title>智慧公寓管理系统</title><link href=/static/css/app.e3abba7703923c651c6aea2f44bbe944.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.d483675e66055ec52607.js></script><script type=text/javascript src=/static/js/vendor.622945be597e735b1a7b.js></script><script type=text/javascript src=/static/js/app.ec17f243103266224701.js></script></body></html>
<!DOCTYPE html><html><head><meta http-equiv=Content-Language><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta http-equiv=Content-Type content="text/html;charset=utf-8"><title>智慧公寓管理系统</title><link href=/static/css/app.a62b1b324218f3f3c2a1dbd82990be1a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.5c1fe6236a2c0166a921.js></script><script type=text/javascript src=/static/js/vendor.622945be597e735b1a7b.js></script><script type=text/javascript src=/static/js/app.62c688593aead8f6ba2d.js></script></body></html>

+ 1
- 1
src/components/deviceLi.vue View File

@ -36,7 +36,7 @@
<div class="lock-bottom" v-else>未绑定</div>
<div class="person-normal normal" v-if="data.isOnline == 1">在线</div>
<div class="person-normal lock-offline" v-else>离线</div>
<div class="person-normalOne lock-offline" v-if="data.battery<15">低电</div>
<div class="person-normalOne lock-offline" v-if="data.battery<=20">低电</div>
</div>
</template>


+ 1
- 1
src/components/personLi.vue View File

@ -32,7 +32,7 @@
props: ['data'],
methods: {},
mounted (){
console.log(this.data);
}
};
</script>


+ 2
- 1
src/store/index.js View File

@ -19,7 +19,8 @@ import moment from "moment"
const store = new Vuex.Store({
state: {
treeList:[],
tenantId: '1200',
// tenantId: '1200',
tenantId: '100',
selectoption: [],
tagsList: [],
cardList: [],


+ 6
- 1
src/views/dataScreen/Tourist.vue View File

@ -6,7 +6,10 @@
<div class="datalist-item" v-for="item, index in shebei" :key="index">
<!-- <div class="item-border"></div> -->
<div class="item-middle">
<span class="datalist-item-total">{{ item.total }}</span>
<!-- <span class="datalist-item-total">{{ item.total }}</span> -->
<div class="font-size-20">
<NumberGrow :value="item.total" class="color-175B88"></NumberGrow>
</div>
<span class="datalist-item-title">{{ item.title }}<span class="datalist-item-name">{{ item.name
}}</span></span>
</div>
@ -16,9 +19,11 @@
</template>
<script>
import NumberGrow from '../../components/visualizcomponent/NumberGrow.vue'
import { httpGet } from '../../api'
export default {
name: 'Tourist',
components: {NumberGrow},
data() {
return {
shebei: [


+ 18
- 7
src/views/dataScreen/centerChartBottom.vue View File

@ -4,7 +4,10 @@
<div class="datalist-item" v-for="item, index in shebei" :key="index">
<!-- <div class="item-border"></div> -->
<div class="item-middle">
<span class="datalist-item-total">{{ item.total }}</span>
<!-- <span class="datalist-item-total">{{ item.total }}</span> -->
<div class="font-size-20">
<NumberGrow :value="item.total" class="color-red"></NumberGrow>
</div>
<span class="datalist-item-title">{{ item.title }}<span class="datalist-item-name">{{ item.name
}}</span></span>
</div>
@ -14,7 +17,10 @@
<div class="datalist-item" v-for="item, index in list" :key="index">
<!-- <div class="item-border"></div> -->
<div class="item-middle">
<span class="datalist-item-total">{{ item.total }}</span>
<!-- <span class="datalist-item-total">{{ item.total }}</span> -->
<div class="font-size-20">
<NumberGrow :value="item.total" class="color-175B88"></NumberGrow>
</div>
<span class="datalist-item-title">{{ item.title }}<span class="datalist-item-name">{{ item.name
}}</span></span>
</div>
@ -24,9 +30,11 @@
</template>
<script>
import NumberGrow from '../../components/visualizcomponent/NumberGrow.vue';
import { httpGet, httpPost } from '../../api';
export default {
name: 'centerChartBottom',
components: { NumberGrow },
data() {
return {
list: [
@ -205,8 +213,9 @@ export default {
this.shebei[3].total = statisticsDate.seriesData.offlineTotal
//
httpGet('', this.$api.getTotalRevenue).then(res => {
console.log(res);
if (res.success) {
this.list[2].total = (res.data / 1000000).toFixed(2)
this.list[2].total = res.data ? (res.data / 1000000).toFixed(2) : 0
}
})
for (let t in statisticsDate.collectUS) {
@ -256,7 +265,8 @@ export default {
background: radial-gradient(rgba(121, 202, 202, 0.4) 75%, rgb(146, 235, 235) 100%);
}
.item-border{
.item-border {
position: absolute;
bottom: 0;
right: 0;
@ -268,9 +278,10 @@ export default {
.datalist-item:last-child {
margin-right: 0;
}
.datalist:last-child > .datalist-item{
background: radial-gradient(rgba(135,206,250, 0.4) 75%, rgb(175,238,238) 100%);
color: #175b88;
.datalist:last-child>.datalist-item {
background: radial-gradient(rgba(135, 206, 250, 0.4) 75%, rgb(175, 238, 238) 100%);
color: #175b88;
}
.item-middle {


+ 1
- 1
src/views/dataScreen/leftChartBottom.vue View File

@ -63,7 +63,7 @@ export default {
])
},
smooth: true,
data: [10, 20, 54, 5, 35, 41, 18]
data: [0, 0, 0, 0, 0, 0, 0]
},
]
}


+ 24
- 8
src/views/dataScreen/leftChartOne.vue View File

@ -6,25 +6,38 @@
<div class="tablist-item">
<div class="item-middle">
<span class="tablist-item-title">签约总数</span>
<span class="tablist-item-total">{{ sumRoom }}</span>
<!-- <span class="tablist-item-total"> -->
<div class="font-size-18 mt-1">
<NumberGrow :value="sumRoom" class="color-333"></NumberGrow>
</div>
<!-- </span> -->
</div>
</div>
<div class="tablist-item">
<div class="item-middle">
<span class="tablist-item-title">已签约</span>
<span class="tablist-item-total">{{ sumCard }}</span>
<!-- <span class="tablist-item-total">{{ sumCard }}</span> -->
<div class="font-size-18 mt-1">
<NumberGrow :value="sumCard" class="color-333"></NumberGrow>
</div>
</div>
</div>
<div class="tablist-item">
<div class="item-middle">
<span class="tablist-item-title">已退租</span>
<span class="tablist-item-total">{{ sumTotal }}</span>
<!-- <span class="tablist-item-total">{{ sumTotal }}</span> -->
<div class="font-size-18 mt-1">
<NumberGrow :value="sumTotal" class="color-333"></NumberGrow>
</div>
</div>
</div>
<div class="tablist-item">
<div class="item-middle">
<span class="tablist-item-title">到期数</span>
<span class="tablist-item-total">{{ sumOpen }}</span>
<!-- <span class="tablist-item-total">{{ sumOpen }}</span> -->
<div class="font-size-18 mt-1">
<NumberGrow :value="sumOpen" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -32,9 +45,11 @@
</template>
<script>
import NumberGrow from "../../components/visualizcomponent/NumberGrow.vue";
import { httpGet, httpPost } from '../../api';
export default {
name: 'leftChartOne',
components: { NumberGrow },
data() {
return {
charts: {
@ -238,7 +253,8 @@ export default {
.leftChartOne {
margin-top: 10px;
}
.chartstitle1{
.chartstitle1 {
margin-bottom: 10px;
font-size: 20px;
font-weight: bold;
@ -247,6 +263,7 @@ export default {
background-image: linear-gradient(to right, #00BFFF 20%, transparent 100%);
padding: 10px;
}
.tablist {
margin-top: 10px;
width: 100%;
@ -254,7 +271,7 @@ export default {
padding: 5px;
display: flex;
border: 1px solid #00BFFF;
background-color: rgba(175,238,238, 0.4);
background-color: rgba(175, 238, 238, 0.4);
/* background: linear-gradient(45deg, rgba(175,238,238, 0.4) 50%, #00BFFF 100%); */
border-radius: 5px;
color: #555e5d;
@ -289,5 +306,4 @@ export default {
.tablist-item-total {
font-size: 18px;
font-weight: bold;
}
</style>
}</style>

+ 1
- 8
src/views/dataScreen/rightChartTop.vue View File

@ -26,14 +26,7 @@ export default {
animate: false,
intNum: null,
list: [
{ namt: '测试011', number: '公寓/A栋/1单元/1层/101', momey: '2' },
{ namt: '测试02', number: '平山村/智慧公寓/30栋/2层/201', momey: '3' },
{ namt: '测试03', number: '平山村/智慧公寓/50栋/7层/701', momey: '3' },
{ namt: '测试04', number: '平山村/智慧公寓/60栋/3层/301', momey: '4' },
{ namt: '测试05', number: '平山村/智慧公寓/50栋/4层/401', momey: '2' },
{ namt: '测试06', number: '平山村/智慧公寓/60栋/6层/601', momey: '3' },
{ namt: '测试07', number: '平山村/智慧公寓/108栋/8层/803', momey: '4' },
{ namt: '测试08', number: '平山村/智慧公寓/70栋/4层/407', momey: '5' }
]
}
},


+ 2
- 1
src/views/dataScreen/rightChartcenter.vue View File

@ -41,7 +41,7 @@ export default {
},
series: [
{
data: [3521, 2250, 1542],
data: [0, 0, 0],
type: 'bar',
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)',
@ -71,6 +71,7 @@ export default {
mounted() {
let charts = this.charts
httpGet('', this.$api.getStatisticsRevenueTop).then(res => {
console.log(res);
if (res.success) {
let date = new Date()
let month = date.getMonth() + 1


+ 5
- 1
src/views/dataScreen/rightChartcentertwo.vue View File

@ -6,7 +6,9 @@
<div class="battery">
<div class="battery-item" v-for="item, index in batterylist" :key="index">
<span class="battery-item-title">{{ item.title }}</span>
<span class="battery-item-number" :class="index < 5 ? colors[index] : ''">{{ item.total }} </span>
<span class="battery-item-number" :class="index < 5 ? colors[index] : ''">
<NumberGrow :value="item.total" class="color-175B88"></NumberGrow>
</span>
</div>
</div>
</div>
@ -14,8 +16,10 @@
</template>
<script>
import NumberGrow from '../../components/visualizcomponent/NumberGrow.vue'
export default {
name: 'rightChartcentertwo',
components: {NumberGrow},
data() {
return {
charts: {


+ 94
- 24
src/views/doorLock.vue View File

@ -10,7 +10,10 @@
<img src="../assets/img/mszssbgl.png" class="w100" alt="" />
<div class="grid-cont-right">
<div>设备总数</div>
<div class="grid-num">{{ sumpageTotal }}</div>
<!-- <div class="grid-num">{{ sumpageTotal }}</div> -->
<div class="font-size-24 grid-num">
<NumberGrow :value="sumpageTotal" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -21,7 +24,10 @@
<img src="../assets/img/mszssbgl.png" class="w100" alt="" />
<div class="grid-cont-right">
<div>绑定数量</div>
<div class="grid-num">{{ analysisData.bingSite }}</div>
<!-- <div class="grid-num">{{ analysisData.bingSite }}</div> -->
<div class="font-size-24 grid-num">
<NumberGrow :value="analysisData.bingSite" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -32,7 +38,10 @@
<img src="../assets/img/mszssbgl.png" class="w100" alt="" />
<div class="grid-cont-right">
<div>常开数量</div>
<div class="grid-num">{{ analysisData.isAlwaysOpen }}</div>
<!-- <div class="grid-num">{{ analysisData.isAlwaysOpen }}</div> -->
<div class="font-size-24 grid-num">
<NumberGrow :value="analysisData.isAlwaysOpen" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -65,7 +74,10 @@
<img src="../assets/img/mszssbgl.png" class="w100" alt="" />
<div class="grid-cont-right">
<div>低电数量</div>
<div class="grid-num">0</div>
<!-- <div class="grid-num">{{ lowBattery }}</div> -->
<div class="font-size-24 grid-num">
<NumberGrow :value="lowBattery" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -76,7 +88,10 @@
<img src="../assets/img/wifisbgl.png" class="w100" alt="" />
<div class="grid-cont-right">
<div>在线状态</div>
<div class="grid-num">{{ online }}</div>
<!-- <div class="grid-num">{{ online }}</div> -->
<div class="font-size-24 grid-num">
<NumberGrow :value="online" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -87,7 +102,10 @@
<img src="../assets/img/wifisbgl1.png" class="w100" alt="" />
<div class="grid-cont-right">
<div>异常状态</div>
<div class="grid-num">{{ abnormal }}</div>
<!-- <div class="grid-num">{{ abnormal }}</div> -->
<div class="font-size-24 grid-num">
<NumberGrow :value="abnormal" class="color-333"></NumberGrow>
</div>
</div>
</div>
</div>
@ -209,7 +227,8 @@
<div @click="bindRoom(index, item)" v-else>绑定房间</div>
<div @click="detailsFun(index, item)">门锁操作</div>
<div @click="AddAdministrator(index, item)" v-if="item.manufactureId == 101">初始化</div>
<div @click="getEmergence(index, item)" v-if="item.manufactureId == 201 || item.manufactureId == 221">临时密码</div>
<div @click="getEmergence(index, item)" v-if="item.manufactureId == 201 || item.manufactureId == 221">临时密码
</div>
<div @click="deleteLock(index, item)" v-show="userInfo.type == 0">删除</div>
<div @click="RemoteUnlocking(index, item)" v-if="item.manufactureId == 101">远程开锁</div>
<div @click="Reset(index, item)">重置门锁</div>
@ -263,10 +282,10 @@
<el-table-column label="在线状态" align="center">
<template #default="scope">
<el-tag :type="scope.row.isOnline == '1'
? 'success'
: scope.row.isOnline == '0'
? 'danger'
: ''
? 'success'
: scope.row.isOnline == '0'
? 'danger'
: ''
"><span v-if="scope.row.isOnline == 1">在线</span>
<span v-else>离线</span>
</el-tag>
@ -406,6 +425,16 @@
<el-input v-model="form.validateCode" size="small" :clearable="true"></el-input>
</el-form-item>
</div>
<div v-else-if="form.manufacturer == 1241">
<el-form-item label="设备号">
<el-input v-model="form.deviceNum" size="middle" :clearable="true"></el-input>
</el-form-item>
</div>
<!-- <el-form-item label="选择房间">
<el-cascader :options="options" size="middle" :props="{ checkStrictly: true }" @change="checkNodeOne"
v-model="checkNodeId1" clearable>
</el-cascader>
</el-form-item> -->
</el-form>
<template #footer>
<span class="dialog-footer">
@ -646,6 +675,7 @@
</template>
<script>
import NumberGrow from "../components/visualizcomponent/NumberGrow.vue";
import {
httpGet,
httpPost,
@ -676,6 +706,7 @@ export default {
name: "doorLock",
data() {
return {
lowBattery: 0, //
normallyOpenRecordList: [],
normallyTotal: 0,
normallyPageNum: 1,
@ -1198,7 +1229,8 @@ export default {
UnlockRecord,
warningLog,
DeviceFeedbackLog,
voucherCom
voucherCom,
NumberGrow
},
beforeCreate() {
// var tenantId = JSON.parse(localStorage.getItem('tenantId'))
@ -2109,6 +2141,7 @@ export default {
this.online = callback.onlineTotal
this.unonline = callback.offlineTotal
this.abnormal = callback.isAppBind
this.lowBattery = callback.batteryLevel1
})
},
// 线
@ -2365,7 +2398,7 @@ export default {
this.$message.error(res2.msg);
}
});
}else{
} else {
this.$message.error('需要超管才可设置常开')
}
} else {
@ -2778,16 +2811,15 @@ export default {
siteId: this.checkNodeId1,
deviceId: callback.data.id,
}];
httpPost(data, this.$api.bindDeviceSite)
.then((res) => {
if (res.success) {
this.$message.success("绑定成功");
this.editVisible = false
this.getdevice();
}
}).catch((error) => {
this.$message.error(`绑定失败`);
});
httpPost(data, this.$api.bindDeviceSite).then((res) => {
if (res.success) {
this.$message.success("绑定成功");
this.editVisible = false
this.getdevice();
}
}).catch((error) => {
this.$message.error(`绑定失败`);
});
this.$message.success(res.data.msg);
this.editVisible = false;
this.getdevice();
@ -2864,6 +2896,42 @@ export default {
this.$message.error(callback.data.msg);
}
})
} else if (this.form.manufacturer == 1241) {
if (this.form.deviceNum == "") {
this.$message.error("请填写完整信息")
} else {
var data = {
deviceNum: this.form.deviceNum,
imei: "",
imsi: "",
platformId: 9,
manufactureId: 1241
}
RequestSet.RegisterDevice(data, (callback) => {
if (callback.data.success && callback.success) {
console.log(callback);
var data = [{
siteId: this.checkNodeId1,
deviceId: callback.data.id
}]
httpPost(data, this.$api.bindDeviceSite).then(res => {
console.log(res);
if (res.success) {
this.$message.success("绑定成功")
this.editVisible = false
this.getdevice()
}
}).catch(error => {
this.$message.error("绑定失败", error)
})
// this.$message.success(res.data.msg)
// this.editVisible = false
// this.getdevice();
} else {
this.$message.error(callback.data.msg)
}
})
}
}
}
},
@ -2980,6 +3048,7 @@ export default {
//
screenStatisticsItemsMethods(data) {
httpPost(data, this.$api.screenStatisticsItems).then(res => {
console.log(res);
if (res.code == 200) {
var sumpageTotal = 0, online = 0, unonline = 0, abnormal = 0
res.data.map(li => {
@ -3942,4 +4011,5 @@ export default {
.demo-form-inline .el-form-item {
width: 100%;
}
}</style>
}
</style>

+ 50
- 19
src/views/room.vue View File

@ -5,7 +5,10 @@
<el-card shadow="hover" class="cardrelative aftercolor4">
<div class="contentc">
<div class="contenttitle">小区数</div>
<div class="contentnum">{{ projectNum }}</div>
<!-- <div class="contentnum">{{ projectNum }}</div> -->
<div class="font-size-24 contentnum">
<NumberGrow :value="projectNum" class="color-333"></NumberGrow>
</div>
<img src="../assets/img/ld.png" alt="" class="pzimg" />
</div>
</el-card>
@ -14,7 +17,10 @@
<el-card shadow="hover" class="cardrelative aftercolor4">
<div class="contentc">
<div class="contenttitle">楼栋数</div>
<div class="contentnum">{{ buildingNum }}</div>
<!-- <div class="contentnum">{{ buildingNum }}</div> -->
<div class="font-size-24 contentnum">
<NumberGrow :value="buildingNum" class="color-333"></NumberGrow>
</div>
<img src="../assets/img/ld.png" alt="" class="pzimg" />
</div>
</el-card>
@ -23,7 +29,10 @@
<el-card shadow="hover" class="cardrelative aftercolor4">
<div class="contentc">
<div class="contenttitle">总房间</div>
<div class="contentnum">{{ roomNum }}</div>
<!-- <div class="contentnum">{{ roomNum }}</div> -->
<div class="font-size-24 contentnum">
<NumberGrow :value="roomNum" class="color-333"></NumberGrow>
</div>
<img src="../assets/img/ld.png" alt="" class="pzimg" />
</div>
</el-card>
@ -32,7 +41,10 @@
<el-card shadow="hover" class="cardrelative aftercolor2">
<div class="contentc">
<div class="contenttitle">已入住</div>
<div class="contentnum">{{ checkin }}</div>
<!-- <div class="contentnum">{{ checkin }}</div> -->
<div class="font-size-24 contentnum">
<NumberGrow :value="checkin" class="color-333"></NumberGrow>
</div>
<img src="../assets/img/ld.png" alt="" class="pzimg right20" />
</div>
</el-card>
@ -41,7 +53,10 @@
<el-card shadow="hover" class="cardrelative aftercolor2">
<div class="contentc">
<div class="contenttitle">空房间</div>
<div class="contentnum">{{ emptyroomNum }}</div>
<!-- <div class="contentnum">{{ emptyroomNum }}</div> -->
<div class="font-size-24 contentnum">
<NumberGrow :value="emptyroomNum" class="color-333"></NumberGrow>
</div>
<img src="../assets/img/f.png" alt="" class="pzimg right20" />
</div>
</el-card>
@ -68,7 +83,10 @@
<el-card shadow="hover" class="cardrelative aftercolor5">
<div class="contentc">
<div class="contenttitle">未绑定门锁</div>
<div class="contentnum">{{ unboundNum }}</div>
<!-- <div class="contentnum">{{ unboundNum }}</div> -->
<div class="font-size-24 contentnum">
<NumberGrow :value="unboundNum" class="color-333"></NumberGrow>
</div>
<img src="../assets/img/ms.png" alt="" class="pzimg" />
</div>
</el-card>
@ -640,6 +658,7 @@
</template>
<script>
import NumberGrow from "../components/visualizcomponent/NumberGrow.vue";
import houseing from "../components/houseing.vue";
import zTree from "../components/zTree1.vue";
import roomLi from "../components/roomLi.vue";
@ -896,7 +915,8 @@ export default {
zTree,
roomLi,
roomLi1,
VDistpicker
VDistpicker,
NumberGrow
},
created() {
this.optionsData = this.$MANUFACTURER.mapData
@ -937,6 +957,20 @@ export default {
}
})()
}
let data = {
pageNum: 1,
pageSize: 10,
q: JSON.stringify({
lockType: 1,
unBind: 1
})
}
httpPost(data, this.$api.getDeviceItems).then(res => {
console.log(res);
if (res.success) {
this.unboundNum = res.data.total
}
})
},
methods: {
checkNode(e) {
@ -1555,7 +1589,6 @@ export default {
var roomNum = 0;
var buildingNum = 0
var checkin = 0
var unboundNum = 0
res.data.list.list.map((li, index) => {
//
if (li.pid % 10 == 1 && li.type == 1) {
@ -1565,10 +1598,6 @@ export default {
if (li.isRoom == 1 && li.count != 0) {
checkin++
}
//
if (!li.imei && li.isRoom == 1) {
unboundNum++
}
//
let countNum = res.data.tenants.filter(item => item.id == li.id)[0]
if (countNum) {
@ -1576,18 +1605,20 @@ export default {
} else {
li.count = 0
}
if (li.expand) {
if (JSON.parse(li.expand).type == "0") {
if (li.layout != null) {
roomNum++;
}
}
// if (li.expand) {
// if (JSON.parse(li.expand).type == "0") {
// if (li.layout != null) {
// roomNum++;
// }
// }
// }
if (li.isRoom == '1') {
roomNum++
}
});
this.roomNum = roomNum;
this.buildingNum = buildingNum
this.checkin = checkin
this.unboundNum = unboundNum
this.emptyroomNum = roomNum - checkin
})
},


+ 41
- 15
src/views/userManagement.vue View File

@ -26,7 +26,7 @@
<div>
<div class="color-00000073 font-size-16 font-weight-700 color-03A9F4">已入住</div>
<div class="font-size-24 mt-2">
<NumberGrow :value="checkinNum" class="color-03A9F4"></NumberGrow><span
<NumberGrow :value="isCheckin" class="color-03A9F4"></NumberGrow><span
class="font-size-16 color-00000073 ml-1"></span>
</div>
</div>
@ -782,7 +782,8 @@ export default {
name: "campus",
data() {
return {
checkinNum: 0, //
isCheckin: 0, //
checkinNum: 0, //
noshowNum: 0, //
signedNum: 0, //
arrearsNum: 0, //
@ -1144,7 +1145,29 @@ export default {
mounted() {
//
this.getLeasesList()
document.addEventListener('keydown', this.keyDown)
// document.addEventListener('keydown', this.keyDown)
setTimeout(() => {
this.handleSearch()
var q = {};
var data = {
pageNum: 0,
pageSize: 0,
orderBy: "create_time desc",
q: JSON.stringify(q),
};
let roomAbout = this.$store.state.roomAbout
httpPost(data, this.$api.getlistNum).then((res1) => {
res1.data.list.map((li, index) => {
this.$store.commit("increment", 1);
li['rommNameText'] = this.screenRoomName(li.id)
if(li["rommNameText"] != '') {
this.isCheckin++
}else{
this.noshowNum++
}
});
});
}, 800)
},
beforeDestroy() {
this.$store.commit("increment", 1);
@ -1184,7 +1207,6 @@ export default {
this.checkinNum = checkinNum
this.arrearsNum = arrearsNum
this.expiredNum = expiredNum
this.noshowNum = total - checkinNum
} else {
this.$message.error(res.message)
}
@ -2527,6 +2549,7 @@ export default {
li['rommNameText'] = this.screenRoomName(li.id)
});
// this.getallstatus(para);
console.log(res1.data.list);
this.userlist = res1.data.list;
this.total = res1.data.total;
});
@ -2664,7 +2687,7 @@ export default {
}
let data1 = []
httpPost(data, this.$api.getlistNum).then((res) => {
console.log("123", res);
console.log(res);
if (res.success) {
res.data.list.map(li => {
data1.push(li.id)
@ -2675,7 +2698,6 @@ export default {
httpPost(data2, this.$api.onlyTenant).then((res1) => {
// this.$store.commit("getAboutRoom", res.data.list);
// this.getlist();
console.log(res1);
let data3 = []
if (res1.success) {
res1.data.list.map(li => {
@ -2685,7 +2707,6 @@ export default {
ids: data3
}
httpPost(data4, this.$api.onlySiteDevice).then((res) => {
console.log(res);
this.AboutDevice = res.data.list;
this.$store.commit("getAboutDevice", res.data.list);
});
@ -2955,17 +2976,21 @@ export default {
let tt = this.findParentIds(this.bindRoomlist, li.roomId)
arr.push(...tt)
})
console.log(row)
console.log(row, arr)
let treeId = ids.concat([...new Set(arr)])
this.getSelectedTab(treeId).then((res) => {
console.log(res);
if (res.length > 0) {
this.roomlist = []
var array = utils.uniqueArray(res, "id");
console.log(array);
this.roomlist = this.ztreeToElementTree(array, []);
console.log(this.roomlist);
} else {
this.roomlist = []
}
})
},
findParentIds(dataSource, nodeId) {
const parentIds = []; // ID
@ -3138,11 +3163,6 @@ export default {
callback) => {
console.log(callback);
if (callback.success) {
this.getcheckInList()
this.getAboutRoom();
setTimeout(() => {
_this.updateRoom();
}, 1000)
var locakUserdata = {
deviceNum: resultArr.deviceNum,
imei: resultArr.imei,
@ -3244,6 +3264,8 @@ export default {
} else {
this.$message.error(callback.msg);
}
} else {
this.$message.error("添加失败")
}
})
} else if (resultArr.manufactureId == 1201) {
@ -3294,8 +3316,9 @@ export default {
this.$message.error("添加失败")
}
});
} else {
return this.$message.error("该房间未绑定门锁")
}
this.$message.error("该房间未绑定门锁")
}
});
} else {
@ -4220,8 +4243,10 @@ export default {
this.roomtablestatus = false;
if (this.activeName == 0) {
var data = JSON.parse(JSON.stringify(this.zNodes))
var zNodes = utils.filterObj(data, SelectedList)
// var zNodes = utils.filterObj(data, SelectedList)
var zNodes = data
var array = utils.uniqueArray(zNodes, "id");
console.log(array);
var bindRoomlist = this.ztreeToElementTree(array, []);
this.bindRoomlist = bindRoomlist
} else if (this.activeName == 1) {
@ -4260,6 +4285,7 @@ export default {
elementTree.push(item)
}
});
console.log(elementTree);
return elementTree
},
//


+ 60
- 14
src/views/visualization/flatsIndex.vue View File

@ -25,9 +25,9 @@
:key="index" @click="goToPage('agreement', item.lable)">
<div class="color-00000073 font-size-16 font-weight-700"
:class="item.lable === '已签约' ? 'color-03A9F4' : 'color-FF3D00'">{{ item.lable }}</div>
<div class="font-size-24 mt-2">
<NumberGrow :value="item.total" :class="item.lable === '已签约' ? 'color-03A9F4' : 'color-FF3D00'">
</NumberGrow><span class="font-size-16 color-00000073 ml-1"></span>
<div class="font-size-24 mt-2" v-if="item.lable !== ''">
<NumberGrow :value="item.total" :class="item.lable === '已签约' ? 'color-03A9F4' : 'color-FF3D00'" v-if="item.label != ''">
</NumberGrow><span class="font-size-16 color-00000073 ml-1" v-if="item.label != ''"></span>
</div>
</div>
</div>
@ -47,14 +47,14 @@
<div class="flexLi d-inlie-block text-center hand-type" @click="goToPage('/room')">
<div class="color-00000073 font-size-16 font-weight-700 color-03A9F4">总房间数</div>
<div class="font-size-24 mt-2">
<NumberGrow :value="sumRoom" class="color-03A9F4"></NumberGrow><span
<NumberGrow :value="roomsum" class="color-03A9F4"></NumberGrow><span
class="font-size-16 color-00000073 ml-1"></span>
</div>
</div>
<div class="flexLi d-inlie-block text-center hand-type" @click="goToPage('/room')">
<div class="color-00000073 font-size-16 font-weight-700 color-03A9F4">已入住数</div>
<div class="font-size-24 mt-2">
<NumberGrow :value="occupied" class="color-03A9F4"></NumberGrow><span
<NumberGrow :value="checkin" class="color-03A9F4"></NumberGrow><span
class="font-size-16 color-00000073 ml-1"></span>
</div>
</div>
@ -75,14 +75,14 @@
<div class="flexLi d-inlie-block text-center hand-type" @click="goToPage('/doorLock')">
<div class="color-00000073 font-size-16 font-weight-700 color-03A9F4">总设备</div>
<div class="font-size-24 mt-2">
<NumberGrow :value="statisticsDate.seriesData.total" class="color-03A9F4"></NumberGrow><span
<NumberGrow :value="deviceTotal" class="color-03A9F4"></NumberGrow><span
class="font-size-16 color-00000073 ml-1"></span>
</div>
</div>
<div class="flexLi d-inlie-block text-center hand-type" @click="goToPage('doorLock', '异常数')">
<div class="color-00000073 font-size-16 font-weight-700 color-FF3D00">异常数</div>
<div class="font-size-24 mt-2">
<NumberGrow :value="statisticsDate.seriesData.isAppBind" class="color-FF3D00"></NumberGrow><span
<NumberGrow :value="deviceerror" class="color-FF3D00"></NumberGrow><span
class="font-size-16 color-00000073 ml-1"></span>
</div>
</div>
@ -656,7 +656,11 @@ export default {
"order": "2022-05-26",
"count": 0
}]
}
},
deviceTotal: 0, //
deviceerror: 0, //
checkin: 0, //
roomsum: 0, //
}
},
components: {
@ -667,6 +671,47 @@ export default {
},
async created() {
httpGet('', this.$api.getCommunityrentStatistics).then(res => { })
//
let datadevice = {
pageNum: 1,
pageSize: 1,
q: JSON.stringify({
"lockType": 1
})
}
httpPost(datadevice, this.$api.getDeviceItems).then(res => {
if(res.success){
this.deviceTotal = res.data.total
}
})
//
let dataerror = {
pageNum: 1,
pageSize: 1,
q: JSON.stringify({
"lockType": 1,
"isAppBind": 1
})
}
httpPost(dataerror, this.$api.screenStatisticsItems).then(res => {
if(res.success){
this.deviceerror = res.data.length
}
})
httpGet('', this.$api.getSiteList).then((res) => {
console.log(res);
if(res.success) {
res.data.list.list.map(li => {
if (li.isRoom == 1 && li.count != 0) {
this.checkin++
}
if(li.isRoom == 1) {
this.roomsum++
}
})
this.Occupancyrate = Number((this.checkin / this.roomsum).toFixed(2)*100)
}
})
this.$store.commit('setUser1')
if (!localStorage.getItem('statisticsDate')) {
let data = this.statisticsDateDefault
@ -681,7 +726,7 @@ export default {
this.statisticsDate.isAppBind = this.statisticsDate.seriesData.isAppBind || 0
this.statisticsDate.batteryLevel1 = this.statisticsDate.seriesData.batteryLevel1 || 0
this.collectUS = statisticsDate.collectUS
this.sumProjects = statisticsDate.seriesData.projects
this.sumProjects = statisticsDate.batteryLevel1
for (let key in statisticsDate.collectOpenLock) {
let i = key.indexOf('allCount')
if (i != -1) {
@ -719,17 +764,15 @@ export default {
} else if (li.status === 3) {
li.lable = '已退租'
this.outroom += li.total
} else if (li.status === 4) {
li.lable = '已删除'
// } else if (li.status === 4) {
// li.lable = ''
} else {
li.lable = ''
}
})
this.commonStatisticsList = JSON.parse(JSON.stringify(list))
this.occupied = occupied
this.Occupancyrate = Number((this.occupied / this.sumRoom).toFixed(2))
this.roomInArrears = roomInArrears
this.expirerate = Number(((this.sumRoom - this.occupied - this.roomInArrears - this.outroom) / this.sumRoom).toFixed(2))
this.leasesStaticList = await this.processingStatics(list, 'status') //list
await this.getRoomOccupancy()
await this.getSumTotal()
@ -749,8 +792,9 @@ export default {
mounted() {
this.$store.commit('getSumTotal')
setTimeout(() => {
this.expirerate = Number((this.roomInArrears / this.roomsum).toFixed(2)*100)
this.sumTotal = this.$store.state.sumTotal
}, 500)
}, 1000)
window.onresize = () => {
return (() => {
if (document.documentElement.clientWidth < 1080) {
@ -852,6 +896,7 @@ export default {
// }
// })
httpGet('', this.$api.getStatisticsRevenueTop).then(res => {
console.log(res);
if (res.success) {
let listQuarters = [], middleChartExtendThree = this.middleChartExtendThree
// res.data.map(li => {
@ -903,6 +948,7 @@ export default {
let commonStatisticsList = this.commonStatisticsList
let result = []
httpGet('', this.$api.getRoomStatistics).then(async res => {
console.log(res);
if (res.code === 200) {
let roomList = [], percentage = []
res.data.map(async li => {


+ 9
- 1
static/config.js View File

@ -285,7 +285,15 @@ export default {
"label": "LWJ_LOCK",
"productID": "LWJ_LOCK",
"value": 1201
}],
},{
"label": "LWJ_BL_LOCK",
"productID": "LWJ_BL_LOCK",
"value": 1231
},{
"label": "LWJ_WIFI_FACE_LOCK",
"productID": "LWJ_WIFI_FACE_LOCK",
"value": 1241
}],
//门磁
doorMagnetism: [{
"label": "FULI_HOUSESENSOR",


Loading…
Cancel
Save