wzyyy %!s(int64=3) %!d(string=hai) anos
pai
achega
21b1f52c34

+ 84 - 4
public/icons/iconfont.css

@@ -1,9 +1,9 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3183515 */
-  src: url('iconfont.woff2?t=1652669655734') format('woff2'),
-  url('iconfont.woff?t=1652669655734') format('woff'),
-  url('iconfont.ttf?t=1652669655734') format('truetype'),
-  url('iconfont.svg?t=1652669655734#iconfont') format('svg');
+  src: url('iconfont.woff2?t=1663644110050') format('woff2'),
+       url('iconfont.woff?t=1663644110050') format('woff'),
+       url('iconfont.ttf?t=1663644110050') format('truetype'),
+       url('iconfont.svg?t=1663644110050#iconfont') format('svg');
 }
 
 .iconfont {
@@ -14,6 +14,86 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-details:before {
+  content: "\e61f";
+}
+
+.icon-wenjian:before {
+  content: "\e6bc";
+}
+
+.icon-shangchuanwenjian:before {
+  content: "\e6bd";
+}
+
+.icon-daoru:before {
+  content: "\e6b6";
+}
+
+.icon-daochu:before {
+  content: "\e6b7";
+}
+
+.icon-jihuo:before {
+  content: "\e6b8";
+}
+
+.icon-tingyong1:before {
+  content: "\e6b9";
+}
+
+.icon-tongbu:before {
+  content: "\e6ba";
+}
+
+.icon-chongzhi:before {
+  content: "\e6bb";
+}
+
+.icon-tingyong:before {
+  content: "\e6b5";
+}
+
+.icon-guanji_huaban:before {
+  content: "\e643";
+}
+
+.icon-wulianka:before {
+  content: "\e6b1";
+}
+
+.icon-pingtaiduijie:before {
+  content: "\e6b2";
+}
+
+.icon-wuliankaguanli:before {
+  content: "\e6b3";
+}
+
+.icon-chongzhiguanli:before {
+  content: "\e6b4";
+}
+
+.icon-bangding:before {
+  content: "\e615";
+}
+
+.icon-xieyimoban:before {
+  content: "\e732";
+}
+
+.icon-yingyongguanli:before {
+  content: "\e6b0";
+}
+
+.icon-jinggao:before {
+  content: "\e620";
+}
+
+.icon-tishi:before {
+  content: "\e8ba";
+}
+
 .icon-chakanAPI:before {
   content: "\e6af";
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
public/icons/iconfont.js


+ 140 - 0
public/icons/iconfont.json

@@ -6,6 +6,146 @@
   "description": "",
   "glyphs": [
     {
+      "icon_id": "15550803",
+      "name": "details",
+      "font_class": "details",
+      "unicode": "e61f",
+      "unicode_decimal": 58911
+    },
+    {
+      "icon_id": "31733005",
+      "name": "文件",
+      "font_class": "wenjian",
+      "unicode": "e6bc",
+      "unicode_decimal": 59068
+    },
+    {
+      "icon_id": "31733006",
+      "name": "上传文件",
+      "font_class": "shangchuanwenjian",
+      "unicode": "e6bd",
+      "unicode_decimal": 59069
+    },
+    {
+      "icon_id": "31732723",
+      "name": "导入",
+      "font_class": "daoru",
+      "unicode": "e6b6",
+      "unicode_decimal": 59062
+    },
+    {
+      "icon_id": "31732724",
+      "name": "导出",
+      "font_class": "daochu",
+      "unicode": "e6b7",
+      "unicode_decimal": 59063
+    },
+    {
+      "icon_id": "31732725",
+      "name": "激活",
+      "font_class": "jihuo",
+      "unicode": "e6b8",
+      "unicode_decimal": 59064
+    },
+    {
+      "icon_id": "31732726",
+      "name": "停用",
+      "font_class": "tingyong1",
+      "unicode": "e6b9",
+      "unicode_decimal": 59065
+    },
+    {
+      "icon_id": "31732727",
+      "name": "同步",
+      "font_class": "tongbu",
+      "unicode": "e6ba",
+      "unicode_decimal": 59066
+    },
+    {
+      "icon_id": "31732728",
+      "name": "充值",
+      "font_class": "chongzhi",
+      "unicode": "e6bb",
+      "unicode_decimal": 59067
+    },
+    {
+      "icon_id": "31721952",
+      "name": "停用",
+      "font_class": "tingyong",
+      "unicode": "e6b5",
+      "unicode_decimal": 59061
+    },
+    {
+      "icon_id": "12754515",
+      "name": "关机",
+      "font_class": "guanji_huaban",
+      "unicode": "e643",
+      "unicode_decimal": 58947
+    },
+    {
+      "icon_id": "31698834",
+      "name": "物联卡",
+      "font_class": "wulianka",
+      "unicode": "e6b1",
+      "unicode_decimal": 59057
+    },
+    {
+      "icon_id": "31698835",
+      "name": "平台对接",
+      "font_class": "pingtaiduijie",
+      "unicode": "e6b2",
+      "unicode_decimal": 59058
+    },
+    {
+      "icon_id": "31698836",
+      "name": "物联卡管理",
+      "font_class": "wuliankaguanli",
+      "unicode": "e6b3",
+      "unicode_decimal": 59059
+    },
+    {
+      "icon_id": "31698837",
+      "name": "充值管理",
+      "font_class": "chongzhiguanli",
+      "unicode": "e6b4",
+      "unicode_decimal": 59060
+    },
+    {
+      "icon_id": "10199180",
+      "name": "绑定",
+      "font_class": "bangding",
+      "unicode": "e615",
+      "unicode_decimal": 58901
+    },
+    {
+      "icon_id": "7055661",
+      "name": "协议模版",
+      "font_class": "xieyimoban",
+      "unicode": "e732",
+      "unicode_decimal": 59186
+    },
+    {
+      "icon_id": "31302320",
+      "name": "应用管理",
+      "font_class": "yingyongguanli",
+      "unicode": "e6b0",
+      "unicode_decimal": 59056
+    },
+    {
+      "icon_id": "997408",
+      "name": "警告",
+      "font_class": "jinggao",
+      "unicode": "e620",
+      "unicode_decimal": 58912
+    },
+    {
+      "icon_id": "11372710",
+      "name": "提示",
+      "font_class": "tishi",
+      "unicode": "e8ba",
+      "unicode_decimal": 59578
+    },
+    {
       "icon_id": "29728797",
       "name": "查看API",
       "font_class": "chakanAPI",

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 40 - 0
public/icons/iconfont.svg


BIN=BIN
public/icons/iconfont.ttf


BIN=BIN
public/icons/iconfont.woff


BIN=BIN
public/icons/iconfont.woff2


+ 6 - 1
src/components/FSelectDevices/index.tsx

@@ -17,6 +17,7 @@ interface Props {
   value?: Partial<DeviceInstance>[];
   onChange?: (data: Partial<DeviceInstance>[]) => void;
   productId?: string;
+  disabled?: boolean;
 }
 
 const deviceStatus = new Map();
@@ -117,7 +118,11 @@ const FSelectDevices = observer((props: Props) => {
         addonAfter={
           <EditOutlined
             onClick={() => {
-              State.visible = true;
+              if (props.disabled) {
+                State.visible = false;
+              } else {
+                State.visible = true;
+              }
             }}
           />
         }

+ 45 - 7
src/pages/device/Firmware/Task/Save/index.tsx

@@ -23,6 +23,15 @@ const Save = (props: Props) => {
   const devices = useRef<DeviceInstance[]>([]);
 
   useEffect(() => {
+    console.log(data);
+    if (data && data.id) {
+      setMode(data.mode.value);
+    }
+    if (data?.deviceId) {
+      setReleaseType('part');
+    } else {
+      setReleaseType('all');
+    }
     service.queryDevice().then((resp) => {
       if (resp.status === 200) {
         devices.current = resp.result;
@@ -68,7 +77,16 @@ const Save = (props: Props) => {
       onOk={() => save()}
       visible
     >
-      <Form form={form} name="basic" layout="vertical">
+      <Form
+        form={form}
+        name="basic"
+        layout="vertical"
+        initialValues={{
+          ...data,
+          releaseType: data?.deviceId ? 'part' : 'all',
+          deviceId: data?.deviceId?.map((item: any) => ({ id: item, name: item })),
+        }}
+      >
         <Row gutter={24}>
           <Col span={24}>
             <Form.Item
@@ -85,7 +103,7 @@ const Save = (props: Props) => {
                 },
               ]}
             >
-              <Input placeholder="请输入任务名称" />
+              <Input placeholder="请输入任务名称" disabled={!!data?.id} />
             </Form.Item>
           </Col>
           <Col span={24}>
@@ -101,6 +119,7 @@ const Save = (props: Props) => {
             >
               <Select
                 placeholder="请选择推送方式"
+                disabled={!!data?.id}
                 onChange={(value) => {
                   setMode(value);
                 }}
@@ -129,7 +148,11 @@ const Save = (props: Props) => {
                     },
                   ]}
                 >
-                  <InputNumber style={{ width: '100%' }} placeholder="请输入响应超时时间(秒)" />
+                  <InputNumber
+                    style={{ width: '100%' }}
+                    placeholder="请输入响应超时时间(秒)"
+                    disabled={!!data?.id}
+                  />
                 </Form.Item>
               </Col>
               <Col span={12}>
@@ -149,7 +172,11 @@ const Save = (props: Props) => {
                     },
                   ]}
                 >
-                  <InputNumber style={{ width: '100%' }} placeholder="请请输入升级超时时间(秒)" />
+                  <InputNumber
+                    style={{ width: '100%' }}
+                    placeholder="请请输入升级超时时间(秒)"
+                    disabled={!!data?.id}
+                  />
                 </Form.Item>
               </Col>
             </>
@@ -172,7 +199,11 @@ const Save = (props: Props) => {
                   },
                 ]}
               >
-                <InputNumber style={{ width: '100%' }} placeholder="请请输入升级超时时间(秒)" />
+                <InputNumber
+                  style={{ width: '100%' }}
+                  placeholder="请请输入升级超时时间(秒)"
+                  disabled={!!data?.id}
+                />
               </Form.Item>
             </Col>
           )}
@@ -190,6 +221,7 @@ const Save = (props: Props) => {
                   ]}
                 >
                   <Radio.Group
+                    disabled={!!data?.id}
                     onChange={(e) => {
                       setReleaseType(e.target.value);
                     }}
@@ -211,7 +243,7 @@ const Save = (props: Props) => {
                       },
                     ]}
                   >
-                    <FSelectDevices productId={ids?.productId || ''} />
+                    <FSelectDevices productId={ids?.productId || ''} disabled={!!data?.id} />
                   </Form.Item>
                 </Col>
               )}
