Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
a80b954f
提交
a80b954f
authored
8月 11, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(jimureport): 增加:积木报表-查看报表新增类目页和是否已分享标识
上级
3932a499
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
109 行增加
和
25 行删除
+109
-25
design.js
src/api/jimu/design.js
+19
-0
index.vue
src/views/jimureport/design/index.vue
+54
-11
index.vue
src/views/jimureport/list/index.vue
+36
-14
没有找到文件。
src/api/jimu/design.js
浏览文件 @
a80b954f
...
@@ -54,3 +54,22 @@ export function importReportAPI(data) {
...
@@ -54,3 +54,22 @@ export function importReportAPI(data) {
}
}
})
})
}
}
// 查询分享报表连接
export
function
selShareReportAPI
(
params
)
{
return
request
({
url
:
`/report/jmreport/share/queryJurisdiction`
,
params
})
}
// 创建/编辑分享链接参数
export
function
addOrEditShareReportAPI
(
data
)
{
return
request
({
url
:
`/report/jmreport/share/addAndEdit`
,
method
:
'POST'
,
data
})
}
src/views/jimureport/design/index.vue
浏览文件 @
a80b954f
...
@@ -60,7 +60,9 @@
...
@@ -60,7 +60,9 @@
<template
#
default=
"
{ row }">
<template
#
default=
"
{ row }">
<div>
<div>
<svg-icon
icon-class=
"bg-document"
></svg-icon>
<svg-icon
icon-class=
"bg-document"
></svg-icon>
<span
style=
"margin-left: 10px"
>
{{
row
.
name
}}
</span>
<el-link
:href=
"getReportPreviewUrl(row)"
target=
"_blank"
style=
"margin-left: 10px"
>
{{
row
.
name
}}
</el-link>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -69,12 +71,12 @@
...
@@ -69,12 +71,12 @@
align=
"left"
align=
"left"
width=
"200"
>
width=
"200"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<xl-tool-tip
content=
"
预览
报表"
<xl-tool-tip
content=
"
分享
报表"
placement=
"top"
>
placement=
"top"
>
<el-button
link
<el-button
link
type=
"primary"
type=
"primary"
icon=
"
View
"
icon=
"
Share
"
@
click=
"handle
Preview
(scope.row)"
></el-button>
@
click=
"handle
Share
(scope.row)"
></el-button>
</xl-tool-tip>
</xl-tool-tip>
<xl-tool-tip
content=
"修改"
<xl-tool-tip
content=
"修改"
placement=
"top"
>
placement=
"top"
>
...
@@ -108,6 +110,37 @@
...
@@ -108,6 +110,37 @@
v-model:limit=
"queryParams.pageSize"
v-model:limit=
"queryParams.pageSize"
@
pagination=
"getReportList"
/>
@
pagination=
"getReportList"
/>
</el-col>
</el-col>
<!-- 新增/编辑分享弹窗 -->
<el-dialog
title=
"创建分享链接"
v-model=
"dialogVisible"
>
<el-form
label-width=
"180px"
>
<el-form-item
label=
"过期时间"
>
<el-radio-group
v-model=
"expireTime"
>
<el-radio
label=
"永久有效"
>
永久有效
</el-radio>
<el-radio
label=
"7天"
>
7天
</el-radio>
<el-radio
label=
"1天"
>
1天
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"是否开启密码"
>
<el-radio-group
v-model=
"isPasswordEnabled"
>
<el-radio
label=
"否"
>
否
</el-radio>
<el-radio
label=
"是"
>
是
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"是否检验分享token"
>
<el-switch
v-model=
"isCheckToken"
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
>
确认
</el-button>
</span>
</
template
>
</el-dialog>
</el-row>
</el-row>
</div>
</div>
</div>
</div>
...
@@ -115,7 +148,7 @@
...
@@ -115,7 +148,7 @@
<
script
setup
>
<
script
setup
>
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
{
getReportFolderStructureAPI
,
getDesignReportListAPI
,
deleteReportAPI
,
copyReportAPI
,
addReportAPI
,
importReportAPI
}
from
'@/api'
import
{
getReportFolderStructureAPI
,
getDesignReportListAPI
,
deleteReportAPI
,
copyReportAPI
,
addReportAPI
,
importReportAPI
,
selShareReportAPI
}
from
'@/api'
import
useUserStore
from
'@/store/modules/user'
import
useUserStore
from
'@/store/modules/user'
const
{
proxy
}
=
getCurrentInstance
()
const
{
proxy
}
=
getCurrentInstance
()
...
@@ -187,7 +220,10 @@ const getReportList = async () => {
...
@@ -187,7 +220,10 @@ const getReportList = async () => {
total
.
value
=
res
.
result
.
total
total
.
value
=
res
.
result
.
total
}
}
getReportList
()
getReportList
()
// 报表预览地址
const
getReportPreviewUrl
=
(
row
)
=>
{
return
`
${
reportViewURL
}
/
${
row
.
id
}
?token=
${
getToken
()}
&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
}
/********* 报表功能按钮 ***********/
/********* 报表功能按钮 ***********/
// 新建报表
// 新建报表
...
@@ -206,16 +242,23 @@ const handleImport = () => {
...
@@ -206,16 +242,23 @@ const handleImport = () => {
formData
.
append
(
'type'
,
queryParams
.
reportType
)
formData
.
append
(
'type'
,
queryParams
.
reportType
)
const
res
=
await
importReportAPI
(
formData
)
const
res
=
await
importReportAPI
(
formData
)
proxy
.
$modal
.
msgSuccess
(
res
.
result
)
proxy
.
$modal
.
msgSuccess
(
res
.
result
)
getReportList
()
getReportList
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
proxy
.
$modal
.
msgError
(
err
)
proxy
.
$modal
.
msgError
(
err
)
})
})
}
}
// 预览报表
// 分享报表
const
handlePreview
=
(
row
)
=>
{
const
shareReportUrl
=
ref
(
''
)
window
.
open
(
`
${
reportViewURL
}
/
${
row
.
id
}
?token=
${
getToken
()}
&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
)
const
dialogVisible
=
ref
(
false
)
const
handleShare
=
async
(
row
)
=>
{
const
res
=
await
selShareReportAPI
({
reportId
:
row
.
id
})
shareReportUrl
.
value
=
res
.
result
?.
previewUrl
dialogVisible
.
value
=
true
}
}
// 修改报表
// 修改报表
const
handleEdit
=
(
row
)
=>
{
const
handleEdit
=
(
row
)
=>
{
window
.
open
(
`
${
reportEditURL
}
/
${
row
.
id
}
?token=
${
getToken
()}
&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
)
window
.
open
(
`
${
reportEditURL
}
/
${
row
.
id
}
?token=
${
getToken
()}
&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
)
...
...
src/views/jimureport/list/index.vue
浏览文件 @
a80b954f
...
@@ -37,18 +37,26 @@
...
@@ -37,18 +37,26 @@
prop=
"name"
prop=
"name"
align=
"left"
align=
"left"
sortable
>
sortable
>
<template
#
default=
"
scope
"
>
<template
#
default=
"
{ row }
">
<div
style=
"display: flex; align-items: center"
>
<div
style=
"display: flex; align-items: center"
>
<svg-icon
icon-class=
"bg-document"
></svg-icon>
<svg-icon
icon-class=
"bg-document"
></svg-icon>
<span
style=
"margin-left: 10px"
>
{{
scope
.
row
.
name
}}
</span>
<el-link
:href=
"row.previewUrl"
target=
"_blank"
style=
"margin-left: 10px"
>
{{
row
.
name
}}
</el-link>
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"报表类目"
key=
"categoryName"
prop=
"categoryName"
align=
"left"
width=
"120"
sortable
/>
<el-table-column
label=
"创建人"
<el-table-column
label=
"创建人"
key=
"createBy"
key=
"createBy"
prop=
"createBy"
prop=
"createBy"
align=
"left"
align=
"left"
width=
"1
8
0"
width=
"1
2
0"
sortable
/>
sortable
/>
<el-table-column
label=
"创建时间"
<el-table-column
label=
"创建时间"
prop=
"createTime"
prop=
"createTime"
...
@@ -59,16 +67,31 @@
...
@@ -59,16 +67,31 @@
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"是否被分享"
key=
"hasShare"
prop=
"hasShare"
align=
"center"
width=
"120"
sortable
>
<!-- 使用 tag 标记颜色 -->
<
template
#
default=
"{ row }"
>
<el-tag
:type=
"row.hasShare === 1 ? 'success' : 'danger'"
>
{{
row
.
hasShare
===
1
?
'是'
:
'否'
}}
</el-tag>
</
template
>
</el-table-column>
<!-- 操作预览 -->
<!-- 操作预览 -->
<el-table-column
label=
"操作"
<el-table-column
label=
"操作"
key=
"operation"
key=
"operation"
align=
"center"
align=
"center"
width=
"1
8
0"
>
width=
"1
2
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
link
<el-tooltip
content=
"复制报表地址"
>
type=
"primary"
<el-button
text
icon=
"Reading"
type=
"primary"
@
click=
"previewReport(scope.row)"
>
预览
</el-button>
icon=
"Share"
v-copyText=
"scope.row.previewUrl"
v-copyText:callback=
"copyTextSuccess"
/>
</el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -88,6 +111,7 @@
...
@@ -88,6 +111,7 @@
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
useUserStore
from
'@/store/modules/user'
import
useUserStore
from
'@/store/modules/user'
const
{
proxy
}
=
getCurrentInstance
()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
reportViewURL
=
import
.
meta
.
env
.
VITE_APP_REPORT_PREVIEW_URL
const
reportViewURL
=
import
.
meta
.
env
.
VITE_APP_REPORT_PREVIEW_URL
/*************** 报表列表部分 ****************/
/*************** 报表列表部分 ****************/
...
@@ -124,12 +148,10 @@
...
@@ -124,12 +148,10 @@
getReportList
()
getReportList
()
// 点击某行报表
// 点击某行报表
function
previewReport
(
row
)
{
function
copyTextSuccess
(
)
{
window
.
open
(
`
${
reportViewURL
}
/
${
row
.
id
}
?token=
${
getToken
()}
&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
)
proxy
.
$modal
.
msgSuccess
(
'链接已复制到剪切板'
)
}
}
</
script
>
</
script
>
<
style
scoped
<
style
scoped
lang=
"scss"
>
lang=
"scss"
></
style
>
\ No newline at end of file
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论