Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
be545bf7
提交
be545bf7
authored
7月 24, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(report): 新增_管理员分配报表权限给个人功能_个人查看被分配报表列表和预览功能
上级
0bb1469d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
196 行增加
和
227 行删除
+196
-227
report.js
src/api/bi/report.js
+9
-0
index.js
src/api/index.js
+1
-0
index.js
src/api/jimu/index.js
+2
-2
report.js
src/api/system/report.js
+32
-0
element-ui.scss
src/assets/styles/element-ui.scss
+1
-9
report.vue
src/views/bi/finance/report.vue
+0
-212
index.vue
src/views/bi/report/index.vue
+148
-0
jimu.vue
src/views/jimureport/jimu.vue
+2
-3
manager.vue
src/views/system/report/manager.vue
+0
-0
vite.config.js
vite.config.js
+1
-1
没有找到文件。
src/api/bi/report.js
0 → 100644
浏览文件 @
be545bf7
import
request
from
'@/utils/request'
// 获取被分配的报表列表
export
function
getReportListAPI
(
params
)
{
return
request
({
url
:
'/report/jimuReport/query/list'
,
params
})
}
src/api/index.js
浏览文件 @
be545bf7
...
...
@@ -31,6 +31,7 @@ export * from './system/menu'
export
*
from
'./system/notice'
export
*
from
'./system/operlog'
export
*
from
'./system/post'
export
*
from
'./system/report'
export
*
from
'./system/role'
export
*
from
'./system/user'
export
*
from
'./tool/gen'
src/api/jimu/index.js
浏览文件 @
be545bf7
...
...
@@ -28,4 +28,5 @@ export function getReportFolderListAPI() {
},
method
:
'GET'
})
}
\ No newline at end of file
}
src/api/system/report.js
0 → 100644
浏览文件 @
be545bf7
import
request
from
'@/utils/request'
// 管理员查询所有报表接口
export
const
selReportListAPI
=
(
params
)
=>
{
return
request
({
url
:
`/report/jimuReport/query/all/list`
,
params
})
}
// 授权单个报表给单个/多个用户
export
const
batchAuthReportAPI
=
(
data
)
=>
{
return
request
({
url
:
`/report/jimuReportAuth/core/authUsers`
,
method
:
"PUT"
,
data
})
}
// 报表分类下拉列表接口
export
const
selReportCategoryAPI
=
()
=>
{
return
request
({
url
:
`/report/jimuReportCategory/query/list`
})
}
// 查询-报表已分配用户列表
export
const
selReportAuthUserListAPI
=
(
params
)
=>
{
return
request
({
url
:
`/report/jimuReportAuth/query/list/user`
,
params
})
}
src/assets/styles/element-ui.scss
浏览文件 @
be545bf7
// cover some element-ui styles
body
.el-loading-mask
{
z-index
:
10000
!
important
;
}
.el-breadcrumb__inner
,
.el-breadcrumb__inner
a
{
font-weight
:
400
!
important
;
...
...
@@ -142,11 +138,7 @@ body .el-loading-mask{
flex
:
1
;
}
/* 全局覆盖Element Plus加载遮罩的背景色 */
.el-loading-mask
{
z-index
:
2
!
important
;
// background-color: red !important;
}
.el-pagination
{
font-size
:
var
(
--
xl-fontsize
)
!
important
;
...
...
src/views/bi/finance/report.vue
deleted
100644 → 0
浏览文件 @
0bb1469d
<
template
>
<div
class=
"app-container"
>
<el-card
class=
"container"
>
<template
#
header
>
<div
class=
"card-header"
>
<span>
常用报表
</span>
<el-button
class=
"custom"
type=
"primary"
link
@
click=
"visible = true"
>
自定义
</el-button>
</div>
</
template
>
<div
v-for=
"item in groups"
class=
"group_item"
>
<div>
<p
class=
"group_name"
>
<el-icon
color=
"blue"
size=
"18"
>
<Folder
/>
</el-icon>
<span>
{{ item.groupName }}
</span>
</p>
<div
class=
"link_wrap"
>
<div
class=
"link_item"
v-for=
"obj in item.items"
>
<el-icon
color=
"green"
size=
"16"
>
<Document></Document>
</el-icon>
<el-link
:href=
"baseURL + obj.previewUrl"
target=
"_blank"
>
{{ obj.reportName }}
</el-link>
</div>
</div>
</div>
</div>
</el-card>
<el-dialog
title=
"编辑常用报表"
v-model=
"visible"
draggable
overflow
>
<div
class=
"wrap"
>
<div
class=
"left"
>
<draggable
v-model=
"reportList"
group=
"reports"
ghost-class=
"dragging-item-left"
item-key=
"id"
>
<
template
#
item=
"{ element }"
>
<div
class=
"link_item"
>
<el-icon
color=
"green"
size=
"16"
>
<Document></Document>
</el-icon>
<el-link
:href=
"baseURL + element.previewUrl"
target=
"_blank"
>
{{
element
.
reportName
}}
</el-link>
</div>
</
template
>
</draggable>
</div>
<div
class=
"right"
>
<div
class=
"group-container"
>
<el-card
v-for=
"group in groups"
:key=
"group.id"
class=
"group_card"
:style=
"{ width: '100%' }"
>
<
template
#
header
>
<div
class=
"card-header"
>
<span>
{{
group
.
groupName
}}
</span>
</div>
</
template
>
<draggable
v-model=
"group.items"
group=
"reports"
ghost-class=
"dragging-item"
item-key=
"id"
@
change=
"groupChange"
>
<
template
#
item=
"{ element }"
>
<div
class=
"link_item"
>
<el-icon
color=
"green"
size=
"16"
>
<Document></Document>
</el-icon>
<el-link
:href=
"baseURL + element.previewUrl"
target=
"_blank"
>
{{
element
.
reportName
}}
</el-link>
</div>
</
template
>
</draggable>
</el-card>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
setup
>
import
{
getReportListAPI
,
getReportListBySelfAPI
,
getReportListByGroupAPI
,
addReportGroupAPI
}
from
'@/api'
import
draggable
from
'vuedraggable'
const
visible
=
ref
(
false
)
const
groups
=
ref
([])
const
baseURL
=
ref
(
import
.
meta
.
env
.
VITE_APP_REPORT_URL
+
'/report'
)
const
reportList
=
ref
([])
const
getReportList
=
async
()
=>
{
// 积木报表
const
{
data
}
=
await
getReportListAPI
({
categoryName
:
'财务报表'
})
// 其他报表
const
{
data
:
otherData
}
=
await
getReportListBySelfAPI
()
reportList
.
value
=
data
.
concat
(
otherData
)
// 右侧分组列表
const
res
=
await
getReportListByGroupAPI
({
categoryName
:
'财务报表'
})
groups
.
value
=
res
.
data
// 左侧报表里要删除右侧里面有的了,用 reportId 来判断
reportList
.
value
=
reportList
.
value
.
filter
(
item
=>
{
return
!
groups
.
value
.
some
(
group
=>
group
.
items
.
some
(
groupItem
=>
groupItem
.
reportId
===
item
.
reportId
))
})
}
// 拖入拖出+顺序改变
const
groupChange
=
async
(
e
)
=>
{
groups
.
value
.
forEach
(
o
=>
{
o
.
id
=
o
.
groupId
})
await
addReportGroupAPI
(
groups
.
value
)
}
getReportList
()
</
script
>
<
style
scoped
lang=
"scss"
>
.el-card__header
{
.custom
{
float
:
right
;
padding
:
3px
0
;
}
}
.group_item
{
.group_name
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
font-size
:
16px
;
font-weight
:
800
;
}
.link_wrap
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
0
0
0
20px
;
.link_item
{
padding
:
10px
0
;
width
:
25%
;
/* 超出宽度文字省略号 */
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
}
.link_item
{
padding
:
5px
0
;
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
}
.group_card
{
margin-top
:
20px
;
}
.wrap
{
display
:
flex
;
gap
:
20px
;
width
:
100%
;
height
:
100%
;
.left
{
width
:
100%
;
height
:
100%
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
}
.right
{
width
:
100%
;
height
:
100%
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
}
}
/* 添加拖拽时的样式 */
.dragging-item-left
{
background-color
:
transparent
;
}
.dragging-item
{
background-color
:
#a1ccf2
;
}
</
style
>
\ No newline at end of file
src/views/bi/report/index.vue
0 → 100644
浏览文件 @
be545bf7
<
template
>
<div
class=
"app-container"
>
<div
class=
"container"
>
<el-form
:model=
"queryParams"
ref=
"queryRef"
inline
label-width=
"68px"
v-show=
"showSearch"
>
<el-form-item
label=
"报表名称"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"搜索报表名称"
clearable
style=
"width: 240px"
@
input=
"getReportList"
/>
</el-form-item>
<el-form-item
label=
"报表类目"
prop=
"categoryName"
>
<el-select
v-model=
"queryParams.categoryName"
placeholder=
"选择报表类目"
clearable
filterable
@
change=
"getReportList"
style=
"width: 240px"
>
<el-option
v-for=
"item in categoryList"
:label=
"item.name"
:value=
"item.name"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
icon=
"Refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 表格数据 -->
<el-table
v-loading=
"loading"
:data=
"reportList"
>
<el-table-column
label=
"报表名称"
key=
"reportName"
prop=
"reportName"
align=
"left"
sortable
>
<template
#
default=
"scope"
>
<div
style=
"display: flex; align-items: center"
>
<el-icon>
<List
color=
"green"
/>
</el-icon>
<span
style=
"margin-left: 10px"
>
{{
scope
.
row
.
reportName
}}
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"创建人"
key=
"createBy"
prop=
"createBy"
align=
"left"
width=
"180"
sortable
/>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"left"
width=
"180"
sortable
>
<
template
#
default=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<!-- 操作预览 -->
<el-table-column
label=
"操作"
key=
"operation"
align=
"center"
width=
"180"
>
<
template
#
default=
"scope"
>
<el-button
link
type=
"primary"
icon=
"Reading"
@
click=
"previewReport(scope.row)"
>
预览
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- <pagination v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getReportList" /> -->
</div>
</div>
</template>
<
script
setup
name=
"Role"
>
import
{
getReportListAPI
,
selReportCategoryAPI
}
from
"@/api"
import
{
getToken
}
from
'@/utils/auth'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
const
reportBaseURL
=
import
.
meta
.
env
.
VITE_APP_REPORT_URL
const
{
proxy
}
=
getCurrentInstance
()
/*************** 报表列表部分 ****************/
// 报表搜索
const
showSearch
=
ref
(
true
)
const
queryParams
=
reactive
({
name
:
undefined
,
// 报表名称
categoryName
:
undefined
,
// 报表类目
pageNum
:
1
,
pageSize
:
10
})
// 获取设置报表类目下拉菜单
const
categoryList
=
ref
([])
const
getCategoryList
=
()
=>
{
selReportCategoryAPI
().
then
(
res
=>
{
categoryList
.
value
=
res
.
data
;
})
}
getCategoryList
()
// 重置
function
resetQuery
()
{
proxy
.
resetForm
(
"queryRef"
)
getReportList
()
}
// 获取报表列表
const
loading
=
ref
(
true
)
const
reportList
=
ref
([])
// 查询报表列表
function
getReportList
()
{
loading
.
value
=
true
getReportListAPI
(
queryParams
).
then
(
response
=>
{
reportList
.
value
=
response
.
data
loading
.
value
=
false
})
}
getReportList
()
// 点击某行报表
function
previewReport
(
row
)
{
window
.
open
(
`
${
reportBaseURL
}
/report/jmreport/view/
${
row
.
id
}
?token=
${
getToken
()}
&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
)
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
\ No newline at end of file
src/views/jimureport/jimu.vue
浏览文件 @
be545bf7
...
...
@@ -9,9 +9,8 @@ import iFrame from '@/components/iFrame/index'
// 获取 pinia 里保存的用户部门 id
import
useUserStore
from
'@/store/modules/user'
// 这里写暴露的统一的网关地址
const
store
=
useUserStore
()
const
openUrl
=
ref
(
`
${
import
.
meta
.
env
.
VITE_APP_REPORT_URL
}
/report/jmreport/list?token=`
+
getToken
()
+
`&tenantId=
${
store
.
$state
.
userInfo
.
deptId
}
`
)
const
userStore
=
useUserStore
()
const
openUrl
=
ref
(
`
${
import
.
meta
.
env
.
VITE_APP_REPORT_URL
}
/report/jmreport/list?token=`
+
getToken
()
+
`&tenantId=
${
userStore
.
$state
.
userInfo
.
deptId
}
`
)
</
script
>
<
style
lang=
"scss"
...
...
src/views/system/report/manager.vue
浏览文件 @
be545bf7
差异被折叠。
点击展开。
vite.config.js
浏览文件 @
be545bf7
...
...
@@ -39,7 +39,7 @@ export default defineConfig(({ mode, command }) => {
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
ql_local/
,
''
)
},
'/bc_local'
:
{
target
:
'http://192.168.10
1
.103:8180'
,
target
:
'http://192.168.10
0
.103:8180'
,
changeOrigin
:
true
,
rewrite
:
(
p
)
=>
p
.
replace
(
/^
\/
bc_local/
,
''
)
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论