Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
415d4376
提交
415d4376
authored
4月 22, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: styles fix
上级
6b8010dd
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
153 行增加
和
262 行删除
+153
-262
signDialog.vue
components/signDialog.vue
+5
-1
pages.json
pages.json
+10
-2
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+136
-256
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+2
-2
shaftInspectionList.vue
pages/shaftInspection/shaftInspectionList.vue
+0
-1
没有找到文件。
components/signDialog.vue
浏览文件 @
415d4376
...
...
@@ -54,7 +54,7 @@ export default {
this
.
ctx
.
fillStyle
=
"#ffffff"
;
this
.
ctx
.
fillRect
(
0
,
0
,
this
.
canvasWidth
,
this
.
canvasHeight
);
this
.
ctx
.
setStrokeStyle
(
"#000000"
);
// 设置线条颜色
this
.
ctx
.
setLineWidth
(
2
);
// 设置线条宽度
this
.
ctx
.
setLineWidth
(
4
);
// 设置线条宽度
this
.
ctx
.
setLineCap
(
"round"
);
// 设置线条端点样式
this
.
ctx
.
setLineJoin
(
"round"
);
// 设置线条连接样式
this
.
ctx
.
draw
(
true
);
// 立即绘制背景
...
...
@@ -76,6 +76,9 @@ export default {
if
(
this
.
points
.
length
>=
2
)
{
this
.
ctx
.
beginPath
();
this
.
ctx
.
setLineWidth
(
4
);
// 设置线条宽度
this
.
ctx
.
setLineCap
(
"round"
);
// 设置线条端点样式
this
.
ctx
.
setLineJoin
(
"round"
);
// 设置线条连接样式
this
.
ctx
.
moveTo
(
this
.
points
[
this
.
points
.
length
-
2
].
x
,
this
.
points
[
this
.
points
.
length
-
2
].
y
...
...
@@ -186,6 +189,7 @@ export default {
display: flex;
align-items: center;
justify-content: center;
z-index: 5000;
.signature-canvas {
width: 761.6px;
height: 302.4px;
...
...
pages.json
浏览文件 @
415d4376
...
...
@@ -64,7 +64,11 @@
{
"path"
:
"pages/inspectionContent/inspectionContentList"
,
"style"
:
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
""
,
"app-plus"
:{
//
将回弹属性关掉
"bounce"
:
"none"
}
}
},
//
机房巡检新页面
...
...
@@ -78,7 +82,11 @@
{
"path"
:
"pages/shaftInspection/shaftInspectionList"
,
"style"
:
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
""
,
"app-plus"
:{
//
将回弹属性关掉
"bounce"
:
"none"
}
}
},
//
井道巡检新页面
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
415d4376
<
template
>
<view
class=
"container"
>
<uni-nav-bar
:fixed=
"true"
background-color=
"rgba(214, 240, 255, 0.0)"
status-bar
rightWidth=
"240"
>
<uni-nav-bar
:fixed=
"true"
background-color=
"rgba(214, 240, 255, 0.0)"
status-bar
rightWidth=
"240"
>
<block
slot=
"left"
>
<view
class=
""
@
click=
"back"
>
<text
class=
"iconfont icon-fanhui"
></text>
...
...
@@ -21,27 +16,24 @@
<view
class=
"profile-box"
>
<view
class=
"profile-left"
>
<view
class=
"avatar"
>
<image
src=
"@/static/img/add-img/defaultAvatar.png"
mode=
"aspectFit"
></image>
<image
src=
"@/static/img/add-img/defaultAvatar.png"
mode=
"aspectFit"
></image>
</view>
<view
class=
"info"
>
<view
class=
"describe"
>
<view
class=
"username"
>
{{
userInfo
.
user
}}
</view>
<view
v-if=
"abnormalLengths"
class=
"abnormal"
>
存在异常
{{
abnormalLengths
}}
项
</view
>
<view
v-if=
"abnormalLengths"
class=
"abnormal"
>
存在异常
{{
abnormalLengths
}}
项
</view>
</view>
<view
class=
"describe"
>
<view
class=
"number"
>
巡检编号:
<text
class=
"value"
>
{{
inspectionCode
}}
</text></view
>
<view
v-if=
"!!isSign"
class=
"number"
>
巡检时间:
<text
class=
"value"
>
<view
class=
"number"
>
巡检编号:
<text
class=
"value"
>
{{
inspectionCode
}}
</text>
</view>
<view
v-if=
"!!isSign"
class=
"number"
>
巡检时间:
<text
class=
"value"
>
{{
updateDate
}}
</text></view
>
</text>
</view
>
</view>
</view>
</view>
...
...
@@ -52,72 +44,46 @@
:disabled=
"!allIsSubmitOne"
class=
"record-button"
:class=
"
{
'is-disabled': !allIsSubmitOne,
'is-disabled': !allIsSubmitOne
}"
@click="toSign"
>
巡检人签字
</button>
<div
v-else
style=
"display: flex"
>
<image
style=
"width: 120px; height: 40px"
mode=
"aspectFit"
:src=
"detailsInfo.signImg"
@
click=
"previewImage([detailsInfo.signImg], 0)"
></image>
<button
v-if=
"detailsInfo.synchronization != 1"
class=
"record-button"
@
click=
"toSign"
>
重签
</button>
<image
class=
"sign-img"
mode=
"aspectFit"
:src=
"detailsInfo.signImg"
@
click=
"previewImage([detailsInfo.signImg], 0)"
></image>
<button
v-if=
"detailsInfo.synchronization != 1"
class=
"record-button"
@
click=
"toSign"
>
重签
</button>
</div>
<template
v-if=
"allIsSubmitOne"
>
<button
v-if=
"detailsInfo.synchronization != 1 && isSign"
class=
"inspection-button ml-10"
@
click=
"onSyncData(true)"
>
数据同步
</button>
<button
v-if=
"detailsInfo.synchronization != 1 && isSign"
class=
"inspection-button ml-10"
@
click=
"onSyncData(true)"
>
数据同步
</button>
</
template
>
</view>
</view>
</view>
<view
class=
"box"
v-if=
"!isSign"
>
<view
class=
"bar"
>
<view
class=
"title"
>
巡检进度
</view>
<view
class=
"title"
>
巡检进度
</view>
<view
class=
"dai"
>
待巡检
<text
class=
"num"
>
{{ listData.length - inspectionNumber }}
</text
>
个机房
</view
>
<text
class=
"num"
>
{{ listData.length - inspectionNumber }}
</text>
个机房
</view
>
<view
class=
"yi"
>
已完成
<text
class=
"num"
>
{{ inspectionNumber }}
</text
>
个机房
</view
>
已完成
<text
class=
"num"
>
{{ inspectionNumber }}
</text>
个机房
</view>
</view>
</view>
<view
v-if=
"!isSign"
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=
"startDialog(card.name, card.jfType, card.value, false)"
>
<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=
"startDialog(card.name, card.jfType, card.value, false)"
>
<view
class=
"card"
:class=
"{
status1: card.status == 1,
status2: card.status == 2,
active: value === card.value,
active: value === card.value
}"
>
<view
class=
"card-content"
>
...
...
@@ -126,18 +92,9 @@
<text
class=
"iconfont icon-weixunjian"
></text>
</
template
>
<
template
v-else
>
<text
v-if=
"card.status == 0"
class=
"iconfont icon-weixunjian"
></text>
<text
v-if=
"card.status == 1"
class=
"iconfont icon-wancheng"
></text>
<text
v-if=
"card.status == 2"
class=
"iconfont icon-shibai1"
></text>
<text
v-if=
"card.status == 0"
class=
"iconfont icon-weixunjian"
></text>
<text
v-if=
"card.status == 1"
class=
"iconfont icon-wancheng"
></text>
<text
v-if=
"card.status == 2"
class=
"iconfont icon-shibai1"
></text>
</
template
>
<text
class=
"status"
v-if=
"card.isSubmit == 0"
>
草稿
</text>
...
...
@@ -148,69 +105,32 @@
</view>
</view>
<view
class=
"spacer-image right"
v-if=
"cardIndex < row.length - 1"
>
<image
v-if=
"inspectionNumber == 11"
class=
"img"
src=
"@/static/img/arr2.svg"
mode=
"aspectFit"
></image>
<image
v-else
class=
"img"
src=
"@/static/img/arr1.svg"
mode=
"aspectFit"
></image>
<image
v-if=
"inspectionNumber == 11"
class=
"img"
src=
"@/static/img/arr2.svg"
mode=
"aspectFit"
></image>
<image
v-else
class=
"img"
src=
"@/static/img/arr1.svg"
mode=
"aspectFit"
></image>
</view>
<view
class=
"spacer-image bottom"
v-if=
"rowIndex < rows.length - 1"
>
<view
v-if=
"
(rowIndex == 1 && cardIndex == 0) ||
(rowIndex == 0 && cardIndex == 4)
"
>
<image
v-if=
"inspectionNumber == 11"
class=
"img"
src=
"@/static/img/arr2.svg"
mode=
"aspectFit"
></image>
<image
v-else
class=
"img"
src=
"@/static/img/arr1.svg"
mode=
"aspectFit"
></image>
<view
v-if=
"(rowIndex == 1 && cardIndex == 0) || (rowIndex == 0 && cardIndex == 4)"
>
<image
v-if=
"inspectionNumber == 11"
class=
"img"
src=
"@/static/img/arr2.svg"
mode=
"aspectFit"
></image>
<image
v-else
class=
"img"
src=
"@/static/img/arr1.svg"
mode=
"aspectFit"
></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view
></view>
<view
v-else
class=
"card-box detail"
>
<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-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"
:class=
"{
active: value === card.value,
warning: card.statusLable == '巡检异常',
warning: card.statusLable == '巡检异常'
}"
>
<view
class=
"card-content"
>
<view
class=
"first-row"
>
<image
class=
"icon"
src=
"@/static/img/add-img/home1.png"
></image>
<image
class=
"icon"
src=
"@/static/img/add-img/home1.png"
></image>
<text
class=
"status"
>
{{ card.statusLable }}
</text>
</view>
<view
class=
"second-row"
>
...
...
@@ -220,52 +140,39 @@
</view>
</view>
</view>
<detail
ref=
"detail"
:jfType=
"jfType"
:detailsItem=
"detailsItem"
></detail
>
</view>
<detail
ref=
"detail"
:jfType=
"jfType"
:detailsItem=
"detailsItem"
></detail>
</view>
<view
v-if=
"!isSign"
class=
"submit-module"
>
<view
class=
"action-btn"
@
click=
"startDialogBtn()"
>
开始巡检
</view>
</view>
<signDialog
ref=
"signDialog"
@
confirm=
"handlePopupConfirm"
></signDialog>
<!-- 巡检弹窗 -->
<startDialog
ref=
"startDialog"
:startDialogData=
"startDialogData"
@
confirm=
"handleStartDialog"
></startDialog>
<Dialog
v-show=
"isDialog"
:list=
"propList"
@
close=
"onSyncData(false)"
></Dialog>
<startDialog
ref=
"startDialog"
:startDialogData=
"startDialogData"
@
confirm=
"handleStartDialog"
></startDialog>
<Dialog
v-show=
"isDialog"
:list=
"propList"
@
close=
"onSyncData(false)"
></Dialog>
</view>
</template>
<
script
>
import
moment
from
"moment"
;
import
{
writeInspectionData
,
addLog
,
getLogContent
,
LOG_TYPE_ENUM
,
}
from
"@/utils/IoReadingAndWriting.js"
;
import
signDialog
from
"@/components/signDialog.vue"
;
import
detail
from
"./components/detail.vue"
;
import
startDialog
from
"./components/dialog.vue"
;
import
moment
from
'moment'
;
import
{
writeInspectionData
,
addLog
,
getLogContent
,
LOG_TYPE_ENUM
}
from
'@/utils/IoReadingAndWriting.js'
;
import
signDialog
from
'@/components/signDialog.vue'
;
import
detail
from
'./components/detail.vue'
;
import
startDialog
from
'./components/dialog.vue'
;
import
assRoomApi
from
"@/api/assRoom.js"
;
import
inspectApi
from
"@/api/inspect"
;
import
{
sqlToData
,
dataToSql
,
getHistoryData
}
from
"./shared"
;
import
Dialog
from
"@/pages/inspectionManagement/dialog.vue"
;
import
assRoomApi
from
'@/api/assRoom.js'
;
import
inspectApi
from
'@/api/inspect'
;
import
{
sqlToData
,
dataToSql
,
getHistoryData
}
from
'./shared'
;
import
Dialog
from
'@/pages/inspectionManagement/dialog.vue'
;
export
default
{
components
:
{
signDialog
,
detail
,
startDialog
,
Dialog
,
Dialog
},
data
()
{
return
{
inspectionCode
:
""
,
inspectionCode
:
''
,
rows
:
[],
baseInfo
:
{},
// 基础信息
inspectionNumber
:
0
,
// 已巡检的井道数量
...
...
@@ -274,23 +181,23 @@ export default {
isDisable
:
false
,
// 禁用
isSign
:
false
,
//签名状态
isSubmit
:
0
,
//提交状态
uid
:
""
,
uid
:
''
,
options
:
{},
//存储数据
backValue
:
""
,
backValue
:
''
,
all_data
:
[],
//所有数据
jfType
:
"0"
,
//机房类型
jfType
:
'0'
,
//机房类型
allIsSubmitOne
:
false
,
startDialogData
:
{
text
:
[],
isList
:
true
,
isLast
:
false
,
isLast
:
false
},
//弹窗文案
name
:
"F座3楼-内环屏蔽机房"
,
value
:
"1"
,
name
:
'F座3楼-内环屏蔽机房'
,
value
:
'1'
,
listData
:
[],
isDialog
:
false
,
propList
:
[],
did
:
""
,
// 最近7天数据的id
did
:
''
// 最近7天数据的id
};
},
computed
:
{
...
...
@@ -298,20 +205,18 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
},
updateDate
()
{
return
moment
(
Number
(
this
.
detailsInfo
.
updateTime
||
this
.
detailsInfo
.
createTime
)
).
format
(
"YYYY-MM-DD"
);
return
moment
(
Number
(
this
.
detailsInfo
.
updateTime
||
this
.
detailsInfo
.
createTime
)).
format
(
'YYYY-MM-DD'
);
},
abnormalLengths
()
{
return
this
.
detailsInfo
?.
originData
?.
filter
((
t
)
=>
t
.
status
===
2
).
length
;
},
}
},
onLoad
(
options
)
{
this
.
options
=
options
;
this
.
backValue
=
this
.
options
.
backValue
||
""
;
this
.
backValue
=
this
.
options
.
backValue
||
''
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
uid
=
this
.
options
.
uid
||
""
;
this
.
value
=
this
.
options
.
value
||
"1"
;
this
.
uid
=
this
.
options
.
uid
||
''
;
this
.
value
=
this
.
options
.
value
||
'1'
;
},
onShow
()
{
// 已经签名不触发更新,主要用于图片预览关闭后会触发onShow
...
...
@@ -328,20 +233,18 @@ export default {
getHistoryData
().
then
((
detailsInfo
)
=>
{
if
(
detailsInfo
)
{
// 处理历史数据(选项、文案、照片;异常项-不调出文案及照片)
console
.
log
(
"detailsInfo"
,
detailsInfo
);
console
.
log
(
'detailsInfo'
,
detailsInfo
);
this
.
did
=
detailsInfo
.
id
;
delete
detailsInfo
.
id
;
delete
detailsInfo
.
inspectionCode
delete
detailsInfo
.
inspectionCode
;
this
.
listData
=
this
.
listFormat
(
detailsInfo
.
originData
);
this
.
detailsInfo
=
detailsInfo
;
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
this
.
inspectionCode
=
`JFXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
;
this
.
inspectionCode
=
`JFXJ
${
moment
().
format
(
'yyyyMMDDHHmmss'
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
;
this
.
cardsInfo
=
detailsInfo
.
originData
;
this
.
isSubmit
=
0
;
this
.
isSign
=
false
;
...
...
@@ -349,17 +252,10 @@ export default {
// 默认选中第一个机房
this
.
detailsItem
=
detailsInfo
.
originData
[
0
].
details
;
if
(
this
.
detailsItem
.
afxt
&&
this
.
detailsItem
.
afxt
.
detail
&&
this
.
detailsItem
.
afxt
.
detail
[
2
].
inspectionResult
===
1
)
{
this
.
detailsItem
.
afxt
.
detail
=
this
.
detailsItem
.
afxt
.
detail
.
slice
(
0
,
3
);
}
this
.
allIsSubmitOne
=
detailsInfo
.
originData
.
every
(
(
item
)
=>
item
.
isSubmit
==
1
);
if
(
this
.
detailsItem
.
afxt
&&
this
.
detailsItem
.
afxt
.
detail
&&
this
.
detailsItem
.
afxt
.
detail
[
2
].
inspectionResult
===
1
)
{
this
.
detailsItem
.
afxt
.
detail
=
this
.
detailsItem
.
afxt
.
detail
.
slice
(
0
,
3
);
}
this
.
allIsSubmitOne
=
detailsInfo
.
originData
.
every
((
item
)
=>
item
.
isSubmit
==
1
);
let
group1
=
this
.
cardsInfo
.
slice
(
0
,
5
);
let
group2
=
this
.
cardsInfo
.
slice
(
5
,
10
);
...
...
@@ -382,21 +278,21 @@ export default {
// `请到“${this.name}”后;`,
// "点击“我已到达”开始巡检",
// ];
console
.
log
(
"this.startDialogData"
,
this
.
startDialogData
);
console
.
log
(
'this.startDialogData'
,
this
.
startDialogData
);
this
.
all_data
=
this
.
$store
.
state
.
all_data
;
},
methods
:
{
getRoomList
()
{
return
assRoomApi
.
selectRoomList
(
1
).
then
((
res
)
=>
{
console
.
log
(
"机房列表"
,
res
);
console
.
log
(
'机房列表'
,
res
);
return
res
;
});
},
listFormat
(
baseList
)
{
const
roomFeatureMap
=
{
1
:
"1"
,
2
:
"0"
,
3
:
"2"
,
1
:
'1'
,
2
:
'0'
,
3
:
'2'
};
let
list
=
baseList
.
map
((
item
,
index
)
=>
{
const
jfType
=
roomFeatureMap
[
item
.
roomFeature
];
...
...
@@ -408,10 +304,10 @@ export default {
* 前端用的:jfType 机房类型 0屏蔽 1汇聚 2电池间(1) 3电池间(2)
* roomFeature 机房类型枚举:1.汇聚机房,2.屏蔽机房,3.UPS机房,4.数据机房
*/
jfType
:
item
.
dictValue
==
"11"
?
"3"
:
jfType
,
jfType
:
item
.
dictValue
==
'11'
?
'3'
:
jfType
,
isVaild
:
item
.
isVaild
||
false
,
// 校验通过
status
:
item
.
status
||
0
,
statusLable
:
item
.
statusLable
||
"未巡检"
,
statusLable
:
item
.
statusLable
||
'未巡检'
};
});
return
list
;
...
...
@@ -422,7 +318,7 @@ export default {
let
list
=
this
.
listFormat
(
baseList
);
this
.
listData
=
this
.
deepClone
(
list
);
console
.
log
(
"this.listData"
,
this
.
listData
);
console
.
log
(
'this.listData'
,
this
.
listData
);
const
group1
=
list
.
slice
(
0
,
5
);
const
group2
=
list
.
slice
(
5
,
10
).
reverse
();
...
...
@@ -432,15 +328,13 @@ export default {
if
(
this
.
uid
)
{
this
.
inspectionCode
=
this
.
detailsInfo
.
inspectionCode
;
}
else
{
this
.
inspectionCode
=
`JFXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
;
this
.
inspectionCode
=
`JFXJ
${
moment
().
format
(
'yyyyMMDDHHmmss'
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
;
}
resolve
();
});
},
deepClone
(
target
)
{
if
(
typeof
target
!==
"object"
||
target
===
null
)
{
if
(
typeof
target
!==
'object'
||
target
===
null
)
{
return
target
;
}
...
...
@@ -467,9 +361,9 @@ export default {
return
inspectApi
.
info
(
uid
)
.
then
((
res
)
=>
{
console
.
log
(
"before sqlToData"
,
res
);
console
.
log
(
'before sqlToData'
,
res
);
const
detailsInfo
=
sqlToData
(
res
);
console
.
log
(
"getDetails"
,
detailsInfo
);
console
.
log
(
'getDetails'
,
detailsInfo
);
this
.
listData
=
this
.
listFormat
(
detailsInfo
.
originData
);
...
...
@@ -483,19 +377,10 @@ export default {
// 默认选中第一个机房
this
.
detailsItem
=
detailsInfo
.
originData
[
0
].
details
;
if
(
this
.
detailsItem
.
afxt
&&
this
.
detailsItem
.
afxt
.
detail
&&
this
.
detailsItem
.
afxt
.
detail
[
2
].
inspectionResult
===
1
)
{
this
.
detailsItem
.
afxt
.
detail
=
this
.
detailsItem
.
afxt
.
detail
.
slice
(
0
,
3
);
}
this
.
allIsSubmitOne
=
detailsInfo
.
originData
.
every
(
(
item
)
=>
item
.
isSubmit
==
1
);
if
(
this
.
detailsItem
.
afxt
&&
this
.
detailsItem
.
afxt
.
detail
&&
this
.
detailsItem
.
afxt
.
detail
[
2
].
inspectionResult
===
1
)
{
this
.
detailsItem
.
afxt
.
detail
=
this
.
detailsItem
.
afxt
.
detail
.
slice
(
0
,
3
);
}
this
.
allIsSubmitOne
=
detailsInfo
.
originData
.
every
((
item
)
=>
item
.
isSubmit
==
1
);
let
group1
=
this
.
cardsInfo
.
slice
(
0
,
5
);
let
group2
=
this
.
cardsInfo
.
slice
(
5
,
10
);
...
...
@@ -504,7 +389,7 @@ export default {
group2
=
group2
.
reverse
();
}
this
.
rows
=
[
group1
,
group2
,
group3
];
console
.
log
(
"this.cardsInfo"
,
this
.
cardsInfo
);
console
.
log
(
'this.cardsInfo'
,
this
.
cardsInfo
);
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
...
...
@@ -512,8 +397,8 @@ export default {
.
catch
((
error
)
=>
{
uni
.
showToast
({
title
:
error
.
msg
,
icon
:
"none"
,
duration
:
1000
,
icon
:
'none'
,
duration
:
1000
});
uni
.
hideLoading
();
});
...
...
@@ -527,38 +412,29 @@ export default {
if
(
this
.
detailsItem
.
afxt
.
detail
[
2
].
inspectionResult
===
1
)
{
this
.
detailsItem
.
afxt
.
detail
=
this
.
detailsItem
.
afxt
.
detail
.
slice
(
0
,
3
);
}
console
.
log
(
"this.detailsItem"
,
this
.
detailsItem
);
console
.
log
(
'this.detailsItem'
,
this
.
detailsItem
);
},
startDialogBtn
(
name
=
"F座3楼-内环屏蔽机房"
,
jfType
=
"0"
,
value
=
"1"
)
{
startDialogBtn
(
name
=
'F座3楼-内环屏蔽机房'
,
jfType
=
'0'
,
value
=
'1'
)
{
let
item
=
this
.
findTargetObject
(
this
.
listData
);
console
.
log
(
"即将操作的机房"
,
item
);
console
.
log
(
'即将操作的机房'
,
item
);
this
.
name
=
this
.
uid
?
item
.
name
:
name
;
this
.
jfType
=
this
.
uid
?
item
.
jfType
:
jfType
;
this
.
value
=
this
.
uid
?
item
.
value
:
value
;
this
.
startDialogData
.
text
=
[
`请到“
${
name
}
”后;`
,
"点击“我已到达”开始巡检"
,
];
this
.
startDialogData
.
text
=
[
`请到“
${
name
}
”后;`
,
'点击“我已到达”开始巡检'
];
this
.
name
=
name
;
this
.
jfType
=
jfType
;
this
.
value
=
value
;
this
.
$refs
.
startDialog
.
open
();
},
startDialog
(
name
=
"F座3楼-内环屏蔽机房"
,
jfType
=
"0"
,
value
=
"1"
)
{
startDialog
(
name
=
'F座3楼-内环屏蔽机房'
,
jfType
=
'0'
,
value
=
'1'
)
{
this
.
name
=
name
;
this
.
jfType
=
jfType
;
this
.
value
=
value
;
if
(
!
this
.
uid
&&
value
!=
"1"
)
{
this
.
startDialogData
.
text
=
[
`当前线路非常用巡检线路,`
,
`是否需要从“
${
this
.
name
}
”开始巡检`
,
];
if
(
!
this
.
uid
&&
value
!=
'1'
)
{
this
.
startDialogData
.
text
=
[
`当前线路非常用巡检线路,`
,
`是否需要从“
${
this
.
name
}
”开始巡检`
];
}
else
{
this
.
startDialogData
.
text
=
[
`请到“
${
this
.
name
}
”后;`
,
"点击“我已到达”开始巡检"
,
];
this
.
startDialogData
.
text
=
[
`请到“
${
this
.
name
}
”后;`
,
'点击“我已到达”开始巡检'
];
}
this
.
$refs
.
startDialog
.
open
();
},
...
...
@@ -568,14 +444,14 @@ export default {
},
// 跳转到具体的机房
toShaftInspection
(
name
,
jfType
,
value
)
{
console
.
log
(
"name, 跳转到具体的机房, value"
,
name
,
jfType
,
value
);
console
.
log
(
'name, 跳转到具体的机房, value'
,
name
,
jfType
,
value
);
uni
.
navigateTo
({
url
:
`/pages/inspectionContent/inspectionContentNew?value=
${
value
}
&inspectionCode=
${
this
.
inspectionCode
}
&jfType=
${
jfType
}
&location=
${
name
}
&uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
&did=
${
this
.
did
}
`
,
url
:
`/pages/inspectionContent/inspectionContentNew?value=
${
value
}
&inspectionCode=
${
this
.
inspectionCode
}
&jfType=
${
jfType
}
&location=
${
name
}
&uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
&did=
${
this
.
did
}
`
});
},
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/report/sampleTable?isJF=1"
,
url
:
'/pages/report/sampleTable?isJF=1'
});
},
toSign
()
{
...
...
@@ -620,14 +496,10 @@ export default {
this
.
detailsInfo
.
isSign
=
this
.
isSign
=
true
;
// 回显到文字显示区域
this
.
detailsInfo
.
signImg
=
signImg
;
// 回显到文字显示区域
this
.
detailsInfo
.
isSubmit
=
1
;
// 提交状态
const
isException
=
this
.
detailsInfo
.
originData
.
some
(
(
item
)
=>
item
.
status
==
2
);
const
isException
=
this
.
detailsInfo
.
originData
.
some
((
item
)
=>
item
.
status
==
2
);
this
.
detailsInfo
.
isException
=
isException
?
1
:
0
;
// 巡检异常
let
allIsSubmitOne
=
this
.
detailsInfo
.
originData
.
every
(
(
item
)
=>
item
.
isSubmit
===
1
);
let
allIsSubmitOne
=
this
.
detailsInfo
.
originData
.
every
((
item
)
=>
item
.
isSubmit
===
1
);
if
(
!
allIsSubmitOne
)
{
// 如果有机房没有巡检完,记录是编辑状态
...
...
@@ -638,26 +510,23 @@ export default {
this
.
realSave
(
this
.
detailsInfo
);
},
realSave
(
params
,
type
=
"sign"
)
{
realSave
(
params
,
type
=
'sign'
)
{
const
send
=
dataToSql
(
params
);
const
api
=
this
.
uid
?
inspectApi
.
update
:
inspectApi
.
save
;
const
inspectionCode
=
this
.
inspectionCode
||
`JFXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
const
inspectionCode
=
this
.
inspectionCode
||
`JFXJ
${
moment
().
format
(
'yyyyMMDDHHmmss'
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
;
send
.
inspectionCode
=
inspectionCode
send
.
inspectionCode
=
inspectionCode
;
console
.
log
(
'send'
,
send
);
api
(
this
.
uid
?
{
id
:
this
.
uid
,
...
send
}
:
send
).
then
((
res
)
=>
{
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
`巡检编号(
${
inspectionCode
}
)`
,
"同步"
);
this
.
$logApi
.
addlog
(
logContent
)
console
.
log
(
"logContent"
,
logContent
);
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
`巡检编号(
${
inspectionCode
}
)`
,
'同步'
);
this
.
$logApi
.
addlog
(
logContent
);
console
.
log
(
'logContent'
,
logContent
);
uni
.
showToast
({
title
:
type
==
"sign"
?
"签字成功"
:
"同步成功"
,
icon
:
"success"
,
title
:
type
==
'sign'
?
'签字成功'
:
'同步成功'
,
icon
:
'success'
});
if
(
!
this
.
uid
)
{
...
...
@@ -666,17 +535,16 @@ export default {
this
.
getDetails
(
res
.
lastInsertId
);
},
300
);
}
});
},
back
()
{
if
(
this
.
backValue
===
"home"
)
{
if
(
this
.
backValue
===
'home'
)
{
uni
.
navigateTo
({
url
:
"/pages/home/home"
,
url
:
'/pages/home/home'
});
}
else
{
uni
.
navigateTo
({
url
:
`/pages/inspectionManagement/index`
,
url
:
`/pages/inspectionManagement/index`
});
}
},
...
...
@@ -684,6 +552,8 @@ export default {
uni
.
previewImage
({
current
:
index
,
urls
:
images
,
success
:
(
res
)
=>
{
}
});
},
onSyncData
(
show
)
{
...
...
@@ -691,15 +561,15 @@ export default {
this
.
propList
=
[
{
...
dataToSql
(
this
.
detailsInfo
),
id
:
this
.
uid
,
},
id
:
this
.
uid
}
];
console
.
log
(
"propList"
,
this
.
propList
);
console
.
log
(
'propList'
,
this
.
propList
);
if
(
!
show
)
{
this
.
getDetails
(
this
.
uid
);
}
},
},
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
@@ -1055,4 +925,14 @@ export default {
}
}
}
.sign-img {
width: 80px;
height: 28.8px;
margin-right: 10px;
border: 1px solid #c5c5c5;
&.no-border {
border: none;
}
}
</
style
>
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
415d4376
...
...
@@ -605,14 +605,14 @@ export default {
this
.
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
`
巡检编号
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
this
.
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
`
巡检编号
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
...
...
pages/shaftInspection/shaftInspectionList.vue
浏览文件 @
415d4376
...
...
@@ -785,7 +785,6 @@ export default {
height: 28.8px;
margin-right: 10px;
border: 1px solid #ccc;
// border-right: none;
border-radius: 3px;
&.no-border {
border: none;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论