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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
349 additions
and
148 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
...
...
@@ -12,14 +12,15 @@ import {
saveCostAssess
,
updateCostAssess
,
deleteCostAssess
,
costAssessAllow
costAssessAllow
,
getTenantList
}
from
"@/api/modules/dataAsset"
;
import
{
getStaffDetailInfo
}
from
"@/api/modules/queryService"
;
import
useUserStore
from
"@/store/modules/user"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
getCamundaDeploymentId
,
getProcessNodesPromise
,
passFlowData
,
rejectFlowData
,
revokeFlowData
,
isMyFirstNode
}
from
'@/api/modules/workFlowService'
;
import
{
isNeedApprove
,
getCamundaDeploymentId
,
getProcessNodesPromise
,
passFlowData
,
rejectFlowData
,
revokeFlowData
,
isMyFirstNode
}
from
'@/api/modules/workFlowService'
;
import
{
changeNum
}
from
'@/utils/common'
;
const
assetStore
=
useDataAssetStore
();
...
...
@@ -43,11 +44,14 @@ const tableFields = ref([
// { 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'
},
]);
const
deploymentId
=
ref
(
''
);
const
tenantList
:
any
=
ref
([]);
onBeforeMount
(()
=>
{
if
(
isCompanyPlatform
.
value
)
{
tableInfo
.
value
.
fields
=
tableFields
.
value
;
...
...
@@ -55,14 +59,18 @@ onBeforeMount(() => {
tableFields
.
value
.
splice
(
3
,
0
,
{
label
:
"企业名称"
,
field
:
"tenantName"
,
width
:
250
,
align
:
"left"
})
tableInfo
.
value
.
fields
=
tableFields
.
value
;
}
// getTenantAttach(userData.tenantGuid).then((res: any) => {
// if (res?.code == proxy.$passCode) {
// attachDataInfo.value = res.data || {};
// formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file;
// } else {
// ElMessage.error(res.msg);
// }
// })
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
(()
=>
{
...
...
@@ -140,27 +148,40 @@ const getTableData = () => {
})
}
let
needApprovePromise
=
ref
();
const
needApprove
=
ref
(
true
);
const
handleCreate
=
()
=>
{
if
(
!
assetListData
.
value
.
length
)
{
ElMessage
.
warning
(
'当前没有可发起价值评估的资产!'
);
return
;
}
formItems
.
value
[
4
].
placeholder
=
`本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`
;
if
(
needApprovePromise
.
value
)
{
return
;
}
needApprovePromise
.
value
=
isNeedApprove
({
funcCode
:
'ZCJZPG'
}).
then
((
res1
:
any
)
=>
{
needApprovePromise
.
value
=
null
;
if
(
res1
.
code
==
proxy
.
$passCode
)
{
needApprove
.
value
=
res1
.
data
;
formItems
.
value
[
5
].
placeholder
=
`本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`
;
formItems
.
value
[
0
].
visible
=
true
;
formItems
.
value
[
0
].
default
=
''
;
formItems
.
value
[
1
].
visible
=
tr
ue
;
formItems
.
value
[
1
].
default
=
[]
;
formItems
.
value
[
2
].
visible
=
fals
e
;
formItems
.
value
[
2
].
default
=
''
;
formItems
.
value
[
1
].
visible
=
!
needApprove
.
val
ue
;
formItems
.
value
[
1
].
default
=
''
;
formItems
.
value
[
2
].
visible
=
tru
e
;
formItems
.
value
[
2
].
default
=
[]
;
formItems
.
value
[
3
].
visible
=
false
;
formItems
.
value
[
3
].
default
=
''
;
formItems
.
value
[
4
].
visible
=
false
;
formItems
.
value
[
4
].
default
=
''
;
formItems
.
value
[
5
].
visible
=
false
;
formItems
.
value
[
5
].
default
=
[];
formItems
.
value
[
5
].
default
=
''
;
formItems
.
value
[
6
].
visible
=
false
;
formItems
.
value
[
6
].
default
=
[];
dialogInfo
.
value
.
visible
=
true
;
dialogInfo
.
value
.
type
=
''
;
if
(
!
deploymentId
.
value
)
{
if
(
needApprove
.
value
)
{
getCamundaDeploymentId
(
'10019'
,
userData
.
tenantGuid
,
userData
.
staffGuid
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
deploymentId
.
value
=
res
.
data
;
...
...
@@ -170,6 +191,10 @@ const handleCreate = () => {
}
})
}
}
else
{
proxy
.
$ElMessage
.
error
(
res1
.
msg
);
}
});
}
const
page
=
ref
({
...
...
@@ -210,7 +235,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
||
''
;
...
...
@@ -262,62 +293,47 @@ const tableBtnClick = (scope, btn) => {
console
.
log
(
'row'
,
row
);
currTableData
.
value
=
row
;
if
(
type
==
"redit"
)
{
// if (!row.registerGuid) {
// formItems.value[2].visible = true;
// formItems.value[3].visible = true;
// formItems.value[4].visible = true;
// formItems.value[5].visible = true;
// formItems.value[0].visible = false;
// formItems.value[0].default = row.damGuid;
// formItems.value[1].default = row.costAssessmentFile || [];
// dialogInfo.value.type = 'reSubmit';
// dialogInfo.value.visible = true;
// } else {
// formItems.value[2].visible = false;
// formItems.value[3].visible = false;
// formItems.value[4].visible = false;
// formItems.value[5].visible = false;
// formItems.value[0].visible = false;
// formItems.value[0].default = row.damGuid;
// formItems.value[1].default = row.costAssessmentFile || [];
// formItems.value[2].default = row.qualityScore;
// formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
// formItems.value[4].default = row.evaluationNote;
// formItems.value[5].default = row.evaluationFile || [];
// dialogInfo.value.type = 'reSubmit';
// dialogInfo.value.visible = true;
// }
isNeedApprove
({
funcCode
:
'ZCJZPG'
}).
then
((
res1
:
any
)
=>
{
if
(
res1
.
code
==
proxy
.
$passCode
)
{
needApprove
.
value
=
res1
.
data
;
if
(
row
.
qualityEvaluationGuid
)
{
formItems
.
value
[
2
].
visible
=
false
;
formItems
.
value
[
3
].
visible
=
false
;
formItems
.
value
[
4
].
visible
=
false
;
formItems
.
value
[
5
].
visible
=
false
;
formItems
.
value
[
6
].
visible
=
false
;
formItems
.
value
[
0
].
visible
=
false
;
formItems
.
value
[
0
].
default
=
row
.
damGuid
;
formItems
.
value
[
1
].
default
=
row
.
costAssessmentFile
||
[];
formItems
.
value
[
1
].
visible
=
!
needApprove
.
value
;
formItems
.
value
[
1
].
default
=
row
.
evaluationAgencyGuid
;
formItems
.
value
[
2
].
default
=
row
.
costAssessmentFile
||
[];
// formItems.value[2].default = row.qualityScore;
formItems
.
value
[
3
].
default
=
row
.
evaluationRangeStart
&&
row
.
evaluationRangeEnd
?
[
row
.
evaluationRangeStart
,
row
.
evaluationRangeEnd
]
:
''
;
formItems
.
value
[
5
].
default
=
row
.
evaluationRangeStart
&&
row
.
evaluationRangeEnd
?
[
row
.
evaluationRangeStart
,
row
.
evaluationRangeEnd
]
:
''
;
// formItems.value[4].default = row.evaluationNote;
// formItems.value[5].default = row.evaluationFile || [];
dialogInfo
.
value
.
type
=
'reSubmit'
;
dialogInfo
.
value
.
visible
=
true
;
}
if
(
!
row
.
qualityEvaluationGuid
)
{
formItems
.
value
[
2
].
visible
=
true
;
formItems
.
value
[
3
].
visible
=
true
;
formItems
.
value
[
4
].
visible
=
true
;
formItems
.
value
[
5
].
visible
=
true
;
formItems
.
value
[
6
].
visible
=
true
;
formItems
.
value
[
0
].
visible
=
false
;
formItems
.
value
[
0
].
default
=
row
.
damGuid
;
formItems
.
value
[
1
].
default
=
row
.
costAssessmentFile
||
[];
formItems
.
value
[
2
].
default
=
changeNum
(
row
.
qualityScore
||
0
,
2
);
formItems
.
value
[
3
].
default
=
row
.
evaluationRangeStart
&&
row
.
evaluationRangeEnd
?
[
row
.
evaluationRangeStart
,
row
.
evaluationRangeEnd
]
:
''
;
formItems
.
value
[
4
].
default
=
row
.
evaluationNote
;
formItems
.
value
[
5
].
default
=
row
.
evaluationFile
||
[];
formItems
.
value
[
1
].
visible
=
!
needApprove
.
value
;
formItems
.
value
[
1
].
default
=
row
.
evaluationAgencyGuid
;
formItems
.
value
[
2
].
default
=
row
.
costAssessmentFile
||
[];
formItems
.
value
[
3
].
default
=
changeNum
(
row
.
qualityScore
||
0
,
2
);
formItems
.
value
[
4
].
default
=
row
.
evaluationRangeStart
&&
row
.
evaluationRangeEnd
?
[
row
.
evaluationRangeStart
,
row
.
evaluationRangeEnd
]
:
''
;
formItems
.
value
[
5
].
default
=
row
.
evaluationNote
;
formItems
.
value
[
6
].
default
=
row
.
evaluationFile
||
[];
dialogInfo
.
value
.
type
=
'reSubmit'
;
dialogInfo
.
value
.
visible
=
true
;
}
}
else
{
proxy
.
$ElMessage
.
error
(
res1
.
msg
);
}
});
}
else
if
(
type
==
"delete"
)
{
delTableOpen
(
"此操作将永久删除该资产价值评估,是否继续?"
,
"warning"
);
}
else
if
(
type
===
'backup'
)
{
...
...
@@ -392,71 +408,6 @@ const tableBtnClick = (scope, btn) => {
}
};
// const tableBtnClick = (scope, btn) => {
// const type = btn.value;
// const row = scope.row;
// currTableData.value = row;
// if (type === "edit") { //草稿中\已驳回\已撤销\已通过 状态,才可以编辑。
// localStorage.setItem('isRestart', btn.label == '重新提交' ? 'true' : '');
// // router.push({
// // name: 'registerStart',
// // query: { guid: row.guid, exchangeGuid: row.exchangeGuid, name: row.daName, type }
// // });
// router.push({
// name: 'registerValueDetail',
// query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid, exchangeGuid: row.exchangeGuid }
// });
// } else if (type == "delete") {
// delTableOpen("此操作将永久删除该资产登记,是否继续?", "warning");
// } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。
// ElMessageBox.confirm('确定撤销该资产登记审批流程吗?', "提示", {
// confirmButtonText: "确定",
// cancelButtonText: "取消",
// type: 'warning',
// }).then(() => {
// tableInfo.value.loading = true;
// let params = {
// guid: row.approveVO.approveGuid,
// flowType: row.approveVO.flowType,
// approveStaffGuid: userData.staffGuid,
// }
// revokeFlowData(params).then((res: any) => {
// tableInfo.value.loading = false;
// if (res?.code == proxy.$passCode) {
// if (res.data) {
// ElMessage.success('该审批流程撤销成功!');
// getTableData();
// } else {
// ElMessage.error('该审批流程撤销失败!');
// }
// } else {
// ElMessage.error(res.msg);
// }
// }).catch(() => {
// tableInfo.value.loading = false;
// });
// }).catch(() => {
// ElMessage({
// type: 'info',
// message: '已取消撤销'
// });
// });
// } else if (type === 'detail') { // 详情, 若是草稿中,详情就是编辑,
// // router.push({
// // name: 'registerInfoDetail',
// // query: { guid: row.guid, name: row.daName, type: 'asset' }
// // });
// router.push({
// name: 'registerValueDetail',
// query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
// });
// } else if (type === 'pass') {
// passDialogInfo.value.visible = true;
// } else if (type == 'reject') {
// rejectDialogInfo.value.visible = true;
// }
// };
const
delTableOpen
=
(
msg
,
type
,
isBatch
:
boolean
=
false
)
=>
{
ElMessageBox
.
confirm
(
msg
,
"提示"
,
{
confirmButtonText
:
"确定"
,
...
...
@@ -509,6 +460,20 @@ const formItems = ref<any>([
},
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
:
'附件上传'
,
...
...
@@ -658,24 +623,26 @@ const dialogInfo = ref({
const
handleSelectChange
=
(
val
,
row
,
info
)
=>
{
let
qualityEvaluationGuid
=
''
;
assetListData
.
value
.
forEach
((
item
)
=>
{
if
(
item
.
guid
==
val
)
{
qualityEvaluationGuid
=
item
.
qualityEvaluationGuid
;
if
(
row
.
field
!=
'registerGuid'
)
{
return
;
}
})
;
let
qualityEvaluationGuid
=
assetListData
.
value
.
find
(
item
=>
item
.
guid
==
val
)?.
qualityEvaluationGuid
;
if
(
!
qualityEvaluationGuid
)
{
formItems
.
value
[
0
].
default
=
val
;
formItems
.
value
[
2
].
visible
=
true
;
formItems
.
value
[
1
].
default
=
info
.
evaluationAgencyGuid
;
formItems
.
value
[
2
].
default
=
info
[
formItems
.
value
[
2
].
field
];
formItems
.
value
[
3
].
visible
=
true
;
formItems
.
value
[
4
].
visible
=
true
;
formItems
.
value
[
5
].
visible
=
true
;
formItems
.
value
[
6
].
visible
=
true
;
}
else
{
formItems
.
value
[
0
].
default
=
val
;
formItems
.
value
[
2
].
visible
=
false
;
formItems
.
value
[
1
].
default
=
info
.
evaluationAgencyGuid
;
formItems
.
value
[
2
].
default
=
info
[
formItems
.
value
[
2
].
field
];
formItems
.
value
[
3
].
visible
=
false
;
formItems
.
value
[
4
].
visible
=
false
;
formItems
.
value
[
5
].
visible
=
false
;
formItems
.
value
[
6
].
visible
=
false
;
}
}
...
...
@@ -709,6 +676,101 @@ const reSubmitPromise: any = ref(null);
const
dialogBtnClick
=
(
btn
,
info
)
=>
{
console
.
log
(
'btn'
,
btn
,
info
);
if
(
btn
.
value
==
'submit'
)
{
if
(
!
needApprove
.
value
)
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
if
(
dialogInfo
.
value
.
type
==
'reSubmit'
)
{
updateCostAssess
({
guid
:
currTableData
.
value
.
guid
,
immediateApprove
:
true
,
tenantGuid
:
userData
.
tenantGuid
,
daName
:
currTableData
.
value
.
daName
,
damGuid
:
currTableData
.
value
.
damGuid
,
costAssessmentFile
:
info
.
costAssessmentFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
evaluationFile
:
info
.
evaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
qualityScore
:
info
.
qualityScore
||
null
,
evaluationRangeStart
:
info
.
evaluationRange
?
info
.
evaluationRange
[
0
]
:
null
,
evaluationRangeEnd
:
info
.
evaluationRange
?
info
.
evaluationRange
[
1
]
:
null
,
evaluationNote
:
info
.
evaluationNote
||
null
,
evaluationAgencyGuid
:
info
.
evaluationAgencyGuid
,
}).
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
();
formItems
.
value
[
4
].
placeholder
=
`本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:`
;
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
})
}
else
{
let
params
:
any
=
{};
let
daInfo
=
assetListData
.
value
.
find
(
a
=>
a
.
guid
==
info
.
registerGuid
);
if
(
daInfo
.
qualityEvaluationGuid
)
{
//通过质量评估发起资产申请
params
=
{
immediateApprove
:
true
,
tenantGuid
:
userData
.
tenantGuid
,
daName
:
daInfo
.
damName
,
damGuid
:
daInfo
.
guid
,
costAssessmentFile
:
info
.
costAssessmentFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
evaluationAgencyGuid
:
info
.
evaluationAgencyGuid
,
}
}
else
{
//未通过质量评估发起资产申请
params
=
{
immediateApprove
:
true
,
tenantGuid
:
userData
.
tenantGuid
,
daName
:
daInfo
.
damName
,
damGuid
:
daInfo
.
guid
,
costAssessmentFile
:
info
.
costAssessmentFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
evaluationFile
:
info
.
evaluationFile
?.
map
(
file
=>
{
return
{
name
:
file
.
name
,
url
:
file
.
url
}
})
||
[],
qualityScore
:
info
.
qualityScore
,
evaluationRangeStart
:
info
.
evaluationRange
?
info
.
evaluationRange
[
0
]
:
null
,
evaluationRangeEnd
:
info
.
evaluationRange
?
info
.
evaluationRange
[
1
]
:
null
,
evaluationNote
:
info
.
evaluationNote
,
evaluationAgencyGuid
:
info
.
evaluationAgencyGuid
,
}
}
saveCostAssess
(
params
).
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
submitFunc
=
()
=>
{
getProcessNodesPromise
({
deploymentId
:
deploymentId
.
value
,
...
...
@@ -833,6 +895,7 @@ const dialogBtnClick = (btn, info) => {
}
})
}
}
}
else
if
(
btn
.
value
==
'cancel'
)
{
dialogInfo
.
value
.
visible
=
false
;
}
...
...
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