|  | @@ -0,0 +1,47 @@
 | 
	
		
			
				|  |  | +import { updateSetting } from '@/services/api/system'
 | 
	
		
			
				|  |  | +import { PageContainer } from '@ant-design/pro-layout'
 | 
	
		
			
				|  |  | +import { Card, Form, Input, Button, message } from 'antd'
 | 
	
		
			
				|  |  | +import React from 'react'
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +const AdminUpdate = () => {
 | 
	
		
			
				|  |  | +  const [form] = Form.useForm()
 | 
	
		
			
				|  |  | +  return (
 | 
	
		
			
				|  |  | +    <PageContainer title={false}>
 | 
	
		
			
				|  |  | +      <Card>
 | 
	
		
			
				|  |  | +        <div className="text-2xl mb-7">管理员</div>
 | 
	
		
			
				|  |  | +        <Form
 | 
	
		
			
				|  |  | +          labelCol={{ span: 2 }}
 | 
	
		
			
				|  |  | +          wrapperCol={{ span: 8 }}
 | 
	
		
			
				|  |  | +          layout="horizontal"
 | 
	
		
			
				|  |  | +          form={form}
 | 
	
		
			
				|  |  | +          initialValues={{ username: 'admin' }}
 | 
	
		
			
				|  |  | +          onFinish={async values => {
 | 
	
		
			
				|  |  | +            await updateSetting(values)
 | 
	
		
			
				|  |  | +            form.resetFields()
 | 
	
		
			
				|  |  | +            message.success('更新成功')
 | 
	
		
			
				|  |  | +            return true
 | 
	
		
			
				|  |  | +          }}>
 | 
	
		
			
				|  |  | +          <Form.Item label="帐号" name="username">
 | 
	
		
			
				|  |  | +            <Input disabled />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +          <Form.Item label="旧密码" name="password">
 | 
	
		
			
				|  |  | +            <Input.Password />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +          <Form.Item label="新密码" name="newPassword">
 | 
	
		
			
				|  |  | +            <Input.Password />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +          <Form.Item label="确认新密码" name="confirmPassword">
 | 
	
		
			
				|  |  | +            <Input.Password />
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +          <Form.Item wrapperCol={{ offset: 2, span: 8 }}>
 | 
	
		
			
				|  |  | +            <Button type="primary" htmlType="submit">
 | 
	
		
			
				|  |  | +              确认修改
 | 
	
		
			
				|  |  | +            </Button>
 | 
	
		
			
				|  |  | +          </Form.Item>
 | 
	
		
			
				|  |  | +        </Form>
 | 
	
		
			
				|  |  | +      </Card>
 | 
	
		
			
				|  |  | +    </PageContainer>
 | 
	
		
			
				|  |  | +  )
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +export default AdminUpdate
 |