Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
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
Administrator
web-monitor
Commits
035404b3
Commit
035404b3
authored
Jan 29, 2022
by
neogcg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login
parent
74e54464
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
9 deletions
+113
-9
index.js
src/router/index.js
+7
-5
historyStatus.vue
src/views/history/historyStatus/historyStatus.vue
+94
-0
index.vue
src/views/login/index.vue
+12
-4
No files found.
src/router/index.js
View file @
035404b3
...
@@ -101,12 +101,14 @@ export const constantRoutes = [
...
@@ -101,12 +101,14 @@ export const constantRoutes = [
{
{
path
:
'/history'
,
path
:
'/history'
,
component
:
Layout
,
component
:
Layout
,
redirect
:
'/dashboard'
,
redirect
:
'/history/historyStatus/historyStatus'
,
name
:
'History'
,
meta
:
{
title
:
'History'
,
icon
:
'example'
},
children
:
[{
children
:
[{
path
:
'history'
,
path
:
'history
Status
'
,
name
:
'
History
'
,
name
:
'
历史数据状态
'
,
component
:
()
=>
import
(
'@/views/
dashboard/index
'
),
component
:
()
=>
import
(
'@/views/
history/historyStatus/historyStatus.vue
'
),
meta
:
{
title
:
'历史数据
'
,
icon
:
'dashboard
'
}
meta
:
{
title
:
'历史数据
状态
'
}
}]
}]
},
},
{
{
...
...
src/views/history/historyStatus/historyStatus.vue
0 → 100644
View file @
035404b3
<
template
>
<div>
<h1>
会搜发的随风
</h1>
</div>
</
template
>
<
script
>
import
{
mapGetters
,
mapActions
}
from
'vuex'
;
export
default
{
props
:
[],
components
:
{},
data
()
{
return
{
beginItem
:
1
,
endItem
:
10
,
total
:
0
,
currentPage
:
1
,
pageSize
:
10
,
historyStatusList
:[
{
stationName
:
'STATION2未开通'
,
alarmObj
:
'漏缆FSU2_R1下行方向'
,
alarmInfo
:
'距离:0米 驻波比:8.72'
,
alarmInfo2
:
'距离:18米 驻波比:1.07'
,
alarmInfo3
:
'距离:42米 驻波比:1.02'
,
firstTime
:
'2022/12/18 11:51:12'
},
{
stationName
:
'STATION2未开通'
,
alarmObj
:
'漏缆FSU2_R1下行方向'
,
alarmInfo
:
'距离:0米 驻波比:8.72'
,
alarmInfo2
:
'距离:18米 驻波比:1.07'
,
alarmInfo3
:
'距离:42米 驻波比:1.02'
,
firstTime
:
'2022/12/18 11:51:12'
},
{
stationName
:
'STATION2未开通'
,
alarmObj
:
'漏缆FSU2_R1下行方向'
,
alarmInfo
:
'距离:0米 驻波比:8.72'
,
alarmInfo2
:
'距离:18米 驻波比:1.07'
,
alarmInfo3
:
'距离:42米 驻波比:1.02'
,
firstTime
:
'2022/12/18 11:51:12'
},
{
stationName
:
'STATION2未开通'
,
alarmObj
:
'漏缆FSU2_R1下行方向'
,
alarmInfo
:
'距离:0米 驻波比:8.72'
,
alarmInfo2
:
'距离:18米 驻波比:1.07'
,
alarmInfo3
:
'距离:42米 驻波比:1.02'
,
firstTime
:
'2022/12/18 11:51:12'
},
{
stationName
:
'STATION2未开通'
,
alarmObj
:
'漏缆FSU2_R1下行方向'
,
alarmInfo
:
'距离:0米 驻波比:8.72'
,
alarmInfo2
:
'距离:18米 驻波比:1.07'
,
alarmInfo3
:
'距离:42米 驻波比:1.02'
,
firstTime
:
'2022/12/18 11:51:12'
},
{
stationName
:
'STATION2未开通'
,
alarmObj
:
'漏缆FSU2_R1下行方向'
,
alarmInfo
:
'距离:0米 驻波比:8.72'
,
alarmInfo2
:
'距离:18米 驻波比:1.07'
,
alarmInfo3
:
'距离:42米 驻波比:1.02'
,
firstTime
:
'2022/12/18 11:51:12'
},
],
};
},
computed
:
{
...
mapGetters
({}),
},
methods
:
{
...
mapActions
({}),
getTableData
()
{
this
.
tableData
=
this
.
historyStatusList
.
slice
(
(
this
.
currentPage
-
1
)
*
this
.
pageSize
,
this
.
currentPage
*
this
.
pageSize
);
this
.
total
=
this
.
historyStatusList
.
length
;
},
currentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getTableData
();
},
sizeChange
(
val
)
{
console
.
log
(
"改变每页多少条,当前一页多少条数据"
,
val
);
this
.
pageSize
=
val
;
this
.
currentPage
=
1
;
this
.
getTableData
();
},
},
mounted
()
{},
};
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/login/index.vue
View file @
035404b3
...
@@ -49,10 +49,10 @@
...
@@ -49,10 +49,10 @@
<el-button
:loading=
"loading"
type=
"primary"
style=
"width:100%;margin-bottom:30px;"
@
click
.
native
.
prevent=
"handleLogin"
>
登录
</el-button>
<el-button
:loading=
"loading"
type=
"primary"
style=
"width:100%;margin-bottom:30px;"
@
click
.
native
.
prevent=
"handleLogin"
>
登录
</el-button>
<div
class=
"tips"
>
<
!--
<
div
class=
"tips"
>
<span
style=
"margin-right:20px;"
>
username: admin
</span>
<span
style=
"margin-right:20px;"
>
username: admin
</span>
<span>
password:任意6位
</span>
<span>
password:任意6位
</span>
</div>
</div>
-->
</el-form>
</el-form>
</div>
</div>
...
@@ -82,7 +82,7 @@ export default {
...
@@ -82,7 +82,7 @@ export default {
return
{
return
{
loginForm
:
{
loginForm
:
{
username
:
'admin'
,
username
:
'admin'
,
password
:
'1
11111
'
password
:
'1
23456
'
},
},
loginRules
:
{
loginRules
:
{
username
:
[{
required
:
true
,
trigger
:
'blur'
,
validator
:
validateUsername
}],
username
:
[{
required
:
true
,
trigger
:
'blur'
,
validator
:
validateUsername
}],
...
@@ -114,11 +114,19 @@ export default {
...
@@ -114,11 +114,19 @@ export default {
},
},
handleLogin
()
{
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
loading
=
true
this
.
loading
=
true
this
.
$store
.
dispatch
(
'user/login'
,
this
.
loginForm
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'user/login'
,
this
.
loginForm
).
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
'/'
})
if
(
this
.
loginForm
.
password
==
'123456'
)
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
'/'
})
this
.
loading
=
false
this
.
loading
=
false
}
else
{
alert
(
'密码错误'
)
this
.
loading
=
false
return
false
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
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