Commit ab374b49 authored by 邓超's avatar 邓超

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

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