Просмотр исходного кода

fix: #9267 组织管理 内容区域以及头部按钮样式微调

jackhoo_98 3 лет назад
Родитель
Сommit
9f5903db9c

+ 5 - 3
src/pages/system/Department/Assets/deivce/index.tsx

@@ -16,6 +16,7 @@ import { onlyMessage } from '@/utils/util';
 import { ASSETS_TABS_ENUM, AssetsModel } from '@/pages/system/Department/Assets';
 import UpdateModal from '@/pages/system/Department/Assets/updateModal';
 import encodeQuery from '@/utils/encodeQuery';
+import '../index.less';
 
 export const service = new Service<DeviceItem>('assets');
 
@@ -275,7 +276,7 @@ export default observer((props: { parentId: string }) => {
   }, [props.parentId]);
 
   return (
-    <>
+    <div className="content">
       {Models.bind && (
         <Bind
           visible={Models.bind}
@@ -439,7 +440,7 @@ export default observer((props: { parentId: string }) => {
             ]}
           />
         )}
-        toolBarRender={() => [
+        headerTitle={[
           <PermissionButton
             onClick={() => {
               Models.bind = true;
@@ -447,6 +448,7 @@ export default observer((props: { parentId: string }) => {
             icon={<PlusOutlined />}
             type="primary"
             key="bind"
+            style={{ marginRight: 12 }}
             disabled={!props.parentId}
             isPermission={permission.assert}
           >
@@ -480,6 +482,6 @@ export default observer((props: { parentId: string }) => {
           </PermissionButton>,
         ]}
       />
-    </>
+    </div>
   );
 });

+ 5 - 0
src/pages/system/Department/Assets/index.less

@@ -0,0 +1,5 @@
+.content {
+  .ant-card-body {
+    padding-left: 0 !important;
+  }
+}

+ 5 - 3
src/pages/system/Department/Assets/product/index.tsx

@@ -18,6 +18,7 @@ import { ProTableCard, PermissionButton } from '@/components';
 import { onlyMessage } from '@/utils/util';
 import { ASSETS_TABS_ENUM, AssetsModel } from '@/pages/system/Department/Assets';
 import UpdateModal from '../updateModal';
+import '../index.less';
 
 export const service = new Service<ProductItem>('assets');
 
@@ -257,7 +258,7 @@ export default observer((props: { parentId: string }) => {
   };
 
   return (
-    <>
+    <div className="content">
       {Models.bind && (
         <Bind
           visible={Models.bind}
@@ -441,7 +442,7 @@ export default observer((props: { parentId: string }) => {
             ]}
           />
         )}
-        toolBarRender={() => [
+        headerTitle={[
           <PermissionButton
             onClick={() => {
               Models.bind = true;
@@ -449,6 +450,7 @@ export default observer((props: { parentId: string }) => {
             icon={<PlusOutlined />}
             type="primary"
             key="bind"
+            style={{ marginRight: 12 }}
             disabled={!props.parentId}
             isPermission={permission.assert}
           >
@@ -497,6 +499,6 @@ export default observer((props: { parentId: string }) => {
           // </Popconfirm>,
         ]}
       />
-    </>
+    </div>
   );
 });

+ 5 - 3
src/pages/system/Department/Member/index.tsx

@@ -14,6 +14,7 @@ import SearchComponent from '@/components/SearchComponent';
 import Models from '@/pages/system/Department/Assets/productCategory/model';
 import { onlyMessage } from '@/utils/util';
 import PermissionButton from '@/components/PermissionButton';
+import '../index.less';
 
 export const service = new Service('tenant');
 
@@ -191,7 +192,7 @@ const Member = observer((props: { parentId: string }) => {
   }, [props.parentId]);
 
   return (
-    <>
+    <div className="content">
       {MemberModel.bind && (
         <Bind
           visible={MemberModel.bind}
@@ -280,7 +281,7 @@ const Member = observer((props: { parentId: string }) => {
           },
         }}
         params={searchParam}
-        toolBarRender={() => [
+        headerTitle={[
           <PermissionButton
             onClick={() => {
               MemberModel.bind = true;
@@ -288,6 +289,7 @@ const Member = observer((props: { parentId: string }) => {
             icon={<PlusOutlined />}
             type="primary"
             key="bind"
+            style={{ marginRight: 12 }}
             disabled={!props.parentId}
             isPermission={permission['bind-user']}
           >
@@ -336,7 +338,7 @@ const Member = observer((props: { parentId: string }) => {
           // </Popconfirm>,
         ]}
       />
-    </>
+    </div>
   );
 });