|
@@ -1,6 +1,6 @@ |
|
|
import React, { useEffect, useState } from 'react' |
|
|
import React, { useEffect, useState } from 'react' |
|
|
import { Form, Input, InputNumber, Radio, Modal, Switch } from 'antd'; |
|
|
import { Form, Input, InputNumber, Radio, Modal, Switch } from 'antd'; |
|
|
import positonService from '@/request/service/positon'; |
|
|
|
|
|
|
|
|
import departmentService from '@/request/service/deparatment'; |
|
|
import { useRequest } from '@/hooks/use-request'; |
|
|
import { useRequest } from '@/hooks/use-request'; |
|
|
import type { DepartmentVO } from '@/models' |
|
|
import type { DepartmentVO } from '@/models' |
|
|
import { antdUtils } from '@/utils/antd'; |
|
|
import { antdUtils } from '@/utils/antd'; |
|
@@ -22,8 +22,8 @@ const DepartmentEditor: React.FC<EditorProps> = (props) => { |
|
|
|
|
|
|
|
|
const { visible, onCancel, onSave, data } = props; |
|
|
const { visible, onCancel, onSave, data } = props; |
|
|
|
|
|
|
|
|
const { runAsync: updatePostApi } = useRequest(positonService.updatePostApi, { manual: true }); |
|
|
|
|
|
const { runAsync: createPostApi } = useRequest(positonService.createPostApi, { manual: true }); |
|
|
|
|
|
|
|
|
const { runAsync: updatePostApi } = useRequest(departmentService.updateDeptApi, { manual: true }); |
|
|
|
|
|
const { runAsync: createPostApi } = useRequest(departmentService.createDeptApi, { manual: true }); |
|
|
|
|
|
|
|
|
const isEdit = !!data; |
|
|
const isEdit = !!data; |
|
|
|
|
|
|
|
|