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
33be468e
authored
2025-01-16 17:13:16 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into dev_20241202_xukangle
2 parents
e98b429c
ee58ebe9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1002 additions
and
150 deletions
src/api/modules/common.ts
src/api/modules/dataAsset.ts
src/api/modules/workFlowService.ts
src/components/Form/index.vue
src/router/modules/dataAssetRegistry.ts
src/store/modules/user.ts
src/views/data_asset/qualityEvaluate.vue
src/views/data_asset/registerCatalogDetail.vue
src/views/data_asset/registerDetail.vue
src/api/modules/common.ts
View file @
33be468
...
...
@@ -82,7 +82,7 @@ export const onUploadFilePreview = async (params) => {
export
const
setFileName
=
(
name
)
=>
{
if
(
name
&&
name
.
indexOf
(
'_'
)
>
-
1
){
const
s
=
name
.
indexOf
(
"_"
);
const
e
=
name
.
i
ndexOf
(
"."
);
const
e
=
name
.
lastI
ndexOf
(
"."
);
const
newName
=
name
.
slice
(
0
,
s
)
+
name
.
slice
(
e
);
return
newName
}
else
{
...
...
src/api/modules/dataAsset.ts
View file @
33be468
...
...
@@ -114,7 +114,7 @@ export const getRegisteredList = (type) => request({
/** 质量评价审批通过 */
export
const
qualityAllow
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/quality-evaluation/
al
low`
,
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/quality-evaluation/
submit-f
low`
,
method
:
'post'
,
data
:
params
});
...
...
src/api/modules/workFlowService.ts
View file @
33be468
...
...
@@ -38,13 +38,13 @@ export const getFlowData = (params) => request({
method
:
'post'
,
data
:
params
})
export
const
getCamundaDeploymentId
=
(
flowType
)
=>
request
({
export
const
getCamundaDeploymentId
=
(
flowType
,
tenantGuid
=
null
,
staffGuid
=
null
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_WORK_FLOW_URL
}
/work-flow/data/get-camunda-deployment-id`
,
method
:
'post'
,
data
:
{
tenantGuid
:
userData
.
tenantGuid
,
tenantGuid
:
tenantGuid
||
userData
.
tenantGuid
,
flowType
:
flowType
,
staffGuid
:
userData
.
staffGuid
,
staffGuid
:
staffGuid
||
userData
.
staffGuid
,
}
})
...
...
src/components/Form/index.vue
View file @
33be468
...
...
@@ -982,7 +982,7 @@ const panelChange = (scope, row) => {
</div>
<div
v-if=
"item.example"
class=
"panel_header-expample"
>
{{
item
.
example
}}
</div>
<el-input
ref=
"exampleTextareaRef"
:id=
"item.field"
:class=
"[item.col,
{ is_block: item.block
, 'extra-textarea-class': item.type === 'textarea'
&&
!item.label
}]"
:class=
"[item.col,
{ is_block: item.block }]"
v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
:disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
:maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
...
...
src/router/modules/dataAssetRegistry.ts
View file @
33be468
...
...
@@ -86,7 +86,19 @@ const routes: RouteRecordRaw[] = [
cache
:
true
,
reuse
:
true
}
},
{
path
:
'register-catalog-detail'
,
name
:
'evaCatalogDetail'
,
component
:
()
=>
import
(
'@/views/data_asset/registerCatalogDetail.vue'
),
meta
:
{
title
:
'详情-'
,
sidebar
:
false
,
breadcrumb
:
false
,
cache
:
true
,
reuse
:
true
}
},
],
},
{
...
...
src/store/modules/user.ts
View file @
33be468
...
...
@@ -51,14 +51,14 @@ const useUserStore = defineStore(
//获取用户信息
account
.
value
=
res
.
data
.
logonUser
userId
.
value
=
res
.
data
.
userId
userName
.
value
=
res
.
data
.
userName
// userData.value = JSON.stringify(res.data.data);
currentTenantGuid
.
value
=
res
.
data
.
tenantInfoList
&&
res
.
data
.
tenantInfoList
.
length
?
res
.
data
.
tenantInfoList
[
0
].
guid
:
''
;
localStorage
.
setItem
(
'currentTenantGuid'
,
currentTenantGuid
.
value
);
let
currentTenant
=
res
.
data
.
tenantInfoList
?.[
0
];
getCurrentUserInfo
({
tenantGuid
:
currentTenantGuid
.
value
}).
then
((
res
:
any
)
=>
{
console
.
log
(
res
,
'getCurrentUserInfo'
);
if
(
res
.
code
==
'00000'
)
{
userName
.
value
=
res
.
data
.
staffName
;
localStorage
.
setItem
(
'userName'
,
res
.
data
?.
staffName
);
localStorage
.
setItem
(
'userData'
,
JSON
.
stringify
(
res
.
data
));
}
else
{
ElMessage
.
error
(
res
.
msg
)
...
...
@@ -66,7 +66,6 @@ const useUserStore = defineStore(
})
return
getSystemMenu
({
tenantGuid
:
currentTenantGuid
.
value
}).
then
((
info
:
any
)
=>
{
if
(
info
.
code
==
'00000'
)
{
localStorage
.
setItem
(
'userName'
,
currentTenant
?.
name
)
localStorage
.
setItem
(
'userInfoData'
,
JSON
.
stringify
(
info
.
data
));
userInfoData
.
value
=
info
.
data
;
}
else
{
...
...
src/views/data_asset/qualityEvaluate.vue
View file @
33be468
...
...
@@ -11,15 +11,13 @@ import {
getQualityEvaList
,
getRegisteredList
,
saveQuality
,
registerApproveCancel
,
registerApproveBackup
,
qualityAllow
,
deleteQuality
,
updatQuality
}
from
"@/api/modules/dataAsset"
;
import
useUserStore
from
"@/store/modules/user"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
passFlowData
,
rejectFlowData
,
revokeFlowData
,
getCamundaDeploymentId
,
getProcessNodesPromise
}
from
"@/api/modules/workFlowService"
;
import
{
rejectFlowData
,
revokeFlowData
,
getCamundaDeploymentId
,
getProcessNodesPromise
}
from
"@/api/modules/workFlowService"
;
const
assetStore
=
useDataAssetStore
();
...
...
@@ -44,7 +42,7 @@ const tableFields = ref([
const
deploymentId
=
ref
(
''
);
onBeforeMount
(()
=>
{
getCamundaDeploymentId
(
'10018'
).
then
((
res
:
any
)
=>
{
getCamundaDeploymentId
(
'10018'
,
userData
.
tenantGuid
,
userData
.
staffGuid
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
deploymentId
.
value
=
res
.
data
;
}
else
{
...
...
@@ -168,7 +166,7 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
1
60
,
width
:
1
75
,
btns
:
(
scope
)
=>
{
let
row
=
scope
.
row
;
return
getTableBtns
(
row
);
...
...
@@ -178,25 +176,43 @@ const tableInfo = ref({
const
getTableBtns
=
(
row
)
=>
{
let
btnsArr
:
any
[]
=
[];
if
(
row
.
approveState
==
'A'
)
{
//审批中
btnsArr
.
push
({
label
:
"详情"
,
value
:
"path_detail"
})
if
(
row
.
tenantGuid
==
userData
.
tenantGuid
)
{
btnsArr
.
push
({
label
:
"撤销"
,
value
:
"revoke"
});
const
approveVO
=
row
.
approveVO
||
{};
const
approveState
=
row
.
approveState
||
null
;
const
approveStaffGuids
=
approveVO
.
approveStaffGuids
||
[];
const
staffGuid
=
approveVO
.
staffGuid
||
''
;
const
bizApproveState
=
row
.
bizApproveState
;
const
currentStaffGuid
=
userData
.
staffGuid
let
isShowCancel
=
false
;
let
flowState
;
if
(
approveState
==
'N'
)
{
flowState
=
1
;
}
if
(
row
.
approveTenantGuids
?.
includes
(
userData
.
tenantGuid
))
{
btnsArr
.
push
({
label
:
"通过"
,
value
:
"pass"
});
btnsArr
.
push
({
label
:
"驳回"
,
value
:
"backup"
});
if
(
approveState
==
'A'
&&
approveStaffGuids
.
indexOf
(
currentStaffGuid
)
>
-
1
)
{
flowState
=
2
;
}
}
else
if
(
row
.
approveState
==
'Y'
)
{
//已通过的不能删除。
btnsArr
.
push
({
label
:
"详情"
,
value
:
"path_detail"
})
}
else
if
(
row
.
approveState
==
'R'
||
row
.
approveState
==
'C'
)
{
//已驳回或已撤销
btnsArr
.
push
({
label
:
"详情"
,
value
:
"path_detail"
});
if
(
row
.
tenantGuid
==
userData
.
tenantGuid
)
{
btnsArr
.
push
({
label
:
"重新提交"
,
value
:
"edit"
,
disabled
:
false
})
if
((
approveState
==
'C'
||
approveState
==
'R'
)
&&
staffGuid
==
currentStaffGuid
)
{
flowState
=
3
;
}
if
(
row
.
tenantGuid
==
userData
.
tenant
Guid
)
{
btnsArr
.
push
({
label
:
"删除"
,
value
:
"delete"
})
;
if
(
approveVO
&&
approveVO
.
approveState
==
'A'
&&
staffGuid
==
currentStaff
Guid
)
{
isShowCancel
=
true
;
}
if
(
flowState
===
1
)
{
btnsArr
=
[{
label
:
"删除"
,
value
:
"del"
}]
}
if
(
flowState
===
2
)
{
btnsArr
=
[{
label
:
"通过"
,
value
:
"pass"
},
{
label
:
"驳回"
,
value
:
"reject"
}]
}
if
(
flowState
===
3
)
{
btnsArr
.
push
({
label
:
"删除"
,
value
:
"del"
})
}
if
(
flowState
===
3
&&
bizApproveState
!=
'D'
)
{
btnsArr
.
push
({
label
:
"重新提交"
,
value
:
"redit"
})
}
if
(
isShowCancel
)
{
btnsArr
.
push
({
label
:
"撤销"
,
value
:
"revoke"
})
}
if
(
flowState
!==
1
)
{
btnsArr
.
push
({
label
:
"详情"
,
value
:
"detail"
})
}
return
btnsArr
;
}
...
...
@@ -207,15 +223,15 @@ const tableBtnClick = (scope, btn) => {
const
type
=
btn
.
value
;
const
row
=
scope
.
row
;
currTableData
.
value
=
row
;
if
(
type
==
"edit"
)
{
if
(
type
==
"
r
edit"
)
{
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
if
(
type
==
"del
ete
"
)
{
}
else
if
(
type
==
"del"
)
{
delTableOpen
(
"此操作将永久删除该资产质量评价,是否继续?"
,
"warning"
);
}
else
if
(
type
===
'
backup
'
)
{
}
else
if
(
type
===
'
reject
'
)
{
rejectDialogInfo
.
value
.
visible
=
true
;
}
else
if
(
type
===
'pass'
)
{
passDialogInfo
.
value
.
visible
=
true
;
...
...
@@ -251,7 +267,7 @@ const tableBtnClick = (scope, btn) => {
message
:
'已取消撤销'
});
});
}
else
if
(
type
===
'
path_
detail'
)
{
// 详情
}
else
if
(
type
===
'detail'
)
{
// 详情
if
(
row
.
registerApproveState
==
'Y'
)
{
router
.
push
({
name
:
'registerDetail'
,
...
...
@@ -259,14 +275,14 @@ const tableBtnClick = (scope, btn) => {
});
}
else
{
router
.
push
({
name
:
'
register
CatalogDetail'
,
query
:
{
guid
:
row
.
damGuid
,
type
:
'asset
'
}
name
:
'
eva
CatalogDetail'
,
query
:
{
guid
:
row
.
damGuid
,
evaGuid
:
row
.
guid
,
type
:
'qualityEvaluate
'
}
});
}
}
else
if
(
type
==
'productDetail'
)
{
router
.
push
({
name
:
'registerCatalogDetail'
,
query
:
{
guid
:
row
.
damGuid
,
type
:
'asset'
}
query
:
{
guid
:
row
.
damGuid
}
});
}
};
...
...
@@ -403,9 +419,10 @@ const dialogBtnClick = (btn, info) => {
damGuid
:
currTableData
.
value
.
damGuid
,
daName
:
currTableData
.
value
.
daName
,
immediateApprove
:
true
,
issuingEntit
yGuid
:
res
.
data
?.[
1
]?.
candidateUsers
?.[
0
]?.
staffGuid
,
qualityEvaluationFile
:
info
.
qualityEvaluationFile
?.
map
(
f
=>
f
.
url
)
||
[]
evaluationAgenc
yGuid
:
res
.
data
?.[
1
]?.
candidateUsers
?.[
0
]?.
staffGuid
,
qualityEvaluationFile
:
info
.
qualityEvaluationFile
||
[]
}).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'该资产质量评价重新提交成功'
);
dialogInfo
.
value
.
visible
=
false
;
...
...
@@ -422,10 +439,10 @@ const dialogBtnClick = (btn, info) => {
damGuid
:
info
.
damGuid
,
daName
:
daInfo
.
damName
,
immediateApprove
:
true
,
// registerTime: daInfo.registerTime,
issuingEntityGuid
:
res
.
data
?.[
1
]?.
candidateUsers
?.[
0
]?.
staffGuid
,
qualityEvaluationFile
:
info
.
qualityEvaluationFile
?.
map
(
f
=>
f
.
url
)
||
[]
evaluationAgencyGuid
:
res
.
data
?.[
1
]?.
candidateUsers
?.[
0
]?.
staffGuid
,
qualityEvaluationFile
:
info
.
qualityEvaluationFile
||
[]
}).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
ElMessage
.
success
(
'质量评价发起成功'
);
dialogInfo
.
value
.
visible
=
false
;
...
...
@@ -568,7 +585,7 @@ const passDialogInfo = ref({
footer
:
{
btns
:
[
{
type
:
"default"
,
label
:
"取消"
,
value
:
"cancel"
},
{
type
:
"primary"
,
label
:
"确定"
,
value
:
"submit"
},
{
type
:
"primary"
,
label
:
"确定"
,
value
:
"submit"
,
loading
:
false
},
],
},
});
...
...
@@ -581,14 +598,19 @@ const passDialogInputChange = (val, item) => {
const
passDialogBtnClick
=
(
btn
,
info
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
passDialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
qualityAllow
({
guid
:
currTableData
.
value
.
guid
,
guid
:
currTableData
.
value
.
approveVO
.
approveGuid
,
bizGuid
:
currTableData
.
value
.
guid
,
flowType
:
currTableData
.
value
.
approveVO
.
flowType
,
approveStaffGuid
:
userData
.
staffGuid
,
qualityScore
:
info
.
qualityScore
,
evaluationRangeStart
:
info
.
evaluationRange
[
0
],
evaluationRangeEnd
:
info
.
evaluationRange
[
1
],
evaluationNote
:
info
.
evaluationNote
,
evaluationFile
:
info
.
evaluationFile
.
map
(
f
=>
f
.
url
)
,
evaluationFile
:
info
.
evaluationFile
||
[]
,
}).
then
((
res
:
any
)
=>
{
passDialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
if
(
res
.
data
)
{
ElMessage
.
success
(
'审批成功'
);
...
...
@@ -648,13 +670,15 @@ const rejectDialogBtnClick = (btn, info) => {
ElMessage
.
error
(
'请填写驳回理由'
);
return
}
let
row
=
currTableData
.
value
;
tableInfo
.
value
.
loading
=
true
;
let
params
=
{
bizGuid
:
currTableData
.
value
.
guid
,
funcCode
:
currTableData
.
value
.
funcCode
,
guid
:
row
.
approveVO
.
approveGuid
,
flowType
:
row
.
approveVO
.
flowType
,
approveStaffGuid
:
userData
.
staffGuid
,
approveSuggest
:
info
.
approveSuggest
}
re
gisterApproveBackup
(
params
).
then
((
res
:
any
)
=>
{
re
jectFlowData
(
params
).
then
((
res
:
any
)
=>
{
tableInfo
.
value
.
loading
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
if
(
res
.
data
)
{
...
...
src/views/data_asset/registerCatalogDetail.vue
View file @
33be468
...
...
@@ -10,15 +10,25 @@ import { ContentWrap } from '@/components/ContentWrap';
import
{
getRegisterCatalogDetail
,
dataSourcesList
,
qualityAllow
,
costAssessAllow
,
getRegisterCatalogTableDetail
,
getEvaDetail
}
from
"@/api/modules/dataAsset"
;
import
{
changeNum
}
from
'@/utils/common'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
passFlowData
,
rejectFlowData
,
revokeFlowData
}
from
"@/api/modules/workFlowService"
;
import
{
CircleCloseFilled
}
from
'@element-plus/icons-vue'
import
{
onUploadFilePreview
,
onUploadFileDownload
,
setFileName
}
from
'@/api/modules/common'
;
const
router
=
useRouter
();
const
route
=
useRoute
();
const
userStore
=
useUserStore
();
const
userData
=
JSON
.
parse
(
userStore
.
userData
)
const
fullPath
=
route
.
fullPath
;
const
catalogGuid
=
route
.
query
.
guid
;
const
evaGuid
=
route
.
query
.
evaGuid
;
const
detailType
=
ref
(
route
.
query
.
type
);
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
/** 当前主要类型的详情信息。 */
...
...
@@ -64,6 +74,12 @@ const baseInfoFormItems = ref([
},
]);
const
evaDetailInfo
:
any
=
ref
({});
const
deploymentId
=
ref
(
''
);
const
processInstanceId
=
ref
(
''
);
const
getDetailInfo
=
()
=>
{
fullscreenLoading
.
value
=
true
;
getRegisterCatalogDetail
(
catalogGuid
).
then
((
res
:
any
)
=>
{
...
...
@@ -89,6 +105,18 @@ const getDetailInfo = () => {
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
});
if
(
evaGuid
)
{
getEvaDetail
({
guid
:
evaGuid
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{};
evaDetailInfo
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
;
processInstanceId
.
value
=
data
.
approveVO
?.
camundaInstanceId
;
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
});
}
}
onBeforeMount
(()
=>
{
...
...
@@ -159,10 +187,562 @@ const handleTableViewData = (scope) => {
});
}
const toolBtns: any = computed(() => {
let btnsArr: any = [{
label: "关闭", value: "cancel", plain: true
}];
let approveVO = evaDetailInfo.value.approveVO;
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 }]);
}
if (approveVO && approveVO.approveState == 'A' && approveVO.staffGuid == staffGuid) {
btnsArr.push({ label: "撤销", value: "revoke" });
}
return btnsArr;
});
const btnClick = (btn) => {
const type = btn.value;
if (type == 'cancel') {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: detailType.value == 'qualityEvaluate' ? 'qualityEvaluate' : (detailType.value == 'costAssess' ? 'valueEvaluate' : (detailType.value == 'certificate' ? 'certificateManagement' : 'registerManagemant'))
});
} else if (type == 'pass') {
passDialogInfo.value.visible = true;
assessFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
qualityEvaluateFormItems.value[2].placeholder = '本次评估数据资产总体质量得分为**分\n准确性:\n一致性:\n可访问性:\n规范性:\n完整性:';
// if (assetDetailInfo.value.dataStartDate) {
// qualityEvaluateFormItems.value[1].default = [assetDetailInfo.value.dataStartDate, assetDetailInfo.value.dataEndDate];
// qualityEvaluateFormItems.value[1].disabled = true;
// } else {
// qualityEvaluateFormItems.value[1].default = null;
// qualityEvaluateFormItems.value[1].disabled = false;
// }
} else if (type == 'reject') {
rejectDialogInfo.value.visible = true;
} else if (type == 'revoke') {
ElMessageBox.confirm('确定撤销该资产登记审批流程吗?', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
let params = {
guid: evaDetailInfo.value.approveVO.approveGuid,
flowType: evaDetailInfo.value.approveVO.flowType,
approveStaffGuid: userData.staffGuid,
}
revokeFlowData(params).then((res: any) => {
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('该审批流程撤销成功!');
getDetailInfo();
} else {
ElMessage.error('该审批流程撤销失败!');
}
} else {
ElMessage.error(res.msg);
}
});
}).catch(() => {
ElMessage({
type: 'info',
message: '已取消撤销'
});
});
} else if (type == 'confirm') {
passDialogInfo.value.visible = true;
}
}
const passDialogSize = computed(() => {
if (detailType.value == 'asset') {
return 460;
} else if (detailType.value == 'qualityEvaluate' || detailType.value == 'costAssess') {
return 700;
}
});
const passDialogTitle = computed(() => {
if (detailType.value == 'asset' || detailType.value == 'qualityEvaluate' || detailType.value == 'costAssess') {
return "通过";
}
});
const qualityEvaluateFormItems = ref([
{
label: '质量得分',
type: 'input',
placeholder: '请输入数值',
field: 'qualityScore',
default: '',
inputType: 'scoreNumber',
min: 0,
max: 100,
required: true
},
{
label: "评价对象范围",
type: "date-picker",
field: "evaluationRange",
default: null,
placeholder: "开始时间~结束时间",
clearable: true,
required: true,
},
{
label: '质量评价说明',
type: 'textarea',
example: '示例:本次评估数据资产总体质量得分为99.80分。从评价维度分析,准确性、一致性和可访问性均为 100 分;规范性 99.42 分、完整性 99.50分。',
placeholder: `
本次评估数据资产总体质量得分为
**
分\
n
准确性:\
n
一致性:\
n
可访问性:\
n
规范性:\
n
完整性:
`,
field: 'evaluationNote',
focusValue: true,
rows: 6,
default: '',
clearable: true,
required: true,
block: true,
},
{
label: '质量评价报告',
tip: '支持扩展名:PDF',
type: 'upload-file',
accept: '.pdf',
limit: 1,
block: true,
required: true,
default: [],
field: 'evaluationFile',
}
]);
const assessFormItems = ref([
{
label: '评估金额(元)',
type: 'input',
inputType: 'moneyNumber',
placeholder: '请输入数值',
field: 'assessmentMoney',
default: '',
required: true
},
{
label: "评价日期",
type: "date",
field: "assessmentDate",
default: null,
placeholder: "请选择",
clearable: true,
required: true,
},
{
label: '价值评估说明',
type: 'textarea',
placeholder: '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。',
field: 'assessmentNote',
focusValue: true,
default: '',
clearable: true,
required: true,
block: true,
},
{
label: '价值评估报告',
tip: '支持扩展名:PDF',
type: 'upload-file',
accept: '.pdf',
limit: 1,
required: true,
block: true,
default: [],
field: 'assessmentFile',
}
]);
const passFormItems = computed(() => {
if (detailType.value == 'asset') {
return [{
label: '',
type: "textarea",
placeholder: "请填写通过理由(必填)",
field: "approveSuggest",
clearable: true,
block: true,
col: 'margin_b_0',
}];
} else if (detailType.value == 'qualityEvaluate') {
return qualityEvaluateFormItems.value;
} else if (detailType.value == 'costAssess') {
return assessFormItems.value
}
});
const evaFormRules = ref({
qualityScore: [{
validator: (rule: any, value: any, callback: any) => {
if (value === 0) {
callback();
return;
}
if (!value) {
callback(new Error('请填写质量得分'));
return;
}
//TODO 请填写1~100以内的整数
// const r = /(^[0-9]([0-9]*)$|^[0-9]$)/; // 正整数(可以以0打头)
// if (value && !r.test(value)) {
// callback(new Error('请填写大于或等于零整数'));
// return;
// }
// if ((value + '').length > 6) {
// callback(new Error('请填写1~100以内的整数'));
// return;
// }
callback();
},
trigger: "blur",
}],
evaluationRange: [{
type: 'array', required: true, message: '请填写评价对象范围', trigger: 'change',
}],
evaluationNote: [{
validator: (rule: any, value: any, callback: any) => {
if (!value) {
callback(new Error('请填写质量评价说明'));
return;
}
if (value && value.length > 500) {
callback(new Error('请填写小于500个字的质量评价说明'));
return;
}
callback();
},
trigger: "blur",
}],
evaluationFile: [{
validator: (rule: any, value: any, callback: any) => {
if (!value?.length) {
callback(new Error('请上传质量评价报告'));
return;
}
callback();
},
trigger: "blur",
}]
});
const passFormRules = computed(() => {
if (detailType.value == 'asset') {
return {};
} else if (detailType.value == 'qualityEvaluate') {
return evaFormRules.value;
} else if (detailType.value == 'costAssess') {
return {
assessmentMoney: [{
validator: (rule: any, value: any, callback: any) => {
if (value === 0) {
callback();
return;
}
if (!value) {
callback(new Error('请填写评估金额'));
return;
}
//TODO 请填写1~100以内的整数
// const r = /(^[0-9]([0-9]*)$|^[0-9]$)/; // 正整数(可以以0打头)
// if (value && !r.test(value)) {
// callback(new Error('请填写大于或等于零整数'));
// return;
// }
// if ((value + '').length > 6) {
// callback(new Error('请填写1~100以内的整数'));
// return;
// }
callback();
},
trigger: "blur",
}],
assessmentNote: [{
validator: (rule: any, value: any, callback: any) => {
if (!value) {
callback(new Error('请填写价值评估说明'));
return;
}
if (value && value.length > 500) {
callback(new Error('请填写小于500个字的价值评估说明'));
return;
}
callback();
},
trigger: "blur",
}],
assessmentDate: [{
required: true, message: '请填写评价日期', trigger: 'blur'
}],
assessmentFile: [{
validator: (rule: any, value: any, callback: any) => {
if (!value?.length) {
callback(new Error('请上传价值评估报告'));
return;
}
callback();
},
trigger: "blur",
}]
}
} else if (detailType.value == 'certificate') {
return {
documentFile: [{
validator: (rule: any, value: any, callback: any) => {
if (!value?.length) {
callback(new Error('请上传证件'))
} else {
callback();
}
}, trigger: 'change'
}]
};
}
});
const passDialogInfo = ref({
visible: false,
size: passDialogSize.value,
direction: "column",
header: {
title: passDialogTitle.value,
},
type: '',
contents: [
{
type: 'form',
title: '',
formInfo: {
id: 'quality-pass-dialog',
items: passFormItems.value,
rules: passFormRules.value
}
}
],
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "确定", value: "submit", loading: false, },
],
},
});
const passDialogInputChange = (val, item, inlineValue) => {
if (item.field == 'qualityScore') {
qualityEvaluateFormItems.value[2].placeholder = `
本次评估数据资产总体质量得分为
$
{
val
}
分\
n
准确性:\
n
一致性:\
n
可访问性:\
n
规范性:\
n
完整性:
`;
} else if (item.field == 'assessmentMoney') {
let M = "";
let D = "";
let assessmentDate = inlineValue.assessmentDate;
if (assessmentDate) {
M = (assessmentDate.getMonth() + 1 < 10 ? '0' + (assessmentDate.getMonth() + 1) : assessmentDate.getMonth() + 1);
D = (assessmentDate.getDate() + 1 < 10 ? '0' + assessmentDate.getDate() : assessmentDate.getDate());
}
assessFormItems.value[2].placeholder = `
按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币
$
{
val
}
元。本次评估结论在评估基准日后一年内有效,即自
$
{
inlineValue
.
assessmentDate
?
`
${
inlineValue
.
assessmentDate
.
getFullYear
()}
年
${
M
}
月
${
D
}
日至
${
inlineValue
.
assessmentDate
.
getFullYear
()
+
1
}
年
${
M
}
月
${
D
}
日`
:
'20*年*月*日至20*年*月*日'
}
止。超过一年,需重新举行资产评估。
`;
} else if (item.field == 'assessmentDate') {
let M = (val.getMonth() + 1 < 10 ? '0' + (val.getMonth() + 1) : val.getMonth() + 1);
let D = (val.getDate() + 1 < 10 ? '0' + val.getDate() : val.getDate());
assessFormItems.value[2].placeholder = `
按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币
$
{
inlineValue
.
assessmentMoney
?
inlineValue
.
assessmentMoney
:
'***'
}
元。本次评估结论在评估基准日后一年内有效,即自
$
{
val
?
`
${
val
.
getFullYear
()}
年
${
M
}
月
${
D
}
日至
${
val
.
getFullYear
()
+
1
}
年
${
M
}
月
${
D
}
日`
:
'20*年*月*日至20*年*月*日'
}
止。超过一年,需重新举行资产评估。
`;
}
}
const submitPromise: any = ref(null);
const passDialogBtnClick = (btn, info) => {
if (btn.value == 'submit') {
if (detailType.value == 'asset') { //如果是资产登记的审批。
if (submitPromise.value) {
return;
}
passDialogInfo.value.footer.btns[1].loading = true;
let params = {
guid: evaDetailInfo.value.approveVO.approveGuid,
flowType: evaDetailInfo.value.approveVO.flowType,
approveSuggest: info.approveSuggest,
approveStaffGuid: userData.staffGuid,
}
submitPromise.value = passFlowData(params).then((res: any) => {
submitPromise.value = null;
passDialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('审批成功');
passDialogInfo.value.visible = false;
getDetailInfo();
} else {
ElMessage.error('审批失败');
}
} else {
ElMessage.error(res.msg);
}
});
} else if (detailType.value == 'qualityEvaluate') {
if (submitPromise.value) {
return;
}
passDialogInfo.value.footer.btns[1].loading = true;
submitPromise.value = qualityAllow({
bizGuid: evaDetailInfo.value.guid,
flowType: evaDetailInfo.value.approveVO.flowType,
approveStaffGuid: userData.staffGuid,
guid: evaDetailInfo.value.approveVO.approveGuid,
qualityScore: info.qualityScore,
evaluationRangeStart: info.evaluationRange[0],
evaluationRangeEnd: info.evaluationRange[1],
evaluationNote: info.evaluationNote,
evaluationFile: info.evaluationFile || []
}).then((res: any) => {
passDialogInfo.value.footer.btns[1].loading = false;
submitPromise.value = null;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('审批成功');
passDialogInfo.value.visible = false;
getDetailInfo();
} else {
ElMessage.error('审批失败');
}
} else {
ElMessage.error(res.msg);
}
});
} else if (detailType.value == 'costAssess') {
if (submitPromise.value) {
return;
}
submitPromise.value = costAssessAllow({
guid: evaDetailInfo.value.guid,
assessmentMoney: info.assessmentMoney,
assessmentDate: info.assessmentDate,
assessmentNote: info.assessmentNote,
assessmentFile: info.assessmentFile.map(f => f.url),
}).then((res: any) => {
submitPromise.value = null;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('审批成功');
passDialogInfo.value.visible = false;
getDetailInfo();
} else {
ElMessage.error('审批失败');
}
} else {
ElMessage.error(res.msg);
}
});
}
} else if (btn.value == 'cancel') {
passDialogInfo.value.visible = false;
}
};
const rejectDialogInfo = ref({
visible: false,
size: 460,
direction: "column",
header: {
title: "驳回",
},
type: '',
contents: [
{
type: 'form',
title: '',
formInfo: {
id: 'batch-reject-form',
items: [
{
label: '',
type: "textarea",
placeholder: "请填写驳回理由(必填)",
field: "approveSuggest",
clearable: true,
block: true,
col: 'margin_b_0',
}
]
}
}
],
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "确定", value: "submit" },
],
},
});
const rejectDialogBtnClick = (btn, info) => {
if (btn.value == 'submit') {
if (info.approveSuggest == '') {
ElMessage.error('请填写驳回理由');
return
}
//资产登记的驳回。
let params = {
guid: evaDetailInfo.value.approveVO.approveGuid,
flowType: evaDetailInfo.value.approveVO.flowType,
approveSuggest: info.approveSuggest,
approveStaffGuid: userData.staffGuid,
}
rejectFlowData(params).then((res: any) => {
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('驳回成功');
rejectDialogInfo.value.visible = false;
getDetailInfo();
} else {
ElMessage.error('驳回失败');
}
} else {
ElMessage.error(res.msg);
}
});
} else if (btn.value == 'cancel') {
rejectDialogInfo.value.visible = false;
}
};
</
script
>
<
template
>
<div
class=
"main-content"
v-loading=
"fullscreenLoading"
>
<div
class=
"detail-content"
:style=
"
{ height: detailType == 'qualityEvaluate' ? 'calc(100% - 44px)' : '100%' }">
<div
v-if=
"detailType == 'qualityEvaluate'"
:class=
"['panel_wrap', 'results_panel', evaDetailInfo.approveVO?.approveState == 'Y' ? 'success' : (evaDetailInfo.approveVO?.approveState == 'R' ? 'reject' : (evaDetailInfo.approveVO?.approveState == 'C' ? 'revoke' : 'audit'))]"
>
<div
class=
"panel_header"
>
<div
class=
"header_title"
v-if=
"evaDetailInfo.approveVO?.approveState == 'Y'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-success"
/>
</el-icon>
<span
class=
"title_text"
>
审批通过
</span>
</div>
<div
class=
"header_title"
v-else-if=
"evaDetailInfo.approveVO?.approveState == 'R'"
>
<el-icon
class=
"title-icon"
>
<CircleCloseFilled
/>
</el-icon>
<span
class=
"title_text"
>
审批被驳回
</span>
</div>
<div
class=
"header_title"
v-else-if=
"evaDetailInfo.approveVO?.approveState == 'A'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-audit"
/>
</el-icon>
<span
class=
"title_text"
>
待审批
</span>
</div>
<div
class=
"header_title"
v-else-if=
"evaDetailInfo.approveVO?.approveState == 'C'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-revoke"
/>
</el-icon>
<span
class=
"title_text"
>
已撤销
</span>
</div>
</div>
</div>
<div
class=
"header"
>
<div
class=
"left-img"
></div>
<div
class=
"right-main"
>
...
...
@@ -281,13 +861,219 @@ const handleTableViewData = (scope) => {
</el-table-column>
</el-table>
</ContentWrap>
<ContentWrap
v-if=
"route.query.type == 'qualityEvaluate'"
id=
"id-assetContent"
title=
"附件信息"
description=
""
style=
"margin: 16px 16px 16px"
>
<div
class=
"list_panel mt4"
>
<div
class=
"list_item is_block isFile"
v-if=
"evaDetailInfo?.qualityEvaluationFile?.length"
:style=
"{ width: '40%' }"
>
<span
class=
"item_label"
:style=
"{ width: 'auto', 'text-align': 'left' }"
>
数据质量评价收集
</span>
<span
v-for=
"(item) in (evaDetailInfo?.qualityEvaluationFile || [])"
class=
"item_value"
:style=
"{ 'padding-left': '0px' }"
>
<div
class=
"file-operate"
>
<
template
v-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'"
>
<img
class=
"file-img"
src=
"../../assets/images/excel.png"
/>
</
template
>
<
template
v-else-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'doc' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'docx'"
>
<img
class=
"file-img"
src=
"../../assets/images/word.png"
/>
</
template
>
<
template
v-else-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'zip'"
>
<img
class=
"file-img"
src=
"../../assets/images/zip.png"
/>
</
template
>
<
template
v-else-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'rar'"
>
<img
class=
"file-img"
src=
"../../assets/images/RAR.png"
/>
</
template
>
<
template
v-else-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf'"
>
<img
class=
"file-img"
src=
"../../assets/images/PDF.png"
/>
</
template
>
<
template
v-else-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'png'"
>
<img
class=
"file-img"
src=
"../../assets/images/png.png"
/>
</
template
>
<
template
v-else-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'"
>
<img
class=
"file-img"
src=
"../../assets/images/jpg.png"
/>
</
template
>
<div
class=
"file-name"
>
{{ item.name }}
</div>
<div
:style=
"{ right: '36px' }"
v-if=
"item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'png' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'"
class=
"file-preview"
@
click=
"onUploadFilePreview(item)"
>
查看
</div>
<div
:style=
"{ right: '0px' }"
class=
"file-preview"
@
click=
"onUploadFileDownload(item)"
>
下载
</div>
</div>
</span>
</div>
</div>
</ContentWrap>
<ContentWrap
id=
"id-qualityEvaluate"
v-if=
"route.query.type == 'qualityEvaluate' && evaDetailInfo.qualityScore != null"
title=
"质量评价"
description=
"资产质量评价信息"
style=
"margin-top: 15px"
>
<div
class=
"list_panel"
>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
质量得分:
</span>
<span
class=
"item_value"
>
{{ evaDetailInfo.qualityScore }}
</span>
</div>
<div
class=
"list_item"
:style=
"{ width: '60%' }"
>
<span
class=
"item_label"
>
评价对象范围:
</span>
<span
class=
"item_value"
>
{{ evaDetailInfo.evaluationRangeStart + '~' + evaDetailInfo.evaluationRangeEnd
}}
</span>
</div>
<div
class=
"list_item is_block"
>
<span
class=
"item_label"
>
质量评价结果:
</span>
<span
class=
"item_value"
>
{{ evaDetailInfo.evaluationNote ?? '--' }}
</span>
</div>
<div
class=
"list_item is_block"
:style=
"{ 'max-width': '700px' }"
>
<span
class=
"item_label"
>
质量评价报告:
</span>
<span
class=
"item_value"
>
<div
class=
"file-operate"
>
<img
class=
"file-img"
src=
"../../assets/images/PDF.png"
/>
<div
class=
"file-name"
>
{{ evaDetailInfo.evaluationFile?.[0]?.name }}
</div>
<div
:style=
"{ right: '36px' }"
class=
"file-preview"
@
click=
"onUploadFilePreview(evaDetailInfo.evaluationFile?.[0])"
>
查看
</div>
<div
:style=
"{ right: '0px' }"
class=
"file-preview"
@
click=
"onUploadFileDownload(evaDetailInfo.evaluationFile?.[0])"
>
下载
</div>
</div>
</span>
</div>
</div>
</ContentWrap>
<ContentWrap
v-if=
"route.query.type == 'qualityEvaluate'"
id=
"id-approveInfo"
title=
"审批信息"
description=
""
style=
"margin: 16px 16px 16px"
>
<ApprovalProcess
v-if=
"deploymentId"
:deploymentId=
"deploymentId"
:processInstanceId=
"processInstanceId"
>
</ApprovalProcess>
</ContentWrap>
</div>
<div
class=
"tool_btns"
v-if=
"toolBtns.length && route.query.type == 'qualityEvaluate'"
>
<div
class=
"btns"
>
<el-button
v-for=
"btn in toolBtns"
:type=
"btn.type"
:plain=
"btn.plain"
@
click=
"btnClick(btn)"
>
{{ btn.label
}}
</el-button>
</div>
</div>
<Dialog
:dialogInfo=
"passDialogInfo"
@
btnClick=
"passDialogBtnClick"
@
inputChange=
passDialogInputChange
/>
<Dialog
:dialogInfo=
"rejectDialogInfo"
@
btnClick=
"rejectDialogBtnClick"
/>
</div>
</template>
<
style
lang=
"scss"
scoped
>
.main-content
{
height
:
100%
;
}
.detail-content
{
overflow-y
:
auto
;
height
:
100%
;
.panel_wrap
{
.panel_header
{
.header_title
{
height
:
40px
;
padding
:
0
16px
;
background-color
:
#fafafa
;
box-shadow
:
0
0
0
1px
rgba
(
229
,
229
,
229
,
1
);
display
:
flex
;
align-items
:
center
;
}
.title_text
{
line-height
:
22px
;
font-size
:
14px
;
color
:
var
(
--el-color-regular
);
font-weight
:
600
;
}
}
&
.results_panel
{
box-shadow
:
0
0
0
1px
#d9d9d9
;
margin
:
16px
16px
0px
;
.panel_header
{
.header_title
{
background-color
:
transparent
;
box-shadow
:
none
;
.el-icon
{
margin-right
:
8px
;
width
:
20px
;
height
:
20px
;
svg
{
width
:
100%
;
height
:
100%
;
}
}
}
}
.panel_body
{
padding-top
:
0
;
margin-top
:
0
;
box-shadow
:
none
;
.results_list
{
display
:
flex
;
.list_item
{
display
:
flex
;
margin-bottom
:
8px
;
margin-right
:
60px
;
color
:
#666
;
.item_value
{
word-break
:
break-all
;
padding
:
0
8px
;
color
:
var
(
--el-color-regular
);
}
}
}
}
&
.success
{
background-color
:
#F4FEF6
;
box-shadow
:
0
0
0
1px
#4FA55D
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#4FA55D
;
}
}
}
}
&
.reject
{
background-color
:
#FDF2F4
;
box-shadow
:
0
0
0
1px
#E63E33
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#E63E33
;
}
}
}
}
&
.audit
{
background-color
:
#FEFBF3
;
box-shadow
:
0
0
0
1px
#F19E40
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#F19E40
;
}
}
}
}
&
.revoke
{
background-color
:
#F5F5F5
;
box-shadow
:
0
0
0
1px
#CCCCCC
;
.panel_header
{
.header_title
{
.el-icon
{
color
:
#666666
;
}
}
}
}
}
}
}
.header
{
...
...
@@ -375,4 +1161,117 @@ const handleTableViewData = (scope) => {
padding-right
:
8px
;
}
}
.tool_btns
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
44px
;
padding
:
0
16px
;
border-top
:
1px
solid
var
(
--el-border-color-regular
);
}
.file-operate
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
.file-img
{
width
:
24px
;
height
:
24px
;
}
&
:hover
{
background-color
:
#f5f5f5
;
}
.file-name
{
color
:
var
(
--el-color-regular
);
margin-left
:
4px
;
}
.file-preview
{
position
:
absolute
;
cursor
:
pointer
;
color
:
var
(
--el-color-primary
);
margin-right
:
8px
;
}
}
.list_panel
{
display
:
flex
;
flex-wrap
:
wrap
;
display
:
flex
;
align-items
:
center
;
.small-title
{
width
:
100%
;
font-size
:
14px
;
color
:
var
(
--el-text-color-primary
);
line-height
:
18px
;
font-weight
:
600
;
}
.list_item
{
width
:
33.33%
;
line-height
:
32px
;
font-size
:
14px
;
color
:
var
(
--el-text-color-regular
);
display
:
flex
;
justify-content
:
space-between
;
min-width
:
120px
;
.item_label
{
text-align
:
left
;
}
.item_value
{
color
:
var
(
--el-color-regular
);
padding
:
0
4px
;
flex
:
1
;
text-align
:
justify
;
min-width
:
0
;
}
&
.is_block
{
width
:
100%
;
.item_value
{
white-space
:
pre-wrap
;
}
}
.file-operate
{
display
:
flex
;
align-items
:
center
;
position
:
relative
;
.file-img
{
width
:
24px
;
height
:
24px
;
}
&
:hover
{
background-color
:
#f5f5f5
;
}
.file-name
{
color
:
var
(
--el-color-regular
);
margin-left
:
4px
;
}
.file-preview
{
position
:
absolute
;
cursor
:
pointer
;
color
:
var
(
--el-color-primary
);
margin-right
:
8px
;
}
}
}
.isFile
{
flex-direction
:
column
;
}
}
</
style
>
...
...
src/views/data_asset/registerDetail.vue
View file @
33be468
...
...
@@ -11,10 +11,6 @@ import { CircleCloseFilled, Document } from '@element-plus/icons-vue'
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
getRegiaterDetail
,
getApproveList
,
registerApproveAllow
,
registerApproveBackup
,
registerApproveCancel
,
getEvaDetail
,
qualityAllow
,
costAssessAllow
,
...
...
@@ -25,7 +21,6 @@ import {
}
from
"@/api/modules/dataAsset"
;
import
{
getTenantDetailInfo
,
getImageContent
,
getTenantInfo
}
from
"@/api/modules/queryService"
;
import
{
passFlowData
,
rejectFlowData
,
revokeFlowData
}
from
"@/api/modules/workFlowService"
;
...
...
@@ -87,6 +82,8 @@ const getDetailInfo = () => {
const
data
=
res
.
data
||
{};
evaDetailInfo
.
value
=
data
;
detailInfo
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
;
processInstanceId
.
value
=
data
.
approveVO
?.
camundaInstanceId
;
//需要显示质量评价信息
if
(
data
.
qualityScore
!=
null
)
{
if
(
tabsInfo
.
value
.
tabs
.
length
==
4
)
{
...
...
@@ -512,14 +509,14 @@ const toolBtns: any = computed(() => {
}
return
btnsArr
;
}
if
(
detailInfo
.
value
.
approveState
==
'A'
)
{
if
(
detailInfo
.
value
.
approveTenantGuids
?.
includes
(
userData
.
tenantGuid
))
{
let
approveVO
=
detailInfo
.
value
.
approveVO
;
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
}]);
}
if
(
detailInfo
.
value
.
tenantGuid
==
userData
.
tenant
Guid
)
{
if
(
approveVO
&&
approveVO
.
approveState
==
'A'
&&
approveVO
.
staffGuid
==
staff
Guid
)
{
btnsArr
.
push
({
label
:
"撤销"
,
value
:
"revoke"
});
}
}
return
btnsArr
;
});
...
...
@@ -923,12 +920,15 @@ const passDialogBtnClick = (btn, info) => {
return
;
}
submitPromise
.
value
=
qualityAllow
({
guid
:
detailInfo
.
value
.
guid
,
bizGuid
:
detailInfo
.
value
.
guid
,
flowType
:
detailInfo
.
value
.
approveVO
.
flowType
,
approveStaffGuid
:
userData
.
staffGuid
,
guid
:
detailInfo
.
value
.
approveVO
.
approveGuid
,
qualityScore
:
info
.
qualityScore
,
evaluationRangeStart
:
info
.
evaluationRange
[
0
],
evaluationRangeEnd
:
info
.
evaluationRange
[
1
],
evaluationNote
:
info
.
evaluationNote
,
evaluationFile
:
info
.
evaluationFile
.
map
(
f
=>
f
.
url
)
,
evaluationFile
:
info
.
evaluationFile
||
[]
,
}).
then
((
res
:
any
)
=>
{
submitPromise
.
value
=
null
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
@@ -1089,34 +1089,34 @@ const formattedDate = (dateVal) => {
</div>
<div
class=
"main-wrap"
ref=
"contentRef"
>
<div
v-if=
"detailType != 'certificate' && detailType != 'asset'"
:class=
"['panel_wrap', 'results_panel', detailInfo.approve
State == 'Y' ? 'success' : (detailInfo.approveState == 'R' ? 'reject' : (detailInfo
.approveState == 'C' ? 'revoke' : 'audit'))]"
>
:class=
"['panel_wrap', 'results_panel', detailInfo.approve
VO?.approveState == 'Y' ? 'success' : (detailInfo.approveVO?.approveState == 'R' ? 'reject' : (detailInfo.approveVO?
.approveState == 'C' ? 'revoke' : 'audit'))]"
>
<div
class=
"panel_header"
>
<div
class=
"header_title"
v-if=
"detailInfo.approveState == 'Y'"
>
<div
class=
"header_title"
v-if=
"detailInfo.approve
VO?.approve
State == 'Y'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-success"
/>
</el-icon>
<span
class=
"title_text"
>
审批通过
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.approveState == 'R'"
>
<div
class=
"header_title"
v-else-if=
"detailInfo.approve
VO?.approve
State == 'R'"
>
<el-icon
class=
"title-icon"
>
<CircleCloseFilled
/>
</el-icon>
<span
class=
"title_text"
>
审批被驳回
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.approveState == 'A'"
>
<div
class=
"header_title"
v-else-if=
"detailInfo.approve
VO?.approve
State == 'A'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-audit"
/>
</el-icon>
<span
class=
"title_text"
>
待审批
</span>
</div>
<div
class=
"header_title"
v-else-if=
"detailInfo.approveState == 'C'"
>
<div
class=
"header_title"
v-else-if=
"detailInfo.approve
VO?.approve
State == 'C'"
>
<el-icon
class=
"title-icon"
>
<svg-icon
name=
"icon-revoke"
/>
</el-icon>
<span
class=
"title_text"
>
已撤销
</span>
</div>
</div>
<div
class=
"panel_body"
v-if=
"detailInfo.approve
State != 'A' && detailInfo
.approveState != 'C'"
>
<div
class=
"panel_body"
v-if=
"detailInfo.approve
VO?.approveState != 'A' && detailInfo.approveVO?
.approveState != 'C'"
>
<div
class=
"results_list"
>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
审批人:
</span>
...
...
@@ -1126,7 +1126,7 @@ const formattedDate = (dateVal) => {
<span
class=
"item_label"
>
审批时间:
</span>
<span
class=
"item_value"
>
{{
approveTableInfo
.
data
.
at
(
-
1
)?.
approveTime
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
v-if=
"detailInfo.approveState == 'R'"
>
<div
class=
"list_item"
v-if=
"detailInfo.approve
VO?.approve
State == 'R'"
>
<span
class=
"item_label"
>
审批意见:
</span>
<span
class=
"item_value"
>
{{
approveTableInfo
.
data
.
at
(
-
1
)?.
approveSuggest
||
'--'
}}
</span>
</div>
...
...
@@ -1383,7 +1383,7 @@ const formattedDate = (dateVal) => {
</div>
</span>
</div>
<
!-- <
div class="
list_item
is_block
isFile
" :style="
{
width
:
'40%'
}
"
<div class="
list_item
is_block
isFile
" :style="
{
width
:
'40%'
}
"
v-if="
(
detailType
!=
'asset'
||
assetDetailInfo
.
isEvaluationAssessment
==
'Y'
)
&&
assetDetailInfo
.
registerAttachment
?.
qualityEvaluationFile
?.
length
">
<span class="
item_label
" :style="
{
width
:
'auto'
,
'text-align'
:
'left'
}
">数据质量评价收集</span>
<span v-for="
(
item
)
in
(
assetDetailInfo
.
registerAttachment
?.
qualityEvaluationFile
||
[])
"
...
...
@@ -1413,14 +1413,14 @@ const formattedDate = (dateVal) => {
v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpg'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpeg'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
jpg
.
png
" />
</template>
<div class="
file
-
name
"
>
{{
setFileName
(
item
.
name
)
}}
<
/div
>
<div class="
file
-
name
"
>
{{
item
.
name
}}
<
/div
>
<
div
:
style
=
"
{
right
:
'36px'
}
"
v-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'pdf'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'png'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpg'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpeg'
"
class="
file
-
preview
" @click="
onUploadFilePreview
(
item
)
">查看</div>
<div :style="
{
right
:
'0px'
}
" class="
file
-
preview
" @click="
onUploadFileDownload
(
item
)
">下载</div>
</div>
</span>
</div>
-->
</div>
<div class="
list_item
is_block
isFile
" :style="
{
width
:
'40%'
,
'margin-right'
:
'28px'
}
"
v-if="
detailType
==
'certificate'
&&
assetDetailInfo
.
registerAttachment
?.
assessmentFile
?.
length
">
<span class="
item_label
" :style="
{
width
:
'auto'
,
'text-align'
:
'left'
}
">数据价值评估</span>
...
...
@@ -1459,88 +1459,6 @@ const formattedDate = (dateVal) => {
</div>
</span>
</div>
<div class="
list_item
is_block
isFile
" :style="
{
width
:
'40%'
,
'margin-right'
:
'28px'
}
"
v-if="
detailType
==
'certificate'
&&
assetDetailInfo
.
registerAttachment
?.
evaluationFile
?.
length
">
<span class="
item_label
" :style="
{
width
:
'auto'
,
'text-align'
:
'left'
}
">质量评估报告</span>
<span v-for="
(
item
)
in
(
assetDetailInfo
.
registerAttachment
?.
evaluationFile
||
[])
" class="
item_value
"
:style="
{
'padding-left'
:
'0px'
}
">
<div class="
file
-
operate
">
<template
v-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'xls'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'xlsx'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'csv'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
excel
.
png
" />
</template>
<template
v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'doc'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'docx'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
word
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'zip'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
zip
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'rar'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
RAR
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'pdf'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
PDF
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'png'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
png
.
png
" />
</template>
<template
v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpg'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpeg'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
jpg
.
png
" />
</template>
<div class="
file
-
name
"
>
{{
setFileName
(
item
.
name
)
}}
<
/div
>
<
div
:
style
=
"
{
right
:
'36px'
}
"
v-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'pdf'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'png'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpg'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpeg'
"
class="
file
-
preview
" @click="
onUploadFilePreview
(
item
)
">查看</div>
<div :style="
{
right
:
'0px'
}
" class="
file
-
preview
" @click="
onUploadFileDownload
(
item
)
">下载</div>
</div>
</span>
</div>
<div class="
list_item
is_block
isFile
" :style="
{
width
:
'40%'
,
'margin-right'
:
'28px'
}
"
v-if="
(
detailType
==
'asset'
&&
assetDetailInfo
.
isCostAssessment
==
'Y'
)
&&
assetDetailInfo
.
registerAttachment
?.
costAssessmentFile
?.
length
">
<span class="
item_label
" :style="
{
width
:
'auto'
,
'text-align'
:
'left'
}
">价值评估报告</span>
<span v-for="
(
item
)
in
(
assetDetailInfo
.
registerAttachment
?.
costAssessmentFile
||
[])
" class="
item_value
"
:style="
{
'padding-left'
:
'0px'
}
">
<div class="
file
-
operate
">
<template
v-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'xls'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'xlsx'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'csv'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
excel
.
png
" />
</template>
<template
v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'doc'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'docx'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
word
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'zip'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
zip
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'rar'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
RAR
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'pdf'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
PDF
.
png
" />
</template>
<template v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'png'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
png
.
png
" />
</template>
<template
v-else-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpg'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpeg'
">
<img class="
file
-
img
" src="
..
/
..
/
assets
/
images
/
jpg
.
png
" />
</template>
<div class="
file
-
name
"
>
{{
setFileName
(
item
.
name
)
}}
<
/div
>
<
div
:
style
=
"
{
right
:
'36px'
}
"
v-if="
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'pdf'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'png'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpg'
||
item
.
name
.
substring
(
item
.
name
.
lastIndexOf
(
'.'
)
+
1
)
==
'jpeg'
"
class="
file
-
preview
" @click="
onUploadFilePreview
(
item
)
">查看</div>
<div :style="
{
right
:
'0px'
}
" class="
file
-
preview
" @click="
onUploadFileDownload
(
item
)
">下载</div>
</div>
</span>
</div>
<div class="
list_item
is_block
isFile
" :style="
{
width
:
'40%'
}
"
v-if="
(
detailType
==
'asset'
&&
assetDetailInfo
.
isQualityAssessment
==
'Y'
)
&&
assetDetailInfo
.
registerAttachment
?.
evaluationFile
?.
length
">
...
...
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