|
|
@@ -10,7 +10,7 @@
|
|
|
<template v-if="webviewShow">
|
|
|
<web-view :webview-styles="webViewStyle" :style="webViewStyle" :src="webSrc" name="exceliframe" @message="handleMessage"/>
|
|
|
</template>
|
|
|
- <view id="action-bar" class="action-bar">
|
|
|
+ <view id="action-bar" class="action-bar z-24">
|
|
|
<button type="primary" class="action-bar-btn" @click="formSaveClick">保 存</button>
|
|
|
</view>
|
|
|
</hc-sys>
|
|
|
@@ -43,12 +43,18 @@ onLoad((option) => {
|
|
|
// #endif
|
|
|
const user = encodeURIComponent(JSON.stringify(getStorage('login_user_info')))
|
|
|
if (option.node) {
|
|
|
+ uni.showLoading({title: '加载中...', mask: true});
|
|
|
const res = JSON.parse(decodeURIComponent(option.node));
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: res.title
|
|
|
})
|
|
|
pageNode.value = res
|
|
|
webSrc.value = `${htmlsrc}&user=${user}&node=${option.node}`
|
|
|
+ } else {
|
|
|
+ errorToast('参数错误');
|
|
|
+ setTimeout(() => {
|
|
|
+ toBack()
|
|
|
+ },1500)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
@@ -83,7 +89,6 @@ const setWebViewStyle = async () => {
|
|
|
const {statusBarHeight} = uni.getSystemInfoSync()
|
|
|
webViewStyle.value.top = statusBarHeight + 45 + titleBarHeight
|
|
|
// #endif
|
|
|
-
|
|
|
//底部
|
|
|
const actionBar = await querySelect(instance,'action-bar')
|
|
|
const actionBarHeight = actionBar?.height ?? 80
|
|
|
@@ -116,6 +121,7 @@ const handleMessage = (event) => {
|
|
|
// #endif
|
|
|
if (msg.source === 'web') {
|
|
|
if (msg.type === 'formRender') {
|
|
|
+ uni.hideLoading();
|
|
|
isFormRender.value = true
|
|
|
}
|
|
|
if (msg.type === 'back') {
|
|
|
@@ -126,6 +132,17 @@ const handleMessage = (event) => {
|
|
|
uni.hideLoading();
|
|
|
previewClick()
|
|
|
}
|
|
|
+ //消息提示
|
|
|
+ if (msg.type === 'msg') {
|
|
|
+ uni.hideLoading();
|
|
|
+ const { title, icon } = msg.data
|
|
|
+ uni.showToast({
|
|
|
+ title: title,
|
|
|
+ duration: 2000,
|
|
|
+ icon: icon,
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -240,7 +257,7 @@ const previewClick = async () => {
|
|
|
})
|
|
|
uni.hideLoading();
|
|
|
if (!error && code === 200 && data) {
|
|
|
- toPdfPreview(data)
|
|
|
+ toPdfPreview(data).then()
|
|
|
} else {
|
|
|
errorToast('获取失败:' + msg);
|
|
|
}
|