From 4470052c3b6bdeb18e45987f8aa293d1e93d0552 Mon Sep 17 00:00:00 2001
From: Ludc <2870569285@qq.com>
Date: 星期二, 18 十一月 2025 11:59:12 +0800
Subject: [PATCH] 所有文件上传接口增加文件安全校验逻辑。
---
Source/BladeX-Tool/blade-starter-develop/src/main/resources/templates/sword/list.js.vm | 84 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 84 insertions(+), 0 deletions(-)
diff --git a/Source/BladeX-Tool/blade-starter-develop/src/main/resources/templates/sword/list.js.vm b/Source/BladeX-Tool/blade-starter-develop/src/main/resources/templates/sword/list.js.vm
new file mode 100644
index 0000000..298de7e
--- /dev/null
+++ b/Source/BladeX-Tool/blade-starter-develop/src/main/resources/templates/sword/list.js.vm
@@ -0,0 +1,84 @@
+#set($upperEntityPath=$table.entityPath.toUpperCase())
+import React, { PureComponent } from 'react';
+import { connect } from 'dva';
+import { Button, Col, Form, Input, Row } from 'antd';
+import Panel from '../../../components/Panel';
+import { $!{upperEntityPath}_LIST } from '../../../actions/$!{table.entityPath}';
+import Grid from '../../../components/Sword/Grid';
+
+const FormItem = Form.Item;
+
+@connect(({ $!{table.entityPath}, loading }) => ({
+ $!{table.entityPath},
+ loading: loading.models.$!{table.entityPath},
+}))
+@Form.create()
+class $!{entity} extends PureComponent {
+ // ============ 鏌ヨ ===============
+ handleSearch = params => {
+ const { dispatch } = this.props;
+ dispatch($!{upperEntityPath}_LIST(params));
+ };
+
+ // ============ 鏌ヨ琛ㄥ崟 ===============
+ renderSearchForm = onReset => {
+ const { form } = this.props;
+ const { getFieldDecorator } = form;
+
+ return (
+ <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
+ <Col md={6} sm={24}>
+ <FormItem label="鏌ヨ鍚嶇О">
+ {getFieldDecorator('name')(<Input placeholder="鏌ヨ鍚嶇О" />)}
+ </FormItem>
+ </Col>
+ <Col>
+ <div style={{ float: 'right' }}>
+ <Button type="primary" htmlType="submit">
+ 鏌ヨ
+ </Button>
+ <Button style={{ marginLeft: 8 }} onClick={onReset}>
+ 閲嶇疆
+ </Button>
+ </div>
+ </Col>
+ </Row>
+ );
+ };
+
+ render() {
+ const code = '$!{table.entityPath}';
+
+ const {
+ form,
+ loading,
+ $!{table.entityPath}: { data },
+ } = this.props;
+
+ const columns = [
+#foreach($field in $!{table.fields})
+#if($!{field.name}!=$!{tenantColumn})
+ {
+ title: '$!{field.comment}',
+ dataIndex: '$!{field.propertyName}',
+ },
+#end
+#end
+ ];
+
+ return (
+ <Panel>
+ <Grid
+ code={code}
+ form={form}
+ onSearch={this.handleSearch}
+ renderSearchForm={this.renderSearchForm}
+ loading={loading}
+ data={data}
+ columns={columns}
+ />
+ </Panel>
+ );
+ }
+}
+export default $!{entity};
--
Gitblit v1.10.0