Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
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
葛齐林
energyai_vue
Commits
a2b72499
Commit
a2b72499
authored
Apr 13, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时开关
parent
7b488d67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
page.vue
src/pages/eq/hall/page.vue
+25
-11
No files found.
src/pages/eq/hall/page.vue
View file @
a2b72499
...
...
@@ -9,20 +9,20 @@
<el-form-item
label=
"节能模式:"
>
<div
class=
"switch-warp"
style=
"transform: translateY(7px)"
>
<div
:class=
"[
formData.s
aving == 1 ? 'on' : '']"
:class=
"[
isS
aving == 1 ? 'on' : '']"
@
click=
"handleSwitch(1)"
>
人工
</div>
<div
:class=
"[
formData.s
aving == 2 ? 'on' : '']"
:class=
"[
isS
aving == 2 ? 'on' : '']"
@
click=
"handleSwitch(2)"
>
节能
</div>
</div>
</el-form-item>
<span
class=
"btn-group"
v-if=
"
formData.s
aving == 1"
>
<span
class=
"btn-group"
v-if=
"
isS
aving == 1"
>
<el-form-item
label=
""
>
<el-button
type=
"primary"
...
...
@@ -41,7 +41,7 @@
</el-form-item>
</span>
</el-col>
<el-col
:span=
"24"
v-if=
"
formData.s
aving == 1"
>
<el-col
:span=
"24"
v-if=
"
isS
aving == 1"
>
<el-form-item
label=
"温度设定:"
>
<el-input
v-model=
"formData.temp"
clearable=
""
></el-input>
</el-form-item>
...
...
@@ -74,9 +74,20 @@
</el-time-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
@
click=
"setSendTime"
>
设置定时
</el-button
>
<div
class=
"switch-warp"
style=
"transform: translateY(5px)"
>
<div
:class=
"[isOpen == 1 ? 'on' : '']"
@
click=
"setSendTime(1)"
>
关
</div>
<div
:class=
"[isOpen == 2 ? 'on' : '']"
@
click=
"setSendTime(2)"
>
开
</div>
</div>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -185,8 +196,9 @@ export default {
activeTab
:
'b45827c068254695864ee3c1d42573cb'
,
//tab默认选中
tableData
:
[],
tableColums
:
tableColumsOne
,
isSaving
:
1
,
//节能
isOpen
:
1
,
//定时开关
formData
:
{
saving
:
1
},
tabList
:
[
{
...
...
@@ -267,7 +279,7 @@ export default {
statusHandle
()
{},
// 人工节能
handleSwitch
(
state
)
{
this
.
formData
.
s
aving
=
state
this
.
isS
aving
=
state
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/equipment/changeType'
),
method
:
'post'
,
...
...
@@ -281,7 +293,9 @@ export default {
})
},
// 设置定时任务
setSendTime
()
{
setSendTime
(
type
)
{
this
.
isOpen
=
type
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/equipment/timedTask'
),
method
:
'post'
,
...
...
@@ -289,7 +303,7 @@ export default {
id
:
''
,
startTime
:
this
.
formData
.
startTime
,
endTime
:
this
.
formData
.
endTime
,
status
:
1
status
:
type
})
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
...
...
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