Commit 4a754bef authored by 皮倩雯's avatar 皮倩雯

fix: '工单抄送,按照条件抄送'

parent 8905faae
Pipeline #83647 passed with stages
This diff is collapsed.
.pushTestContent { .pushTestContent {
display: flex; position: relative;
width: 900px;
.ant-modal-header {
border-bottom: none;
}
.ant-modal-title {
margin-top: 10px;
}
.ant-modal-body {
padding-bottom: 0;
}
:global {
::-webkit-scrollbar-thumb {
border-radius: 0;
}
::-webkit-scrollbar {
display: none;
}
}
.content {
display: flex;
}
.searchHeader { .searchHeader {
display: flex; display: flex;
align-items: flex-end;
background-color: #f2f1f1;
height: 40px;
margin-left: -15px;
margin-right: -15px;
line-height: 40px;
.people {
width: 62px;
height: 38px;
color: #666666;
display: flex;
align-items: center;
justify-content: center;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.peoplePick {
background: #fff;
width: 62px;
height: 38px;
color: #50a9f1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.list {
height: 40px;
line-height: 40px;
margin-left: 45px;
font-weight: 700;
font-size: 14px;
color: #00070d;
}
.searchInput {
width: 200px;
z-index: 1;
.ant-input,
.ant-input-affix-wrapper {
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
}
.ant-input-group-addon {
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
}
.ant-input-search-button {
width: 40px;
border-top-right-radius: 20px !important;
border-bottom-right-radius: 20px !important;
}
}
.checkList {
display: flex;
align-items: center;
.person {
width: 10px;
height: 3px;
margin-right: 5px;
background-color: #87e8de;
margin-left: 20px;
}
.role {
width: 10px;
height: 3px;
margin-right: 5px;
background-color: #a785dd;
margin-left: 20px;
}
}
.person {
width: 10px;
height: 3px;
margin-right: 5px;
background-color: #87e8de;
margin-left: 20px;
}
.role {
width: 10px;
height: 3px;
margin-right: 5px;
background-color: #a785dd;
margin-left: 20px;
}
} }
.checkContainer { .checkContainer {
height: 500px; height: 500px;
width: 500px; width: 500px;
overflow-y: scroll; overflow-y: scroll;
margin: 20px 0; margin: 0 0 10px 0;
padding-right: 5px; padding-right: 5px;
.checkContent { .checkContent {
display: flex; display: flex;
...@@ -34,6 +145,7 @@ ...@@ -34,6 +145,7 @@
.ant-checkbox-wrapper { .ant-checkbox-wrapper {
min-width: 150px; min-width: 150px;
margin-left: 0; margin-left: 0;
margin-bottom: 5px;
} }
// .ant-checkbox-group-item { // .ant-checkbox-group-item {
// min-width: 150px !important; // min-width: 150px !important;
...@@ -48,7 +160,167 @@ ...@@ -48,7 +160,167 @@
} }
} }
} }
.checkContainer1 {
height: 500px;
overflow-y: scroll;
.checkContents {
.list {
border: 1px solid #c2cdfd;
border-radius: 5px;
margin-top: 20px;
.parent {
margin: -20px 0 0 20px;
height: 38px;
line-height: 38px;
transition: all 0.3s;
overflow: hidden;
span {
color: grey;
font-size: 12px;
background: #fff;
}
.imgDown {
display: inline-block;
position: relative;
top: -2px;
margin-right: 5px;
&:hover {
cursor: pointer;
}
}
}
.childs {
overflow: hidden;
width: 490px;
transition: all 0.3s;
.child {
overflow: hidden;
height: 38px;
line-height: 38px;
padding-left: 30px;
border-bottom: 1px solid #f2f2f2;
&:hover {
color: #0087f7;
cursor: pointer;
}
&[active='true'] {
color: #0087f7;
}
}
}
}
.checkContent1 {
display: flex;
flex-wrap: wrap;
margin-left: 15px;
width: 475px;
margin-top: 0px;
flex-direction: row;
// border: 1px solid #c2cdfd;
// border-radius: 5px;
min-height: 50px;
padding: 10px 10px 0px 6px;
.check {
width: 130px;
margin-bottom: 10px;
margin-right: 10px;
.ant-checkbox-wrapper span {
max-width: 130px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.checkGroupContent {
display: flex;
flex-wrap: wrap;
width: 460px;
flex-direction: row;
border: 1px solid #c2cdfd;
border-radius: 5px;
margin: 10px 15px;
margin-right: 5px;
min-height: 50px;
padding: 0 10px 10px 16px;
.ant-checkbox-wrapper {
background-color: #fff;
}
.topCheckbox {
height: 20px;
margin: -10px 0 0 20px;
line-height: 20px;
> span {
background-color: white;
}
}
.topCheckbox > label :hover {
font-weight: 600;
}
.bottomCheckbox {
display: flex;
flex-wrap: wrap;
margin-left: -88px;
margin-top: 15px;
.ant-checkbox-wrapper {
display: flex;
margin-left: 0;
width: 130px;
margin-right: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 10px;
.ant-checkbox + span {
display: flex;
}
}
.fontlabel {
display: inline-block;
width: 130px;
overflow: hidden;
text-overflow: ellipsis;
// white-space: nowrap;
}
// .ant-checkbox-group-item {
// min-width: 150px !important;
// }
// .ant-checkbox-wrapper {
// min-width: 150px !important;
// }
}
.checkdiv {
display: flex;
flex-wrap: wrap;
}
}
}
}
.tableRight { .tableRight {
margin-left: 10px; margin-left: 10px;
padding: 10px 0px 10px 10px;
border-left: 1px solid #f0f0f0;
height: 510px;
width: 370px;
overflow-y: scroll;
.selectContent {
display: flex;
flex-wrap: wrap;
flex-direction: row;
.selectValue {
margin-bottom: 15px;
}
}
} }
} }
/* eslint-disable no-else-return */
import React, { useEffect, useState, useRef } from 'react'; import React, { useEffect, useState, useRef } from 'react';
import { RuleValidation, RuleValidationPost } from '@/services/workflow/workflow'; import { RuleValidation, RuleValidationPost } from '@/services/workflow/workflow';
import { Modal, Input, Form, message, Dropdown, Menu } from 'antd'; import { Modal, Input, Form, message, Dropdown, Menu } from 'antd';
...@@ -9,6 +10,7 @@ const fnList = [ ...@@ -9,6 +10,7 @@ const fnList = [
{ label: '是否为工作时间', value: '$fn.isWorkTime()' }, { label: '是否为工作时间', value: '$fn.isWorkTime()' },
{ label: '上报人工单统计', value: '$fn.caseNum()' }, { label: '上报人工单统计', value: '$fn.caseNum()' },
]; ];
const RuleConfig = props => { const RuleConfig = props => {
const { const {
visible, visible,
...@@ -26,6 +28,22 @@ const RuleConfig = props => { ...@@ -26,6 +28,22 @@ const RuleConfig = props => {
const ruleText = useRef(); const ruleText = useRef();
const chooseIndex = useRef(0); const chooseIndex = useRef(0);
const [form] = Form.useForm(); const [form] = Form.useForm();
const options = val => {
if (val === '撤回') {
return `$action.nodeAction='撤回'`;
} else if (val === '回退') {
return `$action.nodeAction='回退'`;
} else if (val === '转办') {
return `$action.nodeAction='转办'`;
} else if (val === '移交') {
return `$action.nextNodeName`;
} else if (val === '挂起') {
return `$action.nodeAction='挂起'`;
} else if (val === '解挂') {
return `$action.nodeAction='解挂'`;
}
};
useEffect(() => { useEffect(() => {
if (visible) { if (visible) {
setExpandedKey(fieldList?.[0]?.TableName); setExpandedKey(fieldList?.[0]?.TableName);
...@@ -68,7 +86,13 @@ const RuleConfig = props => { ...@@ -68,7 +86,13 @@ const RuleConfig = props => {
}); });
const onSelect = (prop, treeNode) => { const onSelect = (prop, treeNode) => {
if (!treeNode.node.children) { if (!treeNode.node.children) {
insert(`{${treeNode.node.key}}`); let name = treeNode.node.key.split('.')[0];
if (name === '操作动作') {
let aa = treeNode.node.title;
insert(options(aa));
} else {
insert(`{${treeNode.node.key}}`);
}
} }
setCurrentSelectId(prop[0]); setCurrentSelectId(prop[0]);
}; };
...@@ -115,7 +139,7 @@ const RuleConfig = props => { ...@@ -115,7 +139,7 @@ const RuleConfig = props => {
/> />
</div> </div>
<div className={styles.rightContent}> <div className={styles.rightContent}>
{flag == 1 && <div className={styles.title}>符合以下条件时工单扭转到对应的节点</div>} {/* {flag == 1 && <div className={styles.title}>符合以下条件时工单扭转到对应的节点</div>} */}
<div className={styles.textAreaBox}> <div className={styles.textAreaBox}>
{flag == 1 && ( {flag == 1 && (
<Dropdown overlay={fnListRender} placement="bottom" arrow> <Dropdown overlay={fnListRender} placement="bottom" arrow>
......
...@@ -222,6 +222,31 @@ const FlowChart = props => { ...@@ -222,6 +222,31 @@ const FlowChart = props => {
label: ele.userName, label: ele.userName,
value: ele.userID, value: ele.userID,
})); }));
if (obj.CCRuleList?.length > 0) {
obj.CCRuleList.map(i => {
if (i.UserIds?.length > 0) {
i.UserList = i.UserIds.map(ele => ({
label: ele.UserName,
value: ele.UserID,
}));
i.UserIds = i.UserIds.map(ele => ele.UserID).toString();
} else {
i.UserList = [];
i.UserIds = '';
}
if (i.RoleIds?.length > 0) {
i.RoleList = i.RoleIds.map(ele => ({
label: ele.UserName,
value: ele.UserID,
}));
i.RoleIds = i.RoleIds.map(ele => ele.UserID).toString();
} else {
i.RoleList = [];
i.RoleIds = '';
}
i.PersonList = [...i.UserList, ...i.RoleList];
});
}
if (obj.points === '') { if (obj.points === '') {
if (obj.NodeType === '1') { if (obj.NodeType === '1') {
obj.points = `${(index * 200).toString()}" 100"`; obj.points = `${(index * 200).toString()}" 100"`;
...@@ -344,6 +369,7 @@ const FlowChart = props => { ...@@ -344,6 +369,7 @@ const FlowChart = props => {
RuleList: [], RuleList: [],
roleList: [], roleList: [],
CarbonCopyPeopleList: [], CarbonCopyPeopleList: [],
CCRuleList: [],
ExtendPageList: [], ExtendPageList: [],
FlowNodeBackfillConfigs: [], FlowNodeBackfillConfigs: [],
FlowTimerList: [], FlowTimerList: [],
......
...@@ -267,6 +267,31 @@ const FlowChart = props => { ...@@ -267,6 +267,31 @@ const FlowChart = props => {
label: ele.userName, label: ele.userName,
value: ele.userID, value: ele.userID,
})); }));
if (obj.CCRuleList?.length > 0) {
obj.CCRuleList.map(i => {
if (i.UserIds?.length > 0) {
i.UserList = i.UserIds.map(ele => ({
label: ele.UserName,
value: ele.UserID.toString(),
}));
i.UserIds = i.UserIds.map(ele => ele.UserID).toString();
} else {
i.UserList = [];
i.UserIds = '';
}
if (i.RoleIds?.length > 0) {
i.RoleList = i.RoleIds.map(ele => ({
label: ele.UserName,
value: ele.UserID,
}));
i.RoleIds = i.RoleIds.map(ele => ele.UserID).toString();
} else {
i.RoleList = [];
i.RoleIds = '';
}
i.PersonList = [...i.UserList, ...i.RoleList];
});
}
if (obj.points === '') { if (obj.points === '') {
if (obj.NodeType === '1') { if (obj.NodeType === '1') {
obj.points = `${(index * 200).toString()}" 100"`; obj.points = `${(index * 200).toString()}" 100"`;
...@@ -418,12 +443,12 @@ const FlowChart = props => { ...@@ -418,12 +443,12 @@ const FlowChart = props => {
RuleList: [], RuleList: [],
roleList: [], roleList: [],
CarbonCopyPeopleList: [], CarbonCopyPeopleList: [],
CCRuleList: [],
ExtendPageList: [], ExtendPageList: [],
FlowNodeBackfillConfigs: [], FlowNodeBackfillConfigs: [],
FlowTimerList: [], FlowTimerList: [],
TurnOnCc: 1, TurnOnCc: 1,
NodeAliasName: '', NodeAliasName: '',
TableName: '', TableName: '',
Fields: '', Fields: '',
WebPage: '', WebPage: '',
...@@ -1270,9 +1295,13 @@ const FlowChart = props => { ...@@ -1270,9 +1295,13 @@ const FlowChart = props => {
// }); // });
// return; // return;
// } // }
let list = new Set([]); let list = new Set([]);
let errorList = new Set(); let errorList = new Set();
diagramObj.nodeDataArray.forEach(item => { diagramObj.nodeDataArray.forEach(item => {
if ((item.NodeType !== '20' || item.NodeType !== '21') && item.RuleList) {
item.RuleList = [];
}
if (item.NodeType === '1' || item.NodeType === '1' || item.NodeType === '1') { if (item.NodeType === '1' || item.NodeType === '1' || item.NodeType === '1') {
if (!item.TableName || !item.Fields) { if (!item.TableName || !item.Fields) {
errorList.add(item.NodeName); errorList.add(item.NodeName);
...@@ -1282,12 +1311,10 @@ const FlowChart = props => { ...@@ -1282,12 +1311,10 @@ const FlowChart = props => {
item.RuleList.forEach(ele => { item.RuleList.forEach(ele => {
if (!ele.RuleName) { if (!ele.RuleName) {
list.add(item.NodeName); list.add(item.NodeName);
return; return;
} }
if (!ele.NextNodeId && ele.NextNodeId !== 0) { if (!ele.NextNodeId && ele.NextNodeId !== 0) {
list.add(item.NodeName); list.add(item.NodeName);
return; return;
} }
if (!ele.RuleContent) { if (!ele.RuleContent) {
......
...@@ -70,7 +70,7 @@ const NodeModal = props => { ...@@ -70,7 +70,7 @@ const NodeModal = props => {
return; return;
} }
if (!obj.Fields&&editMsg.NodeType==1) { if (!obj.Fields && editMsg.NodeType == 1) {
message.error('请选择编辑字段'); message.error('请选择编辑字段');
return; return;
} }
...@@ -252,7 +252,13 @@ const NodeModal = props => { ...@@ -252,7 +252,13 @@ const NodeModal = props => {
{/* 承办管理 */} {/* 承办管理 */}
<ConfgUndertake ref={refConfgUndertake} nodeChage={nodeChage} editMsg={editMsg} /> <ConfgUndertake ref={refConfgUndertake} nodeChage={nodeChage} editMsg={editMsg} />
{/* 节点抄送人 */} {/* 节点抄送人 */}
<ConfigCopyPerson ref={refConfigCopyPerson} nodeChage={nodeChage} editMsg={editMsg} /> <ConfigCopyPerson
ref={refConfigCopyPerson}
nodeChage={nodeChage}
flowID={flowID}
editMsg={editMsg}
flowData={flowData}
/>
</div> </div>
{/* 子流程配置 */} {/* 子流程配置 */}
{editMsg.NodeType === '30' && ( {editMsg.NodeType === '30' && (
......
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