Commit e84e809a authored by 邓超's avatar 邓超

fix: 修改消息测试推送、工作流时限配置bug

parent 7e190049
......@@ -25,6 +25,16 @@ const AddModal = props => {
if (visible) {
getFlowNodes();
if (modalType === 'edit') {
console.log(msg, 'aa ');
reloadFlowNodes({ flowName: title }).then(res => {
if (res.code === 0) {
let aa = res.data[0].Items.find(i => i.name == msg.StartNode);
getLimitadFlowNodes(aa.extendTableName);
let bb = res.data[0].Items.find(i => i.name == msg.EndNode);
getLimitadFlowNodesEnd(bb.extendTableName);
// 存入需要展开得节点
}
});
getFormData();
} else {
form.setFieldsValue({
......
......@@ -20,49 +20,12 @@ const CardCheck = props => {
const prevAmount = usePrevious({ checkedList });
useEffect(() => {
setPlainOptions(cardMsg.plainOptions);
setCheckedList(cardMsg.checkedList);
setIndeterminate(cardMsg.indeterminate);
setCheckAll(cardMsg.checkAll);
}, []);
// useEffect(() => {
// if (prevAmount) {
// let newCheckList = [...checkList];
// console.log(newCheckList);
// // 当前选中的
// let currentArr = checkedList;
// // 上一次选中的
// let preArr = prevAmount.checkedList;
// currentArr = new Set(currentArr);
// preArr = new Set(preArr);
// // 找出相同的部分
// let someArr = [...new Set([...currentArr].filter(x => preArr.has(x)))];
// // 复选框事选中还是取消选中 add or del
// let checkType;
// if ([...currentArr].length > [...preArr].length) {
// checkType = 'add';
// } else if ([...currentArr].length < [...preArr].length) {
// checkType = 'del';
// }
// if (checkType === 'add') {
// // 添加新选中的元素
// currentArr.forEach(item => {
// if (someArr.indexOf(item) === -1) {
// let checkName = plainOptions.find(ele => ele.value === item);
// newCheckList.push(checkName);
// }
// });
// } else if (checkType === 'del') {
// // 删除取消勾选的元素
// preArr.forEach(item => {
// if (someArr.indexOf(item) === -1) {
// newCheckList.splice(newCheckList.findIndex(ele => ele.value === item), 1);
// }
// });
// }
// callback(checkedList, newCheckList);
// }
// }, [checkedList]);
const msg = JSON.parse(JSON.stringify(cardMsg));
setPlainOptions(msg.plainOptions);
setCheckedList(msg.checkedList);
setIndeterminate(msg.indeterminate);
setCheckAll(msg.checkAll);
}, [cardMsg]);
// 获取勾选新增得数据
const addData = (arr1, arr2) => arr2.filter(val => arr1.indexOf(val) === -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