Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
de073eec
提交
de073eec
authored
3月 21, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:提交
上级
1d1d0032
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
108 行增加
和
64 行删除
+108
-64
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+72
-15
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+35
-49
shaftInspectionList.vue
pages/shaftInspection/shaftInspectionList.vue
+1
-0
没有找到文件。
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
de073eec
...
...
@@ -13,7 +13,7 @@
</block>
<block
slot=
"right"
class=
"nav-right"
>
<view
class=
"header-buttons"
>
<
!--
<button
class=
"button"
@
click=
"lookLog"
>
查看样表
</button>
--
>
<
button
class=
"button"
@
click=
"lookLog"
>
查看样表
</button
>
</view>
</block>
</uni-nav-bar>
...
...
@@ -33,10 +33,10 @@
>
</view>
</view>
<view
class=
"profile-right"
>
<
!--
<button
class=
"record-button"
@
click=
"toListingManagement
"
>
<view
v-if=
"isSubmit"
class=
"profile-right"
>
<
button
v-if=
"!isSign"
class=
"record-button"
@
click=
"toSign
"
>
巡检人签字
</button>
-->
</button>
</view>
</view>
</view>
...
...
@@ -64,9 +64,7 @@
class=
"card-wrapper"
v-for=
"(card, cardIndex) in row"
:key=
"cardIndex"
@
click=
"
toShaftInspection(card.name, card.jfType, card.value)
"
@
click=
"toShaftInspection(card.name, card.jfType, card.value)"
>
<view
class=
"card"
>
<view
class=
"card-content"
>
...
...
@@ -108,7 +106,11 @@ export default {
inspectionNumber
:
0
,
// 已巡检的井道数量
detailsInfo
:
{},
// 详情
isDisable
:
false
,
// 禁用
isSign
:
false
,
//签名状态
isSubmit
:
0
,
//提交状态
uid
:
""
,
options
:
{},
//存储数据
backValue
:
""
,
};
},
computed
:
{
...
...
@@ -117,11 +119,15 @@ export default {
},
},
onLoad
(
options
)
{
this
.
options
=
options
;
this
.
backValue
=
this
.
options
.
backValue
||
""
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
console
.
log
(
"options.uid"
,
options
.
uid
);
if
(
options
.
uid
)
{
this
.
uid
=
options
.
uid
;
this
.
getDetails
(
options
.
uid
);
console
.
log
(
"options.uid"
,
this
.
options
.
uid
);
this
.
uid
=
this
.
options
.
uid
||
""
;
},
onShow
()
{
if
(
this
.
uid
)
{
this
.
getDetails
(
this
.
uid
);
}
else
{
this
.
init
();
}
...
...
@@ -135,8 +141,8 @@ export default {
value
:
item
.
dictValue
,
jfType
:
item
.
jfType
,
isVaild
:
false
,
// 校验通过
status
:
item
.
status
,
statusLable
:
item
.
statusLable
status
:
item
.
status
,
statusLable
:
item
.
statusLable
,
};
});
const
group1
=
list
.
slice
(
0
,
5
);
...
...
@@ -174,6 +180,8 @@ export default {
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
this
.
inspectionCode
=
detailsInfo
.
inspectionCode
;
this
.
cardsInfo
=
detailsInfo
.
originData
;
this
.
isSubmit
=
this
.
detailsInfo
.
isSubmit
;
this
.
isSign
=
this
.
detailsInfo
.
isSign
;
const
group1
=
this
.
cardsInfo
.
slice
(
0
,
5
);
const
group2
=
this
.
cardsInfo
.
slice
(
5
,
10
);
...
...
@@ -196,11 +204,60 @@ export default {
// 跳转到具体的机房
toShaftInspection
(
location
,
jfType
,
value
)
{
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
}
&backValue=
${
this
.
backValue
}
`
,
});
},
toSign
()
{
this
.
$refs
.
signDialog
.
open
();
},
// 处理弹窗确认
handlePopupConfirm
(
summary
)
{
this
.
detailsInfo
.
isSign
=
this
.
isSign
=
true
;
// 回显到文字显示区域
this
.
detailsInfo
.
signImg
=
summary
;
// 回显到文字显示区域
this
.
submit
(
"sign"
,
this
.
detailsInfo
.
signImg
);
},
// 提交
submit
(
type
=
"sign"
,
value
=
""
)
{
const
all_data
=
this
.
$store
.
state
.
all_data
;
//获取全部数据
let
params
=
this
.
detailsInfo
;
params
.
signImg
=
value
;
console
.
log
(
"all_data"
,
all_data
);
console
.
log
(
"all_data"
,
all_data
);
const
index
=
all_data
.
findIndex
((
element
)
=>
element
.
uid
==
this
.
uid
);
all_data
[
index
]
=
params
;
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
"数据同步"
,
"同步"
);
// 更新巡检list
console
.
log
(
"all_data存储"
,
all_data
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
const
inspectList
=
all_data
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
logContent
.
inspectionType
=
params
.
inspectionType
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
uni
.
showToast
({
title
:
type
==
"sign"
?
"签字成功"
:
"同步成功"
,
icon
:
"success"
,
});
},
back
()
{
uni
.
navigateBack
();
if
(
this
.
backValue
===
"home"
)
{
uni
.
navigateTo
({
url
:
"/pages/home/home"
,
});
}
else
{
uni
.
navigateTo
({
url
:
`/pages/inspectionManagement/index`
,
});
}
},
},
};
...
...
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
de073eec
...
...
@@ -65,21 +65,21 @@
v-show=
"checkValueInArray(tabs, 'afxt', activeTab)"
ref=
"afxt"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.afxt ||
{}"
>
</afxt>
<!-- 设备告警 -->
<sbgj
v-show=
"checkValueInArray(tabs, 'sbgj', activeTab)"
ref=
"sbgj"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.sbgj ||
{}"
>
</sbgj>
<!-- 电池状态 -->
<dczt
v-show=
"checkValueInArray(tabs, 'dczt', activeTab)"
ref=
"dczt"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.dczt ||
{}"
:jfType="jfType"
>
</dczt>
<!-- 机房温湿度 -->
...
...
@@ -87,35 +87,35 @@
v-show=
"checkValueInArray(tabs, 'jfwsd', activeTab)"
ref=
"jfwsd"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.jfwsd ||
{}"
>
</jfwsd>
<!-- 电力系统 -->
<dlxt
v-show=
"checkValueInArray(tabs, 'dlxt', activeTab)"
ref=
"dlxt"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.dlxt ||
{}"
>
</dlxt>
<!-- 消防系统 -->
<xfxt
v-show=
"checkValueInArray(tabs, 'xfxt', activeTab)"
ref=
"xfxt"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.xfxt ||
{}"
>
</xfxt>
<!-- 线路情况 -->
<xlqk
v-show=
"checkValueInArray(tabs, 'xlqk', activeTab)"
ref=
"xlqk"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.xlqk ||
{}"
>
</xlqk>
<!-- 其它 -->
<qt
v-show=
"checkValueInArray(tabs, 'qt', activeTab)"
ref=
"qt"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"
{}"
:defaultData=
"
list.qt ||
{}"
>
</qt>
</view>
</view>
...
...
@@ -196,6 +196,7 @@ export default {
baseInfo
:
{},
// 基础信息
list
:
[],
//巡检信息
itemDetail
:
{},
backValue
:
""
,
//路由来源
};
},
computed
:
{
...
...
@@ -219,7 +220,7 @@ export default {
this
.
value
=
options
.
value
;
this
.
dictValue
=
options
.
dictValue
;
this
.
inspectionCode
=
options
.
inspectionCode
;
console
.
log
(
"options"
,
options
)
;
this
.
backValue
=
options
.
backValue
||
""
;
this
.
tabs
=
this
.
jfType
===
"2"
||
this
.
jfType
===
"3"
?
tabsInfo2
:
tabsInfo1
;
...
...
@@ -251,12 +252,12 @@ export default {
inspectionNumber
:
0
,
//巡检数量
floor
:
this
.
floor
,
// 楼层
isSubmit
:
""
,
// 0 是草稿态; 1 是正式提交
isSign
:
""
,
// 是否签字
isSign
:
false
,
// 是否签字
signImg
:
""
,
// 签字图片地址
conclusion
:
""
,
//摘要
creatTime
:
`
${
new
Date
().
getTime
()}
`
,
items
:
[],
};
console
.
log
(
2222
,
this
.
baseInfo
,
this
.
list
,
this
.
detailsInfo
);
resolve
();
});
},
...
...
@@ -267,17 +268,16 @@ export default {
.
then
((
res
)
=>
{
const
detailsInfo
=
res
;
console
.
log
(
"getDetails"
,
res
);
let
list
=
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
]
.
details
;
let
list
=
detailsInfo
.
originData
[
this
.
value
-
1
].
details
;
console
.
log
(
"list"
,
list
);
// 未巡检需要处理默认数据结构
if
(
list
&&
list
.
length
)
{
this
.
list
=
list
;
}
this
.
inspectionResult
=
list
[
0
].
inspectionResult
;
//
this.inspectionResult = list[0].inspectionResult;
console
.
log
(
"let list"
,
list
);
this
.
detailsInfo
=
detailsInfo
;
console
.
log
(
"
获取list"
,
this
.
list
);
console
.
log
(
"
detailsInfo"
,
detailsInfo
);
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
...
...
@@ -303,36 +303,25 @@ export default {
// 处理提交数据
getParams
(
isSubmit
)
{
if
(
this
.
uid
)
{
let
posItem
=
this
.
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
];
posItem
.
details
=
this
.
list
;
let
posItem
=
this
.
detailsInfo
.
originData
[
this
.
value
-
1
];
let
paramsObj
=
this
.
getAllChildFormData
();
//获取所有数据
posItem
.
details
=
paramsObj
;
posItem
.
isSubmit
=
isSubmit
;
// 提交才会有巡检状态,暂存没有
if
(
isSubmit
)
{
if
(
!
this
.
checkInspectionResult
(
this
.
list
))
{
posItem
.
status
=
2
;
//1表示已经巡检过有异常
posItem
.
statusLable
=
"巡检异常"
;
}
else
{
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
posItem
.
statusLable
=
"已巡检"
;
}
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
posItem
.
statusLable
=
"已巡检"
;
}
else
{
posItem
.
status
=
0
;
//暂存就是未巡检
posItem
.
statusLable
=
"
未巡检
"
;
posItem
.
status
=
2
;
//1表示已经巡检过有异常
posItem
.
statusLable
=
"
巡检异常
"
;
}
let
{
notZeroCount
,
equalTwoCount
}
=
this
.
count
(
this
.
detailsInfo
.
originData
);
this
.
detailsInfo
.
inspectionNumber
=
notZeroCount
;
//巡检总数
this
.
detailsInfo
.
isException
=
equalTwoCount
;
//异常数量
this
.
detailsInfo
.
isSubmit
=
this
.
typeSubmit
(
this
.
detailsInfo
.
originData
)
>
0
?
0
:
1
;
//是否提交
// let { notZeroCount, equalTwoCount } = this.count(
// this.detailsInfo.originData
// );
// this.detailsInfo.inspectionNumber = 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"
);
// 记录提交月份
this
.
detailsInfo
.
synchronization
=
2
;
//编辑中
return
this
.
detailsInfo
;
}
else
{
let
baseInfo
=
this
.
baseInfo
;
...
...
@@ -344,16 +333,14 @@ export default {
jfType
:
item
.
jfType
,
isVaild
:
false
,
// 校验通过
details
:
this
.
itemDetail
,
status
:
item
.
status
,
status
:
item
.
status
,
refName
:
`TabContentItem_
${
index
}
`
,
statusLable
:
item
.
statusLable
statusLable
:
item
.
statusLable
,
};
});
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
posItem
=
tabList
[
this
.
value
];
console
.
log
(
"posItem"
,
posItem
);
posItem
.
details
=
paramsObj
;
console
.
log
(
"posItem"
,
posItem
);
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
posItem
.
statusLable
=
"已巡检"
;
...
...
@@ -436,7 +423,6 @@ export default {
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
const
all_data
=
this
.
$store
.
state
.
all_data
;
//获取全部数据
let
logContent
=
""
;
console
.
log
(
"this.uid"
,
this
.
uid
);
console
.
log
(
"all_data"
,
all_data
);
if
(
this
.
uid
)
{
const
index
=
all_data
.
findIndex
((
element
)
=>
element
.
uid
==
this
.
uid
);
...
...
@@ -484,7 +470,7 @@ export default {
icon
:
"success"
,
});
uni
.
navigateTo
({
url
:
"/pages/inspectionManagement/index"
,
url
:
`/pages/inspectionContent/inspectionContentList?uid=
${
params
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
});
},
// 获取子组件数据
...
...
@@ -532,7 +518,6 @@ export default {
};
// 调用校验函数
const
isValid
=
validateData
(
data
);
console
.
log
(
141
,
isValid
);
return
isValid
;
},
// 下一项
...
...
@@ -558,13 +543,14 @@ export default {
}
},
// 设置巡检结论
setInspectionResult
(
value
)
{
console
.
log
(
"value"
,
value
);
this
.
inspectionResult
=
value
;
this
.
list
[
this
.
activeTab
].
inspectionResult
=
value
;
// 更新当前 Tab 的数据
},
// 返回
back
()
{
uni
.
navigateBack
();
uni
.
navigateTo
({
url
:
`/pages/inspectionContent/inspectionContentList?uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
});
},
// 关闭弹窗
closePopup
()
{
...
...
pages/shaftInspection/shaftInspectionList.vue
浏览文件 @
de073eec
...
...
@@ -149,6 +149,7 @@ export default {
isSubmit
:
0
,
//提交状态
uid
:
""
,
options
:
{},
//存储数据
backValue
:
""
,
};
},
computed
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论