diff --git a/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue b/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue
index 110a8ed..74a872c 100644
--- a/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue
+++ b/src/views/goverment/huizhou/preProjectManagement/components/readonlyDialogDiv/index.vue
@@ -987,6 +987,7 @@
下载
+ 预览
@@ -1002,6 +1003,10 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { useDownload } from "@/hooks/useDownload";
import AreaSelected from "@/components/ChinaAreaData/index.vue";
import divDialogComponent from "@/components/divDialogComponent/index.vue";
+import { Base64 } from "js-base64";
+const uplUrl = import.meta.env.VITE_ULD_API_URL;
+const baseUrl = window.location.protocol + "//" + window.location.host;
+// const baseUrl = import.meta.env.VITE_API_URL;
const emits = defineEmits(["update:ennMEssageVisible"]);
const props = defineProps(["relativeId", "ennMEssageVisible"]);
const current = ref([]);
@@ -1197,6 +1202,14 @@ const onDowmload = row => {
useDownload(exportApp, `${row.name}`, { fileUrl: row.response.fileUrl })
);
};
+const onPreview = (row: any) => {
+ const fileExtension = row.fileUrl.slice(row.fileUrl.lastIndexOf(".") + 1);
+ const url = Base64.encode(baseUrl + "/xmgl/file/preview?fileUrl=" + row.fileUrl + "&fullfilename=123." + fileExtension);
+ // 标记打包
+ // const url1 = "http://182.90.224.147:8012/onlinePreview?url=";
+ // const url1 = "http://192.168.34.155:8012/onlinePreview?url=";
+ window.open(uplUrl + url);
+};
// 附件信息的查看点击
const onAppendix = row => {
console.log(row);
diff --git a/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue b/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue
index 7045bf2..d8d9df7 100644
--- a/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue
+++ b/src/views/goverment/huizhou/projectList/components/fileListDialogDiv/index.vue
@@ -115,6 +115,7 @@ import { jxj_User } from "@/api/types";
import { useHandleData } from "@/hooks/useHandleData";
import divDialogComponent from "@/components/divDialogComponent/index.vue";
import { Base64 } from "js-base64";
+const uplUrl = import.meta.env.VITE_ULD_API_URL;
const emits = defineEmits(["update:fileListVisible"]);
const props = defineProps(["relativeId", "engineeringSn", "fileListVisible"]);
const selectedAnnex = ref(); // 选中的查看附件
@@ -149,7 +150,6 @@ const addDialogVisible = ref(false);
const dialogVisible = ref(false);
const annexFiles = ref([]);
const visible1 = ref(false);
-const uplUrl = import.meta.env.VITE_ULD_API_URL;
// 保存附件文件上传列表
const saveAnnexFile = async () => {
let requestData = {
diff --git a/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue b/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue
index 9c126ba..425e9ad 100644
--- a/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue
+++ b/src/views/goverment/huizhou/projectList/components/readonlyDialogDiv/index.vue
@@ -290,6 +290,7 @@
下载
+ 预览
@@ -305,6 +306,10 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { useDownload } from "@/hooks/useDownload";
import AreaSelected from "@/components/ChinaAreaData/index.vue";
import divDialogComponent from "@/components/divDialogComponent/index.vue";
+import { Base64 } from "js-base64";
+const uplUrl = import.meta.env.VITE_ULD_API_URL;
+const baseUrl = window.location.protocol + "//" + window.location.host;
+// const baseUrl = import.meta.env.VITE_API_URL;
const emits = defineEmits(["update:ennMEssageVisible"]);
const props = defineProps(["relativeId", "ennMEssageVisible"]);
const current = ref([]);
@@ -320,6 +325,14 @@ const onDowmload = row => {
useDownload(exportApp, `${row.fileName}`, { fileUrl: row.fileUrl })
);
};
+const onPreview = (row: any) => {
+ const fileExtension = row.fileUrl.slice(row.fileUrl.lastIndexOf(".") + 1);
+ const url = Base64.encode(baseUrl + "/xmgl/file/preview?fileUrl=" + row.fileUrl + "&fullfilename=123." + fileExtension);
+ // 标记打包
+ // const url1 = "http://182.90.224.147:8012/onlinePreview?url=";
+ // const url1 = "http://192.168.34.155:8012/onlinePreview?url=";
+ window.open(uplUrl + url);
+};
// 附件信息的查看点击
const onAppendix = row => {
dialogVisible.value = true;
@@ -521,7 +534,7 @@ onMounted(async () => {
border-left: 2px solid #0f81ff;
font-size: 24px;
color: #333333;
- width: 90%;
+ width: 97%;
margin: 20px auto;
> img {
width: 16px;