feat(sj_1.0.0_beta3): 1、修复空间唯一ID格式未校验问题 2、修复普通用户不支持删除问题
This commit is contained in:
parent
e3bf4f9b2a
commit
17e7278051
@ -502,7 +502,9 @@ const local: App.I18n.Schema = {
|
||||
form: {
|
||||
name: 'Please enter name',
|
||||
keyword: 'Please enter name/uniqueId',
|
||||
uniqueId: 'Please enter Unique ID'
|
||||
uniqueId: 'Please enter Unique ID',
|
||||
uniqueIdRule:
|
||||
'Must be between 1 and 64 characters in length. Format: numbers, letters, underscores, or hyphens.'
|
||||
},
|
||||
addNamespace: 'Add Namespace',
|
||||
editNamespace: 'Edit Namespace'
|
||||
|
@ -510,7 +510,8 @@ const local: App.I18n.Schema = {
|
||||
form: {
|
||||
name: '请输入空间名称',
|
||||
keyword: '请输入空间名称/唯一标识',
|
||||
uniqueId: '请输入唯一标识'
|
||||
uniqueId: '请输入唯一标识',
|
||||
uniqueIdRule: '仅支持长度为:1~64位字符.格式为:数字、字母、下划线、短横线。'
|
||||
},
|
||||
addNamespace: '新增命名空间',
|
||||
editNamespace: '编辑命名空间'
|
||||
|
1
src/typings/app.d.ts
vendored
1
src/typings/app.d.ts
vendored
@ -649,6 +649,7 @@ declare namespace App {
|
||||
name: string;
|
||||
keyword: string;
|
||||
uniqueId: string;
|
||||
uniqueIdRule: string;
|
||||
};
|
||||
addNamespace: string;
|
||||
editNamespace: string;
|
||||
|
@ -27,7 +27,8 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
apiParams: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
groupName: null
|
||||
groupName: null,
|
||||
groupStatus: null
|
||||
},
|
||||
columns: () => [
|
||||
{
|
||||
|
@ -35,6 +35,7 @@ function search() {
|
||||
v-model:value="model.groupStatus"
|
||||
:placeholder="$t('page.groupConfig.form.groupStatus')"
|
||||
:options="translateOptions(groupConfigStatusOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItemGi>
|
||||
</SearchForm>
|
||||
|
@ -14,15 +14,15 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
apiParams: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
keyword: undefined
|
||||
keyword: null
|
||||
},
|
||||
columns: () => [
|
||||
{
|
||||
key: 'index',
|
||||
title: $t('common.index'),
|
||||
align: 'center',
|
||||
width: 64
|
||||
},
|
||||
// {
|
||||
// key: 'index',
|
||||
// title: $t('common.index'),
|
||||
// align: 'center',
|
||||
// width: 64
|
||||
// },
|
||||
{
|
||||
key: 'name',
|
||||
title: $t('page.namespace.name'),
|
||||
|
@ -49,10 +49,16 @@ function createDefaultModel(): Model {
|
||||
};
|
||||
}
|
||||
|
||||
type RuleKey = Extract<keyof Model, 'name'>;
|
||||
type RuleKey = Extract<keyof Model, App.Global.FormRule>;
|
||||
|
||||
const rules: Record<RuleKey, App.Global.FormRule> = {
|
||||
name: defaultRequiredRule
|
||||
name: defaultRequiredRule,
|
||||
uniqueId: {
|
||||
required: false,
|
||||
pattern: /^[A-Za-z0-9_-]{1,64}$/,
|
||||
trigger: 'change',
|
||||
message: $t('page.namespace.form.uniqueIdRule')
|
||||
}
|
||||
};
|
||||
|
||||
function handleUpdateModelWhenEdit() {
|
||||
|
@ -39,6 +39,7 @@ function search() {
|
||||
v-model:value="model.sceneStatus"
|
||||
:placeholder="$t('page.jobTask.form.jobStatus')"
|
||||
:options="translateOptions(enableStatusNumberOptions)"
|
||||
clearable
|
||||
/>
|
||||
</NFormItemGi>
|
||||
</SearchForm>
|
||||
|
@ -110,7 +110,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
<NButton type="primary" ghost size="small" text onClick={() => edit(row.id!)}>
|
||||
{$t('common.edit')}
|
||||
</NButton>
|
||||
{row.id === '1' ? (
|
||||
{(row.id as any) !== 1 ? (
|
||||
<>
|
||||
<n-divider vertical />
|
||||
<NPopconfirm onPositiveClick={() => handleDelete(row.id!)}>
|
||||
|
Loading…
Reference in New Issue
Block a user