|  | @@ -7,7 +7,7 @@ import { SortableContainer, SortableElement, SortableHandle } from "react-sortab
 | 
											
												
													
														|  |  import arrayMove from "array-move";
 |  |  import arrayMove from "array-move";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const DragHandle = SortableHandle(() => <DrawStem className='draw' />);
 |  |  const DragHandle = SortableHandle(() => <DrawStem className='draw' />);
 | 
											
												
													
														|  | -const SortableItem = SortableElement(({ item, del, setConfig }: any) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +const SortableItem: any = SortableElement(({ item, del, setConfig }: any) => {
 | 
											
												
													
														|  |      const [visible, setVisible] = useState<boolean>(false)
 |  |      const [visible, setVisible] = useState<boolean>(false)
 | 
											
												
													
														|  |      const [width, setWidth] = useState<number>(item?.width || 0)
 |  |      const [width, setWidth] = useState<number>(item?.width || 0)
 | 
											
												
													
														|  |      return <li className='liDraw'>
 |  |      return <li className='liDraw'>
 | 
											
										
											
												
													
														|  | @@ -19,7 +19,7 @@ const SortableItem = SortableElement(({ item, del, setConfig }: any) => {
 | 
											
												
													
														|  |              <Popover
 |  |              <Popover
 | 
											
												
													
														|  |                  content={
 |  |                  content={
 | 
											
												
													
														|  |                      <div>
 |  |                      <div>
 | 
											
												
													
														|  | -                        <InputNumber min={0} max={500} onChange={(value: number) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                        <InputNumber min={0} max={500} onChange={(value) => {
 | 
											
												
													
														|  |                              if (value) {
 |  |                              if (value) {
 | 
											
												
													
														|  |                                  setWidth(value)
 |  |                                  setWidth(value)
 | 
											
												
													
														|  |                              }
 |  |                              }
 | 
											
										
											
												
													
														|  | @@ -31,10 +31,10 @@ const SortableItem = SortableElement(({ item, del, setConfig }: any) => {
 | 
											
												
													
														|  |                      </div>
 |  |                      </div>
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |                  trigger="click"
 |  |                  trigger="click"
 | 
											
												
													
														|  | -                visible={visible}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                open={visible}
 | 
											
												
													
														|  |                  placement='left'
 |  |                  placement='left'
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -                onVisibleChange={(visible) => { setVisible(visible) }}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                onOpenChange={(visible) => { setVisible(visible) }}
 | 
											
												
													
														|  |              >
 |  |              >
 | 
											
												
													
														|  |                  <Tooltip title='宽度设置'><a><ColumnWidthOutlined /></a></Tooltip>
 |  |                  <Tooltip title='宽度设置'><a><ColumnWidthOutlined /></a></Tooltip>
 | 
											
												
													
														|  |              </Popover>
 |  |              </Popover>
 | 
											
										
											
												
													
														|  | @@ -43,7 +43,7 @@ const SortableItem = SortableElement(({ item, del, setConfig }: any) => {
 | 
											
												
													
														|  |      </li>
 |  |      </li>
 | 
											
												
													
														|  |  });
 |  |  });
 | 
											
												
													
														|  |  /** 外层 */
 |  |  /** 外层 */
 | 
											
												
													
														|  | -const SortableList = SortableContainer(({ children }: { children: any }) => (<ul className='selectedList'>{children}</ul>));
 |  | 
 | 
											
												
													
														|  | 
 |  | +const SortableList: any = SortableContainer(({ children }: { children: any }) => (<ul className='selectedList'>{children}</ul>));
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  interface dataProps {
 |  |  interface dataProps {
 | 
											
												
													
														|  |      title: string,
 |  |      title: string,
 | 
											
										
											
												
													
														|  | @@ -142,10 +142,10 @@ function CustomListModel(props: customProps) {
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |      console.log('selectData===>',)
 |  |      console.log('selectData===>',)
 | 
											
												
													
														|  |      // 首次赋值默认宽
 |  |      // 首次赋值默认宽
 | 
											
												
													
														|  | -    const setListWidth = useCallback((selectData) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    const setListWidth = useCallback((selectData: any) => {
 | 
											
												
													
														|  |          if (selectData?.length === columns?.length && !selectData?.every((item: any) => item.width)) {
 |  |          if (selectData?.length === columns?.length && !selectData?.every((item: any) => item.width)) {
 | 
											
												
													
														|  |              let newSelectData: any[] = []
 |  |              let newSelectData: any[] = []
 | 
											
												
													
														|  | -            newSelectData = selectData?.map((item: { [x: string]: any }, index: string | number) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +            newSelectData = selectData?.map((item: { [x: string]: any }, index: number) => {
 | 
											
												
													
														|  |                  item['width'] = columns[index]['width']
 |  |                  item['width'] = columns[index]['width']
 | 
											
												
													
														|  |                  return item
 |  |                  return item
 | 
											
												
													
														|  |              })
 |  |              })
 | 
											
										
											
												
													
														|  | @@ -260,7 +260,7 @@ function CustomListModel(props: customProps) {
 | 
											
												
													
														|  |          onClose && onClose()
 |  |          onClose && onClose()
 | 
											
												
													
														|  |      }, [])
 |  |      }, [])
 | 
											
												
													
														|  |      // 设置悬浮
 |  |      // 设置悬浮
 | 
											
												
													
														|  | -    const changeFixed = useCallback((name: string, value: number) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    const changeFixed = useCallback((name: string, value: number | null) => {
 | 
											
												
													
														|  |          let v = Number(value)
 |  |          let v = Number(value)
 | 
											
												
													
														|  |          if (!isNaN(v)) {
 |  |          if (!isNaN(v)) {
 | 
											
												
													
														|  |              setFixed({ ...fixed, [name]: value })
 |  |              setFixed({ ...fixed, [name]: value })
 | 
											
										
											
												
													
														|  | @@ -272,7 +272,7 @@ function CustomListModel(props: customProps) {
 | 
											
												
													
														|  |          onClose && onClose()
 |  |          onClose && onClose()
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |      // 设置配置参数
 |  |      // 设置配置参数
 | 
											
												
													
														|  | -    const setConfig = useCallback((data) => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    const setConfig = useCallback((data: any) => {
 | 
											
												
													
														|  |          let newServerData = selectData?.map((item) => {
 |  |          let newServerData = selectData?.map((item) => {
 | 
											
												
													
														|  |              if (item.dataIndex === data.dataIndex) {
 |  |              if (item.dataIndex === data.dataIndex) {
 | 
											
												
													
														|  |                  item = data
 |  |                  item = data
 | 
											
										
											
												
													
														|  | @@ -300,7 +300,7 @@ function CustomListModel(props: customProps) {
 | 
											
												
													
														|  |      return <Modal
 |  |      return <Modal
 | 
											
												
													
														|  |          title={null}
 |  |          title={null}
 | 
											
												
													
														|  |          footer={null}
 |  |          footer={null}
 | 
											
												
													
														|  | -        visible={visible}
 |  | 
 | 
											
												
													
														|  | 
 |  | +        open={visible}
 | 
											
												
													
														|  |          width={1100}
 |  |          width={1100}
 | 
											
												
													
														|  |          className='customListModel'
 |  |          className='customListModel'
 | 
											
												
													
														|  |          onCancel={cancel}
 |  |          onCancel={cancel}
 | 
											
										
											
												
													
														|  | @@ -345,11 +345,11 @@ function CustomListModel(props: customProps) {
 | 
											
												
													
														|  |                      <a onClick={defaultConfig} style={{ marginRight: 30 }}>恢复默认</a>
 |  |                      <a onClick={defaultConfig} style={{ marginRight: 30 }}>恢复默认</a>
 | 
											
												
													
														|  |                  </div>
 |  |                  </div>
 | 
											
												
													
														|  |                  <div style={{ display: 'flex', flexFlow: 'row nowarp', padding: '0 28px', justifyContent: 'space-between' }}>
 |  |                  <div style={{ display: 'flex', flexFlow: 'row nowarp', padding: '0 28px', justifyContent: 'space-between' }}>
 | 
											
												
													
														|  | -                    <div>左侧固定列数:<InputNumber size='small' style={{ width: 50 }} onChange={(value: number) => { changeFixed('left', value) }} value={fixed.left} max={100} min={0} /></div>
 |  | 
 | 
											
												
													
														|  | -                    <div>右侧固定列数:<InputNumber size='small' style={{ width: 50 }} onChange={(value: number) => { changeFixed('right', value) }} value={fixed.right} max={100} min={0} /></div>
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    <div>左侧固定列数:<InputNumber size='small' style={{ width: 50 }} onChange={(value) => { changeFixed('left', value) }} value={fixed.left} max={100} min={0} /></div>
 | 
											
												
													
														|  | 
 |  | +                    <div>右侧固定列数:<InputNumber size='small' style={{ width: 50 }} onChange={(value) => { changeFixed('right', value) }} value={fixed.right} max={100} min={0} /></div>
 | 
											
												
													
														|  |                  </div>
 |  |                  </div>
 | 
											
												
													
														|  |                  <SortableList axis='y' onSortEnd={onSortEnd} useDragHandle>
 |  |                  <SortableList axis='y' onSortEnd={onSortEnd} useDragHandle>
 | 
											
												
													
														|  | -                    {selectData.map((item: dataProps, index: number) => <SortableItem key={'li' + index} index={index} item={item} del={() => { selectHandle(false, item) }} setConfig={setConfig} />)}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    {selectData.map((item: dataProps, index: number) => <SortableItem key={'li' + index} index={index} item={item as any} del={() => { selectHandle(false, item) }} setConfig={setConfig} />)}
 | 
											
												
													
														|  |                  </SortableList>
 |  |                  </SortableList>
 | 
											
												
													
														|  |                  <div className='rightOperate'>
 |  |                  <div className='rightOperate'>
 | 
											
												
													
														|  |                      <div style={{ margin: '0 auto' }}>
 |  |                      <div style={{ margin: '0 auto' }}>
 |