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;
|
triggerInterval: string;
|
||||||
/** 超时时间 */
|
/** 超时时间 */
|
||||||
executorTimeout: number;
|
executorTimeout: number;
|
||||||
|
/** 上下文 */
|
||||||
|
wfContext: string;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
type WorkflowTriggerParams = {
|
type WorkflowTriggerParams = {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { reactive, watch } from 'vue';
|
import { reactive, watch } from 'vue';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { fetchTriggerWorkflowParams } from '@/service/api';
|
import { fetchTriggerWorkflowParams } from '@/service/api';
|
||||||
import { parseContent } from '@/utils/common';
|
import { parseContent, stringToContent } from '@/utils/common';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'WorkflowTriggerModal'
|
name: 'WorkflowTriggerModal'
|
||||||
@ -40,7 +40,16 @@ function createDefaultModel(): Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleUpdateModelWhenEdit() {
|
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() {
|
function closeDrawer() {
|
||||||
|
Loading…
Reference in New Issue
Block a user