Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
c84aa801
提交
c84aa801
authored
4月 27, 2025
作者:
zs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
保存签名照片
上级
1da6ceaf
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
12 行增加
和
7 行删除
+12
-7
signDialog.vue
components/signDialog.vue
+10
-5
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+2
-2
没有找到文件。
components/signDialog.vue
浏览文件 @
c84aa801
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
createFolder
,
copyImage
}
from
"@/utils/plus.js"
;
export
default
{
export
default
{
components
:
{},
components
:
{},
data
()
{
data
()
{
...
@@ -117,7 +118,11 @@ export default {
...
@@ -117,7 +118,11 @@ export default {
canvasId
:
"signatureCanvas"
,
canvasId
:
"signatureCanvas"
,
fileType
:
'jpg'
,
// 不使用png是因为预览的时候黑底,字也是黑色,导致看不见图片签字
fileType
:
'jpg'
,
// 不使用png是因为预览的时候黑底,字也是黑色,导致看不见图片签字
success
:
async
(
res
)
=>
{
success
:
async
(
res
)
=>
{
const
tempFilePath
=
res
.
tempFilePath
;
const
tempFilePath
=
res
.
tempFilePath
;
await
createFolder
(
"data/sign"
);
const
fileName
=
tempFilePath
.
split
(
"/"
).
pop
();
const
targetPath
=
`_documents/data/sign/
${
fileName
}
`
;
const
savedPath
=
await
copyImage
(
tempFilePath
,
targetPath
);
// 存储照片到本地
// 存储照片到本地
// uni.saveImageToPhotosAlbum({
// uni.saveImageToPhotosAlbum({
// filePath: tempFilePath,
// filePath: tempFilePath,
...
@@ -127,15 +132,15 @@ export default {
...
@@ -127,15 +132,15 @@ export default {
// fail: function (err) {
// fail: function (err) {
// console.error("保存图片到相册失败:", err);
// console.error("保存图片到相册失败:", err);
// },
// },
// });
// });
const
base64
=
await
this
.
convertFileToBase64
(
tempFilePath
);
// console.log("base64",base64)
// console.log("base64",base64)
// 这里可以将 tempFilePath 上传到服务器或进行其他处理
// 这里可以将 tempFilePath 上传到服务器或进行其他处理
uni
.
showToast
({
uni
.
showToast
({
title
:
"签字已保存"
,
title
:
"签字已保存"
,
icon
:
"success"
,
icon
:
"success"
,
});
});
this
.
$emit
(
"confirm"
,
base64
);
this
.
$emit
(
"confirm"
,
savedPath
);
this
.
close
();
this
.
close
();
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
c84aa801
...
@@ -330,7 +330,7 @@ export default {
...
@@ -330,7 +330,7 @@ export default {
this
.
backValue
=
this
.
options
.
backValue
||
""
;
this
.
backValue
=
this
.
options
.
backValue
||
""
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
uid
=
this
.
options
.
uid
||
""
;
this
.
uid
=
this
.
options
.
uid
||
""
;
this
.
value
=
this
.
options
.
value
||
"1"
;
this
.
value
=
this
.
options
.
value
||
"1"
;
},
},
onShow
()
{
onShow
()
{
// 已经签名不触发更新,主要用于图片预览关闭后会触发onShow
// 已经签名不触发更新,主要用于图片预览关闭后会触发onShow
...
@@ -356,7 +356,7 @@ export default {
...
@@ -356,7 +356,7 @@ export default {
this
.
listData
=
this
.
listFormat
(
detailsInfo
.
originData
);
this
.
listData
=
this
.
listFormat
(
detailsInfo
.
originData
);
this
.
detailsInfo
=
detailsInfo
;
this
.
detailsInfo
=
detailsInfo
;
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
this
.
inspectionNumber
=
detailsInfo
.
inspectionNumber
;
this
.
inspectionCode
=
`JFXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
this
.
inspectionCode
=
`JFXJ
${
moment
().
format
(
"yyyyMMDDHHmmss"
)}${
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
Math
.
floor
(
Math
.
random
()
*
900
)
+
100
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论