|
|
@ -42,6 +42,7 @@ |
|
|
|
import i18n from '@/module/i18n' |
|
|
|
import i18n from '@/module/i18n' |
|
|
|
import disabledState from '@/module/mixin/disabledState' |
|
|
|
import disabledState from '@/module/mixin/disabledState' |
|
|
|
import mListBox from './_source/listBox' |
|
|
|
import mListBox from './_source/listBox' |
|
|
|
|
|
|
|
import { mapActions, mapState } from 'vuex' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'sub_process', |
|
|
|
name: 'sub_process', |
|
|
@ -57,7 +58,11 @@ |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
backfillItem: Object |
|
|
|
backfillItem: Object |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
...mapState('dag', ['processListS']) |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
...mapActions('dag', ['getProcessList']), |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Node unified authentication parameters |
|
|
|
* Node unified authentication parameters |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -82,6 +87,15 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
_handleName (id) { |
|
|
|
_handleName (id) { |
|
|
|
return _.filter(this.processDefinitionList, v => id === v.id)[0].name |
|
|
|
return _.filter(this.processDefinitionList, v => id === v.id)[0].name |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Get all processDefinition list |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
getAllProcessDefinitions () { |
|
|
|
|
|
|
|
if (!this.processListS || this.processListS.length === 0) { |
|
|
|
|
|
|
|
return this.getProcessList() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return Promise.resolve(this.processListS) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
@ -92,32 +106,32 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created () { |
|
|
|
created () { |
|
|
|
let processListS = _.cloneDeep(this.store.state.dag.processListS) |
|
|
|
|
|
|
|
let code = null |
|
|
|
let code = null |
|
|
|
if (this.router.history.current.name === 'projects-instance-details') { |
|
|
|
if (this.router.history.current.name === 'projects-instance-details') { |
|
|
|
code = this.router.history.current.query.code || null |
|
|
|
code = this.router.history.current.query.code || null |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
code = this.router.history.current.params.code || null |
|
|
|
code = this.router.history.current.params.code || null |
|
|
|
} |
|
|
|
} |
|
|
|
this.processDefinitionList = processListS.map(v => { |
|
|
|
this.getAllProcessDefinitions().then((processListS) => { |
|
|
|
return { |
|
|
|
this.processDefinitionList = processListS.map(def => { |
|
|
|
id: v.processDefinition.id, |
|
|
|
return { |
|
|
|
code: v.processDefinition.code, |
|
|
|
id: def.id, |
|
|
|
name: v.processDefinition.name, |
|
|
|
code: def.code, |
|
|
|
disabled: false |
|
|
|
name: def.name, |
|
|
|
|
|
|
|
disabled: false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).filter(a => (a.code + '') !== code) |
|
|
|
|
|
|
|
let o = this.backfillItem |
|
|
|
|
|
|
|
// Non-null objects represent backfill |
|
|
|
|
|
|
|
if (!_.isEmpty(o)) { |
|
|
|
|
|
|
|
this.wdiCurr = o.params.processDefinitionId |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.processDefinitionList.length) { |
|
|
|
|
|
|
|
this.wdiCurr = this.processDefinitionList[0].id |
|
|
|
|
|
|
|
this.$emit('on-set-process-name', this._handleName(this.wdiCurr)) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}).filter(a => (a.code + '') !== code) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
let o = this.backfillItem |
|
|
|
|
|
|
|
// Non-null objects represent backfill |
|
|
|
|
|
|
|
if (!_.isEmpty(o)) { |
|
|
|
|
|
|
|
this.wdiCurr = o.params.processDefinitionId |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.processDefinitionList.length) { |
|
|
|
|
|
|
|
this.wdiCurr = this.processDefinitionList[0].id |
|
|
|
|
|
|
|
this.$emit('on-set-process-name', this._handleName(this.wdiCurr)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
}, |
|
|
|
}, |
|
|
|