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
3bdcd166
authored
2026-01-09 16:40:36 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
不显示KB单位;编辑切换限定地域时清除值;添加合约复制功能
1 parent
aa12144b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
16 deletions
src/views/data_smart_contract/components/strategyTable.vue
src/views/data_smart_contract/smartContractCreate.vue
src/views/data_smart_contract/smartContractDetail.vue
src/views/data_smart_contract/smartContractManagement.vue
src/views/data_smart_contract/components/strategyTable.vue
View file @
3bdcd16
...
...
@@ -78,10 +78,8 @@
<template
v-if=
"!isLook && !(productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector' || scope.row.constraintEnName == 'dataField' || scope.row.constraintEnName == 'limitedState' || scope.row.constraintEnName == 'areaAddress'))"
>
<el-input
v-model=
"scope.row['constraintValue']"
placeholder=
"请输入"
:maxlength=
"200"
:class=
"scope.row.constraintEnName == 'limitedDistributeVolume' || scope.row.constraintEnName == 'limitedUsage' ? 'wid-left-input' : ''"
@
change=
"(val) => handleOperatorSelectChange(val, scope, 'constraintValue')"
clearable
></el-input>
<span
v-if=
"scope.row.constraintEnName == 'limitedDistributeVolume' || scope.row.constraintEnName == 'limitedUsage'"
>
KB
</span>
<!--
<span
v-if=
"scope.row.constraintEnName == 'limitedDistributeVolume' || scope.row.constraintEnName == 'limitedUsage'"
>
KB
</span>
-->
</
template
>
<!-- 限定连接器 -->
<el-select
...
...
@@ -116,12 +114,12 @@
:max-collapse-tags=
"1"
:options=
"parentAreaData"
:disabled=
"false"
@
change=
"(val) => handleOperatorSelectChange(val, scope, 'constraintAddressValue')"
>
</el-cascader>
<span
v-else
>
{{
scope.row.constraintEnName == 'limitedDistributeVolume' || scope.row.constraintEnName == 'limitedUsage' ? (scope.row['constraintValue'] ? (scope.row['constraintValue'] + 'KB') : '--') : (
((scope.row.constraintEnName == 'dataField') ?
<span
v-else
>
{{ ((scope.row.constraintEnName == 'dataField') ?
scope.row.additionValue?.map(a => a.chName)?.join(',') : ((scope.row.constraintEnName ==
'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') ?
scope.row.additionValue?.map(a => a.tenantName)?.join(',') : (scope.row.constraintEnName == 'limitedState' ||
scope.row.constraintEnName == 'areaAddress' ? scope.row.additionValue?.map(a => a.label)?.join(',') :
scope.row['constraintValue']))) || '--'
)
}}
</span>
scope.row['constraintValue']))) || '--'
}}
</span>
</template>
</el-table-column>
<el-table-column
v-if=
"!isLook"
label=
"操作"
width=
"140px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
...
...
@@ -434,11 +432,16 @@ const selectOperationChange = (val, scope) => {
/** 约束条件下拉框改变,带出英文名称 */
const
selectConditionChange
=
(
val
,
scope
)
=>
{
init
.
value
=
false
;
let
constraintEnName
=
scope
.
row
.
constraintEnName
;
let
index
=
scope
.
row
.
index
;
let
sv
=
strategyValueInfo
.
value
.
find
(
s
=>
s
.
index
==
index
);
let
svChild
=
sv
.
children
?.
find
(
c
=>
c
.
childIndex
==
scope
.
row
.
childIndex
);
svChild
&&
(
svChild
.
constraintEnName
=
props
.
constraintOptionsList
.
find
(
o
=>
o
.
policyName
==
val
)?.
policyEnName
);
svChild
&&
(
svChild
.
constraintName
=
val
);
if
(
svChild
&&
(
!
val
||
val
!=
constraintEnName
)
&&
(
constraintEnName
==
'areaAddress'
||
constraintEnName
==
'dataField'
||
constraintEnName
==
'limitedState'
||
constraintEnName
==
'limitedDeliveryConnector'
||
constraintEnName
==
'limitedUseConnector'
))
{
//可能是清除操作,需要同步清除部分值
svChild
.
constraintValue
=
''
;
}
if
(
svChild
&&
svChild
.
constraintOperatorCode
)
{
let
opList
=
getActualOperationList
(
scope
);
if
(
!
opList
.
some
(
o
=>
o
.
value
==
svChild
.
constraintOperatorCode
))
{
...
...
@@ -518,13 +521,11 @@ const handleOperatorSelectChange = (val, scope, field) => {
};
})
}
else
if
(
field
==
'constraintStateValue'
)
{
svChild
.
additionValue
=
val
?.
map
(
vv
=>
{
let
item
=
props
.
limitStateOptionList
?.
find
(
c
=>
c
.
guid
==
vv
);
return
{
let
item
=
val
&&
props
.
limitStateOptionList
?.
find
(
c
=>
c
.
guid
==
val
);
svChild
.
additionValue
=
!
item
?
[]
:
[{
value
:
item
.
value
,
label
:
item
.
label
}
})
}];
}
}
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
3bdcd16
...
...
@@ -513,7 +513,7 @@ const saveDraft = () => {
let
params
:
any
=
getSubmitInfo
();
params
.
isResubmit
=
false
;
fullscreenLoading
.
value
=
true
;
if
(
!
route
.
query
.
guid
)
{
if
(
route
.
query
.
type
==
'copy'
||
!
route
.
query
.
guid
)
{
saveContract
(
params
).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
@@ -616,7 +616,7 @@ const submit = () => {
params
.
isResubmit
=
detailInfo
.
value
?.
contractStatus
==
'00'
;
params
.
contractStatus
=
'02'
;
fullscreenLoading
.
value
=
true
;
if
(
!
route
.
query
.
guid
)
{
if
(
route
.
query
.
type
==
'copy'
||
!
route
.
query
.
guid
)
{
saveContract
(
params
).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
...
...
@@ -705,6 +705,9 @@ onBeforeMount(() => {
detailInfo
.
value
=
res
.
data
||
{};
baseInfoFormItems
.
value
.
forEach
(
item
=>
{
item
.
default
=
detailInfo
.
value
[
item
.
field
];
if
(
item
.
default
&&
route
.
query
.
type
==
'copy'
&&
item
.
field
==
'contractName'
)
{
item
.
default
=
item
.
default
+
'_copy'
;
}
});
// if (baseInfoFormItems.value[1].default == '01') {
// // 默认点对点,数据使用方可以选择
...
...
@@ -875,8 +878,8 @@ onActivated(() => {
if
(
route
.
query
.
guid
)
{
let
tab
:
any
=
userStore
.
tabbar
.
find
((
tab
:
any
)
=>
tab
.
fullPath
===
fullPath
);
if
(
tab
)
{
document
.
title
=
`编辑合约-
${
route
.
query
.
name
}
`
;
tab
.
meta
.
title
=
`编辑合约-
${
route
.
query
.
name
}
`
;
document
.
title
=
route
.
query
.
type
==
'copy'
?
`复制合约-
${
route
.
query
.
name
}
`
:
`编辑合约-
${
route
.
query
.
name
}
`
;
tab
.
meta
.
title
=
route
.
query
.
type
==
'copy'
?
`复制合约-
${
route
.
query
.
name
}
`
:
`编辑合约-
${
route
.
query
.
name
}
`
;
}
}
})
...
...
@@ -915,7 +918,7 @@ onActivated(() => {
<div
class=
"tool_btns"
>
<div
class=
"btns"
>
<el-button
@
click=
"cancel"
>
取消
</el-button>
<el-button
@
click=
"saveDraft"
v-show=
"
detailInfo?.contractStatus != '00'
"
>
保存
</el-button>
<el-button
@
click=
"saveDraft"
v-show=
"
route.query.type == 'copy' || (detailInfo?.contractStatus != '00')
"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
合约协商
</el-button>
</div>
</div>
...
...
src/views/data_smart_contract/smartContractDetail.vue
View file @
3bdcd16
...
...
@@ -484,6 +484,8 @@ const disableConfirmBtn = computed(() => {
if
(
newItem
.
action
!=
oldItem
.
action
||
newItem
.
constraintEnName
!=
oldItem
.
constraintEnName
||
newItem
.
constraintOperatorCode
!=
oldItem
.
constraintOperatorCode
||
newItem
.
constraintValue
!=
oldItem
.
constraintValue
||
(
newItem
.
constraintEnName
==
'dataField'
&&
!
isEqual
(
newItem
.
constraintFieldValue
,
oldItem
.
additionValue
?.
map
(
a
=>
a
.
enName
)))
||
(
newItem
.
constraintEnName
==
'limitedState'
&&
!
isEqual
(
newItem
.
constraintStateValue
,
oldItem
.
additionValue
?.[
0
]?.
value
))
||
(
newItem
.
constraintEnName
==
'areaAddress'
&&
!
isEqual
(
newItem
.
constraintAddressValue
,
oldItem
.
additionValue
.
map
(
a
=>
a
.
value
?.
split
(
'-'
))))
||
((
newItem
.
constraintEnName
==
'limitedDeliveryConnector'
||
newItem
.
constraintEnName
==
'limitedUseConnector'
)
&&
!
isEqual
(
newItem
.
constraintConnectorValue
,
oldItem
.
additionValue
?.
map
(
a
=>
a
.
guid
))))
{
return
true
;
}
...
...
src/views/data_smart_contract/smartContractManagement.vue
View file @
3bdcd16
...
...
@@ -82,7 +82,7 @@ const tableInfo = ref({
actionInfo
:
{
label
:
"操作"
,
type
:
"btn"
,
width
:
16
0
,
width
:
!
isDataUse
.
value
?
170
:
13
0
,
btns
:
(
scope
)
=>
{
let
row
=
scope
.
row
;
let
btns
:
any
=
[];
...
...
@@ -90,6 +90,7 @@ const tableInfo = ref({
if
(
contractStatus
==
'00'
)
{
//撤回状态,如果是合约发起方有重新提交按钮,否则只能查看
if
(
userData
.
tenantGuid
==
row
.
tenantGuid
)
{
//是本人发起的。
btns
.
push
({
value
:
'view'
,
label
:
'查看'
,
click
:
()
=>
btnHandles
[
'view'
](
scope
)
});
//重新提交就先不要有复制了。
row
.
isDisable
!=
'Y'
&&
btns
.
push
({
value
:
'edit'
,
label
:
'重新提交'
,
click
:
()
=>
btnHandles
[
'edit'
](
scope
)
});
btns
.
push
({
value
:
'delete'
,
label
:
'删除'
,
click
:
()
=>
btnHandles
[
'delete'
](
scope
)
})
}
else
{
...
...
@@ -97,6 +98,8 @@ const tableInfo = ref({
}
}
else
if
(
contractStatus
==
'01'
)
{
//发起状态
btns
.
push
({
value
:
'edit'
,
label
:
'编辑'
,
click
:
()
=>
btnHandles
[
'edit'
](
scope
)
});
// 合约发起方才有撤回按钮
!
isDataUse
.
value
&&
btns
.
push
({
value
:
'copy'
,
label
:
'复制'
,
click
:
()
=>
btnHandles
[
'copy'
](
scope
)
});
btns
.
push
({
value
:
'delete'
,
label
:
'删除'
,
click
:
()
=>
btnHandles
[
'delete'
](
scope
)
})
}
else
if
(
contractStatus
==
'02'
)
{
// 协商
btns
.
push
({
value
:
'view'
,
label
:
'查看'
,
click
:
()
=>
btnHandles
[
'view'
](
scope
)
});
...
...
@@ -124,6 +127,7 @@ const tableInfo = ref({
}
// 合约发起方才有撤回按钮
if
(
userData
.
tenantGuid
==
row
.
tenantGuid
)
{
!
isDataUse
.
value
&&
btns
.
push
({
value
:
'copy'
,
label
:
'复制'
,
click
:
()
=>
btnHandles
[
'copy'
](
scope
)
});
btns
.
push
({
value
:
'revoke'
,
label
:
'撤回'
,
click
:
()
=>
btnHandles
[
'revoke'
](
scope
)
});
}
}
else
if
(
contractStatus
==
'03'
)
{
//签署,签署过的一方不需要显示签署。
...
...
@@ -139,16 +143,21 @@ const tableInfo = ref({
}
// 合约发起方才有撤回按钮
if
(
userData
.
tenantGuid
==
row
.
tenantGuid
)
{
!
isDataUse
.
value
&&
btns
.
push
({
value
:
'copy'
,
label
:
'复制'
,
click
:
()
=>
btnHandles
[
'copy'
](
scope
)
});
btns
.
push
({
value
:
'revoke'
,
label
:
'撤回'
,
click
:
()
=>
btnHandles
[
'revoke'
](
scope
)
});
}
}
else
if
(
contractStatus
==
'05'
)
{
//合约履行中
btns
.
push
({
value
:
'view'
,
label
:
'查看'
,
click
:
()
=>
btnHandles
[
'view'
](
scope
)
});
//合约发起方才有合约解除
if
(
userData
.
tenantGuid
==
row
.
tenantGuid
)
{
!
isDataUse
.
value
&&
btns
.
push
({
value
:
'copy'
,
label
:
'复制'
,
click
:
()
=>
btnHandles
[
'copy'
](
scope
)
});
btns
.
push
({
value
:
'termination'
,
label
:
'解除'
,
click
:
()
=>
btnHandles
[
'termination'
](
scope
)
});
}
}
else
if
(
contractStatus
==
'06'
||
contractStatus
==
'0302'
)
{
btns
.
push
({
value
:
'view'
,
label
:
'查看'
,
click
:
()
=>
btnHandles
[
'view'
](
scope
)
});
if
(
userData
.
tenantGuid
==
row
.
tenantGuid
)
{
!
isDataUse
.
value
&&
btns
.
push
({
value
:
'copy'
,
label
:
'复制'
,
click
:
()
=>
btnHandles
[
'copy'
](
scope
)
});
}
}
return
btns
;
}
...
...
@@ -165,6 +174,16 @@ const btnHandles = {
}
});
},
copy
:
(
scope
)
=>
{
router
.
push
({
name
:
'smartContractCreate'
,
query
:
{
guid
:
scope
.
row
.
guid
,
name
:
scope
.
row
.
contractName
,
type
:
'copy'
}
});
},
delete
:
(
scope
)
=>
{
proxy
.
$openMessageBox
(
"此操作将永久删除, 是否继续?"
,
()
=>
{
deleteContract
([
scope
.
row
.
guid
]).
then
((
res
:
any
)
=>
{
...
...
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