From e24c707ba13733903c310334fb0bbee1667ca4f6 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 20 八月 2022 22:24:46 +0800 Subject: [PATCH] 2022-08-20 --- src/tabviews/zshare/normalTable/index.jsx | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx index 555c45c..8ba59fb 100644 --- a/src/tabviews/zshare/normalTable/index.jsx +++ b/src/tabviews/zshare/normalTable/index.jsx @@ -7,6 +7,7 @@ import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' import MkIcon from '@/components/mk-icon' +import Encrypts from '@/components/encrypts' import '@/assets/css/table.scss' import './index.scss' @@ -467,9 +468,13 @@ content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}` } else if (item.textFormat === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` + } else if (item.textFormat === 'encryption') { + content = <span>{item.prefix || ''}<Encrypts value={content} />{item.postfix || ''}</span> } - content = (item.prefix || '') + content + (item.postfix || '') + if (item.textFormat !== 'encryption') { + content = (item.prefix || '') + content + (item.postfix || '') + } } if (item.marks) { @@ -865,9 +870,13 @@ content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)}` } else if (col.textFormat === 'YYYY-MM-DD HH:mm:ss' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1]).([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/.test(content)) { content = `${content.substr(0, 4)}-${content.substr(5, 2)}-${content.substr(8, 2)} ${content.substr(11, 2)}:${content.substr(14, 2)}:${content.substr(17, 2)}` + } else if (col.textFormat === 'encryption') { + content = <span>{col.prefix || ''}<Encrypts value={content} />{col.postfix || ''}</span> } - - content = (col.prefix || '') + content + (col.postfix || '') + + if (col.textFormat !== 'encryption') { + content = (col.prefix || '') + content + (col.postfix || '') + } } if (col.marks) { -- Gitblit v1.8.0