|
|
@ -109,6 +109,22 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="clearfix list"> |
|
|
|
|
|
|
|
<div class="text"> |
|
|
|
|
|
|
|
<span>{{$t('Startup parameter')}}</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="cont" style="width: 688px;"> |
|
|
|
|
|
|
|
<div style="padding-top: 6px;"> |
|
|
|
|
|
|
|
<m-local-params |
|
|
|
|
|
|
|
ref="refLocalParams" |
|
|
|
|
|
|
|
@on-local-params="_onLocalParams" |
|
|
|
|
|
|
|
:udp-list="udpList" |
|
|
|
|
|
|
|
:hide="false" |
|
|
|
|
|
|
|
:isStartProcess="true"> |
|
|
|
|
|
|
|
</m-local-params> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<template v-if="execType"> |
|
|
|
<template v-if="execType"> |
|
|
|
<div class="clearfix list" style="margin:-6px 0 16px 0"> |
|
|
|
<div class="clearfix list" style="margin:-6px 0 16px 0"> |
|
|
|
<div class="text"> |
|
|
|
<div class="text"> |
|
|
@ -147,11 +163,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
import _ from 'lodash' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import store from '@/conf/home/store' |
|
|
|
import store from '@/conf/home/store' |
|
|
|
import { warningTypeList } from './util' |
|
|
|
import { warningTypeList } from './util' |
|
|
|
import mPriority from '@/module/components/priority/priority' |
|
|
|
import mPriority from '@/module/components/priority/priority' |
|
|
|
import mWorkerGroups from '@/conf/home/pages/dag/_source/formModel/_source/workerGroups' |
|
|
|
import mWorkerGroups from '@/conf/home/pages/dag/_source/formModel/_source/workerGroups' |
|
|
|
|
|
|
|
import mLocalParams from '@/conf/home/pages/dag/_source/formModel/tasks/_source/localParams' |
|
|
|
|
|
|
|
import disabledState from '@/module/mixin/disabledState' |
|
|
|
|
|
|
|
import { mapMutations } from 'vuex' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'start-process', |
|
|
|
name: 'start-process', |
|
|
@ -171,10 +191,13 @@ |
|
|
|
taskDependType: 'TASK_POST', |
|
|
|
taskDependType: 'TASK_POST', |
|
|
|
runMode: 'RUN_MODE_SERIAL', |
|
|
|
runMode: 'RUN_MODE_SERIAL', |
|
|
|
processInstancePriority: 'MEDIUM', |
|
|
|
processInstancePriority: 'MEDIUM', |
|
|
|
workerGroup: 'default' |
|
|
|
workerGroup: 'default', |
|
|
|
|
|
|
|
// Global custom parameters |
|
|
|
|
|
|
|
definitionGlobalParams: [], |
|
|
|
|
|
|
|
udpList: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
mixins: [disabledState], |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
startData: Object, |
|
|
|
startData: Object, |
|
|
|
startNodeList: { |
|
|
|
startNodeList: { |
|
|
@ -184,11 +207,21 @@ |
|
|
|
sourceType: String |
|
|
|
sourceType: String |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
...mapMutations('dag', ['setIsDetails', 'resetParams']), |
|
|
|
|
|
|
|
_onLocalParams (a) { |
|
|
|
|
|
|
|
this.udpList = a |
|
|
|
|
|
|
|
}, |
|
|
|
_datepicker (val) { |
|
|
|
_datepicker (val) { |
|
|
|
this.scheduleTime = val |
|
|
|
this.scheduleTime = val |
|
|
|
}, |
|
|
|
}, |
|
|
|
_start () { |
|
|
|
_start () { |
|
|
|
this.spinnerLoading = true |
|
|
|
this.spinnerLoading = true |
|
|
|
|
|
|
|
let startParams = {} |
|
|
|
|
|
|
|
for (const item of this.udpList) { |
|
|
|
|
|
|
|
if (item.value !== '') { |
|
|
|
|
|
|
|
startParams[item.prop] = item.value |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
let param = { |
|
|
|
let param = { |
|
|
|
processDefinitionId: this.startData.id, |
|
|
|
processDefinitionId: this.startData.id, |
|
|
|
scheduleTime: this.scheduleTime.length && this.scheduleTime.join(',') || '', |
|
|
|
scheduleTime: this.scheduleTime.length && this.scheduleTime.join(',') || '', |
|
|
@ -200,7 +233,8 @@ |
|
|
|
taskDependType: this.taskDependType, |
|
|
|
taskDependType: this.taskDependType, |
|
|
|
runMode: this.runMode, |
|
|
|
runMode: this.runMode, |
|
|
|
processInstancePriority: this.processInstancePriority, |
|
|
|
processInstancePriority: this.processInstancePriority, |
|
|
|
workerGroup: this.workerGroup |
|
|
|
workerGroup: this.workerGroup, |
|
|
|
|
|
|
|
startParams: !_.isEmpty(startParams) ? JSON.stringify(startParams) : '' |
|
|
|
} |
|
|
|
} |
|
|
|
// Executed from the specified node |
|
|
|
// Executed from the specified node |
|
|
|
if (this.sourceType === 'contextmenu') { |
|
|
|
if (this.sourceType === 'contextmenu') { |
|
|
@ -209,6 +243,8 @@ |
|
|
|
this.store.dispatch('dag/processStart', param).then(res => { |
|
|
|
this.store.dispatch('dag/processStart', param).then(res => { |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.$emit('onUpdateStart') |
|
|
|
this.$emit('onUpdateStart') |
|
|
|
|
|
|
|
// recovery |
|
|
|
|
|
|
|
this.udpList = _.cloneDeep(this.definitionGlobalParams) |
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
this.spinnerLoading = false |
|
|
|
this.spinnerLoading = false |
|
|
|
this.close() |
|
|
|
this.close() |
|
|
@ -226,6 +262,13 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
_getGlobalParams () { |
|
|
|
|
|
|
|
this.setIsDetails(true) |
|
|
|
|
|
|
|
this.store.dispatch('dag/getProcessDetails', this.startData.id).then(res => { |
|
|
|
|
|
|
|
this.definitionGlobalParams = _.cloneDeep(this.store.state.dag.globalParams) |
|
|
|
|
|
|
|
this.udpList = _.cloneDeep(this.store.state.dag.globalParams) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
ok () { |
|
|
|
ok () { |
|
|
|
this._start() |
|
|
|
this._start() |
|
|
|
}, |
|
|
|
}, |
|
|
@ -241,6 +284,7 @@ |
|
|
|
created () { |
|
|
|
created () { |
|
|
|
this.warningType = this.warningTypeList[0].id |
|
|
|
this.warningType = this.warningTypeList[0].id |
|
|
|
this.workflowName = this.startData.name |
|
|
|
this.workflowName = this.startData.name |
|
|
|
|
|
|
|
this._getGlobalParams() |
|
|
|
let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || [] |
|
|
|
let stateWorkerGroupsList = this.store.state.security.workerGroupsListAll || [] |
|
|
|
if (stateWorkerGroupsList.length) { |
|
|
|
if (stateWorkerGroupsList.length) { |
|
|
|
this.workerGroup = stateWorkerGroupsList[0].id |
|
|
|
this.workerGroup = stateWorkerGroupsList[0].id |
|
|
@ -263,7 +307,7 @@ |
|
|
|
this.workflowName = this.startData.name |
|
|
|
this.workflowName = this.startData.name |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
computed: {}, |
|
|
|
components: { mPriority, mWorkerGroups } |
|
|
|
components: { mPriority, mWorkerGroups, mLocalParams } |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|