Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
df52be0f
提交
df52be0f
authored
8月 14, 2025
作者:
刘守彩
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 井道添加上一次记录
上级
ce163f36
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
199 行增加
和
21 行删除
+199
-21
base.js
api/base.js
+29
-0
inspect.js
api/inspect.js
+2
-2
manifest.json
manifest.json
+1
-1
home.vue
pages/home/home.vue
+2
-0
dialog.vue
pages/inspectionManagement/dialog.vue
+5
-1
shaftInspectionList.vue
pages/shaftInspection/shaftInspectionList.vue
+65
-6
shaftInspectionNew.vue
pages/shaftInspection/shaftInspectionNew.vue
+34
-2
shared.js
pages/shaftInspection/shared.js
+59
-7
dialog.vue
pages/synchronousManagement/dialog.vue
+2
-2
没有找到文件。
api/base.js
0 → 100644
浏览文件 @
df52be0f
import
SqlliteDbUtil
from
'@/utils/sqllitedb'
import
table
from
'./sqllite/table.js'
/**
* 清理过期的巡检列表和日志列表,防止数据过多
*/
export
async
function
cleanTimeoutDataApi
()
{
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
()
try
{
const
sql
=
`DELETE FROM
${
table
.
inspectionRecordName
}
WHERE createTime < (strftime('%s', 'now') - 90 * 24 * 60 * 60) * 1000`
;
const
ret
=
await
sqllitedb
.
executeSQL
(
sql
);
const
cleanSql
=
`
DELETE FROM
${
table
.
logListName
}
WHERE id NOT IN (
SELECT id FROM
${
table
.
logListName
}
ORDER BY time DESC
LIMIT 100
)
`
const
ret1
=
await
sqllitedb
.
executeSQL
(
cleanSql
)
console
.
log
(
'cleanTimeoutDataApi success'
,
ret
,
ret1
)
}
catch
(
e
)
{
console
.
error
(
'cleanTimeoutDataApi error'
,
e
.
message
)
}
finally
{
// await sqllitedb.closeDB();
}
}
\ No newline at end of file
api/inspect.js
浏览文件 @
df52be0f
...
@@ -4,7 +4,7 @@ import { fixNullVal } from "@/utils/common";
...
@@ -4,7 +4,7 @@ import { fixNullVal } from "@/utils/common";
// 巡检
// 巡检
export
default
{
export
default
{
async
selectLastData
(
data
)
{
async
selectLastData
(
data
,
inspectionType
=
1
)
{
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
();
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
();
try
{
try
{
let
rs
=
await
sqllitedb
.
selectSQL
(
let
rs
=
await
sqllitedb
.
selectSQL
(
...
@@ -12,7 +12,7 @@ export default {
...
@@ -12,7 +12,7 @@ export default {
FROM
${
table
.
inspectionRecordName
}
FROM
${
table
.
inspectionRecordName
}
WHERE userId = '
${
data
}
'
WHERE userId = '
${
data
}
'
AND createTime >= strftime('%s', 'now') - 7*24*60*60
AND createTime >= strftime('%s', 'now') - 7*24*60*60
AND inspectionType =
1
AND inspectionType =
'
${
inspectionType
}
'
AND (synFlag = 0 OR synFlag = 1)
AND (synFlag = 0 OR synFlag = 1)
ORDER BY createTime DESC
ORDER BY createTime DESC
LIMIT 1;`
LIMIT 1;`
...
...
manifest.json
浏览文件 @
df52be0f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"appid"
:
"__UNI__A11BFD5"
,
"appid"
:
"__UNI__A11BFD5"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"1.0.2"
,
"versionName"
:
"1.0.2"
,
"versionCode"
:
10
2
,
"versionCode"
:
10
3
,
"transformPx"
:
false
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
/*
5
+App特有相关
*/
"app-plus"
:
{
"app-plus"
:
{
...
...
pages/home/home.vue
浏览文件 @
df52be0f
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
<
script
>
<
script
>
import
{
copyDirectory
}
from
"@/utils/IoReadingAndWriting.js"
;
import
{
copyDirectory
}
from
"@/utils/IoReadingAndWriting.js"
;
import
inspectApi
from
"@/api/inspect.js"
;
import
inspectApi
from
"@/api/inspect.js"
;
import
{
cleanTimeoutDataApi
}
from
'@/api/base.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -102,6 +103,7 @@ export default {
...
@@ -102,6 +103,7 @@ export default {
},
},
created
()
{
created
()
{
console
.
log
(
this
.
$store
.
state
);
console
.
log
(
this
.
$store
.
state
);
cleanTimeoutDataApi
();
},
},
methods
:
{
methods
:
{
// 修改密码
// 修改密码
...
...
pages/inspectionManagement/dialog.vue
浏览文件 @
df52be0f
...
@@ -203,6 +203,10 @@
...
@@ -203,6 +203,10 @@
});
// 井道数据类型是 2
});
// 井道数据类型是 2
console
.
log
(
5151
,
JFXJ_DATA
,
JDXJ_DATA
);
console
.
log
(
5151
,
JFXJ_DATA
,
JDXJ_DATA
);
const
batchData
=
[...
JFXJ_DATA
,
...
JDXJ_DATA
]
const
batchData
=
[...
JFXJ_DATA
,
...
JDXJ_DATA
]
let
zipName
=
'巡检'
;
if
(
batchData
.
length
===
1
)
{
zipName
=
batchData
[
0
].
inspectionType
==
1
?
'机房巡检'
:
'井道巡检'
;
}
this
.
loading
=
true
;
this
.
loading
=
true
;
const
tmepList
=
[];
const
tmepList
=
[];
if
(
notSynchronizationList
.
length
>
1
)
{
if
(
notSynchronizationList
.
length
>
1
)
{
...
@@ -264,7 +268,7 @@
...
@@ -264,7 +268,7 @@
await
this
.
copyPhotos
();
await
this
.
copyPhotos
();
zipCompress
(
zipCompress
(
`
${
SYNCHRONIZE_DATA_PAD
}
/发送数据`
,
`
${
SYNCHRONIZE_DATA_PAD
}
/发送数据`
,
`
${
SYNCHRONIZE_DATA_PAD
}
/fssj/
${
userName
}
_
XJ
_
${
timeStr
}
.zip`
`
${
SYNCHRONIZE_DATA_PAD
}
/fssj/
${
userName
}
_
${
zipName
}
_
${
timeStr
}
.zip`
);
);
// zip
// zip
await
inspectApi
.
updateSyncData
(
ids
);
await
inspectApi
.
updateSyncData
(
ids
);
...
...
pages/shaftInspection/shaftInspectionList.vue
浏览文件 @
df52be0f
...
@@ -279,7 +279,7 @@ import inspectApi from "@/api/inspect";
...
@@ -279,7 +279,7 @@ import inspectApi from "@/api/inspect";
import
signDialog
from
"@/components/signDialog.vue"
;
import
signDialog
from
"@/components/signDialog.vue"
;
import
detail
from
"./model/detail.vue"
;
import
detail
from
"./model/detail.vue"
;
import
Dialog
from
"@/pages/inspectionManagement/dialog.vue"
;
import
Dialog
from
"@/pages/inspectionManagement/dialog.vue"
;
import
{
sqlToData
,
dataToSql
}
from
"./shared"
;
import
{
sqlToData
,
dataToSql
,
getHistoryData
}
from
"./shared"
;
export
default
{
export
default
{
components
:
{
components
:
{
signDialog
,
signDialog
,
...
@@ -315,6 +315,7 @@ export default {
...
@@ -315,6 +315,7 @@ export default {
isSign
:
false
,
//签名状态
isSign
:
false
,
//签名状态
isSubmit
:
0
,
//提交状态
isSubmit
:
0
,
//提交状态
uid
:
""
,
uid
:
""
,
did
:
''
,
// 最近7天数据的id
options
:
{},
//存储数据
options
:
{},
//存储数据
backValue
:
""
,
backValue
:
""
,
all_data
:
[],
//所有数据
all_data
:
[],
//所有数据
...
@@ -357,12 +358,71 @@ export default {
...
@@ -357,12 +358,71 @@ export default {
console
.
log
(
"options.uid"
,
this
.
options
.
uid
);
console
.
log
(
"options.uid"
,
this
.
options
.
uid
);
this
.
uid
=
this
.
options
.
uid
||
""
;
this
.
uid
=
this
.
options
.
uid
||
""
;
},
},
onShow
()
{
async
onShow
()
{
if
(
this
.
uid
)
{
// if (this.uid) {
this
.
getDetails
(
this
.
uid
);
// this.getDetails(this.uid);
// } else {
// this.init();
// }
if
(
this
.
uid
)
{
this
.
getDetails
(
this
.
uid
)
}
else
{
// 获取7日(168小时)内最后一条巡检记录回显到页面(选项、文案、照片;异常项-不调出文案及照片)
getHistoryData
().
then
((
res
)
=>
{
if
(
res
)
{
console
.
log
(
res
);
const
detailsInfo
=
sqlToData
(
res
);
this
.
did
=
detailsInfo
.
id
;
console
.
log
(
"getHistoryData sqltodata"
,
detailsInfo
);
this
.
detailsInfo
=
detailsInfo
;
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
if
(
detailsInfo
.
synchronization
==
1
)
{
// 已同步数据的查看详情时,只展示'已巡检'的井道信息,过滤未巡检的井道
let
defaultList
=
detailsInfo
.
originData
;
this
.
cardsInfo
=
this
.
tabList
=
defaultList
.
filter
((
building
)
=>
{
building
.
position
=
building
.
position
.
filter
(
(
pos
)
=>
pos
.
status
==
"1"
||
pos
.
status
==
"2"
);
return
building
.
position
.
length
;
});
}
else
{
this
.
cardsInfo
=
this
.
tabList
=
detailsInfo
.
originData
;
}
this
.
inspectionCode
=
detailsInfo
.
inspectionCode
;
this
.
isSubmit
=
0
;
// this.isSubmit = this.detailsInfo.originData
// .reduce((acc, cur) => {
// acc.push(...cur.position);
// return acc;
// }, [])
// .every((pos) => pos.isSubmit === "" || pos.isSubmit === 1);
delete
this
.
detailsInfo
.
id
;
console
.
log
(
'history detail'
,
this
.
detailsInfo
);
this
.
tabs
=
[
"所有井道"
];
this
.
tabsDetail
=
[
"所有井道"
];
this
.
isSign
=
!!
this
.
detailsInfo
.
signImg
;
this
.
cardsInfo
.
forEach
((
item
)
=>
{
this
.
tabs
.
push
(
item
.
name
);
this
.
tabsDetail
.
push
(
item
.
name
);
});
if
(
this
.
isSign
)
{
this
.
getActiveTabDetails
(
0
);
}
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
}
else
{
}
else
{
this
.
init
();
this
.
init
();
}
}
});
}
this
.
all_data
=
this
.
$store
.
state
.
all_data
;
this
.
all_data
=
this
.
$store
.
state
.
all_data
;
},
},
mounted
()
{},
mounted
()
{},
...
@@ -465,7 +525,6 @@ export default {
...
@@ -465,7 +525,6 @@ export default {
this
.
cardsInfo
=
this
.
tabList
=
detailsInfo
.
originData
;
this
.
cardsInfo
=
this
.
tabList
=
detailsInfo
.
originData
;
}
}
this
.
inspectionCode
=
detailsInfo
.
inspectionCode
;
this
.
inspectionCode
=
detailsInfo
.
inspectionCode
;
// this.cardsInfo = this.tabList = detailsInfo.originData;
this
.
isSubmit
=
this
.
detailsInfo
.
originData
this
.
isSubmit
=
this
.
detailsInfo
.
originData
.
reduce
((
acc
,
cur
)
=>
{
.
reduce
((
acc
,
cur
)
=>
{
acc
.
push
(...
cur
.
position
);
acc
.
push
(...
cur
.
position
);
...
@@ -583,7 +642,7 @@ export default {
...
@@ -583,7 +642,7 @@ export default {
// 跳转到具体的井道
// 跳转到具体的井道
toShaftInspection
(
value
,
dictValue
,
location
)
{
toShaftInspection
(
value
,
dictValue
,
location
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/shaftInspection/shaftInspectionNew?value=
${
value
}
&dictValue=
${
dictValue
}
&inspectionCode=
${
this
.
inspectionCode
}
&location=
${
location
}
&uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
`
,
url
:
`/pages/shaftInspection/shaftInspectionNew?value=
${
value
}
&dictValue=
${
dictValue
}
&inspectionCode=
${
this
.
inspectionCode
}
&location=
${
location
}
&uid=
${
this
.
uid
}
&backValue=
${
this
.
backValue
}
&did=
${
this
.
did
}
`
,
});
});
},
},
back
()
{
back
()
{
...
...
pages/shaftInspection/shaftInspectionNew.vue
浏览文件 @
df52be0f
...
@@ -169,7 +169,7 @@ import moment from "moment";
...
@@ -169,7 +169,7 @@ import moment from "moment";
import
customPopup
from
"./model/customPopup.vue"
;
import
customPopup
from
"./model/customPopup.vue"
;
import
_
from
"lodash"
;
import
_
from
"lodash"
;
import
inspectApi
from
"@/api/inspect"
;
import
inspectApi
from
"@/api/inspect"
;
import
{
sqlToData
,
dataToSql
}
from
"./shared"
;
import
{
sqlToData
,
dataToSql
,
getHistoryData
}
from
"./shared"
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -184,6 +184,7 @@ export default {
...
@@ -184,6 +184,7 @@ export default {
inspectionCode
:
""
,
inspectionCode
:
""
,
isSubmitEnabled
:
false
,
// 提交按钮是否可点击
isSubmitEnabled
:
false
,
// 提交按钮是否可点击
uid
:
""
,
uid
:
""
,
did
:
''
,
// 最近7天的井道巡检id
randomDescription
:
"这是一段随机说明文字。"
,
// 随机说明文字
randomDescription
:
"这是一段随机说明文字。"
,
// 随机说明文字
tabs
:
[
tabs
:
[
{
{
...
@@ -232,6 +233,7 @@ export default {
...
@@ -232,6 +233,7 @@ export default {
this
.
coverlist
();
this
.
coverlist
();
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
uid
=
options
.
uid
;
this
.
uid
=
options
.
uid
;
this
.
did
=
options
.
did
||
''
;
this
.
location
=
options
.
location
;
this
.
location
=
options
.
location
;
this
.
value
=
options
.
value
;
this
.
value
=
options
.
value
;
this
.
dictValue
=
options
.
dictValue
;
this
.
dictValue
=
options
.
dictValue
;
...
@@ -242,6 +244,29 @@ export default {
...
@@ -242,6 +244,29 @@ export default {
if
(
options
.
uid
)
{
if
(
options
.
uid
)
{
this
.
getDetails
(
options
.
uid
);
this
.
getDetails
(
options
.
uid
);
}
else
if
(
this
.
did
){
getHistoryData
().
then
(
res
=>
{
console
.
error
(
'getHistoryData detail'
,
res
)
const
detailsInfo
=
sqlToData
(
res
);
delete
detailsInfo
.
id
;
let
list
=
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
this
.
dictValue
-
1
]
.
details
;
this
.
detailsInfo
=
detailsInfo
;
// 未巡检需要处理默认数据结构
if
(
list
&&
list
.
length
)
{
this
.
list
=
list
;
}
this
.
inspectionResult
=
list
[
0
].
inspectionResult
;
list
.
forEach
((
item
,
index
)
=>
{
this
.
tabs
[
index
].
status
=
item
.
inspectionResult
===
0
?
"1"
:
"2"
;
});
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
})
}
else
{
}
else
{
this
.
init
();
this
.
init
();
}
}
...
@@ -390,7 +415,7 @@ export default {
...
@@ -390,7 +415,7 @@ export default {
},
},
// 处理提交数据
// 处理提交数据
getParams
(
isSubmit
)
{
getParams
(
isSubmit
)
{
if
(
this
.
uid
)
{
if
(
this
.
uid
||
this
.
did
)
{
console
.
log
(
"74"
,
this
.
value
,
this
.
dictValue
,
this
.
detailsInfo
);
console
.
log
(
"74"
,
this
.
value
,
this
.
dictValue
,
this
.
detailsInfo
);
let
posItem
=
let
posItem
=
this
.
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
this
.
detailsInfo
.
originData
[
this
.
value
-
1
].
position
[
...
@@ -593,6 +618,13 @@ export default {
...
@@ -593,6 +618,13 @@ export default {
this
.
uid
?
this
.
uid
:
saveRes
.
lastInsertId
this
.
uid
?
this
.
uid
:
saveRes
.
lastInsertId
}
&backValue=
${
this
.
backValue
}
`
,
}
&backValue=
${
this
.
backValue
}
`
,
});
});
// // 更新
// if (!this.uid) {
// this.uid = res.lastInsertId;
// setTimeout(() => {
// this.getDetails(res.lastInsertId);
// }, 300);
// }
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
"err"
,
err
);
console
.
log
(
"err"
,
err
);
}
}
...
...
pages/shaftInspection/shared.js
浏览文件 @
df52be0f
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
store
from
"@/store"
;
import
store
from
"@/store"
;
import
inspectApi
from
"@/api/inspect.js"
;
// 将现有机房巡检数据转换为SQL数据所需要格式
// 将现有机房巡检数据转换为SQL数据所需要格式
export
function
dataToSql
(
data
)
{
export
function
dataToSql
(
data
)
{
let
synFlag
=
0
;
let
synFlag
=
0
;
// 是否有草稿状态的井道
// 是否有草稿状态的井道
let
hasDraft
;
let
hasDraft
;
hasDraft
=
!
(
data
.
originData
.
reduce
((
acc
,
cur
)
=>
{
hasDraft
=
!
(
data
.
originData
.
reduce
((
acc
,
cur
)
=>
{
acc
.
push
(...
cur
.
position
)
acc
.
push
(...
cur
.
position
)
return
acc
return
acc
},
[]).
every
(
pos
=>
pos
.
isSubmit
===
''
||
pos
.
isSubmit
===
1
))
},
[]).
every
(
pos
=>
pos
.
isSubmit
===
''
||
pos
.
isSubmit
===
1
))
if
(
data
.
synchronization
===
1
)
{
if
(
data
.
synchronization
===
1
)
{
synFlag
=
1
;
synFlag
=
1
;
}
else
{
}
else
{
if
(
hasDraft
||
!
data
.
signImg
)
{
if
(
hasDraft
||
!
data
.
signImg
)
{
synFlag
=
2
synFlag
=
2
}
else
{
}
else
{
synFlag
=
0
synFlag
=
0
}
}
}
}
const
send
=
{
const
send
=
{
inspectionType
:
data
.
inspectionType
,
inspectionType
:
data
.
inspectionType
||
2
,
inspectionCode
:
data
.
inspectionCode
,
inspectionCode
:
data
.
inspectionCode
||
`JDXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-井道巡检`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-井道巡检`
,
inspectionTime
:
moment
().
valueOf
(),
inspectionTime
:
moment
().
valueOf
(),
isException
:
data
.
isException
,
// 是否异常:0 否 1 是 2 巡检中
isException
:
data
.
isException
,
// 是否异常:0 否 1 是 2 巡检中
...
@@ -52,7 +53,7 @@ export function sqlToData(sqlData) {
...
@@ -52,7 +53,7 @@ export function sqlToData(sqlData) {
synchronization
=
sqlData
.
synFlag
;
synchronization
=
sqlData
.
synFlag
;
}
}
const
originData
=
JSON
.
parse
(
sqlData
.
inspectionData
||
"{}"
);
const
originData
=
JSON
.
parse
(
sqlData
.
inspectionData
||
"{}"
);
const
inspectedItems
=
originData
.
reduce
((
acc
,
cur
)
=>
{
const
inspectedItems
=
originData
.
reduce
((
acc
,
cur
)
=>
{
acc
.
push
(...
cur
.
position
)
acc
.
push
(...
cur
.
position
)
return
acc
return
acc
},
[]).
filter
((
item
)
=>
(
item
.
status
==
1
||
item
.
status
==
2
)
&&
item
.
isSubmit
!==
0
)
},
[]).
filter
((
item
)
=>
(
item
.
status
==
1
||
item
.
status
==
2
)
&&
item
.
isSubmit
!==
0
)
...
@@ -63,8 +64,8 @@ export function sqlToData(sqlData) {
...
@@ -63,8 +64,8 @@ export function sqlToData(sqlData) {
const
ret
=
{
const
ret
=
{
id
:
sqlData
.
id
,
id
:
sqlData
.
id
,
inspectionType
:
sqlData
.
inspectionType
,
inspectionType
:
sqlData
.
inspectionType
||
2
,
inspectionCode
:
sqlData
.
inspectionCode
,
inspectionCode
:
sqlData
.
inspectionCode
,
isException
:
sqlData
.
isException
,
isException
:
sqlData
.
isException
,
signImg
:
sqlData
.
signImg
,
signImg
:
sqlData
.
signImg
,
createTime
:
sqlData
.
createTime
,
createTime
:
sqlData
.
createTime
,
...
@@ -79,3 +80,53 @@ export function sqlToData(sqlData) {
...
@@ -79,3 +80,53 @@ export function sqlToData(sqlData) {
console
.
log
(
err
)
console
.
log
(
err
)
}
}
}
}
export
function
getHistoryData
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
inspectApi
.
selectLastData
(
store
.
state
.
now_user
.
userId
,
2
).
then
((
history
)
=>
{
if
(
history
&&
history
.
length
)
{
// 处理历史数据(选项、文案、照片;异常项-不调出文案及照片)
const
data
=
setHistoryData
(
history
[
0
]);
resolve
(
data
);
}
else
{
resolve
(
null
);
}
});
});
}
function
setHistoryData
(
data
)
{
const
inspectionData
=
JSON
.
parse
(
data
.
inspectionData
||
'[]'
);
// 如果该机房有异常项,则不调出文案及照片
inspectionData
.
forEach
(
item
=>
{
item
.
position
.
forEach
((
current
)
=>
{
if
(
current
.
statusLable
==
'巡检异常'
)
{
current
.
statusLable
=
'草稿'
// 内部的异常标识
current
.
details
.
forEach
((
detail
)
=>
{
// 表单项的异常
if
(
detail
.
inspectionResult
==
1
)
{
detail
.
conclusion
=
""
;
detail
.
photos
=
[];
}
});
}
});
})
data
.
inspectionData
=
JSON
.
stringify
(
inspectionData
)
data
.
signImg
=
""
;
data
.
synFlag
=
0
data
.
inspectionCode
=
`JDXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
}
`
;
delete
data
.
createTime
delete
data
.
delFlag
;
delete
data
.
inspectionTime
;
// delete data.synFlag;
delete
data
.
updateBy
;
delete
data
.
updateTime
;
delete
data
.
userId
;
delete
data
.
userName
;
delete
data
.
recordName
;
return
data
;
}
\ No newline at end of file
pages/synchronousManagement/dialog.vue
浏览文件 @
df52be0f
...
@@ -161,11 +161,11 @@ export default {
...
@@ -161,11 +161,11 @@ export default {
const
tmepList
=
[];
const
tmepList
=
[];
if
(
JFXJ_DATA
.
length
)
{
if
(
JFXJ_DATA
.
length
)
{
let
JFXJ_DATA_FILE_NAME
=
`
${
userName
}
_
JFXJ
_
${
timeStr
}
.txt`
;
let
JFXJ_DATA_FILE_NAME
=
`
${
userName
}
_
机房巡检
_
${
timeStr
}
.txt`
;
tmepList
.
push
(
this
.
packedData
(
JDXJ_DATA
,
JFXJ_DATA_FILE_NAME
));
tmepList
.
push
(
this
.
packedData
(
JDXJ_DATA
,
JFXJ_DATA_FILE_NAME
));
}
}
if
(
JDXJ_DATA
.
length
)
{
if
(
JDXJ_DATA
.
length
)
{
let
JDXJ_DATA_FILE_NAME
=
`
${
userName
}
_
JDXJ
_
${
timeStr
}
.txt`
;
let
JDXJ_DATA_FILE_NAME
=
`
${
userName
}
_
井道巡检
_
${
timeStr
}
.txt`
;
tmepList
.
push
(
this
.
packedData
(
JDXJ_DATA
,
JDXJ_DATA_FILE_NAME
));
tmepList
.
push
(
this
.
packedData
(
JDXJ_DATA
,
JDXJ_DATA_FILE_NAME
));
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论