update
parent
520b119525
commit
e2391a88a1
|
|
@ -68,7 +68,7 @@ function computedTreeNode(item: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getData() {
|
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: dataArr } = await getBPCActList({ moduleId: 1 })
|
||||||
const { rows: dataBrr } = await getBPCActList({ moduleId: 4 })
|
const { rows: dataBrr } = await getBPCActList({ moduleId: 4 })
|
||||||
// const { rows: dataCrr } = await getBPCActList({ moduleId: 3 });
|
// const { rows: dataCrr } = await getBPCActList({ moduleId: 3 });
|
||||||
|
|
@ -112,8 +112,8 @@ async function getData() {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFile(arr:any[]):any[] {
|
function getFile(arr: any[]): any[] {
|
||||||
let file:any = []
|
let file: any = []
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
item.fileList && file.push(...item.fileList)
|
item.fileList && file.push(...item.fileList)
|
||||||
if (item.childList?.length) {
|
if (item.childList?.length) {
|
||||||
|
|
@ -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 函数
|
||||||
|
|
@ -164,8 +164,12 @@ const download = async (row) => {
|
||||||
message.error('没有访问权限')
|
message.error('没有访问权限')
|
||||||
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">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue