|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="container-cygx" v-if="haveData" :class="reportInfo.IsResearch ? 'no-cv' : ''">
|
|
|
+ <div class="container-cygx" @copy="copyMonitor" v-if="haveData == 1" :class="reportInfo.IsResearch ? 'no-cv' : ''">
|
|
|
<canvas id="tutorial" ref="tutorial"></canvas>
|
|
|
<div class="search">
|
|
|
<div class="search-box" @click="btnSearch">
|
|
@@ -37,13 +37,19 @@
|
|
|
</div>
|
|
|
<div v-else class="nodata">
|
|
|
<img src="@/assets/cygx/noauth.png" mode="" class="nodata_ico" />
|
|
|
- <p>您的试用权限已到期</p>
|
|
|
- <p>若想继续试用,请联系销售</p>
|
|
|
+ <div v-if="haveData == 2">
|
|
|
+ <p>您暂无权限查看报告</p>
|
|
|
+ <p>若想查看可联系销售开通试用权限</p>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <p>您的试用权限已到期</p>
|
|
|
+ <p>若想继续试用,请联系销售</p>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { reactive, onMounted, toRefs, ref ,onUnmounted } from "vue";
|
|
|
+import { reactive, onMounted, toRefs, ref, onUnmounted } from "vue";
|
|
|
import { useRouter, useRoute } from "vue-router";
|
|
|
import { RaiApi } from "@/api/htgj/api.js";
|
|
|
import { Icon, Dialog, Toast } from "vant";
|
|
@@ -56,7 +62,7 @@ const state = reactive({
|
|
|
reportInfo: {},
|
|
|
});
|
|
|
const rerportId = ref(null);
|
|
|
-const haveData = ref(true);
|
|
|
+const haveData = ref(1);
|
|
|
const fileLink = ref(false);
|
|
|
const showTips = ref(false);
|
|
|
const tutorial = ref(null);
|
|
@@ -80,7 +86,7 @@ const scrolltop = () => {
|
|
|
/* 复制 */
|
|
|
const copyMonitor = () => {
|
|
|
RaiApi.pageHistoryCopy({
|
|
|
- DetailId: rerportId.value + ""
|
|
|
+ DetailId: rerportId.value + "",
|
|
|
}).then((res) => {});
|
|
|
};
|
|
|
|
|
@@ -102,7 +108,7 @@ const waterMark = (text) => {
|
|
|
|
|
|
//点击回到搜索页面
|
|
|
const btnSearch = () => {
|
|
|
- router.push('search')
|
|
|
+ router.push("search");
|
|
|
};
|
|
|
|
|
|
const timeState = reactive({
|
|
@@ -116,7 +122,7 @@ const getReport = (id) => {
|
|
|
ArticleId: id,
|
|
|
}).then((res) => {
|
|
|
if (res.Ret === 200) {
|
|
|
- haveData.value = res.Data.HasPermission === 1 ? true : false;
|
|
|
+ haveData.value = res.Data.HasPermission;
|
|
|
if (res.Data.HasPermission === 1) {
|
|
|
//有访问权限
|
|
|
state.reportInfo = res.Data.Detail;
|
|
@@ -148,14 +154,11 @@ onMounted(() => {
|
|
|
if (route.query.id) {
|
|
|
rerportId.value = route.query.id;
|
|
|
getReport(rerportId.value);
|
|
|
- document.addEventListener("copy", (e) => {
|
|
|
- copyMonitor();
|
|
|
- });
|
|
|
}
|
|
|
});
|
|
|
onUnmounted(() => {
|
|
|
clearInterval(timeState.setIntervalTiem);
|
|
|
- if (!rerportId.value || !haveData.value) return;
|
|
|
+ if (!rerportId.value || haveData.value !== 1) return;
|
|
|
RaiApi.addStopTime({
|
|
|
ArticleId: Number(rerportId.value),
|
|
|
StopTime: timeState.readTiem,
|