|
@@ -133,6 +133,7 @@ const getEventChannel = async () => {
|
|
|
}
|
|
|
|
|
|
onLoad(({node}) => {
|
|
|
+ uni.setNavigationBarTitle({title: '审批任务'})
|
|
|
const {rows, isTask} = node ? JSON.parse(decodeURIComponent(node)) : {};
|
|
|
const res = getArrValue(rows);
|
|
|
if (res.length > 0) {
|
|
@@ -160,22 +161,19 @@ const getDataApi = async () => {
|
|
|
//设置webview样式
|
|
|
const webViewStyle = ref({})
|
|
|
const setWebViewStyle = async () => {
|
|
|
- const appSys = await querySelect(instance,'app-sys')
|
|
|
- const appSysHeight = appSys.height
|
|
|
- //顶部
|
|
|
- const contentBar = await querySelect(instance,'task-detail-content')
|
|
|
- const contentBarHeight = contentBar?.height ?? 48
|
|
|
+ const {height: appHeight} = await querySelect(instance,'app-sys')
|
|
|
+ const {height: navHeight} = await querySelect(instance,'task-detail-content')
|
|
|
+ const {height: bottomHeight} = await querySelect(instance,'action-bar')
|
|
|
// #ifdef H5
|
|
|
- webViewStyle.value.top = contentBarHeight + 'px'
|
|
|
+ webViewStyle.value.top = navHeight + 'px'
|
|
|
+ webViewStyle.value.height = (appHeight - navHeight - bottomHeight) + 'px'
|
|
|
// #endif
|
|
|
// #ifdef APP-PLUS
|
|
|
- const {statusBarHeight} = uni.getSystemInfoSync()
|
|
|
- webViewStyle.value.top = statusBarHeight + 45 + contentBarHeight
|
|
|
+ const {screenHeight, safeArea} = uni.getWindowInfo()
|
|
|
+ webViewStyle.value.top = navHeight + 'px'
|
|
|
+ const content = navHeight + (screenHeight - safeArea.bottom) + bottomHeight
|
|
|
+ webViewStyle.value.height = (screenHeight - content) + 'px'
|
|
|
// #endif
|
|
|
- //底部
|
|
|
- const actionBar = await querySelect(instance,'action-bar')
|
|
|
- const actionBarHeight = actionBar?.height ?? 80
|
|
|
- webViewStyle.value.height = (appSysHeight - contentBarHeight - actionBarHeight - 2) + 'px'
|
|
|
}
|
|
|
|
|
|
//切换任务
|