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
c3482c40
Commit
c3482c40
authored
Jan 06, 2025
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
95908b4f
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1992 additions
and
10 deletions
+1992
-10
mock.js
src/dataJson/alarmData/mock.js
+1961
-0
AlarmStatusPage.vue
src/views/AlarmPage/AlarmStatusPage.vue
+21
-6
TransferEnergyPage.vue
src/views/Report/TransferEnergyPage.vue
+10
-4
No files found.
src/dataJson/alarmData/mock.js
View file @
c3482c40
This diff is collapsed.
Click to expand it.
src/views/AlarmPage/AlarmStatusPage.vue
View file @
c3482c40
...
@@ -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
,
alarmGetPipeAlarmStatusData
}
from
"../../dataJson/alarmData/mock"
import
{
alarmGetTransAlarmStatusData
,
alarmGetBoilerAlarmStatusData
,
alarmGetPipeAlarmStatusData
,
alarmParaGetAlarmPara
}
from
"../../dataJson/alarmData/mock"
//分页设置
//分页设置
const
currentPage
=
ref
(
1
)
const
currentPage
=
ref
(
1
)
var
pageSize
=
ref
(
30
)
var
pageSize
=
ref
(
30
)
...
@@ -621,14 +621,28 @@ watchEffect(() => {
...
@@ -621,14 +621,28 @@ watchEffect(() => {
const
getCnNames
=
()
=>
{
const
getCnNames
=
()
=>
{
// console.log('dept-------------------', dept.value);
// console.log('dept-------------------', dept.value);
// console.log("++++++++++++++++++++++++", newType.value);
// console.log("++++++++++++++++++++++++", newType.value);
let
data
=
http
.
post
(
"api/alarm/para/GetAlarmPara"
,
{
type
:
newType
.
value
,
id
:
dept
.
value
},
false
);
//
let data = http.post("api/alarm/para/GetAlarmPara", { type: newType.value, id: dept.value }, false);
data
.
then
(
function
(
val
)
{
/*
data.then(function (val) {
cnNames_before.value = val.data.before
cnNames_before.value = val.data.before
cnNames_after.value = val.data.after
cnNames_after.value = val.data.after
// console.log("cnNames_before===>", cnNames_before);
// console.log("cnNames_before===>", cnNames_before);
// console.log("cnNames_after===>", cnNames_after);
// console.log("cnNames_after===>", cnNames_after);
// console.log("cnNames_before.transParaBaseId:", cnNames_before.transParaBaseId)
// console.log("cnNames_before.transParaBaseId:", cnNames_before.transParaBaseId)
});*/
function
getStaticData
(
newType
,
dept
)
{
// 假设 staticData 是您文件中已有的静态数据
const
staticData
=
alarmParaGetAlarmPara
;
// 返回一个立即解析的 Promise
return
Promise
.
resolve
(
staticData
);
}
getStaticData
(
newType
.
value
,
dept
.
value
).
then
(
function
(
val
)
{
cnNames_before
.
value
=
val
.
data
.
before
;
cnNames_after
.
value
=
val
.
data
.
after
;
});
});
}
}
// 表单编辑控制
// 表单编辑控制
...
@@ -668,7 +682,8 @@ const selectBeforeParams = (row) => {
...
@@ -668,7 +682,8 @@ 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
=
alarmParaGetAlarmPara
(
newType
.
value
,
dept
.
value
,
param
.
value
.
baseId
)
// 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
...
@@ -699,8 +714,8 @@ const selectAfterParams = (row) => {
...
@@ -699,8 +714,8 @@ const selectAfterParams = (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)
cons
ole
.
log
(
"查看baseId --- dataaaaa:"
,
data
);
cons
t
data
=
alarmParaGetAlarmPara
(
newType
.
value
,
dept
.
value
,
param
.
value
.
baseId
)
data
.
then
(
function
(
val
)
{
data
.
then
(
function
(
val
)
{
// console.log("valllll:", val);
// console.log("valllll:", val);
// 数据回显
// 数据回显
...
...
src/views/Report/TransferEnergyPage.vue
View file @
c3482c40
...
@@ -367,10 +367,16 @@ function postTransferEnergyFun() {
...
@@ -367,10 +367,16 @@ function postTransferEnergyFun() {
postTransferEnergy
(
enertyInfo
).
then
((
res
)
=>
{
postTransferEnergy
(
enertyInfo
).
then
((
res
)
=>
{
if
(
res
.
success
===
true
)
{
if
(
res
.
success
===
true
)
{
res
.
data
.
forEach
((
item
,
index
)
=>
{
res
.
data
.
forEach
((
item
,
index
)
=>
{
item
.
area
=
item
.
area
.
toFixed
(
4
);
// 尝试将 item.area 转换为数字
let
area
=
Number
(
item
.
area
);
if
(
!
isNaN
(
area
))
{
item
.
area
=
area
.
toFixed
(
4
);
if
(
item
.
transferName
!=
"总计"
)
{
if
(
item
.
transferName
!=
"总计"
)
{
tableData
.
value
.
push
(
item
);
tableData
.
value
.
push
(
item
);
}
}
}
else
{
console
.
error
(
'item.area is not a valid number:'
,
item
.
area
);
}
});
});
}
else
{
}
else
{
ElMessage
.
error
(
res
.
message
);
ElMessage
.
error
(
res
.
message
);
...
...
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