فهرست منبع

Merge branch 'master' of http://192.168.1.41:3000/outaozhen/cldV2react

outaozhen 5 سال پیش
والد
کامیت
a35229175d

+ 2 - 2
src/components/RightContent/index.tsx

@@ -61,9 +61,9 @@ const GlobalHeaderRight: React.FC = () => {
         <QuestionCircleOutlined />
       </span> */}
       <Avatar />
-      <BasicModal />
       <BasicDrawer />
-      {REACT_APP_ENV && (
+      <BasicModal />
+      {REACT_APP_ENV && REACT_APP_ENV !== 'prod' && (
         <span>
           <Tag color={ENVTagColor[REACT_APP_ENV]}>{REACT_APP_ENV}</Tag>
         </span>

+ 0 - 41
src/pages/Admin.jsx

@@ -1,41 +0,0 @@
-import React from 'react'
-import { HeartTwoTone, SmileTwoTone } from '@ant-design/icons'
-import { Card, Typography, Alert } from 'antd'
-import { PageHeaderWrapper } from '@ant-design/pro-layout'
-
-export default () => (
-  <PageHeaderWrapper content=" 这个页面只有 admin 权限才能查看">
-    <Card>
-      <Alert
-        message="umi ui 现已发布,欢迎使用 npm run ui 启动体验。"
-        type="success"
-        showIcon
-        banner
-        style={{
-          margin: -12,
-          marginBottom: 48
-        }}
-      />
-      <Typography.Title
-        level={2}
-        style={{
-          textAlign: 'center'
-        }}
-      >
-        <SmileTwoTone /> Ant Design Pro <HeartTwoTone twoToneColor="#eb2f96" /> You
-      </Typography.Title>
-    </Card>
-    <p
-      style={{
-        textAlign: 'center',
-        marginTop: 24
-      }}
-    >
-      Want to add more pages? Please refer to{' '}
-      <a href="https://pro.ant.design/docs/block-cn" target="_blank" rel="noopener noreferrer">
-        use block
-      </a>
-      。
-    </p>
-  </PageHeaderWrapper>
-)

+ 4 - 1
src/pages/Customer/Business/components/AddBusiness.jsx

@@ -2,11 +2,12 @@ import { ModalForm, ProFormDatePicker, ProFormSelect, ProFormText } from '@ant-d
 import ModalDrag from '@/components/DragmModal'
 import { Button, Row, Col, message } from 'antd'
 import { Plus } from '@icon-park/react'
-import React from 'react'
+import React, { useRef } from 'react'
 import { connect } from 'umi'
 import { addBusiness } from '@/services/customer'
 
 const AddBusiness = props => {
+  const formRef = useRef(null)
   const { groupList = [], reload } = props
   const layout = {
     layout: 'horizontal',
@@ -15,6 +16,7 @@ const AddBusiness = props => {
   return (
     <ModalForm
       {...layout}
+      formRef={formRef}
       trigger={
         <Button type="primary" className="flex items-center">
           <Plus className="mr-1" />
@@ -25,6 +27,7 @@ const AddBusiness = props => {
       onFinish={async values => {
         try {
           await addBusiness(values)
+          formRef.current?.resetFields()
           reload()
           return true
         } catch (error) {

+ 1 - 0
src/pages/Customer/Company/components/AddCompany/index.jsx

@@ -62,6 +62,7 @@ const AddCompanyModal = ({ dataId, dataType, onConfirm, dispatch, natures }) =>
       }
       onFinish={async values => {
         await onConfirm(values)
+        formRef.current?.resetFields()
         return true
       }}>
       <ProFormText

+ 2 - 8
src/pages/user/login/index.jsx

@@ -151,10 +151,7 @@ const Login = () => {
                     size: 'large',
                     prefix: <UserOutlined className={styles.prefixIcon} />
                   }}
-                  placeholder={intl.formatMessage({
-                    id: 'pages.login.username.placeholder',
-                    defaultMessage: '用户名: admin or user'
-                  })}
+                  placeholder="用户名"
                   rules={[
                     {
                       required: true,
@@ -173,10 +170,7 @@ const Login = () => {
                     size: 'large',
                     prefix: <LockOutlined className={styles.prefixIcon} />
                   }}
-                  placeholder={intl.formatMessage({
-                    id: 'pages.login.password.placeholder',
-                    defaultMessage: '密码: ant.design'
-                  })}
+                  placeholder="密码"
                   rules={[
                     {
                       required: true,