🔨 添加描述字段.
This commit is contained in:
@@ -12,6 +12,7 @@ export interface HostIdentityCreateRequest {
|
||||
username?: string;
|
||||
password?: string;
|
||||
keyId?: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,6 +33,7 @@ export interface HostIdentityQueryRequest extends Pagination {
|
||||
type?: string;
|
||||
username?: string;
|
||||
keyId?: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,6 +46,7 @@ export interface HostIdentityQueryResponse extends TableData {
|
||||
username: string;
|
||||
password: string;
|
||||
keyId: number;
|
||||
description: string;
|
||||
createTime: number;
|
||||
updateTime: number;
|
||||
creator: string;
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface HostKeyCreateRequest {
|
||||
publicKey?: string;
|
||||
privateKey?: string;
|
||||
password?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,6 +31,7 @@ export interface HostKeyQueryRequest extends Pagination {
|
||||
name?: string;
|
||||
publicKey?: string;
|
||||
privateKey?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,8 +43,11 @@ export interface HostKeyQueryResponse extends TableData {
|
||||
publicKey: string;
|
||||
privateKey: string;
|
||||
password: string;
|
||||
description: string;
|
||||
createTime: number;
|
||||
updateTime: number;
|
||||
creator: string;
|
||||
updater: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { SelectOptionData } from '@arco-design/web-vue';
|
||||
import type { DataGrid, Pagination } from '@/types/global';
|
||||
import type { TableData } from '@arco-design/web-vue/es/table/interface';
|
||||
import axios from 'axios';
|
||||
@@ -19,6 +18,7 @@ export interface HostCreateRequest {
|
||||
port?: number;
|
||||
tags?: Array<number>;
|
||||
groupIdList?: Array<number>;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,6 +58,7 @@ export interface HostQueryRequest extends Pagination {
|
||||
status?: string;
|
||||
tags?: Array<number>;
|
||||
queryTag?: boolean;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,6 +82,7 @@ export interface HostQueryResponse extends TableData, HostQueryResponseExtra {
|
||||
color: string;
|
||||
tags: Array<{ id: number, name: string }>;
|
||||
groupIdList: Array<number>;
|
||||
description: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -101,7 +101,9 @@ export function getTerminalConnectLogCount(request: TerminalConnectLogQueryReque
|
||||
* 清空终端连接日志
|
||||
*/
|
||||
export function clearTerminalConnectLog(request: TerminalConnectLogClearRequest) {
|
||||
return axios.post<number>('/asset/terminal-connect-log/clear', request);
|
||||
return axios.post<number>('/asset/terminal-connect-log/clear', request, {
|
||||
timeout: 60000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -90,7 +90,9 @@ export function getExecCommandLogCount(request: ExecLogQueryRequest) {
|
||||
* 清空批量执行日志
|
||||
*/
|
||||
export function clearExecCommandLog(request: ExecLogClearRequest) {
|
||||
return axios.post<number>('/asset/exec-command-log/clear', request);
|
||||
return axios.post<number>('/asset/exec-command-log/clear', request, {
|
||||
timeout: 60000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -83,7 +83,9 @@ export function getExecJobLogCount(request: ExecLogQueryRequest) {
|
||||
* 清空计划任务日志
|
||||
*/
|
||||
export function clearExecJobLog(request: ExecLogClearRequest) {
|
||||
return axios.post<number>('/asset/exec-job-log/clear', request);
|
||||
return axios.post<number>('/asset/exec-job-log/clear', request, {
|
||||
timeout: 60000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -185,5 +185,7 @@ export function getUploadTaskCount(request: UploadTaskQueryRequest) {
|
||||
* 清空查询批量上传任务
|
||||
*/
|
||||
export function clearUploadTask(request: UploadTaskClearRequest) {
|
||||
return axios.post<number>('/asset/upload-task/clear', request);
|
||||
return axios.post<number>('/asset/upload-task/clear', request, {
|
||||
timeout: 60000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -77,5 +77,7 @@ export function getOperatorLogCount(request: OperatorLogQueryRequest) {
|
||||
* 清空操作日志
|
||||
*/
|
||||
export function clearOperatorLog(request: OperatorLogClearRequest) {
|
||||
return axios.post<number>('/infra/operator-log/clear', request);
|
||||
return axios.post<number>('/infra/operator-log/clear', request, {
|
||||
timeout: 60000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface RoleCreateRequest {
|
||||
name?: string;
|
||||
code?: string;
|
||||
status?: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,6 +35,7 @@ export interface RoleQueryRequest extends Pagination {
|
||||
name?: string;
|
||||
code?: string;
|
||||
status?: number;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,6 +46,7 @@ export interface RoleQueryResponse extends TableData {
|
||||
name: string;
|
||||
code: string;
|
||||
status: number;
|
||||
description: string;
|
||||
createTime: number;
|
||||
updateTime: number;
|
||||
creator: string;
|
||||
|
||||
@@ -14,6 +14,7 @@ export interface UserCreateRequest {
|
||||
avatar?: string;
|
||||
mobile?: string;
|
||||
email?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -23,7 +24,6 @@ export interface UserUpdateRequest extends UserCreateRequest {
|
||||
id?: number;
|
||||
status?: number;
|
||||
roleIdList?: Array<number>;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,6 +39,7 @@ export interface UserQueryRequest extends Pagination {
|
||||
email?: string;
|
||||
status?: number;
|
||||
lastLoginTime?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,6 +54,7 @@ export interface UserQueryResponse extends TableData {
|
||||
email: string;
|
||||
status: number;
|
||||
lastLoginTime?: number;
|
||||
description: string;
|
||||
createTime: number;
|
||||
updateTime: number;
|
||||
creator: string;
|
||||
|
||||
@@ -46,6 +46,12 @@ export const hostKeyColumns = [
|
||||
slotName: 'name',
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
}, {
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
@@ -55,15 +61,6 @@ export const hostKeyColumns = [
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.createTime));
|
||||
},
|
||||
}, {
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
slotName: 'updateTime',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.updateTime));
|
||||
},
|
||||
},
|
||||
] as TableColumnData[];
|
||||
|
||||
@@ -98,13 +95,19 @@ export const hostIdentityColumns = [
|
||||
dataIndex: 'keyId',
|
||||
slotName: 'keyId',
|
||||
}, {
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
slotName: 'updateTime',
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
slotName: 'createTime',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.updateTime));
|
||||
return dateFormat(new Date(record.createTime));
|
||||
},
|
||||
},
|
||||
] as TableColumnData[];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- 角色授权 -->
|
||||
<a-button v-permission="['asset:host-identity:grant']"
|
||||
class="card-header-button"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_ROLE }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_ROLE }})">
|
||||
角色授权
|
||||
<template #icon>
|
||||
<icon-user-group />
|
||||
@@ -27,7 +27,7 @@
|
||||
<!-- 用户授权 -->
|
||||
<a-button v-permission="['asset:host-identity:grant']"
|
||||
class="card-header-button"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_USER }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_USER }})">
|
||||
用户授权
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
@@ -52,7 +52,9 @@
|
||||
</a-form-item>
|
||||
<!-- 名称 -->
|
||||
<a-form-item field="name" label="名称">
|
||||
<a-input v-model="formModel.name" placeholder="请输入名称" allow-clear />
|
||||
<a-input v-model="formModel.name"
|
||||
placeholder="请输入名称"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 类型 -->
|
||||
<a-form-item field="type" label="类型">
|
||||
@@ -63,12 +65,20 @@
|
||||
</a-form-item>
|
||||
<!-- 用户名 -->
|
||||
<a-form-item field="username" label="用户名">
|
||||
<a-input v-model="formModel.username" placeholder="请输入用户名" allow-clear />
|
||||
<a-input v-model="formModel.username"
|
||||
placeholder="请输入用户名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 密钥 -->
|
||||
<a-form-item field="keyId" label="密钥">
|
||||
<host-key-selector v-model="formModel.keyId" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 描述 -->
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</template>
|
||||
<!-- 标题 -->
|
||||
@@ -110,6 +120,12 @@
|
||||
<span>-</span>
|
||||
</template>
|
||||
</template>
|
||||
<!-- 描述 -->
|
||||
<template #description="{ record }">
|
||||
<span :title="record.description">
|
||||
{{ record.description || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
<!-- 拓展操作 -->
|
||||
<template #extra="{ record }">
|
||||
<a-space>
|
||||
@@ -154,6 +170,7 @@
|
||||
import fieldConfig from '../types/card.fields';
|
||||
import { deleteHostIdentity, getHostIdentityPage } from '@/api/asset/host-identity';
|
||||
import { Message, Modal } from '@arco-design/web-vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import usePermission from '@/hooks/permission';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
@@ -165,6 +182,7 @@
|
||||
|
||||
const list = ref<HostIdentityQueryResponse[]>([]);
|
||||
|
||||
const router = useRouter();
|
||||
const cacheStore = useCacheStore();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
:rules="formRules">
|
||||
<!-- 名称 -->
|
||||
<a-form-item field="name" label="名称">
|
||||
<a-input v-model="formModel.name" placeholder="请输入名称" />
|
||||
<a-input v-model="formModel.name"
|
||||
placeholder="请输入名称"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 类型 -->
|
||||
<a-form-item field="type" label="类型">
|
||||
@@ -31,7 +33,9 @@
|
||||
</a-form-item>
|
||||
<!-- 用户名 -->
|
||||
<a-form-item field="username" label="用户名">
|
||||
<a-input v-model="formModel.username" placeholder="请输入用户名" />
|
||||
<a-input v-model="formModel.username"
|
||||
placeholder="请输入用户名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 用户密码 -->
|
||||
<a-form-item v-if="formModel.type === IdentityType.PASSWORD"
|
||||
@@ -56,6 +60,12 @@
|
||||
:hide-asterisk="true">
|
||||
<host-key-selector v-model="formModel.keyId" />
|
||||
</a-form-item>
|
||||
<!-- 描述 -->
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-textarea v-model="formModel.description"
|
||||
placeholder="请输入描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
@@ -97,6 +107,7 @@
|
||||
password: undefined,
|
||||
useNewPassword: false,
|
||||
keyId: undefined,
|
||||
description: undefined,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -146,7 +157,7 @@
|
||||
const handlerOk = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
// 验证参数
|
||||
// 认证参数
|
||||
const error = await formRef.value.validate();
|
||||
if (error) {
|
||||
return false;
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
</a-form-item>
|
||||
<!-- 名称 -->
|
||||
<a-form-item field="name" label="名称">
|
||||
<a-input v-model="formModel.name" placeholder="请输入名称" allow-clear />
|
||||
<a-input v-model="formModel.name"
|
||||
placeholder="请输入名称"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 类型 -->
|
||||
<a-form-item field="type" label="类型">
|
||||
@@ -26,12 +28,20 @@
|
||||
</a-form-item>
|
||||
<!-- 用户名 -->
|
||||
<a-form-item field="username" label="用户名">
|
||||
<a-input v-model="formModel.username" placeholder="请输入用户名" allow-clear />
|
||||
<a-input v-model="formModel.username"
|
||||
placeholder="请输入用户名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 主机密钥 -->
|
||||
<a-form-item field="keyId" label="主机密钥">
|
||||
<host-key-selector v-model="formModel.keyId" allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 描述 -->
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</query-header>
|
||||
</a-card>
|
||||
<!-- 表格 -->
|
||||
@@ -50,7 +60,7 @@
|
||||
<!-- 角色授权 -->
|
||||
<a-button type="primary"
|
||||
v-permission="['asset:host-identity:grant']"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_ROLE }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_ROLE }})">
|
||||
角色授权
|
||||
<template #icon>
|
||||
<icon-user-group />
|
||||
@@ -59,7 +69,7 @@
|
||||
<!-- 用户授权 -->
|
||||
<a-button type="primary"
|
||||
v-permission="['asset:host-identity:grant']"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_USER }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_IDENTITY_USER }})">
|
||||
用户授权
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
@@ -186,10 +196,12 @@
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||
import { IdentityType, identityTypeKey } from '../types/const';
|
||||
import { useRouter } from 'vue-router';
|
||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
||||
|
||||
const router = useRouter();
|
||||
const cacheStore = useCacheStore();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
@@ -197,24 +209,23 @@
|
||||
const { loading, setLoading } = useLoading();
|
||||
const { hasAnyPermission } = usePermission();
|
||||
|
||||
const selectedKeys = ref<number[]>([]);
|
||||
const tableRenderData = ref<HostIdentityQueryResponse[]>([]);
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
const tableRenderData = ref<Array<HostIdentityQueryResponse>>([]);
|
||||
const formModel = reactive<HostIdentityQueryRequest>({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
username: undefined,
|
||||
keyId: undefined,
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
// 删除当前行
|
||||
const deleteRow = async ({ id }: {
|
||||
id: number
|
||||
}) => {
|
||||
const deleteRow = async (record: HostIdentityQueryResponse) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
// 调用删除接口
|
||||
await deleteHostIdentity(id);
|
||||
await deleteHostIdentity(record.id);
|
||||
Message.success('删除成功');
|
||||
// 重新加载
|
||||
reload();
|
||||
|
||||
@@ -25,11 +25,16 @@ const fieldConfig = {
|
||||
slotName: 'keyId',
|
||||
height: '24px',
|
||||
}, {
|
||||
label: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
slotName: 'updateTime',
|
||||
label: '描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
ellipsis: true,
|
||||
}, {
|
||||
label: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
slotName: 'createTime',
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.updateTime));
|
||||
return dateFormat(new Date(record.createTime));
|
||||
},
|
||||
}
|
||||
] as CardField[]
|
||||
|
||||
@@ -26,9 +26,15 @@ export const username = [{
|
||||
message: '用户名长度不能大于128位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const description = [{
|
||||
maxLength: 255,
|
||||
message: '描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export default {
|
||||
name,
|
||||
type,
|
||||
keyId,
|
||||
username,
|
||||
description,
|
||||
} as Record<string, FieldRule | FieldRule[]>;
|
||||
|
||||
@@ -29,13 +29,20 @@ const columns = [
|
||||
dataIndex: 'keyId',
|
||||
slotName: 'keyId',
|
||||
}, {
|
||||
title: '修改时间',
|
||||
dataIndex: 'updateTime',
|
||||
slotName: 'updateTime',
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
minWidth: 128,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
slotName: 'createTime',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.updateTime));
|
||||
return dateFormat(new Date(record.createTime));
|
||||
},
|
||||
}, {
|
||||
title: '操作',
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- 角色授权 -->
|
||||
<a-button v-permission="['asset:host-key:grant']"
|
||||
class="card-header-button"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_ROLE }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_ROLE }})">
|
||||
角色授权
|
||||
<template #icon>
|
||||
<icon-user-group />
|
||||
@@ -27,7 +27,7 @@
|
||||
<!-- 用户授权 -->
|
||||
<a-button v-permission="['asset:host-key:grant']"
|
||||
class="card-header-button"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_USER }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_USER }})">
|
||||
用户授权
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
@@ -38,6 +38,12 @@
|
||||
<template #title="{ record }">
|
||||
{{ record.name }}
|
||||
</template>
|
||||
<!-- 描述 -->
|
||||
<template #description="{ record }">
|
||||
<span :title="record.description">
|
||||
{{ record.description || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
<!-- 拓展操作 -->
|
||||
<template #extra="{ record }">
|
||||
<a-space>
|
||||
@@ -85,6 +91,7 @@
|
||||
import { useCardPagination, useCardColLayout } from '@/hooks/card';
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { resetObject } from '@/utils';
|
||||
import fieldConfig from '../types/card.fields';
|
||||
@@ -94,13 +101,13 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||
|
||||
const list = ref<HostKeyQueryResponse[]>([]);
|
||||
|
||||
const router = useRouter();
|
||||
const cacheStore = useCacheStore();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
const list = ref<HostKeyQueryResponse[]>([]);
|
||||
const formModel = reactive<HostKeyQueryRequest>({
|
||||
searchValue: undefined,
|
||||
});
|
||||
|
||||
@@ -72,6 +72,12 @@
|
||||
checked-text="使用新密码"
|
||||
unchecked-text="使用原密码" />
|
||||
</a-form-item>
|
||||
<!-- 描述 -->
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-textarea v-model="formModel.description"
|
||||
placeholder="请输入描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-drawer>
|
||||
@@ -109,7 +115,8 @@
|
||||
publicKey: undefined,
|
||||
privateKey: undefined,
|
||||
password: undefined,
|
||||
useNewPassword: false
|
||||
description: undefined,
|
||||
useNewPassword: false,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,15 @@
|
||||
</a-form-item>
|
||||
<!-- 名称 -->
|
||||
<a-form-item field="name" label="名称">
|
||||
<a-input v-model="formModel.name" placeholder="请输入名称" allow-clear />
|
||||
<a-input v-model="formModel.name"
|
||||
placeholder="请输入名称"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 描述 -->
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</query-header>
|
||||
</a-card>
|
||||
@@ -35,7 +43,7 @@
|
||||
<!-- 角色授权 -->
|
||||
<a-button type="primary"
|
||||
v-permission="['asset:host-key:grant']"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_ROLE }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_ROLE }})">
|
||||
角色授权
|
||||
<template #icon>
|
||||
<icon-user-group />
|
||||
@@ -44,7 +52,7 @@
|
||||
<!-- 用户授权 -->
|
||||
<a-button type="primary"
|
||||
v-permission="['asset:host-key:grant']"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_USER }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_KEY_USER }})">
|
||||
用户授权
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
@@ -136,6 +144,7 @@
|
||||
import { deleteHostKey, batchDeleteHostKey, getHostKeyPage } from '@/api/asset/host-key';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { useCacheStore } from '@/store';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { useTablePagination, useRowSelection } from '@/hooks/table';
|
||||
@@ -143,18 +152,20 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openView']);
|
||||
|
||||
const router = useRouter();
|
||||
const cacheStore = useCacheStore();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
const selectedKeys = ref<number[]>([]);
|
||||
const tableRenderData = ref<HostKeyQueryResponse[]>([]);
|
||||
const selectedKeys = ref<Array<number>>([]);
|
||||
const tableRenderData = ref<Array<HostKeyQueryResponse>>([]);
|
||||
const formModel = reactive<HostKeyQueryRequest>({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
publicKey: undefined,
|
||||
privateKey: undefined,
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
// 删除当前行
|
||||
|
||||
@@ -10,6 +10,11 @@ const fieldConfig = {
|
||||
label: 'id',
|
||||
dataIndex: 'id',
|
||||
slotName: 'id',
|
||||
}, {
|
||||
label: '描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
ellipsis: true,
|
||||
}, {
|
||||
label: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
|
||||
@@ -13,7 +13,13 @@ export const privateKey = [{
|
||||
message: '请输入私钥文本'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const description = [{
|
||||
maxLength: 255,
|
||||
message: '描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export default {
|
||||
name,
|
||||
privateKey,
|
||||
description,
|
||||
} as Record<string, FieldRule | FieldRule[]>;
|
||||
|
||||
@@ -15,6 +15,13 @@ const columns = [
|
||||
slotName: 'name',
|
||||
ellipsis: true,
|
||||
tooltip: true
|
||||
}, {
|
||||
title: '描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
minWidth: 128,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<!-- 角色授权 -->
|
||||
<a-button v-permission="['asset:host-group:grant']"
|
||||
class="card-header-button"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_ROLE }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_ROLE }})">
|
||||
角色授权
|
||||
<template #icon>
|
||||
<icon-user-group />
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- 用户授权 -->
|
||||
<a-button v-permission="['asset:host-group:grant']"
|
||||
class="card-header-button"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_USER }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_USER }})">
|
||||
用户授权
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
@@ -95,11 +95,17 @@
|
||||
<!-- 主机标签 -->
|
||||
<a-form-item field="tags" label="主机标签">
|
||||
<tag-multi-selector v-model="formModel.tags"
|
||||
:limit="0"
|
||||
type="HOST"
|
||||
:tagColor="tagColor"
|
||||
:limit="0"
|
||||
:tag-color="tagColor"
|
||||
placeholder="请选择主机标签" />
|
||||
</a-form-item>
|
||||
<!-- 描述 -->
|
||||
<a-form-item field="description" label="描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</template>
|
||||
<!-- 标题 -->
|
||||
@@ -117,6 +123,12 @@
|
||||
<template #code="{ record }">
|
||||
{{ record.code }}
|
||||
</template>
|
||||
<!-- 描述 -->
|
||||
<template #description="{ record }">
|
||||
<span :title="record.description">
|
||||
{{ record.description || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
<!-- 主机类型 -->
|
||||
<template #type="{ record }">
|
||||
<a-tag :color="getDictValue(hostTypeKey, record.type, 'color')">
|
||||
@@ -236,6 +248,7 @@
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import fieldConfig from '../types/card.fields';
|
||||
import { openNewRoute } from '@/router';
|
||||
@@ -243,6 +256,7 @@
|
||||
|
||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup', 'openCopy']);
|
||||
|
||||
const router = useRouter();
|
||||
const cacheStore = useCacheStore();
|
||||
const cardColLayout = useCardColLayout();
|
||||
const pagination = useCardPagination();
|
||||
@@ -261,7 +275,8 @@
|
||||
osType: undefined,
|
||||
status: undefined,
|
||||
tags: undefined,
|
||||
queryTag: true
|
||||
description: undefined,
|
||||
queryTag: true,
|
||||
});
|
||||
|
||||
// 条件数量
|
||||
|
||||
@@ -25,31 +25,40 @@
|
||||
help="主机创建后, 类型则无法修改">
|
||||
<a-select v-model="formModel.type"
|
||||
placeholder="请选择主机类型"
|
||||
:options="toOptions(hostTypeKey)" />
|
||||
:options="toOptions(hostTypeKey)"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 系统类型 -->
|
||||
<a-form-item field="osType" label="系统类型">
|
||||
<a-select v-model="formModel.osType"
|
||||
placeholder="请选择系统类型"
|
||||
:options="toOptions(hostOsTypeKey)" />
|
||||
:options="toOptions(hostOsTypeKey)"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 主机名称 -->
|
||||
<a-form-item field="name" label="主机名称">
|
||||
<a-input v-model="formModel.name" placeholder="请输入主机名称" />
|
||||
<a-input v-model="formModel.name"
|
||||
placeholder="请输入主机名称"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 主机编码 -->
|
||||
<a-form-item field="code" label="主机编码">
|
||||
<a-input v-model="formModel.code" placeholder="请输入主机编码 (定义主机唯一值)" />
|
||||
<a-input v-model="formModel.code"
|
||||
placeholder="请输入主机编码 (定义主机唯一值)"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 主机地址 -->
|
||||
<a-form-item field="address" label="主机地址">
|
||||
<a-input v-model="formModel.address" placeholder="请输入主机地址" />
|
||||
<a-input v-model="formModel.address"
|
||||
placeholder="请输入主机地址"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 主机端口 -->
|
||||
<a-form-item field="port" label="主机端口">
|
||||
<a-input-number v-model="formModel.port"
|
||||
placeholder="请输入主机端口"
|
||||
hide-button />
|
||||
hide-button
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 主机分组 -->
|
||||
<a-form-item field="groupIdList" label="主机分组">
|
||||
@@ -59,13 +68,19 @@
|
||||
<!-- 主机标签 -->
|
||||
<a-form-item field="tags" label="主机标签">
|
||||
<tag-multi-selector v-model="formModel.tags"
|
||||
:allowCreate="true"
|
||||
:limit="5"
|
||||
type="HOST"
|
||||
:tagColor="tagColor"
|
||||
:limit="5"
|
||||
:tag-color="tagColor"
|
||||
:allow-create="true"
|
||||
placeholder="请选择主机标签"
|
||||
@on-limited="onLimitedTag" />
|
||||
</a-form-item>
|
||||
<!-- 主机描述 -->
|
||||
<a-form-item field="description" label="主机描述">
|
||||
<a-textarea v-model="formModel.description"
|
||||
placeholder="请输入主机描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
@@ -109,6 +124,7 @@
|
||||
port: HostType.SSH.port,
|
||||
tags: undefined,
|
||||
groupIdList: undefined,
|
||||
description: undefined,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -149,7 +165,7 @@
|
||||
setLoading(true);
|
||||
const { data } = await getHost(id);
|
||||
const detail = Object.assign({} as Record<string, any>,
|
||||
pick(data, 'id', 'type', 'osType', 'name', 'code', 'address', 'port', 'status', 'groupIdList'));
|
||||
pick(data, 'id', 'type', 'osType', 'name', 'code', 'address', 'port', 'status', 'groupIdList', 'description'));
|
||||
// tag
|
||||
const tags = (data.tags || []).map(s => s.id);
|
||||
// 渲染
|
||||
|
||||
@@ -50,11 +50,17 @@
|
||||
<a-form-item field="tags" label="主机标签">
|
||||
<tag-multi-selector v-model="formModel.tags"
|
||||
ref="tagSelector"
|
||||
:limit="0"
|
||||
type="HOST"
|
||||
:tagColor="tagColor"
|
||||
:limit="0"
|
||||
:tag-color="tagColor"
|
||||
placeholder="请选择主机标签" />
|
||||
</a-form-item>
|
||||
<!-- 主机描述 -->
|
||||
<a-form-item field="description" label="主机描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入主机描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</query-header>
|
||||
</a-card>
|
||||
<!-- 表格 -->
|
||||
@@ -82,7 +88,7 @@
|
||||
<!-- 角色授权 -->
|
||||
<a-button type="primary"
|
||||
v-permission="['asset:host-group:grant']"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_ROLE }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_ROLE }})">
|
||||
角色授权
|
||||
<template #icon>
|
||||
<icon-user-group />
|
||||
@@ -91,7 +97,7 @@
|
||||
<!-- 用户授权 -->
|
||||
<a-button type="primary"
|
||||
v-permission="['asset:host-group:grant']"
|
||||
@click="$router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_USER }})">
|
||||
@click="router.push({ name: GrantRouteName, query: { key: GrantKey.HOST_GROUP_USER }})">
|
||||
用户授权
|
||||
<template #icon>
|
||||
<icon-user />
|
||||
@@ -272,6 +278,7 @@
|
||||
import { useCacheStore, useDictStore } from '@/store';
|
||||
import { copy } from '@/hooks/copy';
|
||||
import { dataColor } from '@/utils';
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||
@@ -280,6 +287,7 @@
|
||||
|
||||
const emits = defineEmits(['openCopy', 'openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
||||
|
||||
const router = useRouter();
|
||||
const cacheStore = useCacheStore();
|
||||
const pagination = useTablePagination();
|
||||
const rowSelection = useRowSelection();
|
||||
@@ -298,7 +306,8 @@
|
||||
osType: undefined,
|
||||
status: undefined,
|
||||
tags: undefined,
|
||||
queryTag: true
|
||||
description: undefined,
|
||||
queryTag: true,
|
||||
});
|
||||
|
||||
// 更新状态
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
const renderTable = computed(() => appStore.hostView === 'table');
|
||||
|
||||
// 重新加载
|
||||
// 添加回调
|
||||
const reload = () => {
|
||||
if (renderTable.value) {
|
||||
table.value.reload();
|
||||
|
||||
@@ -31,6 +31,11 @@ const fieldConfig = {
|
||||
dataIndex: 'tags',
|
||||
slotName: 'tags',
|
||||
rowAlign: 'start',
|
||||
}, {
|
||||
label: '主机描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
ellipsis: true,
|
||||
},
|
||||
] as CardField[]
|
||||
} as CardFieldConfig;
|
||||
|
||||
@@ -49,6 +49,11 @@ export const tags = [{
|
||||
message: '最多选择5个标签'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const description = [{
|
||||
maxLength: 255,
|
||||
message: '主机描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export default {
|
||||
type,
|
||||
osType,
|
||||
@@ -57,4 +62,5 @@ export default {
|
||||
address,
|
||||
port,
|
||||
tags,
|
||||
description,
|
||||
} as Record<string, FieldRule | FieldRule[]>;
|
||||
|
||||
@@ -44,6 +44,13 @@ const columns = [
|
||||
width: 88,
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
}, {
|
||||
title: '主机描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
minWidth: 128,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '操作',
|
||||
slotName: 'handle',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
|
||||
export const description = [{
|
||||
maxLength: 128,
|
||||
message: '描述长度不能大于128位'
|
||||
maxLength: 255,
|
||||
message: '描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const hostIdList = [{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { FieldRule } from '@arco-design/web-vue';
|
||||
|
||||
export const description = [{
|
||||
maxLength: 128,
|
||||
message: '执行描述长度不能大于128位'
|
||||
maxLength: 255,
|
||||
message: '执行描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const hostIdList = [{
|
||||
|
||||
@@ -20,8 +20,8 @@ export const description = [{
|
||||
required: true,
|
||||
message: '请输入配置描述'
|
||||
}, {
|
||||
maxLength: 64,
|
||||
message: '配置描述长度不能大于64位'
|
||||
maxLength: 255,
|
||||
message: '配置描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export default {
|
||||
|
||||
@@ -20,11 +20,22 @@
|
||||
:rules="formRules">
|
||||
<!-- 角色名称 -->
|
||||
<a-form-item field="name" label="角色名称">
|
||||
<a-input v-model="formModel.name" placeholder="请输入角色名称" />
|
||||
<a-input v-model="formModel.name"
|
||||
placeholder="请输入角色名称"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 角色编码 -->
|
||||
<a-form-item field="code" label="角色编码" v-if="isAddHandle">
|
||||
<a-input v-model="formModel.code" placeholder="请输入角色编码" />
|
||||
<a-form-item field="code" label="角色编码">
|
||||
<a-input v-model="formModel.code"
|
||||
:disabled="!isAddHandle"
|
||||
placeholder="请输入角色编码"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 角色描述 -->
|
||||
<a-form-item field="description" label="角色描述">
|
||||
<a-textarea v-model="formModel.description"
|
||||
placeholder="请输入角色描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
:options="toOptions(roleStatusKey)"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 角色描述 -->
|
||||
<a-form-item field="description" label="角色描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入角色描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</query-header>
|
||||
</a-card>
|
||||
<!-- 表格 -->
|
||||
@@ -77,7 +83,7 @@
|
||||
:unchecked-text="getDictValue(roleStatusKey, RoleStatus.DISABLED)"
|
||||
:checked-value="RoleStatus.ENABLED"
|
||||
:unchecked-value="RoleStatus.DISABLED"
|
||||
:before-change="(s: number) => updateStatus(record.id, s)" />
|
||||
:before-change="(s) => updateStatus(record.id, s as number)" />
|
||||
<!-- 无修改权限 -->
|
||||
<span v-else>
|
||||
<span class="circle" :style="{
|
||||
@@ -156,6 +162,7 @@
|
||||
name: undefined,
|
||||
code: undefined,
|
||||
status: undefined,
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
// 更新状态
|
||||
|
||||
@@ -16,7 +16,13 @@ export const code = [{
|
||||
message: '角色编码长度不能大于32位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const description = [{
|
||||
maxLength: 255,
|
||||
message: '角色描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export default {
|
||||
name,
|
||||
code,
|
||||
description,
|
||||
} as Record<string, FieldRule | FieldRule[]>;
|
||||
|
||||
@@ -21,6 +21,13 @@ const columns = [
|
||||
dataIndex: 'code',
|
||||
slotName: 'code',
|
||||
minWidth: 118,
|
||||
}, {
|
||||
title: '角色描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
minWidth: 128,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '角色状态',
|
||||
dataIndex: 'status',
|
||||
|
||||
@@ -20,25 +20,42 @@
|
||||
:rules="formRules">
|
||||
<!-- 用户名 -->
|
||||
<a-form-item field="username" label="用户名">
|
||||
<a-input v-model="formModel.username" :disabled="!isAddHandle" placeholder="请输入用户名" />
|
||||
<a-input v-model="formModel.username"
|
||||
:disabled="!isAddHandle"
|
||||
placeholder="请输入用户名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 花名 -->
|
||||
<a-form-item field="nickname" label="花名">
|
||||
<a-input v-model="formModel.nickname" placeholder="请输入花名" />
|
||||
<a-input v-model="formModel.nickname"
|
||||
placeholder="请输入花名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 密码 -->
|
||||
<a-form-item v-if="isAddHandle"
|
||||
field="password"
|
||||
label="密码">
|
||||
<a-input-password v-model="formModel.password" placeholder="请输入密码" />
|
||||
<a-input-password v-model="formModel.password"
|
||||
placeholder="请输入密码"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 手机号 -->
|
||||
<a-form-item field="mobile" label="手机号">
|
||||
<a-input v-model="formModel.mobile" placeholder="请输入手机号" />
|
||||
<a-input v-model="formModel.mobile"
|
||||
placeholder="请输入手机号"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 邮箱 -->
|
||||
<a-form-item field="email" label="邮箱">
|
||||
<a-input v-model="formModel.email" placeholder="请输入邮箱" />
|
||||
<a-input v-model="formModel.email"
|
||||
placeholder="请输入邮箱"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 用户描述 -->
|
||||
<a-form-item field="description" label="用户描述">
|
||||
<a-textarea v-model="formModel.description"
|
||||
placeholder="请输入用户描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
@@ -75,6 +92,7 @@
|
||||
nickname: undefined,
|
||||
mobile: undefined,
|
||||
email: undefined,
|
||||
description: undefined,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -15,11 +15,15 @@
|
||||
</a-form-item>
|
||||
<!-- 用户名 -->
|
||||
<a-form-item field="username" label="用户名">
|
||||
<a-input v-model="formModel.username" placeholder="请输入用户名" allow-clear />
|
||||
<a-input v-model="formModel.username"
|
||||
placeholder="请输入用户名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 花名 -->
|
||||
<a-form-item field="nickname" label="花名">
|
||||
<a-input v-model="formModel.nickname" placeholder="请输入花名" allow-clear />
|
||||
<a-input v-model="formModel.nickname"
|
||||
placeholder="请输入花名"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 用户状态 -->
|
||||
<a-form-item field="status" label="用户状态">
|
||||
@@ -30,11 +34,21 @@
|
||||
</a-form-item>
|
||||
<!-- 手机号 -->
|
||||
<a-form-item field="mobile" label="手机号">
|
||||
<a-input v-model="formModel.mobile" placeholder="请输入手机号" allow-clear />
|
||||
<a-input v-model="formModel.mobile"
|
||||
placeholder="请输入手机号"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 邮箱 -->
|
||||
<a-form-item field="email" label="邮箱">
|
||||
<a-input v-model="formModel.email" placeholder="请输入邮箱" allow-clear />
|
||||
<a-input v-model="formModel.email"
|
||||
placeholder="请输入邮箱"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
<!-- 用户描述 -->
|
||||
<a-form-item field="description" label="用户描述">
|
||||
<a-input v-model="formModel.description"
|
||||
placeholder="请输入用户描述"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</query-header>
|
||||
</a-card>
|
||||
@@ -107,7 +121,7 @@
|
||||
:unchecked-text="getDictValue(userStatusKey, UserStatus.DISABLED)"
|
||||
:checked-value="UserStatus.ENABLED"
|
||||
:unchecked-value="UserStatus.DISABLED"
|
||||
:before-change="(s: number) => updateStatus(record.id, s)" />
|
||||
:before-change="(s) => updateStatus(record.id, s as number)" />
|
||||
<!-- 无修改权限 -->
|
||||
<span v-else>
|
||||
<span class="circle" :style="{
|
||||
@@ -208,7 +222,7 @@
|
||||
mobile: undefined,
|
||||
email: undefined,
|
||||
status: undefined,
|
||||
lastLoginTime: undefined,
|
||||
description: undefined,
|
||||
});
|
||||
|
||||
// 删除当前行
|
||||
|
||||
@@ -38,10 +38,16 @@ export const email = [{
|
||||
message: '邮箱长度不能大于64位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export const description = [{
|
||||
maxLength: 255,
|
||||
message: '用户描述长度不能大于255位'
|
||||
}] as FieldRule[];
|
||||
|
||||
export default {
|
||||
username,
|
||||
password,
|
||||
nickname,
|
||||
mobile,
|
||||
email,
|
||||
description,
|
||||
} as Record<string, FieldRule | FieldRule[]>;
|
||||
|
||||
@@ -37,6 +37,13 @@ const columns = [
|
||||
minWidth: 88,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '用户描述',
|
||||
dataIndex: 'description',
|
||||
slotName: 'description',
|
||||
minWidth: 128,
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
}, {
|
||||
title: '用户状态',
|
||||
dataIndex: 'status',
|
||||
|
||||
Reference in New Issue
Block a user