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
9ae21109
Commit
9ae21109
authored
Jan 06, 2025
by
zrs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'b-master' of
http://gitlab.91isoft.com:90/hikvision/web-project
into b-master
parents
b80ed964
d3e09c86
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1888 additions
and
46 deletions
+1888
-46
RealPipePage.js
src/dataJson/RealPage/RealPipePage.js
+1753
-0
RealPipePage.vue
src/views/RealPage/RealPipePage.vue
+51
-11
BoilerStatusPage.vue
src/views/StatusPage/BoilerStatusPage.vue
+39
-15
PipeStatusPage.vue
src/views/StatusPage/PipeStatusPage.vue
+45
-20
No files found.
src/dataJson/RealPage/RealPipePage.js
0 → 100644
View file @
9ae21109
This diff is collapsed.
Click to expand it.
src/views/RealPage/RealPipePage.vue
View file @
9ae21109
...
...
@@ -280,6 +280,7 @@ import {
ArrowRight
,
Warning
}
from
'@element-plus/icons-vue'
import
{
pipeReal
,
pipeReal2
}
from
'../../dataJson/RealPage/RealPipePage.js'
const
enterpriseId
=
ref
(
null
);
enterpriseId
.
value
=
store
.
getters
.
getEnterpriseId
();
var
gatherTime
=
ref
([]);
...
...
@@ -444,9 +445,7 @@ async function getForms() {
deviceType
=
1
;
}
makeFormsTitle
(
deviceType
);
await
http
.
post
(
'/api/pipe/title'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
deviceType
}).
then
((
result
)
=>
{
result
.
data
.
otherList
.
forEach
(
element
=>
{
pipeReal2
.
title
.
forEach
(
element
=>
{
var
tmp
=
false
;
formLoop
:
for
(
var
i
=
0
;
i
<
cardForms
.
forms
.
length
-
1
;
i
++
)
{
...
...
@@ -482,17 +481,58 @@ async function getForms() {
cardForms
.
forms
.
length
=
cardForms
.
forms
.
length
-
1
;
}
})
// await http.post('/api/pipe/title', { enterpriseId: enterpriseId.value, deviceType: deviceType }).then((result) => {
// console.log( JSON.stringify(result.data.otherList));
// result.data.otherList.forEach(element => {
// var tmp = false;
// formLoop:
// for (var i = 0; i
<
cardForms
.
forms
.
length
-
1
;
i
++
)
{
//
// for (var j = 0; j
<
cardForms
.
forms
[
i
].
title
.
length
;
j
++
)
{
// if (element.baseId === cardForms.forms[i].title[j].baseId) {
// cardForms.forms[i].title[j].prop = element.enName;
// cardForms.forms[i].title[j].color = element.backColor;
// cardForms.forms[i].title[j].label = element.alias;
// cardForms.forms[i].title[j].decimalPoint = element.decimalPoint;
// cardForms.forms[i].title[j].width = element.width;
// tmp = true;
// break formLoop;
// }
// }
// }
// //不行,要再重新处理
// if (tmp === false) {
// //放到其他表里
// var tmpelement = {
// baseId: element.baseId,
// prop: element.enName,
// color: element.backColor,
// label: element.alias,
// decimalPoint: element.decimalPoint,
// width: element.width
// }
// cardForms.forms[cardForms.forms.length - 1].title.push(tmpelement);
// tmp = true;
// }
// })
// if (cardForms.forms[cardForms.forms.length - 1].title.length === 0) {
// cardForms.forms.length = cardForms.forms.length - 1;
// }
//
// })
console
.
log
(
cardForms
);
await
http
.
post
(
'/api/pipe/Real'
,
{
enterpriseId
:
enterpriseId
.
value
,
deviceType
:
deviceType
}).
then
((
result
)
=>
{
//根据返回结果,构建数据表cardForms.tableData和警告表
//处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
findBoilderTableData
(
result
.
data
,
selectList
.
supplyList
[
showDropdown
.
value
].
value
);
// findBoilderTableData(result.data, selectList.dropdownList[showDropdown.value].pipeId);
console
.
log
(
cardForms
)
})
findBoilderTableData
(
pipeReal
,
selectList
.
supplyList
[
showDropdown
.
value
].
value
);
// await http.post('/api/pipe/Real', { enterpriseId: enterpriseId.value, deviceType: deviceType }).then((result) => {
// //根据返回结果,构建数据表cardForms.tableData和警告表
// //处理:将字段与form对比,放取出对应的name和value,存入正确的tableData
// console.log('/api/pipe/Real========',result)
// findBoilderTableData(result.data, selectList.supplyList[showDropdown.value].value);
// // findBoilderTableData(result.data, selectList.dropdownList[showDropdown.value].pipeId);
// console.log(cardForms)
// })
}
function
findBoilderTableData
(
dataSource
,
Id
)
{
...
...
src/views/StatusPage/BoilerStatusPage.vue
View file @
9ae21109
...
...
@@ -362,6 +362,7 @@ import DataForm from '../../components/DataForm.vue';
import
{
useRoute
}
from
'vue-router'
import
http
from
'../../api/http'
import
store
from
"../../store/index"
;
import
{
boilerStatus
}
from
"@/dataJson/RealPage/RealPipePage.js"
;
import
zhCn
from
'element-plus/dist/locale/zh-cn.mjs'
import
{
Search
,
...
...
@@ -629,21 +630,44 @@ function makeFormsData(realData) {
tableInfo
.
tableData
.
length
=
0
;
tableInfo
.
tableData
.
push
.
apply
(
tableInfo
.
tableData
,
realData
);
}
//获取静态数据
async
function
getForms
(
NenterpriseId
,
deviceType
,
supplyIdList
,
boilerIdList
,
sortList
)
{
// enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
loading
.
value
=
true
await
http
.
post
(
'/api/status/boiler'
,
{
enterpriseId
:
NenterpriseId
,
deviceType
:
deviceType
,
supplyIdList
:
supplyIdList
,
boilerIdList
:
boilerIdList
,
sortList
:
sortList
}).
then
((
result
)
=>
{
makeFormsTitle
(
result
.
data
.
title
);
titleData
.
value
=
result
.
data
.
title
;
makeFormsData
(
result
.
data
.
realData
);
// console.log(tableInfo)
})
loading
.
value
=
false
}
try
{
// 设置加载状态为 true
loading
.
value
=
true
;
// 使用已定义的 boilerStatus 更新表单标题和数据
if
(
boilerStatus
&&
boilerStatus
.
title
&&
boilerStatus
.
realData
)
{
makeFormsTitle
(
boilerStatus
.
title
);
titleData
.
value
=
boilerStatus
.
title
;
makeFormsData
(
boilerStatus
.
realData
);
}
else
{
console
.
error
(
'boilerStatus is not properly defined or lacks necessary properties.'
);
makeFormsData
([]);
// 如果 boilerStatus 不完整,则初始化表单数据为空数组
}
}
catch
(
error
)
{
// 捕获并处理任何发生的错误
console
.
error
(
'Error processing forms data:'
,
error
);
makeFormsData
([]);
// 在发生错误时初始化表单数据为空数组
}
finally
{
// 无论请求成功与否,最后都将加载状态设置为 false
loading
.
value
=
false
;
}
}
//获取动态数据
// async function getForms(NenterpriseId, deviceType, supplyIdList, boilerIdList, sortList) {
// // enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
// loading.value = true
// await http.post('/api/status/boiler', { enterpriseId: NenterpriseId, deviceType: deviceType, supplyIdList: supplyIdList, boilerIdList: boilerIdList, sortList: sortList }).then((result) => {
// makeFormsTitle(result.data.title);
// titleData.value = result.data.title;
//
//
//
// makeFormsData(result.data.realData);
// // console.log(tableInfo)
// })
// loading.value = false
// }
function
getImgUrl
(
scope
,
item
)
{
...
...
@@ -784,4 +808,4 @@ function thisIsNumber(val) {
return
/^
[
0-9
]
*$/
.
test
(
val
)
?
val
:
""
;
}
</
script
>
\ No newline at end of file
</
script
>
src/views/StatusPage/PipeStatusPage.vue
View file @
9ae21109
...
...
@@ -365,6 +365,7 @@ import DataForm from '../../components/DataForm.vue';
import
{
useRoute
}
from
'vue-router'
import
http
from
'../../api/http'
import
store
from
"../../store/index"
;
import
{
pipeStatus
}
from
'../../dataJson/RealPage/RealPipePage.js'
import
zhCn
from
'element-plus/dist/locale/zh-cn.mjs'
import
{
Search
,
...
...
@@ -575,24 +576,49 @@ function makeFormsData(realData) {
tableInfo
.
tableData
.
push
.
apply
(
tableInfo
.
tableData
,
realData
);
}
//使用静态数据
async
function
getForms
(
NenterpriseId
,
deviceType
,
supplyIdList
,
sortList
)
{
// enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
loading
.
value
=
true
await
http
.
post
(
'/api/status/pipe'
,
{
enterpriseId
:
NenterpriseId
,
deviceType
:
deviceType
,
supplyIdList
:
supplyIdList
,
name
:
null
,
sortList
:
sortList
}).
then
((
result
)
=>
{
if
(
result
.
status
===
0
)
{
makeFormsTitle
(
result
.
data
.
title
);
titleData
.
value
=
result
.
data
.
title
;
makeFormsData
(
result
.
data
.
realData
);
}
else
{
makeFormsData
([]);
}
// console.log(tableInfo)
})
loading
.
value
=
false
}
try
{
// 设置加载状态为 true
loading
.
value
=
true
;
// 使用已定义的 pipeStatus 更新表单标题和数据
if
(
pipeStatus
&&
pipeStatus
.
title
&&
pipeStatus
.
realData
)
{
makeFormsTitle
(
pipeStatus
.
title
);
titleData
.
value
=
pipeStatus
.
title
;
makeFormsData
(
pipeStatus
.
realData
);
}
else
{
console
.
error
(
'pipeStatus is not properly defined or lacks necessary properties.'
);
makeFormsData
([]);
// 如果 pipeStatus 不完整,则初始化表单数据为空数组
}
}
catch
(
error
)
{
// 捕获并处理任何发生的错误
console
.
error
(
'Error processing forms data:'
,
error
);
makeFormsData
([]);
// 在发生错误时初始化表单数据为空数组
}
finally
{
// 无论请求成功与否,最后都将加载状态设置为 false
loading
.
value
=
false
;
}
}
// 使用动态数据
// async function getForms(NenterpriseId, deviceType, supplyIdList, sortList) {
// // enterpriseId: NenterpriseId,supplyIdList:selectList,transferName:transferName, pageIndex: pageIndex, pageCount: pageCount,sortList:sortList
// loading.value = true
// await http.post('/api/status/pipe', { enterpriseId: NenterpriseId, deviceType: deviceType, supplyIdList: supplyIdList, name: null, sortList: sortList }).then((result) =>{
// if (result.status === 0) {
// makeFormsTitle(result.data.title);
// titleData.value = result.data.title;
// makeFormsData(result.data.realData);
// } else {
// makeFormsData([]);
// }
// // console.log(tableInfo)
// })
// loading.value = false
// }
function
getImgUrl
(
scope
,
item
)
{
...
...
@@ -651,8 +677,7 @@ function checkAge() {
}
})
}
};
}
// function setCellStyle({ row, column, rowIndex, columnIndex }) {
// let css_color = {};
...
...
@@ -755,4 +780,4 @@ function thisIsNumber(val) {
return
/^
[
0-9
]
*$/
.
test
(
val
)
?
val
:
""
;
}
</
script
>
\ No newline at end of file
</
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