Commit a45a0c8c authored by 皮倩雯's avatar 皮倩雯

事件权限交互重构

parent 2565e509
......@@ -130,7 +130,7 @@ const AddFlowsModal = props => {
let a1 = [];
let a2;
let a3 = [];
initialArr.map(i => {
initialArr.data.map(i => {
// console.log(i.groupType)
a2 = i.groupType;
// console.log(a2)
......
......@@ -46,6 +46,7 @@ import {
} from '@/services/standingBook/api';
import styles from './incident.less';
import ChangeAdd from './changeAdd';
import ChangeEdit from './changeEdit';
import ChangeImage from './ChangeImage';
import ModalDrag from '../maintenance/ModalDrag';
import { PlusOutlined, DownOutlined } from '@ant-design/icons';
......@@ -491,7 +492,8 @@ const AddModal = props => {
const [Type1, setType1] = useState('');
const [number, setNumber] = useState('');
const [isVisible, setIsVisible] = useState(false); // 弹窗
const [isVisible, setIsVisible] = useState(false); // 事件权限弹窗
const [isVisibleEdit, setIsVisibleEdit] = useState(false); // 字段弹框
const [isVisible1, setIsVisible1] = useState(false); // 弹窗
const [characterValue, setCharacterValue] = useState('');
const [form] = Form.useForm();
......@@ -796,7 +798,7 @@ const AddModal = props => {
let a1 = [];
let a2;
let a3 = [];
initialArr.map(i => {
initialArr.data.map(i => {
// console.log(i.groupType)
a2 = i.groupType;
// console.log(a2)
......@@ -892,53 +894,68 @@ const AddModal = props => {
console.log(prop.stt);
console.log(prop.filed22);
console.log(prop.title);
if (prop.isType == 'app') {
let title = prop.title;
let selectData = prop.stt;
let ff = prop.filed22;
let aa = [];
let bb = 0;
title.map((item, index) => {
console.log(ff[item]);
aa = [];
selectData.map((item1, index1) => {
console.log(item1);
if (ff[item].indexOf(item1) != -1) {
aa.push(item1);
}
});
console.log(aa);
if (item == '外部字段' && aa.length == 0) {
bb = 0;
} else {
// eslint-disable-next-line no-lonely-if
if (aa.length == 0) {
bb = 1;
}
}
});
console.log(aa);
if (bb == 1) {
notification.error({
message: '提示',
description: '部门站点角色必须都选至少一项',
});
} else {
setIsVisible(false);
let inputText = { ...inputValue };
console.log(inputText);
console.log(prop.str);
inputText[prop.pickItem] = prop.str;
setCheckedList1(prop.checkedList);
setCheckedList1(prop.stt);
setInputValue(inputText);
}
} else {
setIsVisible(false);
// if (prop.isType == 'app') {
// let title = prop.title;
// let selectData = prop.stt;
// let ff = prop.filed22;
// let aa = [];
// let bb = 0;
// title.map((item, index) => {
// console.log(ff[item]);
// aa = [];
// selectData.map((item1, index1) => {
// console.log(item1);
// if (ff[item].indexOf(item1) != -1) {
// aa.push(item1);
// }
// });
// console.log(aa);
// if (item == '外部字段' && aa.length == 0) {
// bb = 0;
// } else {
// // eslint-disable-next-line no-lonely-if
// if (aa.length == 0) {
// bb = 1;
// }
// }
// });
// console.log(aa);
// if (bb == 1) {
// notification.error({
// message: '提示',
// description: '部门站点角色必须都选至少一项',
// });
// } else {
// setIsVisible(false);
// let inputText = { ...inputValue };
// console.log(inputText);
// console.log(prop.str);
// inputText[prop.pickItem] = prop.str;
// setCheckedList1(prop.stt);
// setInputValue(inputText);
// }
// } else {
// setIsVisible(false);
// let inputText = { ...inputValue };
// inputText[prop.pickItem] = prop.str;
// setCheckedList1(prop.stt);
// setInputValue(inputText);
// }
};
const onOK1 = prop => {
console.log(prop.isType);
console.log(prop.stt);
console.log(prop.title);
setIsVisibleEdit(false);
let inputText = { ...inputValue };
inputText[prop.pickItem] = prop.str;
setCheckedList1(prop.checkedList);
setCheckedList1(prop.stt);
setInputValue(inputText);
}
};
const oKK = prop => {
setIsVisible1(false);
......@@ -977,7 +994,7 @@ const AddModal = props => {
setCharacterValue(inputValue[fileds]);
setCheckedList1(inputValue[fileds].split(','));
setPickItem(fileds);
setIsVisible(true);
setIsVisibleEdit(true);
};
const pickFiled1 = fileds => {
let pp = formateArrDataA1(nu1, 'group');
......@@ -1092,6 +1109,9 @@ const AddModal = props => {
const onCancel = () => {
setIsVisible(false);
};
const onCancel11 = () => {
setIsVisibleEdit(false);
};
const onCancel1 = () => {
setIsVisible1(false);
};
......@@ -1632,7 +1652,19 @@ const AddModal = props => {
isType={types}
filed={filed}
flag={flag}
filed1={filed1}
filed11={filed1}
pickItem={pickItem}
characterValue={characterValue}
formObj={formObj}
/>
<ChangeEdit
visible={isVisibleEdit}
onCancel={onCancel11}
callBackSubmit={onOK1}
newCheckedList={checkedList1}
filed={filed}
flag={flag}
filed11={filed1}
pickItem={pickItem}
characterValue={characterValue}
formObj={formObj}
......
This diff is collapsed.
......@@ -219,11 +219,9 @@
width: 70%;
}
.cardItem11 {
padding: 0rem 0.5rem;
border: 1px solid #b5b8c8;
padding: 0.5rem;
width: 30%;
height: 34.5rem;
overflow-y: scroll;
overflow-x: scroll;
}
.cardContent1 {
height: 33rem;
......
......@@ -28,6 +28,7 @@ const CardCheck = props => {
useEffect(() => {
if (prevAmount) {
let newCheckList = [...checkList];
console.log(newCheckList);
// 当前选中的
let currentArr = checkedList;
// 上一次选中的
......
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