|
|
@ -25,13 +25,14 @@ import { |
|
|
|
NSpace, |
|
|
|
NSpace, |
|
|
|
NEllipsis |
|
|
|
NEllipsis |
|
|
|
} from 'naive-ui' |
|
|
|
} from 'naive-ui' |
|
|
|
import { defineComponent, getCurrentInstance, h, ref } from 'vue' |
|
|
|
import { defineComponent, getCurrentInstance, h, ref, unref } from 'vue' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { useI18n } from 'vue-i18n' |
|
|
|
import { format } from 'date-fns' |
|
|
|
import { format } from 'date-fns' |
|
|
|
import { workflowExecutionStateType } from '@/common/common' |
|
|
|
import { workflowExecutionStateType } from '@/common/common' |
|
|
|
import { queryProcessDefinitionList } from '@/service/modules/process-definition' |
|
|
|
import { queryProcessDefinitionList } from '@/service/modules/process-definition' |
|
|
|
import { SelectMixedOption } from 'naive-ui/lib/select/src/interface' |
|
|
|
import { SelectMixedOption } from 'naive-ui/lib/select/src/interface' |
|
|
|
import { Router, useRouter } from 'vue-router' |
|
|
|
import { Router, useRouter } from 'vue-router' |
|
|
|
|
|
|
|
import { SelectOption } from 'naive-ui/es/select/src/interface' |
|
|
|
|
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
export default defineComponent({ |
|
|
|
name: 'ProcessInstanceCondition', |
|
|
|
name: 'ProcessInstanceCondition', |
|
|
@ -111,6 +112,19 @@ export default defineComponent({ |
|
|
|
|
|
|
|
|
|
|
|
const trim = getCurrentInstance()?.appContext.config.globalProperties.trim |
|
|
|
const trim = getCurrentInstance()?.appContext.config.globalProperties.trim |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const selectFilter = (query: string, option: SelectOption) => { |
|
|
|
|
|
|
|
return option.filterLabel |
|
|
|
|
|
|
|
? option.filterLabel |
|
|
|
|
|
|
|
.toString() |
|
|
|
|
|
|
|
.toLowerCase() |
|
|
|
|
|
|
|
.includes(query.toLowerCase()) |
|
|
|
|
|
|
|
: false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const updateValue = (value: number) => { |
|
|
|
|
|
|
|
processDefineCodeRef.value = value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
searchValRef, |
|
|
|
searchValRef, |
|
|
|
executorNameRef, |
|
|
|
executorNameRef, |
|
|
@ -123,23 +137,37 @@ export default defineComponent({ |
|
|
|
onClearSearchHost, |
|
|
|
onClearSearchHost, |
|
|
|
trim, |
|
|
|
trim, |
|
|
|
processDefinitionOptions, |
|
|
|
processDefinitionOptions, |
|
|
|
processDefineCodeRef |
|
|
|
processDefineCodeRef, |
|
|
|
|
|
|
|
selectFilter, |
|
|
|
|
|
|
|
updateValue |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { t } = useI18n() |
|
|
|
const { t } = useI18n() |
|
|
|
const options = workflowExecutionStateType(t) |
|
|
|
const options = workflowExecutionStateType(t) |
|
|
|
|
|
|
|
const { |
|
|
|
|
|
|
|
processDefinitionOptions, |
|
|
|
|
|
|
|
processDefineCodeRef, |
|
|
|
|
|
|
|
selectFilter, |
|
|
|
|
|
|
|
updateValue |
|
|
|
|
|
|
|
} = this |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<NSpace justify='end'> |
|
|
|
<NSpace justify='end'> |
|
|
|
<NSelect |
|
|
|
{h(NSelect, { |
|
|
|
clearable |
|
|
|
style: { |
|
|
|
filterable |
|
|
|
width: '210px' |
|
|
|
options={this.processDefinitionOptions} |
|
|
|
}, |
|
|
|
size='small' |
|
|
|
size: 'small', |
|
|
|
style={{ width: '210px' }} |
|
|
|
clearable: true, |
|
|
|
v-model:value={this.processDefineCodeRef} |
|
|
|
filterable: true, |
|
|
|
/> |
|
|
|
options: unref(processDefinitionOptions), |
|
|
|
|
|
|
|
value: processDefineCodeRef, |
|
|
|
|
|
|
|
filter: selectFilter, |
|
|
|
|
|
|
|
onUpdateValue: (value: any) => { |
|
|
|
|
|
|
|
updateValue(value) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
})} |
|
|
|
<NInput |
|
|
|
<NInput |
|
|
|
allowInput={this.trim} |
|
|
|
allowInput={this.trim} |
|
|
|
size='small' |
|
|
|
size='small' |
|
|
|