Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
e69ada18
提交
e69ada18
authored
3月 24, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:提交
上级
846dfc08
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
230 行增加
和
5 行删除
+230
-5
detail.vue
pages/inspectionContent/components/detail.vue
+164
-0
wlhj.vue
pages/inspectionContent/components/wlhj.vue
+17
-5
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+49
-0
没有找到文件。
pages/inspectionContent/components/detail.vue
0 → 100644
浏览文件 @
e69ada18
<
template
>
<view
class=
"detail-box"
>
<!--
<image
class=
"weitu"
src=
"@/static/img/add-img/weitu.png"
mode=
"aspectFit"
></image>
-->
<view
class=
"container"
>
<!-- 物理环境 -->
<view
v-if=
"detailsItem.wlhj"
class=
"container-item"
>
<view
class=
"title"
>
物理环境
</view>
<view
class=
"cards"
>
<view
v-for=
"(item, index) in detailsItem.wlhj.detail"
:key=
"index"
class=
"cards-item"
>
<view
class=
"name"
>
{{
item
.
label
}}
<text
class=
"status"
:class=
"
{ warning: item.inspectionResult === 1 }"
>
{{
item
.
inspectionResultLable
}}
</text
></view
>
<view
class=
"list"
>
<view
class=
"label"
>
情况描述:
</view>
<view
class=
"content"
>
{{
item
.
conclusion
}}
</view>
</view>
<view
class=
"list"
>
<view
class=
"label"
>
情况描述:
</view>
<view
v-if=
"item.photos.length === 0"
class=
"content"
>
未拍摄照片
</view>
<view
v-else
class=
"content"
>
<image
v-for=
"(url, urlIndex) in item.photos"
:key=
"urlIndex"
class=
"image-item"
:src=
"url"
mode=
"aspectFit"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
// 父组件传递的详情
detailsItem
:
{
type
:
Object
,
default
:
()
=>
{},
},
},
data
()
{
return
{};
},
mounted
()
{
console
.
log
(
"this.detailsItem"
,
this
.
detailsItem
);
},
methods
:
{},
};
</
script
>
<
style
scoped
lang=
"less"
>
.detail-box {
height: calc(100vh - 225px);
border-radius: 0 0 12px 12px;
background-color: #fff;
padding: 0 24px 24px;
.weitu {
width: 100%;
margin-bottom: 24px;
height: 350px;
}
.container {
.container-item {
margin-bottom: 24px;
.title {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: 500;
margin-bottom: 12px;
}
.cards {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.cards-item {
width: calc(50% - 8px);
margin-bottom: 16px;
background: #f9f9f9;
border-radius: 8px;
padding: 16px;
.name {
font-size: 16px;
color: #000000;
line-height: 24px;
font-weight: 500;
margin-bottom: 12px;
.status {
margin-left: 8px;
padding: 0 8px;
font-size: 12px;
background: #e6f9f3;
border-radius: 11px;
color: #0cc991;
line-height: 20px;
font-weight: 400;
&.warning {
background: #fdebe9;
color: #f55a42;
}
}
}
.list {
display: flex;
align-items: flex-start; /* 让内容垂直对齐在顶部 */
margin-bottom: 12px;
&:last-child {
margin-bottom: 0;
}
.label {
width: 70px; /* 设置左侧 label 的宽度 */
font-size: 14px;
color: #7c7c7c;
line-height: 22px;
font-weight: 400;
}
.content {
flex: 1; /* 右侧内容占据剩余空间 */
word-wrap: break-word; /* 使文本自动换行 */
font-size: 14px;
color: #000000;
line-height: 22px;
font-weight: 400;
&.img {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
.image-item {
width: 72px;
height: 72px;
margin-right: 8px;
border-radius: 4px;
}
}
}
}
}
}
}
}
}
</
style
>
pages/inspectionContent/components/wlhj.vue
浏览文件 @
e69ada18
...
...
@@ -9,15 +9,15 @@
<view
class=
"switch-container"
>
<view
:class=
"['status-btn',
{ active: item.inspectionResult === 0 }]"
@click="setInspectionResult(index, 0)"
@click="setInspectionResult(index, 0
, item.lableArr[0]
)"
>
正常
{{
item
.
lableArr
[
0
]
}}
</view>
<view
:class=
"['status-btn',
{ active: item.inspectionResult === 1 }]"
@click="setInspectionResult(index, 1)"
@click="setInspectionResult(index, 1
, item.lableArr[1]
)"
>
异常
{{
item
.
lableArr
[
1
]
}}
</view>
</view>
</view>
...
...
@@ -94,30 +94,40 @@ export default {
{
label
:
"地板、墙壁破损"
,
inspectionResult
:
0
,
inspectionResultLable
:
"正常"
,
lableArr
:
[
"正常"
,
"异常"
],
conclusion
:
""
,
photos
:
[],
},
{
label
:
"机房清洁"
,
inspectionResult
:
0
,
inspectionResultLable
:
"正常"
,
lableArr
:
[
"正常"
,
"异常"
],
conclusion
:
""
,
photos
:
[],
},
{
label
:
"机房通风"
,
inspectionResult
:
0
,
inspectionResultLable
:
"正常"
,
lableArr
:
[
"正常"
,
"异常"
],
conclusion
:
""
,
photos
:
[],
},
{
label
:
"机房照明"
,
inspectionResult
:
0
,
inspectionResultLable
:
"正常"
,
lableArr
:
[
"正常"
,
"异常"
],
conclusion
:
""
,
photos
:
[],
},
{
label
:
"漏水检测"
,
inspectionResult
:
0
,
inspectionResultLable
:
"正常"
,
lableArr
:
[
"正常"
,
"异常"
],
conclusion
:
""
,
photos
:
[],
},
...
...
@@ -195,8 +205,10 @@ export default {
},
// 设置巡检结论
setInspectionResult
(
index
,
value
)
{
setInspectionResult
(
index
,
value
,
label
)
{
console
.
log
(
"this.itemData.detail[index].inspectionResult"
,
this
.
itemData
.
detail
[
index
].
inspectionResult
)
this
.
itemData
.
detail
[
index
].
inspectionResult
=
value
;
// 0正常 1异常
this
.
itemData
.
detail
[
index
].
inspectionResultLable
=
label
;
},
// 显示弹窗
showPopup
(
index
)
{
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
e69ada18
...
...
@@ -91,6 +91,45 @@
</view>
</view></view
>
<view
class=
"card-box"
>
<view
class=
"card-row"
:class=
"
{ right: rowIndex % 2 !== 0 }"
v-for="(row, rowIndex) in rows"
:key="rowIndex"
>
<view
class=
"card-wrapper"
v-for=
"(card, cardIndex) in row"
:key=
"cardIndex"
@
click=
"getDetailsItem(card.name, card.jfType, card.value)"
>
<view
class=
"card"
>
<view
class=
"card-content"
>
<view
class=
"first-row"
>
<image
class=
"icon"
src=
"@/static/img/add-img/home1.png"
></image>
<text
class=
"status"
>
{{
card
.
statusLable
}}
</text>
</view>
<view
class=
"second-row"
>
<text
class=
"location"
>
{{
card
.
name
}}
</text>
</view>
</view>
<view
class=
"spacer-image right"
v-if=
"cardIndex
<
row
.
length
-
1
"
>
<!--
<image
src=
"@/static/img/arr2.svg"
mode=
"aspectFit"
></image>
-->
</view>
<view
class=
"spacer-image bottom"
v-if=
"rowIndex
<
rows
.
length
-
1
"
>
<view
v-if=
"cardIndex == 0 || cardIndex == 4"
>
<!--
<image
src=
"@/static/img/arr2.svg"
mode=
"aspectFit"
></image>
-->
</view>
</view>
</view>
</view>
</view></view
>
<detail
ref=
"detail"
:detailsItem=
"detailsItem"
></detail>
<signDialog
ref=
"signDialog"
@
confirm=
"handlePopupConfirm"
></signDialog>
</view>
</
template
>
...
...
@@ -105,9 +144,11 @@ import {
}
from
"@/utils/IoReadingAndWriting.js"
;
import
{
getInspectionDetails
}
from
"@/request/index.js"
;
import
signDialog
from
"@/components/signDialog.vue"
;
import
detail
from
"./components/detail.vue"
;
export
default
{
components
:
{
signDialog
,
detail
},
data
()
{
return
{
...
...
@@ -116,6 +157,7 @@ export default {
baseInfo
:
{},
// 基础信息
inspectionNumber
:
0
,
// 已巡检的井道数量
detailsInfo
:
{},
// 详情
detailsItem
:{},
isDisable
:
false
,
// 禁用
isSign
:
false
,
//签名状态
isSubmit
:
0
,
//提交状态
...
...
@@ -144,6 +186,7 @@ export default {
this
.
init
();
}
this
.
all_data
=
this
.
$store
.
state
.
all_data
;
console
.
log
(
"onShow"
,
this
.
all_data
)
},
methods
:
{
init
()
{
...
...
@@ -195,6 +238,7 @@ export default {
this
.
cardsInfo
=
detailsInfo
.
originData
;
this
.
isSubmit
=
this
.
detailsInfo
.
isSubmit
;
this
.
isSign
=
this
.
detailsInfo
.
isSign
;
this
.
detailsItem
=
detailsInfo
.
originData
[
0
].
details
;
const
group1
=
this
.
cardsInfo
.
slice
(
0
,
5
);
const
group2
=
this
.
cardsInfo
.
slice
(
5
,
10
);
...
...
@@ -214,6 +258,11 @@ export default {
uni
.
hideLoading
();
});
},
// 获取机房详情
getDetailsItem
(
location
,
jfType
,
value
){
this
.
detailsItem
=
this
.
detailsInfo
.
originData
[
value
-
1
].
details
;
console
.
log
(
"this.detailsItem"
,
this
.
detailsItem
)
},
// 跳转到具体的机房
toShaftInspection
(
location
,
jfType
,
value
)
{
uni
.
navigateTo
({
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论