feat(1.3.0-beta1): 新增工作流手动执行代入初始化参数
This commit is contained in:
parent
84802a02ce
commit
74b3460e14
2
src/typings/api.d.ts
vendored
2
src/typings/api.d.ts
vendored
@ -918,6 +918,8 @@ declare namespace Api {
|
||||
triggerInterval: string;
|
||||
/** 超时时间 */
|
||||
executorTimeout: number;
|
||||
/** 上下文 */
|
||||
wfContext: string;
|
||||
}>;
|
||||
|
||||
type WorkflowTriggerParams = {
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { reactive, watch } from 'vue';
|
||||
import { $t } from '@/locales';
|
||||
import { fetchTriggerWorkflowParams } from '@/service/api';
|
||||
import { parseContent } from '@/utils/common';
|
||||
import { parseContent, stringToContent } from '@/utils/common';
|
||||
|
||||
defineOptions({
|
||||
name: 'WorkflowTriggerModal'
|
||||
@ -40,7 +40,16 @@ function createDefaultModel(): Model {
|
||||
}
|
||||
|
||||
function handleUpdateModelWhenEdit() {
|
||||
Object.assign(model, createDefaultModel());
|
||||
const rowData = props.rowData;
|
||||
if (!rowData) {
|
||||
Object.assign(model, createDefaultModel());
|
||||
return;
|
||||
}
|
||||
|
||||
const wfContext = rowData?.wfContext;
|
||||
if (wfContext) {
|
||||
model.wfContexts = stringToContent(rowData?.wfContext) || [];
|
||||
}
|
||||
}
|
||||
|
||||
function closeDrawer() {
|
||||
|
Loading…
Reference in New Issue
Block a user