Commit 2e5407fb authored by 皮倩雯's avatar 皮倩雯

排水户

parent 2599d191
Pipeline #71227 waiting for manual action with stages
/*font汉化*/
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimSun]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimSun]::before {
content: "宋体";
font-family: "SimSun";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=SimHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=SimHei]::before {
content: "黑体";
font-family: "SimHei";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Microsoft-YaHei]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Microsoft-YaHei]::before {
content: "微软雅黑";
font-family: "Microsoft YaHei";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=KaiTi]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=KaiTi]::before {
content: "楷体";
font-family: "KaiTi";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=FangSong]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=FangSong]::before {
content: "仿宋";
font-family: "FangSong";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Arial]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Arial]::before {
content: "Arial";
font-family: "Arial";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=Times-New-Roman]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=Times-New-Roman]::before {
content: "Times New Roman";
font-family: "Times New Roman";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=sans-serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=sans-serif]::before {
content: "sans-serif";
font-family: "sans-serif";
}
.ql-font-SimSun {
font-family: "SimSun";
}
.ql-font-SimHei {
font-family: "SimHei";
}
.ql-font-Microsoft-YaHei {
font-family: "Microsoft YaHei";
}
.ql-font-KaiTi {
font-family: "KaiTi";
}
.ql-font-FangSong {
font-family: "FangSong";
}
.ql-font-Arial {
font-family: "Arial";
}
.ql-font-Times-New-Roman {
font-family: "Times New Roman";
}
.ql-font-sans-serif {
font-family: "sans-serif";
}
\ No newline at end of file
...@@ -7,500 +7,500 @@ import { Form, Input, Select, Tooltip, Button, notification, Drawer, Space } fro ...@@ -7,500 +7,500 @@ import { Form, Input, Select, Tooltip, Button, notification, Drawer, Space } fro
import { PlusOutlined, InfoCircleOutlined } from '@ant-design/icons'; import { PlusOutlined, InfoCircleOutlined } from '@ant-design/icons';
import { LoadEventFields } from '@/services/tablemanager/tablemanager'; import { LoadEventFields } from '@/services/tablemanager/tablemanager';
import { import {
GetCM_Ledger_LoadLedgerTable, GetCM_Ledger_LoadLedgerTable,
GetCMLedger_QueryLedgers, GetCMLedger_QueryLedgers,
GetCMLedger_OperateLedger, GetCMLedger_OperateLedger,
} from '@/services/standingBook/api'; } from '@/services/standingBook/api';
import ChangeAdd from './changeAdd'; import ChangeAdd from './changeAdd';
const { Option } = Select; const { Option } = Select;
const { TextArea } = Input; const { TextArea } = Input;
const BookConfig = props => { const BookConfig = props => {
const {
const { callBackSubmit,
callBackSubmit, type,
type, formObj,
formObj, visible,
visible, tableData,
tableData, pickItem1,
pickItem1, onCancel,
onCancel, data,
data, maxLength,
maxLength, keepTableData,
keepTableData, } = props;
} = props; const [standingTable, setStandingTable] = useState([]);
const [standingTable, setStandingTable] = useState([]); const [isVisible, setIsVisible] = useState(false); // 弹窗
const [isVisible, setIsVisible] = useState(false); // 弹窗 const [pickItem, setPickItem] = useState(''); // 选择的字段
const [pickItem, setPickItem] = useState(''); // 选择的字段 const [Order, setOrder] = useState(''); // 当前编辑序号
const [Order, setOrder] = useState(''); // 当前编辑序号 const [filed, setFiled] = useState({}); // 传给子组件列表数据
const [filed, setFiled] = useState({}); // 传给子组件列表数据 const [checkedList, setCheckedList] = useState([]);
const [checkedList, setCheckedList] = useState([]); const [allFileds, setAllFileds] = useState([]); // 当前表所有的字段
const [allFileds, setAllFileds] = useState([]); // 当前表所有的字段 const [form] = Form.useForm();
const [form] = Form.useForm(); const layout = {
const layout = { layout: 'horizontal',
layout: 'horizontal', labelCol: {
labelCol: { span: 5,
span: 5, },
}, wrapperCol: {
wrapperCol: { span: 19,
span: 19, },
}, };
}; const { Item } = Form;
const { Item } = Form; // 提交
// 提交 const onSubmit = () => {
const onSubmit = () => { form.validateFields().then(validate => {
form.validateFields().then(validate => { if (validate) {
if (validate) { let aa = form.getFieldsValue().Type;
let aa = form.getFieldsValue().Type; if (aa == '全部') {
if (aa == '全部') { notification.warning({
notification.warning({ message: '提示',
message: '提示', duration: 3,
duration: 3, description: '分组名称不能为全部',
description: '分组名称不能为全部', });
});
} else {
let obj =
type === 'add'
? { ...validate, Order: maxLength }
: { ...validate, Order, ID: formObj.ID };
GetCMLedger_OperateLedger(obj)
.then(res => {
if (res.code === 0) {
form.resetFields();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: type === 'add' ? '新增成功' : '编辑成功',
});
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
.catch(() => {
notification.error({
message: '提示',
duration: 3,
description: '网络异常请稍后再试',
});
});
}
}
});
};
useEffect(() => {
console.log(pickItem1);
console.log(data[0]);
if (visible) {
// 获取台账表
getTableData();
if (type === 'edit') {
GetCMLedger_QueryLedgers({ ledgerId: formObj.ID }).then(res => {
if (res.code === 0) {
form.setFieldsValue(res.data.root);
setOrder(res.data.root.Order);
changTable(res.data.root.TableName);
}
});
} else {
if (!pickItem1 || pickItem1 == '全部') {
form.setFieldsValue({ Type: data[0] });
} else {
form.setFieldsValue({ Type: pickItem1 });
}
}
} else { } else {
setFiled({}); let obj =
form.resetFields(); type === 'add'
form.setFieldsValue({ AccountType: '台账' }); ? { ...validate, Order: maxLength }
} : { ...validate, Order, ID: formObj.ID };
}, [visible]); GetCMLedger_OperateLedger(obj)
.then(res => {
// 获取台账表 if (res.code === 0) {
const getTableData = () => { form.resetFields();
GetCM_Ledger_LoadLedgerTable().then(res => { callBackSubmit();
if (res.code === 0) { notification.success({
setStandingTable(res.data.root); message: '提示',
} duration: 3,
}); description: type === 'add' ? '新增成功' : '编辑成功',
};
// 切换表后数据处理为对应格式
const changTable = value => {
LoadEventFields({ eventTableName: value, distinctFields: '' }).then(res => {
if (res.data.root) {
let fileMap = new Map();
let initList = [];
// 处理为子组件需要的格式
res.data.root.forEach(item => {
initList.push(item.fieldName);
if (fileMap.has(item.group)) {
let list = [...fileMap.get(item.group)];
list.push(item.fieldName);
fileMap.set(item.group, list);
} else {
fileMap.set(item.group, [item.fieldName]);
}
}); });
// 给Map格式转为对象 } else {
fileMap = Object.fromEntries(fileMap.entries()); notification.error({
// 处理外部字段 message: '提示',
Object.keys(form.getFieldsValue()).forEach(key => { duration: 3,
saveOutFieldsLength(key, initList); description: res.msg,
}); });
setAllFileds(initList); }
setFiled(fileMap); })
} .catch(() => {
}); notification.error({
}; message: '提示',
// 保存外部字段个数 duration: 3,
const saveOutFieldsLength = (key, initList) => { description: '网络异常请稍后再试',
switch (key) { });
case 'Fields': });
form.setFieldsValue({ outListFileds: dealExternal(key, initList) });
break;
case 'SearchFields':
form.setFieldsValue({ outSearchFields: dealExternal(key, initList) });
break;
case 'AddFields':
form.setFieldsValue({ outAddFields: dealExternal(key, initList) });
break;
case 'EditFields':
form.setFieldsValue({ outEditFields: dealExternal(key, initList) });
break;
case 'WebFields':
form.setFieldsValue({ outWebFields: dealExternal(key, initList) });
break;
case 'MobileFields':
form.setFieldsValue({ outMobileFields: dealExternal(key, initList) });
break;
default:
break;
} }
}; }
// 选择字段回调函数 });
const onOK = prop => { };
setIsVisible(false); useEffect(() => {
let obj = {}; console.log(pickItem1);
obj[prop.pickItem] = prop.str; console.log(data[0]);
form.setFieldsValue(obj); if (visible) {
saveOutFieldsLength(prop.pickItem, allFileds); // 获取台账表
}; getTableData();
// 处理外部字段 if (type === 'edit') {
const dealExternal = (fileds, list) => { GetCMLedger_QueryLedgers({ ledgerId: formObj.ID }).then(res => {
let isExternal; if (res.code === 0) {
let externalLength = 0; form.setFieldsValue(res.data.root);
if (form.getFieldValue(fileds)) { setOrder(res.data.root.Order);
form changTable(res.data.root.TableName);
.getFieldValue(fileds) }
.split(',') });
.forEach(item => { } else {
isExternal = list.some(val => val === item); if (!pickItem1 || pickItem1 == '全部') {
if (!isExternal && item !== '') { form.setFieldsValue({ Type: data[0] });
// eslint-disable-next-line no-plusplus } else {
externalLength++; form.setFieldsValue({ Type: pickItem1 });
}
});
} }
}
} else {
setFiled({});
form.resetFields();
form.setFieldsValue({ AccountType: '台账' });
}
}, [visible]);
return externalLength; // 获取台账表
}; const getTableData = () => {
// 勾选字段 GetCM_Ledger_LoadLedgerTable().then(res => {
const pickFiled = fileds => { if (res.code === 0) {
if (!form.getFieldValue('TableName')) { setStandingTable(res.data.root);
notification.error({ message: '提示', duration: 3, description: '请选择台账表' }); }
return; });
} };
// 添加外部字段 // 切换表后数据处理为对应格式
let fil = { ...filed }; const changTable = value => {
fil['外部字段'] = []; LoadEventFields({ eventTableName: value, distinctFields: '' }).then(res => {
let isExternal; if (res.data.root) {
let list = form.getFieldValue(fileds) ? form.getFieldValue(fileds).split(',') : []; let fileMap = new Map();
list.forEach(item => { let initList = [];
isExternal = allFileds.some(val => val === item); // 处理为子组件需要的格式
if (!isExternal && item !== '') { res.data.root.forEach(item => {
fil['外部字段'].push(item); initList.push(item.fieldName);
} if (fileMap.has(item.group)) {
let list = [...fileMap.get(item.group)];
list.push(item.fieldName);
fileMap.set(item.group, list);
} else {
fileMap.set(item.group, [item.fieldName]);
}
}); });
if (fil['外部字段'].length === 0) { // 给Map格式转为对象
delete fil['外部字段']; fileMap = Object.fromEntries(fileMap.entries());
} // 处理外部字段
setFiled(fil); Object.keys(form.getFieldsValue()).forEach(key => {
setCheckedList(list); saveOutFieldsLength(key, initList);
setPickItem(fileds); });
setIsVisible(true); setAllFileds(initList);
}; setFiled(fileMap);
// 搜索框监听 }
const onSearch = value => { });
if (value) { };
form.setFieldsValue({ Type: value }); // 保存外部字段个数
} const saveOutFieldsLength = (key, initList) => {
}; switch (key) {
case 'Fields':
form.setFieldsValue({ outListFileds: dealExternal(key, initList) });
break;
case 'SearchFields':
form.setFieldsValue({ outSearchFields: dealExternal(key, initList) });
break;
case 'AddFields':
form.setFieldsValue({ outAddFields: dealExternal(key, initList) });
break;
case 'EditFields':
form.setFieldsValue({ outEditFields: dealExternal(key, initList) });
break;
case 'WebFields':
form.setFieldsValue({ outWebFields: dealExternal(key, initList) });
break;
case 'MobileFields':
form.setFieldsValue({ outMobileFields: dealExternal(key, initList) });
break;
default:
break;
}
};
// 选择字段回调函数
const onOK = prop => {
setIsVisible(false);
let obj = {};
obj[prop.pickItem] = prop.str;
form.setFieldsValue(obj);
saveOutFieldsLength(prop.pickItem, allFileds);
};
// 处理外部字段
const dealExternal = (fileds, list) => {
let isExternal;
let externalLength = 0;
if (form.getFieldValue(fileds)) {
form
.getFieldValue(fileds)
.split(',')
.forEach(item => {
isExternal = list.some(val => val === item);
if (!isExternal && item !== '') {
// eslint-disable-next-line no-plusplus
externalLength++;
}
});
}
return ( return externalLength;
<Drawer };
title={`${type === 'add' ? '台账配置' : '台账编辑'}`} // 勾选字段
width="500px" const pickFiled = fileds => {
visible={visible} if (!form.getFieldValue('TableName')) {
onClose={onCancel} notification.error({ message: '提示', duration: 3, description: '请选择台账表' });
destroyOnClose return;
footer={ }
<Space> // 添加外部字段
<Button onClick={onCancel}>取消</Button> let fil = { ...filed };
<Button onClick={onSubmit} type="primary"> fil['外部字段'] = [];
确定 let isExternal;
</Button> let list = form.getFieldValue(fileds) ? form.getFieldValue(fileds).split(',') : [];
</Space> list.forEach(item => {
} isExternal = allFileds.some(val => val === item);
if (!isExternal && item !== '') {
fil['外部字段'].push(item);
}
});
if (fil['外部字段'].length === 0) {
delete fil['外部字段'];
}
setFiled(fil);
setCheckedList(list);
setPickItem(fileds);
setIsVisible(true);
};
// 搜索框监听
const onSearch = value => {
if (value) {
form.setFieldsValue({ Type: value });
}
};
return (
<Drawer
title={`${type === 'add' ? '台账配置' : '台账编辑'}`}
width="570px"
visible={visible}
onClose={onCancel}
destroyOnClose
footer={
<Space>
<Button onClick={onCancel}>取消</Button>
<Button onClick={onSubmit} type="primary">
确定
</Button>
</Space>
}
>
<Form form={form} {...layout}>
<Item label="分组" name="Type" rules={[{ required: true, message: '请选择分组' }]}>
<Select
showSearch
filterOption={false}
onSearch={onSearch}
placeholder="请输入分组名称"
allowClear
>
{data.map((item, index) => (
<Option value={item} key={index}>
{item}
</Option>
))}
</Select>
</Item>
<Item label="台账类型" name="AccountType">
<Select placeholder="请选择台账类型">
<Option value="台账">台账</Option>
<Option value="反馈">反馈</Option>
<Option value="设备">设备</Option>
</Select>
</Item>
<Item
label="台账名称"
name="Name"
rules={[
{
required: true,
validator: (rule, value) => {
if (
keepTableData.find(i => i.name == form.getFieldsValue().Name) &&
form.getFieldsValue().Name != formObj.name
) {
return Promise.reject('台账名称已存在');
} else if (form.getFieldsValue().Name == '') {
return Promise.reject('台账名称不能为空');
}
return Promise.resolve();
},
},
]}
>
<Input placeholder="台账名称不可重复" allowClear />
</Item>
<Item label="台账表" name="TableName" rules={[{ required: true, message: '请选择台账表' }]}>
<Select placeholder="" optionFilterProp="children" onChange={changTable} showSearch>
{standingTable.map((item, index) => (
<Option key={index} value={item.value}>
{item.text}
</Option>
))}
</Select>
</Item>
<Item
label={
<>
{form.getFieldValue('outListFileds') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outListFileds')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>台账字段</span>
</>
}
name="Fields"
rules={[{ required: true, message: '请选择台账表' }]}
>
<div style={{ display: 'flex' }}>
<Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端详情查看字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('Fields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outAddFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outAddFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>添加字段</span>
</>
}
name="AddFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="AddFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端数据添加字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('AddFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outEditFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outEditFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>编辑字段</span>
</>
}
name="EditFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="EditFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端可编辑字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('EditFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outSearchFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outSearchFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>检索字段</span>
</>
}
name="SearchFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="SearchFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端列表检索字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('SearchFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outWebFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outWebFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>显示列字段</span>
</>
}
name="WebFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="WebFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端列表展示字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('WebFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outMobileFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outMobileFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>手持显示列字段</span>
</>
}
name="MobileFields"
> >
<Form form={form} {...layout}> <div style={{ display: 'flex' }}>
<Item label="分组" name="Type" rules={[{ required: true, message: '请选择分组' }]}> <Form.Item name="MobileFields" style={{ marginBottom: 0, width: '100%' }}>
<Select <TextArea placeholder="手持展示字段" allowClear />
showSearch </Form.Item>
filterOption={false} <Button
onSearch={onSearch} type="dashed"
placeholder="请输入分组名称" style={{ height: '54px', width: '50px', marginLeft: '10px' }}
allowClear icon={<PlusOutlined />}
> onClick={() => {
{data.map((item, index) => ( pickFiled('MobileFields');
<Option value={item} key={index}> }}
{item}
</Option>
))}
</Select>
</Item>
<Item label="台账类型" name="AccountType">
<Select placeholder="请选择台账类型">
<Option value="台账">台账</Option>
<Option value="反馈">反馈</Option>
<Option value="设备">设备</Option>
</Select>
</Item>
<Item
label="台账名称"
name="Name"
rules={[
{
required: true,
validator: (rule, value) => {
if (
keepTableData.find(i => i.name == form.getFieldsValue().Name) &&
form.getFieldsValue().Name != formObj.name
) {
return Promise.reject('台账名称已存在');
} else if (form.getFieldsValue().Name == '') {
return Promise.reject('台账名称不能为空');
}
return Promise.resolve();
},
},
]}
>
<Input placeholder="台账名称不可重复" allowClear />
</Item>
<Item label="台账表" name="TableName" rules={[{ required: true, message: '请选择台账表' }]}>
<Select placeholder="" optionFilterProp="children" onChange={changTable} showSearch>
{standingTable.map((item, index) => (
<Option key={index} value={item.value}>
{item.text}
</Option>
))}
</Select>
</Item>
<Item
label={
<>
{form.getFieldValue('outListFileds') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outListFileds')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>台账字段</span>
</>
}
name="Fields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端详情查看字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('Fields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outSearchFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outSearchFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>检索字段</span>
</>
}
name="SearchFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="SearchFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端列表检索字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('SearchFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outAddFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outAddFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>添加字段</span>
</>
}
name="AddFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="AddFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端数据添加字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('AddFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outEditFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outEditFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>编辑字段</span>
</>
}
name="EditFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="EditFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端可编辑字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('EditFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outWebFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outWebFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>前端字段</span>
</>
}
name="WebFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="WebFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="前端列表展示字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('WebFields');
}}
/>
</div>
</Item>
<Item
label={
<>
{form.getFieldValue('outMobileFields') > 0 ? (
<Tooltip title={`外部字段${form.getFieldValue('outMobileFields')}个`}>
<InfoCircleOutlined style={{ color: 'red', margin: '2px 3px 0 3px' }} />
</Tooltip>
) : (
''
)}
<span>手持字段</span>
</>
}
name="MobileFields"
>
<div style={{ display: 'flex' }}>
<Form.Item name="MobileFields" style={{ marginBottom: 0, width: '100%' }}>
<TextArea placeholder="手持展示字段" allowClear />
</Form.Item>
<Button
type="dashed"
style={{ height: '54px', width: '50px', marginLeft: '10px' }}
icon={<PlusOutlined />}
onClick={() => {
pickFiled('MobileFields');
}}
/>
</div>
</Item>
<Item label="接口配置" name="Interface">
<Input placeholder="服务项目dll库" allowClear />
</Item>
</Form>
<ChangeAdd
visible={isVisible}
onCancel={() => {
setIsVisible(false);
setCheckedList([]);
}}
callBackSubmit={onOK}
newCheckedList={checkedList}
filed={filed}
pickItem={pickItem}
formObj={formObj}
/> />
</Drawer> </div>
); </Item>
<Item label="接口配置" name="Interface">
<Input placeholder="服务项目dll库" allowClear />
</Item>
</Form>
<ChangeAdd
visible={isVisible}
onCancel={() => {
setIsVisible(false);
setCheckedList([]);
}}
callBackSubmit={onOK}
newCheckedList={checkedList}
filed={filed}
pickItem={pickItem}
formObj={formObj}
/>
</Drawer>
);
}; };
export default BookConfig; export default BookConfig;
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