APPbug反馈修改
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading" noPadding>
|
||||
<view slot="body" class="canneng-index">
|
||||
<uni-nav-bar
|
||||
<!-- <uni-nav-bar
|
||||
rightWidth="300rpx"
|
||||
leftWidth="300rpx"
|
||||
dark
|
||||
@@ -18,7 +18,7 @@
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx">{{ select.engineeringName }}</text>
|
||||
<uni-icons type="bottom" size="16" color="#fff"></uni-icons>
|
||||
</template>
|
||||
</uni-nav-bar>
|
||||
</uni-nav-bar> -->
|
||||
<view class="index">
|
||||
<!-- 运维 -->
|
||||
<YunWei :devCount="devCount" v-if="userInfo.authorities === 'operation_manager'" />
|
||||
@@ -33,8 +33,6 @@
|
||||
<Device ref="device" :store="store" />
|
||||
</view>
|
||||
<uni-drawer ref="showRight" mode="right" :mask-click="false">
|
||||
<uni-nav-bar :fixed="true" status-bar title="选择工程" color="#111"> </uni-nav-bar>
|
||||
<view style="height: 200px"></view>
|
||||
<view>
|
||||
<uni-indexed-list
|
||||
:options="engineeringListFilter"
|
||||
@@ -78,6 +76,7 @@ export default {
|
||||
engineeringId: '',
|
||||
},
|
||||
engineeringList: [],
|
||||
drawer: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -101,6 +100,16 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onNavigationBarButtonTap(e) {
|
||||
console.log(e)
|
||||
// e的返回格式为json对象:{"text":"测试","index":0}
|
||||
this.drawer = !this.drawer
|
||||
if (this.drawer) {
|
||||
this.openDrawer()
|
||||
} else {
|
||||
this.closeDrawer()
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
let engineering = uni.getStorageSync('engineering')
|
||||
let res = await queryEngineering()
|
||||
@@ -123,12 +132,23 @@ export default {
|
||||
}
|
||||
}
|
||||
this.store.params.engineerId = this.select.engineeringId
|
||||
// #ifdef APP-PLUS
|
||||
var webView = this.$mp.page.$getAppWebview()
|
||||
// 修改buttons
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
text: this.select.engineeringName,
|
||||
})
|
||||
// #endif
|
||||
getDevCount(this.select.engineeringId).then((res) => {
|
||||
this.devCount = res.data
|
||||
})
|
||||
this.$refs.device && this.$refs.device.init()
|
||||
},
|
||||
closeDrawer(e) {
|
||||
if (!e) {
|
||||
this.$refs.showRight.close()
|
||||
return
|
||||
}
|
||||
console.log(e)
|
||||
this.engineeringList.forEach((item) => {
|
||||
if (item.name === e.item.name) {
|
||||
@@ -136,10 +156,20 @@ export default {
|
||||
this.select.engineeringName = item.name
|
||||
this.select.engineeringId = item.id
|
||||
this.store.params.engineerId = item.id
|
||||
// #ifdef APP-PLUS
|
||||
var webView = this.$mp.page.$getAppWebview()
|
||||
// 修改buttons
|
||||
webView.setTitleNViewButtonStyle(0, {
|
||||
text: this.select.engineeringName,
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
this.$refs.device.select.projectName = ''
|
||||
this.$refs.device.select.projectNameIndex = 0
|
||||
getDevCount(this.select.engineeringId).then((res) => {
|
||||
this.devCount = res.data
|
||||
})
|
||||
this.$refs.device.init()
|
||||
this.$refs.showRight.close()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user