Skip to content

Commit

Permalink
hide the version control button in workflow instance
Browse files Browse the repository at this point in the history
  • Loading branch information
devosend committed Apr 28, 2022
1 parent ab2d535 commit ac6bdbb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export default defineComponent({
/>
{!!props.definition && (
<VersionModal
isInstance={props.instance ? true : false}
v-model:row={props.definition.processDefinition}
v-model:show={versionModalShow.value}
onUpdateList={refreshDetail}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function useTable(
loadingRef: ref(false)
})

const createColumns = (variables: any) => {
const createColumns = (variables: any, isInstance: boolean) => {
variables.columns = [
{
title: '#',
Expand Down Expand Up @@ -79,12 +79,15 @@ export function useTable(
{
title: t('project.workflow.create_time'),
key: 'operateTime'
},
{
}
] as TableColumns<any>

if (!isInstance) {
variables.columns.push({
title: t('project.workflow.operation'),
key: 'operation',
className: styles.operation,
render: (_row) => {
render: (_row: any) => {
return h(NSpace, null, {
default: () => [
h(
Expand Down Expand Up @@ -154,8 +157,8 @@ export function useTable(
]
})
}
}
] as TableColumns<any>
})
}
}

const getTableData = (row: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import styles from '../index.module.scss'
import type { IDefinitionData } from '../types'

const props = {
isInstance: {
type: Boolean as PropType<boolean>,
default: false
},
show: {
type: Boolean as PropType<boolean>,
default: false
Expand Down Expand Up @@ -67,13 +71,13 @@ export default defineComponent({
watch(
() => props.show,
() => {
createColumns(variables)
createColumns(variables, props.isInstance)
requestData()
}
)

watch(useI18n().locale, () => {
createColumns(variables)
createColumns(variables, props.isInstance)
})

return {
Expand Down

0 comments on commit ac6bdbb

Please sign in to comment.