Przeglądaj źródła

feat: antd 样式bug修复

wanxing 1 miesiąc temu
rodzic
commit
f4cdd9ccf5

+ 0 - 0
src/assets/background10.png → src/assets/background19.png


+ 0 - 4
src/components/UploadS/index.css

@@ -1,7 +1,3 @@
-.formSelect :global(.ant-form-item-label>label) {
-    color: black;
-}
-
 .formSelect :global(.ant-form-item-control-input-content, .ant-input) {
     box-sizing: border-box;
     margin: 0;

+ 1 - 13
src/global.less

@@ -6,7 +6,7 @@ body,
   // width: 1440px;
   width: 100%;
   height: 100%;
-  background-image: url('../src/assets/background10.png') !important;
+  background-image: url('../src/assets/background19.png') !important;
   background-repeat: no-repeat;
   /*设置背景不重复*/
   background-size: 100% 100%;
@@ -110,10 +110,6 @@ body,
   margin-left: 40px;
 }
 
-.ant-form-item-label > label {
-  color: whitesmoke;
-}
-
 // //弹窗
 // .ant-modal-content {
 //   background-color: rgba(0, 0, 0, 0.8) !important;
@@ -326,10 +322,6 @@ ol {
   color: #fff;
 }
 
-// .ant-pro-sider-collapsed-button .anticon {
-//   color: #fff;
-// }
-
 .ant-pro-sider-menu-icon {
   border: 1px dashed;
 }
@@ -451,7 +443,3 @@ tr.ant-table-expanded-row:hover > td {
     color: whitesmoke;
   }
 }
-
-.ant-form-item-label > label {
-  color: #f5f5f5 !important;
-}

+ 8 - 0
src/pages/Component/DataQuery/index.css

@@ -65,4 +65,12 @@
     border: 0 solid !important;
     margin-top: 20px;
     margin-bottom: 5px;
+}
+
+.formSelect :global(.ant-form-item-label>label) {
+    color: white;
+}
+
+.inputNumber :global(.ant-form-item-label>label) {
+    color: white;
 }

+ 8 - 0
src/pages/DrivingPerformance/DataQuery/index.css

@@ -65,4 +65,12 @@
     border: 0 solid !important;
     margin-top: 20px;
     margin-bottom: 5px;
+}
+
+.formSelect :global(.ant-form-item-label>label) {
+    color: white;
+}
+
+.inputNumber :global(.ant-form-item-label>label) {
+    color: white;
 }

+ 8 - 0
src/pages/K&C/DataQuery/index.css

@@ -64,4 +64,12 @@
   border: 0 solid !important;
   margin-top: 20px;
   margin-bottom: 5px;
+}
+
+.formSelect :global(.ant-form-item-label>label) {
+  color: white;
+}
+
+.inputNumber :global(.ant-form-item-label>label) {
+  color: white;
 }

+ 56 - 56
src/pages/NVH/DataQuery/Table/Table.tsx

@@ -1,5 +1,5 @@
-import React, { useState, useEffect } from 'react';
-import { Table, Space, Button, Tag, message, Popconfirm } from 'antd';
+import React, { useState } from 'react';
+import { Table, Space, Button, message, Popconfirm } from 'antd';
 import type { TableColumnsType, TableProps } from 'antd';
 import type { DataType } from '../Type';
 import styles from './Table.css';
