Merge branch 'refs/heads/dev_map_reduce' into preview
This commit is contained in:
commit
87d20bea22
@ -69,9 +69,9 @@ const handleUpdateType = (index: number) => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NDynamicInput v-model:value="content" item-style="margin-bottom: 0;" :on-create="onCreate" #="{ index }">
|
<NDynamicInput v-model:value="content" item-style="margin-bottom: 0;" :on-create="onCreate" #="{ index }">
|
||||||
<NGrid :x-gap="16">
|
<NGrid>
|
||||||
<NFormItemGi
|
<NFormItemGi
|
||||||
:span="8"
|
:span="7"
|
||||||
ignore-path-change
|
ignore-path-change
|
||||||
:show-label="false"
|
:show-label="false"
|
||||||
:rule="dynamicInputRule"
|
:rule="dynamicInputRule"
|
||||||
@ -79,9 +79,9 @@ const handleUpdateType = (index: number) => {
|
|||||||
>
|
>
|
||||||
<NInput v-model:value="content[index].key" placeholder="key" @keydown.enter.prevent />
|
<NInput v-model:value="content[index].key" placeholder="key" @keydown.enter.prevent />
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NGi :span="1" class="h-34px lh-34px">=</NGi>
|
<NGi :span="2" class="h-34px text-center lh-34px">=</NGi>
|
||||||
<NFormItemGi
|
<NFormItemGi
|
||||||
:span="8"
|
:span="7"
|
||||||
ignore-path-change
|
ignore-path-change
|
||||||
:show-label="false"
|
:show-label="false"
|
||||||
:rule="dynamicInputRule"
|
:rule="dynamicInputRule"
|
||||||
@ -109,8 +109,14 @@ const handleUpdateType = (index: number) => {
|
|||||||
@keydown.enter.prevent
|
@keydown.enter.prevent
|
||||||
/>
|
/>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi :span="3" class="w-130px" ignore-path-change :show-label="false" :path="`${path}[${index}].type`">
|
<NFormItemGi
|
||||||
<div :span="1" class="h-34px lh-34px">(</div>
|
:span="3"
|
||||||
|
class="ml-12px w-115px"
|
||||||
|
ignore-path-change
|
||||||
|
:show-label="false"
|
||||||
|
:path="`${path}[${index}].type`"
|
||||||
|
>
|
||||||
|
<div class="h-34px lh-34px">(</div>
|
||||||
<NSelect
|
<NSelect
|
||||||
v-model:value="content[index].type"
|
v-model:value="content[index].type"
|
||||||
class="mx-3px"
|
class="mx-3px"
|
||||||
@ -119,7 +125,7 @@ const handleUpdateType = (index: number) => {
|
|||||||
@keydown.enter.prevent
|
@keydown.enter.prevent
|
||||||
@update:value="handleUpdateType(index)"
|
@update:value="handleUpdateType(index)"
|
||||||
/>
|
/>
|
||||||
<div :span="1" class="h-34px lh-34px">)</div>
|
<div class="h-34px lh-34px">)</div>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
</NGrid>
|
</NGrid>
|
||||||
</NDynamicInput>
|
</NDynamicInput>
|
||||||
|
@ -304,6 +304,10 @@ const SnailLogComponent = defineComponent({
|
|||||||
</NDropdown>
|
</NDropdown>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<div v-if="logList.length === 0" class="h-full flex-center">
|
||||||
|
<NEmpty v-if="logList.length === 0 && finished" />
|
||||||
|
<NSpin v-if="logList.length === 0 && !finished" />
|
||||||
|
</div>
|
||||||
<SnailLogComponent />
|
<SnailLogComponent />
|
||||||
</NDrawerContent>
|
</NDrawerContent>
|
||||||
</NDrawer>
|
</NDrawer>
|
||||||
@ -344,6 +348,10 @@ const SnailLogComponent = defineComponent({
|
|||||||
</NTooltip>
|
</NTooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<div v-if="logList.length === 0" class="h-full flex-center">
|
||||||
|
<NEmpty v-if="logList.length === 0 && finished" />
|
||||||
|
<NSpin v-if="logList.length === 0 && !finished" />
|
||||||
|
</div>
|
||||||
<SnailLogComponent />
|
<SnailLogComponent />
|
||||||
</NCard>
|
</NCard>
|
||||||
</template>
|
</template>
|
||||||
@ -353,6 +361,7 @@ const SnailLogComponent = defineComponent({
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
.virtual-list {
|
.virtual-list {
|
||||||
|
height: calc(100vh - 101px);
|
||||||
max-height: calc(100vh - 101px);
|
max-height: calc(100vh - 101px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,12 @@ watch(
|
|||||||
<CronInput v-if="backOff === 3" v-model="cron" :lang="app.locale" />
|
<CronInput v-if="backOff === 3" v-model="cron" :lang="app.locale" />
|
||||||
|
|
||||||
<NInputGroup v-else-if="backOff === 2 || backOff === 4">
|
<NInputGroup v-else-if="backOff === 2 || backOff === 4">
|
||||||
<NInputNumber v-model:value="interval" :placeholder="$t('page.retryScene.form.triggerInterval')" clearable />
|
<NInputNumber
|
||||||
|
v-model:value="interval"
|
||||||
|
:min="10"
|
||||||
|
:placeholder="$t('page.retryScene.form.triggerInterval')"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
<NInputGroupLabel>{{ $t('common.second') }}</NInputGroupLabel>
|
||||||
</NInputGroup>
|
</NInputGroup>
|
||||||
</template>
|
</template>
|
||||||
|
@ -72,25 +72,30 @@ const save = () => {
|
|||||||
.catch(() => window.$message?.warning('请检查表单信息'));
|
.catch(() => window.$message?.warning('请检查表单信息'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const nodeExpressionFeedback = ref('');
|
||||||
|
|
||||||
const checkNodeExpression = async () => {
|
const checkNodeExpression = async () => {
|
||||||
if (!form.value.decision?.nodeExpression) {
|
if (!form.value.decision?.nodeExpression) {
|
||||||
return Promise.reject(new Error('请填写条件表达式'));
|
nodeExpressionFeedback.value = '请填写条件表达式';
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const { error, data } = await fetchCheckNodeExpression(form.value.decision!);
|
const { error, data } = await fetchCheckNodeExpression(form.value.decision!);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
if (data.key !== 1) {
|
if (data.key !== 1) {
|
||||||
return Promise.reject(data.value ?? '请检查条件表达式');
|
nodeExpressionFeedback.value = data.value || '请检查条件表达式';
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Promise.reject(new Error('接口请求失败'));
|
nodeExpressionFeedback.value = '接口请求失败';
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return Promise.resolve();
|
nodeExpressionFeedback.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const rules: FormRules = {
|
const rules: FormRules = {
|
||||||
decision: {
|
decision: {
|
||||||
expressionType: [{ required: true, message: '请选择表达式类型', trigger: 'change', type: 'number' }],
|
expressionType: [{ required: true, message: '请选择表达式类型', trigger: 'change', type: 'number' }],
|
||||||
nodeExpression: [{ required: true, validator: checkNodeExpression, trigger: 'blur' }]
|
nodeExpression: [{ required: true, message: '请填写条件表达式', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -132,12 +137,24 @@ const rules: FormRules = {
|
|||||||
</NSpace>
|
</NSpace>
|
||||||
</NRadioGroup>
|
</NRadioGroup>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem path="decision.nodeExpression" label="条件表达式">
|
<NFormItem
|
||||||
|
path="decision.nodeExpression"
|
||||||
|
label="条件表达式"
|
||||||
|
validation-status="error"
|
||||||
|
:feedback="nodeExpressionFeedback"
|
||||||
|
>
|
||||||
<CodeMirror v-model="form.decision!.nodeExpression" placeholder="请输入条件表达式" />
|
<CodeMirror v-model="form.decision!.nodeExpression" placeholder="请输入条件表达式" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem path="decision.checkContents" label="模拟上下文">
|
<NFormItem
|
||||||
|
path="decision.checkContents"
|
||||||
|
label="模拟上下文"
|
||||||
|
:show-feedback="form.decision?.checkContents && form.decision.checkContents.length === 0"
|
||||||
|
>
|
||||||
<DynamicInput v-model:value="form.decision!.checkContents!" path="decision.checkContents" />
|
<DynamicInput v-model:value="form.decision!.checkContents!" path="decision.checkContents" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
<NFormItem :show-label="false" :show-feedback="false">
|
||||||
|
<NButton type="primary" ghost block @click="checkNodeExpression">校验条件表达式</NButton>
|
||||||
|
</NFormItem>
|
||||||
</NForm>
|
</NForm>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -210,7 +210,7 @@ const rules: Record<RuleKey, FormItemRule> = {
|
|||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NGi>
|
</NGi>
|
||||||
</NGrid>
|
</NGrid>
|
||||||
<NFormItem path="wfContext" label="工作流上下文">
|
<NFormItem path="wfContext" label="工作流上下文" :show-feedback="false">
|
||||||
<DynamicInput v-model:value="form.wfContexts!" path="wfContexts" />
|
<DynamicInput v-model:value="form.wfContexts!" path="wfContexts" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem path="workflowStatus" label="节点状态">
|
<NFormItem path="workflowStatus" label="节点状态">
|
||||||
|
@ -59,4 +59,9 @@ const visible = defineModel<boolean>('visible', {
|
|||||||
</DetailDrawer>
|
</DetailDrawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
:deep(.virtual-list) {
|
||||||
|
height: calc(100vh - 166px) !important;
|
||||||
|
max-height: calc(100vh - 166px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -115,4 +115,9 @@ onBeforeUnmount(() => {
|
|||||||
</OperateDrawer>
|
</OperateDrawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
:deep(.virtual-list) {
|
||||||
|
height: calc(100vh - 166px) !important;
|
||||||
|
max-height: calc(100vh - 166px) !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -185,9 +185,16 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
|
|
||||||
<n-divider vertical />
|
<n-divider vertical />
|
||||||
|
|
||||||
<NButton text type="error" ghost size="small" onClick={() => execute(row.id!)}>
|
<NPopconfirm onPositiveClick={() => execute(row.id!)}>
|
||||||
{$t('common.execute')}
|
{{
|
||||||
</NButton>
|
default: () => $t('common.confirmExecute'),
|
||||||
|
trigger: () => (
|
||||||
|
<NButton type="error" text ghost size="small">
|
||||||
|
{$t('common.execute')}
|
||||||
|
</NButton>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</NPopconfirm>
|
||||||
|
|
||||||
<n-divider vertical />
|
<n-divider vertical />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user