Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
7e671fff
提交
7e671fff
authored
3月 20, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:数据同步
上级
9b24d271
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
107 行增加
和
27 行删除
+107
-27
index.vue
components/inspectionItem/index.vue
+1
-1
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+53
-13
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+32
-9
dialog.vue
pages/inspectionManagement/dialog.vue
+0
-0
index.vue
pages/inspectionManagement/index.vue
+21
-4
没有找到文件。
components/inspectionItem/index.vue
浏览文件 @
7e671fff
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
toPage
()
{
toPage
()
{
const
url
=
const
url
=
this
.
details
.
inspectionType
==
1
?
this
.
details
.
inspectionType
==
1
?
`/pages/inspectionContent/inspectionContent?isDisable=
${
`/pages/inspectionContent/inspectionContent
List
?isDisable=
${
this
.
isDisable
?
1
:
0
this
.
isDisable
?
1
:
0
}
`
:
}
`
:
`/pages/shaftInspection/shaftInspectionList?isDisable=
${
`/pages/shaftInspection/shaftInspectionList?isDisable=
${
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
7e671fff
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</block>
</block>
<block
slot=
"right"
class=
"nav-right"
>
<block
slot=
"right"
class=
"nav-right"
>
<view
class=
"header-buttons"
>
<view
class=
"header-buttons"
>
<
button
class=
"button"
@
click=
"lookLog"
>
查看样表
</button
>
<
!--
<button
class=
"button"
@
click=
"lookLog"
>
查看样表
</button>
--
>
</view>
</view>
</block>
</block>
</uni-nav-bar>
</uni-nav-bar>
...
@@ -34,17 +34,23 @@
...
@@ -34,17 +34,23 @@
</view>
</view>
</view>
</view>
<view
class=
"profile-right"
>
<view
class=
"profile-right"
>
<button
class=
"record-button"
@
click=
"toListingManagement"
>
<
!--
<
button
class=
"record-button"
@
click=
"toListingManagement"
>
巡检人签字
巡检人签字
</button>
</button>
-->
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"box"
>
<view
class=
"box"
>
<view
class=
"bar"
>
<view
class=
"bar"
>
<view
class=
"title"
>
巡检进度
</view>
<view
class=
"title"
>
巡检进度
</view>
<view
class=
"dai"
>
待巡检
<text
class=
"num"
>
11
</text>
个机房
</view>
<view
class=
"dai"
>
<view
class=
"yi"
>
已完成
<text
class=
"num"
>
0
</text>
个机房
</view>
待巡检
<text
class=
"num"
>
{{
11
-
inspectionNumber
}}
</text
>
个机房
</view
>
<view
class=
"yi"
>
已完成
<text
class=
"num"
>
{{
inspectionNumber
}}
</text
>
个机房
</view
>
</view>
</view>
</view>
</view>
<view
class=
"card-box"
>
<view
class=
"card-box"
>
...
@@ -59,11 +65,7 @@
...
@@ -59,11 +65,7 @@
v-for=
"(card, cardIndex) in row"
v-for=
"(card, cardIndex) in row"
:key=
"cardIndex"
:key=
"cardIndex"
@
click=
"
@
click=
"
toShaftInspection(
toShaftInspection(card.name, card.jfType, card.value)
card.dictLabel,
card.jfType,
card.value
)
"
"
>
>
<view
class=
"card"
>
<view
class=
"card"
>
...
@@ -76,7 +78,7 @@
...
@@ -76,7 +78,7 @@
<text
class=
"status"
>
{{
card
.
statusLable
}}
</text>
<text
class=
"status"
>
{{
card
.
statusLable
}}
</text>
</view>
</view>
<view
class=
"second-row"
>
<view
class=
"second-row"
>
<text
class=
"location"
>
{{
card
.
dictLabel
}}
</text>
<text
class=
"location"
>
{{
card
.
name
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"spacer-image right"
v-if=
"cardIndex
<
row
.
length
-
1
"
>
<view
class=
"spacer-image right"
v-if=
"cardIndex
<
row
.
length
-
1
"
>
...
@@ -128,7 +130,14 @@ export default {
...
@@ -128,7 +130,14 @@ export default {
init
()
{
init
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
list
=
pad_all_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
let
list
=
pad_all_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
return
item
;
return
{
name
:
item
.
dictLabel
,
value
:
item
.
dictValue
,
jfType
:
item
.
jfType
,
isVaild
:
false
,
// 校验通过
status
:
item
.
status
,
statusLable
:
item
.
statusLable
};
});
});
const
group1
=
list
.
slice
(
0
,
5
);
const
group1
=
list
.
slice
(
0
,
5
);
const
group2
=
list
.
slice
(
5
,
10
);
const
group2
=
list
.
slice
(
5
,
10
);
...
@@ -153,8 +162,39 @@ export default {
...
@@ -153,8 +162,39 @@ export default {
resolve
();
resolve
();
});
});
},
},
// 回显数据
getDetails
(
uid
)
{
uni
.
showLoading
();
getInspectionDetails
(
uid
)
.
then
((
res
)
=>
{
const
detailsInfo
=
res
;
console
.
log
(
"detailsInfo"
,
detailsInfo
);
this
.
detailsInfo
=
detailsInfo
;
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
this
.
inspectionCode
=
detailsInfo
.
inspectionCode
;
this
.
cardsInfo
=
detailsInfo
.
originData
;
const
group1
=
this
.
cardsInfo
.
slice
(
0
,
5
);
const
group2
=
this
.
cardsInfo
.
slice
(
5
,
10
);
const
group3
=
this
.
cardsInfo
.
slice
(
10
);
this
.
rows
=
[
group1
,
group2
,
group3
];
console
.
log
(
"this.cardsInfo"
,
this
.
cardsInfo
);
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
})
.
catch
((
error
)
=>
{
uni
.
showToast
({
title
:
error
.
msg
,
icon
:
"none"
,
duration
:
1000
,
});
uni
.
hideLoading
();
});
},
// 跳转到具体的机房
// 跳转到具体的机房
toShaftInspection
(
location
,
jfType
,
value
)
{
toShaftInspection
(
location
,
jfType
,
value
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/inspectionContent/inspectionContentNew?value=
${
value
}
&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
}
`
,
});
});
...
...
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
7e671fff
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
mode=
"aspectFit"
mode=
"aspectFit"
></image
></image
></view>
></view>
<view
class=
"kong"
></view>
<!-- 操作区域 -->
<!-- 操作区域 -->
<!-- 物理环境 -->
<!-- 物理环境 -->
<wlhj
<wlhj
...
@@ -194,6 +195,7 @@ export default {
...
@@ -194,6 +195,7 @@ export default {
detailsInfo
:
{},
// 详情
detailsInfo
:
{},
// 详情
baseInfo
:
{},
// 基础信息
baseInfo
:
{},
// 基础信息
list
:
[],
//巡检信息
list
:
[],
//巡检信息
itemDetail
:
{},
};
};
},
},
computed
:
{
computed
:
{
...
@@ -228,7 +230,9 @@ export default {
...
@@ -228,7 +230,9 @@ export default {
}
}
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{
this
.
itemDetail
=
this
.
getAllChildFormData
();
},
methods
:
{
methods
:
{
// 初始化
// 初始化
init
()
{
init
()
{
...
@@ -332,17 +336,21 @@ export default {
...
@@ -332,17 +336,21 @@ export default {
return
this
.
detailsInfo
;
return
this
.
detailsInfo
;
}
else
{
}
else
{
let
baseInfo
=
this
.
baseInfo
;
let
baseInfo
=
this
.
baseInfo
;
let
paramsObj
=
this
.
getAllChildFormData
();
let
paramsObj
=
this
.
getAllChildFormData
();
//获取所有数据
let
dataObj
=
pad_all_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
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
,
jfType
:
item
.
jfType
,
isVaild
:
false
,
// 校验通过
isVaild
:
false
,
// 校验通过
details
:
this
.
itemDetail
,
status
:
item
.
status
,
statusLable
:
item
.
statusLable
};
};
});
});
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
posItem
=
tabList
[
this
.
value
-
1
];
let
posItem
=
tabList
[
this
.
value
];
console
.
log
(
"posItem"
,
posItem
);
posItem
.
details
=
paramsObj
;
posItem
.
details
=
paramsObj
;
console
.
log
(
"posItem"
,
posItem
);
console
.
log
(
"posItem"
,
posItem
);
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
...
@@ -358,7 +366,7 @@ export default {
...
@@ -358,7 +366,7 @@ export default {
inspectionNumber
:
1
,
inspectionNumber
:
1
,
isException
:
posItem
.
status
==
2
?
1
:
0
,
isException
:
posItem
.
status
==
2
?
1
:
0
,
items
:
[],
items
:
[],
synchronization
:
typeSubmit
>
0
?
2
:
0
,
// 是否同步过
synchronization
:
0
,
// 是否同步过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
originData
:
tabList
,
//所有大楼和楼层的数据
originData
:
tabList
,
//所有大楼和楼层的数据
...
@@ -415,7 +423,7 @@ export default {
...
@@ -415,7 +423,7 @@ export default {
},
},
// 提交
// 提交
submit
(
isSubmit
=
1
)
{
submit
(
isSubmit
=
1
)
{
let
allValid
=
this
.
allValid
(
paramsObj
);
let
allValid
=
this
.
allValid
(
this
.
getAllChildFormData
()
);
// 校验是否通过
// 校验是否通过
if
(
isSubmit
&&
!
allValid
)
{
if
(
isSubmit
&&
!
allValid
)
{
uni
.
showToast
({
uni
.
showToast
({
...
@@ -497,9 +505,19 @@ export default {
...
@@ -497,9 +505,19 @@ export default {
console
.
log
(
"所有子组件的数据:"
,
allData
);
console
.
log
(
"所有子组件的数据:"
,
allData
);
return
allData
;
return
allData
;
},
},
// 判断所有tab下的数据是否通过校验
// 判断所有的数据是否通过校验
allValid
(
arr
)
{
allValid
(
parentObj
)
{
return
arr
.
every
((
item
)
=>
item
.
isValid
===
true
);
// 遍历对象的所有属性
for
(
let
key
in
parentObj
)
{
// 确保属性是对象自身的(而非继承的)
if
(
parentObj
.
hasOwnProperty
(
key
))
{
// 检查 isValid 属性是否为 false
if
(
parentObj
[
key
].
isValid
===
false
)
{
return
false
;
// 如果有一个为 false,直接返回 false
}
}
}
return
true
;
// 如果全部为 true,返回 true
},
},
// 检查所有Tab 的必填项是否填写完整
// 检查所有Tab 的必填项是否填写完整
isAllTabValid
()
{
isAllTabValid
()
{
...
@@ -673,11 +691,16 @@ export default {
...
@@ -673,11 +691,16 @@ export default {
}
}
.jfImg {
.jfImg {
width: 100%;
width: 100%;
margin-bottom: 15px;
.weitu {
.weitu {
width: 100%;
width: 100%;
height: 280px;
height: 280px;
}
}
}
}
.kong {
width: 100%;
height: 10px;
}
.tab-item {
.tab-item {
display: flex;
display: flex;
align-items: flex-start;
align-items: flex-start;
...
...
pages/inspectionManagement/dialog.vue
0 → 100644
浏览文件 @
7e671fff
差异被折叠。
点击展开。
pages/inspectionManagement/index.vue
浏览文件 @
7e671fff
...
@@ -54,7 +54,14 @@
...
@@ -54,7 +54,14 @@
</view>
</view>
<!-- 开始巡检 -->
<!-- 开始巡检 -->
<view
class=
"inspection-button"
@
click=
"toPage"
>
同步数据
</view>
<!--
<view
class=
"inspection-button"
@
click=
"toPage"
>
开始巡检
</view>
-->
<view
class=
"inspection-button"
@
click=
"openDialog(true)"
>
同步数据
</view
>
<!-- 打包弹窗 -->
<Dialog
v-show=
"isDialog && list.length"
:list=
"list"
@
close=
"openDialog(false)"
></Dialog>
</view>
</view>
</
template
>
</
template
>
...
@@ -62,6 +69,7 @@
...
@@ -62,6 +69,7 @@
import
SearchCom
from
"@/components/searchCom/index.vue"
;
import
SearchCom
from
"@/components/searchCom/index.vue"
;
import
InspectionItem
from
"@/components/inspectionItem/index.vue"
;
import
InspectionItem
from
"@/components/inspectionItem/index.vue"
;
import
{
getDarft
}
from
"@/request/index.js"
;
import
{
getDarft
}
from
"@/request/index.js"
;
import
Dialog
from
"./dialog.vue"
;
import
{
getAllInspections
}
from
"@/request/index.js"
;
import
{
getAllInspections
}
from
"@/request/index.js"
;
import
Empty
from
"@/components/empty/index.vue"
;
import
Empty
from
"@/components/empty/index.vue"
;
...
@@ -69,6 +77,7 @@ export default {
...
@@ -69,6 +77,7 @@ export default {
components
:
{
components
:
{
SearchCom
,
SearchCom
,
InspectionItem
,
InspectionItem
,
Dialog
,
Empty
,
Empty
,
},
},
data
()
{
data
()
{
...
@@ -116,16 +125,18 @@ export default {
...
@@ -116,16 +125,18 @@ export default {
clickInspection
(
type
)
{
clickInspection
(
type
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/
shaftInspection/shaftInspectionNew
"
,
url
:
"/pages/
inspectionContent/inspectionContentList
"
,
});
});
}
else
{
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/shaftInspection/shaftInspection
New
"
,
url
:
"/pages/shaftInspection/shaftInspection
List
"
,
});
});
}
}
},
},
init
()
{
init
()
{
const
all_data
=
this
.
all_data
||
[];
const
all_data
=
this
.
all_data
||
[];
// this.isPackedDataBtn =
// all_data.filter((item) => item.synchronization == 0).length > 0;
const
{
inspectionTime
=
[]
}
=
this
.
searchForm
;
const
{
inspectionTime
=
[]
}
=
this
.
searchForm
;
const
startTime
=
inspectionTime
[
0
];
const
startTime
=
inspectionTime
[
0
];
...
@@ -174,7 +185,7 @@ export default {
...
@@ -174,7 +185,7 @@ export default {
},
},
coverData
(
arr
=
[])
{
coverData
(
arr
=
[])
{
console
.
log
(
"arr"
,
arr
)
console
.
log
(
"arr"
,
arr
);
const
{
const
{
isException
=
""
,
isException
=
""
,
inspectionType
=
""
,
inspectionType
=
""
,
...
@@ -195,6 +206,12 @@ export default {
...
@@ -195,6 +206,12 @@ export default {
);
);
});
});
},
},
openDialog
(
show
)
{
this
.
isDialog
=
show
;
if
(
!
show
)
{
this
.
init
();
}
},
change
(
e
)
{
change
(
e
)
{
this
.
searchForm
=
e
;
this
.
searchForm
=
e
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论