Commit ab374b49 authored by 邓超's avatar 邓超

fix: 优化节假日交互、流程交互修改

parent fb330056
Pipeline #65145 passed with stages
...@@ -122,6 +122,9 @@ const Holidays = () => { ...@@ -122,6 +122,9 @@ const Holidays = () => {
window.addEventListener('resize', resizeListener); window.addEventListener('resize', resizeListener);
return () => { return () => {
window.removeEventListener('resize', resizeListener); window.removeEventListener('resize', resizeListener);
document.querySelectorAll('.ant-popconfirm').forEach(ele => {
ele.style.zoom = 'normal';
});
}; };
}, []); }, []);
const resizeListener = () => { const resizeListener = () => {
......
...@@ -154,6 +154,7 @@ const FlowChart = props => { ...@@ -154,6 +154,7 @@ const FlowChart = props => {
console.log(n.data.key); console.log(n.data.key);
let nodeData = diagram.model.findNodeDataForKey(n.data.key); let nodeData = diagram.model.findNodeDataForKey(n.data.key);
nodeData.NodeName = `${n.data.NodeName}${newKey}`; nodeData.NodeName = `${n.data.NodeName}${newKey}`;
nodeData.NodeAliasName = nodeData.NodeName;
nodeData.SerialNo = newNum; nodeData.SerialNo = newNum;
// nodeData.key = newKey; // nodeData.key = newKey;
nodeData.NodeId = newKey; nodeData.NodeId = newKey;
...@@ -210,7 +211,9 @@ const FlowChart = props => { ...@@ -210,7 +211,9 @@ const FlowChart = props => {
let obj; let obj;
obj = item; obj = item;
obj.key = item.NodeId; obj.key = item.NodeId;
if (!obj.NodeAliasName) {
obj.NodeAliasName = obj.NodeName;
}
obj.nodeDetail = JSON.stringify(obj); obj.nodeDetail = JSON.stringify(obj);
obj.CarbonCopyPeopleList = obj.CarbonCopyPeopleList.map(ele => ({ obj.CarbonCopyPeopleList = obj.CarbonCopyPeopleList.map(ele => ({
label: ele.userName, label: ele.userName,
...@@ -610,7 +613,7 @@ const FlowChart = props => { ...@@ -610,7 +613,7 @@ const FlowChart = props => {
} }
return true; return true;
}), }),
new go.Binding('text', 'NodeName'), new go.Binding('text', 'NodeAliasName'),
nodeBoxStyle('stroke', 'nodeStyle'), nodeBoxStyle('stroke', 'nodeStyle'),
), ),
objGo( objGo(
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
background-color: #EEEEEE; background-color: #EEEEEE;
color: #040404; color: #040404;
padding: 5px; padding: 5px;
cursor: pointer;
} }
.activeConfig { .activeConfig {
......
...@@ -259,7 +259,6 @@ const Confggateway = (props, ref) => { ...@@ -259,7 +259,6 @@ const Confggateway = (props, ref) => {
</Divider> </Divider>
<div className={styles.titleBox}> <div className={styles.titleBox}>
当满足规则配置时,会根据规则流转到对应的节点; 当满足规则配置时,会根据规则流转到对应的节点;
<br />
当不设置条件时,默认需要人为选择流转到哪个节点。 当不设置条件时,默认需要人为选择流转到哪个节点。
</div> </div>
<div className={styles.btnAddRule} onClick={addRule}> <div className={styles.btnAddRule} onClick={addRule}>
......
...@@ -3,6 +3,7 @@ import { Space, Button, Divider, Table, Tooltip, message } from 'antd'; ...@@ -3,6 +3,7 @@ import { Space, Button, Divider, Table, Tooltip, message } from 'antd';
import { DeleteOutlined, EditTwoTone, PlusOutlined } from '@ant-design/icons'; import { DeleteOutlined, EditTwoTone, PlusOutlined } from '@ant-design/icons';
import RoalChoose from './RoalChoose'; import RoalChoose from './RoalChoose';
import Undertaker from './Undertaker'; import Undertaker from './Undertaker';
import styles from './ConfgUndertake.less';
const ConfgUndertake = (props, ref) => { const ConfgUndertake = (props, ref) => {
const { nodeChage, editMsg } = props; const { nodeChage, editMsg } = props;
...@@ -61,33 +62,44 @@ const ConfgUndertake = (props, ref) => { ...@@ -61,33 +62,44 @@ const ConfgUndertake = (props, ref) => {
ellipsis: { ellipsis: {
showTitle: false, showTitle: false,
}, },
render: text => (
<Tooltip placement="topLeft" title={text}>
{text}
</Tooltip>
),
},
{
title: '类型',
dataIndex: 'type',
align: 'center',
width: 60,
filters: [ filters: [
{ {
text: '角色', text: <span style={{ color: '#d46b08' }}>角色</span>,
value: 2, value: 2,
}, },
{ {
text: '机构', text: <span style={{ color: '#08979c' }}>机构</span>,
value: 1, value: 1,
}, },
], ],
onFilter: (value, record) => record.type === value, onFilter: (value, record) => record.type === value,
render: text => (text === 2 ? '角色' : '机构'), render: (text, record) => (
<Tooltip placement="topLeft" title={text}>
<span style={{ color: record.type === 2 ? '#d46b08' : '#08979c' }}>{text}</span>
</Tooltip>
),
}, },
// {
// title: '类型',
// dataIndex: 'type',
// align: 'center',
// width: 60,
// filters: [
// {
// text: '角色',
// value: 2,
// },
// {
// text: '机构',
// value: 1,
// },
// ],
// onFilter: (value, record) => record.type === value,
// render: text => (text === 2 ? '角色' : '机构'),
// },
{ {
title: '默认承办人', title: '承办人',
dataIndex: 'defauletUserName', dataIndex: 'defauletUserName',
align: 'center', align: 'center',
ellipsis: { ellipsis: {
...@@ -108,18 +120,18 @@ const ConfgUndertake = (props, ref) => { ...@@ -108,18 +120,18 @@ const ConfgUndertake = (props, ref) => {
render: (text, record, index) => ( render: (text, record, index) => (
<> <>
<Space> <Space>
<Tooltip title="编辑默认承办人"> {/* <Tooltip title="编辑默认承办人">
<EditTwoTone <EditTwoTone
onClick={() => toEdit(record, index)} onClick={() => toEdit(record, index)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip> */}
<Tooltip title="删除角色或机构"> {/* <Tooltip title="删除角色或机构"> */}
<DeleteOutlined <DeleteOutlined
onClick={() => delUser(record, index)} onClick={() => delUser(record, index)}
style={{ fontSize: '16px', color: '#e86060' }} style={{ fontSize: '16px', color: '#e86060' }}
/> />
</Tooltip> {/* </Tooltip> */}
</Space> </Space>
</> </>
), ),
...@@ -133,6 +145,7 @@ const ConfgUndertake = (props, ref) => { ...@@ -133,6 +145,7 @@ const ConfgUndertake = (props, ref) => {
borderTopColor: '#99bbe8', borderTopColor: '#99bbe8',
color: '#15428b', color: '#15428b',
fontWeight: 700, fontWeight: 700,
marginTop: '0px',
}} }}
> >
承办管理 承办管理
...@@ -158,6 +171,14 @@ const ConfgUndertake = (props, ref) => { ...@@ -158,6 +171,14 @@ const ConfgUndertake = (props, ref) => {
dataSource={roleList} dataSource={roleList}
columns={columns} columns={columns}
rowKey={record => record.roleId} rowKey={record => record.roleId}
// rowClassName={(record, index) => {
// if (record.type === 2) {
// return styles.role;
// }
// if (record.type === 1) {
// return styles.organization;
// }
// }}
bordered bordered
size="small" size="small"
scroll={{ y: 'calc(100vh - 630px)' }} scroll={{ y: 'calc(100vh - 630px)' }}
......
.role {
color: #d46b08;
}
.organization {
color: #08979c;
}
\ No newline at end of file
...@@ -60,10 +60,10 @@ const ConfigCopyPerson = (props, ref) => { ...@@ -60,10 +60,10 @@ const ConfigCopyPerson = (props, ref) => {
fontWeight: 700, fontWeight: 700,
}} }}
> >
节点抄送 节点抄送
</Divider> </Divider>
<div style={{ display: 'flex', justifyContent: 'right', marginBottom: '12px' }}> <div style={{ display: 'flex', justifyContent: 'right', marginBottom: '12px' }}>
开启抄送 允许抄送
<Switch <Switch
style={{ marginLeft: '5px' }} style={{ marginLeft: '5px' }}
checked={TurnOnCc.current !== 0} checked={TurnOnCc.current !== 0}
......
...@@ -228,6 +228,10 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -228,6 +228,10 @@ const ConfigNodeMsg = (props, ref) => {
}; };
// 节点配置表单监听 // 节点配置表单监听
const changeValue = (changedFields, allFields) => { const changeValue = (changedFields, allFields) => {
// 新增节点时节点名称跟别名同步
if (changedFields[0].name[0] === 'NodeName') {
nodeChage('NodeAliasName', changedFields[0].value);
}
nodeChage(changedFields[0].name[0], changedFields[0].value); nodeChage(changedFields[0].name[0], changedFields[0].value);
}; };
...@@ -239,6 +243,7 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -239,6 +243,7 @@ const ConfigNodeMsg = (props, ref) => {
borderTopColor: '#99bbe8', borderTopColor: '#99bbe8',
color: '#15428b', color: '#15428b',
fontWeight: 700, fontWeight: 700,
marginTop: '0px',
}} }}
> >
{nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22' {nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22'
...@@ -270,17 +275,34 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -270,17 +275,34 @@ const ConfigNodeMsg = (props, ref) => {
<Form.Item label="排序" name="SerialNo" rules={[{ required: true, message: '请输入排序' }]}> <Form.Item label="排序" name="SerialNo" rules={[{ required: true, message: '请输入排序' }]}>
<Input placeholder="请输入序号" disabled /> <Input placeholder="请输入序号" disabled />
</Form.Item> </Form.Item>
{/* 第一次填写显示,如果是网关、子节点一直显示 */}
<Form.Item <Form.Item
style={{
display:
!editMsg.ActivityId ||
nodeMsg.NodeType === '20' ||
nodeMsg.NodeType === '21' ||
nodeMsg.NodeType === '22' ||
nodeMsg.NodeType === '30'
? 'flex'
: 'none',
}}
label={`${ label={`${
nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22' nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22'
? '网关' ? '网关'
: '节点' : '节点'
}名称`} }名称`}
name="NodeName" name="NodeName"
rules={[{ required: true, message: '请输入节点名称' }]} rules={[{ required: true, message: '请输入名称' }]}
> >
<Input <Input
disabled={editMsg.ActivityId} disabled={
editMsg.ActivityId &&
nodeMsg.NodeType !== '20' &&
nodeMsg.NodeType !== '21' &&
nodeMsg.NodeType !== '22' &&
nodeMsg.NodeType !== '30'
}
placeholder={`请输入${ placeholder={`请输入${
nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22' nodeMsg.NodeType === '20' || nodeMsg.NodeType === '21' || nodeMsg.NodeType === '22'
? '网关' ? '网关'
...@@ -309,8 +331,14 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -309,8 +331,14 @@ const ConfigNodeMsg = (props, ref) => {
: 'block', : 'block',
}} }}
> >
<Form.Item label="节点别名" name="NodeAliasName"> <Form.Item
<Input placeholder="请输入节点别名" /> style={{
display: editMsg.ActivityId ? 'flex' : 'none',
}}
label="节点名称"
name="NodeAliasName"
>
<Input placeholder="请输入节点名称" />
</Form.Item> </Form.Item>
<Form.Item label="移交方式" name="Handover"> <Form.Item label="移交方式" name="Handover">
<Radio.Group> <Radio.Group>
...@@ -329,6 +357,7 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -329,6 +357,7 @@ const ConfigNodeMsg = (props, ref) => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Tooltip title={form.getFieldValue('Fields')}>
<Form.Item <Form.Item
label={ label={
<div className={styles.formData_label}> <div className={styles.formData_label}>
...@@ -356,6 +385,8 @@ const ConfigNodeMsg = (props, ref) => { ...@@ -356,6 +385,8 @@ const ConfigNodeMsg = (props, ref) => {
/> />
</div> </div>
</Form.Item> </Form.Item>
</Tooltip>
{/* <Form.Item label="前端视图" name="WebPage"> {/* <Form.Item label="前端视图" name="WebPage">
<Input placeholder="请配置前端视图" /> <Input placeholder="请配置前端视图" />
</Form.Item> </Form.Item>
......
...@@ -63,7 +63,7 @@ const ConfigSubprocess = (props, ref) => { ...@@ -63,7 +63,7 @@ const ConfigSubprocess = (props, ref) => {
); );
console.log(res.data.ParentFlowMapList, 'res.data.ParentFlowMapList'); console.log(res.data.ParentFlowMapList, 'res.data.ParentFlowMapList');
setCurrentNodeField(res.data.ParentFlowMapList); setCurrentNodeField(res.data.ParentFlowMapList);
setChildNodeField(res.data.SubFlowMapInfo.TableFieldNames); setChildNodeField([res.data.SubFlowMapInfo]);
} else { } else {
message.error(res.msg); message.error(res.msg);
} }
...@@ -77,9 +77,9 @@ const ConfigSubprocess = (props, ref) => { ...@@ -77,9 +77,9 @@ const ConfigSubprocess = (props, ref) => {
nodeField: item.ParentFlowMapTableName nodeField: item.ParentFlowMapTableName
? `${item.ParentFlowMapTableName}-${item.ParentFlowMapFieldName}` ? `${item.ParentFlowMapTableName}-${item.ParentFlowMapFieldName}`
: '', : '',
subNodeField: `${item.SubFlowMapTableName}-${item.SubFlowMapFieldName}-${ subNodeField: item.SubFlowMapTableName
item.SubFlowMapTableType ? `${item.SubFlowMapTableName}-${item.SubFlowMapFieldName}-${item.SubFlowMapTableType}`
}`, : '',
})), })),
}); });
} }
...@@ -131,7 +131,7 @@ const ConfigSubprocess = (props, ref) => { ...@@ -131,7 +131,7 @@ const ConfigSubprocess = (props, ref) => {
console.log(res.data.ParentFlowMapList, 'res.data.ParentFlowMapList'); console.log(res.data.ParentFlowMapList, 'res.data.ParentFlowMapList');
setCurrentNodeField(res.data.ParentFlowMapList); setCurrentNodeField(res.data.ParentFlowMapList);
setChildNodeField(res.data.SubFlowMapInfo.TableFieldNames); setChildNodeField([res.data.SubFlowMapInfo]);
} else { } else {
message.error(res.msg); message.error(res.msg);
} }
...@@ -155,7 +155,7 @@ const ConfigSubprocess = (props, ref) => { ...@@ -155,7 +155,7 @@ const ConfigSubprocess = (props, ref) => {
fontWeight: 700, fontWeight: 700,
}} }}
> >
子流程配 流程设
</Divider> </Divider>
<Form <Form
form={form} form={form}
...@@ -163,7 +163,7 @@ const ConfigSubprocess = (props, ref) => { ...@@ -163,7 +163,7 @@ const ConfigSubprocess = (props, ref) => {
wrapperCol={{ span: 18 }} wrapperCol={{ span: 18 }}
onFieldsChange={changeValue} onFieldsChange={changeValue}
> >
<Form.Item label="选择流程" name="flowKey"> <Form.Item label="选择流程" name="flowKey">
<Select <Select
showSearch showSearch
optionFilterProp="children" optionFilterProp="children"
...@@ -234,10 +234,19 @@ const ConfigSubprocess = (props, ref) => { ...@@ -234,10 +234,19 @@ const ConfigSubprocess = (props, ref) => {
> >
<Select placeholder="字段名" showSearch> <Select placeholder="字段名" showSearch>
{childNodeField?.map((item, index) => ( {childNodeField?.map((item, index) => (
<OptGroup key={index} label={item.TableName}>
{item.TableFieldNames.map(ele => (
<Option value={ele.value} key={ele.value}>
{ele?.label}
</Option>
))}
</OptGroup>
))}
{/* {childNodeField[0].TableFieldNames?.map((item, index) => (
<Option value={item.value} key={item.value}> <Option value={item.value} key={item.value}>
{item.label} {item.label}
</Option> </Option>
))} ))} */}
</Select> </Select>
</Form.Item> </Form.Item>
<MinusCircleOutlined onClick={() => remove(name)} /> <MinusCircleOutlined onClick={() => remove(name)} />
......
...@@ -65,18 +65,18 @@ const ConfigTimeLimit = (props, ref) => { ...@@ -65,18 +65,18 @@ const ConfigTimeLimit = (props, ref) => {
render: record => ( render: record => (
<> <>
<Space> <Space>
<Tooltip title="修改流程时限配置"> {/* <Tooltip title="修改流程时限配置">
<EditTwoTone <EditTwoTone
onClick={() => toEdit(record)} onClick={() => toEdit(record)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip> */}
<Tooltip title="删除流程时限配置"> {/* <Tooltip title="删除流程时限配置"> */}
<DeleteOutlined <DeleteOutlined
onClick={() => delRow(record)} onClick={() => delRow(record)}
style={{ fontSize: '16px', color: '#e86060' }} style={{ fontSize: '16px', color: '#e86060' }}
/> />
</Tooltip> {/* </Tooltip> */}
</Space> </Space>
</> </>
), ),
...@@ -90,6 +90,7 @@ const ConfigTimeLimit = (props, ref) => { ...@@ -90,6 +90,7 @@ const ConfigTimeLimit = (props, ref) => {
borderTopColor: '#99bbe8', borderTopColor: '#99bbe8',
color: '#15428b', color: '#15428b',
fontWeight: 700, fontWeight: 700,
marginTop: '0px',
}} }}
> >
时限配置 时限配置
......
...@@ -72,18 +72,18 @@ const ConfigView = (props, ref) => { ...@@ -72,18 +72,18 @@ const ConfigView = (props, ref) => {
render: record => ( render: record => (
<> <>
<Space> <Space>
<Tooltip title="修改节点辅助视图"> {/* <Tooltip title="修改节点辅助视图">
<EditTwoTone <EditTwoTone
onClick={() => toEdit(record)} onClick={() => toEdit(record)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip> */}
<Tooltip title="删除节点辅助视图"> {/* <Tooltip title="删除节点辅助视图"> */}
<DeleteOutlined <DeleteOutlined
onClick={() => delRow(record)} onClick={() => delRow(record)}
style={{ fontSize: '16px', color: '#e86060' }} style={{ fontSize: '16px', color: '#e86060' }}
/> />
</Tooltip> {/* </Tooltip> */}
</Space> </Space>
</> </>
), ),
......
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