Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
py12306
Project
Project
Details
Activity
Releases
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
python
py12306
Commits
c8988cd2
Commit
c8988cd2
authored
Jan 14, 2019
by
Jalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加集群状态支持
parent
01cf6cca
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
17 deletions
+82
-17
README.md
README.md
+32
-10
web.png
data/images/web.png
+0
-0
order_log.py
py12306/log/order_log.py
+1
-1
job.py
py12306/user/job.py
+5
-2
stat.py
py12306/web/handler/stat.py
+22
-0
user.py
py12306/web/handler/user.py
+3
-1
app.35e2fbd94557d71d1e2bfa0d4bb44d13.css
...6/web/static/css/app.35e2fbd94557d71d1e2bfa0d4bb44d13.css
+15
-0
index.html
py12306/web/static/index.html
+3
-3
app.7d7d65cccfbfa339beba.js
py12306/web/static/js/app.7d7d65cccfbfa339beba.js
+1
-0
No files found.
README.md
View file @
c8988cd2
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
-
[
x
]
Docker 支持
-
[
x
]
Docker 支持
-
[
x
]
动态修改配置文件
-
[
x
]
动态修改配置文件
-
[
x
]
邮件通知
-
[
x
]
邮件通知
-
[
]
Web 管理页面
-
[
x
]
Web 管理页面
-
[
]
微信消息通知
-
[
]
微信消息通知
## 使用
## 使用
...
@@ -100,16 +100,38 @@ docker run -d -v $(pwd):/config -v py12306:/data pjialin/py12306
...
@@ -100,16 +100,38 @@ docker run -d -v $(pwd):/config -v py12306:/data pjialin/py12306
```
```
当前目录会多一个 12306.log 的日志文件,
`tail -f 12306.log`
当前目录会多一个 12306.log 的日志文件,
`tail -f 12306.log`
## Web 管理页面
目前支持用户和任务以及日志日志查看,更多功能后续会不断加入
**使用**
打开 Web 功能需要将配置中的
`WEB_ENABLE`
打开,启动程序后访问当前主机地址 + 端口号 (默认 8008) 即可,如 http://127.0.0.1:8008
## 更新
## 更新
### 19-01-10
-
19-01-10
*
支持分布式集群
### 19-01-11
支持分布式集群
*
配置文件支持动态修改
### 19-01-12
-
19-01-11
*
新增免费打码
配置文件支持动态修改
## 下单成功截图

-
19-01-12
新增免费打码
-
19-01-14
新增 Web 页面支持
## 截图
### Web 管理页面

### 下单成功

