Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
9fb3bb44
提交
9fb3bb44
authored
4月 15, 2025
作者:
BaoChunXian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 井道巡检异常时带出之前填写的情况摘要
上级
8c0d9459
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
1435 行增加
和
1432 行删除
+1435
-1432
customPopup.vue
pages/shaftInspection/model/customPopup.vue
+320
-319
shaftInspectionNew.vue
pages/shaftInspection/shaftInspectionNew.vue
+1115
-1113
没有找到文件。
pages/shaftInspection/model/customPopup.vue
浏览文件 @
9fb3bb44
<
template
>
<
template
>
<view
v-if=
"isOpen"
class=
"synchronous-dialog"
>
<view
v-if=
"isOpen"
class=
"synchronous-dialog"
>
<view
class=
"synchronous-content"
>
<view
class=
"synchronous-content"
>
<!-- 巡检事项 -->
<!-- 巡检事项 -->
<view
class=
"form-item"
>
<view
class=
"form-item"
>
<text
class=
"form-label"
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
巡检事项:
</text
><text
class=
"required"
>
*
</text>
巡检事项:
</text
>
>
<text>
{{
inspectionItem
}}
</text>
<text>
{{
inspectionItem
}}
</text>
</view>
</view>
<!-- 情况摘要(多选输入框) -->
<!-- 情况摘要(多选输入框) -->
<view
class=
"form-item"
>
<view
class=
"form-item"
>
<text
class=
"form-label"
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要:
</text
><text
class=
"required"
>
*
</text>
情况摘要:
</text
>
>
<textarea
<textarea
v-model=
"summary"
v-model=
"summary"
placeholder=
"请输入情况摘要"
placeholder=
"请输入情况摘要"
auto-height
auto-height
class=
"input-box"
class=
"input-box"
></textarea>
></textarea>
</view>
</view>
<!-- 固定词 -->
<!-- 固定词 -->
<view
class=
"form-item last"
>
<view
class=
"form-item last"
>
<text
class=
"form-label"
></text>
<text
class=
"form-label"
></text>
<view
class=
"fixed-words"
>
<view
class=
"fixed-words"
>
<text
<text
v-for=
"(word, index) in fixedWords"
v-for=
"(word, index) in fixedWords"
:key=
"index"
:key=
"index"
class=
"word"
class=
"word"
@
click=
"selectWord(word)"
@
click=
"selectWord(word)"
>
>
{{
word
}}
{{
word
}}
</text>
</text>
</view>
</view>
</view>
</view>
<view
class=
"row-item bottom-row"
>
<view
class=
"row-item bottom-row"
>
<view
class=
"button btn"
@
click=
"handleClose"
>
取消
</view>
<view
class=
"button btn"
@
click=
"handleClose"
>
取消
</view>
<view
class=
"button"
@
click=
"handleConfirm"
>
确认
</view>
<view
class=
"button"
@
click=
"handleConfirm"
>
确认
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
// 父组件传递的巡检事项
// 父组件传递的巡检事项
inspectionItem
:
{
inspectionItem
:
{
type
:
String
,
type
:
String
,
default
:
""
,
default
:
""
,
},
},
// 父组件传递的固定词
// 父组件传递的固定词
fixedWords
:
{
fixedWords
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
"已检查"
,
"正常"
,
"异常"
,
"需处理"
],
default
:
()
=>
[
"已检查"
,
"正常"
,
"异常"
,
"需处理"
],
},
},
},
},
data
()
{
data
()
{
return
{
return
{
summary
:
""
,
// 情况摘要
summary
:
""
,
// 情况摘要
isOpen
:
false
,
isOpen
:
false
,
};
};
},
},
methods
:
{
methods
:
{
// 打开弹窗
// 打开弹窗
open
()
{
open
(
item
)
{
this
.
isOpen
=
true
;
this
.
summary
=
item
.
conclusion
;
},
this
.
isOpen
=
true
;
// 关闭弹窗
},
close
()
{
// 关闭弹窗
this
.
isOpen
=
false
;
close
()
{
},
this
.
isOpen
=
false
;
// 选择固定词
},
selectWord
(
word
)
{
// 选择固定词
this
.
summary
+=
word
+
" "
;
// 将选中的词添加到输入框
selectWord
(
word
)
{
},
this
.
summary
+=
word
+
" "
;
// 将选中的词添加到输入框
// 确认
},
handleConfirm
()
{
// 确认
this
.
$emit
(
"confirm"
,
this
.
summary
);
// 将情况摘要回传给父组件
handleConfirm
()
{
this
.
handleClose
();
this
.
$emit
(
"confirm"
,
this
.
summary
);
// 将情况摘要回传给父组件
},
this
.
handleClose
();
// 关闭弹窗
},
handleClose
()
{
// 关闭弹窗
this
.
summary
=
""
;
// 清空输入框
handleClose
()
{
this
.
close
();
this
.
summary
=
""
;
// 清空输入框
},
this
.
close
();
},
},
};
},
</
script
>
};
</
script
>
<
style
scoped
lang=
"less"
>
.synchronous-dialog {
<
style
scoped
lang=
"less"
>
position: fixed;
.synchronous-dialog {
top: 0;
position: fixed;
left: 0;
top: 0;
width: 100%;
left: 0;
height: 100%;
width: 100%;
background: rgba(0, 0, 0, 0.5);
height: 100%;
display: flex;
background: rgba(0, 0, 0, 0.5);
align-items: center;
display: flex;
justify-content: center;
align-items: center;
z-index: 99999;
justify-content: center;
.synchronous-content {
z-index: 99999;
padding: 3% 20px 32px 24px;
.synchronous-content {
width: 400px;
padding: 3% 20px 32px 24px;
height: 300px;
width: 400px;
box-sizing: border-box;
height: 300px;
background-image: linear-gradient(
box-sizing: border-box;
-6deg,
background-image: linear-gradient(
#f9ffe7 0%,
-6deg,
#ffffff 12%,
#f9ffe7 0%,
#fcfeff 73%,
#ffffff 12%,
#ccf1ff 100%
#fcfeff 73%,
);
#ccf1ff 100%
border: 0.4px solid rgba(224, 224, 224, 1);
);
border-radius: 12px;
border: 0.4px solid rgba(224, 224, 224, 1);
position: relative;
border-radius: 12px;
position: relative;
.row-item {
display: flex;
.row-item {
align-items: center;
display: flex;
justify-content: center;
align-items: center;
}
justify-content: center;
}
.title {
font-family: PingFangSC-Medium;
.title {
font-size: 18px;
font-family: PingFangSC-Medium;
color: #000000;
font-size: 18px;
text-align: center;
color: #000000;
line-height: 26px;
text-align: center;
font-weight: 500;
line-height: 26px;
}
font-weight: 500;
.count-num {
}
margin: 5% 0 5% 0;
.count-num {
align-items: flex-end;
margin: 5% 0 5% 0;
.num {
align-items: flex-end;
display: inline-block;
.num {
font-family: AlibabaPuHuiTi_2_65_Medium;
display: inline-block;
font-size: 50px;
font-family: AlibabaPuHuiTi_2_65_Medium;
color: #3774f6;
font-size: 50px;
line-height: 44px;
color: #3774f6;
font-weight: 500;
line-height: 44px;
}
font-weight: 500;
}
}
}
.operating-instructions {
margin-bottom: 8%;
.operating-instructions {
.title {
margin-bottom: 8%;
font-size: 13px;
.title {
color: #4a4a4a;
font-size: 13px;
line-height: 24px;
color: #4a4a4a;
font-weight: 600;
line-height: 24px;
text-align: left;
font-weight: 600;
}
text-align: left;
.instructions-item {
}
font-size: 12px;
.instructions-item {
color: #7c7c7c;
font-size: 12px;
line-height: 22px;
color: #7c7c7c;
font-weight: 400;
line-height: 22px;
}
font-weight: 400;
}
}
}
// 打包按钮
.bottom-row {
// 打包按钮
position: absolute;
.bottom-row {
bottom: 24px;
position: absolute;
left: 50%;
bottom: 24px;
transform: translateX(-50%);
left: 50%;
transform: translateX(-50%);
.button {
display: flex;
.button {
align-items: center;
display: flex;
justify-content: center;
align-items: center;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
justify-content: center;
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
border-radius: 27px;
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
width: 128px;
border-radius: 27px;
height: 32px;
width: 128px;
margin: 10px;
height: 32px;
color: #fff;
margin: 10px;
&.btn {
color: #fff;
background: #ffffff;
&.btn {
color: #000000;
background: #ffffff;
}
color: #000000;
}
}
}
}
}
// 关闭按钮
.close-button {
// 关闭按钮
position: absolute;
.close-button {
bottom: -40px;
position: absolute;
left: 50%;
bottom: -40px;
transform: translateX(-50%);
left: 50%;
.iconfont {
transform: translateX(-50%);
color: #fff;
.iconfont {
font-size: 24px;
color: #fff;
}
font-size: 24px;
}
}
}
}
}
}
.form-item {
}
width: 100%;
.form-item {
display: flex;
width: 100%;
align-items: center;
display: flex;
padding: 9.6px 0;
align-items: center;
line-height: 28.8px;
padding: 9.6px 0;
border-bottom: 0.8px solid #f2f3f5;
line-height: 28.8px;
&.last {
border-bottom: 0.8px solid #f2f3f5;
border: 0;
&.last {
}
border: 0;
}
.fixed-words {
.word {
.fixed-words {
font-size: 11.2px;
.word {
margin-right: 4px;
font-size: 11.2px;
padding: 4px 6px;
margin-right: 4px;
border: 1px solid #c7c7c7;
padding: 4px 6px;
border-radius: 4px;
border: 1px solid #c7c7c7;
}
border-radius: 4px;
}
}
.form-label {
}
font-size: 11.2px;
.form-label {
font-weight: bold;
font-size: 11.2px;
margin-right: 25.6px;
font-weight: bold;
width: 64px;
margin-right: 25.6px;
text-align: right;
width: 64px;
text-align: right;
.required {
color: red;
.required {
margin-right: 3.2px;
color: red;
}
margin-right: 3.2px;
}
}
}
.switch-container {
display: flex;
.switch-container {
gap: 9.6px;
display: flex;
gap: 9.6px;
.status-btn {
flex: 1;
.status-btn {
padding: 5.6px 19.2px;
flex: 1;
font-size: 12.8px;
padding: 5.6px 19.2px;
color: #000000;
font-size: 12.8px;
background: #f2f2f2;
color: #000000;
text-align: center;
background: #f2f2f2;
font-weight: 400;
text-align: center;
line-height: 17.6px;
font-weight: 400;
border-radius: 14.4px;
line-height: 17.6px;
border-radius: 14.4px;
&.active {
color: #ffffff;
&.active {
background: #3774f6;
color: #ffffff;
border: 0.32px solid rgba(224, 224, 224, 1);
background: #3774f6;
}
border: 0.32px solid rgba(224, 224, 224, 1);
}
}
}
}
}
.input-box {
flex: 1;
.input-box {
border-radius: 3.2px;
flex: 1;
font-size: 12.8px;
border-radius: 3.2px;
line-height: 19.2px;
font-size: 12.8px;
}
line-height: 19.2px;
}
.photo-limit {
font-size: 12.8px;
.photo-limit {
color: #959595;
font-size: 12.8px;
line-height: 19.2px;
color: #959595;
font-weight: 400;
line-height: 19.2px;
}
font-weight: 400;
}
.photo-container {
display: flex;
.photo-container {
flex-wrap: wrap;
display: flex;
margin-bottom: 6.4px;
flex-wrap: wrap;
margin-bottom: 6.4px;
.photo-item {
position: relative;
.photo-item {
margin-right: 6.4px;
position: relative;
margin-bottom: 6.4px;
margin-right: 6.4px;
margin-bottom: 6.4px;
.photo {
width: 57.6px;
.photo {
height: 57.6px;
width: 57.6px;
border-radius: 3.2px;
height: 57.6px;
margin-left: 9.6px;
border-radius: 3.2px;
}
margin-left: 9.6px;
}
.delete-photo {
position: absolute;
.delete-photo {
top: -6.4px;
position: absolute;
right: -6.4px;
top: -6.4px;
background-color: #ff4d4f;
right: -6.4px;
color: #fff;
background-color: #ff4d4f;
width: 12.8px;
color: #fff;
height: 12.8px;
width: 12.8px;
border-radius: 50%;
height: 12.8px;
text-align: center;
border-radius: 50%;
line-height: 12.8px;
text-align: center;
font-size: 9.6px;
line-height: 12.8px;
}
font-size: 9.6px;
}
}
}
}
}
.photo-btn {
background: #ffffff;
.photo-btn {
border: 0.272px solid rgba(221, 221, 221, 1);
background: #ffffff;
border-radius: 1.64px;
border: 0.272px solid rgba(221, 221, 221, 1);
width: 57.6px;
border-radius: 1.64px;
height: 57.6px;
width: 57.6px;
font-size: 57.6px;
height: 57.6px;
color: #cccccc;
font-size: 57.6px;
text-align: center;
color: #cccccc;
line-height: 51.2px;
text-align: center;
}
line-height: 51.2px;
}
}
</
style
>
}
</
style
>
pages/shaftInspection/shaftInspectionNew.vue
浏览文件 @
9fb3bb44
<
template
>
<
template
>
<!-- 井道巡检操作 -->
<!-- 井道巡检操作 -->
<view
class=
"container"
>
<view
class=
"container"
>
<uni-nav-bar
<uni-nav-bar
:fixed=
"true"
:fixed=
"true"
background-color=
"rgba(214, 240, 255, 0.0)"
background-color=
"rgba(214, 240, 255, 0.0)"
status-bar
status-bar
rightWidth=
"300"
rightWidth=
"300"
>
>
<block
slot=
"left"
>
<block
slot=
"left"
>
<view
class=
""
@
click=
"back"
>
<view
class=
""
@
click=
"back"
>
<text
class=
"iconfont icon-fanhui"
></text>
<text
class=
"iconfont icon-fanhui"
></text>
</view>
</view>
</block>
</block>
</uni-nav-bar>
</uni-nav-bar>
<view
class=
"profile-section"
>
<view
class=
"profile-section"
>
<view
class=
"profile-box"
>
<view
class=
"profile-box"
>
<view
class=
"profile-left"
>
<view
class=
"profile-left"
>
<view
class=
"avatar"
>
<view
class=
"avatar"
>
<image
<image
src=
"@/static/img/add-img/defaultAvatar.png"
src=
"@/static/img/add-img/defaultAvatar.png"
mode=
"aspectFit"
mode=
"aspectFit"
></image>
></image>
</view>
</view>
<view
class=
"info"
>
<view
class=
"info"
>
<view
class=
"username"
>
井道巡检
</view>
<view
class=
"username"
>
井道巡检
</view>
<view
class=
"number"
<view
class=
"number"
>
位置:
<text
class=
"value"
>
{{
location
}}
</text></view
>
位置:
<text
class=
"value"
>
{{
location
}}
</text></view
>
>
</view>
</view>
</view>
</view>
<view
class=
"action-btn complete-btn"
@
click=
"submit(1)"
>
<view
class=
"action-btn complete-btn"
@
click=
"submit(1)"
>
完成巡检
完成巡检
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 模块3:Tab 操作区域 -->
<!-- 模块3:Tab 操作区域 -->
<view
class=
"module"
>
<view
class=
"module"
>
<view
class=
"tab-buttons"
>
<view
class=
"tab-buttons"
>
<view
<view
v-for=
"(tab, index) in tabs"
v-for=
"(tab, index) in tabs"
:key=
"index"
:key=
"index"
:class=
"['tab-item',
{ active: activeTab === index }]"
:class=
"['tab-item',
{ active: activeTab === index }]"
@click="switchTab(index)"
@click="switchTab(index)"
>
>
<text
v-if=
"tab.status == 0"
class=
"iconfont icon-weixunjian"
></text>
<text
v-if=
"tab.status == 0"
class=
"iconfont icon-weixunjian"
></text>
<text
v-if=
"tab.status == 1"
class=
"iconfont icon-wancheng"
></text>
<text
v-if=
"tab.status == 1"
class=
"iconfont icon-wancheng"
></text>
<text
v-if=
"tab.status == 2"
class=
"iconfont icon-shibai1"
></text>
<text
v-if=
"tab.status == 2"
class=
"iconfont icon-shibai1"
></text>
<text
class=
"tab-text"
>
{{
tab
.
label
}}
</text>
<text
class=
"tab-text"
>
{{
tab
.
label
}}
</text>
<view
v-if=
"activeTab === index"
class=
"underline"
></view>
<view
v-if=
"activeTab === index"
class=
"underline"
></view>
</view>
</view>
</view>
</view>
<view
class=
"tip"
>
<view
class=
"tip"
>
<text
class=
"iconfont icon-tixing"
></text>
{{
tabs
[
activeTab
].
text
}}
<text
class=
"iconfont icon-tixing"
></text>
{{
tabs
[
activeTab
].
text
}}
</view>
</view>
<view
class=
"tab-content"
>
<view
class=
"tab-content"
>
<!-- 操作区域 -->
<!-- 操作区域 -->
<view
class=
"form-item"
<view
class=
"form-item"
><text
class=
"form-label"
>
巡检项
</text>
><text
class=
"form-label"
>
巡检项
</text>
<view
class=
"label"
>
<view
class=
"label"
>
<text>
{{
tabs
[
activeTab
].
label
}}
</text>
<text>
{{
tabs
[
activeTab
].
label
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"form-item"
>
<view
class=
"form-item"
>
<text
class=
"form-label"
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
巡检结论
</text
><text
class=
"required"
>
*
</text>
巡检结论
</text
>
>
<view
class=
"switch-container"
>
<view
class=
"switch-container"
>
<view
<view
:class=
"['status-btn',
{ active: inspectionResult === 0 }]"
:class=
"['status-btn',
{ active: inspectionResult === 0 }]"
@click="setInspectionResult(0)"
@click="setInspectionResult(0)"
>
>
正常
正常
</view>
</view>
<view
<view
:class=
"['status-btn',
{ active: inspectionResult === 1 }]"
:class=
"['status-btn',
{ active: inspectionResult === 1 }]"
@click="setInspectionResult(1)"
@click="setInspectionResult(1)"
>
>
异常
异常
</view>
</view>
</view>
</view>
</view>
</view>
<template
v-if=
"inspectionResult === 1"
>
<template
v-if=
"inspectionResult === 1"
>
<view
class=
"form-item"
>
<view
class=
"form-item"
>
<text
class=
"form-label"
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
>
<text
<text
v-if=
"list[activeTab].conclusion"
v-if=
"list[activeTab].conclusion"
class=
"conclusion have"
class=
"conclusion have"
@
click=
"showPopup(index)"
@
click=
"showPopup(list[activeTab])"
>
{{
list
[
activeTab
].
conclusion
}}
</text
>
{{
list
[
activeTab
].
conclusion
}}
</text
>
>
<text
v-else
class=
"conclusion"
@
click=
"showPopup(index)"
<text
v-else
class=
"conclusion"
@
click=
"showPopup(list[activeTab])"
>
请输入情况摘要
</text
>
请输入情况摘要
</text
>
>
</view>
</view>
<view
class=
"form-item"
>
<view
class=
"form-item"
>
<text
class=
"form-label"
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
><text
class=
"required"
>
*
</text>
现场照片
</text
>
>
<CommonUpload
v-model=
"list[activeTab].photos"
:max-count=
"5"
>
</CommonUpload>
<CommonUpload
v-model=
"list[activeTab].photos"
:max-count=
"5"
>
<!--
<view
class=
"photo-box"
>
</CommonUpload>
<view
class=
"photo-container"
>
<!--
<view
class=
"photo-box"
>
<view
<view
class=
"photo-container"
>
v-for=
"(photo, index) in list[activeTab] &&
<view
list[activeTab].photos"
v-for=
"(photo, index) in list[activeTab] &&
:key=
"index"
list[activeTab].photos"
class=
"photo-item"
:key=
"index"
>
class=
"photo-item"
<image
:src=
"photo"
class=
"photo"
></image>
>
<text
class=
"delete-photo"
@
click=
"deletePhoto(index)"
<image
:src=
"photo"
class=
"photo"
></image>
>
×
</text
<text
class=
"delete-photo"
@
click=
"deletePhoto(index)"
>
>
×
</text
</view>
>
<view
@
click=
"takePhoto"
class=
"photo-btn"
>
+
</view>
</view>
</view>
<view
@
click=
"takePhoto"
class=
"photo-btn"
>
+
</view>
<view
class=
"photo-limit"
</view>
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
<view
class=
"photo-limit"
>
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
</view>
-->
>
</view></
template
</view>
-->
>
</view></
template
</view>
>
</view>
</view>
</view>
<!-- 模块4:提交模块 -->
<!-- <view class="module submit-module">
<!-- 模块4:提交模块 -->
<button class="action-btn" @click="saveDraft">暂存</button>
<!-- <view class="module submit-module">
<button class="action-btn complete-btn" @click="complete">
<button class="action-btn" @click="saveDraft">暂存</button>
完成
<button class="action-btn complete-btn" @click="complete">
</button>
完成
</view> -->
</button>
<view
class=
"submit-module"
>
</view> -->
<view
class=
"action-btn"
@
click=
"submit(0)"
>
暂存
</view>
<view
class=
"submit-module"
>
<view
<view
class=
"action-btn"
@
click=
"submit(0)"
>
暂存
</view>
v-if=
"activeTab !== 2"
<view
class=
"action-btn complete-btn"
v-if=
"activeTab !== 2"
@
click=
"nextTab"
class=
"action-btn complete-btn"
>
@
click=
"nextTab"
下一项
>
</view>
</view
下一项
><custom-popup
</view>
</view
ref=
"customPopup"
><custom-popup
:inspectionItem=
"tabs[activeTab].label"
ref=
"customPopup"
:fixedWords=
"['已检查', '正常', '异常', '需处理', '已处理']"
:inspectionItem=
"tabs[activeTab].label"
@
confirm=
"handlePopupConfirm"
:fixedWords=
"['已检查', '正常', '异常', '需处理', '已处理']"
></custom-popup>
@
confirm=
"handlePopupConfirm"
</view>
></custom-popup>
</template>
</view>
</template>
<
script
>
import
{
<
script
>
pad_2_1_inspection_items
,
import
{
pad_2_1_inspection_position
,
pad_2_1_inspection_items
,
pad_2_1_floor
,
pad_2_1_inspection_position
,
}
from
"@/utils/dict.js"
;
//巡检位置,A座到F座 楼层2楼4楼到26楼
pad_2_1_floor
,
import
{
}
from
"@/utils/dict.js"
;
//巡检位置,A座到F座 楼层2楼4楼到26楼
addLog
,
import
{
getLogContent
,
addLog
,
LOG_TYPE_ENUM
,
getLogContent
,
writeDarf
,
LOG_TYPE_ENUM
,
writeInspectionData
,
writeDarf
,
}
from
"@/utils/IoReadingAndWriting.js"
;
writeInspectionData
,
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
}
from
"@/utils/IoReadingAndWriting.js"
;
import
{
getInspectionDetails
,
getDarft
}
from
"@/request/index.js"
;
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
moment
from
"moment"
;
import
{
getInspectionDetails
,
getDarft
}
from
"@/request/index.js"
;
import
customPopup
from
"./model/customPopup.vue"
;
import
moment
from
"moment"
;
import
_
from
"lodash"
;
import
customPopup
from
"./model/customPopup.vue"
;
import
inspectApi
from
"@/api/inspect"
;
import
_
from
"lodash"
;
import
{
sqlToData
,
dataToSql
}
from
"./shared"
;
import
inspectApi
from
"@/api/inspect"
;
import
{
sqlToData
,
dataToSql
}
from
"./shared"
;
export
default
{
components
:
{
export
default
{
customPopup
,
components
:
{
CommonUpload
customPopup
,
},
CommonUpload
,
data
()
{
},
return
{
data
()
{
location
:
""
,
return
{
value
:
""
,
location
:
""
,
dictValue
:
""
,
value
:
""
,
inspectionCode
:
""
,
dictValue
:
""
,
isSubmitEnabled
:
false
,
// 提交按钮是否可点击
inspectionCode
:
""
,
uid
:
""
,
isSubmitEnabled
:
false
,
// 提交按钮是否可点击
randomDescription
:
"这是一段随机说明文字。"
,
// 随机说明文字
uid
:
""
,
tabs
:
[
randomDescription
:
"这是一段随机说明文字。"
,
// 随机说明文字
{
tabs
:
[
label
:
"门禁"
,
{
status
:
"0"
,
label
:
"门禁"
,
text
:
"检查门禁是否可以正常开启/关闭"
,
status
:
"0"
,
},
text
:
"检查门禁是否可以正常开启/关闭"
,
{
},
label
:
"卫生"
,
{
status
:
"0"
,
label
:
"卫生"
,
text
:
"检查卫生状况是否保持清洁"
,
status
:
"0"
,
},
text
:
"检查卫生状况是否保持清洁"
,
{
},
label
:
"设备告警"
,
{
status
:
"0"
,
label
:
"设备告警"
,
text
:
"检查设备是否存在告警,有无设备离线或故障"
,
status
:
"0"
,
},
text
:
"检查设备是否存在告警,有无设备离线或故障"
,
],
},
activeTab
:
0
,
// 当前选中的 Tab
],
inspectionResult
:
""
,
// Switch 值(0: 正常, 1: 异常)
activeTab
:
0
,
// 当前选中的 Tab
conclusion
:
""
,
// 情况摘要
inspectionResult
:
""
,
// Switch 值(0: 正常, 1: 异常)
photos
:
[],
// 现场照片
conclusion
:
""
,
// 情况摘要
historyData
:
null
,
// 历史数据
photos
:
[],
// 现场照片
firstSubmitTime
:
null
,
// 首次提交时间
historyData
:
null
,
// 历史数据
detailsInfo
:
{},
// 详情
firstSubmitTime
:
null
,
// 首次提交时间
baseInfo
:
{},
// 基础信息
detailsInfo
:
{},
// 详情
list
:
[],
//巡检信息
baseInfo
:
{},
// 基础信息
backValue
:
""
,
//路由来源
list
:
[],
//巡检信息
all_data
:
[],
backValue
:
""
,
//路由来源
};
all_data
:
[],
},
};
computed
:
{
},
userInfo
()
{
computed
:
{
return
this
.
$store
.
state
.
now_user
||
{};
userInfo
()
{
},
return
this
.
$store
.
state
.
now_user
||
{};
// isOperationPermissions() {
},
// // 是否有操作权限
// isOperationPermissions() {
// const {
// // 是否有操作权限
// uid,
// const {
// createByName
// uid,
// } = this.detailsInfo;
// createByName
// return !uid || (uid && createByName == this.userInfo.user);
// } = this.detailsInfo;
// },
// return !uid || (uid && createByName == this.userInfo.user);
},
// },
onLoad
(
options
)
{
},
this
.
coverlist
();
onLoad
(
options
)
{
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
coverlist
();
this
.
uid
=
options
.
uid
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
location
=
options
.
location
;
this
.
uid
=
options
.
uid
;
this
.
value
=
options
.
value
;
this
.
location
=
options
.
location
;
this
.
dictValue
=
options
.
dictValue
;
this
.
value
=
options
.
value
;
this
.
inspectionCode
=
options
.
inspectionCode
;
this
.
dictValue
=
options
.
dictValue
;
this
.
backValue
=
options
.
backValue
||
""
;
this
.
inspectionCode
=
options
.
inspectionCode
;
this
.
all_data
=
this
.
$store
.
state
.
all_data
||
[];
this
.
backValue
=
options
.
backValue
||
""
;
console
.
log
(
"options"
,
options
);
this
.
all_data
=
this
.
$store
.
state
.
all_data
||
[];
console
.
log
(
"options"
,
options
);
if
(
options
.
uid
)
{
this
.
getDetails
(
options
.
uid
);
if
(
options
.
uid
)
{
}
else
{
this
.
getDetails
(
options
.
uid
);
this
.
init
();
}
else
{
}
this
.
init
();
},
}
watch
:
{},
},
mounted
()
{},
watch
:
{},
methods
:
{
mounted
()
{},
// 初始化
methods
:
{
init
()
{
// 初始化
return
new
Promise
((
resolve
,
reject
)
=>
{
init
()
{
// 判断是否有回显数据
return
new
Promise
((
resolve
,
reject
)
=>
{
// 基础数据
// 判断是否有回显数据
this
.
baseInfo
=
{
// 基础数据
inspectionType
:
"2"
,
this
.
baseInfo
=
{
inspectionCode
:
this
.
inspectionCode
,
inspectionType
:
"2"
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-井道巡检`
,
inspectionCode
:
this
.
inspectionCode
,
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm"
),
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-井道巡检`
,
inspectionBy
:
this
.
$store
.
state
.
now_user
.
user
,
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm"
),
inspectionById
:
this
.
$store
.
state
.
now_user
.
userId
,
inspectionBy
:
this
.
$store
.
state
.
now_user
.
user
,
createByName
:
this
.
$store
.
state
.
now_user
.
user
,
inspectionById
:
this
.
$store
.
state
.
now_user
.
userId
,
isException
:
""
,
// 是否有异常,大于0存在异常
createByName
:
this
.
$store
.
state
.
now_user
.
user
,
inspectionNumber
:
0
,
//巡检数量
isException
:
""
,
// 是否有异常,大于0存在异常
floor
:
this
.
floor
,
// 楼层
inspectionNumber
:
0
,
//巡检数量
isSubmit
:
""
,
// 0 是草稿态; 1 是正式提交
floor
:
this
.
floor
,
// 楼层
isSign
:
false
,
// 是否签字
isSubmit
:
""
,
// 0 是草稿态; 1 是正式提交
signImg
:
""
,
// 签字图片地址
isSign
:
false
,
// 是否签字
conclusion
:
""
,
//摘要
signImg
:
""
,
// 签字图片地址
creatTime
:
`
${
new
Date
().
getTime
()}
`
,
conclusion
:
""
,
//摘要
items
:
[],
creatTime
:
`
${
new
Date
().
getTime
()}
`
,
};
items
:
[],
console
.
log
(
2222
,
this
.
baseInfo
,
this
.
list
,
this
.
detailsInfo
);
};
resolve
();
console
.
log
(
2222
,
this
.
baseInfo
,
this
.
list
,
this
.
detailsInfo
);
});
resolve
();
},
});
// 回显数据
},
getDetails
(
uid
)
{
// 回显数据
uni
.
showLoading
();
getDetails
(
uid
)
{
inspectApi
uni
.
showLoading
();
.
info
(
uid
)
inspectApi
.
then
((
res
)
=>
{
.
info
(
uid
)
const
detailsInfo
=
sqlToData
(
res
);
.
then
((
res
)
=>
{
console
.
log
(
"getDetails"
,
res
);
const
detailsInfo
=
sqlToData
(
res
);
let
list
=
console
.
log
(
"getDetails"
,
res
);
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
]
let
list
=
.
details
;
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
]
this
.
detailsInfo
=
detailsInfo
;
.
details
;
// 未巡检需要处理默认数据结构
this
.
detailsInfo
=
detailsInfo
;
if
(
list
&&
list
.
length
)
{
// 未巡检需要处理默认数据结构
this
.
list
=
list
;
if
(
list
&&
list
.
length
)
{
}
this
.
list
=
list
;
this
.
inspectionResult
=
list
[
0
].
inspectionResult
;
}
list
.
forEach
((
item
,
index
)
=>
{
this
.
inspectionResult
=
list
[
0
].
inspectionResult
;
this
.
tabs
[
index
].
status
=
item
.
inspectionResult
===
0
?
"1"
:
"2"
;
list
.
forEach
((
item
,
index
)
=>
{
});
this
.
tabs
[
index
].
status
=
item
.
inspectionResult
===
0
?
"1"
:
"2"
;
console
.
log
(
"let list"
,
list
);
});
console
.
log
(
"获取list"
,
this
.
list
);
console
.
log
(
"let list"
,
list
);
console
.
log
(
"获取list"
,
this
.
list
);
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
})
uni
.
hideLoading
();
.
catch
((
error
)
=>
{
})
uni
.
showToast
({
.
catch
((
error
)
=>
{
title
:
error
.
msg
,
uni
.
showToast
({
icon
:
"none"
,
title
:
error
.
msg
,
duration
:
1000
,
icon
:
"none"
,
});
duration
:
1000
,
uni
.
hideLoading
();
});
});
uni
.
hideLoading
();
},
});
// 数据结构重组
},
coverlist
()
{
// 数据结构重组
// 获取井道巡检的三个检查项固定数据再进行处理
coverlist
()
{
const
data
=
pad_2_1_inspection_items
.
rows
.
map
((
item
)
=>
{
// 获取井道巡检的三个检查项固定数据再进行处理
return
{
const
data
=
pad_2_1_inspection_items
.
rows
.
map
((
item
)
=>
{
// ...item,
return
{
dictLabel
:
item
.
dictLabel
,
// ...item,
dictValue
:
item
.
dictValue
,
dictLabel
:
item
.
dictLabel
,
conclusion
:
""
,
// 情况摘要
dictValue
:
item
.
dictValue
,
// roomType,
conclusion
:
""
,
// 情况摘要
inspectionResult
:
""
,
// 异常结论
// roomType,
itemCode
:
item
.
dictValue
,
// 检查项 如:门禁
inspectionResult
:
""
,
// 异常结论
measuredData
:
this
.
floor
,
// 逗号分隔字符串
itemCode
:
item
.
dictValue
,
// 检查项 如:门禁
photos
:
[],
// 照片
measuredData
:
this
.
floor
,
// 逗号分隔字符串
};
photos
:
[],
// 照片
});
};
});
this
.
list
=
data
;
},
this
.
list
=
data
;
},
// 更新当前 Tab 数据
updateCurrentTabData
()
{
// 更新当前 Tab 数据
const
currentTabData
=
this
.
list
[
this
.
activeTab
];
updateCurrentTabData
()
{
this
.
inspectionResult
=
currentTabData
.
inspectionResult
;
const
currentTabData
=
this
.
list
[
this
.
activeTab
];
this
.
conclusion
=
currentTabData
.
conclusion
;
this
.
inspectionResult
=
currentTabData
.
inspectionResult
;
this
.
photos
=
currentTabData
.
photos
;
this
.
conclusion
=
currentTabData
.
conclusion
;
},
this
.
photos
=
currentTabData
.
photos
;
// 拍照
},
takePhoto
()
{
// 拍照
uni
.
chooseImage
({
takePhoto
()
{
count
:
1
,
uni
.
chooseImage
({
sourceType
:
[
"camera"
],
// 可以从相机拍摄
count
:
1
,
success
:
async
(
res
)
=>
{
sourceType
:
[
"camera"
],
// 可以从相机拍摄
if
(
this
.
photos
.
length
<
5
)
{
success
:
async
(
res
)
=>
{
const
base64
=
await
this
.
convertFileToBase64
(
res
.
tempFilePaths
[
0
]);
if
(
this
.
photos
.
length
<
5
)
{
this
.
photos
.
push
(
base64
);
const
base64
=
await
this
.
convertFileToBase64
(
res
.
tempFilePaths
[
0
]);
this
.
list
[
this
.
activeTab
].
photos
=
this
.
photos
;
this
.
photos
.
push
(
base64
);
}
else
{
this
.
list
[
this
.
activeTab
].
photos
=
this
.
photos
;
uni
.
showToast
({
}
else
{
title
:
"最多只能上传5张照片"
,
uni
.
showToast
({
icon
:
"none"
,
title
:
"最多只能上传5张照片"
,
});
icon
:
"none"
,
}
});
},
}
});
},
},
});
// 转化为base64
},
convertFileToBase64
(
filePath
)
{
// 转化为base64
return
new
Promise
((
resolve
,
reject
)
=>
{
convertFileToBase64
(
filePath
)
{
plus
.
io
.
resolveLocalFileSystemURL
(
return
new
Promise
((
resolve
,
reject
)
=>
{
filePath
,
plus
.
io
.
resolveLocalFileSystemURL
(
function
(
entry
)
{
filePath
,
entry
.
file
(
function
(
entry
)
{
function
(
file
)
{
entry
.
file
(
const
reader
=
new
plus
.
io
.
FileReader
();
function
(
file
)
{
reader
.
onloadend
=
function
(
evt
)
{
const
reader
=
new
plus
.
io
.
FileReader
();
const
base64
=
evt
.
target
.
result
;
// 获取 Base64 数据
reader
.
onloadend
=
function
(
evt
)
{
resolve
(
base64
);
// 返回 Base64 数据
const
base64
=
evt
.
target
.
result
;
// 获取 Base64 数据
};
resolve
(
base64
);
// 返回 Base64 数据
reader
.
readAsDataURL
(
file
);
// 读取文件并转换为 Base64
};
},
reader
.
readAsDataURL
(
file
);
// 读取文件并转换为 Base64
function
(
error
)
{
},
reject
(
"获取文件对象失败:"
+
error
.
message
);
function
(
error
)
{
}
reject
(
"获取文件对象失败:"
+
error
.
message
);
);
}
},
);
function
(
error
)
{
},
reject
(
"解析文件路径失败:"
+
error
.
message
);
function
(
error
)
{
}
reject
(
"解析文件路径失败:"
+
error
.
message
);
);
}
});
);
},
});
// 删除照片
},
deletePhoto
(
index
)
{
// 删除照片
this
.
photos
.
splice
(
index
,
1
);
deletePhoto
(
index
)
{
this
.
list
[
this
.
activeTab
].
photos
=
this
.
photos
;
this
.
photos
.
splice
(
index
,
1
);
},
this
.
list
[
this
.
activeTab
].
photos
=
this
.
photos
;
// 处理提交数据
},
getParams
(
isSubmit
)
{
// 处理提交数据
if
(
this
.
uid
)
{
getParams
(
isSubmit
)
{
console
.
log
(
"74"
,
this
.
value
,
this
.
dictValue
,
this
.
detailsInfo
);
if
(
this
.
uid
)
{
let
posItem
=
console
.
log
(
"74"
,
this
.
value
,
this
.
dictValue
,
this
.
detailsInfo
);
this
.
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
let
posItem
=
this
.
dictValue
-
1
this
.
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
];
this
.
dictValue
-
1
console
.
log
(
"74"
,
this
.
value
,
this
.
dictValue
,
posItem
);
];
posItem
.
details
=
this
.
list
;
console
.
log
(
"74"
,
this
.
value
,
this
.
dictValue
,
posItem
);
posItem
.
isSubmit
=
isSubmit
;
posItem
.
details
=
this
.
list
;
// 提交才会有巡检状态,暂存没有
posItem
.
isSubmit
=
isSubmit
;
if
(
!
this
.
checkInspectionResult
(
this
.
list
))
{
// 提交才会有巡检状态,暂存没有
posItem
.
status
=
2
;
//1表示已经巡检过有异常
if
(
!
this
.
checkInspectionResult
(
this
.
list
))
{
posItem
.
statusLable
=
"巡检异常"
;
posItem
.
status
=
2
;
//1表示已经巡检过有异常
}
else
{
posItem
.
statusLable
=
"巡检异常"
;
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
}
else
{
posItem
.
statusLable
=
"已巡检"
;
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
}
posItem
.
statusLable
=
"已巡检"
;
console
.
log
(
"this.detailsInfo.originData"
,
this
.
detailsInfo
.
originData
);
}
let
{
statusNotZero
,
statusEqualsTwo
}
=
this
.
countStatus
(
console
.
log
(
"this.detailsInfo.originData"
,
this
.
detailsInfo
.
originData
);
this
.
detailsInfo
.
originData
let
{
statusNotZero
,
statusEqualsTwo
}
=
this
.
countStatus
(
);
this
.
detailsInfo
.
originData
console
.
log
(
);
"this.detailsInfo.statusNotZero , statusEqualsTwo "
,
console
.
log
(
statusNotZero
,
"this.detailsInfo.statusNotZero , statusEqualsTwo "
,
statusEqualsTwo
statusNotZero
,
);
statusEqualsTwo
this
.
detailsInfo
.
inspectionNumber
=
statusNotZero
;
//巡检总数
);
this
.
detailsInfo
.
isException
=
statusEqualsTwo
;
//异常数量
this
.
detailsInfo
.
inspectionNumber
=
statusNotZero
;
//巡检总数
this
.
detailsInfo
.
isSubmit
=
isSubmit
;
//是否提交
this
.
detailsInfo
.
isException
=
statusEqualsTwo
;
//异常数量
console
.
log
(
"this.detailsInfo"
,
this
.
detailsInfo
);
this
.
detailsInfo
.
isSubmit
=
isSubmit
;
//是否提交
this
.
detailsInfo
.
submitTime
=
moment
().
format
(
"yyyy-MM-DD"
);
// 记录提交时间
console
.
log
(
"this.detailsInfo"
,
this
.
detailsInfo
);
this
.
detailsInfo
.
submitMonth
=
moment
().
format
(
"yyyy-MM"
);
// 记录提交月份
this
.
detailsInfo
.
submitTime
=
moment
().
format
(
"yyyy-MM-DD"
);
// 记录提交时间
// this.detailsInfo.synchronization = 2; //编辑中
this
.
detailsInfo
.
submitMonth
=
moment
().
format
(
"yyyy-MM"
);
// 记录提交月份
return
this
.
detailsInfo
;
// this.detailsInfo.synchronization = 2; //编辑中
}
else
{
return
this
.
detailsInfo
;
let
baseInfo
=
this
.
baseInfo
;
}
else
{
let
dataObj
=
pad_2_1_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
let
baseInfo
=
this
.
baseInfo
;
return
{
let
dataObj
=
pad_2_1_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
name
:
item
.
dictLabel
,
return
{
value
:
item
.
dictValue
,
name
:
item
.
dictLabel
,
isVaild
:
false
,
// 校验通过
value
:
item
.
dictValue
,
// type: 1, // 枚举值
isVaild
:
false
,
// 校验通过
position
:
pad_2_1_floor
.
rows
,
// type: 1, // 枚举值
refName
:
`TabContentItem_
${
index
}
`
,
position
:
pad_2_1_floor
.
rows
,
descript
:
"检查内容包括门禁、卫生、设备告警。"
,
refName
:
`TabContentItem_
${
index
}
`
,
};
descript
:
"检查内容包括门禁、卫生、设备告警。"
,
});
};
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
});
let
posItem
=
tabList
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
];
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
posItem
=
tabList
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
];
posItem
.
details
=
this
.
list
;
posItem
.
isSubmit
=
isSubmit
;
//当前项是否提交
posItem
.
details
=
this
.
list
;
if
(
!
this
.
checkInspectionResult
(
this
.
list
))
{
posItem
.
isSubmit
=
isSubmit
;
//当前项是否提交
posItem
.
status
=
2
;
//1表示已经巡检过有异常
if
(
!
this
.
checkInspectionResult
(
this
.
list
))
{
posItem
.
statusLable
=
"巡检异常"
;
posItem
.
status
=
2
;
//1表示已经巡检过有异常
}
else
{
posItem
.
statusLable
=
"巡检异常"
;
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
}
else
{
posItem
.
statusLable
=
"已巡检"
;
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
}
posItem
.
statusLable
=
"已巡检"
;
// 根据获取到的每个井道的isSubmit来判断是否有暂存状态,只有有一个井道是暂存,那就是编辑中、暂存状态
}
let
typeSubmit
=
this
.
typeSubmit
(
tabList
);
// 根据获取到的每个井道的isSubmit来判断是否有暂存状态,只有有一个井道是暂存,那就是编辑中、暂存状态
const
data
=
{
let
typeSubmit
=
this
.
typeSubmit
(
tabList
);
...
baseInfo
,
const
data
=
{
isSubmit
:
isSubmit
,
//0暂存(编辑中) 1提交(待同步,已同步)
...
baseInfo
,
inspectionNumber
:
1
,
isSubmit
:
isSubmit
,
//0暂存(编辑中) 1提交(待同步,已同步)
isException
:
posItem
.
status
==
2
?
1
:
0
,
inspectionNumber
:
1
,
items
:
[],
isException
:
posItem
.
status
==
2
?
1
:
0
,
synchronization
:
0
,
// 是否同步过
items
:
[],
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
synchronization
:
0
,
// 是否同步过
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
originData
:
tabList
,
//所有大楼和楼层的数据
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
};
originData
:
tabList
,
//所有大楼和楼层的数据
console
.
log
(
"getParams,data"
,
data
);
};
return
data
;
console
.
log
(
"getParams,data"
,
data
);
}
return
data
;
},
}
countStatus
(
data
)
{
},
let
statusNotZero
=
0
;
countStatus
(
data
)
{
let
statusEqualsTwo
=
0
;
let
statusNotZero
=
0
;
console
.
log
(
"data"
,
data
);
let
statusEqualsTwo
=
0
;
// 遍历数据(假设 data 是数组)
console
.
log
(
"data"
,
data
);
data
.
forEach
((
item
)
=>
{
// 遍历数据(假设 data 是数组)
console
.
log
(
4515
,
item
);
data
.
forEach
((
item
)
=>
{
// 检查是否有 originData
console
.
log
(
4515
,
item
);
item
.
position
.
forEach
((
floor
)
=>
{
// 检查是否有 originData
// 检查是否有 position
item
.
position
.
forEach
((
floor
)
=>
{
// 获取 status(可能是数字或字符串)
// 检查是否有 position
const
status
=
floor
.
status
;
// 获取 status(可能是数字或字符串)
// 转换为数字进行比较
const
status
=
floor
.
status
;
const
statusNum
=
parseInt
(
status
,
10
);
// 转换为数字进行比较
const
statusNum
=
parseInt
(
status
,
10
);
if
(
!
isNaN
(
statusNum
))
{
if
(
statusNum
!==
0
)
{
if
(
!
isNaN
(
statusNum
))
{
statusNotZero
++
;
if
(
statusNum
!==
0
)
{
}
statusNotZero
++
;
if
(
statusNum
===
2
)
{
}
statusEqualsTwo
++
;
if
(
statusNum
===
2
)
{
}
statusEqualsTwo
++
;
}
}
});
}
});
});
});
return
{
statusNotZero
,
return
{
statusEqualsTwo
,
statusNotZero
,
};
statusEqualsTwo
,
},
};
typeSubmit
(
originData
)
{
},
return
originData
.
reduce
((
acc
,
curr
)
=>
{
typeSubmit
(
originData
)
{
return
(
return
originData
.
reduce
((
acc
,
curr
)
=>
{
acc
+
return
(
curr
.
position
.
reduce
((
innerAcc
,
innerCurr
)
=>
{
acc
+
return
innerCurr
.
status
===
0
?
innerAcc
+
1
:
innerAcc
;
curr
.
position
.
reduce
((
innerAcc
,
innerCurr
)
=>
{
},
0
)
return
innerCurr
.
status
===
0
?
innerAcc
+
1
:
innerAcc
;
);
},
0
)
},
0
);
);
},
},
0
);
// 检查是否存在异常
},
checkInspectionResult
(
arr
)
{
// 检查是否存在异常
return
!
arr
.
some
((
obj
)
=>
obj
.
inspectionResult
===
1
);
checkInspectionResult
(
arr
)
{
},
return
!
arr
.
some
((
obj
)
=>
obj
.
inspectionResult
===
1
);
// 提交
},
async
submit
(
isSubmit
=
1
)
{
// 提交
// 校验是否通过
async
submit
(
isSubmit
=
1
)
{
if
(
isSubmit
&&
!
this
.
isAllTabValid
().
valid
)
{
// 校验是否通过
uni
.
showToast
({
if
(
isSubmit
&&
!
this
.
isAllTabValid
().
valid
)
{
title
:
"请填写完整必填项"
,
uni
.
showToast
({
icon
:
"none"
,
title
:
"请填写完整必填项"
,
});
icon
:
"none"
,
return
false
;
});
}
return
false
;
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
}
// const all_data = this.$store.state.all_data; //获取全部数据
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
let
logContent
=
""
;
// const all_data = this.$store.state.all_data; //获取全部数据
console
.
log
(
"this.uid"
,
this
.
uid
);
let
logContent
=
""
;
console
.
log
(
"all_data"
,
this
.
all_data
);
console
.
log
(
"this.uid"
,
this
.
uid
);
console
.
log
(
"all_data"
,
this
.
all_data
);
// 写数据到indexedDB
// 处理数据
// 写数据到indexedDB
const
send
=
dataToSql
(
params
);
// 处理数据
let
api
;
const
send
=
dataToSql
(
params
);
if
(
this
.
uid
)
{
let
api
;
send
.
id
=
this
.
uid
if
(
this
.
uid
)
{
api
=
inspectApi
.
update
send
.
id
=
this
.
uid
;
}
else
{
api
=
inspectApi
.
update
;
api
=
inspectApi
.
save
}
else
{
}
api
=
inspectApi
.
save
;
try
{
}
let
saveRes
=
await
api
(
send
)
try
{
if
(
this
.
uid
)
{
let
saveRes
=
await
api
(
send
);
const
index
=
this
.
all_data
.
findIndex
(
if
(
this
.
uid
)
{
(
element
)
=>
element
.
uid
==
this
.
uid
const
index
=
this
.
all_data
.
findIndex
(
);
(
element
)
=>
element
.
uid
==
this
.
uid
params
.
uid
=
this
.
uid
;
);
params
.
uid
=
this
.
uid
;
this
.
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
this
.
all_data
[
index
]
=
params
;
LOG_TYPE_ENUM
.
edit
,
logContent
=
getLogContent
(
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
LOG_TYPE_ENUM
.
edit
,
"巡检模块"
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
);
"巡检模块"
}
else
{
);
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
}
else
{
this
.
all_data
.
push
(
params
);
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
logContent
=
getLogContent
(
this
.
all_data
.
push
(
params
);
LOG_TYPE_ENUM
.
add
,
logContent
=
getLogContent
(
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
LOG_TYPE_ENUM
.
add
,
"巡检模块"
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
);
"巡检模块"
}
);
// 更新巡检list
}
const
userInfo
=
this
.
userInfo
;
// 更新巡检list
console
.
log
(
"all_data存储"
,
this
.
all_data
);
const
userInfo
=
this
.
userInfo
;
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
this
.
all_data
);
console
.
log
(
"all_data存储"
,
this
.
all_data
);
const
inspectList
=
this
.
all_data
.
filter
(
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
this
.
all_data
);
(
item
)
=>
item
.
createByName
==
userInfo
.
user
const
inspectList
=
this
.
all_data
.
filter
(
);
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
console
.
log
(
"inspectList"
,
inspectList
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
console
.
log
(
"inspectList"
,
inspectList
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
// 更新日志
logContent
.
inspectionType
=
params
.
inspectionType
;
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
logContent
.
inspectionType
=
params
.
inspectionType
;
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
log_list
.
push
(
logContent
);
addLog
(
log_list
).
then
((
res
)
=>
{
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
console
.
log
(
"日志文件写入成功"
);
addLog
(
log_list
).
then
((
res
)
=>
{
});
console
.
log
(
"日志文件写入成功"
);
// 清空基础缓存信息
});
// this.$store.commit("SET_TEMP_DATA", {}); // 缓存[巡检信息]
// 清空基础缓存信息
uni
.
showToast
({
// this.$store.commit("SET_TEMP_DATA", {}); // 缓存[巡检信息]
title
:
isSubmit
?
"提交成功1"
:
"保存草稿成功"
,
uni
.
showToast
({
icon
:
"success"
,
title
:
isSubmit
?
"提交成功1"
:
"保存草稿成功"
,
});
icon
:
"success"
,
uni
.
navigateTo
({
});
url
:
`/pages/shaftInspection/shaftInspectionList?uid=
${
this
.
uid
?
this
.
uid
:
saveRes
.
lastInsertId
}
&backValue=
${
this
.
backValue
}
`
,
uni
.
navigateTo
({
});
url
:
`/pages/shaftInspection/shaftInspectionList?uid=
${
}
catch
(
err
)
{
this
.
uid
?
this
.
uid
:
saveRes
.
lastInsertId
console
.
log
(
'err'
,
err
)
}
&backValue=
${
this
.
backValue
}
`
,
}
});
}
catch
(
err
)
{
},
console
.
log
(
"err"
,
err
);
// 检查所有Tab 的必填项是否填写完整
}
isAllTabValid
()
{
},
// 遍历所有巡检项
// 检查所有Tab 的必填项是否填写完整
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
isAllTabValid
()
{
const
item
=
this
.
list
[
i
];
// 遍历所有巡检项
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
// 1. 检查是否填写了巡检结论
const
item
=
this
.
list
[
i
];
if
(
item
.
inspectionResult
===
null
||
// 1. 检查是否填写了巡检结论
item
.
inspectionResult
===
undefined
if
(
)
{
item
.
inspectionResult
===
null
||
return
{
item
.
inspectionResult
===
undefined
valid
:
false
,
)
{
message
:
`请填写【
${
this
.
tabs
[
i
].
label
}
】的巡检结论`
,
return
{
tabIndex
:
i
,
valid
:
false
,
};
message
:
`请填写【
${
this
.
tabs
[
i
].
label
}
】的巡检结论`
,
}
tabIndex
:
i
,
// 如果巡检结论为正常,则不对摘要和现场照片做必填校验
};
if
(
item
.
inspectionResult
===
0
)
{
}
continue
// 如果巡检结论为正常,则不对摘要和现场照片做必填校验
}
if
(
item
.
inspectionResult
===
0
)
{
// 2. 检查是否填写了情况摘要
continue
;
if
(
!
item
.
conclusion
||
item
.
conclusion
.
trim
()
===
""
)
{
}
return
{
// 2. 检查是否填写了情况摘要
valid
:
false
,
if
(
!
item
.
conclusion
||
item
.
conclusion
.
trim
()
===
""
)
{
message
:
`请填写【
${
this
.
tabs
[
i
].
label
}
】的情况摘要`
,
return
{
tabIndex
:
i
,
valid
:
false
,
};
message
:
`请填写【
${
this
.
tabs
[
i
].
label
}
】的情况摘要`
,
}
tabIndex
:
i
,
};
// 3. 如果是异常情况,检查是否上传了照片
}
if
(
item
.
inspectionResult
===
1
&&
// 3. 如果是异常情况,检查是否上传了照片
(
!
item
.
photos
||
item
.
photos
.
length
===
0
)
if
(
)
{
item
.
inspectionResult
===
1
&&
return
{
(
!
item
.
photos
||
item
.
photos
.
length
===
0
)
valid
:
false
,
)
{
message
:
`【
${
this
.
tabs
[
i
].
label
}
】为异常情况,必须上传现场照片`
,
return
{
tabIndex
:
i
,
valid
:
false
,
};
message
:
`【
${
this
.
tabs
[
i
].
label
}
】为异常情况,必须上传现场照片`
,
}
tabIndex
:
i
,
}
};
}
// 所有检查都通过
}
return
{
valid
:
true
,
// 所有检查都通过
message
:
""
,
return
{
};
valid
:
true
,
},
message
:
""
,
// 检查当前 Tab 的必填项是否填写完整
};
// 下一项
},
nextTab
()
{
// 检查当前 Tab 的必填项是否填写完整
// if (!this.isCurrentTabValid()) {
// 下一项
// uni.showToast({
nextTab
()
{
// title: "请填写完整必填项",
// if (!this.isCurrentTabValid()) {
// icon: "none",
// uni.showToast({
// });
// title: "请填写完整必填项",
// return false;
// icon: "none",
// }
// });
this
.
tabs
[
this
.
activeTab
].
status
=
// return false;
this
.
list
[
this
.
activeTab
].
inspectionResult
===
0
?
"1"
:
"2"
;
// 更新当前 Tab 的数据
// }
if
(
this
.
activeTab
===
2
)
{
this
.
tabs
[
this
.
activeTab
].
status
=
this
.
isSubmitEnabled
=
true
;
this
.
list
[
this
.
activeTab
].
inspectionResult
===
0
?
"1"
:
"2"
;
// 更新当前 Tab 的数据
}
else
{
if
(
this
.
activeTab
===
2
)
{
this
.
switchTab
(
this
.
activeTab
+
1
);
this
.
isSubmitEnabled
=
true
;
}
}
else
{
},
this
.
switchTab
(
this
.
activeTab
+
1
);
// 切换 Tab
}
switchTab
(
index
)
{
},
this
.
activeTab
=
index
;
// 切换 Tab
this
.
updateCurrentTabData
();
switchTab
(
index
)
{
},
this
.
activeTab
=
index
;
// 显示弹窗
this
.
updateCurrentTabData
();
showPopup
(
index
)
{
},
this
.
currentIndex
=
index
;
// 显示弹窗
this
.
$refs
.
customPopup
.
open
();
showPopup
(
item
)
{
},
console
.
log
(
item
);
// 处理弹窗确认
this
.
$refs
.
customPopup
.
open
(
item
);
handlePopupConfirm
(
summary
)
{
},
this
.
list
[
this
.
activeTab
].
conclusion
=
summary
;
// 回显到文字显示区域
// 处理弹窗确认
},
handlePopupConfirm
(
summary
)
{
// 设置巡检结论
this
.
list
[
this
.
activeTab
].
conclusion
=
summary
;
// 回显到文字显示区域
setInspectionResult
(
value
)
{
},
console
.
log
(
"value"
,
value
);
// 设置巡检结论
this
.
inspectionResult
=
value
;
setInspectionResult
(
value
)
{
this
.
list
[
this
.
activeTab
].
inspectionResult
=
value
;
// 更新当前 Tab 的数据
console
.
log
(
"value"
,
value
);
this
.
tabs
[
this
.
activeTab
].
status
=
value
===
0
?
"1"
:
"2"
;
// 更新当前 Tab 的数据
this
.
inspectionResult
=
value
;
},
this
.
list
[
this
.
activeTab
].
inspectionResult
=
value
;
// 更新当前 Tab 的数据
// 返回
this
.
tabs
[
this
.
activeTab
].
status
=
value
===
0
?
"1"
:
"2"
;
// 更新当前 Tab 的数据
back
()
{
},
uni
.
navigateTo
({
// 返回
url
:
`/pages/shaftInspection/shaftInspectionList?uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
back
()
{
});
uni
.
navigateTo
({
},
url
:
`/pages/shaftInspection/shaftInspectionList?uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
// 关闭弹窗
});
closePopup
()
{
},
this
.
switchTab
((
this
.
activeTab
+
1
)
%
this
.
tabs
.
length
);
// 关闭弹窗
},
closePopup
()
{
},
this
.
switchTab
((
this
.
activeTab
+
1
)
%
this
.
tabs
.
length
);
};
},
</
script
>
},
<
style
scoped
lang=
"less"
>
};
.uni-nav-bar-text {
</
script
>
height: 28.8px;
<
style
scoped
lang=
"less"
>
width: 28.8px;
.uni-nav-bar-text {
background: #ffffff;
height: 28.8px;
border: 0.32px solid rgba(224, 224, 224, 1);
width: 28.8px;
border-radius: 14.4px;
background: #ffffff;
color: #333;
border: 0.32px solid rgba(224, 224, 224, 1);
display: flex;
border-radius: 14.4px;
align-items: center;
color: #333;
justify-content: center;
display: flex;
text-align: center;
align-items: center;
}
justify-content: center;
text-align: center;
.container {
}
padding: 19.2px;
height: calc(100vh - 148px);
.container {
}
padding: 19.2px;
height: calc(100vh - 148px);
.profile-section {
}
width: 100%;
margin-bottom: 10.24px;
.profile-section {
width: 100%;
.profile-box {
margin-bottom: 10.24px;
background-color: #fff;
border-radius: 7.68px;
.profile-box {
padding: 10.24px 20.48px;
background-color: #fff;
display: flex;
border-radius: 7.68px;
justify-content: space-between;
padding: 10.24px 20.48px;
align-items: center;
display: flex;
position: relative;
justify-content: space-between;
align-items: center;
.profile-left {
position: relative;
display: flex;
align-items: center;
.profile-left {
display: flex;
.avatar {
align-items: center;
position: relative;
width: 32.4px;
.avatar {
height: 32.4px;
position: relative;
border-radius: 50%;
width: 32.4px;
overflow: hidden;
height: 32.4px;
margin-right: 7.2px;
border-radius: 50%;
overflow: hidden;
image {
margin-right: 7.2px;
width: 100%;
height: 100%;
image {
}
width: 100%;
height: 100%;
.change-password {
}
position: absolute;
bottom: 0;
.change-password {
left: 0;
position: absolute;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
left: 0;
text-align: center;
right: 0;
height: 14.08px;
background-color: rgba(0, 0, 0, 0.5);
font-family: PingFangSC-Regular;
text-align: center;
font-size: 7.68px;
height: 14.08px;
color: #ffffff;
font-family: PingFangSC-Regular;
line-height: 12.8px;
font-size: 7.68px;
font-weight: 400;
color: #ffffff;
}
line-height: 12.8px;
}
font-weight: 400;
}
.info {
}
.username {
font-size: 12.8px;
.info {
color: #000000;
.username {
line-height: 17.92px;
font-size: 12.8px;
font-weight: 500;
color: #000000;
margin-bottom: 5.76px;
line-height: 17.92px;
}
font-weight: 500;
margin-bottom: 5.76px;
.number {
}
font-size: 10.24px;
color: #4a4a4a;
.number {
line-height: 17.92px;
font-size: 10.24px;
font-weight: 400;
color: #4a4a4a;
line-height: 17.92px;
.value {
font-weight: 400;
color: #000000;
}
.value {
}
color: #000000;
}
}
}
}
.action-btn {
}
width: 145.6px;
}
height: 38.4px;
.action-btn {
line-height: 38.4px;
width: 145.6px;
background: #ffffff;
height: 38.4px;
border: 0.8px solid rgba(224, 224, 224, 1);
line-height: 38.4px;
box-shadow: 0px 8px 19.2px 0px rgba(185, 185, 185, 0.24);
background: #ffffff;
border-radius: 21.6px 19.2px 19.2px 21.6px;
border: 0.8px solid rgba(224, 224, 224, 1);
font-size: 16px;
box-shadow: 0px 8px 19.2px 0px rgba(185, 185, 185, 0.24);
color: #000000;
border-radius: 21.6px 19.2px 19.2px 21.6px;
text-align: center;
font-size: 16px;
font-weight: 400;
color: #000000;
position: absolute;
text-align: center;
right: 20px;
font-weight: 400;
top: 15px;
position: absolute;
&.complete-btn {
right: 20px;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
top: 15px;
color: #ffffff;
&.complete-btn {
}
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
}
color: #ffffff;
}
}
}
}
}
.module {
}
background: #ffffff;
height: 100%;
.module {
border-radius: 9.6px;
background: #ffffff;
padding: 12.8px 20px;
height: 100%;
}
border-radius: 9.6px;
padding: 12.8px 20px;
.title-bar {
}
display: flex;
align-items: center;
.title-bar {
margin-bottom: 8px;
display: flex;
align-items: center;
.blue-line {
margin-bottom: 8px;
width: 3.2px;
height: 12.8px;
.blue-line {
background-color: #007aff;
width: 3.2px;
margin-right: 6.4px;
height: 12.8px;
}
background-color: #007aff;
margin-right: 6.4px;
.title {
}
font-size: 12.8px;
font-weight: bold;
.title {
}
font-size: 12.8px;
font-weight: bold;
.location {
}
margin-left: 6.4px;
color: #666;
.location {
}
margin-left: 6.4px;
color: #666;
.submit-btn {
}
position: absolute;
right: 19.2px;
.submit-btn {
width: 20%;
position: absolute;
background-color: #ccc;
right: 19.2px;
color: #fff;
width: 20%;
border-radius: 3.2px;
background-color: #ccc;
padding: 3.2px 6.4px;
color: #fff;
font-size: 9.6px;
border-radius: 3.2px;
padding: 3.2px 6.4px;
&.active {
font-size: 9.6px;
background-color: #007aff;
}
&.active {
}
background-color: #007aff;
}
}
}
.description {
}
font-size: 11.2px;
color: #666;
.description {
}
font-size: 11.2px;
color: #666;
.tab-buttons {
}
display: flex;
justify-content: flex-start;
.tab-buttons {
align-items: center;
display: flex;
margin-bottom: 8px;
justify-content: flex-start;
gap: 16px;
align-items: center;
}
margin-bottom: 8px;
gap: 16px;
.tip {
}
width: 100%;
height: 27.2px;
.tip {
background: rgba(55, 116, 246, 0.05);
width: 100%;
border: 0.8px solid rgba(55, 116, 246, 0.3);
height: 27.2px;
border-radius: 8px;
background: rgba(55, 116, 246, 0.05);
font-size: 11.2px;
border: 0.8px solid rgba(55, 116, 246, 0.3);
color: #4a4a4a;
border-radius: 8px;
letter-spacing: 0;
font-size: 11.2px;
line-height: 27.2px;
color: #4a4a4a;
font-weight: 400;
letter-spacing: 0;
padding: 0 9.6px;
line-height: 27.2px;
font-weight: 400;
.icon-tixing {
padding: 0 9.6px;
color: #3774f6;
font-size: 11.2px;
.icon-tixing {
margin-right: 6.4px;
color: #3774f6;
}
font-size: 11.2px;
}
margin-right: 6.4px;
}
.tab-item {
}
display: flex;
align-items: flex-start;
.tab-item {
position: relative;
display: flex;
padding: 6.4px 0;
align-items: flex-start;
cursor: pointer;
position: relative;
white-space: nowrap;
padding: 6.4px 0;
.iconfont {
cursor: pointer;
font-size: 12px;
white-space: nowrap;
margin-right: 4px;
.iconfont {
&.icon-weixunjian {
font-size: 12px;
color: #959595;
margin-right: 4px;
}
&.icon-weixunjian {
&.icon-shibai1 {
color: #959595;
color: #ff4a34;
}
}
&.icon-shibai1 {
&.icon-wancheng {
color: #ff4a34;
color: #3774f6;
}
}
&.icon-wancheng {
}
color: #3774f6;
}
.tab-icon {
}
width: 8.4px;
height: 8.4px;
.tab-icon {
margin-bottom: 3.2px;
width: 8.4px;
margin-right: 2.4px;
height: 8.4px;
}
margin-bottom: 3.2px;
margin-right: 2.4px;
.tab-text {
}
font-size: 11.2px;
color: #333;
.tab-text {
}
font-size: 11.2px;
color: #333;
&.active {
}
.tab-text {
color: #3774f6;
&.active {
}
.tab-text {
color: #3774f6;
.underline {
}
position: absolute;
bottom: 0;
.underline {
left: 50%;
position: absolute;
transform: translateX(-50%);
bottom: 0;
width: 100%;
left: 50%;
height: 1.6px;
transform: translateX(-50%);
background-color: #3774f6;
width: 100%;
}
height: 1.6px;
}
background-color: #3774f6;
}
}
}
.form-item {
}
display: flex;
align-items: center;
.form-item {
padding: 9.6px 0;
display: flex;
line-height: 28.8px;
align-items: center;
border-bottom: 0.8px solid #f2f3f5;
padding: 9.6px 0;
line-height: 28.8px;
.form-label {
border-bottom: 0.8px solid #f2f3f5;
font-size: 11.2px;
margin-right: 25.6px;
.form-label {
width: 58.4px;
font-size: 11.2px;
text-align: right;
margin-right: 25.6px;
color: #7c7c7c;
width: 58.4px;
text-align: right;
.required {
color: #7c7c7c;
color: red;
margin-right: 3.2px;
.required {
}
color: red;
}
margin-right: 3.2px;
.conclusion {
}
color: #c7c7c7;
}
font-size: 11.2px;
.conclusion {
&.have {
color: #c7c7c7;
color: #000;
font-size: 11.2px;
}
&.have {
}
color: #000;
.label {
}
font-size: 11.2px;
}
}
.label {
font-size: 11.2px;
.switch-container {
}
display: flex;
gap: 9.6px;
.switch-container {
display: flex;
.status-btn {
gap: 9.6px;
flex: 1;
padding: 5.6px 19.2px;
.status-btn {
font-size: 12.8px;
flex: 1;
color: #000000;
padding: 5.6px 19.2px;
background: #f2f2f2;
font-size: 12.8px;
text-align: center;
color: #000000;
font-weight: 400;
background: #f2f2f2;
line-height: 17.6px;
text-align: center;
border-radius: 14.4px;
font-weight: 400;
line-height: 17.6px;
&.active {
border-radius: 14.4px;
color: #ffffff;
background: #3774f6;
&.active {
border: 0.32px solid rgba(224, 224, 224, 1);
color: #ffffff;
}
background: #3774f6;
}
border: 0.32px solid rgba(224, 224, 224, 1);
}
}
}
.input-box {
}
flex: 1;
border-radius: 3.2px;
.input-box {
font-size: 12.8px;
flex: 1;
line-height: 19.2px;
border-radius: 3.2px;
}
font-size: 12.8px;
line-height: 19.2px;
.photo-limit {
}
font-size: 12.8px;
color: #959595;
.photo-limit {
line-height: 19.2px;
font-size: 12.8px;
font-weight: 400;
color: #959595;
}
line-height: 19.2px;
font-weight: 400;
.photo-container {
}
display: flex;
flex-wrap: wrap;
.photo-container {
margin-bottom: 6.4px;
display: flex;
flex-wrap: wrap;
.photo-item {
margin-bottom: 6.4px;
position: relative;
margin-right: 6.4px;
.photo-item {
margin-bottom: 6.4px;
position: relative;
margin-right: 6.4px;
.photo {
margin-bottom: 6.4px;
width: 57.6px;
height: 57.6px;
.photo {
border-radius: 3.2px;
width: 57.6px;
margin-left: 9.6px;
height: 57.6px;
}
border-radius: 3.2px;
margin-left: 9.6px;
.delete-photo {
}
position: absolute;
top: -6.4px;
.delete-photo {
right: -6.4px;
position: absolute;
background-color: #ff4d4f;
top: -6.4px;
color: #fff;
right: -6.4px;
width: 12.8px;
background-color: #ff4d4f;
height: 12.8px;
color: #fff;
border-radius: 50%;
width: 12.8px;
text-align: center;
height: 12.8px;
line-height: 12.8px;
border-radius: 50%;
font-size: 9.6px;
text-align: center;
}
line-height: 12.8px;
}
font-size: 9.6px;
}
}
}
.photo-btn {
}
background: #ffffff;
border: 0.272px solid rgba(221, 221, 221, 1);
.photo-btn {
border-radius: 1.64px;
background: #ffffff;
width: 57.6px;
border: 0.272px solid rgba(221, 221, 221, 1);
height: 57.6px;
border-radius: 1.64px;
font-size: 57.6px;
width: 57.6px;
color: #cccccc;
height: 57.6px;
text-align: center;
font-size: 57.6px;
line-height: 51.2px;
color: #cccccc;
}
text-align: center;
}
line-height: 51.2px;
}
.submit-module {
}
display: flex;
justify-content: center;
.submit-module {
position: fixed;
display: flex;
gap: 16px;
justify-content: center;
left: 50%;
position: fixed;
transform: translateX(-50%);
gap: 16px;
bottom: 25.6px;
left: 50%;
.action-btn {
transform: translateX(-50%);
width: 145.6px;
bottom: 25.6px;
height: 38.4px;
.action-btn {
line-height: 38.4px;
width: 145.6px;
background: #ffffff;
height: 38.4px;
border: 0.8px solid rgba(224, 224, 224, 1);
line-height: 38.4px;
box-shadow: 0px 8px 19.2px 0px rgba(185, 185, 185, 0.24);
background: #ffffff;
border-radius: 21.6px 19.2px 19.2px 21.6px;
border: 0.8px solid rgba(224, 224, 224, 1);
font-size: 16px;
box-shadow: 0px 8px 19.2px 0px rgba(185, 185, 185, 0.24);
color: #000000;
border-radius: 21.6px 19.2px 19.2px 21.6px;
text-align: center;
font-size: 16px;
font-weight: 400;
color: #000000;
&.complete-btn {
text-align: center;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
font-weight: 400;
color: #ffffff;
&.complete-btn {
}
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
}
color: #ffffff;
}
}
}
.popup-content {
}
background-color: white;
padding: 32px;
.popup-content {
border-radius: 8px;
background-color: white;
text-align: center;
padding: 32px;
position: relative;
border-radius: 8px;
width: 240px;
text-align: center;
position: relative;
.close-icon {
width: 240px;
position: absolute;
top: 8px;
.close-icon {
right: 8px;
position: absolute;
font-size: 16px;
top: 8px;
cursor: pointer;
right: 8px;
}
font-size: 16px;
cursor: pointer;
.icon-success {
}
font-size: 32px;
color: green;
.icon-success {
margin-bottom: 16px;
font-size: 32px;
}
color: green;
margin-bottom: 16px;
.success-text {
}
font-size: 14.4px;
margin-bottom: 16px;
.success-text {
}
font-size: 14.4px;
margin-bottom: 16px;
.next-button {
}
background-color: blue;
color: white;
.next-button {
padding: 8px 16px;
background-color: blue;
border-radius: 4px;
color: white;
cursor: pointer;
padding: 8px 16px;
font-size: 12.8px;
border-radius: 4px;
cursor: pointer;
&:hover {
font-size: 12.8px;
opacity: 0.9;
}
&:hover {
}
opacity: 0.9;
}
}
</
style
>
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论