Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
418d85d7
Commit
418d85d7
authored
Mar 05, 2024
by
xuchaozou
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 初步增加录音模块哦
parent
a5e02234
Pipeline
#85588
waiting for manual action with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
index.js
src/components/SoundAi/index.js
+29
-29
BasicLayout.js
src/layouts/BasicLayout.js
+1
-1
No files found.
src/components/SoundAi/index.js
View file @
418d85d7
import
{
request
,
event
}
from
'@wisdom-utils/utils'
import
{
useCallback
,
useEffect
}
from
'react'
import
{
request
,
event
}
from
'@wisdom-utils/utils'
;
import
{
useCallback
,
useEffect
}
from
'react'
;
const
SoundAi
=
props
=>
{
const
changeSwitch
=
useCallback
(({
recordData
,
e
:
checked
})
=>
{
if
(
checked
)
{
const
changeSwitch
=
useCallback
(({
recordData
,
e
:
checked
})
=>
{
if
(
checked
)
{
}
// console.log(checked)
// debugger
...
...
@@ -16,34 +15,36 @@ const SoundAi = props => {
// loading : false
// })
// }, 5000)
},
[])
},
[]);
useEffect
(()
=>
{
request
(
"/PandaOMS/OMS/DataManger/GetDicConfigs"
,
{
request
(
'/PandaOMS/OMS/DataManger/GetDicConfigs'
,
{
params
:
{
ParentName
:
"智能语音"
,
ChilName
:
"是否开启"
}
}).
then
(
res
=>
{
ParentName
:
'智能语音'
,
ChilName
:
'是否开启'
,
},
})
.
then
(
res
=>
{
if
(
res
.
code
!=
0
)
{
return
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
const
{
data
}
=
res
;
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
);
})
event
.
on
(
"record:changedStaus"
,
changeSwitch
)
}).
catch
(
error
=>
{
.
catch
(
error
=>
{
// console.log(error)
})
});
return
()
=>
{
event
.
off
(
"record:changedStaus"
,
changeSwitch
)
}
},
[])
return
null
}
event
.
off
(
'record:changedStaus'
,
changeSwitch
);
};
},
[
changeSwitch
]);
return
null
;
}
;
export
default
SoundAi
\ No newline at end of file
export
default
SoundAi
;
src/layouts/BasicLayout.js
View file @
418d85d7
...
...
@@ -414,7 +414,7 @@ const Layout = props => {
window
.
share
.
event
.
removeAllListeners
(
'updateSite'
);
loginAction
.
events
.
removeListener
(
'toggleIndustry'
,
handleToggleIndustry
);
};
},
[
loginAction
.
events
,
props
]);
},
[
GetIntegrationConfig
,
loginAction
.
events
,
props
]);
useEffect
(()
=>
{
const
needMark
=
()
=>
...
...
邹绪超
@zouxuchao
mentioned in commit
4f1a7479
·
Mar 05, 2024
mentioned in commit
4f1a7479
mentioned in commit 4f1a74791e674ff2f13022c1e04bac17d8986f2c
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment