Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yindong-tongbai-automation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lichunliang
yindong-tongbai-automation
Commits
15a7bda6
Commit
15a7bda6
authored
Apr 03, 2025
by
forevertyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:sth
parent
a7ab2d78
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1235 additions
and
0 deletions
+1235
-0
fan.js
src/api/tyler/fan.js
+10
-0
fanDev.js
src/api/tyler/fanDev.js
+53
-0
sys.js
src/api/tyler/sys.js
+26
-0
index.vue
src/views/drainage/drainageDev/index.vue
+2
-0
index.vue
src/views/fanSys/fanAlarm/index.vue
+5
-0
index.vue
src/views/fanSys/fanHis/index.vue
+161
-0
index.vue
src/views/fanSys/fanReal/index.vue
+5
-0
index.vue
src/views/fanSys/fandev/index.vue
+358
-0
index.vue
src/views/hoistSys/hoistHis/index.vue
+5
-0
index.vue
src/views/system/alarmMsgSet/index.vue
+187
-0
index.vue
src/views/system/autoCtrlPs/index.vue
+181
-0
index.vue
src/views/system/waterSysSet/index.vue
+242
-0
No files found.
src/api/tyler/fan.js
0 → 100644
View file @
15a7bda6
import
request
from
'
@/utils/request
'
// 查询风机设备基本信息列表
export
function
listFanHis
(
query
)
{
return
request
({
url
:
'
/business/fan/history/list
'
,
method
:
'
get
'
,
params
:
query
})
}
src/api/tyler/fanDev.js
0 → 100644
View file @
15a7bda6
import
request
from
'
@/utils/request
'
// 查询风机设备基本信息列表
export
function
listFanInfo
(
query
)
{
return
request
({
url
:
'
/business/fan/info/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询风机设备基本信息所有列表
export
function
listAllFanInfo
(
query
)
{
return
request
({
url
:
'
/business/fan/info/listAll
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询风机设备基本信息详细
export
function
getFanInfo
(
id
)
{
return
request
({
url
:
'
/business/fan/info/getInfo/
'
+
id
,
method
:
'
get
'
})
}
// 新增风机设备基本信息
export
function
addFanInfo
(
data
)
{
return
request
({
url
:
'
/business/fan/info/add
'
,
method
:
'
post
'
,
data
:
data
})
}
// 修改风机设备基本信息
export
function
updateFanInfo
(
data
)
{
return
request
({
url
:
'
/business/fan/info/edit
'
,
method
:
'
post
'
,
data
:
data
})
}
// 删除风机设备基本信息
export
function
delFanInfo
(
id
)
{
return
request
({
url
:
'
/business/fan/info/remove/
'
+
id
,
method
:
'
get
'
})
}
src/api/tyler/sys.js
0 → 100644
View file @
15a7bda6
import
request
from
'
@/utils/request
'
// 自动化控制密码修改
export
function
autoPwdEdit
(
query
)
{
return
request
({
url
:
'
/business/password/edit
'
,
method
:
'
post
'
,
data
:
query
})
}
//排水系统设置峰谷返回值
export
function
peakGetDra
(
query
)
{
return
request
({
url
:
'
/business/peak/getDra
'
,
method
:
'
get
'
,
data
:
query
})
}
export
function
peakEditDra
(
query
)
{
return
request
({
url
:
'
/business/peak/add
'
,
method
:
'
post
'
,
data
:
query
})
}
\ No newline at end of file
src/views/drainage/drainageDev/index.vue
View file @
15a7bda6
...
...
@@ -84,12 +84,14 @@
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-if=
"!scope.row.status"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-if=
"!scope.row.status"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
src/views/fanSys/fanAlarm/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div>
暂无
</div>
</
template
>
\ No newline at end of file
src/views/fanSys/fanHis/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"风机名称"
prop=
"deviceName"
>
<el-input
v-model=
"queryParams.deviceName"
placeholder=
"请输入风机名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
""
>
<el-date-picker
v-model=
"dateRange"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"infoList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"风机名称"
align=
"center"
prop=
"deviceName"
width=
"120"
/>
<el-table-column
label=
"风机编号"
align=
"center"
prop=
"deviceId"
width=
"120"
/>
<el-table-column
label=
"风机安装位置"
align=
"center"
prop=
"installationLocation"
width=
"120"
/>
<el-table-column
label=
"电源电压预警值(V)"
align=
"center"
prop=
"powerSupplyVoltage"
width=
"140"
/>
<el-table-column
label=
"电机电流预警值(A)"
align=
"center"
prop=
"motorCurrent"
width=
"140"
/>
<el-table-column
label=
"运行频率预警值(HZ)"
align=
"center"
prop=
"operatingFrequency"
width=
"140"
/>
<el-table-column
label=
"设定频率预警值(HZ)"
align=
"center"
prop=
"setFrequency"
width=
"140"
/>
<el-table-column
label=
"风压预警值(Kpa)"
align=
"center"
prop=
"windPressure"
width=
"120"
/>
<el-table-column
label=
"风速预警值(m/s)"
align=
"center"
prop=
"windSpeed"
width=
"120"
/>
<el-table-column
label=
"风量预警值(m³/s)"
align=
"center"
prop=
"airVolume"
width=
"140"
/>
<el-table-column
label=
"前轴温预警值(℃)"
align=
"center"
prop=
"frontAxisTemperature"
width=
"120"
/>
<el-table-column
label=
"后轴温预警值(℃)"
align=
"center"
prop=
"rearAxisTemperature"
width=
"120"
/>
<el-table-column
label=
"电机温度预警值(℃)"
align=
"center"
prop=
"motorTemperature"
width=
"140"
/>
<el-table-column
label=
"前振动预警值(mm/s)"
align=
"center"
prop=
"frontVibration"
width=
"150"
/>
<el-table-column
label=
"后振动预警值(mm/s)"
align=
"center"
prop=
"rearVibration"
width=
"150"
/>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</
template
>
<
script
>
import
{
listFanHis
,
}
from
"
@/api/tyler/fan
"
;
export
default
{
name
:
"
Info
"
,
data
()
{
return
{
// 根路径
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 风机基本信息表格数据
infoList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceName
:
null
,
deviceId
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
id
:
[
{
required
:
true
,
message
:
"
id不能为空
"
,
trigger
:
"
blur
"
}
],
deviceName
:
[
{
required
:
true
,
message
:
"
风机名称不能为空
"
,
trigger
:
"
blur
"
}
],
deviceId
:
[
{
required
:
true
,
message
:
"
风机编号不能为空
"
,
trigger
:
"
blur
"
}
],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询风机基本信息列表 */
getList
()
{
this
.
loading
=
true
;
listFanHis
(
this
.
queryParams
).
then
(
response
=>
{
this
.
infoList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
deviceName
:
null
,
deviceId
:
null
,
installationLocation
:
null
,
powerSupplyVoltage
:
null
,
motorCurrent
:
null
,
operatingFrequency
:
null
,
setFrequency
:
null
,
windPressure
:
null
,
windSpeed
:
null
,
airVolume
:
null
,
frontAxisTemperature
:
null
,
rearAxisTemperature
:
null
,
motorTemperature
:
null
,
frontVibration
:
null
,
rearVibration
:
null
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
}
};
</
script
>
src/views/fanSys/fanReal/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div>
暂无
</div>
</
template
>
\ No newline at end of file
src/views/fanSys/fandev/index.vue
0 → 100644
View file @
15a7bda6
This diff is collapsed.
Click to expand it.
src/views/hoistSys/hoistHis/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div>
暂无
</div>
</
template
>
\ No newline at end of file
src/views/system/alarmMsgSet/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div
class=
"app-container"
>
<el-card
class=
"dynamic-form"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
label-position=
"top"
>
<div
class=
"form-header"
>
<div
class=
"header-item"
>
姓名
</div>
<div
class=
"header-item"
>
手机号
</div>
<div
class=
"header-item"
>
操作
</div>
</div>
<div
class=
"form-items"
>
<div
v-for=
"(item, index) in form.items"
:key=
"index"
class=
"form-row"
>
<div
class=
"form-cell"
>
<el-form-item
:prop=
"'items.' + index + '.name'"
:rules=
"rules.name"
>
<el-input
v-model=
"item.name"
placeholder=
"请输入姓名"
></el-input>
</el-form-item>
</div>
<div
class=
"form-cell"
>
<el-form-item
:prop=
"'items.' + index + '.phone'"
:rules=
"rules.phone"
>
<el-input
v-model=
"item.phone"
placeholder=
"请输入手机号"
></el-input>
</el-form-item>
</div>
<div
class=
"form-cell action"
>
<el-button
type=
"text"
icon=
"el-icon-delete"
@
click=
"removeItem(index)"
:disabled=
"form.items.length === 1"
>
删除本条
</el-button>
</div>
</div>
</div>
<div
class=
"form-footer"
>
<el-button
@
click=
"addItem"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确认
</el-button>
<el-button
@
click=
"resetForm"
>
取消
</el-button>
</div>
</el-form>
</el-card>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
DynamicForm
'
,
data
()
{
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'
手机号必填
'
));
}
if
(
!
/^1
[
3-9
]\d{9}
$/
.
test
(
value
))
{
return
callback
(
new
Error
(
'
手机号格式不正确
'
));
}
// 检查手机号是否重复
const
count
=
this
.
form
.
items
.
filter
(
item
=>
item
.
phone
===
value
).
length
;
if
(
count
>
1
)
{
return
callback
(
new
Error
(
'
手机号不能重复
'
));
}
callback
();
};
return
{
form
:
{
items
:
[
{
name
:
''
,
phone
:
''
}
]
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'
请输入姓名
'
,
trigger
:
'
blur
'
}
],
phone
:
[
{
required
:
true
,
validator
:
validatePhone
,
trigger
:
'
blur
'
}
]
}
};
},
methods
:
{
addItem
()
{
this
.
form
.
items
.
push
({
name
:
''
,
phone
:
''
});
},
removeItem
(
index
)
{
this
.
form
.
items
.
splice
(
index
,
1
);
},
submitForm
()
{
this
.
$refs
.
formRef
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 提交表单数据
console
.
log
(
'
提交的数据:
'
,
this
.
form
.
items
);
this
.
$message
.
success
(
'
提交成功
'
);
}
else
{
this
.
$message
.
error
(
'
请修正表单中的错误
'
);
return
false
;
}
});
},
resetForm
()
{
this
.
$refs
.
formRef
.
resetFields
();
}
}
};
</
script
>
<
style
scoped
>
.dynamic-form
{
width
:
100%
;
max-width
:
800px
;
margin
:
0
auto
;
}
.form-header
{
display
:
flex
;
background-color
:
#f5f7fa
;
padding
:
10px
0
;
border-radius
:
4px
4px
0
0
;
}
.header-item
{
width
:
50%
;
text-align
:
center
;
font-weight
:
bold
;
}
.form-items
{
border-top
:
none
;
border-radius
:
0
0
4px
4px
;
}
.form-row
{
display
:
flex
;
border-bottom
:
1px
solid
#ebeef5
;
}
.form-cell
{
flex
:
1
;
padding
:
10px
;
}
.action
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
padding
:
0
10px
;
margin-top
:
-20px
;
}
.form-footer
{
margin-top
:
20px
;
text-align
:
right
;
}
:deep
(
.el-form-item
)
{
margin-bottom
:
0
;
}
:deep
(
.el-input
)
{
width
:
100%
;
}
:deep
(
.el-button--text
)
{
color
:
#f56c6c
;
}
</
style
>
\ No newline at end of file
src/views/system/autoCtrlPs/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div
class=
"password-reset-container"
>
<el-card
class=
"password-reset-card"
>
<div
class=
"title-with-dot"
>
<div
class=
"blue-dot"
></div>
<h3
class=
"title"
>
重设密码
</h3>
</div>
<el-divider></el-divider>
<el-form
ref=
"passwordForm"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
class=
"password-form"
>
<el-form-item
label=
"旧密码"
prop=
"oldPassword"
>
<el-input
v-model=
"form.oldPassword"
type=
"password"
placeholder=
"请输入旧密码"
></el-input>
</el-form-item>
<el-form-item
label=
"新密码"
prop=
"newPassword"
>
<el-input
v-model=
"form.newPassword"
type=
"password"
placeholder=
"请输入新密码"
></el-input>
</el-form-item>
<el-form-item
label=
"确认新密码"
prop=
"confirmPassword"
>
<el-input
v-model=
"form.confirmPassword"
type=
"password"
placeholder=
"请再次输入新密码"
></el-input>
</el-form-item>
<div
class=
"form-actions"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
修改密码
</el-button>
</div>
</el-form>
</el-card>
</div>
</
template
>
<
script
>
import
{
autoPwdEdit
}
from
"
@/api/tyler/sys
"
;
export
default
{
data
()
{
const
validatePassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<
6
)
{
callback
(
new
Error
(
"
密码长度必须大于等于6个字符
"
));
}
else
{
if
(
this
.
form
.
confirmPassword
!==
""
)
{
this
.
$refs
.
passwordForm
.
validateField
(
"
confirmPassword
"
);
}
callback
();
}
};
const
validateConfirmPassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
""
)
{
callback
(
new
Error
(
"
请再次输入密码
"
));
}
else
if
(
value
!==
this
.
form
.
newPassword
)
{
callback
(
new
Error
(
"
两次输入密码不一致!
"
));
}
else
{
callback
();
}
};
return
{
form
:
{
oldPassword
:
""
,
newPassword
:
""
,
confirmPassword
:
""
,
},
rules
:
{
oldPassword
:
[
{
required
:
true
,
message
:
"
请输入旧密码
"
,
trigger
:
"
blur
"
},
],
newPassword
:
[
{
required
:
true
,
message
:
"
请输入新密码
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePassword
,
trigger
:
"
blur
"
},
],
confirmPassword
:
[
{
required
:
true
,
message
:
"
请再次输入密码
"
,
trigger
:
"
blur
"
},
{
validator
:
validateConfirmPassword
,
trigger
:
"
blur
"
},
],
},
};
},
methods
:
{
submitForm
()
{
this
.
$refs
.
passwordForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
autoPwdEdit
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
密码修改成功
"
);
this
.
form
=
{
oldPassword
:
""
,
newPassword
:
""
,
confirmPassword
:
""
,
}
});
}
else
{
console
.
log
(
"
验证失败
"
);
return
false
;
}
});
},
},
};
</
script
>
<
style
scoped
>
.password-reset-container
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
calc
(
100vh
-
84px
);
background-color
:
#f5f5f5
;
}
.password-reset-card
{
width
:
500px
;
}
.title-with-dot
{
display
:
flex
;
align-items
:
center
;
/* margin-bottom: 10px; */
}
.blue-dot
{
width
:
8px
;
height
:
8px
;
background-color
:
#409eff
;
border-radius
:
50%
;
margin-right
:
10px
;
}
.title
{
font-size
:
18px
;
color
:
#409eff
;
margin
:
0
;
font-weight
:
bold
;
}
.password-form
{
margin-top
:
20px
;
}
.form-actions
{
text-align
:
center
;
margin-top
:
20px
;
}
.el-form-item
{
margin-bottom
:
20px
;
}
.el-form-item__label
{
color
:
#606266
;
font-size
:
14px
;
}
.el-input
{
width
:
100%
;
}
.el-button
{
width
:
180px
;
height
:
40px
;
background-color
:
#409eff
;
border
:
none
;
color
:
white
;
font-size
:
14px
;
}
</
style
>
\ No newline at end of file
src/views/system/waterSysSet/index.vue
0 → 100644
View file @
15a7bda6
<
template
>
<div
class=
"automation-control"
>
<!-- 自动化控制排水系统开关 -->
<div
class=
"control-header"
>
<span>
自动化控制排水系统
</span>
<el-switch
v-model=
"formData.status"
active-text=
"已开启"
inactive-text=
"已关闭"
@
change=
"handleStatusChange"
></el-switch>
</div>
<!-- 峰谷值时间段设置 -->
<div
class=
"section"
>
<h3>
设置峰谷值时间段
</h3>
<el-time-picker
is-range
v-model=
"timeRange"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
format=
"HH:mm:ss"
value-format=
"HH:mm:ss"
@
change=
"handleTimeRangeChange"
></el-time-picker>
</div>
<!-- 液体高度设置 -->
<div
class=
"section"
>
<h3>
设置液体高度
<el-link
type=
"primary"
:underline=
"false"
>
设置说明
</el-link></h3>
<!-- 每个水仓的设置 -->
<div
v-for=
"(sump, index) in formData.draPeakSumpVos"
:key=
"sump.sumpId"
>
<div
class=
"sump-item"
>
<div
class=
"sump-header"
>
<span>
{{
sump
.
sumpName
}}
液位高度(m):
</span>
</div>
<div
class=
"threshold-inputs"
>
<div
class=
"threshold-item"
>
<span>
A点值
</span>
<el-input
v-model=
"sump.heghtThresholdA"
placeholder=
"请输入A点值"
size=
"small"
></el-input>
</div>
<div
class=
"threshold-item"
>
<span>
B点值
</span>
<el-input
v-model=
"sump.heghtThresholdB"
placeholder=
"请输入B点值"
size=
"small"
></el-input>
</div>
<div
class=
"threshold-item"
>
<span>
C点值
</span>
<el-input
v-model=
"sump.heghtThresholdC"
placeholder=
"请输入C点值"
size=
"small"
></el-input>
</div>
<div
class=
"threshold-item"
>
<span>
D点值
</span>
<el-input
v-model=
"sump.heghtThresholdD"
placeholder=
"请输入D点值"
size=
"small"
></el-input>
</div>
</div>
<div
class=
"pump-selection"
>
<span>
对应控制水泵:
</span>
<el-checkbox-group
v-model=
"sump.selectedPumps"
>
<el-checkbox
v-for=
"pump in sump.draPeakPumpVos"
:key=
"pump.pumpId"
:label=
"pump.pumpName"
size=
"small"
>
{{
pump
.
pumpName
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
<el-divider
v-if=
"index
<
formData
.
draPeakSumpVos
.
length
-
1
"
></el-divider>
</div>
</div>
<!-- 按钮区域 -->
<div
class=
"button-group"
>
<el-button
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSave"
>
保存设置
</el-button>
</div>
</div>
</
template
>
<
script
>
import
{
peakGetDra
,
peakEditDra
}
from
"
@/api/tyler/sys
"
;
export
default
{
name
:
'
AutomationControl
'
,
data
()
{
return
{
formData
:
{
status
:
true
,
// 默认开启
peakBeginTime
:
'
12:00:00
'
,
peakEndTime
:
'
14:00:00
'
,
draPeakSumpVos
:
[
{
sumpId
:
'
2
'
,
sumpName
:
'
二中水仓
'
,
heghtThresholdA
:
'
10
'
,
heghtThresholdB
:
'
20
'
,
heghtThresholdC
:
'
40
'
,
heghtThresholdD
:
'
80
'
,
draPeakPumpVos
:
[
{
pumpId
:
'
8
'
,
pumpName
:
'
水泵5
'
},
{
pumpId
:
'
9
'
,
pumpName
:
'
水泵6
'
},
{
pumpId
:
'
10
'
,
pumpName
:
'
水泵7
'
}
],
selectedPumps
:
[
'
水泵5
'
]
// 默认选中第一个
},
{
sumpId
:
'
2
'
,
sumpName
:
'
二中水仓
'
,
heghtThresholdA
:
'
10
'
,
heghtThresholdB
:
'
20
'
,
heghtThresholdC
:
'
40
'
,
heghtThresholdD
:
'
80
'
,
draPeakPumpVos
:
[
{
pumpId
:
'
3
'
,
pumpName
:
'
水泵3
'
},
],
selectedPumps
:
[
'
水泵3
'
]
// 默认选中第一个
},
]
},
timeRange
:
[]
};
},
created
()
{
// 初始化时间范围
// this.getList()
},
methods
:
{
getList
(){
peakGetDra
().
then
(
res
=>
{
console
.
log
(
res
,
'
res
'
)
this
.
formData
=
res
.
data
this
.
timeRange
=
[
this
.
formData
.
peakBeginTime
,
this
.
formData
.
peakEndTime
];
})
},
handleStatusChange
(
value
)
{
console
.
log
(
'
自动化控制状态已切换为:
'
,
value
?
'
开启
'
:
'
关闭
'
);
console
.
log
(
value
)
this
.
formData
.
status
=
value
;
},
handleTimeRangeChange
(
value
)
{
if
(
value
&&
value
.
length
===
2
)
{
this
.
formData
.
peakBeginTime
=
value
[
0
];
this
.
formData
.
peakEndTime
=
value
[
1
];
console
.
log
(
'
峰谷值时间段已设置为:
'
,
this
.
formData
.
peakBeginTime
,
'
至
'
,
this
.
formData
.
peakEndTime
);
}
},
handleCancel
()
{
console
.
log
(
'
取消设置
'
);
// 这里可以添加重置表单的逻辑
},
handleSave
()
{
peakEditDra
(
this
.
formData
).
then
(
res
=>
{
this
.
$message
.
success
(
'
设置已保存
'
);
this
.
getList
()
})
console
.
log
(
'
保存设置:
'
,
this
.
formData
);
// 这里可以添加保存设置的逻辑
}
}
};
</
script
>
<
style
scoped
>
.automation-control
{
padding
:
20px
;
background-color
:
#fff
;
border-radius
:
4px
;
}
.control-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
start
;
gap
:
20px
;
padding
:
15px
0
;
border-bottom
:
1px
solid
#eee
;
}
.section
{
margin-bottom
:
20px
;
}
.section
h3
{
font-size
:
16px
;
margin-bottom
:
15px
;
color
:
#333
;
}
.sump-item
{
margin-bottom
:
20px
;
}
.sump-header
{
font-weight
:
bold
;
margin-bottom
:
10px
;
}
.threshold-inputs
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
15px
;
margin-bottom
:
15px
;
}
.threshold-item
{
display
:
flex
;
align-items
:
center
;
}
.threshold-item
span
{
width
:
60px
;
}
.pump-selection
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
}
.button-group
{
display
:
flex
;
justify-content
:
flex-end
;
gap
:
15px
;
margin-top
:
20px
;
}
::v-deep
.el-date-editor
.el-range-separator
{
width
:
30px
;
}
</
style
>
\ 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