Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zrch-risk-39
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
zrch-risk-39
Commits
500396be
提交
500396be
authored
1月 28, 2026
作者:
kxjia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
权限填报
上级
515fc6fb
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
157 行增加
和
43 行删除
+157
-43
Tb3.vue
...isk-client-39/src/views/baosong/report/components/Tb3.vue
+68
-5
index.vue
zrch-risk-client-39/src/views/baosong/report/index.vue
+85
-38
BaosongTpl.api.ts
zrch-risk-client-39/src/views/baosong/tpl/BaosongTpl.api.ts
+4
-0
没有找到文件。
zrch-risk-client-39/src/views/baosong/report/components/Tb3.vue
浏览文件 @
500396be
<
template
>
<
template
>
<div
class=
"bank-report-table"
>
<div
class=
"bank-report-table"
>
<!-- 加载遮罩层 -->
<div
v-if=
"loading"
class=
"loading-overlay"
>
<div
class=
"loading-spinner"
>
<div
class=
"spinner"
></div>
<div
class=
"loading-text"
>
加载中...
</div>
</div>
</div>
<vxe-toolbar>
<vxe-toolbar>
<template
#
buttons
>
<template
#
buttons
>
...
@@ -9,7 +16,7 @@
...
@@ -9,7 +16,7 @@
</div>
</div>
</
template
>
</
template
>
<
template
#
tools
>
<
template
#
tools
>
<vxe-button
status=
"primary"
icon=
"vxe-icon-save"
@
click=
"saveBatch()"
>
保存
</vxe-button>
<vxe-button
status=
"primary"
icon=
"vxe-icon-save"
@
click=
"saveBatch()"
:disabled=
"loading"
>
保存
</vxe-button>
</
template
>
</
template
>
</vxe-toolbar>
</vxe-toolbar>
<vxe-table
<vxe-table
...
@@ -22,6 +29,7 @@
...
@@ -22,6 +29,7 @@
height=
"auto"
height=
"auto"
class=
"custom-table"
class=
"custom-table"
:merge-cells=
"mergeCells"
:merge-cells=
"mergeCells"
:loading=
"loading"
<!
--
添加表格
loading
--
>
>
>
<vxe-column
field=
"serialNumber"
title=
"序号"
width=
"50"
></vxe-column>
<vxe-column
field=
"serialNumber"
title=
"序号"
width=
"50"
></vxe-column>
<vxe-column
field=
"project"
title=
"项目"
width=
"40"
>
<vxe-column
field=
"project"
title=
"项目"
width=
"40"
>
...
@@ -182,6 +190,9 @@ interface FormData {
...
@@ -182,6 +190,9 @@ interface FormData {
rind
:
number
rind
:
number
}
}
// 初始化loading状态
const
loading
=
ref
(
true
)
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
if
(
route
.
query
.
taskId
)
{
if
(
route
.
query
.
taskId
)
{
queryParam
.
value
.
taskId
=
Number
(
route
.
query
.
taskId
);
queryParam
.
value
.
taskId
=
Number
(
route
.
query
.
taskId
);
...
@@ -199,12 +210,20 @@ onMounted(async ()=>{
...
@@ -199,12 +210,20 @@ onMounted(async ()=>{
queryParam
.
value
.
tplCode
=
String
(
route
.
query
.
tplCode
);
queryParam
.
value
.
tplCode
=
String
(
route
.
query
.
tplCode
);
}
}
try
{
await
setTplItemMap
()
await
setTplItemMap
()
await
setData
();
await
setData
();
}
catch
(
error
)
{
VxeUI
.
modal
.
message
({
content
:
`初始化页面失败:
${
error
.
message
}
`
,
status
:
'error'
});
}
finally
{
loading
.
value
=
false
}
})
})
const
loading
=
ref
(
false
)
const
formData
=
reactive
({});
const
formData
=
reactive
({});
const
formValues
=
ref
<
FormData
[]
>
([])
const
formValues
=
ref
<
FormData
[]
>
([])
...
@@ -212,6 +231,8 @@ const formValues = ref<FormData[]>([])
...
@@ -212,6 +231,8 @@ const formValues = ref<FormData[]>([])
const
saveBatch
=
async
()
=>
{
const
saveBatch
=
async
()
=>
{
try
{
try
{
// 保存时也显示loading
const
saveLoading
=
ref
(
true
)
formValues
.
value
=
[]
formValues
.
value
=
[]
for
(
const
strKey
in
formData
)
{
for
(
const
strKey
in
formData
)
{
...
@@ -302,7 +323,7 @@ const setFormValues = async (pcode,code,valData,rind) => {
...
@@ -302,7 +323,7 @@ const setFormValues = async (pcode,code,valData,rind) => {
}
}
async
function
setData
()
{
async
function
setData
()
{
try
{
try
{
loading
.
value
=
true
;
loading
.
value
=
true
;
// 开始加载
const
taskId
=
queryParam
.
value
.
taskId
;
const
taskId
=
queryParam
.
value
.
taskId
;
const
tplid
=
queryParam
.
value
.
tplId
;
const
tplid
=
queryParam
.
value
.
tplId
;
Object
.
keys
(
formData
).
forEach
(
key
=>
delete
formData
[
key
]);
Object
.
keys
(
formData
).
forEach
(
key
=>
delete
formData
[
key
]);
...
@@ -397,11 +418,12 @@ async function setData() {
...
@@ -397,11 +418,12 @@ async function setData() {
status
:
'error'
status
:
'error'
});
});
}
finally
{
}
finally
{
loading
.
value
=
false
;
loading
.
value
=
false
;
// 结束加载
}
}
}
}
async
function
setTplItemMap
()
{
async
function
setTplItemMap
()
{
try
{
try
{
loading
.
value
=
true
;
// 开始加载
const
tplid
=
queryParam
.
value
.
tplId
const
tplid
=
queryParam
.
value
.
tplId
const
tplItem
=
await
allTplItems
({
const
tplItem
=
await
allTplItems
({
tplid
:
tplid
,
tplid
:
tplid
,
...
@@ -413,7 +435,7 @@ async function setTplItemMap() {
...
@@ -413,7 +435,7 @@ async function setTplItemMap() {
}
catch
(
error
)
{
}
catch
(
error
)
{
VxeUI
.
modal
.
message
({
content
:
`加载数据失败:
${
error
.
message
}
`
,
status
:
'error'
})
VxeUI
.
modal
.
message
({
content
:
`加载数据失败:
${
error
.
message
}
`
,
status
:
'error'
})
}
finally
{
}
finally
{
loading
.
value
=
false
;
// 结束加载
}
}
}
}
const
mergeCells
=
ref
<
VxeTablePropTypes
.
MergeCells
>
([
const
mergeCells
=
ref
<
VxeTablePropTypes
.
MergeCells
>
([
...
@@ -435,7 +457,48 @@ const mergeCells = ref<VxeTablePropTypes.MergeCells>([
...
@@ -435,7 +457,48 @@ const mergeCells = ref<VxeTablePropTypes.MergeCells>([
margin: 5px auto;
margin: 5px auto;
width: 60%;
width: 60%;
height:80vh;
height:80vh;
position: relative; /* 为loading遮罩层定位 */
}
/* 加载遮罩层样式 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}
.loading-spinner {
text-align: center;
}
}
.spinner {
width: 40px;
height: 40px;
margin: 0 auto 10px;
border: 3px solid #f3f3f3;
border-top: 3px solid #1890ff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-text {
font-size: 14px;
color: #1890ff;
font-weight: bold;
}
.custom-table {
.custom-table {
width: 100%;
width: 100%;
border: 1px solid #000;
border: 1px solid #000;
...
...
zrch-risk-client-39/src/views/baosong/report/index.vue
浏览文件 @
500396be
...
@@ -13,7 +13,9 @@
...
@@ -13,7 +13,9 @@
<template
#
title
>
<template
#
title
>
{{
item
.
code
}}
-
{{
item
.
nm
}}
{{
item
.
code
}}
-
{{
item
.
nm
}}
</
template
>
</
template
>
<
template
#
extra
><a
href=
"#"
@
click=
"gotoPage(item)"
>
填报
</a></
template
>
<
template
#
extra
>
<a
href=
"#"
@
click
.
prevent=
"gotoPage(item)"
>
填报
</a>
</
template
>
<span>
年度:{{ item.vyear }}
</span>
<span>
年度:{{ item.vyear }}
</span>
<span>
版本:{{ item.version }}
</span>
<span>
版本:{{ item.version }}
</span>
<span>
节点数:{{ item.childNum }}
</span><br>
<span>
节点数:{{ item.childNum }}
</span><br>
...
@@ -23,11 +25,12 @@
...
@@ -23,11 +25,12 @@
</a-row>
</a-row>
</div>
</div>
</a-card>
</a-card>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
onMounted
,
toRaw
}
from
'vue'
;
import
{
ref
,
onMounted
,
computed
,
nextTick
}
from
'vue'
;
import
{
allTpls
}
from
'../tpl/BaosongTpl.api'
;
import
{
findUserRightForTpl
}
from
'../tpl/BaosongTpl.api'
;
import
{
useRoute
,
useRouter
}
from
'vue-router'
;
import
{
useRoute
,
useRouter
}
from
'vue-router'
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
...
@@ -55,26 +58,38 @@ onMounted(()=>{
...
@@ -55,26 +58,38 @@ onMounted(()=>{
const
key
=
ref
(
'tab1'
);
const
key
=
ref
(
'tab1'
);
const
tabList
=
[
// 使用 computed 计算 tabList,根据 dataMap 中的记录数动态设置 disabled
const
tabList
=
computed
(()
=>
{
const
tabs
=
[
{
{
key
:
'tab1'
,
key
:
'tab1'
,
tab
:
'年报'
,
tab
:
'年报'
,
type
:
1
},
},
{
{
key
:
'tab2'
,
key
:
'tab2'
,
tab
:
'季报'
,
tab
:
'季报'
,
type
:
2
},
},
{
{
key
:
'tab3'
,
key
:
'tab3'
,
tab
:
'月报'
,
tab
:
'月报'
,
type
:
3
},
},
{
{
key
:
'tab4'
,
key
:
'tab4'
,
tab
:
'年度报告'
,
tab
:
'年度报告'
,
type
:
4
},
},
];
];
return
tabs
.
map
(
tab
=>
({
...
tab
,
disabled
:
!
dataMap
.
value
[
tab
.
type
]
||
dataMap
.
value
[
tab
.
type
].
length
===
0
}));
});
const
onTabChange
=
async
(
value
:
string
)
=>
{
const
onTabChange
=
async
(
value
:
string
)
=>
{
...
@@ -92,75 +107,106 @@ const onTabChange = async (value: string) => {
...
@@ -92,75 +107,106 @@ const onTabChange = async (value: string) => {
const
gotoPage
=
async
(
item
)
=>
{
const
gotoPage
=
async
(
item
)
=>
{
let
code
=
item
.
code
;
// 确保所有参数都设置完成后再跳转
queryParam
.
value
.
tplName
=
item
.
nm
queryParam
.
value
.
tplName
=
item
.
nm
||
''
queryParam
.
value
.
tplCode
=
item
.
code
queryParam
.
value
.
tplCode
=
item
.
code
||
''
queryParam
.
value
.
tplId
=
item
.
id
queryParam
.
value
.
tplId
=
item
.
id
||
''
let
targetPath
=
''
const
code
=
item
.
code
||
''
if
(
code
===
'T-B-1'
)
{
if
(
code
===
'T-B-1'
)
{
ruterToPage
(
'/baosong/report/components/Tb1'
)
targetPath
=
'/baosong/report/components/Tb1'
}
else
if
(
code
===
'T-B-2'
)
{
}
else
if
(
code
===
'T-B-2'
)
{
ruterToPage
(
'/baosong/report/components/Tb2'
)
targetPath
=
'/baosong/report/components/Tb2'
}
else
if
(
code
===
'T-B-3'
)
{
}
else
if
(
code
===
'T-B-3'
)
{
ruterToPage
(
'/baosong/report/components/Tb3'
)
targetPath
=
'/baosong/report/components/Tb3'
}
else
if
(
code
===
'T-B-4'
)
{
}
else
if
(
code
===
'T-B-4'
)
{
ruterToPage
(
'/baosong/report/components/Tb4'
)
targetPath
=
'/baosong/report/components/Tb4'
}
else
if
(
code
===
'T-B-5'
)
{
}
else
if
(
code
===
'T-B-5'
)
{
ruterToPage
(
'/baosong/report/components/Tb5'
)
targetPath
=
'/baosong/report/components/Tb5'
}
else
if
(
code
===
'T-B-6'
)
{
}
else
if
(
code
===
'T-B-6'
)
{
ruterToPage
(
'/baosong/report/components/Tb6'
)
targetPath
=
'/baosong/report/components/Tb6'
}
else
if
(
code
===
'T-B-7'
)
{
}
else
if
(
code
===
'T-B-7'
)
{
ruterToPage
(
'/baosong/report/components/Tb7'
)
targetPath
=
'/baosong/report/components/Tb7'
}
else
if
(
code
===
'T-B-8'
)
{
}
else
if
(
code
===
'T-B-8'
)
{
ruterToPage
(
'/baosong/report/components/Tb8'
)
targetPath
=
'/baosong/report/components/Tb8'
}
else
if
(
code
===
'T-B-9'
)
{
}
else
if
(
code
===
'T-B-9'
)
{
ruterToPage
(
'/baosong/report/components/Tb9'
)
targetPath
=
'/baosong/report/components/Tb9'
}
else
if
(
code
===
'T-B-10'
)
{
}
else
if
(
code
===
'T-B-10'
)
{
ruterToPage
(
'/baosong/report/components/Tb10'
)
targetPath
=
'/baosong/report/components/Tb10'
}
else
if
(
code
===
'T-B-11'
)
{
}
else
if
(
code
===
'T-B-11'
)
{
ruterToPage
(
'/baosong/report/components/Tb11'
)
targetPath
=
'/baosong/report/components/Tb11'
}
else
if
(
code
===
'R-R-1'
)
{
}
else
if
(
code
===
'R-R-1'
)
{
ruterToPage
(
'/baosong/report/components/Rr1'
)
targetPath
=
'/baosong/report/components/Rr1'
}
else
if
(
code
===
'R-R-2'
)
{
}
else
if
(
code
===
'R-R-2'
)
{
ruterToPage
(
'/baosong/report/components/Rr2'
)
targetPath
=
'/baosong/report/components/Rr2'
}
else
if
(
code
===
'T-M-1'
)
{
}
else
if
(
code
===
'T-M-1'
)
{
ruterToPage
(
'/baosong/report/components/Tm1'
)
targetPath
=
'/baosong/report/components/Tm1'
}
else
if
(
code
===
'T-M-2'
)
{
}
else
if
(
code
===
'T-M-2'
)
{
ruterToPage
(
'/baosong/report/components/Tm2'
)
targetPath
=
'/baosong/report/components/Tm2'
}
else
if
(
code
===
'T-M-3'
)
{
}
else
if
(
code
===
'T-M-3'
)
{
ruterToPage
(
'/baosong/report/components/Tm3'
)
targetPath
=
'/baosong/report/components/Tm3'
}
else
if
(
code
===
'T-Q-1'
)
{
}
else
if
(
code
===
'T-Q-1'
)
{
ruterToPage
(
'/baosong/report/components/Tq1'
)
targetPath
=
'/baosong/report/components/Tq1'
}
else
if
(
code
===
'T-Q-2'
)
{
}
else
if
(
code
===
'T-Q-2'
)
{
ruterToPage
(
'/baosong/report/components/Tq2'
)
targetPath
=
'/baosong/report/components/Tq2'
}
else
if
(
code
===
'T-Q-3'
)
{
}
else
if
(
code
===
'T-Q-3'
)
{
ruterToPage
(
'/baosong/report/components/Tq3'
)
targetPath
=
'/baosong/report/components/Tq3'
}
else
if
(
code
===
'T-Q-4'
)
{
}
else
if
(
code
===
'T-Q-4'
)
{
ruterToPage
(
'/baosong/report/components/Tq4'
)
targetPath
=
'/baosong/report/components/Tq4'
}
else
if
(
code
===
'T-Q-5'
)
{
}
else
if
(
code
===
'T-Q-5'
)
{
ruterToPage
(
'/baosong/report/components/Tq5'
)
targetPath
=
'/baosong/report/components/Tq5'
}
if
(
targetPath
)
{
console
.
log
(
'跳转到页面:'
,
targetPath
,
'参数:'
,
queryParam
.
value
);
// 使用 Promise 确保数据更新完成后再跳转
await
nextTick
();
router
.
push
({
path
:
targetPath
,
query
:
{
taskId
:
queryParam
.
value
.
taskId
,
taskName
:
queryParam
.
value
.
taskName
,
tplId
:
queryParam
.
value
.
tplId
,
tplName
:
queryParam
.
value
.
tplName
,
tplCode
:
queryParam
.
value
.
tplCode
}
});
}
}
}
}
const
dataList
=
ref
([])
const
dataList
=
ref
([])
const
dataMap
=
ref
({})
const
dataAllList
=
ref
([])
const
dataAllList
=
ref
([])
async
function
iniData
()
{
async
function
iniData
()
{
dataAllList
.
value
=
await
allTpls
({});
dataAllList
.
value
=
await
findUserRightForTpl
({});
dataList
.
value
=
await
filteredData
(
1
)
dataMap
.
value
=
dataAllList
.
value
.
reduce
((
result
,
item
)
=>
{
const
key
=
item
.
tp
;
if
(
!
result
[
key
])
{
result
[
key
]
=
[];
}
result
[
key
].
push
(
item
);
return
result
;
},
{});
dataList
.
value
=
dataMap
.
value
[
1
]
}
}
const
filteredData
=
(
async
(
tp
)
=>
{
const
filteredData
=
(
async
(
tp
)
=>
{
return
data
AllList
.
value
.
filter
(
item
=>
item
.
tp
===
tp
);
return
data
Map
.
value
[
tp
]
});
});
// 简化跳转函数,直接集成到 gotoPage 中
const
ruterToPage
=
((
url
)
=>
{
const
ruterToPage
=
((
url
)
=>
{
router
.
push
({
path
:
url
,
query
:
{
router
.
push
({
path
:
url
,
query
:
{
...
queryParam
.
value
...
queryParam
.
value
}})
}
})
return
false
return
false
})
})
</
script
>
</
script
>
\ No newline at end of file
zrch-risk-client-39/src/views/baosong/tpl/BaosongTpl.api.ts
浏览文件 @
500396be
...
@@ -16,6 +16,7 @@ enum Api {
...
@@ -16,6 +16,7 @@ enum Api {
importXml
=
'/baosong/baosongTpl/importXml'
,
importXml
=
'/baosong/baosongTpl/importXml'
,
allTpls
=
'/baosong/baosongTpl/allTpls'
,
allTpls
=
'/baosong/baosongTpl/allTpls'
,
importTplItemDes
=
'/baosong/baosongTpl/importTplItemDes'
,
importTplItemDes
=
'/baosong/baosongTpl/importTplItemDes'
,
findUserRightForTpl
=
'/baosong/baosongTpl/findUserRightForTpl'
}
}
/**
/**
...
@@ -43,6 +44,9 @@ export const list = (params) =>
...
@@ -43,6 +44,9 @@ export const list = (params) =>
export
const
allTpls
=
(
params
)
=>
export
const
allTpls
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
allTpls
,
params
});
defHttp
.
get
({
url
:
Api
.
allTpls
,
params
});
export
const
findUserRightForTpl
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
findUserRightForTpl
,
params
});
/**
/**
* 删除单个
* 删除单个
*/
*/
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论