wzyyy %!s(int64=2) %!d(string=hai) anos
pai
achega
246fe5e099

+ 3 - 1
src/components/DashBoard/echarts.tsx

@@ -61,6 +61,7 @@ export default (props: EchartsProps) => {
   const [loading, setLoading] = useState(false);
   const [loading, setLoading] = useState(false);
 
 
   const initEcharts = (dom: HTMLDivElement) => {
   const initEcharts = (dom: HTMLDivElement) => {
+    console.log('------------init');
     if (!dom) return;
     if (!dom) return;
     chartsRef.current = chartsRef.current || echarts.init(dom);
     chartsRef.current = chartsRef.current || echarts.init(dom);
     // chartsRef.current.clear()
     // chartsRef.current.clear()
@@ -98,10 +99,11 @@ export default (props: EchartsProps) => {
   }, [props.options, chartsRef.current]);
   }, [props.options, chartsRef.current]);
 
 
   useEffect(() => {
   useEffect(() => {
+    // console.log('------------init')
     if (loading) {
     if (loading) {
       setTimeout(() => {
       setTimeout(() => {
         initEcharts(chartsDom.current);
         initEcharts(chartsDom.current);
-      }, 100);
+      }, 300);
     }
     }
   }, [loading]);
   }, [loading]);
 
 

+ 2 - 2
src/components/DashBoard/timePicker.tsx

@@ -12,7 +12,7 @@ export enum TimeKey {
   'year' = 'year',
   'year' = 'year',
 }
 }
 
 
-export type TimeType = keyof typeof TimeKey;
+export type TimeType = keyof typeof TimeKey | undefined;
 
 
 type ValueType = { start: number; end: number; type: TimeType };
 type ValueType = { start: number; end: number; type: TimeType };
 
 
