Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
d191c3fa
提交
d191c3fa
authored
4月 14, 2025
作者:
zs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
edit
上级
0892dbfe
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
24 行增加
和
37 行删除
+24
-37
inspect.js
api/inspect.js
+1
-1
init.js
api/sqllite/init.js
+9
-15
dialog.vue
pages/inspectionManagement/dialog.vue
+0
-0
systemCofig.js
utils/systemCofig.js
+14
-21
没有找到文件。
api/inspect.js
浏览文件 @
d191c3fa
...
...
@@ -45,7 +45,7 @@ export default {
,inspectionTime
,isException
,synFlag
,createTime,delFlag
,createTime,delFlag
,inspectionData
FROM
${
table
.
inspectionRecordName
}
where 1=1
${
data
.
inspectionType
?
`AND inspectionType = '
${
data
.
inspectionType
}
'`
:
''
}
...
...
api/sqllite/init.js
浏览文件 @
d191c3fa
...
...
@@ -13,7 +13,7 @@ export default {
// app初始化
async
init
()
{
const
BASE_PATH
=
"_documents/data/asmzx/pad"
;
// 基础路径
// uni.showLoading({
// title: '正在初始化...',
// })
...
...
@@ -25,7 +25,7 @@ export default {
await
this
.
initSqlLite
(
sqllitedb
);
// 确保表被创建
console
.
log
(
'Tables created.'
);
await
ioUtil
.
createDir
(
BASE_PATH
,
'发送数据'
)
let
isInit
=
await
SqlliteDbUtil
.
checkIfDataImported
(
sqllitedb
);
// 确保表存在后再查询
console
.
log
(
'Data imported:'
,
isInit
);
if
(
!
isInit
)
{
...
...
@@ -94,20 +94,14 @@ export default {
// 初始化目录
async
initDir
()
{
try
{
const
_www
=
_Path
.
getPrivateWWW
()
const
_doc
=
_Path
.
getPrivateDOC
()
const
_download
=
_Path
.
getDownloads
()
const
_temp
=
_Path
.
getTempPath
()
const
wwwEntry
=
await
ioUtil
.
getFileEntry
(
_www
)
const
docEntry
=
await
ioUtil
.
getFileEntry
(
_doc
)
const
downloadEntry
=
await
ioUtil
.
getFileEntry
(
_download
)
const
downloadEntry
=
await
ioUtil
.
getFileEntry
()
if
(
downloadEntry
)
{
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'base'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'export'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'import'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'doc'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'error'
)
await
ioUtil
.
createDir
(
BASE_PATH
,
'base'
)
await
ioUtil
.
createDir
(
BASE_PATH
,
'export'
)
await
ioUtil
.
createDir
(
BASE_PATH
,
'import'
)
await
ioUtil
.
createDir
(
BASE_PATH
,
'doc'
)
await
ioUtil
.
createDir
(
BASE_PATH
,
'error'
)
}
// 获取设备名称
...
...
@@ -118,7 +112,7 @@ export default {
brand
:
e
.
deviceBrand
,
deviceModel
:
e
.
deviceModel
,
}
const
deviceFilePath
=
downloadEntry
.
fullPath
+
'name.txt'
const
deviceFilePath
=
BASE_PATH
+
'name.txt'
await
ioUtil
.
removeExistFile
(
deviceFilePath
)
await
ioUtil
.
writeFile
(
'name.txt'
,
downloadEntry
,
JSON
.
stringify
(
deviceData
))
},
...
...
pages/inspectionManagement/dialog.vue
浏览文件 @
d191c3fa
差异被折叠。
点击展开。
utils/systemCofig.js
浏览文件 @
d191c3fa
...
...
@@ -471,25 +471,17 @@ export function getUserList() {
});
}
export
function
zipCompress
(
name
)
{
const
BASE_PATH
=
"_documents/data"
;
const
targetPath
=
plus
.
io
.
convertLocalFileSystemURL
(
BASE_PATH
+
'/photos'
);
const
zipfile
=
plus
.
io
.
convertLocalFileSystemURL
(
BASE_PATH
+
`/
${
name
}
.zip`
);
plus
.
zip
.
compress
(
targetPath
,
zipfile
,
{
recursive
:
true
,
overwrite
:
true
},
function
()
{
plus
.
io
.
resolveLocalFileSystemURL
(
zipfile
,
function
(
zipEntry
)
{
zipEntry
.
file
(
function
(
file
)
{
console
.
log
(
"ZIP 文件大小: "
+
file
.
size
+
" 字节"
);
});
});
},
function
(
error
)
{
alert
(
"压缩失败: "
+
error
.
message
);
}
);
export
function
zipCompress
(
sourceDir
,
zipPath
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
plus
.
zip
.
compress
(
plus
.
io
.
convertLocalFileSystemURL
(
sourceDir
),
plus
.
io
.
convertLocalFileSystemURL
(
zipPath
),
{
recursive
:
true
,
overwrite
:
true
,
},
()
=>
resolve
(
zipPath
),
(
error
)
=>
reject
(
`压缩失败:
${
error
.
message
}
`
)
);
});
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论