Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
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
海康威视
web-project
Commits
929f54a6
Commit
929f54a6
authored
Jan 06, 2025
by
Mr.Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复-2
parent
c3482c40
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
12 deletions
+60
-12
report.js
src/api/report.js
+14
-2
mock.js
src/dataJson/productData/mock.js
+12
-0
AlarmStatusPage.vue
src/views/AlarmPage/AlarmStatusPage.vue
+8
-8
AreaInfoPage.vue
src/views/Report/AreaInfoPage.vue
+26
-2
No files found.
src/api/report.js
View file @
929f54a6
import
http
from
'./http'
import
http
from
'./http'
import
{
reportHeatAnalysis
,
reportHeatForecast
,
reportTransferEnergy
,
reportTransferArea
}
from
"../../src/dataJson/productData/mock"
import
{
reportHeatAnalysis
,
reportHeatForecast
,
reportTransferEnergy
,
reportTransferArea
,
reportPrintHeatForecast
}
from
"../../src/dataJson/productData/mock"
//热量分析报表
//热量分析报表
/*export const postHeatAnalysis = params => {
/*export const postHeatAnalysis = params => {
return http.post(`/api/analysis/report/HeatAnalysis`, params).then(res => res).catch(function (error) {
return http.post(`/api/analysis/report/HeatAnalysis`, params).then(res => res).catch(function (error) {
...
@@ -21,19 +21,31 @@ export const postHeatForecast = params => {
...
@@ -21,19 +21,31 @@ export const postHeatForecast = params => {
return
Promise
.
resolve
(
reportHeatForecast
);
return
Promise
.
resolve
(
reportHeatForecast
);
}
}
//明日预测报表(打印查询)
//明日预测报表(打印查询)
export
const
postPrintHeatForecast
=
params
=>
{
/*
export const postPrintHeatForecast = params => {
return http.post(`/api/analysis/report/PrintHeatForecast`, params).then(res => res).catch(function (error) {
return http.post(`/api/analysis/report/PrintHeatForecast`, params).then(res => res).catch(function (error) {
console.log(error);
console.log(error);
})
})
}*/
//静态资源 明日预测报表(打印查询)
export
const
postPrintHeatForecast
=
params
=>
{
return
Promise
.
resolve
(
reportPrintHeatForecast
);
}
}
//明日预测报表(保存打印记录)
//明日预测报表(保存打印记录)
/*export const postSaveHeatForecast = params => {
return http.post(`/api/analysis/report/SaveHeatForecast`, params).then(res => res).catch(function (error) {
console.log(error);
})
}*/
//静态资源 明日预测报表(保存打印记录)
export
const
postSaveHeatForecast
=
params
=>
{
export
const
postSaveHeatForecast
=
params
=>
{
return
http
.
post
(
`/api/analysis/report/SaveHeatForecast`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
return
http
.
post
(
`/api/analysis/report/SaveHeatForecast`
,
params
).
then
(
res
=>
res
).
catch
(
function
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
})
})
}
}
//换热站能耗报表
//换热站能耗报表
/*export const postTransferEnergy = params => {
/*export const postTransferEnergy = params => {
return http.post(`/api/analysis/report/TransferEnergy`, params).then(res => res).catch(function (error) {
return http.post(`/api/analysis/report/TransferEnergy`, params).then(res => res).catch(function (error) {
...
...
src/dataJson/productData/mock.js
View file @
929f54a6
...
@@ -4402,3 +4402,15 @@ export const reportTransferArea={
...
@@ -4402,3 +4402,15 @@ export const reportTransferArea={
}
}
]
]
}
}
export
const
reportPrintHeatForecast
=
{
"success"
:
false
,
"status"
:
4000
,
"message"
:
"数据正在生成中,稍后在访问!"
,
"data"
:
null
}
export
const
alarmGetAlarmMsg
=
{
"success"
:
true
,
"status"
:
0
,
"message"
:
"操作成功"
,
"data"
:
[]
}
src/views/AlarmPage/AlarmStatusPage.vue
View file @
929f54a6
...
@@ -265,7 +265,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
...
@@ -265,7 +265,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import
{
watchEffect
}
from
'vue'
;
import
{
watchEffect
}
from
'vue'
;
import
{
add
}
from
'lodash'
;
import
{
add
}
from
'lodash'
;
import
{
vFloatNumber
}
from
"@/utils/directives.js"
;
import
{
vFloatNumber
}
from
"@/utils/directives.js"
;
import
{
alarmGetTransAlarmStatusData
,
alarmGetBoilerAlarmStatusData
,
alarm
GetPipeAlarmStatusData
,
alarmParaGetAlarmPara
}
from
"../../dataJson/alarmData/mock"
import
{
alarmGetTransAlarmStatusData
,
alarmGetBoilerAlarmStatusData
,
alarm
ParaTranssave
,
alarmParaGetAlarmPara
}
from
"../../dataJson/alarmData/mock"
//分页设置
//分页设置
const
currentPage
=
ref
(
1
)
const
currentPage
=
ref
(
1
)
var
pageSize
=
ref
(
30
)
var
pageSize
=
ref
(
30
)
...
@@ -682,13 +682,13 @@ const selectBeforeParams = (row) => {
...
@@ -682,13 +682,13 @@ const selectBeforeParams = (row) => {
param
.
value
.
baseId
=
row
[
param
.
value
.
baseId
]
param
.
value
.
baseId
=
row
[
param
.
value
.
baseId
]
newRow
.
value
=
param
.
value
.
baseId
newRow
.
value
=
param
.
value
.
baseId
if
(
param
.
value
.
baseId
)
{
if
(
param
.
value
.
baseId
)
{
//const data = http.post("api/alarm/para/GetAlarmParaInfo", { type: newType.value, id: dept.value, baseid: param.value.baseId }, false)
//
const data = http.post("api/alarm/para/GetAlarmParaInfo", { type: newType.value, id: dept.value, baseid: param.value.baseId }, false)
const
data
=
alarmPara
GetAlarmPara
(
newType
.
value
,
dept
.
value
,
param
.
value
.
baseId
)
const
data
=
alarmPara
Transsave
// console.log("查看baseId --- dataaaaa:", data);
// console.log("查看baseId --- dataaaaa:", data);
data
.
then
(
function
()
{
//
data.then(function () {
param
.
value
.
cnName
=
row
.
cnName
//
param.value.cnName = row.cnName
form_control
.
value
=
false
//
form_control.value = false
});
//
});
}
else
{
}
else
{
ElMessage
.
info
(
"该参数暂不需要修改..."
)
ElMessage
.
info
(
"该参数暂不需要修改..."
)
}
}
...
@@ -715,7 +715,7 @@ const selectAfterParams = (row) => {
...
@@ -715,7 +715,7 @@ const selectAfterParams = (row) => {
newRow
.
value
=
param
.
value
.
baseId
newRow
.
value
=
param
.
value
.
baseId
if
(
param
.
value
.
baseId
)
{
if
(
param
.
value
.
baseId
)
{
//const data = http.post("/api/alarm/para/GetAlarmParaInfo", { type: newType.value, id: dept.value, baseid: param.value.baseId }, false)
//const data = http.post("/api/alarm/para/GetAlarmParaInfo", { type: newType.value, id: dept.value, baseid: param.value.baseId }, false)
const
data
=
alarmPara
GetAlarmPara
(
newType
.
value
,
dept
.
value
,
param
.
value
.
baseId
)
const
data
=
alarmPara
Transsave
data
.
then
(
function
(
val
)
{
data
.
then
(
function
(
val
)
{
// console.log("valllll:", val);
// console.log("valllll:", val);
// 数据回显
// 数据回显
...
...
src/views/Report/AreaInfoPage.vue
View file @
929f54a6
...
@@ -443,7 +443,7 @@ function postTransferAreaFun() {
...
@@ -443,7 +443,7 @@ function postTransferAreaFun() {
nature
:
enertyInfo
.
nature
,
nature
:
enertyInfo
.
nature
,
energyType
:
enertyInfo
.
energyType
,
energyType
:
enertyInfo
.
energyType
,
};
};
postTransferArea
(
params
).
then
((
res
)
=>
{
/*
postTransferArea(params).then((res) => {
if (res.success === true) {
if (res.success === true) {
tableData.value = res.data;
tableData.value = res.data;
tableData.value.forEach((element) => {
tableData.value.forEach((element) => {
...
@@ -462,6 +462,30 @@ function postTransferAreaFun() {
...
@@ -462,6 +462,30 @@ function postTransferAreaFun() {
ElMessage.error(res.message);
ElMessage.error(res.message);
}
}
loading.value = false;
loading.value = false;
});*/
postTransferArea
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
===
true
)
{
tableData
.
value
=
res
.
data
;
tableData
.
value
.
forEach
((
element
)
=>
{
// 对每个属性进行类型检查和转换
const
fields
=
[
'realCostCiviled'
,
'realCostSPB'
,
'realBuildBPB'
,
'stopBuildBPB'
,
'realBuildSPB'
,
'stopBuildSPB'
,
'supplyArea'
,
'realBuild'
,
'realCost'
,
'calculateArea'
];
fields
.
forEach
(
field
=>
{
if
(
typeof
element
[
field
]
===
'number'
)
{
element
[
field
]
=
element
[
field
].
toFixed
(
field
===
'supplyArea'
||
field
===
'realBuild'
||
field
===
'realCost'
||
field
===
'calculateArea'
?
4
:
2
);
}
else
if
(
typeof
element
[
field
]
===
'string'
&&
!
isNaN
(
element
[
field
]))
{
element
[
field
]
=
Number
(
element
[
field
]).
toFixed
(
field
===
'supplyArea'
||
field
===
'realBuild'
||
field
===
'realCost'
||
field
===
'calculateArea'
?
4
:
2
);
}
else
{
// 处理非数字或无法转换为数字的情况,例如设置为0或显示警告
console
.
warn
(
`Field
${
field
}
is not a valid number in element:`
,
element
);
element
[
field
]
=
'0.00'
;
// 或其他默认值
}
});
});
}
else
{
ElMessage
.
error
(
res
.
message
);
}
loading
.
value
=
false
;
});
});
}
}
...
@@ -548,4 +572,4 @@ table.botList td {
...
@@ -548,4 +572,4 @@ table.botList td {
height: 79vh;
height: 79vh;
}
}
}
}
</
style
>
</
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