@@ -51,28 +51,28 @@ const App: React.FC<{
         value === 0
           ? '轿车'
           : value === 1
-          ? 'SUV'
-          : value === 2
-          ? 'MPV'
-          : value === 3
-          ? '跑车'
-          : value === 4
-          ? '皮卡'
-          : value === 5
-          ? '面包车'
-          : value === 6
-          ? '越野车'
-          : value === 7
-          ? '载客汽车'
-          : value === 8
-          ? '载货汽车'
-          : value === 9
-          ? '牵引汽车'
-          : value === 10
-          ? '专用汽车'
-          : value === 11
-          ? '自卸汽车'
-          : '',
+            ? 'SUV'
+            : value === 2
+              ? 'MPV'
+              : value === 3
+                ? '跑车'
+                : value === 4
+                  ? '皮卡'
+                  : value === 5
+                    ? '面包车'
+                    : value === 6
+                      ? '越野车'
+                      : value === 7
+                        ? '载客汽车'
+                        : value === 8
+                          ? '载货汽车'
+                          : value === 9
+                            ? '牵引汽车'
+                            : value === 10
+                              ? '专用汽车'
+                              : value === 11
+                                ? '自卸汽车'
+                                : '',
     },
     {
       title: '轴距',
@@ -124,16 +124,16 @@ const App: React.FC<{
         value === 0
           ? '麦弗逊'
           : value === 1
-          ? '双横臂'
-          : value === 2
-          ? '板簧'
-          : value === 3
-          ? '其他'
-          : value === 4
-          ? '扭力梁式非独立悬架'
-          : value === 5
-          ? '气囊式空气悬架'
-          : '',
+            ? '双横臂'
+            : value === 2
+              ? '板簧'
+              : value === 3
+                ? '其他'
+                : value === 4
+                  ? '扭力梁式非独立悬架'
+                  : value === 5
+                    ? '气囊式空气悬架'
+                    : '',
     },
     {
       title: '后悬架',
@@ -143,28 +143,28 @@ const App: React.FC<{
         value === 0
           ? '三连杆'
           : value === 1
-          ? '双横臂'
-          : value === 2
-          ? '麦弗逊'
-          : value === 3
-          ? 'E型四连杆'
-          : value === 4
-          ? '五连杆'
-          : value === 5
-          ? '板簧'
-          : value === 6
-          ? '三连杆(非独立)'
-          : value === 7
-          ? '五连杆(非独立)'
-          : value === 8
-          ? '其它'
-          : value === 9
-          ? 'H 臂悬架'
-          : value === 10
-          ? '扭力梁式非独立悬架'
-          : value === 11
-          ? '气囊式空气悬架'
-          : '',
+            ? '双横臂'
+            : value === 2
+              ? '麦弗逊'
+              : value === 3
+                ? 'E型四连杆'
+                : value === 4
+                  ? '五连杆'
+                  : value === 5
+                    ? '板簧'
+                    : value === 6
+                      ? '三连杆(非独立)'
+                      : value === 7
+                        ? '五连杆(非独立)'
+                        : value === 8
+                          ? '其它'
+                          : value === 9
+                            ? 'H 臂悬架'
+                            : value === 10
+                              ? '扭力梁式非独立悬架'
+                              : value === 11
+                                ? '气囊式空气悬架'
+                                : '',
     },
     {
       title: '前制动',

+ 8 - 0
src/pages/NVH/DataQuery/index.css

@@ -65,4 +65,12 @@
     border: 0 solid !important;
     margin-top: 20px;
     margin-bottom: 5px;
+}
+
+.formSelect :global(.ant-form-item-label>label) {
+    color: white;
+}
+
+.inputNumber :global(.ant-form-item-label>label) {
+    color: white;
 }

+ 8 - 0
src/pages/SubjectiveAssessment/DataQuery/index.css

@@ -60,4 +60,12 @@
     border: 0 solid !important;
     margin-top: 20px;
     margin-bottom: 5px;
+}
+
+.formSelect :global(.ant-form-item-label>label) {
+    color: white;
+}
+
+.inputNumber :global(.ant-form-item-label>label) {
+    color: white;
 }

+ 6 - 0
src/pages/SubjectiveAssessment/Detail/IndexData/VariousEvaluations/index.css

@@ -1,3 +1,9 @@
+:global(.setItem > .ant-form-item > .ant-row > .ant-col) {
+    >label {
+        color: black !important;
+    }
+}
+
 .table :global(.ant-table) {
     background-color: rgba(0, 0, 0, 0);
     color: aliceblue;

+ 4 - 0
src/pages/SubjectiveAssessment/Detail/TestAppication/index.css

@@ -5,4 +5,8 @@
     box-shadow: inset 0 0 28px 0 #06A5FE !important;
     border-radius: 0 0 0 0 !important;
     border: 0 solid !important;
+}
+
+.formSelect :global(.ant-form-item-label>label) {
+    color: white;
 }

+ 1 - 1
src/pages/SubjectiveAssessment/Detail/TestAppication/index.tsx

@@ -273,7 +273,7 @@ const TestApplication: React.FC<{
             getAll(e.name);
           }}
         >
