Skip to content
项目
群组
代码片段
帮助
正在加载...
登录/注册
切换导航
广
广东建设用地-前端
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
广东建设用地
广东建设用地-前端
Commits
dad7e361
提交
dad7e361
authored
5月 08, 2026
作者:
jinrb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
弹窗添加
上级
70634d33
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
820 行增加
和
33 行删除
+820
-33
api.ts
src/views/directory/yztsj/shengjiList/api.ts
+12
-0
index.vue
src/views/directory/yztsj/shengjiList/index.vue
+397
-18
api.ts
src/views/directory/yztsj/shijiList/api.ts
+12
-0
index.vue
src/views/directory/yztsj/shijiList/index.vue
+399
-15
没有找到文件。
src/views/directory/yztsj/shengjiList/api.ts
浏览文件 @
dad7e361
...
...
@@ -16,6 +16,8 @@ enum Api {
proviceZgbmCheck
=
'/dkgl/dsrwGeoJd/proviceZgbmCheck'
,
checkSuccessDownLoad
=
'/dkgl/dsrwGeoJd/checkSuccessDownLoad'
,
//文件检查结果下载
fileCheck
=
'/dkgl/dsrwGeoJd/fileCheck'
,
//文件检查
findJdfj
=
'/dkgl/dsrwGeoJd/findJdfj'
,
reloadGenerated
=
'/dkgl/dsrwGeoJd/reloadGenerated'
,
}
/**
* 下载mdb文件
...
...
@@ -54,6 +56,16 @@ export const fileCheck = (params) => defHttp.get({ url: Api.fileCheck, params })
* @param params
*/
export
const
checkSuccessDownLoad
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
checkSuccessDownLoad
,
params
});
/**
* 查询季度文件信息(生成时间)
*/
export
const
findJdfj
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
findJdfj
,
params
},
{
successMessageMode
:
'none'
});
/**
* 重新生成文件
*/
export
const
reloadGenerated
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
reloadGenerated
,
params
},
{
successMessageMode
:
'none'
});
/**
* 列表接口
* @param params
...
...
src/views/directory/yztsj/shengjiList/index.vue
浏览文件 @
dad7e361
...
...
@@ -47,15 +47,119 @@
</
template
>
<div
class=
"py-10 ml-6"
>
该地块还未进行填报,没有详情可以查看
</div>
</a-modal>
<!-- 下载 mdb/gdb:先弹窗展示生成时间,再下载或重新生成 -->
<a-modal
v-model:visible=
"mdbModalOpen"
wrapClassName=
"mdb-download-modal-wrap"
:footer=
"null"
:width=
"520"
:centered=
"true"
destroyOnClose
@
cancel=
"onMdbModalCancel"
>
<
template
#
title
>
<span
class=
"mdb-download-title"
>
文件下载
</span>
</
template
>
<a-spin
:spinning=
"jdfjLoading"
>
<
template
v-if=
"mdbModalStep === 'main'"
>
<div
class=
"mdb-download-main"
>
<div
class=
"mdb-download-row"
>
<span
class=
"mdb-download-label"
>
文件生成时间:
</span>
<span>
{{
fileGenTime
}}
</span>
</div>
<div
class=
"mdb-download-row"
>
<span
class=
"mdb-download-label"
>
文件下载:
</span>
<a-button
type=
"primary"
@
click=
"handleMdbDownload"
>
<template
#
icon
><DownloadOutlined
/></
template
>
下载
</a-button>
</div>
<div
class=
"mdb-download-regen"
>
<a-button
type=
"primary"
size=
"large"
:loading=
"reloadLoading"
@
click=
"handleMdbRegenerate"
>
重新生成
</a-button>
</div>
</div>
</template>
<
template
v-else
>
<div
class=
"mdb-download-done"
>
<p
class=
"mdb-download-done-text"
>
已开始重新生成,生成结果请稍等待!
</p>
<a-button
type=
"primary"
size=
"large"
@
click=
"closeMdbModal"
>
关闭
</a-button>
</div>
</
template
>
</a-spin>
</a-modal>
<!-- 文件检查:确认后重新生成并检查 -->
<a-modal
v-model:visible=
"fileCheckModalOpen"
wrapClassName=
"file-check-modal-wrap"
:footer=
"null"
:width=
"520"
:centered=
"true"
destroyOnClose
@
cancel=
"onFileCheckModalCancel"
>
<
template
#
title
>
<span
class=
"file-check-modal-title"
>
文件检查
</span>
</
template
>
<
template
v-if=
"fileCheckStep === 'confirm'"
>
<div
class=
"file-check-confirm"
>
<p
class=
"file-check-confirm-text"
>
是否重新生成gdb、mdb文件并进行检查?
</p>
<div
class=
"file-check-confirm-actions"
>
<a-button
size=
"large"
@
click=
"onFileCheckModalCancel"
>
取消
</a-button>
<a-button
type=
"primary"
size=
"large"
:loading=
"fileCheckReloadLoading"
@
click=
"handleFileCheckConfirm"
>
确认
</a-button>
</div>
</div>
</
template
>
<
template
v-else
>
<div
class=
"file-check-done"
>
<p
class=
"file-check-done-line"
>
已开始重新生成,文件生成后将进行检查
</p>
<p
class=
"file-check-done-line"
>
检查结果请稍等待!
</p>
<a-button
type=
"primary"
size=
"large"
class=
"file-check-done-close"
@
click=
"closeFileCheckModal"
>
关闭
</a-button>
</div>
</
template
>
</a-modal>
<!-- 检查结果下载:校验中则提示稍候 -->
<a-modal
v-model:visible=
"checkResultWaitModalOpen"
wrapClassName=
"check-result-wait-modal-wrap"
:footer=
"null"
:width=
"480"
:centered=
"true"
destroyOnClose
@
cancel=
"checkResultWaitModalOpen = false"
>
<
template
#
title
>
<span
class=
"check-result-wait-title"
>
检查结果下载
</span>
</
template
>
<div
class=
"check-result-wait-body"
>
<p
class=
"check-result-wait-text"
>
还未生成结果,请耐心等待!
</p>
<a-button
type=
"primary"
size=
"large"
@
click=
"checkResultWaitModalOpen = false"
>
关闭
</a-button>
</div>
</a-modal>
</template>
<
script
lang=
"ts"
name=
"directory-gzml-gzml"
setup
>
import
{
ref
}
from
'vue'
;
import
{
DownloadOutlined
}
from
'@ant-design/icons-vue'
;
import
{
BasicTable
,
TableAction
}
from
'/@/components/Table'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
{
useListPage
}
from
'/@/hooks/system/useListPage'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
list
,
getDownloadMdb
,
deleteOne
,
getExportUrl
,
provinceCheckSubmit
,
proviceZgbmCheck
,
fileCheck
,
checkSuccessDownLoad
}
from
'./api'
;
import
{
list
,
getDownloadMdb
,
deleteOne
,
getExportUrl
,
provinceCheckSubmit
,
proviceZgbmCheck
,
checkSuccessDownLoad
,
findJdfj
,
reloadGenerated
,
}
from
'./api'
;
import
{
downloadFile
,
getDkDetail
}
from
'/@/api/common/api'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useRouter
}
from
'vue-router'
;
...
...
@@ -106,17 +210,113 @@
});
const
open
=
ref
(
false
);
/** mdb/gdb 下载弹窗 */
const
mdbModalOpen
=
ref
(
false
);
const
mdbModalStep
=
ref
<
'main'
|
'regenerated'
>
(
'main'
);
const
fileGenTime
=
ref
(
'--'
);
const
jdfjLoading
=
ref
(
false
);
const
reloadLoading
=
ref
(
false
);
const
fileCheckModalOpen
=
ref
(
false
);
const
fileCheckStep
=
ref
<
'confirm'
|
'done'
>
(
'confirm'
);
const
fileCheckReloadLoading
=
ref
(
false
);
const
checkResultWaitModalOpen
=
ref
(
false
);
const
[
registerTable
,
{
reload
,
getDataSource
},
{
rowSelection
,
selectedRows
,
selectedRowKeys
}]
=
tableContext
;
function
isFileCheckingStatus
(
res
:
unknown
):
boolean
{
if
(
res
==
null
)
return
false
;
const
s
=
typeof
res
===
'string'
?
res
:
String
(
res
);
return
s
.
includes
(
'文件校验中'
);
}
function
handleFileCheckConfirm
()
{
fileCheckReloadLoading
.
value
=
true
;
reloadGenerated
({
nd
:
getNd
(),
jd
:
getJd
()
})
.
then
(()
=>
{
fileCheckStep
.
value
=
'done'
;
})
.
finally
(()
=>
{
fileCheckReloadLoading
.
value
=
false
;
});
}
function
onFileCheckModalCancel
()
{
fileCheckStep
.
value
=
'confirm'
;
fileCheckModalOpen
.
value
=
false
;
}
function
closeFileCheckModal
()
{
onFileCheckModalCancel
();
}
function
parseJdfjTime
(
res
:
unknown
):
string
{
if
(
res
==
null
||
res
===
''
)
return
'--'
;
if
(
typeof
res
===
'string'
)
return
res
;
if
(
typeof
res
===
'object'
)
{
const
o
=
res
as
Record
<
string
,
unknown
>
;
const
keys
=
[
'wjscsj'
,
'scsj'
,
'fileGenTime'
,
'createTime'
,
'sj'
,
'time'
];
for
(
const
k
of
keys
)
{
const
v
=
o
[
k
];
if
(
v
!=
null
&&
v
!==
''
)
return
String
(
v
);
}
}
return
'--'
;
}
function
openMdbDownloadModal
()
{
mdbModalStep
.
value
=
'main'
;
mdbModalOpen
.
value
=
true
;
jdfjLoading
.
value
=
true
;
findJdfj
({
nd
:
getNd
(),
jd
:
getJd
()
})
.
then
((
res
)
=>
{
fileGenTime
.
value
=
parseJdfjTime
(
res
);
})
.
catch
(()
=>
{
fileGenTime
.
value
=
'--'
;
})
.
finally
(()
=>
{
jdfjLoading
.
value
=
false
;
});
}
function
onMdbModalCancel
()
{
mdbModalStep
.
value
=
'main'
;
mdbModalOpen
.
value
=
false
;
}
function
closeMdbModal
()
{
onMdbModalCancel
();
}
function
handleMdbDownload
()
{
getDownloadMdb
({
nd
:
getNd
(),
jd
:
getJd
()
}).
then
((
res
)
=>
{
if
(
res
)
{
downloadFile
(
'/sys/common/static'
+
res
,
res
.
split
(
'/'
)[
res
.
split
(
'/'
).
length
-
1
]);
}
else
{
createMessage
.
error
(
'文件下载失败'
);
}
});
}
function
handleMdbRegenerate
()
{
reloadLoading
.
value
=
true
;
reloadGenerated
({
nd
:
getNd
(),
jd
:
getJd
()
})
.
then
(()
=>
{
mdbModalStep
.
value
=
'regenerated'
;
})
.
finally
(()
=>
{
reloadLoading
.
value
=
false
;
});
}
//成功回调
function
handleSuccess
()
{
selectedRows
.
value
=
[];
selectedRowKeys
.
value
=
[];
reload
();
}
/**
* 审核历史
*/
/**
* 审核历史
*/
...
...
@@ -193,11 +393,9 @@
});
}
async
function
handleFileCheck
()
{
const
res
=
await
fileCheck
({
nd
:
getNd
(),
jd
:
getJd
()
});
if
(
res
)
{
createMessage
.
success
(
'文件检查任务已发起'
);
}
function
handleFileCheck
()
{
fileCheckStep
.
value
=
'confirm'
;
fileCheckModalOpen
.
value
=
true
;
}
async
function
handleCheckResultDownload
()
{
...
...
@@ -206,6 +404,10 @@
downloadFile
(
'/sys/common/static'
+
res
,
res
.
split
(
'/'
)[
res
.
split
(
'/'
).
length
-
1
]);
return
;
}
if
(
isFileCheckingStatus
(
res
))
{
checkResultWaitModalOpen
.
value
=
true
;
return
;
}
createMessage
.
info
((
res
as
string
)
||
'文件校验中'
);
}
/**
...
...
@@ -294,14 +496,191 @@
}
const
getMdb
=
()
=>
{
getDownloadMdb
({
nd
:
getNd
(),
jd
:
getJd
()
}).
then
((
res
)
=>
{
// console.log(res);
if
(
res
)
{
downloadFile
(
'/sys/common/static'
+
res
,
res
.
split
(
'/'
)[
res
.
split
(
'/'
).
length
-
1
]);
}
else
{
createMessage
.
error
(
'文件下载失败'
);
}
});
openMdbDownloadModal
();
};
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
.mdb-download-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
letter-spacing
:
0.02em
;
}
.mdb-download-main
{
padding
:
8px
4px
12px
;
}
.mdb-download-row
{
display
:
flex
;
align-items
:
flex-start
;
margin-bottom
:
0
;
padding
:
14px
16px
;
gap
:
12px
;
flex-wrap
:
wrap
;
border-radius
:
6px
;
background
:
#fafafa
;
border
:
1px
solid
#f0f0f0
;
}
.mdb-download-row
+
.mdb-download-row
{
margin-top
:
12px
;
}
.mdb-download-label
{
flex-shrink
:
0
;
min-width
:
112px
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
line-height
:
32px
;
}
.mdb-download-row
span
:not
(
.mdb-download-label
)
{
color
:
rgba
(
0
,
0
,
0
,
0.88
);
line-height
:
32px
;
word-break
:
break-all
;
}
.mdb-download-regen
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
28px
;
padding-top
:
22px
;
border-top
:
1px
solid
#f0f0f0
;
}
.mdb-download-done
{
text-align
:
center
;
padding
:
16px
12px
16px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.mdb-download-done-text
{
margin
:
0
0
16px
;
font-size
:
15px
;
line-height
:
1.65
;
color
:
rgba
(
0
,
0
,
0
,
0.75
);
max-width
:
360px
;
}
.file-check-modal-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.file-check-confirm
{
padding
:
8px
4px
4px
;
}
.file-check-confirm-text
{
margin
:
0
0
28px
;
text-align
:
center
;
font-size
:
15px
;
line-height
:
1.7
;
color
:
rgba
(
0
,
0
,
0
,
0.78
);
padding
:
12px
8px
8px
;
}
.file-check-confirm-actions
{
display
:
flex
;
justify-content
:
center
;
gap
:
16px
;
padding-top
:
8px
;
}
.file-check-done
{
text-align
:
center
;
padding
:
12px
12px
12px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.file-check-done-line
{
margin
:
0
;
font-size
:
15px
;
line-height
:
1.75
;
color
:
rgba
(
0
,
0
,
0
,
0.75
);
max-width
:
400px
;
}
.file-check-done-line
+
.file-check-done-line
{
margin-top
:
8px
;
}
.file-check-done-close
{
margin-top
:
16px
;
}
.check-result-wait-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
letter-spacing
:
0.02em
;
}
.check-result-wait-body
{
text-align
:
center
;
padding
:
12px
8px
12px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.check-result-wait-text
{
margin
:
0
0
16px
;
font-size
:
15px
;
line-height
:
1.75
;
color
:
rgba
(
0
,
0
,
0
,
0.78
);
max-width
:
380px
;
}
</
style
>
<
style
lang=
"less"
>
.mdb-download-modal-wrap {
.ant-modal-content {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.ant-modal-header {
padding: 18px 28px 16px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 20px 28px 20px;
}
.ant-modal-close {
top: 14px;
right: 18px;
}
}
.file-check-modal-wrap {
.ant-modal-content {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.ant-modal-header {
padding: 18px 28px 16px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 20px 28px 20px;
}
.ant-modal-close {
top: 14px;
right: 18px;
}
}
.check-result-wait-modal-wrap {
.ant-modal-content {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.ant-modal-header {
padding: 18px 28px 16px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 20px 28px 20px;
}
.ant-modal-close {
top: 14px;
right: 18px;
}
}
</
style
>
src/views/directory/yztsj/shijiList/api.ts
浏览文件 @
dad7e361
...
...
@@ -15,6 +15,8 @@ enum Api {
cityZgbmCheck
=
'/dkgl/dsrwGeoJd/cityZgbmCheck'
,
//市级审核校验
checkSuccessDownLoad
=
'/dkgl/dsrwGeoJd/checkSuccessDownLoad'
,
//文件检查结果下载
fileCheck
=
'/dkgl/dsrwGeoJd/fileCheck'
,
//文件检查
findJdfj
=
'/dkgl/dsrwGeoJd/findJdfj'
,
// 季度文件信息(生成时间等)
reloadGenerated
=
'/dkgl/dsrwGeoJd/reloadGenerated'
,
// 重新生成文件
}
/**
* 下载mdb文件
...
...
@@ -68,6 +70,16 @@ export const fileCheck = (params) => defHttp.get({ url: Api.fileCheck, params })
* @param params
*/
export
const
checkSuccessDownLoad
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
checkSuccessDownLoad
,
params
});
/**
* 查询季度文件信息(生成时间)
*/
export
const
findJdfj
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
findJdfj
,
params
},
{
successMessageMode
:
'none'
});
/**
* 重新生成文件
*/
export
const
reloadGenerated
=
(
params
)
=>
defHttp
.
get
({
url
:
Api
.
reloadGenerated
,
params
},
{
successMessageMode
:
'none'
});
/**
* 删除单个
* @param params
...
...
src/views/directory/yztsj/shijiList/index.vue
浏览文件 @
dad7e361
...
...
@@ -37,15 +37,119 @@
</
template
>
<div
class=
"py-10 ml-6"
>
该地块还未进行填报,没有详情可以查看
</div>
</a-modal>
<!-- 下载 mdb/gdb:先弹窗展示生成时间,再下载或重新生成 -->
<a-modal
v-model:visible=
"mdbModalOpen"
wrapClassName=
"mdb-download-modal-wrap"
:footer=
"null"
:width=
"520"
:centered=
"true"
destroyOnClose
@
cancel=
"onMdbModalCancel"
>
<
template
#
title
>
<span
class=
"mdb-download-title"
>
文件下载
</span>
</
template
>
<a-spin
:spinning=
"jdfjLoading"
>
<
template
v-if=
"mdbModalStep === 'main'"
>
<div
class=
"mdb-download-main"
>
<div
class=
"mdb-download-row"
>
<span
class=
"mdb-download-label"
>
文件生成时间:
</span>
<span>
{{
fileGenTime
}}
</span>
</div>
<div
class=
"mdb-download-row"
>
<span
class=
"mdb-download-label"
>
文件下载:
</span>
<a-button
type=
"primary"
@
click=
"handleMdbDownload"
>
<template
#
icon
><DownloadOutlined
/></
template
>
下载
</a-button>
</div>
<div
class=
"mdb-download-regen"
>
<a-button
type=
"primary"
size=
"large"
:loading=
"reloadLoading"
@
click=
"handleMdbRegenerate"
>
重新生成
</a-button>
</div>
</div>
</template>
<
template
v-else
>
<div
class=
"mdb-download-done"
>
<p
class=
"mdb-download-done-text"
>
已开始重新生成,生成结果请稍等待!
</p>
<a-button
type=
"primary"
size=
"large"
@
click=
"closeMdbModal"
>
关闭
</a-button>
</div>
</
template
>
</a-spin>
</a-modal>
<!-- 文件检查:确认后重新生成并检查 -->
<a-modal
v-model:visible=
"fileCheckModalOpen"
wrapClassName=
"file-check-modal-wrap"
:footer=
"null"
:width=
"520"
:centered=
"true"
destroyOnClose
@
cancel=
"onFileCheckModalCancel"
>
<
template
#
title
>
<span
class=
"file-check-modal-title"
>
文件检查
</span>
</
template
>
<
template
v-if=
"fileCheckStep === 'confirm'"
>
<div
class=
"file-check-confirm"
>
<p
class=
"file-check-confirm-text"
>
是否重新生成gdb、mdb文件并进行检查?
</p>
<div
class=
"file-check-confirm-actions"
>
<a-button
size=
"large"
@
click=
"onFileCheckModalCancel"
>
取消
</a-button>
<a-button
type=
"primary"
size=
"large"
:loading=
"fileCheckReloadLoading"
@
click=
"handleFileCheckConfirm"
>
确认
</a-button>
</div>
</div>
</
template
>
<
template
v-else
>
<div
class=
"file-check-done"
>
<p
class=
"file-check-done-line"
>
已开始重新生成,文件生成后将进行检查
</p>
<p
class=
"file-check-done-line"
>
检查结果请稍等待!
</p>
<a-button
type=
"primary"
size=
"large"
class=
"file-check-done-close"
@
click=
"closeFileCheckModal"
>
关闭
</a-button>
</div>
</
template
>
</a-modal>
<!-- 检查结果下载:校验中则提示稍候 -->
<a-modal
v-model:visible=
"checkResultWaitModalOpen"
wrapClassName=
"check-result-wait-modal-wrap"
:footer=
"null"
:width=
"480"
:centered=
"true"
destroyOnClose
@
cancel=
"checkResultWaitModalOpen = false"
>
<
template
#
title
>
<span
class=
"check-result-wait-title"
>
检查结果下载
</span>
</
template
>
<div
class=
"check-result-wait-body"
>
<p
class=
"check-result-wait-text"
>
还未生成结果,请耐心等待!
</p>
<a-button
type=
"primary"
size=
"large"
@
click=
"checkResultWaitModalOpen = false"
>
关闭
</a-button>
</div>
</a-modal>
</template>
<
script
lang=
"ts"
name=
"directory-yztsj-shiji"
setup
>
import
{
ref
}
from
'vue'
;
import
{
DownloadOutlined
}
from
'@ant-design/icons-vue'
;
import
{
BasicTable
,
TableAction
}
from
'/@/components/Table'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
{
useListPage
}
from
'/@/hooks/system/useListPage'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
list
,
getDownloadMdb
,
deleteOne
,
getExportUrl
,
cityCheckSubmit
,
cityZgbmCheck
,
fileCheck
,
checkSuccessDownLoad
}
from
'./api'
;
import
{
list
,
getDownloadMdb
,
deleteOne
,
getExportUrl
,
cityCheckSubmit
,
cityZgbmCheck
,
checkSuccessDownLoad
,
findJdfj
,
reloadGenerated
,
}
from
'./api'
;
import
{
downloadFile
,
getDkDetail
}
from
'/@/api/common/api'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
AddModal
from
'./modules/AddModal.vue'
;
...
...
@@ -92,8 +196,108 @@
},
});
const
open
=
ref
(
false
);
/** mdb/gdb 下载弹窗 */
const
mdbModalOpen
=
ref
(
false
);
const
mdbModalStep
=
ref
<
'main'
|
'regenerated'
>
(
'main'
);
const
fileGenTime
=
ref
(
'--'
);
const
jdfjLoading
=
ref
(
false
);
const
reloadLoading
=
ref
(
false
);
/** 文件检查弹窗:确认 → 调 reloadGenerated → 成功提示 */
const
fileCheckModalOpen
=
ref
(
false
);
const
fileCheckStep
=
ref
<
'confirm'
|
'done'
>
(
'confirm'
);
const
fileCheckReloadLoading
=
ref
(
false
);
const
checkResultWaitModalOpen
=
ref
(
false
);
const
[
registerTable
,
{
reload
,
getDataSource
},
{
rowSelection
,
selectedRows
,
selectedRowKeys
}]
=
tableContext
;
function
isFileCheckingStatus
(
res
:
unknown
):
boolean
{
if
(
res
==
null
)
return
false
;
const
s
=
typeof
res
===
'string'
?
res
:
String
(
res
);
return
s
.
includes
(
'文件校验中'
);
}
function
handleFileCheckConfirm
()
{
fileCheckReloadLoading
.
value
=
true
;
reloadGenerated
({
nd
:
getNd
(),
jd
:
getJd
()
})
.
then
(()
=>
{
fileCheckStep
.
value
=
'done'
;
})
.
finally
(()
=>
{
fileCheckReloadLoading
.
value
=
false
;
});
}
function
onFileCheckModalCancel
()
{
fileCheckStep
.
value
=
'confirm'
;
fileCheckModalOpen
.
value
=
false
;
}
function
closeFileCheckModal
()
{
onFileCheckModalCancel
();
}
function
parseJdfjTime
(
res
:
unknown
):
string
{
if
(
res
==
null
||
res
===
''
)
return
'--'
;
if
(
typeof
res
===
'string'
)
return
res
;
if
(
typeof
res
===
'object'
)
{
const
o
=
res
as
Record
<
string
,
unknown
>
;
const
keys
=
[
'wjscsj'
,
'scsj'
,
'fileGenTime'
,
'createTime'
,
'sj'
,
'time'
];
for
(
const
k
of
keys
)
{
const
v
=
o
[
k
];
if
(
v
!=
null
&&
v
!==
''
)
return
String
(
v
);
}
}
return
'--'
;
}
function
openMdbDownloadModal
()
{
mdbModalStep
.
value
=
'main'
;
mdbModalOpen
.
value
=
true
;
jdfjLoading
.
value
=
true
;
findJdfj
({
nd
:
getNd
(),
jd
:
getJd
()
})
.
then
((
res
)
=>
{
fileGenTime
.
value
=
parseJdfjTime
(
res
);
})
.
catch
(()
=>
{
fileGenTime
.
value
=
'--'
;
})
.
finally
(()
=>
{
jdfjLoading
.
value
=
false
;
});
}
function
onMdbModalCancel
()
{
mdbModalStep
.
value
=
'main'
;
mdbModalOpen
.
value
=
false
;
}
function
closeMdbModal
()
{
onMdbModalCancel
();
}
function
handleMdbDownload
()
{
getDownloadMdb
({
nd
:
getNd
(),
jd
:
getJd
()
}).
then
((
res
)
=>
{
if
(
res
)
{
downloadFile
(
'/sys/common/static'
+
res
,
res
.
split
(
'/'
)[
res
.
split
(
'/'
).
length
-
1
]);
}
else
{
createMessage
.
error
(
'文件下载失败'
);
}
});
}
function
handleMdbRegenerate
()
{
reloadLoading
.
value
=
true
;
reloadGenerated
({
nd
:
getNd
(),
jd
:
getJd
()
})
.
then
(()
=>
{
mdbModalStep
.
value
=
'regenerated'
;
})
.
finally
(()
=>
{
reloadLoading
.
value
=
false
;
});
}
//成功回调
function
handleSuccess
()
{
selectedRows
.
value
=
[];
...
...
@@ -174,11 +378,9 @@
});
}
async
function
handleFileCheck
()
{
const
res
=
await
fileCheck
({
nd
:
getNd
(),
jd
:
getJd
()
});
if
(
res
)
{
createMessage
.
success
(
'文件检查任务已发起'
);
}
function
handleFileCheck
()
{
fileCheckStep
.
value
=
'confirm'
;
fileCheckModalOpen
.
value
=
true
;
}
async
function
handleCheckResultDownload
()
{
...
...
@@ -187,6 +389,10 @@
downloadFile
(
'/sys/common/static'
+
res
,
res
.
split
(
'/'
)[
res
.
split
(
'/'
).
length
-
1
]);
return
;
}
if
(
isFileCheckingStatus
(
res
))
{
checkResultWaitModalOpen
.
value
=
true
;
return
;
}
createMessage
.
info
((
res
as
string
)
||
'文件校验中'
);
}
/**
...
...
@@ -268,14 +474,192 @@
}
const
getMdb
=
()
=>
{
getDownloadMdb
({
nd
:
getNd
(),
jd
:
getJd
()
}).
then
((
res
)
=>
{
// console.log(res);
if
(
res
)
{
downloadFile
(
'/sys/common/static'
+
res
,
res
.
split
(
'/'
)[
res
.
split
(
'/'
).
length
-
1
]);
}
else
{
createMessage
.
error
(
'文件下载失败'
);
}
});
openMdbDownloadModal
();
};
</
script
>
<
style
scoped
></
style
>
<
style
scoped
>
.mdb-download-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
letter-spacing
:
0.02em
;
}
.mdb-download-main
{
padding
:
8px
4px
12px
;
}
.mdb-download-row
{
display
:
flex
;
align-items
:
flex-start
;
margin-bottom
:
0
;
padding
:
14px
16px
;
gap
:
12px
;
flex-wrap
:
wrap
;
border-radius
:
6px
;
background
:
#fafafa
;
border
:
1px
solid
#f0f0f0
;
}
.mdb-download-row
+
.mdb-download-row
{
margin-top
:
12px
;
}
.mdb-download-label
{
flex-shrink
:
0
;
min-width
:
112px
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
line-height
:
32px
;
}
.mdb-download-row
span
:not
(
.mdb-download-label
)
{
color
:
rgba
(
0
,
0
,
0
,
0.88
);
line-height
:
32px
;
word-break
:
break-all
;
}
.mdb-download-regen
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
28px
;
padding-top
:
22px
;
border-top
:
1px
solid
#f0f0f0
;
}
.mdb-download-done
{
text-align
:
center
;
padding
:
16px
12px
16px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.mdb-download-done-text
{
margin
:
0
0
16px
;
font-size
:
15px
;
line-height
:
1.65
;
color
:
rgba
(
0
,
0
,
0
,
0.75
);
max-width
:
360px
;
}
.file-check-modal-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.file-check-confirm
{
padding
:
8px
4px
4px
;
}
.file-check-confirm-text
{
margin
:
0
0
28px
;
text-align
:
center
;
font-size
:
15px
;
line-height
:
1.7
;
color
:
rgba
(
0
,
0
,
0
,
0.78
);
padding
:
12px
8px
8px
;
}
.file-check-confirm-actions
{
display
:
flex
;
justify-content
:
center
;
gap
:
16px
;
padding-top
:
8px
;
}
.file-check-done
{
text-align
:
center
;
padding
:
12px
12px
12px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.file-check-done-line
{
margin
:
0
;
font-size
:
15px
;
line-height
:
1.75
;
color
:
rgba
(
0
,
0
,
0
,
0.75
);
max-width
:
400px
;
}
.file-check-done-line
+
.file-check-done-line
{
margin-top
:
8px
;
}
.file-check-done-close
{
margin-top
:
16px
;
}
.check-result-wait-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
letter-spacing
:
0.02em
;
}
.check-result-wait-body
{
text-align
:
center
;
padding
:
12px
8px
12px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
.check-result-wait-text
{
margin
:
0
0
16px
;
font-size
:
15px
;
line-height
:
1.75
;
color
:
rgba
(
0
,
0
,
0
,
0.78
);
max-width
:
380px
;
}
</
style
>
<
style
lang=
"less"
>
/* 弹层挂载在 body 下,需非 scoped 才能作用到 ant-modal */
.mdb-download-modal-wrap {
.ant-modal-content {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.ant-modal-header {
padding: 18px 28px 16px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 20px 28px 20px;
}
.ant-modal-close {
top: 14px;
right: 18px;
}
}
.file-check-modal-wrap {
.ant-modal-content {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.ant-modal-header {
padding: 18px 28px 16px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 20px 28px 20px;
}
.ant-modal-close {
top: 14px;
right: 18px;
}
}
.check-result-wait-modal-wrap {
.ant-modal-content {
border-radius: 10px;
overflow: hidden;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.ant-modal-header {
padding: 18px 28px 16px;
border-bottom: 1px solid #f0f0f0;
margin-bottom: 0;
}
.ant-modal-body {
padding: 20px 28px 20px;
}
.ant-modal-close {
top: 14px;
right: 18px;
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论