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
1cf03985
authored
2025-01-14 10:35:45 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_20241202_xukangle' into develop
2 parents
2296e1e9
4b6216c9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
591 additions
and
209 deletions
src/api/modules/dataProduct.ts
src/components/Form/index.vue
src/views/data_inventory/classifyGradeCatalogue.vue
src/views/data_inventory/configureRules.vue
src/views/data_product/productListing.vue
src/views/data_product/productListingDetail.vue
src/api/modules/dataProduct.ts
View file @
1cf0398
...
...
@@ -10,6 +10,15 @@ export const getProductList = (params) => request({
method
:
'get'
,
params
})
/** 获取数交所产品
* @param {Object} params
* path: /dam-catalog-table/data-exchange/get-table-select
*/
export
const
getDataExchangeProductList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/dam-catalog-table/data-exchange/get-table-select`
,
method
:
'get'
,
params
})
/** 获取已添加的数据产品列表 */
export
const
getAddedProductList
=
(
params
)
=>
request
({
...
...
@@ -25,6 +34,13 @@ export const getListingList = (params) => request({
data
:
params
})
/**获取产品上架数量 */
export
const
getListingCount
=
()
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/product-grounding/product-num`
,
method
:
'post'
,
})
/** 获取数据产品上架详情 */
export
const
getListingDetail
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/product-grounding/detail`
,
...
...
@@ -54,6 +70,13 @@ export const listingUpdate = (params) => request({
data
:
params
});
/**门户更新 */
export
const
listingUpdateGateway
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/product-grounding/update-gateway`
,
method
:
'post'
,
data
:
params
});
/** 删除数据产品上架信息 */
export
const
listingDelete
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_NEW_PORTAL
}
/product-grounding/delete`
,
...
...
src/components/Form/index.vue
View file @
1cf0398
...
...
@@ -570,7 +570,7 @@ const panelChange = (scope, row) => {
required_mark: item.required,
}">
{{
item
.
label
}}
</span>
}}
</span>
</span>
<div
class=
"header_title_tooltip"
style=
"width: auto"
v-if=
"item.tooltip"
>
...
...
@@ -663,7 +663,7 @@ const panelChange = (scope, row) => {
<div
class=
"item_panel"
:class=
"
{ is_block: panel.block }" v-for="panel in item.children">
<label
:class=
"
{ required_mark: panel.required }">
{{
panel
.
label
}}
</label>
}}
</label>
<el-checkbox
v-if=
"panel.type == 'checkbox'"
v-model=
"formInline[panel.field]"
:disabled=
"panel.disabled || readonly"
:true-label=
"panel.trueValue ?? true"
:false-label=
"panel.falseValue ?? false"
>
{{
panel
.
placeholder
}}
</el-checkbox>
...
...
@@ -746,7 +746,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
v-if=
"child.label"
:class=
"{ required_mark: child.required }"
>
{{
child.label
}}
</span>
}}
</span>
</span>
<el-select
v-if=
"child.type == 'select'"
v-model=
"formInline[child.field]"
:placeholder=
"child.placeholder"
:disabled=
"child.disabled || readonly"
:filterable=
"child.filterable"
...
...
@@ -805,7 +805,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<el-cascader
v-if=
"child.type == 'cascader'"
v-model=
"formInline[child.field]"
:props=
"child.props"
:options=
"child.options"
:show-all-levels=
"child.showAllLevels ?? true"
...
...
@@ -848,7 +848,7 @@ const panelChange = (scope, row) => {
<div
class=
"item_panel"
v-for=
"child in item.children"
>
<label
:class=
"{ required_mark: child.required }"
>
{{
child.label
}}
</label>
}}
</label>
<div
class=
"tool_item"
>
<el-select
v-model=
"formInline[child.field]"
:class=
"{ is_block: child.block }"
:placeholder=
"child.placeholder"
:multiple=
"child.multiple"
:collapse-tags=
"child.collapse"
...
...
@@ -923,7 +923,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<el-input
:class=
"[child.col,
{ is_block: child.block }]" v-model="formInline[child.field]"
:rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder"
...
...
@@ -980,7 +980,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<div
class=
"input_group"
:class=
"[child.col]"
v-if=
"child.type == 'input-group'"
>
<template
v-for=
"(group, c) in child.children"
>
...
...
@@ -989,7 +989,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: group.required }">
{{
group
.
label
}}
</span>
}}
</span>
</span>
<el-select
v-if=
"group.type == 'select'"
v-model=
"formInline[group.field]"
:placeholder=
"group.placeholder"
:clearable=
"group.clearable"
...
...
@@ -1130,7 +1130,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<el-select
v-if=
"child.type == 'select'"
v-model=
"formInline[child.field]"
:placeholder=
"child.placeholder"
:clearable=
"child.clearable"
:disabled=
"child.disabled || readonly"
...
...
@@ -1181,7 +1181,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
:class=
"[child.col]"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<div
class=
"input_popover_panel"
v-if=
"child.type == 'input-popover-panel'"
>
<el-popover
placement=
"bottom-start"
width=
"100%"
trigger=
"click"
:teleported=
"false"
>
...
...
@@ -1235,7 +1235,7 @@ const panelChange = (scope, row) => {
<span
class=
"item-label"
slot=
"label"
>
<span
:class=
"
{ required_mark: child.required }">
{{
child
.
label
}}
</span>
}}
</span>
</span>
<template
v-if=
"child.type == 'upload-image'"
>
<el-upload
:class=
"[child.col, 'avatar-uploader',
{ is_block: child.block }]" action="#"
...
...
@@ -1353,36 +1353,70 @@ const panelChange = (scope, row) => {
</
template
>
<
template
#
file=
"{ file }"
>
<div
class=
"file-operate"
>
<template
<
!--
<
template
v-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xls' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'xlsx'"
>
<img
class=
"file-img"
src=
"../../assets/images/excel.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'docx'"
>
<img
class=
"file-img"
src=
"../../assets/images/word.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'zip'"
>
<img
class=
"file-img"
src=
"../../assets/images/zip.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'rar'"
>
<img
class=
"file-img"
src=
"../../assets/images/RAR.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf'"
>
<img
class=
"file-img"
src=
"../../assets/images/PDF.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png'"
>
<img
class=
"file-img"
src=
"../../assets/images/png.png"
/>
</
template
>
<
template
v-else-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
>
<img
class=
"file-img"
src=
"../../assets/images/jpg.png"
/>
</
template
>
<div
class=
"file-name"
>
<ellipsis-tooltip
:content=
"file.name"
class-name=
"w100f"
:refName=
"'tooltipOver' + file.name"
></ellipsis-tooltip>
</div>
<div
:style=
"{ right: '72px' }"
class=
"file-preview"
v-if=
"file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'"
@
click=
"onUploadFilePreview(file, item)"
>
查看
</div>
<div
:style=
"{ right: '36px' }"
class=
"file-preview"
@
click=
"onUploadFileDownload(file, item)"
>
下载
</div>
<div
v-if=
"!item.disabled"
:style=
"{ right: 0 }"
class=
"file-preview"
@
click=
"handleUploadFileRemove(file, item)"
>
删除
</div>
-->
<
template
v-if=
"file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'xls' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'xlsx'"
>
<img
class=
"file-img"
src=
"../../assets/images/excel.png"
/>
</
template
>
<
template
v-else-if=
"file
.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'doc' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
== 'docx'"
>
v-else-if=
"file
?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'doc' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() =
== 'docx'"
>
<img
class=
"file-img"
src=
"../../assets/images/word.png"
/>
</
template
>
<
template
v-else-if=
"file
.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
== 'zip'"
>
<
template
v-else-if=
"file
?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() =
== 'zip'"
>
<img
class=
"file-img"
src=
"../../assets/images/zip.png"
/>
</
template
>
<
template
v-else-if=
"file
.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
== 'rar'"
>
<
template
v-else-if=
"file
?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() =
== 'rar'"
>
<img
class=
"file-img"
src=
"../../assets/images/RAR.png"
/>
</
template
>
<
template
v-else-if=
"file
.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
== 'pdf'"
>
<
template
v-else-if=
"file
?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() =
== 'pdf'"
>
<img
class=
"file-img"
src=
"../../assets/images/PDF.png"
/>
</
template
>
<
template
v-else-if=
"file
.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
== 'png'"
>
<
template
v-else-if=
"file
?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() =
== 'png'"
>
<img
class=
"file-img"
src=
"../../assets/images/png.png"
/>
</
template
>
<
template
v-else-if=
"file
.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase()
== 'jpeg'"
>
v-else-if=
"file
?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() === 'jpg' || file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() =
== 'jpeg'"
>
<img
class=
"file-img"
src=
"../../assets/images/jpg.png"
/>
</
template
>
<div
class=
"file-name"
>
<ellipsis-tooltip
:content=
"file
.name
"
class-name=
"w100f"
:refName=
"'tooltipOver' + file.name"
></ellipsis-tooltip>
<ellipsis-tooltip
:content=
"file
?.name ?? ''
"
class-name=
"w100f"
:refName=
"'tooltipOver' + file
?
.name"
></ellipsis-tooltip>
</div>
<div
:style=
"{ right: '72px' }"
class=
"file-preview"
v-if=
"
file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'pdf' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'png' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpg' || file.name.substring(file.name.lastIndexOf('.') + 1).toLowerCase() == 'jpeg'
"
v-if=
"
['pdf', 'png', 'jpg', 'jpeg'].includes(file?.name?.substring(file.name.lastIndexOf('.') + 1).toLowerCase() ?? '')
"
@
click=
"onUploadFilePreview(file, item)"
>
查看
</div>
<div
:style=
"{ right: '36px' }"
class=
"file-preview"
@
click=
"onUploadFileDownload(file, item)"
>
下载
</div>
...
...
src/views/data_inventory/classifyGradeCatalogue.vue
View file @
1cf0398
...
...
@@ -28,7 +28,7 @@ import {
import
{
TableColumnWidth
}
from
"@/utils/enum"
;
import
router
from
"@/router"
;
import
{
download
}
from
"@/utils/common"
;
import
{
da
,
sl
}
from
"element-plus/es/locale"
;
const
currentPath
=
ref
<
string
[]
>
([]);
...
...
@@ -146,7 +146,7 @@ onMounted(async () => {
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
classifyDetailGuidInfo
.
value
});
getDictionaryList
();
//
getDictionaryList();
getSearchTableList
();
// getLabelListData();
getGradeData
(
refGradeGuid
.
value
);
...
...
@@ -900,21 +900,22 @@ const classEditFormItems = ref<any>([{
clearable
:
true
,
block
:
true
,
visible
:
true
,
},
{
label
:
'关联字典'
,
field
:
'dictionaryGuid'
,
type
:
'select'
,
placeholder
:
'请选择'
,
default
:
''
,
options
:
[],
props
:
{
label
:
"chName"
,
value
:
"guid"
,
},
filterable
:
true
,
clearable
:
true
,
required
:
false
},
//{
// label: '关联字典',
// field: 'dictionaryGuid',
// type: 'select',
// placeholder: '请选择',
// default: '',
// options: [],
// props: {
// label: "chName",
// value: "guid",
// },
// filterable: true,
// clearable: true,
// required: false
// },
{
label
:
'字段取值范围'
,
type
:
'input'
,
...
...
@@ -1052,7 +1053,7 @@ const drawerBtnClick = async (btn, info) => {
}
else
{
btn
.
loading
=
true
;
console
.
log
(
'drawerBtnClick'
,
info
);
const
{
orderNumLength
,
orderNum
,
startNumber
,
endNumber
,
fieldValueRange
,
startValue
,
endValue
,
fieldPrecision
,
dictionaryGuid
,
isUnique
,
notNull
}
=
info
;
const
{
orderNumLength
,
orderNum
,
startNumber
,
endNumber
,
fieldValueRange
,
startValue
,
endValue
,
fieldPrecision
,
isUnique
,
notNull
}
=
info
;
// 判断长度orderNumLength,orderNum 要么都有值,要么都没有值,不能只有一个有值,一个没有值精确提醒
let
fieldLengthCondition
:
any
=
''
;
if
((
orderNumLength
===
'between'
&&
!
startNumber
)
||
(
orderNumLength
===
'between'
&&
!
endNumber
))
{
...
...
@@ -1091,7 +1092,6 @@ const drawerBtnClick = async (btn, info) => {
if
(
fieldValueRange
)
{
param
=
{
fieldPrecision
,
dictionaryGuid
,
isUnique
,
notNull
,
fieldLengthCondition
,
...
...
@@ -1102,7 +1102,6 @@ const drawerBtnClick = async (btn, info) => {
}
else
{
param
=
{
fieldPrecision
,
dictionaryGuid
,
isUnique
,
notNull
,
fieldLengthCondition
,
...
...
src/views/data_inventory/configureRules.vue
View file @
1cf0398
...
...
@@ -87,7 +87,7 @@ const getDictionaryList = () => {
onMounted
(
async
()
=>
{
await
getFieldTypeData
()
await
getBizRuleConfigDetailData
()
getDictionaryList
()
//
getDictionaryList()
})
...
...
@@ -335,7 +335,7 @@ const saveData = async () => {
execGuid
:
router
.
currentRoute
.
value
.
query
.
execGuid
,
fieldLengthCondition
:
fieldLengthCondition
,
fieldPrecision
:
item
.
fieldPrecision
,
dictionaryGuid
:
item
.
dictionaryGuid
,
//
dictionaryGuid: item.dictionaryGuid,
isUnique
:
item
.
isUnique
,
notNull
:
item
.
notNull
,
fieldValueRange
:
item
.
fieldValueRange
...
...
@@ -348,7 +348,7 @@ const saveData = async () => {
execGuid
:
router
.
currentRoute
.
value
.
query
.
execGuid
,
fieldLengthCondition
:
fieldLengthCondition
,
fieldPrecision
:
item
.
fieldPrecision
,
dictionaryGuid
:
item
.
dictionaryGuid
,
//
dictionaryGuid: item.dictionaryGuid,
isUnique
:
item
.
isUnique
,
notNull
:
item
.
notNull
,
startValue
:
item
.
startValue
,
...
...
@@ -627,7 +627,7 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null
</el-table-column>
<!-- 关联字典(可编辑)el-tree-select 形式下拉形式 -->
<el-table-column
prop=
"dictionaryGuid"
label=
"关联字典"
width=
"150"
align=
"left"
show-overflow-tooltip
>
<
!-- <
el-table-column prop="dictionaryGuid" label="关联字典" width="150" align="left" show-overflow-tooltip>
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.dictionaryGuid
? dictionaryList.find((item: any) => item.guid === scope.row.dictionaryGuid)?.chName : '--' }}</span>
...
...
@@ -636,7 +636,7 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null
</el-select>
</template>
</el-table-column>
</el-table-column>
-->
<!-- 数据是否唯一(可编辑) -->
<el-table-column
prop=
"isUnique"
label=
"数据是否唯一"
width=
"150"
align=
"left"
show-overflow-tooltip
>
...
...
src/views/data_product/productListing.vue
View file @
1cf0398
...
...
@@ -9,7 +9,7 @@ import useUserStore from "@/store/modules/user";
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
getListingList
,
listingDelete
,
listingUpdateStatus
,
filterVal
,
getParamsDataList
}
from
"@/api/modules/dataProduct"
;
import
{
getListingList
,
listingDelete
,
listingUpdateStatus
,
filterVal
,
getParamsDataList
,
getListingCount
}
from
"@/api/modules/dataProduct"
;
import
{
TableColumnWidth
}
from
'@/utils/enum'
;
import
TableTools
from
"@/components/Tools/table_tools.vue"
;
...
...
@@ -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,65 @@ 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
(
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
;
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"
})
}
return
list
},
}
,
}
});
const
getTableData
=
()
=>
{
tableInfo
.
value
.
loading
=
true
;
getListingList
(
...
...
@@ -150,8 +189,20 @@ const toSearch = (val: any, clear: boolean = false) => {
page
.
value
.
curr
=
1
;
tableInfo
.
value
.
page
.
curr
=
1
;
getTableData
();
getListingCountData
();
};
// 获取产品上架数量
const
getListingCountData
=
()
=>
{
getListingCount
({}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
demandListData
.
value
=
res
.
data
||
[];
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
}
const
tableSwitchBeforeChange
=
(
scope
,
field
,
callback
)
=>
{
ElMessageBox
.
confirm
(
`确定
${
scope
.
row
[
field
]
==
'Y'
?
'下架'
:
'上架'
}
该产品吗?`
,
...
...
@@ -198,17 +249,146 @@ 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
:
'productListingDetail'
,
query
:
{
guid
:
row
.
guid
,
type
:
'detail'
}
});
}
};
if
(
type
==
"edit"
||
type
==
"redit"
)
{
router
.
push
({
name
:
'productListingDetail'
,
query
:
{
guid
:
row
.
guid
,
type
:
type
==
'edit'
?
'edit'
:
'redit'
,
case
:
'2'
,
name
:
row
.
damName
}
});
}
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'
)
{
...
...
@@ -216,7 +396,8 @@ const toPatn = (type) => {
name
:
"productListingDetail"
,
query
:
{
type
,
groundingPick
:
'门户数据专区'
groundingPick
:
'门户数据专区'
,
case
:
'2'
,
},
});
}
else
{
...
...
@@ -319,7 +500,17 @@ const demandListData: any = ref([
{
companyName
:
'深数所'
,
listedNum
:
16
,
processNum
:
1235
},
{
companyName
:
'苏数所'
,
listedNum
:
16
,
processNum
:
1235
},
]);
const
btnClick
=
(
btn
)
=>
{
const
btnClick
=
(
item
)
=>
{
console
.
log
(
item
)
router
.
push
({
name
:
"productListingDetail"
,
query
:
{
exchangeGuid
:
item
.
exchangeGuid
,
exchangeName
:
item
.
exchangeName
,
type
:
'add'
,
groundingPick
:
'登记得数交所'
,
},
});
}
...
...
@@ -340,21 +531,21 @@ const btnClick = (btn) => {
<img
class=
"left-img"
:src=
"(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo"
alt=
""
/>
<div
class=
"right-main"
>
<div
class=
"title"
>
{{
item
.
company
Name
??
'--'
}}
</div>
<div
class=
"title"
>
{{
item
.
exchange
Name
??
'--'
}}
</div>
<div
class=
"count-group"
>
<div
class=
"count-item"
>
<div
class=
"item-label"
>
已上架产品数
</div>
<div
class=
"item-num"
>
{{
changeNum
(
item
.
listedNum
)
}}
</div>
<div
class=
"item-num"
>
{{
item
.
listingNum
||
'--'
}}
</div>
</div>
<div
class=
"count-item"
>
<div
class=
"item-label"
>
审批中产品数
</div>
<div
class=
"item-num"
>
{{
changeNum
(
item
.
processNum
)
}}
</div>
<div
class=
"item-num"
>
{{
item
.
underReviewNum
||
'--'
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"operator-btn"
>
<
div
class=
"left-btn borderRight"
@
click=
"btnClick(item)"
>
更新模板
</div
>
<
!--
<div
class=
"left-btn borderRight"
@
click=
"btnClick(item)"
>
更新模板
</div>
--
>
<div
class=
"left-btn"
@
click=
"btnClick(item)"
>
资产登记
</div>
</div>
</div>
...
...
@@ -363,6 +554,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>
...
...
@@ -385,15 +587,16 @@ const btnClick = (btn) => {
.list-content
{
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
flex-start
;
flex-wrap
:
wrap
;
margin-bottom
:
8px
;
padding
:
0
8px
;
.card-content
{
width
:
calc
(
33.33%
-
10px
)
;
width
:
300px
;
padding
:
16px
;
box-shadow
:
0
0
0
1px
#d9d9d9
;
margin-right
:
12px
;
.header
{
display
:
flex
;
...
...
@@ -433,32 +636,37 @@ const btnClick = (btn) => {
.operator-btn
{
display
:
flex
;
justify-content
:
space-between
;
//
justify-content
:
space-between
;
justify-content
:
center
;
align-items
:
center
;
box-shadow
:
0
0
0
1px
#d9d9d9
;
position
:
relative
;
&::after
{
content
:
''
;
width
:
0
;
height
:
100%
;
border-left
:
1px
solid
#d9d9d9
;
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
100%
;
height
:
40px
;
line-height
:
40px
;
cursor
:
pointer
;
//
&::after
{
//
content
:
''
;
//
width
:
0
;
//
height
:
100%
;
//
border-left
:
1px
solid
#d9d9d9
;
//
position
:
absolute
;
//
left
:
50%
;
//
transform
:
translateX
(
-50%
);
//
}
//
>
.left-btn
{
//
width
:
50%
;
//
height
:
40px
;
//
line-height
:
40px
;
//
text-align
:
center
;
//
cursor
:
pointer
;
&:hover
{
color
:
#4fa1a4
;
}
>
.left-btn
{
width
:
50%
;
height
:
40px
;
line-height
:
40px
;
text-align
:
center
;
cursor
:
pointer
;
&:hover
{
color
:
#4fa1a4
;
}
}
//
}
}
}
}
...
...
src/views/data_product/productListingDetail.vue
View file @
1cf0398
...
...
@@ -13,9 +13,9 @@ import useUserStore from "@/store/modules/user";
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
changeNum
}
from
'@/utils/common'
;
import
{
onUploadFilePreview
,
onUploadFileDownload
}
from
'@/api/modules/common'
;
import
{
getAreaData
,
getServiceTenants
}
from
"@/api/modules/queryService"
;
import
{
getAreaData
,
getServiceTenants
,
getSingleList
}
from
"@/api/modules/queryService"
;
import
{
getApproveList
,
getTenantApprove
,
registerApproveAllow
,
registerApproveBackup
,
getParamsList
,
getServiceDetail
}
from
"@/api/modules/dataAsset"
;
import
{
getProductList
,
getAddedProductList
,
getListingDetail
,
listingSave
,
listingUpdate
,
listingSavePortal
,
getParamsDataList
}
from
"@/api/modules/dataProduct"
;
import
{
getProductList
,
getAddedProductList
,
getListingDetail
,
listingSave
,
listingUpdate
,
listingSavePortal
,
getParamsDataList
,
listingUpdateGateway
,
getDataExchangeProductList
}
from
"@/api/modules/dataProduct"
;
import
{
getMatchDetail
}
from
"@/api/modules/dataFinance"
;
import
{
useValidator
}
from
'@/hooks/useValidator'
;
import
{
getCamundaDeploymentId
}
from
"@/api/modules/workFlowService"
;
...
...
@@ -95,7 +95,7 @@ const getArea = (node, resolve) => {
})
}
}
const
processInstanceId
=
ref
(
''
);
const
collapseIcon
=
ref
(
false
);
const
collapseIcon1
=
ref
(
false
);
const
collapseIcon2
=
ref
(
false
);
...
...
@@ -133,6 +133,10 @@ const approveTableInfo: any = ref({
}
});
const
exchangeName
=
computed
(()
=>
{
return
route
.
query
.
exchangeName
;
})
const
listingFormRef
=
ref
();
const
subForm
=
ref
({});
const
formInfo
=
ref
({
...
...
@@ -182,7 +186,7 @@ const formInfo = ref({
label
:
"数据时间范围"
,
type
:
"date-picker"
,
field
:
"dateRange"
,
default
:
null
,
default
:
''
,
placeholder
:
"开始时间~结束时间"
,
clearable
:
true
,
required
:
true
,
...
...
@@ -346,7 +350,7 @@ const formInfo = ref({
// required: true,
// col: 'checkbox-input'
// },
//
{
// {
// label: '审核后自动上架',
// type: 'switch-checkbox-group',
// field: 'autoGrounding',
...
...
@@ -365,22 +369,13 @@ const formInfo = ref({
// required: true,
// },
{
label
:
"上架交易所"
,
type
:
"select"
,
placeholder
:
"请选择"
,
field
:
"exchangeGuids"
,
default
:
[],
options
:
exchangeList
.
value
,
props
:
{
value
:
"guid"
,
label
:
"tenantName"
,
},
filterable
:
true
,
label
:
"登记数交所"
,
type
:
"input"
,
placeholder
:
"请输入"
,
field
:
"exchangeName"
,
default
:
exchangeName
,
clearable
:
true
,
multiple
:
true
,
tagsTooltip
:
true
,
collapse
:
true
,
disabled
:
false
,
disabled
:
true
,
required
:
true
,
visible
:
true
},
...
...
@@ -416,8 +411,12 @@ const formInfo = ref({
field
:
'productImg'
,
default
:
[],
limit
:
1
,
block
:
fals
e
,
block
:
tru
e
,
required
:
false
,
// col: 'mr8',
// style: {
// width: 'calc(33.33% - 20px)!important'
// },
},
{
label
:
'登记证'
,
...
...
@@ -425,7 +424,7 @@ const formInfo = ref({
accept
:
'.jpg, .png, .jpeg '
,
type
:
'upload-file'
,
placeholder
:
'请选择'
,
field
:
'regist
erImg
'
,
field
:
'regist
rationCertificate
'
,
default
:
[],
limit
:
1
,
block
:
false
,
...
...
@@ -438,7 +437,7 @@ const formInfo = ref({
accept
:
'.png, .pdf'
,
type
:
'upload-file'
,
placeholder
:
'请选择'
,
field
:
'quality
Report
'
,
field
:
'quality
EvaluationFile
'
,
default
:
[],
limit
:
1
,
block
:
false
,
...
...
@@ -449,18 +448,23 @@ const formInfo = ref({
label
:
"质量评估机构"
,
type
:
"select"
,
placeholder
:
"请选择"
,
field
:
"quality
Org
"
,
field
:
"quality
EvaluationInstitutionGuid
"
,
default
:
''
,
options
:
[],
props
:
{
value
:
'value'
,
label
:
'label'
},
allowCreate
:
true
,
filterable
:
true
,
clearable
:
true
,
disabled
:
false
,
required
:
true
,
visible
:
true
required
:
false
,
visible
:
true
,
col
:
'mr8'
,
style
:
{
width
:
'calc(33.33% - 20px)!important'
},
},
{
label
:
'价值评估报告'
,
...
...
@@ -468,7 +472,7 @@ const formInfo = ref({
accept
:
'.png, .pdf'
,
type
:
'upload-file'
,
placeholder
:
'请选择'
,
field
:
'
valueReport
'
,
field
:
'
costAssessmentFile
'
,
default
:
[],
limit
:
1
,
block
:
false
,
...
...
@@ -479,17 +483,18 @@ const formInfo = ref({
label
:
"价值评估机构"
,
type
:
"select"
,
placeholder
:
"请选择"
,
field
:
"
valueOrg
"
,
field
:
"
costAssessmentInstitutionGuid
"
,
default
:
''
,
options
:
[],
props
:
{
value
:
'
value
'
,
label
:
'
label
'
value
:
'
guid
'
,
label
:
'
tenantName
'
},
allowCreate
:
true
,
filterable
:
true
,
clearable
:
true
,
disabled
:
false
,
required
:
tru
e
,
required
:
fals
e
,
visible
:
true
},
{
...
...
@@ -498,7 +503,7 @@ const formInfo = ref({
accept
:
'.png, .pdf'
,
type
:
'upload-file'
,
placeholder
:
'请选择'
,
field
:
'commitment'
,
field
:
'commitment
Letter
'
,
templateUrl
:
'http://www.baidu.com'
,
default
:
[],
limit
:
1
,
...
...
@@ -512,7 +517,7 @@ const formInfo = ref({
accept
:
'.png, .pdf'
,
type
:
'upload-file'
,
placeholder
:
'请选择'
,
field
:
'a
uthorization
'
,
field
:
'a
ccreditFile
'
,
templateUrl
:
'http://www.baidu.com'
,
default
:
[],
limit
:
1
,
...
...
@@ -681,6 +686,15 @@ const getProducts = () => {
})
}
const
getTableInfo
=
()
=>
{
getDataExchangeProductList
({}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
let
data
=
res
.
data
||
[];
formInfo
.
value
.
items
[
0
].
options
=
data
;
}
})
}
const
getProductDetail
=
()
=>
{
flowDetailLoading
.
value
=
true
;
getListingDetail
({
guid
}).
then
((
res
:
any
)
=>
{
...
...
@@ -688,6 +702,9 @@ const getProductDetail = () => {
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{}
flowDetail
.
value
=
data
;
deploymentId
.
value
=
data
.
approveVO
.
camundaDeploymentId
processInstanceId
.
value
=
data
.
approveVO
.
camundaInstanceId
console
.
log
(
data
,
'-----------------'
);
let
coverageArea
=
data
.
coverageArea
||
[];
if
(
data
.
coverageArea
?.[
0
]?.[
0
]
==
'all'
)
{
setFormItems
({
...
flowDetail
.
value
,
coverageArea
:
coverageArea
},
true
);
...
...
@@ -795,68 +812,112 @@ const submitForm = (btn, formEl, tosub = false) => {
params
.
caseNumber
=
formInfo
.
value
.
items
.
at
(
5
).
defaultValue
||
formInfo
.
value
.
items
.
at
(
4
).
default
;
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'
)
{
listingSavePortal
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
({
type
:
"success"
,
message
:
'提交成功'
,
});
flowDetailLoading
.
value
=
false
;
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
router
.
push
({
name
:
"productListing"
,
query
:
{},
});
}
else
{
if
(
!
route
.
query
.
exchangeGuid
)
{
if
(
detailType
==
'add'
)
{
params
.
immediateApprove
=
btn
.
value
==
'submit'
?
true
:
false
;
listingSavePortal
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
({
type
:
"success"
,
message
:
'提交成功'
,
});
flowDetailLoading
.
value
=
false
;
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
router
.
push
({
name
:
"productListing"
,
query
:
{},
});
}
else
{
ElMessage
({
type
:
"error"
,
message
:
res
.
msg
,
});
flowDetailLoading
.
value
=
false
;
}
}).
catch
((
res
)
=>
{
ElMessage
({
type
:
"error"
,
message
:
res
.
msg
,
message
:
'提交失败'
,
});
flowDetailLoading
.
value
=
false
;
}
}).
catch
((
res
)
=>
{
ElMessage
({
type
:
"error"
,
message
:
'提交失败'
,
});
flowDetailLoading
.
value
=
false
;
});
}
else
{
params
.
guid
=
guid
;
listingUpdate
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
({
type
:
"success"
,
message
:
'提交成功'
,
});
flowDetailLoading
.
value
=
false
;
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
router
.
push
({
name
:
"productListing"
,
query
:
{},
});
}
else
{
}
else
{
params
.
guid
=
guid
;
params
.
immediateApprove
=
btn
.
value
==
'submit'
?
true
:
false
;
listingUpdateGateway
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
ElMessage
({
type
:
"success"
,
message
:
'提交成功'
,
});
flowDetailLoading
.
value
=
false
;
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
router
.
push
({
name
:
"productListing"
,
query
:
{},
});
}
else
{
ElMessage
({
type
:
"error"
,
message
:
res
.
msg
,
});
flowDetailLoading
.
value
=
false
;
}
}).
catch
((
res
)
=>
{
ElMessage
({
type
:
"error"
,
message
:
res
.
msg
,
message
:
'提交失败'
,
});
flowDetailLoading
.
value
=
false
;
}
}).
catch
((
res
)
=>
{
ElMessage
({
type
:
"error"
,
message
:
'提交失败'
,
});
flowDetailLoading
.
value
=
false
;
});
}
}
else
{
if
(
detailType
==
'add'
)
{
// 上架交易所
params
.
immediateApprove
=
btn
.
value
==
'submit'
?
true
:
false
;
params
.
accreditFile
=
params
.
accreditFile
.
length
?
{
name
:
params
.
accreditFile
[
0
].
name
,
url
:
params
.
accreditFile
[
0
].
url
}
:
{};
params
.
commitmentLetter
=
params
.
commitmentLetter
.
length
?
{
name
:
params
.
commitmentLetter
[
0
].
name
,
url
:
params
.
commitmentLetter
[
0
].
url
}
:
{};
params
.
costAssessmentFile
=
params
.
costAssessmentFile
.
length
?
{
name
:
params
.
costAssessmentFile
[
0
].
name
,
url
:
params
.
costAssessmentFile
[
0
].
url
}
:
{};
params
.
productDetail
=
params
.
productDetail
.
length
?
{
name
:
params
.
productDetail
[
0
].
name
,
url
:
params
.
productDetail
[
0
].
url
}
:
{};
params
.
qualityEvaluationFile
=
params
.
qualityEvaluationFile
.
length
?
{
name
:
params
.
qualityEvaluationFile
[
0
].
name
,
url
:
params
.
qualityEvaluationFile
[
0
].
url
}
:
{};
params
.
registrationCertificate
=
params
.
registrationCertificate
.
length
?
{
name
:
params
.
registrationCertificate
[
0
].
name
,
url
:
params
.
registrationCertificate
[
0
].
url
}
:
{};
params
.
exchangeGuid
=
route
.
query
.
exchangeGuid
;
console
.
log
(
params
,
'-----------------'
);
// listingSave(params).then((res: any) => {
// if (res.code == proxy.$passCode) {
// ElMessage({
// type: "success",
// message: '提交成功',
// });
// flowDetailLoading.value = false;
// userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
// assetStore.set(true);
// router.push({
// name: "productListing",
// query: {},
// });
// } else {
// ElMessage({
// type: "error",
// message: res.msg,
// });
// flowDetailLoading.value = false;
// }
// }).catch((res) => {
// ElMessage({
// type: "error",
// message: '提交失败',
// });
// flowDetailLoading.value = false;
// });
}
}
}
else
{
nextTick
(()
=>
{
const
isError
=
document
.
getElementsByClassName
(
'is-error'
);
...
...
@@ -872,7 +933,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
;
...
...
@@ -884,7 +945,7 @@ const btnClick = (btn) => {
dialogInfo
.
value
.
contents
=
contents
.
value
[
btn
.
value
]
dialogInfo
.
value
.
visible
=
true
}
else
{
if
(
detailType
==
'add'
||
detailType
==
'edit'
)
{
if
(
detailType
==
'add'
||
detailType
==
'edit'
||
detailType
==
'redit'
)
{
ElMessageBox
.
confirm
(
"当前页面尚未保存,确定放弃修改吗?"
,
"提示"
,
...
...
@@ -895,7 +956,7 @@ const btnClick = (btn) => {
}
).
then
(()
=>
{
userStore
.
setTabbar
(
userStore
.
tabbar
.
filter
((
tab
:
any
)
=>
tab
.
fullPath
!==
fullPath
));
assetStore
.
set
(
true
);
//
assetStore.set(true);
router
.
push
({
name
:
"productListing"
,
query
:
{},
...
...
@@ -917,6 +978,7 @@ const btnClick = (btn) => {
}
const
setFormItems
=
(
row
:
any
=
null
,
isDetail
=
false
)
=>
{
console
.
log
(
row
,
'--------1---------'
);
formInfo
.
value
.
items
.
map
((
item
:
any
)
=>
{
if
(
item
.
field
==
'productImg'
)
{
item
.
default
=
row
?
(
row
.
productPic
?
[
row
.
productPic
]
:
row
[
item
.
field
]
||
[])
:
[]
...
...
@@ -966,16 +1028,25 @@ const setFormItems = (row: any = null, isDetail = false) => {
}
else
{
item
.
default
=
row
?
row
[
item
.
field
]
:
(
item
.
default
||
''
)
}
}
else
{
item
.
default
=
row
?
row
[
item
.
field
]
:
(
item
.
default
||
''
)
}
else
if
(
item
.
field
==
'dateRange'
)
{
item
.
default
=
row
?
[
row
.
timeAreaStart
,
row
.
timeAreaEnd
]
:
null
;
}
// else {
// if (item && item.hasOwnProperty('default')) {
// item.default = row ? row[item.field] : (item.default || '');
// } else {
// console.warn(`Item does not have the 'default' property`);
// }
// }
})
}
const
selectChange
=
async
(
val
,
row
,
info
)
=>
{
if
(
row
.
field
==
'damName'
)
{
const
data
=
row
.
options
.
filter
(
o
=>
o
.
damName
==
val
);
let
coverageArea
=
data
.
length
?
(
data
[
0
].
coverageArea
||
[])
:
[];
console
.
log
(
data
,
'-----------------'
);
let
coverageArea
=
(
data
.
length
&&
data
[
0
].
coverageArea
)
?
data
[
0
].
coverageArea
:
[];
await
setFormItems
({
...
info
,
coverageArea
:
coverageArea
});
formInfo
.
value
.
items
.
at
(
0
).
default
=
val
;
formInfo
.
value
.
items
.
at
(
1
).
default
=
data
.
length
?
data
[
0
].
damType
:
''
;
...
...
@@ -988,7 +1059,7 @@ const selectChange = async (val, row, info) => {
formInfo
.
value
.
items
.
at
(
-
1
).
default
=
data
.
length
?
data
[
0
].
damGuid
:
''
;
formInfo
.
value
.
items
.
at
(
-
3
).
required
=
data
[
0
].
damType
!=
'1'
&&
data
[
0
].
damType
!=
'2'
;
formInfo
.
value
.
items
.
at
(
-
4
).
required
=
data
[
0
].
damType
!=
'1'
&&
data
[
0
].
damType
!=
'2'
;
if
(
data
.
length
&&
data
[
0
].
coverageArea
?.[
0
]?.[
0
]
!=
'all'
)
{
if
(
data
.
length
&&
data
[
0
].
coverageArea
?.[
0
]?.[
0
]
!=
'all'
&&
data
[
0
].
coverageArea
)
{
let
p
:
any
=
[];
data
[
0
].
coverageArea
.
forEach
(
area
=>
{
if
(
p
.
includes
(
area
[
0
]))
{
...
...
@@ -1118,16 +1189,19 @@ onActivated(() => {
break
;
}
};
if
(
detailType
==
'add'
||
detailType
==
'edit'
)
{
getProducts
();
};
// if ((detailType == 'add' || detailType == 'edit') && !route.query.exchangeGuids
) {
//
getProducts();
//
};
})
const
deploymentId
=
ref
(
''
);
const
qualityEvaluationData
=
ref
<
any
>
(
''
);
const
costAssessmentData
=
ref
<
any
>
(
''
);
onBeforeMount
(()
=>
{
if
(
route
.
query
.
type
==
'add'
&&
!
route
.
query
.
type1
)
{
// case 1: 数交易所 case 2: 门户
if
(
route
.
query
.
case
==
'2'
)
{
formInfo
.
value
.
items
.
forEach
(
item
=>
{
if
(
item
.
field
==
'damCode'
||
item
.
field
==
'exchangeGuids'
||
item
.
field
==
'regist
erImg'
||
item
.
field
==
'qualityReport'
||
item
.
field
==
'qualityOrg'
||
item
.
field
==
'valueReport'
||
item
.
field
==
'valueOrg'
||
item
.
field
==
'commitment'
||
item
.
field
==
'authorization
'
||
item
.
field
==
'productDetail'
)
{
if
(
item
.
field
==
'damCode'
||
item
.
field
==
'exchangeGuids'
||
item
.
field
==
'regist
rationCertificate'
||
item
.
field
==
'qualityEvaluationFile'
||
item
.
field
==
'qualityEvaluationInstitutionGuid'
||
item
.
field
==
'costAssessmentFile'
||
item
.
field
==
'costAssessmentInstitutionGuid'
||
item
.
field
==
'commitmentLetter'
||
item
.
field
==
'accreditFile
'
||
item
.
field
==
'productDetail'
)
{
item
.
visible
=
false
;
}
})
...
...
@@ -1141,11 +1215,11 @@ onBeforeMount(() => {
})
if
(
detailType
&&
detailType
!=
'add'
)
{
getProductDetail
();
if
(
detailType
==
'detail'
&&
dGuid
!==
undefined
)
{
getApplyDeatil
();
}
//
if (detailType == 'detail' && dGuid !== undefined) {
//
getApplyDeatil();
//
}
}
getApproveData
();
//
getApproveData();
getParamsDataList
({
dictType
:
'资产类型'
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
.
data
||
[];
...
...
@@ -1213,6 +1287,31 @@ onBeforeMount(() => {
ElMessage
.
error
(
res
.
msg
);
}
})
// 获取质量评估机构
getSingleList
({
pageIndex
:
-
1
,
pageSize
:
-
1
,
tenantType
:
"12505"
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
qualityEvaluationData
.
value
=
res
.
data
.
records
||
[];
let
item
=
formInfo
.
value
.
items
.
find
(
item
=>
item
.
field
==
'qualityEvaluationInstitutionGuid'
);
item
&&
(
item
.
options
=
qualityEvaluationData
.
value
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
// 获取价值评估机构
getSingleList
({
pageIndex
:
-
1
,
pageSize
:
-
1
,
tenantType
:
"12504"
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
costAssessmentData
.
value
=
res
.
data
.
records
||
[];
let
item
=
formInfo
.
value
.
items
.
find
(
item
=>
item
.
field
==
'costAssessmentInstitutionGuid'
);
item
&&
(
item
.
options
=
costAssessmentData
.
value
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
if
(
route
.
query
.
exchangeGuid
)
{
getTableInfo
();
}
else
{
getProducts
();
}
})
</
script
>
...
...
@@ -1275,7 +1374,7 @@ onBeforeMount(() => {
</div>
</div>
<div
class=
"panel_body"
:class=
"
{ collapse: collapseIcon }">
<div
class=
"list_panel"
v-if=
"detailType == 'add' || detailType == 'edit'"
>
<div
class=
"list_panel"
v-if=
"detailType == 'add' || detailType == 'edit'
|| detailType == 'redit'
"
>
<Form
ref=
"listingFormRef"
:itemList=
"formInfo.items"
:formId=
"formInfo.id"
:rules=
"formInfo.rules"
:col=
"formInfo.col"
@
selectChange=
"selectChange"
@
checkboxChange=
"checkboxChange"
@
switchChange=
"switchChange"
/>
...
...
@@ -1286,18 +1385,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_value"
>
{{
flowDetail
.
subjectDomainName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<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
.
timeAreaStart
-
flowDetail
.
timeAreaEnd
)
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
交付方式:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
deliveryWayName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
定价方式:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
pricingWayName
||
'--'
}}
</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>
...
...
@@ -1307,25 +1423,25 @@ onBeforeMount(() => {
<span
class=
"item_value"
>
{{
flowDetail
.
caseNumber
!=
null
?
changeNum
(
flowDetail
.
caseNumber
,
0
)
:
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
<
!--
<
div
class=
"list_item"
>
<span
class=
"item_label"
>
交易方式:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
deliveryWayName
||
'--'
}}
</span>
</div>
<div
class=
"list_item"
>
</div>
-->
<
!--
<
div
class=
"list_item"
>
<span
class=
"item_label"
>
产品价格:
</span>
<span
class=
"item_value"
>
{{
flowDetail
.
isDiscussPersonally
==
'Y'
?
'面议'
:
(
flowDetail
.
productPrice
||
'--'
)
}}
</span>
</div>
</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"
>
<
!--
<
div
class=
"list_item is_block"
>
<span
class=
"item_label"
>
上架交易所:
</span>
<span
class=
"item_value"
>
{{
!
flowDetail
.
exchangeGuids
?.
length
?
'--'
:
flowDetail
.
exchangeNames
.
join
(
','
)
}}
</span>
</div>
</div>
-->
<div
class=
"list_item is_block"
>
<span
class=
"item_label"
>
数据覆盖地域:
</span>
<span
class=
"item_value"
...
...
@@ -1417,7 +1533,7 @@ onBeforeMount(() => {
<div
class=
"list_panel"
>
<div
class=
"table_panel_wrap"
>
<!-- <Table :tableInfo="approveTableInfo" /> -->
<ApprovalProcess
v-if=
"deploymentId"
:deploymentId=
"deploymentId"
:
definitionId=
"''
"
>
<ApprovalProcess
v-if=
"deploymentId"
:deploymentId=
"deploymentId"
:
processInstanceId=
"processInstanceId
"
>
</ApprovalProcess>
</div>
</div>
...
...
@@ -1457,10 +1573,12 @@ onBeforeMount(() => {
</div>
</div>
</div>
<div
class=
"tool_btns"
v-if=
"detailType == 'add' || detailType == 'edit'"
>
<div
class=
"tool_btns"
v-if=
"detailType == 'add' || detailType == 'edit'
|| detailType == 'redit'
"
>
<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' })"
v-if=
"route.query.type == 'add' || route.query.type == 'redit' || route.query.type == 'edit'"
>
保存草稿
</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