瀏覽代碼

update

- c1后台设备功耗查看页面
    - 优化 设备状态文字
develop
chenJinxu 11 月之前
父節點
當前提交
2c88d7f606
共有 4 個文件被更改,包括 30 次插入9 次删除
  1. +7
    -1
      README.md
  2. +1
    -1
      src/config/models.js
  3. +0
    -1
      src/views/gps-card-frontend/device-setting/index.scss
  4. +22
    -6
      src/views/gps-card-frontend/device-setting/index.vue

+ 7
- 1
README.md 查看文件

@@ -844,4 +844,10 @@ update
feat
- c1后台设备功耗查看页面
- 增加 设备状态查看菜单
- 优化 设备离线行为查看明细,增加最近离线时间
- 优化 设备离线行为查看明细,增加最近离线时间

## v1.0.107
`2023.12.7`
update
- c1后台设备功耗查看页面
- 优化 设备状态文字

+ 1
- 1
src/config/models.js 查看文件

@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
export const VERSION_MODEL = '1.0.106F'; //版本号
export const VERSION_MODEL = '1.0.107F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',


+ 0
- 1
src/views/gps-card-frontend/device-setting/index.scss 查看文件

@@ -10,6 +10,5 @@
@media screen and (max-width: 550px) and (min-width: 200px){
font-size: 16px;
}

}
}

+ 22
- 6
src/views/gps-card-frontend/device-setting/index.vue 查看文件

@@ -8,7 +8,7 @@
<template>
<div classs="device-setting">
<div class="tree-select">
<van-tree-select :items="settingItems" :main-active-index.sync="active" :height="clientHeight" @click-nav="onCkickNav">
<van-tree-select :items="settingItems" :main-active-index.sync="active" :height="clientHeight" @click-nav="onCkickNav">
<template #content>
<div class="item" v-for="(item, index) in settingItems" :key="index" v-show="item.index === active">
<div class="item-setting" v-for="(child, index) in item.data" :key="index">
@@ -36,7 +36,7 @@ export default {
return {
active: 0,
settingItems: [
{ text: '设备状态', index: 0, data: [],},
{ text: '设备状态', index: 0, data: [], className: '',},
{ text: '监护角色', index: 1, data: [],},
{ text: '场景模式', index: 2, data: []},
{ text: '加强省电模式', index: 3, data: []},
@@ -63,6 +63,7 @@ export default {
created() {
this.getAuth();
this.getUrlQueryParams();
this.loadRequest();
},
mounted() {
/* this.$toast.loading({message: "加载中"});
@@ -78,8 +79,6 @@ export default {
this.clientHeight = document.documentElement.clientHeight;
this.active = Number(this.$store.getters.active) || 0;
this.$toast.success({message: "加载完成"}); */
//this.loadRequest();
this.loadRequest();
},
methods: {
// 加载接口
@@ -652,6 +651,7 @@ export default {
return item.index === index
});
if(data.code === 200) {
this.settingItems[findIndex].className = this.calcDeviceStatus(data.data.data.status, true);
this.settingItems[findIndex].text = `设备状态(${this.calcDeviceStatus(data.data.data.status)})`;
} else {
this.settingItems[findIndex].text = `设备状态(无数据)`;
@@ -661,24 +661,29 @@ export default {
})
},
// 计算设备状态
calcDeviceStatus(status) {
calcDeviceStatus(status, isCallClass) {
let result = ''
let className = '';
switch(status) {
case 'ONLINE':
result = '在线';
className = 'device-status-online';
break;
case 'OFFLINE':
result = '离线';
className = 'device-status-other';
break;
case 'UNACTIVE':
result = '未激活';
className = 'device-status-other';
break;
case 'DISABLE':
result = '已禁用';
className = 'device-status-other';
break;
default: break;
};
return result;
return isCallClass ? className : result;
},
// 点击左边树形图
onCkickNav(value) {
@@ -751,6 +756,16 @@ export default {
.van-tree-select__nav-item {
padding: 15px 5px !important;
}
.device-status-other {
.van-sidebar-item__text {
color: red !important;
}
}
.device-status-online {
.van-sidebar-item__text {
color: green !important;
}
}
.van-tree-select__content {
padding: 5px;
}
@@ -760,6 +775,7 @@ export default {
.van-tree-select__content {
@include center();
}
</style>
<style scoped lang="scss">
@import "./index.scss";


Loading…
取消
儲存