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
2ac66a11
Commit
2ac66a11
authored
May 06, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 电力实时数据
fix:电力历史数据 检测值条件查询删除
parent
1eeeff71
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
266 additions
and
2 deletions
+266
-2
powerShishiData.js
src/api/tyler/powerShishiData.js
+12
-0
index.vue
src/views/power/powerHis/index.vue
+2
-2
index.vue
src/views/power/powerShishiData/index.vue
+252
-0
No files found.
src/api/tyler/powerShishiData.js
0 → 100644
View file @
2ac66a11
import
request
from
'
@/utils/request
'
// 查询电力系统-历史数据列表
export
function
eleListData
(
query
)
{
return
request
({
url
:
'
/business/ele/list
'
,
method
:
'
get
'
,
params
:
query
})
}
src/views/power/powerHis/index.vue
View file @
2ac66a11
...
...
@@ -33,14 +33,14 @@
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"parameterData"
>
<
!--
<
el-form-item
label=
""
prop=
"parameterData"
>
<el-input
v-model=
"queryParams.parameterData"
placeholder=
"请输入参数值"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</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>
...
...
src/views/power/powerShishiData/index.vue
0 → 100644
View file @
2ac66a11
<
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=
"substationName"
>
<el-select
v-model=
"queryParams.substationName"
placeholder=
"变电站名称"
clearable
@
change=
"substationNameChange"
>
<el-option
v-for=
"item in SubstationNameList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"eleboxName"
v-if=
"queryParams.substationName"
>
<el-select
v-model=
"queryParams.eleboxName"
placeholder=
"电箱名称"
@
change=
"eleboxNameChange"
>
<el-option
v-for=
"item in EleboxNameList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"eleboxParameter"
v-if=
"queryParams.eleboxName"
>
<el-select
v-model=
"queryParams.eleboxParameter"
placeholder=
"电箱参数"
multiple
>
<el-option
v-for=
"item in EleboxParameterList"
:key=
"item.value"
:label=
"item.name"
:value=
"item.value"
/>
</el-select>
</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=
"dataList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"变电站名称"
align=
"center"
prop=
"substationName"
/>
<el-table-column
label=
"电箱名称"
align=
"center"
prop=
"eleboxName"
/>
<el-table-column
label=
"电箱参数"
align=
"center"
prop=
"eleboxParameter"
/>
<el-table-column
label=
"参数值"
align=
"center"
prop=
"parameterData"
/>
<el-table-column
label=
"数值单位"
align=
"center"
prop=
"dataUnits"
/>
<el-table-column
label=
"记录时间"
align=
"center"
prop=
"logTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
logTime
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"queryParams.pageNum"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
eleListData
}
from
"
@/api/tyler/powerShishiData
"
;
import
{
eleGetSubstationName
,
eleGetEleboxName
,
eleGetEleboxParameter
}
from
"
@/api/tyler/common
"
;
export
default
{
name
:
"
Data
"
,
data
()
{
return
{
// 根路径
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 电力系统-历史数据表格数据
dataList
:
[],
// 弹出层标题
title
:
""
,
// 日期范围
dateRange
:
[],
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
substationName
:
null
,
eleboxName
:
null
,
eleboxParameter
:
null
,
parameterData
:
null
,
dataUnits
:
null
,
logTime
:
null
},
// 表单参数
form
:
{},
SubstationNameList
:[],
EleboxNameList
:[],
EleboxParameterList
:[],
};
},
created
()
{
this
.
getList
();
this
.
getCommonSubstationName
();
},
methods
:
{
//获取电站名称
getCommonSubstationName
(){
eleGetSubstationName
().
then
(
res
=>
{
this
.
SubstationNameList
=
res
.
data
})
},
//选择电站名称
substationNameChange
(){
this
.
getCommonEleboxName
();
this
.
queryParams
.
eleboxName
=
null
;
this
.
queryParams
.
eleboxParameter
=
null
;
},
//获取电箱名称
getCommonEleboxName
(){
eleGetEleboxName
({
substationName
:
this
.
queryParams
.
substationName
}).
then
(
res
=>
{
this
.
EleboxNameList
=
res
.
data
})
},
//选择电箱名称
eleboxNameChange
(){
this
.
getCommonEleboxParameter
();
this
.
queryParams
.
eleboxParameter
=
null
;
},
//获取电箱参数名称
getCommonEleboxParameter
(){
eleGetEleboxParameter
({
substationName
:
this
.
queryParams
.
substationName
,
eleboxName
:
this
.
queryParams
.
eleboxName
}).
then
(
res
=>
{
this
.
EleboxParameterList
=
res
.
data
})
},
/** 查询电力系统-历史数据列表 */
getList
()
{
this
.
loading
=
true
;
eleListData
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
this
.
dataList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
substationName
:
null
,
eleboxName
:
null
,
eleboxParameter
:
null
,
parameterData
:
null
,
dataUnits
:
null
,
logTime
:
null
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRange
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加电力系统-历史数据
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getData
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改电力系统-历史数据
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateData
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
addData
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'
是否确认删除电力系统-历史数据编号为"
'
+
ids
+
'
"的数据项?
'
).
then
(
function
()
{
return
delData
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'
business/data/export
'
,
{
...
this
.
queryParams
},
`data_
${
new
Date
().
getTime
()}
.xlsx`
)
}
}
};
</
script
>
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