groupName中文名++
This commit is contained in:
parent
e998d44266
commit
1d740bb143
@ -1,3 +1,5 @@
|
|||||||
|
import {$t} from "@/locales";
|
||||||
|
|
||||||
const local: App.I18n.Schema = {
|
const local: App.I18n.Schema = {
|
||||||
system: {
|
system: {
|
||||||
title: 'Task Flux',
|
title: 'Task Flux',
|
||||||
@ -521,9 +523,9 @@ const local: App.I18n.Schema = {
|
|||||||
title: '在线机器',
|
title: '在线机器',
|
||||||
nodeType: '类型',
|
nodeType: '类型',
|
||||||
groupName: '组名称',
|
groupName: '组名称',
|
||||||
hostId: 'Pod ID',
|
hostId: '机器 ID',
|
||||||
hostIp: 'IP',
|
hostIp: 'IP地址',
|
||||||
hostPort: 'Port',
|
hostPort: '端口',
|
||||||
consumerBuckets: '路径/组',
|
consumerBuckets: '路径/组',
|
||||||
updateDt: '更新时间',
|
updateDt: '更新时间',
|
||||||
contextPath: '路径/组',
|
contextPath: '路径/组',
|
||||||
@ -538,7 +540,7 @@ const local: App.I18n.Schema = {
|
|||||||
namespace: {
|
namespace: {
|
||||||
title: '命名空间',
|
title: '命名空间',
|
||||||
name: '名称',
|
name: '名称',
|
||||||
keyword: '空间名称/唯一标识',
|
keyword: '名称/标识',
|
||||||
uniqueId: '唯一标识(默认UUID)',
|
uniqueId: '唯一标识(默认UUID)',
|
||||||
form: {
|
form: {
|
||||||
name: '请输入空间名称',
|
name: '请输入空间名称',
|
||||||
@ -554,6 +556,7 @@ const local: App.I18n.Schema = {
|
|||||||
detail: '组详情',
|
detail: '组详情',
|
||||||
namespaceId: '命名空间ID',
|
namespaceId: '命名空间ID',
|
||||||
groupName: '组名称',
|
groupName: '组名称',
|
||||||
|
groupNameCn: '中文组名称',
|
||||||
token: 'Token',
|
token: 'Token',
|
||||||
groupStatus: '状态',
|
groupStatus: '状态',
|
||||||
idGeneratorMode: 'ID生成模式',
|
idGeneratorMode: 'ID生成模式',
|
||||||
@ -567,6 +570,7 @@ const local: App.I18n.Schema = {
|
|||||||
retryConfig: '重试配置',
|
retryConfig: '重试配置',
|
||||||
form: {
|
form: {
|
||||||
groupName: '请输入组名称',
|
groupName: '请输入组名称',
|
||||||
|
groupNameCn: '请输入中文组名称',
|
||||||
token: 'Token',
|
token: 'Token',
|
||||||
groupStatus: '状态',
|
groupStatus: '状态',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
|
3
src/typings/api.d.ts
vendored
3
src/typings/api.d.ts
vendored
@ -389,6 +389,8 @@ declare namespace Api {
|
|||||||
namespaceName?: string;
|
namespaceName?: string;
|
||||||
/** 组名 */
|
/** 组名 */
|
||||||
groupName: string;
|
groupName: string;
|
||||||
|
/** 中文组名 */
|
||||||
|
groupNameCn: string;
|
||||||
/** 组描述 */
|
/** 组描述 */
|
||||||
description: string;
|
description: string;
|
||||||
/** token */
|
/** token */
|
||||||
@ -420,6 +422,7 @@ declare namespace Api {
|
|||||||
|
|
||||||
type GroupConfigRequestVO = {
|
type GroupConfigRequestVO = {
|
||||||
groupName: string;
|
groupName: string;
|
||||||
|
groupNameCn: string;
|
||||||
groupStatus: GroupStatusType;
|
groupStatus: GroupStatusType;
|
||||||
token?: string;
|
token?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
2
src/typings/app.d.ts
vendored
2
src/typings/app.d.ts
vendored
@ -776,6 +776,7 @@ declare namespace App {
|
|||||||
detail: string;
|
detail: string;
|
||||||
namespaceId: string;
|
namespaceId: string;
|
||||||
groupName: string;
|
groupName: string;
|
||||||
|
groupNameCn: string;
|
||||||
description: string;
|
description: string;
|
||||||
token: string;
|
token: string;
|
||||||
groupStatus: string;
|
groupStatus: string;
|
||||||
@ -789,6 +790,7 @@ declare namespace App {
|
|||||||
retryConfig: string;
|
retryConfig: string;
|
||||||
form: {
|
form: {
|
||||||
groupName: string;
|
groupName: string;
|
||||||
|
groupNameCn: string;
|
||||||
token: string;
|
token: string;
|
||||||
groupStatus: string;
|
groupStatus: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
@ -55,6 +55,13 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'groupNameCn',
|
||||||
|
title: $t('page.groupConfig.groupNameCn'),
|
||||||
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
|
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'groupStatus',
|
key: 'groupStatus',
|
||||||
title: $t('page.groupConfig.groupStatus'),
|
title: $t('page.groupConfig.groupStatus'),
|
||||||
|
@ -50,6 +50,9 @@ async function handleCopy(source?: string) {
|
|||||||
<NDescriptionsItem :label="$t('page.groupConfig.groupName')" :span="1">
|
<NDescriptionsItem :label="$t('page.groupConfig.groupName')" :span="1">
|
||||||
{{ rowData?.groupName }}
|
{{ rowData?.groupName }}
|
||||||
</NDescriptionsItem>
|
</NDescriptionsItem>
|
||||||
|
<NDescriptionsItem :label="$t('page.groupConfig.groupNameCn')" :span="1">
|
||||||
|
{{ rowData?.groupNameCn }}
|
||||||
|
</NDescriptionsItem>
|
||||||
|
|
||||||
<NDescriptionsItem :span="1">
|
<NDescriptionsItem :span="1">
|
||||||
<template #label>
|
<template #label>
|
||||||
|
@ -45,7 +45,7 @@ const partitionList = ref<string[]>([]);
|
|||||||
|
|
||||||
type Model = Pick<
|
type Model = Pick<
|
||||||
Api.GroupConfig.GroupConfig,
|
Api.GroupConfig.GroupConfig,
|
||||||
'id' | 'groupName' | 'token' | 'groupStatus' | 'description' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
'id' | 'groupName' | 'groupNameCn' | 'token' | 'groupStatus' | 'description' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
const model: Model = reactive(createDefaultModel());
|
const model: Model = reactive(createDefaultModel());
|
||||||
@ -53,6 +53,7 @@ const model: Model = reactive(createDefaultModel());
|
|||||||
function createDefaultModel(): Model {
|
function createDefaultModel(): Model {
|
||||||
return {
|
return {
|
||||||
groupName: '',
|
groupName: '',
|
||||||
|
groupNameCn: '',
|
||||||
token: import.meta.env.VITE_APP_DEFAULT_TOKEN || '',
|
token: import.meta.env.VITE_APP_DEFAULT_TOKEN || '',
|
||||||
groupStatus: 1,
|
groupStatus: 1,
|
||||||
description: '',
|
description: '',
|
||||||
@ -64,7 +65,7 @@ function createDefaultModel(): Model {
|
|||||||
|
|
||||||
type RuleKey = Extract<
|
type RuleKey = Extract<
|
||||||
keyof Model,
|
keyof Model,
|
||||||
'groupName' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
'groupName' | 'groupNameCn' | 'token' | 'groupStatus' | 'idGeneratorMode' | 'initScene' | 'groupPartition'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
@ -76,6 +77,8 @@ const rules = {
|
|||||||
message: $t('page.groupConfig.form.groupNameRule')
|
message: $t('page.groupConfig.form.groupNameRule')
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
groupNameCn: [defaultRequiredRule],
|
||||||
|
|
||||||
token: [defaultRequiredRule],
|
token: [defaultRequiredRule],
|
||||||
groupStatus: [defaultRequiredRule],
|
groupStatus: [defaultRequiredRule],
|
||||||
idGeneratorMode: [defaultRequiredRule],
|
idGeneratorMode: [defaultRequiredRule],
|
||||||
@ -102,9 +105,10 @@ async function handleSubmit() {
|
|||||||
await validate();
|
await validate();
|
||||||
// request
|
// request
|
||||||
if (props.operateType === 'add') {
|
if (props.operateType === 'add') {
|
||||||
const { groupName, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
|
const { groupName, groupNameCn, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
|
||||||
const { error } = await fetchAddGroupConfig({
|
const { error } = await fetchAddGroupConfig({
|
||||||
groupName,
|
groupName,
|
||||||
|
groupNameCn,
|
||||||
token,
|
token,
|
||||||
groupStatus,
|
groupStatus,
|
||||||
description,
|
description,
|
||||||
@ -115,9 +119,11 @@ async function handleSubmit() {
|
|||||||
if (error) return;
|
if (error) return;
|
||||||
window.$message?.success($t('common.addSuccess'));
|
window.$message?.success($t('common.addSuccess'));
|
||||||
} else {
|
} else {
|
||||||
const { groupName, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
|
|
||||||
|
const { groupName, groupNameCn, token, groupStatus, description, idGeneratorMode, initScene, groupPartition } = model;
|
||||||
const { error } = await fetchEditGroupConfig({
|
const { error } = await fetchEditGroupConfig({
|
||||||
groupName,
|
groupName,
|
||||||
|
groupNameCn,
|
||||||
token,
|
token,
|
||||||
groupStatus,
|
groupStatus,
|
||||||
description,
|
description,
|
||||||
@ -200,6 +206,15 @@ async function handleCopy(source: string) {
|
|||||||
:disabled="props.operateType === 'edit'"
|
:disabled="props.operateType === 'edit'"
|
||||||
/>
|
/>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
|
<NFormItem :label="$t('page.groupConfig.groupNameCn')" path="groupNameCn">
|
||||||
|
<NInput
|
||||||
|
v-model:value="model.groupNameCn"
|
||||||
|
:maxlength="64"
|
||||||
|
show-count
|
||||||
|
:placeholder="$t('page.groupConfig.form.groupNameCn')"
|
||||||
|
:disabled="props.operateType === 'edit'"
|
||||||
|
/>
|
||||||
|
</NFormItem>
|
||||||
<NFormItem :label="$t('page.groupConfig.groupStatus')" path="groupStatus">
|
<NFormItem :label="$t('page.groupConfig.groupStatus')" path="groupStatus">
|
||||||
<NRadioGroup v-model:value="model.groupStatus" name="groupStatus">
|
<NRadioGroup v-model:value="model.groupStatus" name="groupStatus">
|
||||||
<NSpace>
|
<NSpace>
|
||||||
|
Loading…
Reference in New Issue
Block a user