Commit 045d6530 authored by 皮倩雯's avatar 皮倩雯

给事件流程添加选项默认值

parent 1f0d00c1
Pipeline #33974 skipped with stages
......@@ -10,7 +10,7 @@ import { getRoleGroup } from '@/services/userCenter/roleManage/api';
const { Option } = Select;
const AddModal = props => {
const [inputValue, setInputValue] = useState({ SummaryFields: '', ReportFields: '', DisplayFields: '', EditableFields: '', TransitFields: '', Roles: '', RelatedEventFields: '', pictureFields: '' });
const { callBackSubmit = () => { }, visible, type, formObj, treeData, maxLength } = props;
const { callBackSubmit = () => { }, visible, type, formObj, treeData, maxLength, selectData } = props;
const CheckboxGroup = Checkbox.Group;
const defaultCheckedList = ['前端', '手持']
......@@ -188,10 +188,11 @@ const AddModal = props => {
};
useEffect(() => {
console.log(selectData)
getRole()
if (type === 'add') {
getEventData()
setSelectValue(selectData[0])
setInputValue({ SummaryFields: '', ReportFields: '', DisplayFields: '', EditableFields: '', TransitFields: '', Roles: '', RelatedEventFields: '', pictureFields: '' })
setFiled({})
setFiled1({})
......@@ -236,7 +237,7 @@ const AddModal = props => {
arr.push(item.text)
})
console.log(arr)
setSelectValue(arr[0])
// setSelectValue(arr[0])
changTable(arr[0])
}
})
......
......@@ -24,7 +24,7 @@ import {
ApartmentOutlined,
DesktopOutlined
} from '@ant-design/icons';
import {GetCM_Event_LoadEventTable, CM_Event_RemoveEventTable, CM_Event_ReOrder} from '@/services/standingBook/api';
import {GetCM_Event_LoadEventTable, CM_Event_RemoveEventTable, CM_Event_ReOrder, GetCM_Event_LoadEventTypeTable} from '@/services/standingBook/api';
import classnames from 'classnames';
import AddModal from './AddModal'
import ProcessModal from './ProcessModal'
......@@ -46,6 +46,7 @@ const incident = () => {
const [flag, setFlag] = useState(0);
const [title1, setTitle1] = useState('')
const [title2, setTitle2] = useState('')
const [select, setSelect] = useState('')
......@@ -54,8 +55,6 @@ const incident = () => {
const [maxLength, setMaxLength] = useState(0);
const [pickItem, setPickItem] = useState('');
// const setRowClassName = record =>
// record.userID === selectColor.userID ? styles.clickRowStyle : '';
const columns = [
{
title: '事件名称',
......@@ -309,6 +308,17 @@ const incident = () => {
}
})
},[flag])
useEffect(()=>{
GetCM_Event_LoadEventTypeTable().then(res => {
if (res.msg === 'Ok') {
let arr = []
res.data.map((item, index)=>{
arr.push(item.text)
})
setSelect(arr)
}
})
},[])
const formateArrDataA = (initialArr, name) => {
console.log(initialArr)
console.log(name)
......@@ -530,6 +540,7 @@ const incident = () => {
maxLength={maxLength}
onCancel={() => setAddvisible(false)}
treeData={treeData}
selectData={select}
callBackSubmit={onSubmit}
/>
<ProcessModal
......
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