Commit 137e1ffb authored by 皮倩雯's avatar 皮倩雯

fix: '流程管理时限配置'

parent 416a34d8
Pipeline #47164 passed with stages
in 7 minutes 6 seconds
......@@ -91,36 +91,38 @@ const BaseForm = props => {
}, []);
return (
<Form form={form} {...formProps} {...restProps}>
{items &&
items.map(item => {
const {
label,
dataIndex,
initialValue = '',
rules = [],
formItemProps = {},
...rest
} = item;
return (
<Form.Item
label={label}
name={dataIndex}
key={`formItem_${dataIndex}`}
rules={rules}
initialValue={initialValue}
{...formItemProps}
>
<BaseFormItem {...rest} />
</Form.Item>
);
<div style={{ height: '800px', overflow: 'scroll' }}>
<Form form={form} {...formProps} {...restProps}>
{items &&
items.map(item => {
const {
label,
dataIndex,
initialValue = '',
rules = [],
formItemProps = {},
...rest
} = item;
return (
<Form.Item
label={label}
name={dataIndex}
key={`formItem_${dataIndex}`}
rules={rules}
initialValue={initialValue}
{...formItemProps}
>
<BaseFormItem {...rest} />
</Form.Item>
);
})}
{renderButtonGroup({
buttons,
wrapper: buttonsWraper || (bts => <Form.Item>{bts}</Form.Item>),
})}
{renderButtonGroup({
buttons,
wrapper: buttonsWraper || (bts => <Form.Item>{bts}</Form.Item>),
})}
{children}
</Form>
{children}
</Form>
</div>
);
};
......
......@@ -186,7 +186,7 @@
white-space: nowrap;
}
.ant-table-body {
height: calc(100vh - 160px);
height: calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
......
......@@ -113,6 +113,7 @@ const Flow = () => {
};
// 跳转到对应的流程节点
const toNode = flowName => {
console.log(flowName);
history.push({
pathname: '/bsmanger/workOrder/flowNode',
state: { flowName, pickItemIndex },
......
import React, { useEffect, useState } from 'react';
import { reloadFlowTimers, removeFlowTimer } from '@/services/flow/flow';
import { reloadFlowTimers, removeFlowTimer, reloadFlowNodes } from '@/services/flow/flow';
import {
Table,
Modal,
......
......@@ -3,6 +3,7 @@ import {
flowReloadFlowNodes,
reloadTimeLimitadFlowNodes,
operateFlowTimer,
reloadFlowNodes,
} from '@/services/flow/flow';
import { Form, Modal, Input, notification, Select } from 'antd';
const { Option } = Select;
......@@ -11,16 +12,19 @@ const AddModal = props => {
const { onSubumit, handleCancel, visible, msg, flowId, modalType, title } = props;
const [flowNodes, setFlowNodes] = useState([]);
const [timeLimitFlowNodes, setTimeLimitFlowNodes] = useState([]);
const [timeLimitFlowNodesEnd, setTimeLimitFlowNodesEnd] = useState([]);
const [startNodeIndex, setStartNodeIndex] = useState(null);
const [endNodeIndex, setEndNodeIndex] = useState(null);
const [keepTableName, setKeepTableName] = useState('');
const [keepData, setKeepData] = useState('');
const [form] = Form.useForm();
useEffect(() => {
console.log(title);
form.resetFields();
setStartNodeIndex(null);
setEndNodeIndex(null);
if (visible) {
getFlowNodes();
getLimitadFlowNodes();
if (modalType === 'edit') {
getFormData();
} else {
......@@ -42,13 +46,21 @@ const AddModal = props => {
}
}, [flowNodes]);
// 根据下拉框选择的流程节点关联的表名加载指派字段
const getLimitadFlowNodes = () => {
reloadTimeLimitadFlowNodes({ flowNodeTableName: title }).then(res => {
const getLimitadFlowNodes = e => {
reloadTimeLimitadFlowNodes({ flowNodeTableName: e }).then(res => {
if (res.code === 0) {
setTimeLimitFlowNodes(res.data);
}
});
};
const getLimitadFlowNodesEnd = e => {
reloadTimeLimitadFlowNodes({ flowNodeTableName: e }).then(res => {
if (res.code === 0) {
setTimeLimitFlowNodesEnd(res.data);
}
});
};
// 根据流程ID加载起止节点和终止节点
const getFlowNodes = () => {
flowReloadFlowNodes({ flowId }).then(res => {
......@@ -64,7 +76,20 @@ const AddModal = props => {
};
// 表单监听
const onValuesChange = val => {
console.log(val);
console.log(Object.keys(val)[0]);
console.log(flowNodes);
if (Object.keys(val)[0] === 'StartNode') {
reloadFlowNodes({ flowName: title }).then(res => {
if (res.code === 0) {
console.log(res.data[0].Items);
let aa = res.data[0].Items.find(i => i.name == val.StartNode);
console.log(val.StartNode);
console.log(aa.extendTableName);
getLimitadFlowNodes(aa.extendTableName);
// 存入需要展开得节点
}
});
flowNodes.forEach((item, index) => {
if (item.Name === val.StartNode) {
setStartNodeIndex(index);
......@@ -72,6 +97,16 @@ const AddModal = props => {
});
}
if (Object.keys(val)[0] === 'EndNode') {
reloadFlowNodes({ flowName: title }).then(res => {
if (res.code === 0) {
console.log(res.data[0].Items);
let aa = res.data[0].Items.find(i => i.name == val.EndNode);
console.log(val.EndNode);
console.log(aa.extendTableName);
getLimitadFlowNodesEnd(aa.extendTableName);
// 存入需要展开得节点
}
});
flowNodes.forEach((item, index) => {
if (item.Name === val.EndNode) {
setEndNodeIndex(index);
......@@ -225,7 +260,7 @@ const AddModal = props => {
rules={[{ required: true, message: '请选择超时记录字段' }]}
>
<Select>
{timeLimitFlowNodes.map(item => (
{timeLimitFlowNodesEnd.map(item => (
<Option value={item.Name} key={item.ID}>
<span>{item.Name}</span>
</Option>
......
......@@ -216,7 +216,7 @@ const EditForm = props => {
<Item name="pageUrl" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请输入功能路径" style={{ width: '100%' }} />
</Item>
<Button onClick={addParama}>添加参数</Button>
<Button onClick={addParama}>参数管理</Button>
</div>
</Item>
<Item label="功能参数" name="funParam" style={{ marginLeft: '11px' }}>
......
......@@ -4,7 +4,7 @@
height: calc(100vh - 72px);
}
.leftList {
width: 330px;
width: 500px;
}
.rightForm {
width: 100%;
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-03-31 18:43:46
* @LastEditTime: 2022-04-01 19:16:22
* @LastEditors: leizhe
*/
import React from 'react';
......@@ -22,11 +22,6 @@ export default props => {
visible={visible}
maskClosable
destroyOnClose
// footer={
// <Space>
// <Button type="primary">确定</Button>
// </Space>
// }
>
<WebConfigForm
hasIntegerate={hasIntegerate}
......
......@@ -337,7 +337,7 @@ const EditForm = props => {
<Item name="pageUrl" style={{ marginBottom: 0, width: '100%' }}>
<Input placeholder="请输入功能路径" style={{ width: '100%' }} />
</Item>
<Button onClick={addParama}>添加参数</Button>
<Button onClick={addParama}>参数管理</Button>
</div>
</Item>
<Item label="配置文件" name="config" style={{ marginLeft: '11px' }}>
......
......@@ -162,7 +162,7 @@ const UserManage = () => {
title: '登录名',
dataIndex: 'loginName',
key: 'loginName',
width: 150,
// width: 100,
// fixed: 'left',
render: item => searchStyle(item),
},
......@@ -170,14 +170,14 @@ const UserManage = () => {
title: '用户姓名',
dataIndex: 'userName',
key: 'userName',
width: 150,
// width: 100,
render: item => searchStyle(item),
},
{
title: '所在机构',
dataIndex: 'OUName',
key: 'OUName',
width: 150,
// width: 150,
ellipsis: true,
filters: orgFilters,
filteredValue,
......@@ -187,7 +187,7 @@ const UserManage = () => {
title: '手机号码',
dataIndex: 'phone',
key: 'phone',
width: 150,
// width: 150,
ellipsis: true,
render: text => {
if (text) {
......@@ -200,7 +200,7 @@ const UserManage = () => {
title: '钉钉账户',
dataIndex: 'ddid',
key: 'ddid',
width: 150,
// width: 150,
render: record => {
if (record) {
return (
......@@ -216,7 +216,7 @@ const UserManage = () => {
title: '微信账户',
dataIndex: 'wxid',
key: 'wxid',
width: 140,
// width: 140,
render: record => {
if (record) {
return (
......@@ -232,7 +232,7 @@ const UserManage = () => {
title: '操作',
key: 'action',
// fixed: 'right',
width: 250,
// width: 200,
align: 'center',
render: record => (
<Space size="middle">
......@@ -1461,8 +1461,8 @@ const UserManage = () => {
{/* 右侧用户表 */}
<div
className={classnames({
[styles.userContainer]: true,
[styles.userContainerHide]: !treeVisible,
[styles.userContainer]: true,
})}
>
<div style={{ height: '50px' }}>
......@@ -1493,6 +1493,18 @@ const UserManage = () => {
</Dropdown>
</span>
</div>
{/* <div
className={classnames({
[styles.boxR]: true,
[styles.boxH]: treeVisible,
})}
>
<div
className={classnames({
[styles.boxH]: treeVisible,
[styles.cardBoxR]: true,
})}
> */}
<Table
rowSelection={{
type: 'checkbox',
......@@ -1517,6 +1529,8 @@ const UserManage = () => {
}}
onChange={onChangeInput}
/>
{/* </div>
</div> */}
</div>
{/* Modal弹框 */}
......
......@@ -138,15 +138,16 @@
display: flex;
width: 100%;
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
}
// .ant-table.ant-table-bordered > .ant-table-container {
// min-width: 81%;
// }
.ant-tree-switcher_close .ant-tree-switcher-icon svg {
margin: auto;
}
.orgContainer {
height: calc(100vh - 74px);
width: 320px;
padding-right: 10px;
left: 0;
top: 0;
overflow-x: hidden;
......@@ -159,6 +160,7 @@
padding-top: 6px;
.ant-tree-switcher {
line-height: 1;
margin-right: 0px !important;
color: #1890ff;
.ant-tree-switcher-line-icon {
margin-left: 5px;
......@@ -218,11 +220,14 @@
white-space: nowrap;
text-overflow: ellipsis;
}
// .userContainerHide {
// width: 100%;
// }
.userContainer {
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
background: white;
min-width: 800px;
width: 100%;
position: relative;
transition: width 0.5s;
......@@ -275,6 +280,14 @@
}
}
}
.boxR {
width: 100%;
position: relative;
transition: width 2s;
}
.cardBoxR {
min-width: 600px;
}
.ant-modal-root {
.ant-tree-switcher {
line-height: 1;
......
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