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