main
王文龙 2023-11-15 21:43:49 +08:00
parent 520b119525
commit e2391a88a1
2 changed files with 26 additions and 10 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -126,7 +126,7 @@ function getFile(arr:any[]):any[] {
function addIsShow(obj) { function addIsShow(obj) {
if (obj) { if (obj) {
obj.isShow = true // isShow 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) { if (obj.childList && obj.childList.length > 0) {
obj.fileLists.push(...getFile(obj.childList)) obj.fileLists.push(...getFile(obj.childList))
// addIsShow // addIsShow
@ -165,7 +165,11 @@ const download = async (row) => {
return return
} }
let { briefingPath, filePath } = row let { briefingPath, filePath } = row
console.log("🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:", briefingPath ,filePath) console.log(
'🚀 ~ file: BCP.vue:169 ~ briefingPath ,filePath:',
briefingPath,
filePath
)
if (!briefingPath && !filePath) { if (!briefingPath && !filePath) {
message.info('没有可预览文件!') message.info('没有可预览文件!')
@ -177,11 +181,11 @@ const download = async (row) => {
) { ) {
// src.value = filePath // src.value = filePath
// pdfShow.value = true // pdfShow.value = true
briefingPath = briefingPath || filePath let url = 'https://view.xdocin.com/view?src=' + briefingPath || filePath
const screenWidth = window.screen.width const screenWidth = window.screen.width
const screenHeight = window.screen.height const screenHeight = window.screen.height
window.open( window.open(
briefingPath, url,
'', '',
'width=' + 'width=' +
screenWidth + screenWidth +
@ -192,6 +196,18 @@ const download = async (row) => {
',left=' + ',left=' +
0 0
) )
// window.open(
// briefingPath,
// '',
// 'width=' +
// screenWidth +
// ',height=' +
// screenHeight +
// ',top=' +
// 0 +
// ',left=' +
// 0
// )
} else { } else {
message.error( message.error(
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'" "文件格式不是 '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" 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)" style="background: linear-gradient(to top, #006be5, #002c99)"
> >
<div class="w-[20%] pl-6px">时间</div> <div class="w-[14%] pl-6px">时间</div>
<div class="w-[50%]">情报内容</div> <div class="w-[56%]">情报内容</div>
<div class="w-[30%]">风险评估</div> <div class="w-[30%]">风险评估</div>
</div> </div>
<div class="overflow-hidden pt-4px"> <div class="overflow-hidden pt-4px">