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
6a8718db
authored
2025-01-10 16:10:53 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:数据产品
1 parent
a934022e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
222 additions
and
28 deletions
src/views/data_product/productListing.vue
src/views/data_product/productListingDetail.vue
src/views/data_product/productListing.vue
View file @
6a8718d
...
...
@@ -19,6 +19,7 @@ import { getParamsList } from "@/api/modules/dataAsset";
import
{
changeNum
,
}
from
"@/utils/common"
;
import
{
passFlowData
,
rejectFlowData
,
revokeFlowData
}
from
"@/api/modules/workFlowService"
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
router
=
useRouter
();
...
...
@@ -98,27 +99,64 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
1
4
0
,
width
:
1
7
0
,
btns
:
(
scope
)
=>
{
let
row
=
scope
.
row
,
btnArr
:
any
=
[];
if
(
row
.
approveState
==
'Y'
)
{
if
(
row
.
listingStatus
==
'Y'
)
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"详情"
,
value
:
"detail"
});
}
else
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"编辑"
,
value
:
"edit"
},
{
label
:
"详情"
,
value
:
"detail"
},
{
label
:
"删除"
,
value
:
"delete"
});
const
{
row
}
=
scope
;
const
approveVO
=
row
.
approveVO
||
{};
const
currentStaffGuid
=
userData
.
staffGuid
const
bizApproveState
=
row
.
bizApproveState
;
const
approveState
=
approveVO
.
approveState
||
null
;
const
approveStaffGuids
=
approveVO
.
approveStaffGuids
||
[];
const
staffGuid
=
approveVO
.
staffGuid
||
''
;
let
isShowCancel
=
false
;
let
flowState
;
let
list
:
any
=
[];
if
(
approveState
==
'N'
)
{
flowState
=
1
;
}
if
(
approveState
==
'A'
&&
approveStaffGuids
.
indexOf
(
currentStaffGuid
)
>
-
1
)
{
flowState
=
2
;
}
if
((
approveState
==
'C'
||
approveState
==
'R'
)
&&
staffGuid
==
currentStaffGuid
)
{
flowState
=
3
;
}
if
(
approveVO
&&
approveVO
.
approveState
==
'A'
&&
staffGuid
==
currentStaffGuid
)
{
isShowCancel
=
true
;
}
if
(
flowState
===
1
)
{
list
=
[{
label
:
"编辑"
,
value
:
"edit"
},
{
label
:
"删除"
,
value
:
"del"
}]
}
if
(
flowState
===
2
)
{
list
=
[{
label
:
"通过"
,
value
:
"pass"
},
{
label
:
"驳回"
,
value
:
"reject"
}]
}
if
(
flowState
===
3
)
{
list
.
push
({
label
:
"删除"
,
value
:
"del"
})
}
if
(
flowState
===
3
&&
bizApproveState
!=
'D'
)
{
list
.
push
({
label
:
"重新提交"
,
value
:
"redit"
})
//已驳回
}
if
(
isShowCancel
)
{
list
.
push
({
label
:
"撤销"
,
value
:
"revoke"
})
}
if
(
flowState
!==
1
)
{
list
.
push
({
label
:
"详情"
,
value
:
"detail"
})
}
if
(
approveState
===
'Y'
)
{
if
(
row
.
listingStatus
===
'Y'
)
{
list
.
push
({
label
:
"下架"
,
value
:
"down"
});
}
}
else
{
if
(
row
.
approveState
==
'A'
)
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"详情"
,
value
:
"detail"
});
}
else
{
btnArr
.
splice
(
0
,
0
,
{
label
:
"编辑"
,
value
:
"edit"
},
{
label
:
"详情"
,
value
:
"detail"
},
{
label
:
"删除"
,
value
:
"delete"
});
if
(
row
.
listingStatus
===
'N'
)
{
list
.
push
({
label
:
"上架"
,
value
:
"up"
});
}
}
return
btnArr
;
return
list
},
}
,
}
});
const
getTableData
=
()
=>
{
tableInfo
.
value
.
loading
=
true
;
getListingList
(
...
...
@@ -210,17 +248,142 @@ const tableSwitchChange = (val, scope, field) => {
})
})
}
const
approveSuggest
=
ref
();
const
dialogTitle
=
ref
(
'通过流程'
);
const
dialogVisible
=
ref
(
false
);
//弹窗类型
const
approveType
=
ref
();
const
tableBtnClick
=
(
scope
,
btn
)
=>
{
const
type
=
btn
.
value
;
const
row
=
scope
.
row
;
currTableData
.
value
=
row
;
if
(
type
==
"detail"
||
type
===
"edit"
)
{
toPatn
(
type
);
}
else
if
(
type
===
"delete"
)
{
open
(
"此操作将永久删除,是否继续?"
,
"warning"
);
if
(
type
==
"detail"
)
{
router
.
push
({
name
:
'dataResourceUpDetail'
,
query
:
{
guid
:
row
.
guid
,
}
});
}
};
if
(
type
==
"edit"
||
type
==
"redit"
)
{
router
.
push
({
name
:
'dataResourceUpEdit'
,
query
:
{
guid
:
row
.
guid
,
}
});
}
if
(
type
==
'del'
)
{
ElMessageBox
.
confirm
(
`数据删除后不可恢复,确定是否删除?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
'warning'
,
}).
then
(()
=>
{
listingDelete
([
row
.
guid
]).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
'00000'
)
{
ElMessage
.
success
(
'删除成功'
)
getTableData
();
}
else
{
ElMessage
.
error
(
res
.
msg
)
}
})
});
}
//撤销
if
(
type
==
'revoke'
)
{
ElMessageBox
.
confirm
(
`撤销后,该流程将不再进行审核,确定这样操作吗?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
'warning'
,
}).
then
(()
=>
{
revokeFlowData
({
guid
:
row
.
approveVO
.
approveGuid
,
flowType
:
row
.
approveVO
.
flowType
,
approveStaffGuid
:
userData
.
staffGuid
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
'00000'
)
{
ElMessage
.
success
(
'撤销成功!'
)
getTableData
();
}
else
{
ElMessage
.
error
(
res
.
msg
)
}
})
});
}
if
(
type
==
'pass'
)
{
approveSuggest
.
value
=
''
;
approveType
.
value
=
'pass'
;
dialogTitle
.
value
=
'通过流程'
dialogVisible
.
value
=
true
;
}
if
(
type
==
'reject'
)
{
approveSuggest
.
value
=
''
;
approveType
.
value
=
'reject'
;
dialogTitle
.
value
=
'驳回流程'
dialogVisible
.
value
=
true
;
}
if
(
type
==
'up'
)
{
tableSwitchChange
(
'Y'
,
scope
,
'listingStatus'
)
}
if
(
type
==
'down'
)
{
tableSwitchChange
(
'N'
,
scope
,
'listingStatus'
)
}
}
const
fullscreenLoading
=
ref
(
false
);
const
passSubmit
=
()
=>
{
let
row
=
currTableData
.
value
console
.
log
(
row
)
dialogVisible
.
value
=
false
;
fullscreenLoading
.
value
=
true
;
passFlowData
({
guid
:
row
.
approveVO
.
approveGuid
,
flowType
:
row
.
approveVO
.
flowType
,
approveSuggest
:
approveSuggest
.
value
,
approveStaffGuid
:
userData
.
staffGuid
,
}).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
.
code
==
'00000'
)
{
ElMessage
.
success
(
'审批通过!'
)
getTableData
();
}
else
{
ElMessage
.
error
(
res
.
msg
)
}
})
}
const
rejectSubmit
=
()
=>
{
if
(
!
approveSuggest
.
value
)
return
ElMessage
.
error
(
'请填写驳回理由!'
)
let
row
=
currTableData
.
value
dialogVisible
.
value
=
false
;
fullscreenLoading
.
value
=
true
;
rejectFlowData
({
guid
:
row
.
approveVO
.
approveGuid
,
flowType
:
row
.
approveVO
.
flowType
,
approveSuggest
:
approveSuggest
.
value
,
approveStaffGuid
:
userData
.
staffGuid
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
'00000'
)
{
fullscreenLoading
.
value
=
false
;
ElMessage
.
success
(
'驳回成功!'
)
getTableData
();
}
else
{
ElMessage
.
error
(
res
.
msg
)
}
})
}
// const tableBtnClick = (scope, btn) => {
// const type = btn.value;
// const row = scope.row;
// currTableData.value = row;
// if (type == "detail" || type === "edit") {
// toPatn(type);
// } else if (type === "delete") {
// open("此操作将永久删除,是否继续?", "warning");
// }
// };
const
toPatn
=
(
type
)
=>
{
if
(
type
==
'add'
)
{
...
...
@@ -375,6 +538,17 @@ const btnClick = (btn) => {
<Table
:tableInfo=
"tableInfo"
@
tableBtnClick=
"tableBtnClick"
@
tablePageChange=
"tablePageChange"
@
tableSwitchBeforeChange=
"tableSwitchBeforeChange"
/>
</div>
<el-dialog
v-model=
"dialogVisible"
:title=
"dialogTitle"
width=
"40%"
>
<el-input
type=
"textarea"
:rows=
"3"
maxlength=
"100"
v-model=
"approveSuggest"
resize=
"none"
>
</el-input>
<template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取消
</el-button>
<el-button
v-if=
"approveType == 'pass'"
type=
"primary"
@
click=
"passSubmit"
>
通过
</el-button>
<el-button
v-if=
"approveType == 'reject'"
type=
"primary"
@
click=
"rejectSubmit"
>
驳回
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</template>
...
...
src/views/data_product/productListingDetail.vue
View file @
6a8718d
...
...
@@ -804,10 +804,12 @@ const submitForm = (btn, formEl, tosub = false) => {
params
.
timeAreaStart
=
params
.
dateRange
?
params
.
dateRange
[
0
]
:
''
;
params
.
timeAreaEnd
=
params
.
dateRange
?
params
.
dateRange
[
1
]
:
''
;
params
.
groundingPick
=
[
route
.
query
.
groundingPick
];
// 删除dateRange字段
delete
params
.
dateRange
;
flowDetailLoading
.
value
=
true
;
if
(
detailType
==
'add'
)
{
params
.
immediateApprove
=
btn
.
value
==
'submit'
?
true
:
false
;
listingSavePortal
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
({
...
...
@@ -880,7 +882,7 @@ const submitForm = (btn, formEl, tosub = false) => {
};
const
btnClick
=
(
btn
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
if
(
btn
.
value
==
'submit'
||
btn
.
value
==
'draft'
)
{
const
checkForm
=
listingFormRef
.
value
;
const
formEl
=
checkForm
.
ruleFormRef
;
const
form
=
checkForm
.
formInline
;
...
...
@@ -1316,18 +1318,35 @@ onBeforeMount(() => {
<span
class=
"item_value"
>
{{
flowDetail
.
damName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
产品
类型:
</span>
<span
class=
"item_label"
>
资产
类型:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
damTypeName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
所属主题:
</span>
<span
class=
"item_label"
>
证书编号:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
damCode
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
数据时间范围:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
subjectDomainName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
证书编号
:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
damCod
e
||
'--'
}}
</span>
<span
class=
"item_label"
>
交付方式
:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
subjectDomainNam
e
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
定价方式:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
subjectDomainName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
定价金额:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
subjectDomainName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
所属主题:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
subjectDomainName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
数据规模(条):
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
dataScale
!=
null
?
changeNum
(
flowDetail
.
dataScale
,
0
)
:
'--'
}}
</span>
...
...
@@ -1348,7 +1367,7 @@ onBeforeMount(() => {
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
审核后上架
:
</span>
<span
class=
"item_label"
>
登记数交所
:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
isApproveGrounding
==
'Y'
?
`自动上架`
:
'手动上架'
}}
</span>
</div>
<div
class=
"list_item is_block"
>
...
...
@@ -1489,8 +1508,9 @@ onBeforeMount(() => {
</div>
<div
class=
"tool_btns"
v-if=
"detailType == 'add' || detailType == 'edit'"
>
<div
class=
"btns"
>
<el-button
@
click=
"btnClick({ value: 'cancel' })"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"btnClick({ value: 'submit' })"
>
提交
</el-button>
<el-button
@
click=
"btnClick({ value: 'cancel' })"
>
返回
</el-button>
<el-button
@
click=
"btnClick({ value: 'draft' })"
>
保存草稿
</el-button>
<el-button
type=
"primary"
@
click=
"btnClick({ value: 'submit' })"
>
提交流程
</el-button>
</div>
</div>
<div
class=
"tool_btns"
v-else-if=
"detailType == 'check'"
>
...
...
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