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
5580dec3
Commit
5580dec3
authored
Mar 17, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: alarm message bug
parent
2c1201d5
Pipeline
#24556
skipped with stages
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
146 additions
and
130 deletions
+146
-130
civbase.zip
civbase.zip
+0
-0
proxy.js
config/proxy.js
+2
-2
app.js
src/app.js
+0
-1
NoticeIconView.js
src/components/GlobalHeader/NoticeIconView.js
+1
-1
index.js
src/components/NoticeIcon/Templates/Alarm/index.js
+7
-13
index.js
src/components/Notifier/index.js
+1
-1
reducer.js
src/containers/App/store/reducer.js
+1
-1
global.less
src/global.less
+126
-104
globalHeader.js
src/locales/zh-CN/globalHeader.js
+1
-0
micro.js
src/micro.js
+1
-0
login.js
src/pages/user/login/login.js
+6
-7
No files found.
civbase.zip
deleted
100644 → 0
View file @
2c1201d5
This diff was suppressed by a .gitattributes entry.
config/proxy.js
View file @
5580dec3
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const
proxyURL
=
'http
://192.168.10.150:8777
'
;
const
proxyURL
=
'http
s://panda-water.com
'
;
module
.
exports
=
{
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
dev
:
{
...
...
@@ -71,7 +71,7 @@ module.exports = {
},
'/CityTemp'
:
{
// target: 'http://192.168.10.150:8777',
target
:
'https://panda-water.cn'
,
target
:
proxyURL
,
changeOrigin
:
true
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
...
...
src/app.js
View file @
5580dec3
...
...
@@ -41,7 +41,6 @@ const isHttps = document.location.protocol === 'https:';
const
{
pwa
}
=
defaultSettings
;
// eslint-disable-next-line no-restricted-globals
const
namespace
=
`__PANDA_STORE__
${
location
.
hostname
}
`
;
debugger
window
.
createStoreage
=
new
Storeage
(
namespace
);
// eslint-disable-next-line no-underscore-dangle
const
initialState
=
Immutable
.
Map
();
...
...
src/components/GlobalHeader/NoticeIconView.js
View file @
5580dec3
...
...
@@ -217,7 +217,7 @@ class NoticeIconView extends Component {
<
NoticeIcon
.
Tab
list
=
{
this
.
state
.
noticeData
}
title
=
{
<
FormattedMessage
id
=
'component.noticeIcon.title'
/>
}
emptyText
=
{
<
FormattedMessage
id
=
'
noticeIoc
n.allClear'
/>
}
emptyText
=
{
<
FormattedMessage
id
=
'
component.noticeIco
n.allClear'
/>
}
confirmRead
=
{
this
.
notifier
.
confirmRead
}
handlerSysDetail
=
{
this
.
handlerSysDetail
}
loadMore
=
{
this
.
notifier
.
loadMore
}
...
...
src/components/NoticeIcon/Templates/Alarm/index.js
View file @
5580dec3
...
...
@@ -27,8 +27,8 @@ export class AlarmContent {
const
Alarm
=
({
message
,
confirmRead
,
config
})
=>
{
const
alarmContent
=
(
config
.
mqtt_mess
.
MessageLevel
===
"2.0"
&&
isJSON
(
message
.
infoContent
))
?
JSON
.
parse
(
message
.
infoContent
):
message
.
infoContent
;
console
.
log
(
"alarmContent"
,
alarmContent
);
const
goPath
=
item
=>
{
debugger
confirmRead
(
false
,
[
message
.
id
]);
const
widgetID
=
'widget_city_综合运营_管网监控_实时监控_报警监控'
;
const
webPath
=
'product/scada/AlertMonitoring/AlertMonitoring'
;
...
...
@@ -67,18 +67,12 @@ const Alarm = ({ message, confirmRead, config }) => {
<
i
>
{
alarmContent
.
alarmType
}
<
/i
>
{
alarmTitle
}
<
/p
>
<
p
>
{
alarmContent
.
alarmContent
}
<
/p
>
<
p
>
<
font
style
=
{{
color
:
'#ff0000'
}}
title
=
"点击查看详情"
>
{(
alarmValue
&&
Array
.
isArray
(
alarmValue
)
&&
alarmValue
.
length
>
0
&&
alarmValue
[
0
]
!==
'undefined'
&&
alarmValue
[
0
])
||
''
}
<
/font
>
{
`
${(
alarmValue
&&
Array
.
isArray
(
alarmValue
)
&&
alarmValue
.
length
>
0
&&
alarmValue
[
1
]
!==
'undefined'
&&
alarmValue
[
1
])
||
''
}
/
${
alarmContent
&&
alarmContent
.
alarmThreshold
&&
alarmContent
.
alarmThreshold
.
split
(
' '
).
join
(
''
)}
`
}
<
p
style
=
{{
color
:
'#888'
}}
>
{
alarmContent
.
alarmContent
}
<
/p
>
<
p
style
=
{{
color
:
'#888'
}}
>
{
alarmContent
&&
alarmContent
.
content
.
split
(
","
)[
1
]
}
<
/p
>
<
p
className
=
{
commonStyles
.
messageTime
}
>
{
message
.
time
}
<
/p
>
<
/div
>
...
...
src/components/Notifier/index.js
View file @
5580dec3
...
...
@@ -479,7 +479,7 @@ class Notifier {
renderPopPlatform
(
message
)
{
this
.
renderPlatformElement
=
this
.
renderPlatform
&&
this
.
renderPlat
f
orm
(
message
);
this
.
renderPlatform
&&
this
.
renderPlatorm
(
message
);
}
renderSysNoticePlatform
(
message
)
{
...
...
src/containers/App/store/reducer.js
View file @
5580dec3
...
...
@@ -45,7 +45,7 @@ const recentProductStorage = new Storage(
const
currentProduct
=
new
Store
(
`__global__recent_productIndex__micro_
${
window
.
location
.
hostname
}
`
,
);
Cookies
.
set
(
'loginMode'
,
'pdw'
);
Cookies
.
set
(
'loginMode'
,
Cookies
.
get
(
'loginMode'
)
||
'pdw'
);
export
const
initialState
=
fromJS
({
globalConfig
:
{},
globalConfigError
:
''
,
...
...
src/global.less
View file @
5580dec3
...
...
@@ -68,7 +68,7 @@ select:-webkit-autofill {
}
#root {
&
/deep/ .@{ant-prefix}-pro-basicLayout-content
{
&
:global(.ant-pro-basicLayout-content)
{
margin: 0 !important;
height: 100%;
}
...
...
@@ -80,143 +80,165 @@ select:-webkit-autofill {
.subapp-container .web4_console_component {
height: 100%;
}
& /deep/ .@{ant-prefix}-pro-sider-menu {
.@{ant-prefix}-pro-menu-item {
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
}
&:not(.@{ant-prefix}-menu-inline-collapsed) {
.@{ant-prefix}-pro-menu-item {
width: 80px;
& :global{
.ant-pro-sider-menu {
.ant-pro-menu-item {
// font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
}
}
// width: 80px;
.@{ant-prefix}-menu-item-only-child {
// a {
// display: flex;
// align-items: center;
// }
span.@{ant-prefix}-pro-menu-item {
margin-left: 8px;
&:not(.ant-menu-inline-collapsed) {
.ant-pro-menu-item {
width: 80px;
}
}
}
.@{ant-prefix}-menu-submenu {
div.@{ant-prefix}-menu-submenu-title {
display: flex;
align-items: center;
img {
margin-right: 8px;
// width: 80px;
.ant-menu-item-only-child {
// a {
// display: flex;
// align-items: center;
// }
span.ant-pro-menu-item {
margin-left: 8px;
}
}
ul.@{ant-prefix}-menu-sub {
li {
.ant-menu-submenu {
div.ant-menu-submenu-title {
display: flex;
align-items: center;
img {
width: 14px !important;
height: 14px !important;
// margin-right: 12px;
margin-right: 8px;
}
.@{ant-prefix}-pro-menu-item {
padding-left: 0 !important;
}
ul.ant-menu-sub {
li {
img {
width: 14px !important;
height: 14px !important;
// margin-right: 12px;
}
.ant-pro-menu-item {
padding-left: 0 !important;
}
}
}
}
.@{ant-prefix}-layout-slider-dark {
box-shadow: rgba(0, 0, 0, 0.6) 0px 1px 4px 0px;
transition: all 0.25s ease-in-out 0s;
}
}
.
@{ant-prefix}-layout-slider-dark
{
box-shadow: rgba(0, 0, 0, 0.6) 0px 1px 4px 0px
;
transition: all 0.25s ease-in-out 0s
;
.
ant-pro-sider .ant-layout-sider-children ::-webkit-scrollbar
{
width: 0
;
height: 0
;
}
}
& /deep/ .@{ant-prefix}-menu-submenu-popup
{
.@{ant-prefix}-menu-item
{
img {
width
: 14px !important;
height: 14px !important
;
margin-right: 12px;
}
.@{ant-prefix}-pro-menu-item {
padding-left: 0;
.@{ant-prefix}-menu-submenu-popup {
.@{ant-prefix}-menu-item
{
img
{
width: 14px !important;
height
: 14px !important;
margin-right: 12px
;
}
.@{ant-prefix}-pro-menu-item {
padding-left: 0;
}
}
}
}
& /deep/ .@{ant-prefix}-menu-dark {
.@{ant-prefix}-menu-submenu-selected {
.@{ant-prefix}-menu-item-selected {
// background: rgb(39, 49, 80);
// border-left: 3px solid rgb(23, 160, 242);
.@{ant-prefix}-menu-dark {
.@{ant-prefix}-menu-submenu-selected {
.@{ant-prefix}-menu-item-selected {
// background: rgb(39, 49, 80);
// border-left: 3px solid rgb(23, 160, 242);
}
}
}
}
& /deep/ .@{ant-prefix}-pro-sider
{
.@{ant-prefix}-layout-sider-children
{
::-webkit-scrollbar-thumb {
border-radius: 0;
}
::-webkit-scrollbar {
width
: 0px;
height: 0px;
.@{ant-prefix}-pro-sider {
.@{ant-prefix}-layout-sider-children
{
::-webkit-scrollbar-thumb
{
border-radius: 0;
}
::-webkit-scrollbar {
width: 0px;
height
: 0px;
}
}
}
}
& /deep/ .@{ant-prefix}-pro-sider-logo {
justify-content: center;
}
& /deep/ .@{ant-prefix}-layout-sider-collapsed {
.@{ant-prefix}-pro-sider-logo {
transform: scale(0.7)
;
justify-content: center
;
}
.@{ant-prefix}-menu-submenu-vertical {
.@{ant-prefix}-menu-submenu-title {
display: flex;
align-items: center;
flex-wrap: wrap;
// margin-bottom: 8px;
.@{ant-prefix}-layout-sider-collapsed {
.@{ant-prefix}-pro-sider-logo {
transform: scale(0.7);
}
}
.@{ant-prefix}-menu-dark.@{ant-prefix}-menu-dark:not(.@{ant-prefix}-menu-horizontal) {
.@{ant-prefix}-menu-item-selected {
// border-left: 2px solid #1890ff;
// background-color: #273150;
.@{ant-prefix}-menu-submenu-vertical {
.@{ant-prefix}-menu-submenu-title {
display: flex;
align-items: center;
flex-wrap: wrap;
// margin-bottom: 8px;
}
}
.@{ant-prefix}-menu-dark.@{ant-prefix}-menu-dark:not(.@{ant-prefix}-menu-horizontal) {
.@{ant-prefix}-menu-item-selected {
// border-left: 2px solid #1890ff;
// background-color: #273150;
}
}
}
}
& /deep/ .@{ant-prefix}-pro-global-header-layout-side
{
> div {
display: flex;
.@{ant-prefix}-pro-global-header-layout-side {
> div
{
display: flex;
}
}
}
& /deep/ .@{ant-prefix}-pro-basicLayout-side
{
.@{ant-prefix}-pro-sider-extra {
padding: 0 14px !important;
.@{ant-prefix}-pro-basicLayout-side {
.@{ant-prefix}-pro-sider-extra
{
padding: 0 14px !important;
}
}
}
& /deep/ .@{ant-prefix}-pro-fixed-header
{
.@{ant-prefix}-pro-global-header-layout-side {
padding: 0 0 0 16px;
.@{ant-prefix}-pro-fixed-header {
.@{ant-prefix}-pro-global-header-layout-side
{
padding: 0 0 0 16px;
}
}
}
}
body {
& /deep/ .@{ant-prefix}-menu-submenu-popup {
.@{ant-prefix}-menu-sub {
li {
a {
display: flex;
align-items: center;
.@{ant-prefix}-pro-menu-item {
margin-left: 8px;
:global {
.@{ant-prefix}-menu-submenu-popup {
.@{ant-prefix}-menu-sub {
li {
a {
display: flex;
align-items: center;
.@{ant-prefix}-pro-menu-item {
margin-left: 8px;
}
}
}
}
}
}
& /deep/ .@{ant-prefix}-message-notice-content {
.@{ant-prefix}-message-custom-content {
display: flex;
align-items: center;
.@{ant-prefix}-message-notice-content {
.@{ant-prefix}-message-custom-content {
display: flex;
align-items: center;
}
}
}
//& /deep/ .ant-menu-vertical > .ant-menu-item,
//.ant-menu-vertical-left > .ant-menu-item,
//.ant-menu-vertical-right > .ant-menu-item,
...
...
src/locales/zh-CN/globalHeader.js
View file @
5580dec3
export
default
{
'component.noticeIcon.clear'
:
'清空'
,
'component.noticeIcon.cleared'
:
'清空了'
,
'component.noticeIcon.allClear'
:
'暂无新通知'
,
'component.noticeIcon.empty'
:
'暂无数据'
,
'component.noticeIcon.view-more'
:
'查看更多'
,
'component.noticeIcon.title'
:
'通知'
,
...
...
src/micro.js
View file @
5580dec3
...
...
@@ -277,3 +277,4 @@ window.app.define('rc-tree-select', require.context('../node_modules/rc-tree-sel
window
.
app
.
define
(
'rc-trigger'
,
require
.
context
(
'../node_modules/rc-trigger/lib'
,
true
,
/^.
\/(
lib
\/)?[^\/]
+
\.
js$/
),
'index.js'
);
window
.
app
.
define
(
'rc-upload'
,
require
.
context
(
'../node_modules/rc-upload/lib'
,
true
,
/^.
\/(
lib
\/)?[^\/]
+
\.
js$/
),
'index.js'
);
window
.
app
.
define
(
'rc-virtual-list'
,
require
.
context
(
'../node_modules/rc-virtual-list/lib'
,
true
,
/^.
\/(
lib
\/)?[^\/]
+
\.
js$/
),
'index.js'
);
src/pages/user/login/login.js
View file @
5580dec3
import
'kit_logger'
;
import
{
message
}
from
'antd'
;
import
{
decode
,
encode
,
}
from
'js-base64'
;
import
{
decode
,
encode
}
from
'js-base64'
;
import
Cookies
from
'js-cookie'
;
import
sha1
from
'sha1'
;
...
...
@@ -456,12 +453,13 @@ class Login {
cacheBust
:
true
,
})
.
then
(
response
=>
{
console
.
log
(
'sceen wx'
,
response
);
if
(
response
.
token
)
{
self
.
globalConfig
.
token
=
response
.
token
;
self
.
updateConfig
&&
self
.
updateConfig
(
this
.
globalConfig
);
self
.
isSignIn
=
true
;
self
.
getUserInfoAndConfig
();
Logger
.
log
(
'===getUserInfoAndConfig==='
);
//
Logger.log('===getUserInfoAndConfig===');
}
else
{
message
.
error
(
`登录失败,
${
response
.
message
}
`
);
self
.
events
.
emit
(
'loginError'
,
response
);
...
...
@@ -474,9 +472,9 @@ class Login {
})
.
catch
(
error
=>
{
// eslint-disable-next-line no-undef
message
.
error
(
`登录失败,
${
response
.
message
}
`
);
message
.
error
(
`登录失败,
${
error
.
message
}
`
);
// eslint-disable-next-line no-undef
self
.
events
.
emit
(
'loginError'
,
response
);
self
.
events
.
emit
(
'loginError'
,
error
);
setTimeout
(()
=>
{
self
.
handleLoginError
(()
=>
{
window
.
location
.
href
=
WX_REDIRECT_URI
;
...
...
@@ -621,6 +619,7 @@ class Login {
self
.
writeLogs
();
self
.
getIndustry
(
flag
,
token
,
industry
);
}
else
{
message
.
error
(
response
.
errMsg
);
if
(
self
.
goLogin
())
{
return
false
;
}
...
...
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