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
3585ce0c
Commit
3585ce0c
authored
Feb 28, 2022
by
邓晓峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/ReactWeb5/CivWeb
parents
125efa35
a40b7b60
Pipeline
#44680
passed with stages
in 4 minutes 36 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
7 deletions
+14
-7
直饮水.png
src/assets/bootPage/直饮水.png
+0
-0
initConfig.js
src/initConfig.js
+3
-2
BasicLayout1.js
src/layouts/BasicLayout1.js
+1
-1
Site.js
src/layouts/Site.js
+3
-0
index.js
src/pages/bootpage/index.js
+3
-2
login.js
src/pages/user/login/login.js
+4
-2
No files found.
src/assets/bootPage/直饮水.png
0 → 100644
View file @
3585ce0c
This diff was suppressed by a .gitattributes entry.
src/initConfig.js
View file @
3585ce0c
import
{
appService
}
from
'./api'
;
import
{
appService
}
from
'./api'
;
import
{
initMicroApps
}
from
'./micro'
;
import
{
initMicroApps
}
from
'./micro'
;
import
{
params
,
Storeage
}
from
'kit_utils'
;
import
{
params
,
Storeage
}
from
'kit_utils'
;
import
Cookies
from
'js-cookie'
;
import
{
actionCreators
}
from
'./containers/App/store'
;
import
{
actionCreators
}
from
'./containers/App/store'
;
import
{
getToken
,
isString
}
from
'./utils/utils'
;
import
{
getToken
,
isString
}
from
'./utils/utils'
;
import
loader
,
{
render
}
from
'./render'
;
import
loader
,
{
render
}
from
'./render'
;
...
@@ -59,7 +60,7 @@ export const initGlobalConfig = () => {
...
@@ -59,7 +60,7 @@ export const initGlobalConfig = () => {
}
}
});
});
// eslint-disable-next-line react-hooks/rules-of-hooks
// eslint-disable-next-line react-hooks/rules-of-hooks
const
client
=
params
.
getParams
(
'client'
)
const
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
appService
appService
.
queryConfig
({
.
queryConfig
({
client
:
client
||
'city'
,
client
:
client
||
'city'
,
...
@@ -70,7 +71,7 @@ export const initGlobalConfig = () => {
...
@@ -70,7 +71,7 @@ export const initGlobalConfig = () => {
store
.
dispatch
(
actionCreators
.
getConfig
(
Object
.
assign
({})));
store
.
dispatch
(
actionCreators
.
getConfig
(
Object
.
assign
({})));
const
data
=
res
;
const
data
=
res
;
if
(
!
data
.
client
)
{
if
(
!
data
.
client
)
{
data
.
client
=
params
.
getParams
(
'client'
)
||
'city'
;
data
.
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
;
}
}
// Cookies.set('city', data.client);
// Cookies.set('city', data.client);
store
.
dispatch
(
store
.
dispatch
(
...
...
src/layouts/BasicLayout1.js
View file @
3585ce0c
...
@@ -215,7 +215,7 @@ const renderSite = ({data, config, loading, setLoading, action}) => {
...
@@ -215,7 +215,7 @@ const renderSite = ({data, config, loading, setLoading, action}) => {
onVisibleChange
=
{
visible
=>
setVisible
(
visible
)}
onVisibleChange
=
{
visible
=>
setVisible
(
visible
)}
>
>
{
{
Array
.
isArray
(
data
.
stations
)
&&
data
.
stations
.
length
>
0
?
(
Array
.
isArray
(
data
.
stations
)
?
(
<
div
className
=
{
layoutStyles
.
toggleSite
}
>
<
div
className
=
{
layoutStyles
.
toggleSite
}
>
<
img
src
=
{
require
(
'../assets/basic/site.png'
)}
className
=
{
layoutStyles
.
site
}
/
>
<
img
src
=
{
require
(
'../assets/basic/site.png'
)}
className
=
{
layoutStyles
.
site
}
/
>
<
span
className
=
{
layoutStyles
.
name
}
>
{
data
.
currentStationName
}
<
/span
>
<
span
className
=
{
layoutStyles
.
name
}
>
{
data
.
currentStationName
}
<
/span
>
...
...
src/layouts/Site.js
View file @
3585ce0c
...
@@ -382,6 +382,7 @@ class Site {
...
@@ -382,6 +382,7 @@ class Site {
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
this
.
setLoading
(
false
);
message
.
warning
(
'切换企业失败'
);
message
.
warning
(
'切换企业失败'
);
});
});
}
}
...
@@ -400,10 +401,12 @@ class Site {
...
@@ -400,10 +401,12 @@ class Site {
this
.
writeCookie
(
token
,
site
);
this
.
writeCookie
(
token
,
site
);
}
else
{
}
else
{
message
.
warning
(
'企业切换失败,请联系管理员排查问题!'
);
message
.
warning
(
'企业切换失败,请联系管理员排查问题!'
);
this
.
setLoading
(
false
);
}
}
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
message
.
warning
(
'企业切换失败,请联系管理员排查问题!'
);
message
.
warning
(
'企业切换失败,请联系管理员排查问题!'
);
this
.
setLoading
(
false
);
});
});
}
}
...
...
src/pages/bootpage/index.js
View file @
3585ce0c
...
@@ -18,7 +18,8 @@ const industries = [
...
@@ -18,7 +18,8 @@ const industries = [
{
name
:
'农饮水'
,
type
:
'农饮水'
,
subTitle
:
'RURAL POTABLE WATER'
},
{
name
:
'农饮水'
,
type
:
'农饮水'
,
subTitle
:
'RURAL POTABLE WATER'
},
{
name
:
'排水'
,
type
:
'排水'
,
subTitle
:
'DRAINAGE'
},
{
name
:
'排水'
,
type
:
'排水'
,
subTitle
:
'DRAINAGE'
},
{
name
:
'能源'
,
type
:
'能源'
,
subTitle
:
'ENERGY SOURCES'
},
{
name
:
'能源'
,
type
:
'能源'
,
subTitle
:
'ENERGY SOURCES'
},
{
name
:
'水资源'
,
type
:
'水资源'
,
subTitle
:
'WATER RESOURCES'
},
{
name
:
'直饮水'
,
type
:
'直饮水'
,
subTitle
:
'DRINGKING WATER'
},
// { name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' },
{
name
:
'熊猫智能实验室'
,
type
:
'实验室'
,
subTitle
:
'PANDA AI. LAB'
},
{
name
:
'熊猫智能实验室'
,
type
:
'实验室'
,
subTitle
:
'PANDA AI. LAB'
},
{
name
:
'大数据'
,
type
:
'大数据'
,
subTitle
:
'BIG DATA'
},
{
name
:
'大数据'
,
type
:
'大数据'
,
subTitle
:
'BIG DATA'
},
{
name
:
'项目案例'
,
type
:
'项目案例'
,
subTitle
:
'PROJECT CASE'
},
{
name
:
'项目案例'
,
type
:
'项目案例'
,
subTitle
:
'PROJECT CASE'
},
...
@@ -54,7 +55,7 @@ const renderIndustries = (config, callback) =>
...
@@ -54,7 +55,7 @@ const renderIndustries = (config, callback) =>
});
});
const
BootPage
=
props
=>
{
const
BootPage
=
props
=>
{
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
loadding
,
setLoadding
]
=
useState
(
false
);
const
[
scale
,
setScale
]
=
useState
(
1
);
const
[
scale
,
setScale
]
=
useState
(
1
);
useDocumentTitle
(
useDocumentTitle
(
...
...
src/pages/user/login/login.js
View file @
3585ce0c
...
@@ -255,6 +255,7 @@ class Login {
...
@@ -255,6 +255,7 @@ class Login {
// this.events.removeAllListeners('toggleIndustry')
// this.events.removeAllListeners('toggleIndustry')
// window.share.event = this.events;
// window.share.event = this.events;
if
(
if
(
self
.
globalConfig
.
userInfo
&&
self
.
globalConfig
.
userInfo
.
site
&&
self
.
globalConfig
.
userInfo
.
site
&&
self
.
globalConfig
.
userInfo
.
site
.
length
>
0
self
.
globalConfig
.
userInfo
.
site
.
length
>
0
)
{
)
{
...
@@ -332,7 +333,8 @@ class Login {
...
@@ -332,7 +333,8 @@ class Login {
let
MAX_BOTTOM
=
0
;
let
MAX_BOTTOM
=
0
;
let
isScale
=
false
;
let
isScale
=
false
;
let
widgetIndex
=
-
1
;
let
widgetIndex
=
-
1
;
this
.
globalConfig
.
uiwidgets
.
map
((
item
,
index
)
=>
{
this
.
globalConfig
.
uiwidgets
&&
this
.
globalConfig
.
uiwidgets
.
map
((
item
,
index
)
=>
{
// eslint-disable-next-line radix
// eslint-disable-next-line radix
if
(
parseInt
(
item
.
bottom
)
>
MAX_BOTTOM
)
{
if
(
parseInt
(
item
.
bottom
)
>
MAX_BOTTOM
)
{
// eslint-disable-next-line radix
// eslint-disable-next-line radix
...
@@ -347,7 +349,7 @@ class Login {
...
@@ -347,7 +349,7 @@ class Login {
widgetIndex
=
index
;
widgetIndex
=
index
;
});
});
const
{
layers
}
=
this
.
globalConfig
.
mapsettings
;
const
{
layers
=
[]
}
=
this
.
globalConfig
.
mapsettings
||
{}
;
if
(
layers
.
length
===
0
)
{
if
(
layers
.
length
===
0
)
{
widgetIndex
!==
-
1
&&
this
.
globalConfig
.
uiwidgets
.
splice
(
widgetIndex
,
1
);
widgetIndex
!==
-
1
&&
this
.
globalConfig
.
uiwidgets
.
splice
(
widgetIndex
,
1
);
return
Promise
.
resolve
({});
return
Promise
.
resolve
({});
...
...
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