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