Commit a5e02234 authored by xuchaozou's avatar xuchaozou

feat: 初步增加录音模块哦

parent 703fa0d8
......@@ -115,7 +115,7 @@
"@wisdom-map/arcgismap": "1.4.0-259",
"@wisdom-map/basemap": "1.1.0-41",
"@wisdom-map/util": "^1.0.28-0",
"@wisdom-utils/components": "0.1.348",
"@wisdom-utils/components": "0.1.349",
"@wisdom-utils/runtime": "0.0.48",
"@wisdom-utils/utils": "0.1.388",
"animate.css": "^4.1.1",
......
import { request, event } from '@wisdom-utils/utils'
import { useCallback, useEffect } from 'react'
const SoundAi = props => {
const changeSwitch = useCallback(({recordData , e : checked}) => {
if(checked) {
}
// console.log(checked)
// debugger
// event.emit("record:changeSwicth", {
// loading : true
// })
// setTimeout(() => {
// event.emit("record:changeSwicth", {
// loading : false
// })
// }, 5000)
}, [])
useEffect(() => {
request("/PandaOMS/OMS/DataManger/GetDicConfigs", {
params: {
ParentName: "智能语音",
ChilName: "是否开启"
}
}).then(res => {
if (res.code != 0) {
return
}
const data = res.data
const config = data.find(item => item.nodeName == "是否开启")
if(!config) return
const value = config.nodeValue
if(value != "开") return
event.emit("record:changeVisible", {
visible : true
})
event.on("record:changedStaus", changeSwitch)
}).catch(error => {
// console.log(error)
})
return () => {
event.off("record:changedStaus", changeSwitch)
}
}, [])
return null
}
export default SoundAi
\ No newline at end of file
......@@ -35,6 +35,7 @@ import { waterMark } from '../utils/mark';
import layoutStyles from './BasicLayout.less';
import SecurityLayout from './SecurityLayout';
import Site from './Site';
import SoundAi from '../components/SoundAi';
const { params } = helpers;
let notify = null;
......@@ -763,6 +764,7 @@ const Layout = props => {
<div id="micro-container" className="subapp-container">
{props.children}
</div>
<SoundAi />
{subLoading && <Loading loading={subLoading} />}
{initWebContent && <Loading loading={initWebContent} />}
</BasicLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment