Compare commits
No commits in common. "8f62dd5e06e669cf037c6a917541d11b46e3457e" and "165dcf761b87ebc6d2014c8aaf450e870be006c0" have entirely different histories.
8f62dd5e06
...
165dcf761b
@ -27,26 +27,31 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue'
|
||||
const props = defineProps({
|
||||
type: 3
|
||||
type: {
|
||||
type: Number,
|
||||
// required: true,
|
||||
validator: (val: number) => [1, 2, 3, 4].includes(val),
|
||||
default:3
|
||||
}
|
||||
})
|
||||
|
||||
const show = ref(false)
|
||||
const typeMap = {
|
||||
// 1: 'SpEL',
|
||||
// 2: 'Aviator',
|
||||
3: 'QL',
|
||||
// 4: '表达式'
|
||||
// 1: 'SQEL',
|
||||
2: 'Aviator',
|
||||
3: '表达式',
|
||||
4: '表达式'
|
||||
}
|
||||
|
||||
const examples = {
|
||||
// 1: `# SQEL条件表达式示例\nuser.age > 18 \nAND department == 'IT' \nOR (vipLevel >= 3 AND creditScore > 800)`,
|
||||
3: `// 查询语言示例\nfrom Employee e\nwhere e.salary > 10000\nand e.joinDate > '2020-01-01'\nselect e.name, e.position`,
|
||||
// 2: `## Aviator脚本示例\nlet user = {\n name: '张三',\n vip: true,\n credit: 1500\n};\n\nif(user.vip&&user.credit>1000){\n "尊享VIP服务"\n} else {\n "标准服务"\n}`,
|
||||
// 4: `// 状态判断\n"#status == 'SUCCESS'"\n"#taskStatus != 'FAILED'" `
|
||||
1: `# SQEL条件表达式示例\nuser.age > 18 \nAND department == 'IT' \nOR (vipLevel >= 3 AND creditScore > 800)`,
|
||||
3: `#时间类型变量\n LocalDateTime.now().plusDays(15)\n .format(DateTimeFormatter\n .ofPattern('yyyy-MM-dd'))\n#系统属性\n System.getenv('JAVA_HOME')`,
|
||||
2: `## Aviator脚本示例\nlet user = {\n name: '张三',\n vip: true,\n credit: 1500\n};\n\nif(user.vip&&user.credit>1000){\n "尊享VIP服务"\n} else {\n "标准服务"\n}`,
|
||||
4: `// 状态判断\n"#status == 'SUCCESS'"\n"#taskStatus != 'FAILED'" `
|
||||
}
|
||||
|
||||
const typeLabel = 'QL'
|
||||
const exampleText = `// 查询语言示例\nfrom Employee e\nwhere e.salary > 10000\nand e.joinDate > '2020-01-01'\nselect e.name, e.position`
|
||||
const typeLabel = computed(() => typeMap[props.type])
|
||||
const exampleText = computed(() => examples[props.type])
|
||||
|
||||
const toggleExample = () => {
|
||||
show.value = !show.value
|
||||
|
||||
@ -32,7 +32,7 @@ const drawer = ref<boolean>(false);
|
||||
const form = ref<Workflow.ConditionNodeType>({
|
||||
decision: {
|
||||
logicalCondition: 1,
|
||||
expressionType: 3,
|
||||
expressionType: 1,
|
||||
nodeExpression: '',
|
||||
checkContents: []
|
||||
}
|
||||
@ -136,7 +136,6 @@ const rules: FormRules = {
|
||||
:key="strategy.value"
|
||||
:label="strategy.label"
|
||||
:value="strategy.value"
|
||||
|
||||
/>
|
||||
</NSpace>
|
||||
<example-expression :type="form.decision!.expressionType" />
|
||||
|
||||
@ -48,7 +48,7 @@ const addType = (type: number) => {
|
||||
nodeName: `${$t('workflow.node.condition.conditionNodes.nodeName')} 1`,
|
||||
priorityLevel: 1,
|
||||
decision: {
|
||||
expressionType: 3,
|
||||
expressionType: 1,
|
||||
nodeExpression: undefined,
|
||||
logicalCondition: 1,
|
||||
defaultDecision: 0
|
||||
@ -58,7 +58,7 @@ const addType = (type: number) => {
|
||||
nodeName: $t('workflow.node.condition.conditionNodes.otherNodeName'),
|
||||
priorityLevel: 2,
|
||||
decision: {
|
||||
expressionType: 3,
|
||||
expressionType: 1,
|
||||
nodeExpression: '#true',
|
||||
logicalCondition: 1,
|
||||
defaultDecision: 1
|
||||
|
||||
@ -47,7 +47,7 @@ const addTerm = () => {
|
||||
nodeName: `${$t('workflow.node.condition.conditionNodes.nodeName')} ${len}`,
|
||||
priorityLevel: len,
|
||||
decision: {
|
||||
expressionType: 3,
|
||||
expressionType: 1,
|
||||
nodeExpression: undefined,
|
||||
logicalCondition: 1,
|
||||
defaultDecision: 0
|
||||
|
||||
@ -158,7 +158,7 @@ export const logicalConditionRecord: Record<Api.Common.LogicalCondition, string>
|
||||
export const logicalConditionOptions = transformRecordToNumberOption(logicalConditionRecord);
|
||||
|
||||
/** 表达式类型 */
|
||||
export const expressionRecord: { 3: string } = {
|
||||
export const expressionRecord: Record<Api.Common.Expression, string> = {
|
||||
// 1: 'SpEl',
|
||||
// 2: 'Aviator',
|
||||
3: 'QL'
|
||||
|
||||
@ -400,7 +400,7 @@ const local: App.I18n.Schema = {
|
||||
job_task: '任务管理',
|
||||
job_batch: '执行批次',
|
||||
system: '系统参数',
|
||||
system_manager: '参数管理'
|
||||
system_variable: '参数管理',
|
||||
},
|
||||
page: {
|
||||
common: {
|
||||
|
||||
@ -34,7 +34,7 @@ export const views: Record<LastLevelRouteKey, RouteComponent | (() => Promise<Ro
|
||||
retry_info: () => import("@/views/retry/info/index.vue"),
|
||||
retry_scene: () => import("@/views/retry/scene/index.vue"),
|
||||
retry_task: () => import("@/views/retry/task/index.vue"),
|
||||
system_manager: () => import("@/views/system/manager/index.vue"),
|
||||
system_variable: () => import("@/views/system/manager/index.vue"),
|
||||
user_manager: () => import("@/views/user/manager/index.vue"),
|
||||
workflow_batch: () => import("@/views/workflow/batch/index.vue"),
|
||||
workflow_form_add: () => import("@/views/workflow/form/add/index.vue"),
|
||||
|
||||
@ -280,13 +280,13 @@ export const generatedRoutes: GeneratedRoute[] = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'system_manager',
|
||||
path: '/system/manager',
|
||||
component: 'view.system_manager',
|
||||
name: 'system_variable',
|
||||
path: '/system/variable',
|
||||
component: 'view.system_variable',
|
||||
meta: {
|
||||
title: 'system_manager',
|
||||
i18nKey: 'route.system_manager',
|
||||
icon: 'system:config'
|
||||
title: 'system_variable',
|
||||
icon: 'system:parameter',
|
||||
i18nKey: 'route.system_variable'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
1
src/typings/api.d.ts
vendored
1
src/typings/api.d.ts
vendored
@ -1058,7 +1058,6 @@ declare namespace Api {
|
||||
Pick<
|
||||
Api.Job.Job,
|
||||
| 'groupName'
|
||||
| 'groupNameCn'
|
||||
| 'jobName'
|
||||
| 'ownerId'
|
||||
| 'argsStr'
|
||||
|
||||
@ -116,9 +116,7 @@ async function handleSubmit() {
|
||||
initScene,
|
||||
groupPartition
|
||||
});
|
||||
if (error) {
|
||||
throw error;
|
||||
};
|
||||
if (error) return;
|
||||
window.$message?.success($t('common.addSuccess'));
|
||||
} else {
|
||||
|
||||
@ -214,6 +212,7 @@ async function handleCopy(source: string) {
|
||||
:maxlength="64"
|
||||
show-count
|
||||
:placeholder="$t('page.groupConfig.form.groupNameCn')"
|
||||
:disabled="props.operateType === 'edit'"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.groupConfig.groupStatus')" path="groupStatus">
|
||||
|
||||
@ -28,7 +28,7 @@ function search() {
|
||||
<template>
|
||||
<SearchForm :model="model" @search="search" @reset="reset">
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupName')" path="groupName" class="pr-24px">
|
||||
<NInput v-model:value="model.groupNameCn" :placeholder="$t('page.groupConfig.form.groupName')" clearable />
|
||||
<NInput v-model:value="model.groupName" :placeholder="$t('page.groupConfig.form.groupName')" clearable />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.groupConfig.groupStatus')" path="groupStatus" class="pr-24px">
|
||||
<NSelect
|
||||
|
||||
@ -618,17 +618,6 @@ const scriptMethodOptions = [
|
||||
<NSelect v-model:value="scriptParams.method" :options="scriptMethodOptions" />
|
||||
</NFormItem>
|
||||
<NFormItem label="脚本参数">
|
||||
<template #label>
|
||||
脚本参数
|
||||
<NTooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<icon-ic-round-info class="text-icon ml-4px" />
|
||||
</template>
|
||||
需下载脚本-填写需下载脚本的httpurl<br />
|
||||
本地脚本-填写客户端本地脚本路径<br />
|
||||
脚本代码-填写脚本内容
|
||||
</NTooltip>
|
||||
</template>
|
||||
<CodeMirror v-model="scriptParams.scriptParams" lang="json" placeholder="请输入脚本参数" />
|
||||
</NFormItem>
|
||||
<NFormItem label="编码格式">
|
||||
|
||||
@ -29,7 +29,7 @@ function search() {
|
||||
<template>
|
||||
<SearchForm btn-span="24 s:12 m:18 l:18 xl:18" :model="model" @search="search" @reset="reset">
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.jobTask.groupName')" path="groupName" class="pr-24px">
|
||||
<SelectGroup v-model:value="model.groupNameCn" clearable />
|
||||
<SelectGroup v-model:value="model.groupName" clearable />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.jobTask.jobName')" path="jobName" class="pr-24px">
|
||||
<NInput v-model:value="model.jobName" :placeholder="$t('page.jobTask.form.jobName')" clearable />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user