fix: bug#10722、10723、10728 修复证书管理部分bug

This commit is contained in:
jackhoo_98 2023-03-22 19:08:02 +08:00
parent 0b32328ce6
commit 470877eac6
3 changed files with 35 additions and 51 deletions

View File

@ -54,12 +54,17 @@ const loading = ref(false);
const handleChange = (info: UploadChangeParam) => {
loading.value = true;
if (info.file.status === 'done') {
onlyMessage('上传成功!', 'success');
const result = info.file.response?.result;
keystoreBase64.value = result;
const reg = new RegExp(/\.pem$/i);
if (reg.test(info.file.name)) {
keystoreBase64.value = result;
emit('change', result);
emit('update:modelValue', result);
onlyMessage('上传成功!', 'success');
} else {
onlyMessage('请上传.pem格式的文件', 'error');
}
loading.value = false;
emit('change', result);
emit('update:modelValue', result);
}
};
const textChange = (val: any) => {

View File

@ -9,7 +9,7 @@
:model="formData"
name="basic"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"
:wrapper-col="{ span: 24 }"
autocomplete="off"
>
<j-form-item
@ -86,7 +86,7 @@
<h1>2. 配置说明</h1>
<h2>1证书文件</h2>
<div>
您可以使用文本编辑工具打开PEM或者CRT格式的证书文件复制其中的内容并粘贴到该文本框或者单击该文本框下的上传并选择存储在本地计算机的证书文件将文件内容上传到文本框
您可以使用文本编辑工具打开PEM格式的证书文件复制其中的内容并粘贴到该文本框或者单击该文本框下的上传并选择存储在本地计算机的证书文件将文件内容上传到文本框
</div>
<h2>2证书私钥</h2>
<div>
@ -208,31 +208,4 @@ detail(id);
}
}
}
.doc {
height: 100%;
padding: 0 24px;
overflow-y: auto;
color: rgba(#000, 0.8);
font-size: 14px;
background-color: #fff;
h1 {
margin: 16px 0;
color: rgba(#000, 0.85);
font-weight: bold;
font-size: 14px;
&:first-child {
margin-top: 0;
}
}
h2 {
margin: 6px 10px;
color: rgba(0, 0, 0, 0.8);
font-weight: 400;
font-size: 14px;
}
}
</style>

View File

@ -76,14 +76,17 @@ const columns = [
width: 200,
ellipsis: true,
search: {
type: 'select',
options: [
{
label: '证书标准',
value: 'common',
},
],
type: 'string',
},
// search: {
// type: 'select',
// options: [
// {
// label: '',
// value: 'common',
// },
// ],
// },
scopedSlots: true,
},
{
@ -118,17 +121,17 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
return [];
}
return [
{
key: 'view',
text: '查看',
tooltip: {
title: '查看',
},
icon: 'EyeOutlined',
onClick: async () => {
handlEye(data.id);
},
},
// {
// key: 'view',
// text: '',
// tooltip: {
// title: '',
// },
// icon: 'EyeOutlined',
// onClick: async () => {
// handlEye(data.id);
// },
// },
{
key: 'update',
text: '编辑',
@ -143,6 +146,9 @@ const getActions = (data: Partial<Record<string, any>>): ActionsType[] => {
{
key: 'delete',
text: '删除',
tooltip: {
title: '删除',
},
popConfirm: {
title: '确认删除?',
okText: ' 确定',