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
4f1a7479
Commit
4f1a7479
authored
Mar 05, 2024
by
xuchaozou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "feat: 初步增加录音模块哦"
This reverts commit
418d85d7
.
parent
3ca5bc08
Pipeline
#85594
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 @
4f1a7479
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
...
...
@@ -15,36 +16,34 @@ 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
;
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
);
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
})
.
catch
(
error
=>
{
event
.
on
(
"record:changedStaus"
,
changeSwitch
)
}).
catch
(
error
=>
{
// console.log(error)
});
})
return
()
=>
{
event
.
off
(
'record:changedStaus'
,
changeSwitch
);
};
},
[
changeSwitch
]);
return
null
;
}
;
event
.
off
(
"record:changedStaus"
,
changeSwitch
)
}
},
[])
return
null
}
export
default
SoundAi
;
export
default
SoundAi
\ No newline at end of file
src/layouts/BasicLayout.js
View file @
4f1a7479
...
...
@@ -414,7 +414,7 @@ const Layout = props => {
window
.
share
.
event
.
removeAllListeners
(
'updateSite'
);
loginAction
.
events
.
removeListener
(
'toggleIndustry'
,
handleToggleIndustry
);
};
},
[
GetIntegrationConfig
,
loginAction
.
events
,
props
]);
},
[
loginAction
.
events
,
props
]);
useEffect
(()
=>
{
const
needMark
=
()
=>
...
...
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