Browse Source

feat: 屏蔽多余对象

xieyonghong 3 years atrás
parent
commit
49e879c814

+ 1 - 1
src/pages/Northbound/DuerOS/Detail/index.tsx

@@ -61,7 +61,7 @@ const Save = () => {
     return _productTypes?.find((item: any) => item.id === _id);
   };
 
-  const getProduct = (f: Field) => {
+  const getProduct = (f?: Field) => {
     return service.getProduct(f?.value).then((resp) => {
       const _temp = resp.result.map((item: any) => ({ label: item.name, value: item.id }));
       Store.set('product-list', _temp);

+ 5 - 1
src/pages/system/Department/Detail/index.tsx

@@ -11,5 +11,9 @@ export default () => {
   const location = useLocation<LocationType>();
   const params: any = new URLSearchParams(location.search);
 
-  return <PageContainer>{params.get('type') === 'assets' ? <Assets /> : <Member />}</PageContainer>;
+  return (
+    <PageContainer>
+      {params.get('type') === 'assets' ? <Assets parentId={''} /> : <Member parentId={''} />}
+    </PageContainer>
+  );
 };

+ 5 - 5
src/pages/system/Menu/components/permission.tsx

@@ -161,8 +161,8 @@ export default (props: PermissionType) => {
   // };
 
   const parentChange = (value: ParentNodeChange) => {
-    let indeterminateCount = 0;
-    let _checkAll = 0;
+    // let indeterminateCount = 0;
+    // let _checkAll = 0;
     const list = checkListRef.current.map((item) => {
       const _checked = item.id === value.id ? value.checkedAll : item.checked;
       const _state = item.id === value.id ? value.state : item.state;
@@ -172,11 +172,11 @@ export default (props: PermissionType) => {
           : item.actions;
       if (_checked) {
         // 父checkbox为全选或者有子节点被选中
-        _checkAll += 1;
-        indeterminateCount += 1;
+        // _checkAll += 1;
+        // indeterminateCount += 1;
       } else if (_state) {
         // 父checkbox下
-        indeterminateCount += 1;
+        // indeterminateCount += 1;
       }
 
       return {