Commit 8d902bb1 authored by wuhao's avatar wuhao 🎯

asder

parent bfdb22d0
This diff is collapsed.
......@@ -36,6 +36,7 @@ import { PlusOutlined, DownOutlined, CloseOutlined, RedoOutlined } from '@ant-de
import BraftEditor from 'braft-editor';
import EditTable from './EditTable';
import EditorItem from './EditorItem';
import Diyrule from './Diyrule';
import defaultSetting from '../../../config/defaultSettings';
const { Image, Form, Upload, Col, Pagination, Avatar, Dropdown, Menu, Tabs, message } = Antd;
......@@ -70,6 +71,7 @@ const FormItems = {
UploadImage,
UploadDragger,
Editor,
Diyrules,
FormList,
FormSelectList,
CheckboxItem,
......@@ -1304,6 +1306,19 @@ function Editor({ item, colProps, formRef }) {
);
}
// editor
function Diyrules({ item, colProps, formRef }) {
let col = item.colProps ?? colProps;
let curkey = item.key ?? item.dataIndex;
return (
<Col {...col}>
<ProForm.Item name={curkey} label={item.title} {...item.formItemProps}>
<Diyrule />
</ProForm.Item>
</Col>
);
}
function FormList({ item, colProps, formRef }) {
let col = item.colProps ?? colProps;
let fields = item.columns;
......
......@@ -20,6 +20,16 @@ function getcolumns(setdrawer) {
dataIndex: 'ruleNames',
key: 'ruleNames',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
hideInForm: true,
},
{
title: '规则配置',
dataIndex: 'nrList',
hideInTable: true,
valueType: 'diyrules',
colProps: {
span: 24,
},
},
];
}
......
......@@ -152,8 +152,7 @@ function Rules(props) {
item: null,
detailpath: null,
title: '新增',
type: 'add',
val: 'only',
val: 'add',
onFinish: async (vals) => {
console.log(1);
let params = {
......@@ -192,9 +191,7 @@ function Rules(props) {
}));
}}
{...drawer}
>
{drawer?.type == 'add' ? <AddRules /> : null}
</DrawerPro>
/>
</div>
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment