Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
059f084e
提交
059f084e
authored
3月 21, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:交互
上级
bf3c790c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
392 行增加
和
51 行删除
+392
-51
home.vue
pages/home/home.vue
+2
-2
index.vue
pages/inspectionManagement/index.vue
+4
-2
customPopup.vue
pages/shaftInspection/model/customPopup.vue
+319
-0
shaftInspectionList.vue
pages/shaftInspection/shaftInspectionList.vue
+26
-16
shaftInspectionNew.vue
pages/shaftInspection/shaftInspectionNew.vue
+41
-31
没有找到文件。
pages/home/home.vue
浏览文件 @
059f084e
...
...
@@ -53,12 +53,12 @@
cards
:
[{
image
:
'../../static/img/jf.png'
,
text
:
'机房巡检'
,
url
:
"/pages/inspectionContent/inspectionContentList"
url
:
"/pages/inspectionContent/inspectionContentList
?backValue=home
"
},
{
image
:
'../../static/img/jd.png'
,
text
:
'井道巡检'
,
url
:
"/pages/shaftInspection/shaftInspectionList"
url
:
"/pages/shaftInspection/shaftInspectionList
?backValue=home
"
},
{
image
:
'../../static/img/sj.png'
,
...
...
pages/inspectionManagement/index.vue
浏览文件 @
059f084e
...
...
@@ -77,7 +77,7 @@ export default {
components
:
{
SearchCom
,
InspectionItem
,
Dialog
,
Dialog
,
Empty
,
},
data
()
{
...
...
@@ -120,7 +120,9 @@ export default {
methods
:
{
// 返回
back
()
{
uni
.
navigateBack
();
uni
.
navigateTo
({
url
:
"/pages/home/home"
,
});
},
clickInspection
(
type
)
{
if
(
type
==
1
)
{
...
...
pages/shaftInspection/model/customPopup.vue
0 → 100644
浏览文件 @
059f084e
<
template
>
<view
v-if=
"isOpen"
class=
"synchronous-dialog"
>
<view
class=
"synchronous-content"
>
<!-- 巡检事项 -->
<view
class=
"form-item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
巡检事项:
</text
>
<text>
{{
inspectionItem
}}
</text>
</view>
<!-- 情况摘要(多选输入框) -->
<view
class=
"form-item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要:
</text
>
<textarea
v-model=
"summary"
placeholder=
"请输入情况摘要"
auto-height
class=
"input-box"
></textarea>
</view>
<!-- 固定词 -->
<view
class=
"form-item last"
>
<text
class=
"form-label"
></text>
<view
class=
"fixed-words"
>
<text
v-for=
"(word, index) in fixedWords"
:key=
"index"
class=
"word"
@
click=
"selectWord(word)"
>
{{
word
}}
</text>
</view>
</view>
<view
class=
"row-item bottom-row"
>
<button
class=
"button btn"
@
click=
"handleClose"
>
取消
</button>
<button
class=
"button"
@
click=
"handleConfirm"
>
确认
</button>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
// 父组件传递的巡检事项
inspectionItem
:
{
type
:
String
,
default
:
""
,
},
// 父组件传递的固定词
fixedWords
:
{
type
:
Array
,
default
:
()
=>
[
"已检查"
,
"正常"
,
"异常"
,
"需处理"
],
},
},
data
()
{
return
{
summary
:
""
,
// 情况摘要
isOpen
:
false
,
};
},
methods
:
{
// 打开弹窗
open
()
{
this
.
isOpen
=
true
;
},
// 关闭弹窗
close
()
{
this
.
isOpen
=
false
;
},
// 选择固定词
selectWord
(
word
)
{
this
.
summary
+=
word
+
" "
;
// 将选中的词添加到输入框
},
// 确认
handleConfirm
()
{
this
.
$emit
(
"confirm"
,
this
.
summary
);
// 将情况摘要回传给父组件
this
.
handleClose
();
},
// 关闭弹窗
handleClose
()
{
this
.
summary
=
""
;
// 清空输入框
this
.
close
();
},
},
};
</
script
>
<
style
scoped
lang=
"less"
>
.synchronous-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 99999;
.synchronous-content {
padding: 3% 20px 32px 24px;
width: 400px;
height: 300px;
box-sizing: border-box;
background-image: linear-gradient(
-6deg,
#f9ffe7 0%,
#ffffff 12%,
#fcfeff 73%,
#ccf1ff 100%
);
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
position: relative;
.row-item {
display: flex;
align-items: center;
justify-content: center;
}
.title {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #000000;
text-align: center;
line-height: 26px;
font-weight: 500;
}
.count-num {
margin: 5% 0 5% 0;
align-items: flex-end;
.num {
display: inline-block;
font-family: AlibabaPuHuiTi_2_65_Medium;
font-size: 50px;
color: #3774f6;
line-height: 44px;
font-weight: 500;
}
}
.operating-instructions {
margin-bottom: 8%;
.title {
font-size: 13px;
color: #4a4a4a;
line-height: 24px;
font-weight: 600;
text-align: left;
}
.instructions-item {
font-size: 12px;
color: #7c7c7c;
line-height: 22px;
font-weight: 400;
}
}
// 打包按钮
.bottom-row {
position: absolute;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
.button {
display: flex;
align-items: center;
justify-content: center;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
border-radius: 27px;
width: 128px;
height: 32px;
margin: 10px;
color: #fff;
&.btn {
background: #ffffff;
color: #000000;
}
}
}
// 关闭按钮
.close-button {
position: absolute;
bottom: -40px;
left: 50%;
transform: translateX(-50%);
.iconfont {
color: #fff;
font-size: 24px;
}
}
}
}
.form-item {
width: 100%;
display: flex;
align-items: center;
padding: 9.6px 0;
line-height: 28.8px;
border-bottom: 0.8px solid #f2f3f5;
&.last {
border: 0;
}
.fixed-words {
.word {
font-size: 11.2px;
margin-right: 4px;
padding: 4px 6px;
border: 1px solid #c7c7c7;
border-radius: 4px;
}
}
.form-label {
font-size: 11.2px;
font-weight: bold;
margin-right: 25.6px;
width: 64px;
text-align: right;
.required {
color: red;
margin-right: 3.2px;
}
}
.switch-container {
display: flex;
gap: 9.6px;
.status-btn {
flex: 1;
padding: 5.6px 19.2px;
font-size: 12.8px;
color: #000000;
background: #f2f2f2;
text-align: center;
font-weight: 400;
line-height: 17.6px;
border-radius: 14.4px;
&.active {
color: #ffffff;
background: #3774f6;
border: 0.32px solid rgba(224, 224, 224, 1);
}
}
}
.input-box {
flex: 1;
border-radius: 3.2px;
font-size: 12.8px;
line-height: 19.2px;
}
.photo-limit {
font-size: 12.8px;
color: #959595;
line-height: 19.2px;
font-weight: 400;
}
.photo-container {
display: flex;
flex-wrap: wrap;
margin-bottom: 6.4px;
.photo-item {
position: relative;
margin-right: 6.4px;
margin-bottom: 6.4px;
.photo {
width: 57.6px;
height: 57.6px;
border-radius: 3.2px;
margin-left: 9.6px;
}
.delete-photo {
position: absolute;
top: -6.4px;
right: -6.4px;
background-color: #ff4d4f;
color: #fff;
width: 12.8px;
height: 12.8px;
border-radius: 50%;
text-align: center;
line-height: 12.8px;
font-size: 9.6px;
}
}
}
.photo-btn {
background: #ffffff;
border: 0.272px solid rgba(221, 221, 221, 1);
border-radius: 1.64px;
width: 57.6px;
height: 57.6px;
font-size: 57.6px;
color: #cccccc;
text-align: center;
line-height: 51.2px;
}
}
</
style
>
pages/shaftInspection/shaftInspectionList.vue
浏览文件 @
059f084e
...
...
@@ -87,7 +87,7 @@
<view
class=
"card-content"
>
<view
class=
"status-line"
>
<image
src=
"/static/status-icon.png"
class=
"status-icon"
/>
<text
class=
"status-text"
>
{{
position
.
statusLable
}}
</text>
<text
class=
"status-text"
>
{{
position
.
statusLable
}}
</text>
</view>
<view
class=
"info-line"
>
<text
class=
"info-text"
...
...
@@ -136,6 +136,7 @@ export default {
detailsInfo
:
{},
// 详情
isDisable
:
false
,
// 禁用
uid
:
""
,
options
:
{},
//存储数据
};
},
computed
:
{
...
...
@@ -149,11 +150,15 @@ export default {
},
},
onLoad
(
options
)
{
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
console
.
log
(
"options.uid"
,
options
.
uid
);
if
(
options
.
uid
)
{
this
.
uid
=
options
.
uid
;
this
.
getDetails
(
options
.
uid
);
this
.
options
=
options
;
this
.
backValue
=
this
.
options
.
backValue
||
""
;
this
.
isDisable
=
this
.
options
.
isDisable
==
1
?
true
:
false
;
console
.
log
(
"options.uid"
,
this
.
options
.
uid
);
this
.
uid
=
this
.
options
.
uid
||
""
;
},
onShow
()
{
if
(
this
.
uid
)
{
this
.
getDetails
(
this
.
uid
);
}
else
{
this
.
init
();
}
...
...
@@ -197,7 +202,7 @@ export default {
},
getActiveTab
(
index
)
{
this
.
activeTab
=
index
;
console
.
log
(
"this.activeTab"
,
this
.
activeTab
)
console
.
log
(
"this.activeTab"
,
this
.
activeTab
);
if
(
this
.
activeTab
==
0
)
{
this
.
cardsInfo
=
this
.
tabList
;
}
else
{
...
...
@@ -213,10 +218,10 @@ export default {
console
.
log
(
"detailsInfo"
,
detailsInfo
);
this
.
detailsInfo
=
detailsInfo
;
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
this
.
inspectionCode
=
detailsInfo
.
inspectionCode
;
this
.
cardsInfo
=
this
.
tabList
=
detailsInfo
.
originData
;
console
.
log
(
"this.cardsInfo"
,
this
.
cardsInfo
)
this
.
cardsInfo
=
this
.
tabList
=
detailsInfo
.
originData
;
console
.
log
(
"this.cardsInfo"
,
this
.
cardsInfo
);
this
.
cardsInfo
.
forEach
((
item
)
=>
{
this
.
tabs
.
push
(
item
.
name
);
});
...
...
@@ -256,15 +261,20 @@ export default {
// 跳转到具体的井道
toShaftInspection
(
value
,
dictValue
,
location
)
{
uni
.
navigateTo
({
url
:
`/pages/shaftInspection/shaftInspectionNew?value=
${
value
}
&dictValue=
${
dictValue
}
&inspectionCode=
${
this
.
inspectionCode
}
&location=
${
location
}
&uid=
${
this
.
uid
}
`
,
url
:
`/pages/shaftInspection/shaftInspectionNew?value=
${
value
}
&dictValue=
${
dictValue
}
&inspectionCode=
${
this
.
inspectionCode
}
&location=
${
location
}
&uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
});
},
back
()
{
uni
.
navigateBack
();
if
(
this
.
backValue
===
"home"
)
{
uni
.
navigateTo
({
url
:
"/pages/home/home"
,
});
}
else
{
uni
.
navigateTo
({
url
:
`/pages/inspectionManagement/index`
,
});
}
},
},
};
</
script
>
...
...
@@ -346,7 +356,7 @@ export default {
}
.info {
margin-right: 9.6px;
margin-right: 9.6px;
.username {
font-size: 16px;
color: #000000;
...
...
pages/shaftInspection/shaftInspectionNew.vue
浏览文件 @
059f084e
...
...
@@ -85,11 +85,9 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<input
class=
"input-box"
v-model=
"list[activeTab] && list[activeTab].conclusion"
placeholder=
"请输入情况摘要"
/>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
list
[
activeTab
].
conclusion
||
"请输入情况摘要"
}}
</text>
</view>
<view
class=
"form-item"
>
<text
class=
"form-label"
>
现场照片
</text>
...
...
@@ -132,24 +130,12 @@
</button>
<button
v-else
class=
"action-btn complete-btn"
@
click=
"nextTab"
>
下一项
</button>
</view>
<!-- 使用 uni-popup 组件 完成弹窗 -->
<uni-popup
ref=
"popup"
type=
"center"
>
<view
class=
"popup-content"
>
<!-- 关闭按钮 -->
<view
class=
"close-icon"
@
click=
"closePopup"
>
×
</view>
<!-- 成功图标 -->
<view
class=
"icon-success"
>
✔️
</view>
<!-- 保存成功的文字 -->
<view
class=
"success-text"
>
保存成功
</view>
<!-- 下一项按钮 -->
<view
class=
"next-button"
@
click=
"closePopup"
>
下一项
</view>
</view>
</uni-popup>
</button>
</view
><custom-popup
ref=
"customPopup"
:inspectionItem=
"tabs[activeTab].label"
@
confirm=
"handlePopupConfirm"
></custom-popup>
</view>
</
template
>
...
...
@@ -169,9 +155,13 @@ import {
import
{
getInspectionDetails
,
getDarft
}
from
"@/request/index.js"
;
import
moment
from
"moment"
;
import
customPopup
from
"./model/customPopup.vue"
;
import
_
from
"lodash"
;
export
default
{
components
:
{
customPopup
,
},
data
()
{
return
{
location
:
""
,
...
...
@@ -207,6 +197,7 @@ export default {
detailsInfo
:
{},
// 详情
baseInfo
:
{},
// 基础信息
list
:
[],
//巡检信息
backValue
:
""
,
//路由来源
};
},
computed
:
{
...
...
@@ -230,6 +221,7 @@ export default {
this
.
value
=
options
.
value
;
this
.
dictValue
=
options
.
dictValue
;
this
.
inspectionCode
=
options
.
inspectionCode
;
this
.
backValue
=
options
.
backValue
||
""
;
console
.
log
(
"options"
,
options
);
if
(
options
.
uid
)
{
...
...
@@ -404,12 +396,11 @@ export default {
);
this
.
detailsInfo
.
inspectionNumber
=
notZeroCount
;
//巡检总数
this
.
detailsInfo
.
isException
=
equalTwoCount
;
//异常数量
this
.
detailsInfo
.
isSubmit
=
this
.
typeSubmit
(
this
.
detailsInfo
.
originData
)
>
0
?
0
:
1
;
//是否提交
this
.
detailsInfo
.
isSubmit
=
isSubmit
;
//是否提交
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
;
//编辑中
//
this.detailsInfo.synchronization = 2; //编辑中
return
this
.
detailsInfo
;
}
else
{
let
baseInfo
=
this
.
baseInfo
;
...
...
@@ -440,11 +431,11 @@ export default {
let
typeSubmit
=
this
.
typeSubmit
(
tabList
);
const
data
=
{
...
baseInfo
,
isSubmit
:
typeSubmit
>
0
?
0
:
1
,
//0暂存(编辑中) 1提交(待同步,已同步)
isSubmit
:
isSubmit
,
//0暂存(编辑中) 1提交(待同步,已同步)
inspectionNumber
:
1
,
isException
:
posItem
.
status
==
2
?
1
:
0
,
items
:
[],
synchronization
:
typeSubmit
>
0
?
2
:
0
,
// 是否同步过
synchronization
:
0
,
// 是否同步过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
originData
:
tabList
,
//所有大楼和楼层的数据
...
...
@@ -547,7 +538,7 @@ export default {
icon
:
"success"
,
});
uni
.
navigateTo
({
url
:
"/pages/inspectionManagement/index"
,
url
:
`/pages/shaftInspection/shaftInspectionList?uid=
${
params
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
});
},
// 检查所有Tab 的必填项是否填写完整
...
...
@@ -595,7 +586,17 @@ export default {
switchTab
(
index
)
{
this
.
activeTab
=
index
;
this
.
updateCurrentTabData
();
},
// 设置巡检结论
},
// 显示弹窗
showPopup
(
index
)
{
this
.
currentIndex
=
index
;
this
.
$refs
.
customPopup
.
open
();
},
// 处理弹窗确认
handlePopupConfirm
(
summary
)
{
this
.
list
[
this
.
activeTab
].
conclusion
=
summary
;
// 回显到文字显示区域
},
// 设置巡检结论
setInspectionResult
(
value
)
{
console
.
log
(
"value"
,
value
);
this
.
inspectionResult
=
value
;
...
...
@@ -603,7 +604,9 @@ export default {
},
// 返回
back
()
{
uni
.
navigateBack
();
uni
.
navigateTo
({
url
:
`/pages/shaftInspection/shaftInspectionList?uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
});
},
// 关闭弹窗
closePopup
()
{
...
...
@@ -839,6 +842,13 @@ export default {
margin-right: 3.2px;
}
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
.have {
color: #000;
}
}
.label {
font-size: 11.2px;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论