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
14a03368
Commit
14a03368
authored
1 year ago
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 报警推送修改
parent
d08f83a1
Pipeline
#77850
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
message.js
src/layouts/AppLayout/notifier/message.js
+5
-1
notice.js
src/layouts/AppLayout/notifier/notice.js
+8
-1
micro.js
src/micro.js
+3
-5
No files found.
src/layouts/AppLayout/notifier/message.js
View file @
14a03368
...
...
@@ -15,7 +15,8 @@ class Message {
defaultContent
,
webIcon
,
title
,
infoClasses
infoClasses
,
webVoice
}
=
message
)
{
this
.
id
=
id
;
this
.
infoContent
=
infoContent
;
...
...
@@ -30,6 +31,7 @@ class Message {
this
.
title
=
title
;
// 消息标题
this
.
defaultContent
=
defaultContent
;
this
.
infoClasses
=
infoClasses
;
this
.
webVoice
=
webVoice
;
}
}
...
...
@@ -68,6 +70,7 @@ export const createMessageFromHis = (hisMessage, options = {}) => {
dateTime
:
hisMessage
.
hisCreateTime
,
infoLevel
:
hisMessage
.
infoLevel
,
webConfig
:
hisMessage
.
web_config
,
webVoice
:
hisMessage
.
webVoice
,
webPath
:
hisMessage
.
web_path
,
messType
:
hisMessage
.
messType
,
defaultContent
:
(
_
.
isString
(
hisMessage
.
defaultContent
)
&&
hisMessage
.
defaultContent
.
replace
(
new
RegExp
(
/ /g
),
""
).
length
>
0
)
?
hisMessage
.
defaultContent
:
null
,
...
...
@@ -109,6 +112,7 @@ export const createMessageFromReal = (realMesssage, options = {}) => {
dateTime
:
realMesssage
.
createTime
,
webConfig
:
realMesssage
.
web_config
,
webPath
:
realMesssage
.
web_path
,
webVoice
:
realMesssage
.
webVoice
,
messType
:
realMesssage
.
messType
||
realMesssage
.
MessType
,
defaultContent
:
(
_
.
isString
(
realMesssage
.
defaultContent
)
&&
realMesssage
.
defaultContent
.
replace
(
new
RegExp
(
/ /g
),
""
).
length
>
0
)
?
realMesssage
.
defaultContent
:
null
,
webIcon
:
(
_
.
isString
(
realMesssage
.
webIcon
)
&&
realMesssage
.
webIcon
.
replace
(
new
RegExp
(
/ /g
),
""
).
length
>
0
)
?
realMesssage
.
webIcon
:
null
,
...
...
This diff is collapsed.
Click to expand it.
src/layouts/AppLayout/notifier/notice.js
View file @
14a03368
...
...
@@ -425,7 +425,8 @@ class Notifier {
*/
speakMessage
=
message
=>
{
if
(
!
message
)
return
;
const
{
version
}
=
message
;
const
{
version
,
webVoice
}
=
message
;
if
(
webVoice
)
return
this
.
speakWebVoice
(
message
);
if
(
version
===
'3.0'
)
return
this
.
speakDefault
(
message
);
switch
(
message
.
infoType
)
{
case
'SCADA报警'
:
...
...
@@ -492,6 +493,12 @@ class Notifier {
let
msg
=
`
${
message
.
title
}
,
${
message
.
title
}
:
${
message
.
infoContent
??
''
}
`
this.speak(msg);
};
speakWebVoice = message => {
const { webVoice } = message;
if(typeof webVoice === "string") {
this.speak(webVoice?.replace(/_/g, ','));
}
}
speak = msg => {
if (!this.speakState) return;
this.speakState.text = msg;
...
...
This diff is collapsed.
Click to expand it.
src/micro.js
View file @
14a03368
...
...
@@ -261,11 +261,9 @@ export const initMicroApps = (url) => {
start
(
Configuration
);
runAfterFirstMounted
(()
=>
{
event
.
emit
(
'loading'
,
false
);
if
(
micro
.
length
<=
3
)
{
setTimeout
(()
=>
{
prefetchApps
(
micro
);
},
500
)
}
setTimeout
(()
=>
{
prefetchApps
(
micro
);
},
5000
)
Logger
.
info
(
'[MainApp] first app mounted'
);
});
addGlobalUncaughtErrorHandler
(
event
=>
{
...
...
This diff is collapsed.
Click to expand it.
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