Commit ae17a709 authored by 邓超's avatar 邓超

fix: 修复流程节点测试问题

parent d83c62d1
Pipeline #34268 passed with stages
in 27 minutes 34 seconds
...@@ -78,8 +78,13 @@ const ProcessConfig = props => { ...@@ -78,8 +78,13 @@ const ProcessConfig = props => {
<Radio value={3}>重新处理事件</Radio> <Radio value={3}>重新处理事件</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Form.Item label="前端页面" name="webPage"> <Form.Item
<Select placeholder="请选择前端页面"> label="前端样式"
name="webPage"
initialValue="多表显示"
rules={[{ required: true, message: '请选择前端样式' }]}
>
<Select placeholder="请选择前端样式">
<Option value="多表显示">多表显示</Option> <Option value="多表显示">多表显示</Option>
<Option value="多表在办显示">多表在办显示</Option> <Option value="多表在办显示">多表在办显示</Option>
<Option value="表堆叠显示">表堆叠显示</Option> <Option value="表堆叠显示">表堆叠显示</Option>
......
...@@ -20,6 +20,7 @@ import { ...@@ -20,6 +20,7 @@ import {
ControlOutlined, ControlOutlined,
DeleteOutlined, DeleteOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import PageContainer from '@/components/BasePageContainer';
import NodeEdit from './flowNodeComponents/NodeEdit'; import NodeEdit from './flowNodeComponents/NodeEdit';
import AuxiliaryView from './flowNodeComponents/AuxiliaryView'; import AuxiliaryView from './flowNodeComponents/AuxiliaryView';
import styles from './flowNode.less'; import styles from './flowNode.less';
...@@ -143,9 +144,14 @@ const FlowNode = () => { ...@@ -143,9 +144,14 @@ const FlowNode = () => {
dataIndex: 'extendTableName', dataIndex: 'extendTableName',
width: 150, width: 150,
align: 'center', align: 'center',
ellipsis: {
showTitle: true,
},
render: text => ( render: text => (
// eslint-disable-next-line react/no-danger <Tooltip placement="topLeft" title={text}>
<span dangerouslySetInnerHTML={{ __html: text }} /> {/* eslint-disable-next-line react/no-danger */}
<span dangerouslySetInnerHTML={{ __html: text }} />
</Tooltip>
), ),
}, },
{ {
...@@ -367,48 +373,50 @@ const FlowNode = () => { ...@@ -367,48 +373,50 @@ const FlowNode = () => {
]; ];
return ( return (
<div className={styles.NodeContent}> <PageContainer>
<div className={styles.header}> <div className={styles.NodeContent}>
<div className={styles.nodeTitle}>{flowName}-流程节点配置</div> <div className={styles.header}>
<div className={styles.buttonBox}> <div className={styles.nodeTitle}>{flowName}-流程节点配置</div>
<Button type="primary" onClick={() => backFlow()}> <div className={styles.buttonBox}>
<RollbackOutlined /> <Button type="primary" onClick={() => backFlow()}>
返回 <RollbackOutlined />
</Button> 返回
</Button>
</div>
</div> </div>
</div> <Spin spinning={loading} tip="loading...">
<Spin spinning={loading} tip="loading..."> <Table
<Table dataSource={tableData}
dataSource={tableData} columns={columns}
columns={columns} rowKey={record => record.GroupName}
rowKey={record => record.GroupName} size="small"
size="small" showHeader
showHeader scroll={{ y: '100vh-150px' }}
scroll={{ y: '100vh-150px' }} expandable={{
expandable={{ expandedRowRender: record => createUnfoldTable(record.Items),
expandedRowRender: record => createUnfoldTable(record.Items), }}
expandedRowKeys={expandedRowKeys}
onExpand={onUnfold}
pagination={false}
/>
</Spin>
<NodeEdit
visible={visible.nodeEdit}
msg={nodeMsg}
handleCancel={() => showModal('nodeEdit', false)}
onSubumit={() => {
showModal('nodeEdit', false);
getData();
}} }}
expandedRowKeys={expandedRowKeys}
onExpand={onUnfold}
pagination={false}
/> />
</Spin> <AuxiliaryView
visible={visible.auxiliaryView}
<NodeEdit msg={nodeMsg}
visible={visible.nodeEdit} handleCancel={() => showModal('auxiliaryView', false)}
msg={nodeMsg} />
handleCancel={() => showModal('nodeEdit', false)} </div>
onSubumit={() => { </PageContainer>
showModal('nodeEdit', false);
getData();
}}
/>
<AuxiliaryView
visible={visible.auxiliaryView}
msg={nodeMsg}
handleCancel={() => showModal('auxiliaryView', false)}
/>
</div>
); );
}; };
......
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
notification, notification,
Checkbox, Checkbox,
Button, Button,
message,
} from 'antd'; } from 'antd';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import Fieldselection from './nodeEditComponents/Fieldselection'; import Fieldselection from './nodeEditComponents/Fieldselection';
...@@ -89,69 +90,72 @@ const NodeEdit = props => { ...@@ -89,69 +90,72 @@ const NodeEdit = props => {
}; };
// 字段配置 // 字段配置
const deployField = val => { const deployField = val => {
let value = form.getFieldsValue(true);
if (!value.TableName) {
message.error('请先选择表');
return;
}
setFieldName(val); setFieldName(val);
form.validateFields().then(value => { loadEventFields({ eventTableName: value.TableName }).then(res => {
loadEventFields({ eventTableName: value.TableName }).then(res => { if (res.code === 0) {
if (res.code === 0) { let defaultCheckedList = value[val] ? value[val].split(',') : [];
let defaultCheckedList = value[val].split(','); // 处理数据为树形结构
// 处理数据为树形结构 let keylist = new Set();
let keylist = new Set(); let list = new Map();
let list = new Map(); res.data.forEach(item => {
res.data.forEach(item => { keylist.add(item.group);
keylist.add(item.group); if (keylist.has(item.group)) {
if (keylist.has(item.group)) { let listItem = list.get(item.group);
let listItem = list.get(item.group); // 存入check得选项,是否全选,选中的选项'
// 存入check得选项,是否全选,选中的选项' if (listItem) {
if (listItem) { list.set(item.group, {
list.set(item.group, { plainOptions: [...listItem.plainOptions, item.fieldName],
plainOptions: [...listItem.plainOptions, item.fieldName], defaultCheckedList: [],
defaultCheckedList: [], });
}); } else {
} else { list.set(item.group, {
list.set(item.group, { plainOptions: [item.fieldName],
plainOptions: [item.fieldName], defaultCheckedList: [],
defaultCheckedList: [], });
});
}
} }
}); }
let checkList = [...list]; });
defaultCheckedList.forEach(item => { let checkList = [...list];
checkList.forEach(element => { defaultCheckedList.forEach(item => {
// 当前得模块是否有当前字段 checkList.forEach(element => {
let indeterminate = element[1].plainOptions.some( // 当前得模块是否有当前字段
checkName => checkName === item, let indeterminate = element[1].plainOptions.some(
); checkName => checkName === item,
// 处理已选中的字段 );
if (indeterminate) { // 处理已选中的字段
element[1].defaultCheckedList.push(item); if (indeterminate) {
} element[1].defaultCheckedList.push(item);
if ( }
element[1].defaultCheckedList.length > 0 && if (
element[1].defaultCheckedList.length < element[1].defaultCheckedList.length > 0 &&
element[1].plainOptions.length element[1].defaultCheckedList.length <
) {
element[1].indeterminate = true;
} else {
element[1].indeterminate = false;
}
// 处理是否全选字段
if (
element[1].defaultCheckedList.length ===
element[1].plainOptions.length element[1].plainOptions.length
) { ) {
element[1].checkAll = true; element[1].indeterminate = true;
} else { } else {
element[1].checkAll = false; element[1].indeterminate = false;
} }
}); // 处理是否全选字段
if (
element[1].defaultCheckedList.length ===
element[1].plainOptions.length
) {
element[1].checkAll = true;
} else {
element[1].checkAll = false;
}
}); });
setFieldList(checkList); });
setTimeout(() => { setFieldList(checkList);
setShowField(true); setTimeout(() => {
}, 0); setShowField(true);
} }, 0);
}); }
}); });
}; };
// 字段修改后回调函数 // 字段修改后回调函数
...@@ -161,7 +165,7 @@ const NodeEdit = props => { ...@@ -161,7 +165,7 @@ const NodeEdit = props => {
if (index === val.length - 1) { if (index === val.length - 1) {
Fields = `${Fields + item}`; Fields = `${Fields + item}`;
} else { } else {
Fields = `${Fields + item},`; Fields = `${Fields + item}`;
} }
}); });
let obj = {}; let obj = {};
...@@ -262,6 +266,7 @@ const NodeEdit = props => { ...@@ -262,6 +266,7 @@ const NodeEdit = props => {
<Form.Item <Form.Item
name="RollbackNode" name="RollbackNode"
style={{ marginBottom: 0, width: '100%' }} style={{ marginBottom: 0, width: '100%' }}
initialValue="(上一节点)"
> >
<Select disabled={isDisable} placeholder="请选择回退节点"> <Select disabled={isDisable} placeholder="请选择回退节点">
{backNodes.map(item => ( {backNodes.map(item => (
...@@ -285,20 +290,24 @@ const NodeEdit = props => { ...@@ -285,20 +290,24 @@ const NodeEdit = props => {
<Option value="移交上报人">移交上报人</Option> <Option value="移交上报人">移交上报人</Option>
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="平级移交" name="Transferable"> <Form.Item label="平级移交" name="Transferable" initialValue="0">
<Radio.Group> <Radio.Group>
<Radio value="0"></Radio> <Radio value="0"></Radio>
<Radio value="1"></Radio> <Radio value="1"></Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Form.Item label="显示事件信息" name="EventsInformation"> <Form.Item
label="显示事件信息"
name="EventsInformation"
initialValue="0"
>
<Radio.Group> <Radio.Group>
<Radio value="0"></Radio> <Radio value="0"></Radio>
<Radio value="1"></Radio> <Radio value="1"></Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
<Form.Item label="工单主表" name="TableName"> <Form.Item label="工单主表" name="TableName">
<Select> <Select placeholder="请选择工单主表">
{eventTable.map(item => ( {eventTable.map(item => (
<Option value={item.Name} key={item.ID}> <Option value={item.Name} key={item.ID}>
{item.Name} {item.Name}
...@@ -309,7 +318,7 @@ const NodeEdit = props => { ...@@ -309,7 +318,7 @@ const NodeEdit = props => {
<Form.Item label="字段编辑"> <Form.Item label="字段编辑">
<div className={styles.filedListItem}> <div className={styles.filedListItem}>
<Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}> <Form.Item name="Fields" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请选编辑字段" /> <Input placeholder="请选编辑字段" allowClear />
</Form.Item> </Form.Item>
<Button <Button
type="dashed" type="dashed"
...@@ -326,7 +335,7 @@ const NodeEdit = props => { ...@@ -326,7 +335,7 @@ const NodeEdit = props => {
name="SeeFields" name="SeeFields"
style={{ marginBottom: 0, width: '100%' }} style={{ marginBottom: 0, width: '100%' }}
> >
<Input placeholder="请选择查看字段" /> <Input placeholder="请选择查看字段" allowClear />
</Form.Item> </Form.Item>
<Button <Button
type="dashed" type="dashed"
...@@ -347,7 +356,7 @@ const NodeEdit = props => { ...@@ -347,7 +356,7 @@ const NodeEdit = props => {
<Input placeholder="请配置视图参数" /> <Input placeholder="请配置视图参数" />
</Form.Item> </Form.Item>
<Form.Item label="反馈类型" name="FeedbackName"> <Form.Item label="反馈类型" name="FeedbackName">
<Select placeholder="请选择反馈类型"> <Select placeholder="请选择反馈类型" allowClear>
{backType.map(item => ( {backType.map(item => (
<Option value={item.value} key={item.value}> <Option value={item.value} key={item.value}>
{item.value} {item.value}
......
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