<template>
  <view class="detailed" style="font-size: 30upx">
    <view class="detailedContent">
      <web-view update-title="消防报告详情" :src="pathUrl" allow></web-view>
    </view>
  </view>
</template>

<script setup>
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
import { ref, onMounted, inject, shallowRef, reactive, watchEffect, getCurrentInstance, toRefs } from "vue";
import publicStore from "@/store/modules/public";

import lineEcharts from "./echarts.vue";

import {} from "@/api/business/mhxf/informationSelect";

const { proxy } = getCurrentInstance();

const publicStores = publicStore(); //全局公共Store

const dataList = reactive({
  pathUrl: "",
  viewerUrl: "/static/pdf/web/viewer.html",
});

const { pathUrl, viewerUrl } = toRefs(dataList);

watchEffect(() => {});

// 自定义导航事件
onNavigationBarButtonTap((e) => {
  if (e.float == "right") {
    uni.navigateTo({
      url: "/pages/business/mhxf/xunJian/collect/components/collectRecord",
    });
  } else {
  }
});

onLoad((options) => {
  if (options.reportPath) {
    let fileUrl = encodeURIComponent(options.reportPath); // encodeURIComponent 函数可把字符串作为 URI 组件进行编码。
    pathUrl.value = viewerUrl.value + "?file=" + fileUrl;
  }
});

onReady(() => {});

onMounted(() => {});
</script>

<style lang="scss">
.detailed {
  height: calc(100vh - 44px);
  .detailedContent {
  }
}
</style>