新增 CLAUDE.md 文件以提供项目指导,添加 .claudeignore 文件以排除不必要的文件,更新 pom.xml 版本至 3.9.2,修复多个路径遍历和 SQL 注入漏洞,优化字典翻译切面逻辑,增强文件上传和下载的安全性,新增音频文件类型支持,改进动态数据源的安全校验。
This commit is contained in:
@@ -1,31 +1,80 @@
|
||||
import { BasicColumn, FormSchema } from '/@/components/Table';
|
||||
import { h } from 'vue';
|
||||
import { Tag, Tooltip } from 'ant-design-vue';
|
||||
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '表名',
|
||||
dataIndex: 'dataTable',
|
||||
width: 150,
|
||||
width: 120,
|
||||
align: 'left',
|
||||
customRender: ({ text }) => {
|
||||
return h(Tag, { color: 'blue' }, () => text);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '数据ID',
|
||||
dataIndex: 'dataId',
|
||||
width: 350,
|
||||
width: 260,
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => {
|
||||
return h(
|
||||
'span',
|
||||
{ style: 'font-family: Consolas, Monaco, monospace; font-size: 12px; color: #595959' },
|
||||
text
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '版本号',
|
||||
dataIndex: 'dataVersion',
|
||||
width: 100,
|
||||
width: 70,
|
||||
align: 'center',
|
||||
customRender: ({ text }) => {
|
||||
return h(Tag, { color: 'green' }, () => 'V' + text);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '数据内容',
|
||||
dataIndex: 'dataContent',
|
||||
ellipsis: true,
|
||||
customRender: ({ text }) => {
|
||||
if (!text) return '--';
|
||||
// 尝试格式化 JSON 显示关键字段
|
||||
try {
|
||||
const obj = JSON.parse(text);
|
||||
const keys = Object.keys(obj);
|
||||
const preview = keys
|
||||
.slice(0, 3)
|
||||
.map((k) => {
|
||||
const v = obj[k];
|
||||
const val = v === null || v === undefined || v === '' ? '--' : String(v);
|
||||
return `${k}: ${val.length > 20 ? val.substring(0, 20) + '...' : val}`;
|
||||
})
|
||||
.join(' | ');
|
||||
const suffix = keys.length > 3 ? ` (+${keys.length - 3} 字段)` : '';
|
||||
return h(
|
||||
Tooltip,
|
||||
{ title: JSON.stringify(obj, null, 2), overlayStyle: { maxWidth: '500px', whiteSpace: 'pre-wrap', fontFamily: 'Consolas, monospace', fontSize: '12px' } },
|
||||
() => h('span', { style: 'font-size: 12px; color: #595959' }, preview + suffix)
|
||||
);
|
||||
} catch {
|
||||
return text;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
dataIndex: 'createBy',
|
||||
sorter: true,
|
||||
width: 200,
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
dataIndex: 'createTime',
|
||||
width: 120,
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -34,12 +83,27 @@ export const searchFormSchema: FormSchema[] = [
|
||||
field: 'dataTable',
|
||||
label: '表名',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
placeholder: '请输入表名',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'dataId',
|
||||
label: '数据ID',
|
||||
component: 'Input',
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
placeholder: '请输入数据ID',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
{
|
||||
field: 'createBy',
|
||||
label: '创建人',
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入创建人',
|
||||
},
|
||||
colProps: { span: 6 },
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user