|  |  | 
 |  |  | import React, { useState, useRef, useEffect } from 'react'; | 
 |  |  | import { Col, Form, Input, Row, Checkbox, Slider, Select, Drawer, Space, Button, InputNumber, Card } from 'antd'; | 
 |  |  | import { Col, Form, Input, Row, message, Slider, Select, Drawer, Space, Button, InputNumber, Card } from 'antd'; | 
 |  |  | import { FormattedMessage, useIntl, useModel } from '@umijs/max'; | 
 |  |  | import { createStyles } from 'antd-style'; | 
 |  |  | import * as Utils from '../utils' | 
 |  |  | 
 |  |  |         setLastCopiedSprites([]); | 
 |  |  |         for (let i = 0; i < values.copyCount; i++) { | 
 |  |  |             const copiedSprite = Utils.copySprite(curSprite); | 
 |  |  |             // auto-increment-value | 
 |  |  |             if (values.autoIncrement && values.type) { | 
 |  |  |                 switch (values.type) { | 
 |  |  |                     case Utils.SENSOR_TYPE.SHELF: | 
 |  |  |                         if (values.incrementValue === 'row') { | 
 |  |  |                             if (values.incrementMode === 'descending') { | 
 |  |  |                                 copiedSprite.data.row = curSprite.data.row - i - 1; | 
 |  |  |                             } else { | 
 |  |  |                                 copiedSprite.data.row = curSprite.data.row + i + 1; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                         if (values.incrementValue === 'bay') { | 
 |  |  |                             if (values.incrementMode === 'descending') { | 
 |  |  |                                 copiedSprite.data.bay = curSprite.data.bay - i - 1; | 
 |  |  |                             } else { | 
 |  |  |                                 copiedSprite.data.bay = curSprite.data.bay + i + 1; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                         if (copiedSprite.data.row && copiedSprite.data.bay) { | 
 |  |  |                             copiedSprite.data.no = Utils.pureNumStr(copiedSprite.data.row) + '-' + Utils.pureNumStr(copiedSprite.data.bay); | 
 |  |  |                         } | 
 |  |  |                         break; | 
 |  |  |                     case Utils.SENSOR_TYPE.POINT: | 
 |  |  |                         if (values.incrementValue === 'vertical') { | 
 |  |  |                             if (values.incrementMode === 'descending') { | 
 |  |  |                                 copiedSprite.data.vertical = curSprite.data.vertical - i - 1; | 
 |  |  |                             } else { | 
 |  |  |                                 copiedSprite.data.vertical = curSprite.data.vertical + i + 1; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                         if (values.incrementValue === 'horizontal') { | 
 |  |  |                             if (values.incrementMode === 'descending') { | 
 |  |  |                                 copiedSprite.data.horizontal = curSprite.data.horizontal - i - 1; | 
 |  |  |                             } else { | 
 |  |  |                                 copiedSprite.data.horizontal = curSprite.data.horizontal + i + 1; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                         if (copiedSprite.data.vertical && copiedSprite.data.horizontal) { | 
 |  |  |                             copiedSprite.data.no = Utils.pureNumStr(copiedSprite.data.vertical) + '-' + Utils.pureNumStr(copiedSprite.data.horizontal); | 
 |  |  |                         } | 
 |  |  |                         break; | 
 |  |  |                     case Utils.SENSOR_TYPE.AGV: | 
 |  |  |                         if (values.incrementValue === 'no') { | 
 |  |  |                             if (values.incrementMode === 'descending') { | 
 |  |  |                                 copiedSprite.data.no = Number(curSprite.data.no) - i - 1; | 
 |  |  |                             } else { | 
 |  |  |                                 copiedSprite.data.no = Number(curSprite.data.no) + i + 1; | 
 |  |  |                             } | 
 |  |  |                         } | 
 |  |  |                         break; | 
 |  |  |                     default: | 
 |  |  |                         break; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             // graph copy | 
 |  |  |             switch (values.copyDire) { | 
 |  |  |                 case 'left': | 
 |  |  |                     copiedSprite.position.x -= (i + 1) * (values.copyGap + copiedSprite.width); | 
 |  |  | 
 |  |  |                                     </Form.Item> | 
 |  |  |                                     <Form.Item> | 
 |  |  |                                         <Button | 
 |  |  |                                             type="link"  | 
 |  |  |                                             type="link" | 
 |  |  |                                             onClick={() => { | 
 |  |  |                                                 if (lastCopiedSprites) { | 
 |  |  |                                                     lastCopiedSprites.forEach(copiedSprite => { |