|
|
@@ -7,7 +7,7 @@
|
|
|
/>
|
|
|
<div class="l-flex__fill c-sibling-item--v u-overflow-y--auto">
|
|
|
<div class="c-sibling-item--v u-font-size--sm u-color--black u-bold">目标设备</div>
|
|
|
- <div class="c-sibling-item--v near c-devices u-color--info u-line-height">
|
|
|
+ <div class="c-sibling-item--v near c-devices u-color--info">
|
|
|
<div
|
|
|
v-for="device in devices"
|
|
|
:key="device.deviceId"
|
|
|
@@ -76,7 +76,9 @@ import {
|
|
|
EventTarget,
|
|
|
AssetTagInfo,
|
|
|
AssetTypeInfo,
|
|
|
- Access
|
|
|
+ Access,
|
|
|
+ State,
|
|
|
+ JUMP_REVIEW
|
|
|
} from '@/constant'
|
|
|
import {
|
|
|
parseByte,
|
|
|
@@ -173,19 +175,40 @@ export default {
|
|
|
devices () {
|
|
|
return this.list?.[0].devices
|
|
|
},
|
|
|
+ status () {
|
|
|
+ return this.workflow.status
|
|
|
+ },
|
|
|
+ isSecondLevel () {
|
|
|
+ return this.status === State.FIRST_LEVEL
|
|
|
+ },
|
|
|
+ isFinalLevel () {
|
|
|
+ return this.status === State.SECOND_LEVEL
|
|
|
+ },
|
|
|
resolveInvoke () {
|
|
|
- return this.access.has(Access.REVIEW_RELEASE_FINAL)
|
|
|
- ? resolveFinal
|
|
|
- : this.access.has(Access.REVIEW_RELEASE_SECOND)
|
|
|
- ? resolveSecondLevel
|
|
|
- : resolveFirstLevel
|
|
|
+ if (JUMP_REVIEW && this.access.has(Access.REVIEW_RELEASE_FINAL)) {
|
|
|
+ return resolveFinal
|
|
|
+ }
|
|
|
+ switch (this.workflow.status) {
|
|
|
+ case State.SUBMITTED:
|
|
|
+ return resolveFirstLevel
|
|
|
+ case State.FIRST_LEVEL:
|
|
|
+ return resolveSecondLevel
|
|
|
+ default:
|
|
|
+ return resolveFinal
|
|
|
+ }
|
|
|
},
|
|
|
rejectInvoke () {
|
|
|
- return this.access.has(Access.REVIEW_RELEASE_FINAL)
|
|
|
- ? rejectFinal
|
|
|
- : this.access.has(Access.REVIEW_RELEASE_SECOND)
|
|
|
- ? rejectSecondLevel
|
|
|
- : rejectFirstLevel
|
|
|
+ if (JUMP_REVIEW && this.access.has(Access.REVIEW_RELEASE_FINAL)) {
|
|
|
+ return rejectFinal
|
|
|
+ }
|
|
|
+ switch (this.workflow.status) {
|
|
|
+ case State.SUBMITTED:
|
|
|
+ return rejectFirstLevel
|
|
|
+ case State.FIRST_LEVEL:
|
|
|
+ return rejectSecondLevel
|
|
|
+ default:
|
|
|
+ return rejectFinal
|
|
|
+ }
|
|
|
},
|
|
|
publishTarget () {
|
|
|
return this.list?.[0].target
|
|
|
@@ -285,7 +308,7 @@ export default {
|
|
|
},
|
|
|
onResolve () {
|
|
|
this.$confirm(
|
|
|
- this.access.has(Access.REVIEW_RELEASE_FINAL) ? '立即发布?' : '审核通过?',
|
|
|
+ '审核通过?',
|
|
|
'操作确认',
|
|
|
{ type: 'warning' }
|
|
|
).then(() => {
|
|
|
@@ -327,6 +350,6 @@ export default {
|
|
|
.c-devices {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
- gap: $spacing--sm;
|
|
|
+ gap: $spacing--xs;
|
|
|
}
|
|
|
</style>
|