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
21fad263
Commit
21fad263
authored
Jan 14, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: message format bug
parent
aa76b29c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
9 deletions
+21
-9
civbase.zip
civbase.zip
+0
-0
micor.js
config/micor.js
+6
-6
base.js
src/api/service/base.js
+6
-0
index.js
src/components/Notifier/index.js
+1
-1
BasicLayout.js
src/layouts/BasicLayout.js
+0
-1
micro.js
src/micro.js
+1
-1
login.js
src/pages/user/login/login.js
+7
-0
No files found.
civbase.zip
0 → 100644
View file @
21fad263
This diff was suppressed by a .gitattributes entry.
config/micor.js
View file @
21fad263
...
@@ -10,12 +10,12 @@ export default {
...
@@ -10,12 +10,12 @@ export default {
activeRule
:
genActiveRule
(
'/civbase/civweb4'
),
activeRule
:
genActiveRule
(
'/civbase/civweb4'
),
props
:
{},
props
:
{},
},
},
{
//
{
name
:
'civweb5'
,
//
name: 'civweb5',
entry
:
`//
${
window
.
location
.
hostname
}
:3002/civbase/civweb5`
,
//
entry: `//${window.location.hostname}:3002/civbase/civweb5`,
container
:
'#micro-container'
,
//
container: '#micro-container',
activeRule
:
genActiveRule
(
'/civbase/civweb5'
),
//
activeRule: genActiveRule('/civbase/civweb5'),
},
//
},
],
],
prod
:
[
prod
:
[
{
{
...
...
src/api/service/base.js
View file @
21fad263
import
{
service
,
jsonp
}
from
'@wisdom-utils/utils'
;
import
{
service
,
jsonp
}
from
'@wisdom-utils/utils'
;
import
constants
from
'../constants'
;
import
constants
from
'../constants'
;
export
const
API
=
{
export
const
API
=
{
AUTHORIZATION_TOKEN
:
'/Publish/Identity/AuthorizationToken'
,
GET_GATEWAY_CONFIG
:
'/Publish/OMS/GateWayConfig'
,
GET_GATEWAY_CONFIG
:
'/Publish/OMS/GateWayConfig'
,
GET_CONFIG
:
'/CityInterface/rest/services.svc/GetConfig'
,
GET_CONFIG
:
'/CityInterface/rest/services.svc/GetConfig'
,
GENERATE_TOKEN
:
'/cityinterface/rest/services.svc/generatetoken'
,
GENERATE_TOKEN
:
'/cityinterface/rest/services.svc/generatetoken'
,
...
@@ -29,6 +30,11 @@ export const API = {
...
@@ -29,6 +30,11 @@ export const API = {
};
};
const
services
=
service
({
const
services
=
service
({
authorizationToken
:
{
url
:
API
.
AUTHORIZATION_TOKEN
,
method
:
constants
.
REQUEST_METHOD_GET
,
type
:
constants
.
REQUEST_HTTP
,
},
getWateWayConfig
:
{
getWateWayConfig
:
{
url
:
API
.
GET_GATEWAY_CONFIG
,
url
:
API
.
GET_GATEWAY_CONFIG
,
method
:
constants
.
REQUEST_METHOD_GET
,
method
:
constants
.
REQUEST_METHOD_GET
,
...
...
src/components/Notifier/index.js
View file @
21fad263
...
@@ -402,7 +402,7 @@ class Notifier {
...
@@ -402,7 +402,7 @@ class Notifier {
break
;
break
;
case
MESSAGE_TYPE
.
SCADA_TYPE
:
case
MESSAGE_TYPE
.
SCADA_TYPE
:
case
"通用报警"
:
case
"通用报警"
:
messageInfo
=
`
【
${
info
.
title
}
】
${
info
.
alarmDevice
}
\\n
${
info
.
alarmContent
}
\\n
${
info
.
alarmValue
}
/
${
info
.
alarmThreshold
}
\\n
${
info
.
deviceCode
}
`
;
messageInfo
=
`
${
info
.
title
}
\\n
${
info
.
content
.
replace
(
", "
,
"
\\
n"
)
}
\\n
${
info
.
deviceCode
}
`
;
break
;
break
;
case
MESSAGE_TYPE
.
SYS_TYPE
:
case
MESSAGE_TYPE
.
SYS_TYPE
:
case
"系统通知"
:
case
"系统通知"
:
...
...
src/layouts/BasicLayout.js
View file @
21fad263
...
@@ -694,7 +694,6 @@ const BasicLayout = props => {
...
@@ -694,7 +694,6 @@ const BasicLayout = props => {
openKeys
=
{[...
openKeys
]}
openKeys
=
{[...
openKeys
]}
menuProps
=
{{
menuProps
=
{{
onClick
:
({
item
,
key
,
keyPath
,
domEvent
})
=>
{
onClick
:
({
item
,
key
,
keyPath
,
domEvent
})
=>
{
debugger
domEvent
.
persist
();
domEvent
.
persist
();
const
keyField
=
key
.
indexOf
(
'/'
)
>
-
1
?
'path'
:
'key'
;
const
keyField
=
key
.
indexOf
(
'/'
)
>
-
1
?
'path'
:
'key'
;
const
config
=
findPathByLeafId
(
key
,
[
currentRoutes
],
''
,
keyField
);
const
config
=
findPathByLeafId
(
key
,
[
currentRoutes
],
''
,
keyField
);
...
...
src/micro.js
View file @
21fad263
...
@@ -82,7 +82,7 @@ export const initMicroApps = loader => {
...
@@ -82,7 +82,7 @@ export const initMicroApps = loader => {
},
},
singular
:
true
,
singular
:
true
,
scopedCSS
:
true
,
scopedCSS
:
true
,
prefetch
:
'all'
,
//
prefetch: 'all',
// eslint-disable-next-line no-underscore-dangle
// eslint-disable-next-line no-underscore-dangle
getPublicPath
:
window
.
__INJECTED_PUBLIC_PATH_BY_QIANKUN__
,
getPublicPath
:
window
.
__INJECTED_PUBLIC_PATH_BY_QIANKUN__
,
excludeAssetFilter
:
url
=>
excludeAssetFilter
:
url
=>
...
...
src/pages/user/login/login.js
View file @
21fad263
...
@@ -641,6 +641,13 @@ class Login {
...
@@ -641,6 +641,13 @@ class Login {
this
.
events
.
removeAllListeners
(
'loginError'
);
this
.
events
.
removeAllListeners
(
'loginError'
);
const
self
=
this
;
const
self
=
this
;
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
// services.authorizationToken({
// loginName: usr,
// password: pwd ? sha1(pwd).toUpperCase() : '',
// type: "database"
// }).then(res => {
// console.log(res)
// })
services
.
generateToken
(
services
.
generateToken
(
{
{
f
:
'json'
,
f
:
'json'
,
...
...
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