@@ -97,7 +97,7 @@ export default forwardRef((props: ExtraTimePickerProps, ref) => {
           onChange={(rangeValue) => {
           onChange={(rangeValue) => {
             setRadioValue(undefined);
             setRadioValue(undefined);
             if (rangeValue && rangeValue.length === 2) {
             if (rangeValue && rangeValue.length === 2) {
-              change(rangeValue[0]!.valueOf(), rangeValue[1]!.valueOf(), radioValue!);
+              change(rangeValue[0]!.valueOf(), rangeValue[1]!.valueOf(), undefined);
             }
             }
             if (props.pickerTimeChange) {
             if (props.pickerTimeChange) {
               props.pickerTimeChange();
               props.pickerTimeChange();

+ 10 - 6
src/components/SearchComponent/index.tsx

@@ -211,12 +211,16 @@ const SearchComponent = <T extends Record<string, any>>(props: Props<T>) => {
             const _column = (typeFiled as Field).value;
             const _column = (typeFiled as Field).value;
             const _field = field.find((item) => item.dataIndex === _column);
             const _field = field.find((item) => item.dataIndex === _column);
             if (_column === 'id') {
             if (_column === 'id') {
-              if (isModified) {
-                f.setFieldState(typeFiled.query('.termType'), async (state) => {
-                  state.value = 'eq';
-                  state.dataSource = termType;
-                });
-              }
+              f.setFieldState(typeFiled.query('.termType'), async (state) => {
+                state.value = 'eq';
+                state.dataSource = termType;
+              });
+              // if (isModified) {
+              //   f.setFieldState(typeFiled.query('.termType'), async (state) => {
+              //     state.value = 'eq';
+              //     state.dataSource = termType;
+              //   });
+              // }
               f.setFieldState(typeFiled.query('.value'), async (state) => {
               f.setFieldState(typeFiled.query('.value'), async (state) => {
                 state.componentType = 'Input';
                 state.componentType = 'Input';
                 state.componentProps = {
                 state.componentProps = {

+ 2 - 0
src/pages/DataCollect/Dashboard/index.tsx

@@ -105,6 +105,7 @@ const DeviceBoard = () => {
           format: 'HH:mm',
           format: 'HH:mm',
         };
         };
       default:
       default:
+        console.log('swich---');
         const time = dt.end - dt.start;
         const time = dt.end - dt.start;
         const hour = 60 * 60 * 1000;
         const hour = 60 * 60 * 1000;
         const days = hour * 24;
         const days = hour * 24;
@@ -132,6 +133,7 @@ const DeviceBoard = () => {
 
 
   const getEcharts = async () => {
   const getEcharts = async () => {
     const data = ref.current!.getValues();
     const data = ref.current!.getValues();
+    console.log('data---', data);
     const res = await service.dashboard([
     const res = await service.dashboard([
       {
       {
         dashboard: 'collector',
         dashboard: 'collector',

+ 1 - 0
src/pages/edge/Resource/Issue/index.tsx

@@ -38,6 +38,7 @@ export default (props: Props) => {
       dataIndex: 'productName',
       dataIndex: 'productName',
       ellipsis: true,
       ellipsis: true,
       valueType: 'select',
       valueType: 'select',
+      index: 1,
       request: async () => {
       request: async () => {
         const res = await api.getProductList();
         const res = await api.getProductList();
         if (res.status === 200) {
         if (res.status === 200) {

+ 2 - 0
src/pages/edge/Resource/index.tsx

@@ -269,6 +269,8 @@ export default () => {
               console.log(url);
               console.log(url);
               if (url) {
               if (url) {
                 history.push(url);
                 history.push(url);
+              } else {
+                onlyMessage('暂无权限,请联系管理员', 'warning');
               }
               }
             }}
             }}
             actions={tools(record, 'card')}
             actions={tools(record, 'card')}

+ 2 - 1
src/pages/home/components/CardStatics.tsx

@@ -8,6 +8,7 @@ type StatisticsItem = {
   children: React.ReactNode | string;
   children: React.ReactNode | string;
   permission?: any;
   permission?: any;
   node?: any;
   node?: any;
+  style?: any;
 };
 };
 
 
 interface StatisticsProps {
 interface StatisticsProps {
@@ -48,7 +49,7 @@ const CardStatistics = (props: StatisticsProps) => {
             ) : (
             ) : (
               <div
               <div
                 className={'item-index-echarts'}
                 className={'item-index-echarts'}
-                style={item.style || { height: 75, width: 110 }}
+                style={item.style || { height: 75, width: 110, minHeight: 75 }}
               >
               >
                 {item.children}
                 {item.children}
               </div>
               </div>

+ 6 - 0
src/pages/notice/Config/Detail/index.tsx

@@ -430,6 +430,12 @@ const Detail = observer(() => {
               regionId: {
               regionId: {
                 title: 'RegionId',
                 title: 'RegionId',
                 required: true,
                 required: true,
+                'x-validator': [
+                  {
+                    required: true,
+                    message: '请选择regionId',
+                  },
+                ],
                 'x-component-props': {
                 'x-component-props': {
                   placeholder: '请选择regionId',
                   placeholder: '请选择regionId',
                 },
                 },

+ 14 - 2
src/pages/system/Apply/Menu/index.tsx

@@ -1,11 +1,14 @@
+import { getMenuPathByCode } from '@/utils/menu';
 import { onlyMessage } from '@/utils/util';
 import { onlyMessage } from '@/utils/util';
 import { Modal, Tree, Select } from 'antd';
 import { Modal, Tree, Select } from 'antd';
 import { useEffect, useState } from 'react';
 import { useEffect, useState } from 'react';
+import { useHistory } from 'umi';
 import { service } from '../index';
 import { service } from '../index';
 
 
 interface Props {
 interface Props {
   close: Function;
   close: Function;
   data: any;
   data: any;
+  tag?: string;
 }
 }
 
 
 const MenuPage = (props: Props) => {
 const MenuPage = (props: Props) => {
@@ -17,6 +20,7 @@ const MenuPage = (props: Props) => {
   const [half, setHalf] = useState<string[]>([]);
   const [half, setHalf] = useState<string[]>([]);
   const [ownerList, setOwenrList] = useState<any>([]);
   const [ownerList, setOwenrList] = useState<any>([]);
   const [owner, setOwner] = useState<any>();
   const [owner, setOwner] = useState<any>();
+  const history = useHistory();
 
 
   //获取集成菜单
   //获取集成菜单
   const getMenus = async () => {
   const getMenus = async () => {
@@ -94,7 +98,8 @@ const MenuPage = (props: Props) => {
   };
   };
 
 
   useEffect(() => {
   useEffect(() => {
-    console.log(data);
+    console.log(data, props.tag);
+
     if (data.id) {
     if (data.id) {
       getOwner();
       getOwner();
       getMenus();
       getMenus();
@@ -108,7 +113,14 @@ const MenuPage = (props: Props) => {
       title="集成菜单"
       title="集成菜单"
       width={600}
       width={600}
       onCancel={() => {
       onCancel={() => {
-        props.close();
+        // props.close();
+        if (props.tag === 'add' && data) {
+          props.close();
+          const url = getMenuPathByCode('system/Apply/Save');
+          history.push(`${url}?id=${data.id}`);
+        } else {
+          props.close();
+        }
       }}
       }}
       onOk={() => {
       onOk={() => {
         // props.close(true)
         // props.close(true)

+ 5 - 2
src/pages/system/Apply/Save/index.tsx

@@ -46,6 +46,7 @@ const Save = () => {
   const [detail, setDetail] = useState<any>({});
   const [detail, setDetail] = useState<any>({});
   const accessRef = useRef<any>([]);
   const accessRef = useRef<any>([]);
   const [type, setType] = useState<any>('internal-standalone');
   const [type, setType] = useState<any>('internal-standalone');
+  const [tag, setTag] = useState<string>('add');
 
 
   const provider1 = require('/public/images/apply/provider1.png');
   const provider1 = require('/public/images/apply/provider1.png');
   const provider2 = require('/public/images/apply/provider2.png');
   const provider2 = require('/public/images/apply/provider2.png');
@@ -324,7 +325,7 @@ const Save = () => {
           const isPage = data.integrationModes.includes('page');
           const isPage = data.integrationModes.includes('page');
           if (isPage) {
           if (isPage) {
             setVisiable(true);
             setVisiable(true);
-            setDetail(data);
+            setDetail(res.result);
           } else {
           } else {
             onlyMessage('保存成功');
             onlyMessage('保存成功');
             const url = getMenuPathByCode('system/Apply');
             const url = getMenuPathByCode('system/Apply');
@@ -1957,9 +1958,10 @@ const Save = () => {
     setView(false);
     setView(false);
     const params = new URLSearchParams(location.search);
     const params = new URLSearchParams(location.search);
     const item = params.get('id');
     const item = params.get('id');
-    // console.log(id);
+    console.log(id);
     if (item) {
     if (item) {
       setId(item);
       setId(item);
+      setTag('edit');
     }
     }
     if (location && location.state) {
     if (location && location.state) {
       setView(location.state.view);
       setView(location.state.view);
@@ -2007,6 +2009,7 @@ const Save = () => {
       {visible && (
       {visible && (
         <MenuPage
         <MenuPage
           data={detail}
           data={detail}
+          tag={tag}
           close={(isOk?: any) => {
           close={(isOk?: any) => {
             setVisiable(false);
             setVisiable(false);
             if (isOk) {
             if (isOk) {