Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
f1ef196d
提交
f1ef196d
authored
4月 08, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add qt
上级
691cf0cd
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
118 行增加
和
128 行删除
+118
-128
qt.vue
pages/inspectionContent/components/qt.vue
+6
-9
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+63
-49
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+48
-70
shared.js
pages/inspectionContent/shared.js
+1
-0
没有找到文件。
pages/inspectionContent/components/qt.vue
浏览文件 @
f1ef196d
...
@@ -18,8 +18,11 @@
...
@@ -18,8 +18,11 @@
<CommonUpload
<CommonUpload
v-model=
"item.photos"
v-model=
"item.photos"
:max-count=
"9999"
:max-count=
"9999"
@
change
=
"onPhotoChange"
@
input
=
"onPhotoChange"
>
>
<template
#
tip
>
请对检查项进行拍照留存。发现“异常、告警”时,需拍照留存。
</
template
>
</CommonUpload>
</CommonUpload>
</view>
</view>
</view>
</view>
...
@@ -112,10 +115,7 @@ export default {
...
@@ -112,10 +115,7 @@ export default {
// 处理弹窗确认
// 处理弹窗确认
handlePopupConfirm
(
summary
)
{
handlePopupConfirm
(
summary
)
{
this
.
itemData
.
detail
[
this
.
currentIndex
].
conclusion
=
summary
;
// 回显到文字显示区域
this
.
itemData
.
detail
[
this
.
currentIndex
].
conclusion
=
summary
;
// 回显到文字显示区域
this
.
$emit
(
"sync"
,
{
this
.
$emit
(
"sync"
,
this
.
itemData
);
conclusion
:
summary
,
photos
:
this
.
itemData
.
detail
[
this
.
currentIndex
].
photos
,
});
},
},
// 处理】数据
// 处理】数据
getFromData
()
{
getFromData
()
{
...
@@ -163,10 +163,7 @@ export default {
...
@@ -163,10 +163,7 @@ export default {
},
},
onPhotoChange
(
val
)
{
onPhotoChange
(
val
)
{
this
.
itemData
.
detail
[
this
.
currentIndex
].
photos
=
val
;
this
.
itemData
.
detail
[
this
.
currentIndex
].
photos
=
val
;
this
.
$emit
(
"sync"
,
{
this
.
$emit
(
"sync"
,
this
.
itemData
);
conclusion
:
this
.
itemData
.
detail
[
this
.
currentIndex
].
conclusion
,
photos
:
val
,
});
},
},
},
},
};
};
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
f1ef196d
...
@@ -85,19 +85,27 @@
...
@@ -85,19 +85,27 @@
>
>
<view
class=
"card-content"
>
<view
class=
"card-content"
>
<view
class=
"first-row"
>
<view
class=
"first-row"
>
<text
<template
v-if=
"card.isSubmit == 0"
>
v-if=
"card.status == 0"
<text
class=
"iconfont icon-weixunjian"
></text>
class=
"iconfont icon-weixunjian"
</
template
>
></text>
<
template
v-else
>
<text
<text
v-if=
"card.status == 1"
v-if=
"card.status == 0"
class=
"iconfont icon-wancheng"
class=
"iconfont icon-weixunjian"
></text>
></text>
<text
<text
v-if=
"card.status == 2"
v-if=
"card.status == 1"
class=
"iconfont icon-shibai1"
class=
"iconfont icon-wancheng"
></text>
></text>
<text
class=
"status"
>
{{
card
.
statusLable
}}
</text>
<text
v-if=
"card.status == 2"
class=
"iconfont icon-shibai1"
></text>
</
template
>
<text
class=
"status"
v-if=
"card.isSubmit == 1"
>
{{
card.statusLable
}}
</text>
<text
class=
"status"
v-else-if=
"card.isSubmit == 0"
>
草稿
</text>
</view>
</view>
<view
class=
"second-row"
>
<view
class=
"second-row"
>
<text
class=
"location"
>
{{ card.name }}
</text>
<text
class=
"location"
>
{{ card.name }}
</text>
...
@@ -205,7 +213,7 @@ import startDialog from "./components/dialog.vue";
...
@@ -205,7 +213,7 @@ import startDialog from "./components/dialog.vue";
import
assRoomApi
from
"@/api/assRoom.js"
;
import
assRoomApi
from
"@/api/assRoom.js"
;
import
inspectApi
from
"@/api/inspect"
;
import
inspectApi
from
"@/api/inspect"
;
import
{
sqlToData
}
from
"./shared"
;
import
{
sqlToData
,
dataToSql
}
from
"./shared"
;
export
default
{
export
default
{
components
:
{
components
:
{
signDialog
,
signDialog
,
...
@@ -570,44 +578,50 @@ export default {
...
@@ -570,44 +578,50 @@ export default {
return
rows
[
targetIndex
];
return
rows
[
targetIndex
];
},
},
// 处理弹窗确认
// 处理弹窗确认
handlePopupConfirm
(
s
ummary
)
{
handlePopupConfirm
(
s
ignImg
)
{
this
.
detailsInfo
.
isSign
=
this
.
isSign
=
true
;
// 回显到文字显示区域
this
.
detailsInfo
.
isSign
=
this
.
isSign
=
true
;
// 回显到文字显示区域
this
.
detailsInfo
.
signImg
=
s
ummary
;
// 回显到文字显示区域
this
.
detailsInfo
.
signImg
=
s
ignImg
;
// 回显到文字显示区域
this
.
detailsInfo
.
isSubmit
=
1
;
// 提交状态
this
.
detailsInfo
.
isSubmit
=
1
;
// 提交状态
console
.
log
(
"summary"
,
summary
);
this
.
realSave
(
this
.
detailsInfo
);
this
.
submit
(
"sign"
,
this
.
detailsInfo
.
signImg
);
},
},
// 提交
realSave
(
params
,
type
=
"sign"
)
{
submit
(
type
=
"sign"
,
value
=
""
)
{
const
send
=
dataToSql
(
params
);
const
all_data
=
this
.
all_data
;
//获取全部数据
const
api
=
this
.
uid
?
inspectApi
.
update
:
inspectApi
.
save
;
let
params
=
this
.
detailsInfo
;
api
(
this
.
uid
?
{
id
:
this
.
uid
,
...
send
}
:
send
).
then
((
res
)
=>
{
params
.
signImg
=
value
;
console
.
log
(
"保存成功"
);
console
.
log
(
"all_data"
,
all_data
);
const
index
=
all_data
.
findIndex
((
element
)
=>
element
.
uid
==
this
.
uid
);
let
logContent
=
""
;
all_data
[
index
]
=
params
;
if
(
this
.
uid
)
{
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
"数据同步"
,
"同步"
);
params
.
uid
=
this
.
uid
;
// 更新巡检list
logContent
=
getLogContent
(
console
.
log
(
"all_data存储"
,
all_data
);
LOG_TYPE_ENUM
.
edit
,
console
.
log
(
"all_data一个"
,
all_data
[
index
]);
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
"巡检模块"
const
userInfo
=
this
.
userInfo
;
);
const
inspectList
=
all_data
.
filter
(
}
else
{
(
item
)
=>
item
.
createByName
==
userInfo
.
user
this
.
uid
=
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
);
logContent
=
getLogContent
(
writeInspectionData
(
inspectList
,
userInfo
.
user
);
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
// 更新日志
"巡检模块"
const
log_list
=
this
.
$store
.
state
.
log_list
;
);
logContent
.
inspectionType
=
params
.
inspectionType
;
}
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
// 更新日志
addLog
(
log_list
).
then
((
res
)
=>
{
const
log_list
=
this
.
$store
.
state
.
log_list
;
console
.
log
(
"日志文件写入成功"
);
logContent
.
inspectionType
=
params
.
inspectionType
;
});
log_list
.
push
(
logContent
);
uni
.
showToast
({
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
title
:
type
==
"sign"
?
"签字成功"
:
"同步成功"
,
icon
:
"success"
,
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
uni
.
showToast
({
title
:
type
==
"sign"
?
"签字成功"
:
"同步成功"
,
icon
:
"success"
,
});
});
});
},
},
back
()
{
back
()
{
...
...
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
f1ef196d
...
@@ -167,6 +167,7 @@ import xfxt from "./components/xfxt.vue"; //消防系统
...
@@ -167,6 +167,7 @@ import xfxt from "./components/xfxt.vue"; //消防系统
import
xlqk
from
"./components/xlqk.vue"
;
//线路情况
import
xlqk
from
"./components/xlqk.vue"
;
//线路情况
import
qt
from
"./components/qt.vue"
;
//其它
import
qt
from
"./components/qt.vue"
;
//其它
import
startDialog
from
"./components/dialog.vue"
;
import
startDialog
from
"./components/dialog.vue"
;
import
{
cloneDeep
}
from
"lodash"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -487,15 +488,51 @@ export default {
...
@@ -487,15 +488,51 @@ export default {
return
true
;
return
true
;
}
}
}
}
// 所有 inspectionResult 都为 0,返回 false(正常)
// 所有 inspectionResult 都为 0,返回 false(正常)
return
false
;
return
false
;
},
},
realSave
(
data
)
{
realSave
(
params
,
isSubmit
)
{
const
send
=
dataToSql
(
data
);
const
send
=
dataToSql
(
params
);
const
api
=
this
.
uid
?
inspectApi
.
update
:
inspectApi
.
save
;
const
api
=
this
.
uid
?
inspectApi
.
update
:
inspectApi
.
save
;
api
(
this
.
uid
?
{
id
:
this
.
uid
,
...
send
}
:
send
).
then
((
res
)
=>
{
api
(
this
.
uid
?
{
id
:
this
.
uid
,
...
send
}
:
send
).
then
((
res
)
=>
{
console
.
log
(
"保存成功"
);
console
.
log
(
"保存成功"
);
let
logContent
=
""
;
if
(
this
.
uid
)
{
params
.
uid
=
this
.
uid
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
this
.
uid
=
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
logContent
.
inspectionType
=
params
.
inspectionType
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
if
(
isSubmit
)
{
this
.
startDialog
();
}
else
{
uni
.
showToast
({
title
:
"暂存成功"
,
icon
:
"none"
,
});
}
});
});
},
},
// 提交
// 提交
...
@@ -512,70 +549,13 @@ export default {
...
@@ -512,70 +549,13 @@ export default {
}
}
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
console
.
log
(
"提交时获取一次"
,
params
);
console
.
log
(
"提交时获取一次"
,
params
);
this
.
realSave
(
params
,
isSubmit
);
this
.
realSave
(
params
);
// const all_data = this.$store.state.all_data; //获取全部数据
let
logContent
=
""
;
console
.
log
(
"all_data"
,
this
.
all_data
);
if
(
this
.
uid
)
{
const
index
=
this
.
all_data
.
findIndex
(
(
element
)
=>
element
.
uid
==
this
.
uid
);
params
.
uid
=
this
.
uid
;
this
.
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
this
.
uid
=
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
this
.
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
// 更新巡检list
const
userInfo
=
this
.
userInfo
;
console
.
log
(
"all_data存储"
,
this
.
all_data
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
this
.
all_data
);
const
inspectList
=
this
.
all_data
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
console
.
log
(
"inspectList"
,
inspectList
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
logContent
.
inspectionType
=
params
.
inspectionType
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
// 清空基础缓存信息
// this.$store.commit("SET_TEMP_DATA", {}); // 缓存[巡检信息]
// uni.showToast({
// title: isSubmit ? "提交成功" : "保存草稿成功",
// icon: "success",
// });
if
(
isSubmit
)
{
this
.
startDialog
();
}
else
{
uni
.
showToast
({
title
:
"暂存成功"
,
icon
:
"none"
,
});
}
},
},
startDialog
()
{
startDialog
()
{
let
allIsSubmitOne
=
this
.
listData
.
every
((
item
)
=>
item
.
isSubmit
===
1
);
console
.
log
(
"startDialog"
,
this
.
listData
);
let
allIsSubmitOne
=
this
.
listData
.
every
((
item
)
=>
item
.
isSubmit
==
1
);
this
.
allIsSubmitOne
=
allIsSubmitOne
;
this
.
allIsSubmitOne
=
allIsSubmitOne
;
console
.
log
(
"是否全部完成"
,
allIsSubmitOne
);
console
.
log
(
"是否全部完成"
,
allIsSubmitOne
);
console
.
log
(
"this.listData"
,
this
.
listData
);
console
.
log
(
"this.listData"
,
this
.
listData
);
...
@@ -751,12 +731,10 @@ export default {
...
@@ -751,12 +731,10 @@ export default {
this
.
switchTab
((
this
.
activeTab
+
1
)
%
this
.
tabs
.
length
);
this
.
switchTab
((
this
.
activeTab
+
1
)
%
this
.
tabs
.
length
);
},
},
setQtValue
(
data
)
{
setQtValue
(
data
)
{
console
.
log
(
"setQtValue"
,
data
);
this
.
detailsInfo
.
originData
.
forEach
((
item
)
=>
{
this
.
detailsInfo
.
originData
.
forEach
((
item
)
=>
{
if
(
item
.
details
&&
item
.
details
.
qt
&&
item
.
details
.
qt
.
detail
)
{
if
(
item
.
details
)
{
item
.
details
.
qt
.
detail
.
forEach
((
current
)
=>
{
item
.
details
.
qt
=
data
;
item
.
conclusion
=
data
.
conclusion
;
item
.
photos
=
data
.
photos
;
});
}
}
});
});
console
.
log
(
"setQtValue"
,
this
.
detailsInfo
);
console
.
log
(
"setQtValue"
,
this
.
detailsInfo
);
...
...
pages/inspectionContent/shared.js
浏览文件 @
f1ef196d
...
@@ -63,6 +63,7 @@ export function sqlToData(sqlData) {
...
@@ -63,6 +63,7 @@ export function sqlToData(sqlData) {
originData
,
originData
,
inspectionNumber
,
inspectionNumber
,
allIsSubmitOne
,
allIsSubmitOne
,
isSign
:
!!
sqlData
.
signImg
,
};
};
return
ret
;
return
ret
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论