flx:优化监控模块
This commit is contained in:
parent
f534ffbed1
commit
2fd77252bb
@ -3,7 +3,7 @@
|
||||
<view class="content-box" @click="toggleNodes(item)">
|
||||
<text class="box-text">{{ item.groupName }}</text>
|
||||
<view @click.stop="expandFn">
|
||||
<text class="box-text1" v-if="item.children.length > 0">{{ item.totalNum || 0 }}</text>
|
||||
<text class="box-text1">{{ item.totalNum || 0 }}</text>
|
||||
<!-- <u-icon name="arrow-right" color="#B3B3B3" size="40"
|
||||
v-if="!expanded && item.children && item.children.length" style="margin-right: 10rpx;"></u-icon>
|
||||
<u-icon name="arrow-down" color="#B3B3B3" size="40"
|
||||
@ -22,16 +22,20 @@
|
||||
<view class="sub-component">
|
||||
<view :class="expanded == true ? 'expandedStyle' : ''"
|
||||
v-if="item.children && item.children.length && expanded">
|
||||
<tree-menu :iconShow="iconShow" v-for="child in item.children" :key="child.id" :item="child" :treeIndex="treeIndex + 1"
|
||||
@clickItem="clickTreeItem"></tree-menu>
|
||||
<TreeMenu :iconShow="iconShow" v-for="child in item.children" :key="child.id" :item="child"
|
||||
:treeIndex="treeIndex + 1" @clickItem="clickTreeItem"></TreeMenu>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TreeMenu from './newIndex.vue';
|
||||
export default {
|
||||
name: 'TreeMenu',
|
||||
components: {
|
||||
TreeMenu
|
||||
},
|
||||
props: ['item', 'treeIndex', 'iconShow'],
|
||||
data() {
|
||||
return {
|
||||
@ -42,7 +46,7 @@
|
||||
clickTreeItem(item) {
|
||||
console.log(item, 777888)
|
||||
uni.navigateTo({
|
||||
url: './videoList?obj=' + JSON.stringify(item)
|
||||
url: `./videoList?obj=${JSON.stringify(item)}&sn=${item.projectSn}`
|
||||
})
|
||||
},
|
||||
expandFn(e) {
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"name" : "智慧安全", //中建四局
|
||||
"appid" : "__UNI__4AA4101",
|
||||
"description" : "",
|
||||
"versionName" : "1.7.9",
|
||||
"versionCode" : 179,
|
||||
"versionName" : "1.8.0",
|
||||
"versionCode" : 180,
|
||||
"transformPx" : false,
|
||||
"sassImplementationName" : "node-sass",
|
||||
/* 5+App特有相关 */
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
},
|
||||
methods: {
|
||||
clickTreeItem(item) {
|
||||
console.log(item, 777888)
|
||||
console.log(item, 777888, this.projectSn)
|
||||
uni.navigateTo({
|
||||
url: `./videoList?obj=${JSON.stringify(item)}&sn=${this.projectSn}`
|
||||
})
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
<view class="videoName">
|
||||
{{item.videoName}}
|
||||
</view>
|
||||
<view :class="item.deviceState == 1 ? 'state-success' : 'state-error'" class="deviceState">
|
||||
{{item.deviceState == 1 ? '在线' : '离线'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="new-nodata" v-else>
|
||||
@ -148,6 +151,23 @@
|
||||
// background-color: white;
|
||||
width: calc(50% - 14rpx);
|
||||
margin-bottom: 14rpx;
|
||||
position: relative;
|
||||
.deviceState {
|
||||
position: absolute;
|
||||
right: 16rpx;
|
||||
top: 16rpx;
|
||||
color: white;
|
||||
padding: 4rpx 8rpx;
|
||||
border-radius: 30rpx;
|
||||
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.state-success {
|
||||
background-color: #33B74B;
|
||||
}
|
||||
.state-error {
|
||||
background-color: #b5b5b5;
|
||||
}
|
||||
|
||||
&:nth-child(2n-1) {
|
||||
margin-right: 26rpx;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user