### 关于防封
### 关于防封
目前查询和登录操作是分开的,查询是不依赖用户是否登录,放在 A 云 T 云容易被限制 ip,建议在其它网络环境下运行
目前查询和登录操作是分开的,查询是不依赖用户是否登录,放在 A 云 T 云容易被限制 ip,建议在其它网络环境下运行
...
...
data/images/web.png
0 → 100644
View file @
c8988cd2
220 KB
py12306/log/order_log.py
View file @
c8988cd2
...
@@ -30,7 +30,7 @@ class OrderLog(BaseLog):
...
@@ -30,7 +30,7 @@ class OrderLog(BaseLog):
MESSAGE_QUERY_ORDER_WAIT_TIME_INFO
=
'第 {} 次排队,请耐心等待'
MESSAGE_QUERY_ORDER_WAIT_TIME_INFO
=
'第 {} 次排队,请耐心等待'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE
=
'车票购买成功!'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_TITLE
=
'车票购买成功!'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_CONTENT
=
'请及时
器
登录12306,打开
\'
未完成订单
\'
,在30分钟内完成支付!'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_CONTENT
=
'请及时登录12306,打开
\'
未完成订单
\'
,在30分钟内完成支付!'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_VOICE_CODE_START_SEND
=
'正在发送语音通知, 第 {} 次'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_VOICE_CODE_START_SEND
=
'正在发送语音通知, 第 {} 次'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_VOICE_CODE_CONTENT
=
'你的车票 {} 到 {} 购买成功,请登录 12306 进行支付'
MESSAGE_ORDER_SUCCESS_NOTIFICATION_OF_VOICE_CODE_CONTENT
=
'你的车票 {} 到 {} 购买成功,请登录 12306 进行支付'
...
...
py12306/user/job.py
View file @
c8988cd2
...
@@ -29,6 +29,7 @@ class UserJob:
...
@@ -29,6 +29,7 @@ class UserJob:
user_loaded
=
False
# 用户是否已加载成功
user_loaded
=
False
# 用户是否已加载成功
passengers
=
[]
passengers
=
[]
retry_time
=
3
retry_time
=
3
login_num
=
0
# 尝试登录次数
# Init page
# Init page
global_repeat_submit_token
=
None
global_repeat_submit_token
=
None
...
@@ -101,9 +102,9 @@ class UserJob:
...
@@ -101,9 +102,9 @@ class UserJob:
return
self
.
last_heartbeat
return
self
.
last_heartbeat
def
set_last_heartbeat
(
self
):
def
set_last_heartbeat
(
self
,
time
=
None
):
if
Config
()
.
is_cluster_enabled
():
if
Config
()
.
is_cluster_enabled
():
return
self
.
cluster
.
session
.
set
(
Cluster
.
KEY_USER_LAST_HEARTBEAT
,
time_int
())
return
self
.
cluster
.
session
.
set
(
Cluster
.
KEY_USER_LAST_HEARTBEAT
,
time
if
time
!=
None
else
time
_int
())
self
.
last_heartbeat
=
time_int
()
self
.
last_heartbeat
=
time_int
()
# def init_cookies
# def init_cookies
...
@@ -184,6 +185,7 @@ class UserJob:
...
@@ -184,6 +185,7 @@ class UserJob:
用户登录成功
用户登录成功
:return:
:return:
"""
"""
self
.
login_num
+=
1
self
.
welcome_user
()
self
.
welcome_user
()
self
.
save_user
()
self
.
save_user
()
self
.
get_user_info
()
self
.
get_user_info
()
...
@@ -222,6 +224,7 @@ class UserJob:
...
@@ -222,6 +224,7 @@ class UserJob:
self
.
user_did_load
()
self
.
user_did_load
()
else
:
else
:
UserLog
.
add_quick_log
(
UserLog
.
MESSAGE_LOADED_USER_BUT_EXPIRED
)
.
flush
()
UserLog
.
add_quick_log
(
UserLog
.
MESSAGE_LOADED_USER_BUT_EXPIRED
)
.
flush
()
self
.
set_last_heartbeat
(
0
)
def
user_did_load
(
self
):
def
user_did_load
(
self
):
"""
"""
...
...
py12306/web/handler/stat.py
View file @
c8988cd2
...
@@ -27,3 +27,25 @@ def dashboard():
...
@@ -27,3 +27,25 @@ def dashboard():
'user_job_count'
:
user_job_count
,
'user_job_count'
:
user_job_count
,
'query_count'
:
query_count
'query_count'
:
query_count
})
})
@
stat
.
route
(
'/stat/cluster'
,
methods
=
[
'GET'
])
@
jwt_required
def
clusters
():
"""
节点统计
节点数量,主节点,子节点列表
:return:
"""
from
py12306.cluster.cluster
import
Cluster
nodes
=
Cluster
()
.
nodes
count
=
len
(
nodes
)
node_lists
=
list
(
nodes
)
master
=
[
key
for
key
,
val
in
nodes
.
items
()
if
int
(
val
)
==
Cluster
.
KEY_MASTER
]
master
=
master
[
0
]
if
master
else
''
return
jsonify
({
'master'
:
master
,
'count'
:
count
,
'node_lists'
:
', '
.
join
(
node_lists
)
})
py12306/web/handler/user.py
View file @
c8988cd2
...
@@ -49,6 +49,7 @@ def user_info():
...
@@ -49,6 +49,7 @@ def user_info():
}
}
return
jsonify
(
result
)
return
jsonify
(
result
)
def
convert_job_to_info
(
job
:
UserJob
):
def
convert_job_to_info
(
job
:
UserJob
):
return
{
return
{
'key'
:
job
.
key
,
'key'
:
job
.
key
,
...
@@ -56,5 +57,6 @@ def convert_job_to_info(job: UserJob):
...
@@ -56,5 +57,6 @@ def convert_job_to_info(job: UserJob):
'name'
:
job
.
get_name
(),
'name'
:
job
.
get_name
(),
'is_ready'
:
job
.
is_ready
,
'is_ready'
:
job
.
is_ready
,
'is_loaded'
:
job
.
user_loaded
,
# 是否成功加载 ready 是当前是否可用
'is_loaded'
:
job
.
user_loaded
,
# 是否成功加载 ready 是当前是否可用
'last_heartbeat'
:
timestamp_to_time
(
job
.
last_heartbeat
)
'last_heartbeat'
:
timestamp_to_time
(
job
.
last_heartbeat
),
'login_num'
:
job
.
login_num
}
}
py12306/web/static/css/app.35e2fbd94557d71d1e2bfa0d4bb44d13.css
0 → 100644
View file @
c8988cd2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
py12306/web/static/index.html
View file @
c8988cd2
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"width=device-width,initial-scale=1"
><title>
py12306 购票助手
</title><link
href=
../../static/css/app.dfb5ffed622907edd7c5f81709f2b782.css
rel=
stylesheet
></head><body><script>
window
.
config
=
{
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"width=device-width,initial-scale=1"
><title>
py12306 购票助手
</title><link
href=
../../static/css/app.35e2fbd94557d71d1e2bfa0d4bb44d13.css
rel=
stylesheet
></head><body><script>
window
.
config
=
{
API_BASE_URL
:
'http://localhost:8080/'
,
API_BASE_URL
:
'http://localhost:8008/'
,
}
</script><div
id=
app
></div><script
type=
text/javascript
src=
../../static/js/manifest.82f431004cf9bb6ad2cb.js
></script><script
type=
text/javascript
src=
../../static/js/vendor.aebd1de04bf90e88d9c7.js
></script><script
type=
text/javascript
src=
../../static/js/app.96ef02c9e5601eb5ebcb.js
></script></body></html>
}
</script><div
id=
app
></div><script
type=
text/javascript
src=
../../static/js/manifest.82f431004cf9bb6ad2cb.js
></script><script
type=
text/javascript
src=
../../static/js/vendor.aebd1de04bf90e88d9c7.js
></script><script
type=
text/javascript
src=
../../static/js/app.7d7d65cccfbfa339beba.js
></script></body></html>
\ No newline at end of file
\ No newline at end of file
py12306/web/static/js/app.7d7d65cccfbfa339beba.js
0 → 100644
View file @
c8988cd2
webpackJsonp
([
1
],{
"5ZdE"
:
function
(
t
,
e
){},
E5Rs
:
function
(
t
,
e
){},
GpBP
:
function
(
t
,
e
){},
NHnr
:
function
(
t
,
e
,
a
){
"use strict"
;
Object
.
defineProperty
(
e
,
"__esModule"
,{
value
:
!
0
});
var
n
,
s
,
r
,
i
,
o
=
a
(
"7+uW"
),
l
=
a
(
"zL8q"
),
c
=
a
.
n
(
l
),
u
=
(
a
(
"tvR6"
),
a
(
"NYxO"
)),
d
=
a
(
"bOdI"
),
f
=
a
.
n
(
d
),
_
=
{
state
:{
sidebar
:
!
0
},
mutations
:(
n
=
{},
f
()(
n
,
"TOGGLE_SIDEBAR"
,
function
(
t
,
e
){
e
=
e
||!
t
.
sidebar
,
localStorage
.
sidebar
=
e
,
t
.
sidebar
=
e
}),
f
()(
n
,
"ALERT_NOTIFICATION"
,
function
(
t
,
e
){}),
f
()(
n
,
"ALERT_MESSAGE"
,
function
(
t
,
e
){
var
a
=
e
.
text
,
n
=
e
.
type
,
s
=
void
0
===
n
?
"info"
:
n
;
Object
(
l
.
Message
)({
message
:
a
,
type
:
s
})}),
n
),
actions
:(
s
=
{},
f
()(
s
,
"TOGGLE_SIDEBAR"
,
function
(
t
,
e
){(
0
,
t
.
commit
)(
"TOGGLE_SIDEBAR"
,
e
)}),
f
()(
s
,
"ALERT_MESSAGE"
,
function
(
t
,
e
){(
0
,
t
.
commit
)(
"ALERT_MESSAGE"
,
e
)}),
s
),
getters
:{}},
m
=
{
state
:{
user
:{},
token
:
null
},
mutations
:(
r
=
{},
f
()(
r
,
"LOGIN_SUCCESS"
,
function
(
t
,
e
){
this
.
dispatch
(
"UPDATE_TOKEN"
,
e
.
access_token
)}),
f
()(
r
,
"UPDATE_TOKEN"
,
function
(
t
,
e
){
localStorage
.
user_token
=
e
,
t
.
token
=
e
}),
f
()(
r
,
"LOAD_TOKEN"
,
function
(
t
){
var
e
;(
e
=
localStorage
.
getItem
(
"user_token"
))
&&
(
t
.
token
=
e
)}),
f
()(
r
,
"LOGOUT_SUCCESS"
,
function
(
t
){
delete
localStorage
.
user_token
}),
r
),
actions
:(
i
=
{},
f
()(
i
,
"LOGIN_SUCCESS"
,
function
(
t
,
e
){(
0
,
t
.
commit
)(
"LOGIN_SUCCESS"
,
e
)}),
f
()(
i
,
"UPDATE_TOKEN"
,
function
(
t
,
e
){(
0
,
t
.
commit
)(
"UPDATE_TOKEN"
,
e
)}),
f
()(
i
,
"LOAD_TOKEN"
,
function
(
t
){(
0
,
t
.
commit
)(
"LOAD_TOKEN"
)}),
f
()(
i
,
"LOGOUT_SUCCESS"
,
function
(
t
){(
0
,
t
.
commit
)(
"LOGOUT_SUCCESS"
)}),
i
),
getters
:{}};
o
.
default
.
use
(
u
.
a
);
var
p
=
new
u
.
a
.
Store
({
modules
:{
common
:
_
,
user
:
m
}}),
h
=
a
(
"/ocq"
),
v
=
{
name
:
"main-header"
,
data
:
function
(){
return
{
app
:{},
actions
:[]}},
created
:
function
(){
this
.
getActions
()},
methods
:{
getActions
:
function
(){
var
t
=
this
;
this
.
$api
.
get_actions
().
then
(
function
(
e
){
t
.
actions
=
e
.
data
})},
handleAction
:
function
(
t
){
"logout"
==
t
.
key
&&
(
this
.
$store
.
dispatch
(
"LOGOUT_SUCCESS"
),
this
.
$store
.
dispatch
(
"ALERT_MESSAGE"
,{
text
:
"退出成功"
,
type
:
"success"
}),
this
.
$router
.
push
(
"/login"
))}}},
g
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"nav-bar"
},[
a
(
"el-row"
,[
a
(
"el-col"
,{
attrs
:{
span
:
10
}},[
a
(
"div"
,{
staticClass
:
"logo-area vertical-center"
},[
a
(
"h2"
,{
staticClass
:
"no-margin vertical-center"
},[
t
.
_v
(
"PY 12306"
)])])]),
t
.
_v
(
" "
),
a
(
"el-col"
,{
attrs
:{
span
:
14
}},[
a
(
"div"
,{
staticClass
:
"actions float-right margin-right-1-rem"
},[
a
(
"ul"
,{
staticClass
:
"list-style-none"
},
t
.
_l
(
t
.
actions
,
function
(
e
){
return
a
(
"li"
,{
staticClass
:
"float-left margin-left-3-rem"
},[
a
(
"a"
,{
staticClass
:
"color-white vertical-center"
,
attrs
:{
href
:
e
.
link
},
on
:{
click
:
function
(
a
){
a
.
preventDefault
(),
t
.
handleAction
(
e
)}}},[
e
.
icon
?
a
(
"i"
,{
staticClass
:
"font-size-14 margin-right-s5-rem"
,
class
:
e
.
icon
}):
t
.
_e
(),
t
.
_v
(
" "
),
a
(
"span"
,{
domProps
:{
textContent
:
t
.
_s
(
e
.
text
)}})])])}))])])],
1
)],
1
)},
staticRenderFns
:[]};
var
b
=
a
(
"VU/8"
)(
v
,
g
,
!
1
,
function
(
t
){
a
(
"dXVw"
)},
null
,
null
).
exports
,
C
=
a
(
"Xxa5"
),
w
=
a
.
n
(
C
),
x
=
a
(
"exGp"
),
y
=
a
.
n
(
x
),
k
=
{
name
:
"main-sidebar"
,
data
:
function
(){
return
{
index
:
"0"
,
loading
:
null
,
user
:{},
menus
:[]}},
created
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
return
t
.
handleLoading
(
"on"
),
e
.
next
=
3
,
t
.
getUserInfo
();
case
3
:
return
e
.
next
=
5
,
t
.
getMenus
();
case
5
:
t
.
handleLoading
(
"off"
);
case
6
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
watch
:{
$route
:
function
(
t
,
e
){
var
a
=
this
;
this
.
$nextTick
(
function
(
t
){
a
.
updateMenus
()})}},
mounted
:
function
(){},
methods
:{
handleLoading
:
function
(){
"on"
==
(
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
]?
arguments
[
0
]:
"on"
)?
this
.
loading
=
this
.
$loading
({
lock
:
!
0
,
text
:
"加载中..."
}):
this
.
loading
.
close
()},
getUserInfo
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
return
e
.
next
=
2
,
t
.
$api
.
get_user_info
().
then
(
function
(
e
){
t
.
user
=
e
.
data
}).
catch
(
function
(
e
){
t
.
handleLoading
(
"off"
)});
case
2
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
getMenus
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
return
e
.
next
=
2
,
t
.
$api
.
get_menus
().
then
(
function
(
e
){
t
.
updateMenus
(
e
.
data
)}).
catch
(
function
(
e
){
t
.
handleLoading
(
"off"
)});
case
2
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
updateMenus
:
function
(
t
){
var
e
=
this
;(
t
=
t
||
this
.
menus
).
forEach
(
function
(
t
){
0
===
e
.
$route
.
path
.
indexOf
(
t
.
url
)
&&
(
e
.
index
=
t
.
id
.
toString
())}),
this
.
menus
=
t
}}},
E
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
attrs
:{
id
:
"menus"
}},[
a
(
"div"
,{
staticClass
:
"user-info margin-tb-3-rem"
},[
a
(
"div"
,{
staticClass
:
"text-align-center"
},[
a
(
"div"
,{
staticClass
:
"avatar"
},[
a
(
"img"
,{
staticClass
:
"border-circle"
,
attrs
:{
src
:
t
.
user
.
avatar
||
"../../static/img/avatar_default.svg"
,
alt
:
""
,
width
:
"60"
}})]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"name"
},[
a
(
"span"
,{
staticClass
:
"font-size-18"
,
domProps
:{
textContent
:
t
.
_s
(
t
.
user
.
name
)}})])])]),
t
.
_v
(
" "
),
a
(
"el-menu"
,{
attrs
:{
router
:
""
,
collapse
:
!
t
.
$store
.
state
.
common
.
sidebar
,
"default-active"
:
t
.
index
}},[
t
.
_l
(
t
.
menus
,
function
(
e
){
return
[
a
(
"el-menu-item"
,{
attrs
:{
index
:
e
.
id
?
e
.
id
.
toString
():
""
,
route
:{
path
:
e
.
url
}}},[
e
.
icon
?
a
(
"i"
,{
class
:
e
.
icon
}):
t
.
_e
(),
t
.
_v
(
" "
),
a
(
"span"
,{
attrs
:{
slot
:
"title"
},
domProps
:{
textContent
:
t
.
_s
(
e
.
name
)},
slot
:
"title"
})])]})],
2
)],
1
)},
staticRenderFns
:[]};
var
S
=
{
components
:{
MainSidebar
:
a
(
"VU/8"
)(
k
,
E
,
!
1
,
function
(
t
){
a
(
"YlHp"
)},
null
,
null
).
exports
,
MainHeader
:
b
},
mounted
:
function
(){},
data
:
function
(){
return
{}}},
A
=
{
render
:
function
(){
var
t
=
this
.
$createElement
,
e
=
this
.
_self
.
_c
||
t
;
return
e
(
"el-container"
,{
attrs
:{
id
:
"body"
}},[
e
(
"el-header"
,[
e
(
"main-header"
)],
1
),
this
.
_v
(
" "
),
e
(
"el-container"
,{
attrs
:{
id
:
"content"
}},[
e
(
"el-aside"
,[
e
(
"main-sidebar"
)],
1
),
this
.
_v
(
" "
),
e
(
"el-main"
,{
attrs
:{
id
:
"content-body"
}},[
e
(
"router-view"
)],
1
)],
1
)],
1
)},
staticRenderFns
:[]};
var
$
=
a
(
"VU/8"
)(
S
,
A
,
!
1
,
function
(
t
){
a
(
"GpBP"
)},
null
,
null
).
exports
,
L
=
{
data
:
function
(){
return
{
dashboard_lists
:[{
name
:
"用户"
,
key
:
"user_job_count"
,
icon
:
"fa fa-user"
,
icon_color
:
"#7DD43B"
},{
name
:
"任务"
,
key
:
"query_job_count"
,
icon
:
"fa fa-infinity"
,
icon_color
:
"#F5A623"
},{
name
:
"查询次数"
,
key
:
"query_count"
,
icon
:
"fa fa-search"
,
icon_color
:
"#4A90E2"
}],
cluster_lists
:[{
name
:
"节点数量"
,
key
:
"count"
,
icon
:
"fa fa-globe-asia"
,
icon_color
:
"#7DD43B"
},{
name
:
"主节点"
,
key
:
"master"
},{
name
:
"节点列表"
,
key
:
"node_lists"
}],
dashboard
:{},
cluster
:{},
real_time_message_colors
:[
"#18D4AD"
],
real_time_message_data
:{
columns
:[
"Date"
,
"实时消息"
],
rows
:[]},
real_time_message_last_time
:
0
,
week_message_colors
:[
"#fb7e70"
],
week_message_data
:{
columns
:[
"Date"
,
"处理消息"
],
rows
:[]},
week_message_last_time
:
0
,
dataEmpty
:
!
0
,
refreshTime
:
2
}},
mounted
:
function
(){
this
.
refreshData
()},
methods
:{
refreshData
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
if
(
"/"
==
t
.
$route
.
path
){
e
.
next
=
2
;
break
}
return
e
.
abrupt
(
"return"
);
case
2
:
return
e
.
next
=
4
,
t
.
getDashboard
();
case
4
:
return
e
.
next
=
6
,
t
.
getCluster
();
case
6
:
setTimeout
(
t
.
refreshData
,
1
e3
*
t
.
refreshTime
);
case
7
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
getDashboard
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
return
e
.
next
=
2
,
t
.
$api
.
get_dashboard
().
then
(
function
(
e
){
t
.
dashboard
=
e
.
data
});
case
2
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
getCluster
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
return
e
.
next
=
2
,
t
.
$api
.
get_stat_cluster
().
then
(
function
(
e
){
t
.
cluster
=
e
.
data
});
case
2
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()}}},
T
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"container"
,
attrs
:{
id
:
"home-index"
}},[
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"接入状态"
)]),
t
.
_v
(
" "
),
a
(
"el-row"
,{
staticClass
:
"system-state"
,
attrs
:{
gutter
:
40
}},
t
.
_l
(
t
.
dashboard_lists
,
function
(
e
){
return
a
(
"el-col"
,{
key
:
e
.
key
,
attrs
:{
lg
:
6
,
md
:
8
,
sm
:
12
}},[
a
(
"div"
,{
staticClass
:
"card"
},[
a
(
"div"
,{
staticClass
:
"left"
},[
a
(
"div"
,{
staticClass
:
"name"
,
domProps
:{
textContent
:
t
.
_s
(
e
.
name
)}}),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"value"
,
domProps
:{
textContent
:
t
.
_s
(
void
0
!=
t
.
dashboard
[
e
.
key
]?
t
.
dashboard
[
e
.
key
]:
"-"
)}})]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"right"
},[
e
.
icon
?
a
(
"span"
,{
class
:
e
.
icon
,
style
:
e
.
icon_color
?
"background: "
+
e
.
icon_color
:
""
}):
t
.
_e
()])]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-2-rem clear hidden-lg-and-up"
})])})),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-2-rem clear hidden-md-and-down"
})],
1
)],
1
),
t
.
_v
(
" "
),
t
.
cluster
.
count
?
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"集群状态"
)]),
t
.
_v
(
" "
),
a
(
"el-row"
,{
staticClass
:
"system-state"
,
attrs
:{
gutter
:
40
}},
t
.
_l
(
t
.
cluster_lists
,
function
(
e
){
return
a
(
"el-col"
,{
key
:
e
.
key
,
attrs
:{
lg
:
6
,
md
:
8
,
sm
:
12
}},[
a
(
"div"
,{
staticClass
:
"card"
},[
a
(
"div"
,{
staticClass
:
"left"
,
class
:{
"width-full"
:
!
e
.
icon
}},[
a
(
"div"
,{
staticClass
:
"name"
,
domProps
:{
textContent
:
t
.
_s
(
e
.
name
)}}),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"value"
,
class
:{
"node-list"
:
"node_lists"
==
e
.
key
},
domProps
:{
textContent
:
t
.
_s
(
void
0
!=
t
.
cluster
[
e
.
key
]?
t
.
cluster
[
e
.
key
]:
"-"
)}})]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"right"
},[
e
.
icon
?
a
(
"span"
,{
class
:
e
.
icon
,
style
:
e
.
icon_color
?
"background: "
+
e
.
icon_color
:
""
}):
t
.
_e
()])]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-2-rem clear hidden-lg-and-up"
})])})),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-2-rem clear hidden-md-and-down"
})],
1
)],
1
):
t
.
_e
()],
1
)},
staticRenderFns
:[]};
var
D
=
a
(
"VU/8"
)(
L
,
T
,
!
1
,
function
(
t
){
a
(
"gDG4"
)},
"data-v-30878406"
,
null
).
exports
,
O
=
{
data
:
function
(){
return
{
info
:{},
loading_login
:
!
1
,
rules
:{
username
:[{
required
:
!
0
,
message
:
"请输入用户名"
,
trigger
:
"blur"
}],
password
:[{
required
:
!
0
,
message
:
"请输入密码"
,
trigger
:
"blur"
}]}}},
mounted
:
function
(){},
methods
:{
doLogin
:
function
(){
var
t
=
this
;
this
.
$refs
.
form
.
validate
(
function
(
e
){
e
&&
(
t
.
loading_login
=!
0
,
t
.
$api
.
login
(
t
.
info
).
then
(
function
(
e
){
t
.
loading_login
=!
1
,
t
.
$store
.
dispatch
(
"LOGIN_SUCCESS"
,
e
.
data
),
t
.
$router
.
push
(
"/"
)}).
catch
(
function
(
e
){
t
.
loading_login
=!
1
}))})}}},
R
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"height-full vertical-center"
},[
a
(
"div"
,{
staticClass
:
"container width-full"
,
attrs
:{
id
:
"login"
}},[
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
,
attrs
:{
type
:
"flex"
,
justify
:
"center"
}},[
a
(
"el-col"
,{
attrs
:{
lg
:
10
,
md
:
12
,
sm
:
16
}},[
a
(
"div"
,{
staticClass
:
"card padding-2-rem padding-lr-3-rem text-align-center"
},[
a
(
"h2"
,{
staticClass
:
"card-title font-size-28"
},[
t
.
_v
(
"PY 12036"
)]),
t
.
_v
(
" "
),
a
(
"el-form"
,{
ref
:
"form"
,
attrs
:{
model
:
t
.
info
,
rules
:
t
.
rules
},
nativeOn
:{
submit
:
function
(
e
){
return
e
.
preventDefault
(),
t
.
doAdd
(
e
)}}},[
a
(
"el-form-item"
,{
attrs
:{
label
:
"用户名"
,
prop
:
"username"
}},[
a
(
"el-input"
,{
model
:{
value
:
t
.
info
.
username
,
callback
:
function
(
e
){
t
.
$set
(
t
.
info
,
"username"
,
e
)},
expression
:
"info.username"
}})],
1
),
t
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"密码"
,
prop
:
"password"
}},[
a
(
"el-input"
,{
attrs
:{
type
:
"password"
},
model
:{
value
:
t
.
info
.
password
,
callback
:
function
(
e
){
t
.
$set
(
t
.
info
,
"password"
,
e
)},
expression
:
"info.password"
}})],
1
),
t
.
_v
(
" "
),
a
(
"el-form-item"
,[
a
(
"div"
,{
staticClass
:
"break-2-rem"
}),
t
.
_v
(
" "
),
a
(
"el-button"
,{
attrs
:{
type
:
"primary"
,
loading
:
t
.
loading_login
,
plain
:
""
},
on
:{
click
:
t
.
doLogin
}},[
t
.
_v
(
"登录
\n
"
)])],
1
)],
1
)],
1
)])],
1
)],
1
)],
1
)])},
staticRenderFns
:[]};
var
U
=
a
(
"VU/8"
)(
O
,
R
,
!
1
,
function
(
t
){
a
(
"E5Rs"
)},
null
,
null
).
exports
,
G
=
{
data
:
function
(){
return
{
empty
:
!
1
,
lists
:[],
loading_lists
:
!
1
,
retry_time
:
5
,
auto_refresh
:
!
0
}},
mounted
:
function
(){
this
.
refreshData
()},
methods
:{
refreshData
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
if
(
"/user"
==
t
.
$route
.
path
){
e
.
next
=
2
;
break
}
return
e
.
abrupt
(
"return"
);
case
2
:
if
(
!
t
.
auto_refresh
){
e
.
next
=
5
;
break
}
return
e
.
next
=
5
,
t
.
getLists
();
case
5
:
setTimeout
(
t
.
refreshData
,
1
e3
*
t
.
retry_time
);
case
6
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
getLists
:
function
(){
var
t
=
this
;(
!
(
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
])
||
arguments
[
0
])
&&
(
this
.
loading_lists
=!
0
),
this
.
$api
.
get_users
().
then
(
function
(
e
){
!
e
.
data
||
e
.
data
.
length
<=
0
?
t
.
empty
=!
0
:
t
.
empty
=!
1
,
t
.
lists
=
e
.
data
,
t
.
loading_lists
=!
1
}).
catch
(
function
(
e
){
t
.
loading_lists
=!
1
})}}},
P
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"container"
,
attrs
:{
id
:
"account-index"
}},[
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
},[
a
(
"div"
,{
staticClass
:
"action-group"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"用户管理"
)]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"refresh-switch"
},[
a
(
"span"
,{
staticClass
:
"helper-text margin-right-s5-rem"
},[
t
.
_v
(
"自动刷新 "
),
a
(
"span"
,{
domProps
:{
textContent
:
t
.
_s
(
t
.
retry_time
)}}),
t
.
_v
(
" 秒"
)]),
t
.
_v
(
" "
),
a
(
"el-switch"
,{
model
:{
value
:
t
.
auto_refresh
,
callback
:
function
(
e
){
t
.
auto_refresh
=
e
},
expression
:
"auto_refresh"
}})],
1
)]),
t
.
_v
(
" "
),
t
.
empty
?
a
(
"el-col"
,{
staticClass
:
"data"
},[
a
(
"div"
,{
staticClass
:
"card text-align-center padding-tb-6-rem"
},[
a
(
"h2"
,{
staticClass
:
"font-size-24 font-weight-normal color-text-secondary"
},[
t
.
_v
(
"没有正在运行的用户任务"
)]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-3-rem"
})])]):
a
(
"el-col"
,{
staticClass
:
"data"
},[
a
(
"div"
,{
directives
:[{
name
:
"loading"
,
rawName
:
"v-loading"
,
value
:
t
.
loading_lists
,
expression
:
"loading_lists"
}],
staticClass
:
"card padding-tb-1-rem padding-lr-2-rem"
},[
a
(
"el-table"
,{
staticStyle
:{
width
:
"100%"
},
attrs
:{
data
:
t
.
lists
}},[
a
(
"el-table-column"
,{
attrs
:{
prop
:
"key"
,
label
:
"KEY"
}}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
prop
:
"user_name"
,
label
:
"账号"
}}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
prop
:
"name"
,
label
:
"姓名"
}}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
prop
:
"is_loaded"
,
label
:
"是否加载成功"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
e
.
row
.
is_loaded
?
a
(
"el-tag"
,{
attrs
:{
type
:
"success"
}},[
t
.
_v
(
"成功"
)]):
a
(
"el-tag"
,{
attrs
:{
type
:
"danger"
}},[
t
.
_v
(
"失败"
)])]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
prop
:
"is_ready"
,
label
:
"可用状态"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
e
.
row
.
is_ready
?
a
(
"el-tag"
,{
attrs
:{
type
:
"success"
}},[
t
.
_v
(
"成功"
)]):
a
(
"el-tag"
,{
attrs
:{
type
:
"danger"
}},[
t
.
_v
(
"失败"
)])]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
prop
:
"login_num"
,
label
:
"登录次数"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
a
(
"el-tag"
,{
attrs
:{
size
:
"medium"
}},[
t
.
_v
(
t
.
_s
(
e
.
row
.
login_num
))])]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
prop
:
"last_heartbeat"
,
label
:
"最后心跳"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
a
(
"span"
,{
staticClass
:
"time"
,
domProps
:{
textContent
:
t
.
_s
(
e
.
row
.
last_heartbeat
)}})]}}])})],
1
)],
1
)])],
1
)],
1
)],
1
)},
staticRenderFns
:[]};
var
N
=
a
(
"VU/8"
)(
G
,
P
,
!
1
,
function
(
t
){
a
(
"phMf"
)},
"data-v-a688bd62"
,
null
).
exports
,
M
=
{
data
:
function
(){
return
{
lists
:[],
loading_lists
:
!
1
,
line
:
-
1
,
limit
:
10
,
retry_time
:
1
,
is_first_time
:
!
0
,
auto_refresh
:
!
0
,
able_to_scroll
:
!
0
}},
mounted
:
function
(){
this
.
refreshData
()},
methods
:{
refreshData
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
if
(
"/log/realtime"
==
t
.
$route
.
path
){
e
.
next
=
2
;
break
}
return
e
.
abrupt
(
"return"
);
case
2
:
if
(
!
t
.
is_first_time
&&!
t
.
auto_refresh
){
e
.
next
=
5
;
break
}
return
e
.
next
=
5
,
t
.
getLists
(
t
.
is_first_time
);
case
5
:
t
.
is_first_time
=!
1
,
setTimeout
(
t
.
refreshData
,
1
e3
*
t
.
retry_time
);
case
7
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
getLists
:
function
(){
var
t
=
this
,
e
=!
(
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
])
||
arguments
[
0
];
return
y
()(
w
.
a
.
mark
(
function
a
(){
return
w
.
a
.
wrap
(
function
(
a
){
for
(;;)
switch
(
a
.
prev
=
a
.
next
){
case
0
:
return
e
&&
(
t
.
loading_lists
=!
0
),
a
.
next
=
3
,
t
.
$api
.
get_log_realtime
({
line
:
t
.
line
,
limit
:
t
.
limit
}).
then
(
function
(
e
){
e
.
data
.
data
&&
e
.
data
.
data
.
length
&&
(
t
.
lists
=
t
.
lists
.
concat
(
e
.
data
.
data
),
t
.
$nextTick
(
function
(){
if
(
t
.
able_to_scroll
){
var
e
=
t
.
$refs
.
logs
;
e
.
scrollTop
=
e
.
scrollHeight
}}),
t
.
line
=
e
.
data
.
last_line
),
t
.
loading_lists
=!
1
}).
catch
(
function
(
e
){
t
.
loading_lists
=!
1
});
case
3
:
case
"end"
:
return
a
.
stop
()}},
a
,
t
)}))()}}},
j
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"container"
,
attrs
:{
id
:
"log-realtime"
}},[
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
},[
a
(
"div"
,{
staticClass
:
"action-group"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"实时日志"
)]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"refresh-switch"
},[
a
(
"span"
,{
staticClass
:
"helper-text margin-right-s5-rem"
},[
t
.
_v
(
"自动刷新 "
),
a
(
"span"
,{
domProps
:{
textContent
:
t
.
_s
(
t
.
retry_time
)}}),
t
.
_v
(
" 秒"
)]),
t
.
_v
(
" "
),
a
(
"el-switch"
,{
model
:{
value
:
t
.
auto_refresh
,
callback
:
function
(
e
){
t
.
auto_refresh
=
e
},
expression
:
"auto_refresh"
}})],
1
)]),
t
.
_v
(
" "
),
a
(
"el-col"
,{
staticClass
:
"data height-full"
},[
a
(
"div"
,{
directives
:[{
name
:
"loading"
,
rawName
:
"v-loading"
,
value
:
t
.
loading_lists
,
expression
:
"loading_lists"
}],
staticClass
:
"card padding-tb-1-rem padding-lr-2-rem height-full log-area"
,
on
:{
mouseover
:
function
(
e
){
t
.
able_to_scroll
=!
1
},
mouseout
:
function
(
e
){
t
.
able_to_scroll
=!
0
}}},[
a
(
"div"
,{
ref
:
"logs"
,
staticClass
:
"logs"
},
t
.
_l
(
t
.
lists
,
function
(
e
){
return
a
(
"span"
,{
staticClass
:
"display-block"
,
domProps
:{
textContent
:
t
.
_s
(
e
)}})}))])])],
1
)],
1
)],
1
)},
staticRenderFns
:[]};
var
q
=
a
(
"VU/8"
)(
M
,
j
,
!
1
,
function
(
t
){
a
(
"aAyn"
)},
"data-v-47d90518"
,
null
).
exports
,
F
=
{
data
:
function
(){
return
{
empty
:
!
1
,
lists
:[],
loading_lists
:
!
1
,
retry_time
:
5
,
auto_refresh
:
!
0
}},
mounted
:
function
(){
this
.
refreshData
()},
methods
:{
refreshData
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
if
(
"/query"
==
t
.
$route
.
path
){
e
.
next
=
2
;
break
}
return
e
.
abrupt
(
"return"
);
case
2
:
if
(
!
t
.
auto_refresh
){
e
.
next
=
5
;
break
}
return
e
.
next
=
5
,
t
.
getLists
();
case
5
:
setTimeout
(
t
.
refreshData
,
1
e3
*
t
.
retry_time
);
case
6
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()},
getLists
:
function
(){
var
t
=
this
,
e
=!
(
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
])
||
arguments
[
0
];
return
y
()(
w
.
a
.
mark
(
function
a
(){
return
w
.
a
.
wrap
(
function
(
a
){
for
(;;)
switch
(
a
.
prev
=
a
.
next
){
case
0
:
return
e
&&
(
t
.
loading_lists
=!
0
),
a
.
next
=
3
,
t
.
$api
.
get_query
().
then
(
function
(
e
){
!
e
.
data
||
e
.
data
.
length
<=
0
?
t
.
empty
=!
0
:
t
.
empty
=!
1
,
t
.
lists
=
e
.
data
,
t
.
loading_lists
=!
1
}).
catch
(
function
(
e
){
t
.
loading_lists
=!
1
});
case
3
:
case
"end"
:
return
a
.
stop
()}},
a
,
t
)}))()}}},
I
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"container"
,
attrs
:{
id
:
"account-index"
}},[
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
},[
a
(
"div"
,{
staticClass
:
"action-group"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"查询任务"
)]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"refresh-switch"
},[
a
(
"span"
,{
staticClass
:
"helper-text margin-right-s5-rem"
},[
t
.
_v
(
"自动刷新 "
),
a
(
"span"
,{
domProps
:{
textContent
:
t
.
_s
(
t
.
retry_time
)}}),
t
.
_v
(
" 秒"
)]),
t
.
_v
(
" "
),
a
(
"el-switch"
,{
model
:{
value
:
t
.
auto_refresh
,
callback
:
function
(
e
){
t
.
auto_refresh
=
e
},
expression
:
"auto_refresh"
}})],
1
)]),
t
.
_v
(
" "
),
t
.
empty
?
a
(
"el-col"
,{
staticClass
:
"data"
},[
a
(
"div"
,{
staticClass
:
"card text-align-center padding-tb-6-rem"
},[
a
(
"h2"
,{
staticClass
:
"font-size-24 font-weight-normal color-text-secondary"
},[
t
.
_v
(
"没有正在运行的查询任务"
)]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-3-rem"
})])]):
a
(
"el-col"
,{
staticClass
:
"data"
},[
a
(
"div"
,{
directives
:[{
name
:
"loading"
,
rawName
:
"v-loading"
,
value
:
t
.
loading_lists
,
expression
:
"loading_lists"
}],
staticClass
:
"card padding-tb-1-rem padding-lr-2-rem"
},[
a
(
"el-table"
,{
staticStyle
:{
width
:
"100%"
},
attrs
:{
data
:
t
.
lists
}},[
a
(
"el-table-column"
,{
attrs
:{
prop
:
"name"
,
label
:
"名称"
,
width
:
"150"
}}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"出发日期"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
t
.
_v
(
"
\n
"
+
t
.
_s
(
e
.
row
.
left_dates
.
join
(
", "
))
+
"
\n
"
)]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"乘客人数"
,
width
:
"120"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
a
(
"el-tag"
,{
attrs
:{
size
:
"medium"
}},[
t
.
_v
(
t
.
_s
(
e
.
row
.
member_num
))])]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"部分提交"
,
width
:
"120"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
a
(
"el-switch"
,{
attrs
:{
disabled
:
""
},
model
:{
value
:
e
.
row
.
allow_less_member
,
callback
:
function
(
a
){
t
.
$set
(
e
.
row
,
"allow_less_member"
,
a
)},
expression
:
"scope.row.allow_less_member"
}})]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"座位"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
t
.
_v
(
"
\n
"
+
t
.
_s
(
e
.
row
.
allow_seats
.
join
(
", "
))
+
"
\n
"
)]}}])}),
t
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"筛选车次"
},
scopedSlots
:
t
.
_u
([{
key
:
"default"
,
fn
:
function
(
e
){
return
[
t
.
_v
(
"
\n
"
+
t
.
_s
(
e
.
row
.
allow_train_numbers
.
join
(
", "
))
+
"
\n
"
)]}}])})],
1
)],
1
)])],
1
)],
1
)],
1
)},
staticRenderFns
:[]};
var
V
=
a
(
"VU/8"
)(
F
,
I
,
!
1
,
function
(
t
){
a
(
"a7/l"
)},
"data-v-4396a4e9"
,
null
).
exports
,
H
=
{
render
:
function
(){
var
t
=
this
,
e
=
t
.
$createElement
,
a
=
t
.
_self
.
_c
||
e
;
return
a
(
"div"
,{
staticClass
:
"container"
,
attrs
:{
id
:
"help-index"
}},[
a
(
"el-container"
,[
a
(
"el-row"
,{
staticClass
:
"width-full"
},[
a
(
"div"
,{
staticClass
:
"action-group"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"快捷访问"
)])]),
t
.
_v
(
" "
),
a
(
"el-row"
,{
staticClass
:
"quick-links"
,
attrs
:{
gutter
:
40
}},
t
.
_l
(
t
.
function_lists
,
function
(
e
){
return
a
(
"el-col"
,{
key
:
e
.
key
,
attrs
:{
lg
:
6
,
md
:
8
,
sm
:
12
}},[
a
(
"router-link"
,{
attrs
:{
to
:
e
.
url
}},[
a
(
"div"
,{
staticClass
:
"card text-align-center color-text-secondary"
},[
a
(
"div"
,{
staticClass
:
"break-2-rem"
}),
t
.
_v
(
" "
),
a
(
"div"
,[
a
(
"span"
,{
staticClass
:
"font-size-30"
,
class
:
e
.
icon
})]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-s2-rem"
}),
t
.
_v
(
" "
),
a
(
"div"
,[
a
(
"span"
,{
staticClass
:
"font-size-18"
,
domProps
:{
textContent
:
t
.
_s
(
e
.
name
)}})])])]),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-2-rem clear hidden-lg-and-up"
})],
1
)})),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"break-2-rem clear hidden-md-and-down"
}),
t
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"action-group"
},[
a
(
"h2"
,{
staticClass
:
"action-title"
},[
t
.
_v
(
"关于"
)])]),
t
.
_v
(
" "
),
a
(
"el-row"
,{
staticClass
:
"common-problem"
},[
a
(
"el-col"
,{
attrs
:{
span
:
24
}},[
a
(
"div"
,{
staticClass
:
"card padding-2-rem"
,
domProps
:{
innerHTML
:
t
.
_s
(
t
.
about
)}})])],
1
)],
1
)],
1
)],
1
)},
staticRenderFns
:[]};
var
z
=
a
(
"VU/8"
)({
data
:
function
(){
return
{
function_lists
:[{
name
:
"帮助文档"
,
url
:
"/help/readme"
,
icon
:
"fa fa-book-open"
}],
about
:
'写这个程序最初只是为了给自己父母买张回家的票,开源是希望能帮助到更多的人,请勿用于任何商业行为。<br /><br />github: <a href="https://github.com/pjialin/py12306" target="_blank">https://github.com/pjialin/py12306</a>'
}},
mounted
:
function
(){},
methods
:{}},
H
,
!
1
,
function
(
t
){
a
(
"VjHN"
)},
"data-v-1f9d50cc"
,
null
).
exports
,
K
=
a
(
"HKE2"
),
B
=
{
data
:
function
(){
return
{
loading_readme
:
!
1
,
info
:
""
}},
mounted
:
function
(){
this
.
getReadme
()},
methods
:{
getReadme
:
function
(){
var
t
=
this
;
return
y
()(
w
.
a
.
mark
(
function
e
(){
return
w
.
a
.
wrap
(
function
(
e
){
for
(;;)
switch
(
e
.
prev
=
e
.
next
){
case
0
:
return
t
.
loading_readme
=!
0
,
e
.
next
=
3
,
t
.
$api
.
get_readme
().
then
(
function
(
e
){
var
a
=
new
K
.
Converter
;
t
.
info
=
a
.
makeHtml
(
e
.
data
)});
case
3
:
t
.
loading_readme
=!
1
;
case
4
:
case
"end"
:
return
e
.
stop
()}},
e
,
t
)}))()}}},
Y
=
{
render
:
function
(){
var
t
=
this
.
$createElement
,
e
=
this
.
_self
.
_c
||
t
;
return
e
(
"div"
,{
staticClass
:
"container"
,
attrs
:{
id
:
"readme-index"
}},[
e
(
"el-container"
,[
e
(
"el-row"
,{
staticClass
:
"width-full"
},[
e
(
"div"
,{
staticClass
:
"action-group"
},[
e
(
"h2"
,{
staticClass
:
"action-title"
},[
this
.
_v
(
"帮助文档"
)])]),
this
.
_v
(
" "
),
e
(
"el-row"
,{
directives
:[{
name
:
"loading"
,
rawName
:
"v-loading"
,
value
:
this
.
loading_readme
,
expression
:
"loading_readme"
}]},[
e
(
"el-col"
,{
attrs
:{
span
:
24
}},[
e
(
"div"
,{
staticClass
:
"card padding-2-rem"
},[
e
(
"article"
,{
staticClass
:
"markdown-body"
,
domProps
:{
innerHTML
:
this
.
_s
(
this
.
info
)}})])])],
1
)],
1
)],
1
)],
1
)},
staticRenderFns
:[]};
var
Q
=
a
(
"VU/8"
)(
B
,
Y
,
!
1
,
function
(
t
){
a
(
"5ZdE"
),
a
(
"n//Q"
)},
"data-v-32a9e4aa"
,
null
).
exports
;
o
.
default
.
use
(
h
.
a
);
var
X
=
[{
path
:
"/"
,
component
:
$
,
meta
:{
auth
:
!
0
},
children
:[{
path
:
""
,
component
:
D
},{
path
:
"user"
,
component
:
N
},{
path
:
"log/realtime"
,
component
:
q
},{
path
:
"query"
,
component
:
V
},{
path
:
"help"
,
component
:
z
},{
path
:
"help/readme"
,
component
:
Q
}]},{
path
:
"/login"
,
component
:
U
}];
p
.
dispatch
(
"LOAD_TOKEN"
);
var
J
=
new
h
.
a
({
routes
:
X
});
J
.
beforeEach
(
function
(
t
,
e
,
a
){
t
.
matched
.
some
(
function
(
t
){
return
t
.
meta
.
auth
})?
p
.
state
.
user
.
token
?
a
():
a
({
path
:
"/login"
,
query
:{
redirect
:
t
.
fullPath
}}):
a
()});
var
W
=
J
,
Z
=
a
(
"Dd8w"
),
tt
=
a
.
n
(
Z
),
et
=
a
(
"pFYg"
),
at
=
a
.
n
(
et
),
nt
=
a
(
"mvHQ"
),
st
=
a
.
n
(
nt
),
rt
=
{
shallow_copy
:
function
(
t
){
return
JSON
.
parse
(
st
()(
t
))},
shallow_copy_object
:
function
(
t
){
var
e
=
{};
for
(
var
a
in
t
)
"object"
==
at
()(
t
[
a
])?
e
[
a
]
=
this
.
shallow_copy_object
(
tt
()({},
t
[
a
])):
e
[
a
]
=
t
[
a
];
return
e
},
compare_object
:
function
(
t
,
e
){
return
st
()(
t
)
===
st
()(
e
)},
install
:
function
(
t
){
t
.
prototype
.
$util
=
this
}},
it
=
a
(
"woOf"
),
ot
=
a
.
n
(
it
),
lt
=
a
(
"//Fk"
),
ct
=
a
.
n
(
lt
),
ut
=
a
(
"mtWM"
),
dt
=
a
.
n
(
ut
),
ft
=
function
(
t
){
_t
[
t
.
response
.
status
]
&&
_t
[
t
.
response
.
status
](
t
)},
_t
=
{
422
:
function
(
t
){
var
e
=
t
.
response
.
data
.
msg
;
p
.
dispatch
(
"ALERT_MESSAGE"
,{
text
:
e
,
type
:
"error"
})},
400
:
function
(
t
){
var
e
=
t
.
response
.
data
.
msg
;
p
.
dispatch
(
"ALERT_MESSAGE"
,{
text
:
e
,
type
:
"error"
})},
401
:
function
(
t
){
p
.
dispatch
(
"ALERT_MESSAGE"
,{
text
:
"登录已过期,请重新登录"
,
type
:
"warning"
}),
W
.
push
(
"/login"
)},
405
:
function
(
t
){},
500
:
function
(
t
){}},
mt
=
{
baseURL
:
window
.
config
.
API_BASE_URL
},
pt
=
dt
.
a
.
create
(
mt
);
pt
.
interceptors
.
request
.
use
(
function
(
t
){
return
0
!=
t
.
auth
&&
p
.
state
.
user
.
token
&&
(
t
.
headers
.
Authorization
=
"Bearer "
+
p
.
state
.
user
.
token
),
t
},
function
(
t
){
return
ct
.
a
.
reject
(
t
)}),
pt
.
interceptors
.
response
.
use
(
function
(
t
){
return
t
},
function
(
t
){
return
ft
(
t
),
ct
.
a
.
reject
(
t
)});
var
ht
=
pt
,
vt
=
ot
()({
install
:
function
(
t
){
t
.
prototype
.
$request
=
this
}},
ht
),
gt
=
(
window
.
config
,{
get_user_info
:
function
(){
return
vt
.
get
(
"user/info"
)},
get_menus
:
function
(){
return
vt
.
get
(
"app/menus"
)},
get_actions
:
function
(){
return
vt
.
get
(
"app/actions"
)},
login
:
function
(
t
){
return
vt
.
post
(
"login"
,
t
)},
get_users
:
function
(){
return
vt
.
get
(
"users"
)},
get_log_realtime
:
function
(){
var
t
=
arguments
.
length
>
0
&&
void
0
!==
arguments
[
0
]?
arguments
[
0
]:{};
return
vt
.
get
(
"log/output"
,{
params
:
t
})},
get_query
:
function
(){
return
vt
.
get
(
"query"
)},
get_dashboard
:
function
(){
return
vt
.
get
(
"stat/dashboard"
)},
get_stat_cluster
:
function
(){
return
vt
.
get
(
"stat/cluster"
)},
get_readme
:
function
(){
return
vt
.
get
(
"https://raw.githubusercontent.com/pjialin/py12306/master/README.md"
,{
auth
:
!
1
,
responseType
:
"text"
})}}),
bt
=
ot
()(
gt
,{
install
:
function
(
t
){
t
.
prototype
.
$api
=
this
}}),
Ct
=
{
render
:
function
(){
var
t
=
this
.
$createElement
,
e
=
this
.
_self
.
_c
||
t
;
return
e
(
"div"
,{
attrs
:{
id
:
"app"
}},[
e
(
"router-view"
)],
1
)},
staticRenderFns
:[]};
var
wt
=
a
(
"VU/8"
)({
name
:
"App"
},
Ct
,
!
1
,
function
(
t
){
a
(
"xcaL"
)},
null
,
null
).
exports
;
o
.
default
.
use
(
c
.
a
),
o
.
default
.
use
(
rt
),
o
.
default
.
use
(
bt
),
o
.
default
.
config
.
productionTip
=!
1
,
new
o
.
default
({
el
:
"#app"
,
router
:
W
,
store
:
p
,
components
:{
App
:
wt
},
template
:
"<App/>"
})},
VjHN
:
function
(
t
,
e
){},
YlHp
:
function
(
t
,
e
){},
"a7/l"
:
function
(
t
,
e
){},
aAyn
:
function
(
t
,
e
){},
dXVw
:
function
(
t
,
e
){},
gDG4
:
function
(
t
,
e
){},
"n//Q"
:
function
(
t
,
e
){},
phMf
:
function
(
t
,
e
){},
tvR6
:
function
(
t
,
e
){},
xcaL
:
function
(
t
,
e
){}},[
"NHnr"
]);
\ No newline at end of file
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