diff --git a/dist.zip b/dist.zip index 05400cf..ee8fb02 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/views/home/bcp/BCP.vue b/src/views/home/bcp/BCP.vue index 641ff8e..c0c673b 100644 --- a/src/views/home/bcp/BCP.vue +++ b/src/views/home/bcp/BCP.vue @@ -68,7 +68,7 @@ function computedTreeNode(item: any) { } async function getData() { - const {rows:datacArr} = await getBPCActList({moduleId: 2}) + const { rows: datacArr } = await getBPCActList({ moduleId: 2 }) const { rows: dataArr } = await getBPCActList({ moduleId: 1 }) const { rows: dataBrr } = await getBPCActList({ moduleId: 4 }) // const { rows: dataCrr } = await getBPCActList({ moduleId: 3 }); @@ -112,8 +112,8 @@ async function getData() { ] } -function getFile(arr:any[]):any[] { - let file:any = [] +function getFile(arr: any[]): any[] { + let file: any = [] arr.forEach((item) => { item.fileList && file.push(...item.fileList) if (item.childList?.length) { @@ -126,7 +126,7 @@ function getFile(arr:any[]):any[] { function addIsShow(obj) { if (obj) { obj.isShow = true // 在当前对象上添加 isShow 属性 - obj.fileList ? obj.fileLists = [...obj.fileList ] : obj.fileLists = [] + obj.fileList ? (obj.fileLists = [...obj.fileList]) : (obj.fileLists = []) if (obj.childList && obj.childList.length > 0) { obj.fileLists.push(...getFile(obj.childList)) // 如果有子对象,则递归调用 addIsShow 函数 @@ -164,8 +164,12 @@ const download = async (row) => { message.error('没有访问权限') return } - let { briefingPath ,filePath } = row - console.log("🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:", briefingPath ,filePath) + let { briefingPath, filePath } = row + console.log( + '🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:', + briefingPath, + filePath + ) if (!briefingPath && !filePath) { message.info('没有可预览文件!') @@ -177,11 +181,11 @@ const download = async (row) => { ) { // src.value = filePath // pdfShow.value = true - briefingPath = briefingPath || filePath + let url = 'https://view.xdocin.com/view?src=' + briefingPath || filePath const screenWidth = window.screen.width const screenHeight = window.screen.height window.open( - briefingPath, + url, '', 'width=' + screenWidth + @@ -192,6 +196,18 @@ const download = async (row) => { ',left=' + 0 ) + // window.open( + // briefingPath, + // '', + // 'width=' + + // screenWidth + + // ',height=' + + // screenHeight + + // ',top=' + + // 0 + + // ',left=' + + // 0 + // ) } else { message.error( "文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!" @@ -327,8 +343,8 @@ const isChart = (content) => { class="flex font-bold items-center h-40px w-full text-white text-18px border-b-black border-2px mt-4px" style="background: linear-gradient(to top, #006be5, #002c99)" > -
时间
-
情报内容
+
时间
+
情报内容
风险评估