Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1
Overview
Overview
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
岑松青
1
Commits
357c657c
Commit
357c657c
authored
Jul 24, 2020
by
岑松青
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsada
parent
2875b3a8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
264 additions
and
180 deletions
+264
-180
AlarmRecord.vue
src/views/AlarmRecord/AlarmRecord.vue
+0
-0
MonitorState.vue
src/views/MonitorState/MonitorState.vue
+0
-0
detail.vue
src/views/detail/detail.vue
+133
-82
home.vue
src/views/home/home.vue
+0
-0
login.vue
src/views/login.vue
+131
-98
No files found.
src/views/AlarmRecord/AlarmRecord.vue
View file @
357c657c
This diff is collapsed.
Click to expand it.
src/views/MonitorState/MonitorState.vue
View file @
357c657c
This diff is collapsed.
Click to expand it.
src/views/detail/detail.vue
View file @
357c657c
<
template
>
<div
v-loading=
"loading"
>
<el-row>
<el-button
type=
"primary"
size=
"mini"
>
返回
</el-button>
</el-row>
<el-container>
<el-aside
style=
"background:white; ;margin-right:15px;border-radius: 4px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)"
>
<div
style=
"margin-top:10px;margin-left:10px"
>
<el-row
style=
"text-align:center;margin-bottom:5% ;font-weight:bold"
>
BOT0016
</el-row>
<el-row
>
<el-col
:span=
"10"
><div
><img
src=
"../../assets/device.png"
alt=
""
class=
"device"
></div></el-col>
<el-col
:span=
"7"
:offset=
"3"
><div>
设备型号:
</div><div>
12
</div><div
style=
"margin-top:10px"
>
采集器编号:
</div><div>
12
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"10"
><div>
客户地址:
</div></el-col>
<el-col
:span=
"10"
:offset=
"2"
><div>
杭州市江干区
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"10"
><div>
联系人:
</div></el-col>
<el-col
:span=
"10"
:offset=
"2"
><div>
张三
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"10"
><div>
联系方式:
</div></el-col>
<el-col
:span=
"10"
:offset=
"2"
><div>
1283948933
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"10"
><div>
设备位置:
</div></el-col>
<el-col
:span=
"10"
:offset=
"2"
><div>
北楼一区
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"10"
><div>
监测区域:
</div></el-col>
<el-col
:span=
"10"
:offset=
"2"
><div>
北楼一区
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"10"
><div>
开机率:
</div></el-col>
<el-col
:span=
"10"
:offset=
"2"
><div><el-progress
:text-inside=
"true"
:stroke-width=
"24"
:percentage=
"67"
status=
"success"
></el-progress></div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:50px "
justify=
"center"
><el-col
:span=
"3"
:offset=
"7"
><el-button
type=
"primary"
size=
"mini"
>
运行参数查看
</el-button></el-col></el-row>
<el-row
style=
"background:white;margin-top:10px "
justify=
"center"
><el-col
:span=
"3"
:offset=
"7"
><el-button
type=
"primary"
size=
"mini"
>
运行时间统计
</el-button></el-col></el-row>
<div
v-loading=
"loading"
>
<div><el-button
type=
"primary"
size=
"mini"
>
返回
</el-button></div>
<div
class=
"flex start "
style=
"margin-top: 10px"
>
<div
class=
"aside"
>
<div>
<div
style=
"text-align:center;margin-top:5%;margin-bottom:5% ;font-weight:bold"
>
{{
dd
.
number
}}
</div>
<div
class=
"bg"
>
<div
class=
"text"
>
<div>
设备型号:
</div>
<div>
12
</div>
<div
style=
"margin-top:10px"
>
采集器编号:
</div>
<div>
12
</div>
</div>
</div>
</div>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
size=
"mini"
>
<el-form-item
label=
"客户地址:"
>
<div>
杭州市江干区
</div>
</el-form-item>
<el-form-item
label=
"联系人:"
>
<div>
张三
</div>
</el-form-item>
<el-form-item
label=
"联系方式:"
>
<div>
1283948933
</div>
</el-form-item>
<el-form-item
label=
"设备位置:"
>
<div>
北楼一区
</div>
</el-form-item>
<el-form-item
label=
"监测区域:"
>
<div>
北楼一区
</div>
</el-form-item>
<el-form-item
label=
"开机率:"
>
<div
style=
"width:80%;margin-top:8px"
><el-progress
:text-inside=
"true"
:stroke-width=
"20"
:percentage=
"67"
status=
"success"
></el-progress></div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"监测区域:"
>
<div>
北楼一区
</div>
</el-form-item>
</el-form-item>
<el-form-item
>
<div><el-button
type=
"primary"
size=
"mini"
>
运行参数查看
</el-button
></div>
</el-form-item>
<el-form-item
>
<div><el-button
type=
"primary"
size=
"mini"
>
运行时间统计
</el-button
></div>
</el-form-item>
</el-form>
</div>
</el-aside>
<el-container>
<el-header
style=
"line-height:60px; height:60px; background:white;border-radius: 4px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)"
>
<el-row
>
运行时间:
</el-row>
</el-header>
<el-main
style=
"background:white;margin-top:10px ;border-radius: 4px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)"
>
<el-row
style=
"background:white;margin-top:10px "
justify=
"center"
><el-col
:span=
"3"
:offset=
"8"
><el-button
type=
"primary"
size=
"mini"
>
实时参数列表
</el-button></el-col><el-col
:span=
"3"
><el-button
size=
"mini"
>
参数曲线监控
</el-button></el-col></el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"5"
><div>
电流:
</div></el-col>
<el-col
:span=
"2"
:offset=
"1"
><div
class=
"it"
>
8.342342
</div></el-col>
<el-col
:span=
"5"
><div>
温度:
</div
></el-col>
<el-col
:span=
"2"
:offset=
"1"
><div
class=
"it"
>
8.342342
</div></el-col>
<el-col
:span=
"5"
><div>
断路器状态:
</div></el-col>
<el-col
:span=
"2"
:offset=
"1"
><div
class=
"it"
>
8.342342
</div></el-col>
</el-row>
<el-row
style=
"background:white;margin-top:5% "
>
<el-col
:span=
"5"
><div>
A相电压:
</div></el-col>
<el-col
:span=
"2"
:offset=
"1"
><div
class=
"it"
>
8.342342
</div></el-col>
<el-col
:span=
"5"
><div>
B相电压:
</div
></el-col>
<el-col
:span=
"2"
:offset=
"1"
><div
class=
"it"
>
8.342342
</div></el-col>
<el-col
:span=
"5"
><div>
AB相线电流:
</div></el-col>
<el-col
:span=
"2"
:offset=
"1"
><div
class=
"it"
>
8.342342
</div></el-col>
</el-row>
<el-row
justify=
"center"
style=
"margin-top:300px"
><el-col
:span=
"3"
:offset=
"8"
><el-button
type=
"primary"
size=
"mini"
>
上一页
</el-button></el-col><el-col
:span=
"3"
><el-button
size=
"mini"
>
下一页
</el-button></el-col></el-row>
</el-main>
</el-container>
</el-container>
</div>
<div
class=
"flex column "
style=
"width:72%"
>
<div
class=
"header1"
>
运行时间:
</div>
<div
class=
"main1"
>
<div
class=
"butt"
>
<el-form
:inline=
"true"
>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
style=
"margin-right:20px"
>
实时参数列表
</el-button>
<el-button
size=
"mini"
>
参数曲线监控
</el-button>
</el-form-item>
</el-form>
</div>
<el-form
:inline=
"true"
>
<el-form-item
label=
"电流:"
style=
"margin-right:200px;width:150px"
>
<div
class=
"it"
>
8.342342
</div>
</el-form-item>
<el-form-item
label=
"温度:"
style=
"margin-right:200px;width:150px"
>
<div
class=
"it"
>
8.342342
</div>
</el-form-item>
<el-form-item
label=
"断路器状态:"
>
<div
class=
"it"
>
开
</div>
</el-form-item>
</el-form>
<el-form
:inline=
"true"
>
<el-form-item
label=
"A相电压:"
style=
"margin-right:200px;width:150px"
>
<div
class=
"it"
>
8.342342
</div>
</el-form-item>
<el-form-item
label=
"B相电压:"
style=
"margin-right:200px;width:150px"
>
<div
class=
"it"
>
8.342342
</div>
</el-form-item>
<el-form-item
label=
"AB相线电流:"
>
<div
class=
"it"
>
8.342342
</div>
</el-form-item>
</el-form>
<div
class=
"butt1"
>
<el-button
type=
"primary"
size=
"mini"
style=
"margin-right:20px"
>
上一页
</el-button>
<el-button
size=
"mini"
>
下一页
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
ref
,
onMounted
}
from
'@vue/composition-api'
;
import
{
ref
,
onMounted
}
from
"@vue/composition-api"
;
import
{
router
}
from
'../../main'
;
export
default
{
setup
()
{
const
loading
=
ref
<
boolean
>
(
false
);
return
{
loading
,
const
dd
=
ref
<
any
>
()
onMounted
(
function
()
{
dd
.
value
=
router
.
currentRoute
.
params
.
obj
// console.log(aa)
})
return
{
loading
,
dd
};
}
,
}
};
</
script
>
<
style
lang=
"scss"
>
.it
{
color
:
blue
;
font-weight
:
bold
;
text-size-adjust
:
medium
;
}
.device
{
height
:
60px
;
overflow
:
hidden
;
cursor
:
pointer
;
}
.aside
{
border-radius
:
4px
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
.12
),
0
0
6px
rgba
(
0
,
0
,
0
,
.04
);
width
:
25%
;
background
:
white
;
margin-right
:
10px
;
}
.main1
{
padding-left
:
10px
;
background
:
white
;
margin-top
:
10px
;
border-radius
:
4px
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
.12
),
0
0
6px
rgba
(
0
,
0
,
0
,
.04
)}
.header1
{
line-height
:
60px
;
padding-left
:
10px
;
height
:
60px
;
background
:
white
;
border-radius
:
4px
;
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
.12
),
0
0
6px
rgba
(
0
,
0
,
0
,
.04
)}
.it
{
color
:
blue
;
font-weight
:
bold
;
text-align
:
center
;
text-size-adjust
:
medium
;
}
.butt
{
margin-left
:
35%
}
.butt1
{
margin-left
:
38%
;
margin-top
:
31%
;
margin-bottom
:
2%
;}
.bg
{
background-image
:
url(../../assets/device.png)
;
background-repeat
:
no-repeat
;
}
.text
{
margin-left
:
60%
}
.device
{
height
:
60px
;
overflow
:
hidden
;
cursor
:
pointer
;
}
</
style
>
src/views/home/home.vue
View file @
357c657c
This diff is collapsed.
Click to expand it.
src/views/login.vue
View file @
357c657c
...
...
@@ -2,29 +2,48 @@
<div
class=
"flex column center login"
v-loading=
"loading"
>
<div
class=
"login-body vivify popIn flex center column"
>
<div
class=
"login-head flex column center align-center"
>
<div
class=
"title1"
>
{{
loginTitle1
}}
</div>
<div
v-if=
"loginTitle2"
class=
"title2"
>
{{
loginTitle2
}}
</div>
<div
class=
"title1"
>
{{
loginTitle1
}}
</div>
<div
v-if=
"loginTitle2"
class=
"title2"
>
{{
loginTitle2
}}
</div>
</div>
<div
class=
"inner flex center align-center around"
>
<div
class=
"left"
>
<img
src=
"../assets/u90.png"
>
<img
src=
"../assets/u90.png"
/
>
</div>
<div
class=
"flex column right"
>
<div
class=
"flex center"
>
<img
:src=
"loginLogo"
/>
<img
:src=
"loginLogo"
/>
</div>
<el-form
label-position=
"left"
label-width=
"70px"
class=
"flex column around"
ref=
"formRef"
:model=
"form"
:rules=
"rule"
>
label-position=
"left"
label-width=
"70px"
class=
"flex column around"
ref=
"formRef"
:model=
"form"
:rules=
"rule"
>
<el-form-item
prop=
"username"
label=
"账户:"
>
<el-input
v-model=
"form.username"
autofocus
autocomplete=
"off"
placeholder=
"用户名"
@
keyup
.
enter
.
native=
"login($refs.formRef)"
/>
<el-input
v-model=
"form.username"
autofocus
autocomplete=
"off"
placeholder=
"用户名"
@
keyup
.
enter
.
native=
"login($refs.formRef)"
/>
</el-form-item>
<el-form-item
prop=
"pwd"
label=
"密码:"
>
<el-input
type=
"password"
autocomplete=
"off"
v-model=
"form.pwd"
placeholder=
"密 码"
@
keyup
.
enter
.
native=
"login($refs.formRef)"
/>
<el-input
type=
"password"
autocomplete=
"off"
v-model=
"form.pwd"
placeholder=
"密 码"
@
keyup
.
enter
.
native=
"login($refs.formRef)"
/>
</el-form-item>
<kit-err-channel
id=
"login"
style=
"margin-bottom: 5px"
/>
<el-form-item>
<el-button
type=
"primary"
@
click=
"login($refs.formRef)"
>
登录
</el-button>
<el-button
type=
"primary"
@
click=
"login($refs.formRef)"
>
登录
</el-button
>
</el-form-item>
</el-form>
</div>
...
...
@@ -34,58 +53,67 @@
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
ref
,
Ref
,
onMounted
}
from
'@vue/composition-api'
;
import
{
ElForm
}
from
'element-ui/types/form'
;
import
{
useLoading
}
from
'web-toolkit/src/service'
;
import
{
postService
,
storeUserInfo
,
updateStoreUserInfo
,
submitErrChanel
,
pushMsgErr
}
from
'web-toolkit/src/case-main'
;
import
{
loginTitle1
,
loginTitle2
,
loginLogo
,
schema
}
from
'@/main'
;
import
{
router
}
from
'@/main'
;
import
{
Route
}
from
'vue-router'
;
import
{
assert
}
from
'web-toolkit/src/utils/index'
;
import
{
Login
}
from
'@/dao/userDao'
;
import
{
ref
,
Ref
,
onMounted
}
from
"@vue/composition-api"
;
import
{
ElForm
}
from
"element-ui/types/form"
;
import
{
useLoading
}
from
"web-toolkit/src/service"
;
import
{
postService
,
storeUserInfo
,
updateStoreUserInfo
,
submitErrChanel
,
pushMsgErr
}
from
"web-toolkit/src/case-main"
;
import
{
loginTitle1
,
loginTitle2
,
loginLogo
,
schema
}
from
"@/main"
;
import
{
router
}
from
"@/main"
;
import
{
Route
}
from
"vue-router"
;
import
{
assert
}
from
"web-toolkit/src/utils/index"
;
import
{
Login
}
from
"@/dao/userDao"
;
export
default
{
setup
()
{
const
loading
=
ref
(
false
);
const
form
=
ref
({
username
:
''
,
pwd
:
''
});
const
formRef
:
Ref
<
ElForm
|
null
>
=
ref
(
null
);
const
form
=
ref
({
username
:
""
,
pwd
:
""
});
const
formRef
:
Ref
<
ElForm
|
null
>
=
ref
(
null
);
const
rule
=
{
username
:
{
required
:
true
,
message
:
'请填写用户名'
,
trigger
:
'none'
,
message
:
"请填写用户名"
,
trigger
:
"none"
},
pwd
:
[{
required
:
true
,
message
:
'请填写密码'
,
trigger
:
'none'
,
},
{
type
:
'string'
,
min
:
6
,
message
:
'密码长度不能小于6位'
,
trigger
:
'none'
,
}],
pwd
:
[
{
required
:
true
,
message
:
"请填写密码"
,
trigger
:
"none"
},
{
type
:
"string"
,
min
:
6
,
message
:
"密码长度不能小于6位"
,
trigger
:
"none"
}
]
};
async
function
login
()
{
const
valid
=
await
(
formRef
.
value
as
ElForm
).
validate
();
assert
(
valid
);
submitErrChanel
(
'login'
);
submitErrChanel
(
"login"
);
const
data
=
await
Login
({
...
form
.
value
,
schema
,
schema
});
updateStoreUserInfo
(
data
as
any
);
// 设置登录后回到登录前页面
// @ts-ignore
const
redirect
:
Route
=
{
name
:
'index'
,
query
:
{}
,
name
:
"index"
,
query
:
{}
};
if
(
storeUserInfo
.
redirect
&&
storeUserInfo
.
redirect
.
name
&&
storeUserInfo
.
redirect
.
name
!==
'notFound'
&&
storeUserInfo
.
redirect
.
name
!==
'login'
storeUserInfo
.
redirect
.
name
!==
"notFound"
&&
storeUserInfo
.
redirect
.
name
!==
"login"
)
{
redirect
.
name
=
storeUserInfo
.
redirect
.
name
;
redirect
.
query
=
storeUserInfo
.
redirect
.
query
;
...
...
@@ -95,75 +123,80 @@ export default {
router
.
push
(
redirect
as
any
);
}
return
{
formRef
,
loginTitle1
,
loginTitle2
,
loginLogo
,
loading
,
form
,
rule
,
login
:
useLoading
(
loading
,
login
),
formRef
,
loginTitle1
,
loginTitle2
,
loginLogo
,
loading
,
form
,
rule
,
login
:
useLoading
(
loading
,
login
)
};
}
,
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.login
{
background
:
url("../assets/bg.jpg")
no-repeat
;
background-size
:
100%
100%
;
width
:
100vw
;
height
:
100vh
;
min-height
:
600px
;
.login
{
background
:
url("../assets/bg.jpg")
no-repeat
;
background-size
:
100%
100%
;
width
:
100vw
;
height
:
100vh
;
min-height
:
600px
;
}
.login-body
{
width
:
90vw
;
height
:
90vh
;
min-height
:
400px
;
.login-head
{
color
:
white
;
.title1
{
font-size
:
2.5rem
;
font-weight
:
700
;
margin-bottom
:
10px
;
}
.title2
{
font-size
:
1.8rem
;
margin-bottom
:
2rem
;
}
}
.login-body
{
width
:
90vw
;
height
:
90vh
;
min-height
:
400px
;
.login-head{
color
:
white
;
.title1{
font-size
:
2.5rem
;
font-weight
:
700
;
margin-bottom
:
10px
;
}
.title2
{
font-size
:
1.8rem
;
margin-bottom
:
2rem
;
.inner
{
width
:
100%
;
max-height
:
600px
;
max-width
:
1000px
;
background
:
white
;
padding
:
2rem
2rem
;
box-shadow
:
3px
3px
10px
rgba
(
$
color
:
#000
,
$
alpha
:
0.5
);
border-radius
:
10px
;
font-size
:
1rem
;
.left
{
img
{
height
:
40vh
;
}
}
.inner
{
width
:
100%
;
max-height
:
600px
;
max-width
:
1000px
;
background
:
white
;
padding
:
2rem
2rem
;
box-shadow
:
3px
3px
10px
rgba
(
$
color
:
#000
,
$
alpha
:
.5
);
border-radius
:
10px
;
font-size
:
1rem
;
.left{
img{
height
:
40vh
;
}
.right
{
width
:
300px
;
img
{
height
:
3.8rem
;
width
:
auto
;
margin-bottom
:
3rem
;
}
.right
{
width
:
300px
;
img{
height
:
3.8rem
;
width
:
auto
;
margin-bottom
:
3rem
;
}
.el-input
{
width
:
230px
;
}
.el-button
{
width
:
230px
;
font-weight
:
600
;
margin
:
0
auto
;
}
.el-input
{
width
:
230px
;
}
.el-button
{
width
:
230px
;
font-weight
:
600
;
margin
:
0
auto
;
}
}
}
.login-support
{
/*margin-top: 3vh;*/
color
:
#fff
;
width
:
100%
;
font-weight
:
700
;
font-size
:
1.1rem
;
text-align
:
center
;
}
}
.login-support
{
/*margin-top: 3vh;*/
color
:
#fff
;
width
:
100%
;
font-weight
:
700
;
font-size
:
1.1rem
;
text-align
:
center
;
}
</
style
>
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