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
5bacae97
authored
Mar 11, 2020
by
fengfan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau
parents
61fbee25
66c11f8f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
10 deletions
+16
-10
admin/src/api/common.js
+2
-2
admin/src/views/contents/introductionWarning/serviceEfficiency.vue
+1
-1
center.py
+12
-6
osc.py
+1
-1
No files found.
admin/src/api/common.js
View file @
5bacae97
...
@@ -23,12 +23,12 @@ export function getProvince() {
...
@@ -23,12 +23,12 @@ export function getProvince() {
}
}
})
})
}
}
export
function
updateTitle
(
ti
l
tle
)
{
export
function
updateTitle
(
title
)
{
return
request
({
return
request
({
url
:
'/index/update/title'
,
url
:
'/index/update/title'
,
method
:
'post'
,
method
:
'post'
,
data
:
{
data
:
{
ti
l
tle
title
}
}
})
})
}
}
...
...
admin/src/views/contents/introductionWarning/serviceEfficiency.vue
View file @
5bacae97
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
>
>
<
template
slot-scope=
"{row}"
>
<
template
slot-scope=
"{row}"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleUpdate(row)"
>
修改
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleUpdate(row)"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"handle
ModifyStatus
(row,'deleted')"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"danger"
@
click=
"handle
Delete
(row,'deleted')"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
...
center.py
View file @
5bacae97
...
@@ -22,17 +22,17 @@ books = [
...
@@ -22,17 +22,17 @@ books = [
]
]
def
sendMessage
(
message
):
def
sendMessage
(
path
,
message
):
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--ip"
,
default
=
"1
72.16.1.113
"
,
parser
.
add_argument
(
"--ip"
,
default
=
"1
27.0.0.1
"
,
help
=
"The ip of the OSC server"
)
help
=
"The ip of the OSC server"
)
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
7000
,
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
7000
,
help
=
"The port the OSC server is listening on"
)
help
=
"The port the OSC server is listening on"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
client
=
udp_client
.
SimpleUDPClient
(
args
.
ip
,
args
.
port
)
client
=
udp_client
.
SimpleUDPClient
(
args
.
ip
,
args
.
port
)
print
(
json
.
dumps
(
message
)
)
print
(
path
,
message
)
client
.
send_message
(
"/ctr"
,
json
.
dumps
(
message
))
client
.
send_message
(
path
,
json
.
dumps
(
message
))
# error action
# error action
...
@@ -86,7 +86,13 @@ def create_slider():
...
@@ -86,7 +86,13 @@ def create_slider():
if
(
result
[
'index'
]
==
2
):
if
(
result
[
'index'
]
==
2
):
sendMessage
([{
"page"
:
"bi"
}])
# BIM
sendMessage
([{
"page"
:
"bi"
}])
# BIM
return
jsonify
(
code
=
0
,
message
=
'success'
)
return
jsonify
(
code
=
0
,
message
=
'success'
)
@app.route
(
'/api/ctr'
,
methods
=
[
'POST'
])
def
create_ctr
():
# data = json.loads(request.json)
print
(
request
.
json
)
# print(data)
result
=
request
.
json
sendMessage
(
request
.
json
[
'path'
],
request
.
json
[
'arguments'
])
return
jsonify
(
code
=
0
,
message
=
'success'
,
data
=
request
.
json
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
.
run
(
host
=
localIP
,
port
=
8900
)
app
.
run
(
host
=
localIP
,
port
=
8900
)
osc.py
View file @
5bacae97
...
@@ -86,7 +86,7 @@ if __name__ == "__main__":
...
@@ -86,7 +86,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
"--ip"
,
parser
.
add_argument
(
"--ip"
,
default
=
'127.0.0.1'
,
help
=
"The ip to listen on"
)
default
=
'127.0.0.1'
,
help
=
"The ip to listen on"
)
parser
.
add_argument
(
"--port"
,
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
5006
,
help
=
"The port to listen on"
)
type
=
int
,
default
=
7000
,
help
=
"The port to listen on"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
dispatcher
=
dispatcher
.
Dispatcher
()
dispatcher
=
dispatcher
.
Dispatcher
()
...
...
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