-          <Form.Item label="文件名" name="name">
+          <Form.Item label="文件名" name="name" className={styles.formSelect}>
             <MyInput placeholder="请输入文件名" />
           </Form.Item>
           <Form.Item wrapperCol={{ offset: 8, span: 16 }}>

+ 0 - 4
src/pages/VehicleInfo/DataQuery/Table/Table.css

@@ -19,10 +19,6 @@
   cursor: pointer;
 }
 
-.formSelect :global(.ant-form-item-label>label) {
-  color: black;
-}
-
 .formSelect :global(.ant-form-item-control-input-content, .ant-input) {
   box-sizing: border-box;
   margin: 0;

+ 0 - 1
src/pages/VehicleInfo/DataQuery/Table/Table.tsx

@@ -16,7 +16,6 @@ import {
 import type { TableColumnsType, TableProps } from 'antd';
 import type { VehicleInfo } from '../../type';
 import styles from './Table.css';
-import './Table.css';
 import { history } from 'umi';
 import Dragger from 'antd/lib/upload/Dragger';
 import { UploadOutlined } from '@ant-design/icons';

+ 10 - 0
src/pages/VehicleInfo/DataQuery/index.css

@@ -12,6 +12,14 @@
   margin-left: 20px;
 }
 
+.formSelect :global(.ant-form-item-label>label) {
+  color: white;
+}
+
+.inputNumber :global(.ant-form-item-label>label) {
+  color: white;
+}
+
 .inputNumber {
   width: 85%;
   margin-top: 10px;
@@ -19,6 +27,8 @@
   margin-left: 20px;
 }
 
+
+
 .formButtonSY {
   margin-top: 60px;
 }

+ 109 - 39
src/pages/VehicleInfo/Detail/EditForm/index.less

@@ -1,59 +1,129 @@
-:global(.setItem>.ant-form-item>.ant-row>.ant-col) {
-    >label {
-        color: black !important;
-    }
+:global(.setItem > .ant-form-item > .ant-row > .ant-col) {
+  > label {
+    color: black !important;
+  }
 }
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-input-affix-wrapper) {
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-input-affix-wrapper
+  ) {
+  background: inherit;
+  border: 1px solid #d9d9d9;
+  box-shadow: none;
+
+  > input {
+    color: black;
     background: inherit;
-    border: 1px solid #d9d9d9;
     box-shadow: none;
-
-    >input {
-        color: black;
-        box-shadow: none;
-        background: inherit;
-    }
+  }
 }
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content) {
-    >input {
-        color: black;
-        box-shadow: none;
-        background: inherit;
-        border: 1px solid #d9d9d9;
-    }
-}
-
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-select:not(.ant-select-customize-input) .ant-select-selector) {
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+  ) {
+  > input {
     color: black;
-    box-shadow: none;
     background: inherit;
     border: 1px solid #d9d9d9;
+    box-shadow: none;
+  }
 }
 
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-select:not(.ant-select-customize-input)
+      .ant-select-selector
+  ) {
+  color: black;
+  background: inherit;
+  border: 1px solid #d9d9d9;
+  box-shadow: none;
+}
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-select>.ant-select-selector>.ant-select-selection-item) {
-    color: black;
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-select
+      > .ant-select-selector
+      > .ant-select-selection-item
+  ) {
+  color: black;
 }
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-select>.ant-select-arrow) {
-    color: #d9d9d9;
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-select
+      > .ant-select-arrow
+  ) {
+  color: #d9d9d9;
 }
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-picker) {
-    box-shadow: none;
-    background: inherit;
-    border: 1px solid #d9d9d9;
-    width: 100%;
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-picker
+  ) {
+  width: 100%;
+  background: inherit;
+  border: 1px solid #d9d9d9;
+  box-shadow: none;
 }
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-picker>.ant-picker-input) {
-    >input {
-        color: black;
-    }
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-picker
+      > .ant-picker-input
+  ) {
+  > input {
+    color: black;
+  }
 }
 
