From 470877eac6c5b9d175555af6c0f7e82bc959a7c4 Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 22 Mar 2023 19:08:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#10722=E3=80=8110723=E3=80=8110728=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=81=E4=B9=A6=E7=AE=A1=E7=90=86=E9=83=A8?= =?UTF-8?q?=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Certificate/Detail/CertificateFile.vue | 13 ++++-- src/views/link/Certificate/Detail/index.vue | 31 +------------- src/views/link/Certificate/index.vue | 42 +++++++++++-------- 3 files changed, 35 insertions(+), 51 deletions(-) diff --git a/src/views/link/Certificate/Detail/CertificateFile.vue b/src/views/link/Certificate/Detail/CertificateFile.vue index 275342ed..4ee0b529 100644 --- a/src/views/link/Certificate/Detail/CertificateFile.vue +++ b/src/views/link/Certificate/Detail/CertificateFile.vue @@ -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) => { diff --git a/src/views/link/Certificate/Detail/index.vue b/src/views/link/Certificate/Detail/index.vue index bc49e208..e6d5aa16 100644 --- a/src/views/link/Certificate/Detail/index.vue +++ b/src/views/link/Certificate/Detail/index.vue @@ -9,7 +9,7 @@ :model="formData" name="basic" :label-col="{ span: 8 }" - :wrapper-col="{ span: 16 }" + :wrapper-col="{ span: 24 }" autocomplete="off" > 2. 配置说明

1、证书文件

- 您可以使用文本编辑工具打开PEM或者CRT格式的证书文件,复制其中的内容并粘贴到该文本框,或者单击该文本框下的上传,并选择存储在本地计算机的证书文件,将文件内容上传到文本框。 + 您可以使用文本编辑工具打开PEM格式的证书文件,复制其中的内容并粘贴到该文本框,或者单击该文本框下的上传,并选择存储在本地计算机的证书文件,将文件内容上传到文本框。

2、证书私钥

@@ -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; - } -} diff --git a/src/views/link/Certificate/index.vue b/src/views/link/Certificate/index.vue index 9023a06f..43d90035 100644 --- a/src/views/link/Certificate/index.vue +++ b/src/views/link/Certificate/index.vue @@ -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>): 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>): ActionsType[] => { { key: 'delete', text: '删除', + tooltip: { + title: '删除', + }, popConfirm: { title: '确认删除?', okText: ' 确定',