Browse Source

feat: 111

outaozhen 3 years ago
parent
commit
e8010754a6

+ 2 - 2
src/pages/Project/Management/components/DetailModal.tsx

@@ -121,13 +121,13 @@ const DetailModal: React.FC<ProjectModalProps> = ({
               name="accountID"
               label={'上报人'}
               placeholder="请选择上报人"
-              options={state.acountList.map(item => ({ label: item.name, value: item.value }))}
+              options={state.acountList.map(item => ({ label: item.name, value: item.ID }))}
             />
             <ProFormSelect
               name="approvalID"
               label={'审批流程'}
               placeholder="请选择审批流程"
-              options={state.approvalList.map(item => ({ label: item.name, value: item.value }))}
+              options={state.approvalList.map(item => ({ label: item.name, value: item.ID }))}
             />
           </ProForm>
         </TabPane>

+ 73 - 9
src/pages/user/Login/index.less

@@ -36,15 +36,79 @@
   }
 }
 
-.icon {
-  margin-left: 8px;
-  color: rgba(0, 0, 0, 0.2);
-  font-size: 24px;
-  vertical-align: middle;
-  cursor: pointer;
-  transition: color 0.3s;
-
-  &:hover {
+.top {
+  text-align: center;
+}
+
+.header {
+  height: 44px;
+  line-height: 44px;
+  a {
+    text-decoration: none;
+  }
+}
+
+.logo {
+  height: 44px;
+  margin-right: 16px;
+  vertical-align: top;
+}
+
+.title {
+  position: relative;
+  top: 2px;
+  color: @heading-color;
+  font-weight: 600;
+  font-size: 33px;
+  font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
+}
+
+.desc {
+  margin-top: 12px;
+  margin-bottom: 40px;
+  color: @text-color-secondary;
+  font-size: @font-size-base;
+}
+
+.main {
+  width: 328px;
+  margin: 0 auto;
+  @media screen and (max-width: @screen-sm) {
+    width: 95%;
+    max-width: 328px;
+  }
+
+  :global {
+    .@{ant-prefix}-tabs-nav-list {
+      margin: auto;
+      font-size: 16px;
+    }
+  }
+
+  .icon {
+    margin-left: 16px;
+    color: rgba(0, 0, 0, 0.2);
+    font-size: 24px;
+    vertical-align: middle;
+    cursor: pointer;
+    transition: color 0.3s;
+
+    &:hover {
+      color: @primary-color;
+    }
+  }
+
+  .other {
+    margin-top: 24px;
+    line-height: 22px;
+    text-align: left;
+    .register {
+      float: right;
+    }
+  }
+
+  .prefixIcon {
     color: @primary-color;
+    font-size: @font-size-base;
   }
 }

+ 17 - 5
src/pages/user/Login/index.tsx

@@ -1,8 +1,8 @@
 import { LockOutlined, UserOutlined } from '@ant-design/icons'
 import { Alert, message, Tabs } from 'antd'
 import React, { useState } from 'react'
-import ProForm, { ProFormCheckbox, ProFormText, LoginForm } from '@ant-design/pro-form'
-import { useIntl, history, FormattedMessage, SelectLang, useModel, useRequest } from 'umi'
+import ProForm, { ProFormCheckbox, ProFormText } from '@ant-design/pro-form'
+import { useIntl, Link, history, FormattedMessage, SelectLang, useModel, useRequest } from 'umi'
 // import { login } from '@/services/ant-design-pro/api'
 import { queryAcountList } from '@/services/api/institution'
 
@@ -26,7 +26,7 @@ const Login: React.FC = () => {
   const [type, setType] = useState<string>('account')
   const { initialState, setInitialState } = useModel('@@initialState')
 
-  const { run, loading } = useRequest(queryCurrentUser, {
+  const { run, loading } = useRequest(queryAcountList, {
     manual: true,
     onSuccess: async result => {
       setInitialState({
@@ -88,7 +88,18 @@ const Login: React.FC = () => {
         {SelectLang && <SelectLang />}
       </div>
       <div className={styles.content}>
-        <div
+        <div className={styles.top}>
+          <div className={styles.header}>
+            <Link to="/" className="flex justify-center">
+              <img alt="logo" className={styles.logo} src="/logo.svg" />
+              <span className={styles.title}>财审管理系统</span>
+            </Link>
+          </div>
+          <div className={styles.desc}>
+            {intl.formatMessage({ id: 'pages.layouts.userLayout.title' })}
+          </div>
+        </div>
+        {/* <div
           logo={<img alt="logo" src="/logo.svg" />}
           title="财审管理系统"
           subTitle={intl.formatMessage({ id: 'pages.layouts.userLayout.title' })}
@@ -98,7 +109,8 @@ const Login: React.FC = () => {
           actions={[]}
           onFinish={async values => {
             await handleSubmit(values as API.LoginParams)
-          }}>
+          }}> */}
+        <div className={styles.main}>
           <ProForm
             initialValues={{
               autoLogin: true