Compare commits

..

2 Commits

Author SHA1 Message Date
SGK\17962
8f62dd5e06 1、条件表达式只保留QL
2、修复组信息无法修改问题
3、组下拉列表显示中文名
4、修复系统参数显示异常
5、脚本参数新增提示信息
2025-11-06 17:31:38 +08:00
SGK\17962
5d0680a78f 1、条件表达式只保留QL
2、修复组信息无法修改问题
3、组下拉列表显示中文名
4、修复系统参数显示异常
5、脚本参数新增提示信息
2025-11-06 17:12:52 +08:00
13 changed files with 42 additions and 33 deletions

View File

@ -27,31 +27,26 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
const props = defineProps({
type: {
type: Number,
// required: true,
validator: (val: number) => [1, 2, 3, 4].includes(val),
default:3
}
type: 3
})
const show = ref(false)
const typeMap = {
// 1: 'SQEL',
2: 'Aviator',
3: '表达式',
4: '表达式'
// 1: 'SpEL',
// 2: 'Aviator',
3: 'QL',
// 4: ''
}
const examples = {
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'" `
// 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'" `
}
const typeLabel = computed(() => typeMap[props.type])
const exampleText = computed(() => examples[props.type])
const typeLabel = 'QL'
const exampleText = `// 查询语言示例\nfrom Employee e\nwhere e.salary > 10000\nand e.joinDate > '2020-01-01'\nselect e.name, e.position`
const toggleExample = () => {
show.value = !show.value

View File

@ -32,7 +32,7 @@ const drawer = ref<boolean>(false);
const form = ref<Workflow.ConditionNodeType>({
decision: {
logicalCondition: 1,
expressionType: 1,
expressionType: 3,
nodeExpression: '',
checkContents: []
}
@ -136,6 +136,7 @@ const rules: FormRules = {
:key="strategy.value"
:label="strategy.label"
:value="strategy.value"
/>
</NSpace>
<example-expression :type="form.decision!.expressionType" />

View File

@ -48,7 +48,7 @@ const addType = (type: number) => {
nodeName: `${$t('workflow.node.condition.conditionNodes.nodeName')} 1`,
priorityLevel: 1,
decision: {
expressionType: 1,
expressionType: 3,
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: 1,
expressionType: 3,
nodeExpression: '#true',
logicalCondition: 1,
defaultDecision: 1

View File

@ -47,7 +47,7 @@ const addTerm = () => {
nodeName: `${$t('workflow.node.condition.conditionNodes.nodeName')} ${len}`,
priorityLevel: len,
decision: {
expressionType: 1,
expressionType: 3,
nodeExpression: undefined,
logicalCondition: 1,
defaultDecision: 0

View File

@ -158,7 +158,7 @@ export const logicalConditionRecord: Record<Api.Common.LogicalCondition, string>
export const logicalConditionOptions = transformRecordToNumberOption(logicalConditionRecord);
/** 表达式类型 */
export const expressionRecord: Record<Api.Common.Expression, string> = {
export const expressionRecord: { 3: string } = {
// 1: 'SpEl',
// 2: 'Aviator',
3: 'QL'

View File

@ -400,7 +400,7 @@ const local: App.I18n.Schema = {
job_task: '任务管理',
job_batch: '执行批次',
system: '系统参数',
system_variable: '参数管理',
system_manager: '参数管理'
},
page: {
common: {

View File

@ -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_variable: () => import("@/views/system/manager/index.vue"),
system_manager: () => 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"),

View File

@ -280,13 +280,13 @@ export const generatedRoutes: GeneratedRoute[] = [
},
children: [
{
name: 'system_variable',
path: '/system/variable',
component: 'view.system_variable',
name: 'system_manager',
path: '/system/manager',
component: 'view.system_manager',
meta: {
title: 'system_variable',
icon: 'system:parameter',
i18nKey: 'route.system_variable'
title: 'system_manager',
i18nKey: 'route.system_manager',
icon: 'system:config'
}
}
]

View File

@ -1058,6 +1058,7 @@ declare namespace Api {
Pick<
Api.Job.Job,
| 'groupName'
| 'groupNameCn'
| 'jobName'
| 'ownerId'
| 'argsStr'

View File

@ -116,7 +116,9 @@ async function handleSubmit() {
initScene,
groupPartition
});
if (error) return;
if (error) {
throw error;
};
window.$message?.success($t('common.addSuccess'));
} else {
@ -212,7 +214,6 @@ 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">

View File

@ -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.groupName" :placeholder="$t('page.groupConfig.form.groupName')" clearable />
<NInput v-model:value="model.groupNameCn" :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

View File

@ -618,6 +618,17 @@ 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="编码格式">

View File

@ -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.groupName" clearable />
<SelectGroup v-model:value="model.groupNameCn" 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 />