Selaa lähdekoodia

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/GtDigManageWeb
merge
# Conflicts:
# .umirc.ts

Renxy 2 vuotta sitten
vanhempi
commit
9fc82d7846

+ 7 - 17
.umirc.ts

@@ -15,12 +15,6 @@ export default defineConfig({
   title: '金科环境数字化管理平台',
   publicPath: process.env.NODE_ENV == 'development' ? '/' : '/gt-dig/',
   proxy: {
-    '/api/v1/oa': {
-      // target: 'http://47.96.12.136:8788/',
-      target: 'http://47.96.12.136:8895/',
-      // target: 'http://120.55.44.4:8902/',
-      changeOrigin: true,
-    },
     '/api': {
       // target: 'http://47.96.12.136:8788/',
       target: 'http://47.96.12.136:8895/',
@@ -45,20 +39,20 @@ export default defineConfig({
       name: '首页',
       path: '/home',
       component: './Home/index',
-      layout: false,
+      menuRender: false
     },
     {
       name: '审批流管理',
       path: '/flow',
       hideChildrenInMenu: true,
       routes: [
-        {
-          path: '/flow',
-          redirect: '/flow/list',
-        },
+        // {
+        //   path: '/flow',
+        //   redirect: '/flow/list',
+        // },
         {
           name: '审批流管理',
-          path: '/flow/list',
+          path: '/flow',
           component: './Flow/index',
         },
         {
@@ -74,13 +68,9 @@ export default defineConfig({
       path: '/oa',
       hideChildrenInMenu: true,
       routes: [
-        {
-          path: '/oa',
-          redirect: '/oa/list',
-        },
         {
           name: 'OA审批',
-          path: '/oa/list',
+          path: '/oa',
           component: './Flow/Oa',
         },
         {

+ 16 - 30
src/app.tsx

@@ -15,43 +15,29 @@ export async function getInitialState(): Promise<{ name: string }> {
 export const layout: RunTimeLayoutConfig = (initialState) => {
   return {
     navTheme: 'light',
-    layout: 'side',
-    contentWidth: 'Fluid',
+    layout: 'mix',
     title: '金科环境数字化管理平台',
     token: {
-      sider: {
-        colorMenuBackground: '#292f33',
-        // colorMenuItemDivider: '#dfdfdf',
-        // colorBgMenuItemHover: '#f6f6f6',
-        // colorTextMenu: '#dfdfdf',
-        // colorTextMenuSelected: '#fff',
-        // colorTextMenuActive: 'rgba(255,255,255,0.85)',
-        // colorBgMenuItemCollapsedHover: '#fff',
-        // colorTextMenuItemHover: '#dfdfdf',
-
-        colorBgCollapsedButton: '#fff',
-        colorTextCollapsedButtonHover: 'rgba(0,0,0,0.65)',
-        colorTextCollapsedButton: 'rgba(0,0,0,0.45)',
-        colorBgMenuItemCollapsedHover: 'rgba(0,0,0,0.06)',
-        colorBgMenuItemCollapsedSelected: 'rgba(0,0,0,0.15)',
-        colorBgMenuItemCollapsedElevated: 'rgba(0,0,0,0.85)',
-        colorMenuItemDivider: 'rgba(255,255,255,0.15)',
-        colorBgMenuItemHover: 'rgba(0,0,0,0.06)',
-        colorBgMenuItemSelected: 'rgba(0,0,0,0.15)',
+      header: {
+        colorBgHeader: '#292f33',
+        colorHeaderTitle: '#fff',
+        colorTextMenu: '#dfdfdf',
+        colorTextMenuSecondary: '#dfdfdf',
         colorTextMenuSelected: '#fff',
-        colorTextMenuItemHover: 'rgba(255,255,255,0.75)',
-        colorTextMenu: 'rgba(255,255,255,0.75)',
-        colorTextMenuSecondary: 'rgba(255,255,255,0.65)',
-        colorTextMenuTitle: 'rgba(255,255,255,0.95)',
-        colorTextMenuActive: 'rgba(255,255,255,0.95)',
-        colorTextSubMenuSelected: '#fff',
+        colorBgMenuItemSelected: '#22272b',
+        colorTextRightActionsItem: '#dfdfdf',
+      },
+      sider: {
+        colorMenuBackground: '#fff',
+        colorMenuItemDivider: '#dfdfdf',
+        colorTextMenu: '#595959',
+        colorTextMenuSelected: 'rgba(42,122,251,1)',
+        colorBgMenuItemSelected: 'rgba(230,243,254,1)',
       },
     },
     // fixedHeader: true,
     // fixSiderbar: true,
-    rightRender(initialState, setInitialState, runtimeConfig) {
-      return <UserDropdown />;
-    },
+    rightRender: () => <UserDropdown />,
     logo: logo,
   };
 };

BIN
src/assets/UnityMenu/userCenter.png


BIN
src/assets/floor.png


+ 202 - 64
src/components/AuditForm/ItemAttribute.js

@@ -7,17 +7,19 @@ function ItemAttribute(props) {
   const renderForm = () => {
     let FormContent;
     const formProps = {
-      btns: <Form.Item>
-        <Button type="primary" htmlType="submit" style={{ marginRight: 20 }}>
-          保存
-        </Button>
-      </Form.Item>,
+      btns: (
+        <Form.Item>
+          <Button type="primary" htmlType="submit" style={{ marginRight: 20 }}>
+            保存
+          </Button>
+        </Form.Item>
+      ),
       item,
-      onFinish: values => {
+      onFinish: (values) => {
         console.log(values);
         onChange?.(values);
-      }
-    }
+      },
+    };
     switch (item.componentName) {
       case 'InnerContactField':
         FormContent = <InnerContactField {...formProps} />;
@@ -40,6 +42,15 @@ function ItemAttribute(props) {
       case 'NumberField':
         FormContent = <NumberField {...formProps} />;
         break;
+      case 'TextNote':
+        FormContent = <TextNote {...formProps} />;
+        break;
+      case 'DDAttachment':
+        FormContent = <DDAttachment {...formProps} />;
+        break;
+      case 'DDDateField':
+        FormContent = <DDDateField {...formProps} />;
+        break;
     }
 
     return FormContent;
@@ -68,11 +79,18 @@ export default ItemAttribute;
 function InnerContactField(props) {
   const { item, btns, onFinish } = props;
   const [form] = Form.useForm();
-  const onSwitchChange = checked => {
-    form.setFieldValue("choice", checked ? 1 : 0);
-  }
+  const onSwitchChange = (checked) => {
+    form.setFieldValue('choice', checked ? 1 : 0);
+  };
   return (
-    <Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} autoComplete="off" initialValues={item.props} onFinish={onFinish}>
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      autoComplete="off"
+      initialValues={item.props}
+      onFinish={onFinish}
+    >
       <Form.Item label="标题" name="label">
         <Input />
       </Form.Item>
@@ -98,7 +116,14 @@ function DepartmentField(props) {
   const { item, btns, onFinish } = props;
   const [form] = Form.useForm();
   return (
-    <Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} autoComplete="off" initialValues={item.props} onFinish={onFinish}>
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      autoComplete="off"
+      initialValues={item.props}
+      onFinish={onFinish}
+    >
       <Form.Item label="标题" name="label">
         <Input />
       </Form.Item>
@@ -149,11 +174,89 @@ function TextField(props) {
     </Form>
   );
 }
+function DDAttachment(props) {
+  const { item, btns, onFinish } = props;
+  const [form] = Form.useForm();
+
+  return (
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      onFinish={onFinish}
+      autoComplete="off"
+      initialValues={item.props}
+    >
+      <Form.Item label="标题" name="label">
+        <Input />
+      </Form.Item>
+      <Form.Item label="提示文字" name="placeholder">
+        <Input />
+      </Form.Item>
+      <Form.Item label="必填" valuePropName="checked" name="required">
+        <Switch />
+      </Form.Item>
+      {btns}
+    </Form>
+  );
+}
+
+function TextNote(props) {
+  const { item, btns, onFinish } = props;
+  const [form] = Form.useForm();
+
+  return (
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      onFinish={onFinish}
+      autoComplete="off"
+      initialValues={item.props}
+    >
+      <Form.Item label="说明文字" name="placeholder">
+        <Input />
+      </Form.Item>
+      {btns}
+    </Form>
+  );
+}
+
+function DDDateField(props) {
+  const { item, btns, onFinish } = props;
+  const [form] = Form.useForm();
+
+  return (
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      onFinish={onFinish}
+      autoComplete="off"
+      initialValues={item.props}
+    >
+      <Form.Item label="标题" name="label">
+        <Input />
+      </Form.Item>
+      <Form.Item label="提示文字" name="placeholder">
+        <Input />
+      </Form.Item>
+      {btns}
+    </Form>
+  );
+}
 function TextareaField(props) {
   const { item, btns, onFinish } = props;
   const [form] = Form.useForm();
   return (
-    <Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} autoComplete="off" initialValues={item.props} onFinish={onFinish}>
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      autoComplete="off"
+      initialValues={item.props}
+      onFinish={onFinish}
+    >
       <Form.Item label="标题" name="label">
         <Input />
       </Form.Item>
@@ -170,22 +273,29 @@ function TextareaField(props) {
 function DDSelectField(props) {
   const { item, btns, onFinish } = props;
   const [form] = Form.useForm();
-  const handleFinish = value => {
+  const handleFinish = (value) => {
     let tempValue = { ...value };
     let arr = [];
-    tempValue.options.map(item => {
+    tempValue.options.map((item) => {
       arr.push(item.value);
-    })
+    });
     if (arr) {
-      arr = arr.filter(item => item)
+      arr = arr.filter((item) => item);
       arr = [...new Set(arr)];
-      tempValue.options = arr
+      tempValue.options = arr;
     }
     onFinish?.(tempValue);
-  }
+  };
 
   return (
-    <Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} autoComplete="off" initialValues={item.props} onFinish={handleFinish}>
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      autoComplete="off"
+      initialValues={item.props}
+      onFinish={handleFinish}
+    >
       <Form.Item label="标题" name="label">
         <Input />
       </Form.Item>
@@ -205,21 +315,28 @@ function DDSelectField(props) {
 function DDMultiSelectField(props) {
   const { item, btns, onFinish } = props;
   const [form] = Form.useForm();
-  const handleFinish = value => {
+  const handleFinish = (value) => {
     let tempValue = { ...value };
     let arr = [];
-    tempValue.options.map(item => {
+    tempValue.options.map((item) => {
       arr.push(item.value);
-    })
+    });
     if (arr) {
-      arr = arr.filter(item => item)
+      arr = arr.filter((item) => item);
       arr = [...new Set(arr)];
-      tempValue.options = arr
+      tempValue.options = arr;
     }
     onFinish?.(tempValue);
-  }
+  };
   return (
-    <Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} autoComplete="off" initialValues={item.props} onFinish={handleFinish}>
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      autoComplete="off"
+      initialValues={item.props}
+      onFinish={handleFinish}
+    >
       <Form.Item label="标题" name="label">
         <Input />
       </Form.Item>
@@ -240,74 +357,95 @@ function DDMultiSelectField(props) {
 function SelectItem(props) {
   const { value, onChange } = props;
   const [localValue, setLocalValue] = useState([]);
-  const pushItem = item => {
-    let tempValue = [...localValue, {
-      id: +new Date(),
-      value: item
-    }];
+  const pushItem = (item) => {
+    let tempValue = [
+      ...localValue,
+      {
+        id: +new Date(),
+        value: item,
+      },
+    ];
     setLocalValue(tempValue);
     onChange(tempValue);
-  }
+  };
 
-  const handleDelete = index => {
+  const handleDelete = (index) => {
     let tempValue = [...localValue];
     tempValue.splice(index, 1);
     setLocalValue(tempValue);
     onChange(tempValue);
-  }
+  };
   const handleInputOnChange = (targetValue, index) => {
     let tempValue = [...localValue];
     tempValue[index].value = targetValue;
     setLocalValue(tempValue);
     onChange(tempValue);
-  }
+  };
   useEffect(() => {
-    let tempValue = value.map(item => ({ id: +new Date(), value: item }));
+    let tempValue = value.map((item) => ({ id: +new Date(), value: item }));
     setLocalValue(tempValue);
     onChange(tempValue);
   }, []);
 
   return (
-    <div style={{
-      minHeight: 40,
-      display: 'flex',
-      flexDirection: 'column'
-    }}>
+    <div
+      style={{
+        minHeight: 40,
+        display: 'flex',
+        flexDirection: 'column',
+      }}
+    >
       <div>
-        <div style={{
-          fontSize: 4,
-          color: '#40a9ff',
-          cursor: 'pointer',
-          lineHeight: '32px'
-        }} onClick={() => { pushItem('') }}>添加选项</div>
+        <div
+          style={{
+            fontSize: 4,
+            color: '#40a9ff',
+            cursor: 'pointer',
+            lineHeight: '32px',
+          }}
+          onClick={() => {
+            pushItem('');
+          }}
+        >
+          添加选项
+        </div>
       </div>
       <div style={{ minHeight: 20 }}>
-        {
-          localValue.map((item, index) =>
-            <div style={{
+        {localValue.map((item, index) => (
+          <div
+            style={{
               display: 'flex',
               justifyContent: 'center',
               alignItems: 'center',
-              marginBottom: 5
+              marginBottom: 5,
             }}
-              key={item.id}
-            >
-              <Input style={{ marginRight: 10 }} value={item.value} onChange={e => handleInputOnChange(e.target.value, index)} />
-              <DeleteOutlined
-                onClick={() => handleDelete(index)}
-              />
-            </div>)
-        }
+            key={item.id}
+          >
+            <Input
+              style={{ marginRight: 10 }}
+              value={item.value}
+              onChange={(e) => handleInputOnChange(e.target.value, index)}
+            />
+            <DeleteOutlined onClick={() => handleDelete(index)} />
+          </div>
+        ))}
       </div>
-    </div >
-  )
+    </div>
+  );
 }
 
 function NumberField(props) {
   const { item, btns, onFinish } = props;
   const [form] = Form.useForm();
   return (
-    <Form form={form} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }} autoComplete="off" initialValues={item.props} onFinish={onFinish}>
+    <Form
+      form={form}
+      labelCol={{ span: 8 }}
+      wrapperCol={{ span: 16 }}
+      autoComplete="off"
+      initialValues={item.props}
+      onFinish={onFinish}
+    >
       <Form.Item label="标题" name="label">
         <Input />
       </Form.Item>

+ 32 - 0
src/components/AuditForm/constant.js

@@ -6,6 +6,9 @@ import {
   BorderOutlined,
   BlockOutlined,
   FieldNumberOutlined,
+  InsertRowAboveOutlined,
+  FolderAddOutlined,
+  FontColorsOutlined,
 } from '@ant-design/icons';
 
 export const COMPONENT_LIST = [
@@ -77,4 +80,33 @@ export const COMPONENT_LIST = [
       unit: ''
     },
   },
+  {
+    componentName: 'DDDateField',
+    icon: <InsertRowAboveOutlined />,
+    props: {
+      label: '日历控件',
+      placeholder: '请选择日期',
+      required: false,
+      unit: ''
+    },
+  },
+  {
+    componentName: 'DDAttachment',
+    icon: <FolderAddOutlined />,
+    props: {
+      label: '附件控件',
+      placeholder: '请上传附件',
+      required: false,
+    },
+  },
+  {
+    componentName: 'TextNote',
+    icon: <FontColorsOutlined />,
+    props: {
+      label: '文本说明控件',
+      bizAlias: '',
+      placeholder: '请输入文本',
+      required: false,
+    },
+  },
 ];

+ 21 - 21
src/components/DDComponents/DDAttachment/index.js

@@ -1,30 +1,30 @@
-import React, { useState, useEffect } from 'react';
-import { Upload, Button, message } from 'antd';
-import { PlusOutlined } from '@ant-design/icons';
+import AliyunOSSUpload from '@/components/OssUpload/AliyunOssUploader';
+import { queryOSSData } from '@/services/boom';
+import { useParams, useRequest } from '@umijs/max';
 
 function DDAttachment(props) {
   const { disabled, onChange } = props;
-  const uploadProps = {
-    name: 'file',
-    action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76',
-    headers: {
-      authorization: 'authorization-text',
-    },
-    onChange(info) {
-      if (info.file.status === 'done') {
-        console.log(info.file.url);
-        onChange(info.file.url)
-        message.success(`附件${info.file.name}上传成功`);
-      } else if (info.file.status === 'error') {
-        message.error(`附件${info.file.name}上传失败`);
-      }
-    },
+  const { oaId } = useParams();
+
+  const { data: OSSData } = useRequest(queryOSSData, {
+    defaultParams: [{ ids: oaId }],
+    cacheKey: `ossData-${oaId}`,
+  });
+
+  const OnModelFileDone = (file) => {
+    onChange(OSSData.host + '/' + file.url);
   };
 
+  if (!OSSData) return;
   return (
-    <Upload {...uploadProps}>
-      <Button icon={<PlusOutlined />}>添加附件</Button>
-    </Upload>
+    <AliyunOSSUpload
+      OSSData={OSSData}
+      onDone={OnModelFileDone}
+      directory={false}
+      noStyle={false}
+      label="上传文件"
+      disabled={disabled}
+    />
   );
 }
 

+ 11 - 4
src/components/DDComponents/DDDateField/index.js

@@ -2,12 +2,19 @@ import React from 'react';
 import { DatePicker } from 'antd';
 
 function DDDateField(props) {
-  const { format, disabled, onChange } = props;
+  const { format = "", disabled, onChange, placeholder } = props;
 
-  const handleChange = date => {
-    onChange?.(date.format('YYYY-MM-DD'));
+  const handleChange = (date) => {
+    onChange?.(date.format('YYYY-MM-DD HH:mm:ss'));
   };
-  return <DatePicker disabled={disabled} format={format.replace("yyyy","YYYY").replace("dd","DD")} onChange={handleChange} />;
+  return (
+    <DatePicker
+      placeholder={placeholder}
+      disabled={disabled}
+      format={format.replace('yyyy', 'YYYY').replace('dd', 'DD')}
+      onChange={handleChange}
+    />
+  );
 }
 
 export default DDDateField;

+ 9 - 0
src/components/DDComponents/TextNote/index.js

@@ -0,0 +1,9 @@
+import React from 'react';
+
+function TextNote(props) {
+  const { value } = props;
+
+  return <div>{value}</div>;
+}
+
+export default TextNote;

+ 9 - 7
src/components/DDComponents/index.js

@@ -10,9 +10,7 @@ import DDSelectField from './DDSelectField';
 import DDDateField from './DDDateField';
 import DDDateRangeField from './DDDateRangeField';
 import DDAttachment from './DDAttachment';
-
-const { Option } = Select;
-const { RangePicker } = DatePicker;
+import TextNote from './TextNote';
 
 export default function DDComponents(props) {
   const { item, onChange } = props;
@@ -62,7 +60,12 @@ export default function DDComponents(props) {
       break;
     case 'DDDateField': //日期控件
       component = (
-        <DDDateField format={format} disabled={disabled} onChange={onChange} />
+        <DDDateField
+          placeholder={placeholder}
+          format={format}
+          disabled={disabled}
+          onChange={onChange}
+        />
       );
       break;
     case 'DDDateRangeField': //时间区间控件
@@ -75,8 +78,7 @@ export default function DDComponents(props) {
       );
       break;
     case 'TextNote': //文本说明控件
-      console.info('文本说明控件!');
-      console.log(item);
+      component = <TextNote value={placeholder} />;
       break;
     case 'PhoneField': //电话控件
       component = <PhoneField onChange={onChange} />;
@@ -91,7 +93,7 @@ export default function DDComponents(props) {
       component = <TableField item={item} />;
       break;
     case 'DDAttachment': //附件
-      // component = <DDAttachment />
+      component = <DDAttachment onChange={onChange} />;
       // component = '附件控件未渲染!'
       console.info('附件控件未渲染!');
       break;

+ 29 - 0
src/components/PageContent/index.js

@@ -0,0 +1,29 @@
+import {
+  DefaultFooter,
+  PageContainer,
+  ProCard,
+} from '@ant-design/pro-components';
+
+export default (props) => {
+  return (
+    <div>
+      <PageContainer header={{ title: null }} {...props}>
+        <ProCard
+          style={{ minHeight: 'calc(100vh - 170px)', overflowY: 'auto' }}
+        >
+          {props.children}
+        </ProCard>
+      </PageContainer>
+      <div
+        style={{
+          fontSize: 14,
+          color: 'rgba(0, 0, 0, 0.88)',
+          textAlign: 'center',
+          margin: '20px 0',
+        }}
+      >
+        Copyright © 金科环境股份有限公司
+      </div>
+    </div>
+  );
+};

+ 0 - 5
src/components/UserDropdown/index.tsx

@@ -9,11 +9,6 @@ import { useModel } from '@umijs/max';
 const items: MenuProps['items'] = [
   {
     key: '1',
-    label: <Link to="/profile">个人中心</Link>,
-    icon: <UserOutlined />,
-  },
-  {
-    key: '2',
     label: <a href="/login">退出登录</a>,
     icon: <LogoutOutlined />,
   },

+ 5 - 0
src/loading.js

@@ -0,0 +1,5 @@
+import { Spin } from 'antd';
+
+export default () => (
+  <Spin spinning={true} size="large" style={{ marginTop: 40 }}></Spin>
+);

+ 21 - 0
src/pages/ContractManager/component/EllipsisText.js

@@ -0,0 +1,21 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { Tooltip } from 'antd';
+
+const EllipsisText = ({ text, width }) => {
+  return (
+    <Tooltip title={text}>
+      <div
+        style={{
+          width,
+          whiteSpace: 'nowrap',
+          overflow: 'hidden',
+          textOverflow: 'ellipsis',
+        }}
+      >
+        {text}
+      </div>
+    </Tooltip>
+  );
+};
+
+export default EllipsisText;

+ 19 - 3
src/pages/ContractManager/index.jsx

@@ -16,6 +16,8 @@ import {
 import dayjs from 'dayjs';
 import FileViewerModal from '@/components/FileViewerNew';
 import { getToken } from '@/utils/utils';
+import PageContent from '@/components/PageContent';
+import EllipsisText from './component/EllipsisText';
 
 const ConteactManager = (props) => {
   const { dispatch } = props;
@@ -57,13 +59,14 @@ const ConteactManager = (props) => {
       dataIndex: 'code',
       key: 'code',
       align: 'center',
-      width: '12%',
+      width: 160,
     },
     {
       title: '合同生效时间',
       dataIndex: 'effect_on',
       key: 'effect_on',
       align: 'center',
+      width: 120,
     },
     {
       title: '合同名称',
@@ -76,42 +79,55 @@ const ConteactManager = (props) => {
       dataIndex: 'party_a',
       key: 'party_a',
       align: 'center',
+      render: (text) => <EllipsisText text={text} width={120} />,
     },
     {
       title: '丙方',
       dataIndex: 'party_c',
       key: 'party_c',
       align: 'center',
+      render: (text) => {
+        let str = text;
+        try {
+          str = JSON.parse(text).join('、');
+        } catch (error) {}
+        return <EllipsisText text={str} width={120} />;
+      },
     },
     {
       title: '所属部门/子公司',
       dataIndex: 'dep_name',
       key: 'dep_name',
       align: 'center',
+      width: 160,
     },
     {
       title: '项目名称',
       dataIndex: 'project_name',
       key: 'project_name',
       align: 'center',
+      width: 120,
     },
     {
       title: '合同总价(万元)',
       dataIndex: 'amount',
       key: 'amount',
       align: 'center',
+      width: 160,
     },
     {
       title: '经办人',
       dataIndex: 'deal_by',
       key: 'deal_by',
       align: 'center',
+      width: 80,
     },
     {
       title: '状态',
       dataIndex: 'status',
       key: 'status',
       align: 'center',
+      width: 100,
       render: (status) => {
         let str = '';
         switch (status) {
@@ -297,7 +313,7 @@ const ConteactManager = (props) => {
     run({ ...searchData, current: page });
   };
   return (
-    <PageContainer>
+    <PageContent>
       <div className={styles.searchContent}>
         <div className={styles.itemFlex}>
           <div>合同生效日期:</div>
@@ -416,7 +432,7 @@ const ConteactManager = (props) => {
           setFileViewerVisible(false);
         }}
       />
-    </PageContainer>
+    </PageContent>
   );
 };
 export default connect(({ user, loading }) => ({

+ 13 - 9
src/pages/FileManagement/index.js

@@ -16,7 +16,6 @@ import {
   Spin,
 } from 'antd';
 import dayjs from 'dayjs';
-import { PageContainer, ProCard } from '@ant-design/pro-components';
 import { useRequest, useModel } from '@umijs/max';
 import {
   queryDirCreate,
@@ -42,6 +41,7 @@ import { stringify } from 'qs';
 import FileViewerModal from '@/components/FileViewerNew';
 import AddModal from './components/AddModal';
 import { useMemo } from 'react';
+import PageContent from '@/components/PageContent';
 
 const tempData = [
   { name: '文件1', upload_user: '管理员', upload_time: '2023-04-08 11:00:00' },
@@ -618,10 +618,13 @@ function FileManagement(props) {
   };
 
   return (
-    <PageContainer>
+    <PageContent>
       <div style={{ display: 'flex', justifyContent: 'space-between' }}>
-        <ProCard style={{ height: '100%', width: '30%' }}>
-          <Search onChange={(e) => onSearchDirectory(e.target.value)} />
+        <div style={{ height: '100%', width: '30%' }}>
+          <Search
+            style={{ marginBottom: 20 }}
+            onChange={(e) => onSearchDirectory(e.target.value)}
+          />
           <Spin spinning={treeLoading}>
             <DirectoryTree
               expandedKeys={expandedKeys}
@@ -650,10 +653,11 @@ function FileManagement(props) {
                   <span>{item.dir_name}</span>
                 );
               }}
+              style={{ maxHeight: '78vh', overflowY: 'auto' }}
             />
           </Spin>
-        </ProCard>
-        <ProCard style={{ height: '100%', width: 'calc(70% - 20px)' }}>
+        </div>
+        <div style={{ height: '100%', width: 'calc(70% - 20px)' }}>
           <Form layout="inline" form={form}>
             <Form.Item name="date">
               <RangePicker />
@@ -709,7 +713,7 @@ function FileManagement(props) {
               </Form.Item>
             )}
           </Form>
-          <div>
+          <div style={{ marginTop: 20 }}>
             <Table
               columns={columns}
               dataSource={tableData}
@@ -752,7 +756,7 @@ function FileManagement(props) {
               </>
             )}
           </div>
-        </ProCard>
+        </div>
         <Input
           id="files"
           type="file"
@@ -797,7 +801,7 @@ function FileManagement(props) {
           setFileViewerVisible(false);
         }}
       />
-    </PageContainer>
+    </PageContent>
   );
 }
 

+ 13 - 15
src/pages/Flow/Audit.js

@@ -2,9 +2,9 @@ import React, { useEffect, useRef, useMemo, useState } from 'react';
 import { Button, Tabs } from 'antd';
 import { connect } from 'umi';
 import Flow from '@/components/Flow';
-import { PageContainer, ProCard } from '@ant-design/pro-components';
 import AuditForm from '@/components/AuditForm';
 import { useModel } from '@umijs/max';
+import PageContent from '@/components/PageContent';
 
 function Audit(props) {
   const {
@@ -85,7 +85,7 @@ function Audit(props) {
     });
   };
   return (
-    <PageContainer
+    <PageContent
       extra={[
         <Button
           key={1}
@@ -112,19 +112,17 @@ function Audit(props) {
         },
       ]}
     >
-      <ProCard>
-        {tabActiveKey == 1 && (
-          <AuditForm value={formData} onChange={(values) => onChange(values)} />
-        )}
-        {tabActiveKey == 2 && (
-          <Flow
-            meta={{ type: 'edit', editMode, flowId: curItem.id }}
-            flowDetail={flowDetail}
-            ref={ref}
-          />
-        )}
-      </ProCard>
-    </PageContainer>
+      {tabActiveKey == 1 && (
+        <AuditForm value={formData} onChange={(values) => onChange(values)} />
+      )}
+      {tabActiveKey == 2 && (
+        <Flow
+          meta={{ type: 'edit', editMode, flowId: curItem.id }}
+          flowDetail={flowDetail}
+          ref={ref}
+        />
+      )}
+    </PageContent>
   );
 }
 export default connect(({ flow, loading, user, xflow }) => ({

+ 3 - 3
src/pages/Flow/Oa.js

@@ -1,9 +1,9 @@
 import React, { useMemo } from 'react';
 import { Collapse, List } from 'antd';
 import { UserOutlined } from '@ant-design/icons';
-import { PageContainer } from '@ant-design/pro-components';
 import { Link, useRequest } from '@umijs/max';
 import { queryAuditList, queryClassify } from '@/services/boom';
+import PageContent from '@/components/PageContent';
 
 const { Panel } = Collapse;
 
@@ -47,7 +47,7 @@ const Approval = () => {
   }, [classify, auditList]);
 
   return (
-    <PageContainer loading={loading} breadcrumb={null}>
+    <PageContent loading={loading}>
       {categories.length > 0 && (
         <Collapse defaultActiveKey={categories.map((category) => category.id)}>
           {categories.map((category, index) => (
@@ -98,7 +98,7 @@ const Approval = () => {
           ))}
         </Collapse>
       )}
-    </PageContainer>
+    </PageContent>
   );
 };
 

+ 13 - 15
src/pages/Flow/OaAuditDetail.js

@@ -5,8 +5,8 @@ import { useParams, useRequest, useNavigate } from 'umi';
 import { useModel } from 'umi';
 import AuditModal from './components/AuditModal';
 import FormAndFilesNode from './components/FormAndFilesNode';
-import { PageContainer, ProCard } from '@ant-design/pro-components';
 import { queryAuditDetail, audit } from '@/services/boom';
+import PageContent from '@/components/PageContent';
 
 function OaAuditDetail(props) {
   const [auditVisible, setAuditVisible] = useState(false);
@@ -70,19 +70,17 @@ function OaAuditDetail(props) {
   }, [user, data]);
 
   return (
-    <PageContainer extra={btns} loading={loading}>
-      <ProCard>
-        <Steps
-          style={{ marginBottom: 20 }}
-          current={current_seq - 1}
-          status={audit_status == 2 ? 'error' : 'process'}
-          items={OaAuditList?.map((item) => ({
-            title: item.seq_name,
-            description: getDescription(item),
-          }))}
-        ></Steps>
-        <FormAndFilesNode formData={form} fileList={Files} />
-      </ProCard>
+    <PageContent extra={btns} loading={loading}>
+      <Steps
+        style={{ marginBottom: 20 }}
+        current={current_seq - 1}
+        status={audit_status == 2 ? 'error' : 'process'}
+        items={OaAuditList?.map((item) => ({
+          title: item.seq_name,
+          description: getDescription(item),
+        }))}
+      ></Steps>
+      <FormAndFilesNode formData={form} fileList={Files} />
 
       <AuditModal
         id={id}
@@ -90,7 +88,7 @@ function OaAuditDetail(props) {
         onClose={() => setAuditVisible(false)}
         onOk={refresh}
       />
-    </PageContainer>
+    </PageContent>
   );
 }
 

+ 32 - 25
src/pages/Flow/OaDetail.js

@@ -1,14 +1,14 @@
 import React, { useRef, useState } from 'react';
-import { PageContainer, ProCard } from '@ant-design/pro-components';
 import { Button, Col, Empty, Row, message } from 'antd';
 import ApprovalProcess from './components/ApprovalProcess';
 import AuditDetailed from './components/AuditDetailed';
-import AliyunOSSUpload from '@/components/OssUpload/AliyunOssUploader';
+import PageContent from '@/components/PageContent';
+// import AliyunOSSUpload from '@/components/OssUpload/AliyunOssUploader';
 import {
   queryProcessFlows,
   createAduit,
   advanceSubmitNextNode,
-  queryOSSData,
+  // queryOSSData,
 } from '@/services/boom';
 import { useParams, useRequest, useNavigate } from 'umi';
 
@@ -22,11 +22,14 @@ const OaDetail = () => {
   const navigate = useNavigate();
   const { data, loading } = useRequest(queryProcessFlows, {
     defaultParams: [{ ids: oaId }],
+    onSuccess() {
+      advanceSubmit(null, {});
+    },
   });
-  const { data: OSSData } = useRequest(queryOSSData, {
-    defaultParams: [{ ids: oaId }],
-  });
-  console.log(OSSData);
+  // const { data: OSSData } = useRequest(queryOSSData, {
+  //   defaultParams: [{ ids: oaId }],
+  // });
+
   const { loading: createLoadin, run: createRun } = useRequest(createAduit, {
     manual: true,
     onSuccess() {
@@ -46,7 +49,7 @@ const OaDetail = () => {
   //填写表单实时计算审批流程
   const advanceSubmit = async (changedFields, allValues) => {
     console.log(changedFields, allValues);
-    let formValues = data.formData
+    let formValues = (data?.formData || [])
       .map((item) => {
         const itemProps = item.props;
         let val = allValues[itemProps.id];
@@ -62,6 +65,7 @@ const OaDetail = () => {
           return {
             name: itemProps.label,
             id: itemProps.id,
+            type: item.componentName,
             value: [allValues[itemProps.id]] || undefined,
           };
         }
@@ -84,24 +88,29 @@ const OaDetail = () => {
       if (item[0].type == 'role') return item[0].nowValue;
       return item[0].value;
     });
+    let files = [],
+      formData = [];
+    form.forEach((item) => {
+      if (item.type == 'DDAttachment') {
+        files = files.concat(item.value);
+      } else {
+        formData.push(item);
+      }
+    });
     createRun({
       flow_id: Number(oaId),
-      form: JSON.stringify(form),
+      form: JSON.stringify(formData),
       audit_list,
-      files: uploadList.current.join(','),
+      files: files.join(','),
     });
   };
-  const OnModelFileDone = (file) => {
-    var path = OSSData.host + '/' + file.url;
-    uploadList.current = [...uploadList.current, path];
-    // const files = form.getFieldsValue('files');
-    // form.setFieldValue('files', files.concat(path));
-    // console.log(uploadList.current);
-    // setThumbnail(path);
-  };
+  // const OnModelFileDone = (file) => {
+  //   var path = OSSData.host + '/' + file.url;
+  //   uploadList.current = [...uploadList.current, path];
+  // };
 
   return (
-    <PageContainer
+    <PageContent
       loading={loading}
       footer={[
         <Button onClick={submit} type="primary" loading={createLoadin}>
@@ -109,10 +118,9 @@ const OaDetail = () => {
         </Button>,
       ]}
     >
-      <ProCard style={{ minHeight: '80vh' }}>
-        <Row gutter={24}>
+      <Row gutter={24}>
           <Col span={12}>
-            {OSSData && (
+            {/* {OSSData && (
               <AliyunOSSUpload
                 OSSData={OSSData}
                 onDone={OnModelFileDone}
@@ -120,7 +128,7 @@ const OaDetail = () => {
                 noStyle={false}
                 label="上传文件"
               />
-            )}
+            )} */}
             <AuditDetailed
               items={data?.formData}
               onValuesChange={advanceSubmit}
@@ -137,8 +145,7 @@ const OaDetail = () => {
             )}
           </Col>
         </Row>
-      </ProCard>
-    </PageContainer>
+    </PageContent>
   );
 };
 

+ 2 - 1
src/pages/Flow/components/ApprovalProcess.tsx

@@ -102,7 +102,8 @@ const ApprovalProcess = (props: any) => {
             title={
               item[0]?.name ||
               `从${
-                roleList?.find((cur: any) => cur.ID == item[0]?.value)?.Name
+                roleList?.find((cur: any) => cur.ID == item[0]?.value)?.Name ||
+                '-'
               }选择`
             }
           />

+ 1 - 1
src/pages/Flow/components/AuditDetailed.js

@@ -57,7 +57,7 @@ const AuditDetailed = (props) => {
       }
     }
     let formLabel;
-    if (bizAlias) {
+    if (bizAlias !== undefined) {
       formLabel = bizAlias;
     } else {
       try {

+ 17 - 23
src/pages/Flow/index.js

@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
 import { Button, Table } from 'antd';
 import { connect, useNavigate } from 'umi';
 import AuditModal from './AuditModal';
-import { PageContainer, ProCard } from '@ant-design/pro-components';
+import PageContent from '@/components/PageContent';
 
 function Audit(props) {
   const { list = [], classify = [], dispatch, loading } = props;
@@ -81,27 +81,21 @@ function Audit(props) {
   }, []);
 
   return (
-    <PageContainer
-      title={null}
-      breadcrumb={null}
-      extra={[
-        <Button
-          key={1}
-          onClick={() => changeVisible('audit', true)}
-          type="primary"
-        >
-          新建流程
-        </Button>,
-      ]}
-    >
-      <ProCard>
-        <Table
-          loading={loading['flow/queryAuditList']}
-          rowKey="id"
-          dataSource={list}
-          columns={columns}
-        />
-      </ProCard>
+    <PageContent>
+      <Button
+        key={1}
+        onClick={() => changeVisible('audit', true)}
+        type="primary"
+      >
+        新建流程
+      </Button>
+      <Table
+        style={{ marginTop: 20 }}
+        loading={loading['flow/queryAuditList']}
+        rowKey="id"
+        dataSource={list}
+        columns={columns}
+      />
 
       <AuditModal
         loading={loading['flow/addAudit']}
@@ -110,7 +104,7 @@ function Audit(props) {
         onCancel={() => changeVisible('audit', false)}
         classify={classify}
       />
-    </PageContainer>
+    </PageContent>
   );
 }
 export default connect(({ flow, loading }) => ({

+ 85 - 60
src/pages/Home/index.js

@@ -19,53 +19,53 @@ function HomePage(props) {
       Icon: require('@/assets/UnityMenu/project.png'),
     },
     {
-      id: 2,
-      name: '合同管理',
+      id: 5,
+      name: '工时管理',
       active: true,
       click: () => {
-        navigate('/contract-manager');
+        window.open(
+          `http://120.55.44.4:8899/#/purchase/home/work-hours?JWT-TOKEN=${getToken()}`,
+        );
       },
-      Icon: require('@/assets/UnityMenu/agreement.png'),
+      Icon: require('@/assets/UnityMenu/time.png'),
     },
     {
-      id: 3,
-      name: 'OA审批',
+      id: 6,
+      name: '供应商管理',
       active: true,
       click: () => {
-        navigate('/oa');
+        navigate('/manufacturer');
       },
-      Icon: require('@/assets/UnityMenu/OA.png'),
+      Icon: require('@/assets/UnityMenu/Manufacturer.png'),
     },
     {
-      id: 4,
-      name: 'BOM清单',
+      id: 2,
+      name: '合同管理',
       active: true,
       click: () => {
-        window.open(
-          `http://120.55.44.4:8896/#/bom/home?JWT-TOKEN=${getToken()}`,
-        );
+        navigate('/contract-manager');
       },
-      Icon: require('@/assets/UnityMenu/Bom.png'),
+      Icon: require('@/assets/UnityMenu/agreement.png'),
     },
     {
-      id: 5,
-      name: '工时管理',
+      id: 4,
+      name: 'BOM清单',
       active: true,
       click: () => {
         window.open(
-          `http://120.55.44.4:8899/#/purchase/home/work-hours?JWT-TOKEN=${getToken()}`,
+          `http://120.55.44.4:8896/#/bom/home?JWT-TOKEN=${getToken()}`,
         );
       },
-      Icon: require('@/assets/UnityMenu/time.png'),
+      Icon: require('@/assets/UnityMenu/Bom.png'),
     },
     {
-      id: 6,
-      name: '供应商管理',
+      id: 3,
+      name: 'OA审批',
       active: true,
       click: () => {
-        navigate('/manufacturer');
+        navigate('/oa');
       },
-      Icon: require('@/assets/UnityMenu/Manufacturer.png'),
+      Icon: require('@/assets/UnityMenu/OA.png'),
     },
     {
       id: 7,
@@ -76,51 +76,76 @@ function HomePage(props) {
       },
       Icon: require('@/assets/UnityMenu/transfer.png'),
     },
+    // {
+    //   id: 8,
+    //   name: '系统管理',
+    //   active: true,
+    //   click: () => {},
+    //   Icon: require('@/assets/UnityMenu/system.png'),
+    // },
     {
-      id: 8,
-      name: '系统管理',
+      id: 9,
+      name: '个人中心',
       active: true,
-      click: () => {},
-      Icon: require('@/assets/UnityMenu/system.png'),
+      click: () => {
+        navigate('/profile/apply');
+      },
+      Icon: require('@/assets/UnityMenu/userCenter.png'),
     },
   ];
   return (
     <div className={menuStyle.background}>
       <div className={menuStyle.menuContent}>
-        <div className={menuStyle.wrap}>
-          {curMenu.map((item) => (
-            <div key={item.id} className={menuStyle.item}>
-              <div
-                onClick={() => item.click?.(item)}
-                className={menuStyle.menu}
-                style={item.active ? {} : { cursor: 'not-allowed' }}
-              >
-                <img
-                  className={menuStyle.pic}
-                  src={
-                    item.active
-                      ? item.Icon
-                      : require('@/assets/UnityMenu/newModel.png')
-                  }
-                  style={item.active ? {} : { cursor: 'not-allowed' }}
-                />
-              </div>
-              <div style={{ marginTop: 22, width: 152, textAlign: 'center' }}>
-                <span
-                  onClick={() => item.click?.(item)}
-                  className={menuStyle.menuFriName}
-                  style={
-                    item.active
-                      ? {}
-                      : { color: '#6081B2', cursor: 'not-allowed' }
-                  }
-                >
-                  {item.name}
-                </span>
-              </div>
-            </div>
-          ))}
-        </div>
+        <MenuContent list={curMenu}></MenuContent>
+      </div>
+    </div>
+  );
+}
+
+function MenuContent({ list }) {
+  const row = useMemo(() => {
+    const result = [];
+    for (let i = 0; i < list.length; i += 4) {
+      result.push(list.slice(i, i + 4));
+    }
+    return result;
+  }, [list]);
+  return row.map((rowList) => (
+    <div className={menuStyle.wrap}>
+      {rowList.map((item) => (
+        <MenuItem key={item.id} item={item} />
+      ))}
+      <div className={menuStyle.empty}></div>
+      <div className={menuStyle.empty}></div>
+      <div className={menuStyle.empty}></div>
+    </div>
+  ));
+}
+
+function MenuItem({ item }) {
+  return (
+    <div className={menuStyle.item}>
+      <div
+        onClick={() => item.click?.(item)}
+        className={menuStyle.menu}
+        style={item.active ? {} : { cursor: 'not-allowed' }}
+      >
+        <img
+          className={menuStyle.pic}
+          src={
+            item.active ? item.Icon : require('@/assets/UnityMenu/newModel.png')
+          }
+          style={item.active ? {} : { cursor: 'not-allowed' }}
+        />
+      </div>
+      <div style={{ marginTop: 22, width: 152, textAlign: 'center' }}>
+        <span
+          onClick={() => item.click?.(item)}
+          className={menuStyle.menuFriName}
+          style={item.active ? {} : { color: '#6081B2', cursor: 'not-allowed' }}
+        >
+          {item.name}
+        </span>
       </div>
     </div>
   );

+ 32 - 8
src/pages/Home/index.less

@@ -1,13 +1,20 @@
-
 .background {
   background-image: url(@/assets/UnityMenu/newBackground.jpg);
   width: 100%;
-  height: 100vh;
+  height: calc(100vh - 56px);
+  overflow-y: auto;
+  padding: 60px 0;
+  position: absolute;
+  top: 0;
+  left: 0;
   background-size: cover;
   background-repeat: no-repeat;
   display: flex;
   justify-content: center;
+  align-items: center;
   background-color: #122c63;
+
+
   // align-items: flex-start;
   :global {
     .ant-popover-inner {
@@ -15,6 +22,7 @@
     }
   }
 }
+
 .menu {
   width: 152px;
   height: 152px;
@@ -26,16 +34,19 @@
   align-items: center;
   cursor: pointer;
 }
+
 .menuContent {
   height: 100%;
-  padding-top: 160px;
   width: 1480px;
   max-height: 100vh;
   overflow-y: hidden;
+  padding-top: 40px;
 }
+
 .menuFriName {
   font-size: 24px;
-  font-family: 'Microsoft YaHei UI'; /* Microsoft YaHei UI;*/
+  font-family: 'Microsoft YaHei UI';
+  /* Microsoft YaHei UI;*/
   // font-weight: 400;
   color: #bae3ff;
   // line-height: 0.45rem;
@@ -46,24 +57,37 @@
   text-align: center;
   word-break: keep-all;
 }
+
 .wrap {
   display: flex;
   flex-wrap: wrap;
-  justify-content: start;
+  justify-content: center;
   align-items: center;
+  background: url("@/assets/floor.png") no-repeat bottom center;
+  background-size: contain;
+  margin-bottom: 100px;
+  padding: 0 170px;
+
+  .empty {
+    width: 25%;
+    height: 0;
+    visibility: hidden;
+  }
 }
+
 .item {
   display: flex;
   flex-direction: column;
   align-items: center;
-  width: 292px;
+  width: 25%;
   height: 220px;
-  margin-bottom: 64px;
+  margin-bottom: 10px;
   user-select: none;
 }
+
 .pic {
   width: 152px;
   height: 152px;
   background-size: cover;
   background-repeat: no-repeat;
-}
+}

+ 3 - 3
src/pages/ManufacturerMng/Firm.js

@@ -1,15 +1,15 @@
 import React from 'react';
 import ManufacturerList from './ManufacturerList';
-import { PageContainer, ProCard } from '@ant-design/pro-components';
+import PageContent from '@/components/PageContent';
 function Firm(props) {
   // const {
   //   match: {
   //     params: { projectId },
   //   },
   // } = props;
-  return <PageContainer
+  return <PageContent
     title='供应商管理'>
     <ManufacturerList></ManufacturerList>
-  </PageContainer>
+  </PageContent>
 }
 export default Firm;

+ 3 - 5
src/pages/Profile/apply.js

@@ -24,6 +24,7 @@ import ContractModal, {
   StatusText,
   Type,
 } from '../ContractManager/component/Modal';
+import PageContent from '@/components/PageContent';
 const TYPE = {
   Contract: 1,
   OA: 2,
@@ -345,10 +346,7 @@ function Apply(props) {
       );
   };
   return (
-    <PageContainer
-      header={{
-        title: '我的申请',
-      }}
+    <PageContent
       tabList={[
         {
           tab: `OA审批(${OAApplyData?.pagination?.total || 0})`,
@@ -372,7 +370,7 @@ function Apply(props) {
         }
         handleCancel={() => setConVisible(false)}
       />
-    </PageContainer>
+    </PageContent>
   );
 }
 export default Apply;

+ 3 - 5
src/pages/Profile/approve.js

@@ -28,6 +28,7 @@ import ContractModal, {
   StatusText,
   Type,
 } from '../ContractManager/component/Modal';
+import PageContent from '@/components/PageContent';
 const TYPE = {
   Contract: 1,
   OA: 2,
@@ -365,10 +366,7 @@ function Approve(props) {
       );
   };
   return (
-    <PageContainer
-      header={{
-        title: '我的审批',
-      }}
+    <PageContent
       tabList={[
         {
           tab: `OA审批(${OAAuditData?.pagination?.total || 0})`,
@@ -396,7 +394,7 @@ function Approve(props) {
         }
         handleCancel={() => setConVisible(false)}
       />
-    </PageContainer>
+    </PageContent>
   );
 }
 export default Approve;

+ 3 - 17
src/pages/Profile/approved.js

@@ -19,6 +19,7 @@ import { useRequest, useModel } from '@umijs/max';
 import { queryProfileList, queryApplyList } from '@/services/boom';
 import dayjs from 'dayjs';
 import { queryApprovedList } from '@/services/contract';
+import PageContent from '@/components/PageContent';
 const TYPE = {
   Contract: 1,
   OA: 2,
@@ -236,24 +237,9 @@ function Approved(props) {
     //   );
   };
   return (
-    <PageContainer
-      header={{
-        title: `已审批(${conAuditedData?.pagination?.total || 0})`,
-      }}
-      // tabList={[
-      //   {
-      //     tab: 'OA审批',
-      //     key: '1',
-      //   },
-      //   {
-      //     tab: '合同管理',
-      //     key: '2',
-      //   },
-      // ]}
-      // onTabChange={onTabChange}
-    >
+    <PageContent>
       <div>{renderPage()}</div>
-    </PageContainer>
+    </PageContent>
   );
 }
 export default Approved;

+ 5 - 5
src/pages/Profile/index.js

@@ -24,6 +24,8 @@ import ContractModal, {
   StatusText,
   Type,
 } from '../ContractManager/component/Modal';
+import PageContent from '@/components/PageContent';
+
 function profile(props) {
   const { submitting, params, dispatch } = props;
   const { user } = useModel('userInfo');
@@ -438,10 +440,8 @@ function profile(props) {
       );
   };
   return (
-    <PageContainer
-      header={{
-        title: '个人中心',
-      }}
+    <PageContent
+    
       tabList={[
         {
           tab: '我的申请',
@@ -465,7 +465,7 @@ function profile(props) {
         }
         handleCancel={() => setConVisible(false)}
       />
-    </PageContainer>
+    </PageContent>
   );
 }
 export default profile;