Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
25735ecd
authored
Mar 20, 2020
by
hanjixin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau
parents
450c3075
cb2d2a02
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
298 additions
and
70 deletions
+298
-70
admin/.env.development
+2
-1
admin/src/layout/mixin/ResizeHandler.js
+7
-7
admin/src/views/contents/snece.vue
+44
-44
admin/src/views/contents/warmingCenter/liaisonPerson.vue
+38
-1
dva/src/assets/common.css
+53
-0
dva/src/assets/common.less
+87
-6
dva/src/components/Nav.js
+48
-2
dva/src/models/province.js
+2
-1
dva/src/router.js
+1
-1
dva/src/router/connfig.js
+4
-4
dva/src/routes/IndexPage.css
+1
-0
dva/src/routes/IndexPage.less
+1
-0
dva/src/utils/axiosRequest.js
+1
-1
dva/src/utils/config.js
+5
-0
dva/src/utils/index.js
+3
-1
dva/src/utils/request.js
+1
-1
No files found.
admin/.env.development
View file @
25735ecd
...
...
@@ -2,7 +2,8 @@
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://172.16.4.63:8090'
#VUE_APP_BASE_API = 'http://172.16.4.63:8090'
VUE_APP_BASE_API = 'http://123.56.149.208:8090'
VUE_APP_BASE_API_MOCK = '/dev-api'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
...
...
admin/src/layout/mixin/ResizeHandler.js
View file @
25735ecd
...
...
@@ -32,14 +32,14 @@ export default {
return
rect
.
width
-
1
<
WIDTH
},
$_resizeHandler
()
{
if
(
!
document
.
hidden
)
{
const
isMobile
=
this
.
$_isMobile
()
store
.
dispatch
(
'app/toggleDevice'
,
isMobile
?
'mobile'
:
'desktop'
)
//
if (!document.hidden) {
//
const isMobile = this.$_isMobile()
//
store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
if
(
isMobile
)
{
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
true
})
}
}
//
if (isMobile) {
//
store.dispatch('app/closeSideBar', { withoutAnimation: true })
//
}
//
}
}
}
}
admin/src/views/contents/snece.vue
View file @
25735ecd
...
...
@@ -3,12 +3,12 @@
<div>
<div>
<div>
省份:
</div>
<br
/
>
<br>
<el-select
v-model=
"temp.code"
placeholder=
"请选择"
>
<el-option
v-for=
"item in citys"
:key=
"item.name"
:label=
"item.name"
:value=
"item.code"
/>
</el-select>
</div>
<br
/
>
<br>
<el-checkbox
v-model=
"checkAll"
:indeterminate=
"isIndeterminate"
...
...
@@ -20,8 +20,8 @@
<el-checkbox
v-for=
"city in cities"
:key=
"city"
:label=
"city"
>
{{
city
}}
</el-checkbox>
</el-checkbox-group>
</div>
<br
/
>
<br
/
>
<br>
<br>
<div>
<el-checkbox
v-model=
"checkAll2"
...
...
@@ -42,95 +42,95 @@
</
template
>
<
script
>
import
{
getProvince
,
getVisit
,
updateVisit
}
from
"@/api/common"
;
import
{
getProvince
,
getVisit
,
updateVisit
}
from
'@/api/common'
const
cityOptions
=
[
"上海"
,
"北京"
,
"广州"
,
"深圳"
];
const
cityOptions
=
[
'上海'
,
'北京'
,
'广州'
,
'深圳'
]
const
defaultCity
=
[
{
name
:
"京津冀"
,
code
:
"1"
name
:
'京津冀'
,
code
:
'1'
},
{
name
:
"长三角"
,
code
:
"2"
name
:
'长三角'
,
code
:
'2'
},
{
name
:
"珠三角"
,
code
:
"3"
name
:
'珠三角'
,
code
:
'3'
},
{
name
:
"长江流域"
,
code
:
"4"
name
:
'长江流域'
,
code
:
'4'
}
]
;
]
export
default
{
name
:
"Modules"
,
name
:
'Modules'
,
data
()
{
return
{
checkAll
:
false
,
citys
:
[],
checkedCities
:
[
"上海"
,
"北京"
],
checkedCities
:
[
'上海'
,
'北京'
],
cities
:
cityOptions
,
isIndeterminate
:
true
,
checkAll2
:
false
,
checkedCities2
:
[
"上海"
,
"北京"
],
checkedCities2
:
[
'上海'
,
'北京'
],
cities2
:
cityOptions
,
isIndeterminate2
:
true
,
temp
:
{
code
:
"1"
code
:
'1'
}
}
;
}
},
created
()
{
this
.
getMyProvince
()
;
this
.
getMyVisit
()
;
this
.
getMyProvince
()
this
.
getMyVisit
()
},
methods
:
{
submit
()
{
updateVisit
({
code
:
""
,
code
:
''
,
industry
:
[],
position
:
[]
}).
then
(()
=>
{
this
.
$notify
({
title
:
"Success"
,
message
:
"更新成功"
,
type
:
"success"
,
title
:
'Success'
,
message
:
'更新成功'
,
type
:
'success'
,
duration
:
2000
})
;
})
;
})
})
},
async
getMyProvince
()
{
const
data
=
await
getProvince
()
;
this
.
citys
=
[...
defaultCity
,
...
data
.
data
]
;
console
.
log
(
data
)
;
const
data
=
await
getProvince
()
this
.
citys
=
[...
defaultCity
,
...
data
.
data
]
console
.
log
(
data
)
},
async
getMyVisit
()
{
const
data
=
await
getVisit
()
;
console
.
log
(
data
)
;
const
data
=
await
getVisit
()
console
.
log
(
data
)
},
handleCheckAllChange
(
val
)
{
this
.
checkedCities
=
val
?
cityOptions
:
[]
;
this
.
isIndeterminate
=
false
;
this
.
checkedCities
=
val
?
cityOptions
:
[]
this
.
isIndeterminate
=
false
},
handleCheckedCitiesChange
(
value
)
{
const
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
const
checkedCount
=
value
.
length
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
},
handleCheckAllChange2
(
val
)
{
this
.
checkedCities
=
val
?
cityOptions
:
[]
;
this
.
isIndeterminate
=
false
;
this
.
checkedCities
=
val
?
cityOptions
:
[]
this
.
isIndeterminate
=
false
},
handleCheckedCitiesChange2
(
value
)
{
const
checkedCount
=
value
.
length
;
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
;
const
checkedCount
=
value
.
length
this
.
checkAll
=
checkedCount
===
this
.
cities
.
length
this
.
isIndeterminate
=
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
;
checkedCount
>
0
&&
checkedCount
<
this
.
cities
.
length
}
}
}
;
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
admin/src/views/contents/warmingCenter/liaisonPerson.vue
View file @
25735ecd
...
...
@@ -181,6 +181,13 @@
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item
label=
"邮箱"
prop=
"email"
>
<el-input
v-model=
"temp.email"
type=
"text"
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item
label=
"邮编"
prop=
"postal"
>
<el-input
v-model=
"temp.postal"
...
...
@@ -188,6 +195,28 @@
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item
label=
"上传图片"
prop=
"type"
>
<el-upload
class=
"upload-demo"
drag
name=
"resource"
accept=
"image/*"
:limt=
"1"
:file-list=
"fileList"
list-type=
"picture"
:show-file-list=
"true"
:on-success=
"uploadZipSuccess"
:on-progress=
"onProgress"
:action=
"uploadUrl"
>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传图片
</div>
</el-upload>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取消
</el-button>
...
...
@@ -245,6 +274,7 @@ export default {
tableKey
:
0
,
list
:
null
,
total
:
0
,
fileList
:
[],
listLoading
:
true
,
listQuery
:
{
page
:
1
,
...
...
@@ -445,6 +475,13 @@ export default {
handleUpdate
(
row
)
{
getDetail
(
row
.
liaisonId
).
then
(
res
=>
{
this
.
temp
=
res
.
data
this
.
fileList
=
this
.
temp
.
url
.
split
(
','
).
map
(
item
=>
{
return
{
uid
:
''
,
name
:
item
,
url
:
item
}
})
this
.
dialogStatus
=
'update'
this
.
dialogFormVisible
=
true
this
.
$nextTick
(()
=>
{
...
...
@@ -495,7 +532,7 @@ export default {
}
else
{
this
.
fullscreenLoading
=
false
this
.
$message
(
'上传成功'
)
this
.
temp
.
url
=
e
.
url
this
.
temp
.
url
=
e
.
data
console
.
log
(
this
.
temp
)
}
console
.
log
(
e
)
...
...
dva/src/assets/common.css
View file @
25735ecd
...
...
@@ -241,3 +241,56 @@
.el-breadcrumb
.el-breadcrumb__item
:last-child
.el-breadcrumb__item__inner
{
color
:
#cccccc
!important
;
}
.modal-container
{
position
:
fixed
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
20
;
background
:
rgba
(
0
,
0
,
0
,
0.6
);
text-align
:
left
;
box-sizing
:
border-box
;
padding
:
25%
;
line-height
:
40px
;
}
.modal-container
input
{
-webkit-appearance
:
none
;
background-color
:
#fff
;
background-image
:
none
;
border-radius
:
4px
;
border
:
1px
solid
#dcdfe6
;
box-sizing
:
border-box
;
color
:
#606266
;
display
:
inline-block
;
font-size
:
inherit
;
height
:
40px
;
line-height
:
40px
;
outline
:
none
;
padding
:
0
15px
;
transition
:
border-color
0.2s
cubic-bezier
(
0.645
,
0.045
,
0.355
,
1
);
width
:
100%
;
}
.modal-container
.modal-btn
{
display
:
inline-block
;
line-height
:
1
;
white-space
:
nowrap
;
cursor
:
pointer
;
background
:
#fff
;
border
:
1px
solid
#dcdfe6
;
color
:
#606266
;
-webkit-appearance
:
none
;
text-align
:
center
;
box-sizing
:
border-box
;
outline
:
none
;
margin
:
0
;
transition
:
0.1s
;
font-weight
:
500
;
-moz-user-select
:
none
;
-webkit-user-select
:
none
;
-ms-user-select
:
none
;
padding
:
12px
20px
;
font-size
:
14px
;
border-radius
:
4px
;
margin-top
:
20px
;
}
dva/src/assets/common.less
View file @
25735ecd
@sideWith: 200px;
@navHeight: 76px;
@keyframes opcity {
0% {
opacity: 1;
}
100% {
opacity: 0.4;
}
}
#textShadow(opcity) {
}
#textShadow(opcity) {}
@shadow: .1rem 0rem .5rem rgba(255, 255, 255, 0.3), -.1rem 0rem .5rem rgba(255, 255, 255, 0.3), 0rem .1rem .5rem rgba(255, 255, 255, 0.3), 0rem -.1rem .5rem rgba(255, 255, 255, 0.3);
.layout-container {
width: 100vw;
height: 100vh;
...
...
@@ -19,7 +22,7 @@
background: url('./img/bg.jpg') no-repeat center;
background-size: cover;
.layout-nav {
height: @navHeight;
...
...
@@ -88,47 +91,58 @@
li {
height: 45px;
line-height: 45px;
&:nth-child(2) {
a {
padding-left: 37px;
.icon {
background-image: url(../assets/img/icon/6.png);
}
}
}
&:nth-child(3) {
a {
padding-left: 49px;
.icon {
background-image: url(../assets/img/icon/4.png);
}
}
}
&:nth-child(4) {
a {
padding-left: 61px;
.icon {
background-image: url(../assets/img/icon/5.png);
}
}
}
&:nth-child(5) {
a {
padding-left: 49px;
.icon {
background-image: url(../assets/img/icon/2.png);
}
}
}
&:nth-child(6) {
a {
padding-left: 37px;
.icon {
background-image: url(../assets/img/icon/1.png);
}
}
}
&:nth-child(7) {
a {
.icon {
...
...
@@ -136,6 +150,7 @@
}
}
}
a {
display: block;
height: 100%;
...
...
@@ -155,6 +170,7 @@
background: url('./img/icon/3.png') no-repeat center;
background-size: 90%;
}
// padding: 0 20px ;
&.active {
...
...
@@ -166,9 +182,11 @@
font-weight: bolder;
font-size: 18px;
text-shadow: @shadow;
.icon {
background-size: 110%;
}
// border-color: #409eff;
}
}
...
...
@@ -195,6 +213,7 @@
background-size: cover;
box-sizing: border-box;
padding-top: 27px;
.common-btn-back {
width: 94px;
height: 74px;
...
...
@@ -262,8 +281,10 @@
box-sizing: border-box;
}
}
.layout-container-home {
background: url('./img/bg-home.jpg') no-repeat center;
.layout-content {
display: none;
}
...
...
@@ -274,6 +295,7 @@
line-height: 1;
padding-left: 20px;
padding-top: 15px;
&:after,
&:before {
display: table;
...
...
@@ -300,7 +322,65 @@
display: none;
}
.el-breadcrumb__item:last-child .el-breadcrumb__item__inner {
.el-breadcrumb__item:last-child .el-breadcrumb__item__inner {
color: #cccccc !important;
}
}
.modal-container {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 20;
background: rgba(0, 0, 0, 0.6);
text-align: left;
box-sizing: border-box;
padding: 25% ;
line-height: 40px;
input {
-webkit-appearance: none;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
font-size: inherit;
height: 40px;
line-height: 40px;
outline: none;
padding: 0 15px;
transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
width: 100%;
}
.modal-btn {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
border: 1px solid #dcdfe6;
color: #606266;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: none;
margin: 0;
transition: .1s;
font-weight: 500;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
padding: 12px 20px;
font-size: 14px;
border-radius: 4px;
margin-top: 20px;
}
}
\ No newline at end of file
dva/src/components/Nav.js
View file @
25735ecd
import
React
,
{
useState
}
from
'react'
;
import
config
from
'@/utils/config'
const
guang
=
require
(
'../assets/img/nav-light.png'
)
const
Nav
=
(
props
)
=>
{
let
[
time
,
setTime
]
=
useState
(
new
Date
().
toLocaleString
())
let
[
time
,
setTime
]
=
useState
(
new
Date
().
toLocaleString
())
let
[
show
,
setShow
]
=
useState
(
false
)
let
[
myconfig
,
setConfig
]
=
useState
({
CTR_URL
:
config
.
CTR_URL
,
API_URL
:
config
.
API_URL
})
clearInterval
(
window
.
_timer
)
window
.
_timer
=
setInterval
(()
=>
{
setTime
(
new
Date
().
toLocaleString
())
},
1000
)
function
apiChange
(
e
)
{
setConfig
({
...
myconfig
,
API_URL
:
e
.
target
.
value
})
}
function
ctrChange
(
e
)
{
setConfig
({
...
myconfig
,
CTR_URL
:
e
.
target
.
value
})
}
function
submit
()
{
localStorage
.
setItem
(
'API_URL'
,
myconfig
.
API_URL
)
localStorage
.
setItem
(
'CTR_URL'
,
myconfig
.
CTR_URL
)
setShow
(
false
)
window
.
location
.
reload
(
true
)
}
return
(
<
div
className
=
"layout-nav"
>
{
/* <div className="logo"> </div>
...
...
@@ -14,7 +39,28 @@ const Nav = (props) => {
</div> */
}
<
img
className
=
"light"
src
=
{
guang
}
alt
=
"guang"
/>
<
div
className
=
"time"
>
{
time
}
<
/div
>
<
div
className
=
"time"
onClick
=
{()
=>
{
setShow
(
true
)
}}
>
{
time
}
<
/div
>
{
show
&&
<
div
className
=
"modal-container"
>
<
div
className
=
"modal-content"
>
<
span
>
OSC
地址
<
/span
>
<
input
type
=
"text"
onChange
=
{(
e
)
=>
{
ctrChange
(
e
)
}}
value
=
{
myconfig
.
CTR_URL
}
/
>
<
/div
>
<
div
className
=
"modal-content"
>
<
span
>
API
地址
<
/span
>
<
input
type
=
"text"
onChange
=
{(
e
,
e1
,
r3
)
=>
{
console
.
log
(
e
,
e1
,
r3
)
apiChange
(
e
)
}}
value
=
{
myconfig
.
API_URL
}
/
>
<
/div
>
<
div
>
<
button
className
=
"modal-btn"
onClick
=
{
submit
}
>
确认
<
/button
>
<
/div
>
<
/div>
}
<
/div
>
);
};
...
...
dva/src/models/province.js
View file @
25735ecd
...
...
@@ -13,10 +13,11 @@ export default {
subscriptions
:
{
setup
({
dispatch
,
history
})
{
return
history
.
listen
(({
pathname
,
query
,
params
})
=>
{
// console.log(query, 'query')
if
(
pathname
===
'/WarmingCenter/WarmingProvince'
)
{
dispatch
({
type
:
'fetch'
,
payload
:
query
});
}
if
(
pathname
===
'/WarmingCenter/WarmingCity'
)
{
if
(
pathname
===
'/WarmingCenter/WarmingCity'
&&
query
)
{
dispatch
({
type
:
'fetchCity'
,
payload
:
query
?
query
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'query'
))
});
}
});
...
...
dva/src/router.js
View file @
25735ecd
...
...
@@ -25,7 +25,7 @@ function RouterConfig({ history }) {
location
.
query
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'query'
))
}
}
checkState
(
history
)
//
checkState(history)
})
//console.log(generateRouter(config), 'generateRouter(config)}') // 生成的路由表
...
...
dva/src/router/connfig.js
View file @
25735ecd
...
...
@@ -40,7 +40,7 @@ export default [
name
:
'预警中心'
,
exact
:
true
,
meta
:
{
vPath
:
'
/预警中心
/全国'
vPath
:
'
首页
/全国'
},
children
:
[
{
...
...
@@ -48,7 +48,7 @@ export default [
component
:
WarmingProvince
,
name
:
'预警信息综合监控平台'
,
meta
:
{
vPath
:
'/
预警中心
/全国/预警信息综合监控平台'
vPath
:
'/
首页
/全国/预警信息综合监控平台'
}
},
{
...
...
@@ -57,7 +57,7 @@ export default [
name
:
'预警信息综合监控平台 / 省'
,
exact
:
true
,
meta
:
{
vPath
:
'/
预警中心/全国/预警信息综合监控平台
/'
vPath
:
'/
首页/全国/省级
/'
},
// children: [
// {
...
...
@@ -71,7 +71,7 @@ export default [
component
:
PublicServiceConstruction
,
name
:
'全国公服建设'
,
meta
:
{
vPath
:
'
/预警中心
/全国公服建设'
vPath
:
'
首页/全国
/全国公服建设'
}
}
]
...
...
dva/src/routes/IndexPage.css
View file @
25735ecd
...
...
@@ -10,4 +10,5 @@
width
:
100%
;
left
:
0
;
top
:
100px
;
color
:
blue
;
}
dva/src/routes/IndexPage.less
View file @
25735ecd
...
...
@@ -12,4 +12,5 @@
width: 100%;
left: 0;
top: 100px;
color: blue;
}
dva/src/utils/axiosRequest.js
View file @
25735ecd
...
...
@@ -2,7 +2,7 @@ import axios from 'axios'
// 创建axios实例
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
API_URL
,
// api 的 base_url
baseURL
:
localStorage
.
getItem
(
'API_URL'
)
?
localStorage
.
getItem
(
'API_URL'
)
:
process
.
env
.
API_URL
,
// api 的 base_url
timeout
:
30
*
1000
// 请求超时时间, 30秒
})
...
...
dva/src/utils/config.js
0 → 100644
View file @
25735ecd
export
default
{
API_URL
:
localStorage
.
getItem
(
'API_URL'
)
?
localStorage
.
getItem
(
'API_URL'
)
:
process
.
env
.
API_URL
,
CTR_URL
:
localStorage
.
getItem
(
'CTR_URL'
)
?
localStorage
.
getItem
(
'CTR_URL'
)
:
process
.
env
.
CTR_URL
}
\ No newline at end of file
dva/src/utils/index.js
View file @
25735ecd
...
...
@@ -44,7 +44,9 @@ export function checkState(history) { // 检查路由状态 与大屏保持同
}
else
{
const
result
=
filterRouter
(
data
.
route
)
window
.
sessionStorage
.
removeItem
(
'isUse'
)
history
.
replace
(
result
.
path
)
if
(
result
)
{
history
.
replace
(
result
.
path
)
}
}
})
},
1000
)
...
...
dva/src/utils/request.js
View file @
25735ecd
import
fetch
from
'dva/fetch'
;
const
baseUrl
=
process
.
env
.
CTR_URL
const
baseUrl
=
localStorage
.
getItem
(
'CTR_URL'
)
?
localStorage
.
getItem
(
'CTR_URL'
)
:
process
.
env
.
CTR_URL
function
parseJSON
(
response
)
{
return
response
.
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