Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
faf13563
提交
faf13563
authored
3月 20, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:提交
上级
3f34b724
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
45 行增加
和
59 行删除
+45
-59
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+4
-3
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+30
-45
dict.js
utils/dict.js
+11
-11
没有找到文件。
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
faf13563
...
@@ -61,7 +61,8 @@
...
@@ -61,7 +61,8 @@
@
click=
"
@
click=
"
toShaftInspection(
toShaftInspection(
card.dictLabel,
card.dictLabel,
card.jfType
card.jfType,
card.value
)
)
"
"
>
>
...
@@ -153,9 +154,9 @@ export default {
...
@@ -153,9 +154,9 @@ export default {
});
});
},
},
// 跳转到具体的机房
// 跳转到具体的机房
toShaftInspection
(
location
,
jfType
)
{
toShaftInspection
(
location
,
jfType
,
value
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/inspectionContent/inspectionContentNew?&inspectionCode=
${
this
.
inspectionCode
}
&jfType=
${
jfType
}
&location=
${
location
}
&uid=
${
this
.
uid
}
`
,
url
:
`/pages/inspectionContent/inspectionContentNew?
value=
${
value
}
&inspectionCode=
${
this
.
inspectionCode
}
&jfType=
${
jfType
}
&location=
${
location
}
&uid=
${
this
.
uid
}
`
,
});
});
},
},
back
()
{
back
()
{
...
...
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
faf13563
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
ref=
"dczt"
ref=
"dczt"
:inspectionItem=
"tabs[activeTab].label"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
{}"
:jfType
="jfType"
:jfType="jfType"
>
</dczt>
>
</dczt>
<!-- 机房温湿度 -->
<!-- 机房温湿度 -->
<jfwsd
<jfwsd
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
<
script
>
<
script
>
import
{
import
{
pad_2_1_inspection_items
,
pad_2_1_inspection_items
,
pad_
2_1
_inspection_position
,
pad_
all
_inspection_position
,
pad_2_1_floor
,
pad_2_1_floor
,
tabsInfo1
,
tabsInfo1
,
tabsInfo2
,
tabsInfo2
,
...
@@ -210,7 +210,6 @@ export default {
...
@@ -210,7 +210,6 @@ export default {
// },
// },
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
coverlist
();
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
uid
=
options
.
uid
;
this
.
uid
=
options
.
uid
;
this
.
jfType
=
options
.
jfType
;
this
.
jfType
=
options
.
jfType
;
...
@@ -237,7 +236,7 @@ export default {
...
@@ -237,7 +236,7 @@ export default {
// 判断是否有回显数据
// 判断是否有回显数据
// 基础数据
// 基础数据
this
.
baseInfo
=
{
this
.
baseInfo
=
{
inspectionType
:
"
2
"
,
inspectionType
:
"
1
"
,
inspectionCode
:
this
.
inspectionCode
,
inspectionCode
:
this
.
inspectionCode
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-机房巡检`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-机房巡检`
,
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm"
),
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm"
),
...
@@ -297,25 +296,6 @@ export default {
...
@@ -297,25 +296,6 @@ export default {
}
}
return
false
;
return
false
;
},
},
// 数据结构重组
coverlist
()
{
// 获取井道巡检的三个检查项固定数据再进行处理
const
data
=
pad_2_1_inspection_items
.
rows
.
map
((
item
)
=>
{
return
{
// ...item,
dictLabel
:
item
.
dictLabel
,
dictValue
:
item
.
dictValue
,
conclusion
:
""
,
// 情况摘要
// roomType,
inspectionResult
:
0
,
// 异常结论
itemCode
:
item
.
dictValue
,
// 检查项 如:门禁
measuredData
:
this
.
floor
,
// 逗号分隔字符串
photos
:
[],
// 照片
};
});
this
.
list
=
data
;
},
// 处理提交数据
// 处理提交数据
getParams
(
isSubmit
)
{
getParams
(
isSubmit
)
{
if
(
this
.
uid
)
{
if
(
this
.
uid
)
{
...
@@ -352,34 +332,29 @@ export default {
...
@@ -352,34 +332,29 @@ export default {
return
this
.
detailsInfo
;
return
this
.
detailsInfo
;
}
else
{
}
else
{
let
baseInfo
=
this
.
baseInfo
;
let
baseInfo
=
this
.
baseInfo
;
let
dataObj
=
pad_2_1_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
let
paramsObj
=
this
.
getAllChildFormData
();
let
dataObj
=
pad_all_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
return
{
return
{
name
:
item
.
dictLabel
,
name
:
item
.
dictLabel
,
value
:
item
.
dictValue
,
value
:
item
.
dictValue
,
jfType
:
item
.
jfType
,
isVaild
:
false
,
// 校验通过
isVaild
:
false
,
// 校验通过
// type: 1, // 枚举值
position
:
pad_2_1_floor
.
rows
,
refName
:
`TabContentItem_
${
index
}
`
,
descript
:
"检查内容包括门禁、卫生、设备告警。"
,
};
};
});
});
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
posItem
=
tabList
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
];
let
posItem
=
tabList
[
this
.
value
-
1
];
posItem
.
details
=
paramsObj
;
posItem
.
details
=
this
.
list
;
console
.
log
(
"posItem"
,
posItem
);
posItem
.
isSubmit
=
isSubmit
;
//当前项是否提交
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
if
(
!
this
.
checkInspectionResult
(
this
.
list
))
{
posItem
.
status
=
2
;
//1表示已经巡检过有异常
posItem
.
statusLable
=
"巡检异常"
;
}
else
{
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
posItem
.
statusLable
=
"已巡检"
;
posItem
.
statusLable
=
"已巡检"
;
}
else
{
posItem
.
status
=
2
;
//1表示已经巡检过有异常
posItem
.
statusLable
=
"巡检异常"
;
}
}
// 根据获取到的每个井道的isSubmit来判断是否有暂存状态,只有有一个井道是暂存,那就是编辑中、暂存状态
let
typeSubmit
=
this
.
typeSubmit
(
tabList
);
const
data
=
{
const
data
=
{
...
baseInfo
,
...
baseInfo
,
isSubmit
:
typeSubmit
>
0
?
0
:
1
,
//0暂存(编辑中) 1提交(待同步,已同步)
isSubmit
:
isSubmit
,
//0暂存(编辑中) 1提交(待同步,已同步)
inspectionNumber
:
1
,
inspectionNumber
:
1
,
isException
:
posItem
.
status
==
2
?
1
:
0
,
isException
:
posItem
.
status
==
2
?
1
:
0
,
items
:
[],
items
:
[],
...
@@ -421,15 +396,25 @@ export default {
...
@@ -421,15 +396,25 @@ export default {
);
);
},
0
);
},
0
);
},
},
// 检查是否存在异常
// 判断数据是否有异常
checkInspectionResult
(
arr
)
{
checkInspectionResult
(
obj
)
{
return
!
arr
.
some
((
obj
)
=>
obj
.
inspectionResult
===
1
);
for
(
const
key
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
key
))
{
const
arr
=
obj
[
key
];
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
].
hasOwnProperty
(
"inspectionResult"
)
&&
arr
[
i
].
inspectionResult
===
0
)
{
return
true
;
// 存在异常
}
}
}
}
return
false
;
// 不存在异常
},
},
// 提交
// 提交
submit
(
isSubmit
=
1
)
{
submit
(
isSubmit
=
1
)
{
console
.
log
(
"all"
,
this
.
getAllChildFormData
());
let
paramsObj
=
this
.
getAllChildFormData
();
return
false
;
let
allValid
=
this
.
allValid
(
paramsObj
);
let
allValid
=
this
.
allValid
(
paramsObj
);
// 校验是否通过
// 校验是否通过
if
(
isSubmit
&&
!
allValid
)
{
if
(
isSubmit
&&
!
allValid
)
{
...
...
utils/dict.js
浏览文件 @
faf13563
...
@@ -1439,7 +1439,7 @@ export const pad_all_inspection_position = {
...
@@ -1439,7 +1439,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
12
76
,
dictCode
:
12
94
,
dictSort
:
1
,
dictSort
:
1
,
dictLabel
:
"F座3楼-内环屏蔽机房"
,
dictLabel
:
"F座3楼-内环屏蔽机房"
,
dictValue
:
"1"
,
dictValue
:
"1"
,
...
@@ -1460,7 +1460,7 @@ export const pad_all_inspection_position = {
...
@@ -1460,7 +1460,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
12
77
,
dictCode
:
12
95
,
dictSort
:
2
,
dictSort
:
2
,
dictLabel
:
"F座3楼-外环屏蔽机房"
,
dictLabel
:
"F座3楼-外环屏蔽机房"
,
dictValue
:
"2"
,
dictValue
:
"2"
,
...
@@ -1481,7 +1481,7 @@ export const pad_all_inspection_position = {
...
@@ -1481,7 +1481,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
12
78
,
dictCode
:
12
81
,
dictSort
:
3
,
dictSort
:
3
,
dictLabel
:
"F座2楼-汇聚机房"
,
dictLabel
:
"F座2楼-汇聚机房"
,
dictValue
:
"3"
,
dictValue
:
"3"
,
...
@@ -1502,7 +1502,7 @@ export const pad_all_inspection_position = {
...
@@ -1502,7 +1502,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
127
9
,
dictCode
:
127
6
,
dictSort
:
4
,
dictSort
:
4
,
dictLabel
:
"A座2楼-汇聚机房"
,
dictLabel
:
"A座2楼-汇聚机房"
,
dictValue
:
"4"
,
dictValue
:
"4"
,
...
@@ -1523,7 +1523,7 @@ export const pad_all_inspection_position = {
...
@@ -1523,7 +1523,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
12
80
,
dictCode
:
12
93
,
dictSort
:
5
,
dictSort
:
5
,
dictLabel
:
"A座3楼-屏蔽机房"
,
dictLabel
:
"A座3楼-屏蔽机房"
,
dictValue
:
"5"
,
dictValue
:
"5"
,
...
@@ -1544,7 +1544,7 @@ export const pad_all_inspection_position = {
...
@@ -1544,7 +1544,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
1
281
,
dictCode
:
1
307
,
dictSort
:
6
,
dictSort
:
6
,
dictLabel
:
"A座1楼-UPS间"
,
dictLabel
:
"A座1楼-UPS间"
,
dictValue
:
"6"
,
dictValue
:
"6"
,
...
@@ -1565,7 +1565,7 @@ export const pad_all_inspection_position = {
...
@@ -1565,7 +1565,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
1
325
,
dictCode
:
1
277
,
dictSort
:
7
,
dictSort
:
7
,
dictLabel
:
"B座2楼-汇聚机房"
,
dictLabel
:
"B座2楼-汇聚机房"
,
dictValue
:
"7"
,
dictValue
:
"7"
,
...
@@ -1586,7 +1586,7 @@ export const pad_all_inspection_position = {
...
@@ -1586,7 +1586,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
1
326
,
dictCode
:
1
278
,
dictSort
:
8
,
dictSort
:
8
,
dictLabel
:
"C座2楼-汇聚机房"
,
dictLabel
:
"C座2楼-汇聚机房"
,
dictValue
:
"8"
,
dictValue
:
"8"
,
...
@@ -1607,7 +1607,7 @@ export const pad_all_inspection_position = {
...
@@ -1607,7 +1607,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
1
327
,
dictCode
:
1
279
,
dictSort
:
9
,
dictSort
:
9
,
dictLabel
:
"D座2楼-汇聚机房"
,
dictLabel
:
"D座2楼-汇聚机房"
,
dictValue
:
"9"
,
dictValue
:
"9"
,
...
@@ -1628,7 +1628,7 @@ export const pad_all_inspection_position = {
...
@@ -1628,7 +1628,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
1
328
,
dictCode
:
1
280
,
dictSort
:
10
,
dictSort
:
10
,
dictLabel
:
"E座2楼-汇聚机房"
,
dictLabel
:
"E座2楼-汇聚机房"
,
dictValue
:
"10"
,
dictValue
:
"10"
,
...
@@ -1649,7 +1649,7 @@ export const pad_all_inspection_position = {
...
@@ -1649,7 +1649,7 @@ export const pad_all_inspection_position = {
updateBy
:
null
,
updateBy
:
null
,
updateTime
:
null
,
updateTime
:
null
,
remark
:
null
,
remark
:
null
,
dictCode
:
13
29
,
dictCode
:
13
08
,
dictSort
:
11
,
dictSort
:
11
,
dictLabel
:
"F座2楼-UPS间"
,
dictLabel
:
"F座2楼-UPS间"
,
dictValue
:
"11"
,
dictValue
:
"11"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论