@@ -219,7 +251,13 @@ const Save = (props: Props) => {
           )}
           <Col span={24}>
             <Form.Item label="说明" name="description">
-              <Input.TextArea rows={3} maxLength={200} showCount={true} placeholder="请输入说明" />
+              <Input.TextArea
+                rows={3}
+                maxLength={200}
+                showCount={true}
+                placeholder="请输入说明"
+                disabled={!!data?.id}
+              />
             </Form.Item>
           </Col>
         </Row>

+ 21 - 11
src/pages/device/Firmware/Task/index.tsx

@@ -17,7 +17,7 @@ import { observer } from '@formily/react';
 import type { FirmwareItem } from '@/pages/device/Firmware/typings';
 import Save from './Save';
 import { onlyMessage } from '@/utils/util';
-import { PermissionButton } from '@/components';
+import { PermissionButton, AIcon } from '@/components';
 import useDomFullHeight from '@/hooks/document/useDomFullHeight';
 import usePermissions from '@/hooks/permission';
 import SearchComponent from '@/components/SearchComponent';
@@ -76,8 +76,8 @@ const Task = observer(() => {
   const [param, setParam] = useState({});
   const history = useHistory<Record<string, string>>();
   const location = useLocation<{ id: string }>();
-  const id = (location as any).query?.id || '';
-  const productId = (location as any).query?.productId || '';
+  const id = (location as any).query?.id || localStorage.getItem('TaskId');
+  const productId = (location as any).query?.productId || localStorage.getItem('TaskProductId');
 
   const columns: ProColumns<any>[] = [
     {
@@ -126,20 +126,29 @@ const Task = observer(() => {
       width: 200,
       fixed: 'right',
       render: (text, record) => [
-        <a
+        <PermissionButton
+          key={'api'}
+          type={'link'}
+          style={{ padding: 0 }}
+          isPermission={true}
+          tooltip={{
+            title: '详情',
+          }}
           onClick={() => {
             const url = getMenuPathByParams(MENUS_CODE['device/Firmware/Task/Detail'], record?.id);
             history.push(url);
           }}
+        >
+          <AIcon type={'icon-details'} />
+        </PermissionButton>,
+        <a
+          onClick={() => {
+            state.visible = true;
+            state.current = record;
+          }}
           key="link"
         >
-          <Tooltip
-            title={intl.formatMessage({
-              id: 'pages.data.option.detail',
-              defaultMessage: '查看',
-            })}
-            key={'detail'}
-          >
+          <Tooltip title="查看" key={'detail'}>
             <EyeOutlined />
           </Tooltip>
         </a>,
@@ -208,6 +217,7 @@ const Task = observer(() => {
             <PermissionButton
               onClick={() => {
                 state.visible = true;
+                state.current = undefined;
               }}
               isPermission={permission.add}
               key="button"

+ 3 - 0
src/pages/device/Firmware/index.tsx

@@ -129,6 +129,9 @@ const Firmware = observer(() => {
           isPermission={permission.action}
           key="upgrade"
           onClick={() => {
+            //缓存路由参数
+            localStorage.setItem('TaskId', record.id);
+            localStorage.setItem('TaskProductId', record.productId);
             const url = `${getMenuPathByParams(MENUS_CODE['device/Firmware/Task'])}`;
             history.push(`${url}?id=${record?.id}&productId=${record?.productId}`);
           }}

+ 2 - 0
src/pages/device/Firmware/typings.d.ts

@@ -12,6 +12,8 @@ type FirmwareItem = {
   url: string;
   version: string;
   versionOrder: number;
+  mode: any;
+  deviceId: any;
 };
 
 type TaskItem = {

+ 2 - 2
src/pages/iframe/index.tsx

@@ -12,11 +12,11 @@ const Iframe = () => {
     let menuUrl: any = url;
     if (res.status === 200) {
       if (res.result.page.routeType === 'hash') {
-        menuUrl = `/#/${url}`;
+        menuUrl = `/#/${url}?layout=false`;
       }
       if (res.result.provider === 'internal-standalone') {
         //{baseUrl}/api/application/sso/{appId}/login?redirect={menuUrl}
-        const urlStandalone = `${res.result.page}/api/application/sso/${appId}/login?redirect=${menuUrl}`;
+        const urlStandalone = `${res.result.page}/api/application/sso/${appId}/login?redirect=${menuUrl}?layout=false`;
         setIframeUrl(urlStandalone);
       } else {
         const urlOther = `${res.result.page}/${menuUrl}`;

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

@@ -455,9 +455,9 @@ const Apply = () => {
               <PermissionButton
                 isPermission={permission.delete}
                 tooltip={{
-                  title: record.state === 'disabled' ? '删除' : '请先禁用该应用,再删除',
+                  title: record.state.value === 'disabled' ? '删除' : '请先禁用该应用,再删除',
                 }}
-                disabled={record.state !== 'disabled'}
+                disabled={record.state.value !== 'disabled'}
                 popConfirm={{
                   title: '确认删除',
                   disabled: record.state !== 'disabled',