Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
fdc4b2ad
提交
fdc4b2ad
authored
3月 24, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:提交
上级
554a10da
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
34 行增加
和
10 行删除
+34
-10
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+34
-10
没有找到文件。
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
fdc4b2ad
...
...
@@ -267,7 +267,7 @@ export default {
getInspectionDetails
(
uid
)
.
then
((
res
)
=>
{
const
detailsInfo
=
res
;
console
.
log
(
"getDetails"
,
res
);
console
.
log
(
"getDetails"
,
detailsInfo
.
originData
[
this
.
value
-
1
]
);
this
.
list
=
detailsInfo
.
originData
[
this
.
value
-
1
].
details
;
console
.
log
(
"list"
,
this
.
list
);
// this.inspectionResult = list[0].inspectionResult;
...
...
@@ -300,7 +300,7 @@ export default {
if
(
this
.
uid
)
{
let
posItem
=
this
.
detailsInfo
.
originData
[
this
.
value
-
1
];
let
paramsObj
=
this
.
getAllChildFormData
();
//获取所有数据
console
.
log
(
"获取数据"
,
paramsObj
)
console
.
log
(
"获取数据"
,
paramsObj
);
posItem
.
details
=
paramsObj
;
posItem
.
isSubmit
=
isSubmit
;
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
...
...
@@ -316,13 +316,12 @@ export default {
);
// 获取已经巡检过的数量
this
.
detailsInfo
.
inspectionNumber
=
inspectedItems
.
length
;
this
.
detailsInfo
.
inspectionNumber
=
inspectedItems
.
length
;
// let { notZeroCount, equalTwoCount } = this.count(
// this.detailsInfo.originData
// );
// this.detailsInfo.status = notZeroCount; //巡检总数
// this.detailsInfo.isException = equalTwoCount; //异常数量
console
.
log
(
"this.detailsInfo"
,
this
.
detailsInfo
);
this
.
detailsInfo
.
submitTime
=
moment
().
format
(
"yyyy-MM-DD"
);
// 记录提交时间
this
.
detailsInfo
.
submitMonth
=
moment
().
format
(
"yyyy-MM"
);
// 记录提交月份
return
this
.
detailsInfo
;
...
...
@@ -335,14 +334,14 @@ export default {
value
:
item
.
dictValue
,
jfType
:
item
.
jfType
,
isVaild
:
false
,
// 校验通过
details
:
this
.
itemDetail
,
details
:
{}
,
status
:
item
.
status
,
refName
:
`TabContentItem_
${
index
}
`
,
statusLable
:
item
.
statusLable
,
};
});
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
)
);
let
posItem
=
tabList
[
this
.
value
-
1
];
let
tabList
=
this
.
deepClone
(
dataObj
);
let
posItem
=
tabList
[
this
.
value
-
1
];
posItem
.
details
=
paramsObj
;
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
...
...
@@ -366,6 +365,28 @@ export default {
return
data
;
}
},
deepClone
(
target
)
{
if
(
typeof
target
!==
"object"
||
target
===
null
)
{
return
target
;
}
let
clone
;
if
(
Array
.
isArray
(
target
))
{
clone
=
[];
for
(
let
i
=
0
;
i
<
target
.
length
;
i
++
)
{
clone
[
i
]
=
this
.
deepClone
(
target
[
i
]);
}
}
else
{
clone
=
{};
for
(
const
key
in
target
)
{
if
(
target
.
hasOwnProperty
(
key
))
{
clone
[
key
]
=
this
.
deepClone
(
target
[
key
]);
}
}
}
return
clone
;
},
count
(
originData
)
{
return
originData
.
reduce
(
(
acc
,
curr
)
=>
{
...
...
@@ -424,7 +445,7 @@ export default {
return
false
;
}
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
console
.
log
(
"提交时获取一次"
,
params
)
console
.
log
(
"提交时获取一次"
,
params
);
const
all_data
=
this
.
$store
.
state
.
all_data
;
//获取全部数据
let
logContent
=
""
;
console
.
log
(
"all_data"
,
all_data
);
...
...
@@ -484,6 +505,7 @@ export default {
// 遍历 ref 名称数组
this
.
tabs
.
forEach
((
item
)
=>
{
console
.
log
(
"item.value"
,
item
.
value
);
let
refName
=
item
.
value
;
// 通过 this.$refs[refName] 获取子组件实例
const
childComponent
=
this
.
$refs
[
refName
];
...
...
@@ -492,8 +514,10 @@ export default {
allData
[
refName
]
=
childComponent
.
getFromData
();
}
});
console
.
log
(
"所有子组件的数据:"
,
allData
);
// console.log("wlhj",this.$refs["wlhj"].getFromData())
// console.log("afxt",this.$refs["afxt"].getFromData())
// console.log("dlxt",this.$refs["dlxt"].getFromData())
// console.log("所有子组件的数据:", allData);
return
allData
;
},
// 判断所有的数据是否通过校验
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论