-:global(.setItem>.ant-form-item>.ant-row>.ant-col>.ant-form-item-control-input>.ant-form-item-control-input-content>.ant-picker>.ant-picker-input>.ant-picker-suffix>.anticon-calendar) {
-    color: #d9d9d9 !important;
-}
+:global(
+    .setItem
+      > .ant-form-item
+      > .ant-row
+      > .ant-col
+      > .ant-form-item-control-input
+      > .ant-form-item-control-input-content
+      > .ant-picker
+      > .ant-picker-input
+      > .ant-picker-suffix
+      > .anticon-calendar
+  ) {
+  color: #d9d9d9 !important;
+}

+ 3 - 62
src/pages/user/Login/index.tsx

@@ -1,4 +1,4 @@
-import { message, Spin, Tabs } from 'antd';
+import { message, Spin } from 'antd';
 import React, { useState } from 'react';
 import { ProFormText, LoginForm } from '@ant-design/pro-form';
 import { history, useModel } from 'umi';
@@ -28,11 +28,6 @@ const Login: React.FC = () => {
 
   const signinHandle = async (values: LoginParams) => {
     setLoading(true);
-    // storage.setLocal('info', { user: 'amdin', nickname: 'admin' });
-    // setInitialState((s: any) => ({
-    //   ...s,
-    //   currentUser: { user: 'amdin', nickname: 'admin' },
-    // }));
     const res = await passwordLogin(values);
     if (res.code === 200) {
       const menu = await getMenuDataList({
@@ -79,16 +74,10 @@ const Login: React.FC = () => {
     }
   };
 
-  // const items = [
-  //   { key: 'signin', label: '登录' },
-  //   { key: 'signup', label: '注册' },
-  // ];
-
   return (
     <div className={styles.container}>
       <div className={styles.content}>
         <LoginForm
-          // contentStyle={{ backgroundColor: "#28608d" }}
           className={styles.title}
           title="欢迎登录"
           submitter={{ searchConfig: { submitText: type == 'signin' ? '登录' : '注册' } }}
@@ -99,34 +88,12 @@ const Login: React.FC = () => {
             handleSubmit(values as LoginParams);
           }}
         >
-          {/* {<Tabs centered activeKey={type} onChange={setType} items={items} />} */}
-          {/* {
-            <> */}
           <Spin spinning={loading}>
-            {/* {type === 'signup' && (
-                  <ProFormText
-                    name="nickname"
-                    fieldProps={{
-                      size: 'large',
-                      prefix: <UserOutlined className={styles.prefixIcon} />,
-                    }}
-                    placeholder={'请输入用户名'}
-                    rules={[
-                      {
-                        required: true,
-                        message: '用户名是必填项!',
-                      },
-                    ]}
-                  />
-                )} */}
             <ProFormText
-              className={styles.form}
-              // contentStyle={{ opacity: 0 }}
-              // style={{ opacity: 0 }}
               name="phone"
               fieldProps={{
                 size: 'large',
-                prefix: <img src={zhanghao} alt="zhanghao" className={styles.prefixIcon} />,
+                prefix: <img src={zhanghao} alt="zhanghao" />,
               }}
               placeholder={'请输入手机号'}
               rules={[
@@ -150,7 +117,7 @@ const Login: React.FC = () => {
               name="password"
               fieldProps={{
                 size: 'large',
-                prefix: <img src={mima} className={styles.prefixIcon} />,
+                prefix: <img src={mima} />,
               }}
               placeholder={'请输入密码'}
               rules={[
@@ -160,33 +127,7 @@ const Login: React.FC = () => {
                 },
               ]}
             />
-            {/* {type === 'signup' && (
-                  <ProFormText.Password
-                    name="passwordAgain"
-                    fieldProps={{
-                      size: 'large',
-                      prefix: <LockOutlined className={styles.prefixIcon} />,
-                    }}
-                    placeholder={'请再次输入密码'}
-                    rules={[
-                      {
-                        required: true,
-                        message: '请再次输入密码!',
-                      },
-                      ({ getFieldValue }) => ({
-                        validator(_, value) {
-                          if (!value || getFieldValue('password') === value) {
-                            return Promise.resolve();
-                          }
-                          return Promise.reject('两次密码输入不一致');
-                        },
-                      }),
-                    ]}
-                  />
-                )} */}
           </Spin>
-          {/* </>
-          } */}
         </LoginForm>
       </div>
     </div>