outaozhen 4 лет назад
Родитель
Сommit
928716c753

+ 4 - 8
src/pages/Customer/Business/components/BusinessDetail/Step/index.jsx

@@ -70,8 +70,7 @@ const Step = ({ id, statusId, groupStatus = [], isOwner }) => {
             tryChangeStatus({ id, businessStatusId: e.key })
           }
         })
-      }}
-    >
+      }}>
       {op.otherItems.map(item => (
         <Menu.Item key={item.id}>
           <div className="flex justify-between items-center">
@@ -96,8 +95,7 @@ const Step = ({ id, statusId, groupStatus = [], isOwner }) => {
               <p>赢单率{item.percentage}%</p>
             </div>
           }
-          key={item.id}
-        >
+          key={item.id}>
           <div
             onClick={() => {
               if (!isOwner) return
@@ -138,8 +136,7 @@ const Step = ({ id, statusId, groupStatus = [], isOwner }) => {
                 : op.selectedItemIdx > idx
                 ? 'state-suc'
                 : 'state-undo'
-            }`}
-          >
+            }`}>
             <span className="title ">{item.name}</span>
             {idx === 0 ? (
               <>
@@ -158,8 +155,7 @@ const Step = ({ id, statusId, groupStatus = [], isOwner }) => {
       <div
         className={`busi-state-item ${
           op.isEnd ? stateMap[op.otherItems[op.endItemIdx].key].class : 'state-undo'
-        }`}
-      >
+        }`}>
         <span className="title">
           {op.isEnd ? (
             <>

+ 1 - 1
src/pages/Hr/Notification/components/AddMessage.jsx

@@ -1,5 +1,5 @@
 import React from 'react'
-import { Button, Form } from 'antd'
+import { Button, Form, message } from 'antd'
 import {
   ModalForm,
   ProFormDependency,

+ 8 - 3
src/pages/Hr/Notification/index.jsx

@@ -1,13 +1,18 @@
 import React, { useState, useEffect, useRef } from 'react'
-import { List, Avatar, Tag, Skeleton, Divider } from 'antd'
+import { List, Avatar, Tag, Skeleton, Divider, message } from 'antd'
 import InfiniteScroll from 'react-infinite-scroll-component'
 import { queryMessageList, sendMessage } from '@/services/staff'
 import AddMessage from './components/AddMessage'
 import consts from '@/consts'
 import { useRequest } from 'umi'
+import MarkdownIt from 'markdown-it'
+// import useWebSocketFn, { cmdType } from '@/hooks/core/useWebSocketFn'
+
+const mdParser = new MarkdownIt()
 
 const Notification = () => {
   const tRef = useRef(null)
+  // const { sendMsg } = useWebSocketFn()
   const msgTypeEnum = {
     message: '通知',
     notification: '消息'
@@ -49,7 +54,7 @@ const Notification = () => {
     manual: true,
     onSuccess: result => {
       tRef.current?.reload()
-      sendMsg(cmdType.Notice, result)
+      // sendMsg(cmdType.Notice, result)
     },
     onError: e => {
       message.error(e.message)
@@ -86,7 +91,7 @@ const Notification = () => {
                     </div>
                   }
                 />
-                {item.content}
+                {mdParser.render(item.content)}
                 <div className="mt-1 text-hex-aaa">{item.createTime}</div>
               </List.Item>
             )}