|
@@ -8,10 +8,8 @@
|
|
|
<div class="report-header__desc">梅县区雁洋镇南福村的飞鸟智慧农业</div>
|
|
<div class="report-header__desc">梅县区雁洋镇南福村的飞鸟智慧农业</div>
|
|
|
<div class="report-header__desc">梅州柚子基地</div>
|
|
<div class="report-header__desc">梅州柚子基地</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="loading" class="diagnosis-report-status">加载中...</div>
|
|
|
|
|
- <div v-else-if="!reportData" class="diagnosis-report-status">暂无报告数据</div>
|
|
|
|
|
|
|
|
|
|
- <div v-else class="report-main">
|
|
|
|
|
|
|
+ <div class="report-main">
|
|
|
<div class="base-bg">
|
|
<div class="base-bg">
|
|
|
<div class="base-title">
|
|
<div class="base-title">
|
|
|
<img src="@/assets/img/report/base-title.png" alt="" class="base-title__icon">
|
|
<img src="@/assets/img/report/base-title.png" alt="" class="base-title__icon">
|
|
@@ -144,20 +142,18 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- <div v-if="reportData" class="share-btn" @click="handleShare">转发报告</div> -->
|
|
|
|
|
|
|
+ <!-- <div class="share-btn" @click="handleShare">转发报告</div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { onMounted, ref } from "vue";
|
|
|
|
|
|
|
+import { ref } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
|
-import { ElMessage } from "element-plus";
|
|
|
|
|
import wx from "weixin-js-sdk";
|
|
import wx from "weixin-js-sdk";
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// 常量
|
|
// 常量
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
-const ENTRY_FARM_DATA_KEY = "ENTRY_FARM_DATA";
|
|
|
|
|
|
|
|
|
|
const TABS = [
|
|
const TABS = [
|
|
|
{
|
|
{
|
|
@@ -311,13 +307,9 @@ const SECTION_MAP = {
|
|
|
// 页面状态
|
|
// 页面状态
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
-const loading = ref(false);
|
|
|
|
|
-const reportData = ref(null);
|
|
|
|
|
const activeTab = ref("weather");
|
|
const activeTab = ref("weather");
|
|
|
const tabs = TABS;
|
|
const tabs = TABS;
|
|
|
|
|
|
|
|
-const entryFarmData = JSON.parse(localStorage.getItem(ENTRY_FARM_DATA_KEY) || "null");
|
|
|
|
|
-
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// 锚点定位
|
|
// 锚点定位
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
@@ -328,28 +320,6 @@ const scrollToSection = (key) => {
|
|
|
el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
el.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// ---------------------------------------------------------------------------
|
|
|
|
|
-// 接口
|
|
|
|
|
-// ---------------------------------------------------------------------------
|
|
|
|
|
-const fetchReport = async () => {
|
|
|
|
|
- loading.value = true;
|
|
|
|
|
- reportData.value = null;
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await VE_API.questionnaire.checkReportGenerated({
|
|
|
|
|
- tel: entryFarmData.phone,
|
|
|
|
|
- });
|
|
|
|
|
- if (res?.code === 200 && res.data?.report) {
|
|
|
|
|
- reportData.value = res.data.report;
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage.error(res?.msg || "获取诊断报告失败");
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- ElMessage.error(e?.response?.data?.msg || e?.message || "获取诊断报告失败");
|
|
|
|
|
- } finally {
|
|
|
|
|
- loading.value = false;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
const handleShare = () => {
|
|
const handleShare = () => {
|
|
|
const query = {
|
|
const query = {
|
|
|
askInfo: { title: "转发报告", content: "是否分享给好友" },
|
|
askInfo: { title: "转发报告", content: "是否分享给好友" },
|
|
@@ -366,10 +336,6 @@ const handleShare = () => {
|
|
|
url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
|
|
url: `/pages/subPages/share_page/index?pageParams=${JSON.stringify(query)}&type=sharePage`,
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- fetchReport();
|
|
|
|
|
-});
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -385,7 +351,7 @@ onMounted(() => {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 148px;
|
|
height: 148px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
- padding: 36px 20px 0;
|
|
|
|
|
|
|
+ padding: 26px 20px 0;
|
|
|
background: url("@/assets/img/report/title-bg.png") no-repeat center center;
|
|
background: url("@/assets/img/report/title-bg.png") no-repeat center center;
|
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
@@ -411,13 +377,6 @@ onMounted(() => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.diagnosis-report-status {
|
|
|
|
|
- padding: 48px 16px;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- color: #86909c;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
.report-main {
|
|
.report-main {
|
|
|
padding: 0 12px;
|
|
padding: 0 12px;
|
|
|
position: relative;
|
|
position: relative;
|