Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
379422ca
authored
2025-04-21 10:55:21 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
质量评估,价值评估支持不走流程配置
1 parent
8b2d5d18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
22 deletions
src/api/modules/workFlowService.ts
src/components/Form/index.vue
src/components/Table/index.vue
src/views/data_asset/qualityEvaluate.vue
src/views/data_asset/registerCatalogDetail.vue
src/views/data_asset/registerDetail.vue
src/views/data_asset/valueEvaluate.vue
src/api/modules/workFlowService.ts
View file @
379422c
...
...
@@ -78,3 +78,9 @@ export const crossPlatformApprove = (params) => request({
method
:
'post'
,
data
:
{}
})
/** 功能流程配置-获取是否需要审批 */
export
const
isNeedApprove
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_WORK_FLOW_URL
}
/func-flow-config/is-need-approve?funcCode=
${
params
.
funcCode
}
`
,
method
:
'get'
,
})
\ No newline at end of file
...
...
src/components/Form/index.vue
View file @
379422c
...
...
@@ -1452,8 +1452,8 @@ const panelChange = (scope, row) => {
:disabled=
"item.disabled || readonly"
@
change=
"(val) => cascaderChange(val, item)"
/>
<
template
v-else-if=
"item.type && item.type.indexOf('date') > -1"
>
<el-date-picker
:class=
"[item.col,
{ is_block: item.block }]" v-if="item.type == 'date-picker'"
v-model="formInline[item.field]" type="daterange" range-separator="至" start-placeholder="开始日期" :format="item.format ??
''
"
:value-format="item.valueFormat ??
''
"
v-model="formInline[item.field]" type="daterange" range-separator="至" start-placeholder="开始日期" :format="item.format ??
null
"
:value-format="item.valueFormat ??
null
"
end-placeholder="结束日期" :unlink-panels="item.unlink ?? false" :shortcuts="item.shortcuts ?? []"
:default-value="item.defaultDate" :disabled="item.disabled ?? false" />
<el-date-picker
:class=
"[item.col,
{ is_block: item.block }]" v-else-if="item.type == 'date-year'"
...
...
src/components/Table/index.vue
View file @
379422c
...
...
@@ -292,7 +292,7 @@ onMounted(() => {
<span
v-else
>
{{
'--'
}}
</span>
</
template
>
<
template
#
default=
"scope"
v-else-if=
"item.type == 'approveTagBtn'"
>
<div
v-if=
"
scope.row[item.field] !== undefined
"
style=
"position: relative;"
>
<div
v-if=
"
item.enableNoApprove == true ? (scope.row.isApprove != 'N' && scope.row[item.field] !== undefined) : (scope.row[item.field] !== undefined)
"
style=
"position: relative;"
>
<el-tag
:type=
"tagType(scope.row, item.field)"
>
{{
tagMethod
(
scope
.
row
,
item
.
field
)
}}
</el-tag>
...
...
src/views/data_asset/qualityEvaluate.vue
View file @
379422c
...
...
@@ -15,13 +15,14 @@ import {
qualityAllow
,
deleteQuality
,
updatQuality
,
getTenantList
}
from
"@/api/modules/dataAsset"
;
import
useUserStore
from
"@/store/modules/user"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
getStaffDetailInfo
}
from
"@/api/modules/queryService"
;
import
{
rejectFlowData
,
revokeFlowData
,
getCamundaDeploymentId
,
getProcessNodesPromise
,
isMyFirstNode
,
passFlowData
}
from
"@/api/modules/workFlowService"
;
import
{
isNeedApprove
,
rejectFlowData
,
revokeFlowData
,
getCamundaDeploymentId
,
getProcessNodesPromise
,
isMyFirstNode
,
passFlowData
}
from
"@/api/modules/workFlowService"
;
const
assetStore
=
useDataAssetStore
();
...
...
@@ -51,9 +52,9 @@ const tableFields = ref([
{
label
:
"登记时间"
,
field
:
"registerTime"
,
width
:
120
},
// { label: "企业名称", field: "tenantName", width: 240, align: "left" },
{
label
:
"评估机构"
,
field
:
"evaluationAgencyName"
,
width
:
250
,
align
:
"left"
},
{
label
:
"审批状态"
,
field
:
"approveVO"
,
type
:
"approveTag"
,
width
:
96
,
align
:
'center'
},
{
label
:
"审批状态"
,
field
:
"approveVO"
,
type
:
"approveTag"
,
enableNoApprove
:
true
,
width
:
96
,
align
:
'center'
},
{
label
:
"主平台审批状态"
,
field
:
"crossPlatformApproveState"
,
type
:
"approveTagBtn"
,
width
:
150
,
align
:
'center'
,
btn
:
{
label
:
"主平台审批状态"
,
field
:
"crossPlatformApproveState"
,
enableNoApprove
:
true
,
type
:
"approveTagBtn"
,
width
:
150
,
align
:
'center'
,
btn
:
{
label
:
'查看'
,
visible
:
(
scope
)
=>
{
return
scope
.
row
.
crossPlatformApproveState
!=
null
;
},
click
:
(
scope
)
=>
{
...
...
@@ -66,7 +67,21 @@ const tableFields = ref([
const
deploymentId
=
ref
(
''
);
onMounted
(()
=>
{
const
tenantList
:
any
=
ref
([]);
onBeforeMount
(()
=>
{
getTenantList
({
bizState
:
'Y'
,
pageSize
:
-
1
}).
then
((
res
:
any
)
=>
{
tenantList
.
value
=
[];
if
(
res
.
code
==
proxy
.
$passCode
)
{
tenantList
.
value
=
res
.
data
?.
records
||
[];
formItems
.
value
[
1
].
options
=
tenantList
.
value
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
});
onActivated
(()
=>
{
...
...
@@ -144,17 +159,31 @@ const getTableData = () => {
})
}
let
needApprovePromise
=
ref
();
const
needApprove
=
ref
(
true
);
const
handleCreate
=
()
=>
{
if
(
!
assetListData
.
value
.
length
)
{
ElMessage
.
warning
(
'当前没有可发起质量评价的资产!'
);
return
;
}
if
(
needApprovePromise
.
value
)
{
return
;
}
needApprovePromise
.
value
=
isNeedApprove
({
funcCode
:
'ZCZLPJ'
}).
then
((
res1
:
any
)
=>
{
needApprovePromise
.
value
=
null
;
if
(
res1
.
code
==
proxy
.
$passCode
)
{
needApprove
.
value
=
res1
.
data
;
formItems
.
value
[
0
].
visible
=
true
;
formItems
.
value
[
0
].
default
=
''
;
formItems
.
value
[
1
].
visible
=
true
;
formItems
.
value
[
1
].
default
=
[];
formItems
.
value
[
1
].
visible
=
!
needApprove
.
value
;
formItems
.
value
[
1
].
default
=
''
;
formItems
.
value
[
2
].
visible
=
true
;
formItems
.
value
[
2
].
default
=
[];
dialogInfo
.
value
.
visible
=
true
;
dialogInfo
.
value
.
type
=
''
;
if
(
needApprove
.
value
)
{
getCamundaDeploymentId
(
'10018'
,
userData
.
tenantGuid
,
userData
.
staffGuid
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
deploymentId
.
value
=
res
.
data
;
...
...
@@ -163,6 +192,11 @@ const handleCreate = () => {
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
}
}
else
{
proxy
.
$ElMessage
.
error
(
res1
.
msg
);
}
})
}
const
page
=
ref
({
...
...
@@ -203,7 +237,13 @@ const tableInfo = ref({
const
getTableBtns
=
(
row
)
=>
{
let
btnsArr
:
any
[]
=
[];
const
approveVO
=
row
.
approveVO
||
{};
const
approveVO
=
row
.
approveVO
;
if
(
!
approveVO
&&
row
.
isApprove
==
'N'
)
{
btnsArr
.
push
({
label
:
"编辑"
,
value
:
"redit"
});
btnsArr
.
push
({
label
:
"删除"
,
value
:
"del"
});
btnsArr
.
push
({
label
:
"详情"
,
value
:
"detail"
});
return
btnsArr
;
}
const
approveState
=
row
.
approveVO
.
approveState
||
null
;
const
approveStaffGuids
=
approveVO
.
approveStaffGuids
||
[];
const
staffGuid
=
approveVO
.
staffGuid
||
''
;
...
...
@@ -254,11 +294,21 @@ const tableBtnClick = (scope, btn) => {
currTableData
.
value
=
row
;
console
.
log
(
row
,
'-------'
);
if
(
type
==
"redit"
)
{
isNeedApprove
({
funcCode
:
'ZCZLPJ'
}).
then
((
res1
:
any
)
=>
{
if
(
res1
.
code
==
proxy
.
$passCode
)
{
needApprove
.
value
=
res1
.
data
;
formItems
.
value
[
0
].
visible
=
false
;
formItems
.
value
[
0
].
default
=
row
.
damGuid
;
formItems
.
value
[
1
].
visible
=
!
needApprove
.
value
;
formItems
.
value
[
1
].
default
=
row
.
evaluationAgencyGuid
;
formItems
.
value
[
2
].
default
=
row
.
qualityEvaluationFile
||
[];
dialogInfo
.
value
.
contents
[
0
].
formInfo
.
items
=
formItems
.
value
;
dialogInfo
.
value
.
visible
=
true
;
dialogInfo
.
value
.
type
=
'reSubmit'
;
formItems
.
value
[
0
].
visible
=
false
;
formItems
.
value
[
0
].
default
=
row
.
registerGuid
;
formItems
.
value
[
1
].
default
=
row
.
qualityEvaluationFile
||
[];
}
else
{
proxy
.
$ElMessage
.
error
(
res1
.
msg
);
}
})
}
else
if
(
type
==
"del"
)
{
delTableOpen
(
"此操作将永久删除该资产质量评价,是否继续?"
,
"warning"
);
}
else
if
(
type
===
'reject'
)
{
...
...
@@ -390,6 +440,20 @@ const formItems = ref([{
visible
:
true
,
required
:
true
},
{
label
:
'评估机构'
,
type
:
'select'
,
placeholder
:
'请选择'
,
field
:
'evaluationAgencyGuid'
,
default
:
''
,
block
:
true
,
options
:
tenantList
.
value
,
props
:
{
value
:
'guid'
,
label
:
'tenantName'
},
visible
:
false
,
required
:
true
},
{
label
:
'附件上传'
,
tip
:
'支持格式:xls .xlsx .doc .docx .rar .zip'
,
type
:
'upload-file'
,
...
...
@@ -456,6 +520,62 @@ const dialogInfo = ref({
/** 编辑质量评价发起资产申请按钮处理。 */
const
dialogBtnClick
=
(
btn
,
info
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
if
(
!
needApprove
.
value
)
{
// 不需要走流程审批的提交
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
if
(
dialogInfo
.
value
.
type
==
'reSubmit'
)
{
updatQuality
({
guid
:
currTableData
.
value
.
guid
,
tenantGuid
:
userData
.
tenantGuid
,
damGuid
:
currTableData
.
value
.
damGuid
,
daName
:
currTableData
.
value
.
daName
,
immediateApprove
:
true
,
evaluationAgencyGuid
:
info
.
evaluationAgencyGuid
,
qualityEvaluationFile
:
info
.
qualityEvaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[]
}).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'该资产质量评价重新提交成功'
);
dialogInfo
.
value
.
visible
=
false
;
page
.
value
.
curr
=
1
;
getTableData
();
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
})
}
else
{
let
daInfo
=
assetListData
.
value
.
find
(
a
=>
a
.
guid
==
info
.
damGuid
);
saveQuality
({
tenantGuid
:
userData
.
tenantGuid
,
damGuid
:
info
.
damGuid
,
daName
:
daInfo
.
damName
,
immediateApprove
:
true
,
evaluationAgencyGuid
:
info
.
evaluationAgencyGuid
,
qualityEvaluationFile
:
info
.
qualityEvaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[]
}).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'质量评价发起成功'
);
dialogInfo
.
value
.
visible
=
false
;
page
.
value
.
curr
=
1
;
getTableData
();
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
})
}
}
else
{
// 需要走流程的审批功能。
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
let
submitFunc
=
()
=>
{
getProcessNodesPromise
({
...
...
@@ -540,6 +660,7 @@ const dialogBtnClick = (btn, info) => {
}
})
}
}
}
else
if
(
btn
.
value
==
'cancel'
)
{
dialogInfo
.
value
.
visible
=
false
;
}
...
...
src/views/data_asset/registerCatalogDetail.vue
View file @
379422c
...
...
@@ -114,7 +114,7 @@ const getDetailInfo = () => {
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{};
evaDetailInfo
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
;
deploymentId
.
value
=
data
.
approveVO
?
.
camundaDeploymentId
;
processInstanceId
.
value
=
data
.
approveVO
?.
camundaInstanceId
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
...
...
@@ -127,7 +127,7 @@ const getDetailInfo = () => {
const
data
=
res
.
data
||
{};
costAssessDetail
.
value
=
data
;
evaDetailInfo
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
;
deploymentId
.
value
=
data
.
approveVO
?
.
camundaDeploymentId
;
processInstanceId
.
value
=
data
.
approveVO
?.
camundaInstanceId
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
...
...
@@ -209,6 +209,9 @@ const toolBtns: any = computed(() => {
label: "关闭", value: "cancel", plain: true
}];
let approveVO = evaDetailInfo.value.approveVO || costAssessDetail.value.approveVO;
if (!approveVO) {
return btnsArr;
}
let staffGuid = userData.staffGuid;
if (approveVO && approveVO.approveState == 'A' && approveVO.approveStaffGuids && approveVO.approveStaffGuids.indexOf(staffGuid) > -1) {
btnsArr.push(...[{ label: "通过", value: "pass", type: 'primary' }, { label: "驳回", value: "reject", type: 'danger', plain: true }]);
...
...
@@ -1171,7 +1174,7 @@ const handleClick = () => {
</div>
</ContentWrap>
<ContentWrap
v-if=
"
route.query.type == 'qualityEvaluate' || route.query.type == 'costAssess'
"
id=
"id-approveInfo"
<ContentWrap
v-if=
"
(route.query.type == 'qualityEvaluate' && evaDetailInfo.approveVO && evaDetailInfo.isApprove !='N') || (route.query.type == 'costAssess' && costAssessDetail.approveVO && costAssessDetail.isApprove !='N')
"
id=
"id-approveInfo"
title=
"审批信息"
description=
""
style=
"margin: 16px 16px 16px"
>
<ApprovalProcess
ref=
"approvalProcessRef"
v-if=
"deploymentId"
:deploymentId=
"deploymentId"
:processInstanceId=
"processInstanceId"
>
</ApprovalProcess>
...
...
src/views/data_asset/registerDetail.vue
View file @
379422c
...
...
@@ -78,7 +78,7 @@ const getDetailInfo = () => {
const
data
=
res
.
data
||
{};
evaDetailInfo
.
value
=
data
;
detailInfo
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
;
deploymentId
.
value
=
data
.
approveVO
?
.
camundaDeploymentId
;
processInstanceId
.
value
=
data
.
approveVO
?.
camundaInstanceId
;
//需要显示质量评价信息
if
(
data
.
qualityScore
!=
null
)
{
...
...
@@ -90,6 +90,9 @@ const getDetailInfo = () => {
tabsInfo
.
value
.
tabs
.
splice
(
3
,
1
);
}
}
if
(
evaDetailInfo
.
value
.
isApprove
==
'N'
)
{
tabsInfo
.
value
.
tabs
.
pop
();
}
if
(
fullPath
===
route
.
fullPath
)
{
document
.
title
=
`详情-
${
data
.
daName
}
`
;
}
...
...
@@ -124,7 +127,7 @@ const getDetailInfo = () => {
const
data
=
res
.
data
||
{};
costAssessDetailInfo
.
value
=
data
;
detailInfo
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
;
deploymentId
.
value
=
data
.
approveVO
?
.
camundaDeploymentId
;
processInstanceId
.
value
=
data
.
approveVO
?.
camundaInstanceId
;
// 需要显示价值评估信息
if
(
data
.
assessmentMoney
!=
null
)
{
...
...
@@ -136,7 +139,9 @@ const getDetailInfo = () => {
tabsInfo
.
value
.
tabs
.
splice
(
3
,
1
);
}
}
if
(
costAssessDetailInfo
.
value
.
isApprove
==
'N'
)
{
tabsInfo
.
value
.
tabs
.
pop
();
}
if
(
data
.
qualityScore
)
{
// 确保"质量评价"标签存在于tabs中,并插入到"价值评估"前面
const
qualityTabIndex
=
tabsInfo
.
value
.
tabs
.
findIndex
(
tab
=>
tab
.
name
===
"qualityEvaluate"
);
...
...
@@ -285,8 +290,8 @@ const getDetailInfo = () => {
let
{
approveVO
}
=
data
;
detailInfo
.
value
=
data
;
assetDetailInfo
.
value
=
data
;
deploymentId
.
value
=
approveVO
.
camundaDeploymentId
;
processInstanceId
.
value
=
approveVO
.
camundaInstanceId
;
deploymentId
.
value
=
approveVO
?
.
camundaDeploymentId
;
processInstanceId
.
value
=
approveVO
?
.
camundaInstanceId
;
isTextTruncated
();
}
else
{
ElMessage
.
error
(
res
.
msg
);
...
...
@@ -446,6 +451,9 @@ const toolBtns: any = computed(() => {
return
btnsArr
;
}
let
approveVO
=
detailInfo
.
value
.
approveVO
;
if
(
!
approveVO
)
{
return
btnsArr
;
}
let
staffGuid
=
userData
.
staffGuid
;
if
(
approveVO
&&
approveVO
.
approveState
==
'A'
&&
approveVO
.
approveStaffGuids
&&
approveVO
.
approveStaffGuids
.
indexOf
(
staffGuid
)
>
-
1
)
{
btnsArr
.
push
(...[{
label
:
"通过"
,
value
:
"pass"
,
type
:
'primary'
},
{
label
:
"驳回"
,
value
:
"reject"
,
type
:
'danger'
,
plain
:
true
}]);
...
...
@@ -1748,7 +1756,7 @@ const passCommonDialogBtnClick = (btn, info) => {
</div>
</ContentWrap>
<ContentWrap id="
id
-
approveInfo
" title="
审批信息
" expandSwicth style="
margin
-
top
:
15
px
"
:isExpand="
approveInfoExpand
" @expand="
(
v
)
=>
approveInfoExpand
=
v
" v-if="
route
.
query
.
type
!=
'certificate'
">
:isExpand="
approveInfoExpand
" @expand="
(
v
)
=>
approveInfoExpand
=
v
" v-if="
tabsInfo
.
tabs
.
find
(
t
=>
t
.
name
==
'approveInfo'
)
&&
route
.
query
.
type
!=
'certificate'
">
<!-- <Table :tableInfo="
approveTableInfo
" /> -->
<ApprovalProcess ref="
approvalProcessRef
" v-if="
deploymentId
" :deploymentId="
deploymentId
"
:processInstanceId="
processInstanceId
">
...
...
src/views/data_asset/valueEvaluate.vue
View file @
379422c
This diff is collapsed.
Click to expand it.
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment