Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
0b54e7bf
提交
0b54e7bf
authored
3月 21, 2025
作者:
caodi\cd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:打包
上级
de073eec
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
232 行增加
和
112 行删除
+232
-112
index.vue
components/inspectionItem/index.vue
+1
-1
signDialog.vue
components/signDialog.vue
+40
-2
afxt.vue
pages/inspectionContent/components/afxt.vue
+9
-6
dczt.vue
pages/inspectionContent/components/dczt.vue
+5
-2
dlxt.vue
pages/inspectionContent/components/dlxt.vue
+18
-10
jfwsd.vue
pages/inspectionContent/components/jfwsd.vue
+5
-2
qt.vue
pages/inspectionContent/components/qt.vue
+18
-8
sbgj.vue
pages/inspectionContent/components/sbgj.vue
+11
-6
wlhj.vue
pages/inspectionContent/components/wlhj.vue
+25
-11
xfxt.vue
pages/inspectionContent/components/xfxt.vue
+5
-2
xlqk.vue
pages/inspectionContent/components/xlqk.vue
+18
-9
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+6
-1
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+14
-10
dialog.vue
pages/inspectionManagement/dialog.vue
+49
-36
index.vue
pages/inspectionManagement/index.vue
+1
-2
shaftInspectionList.vue
pages/shaftInspection/shaftInspectionList.vue
+4
-3
shaftInspectionNew.vue
pages/shaftInspection/shaftInspectionNew.vue
+1
-1
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+1
-0
systemCofig.js
utils/systemCofig.js
+1
-0
没有找到文件。
components/inspectionItem/index.vue
浏览文件 @
0b54e7bf
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
</view>
</view>
</view>
</view>
<view
class=
"img"
>
<view
class=
"img"
>
<
image
v-if=
"details.synchronization == 1"
class=
"bg-img"
src=
"../../static/img/add-img/default.png"
></image
>
<
!--
<image
v-if=
"details.synchronization == 1"
class=
"bg-img"
src=
"../../static/img/add-img/default.png"
></image>
--
>
<!--
<image
v-else
class=
"bg-img"
src=
"../../static/img/add-img/active.png"
></image>
-->
<!--
<image
v-else
class=
"bg-img"
src=
"../../static/img/add-img/active.png"
></image>
-->
</view>
</view>
</view>
</view>
...
...
components/signDialog.vue
浏览文件 @
0b54e7bf
...
@@ -112,14 +112,26 @@ export default {
...
@@ -112,14 +112,26 @@ export default {
// 生成签字图片
// 生成签字图片
uni
.
canvasToTempFilePath
({
uni
.
canvasToTempFilePath
({
canvasId
:
"signatureCanvas"
,
canvasId
:
"signatureCanvas"
,
success
:
(
res
)
=>
{
success
:
async
(
res
)
=>
{
const
tempFilePath
=
res
.
tempFilePath
;
const
tempFilePath
=
res
.
tempFilePath
;
// 存储照片到本地
uni
.
saveImageToPhotosAlbum
({
filePath
:
tempFilePath
,
success
:
function
()
{
console
.
log
(
"图片已成功保存到相册"
);
},
fail
:
function
(
err
)
{
console
.
error
(
"保存图片到相册失败:"
,
err
);
},
});
const
base64
=
await
this
.
convertFileToBase64
(
tempFilePath
);
// console.log("base64",base64)
// 这里可以将 tempFilePath 上传到服务器或进行其他处理
// 这里可以将 tempFilePath 上传到服务器或进行其他处理
uni
.
showToast
({
uni
.
showToast
({
title
:
"签字已保存"
,
title
:
"签字已保存"
,
icon
:
"success"
,
icon
:
"success"
,
});
});
this
.
$emit
(
"confirm"
,
tempFilePath
);
this
.
$emit
(
"confirm"
,
base64
);
this
.
close
();
this
.
close
();
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
...
@@ -127,6 +139,32 @@ export default {
...
@@ -127,6 +139,32 @@ export default {
},
},
});
});
},
},
// 转化为base64
convertFileToBase64
(
filePath
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
plus
.
io
.
resolveLocalFileSystemURL
(
filePath
,
function
(
entry
)
{
entry
.
file
(
function
(
file
)
{
const
reader
=
new
plus
.
io
.
FileReader
();
reader
.
onloadend
=
function
(
evt
)
{
const
base64
=
evt
.
target
.
result
;
// 获取 Base64 数据
resolve
(
base64
);
// 返回 Base64 数据
};
reader
.
readAsDataURL
(
file
);
// 读取文件并转换为 Base64
},
function
(
error
)
{
reject
(
"获取文件对象失败:"
+
error
.
message
);
}
);
},
function
(
error
)
{
reject
(
"解析文件路径失败:"
+
error
.
message
);
}
);
});
},
open
()
{
open
()
{
this
.
isOpen
=
true
;
this
.
isOpen
=
true
;
},
},
...
...
pages/inspectionContent/components/afxt.vue
浏览文件 @
0b54e7bf
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
// 父组件传递的数据
// 父组件传递的数据
defaultData
:
{
defaultData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
,
default
:
()
=>
({})
,
},
},
},
},
data
()
{
data
()
{
...
@@ -156,10 +156,13 @@ export default {
...
@@ -156,10 +156,13 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{
watch
:
{
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
defaultData
(
newVal
)
{
this
.
itemData
=
this
.
defaultData
;
// 在这里处理数据变化
}
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
}
},
},
},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
@@ -228,7 +231,7 @@ export default {
...
@@ -228,7 +231,7 @@ export default {
// 处理】数据
// 处理】数据
getFromData
()
{
getFromData
()
{
console
.
log
(
111
,
this
.
itemData
);
console
.
log
(
111
,
this
.
itemData
);
const
isValid
=
this
.
areAllObjectsValid
(
this
.
itemData
.
detail
,
2
);
//false不通过 true通过
const
isValid
=
this
.
areAllObjectsValid
(
this
.
itemData
.
detail
,
2
);
//false不通过 true通过
// const isAllOne = this.areAllInspectionResultsOne(this.itemData.detail);
// const isAllOne = this.areAllInspectionResultsOne(this.itemData.detail);
this
.
itemData
.
isValid
=
isValid
;
this
.
itemData
.
isValid
=
isValid
;
this
.
itemData
.
inspectionItem
=
this
.
inspectionItem
;
this
.
itemData
.
inspectionItem
=
this
.
inspectionItem
;
...
...
pages/inspectionContent/components/dczt.vue
浏览文件 @
0b54e7bf
...
@@ -95,7 +95,7 @@ export default {
...
@@ -95,7 +95,7 @@ export default {
// 父组件传递的数据
// 父组件传递的数据
defaultData
:
{
defaultData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
,
default
:
()
=>
({})
,
},
},
},
},
data
()
{
data
()
{
...
@@ -153,10 +153,13 @@ export default {
...
@@ -153,10 +153,13 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
this
.
itemData
=
this
.
defaultData
;
}
}
}
},
},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
...
pages/inspectionContent/components/dlxt.vue
浏览文件 @
0b54e7bf
...
@@ -77,9 +77,16 @@ export default {
...
@@ -77,9 +77,16 @@ export default {
default
:
""
,
default
:
""
,
},
},
// 父组件传递的数据
// 父组件传递的数据
item
Data
:
{
default
Data
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({
default
:
()
=>
({}),
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
itemData
:
{
isValid
:
false
,
// false是校验未通过 true是校验通过
isValid
:
false
,
// false是校验未通过 true是校验通过
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
inspectionItem
:
""
,
//巡检事项
inspectionItem
:
""
,
//巡检事项
...
@@ -109,13 +116,7 @@ export default {
...
@@ -109,13 +116,7 @@ export default {
photos
:
[],
photos
:
[],
},
},
],
],
}),
},
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
};
};
},
},
computed
:
{
computed
:
{
...
@@ -123,7 +124,14 @@ export default {
...
@@ -123,7 +124,14 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{},
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
}
},
},
methods
:
{
methods
:
{
// 拍照
// 拍照
takePhoto
(
index
)
{
takePhoto
(
index
)
{
...
...
pages/inspectionContent/components/jfwsd.vue
浏览文件 @
0b54e7bf
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
// 父组件传递的数据
// 父组件传递的数据
defaultData
:
{
defaultData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
,
default
:
()
=>
({})
,
},
},
},
},
data
()
{
data
()
{
...
@@ -134,10 +134,13 @@ export default {
...
@@ -134,10 +134,13 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
this
.
itemData
=
this
.
defaultData
;
}
}
}
},
},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
...
pages/inspectionContent/components/qt.vue
浏览文件 @
0b54e7bf
...
@@ -58,9 +58,17 @@ export default {
...
@@ -58,9 +58,17 @@ export default {
default
:
""
,
default
:
""
,
},
},
// 父组件传递的数据
// 父组件传递的数据
item
Data
:
{
default
Data
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({
default
:
()
=>
({}),
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
// 父组件传递的数据
itemData
:
{
isValid
:
true
,
// true是不校验
isValid
:
true
,
// true是不校验
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
inspectionItem
:
""
,
//巡检事项
inspectionItem
:
""
,
//巡检事项
...
@@ -74,13 +82,7 @@ export default {
...
@@ -74,13 +82,7 @@ export default {
photos
:
[],
photos
:
[],
},
},
],
],
}),
},
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
};
};
},
},
computed
:
{
computed
:
{
...
@@ -88,6 +90,14 @@ export default {
...
@@ -88,6 +90,14 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
}
}
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
...
pages/inspectionContent/components/sbgj.vue
浏览文件 @
0b54e7bf
...
@@ -43,7 +43,9 @@
...
@@ -43,7 +43,9 @@
type=
"number"
type=
"number"
placeholder=
"请输入"
placeholder=
"请输入"
maxlength=
"2"
maxlength=
"2"
/>
<text
class=
"fg"
>
至
</text><input
/>
<text
class=
"fg"
>
至
</text
><input
class=
"input"
class=
"input"
v-model=
"item.UpositonE"
v-model=
"item.UpositonE"
type=
"number"
type=
"number"
...
@@ -115,7 +117,7 @@ export default {
...
@@ -115,7 +117,7 @@ export default {
// 父组件传递的数据
// 父组件传递的数据
defaultData
:
{
defaultData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
,
default
:
()
=>
({})
,
},
},
},
},
data
()
{
data
()
{
...
@@ -149,10 +151,13 @@ export default {
...
@@ -149,10 +151,13 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{
watch
:
{
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
defaultData
(
newVal
)
{
this
.
itemData
=
this
.
defaultData
;
// 在这里处理数据变化
}
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
}
},
},
},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
...
pages/inspectionContent/components/wlhj.vue
浏览文件 @
0b54e7bf
...
@@ -77,9 +77,16 @@ export default {
...
@@ -77,9 +77,16 @@ export default {
default
:
""
,
default
:
""
,
},
},
// 父组件传递的数据
// 父组件传递的数据
item
Data
:
{
default
Data
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({
default
:
()
=>
({}),
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
itemData
:
{
isValid
:
false
,
// false是校验未通过 true是校验通过
isValid
:
false
,
// false是校验未通过 true是校验通过
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
inspectionItem
:
""
,
//巡检事项
inspectionItem
:
""
,
//巡检事项
...
@@ -115,13 +122,7 @@ export default {
...
@@ -115,13 +122,7 @@ export default {
photos
:
[],
photos
:
[],
},
},
],
],
}),
},
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
};
};
},
},
computed
:
{
computed
:
{
...
@@ -129,7 +130,20 @@ export default {
...
@@ -129,7 +130,20 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{},
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
}
}
},
async
mounted
()
{
console
.
log
(
"sdsadasd"
,
this
.
itemData
);
// if (Object.keys(this.defaultData).length !== 0) {
// this.itemData = this.defaultData;
// }
},
methods
:
{
methods
:
{
// 拍照
// 拍照
takePhoto
(
index
)
{
takePhoto
(
index
)
{
...
@@ -207,7 +221,7 @@ export default {
...
@@ -207,7 +221,7 @@ export default {
// this.itemData.status = 2; //1表示已经巡检过有异常
// this.itemData.status = 2; //1表示已经巡检过有异常
// this.itemData.statusLabel = "巡检异常";
// this.itemData.statusLabel = "巡检异常";
// }
// }
// console.log(
this.itemData);
console
.
log
(
"查看数据"
,
this
.
itemData
);
return
this
.
itemData
;
return
this
.
itemData
;
},
},
// 数据校验方法 true说明有未填项
// 数据校验方法 true说明有未填项
...
...
pages/inspectionContent/components/xfxt.vue
浏览文件 @
0b54e7bf
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
// 父组件传递的数据
// 父组件传递的数据
defaultData
:
{
defaultData
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
,
default
:
()
=>
({})
,
},
},
},
},
data
()
{
data
()
{
...
@@ -138,10 +138,13 @@ export default {
...
@@ -138,10 +138,13 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
mounted
()
{
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
this
.
itemData
=
this
.
defaultData
;
}
}
}
},
},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
...
pages/inspectionContent/components/xlqk.vue
浏览文件 @
0b54e7bf
...
@@ -77,9 +77,16 @@ export default {
...
@@ -77,9 +77,16 @@ export default {
default
:
""
,
default
:
""
,
},
},
// 父组件传递的数据
// 父组件传递的数据
item
Data
:
{
default
Data
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({
default
:
()
=>
({}),
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
itemData
:
{
isValid
:
false
,
// false是校验未通过 true是校验通过
isValid
:
false
,
// false是校验未通过 true是校验通过
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
// status: 0, 0是未巡检 1是已巡检 2巡检异常 statusLabel: "未巡检",
inspectionItem
:
""
,
//巡检事项
inspectionItem
:
""
,
//巡检事项
...
@@ -109,13 +116,7 @@ export default {
...
@@ -109,13 +116,7 @@ export default {
photos
:
[],
photos
:
[],
},
},
],
],
}),
},
},
},
data
()
{
return
{
currentIndex
:
0
,
// 当前操作的索引
photos
:
[],
};
};
},
},
computed
:
{
computed
:
{
...
@@ -123,6 +124,14 @@ export default {
...
@@ -123,6 +124,14 @@ export default {
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
watch
:
{
defaultData
(
newVal
)
{
// 在这里处理数据变化
if
(
Object
.
keys
(
this
.
defaultData
).
length
!==
0
)
{
this
.
itemData
=
this
.
defaultData
;
}
}
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
// 拍照
// 拍照
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
0b54e7bf
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
>
>
</view>
</view>
</view>
</view>
<view
v-if=
"i
sSubmit
"
class=
"profile-right"
>
<view
v-if=
"i
nspectionNumber >1
"
class=
"profile-right"
>
<button
v-if=
"!isSign"
class=
"record-button"
@
click=
"toSign"
>
<button
v-if=
"!isSign"
class=
"record-button"
@
click=
"toSign"
>
巡检人签字
巡检人签字
</button>
</button>
...
@@ -91,13 +91,18 @@
...
@@ -91,13 +91,18 @@
</view>
</view>
</view></view
</view></view
>
>
<signDialog
ref=
"signDialog"
@
confirm=
"handlePopupConfirm"
></signDialog>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
{
pad_all_inspection_position
}
from
"@/utils/dict.js"
;
import
{
pad_all_inspection_position
}
from
"@/utils/dict.js"
;
import
{
getInspectionDetails
}
from
"@/request/index.js"
;
import
{
getInspectionDetails
}
from
"@/request/index.js"
;
import
signDialog
from
"@/components/signDialog.vue"
;
export
default
{
export
default
{
components
:
{
signDialog
,
},
data
()
{
data
()
{
return
{
return
{
inspectionCode
:
""
,
inspectionCode
:
""
,
...
...
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
0b54e7bf
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
v-show=
"checkValueInArray(tabs, 'wlhj', activeTab)"
v-show=
"checkValueInArray(tabs, 'wlhj', activeTab)"
ref=
"wlhj"
ref=
"wlhj"
:inspectionItem=
"tabs[activeTab].label"
:inspectionItem=
"tabs[activeTab].label"
:defaultData=
"list.wlhj
||
{}
"
:defaultData=
"list.wlhj"
></wlhj>
></wlhj>
<!-- 安防系统 -->
<!-- 安防系统 -->
<afxt
<afxt
...
@@ -268,14 +268,9 @@ export default {
...
@@ -268,14 +268,9 @@ export default {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
detailsInfo
=
res
;
const
detailsInfo
=
res
;
console
.
log
(
"getDetails"
,
res
);
console
.
log
(
"getDetails"
,
res
);
let
list
=
detailsInfo
.
originData
[
this
.
value
-
1
].
details
;
this
.
list
=
detailsInfo
.
originData
[
this
.
value
-
1
].
details
;
console
.
log
(
"list"
,
list
);
console
.
log
(
"list"
,
this
.
list
);
// 未巡检需要处理默认数据结构
if
(
list
&&
list
.
length
)
{
this
.
list
=
list
;
}
// this.inspectionResult = list[0].inspectionResult;
// this.inspectionResult = list[0].inspectionResult;
console
.
log
(
"let list"
,
list
);
this
.
detailsInfo
=
detailsInfo
;
this
.
detailsInfo
=
detailsInfo
;
console
.
log
(
"detailsInfo"
,
detailsInfo
);
console
.
log
(
"detailsInfo"
,
detailsInfo
);
...
@@ -305,6 +300,7 @@ export default {
...
@@ -305,6 +300,7 @@ export default {
if
(
this
.
uid
)
{
if
(
this
.
uid
)
{
let
posItem
=
this
.
detailsInfo
.
originData
[
this
.
value
-
1
];
let
posItem
=
this
.
detailsInfo
.
originData
[
this
.
value
-
1
];
let
paramsObj
=
this
.
getAllChildFormData
();
//获取所有数据
let
paramsObj
=
this
.
getAllChildFormData
();
//获取所有数据
console
.
log
(
"获取数据"
,
paramsObj
)
posItem
.
details
=
paramsObj
;
posItem
.
details
=
paramsObj
;
posItem
.
isSubmit
=
isSubmit
;
posItem
.
isSubmit
=
isSubmit
;
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
...
@@ -314,10 +310,17 @@ export default {
...
@@ -314,10 +310,17 @@ export default {
posItem
.
status
=
2
;
//1表示已经巡检过有异常
posItem
.
status
=
2
;
//1表示已经巡检过有异常
posItem
.
statusLable
=
"巡检异常"
;
posItem
.
statusLable
=
"巡检异常"
;
}
}
// 使用 filter 方法筛选出 status 为 1 或 2 的对象
const
inspectedItems
=
this
.
detailsInfo
.
originData
.
filter
(
(
item
)
=>
item
.
status
===
1
||
item
.
status
===
2
);
// 获取已经巡检过的数量
this
.
detailsInfo
.
inspectionNumber
=
inspectedItems
.
length
;
// let { notZeroCount, equalTwoCount } = this.count(
// let { notZeroCount, equalTwoCount } = this.count(
// this.detailsInfo.originData
// this.detailsInfo.originData
// );
// );
// this.detailsInfo.
inspectionNumber
= notZeroCount; //巡检总数
// this.detailsInfo.
status
= notZeroCount; //巡检总数
// this.detailsInfo.isException = equalTwoCount; //异常数量
// this.detailsInfo.isException = equalTwoCount; //异常数量
console
.
log
(
"this.detailsInfo"
,
this
.
detailsInfo
);
console
.
log
(
"this.detailsInfo"
,
this
.
detailsInfo
);
this
.
detailsInfo
.
submitTime
=
moment
().
format
(
"yyyy-MM-DD"
);
// 记录提交时间
this
.
detailsInfo
.
submitTime
=
moment
().
format
(
"yyyy-MM-DD"
);
// 记录提交时间
...
@@ -339,7 +342,7 @@ export default {
...
@@ -339,7 +342,7 @@ export default {
};
};
});
});
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
tabList
=
JSON
.
parse
(
JSON
.
stringify
(
dataObj
));
let
posItem
=
tabList
[
this
.
value
];
let
posItem
=
tabList
[
this
.
value
-
1
];
posItem
.
details
=
paramsObj
;
posItem
.
details
=
paramsObj
;
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
if
(
!
this
.
checkInspectionResult
(
paramsObj
))
{
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
posItem
.
status
=
1
;
//1表示已经巡检过没有异常
...
@@ -421,6 +424,7 @@ export default {
...
@@ -421,6 +424,7 @@ export default {
return
false
;
return
false
;
}
}
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
console
.
log
(
"提交时获取一次"
,
params
)
const
all_data
=
this
.
$store
.
state
.
all_data
;
//获取全部数据
const
all_data
=
this
.
$store
.
state
.
all_data
;
//获取全部数据
let
logContent
=
""
;
let
logContent
=
""
;
console
.
log
(
"all_data"
,
all_data
);
console
.
log
(
"all_data"
,
all_data
);
...
...
pages/inspectionManagement/dialog.vue
浏览文件 @
0b54e7bf
...
@@ -77,31 +77,43 @@ export default {
...
@@ -77,31 +77,43 @@ export default {
};
};
},
},
mounted
()
{
const
temp
=
[];
this
.
list
.
forEach
((
item
)
=>
{
temp
.
push
(...(
item
.
list
||
[]));
});
this
.
notSynchronizationList
=
temp
.
filter
(
(
item
)
=>
item
.
synchronization
==
0
);
getAllInspections
().
then
((
res
)
=>
{
this
.
allList
=
res
;
});
},
watch
:
{
watch
:
{
list
(
newData
)
{
list
(
newVal
)
{
console
.
log
(
"newVal"
,
newVal
);
this
.
init
()
},
},
// async mounted() {
// const temp = [];
// this.list.forEach((item) => {
// temp.push(...(item.list || []));
// });
// console.log("this.list", this.list);
// console.log("temp", temp);
// this.notSynchronizationList = temp.filter(
// (item) => item.synchronization == 0 && item.isSign === true
// );
// getAllInspections().then((res) => {
// this.allList = res;
// });
// },
methods
:
{
init
()
{
const
temp
=
[];
const
temp
=
[];
newData
.
forEach
((
item
)
=>
{
this
.
list
.
forEach
((
item
)
=>
{
temp
.
push
(...(
item
.
list
||
[]));
temp
.
push
(...(
item
.
list
||
[]));
});
});
console
.
log
(
"this.list"
,
this
.
list
);
console
.
log
(
"temp"
,
temp
);
this
.
notSynchronizationList
=
temp
.
filter
(
this
.
notSynchronizationList
=
temp
.
filter
(
(
item
)
=>
item
.
synchronization
==
0
(
item
)
=>
item
.
synchronization
==
0
&&
item
.
isSign
===
true
);
);
getAllInspections
().
then
((
res
)
=>
{
this
.
allList
=
res
;
});
},
},
},
methods
:
{
close
()
{
close
()
{
this
.
$emit
(
"close"
);
this
.
$emit
(
"close"
);
},
},
...
@@ -113,18 +125,16 @@ export default {
...
@@ -113,18 +125,16 @@ export default {
* 读取上一次打包的文件, 复制到 [ history ] 文件夹中
* 读取上一次打包的文件, 复制到 [ history ] 文件夹中
*/
*/
clickHandle
()
{
clickHandle
()
{
if
(
this
.
loading
)
return
;
if
(
this
.
loading
)
return
;
const
directoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/发送数据`
;
const
directoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/发送数据`
;
const
targetDirectoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/history`
;
const
targetDirectoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/history`
;
checkAndCreateDirectory
(
directoryPath
).
then
(()
=>
{
checkAndCreateDirectory
(
directoryPath
).
then
(()
=>
{
copyDirectory
(
directoryPath
,
targetDirectoryPath
)
copyDirectory
(
directoryPath
,
targetDirectoryPath
)
.
then
(()
=>
{
.
then
(()
=>
{
return
deleteAllFilesInDirectory
(
directoryPath
);
return
deleteAllFilesInDirectory
(
directoryPath
);
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
coverData
();
this
.
coverData
();
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
@@ -141,25 +151,26 @@ export default {
...
@@ -141,25 +151,26 @@ export default {
const
userName
=
this
.
$store
.
state
.
now_user
.
user
;
const
userName
=
this
.
$store
.
state
.
now_user
.
user
;
const
notSynchronizationList
=
this
.
notSynchronizationList
;
const
notSynchronizationList
=
this
.
notSynchronizationList
;
const
allList
=
this
.
allList
;
const
allList
=
this
.
allList
;
console
.
log
(
"窗口allList"
,
allList
);
console
.
log
(
"窗口this.notSynchronizationList"
,
this
.
notSynchronizationList
);
let
timeStr
=
moment
().
format
(
"yyyy_MM_DD_hh_mm_ss"
);
let
timeStr
=
moment
().
format
(
"yyyy_MM_DD_hh_mm_ss"
);
const
JFXJ_DATA
=
notSynchronizationList
const
JFXJ_DATA
=
notSynchronizationList
.
filter
((
item
)
=>
item
.
inspectionType
==
1
)
.
filter
((
item
)
=>
item
.
inspectionType
==
1
)
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
return
{
return
item
;
...
item
,
originData
:
[],
};
});
// 机房数据类型是 1
});
// 机房数据类型是 1
const
JDXJ_DATA
=
notSynchronizationList
const
JDXJ_DATA
=
notSynchronizationList
.
filter
((
item
)
=>
item
.
inspectionType
==
2
)
.
filter
((
item
)
=>
item
.
inspectionType
==
2
)
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
return
item
[
item
.
inspectionCode
]
;
return
item
;
});
// 井道数据类型是 2
});
// 井道数据类型是 2
console
.
log
(
5151
,
JFXJ_DATA
,
JDXJ_DATA
);
this
.
loading
=
true
;
this
.
loading
=
true
;
const
tmepList
=
[];
const
tmepList
=
[];
...
@@ -174,6 +185,8 @@ export default {
...
@@ -174,6 +185,8 @@ export default {
tmepList
.
push
(
this
.
packedData
(
item
,
JDXJ_DATA_FILE_NAME
));
tmepList
.
push
(
this
.
packedData
(
item
,
JDXJ_DATA_FILE_NAME
));
});
});
console
.
log
(
"同步窗口"
);
console
.
log
(
"同步窗口"
,
tmepList
);
Promise
.
all
(
tmepList
)
Promise
.
all
(
tmepList
)
.
then
(()
=>
{
.
then
(()
=>
{
// 更新巡检数据状态
// 更新巡检数据状态
...
@@ -223,8 +236,7 @@ export default {
...
@@ -223,8 +236,7 @@ export default {
const
log_list
=
this
.
$store
.
state
.
log_list
;
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
addLog
(
log_list
).
then
((
res
)
=>
{});
});
// 更新同步时间
// 更新同步时间
this
.
updateSysTime
();
this
.
updateSysTime
();
...
@@ -290,12 +302,13 @@ export default {
...
@@ -290,12 +302,13 @@ export default {
console
.
log
(
"APP.vue 存储数据失败"
,
error
);
console
.
log
(
"APP.vue 存储数据失败"
,
error
);
},
},
});
});
createFileWithPlusIO
(
SYNCHRONIZE_DATA_PAD
,
USER_FILE_NAME
,
fileContent
).
then
(()
=>
{
createFileWithPlusIO
(
SYNCHRONIZE_DATA_PAD
,
USER_FILE_NAME
,
fileContent
)
console
.
log
(
"---用户数据更新成功"
)
.
then
(()
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"---用户数据更新成功"
);
console
.
log
(
"---用户数据更新失败"
,
error
)
})
.
catch
((
error
)
=>
{
})
console
.
log
(
"---用户数据更新失败"
,
error
);
});
});
});
},
},
},
},
...
...
pages/inspectionManagement/index.vue
浏览文件 @
0b54e7bf
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
>
<!-- 打包弹窗 -->
>
<!-- 打包弹窗 -->
<Dialog
<Dialog
v-show=
"isDialog && list.length"
v-show=
"isDialog && list.length"
:list=
"list"
:list
Arr
=
"list"
@
close=
"openDialog(false)"
@
close=
"openDialog(false)"
></Dialog>
></Dialog>
</view>
</view>
...
@@ -168,7 +168,6 @@ export default {
...
@@ -168,7 +168,6 @@ export default {
}
}
});
});
const
keys
=
Object
.
keys
(
tempAllData
);
const
keys
=
Object
.
keys
(
tempAllData
);
// 第二步: 根据搜索条件过滤
// 第二步: 根据搜索条件过滤
const
list
=
keys
.
map
((
key
)
=>
{
const
list
=
keys
.
map
((
key
)
=>
{
return
{
return
{
...
...
pages/shaftInspection/shaftInspectionList.vue
浏览文件 @
0b54e7bf
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
>
>
</view>
</view>
</view>
</view>
<!--
{{
isSubmit
}}
{{
isSign
}}
-->
<view
v-if=
"isSubmit"
class=
"profile-right"
>
<view
v-if=
"isSubmit"
class=
"profile-right"
>
<button
v-if=
"!isSign"
class=
"record-button"
@
click=
"toSign"
>
<button
v-if=
"!isSign"
class=
"record-button"
@
click=
"toSign"
>
巡检人签字
巡检人签字
...
@@ -283,13 +284,13 @@ export default {
...
@@ -283,13 +284,13 @@ export default {
let
params
=
this
.
detailsInfo
;
let
params
=
this
.
detailsInfo
;
params
.
signImg
=
value
;
params
.
signImg
=
value
;
console
.
log
(
"all_data"
,
all_data
);
console
.
log
(
"all_data"
,
all_data
);
console
.
log
(
"all_data"
,
all_data
);
const
index
=
all_data
.
findIndex
((
element
)
=>
element
.
uid
==
this
.
uid
);
const
index
=
all_data
.
findIndex
((
element
)
=>
element
.
uid
==
this
.
uid
);
console
.
log
(
"签字获取数据"
,
params
)
all_data
[
index
]
=
params
;
all_data
[
index
]
=
params
;
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
s
ys
,
"数据同步"
,
"同步
"
);
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
s
ign
,
"签字"
,
"机房巡检
"
);
// 更新巡检list
// 更新巡检list
console
.
log
(
"all_data存储"
,
all_data
);
console
.
log
(
"all_data存储"
,
all_data
);
console
.
log
(
"all_data一个"
,
all_data
[
index
]);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
const
inspectList
=
all_data
.
filter
(
const
inspectList
=
all_data
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
(
item
)
=>
item
.
createByName
==
userInfo
.
user
...
...
pages/shaftInspection/shaftInspectionNew.vue
浏览文件 @
0b54e7bf
...
@@ -533,7 +533,7 @@ export default {
...
@@ -533,7 +533,7 @@ export default {
});
});
// 清空基础缓存信息
// 清空基础缓存信息
this
.
$store
.
commit
(
"SET_TEMP_DATA"
,
{});
// 缓存[巡检信息]
//
this.$store.commit("SET_TEMP_DATA", {}); // 缓存[巡检信息]
uni
.
showToast
({
uni
.
showToast
({
title
:
isSubmit
?
"提交成功"
:
"保存草稿成功"
,
title
:
isSubmit
?
"提交成功"
:
"保存草稿成功"
,
icon
:
"success"
,
icon
:
"success"
,
...
...
utils/IoReadingAndWriting.js
浏览文件 @
0b54e7bf
...
@@ -25,6 +25,7 @@ export const LOG_TYPE_ENUM = {
...
@@ -25,6 +25,7 @@ export const LOG_TYPE_ENUM = {
add
:
"新增成功"
,
add
:
"新增成功"
,
photo
:
"拍照"
,
photo
:
"拍照"
,
edit
:
"编辑成功"
,
edit
:
"编辑成功"
,
sign
:
"签字"
,
darf
:
"草稿"
,
darf
:
"草稿"
,
delete
:
"删除"
,
delete
:
"删除"
,
sys
:
"同步"
,
sys
:
"同步"
,
...
...
utils/systemCofig.js
浏览文件 @
0b54e7bf
...
@@ -120,6 +120,7 @@ export function checkAndCreateDirectory(directoryPath) {
...
@@ -120,6 +120,7 @@ export function checkAndCreateDirectory(directoryPath) {
);
);
resolve
(
dirEntry
);
resolve
(
dirEntry
);
return
},
},
function
(
error
)
{
function
(
error
)
{
// 目录不存在,创建目录
// 目录不存在,创建目录
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论