From c899972071397cf4c83ea4c07b0a8b89c3cd6319 Mon Sep 17 00:00:00 2001 From: wuzuowei Date: Sat, 9 Mar 2024 10:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E5=8A=9E=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../microhost/components/rightInfo/index.tsx | 72 ++++++++++--------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/platform-code/src/microhost/components/rightInfo/index.tsx b/platform-code/src/microhost/components/rightInfo/index.tsx index 1f4c986..f215520 100644 --- a/platform-code/src/microhost/components/rightInfo/index.tsx +++ b/platform-code/src/microhost/components/rightInfo/index.tsx @@ -3,7 +3,7 @@ import { Route } from 'dva/router' import lodash from "lodash" import requestaxios from 'axios'; import utils from "@/microhost/common" -import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react' +import React, { useContext, useEffect, useLayoutEffect, useRef, useState, useCallback } from 'react' import { history, useModel, } from 'umi' import { Dropdown, Menu, Modal } from "antd" import { UserOutlined, QuestionCircleOutlined, StopOutlined, InfoCircleOutlined, BgColorsOutlined, LogoutOutlined, KeyOutlined, OrderedListOutlined } from "@ant-design/icons" @@ -82,6 +82,40 @@ const RightInfo = () => { }); } + const gomsglog = useCallback( + + lodash.throttle(() => { + let body: message1 = new message1(); + body.code = '@host#control#openPage'; + body.data = { + newPage: false, + params: { + // recordData: JSON.stringify(record), + }, + moduleId: '41f852c5-dfa3-3057-c62d-197d82f71b58', //要打开的模块id(系统配置-导航菜单-找到所在模块的id) + }; + body.msg = '跳转'; + body.to = 'iBKLinker-union-framework'; + body.from = 'prd'; + window.top?.postMessage(body, '*'); + // history.replace({ + // pathname: '/NewProductCalculation/InputList/InputList', + // state: { + // recordData: record, + // }, + // }); + // setTab(() => { + // let titles: any = []; + // titles.push( + // '新成本测算输入表', + // '/NewProductCalculation/InputList/InputList', + // '/新成本测算/输入表数据回显', + // ); + // return titles; + // });) + }, 300000) + + , []) const changePassword = async () => { await thisForm.validateFields() let vals: any = thisForm.getFieldsValue() @@ -283,48 +317,20 @@ const RightInfo = () => {
{!nickname ? "-" : `${nickname},您好!`} { + gomsglog() // Cookies.set('InputListData', JSON.stringify(record)); - - let body: message1 = new message1(); - body.code = '@host#control#openPage'; - body.data = { - newPage: false, - params: { - // recordData: JSON.stringify(record), - }, - moduleId: '41f852c5-dfa3-3057-c62d-197d82f71b58', //要打开的模块id(系统配置-导航菜单-找到所在模块的id) - }; - body.msg = '跳转'; - body.to = 'iBKLinker-union-framework'; - body.from = 'prd'; - window.top?.postMessage(body, '*'); - // history.replace({ - // pathname: '/NewProductCalculation/InputList/InputList', - // state: { - // recordData: record, - // }, - // }); - // setTab(() => { - // let titles: any = []; - // titles.push( - // '新成本测算输入表', - // '/NewProductCalculation/InputList/InputList', - // '/新成本测算/输入表数据回显', - // ); - // return titles; - // }); }} id='MSGNUM' style={{ fontSize: '16PX', color: 'rgb(225 70 70)' }}>{`您有${msgnum}条待办`}
- + {/* */} - { + < UserEditor visible={showEditor} userData={userInfo} callback={(ret: any) => { setShowEditor(false) setShowFuncs(false) }} /> - + ) }