|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
|
import React, { useEffect, useState, useRef } from 'react'; |
|
|
|
|
import { useDispatch, useSelector } from 'react-redux'; |
|
|
|
|
import { Button, Card } from '@component/ui'; |
|
|
|
|
import { openModal } from '@src/redux/features/comn/message/messageSlice'; |
|
|
|
@ -52,7 +52,6 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
// 유효성 기체 데이터
|
|
|
|
|
const [validData, setValidData] = useState(); |
|
|
|
|
|
|
|
|
|
console.log('>>', laancAprvList); |
|
|
|
|
useEffect(() => { |
|
|
|
|
let approvalCdValue = { S: 0, F: 0, C: 0, U: 0 }; |
|
|
|
|
|
|
|
|
@ -271,7 +270,6 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
dataIndex: 'allowRadius', |
|
|
|
|
align: 'center', |
|
|
|
|
width: '80px', |
|
|
|
|
editable: true, |
|
|
|
|
render: (text, record) => { |
|
|
|
|
return text ? text : '-'; |
|
|
|
|
} |
|
|
|
@ -620,7 +618,6 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
{ |
|
|
|
|
dataIndex: 'allowRadius', |
|
|
|
|
align: 'center', |
|
|
|
|
editable: true, |
|
|
|
|
width: '80px', |
|
|
|
|
render: text => { |
|
|
|
|
return text ? text : <>-</>; |
|
|
|
@ -874,7 +871,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
const edit = record => { |
|
|
|
|
form.setFieldsValue({ |
|
|
|
|
planAreaSno: record.planAreaSno, |
|
|
|
|
bufferZone: record.bufferZone, |
|
|
|
|
reqRadius: record.reqRadius, |
|
|
|
|
fltElev: record.fltElev, |
|
|
|
|
dtl: record.dtl, |
|
|
|
|
era: record.era, |
|
|
|
@ -899,8 +896,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
updateLaancAprv([ |
|
|
|
|
{ |
|
|
|
|
planAreaSno: selectedRowKey, |
|
|
|
|
bufferZone: row.bufferZone, |
|
|
|
|
fltElev: row.fltElev, |
|
|
|
|
reqRadius: row.reqRadius || '', |
|
|
|
|
fltElev: row.fltElev || '', |
|
|
|
|
dtl: row.dtl || '', |
|
|
|
|
era: row.era || '', |
|
|
|
|
rm: row.rm || '' |
|
|
|
@ -1099,8 +1096,10 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
vertical={true} |
|
|
|
|
horizontal={true} |
|
|
|
|
activationDistance={10} |
|
|
|
|
ignoreElements='.editable-input' // 이 클래스의 요소는 드래그 이벤트에서 제외
|
|
|
|
|
> |
|
|
|
|
<div style={{ width: '2000px' }}> |
|
|
|
|
<Form form={form} component={false}> |
|
|
|
|
<Table |
|
|
|
|
components={{ |
|
|
|
|
body: { |
|
|
|
@ -1121,7 +1120,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
if (record?.areaList[0]?.approvalCd === 'S') { |
|
|
|
|
className += 'flight-approval-row editable-row'; |
|
|
|
|
} else if (record.areaList[0].approvalCd === 'F') { |
|
|
|
|
className += 'flight-not-approval-row editable-row'; |
|
|
|
|
className += |
|
|
|
|
'flight-not-approval-row editable-row'; |
|
|
|
|
} else if (record.areaList[0].approvalCd === 'C') { |
|
|
|
|
className += |
|
|
|
|
'flight-condition-approval-row editable-row'; |
|
|
|
@ -1131,7 +1131,8 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
if (props.selected?.length > 0) { |
|
|
|
|
if ( |
|
|
|
|
record.areaList.length <= 1 && |
|
|
|
|
record.areaList[0].planAreaSno === props.selected[0] |
|
|
|
|
record.areaList[0].planAreaSno === |
|
|
|
|
props.selected[0] |
|
|
|
|
) { |
|
|
|
|
className += ' flight-approval-row-click'; |
|
|
|
|
} |
|
|
|
@ -1175,6 +1176,7 @@ export default function OperationApprovalsTable(props) {
|
|
|
|
|
rowHoverable={false} |
|
|
|
|
expandIconColumnIndex={-1} |
|
|
|
|
/> |
|
|
|
|
</Form> |
|
|
|
|
</div> |
|
|
|
|
</ScrollContainer> |
|
|
|
|
</Form> |
|
|
|
@ -1207,18 +1209,7 @@ const EditableCell = ({
|
|
|
|
|
return ( |
|
|
|
|
<td {...restProps}> |
|
|
|
|
{editing ? ( |
|
|
|
|
<Form.Item |
|
|
|
|
name={dataIndex} |
|
|
|
|
style={{ |
|
|
|
|
margin: 0 |
|
|
|
|
}} |
|
|
|
|
// rules={[
|
|
|
|
|
// {
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: `값을 입력해 주세요`
|
|
|
|
|
// }
|
|
|
|
|
// ]}
|
|
|
|
|
> |
|
|
|
|
<Form.Item name={dataIndex} className='editable-input'> |
|
|
|
|
{inputNode} |
|
|
|
|
</Form.Item> |
|
|
|
|
) : ( |
|
|
|
|