Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
4fb061b4
提交
4fb061b4
authored
4月 10, 2025
作者:
zs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
edit
上级
4a00e686
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
88 行增加
和
59 行删除
+88
-59
inspect.js
api/inspect.js
+23
-9
table.js
api/sqllite/table.js
+1
-1
user.js
api/user.js
+1
-1
user.json
baseData/user.json
+51
-37
index.vue
components/searchCom/index.vue
+5
-4
home.vue
pages/home/home.vue
+1
-1
index.vue
pages/inspectionManagement/index.vue
+4
-3
index.js
request/index.js
+1
-0
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+0
-1
fileImport.js
utils/fileImport.js
+0
-1
systemCofig.js
utils/systemCofig.js
+1
-1
没有找到文件。
api/inspect.js
浏览文件 @
4fb061b4
...
...
@@ -24,12 +24,21 @@ export default {
try
{
let
inspectionTimeCondition
=
''
;
if
(
Array
.
isArray
(
data
.
inspectionTime
)
&&
data
.
inspectionTime
.
length
===
2
)
{
const
startTime
=
new
Date
(
data
.
inspectionTime
[
0
]).
getTime
();
const
endTime
=
new
Date
(
data
.
inspectionTime
[
1
]
+
'T23:59:59'
).
getTime
();
inspectionTimeCondition
=
`AND inspectionTime >= '
${
startTime
}
' AND inspectionTime <= '
${
endTime
}
'`
;
const
startTime
=
new
Date
(
data
.
inspectionTime
[
0
]).
getTime
();
const
endTime
=
new
Date
(
data
.
inspectionTime
[
1
]
+
'T23:59:59'
).
getTime
();
inspectionTimeCondition
=
`AND inspectionTime >= '
${
startTime
}
' AND inspectionTime <= '
${
endTime
}
'`
;
}
let
rs
=
await
sqllitedb
.
selectSQL
(
`SELECT id,inspectionType,inspectionCode
let
isAdmin
=
''
;
if
(
data
.
userId
)
{
const
userResult
=
await
sqllitedb
.
selectSQL
(
`SELECT isAdmin FROM
${
table
.
userName
}
WHERE userId = '
${
data
.
userId
}
'`
);
isAdmin
=
userResult
?.[
0
]?.
isAdmin
||
''
;
}
const
userCondition
=
isAdmin
?
''
:
`AND userId = '
${
data
.
userId
}
'`
;
let
sql
=
`SELECT id,inspectionType,inspectionCode
,recordName
,userName
,userId
...
...
@@ -43,9 +52,13 @@ export default {
${
data
.
synFlag
?
`AND synFlag = '
${
data
.
synFlag
}
'`
:
''
}
${
data
.
isException
?
`AND isException = '
${
data
.
isException
}
'`
:
''
}
${
inspectionTimeCondition
}
${
userCondition
}
and delFlag = 0
order by createTime desc`
order by createTime desc`
let
rs
=
await
sqllitedb
.
selectSQL
(
sql
);
console
.
log
(
'sql'
,
sql
)
return
rs
;
}
catch
(
e
)
{
console
.
log
(
e
.
message
);
...
...
@@ -82,7 +95,7 @@ export default {
}
},
//更新同步
async
updateSyncData
(
data
){
async
updateSyncData
(
data
)
{
let
ids
=
'('
+
data
.
join
(
','
)
+
')'
let
sql
=
`update
${
table
.
inspectionRecordName
}
set synFlag=1 where id in
${
ids
}
`
;
try
{
...
...
@@ -108,7 +121,7 @@ export default {
}
},
async
remove
(
arr
)
{
async
remove
(
arr
)
{
if
(
!
id
)
{
return
;
}
...
...
@@ -121,7 +134,8 @@ async remove(arr) {
}
finally
{
// await sqllitedb.closeDB();
}
},
async
saveBatch
(
list
)
{
},
async
saveBatch
(
list
)
{
if
(
list
.
length
===
0
)
{
return
;
}
...
...
api/sqllite/table.js
浏览文件 @
4fb061b4
...
...
@@ -40,7 +40,7 @@ module.exports = {
},
{
field
:
"isAdmin"
,
format
:
"
TEXT
"
,
format
:
"
INTEGER DEFAULT 0
"
,
},
{
field
:
"LastSynchronizationTime"
,
...
...
api/user.js
浏览文件 @
4fb061b4
...
...
@@ -53,7 +53,7 @@ export default {
}
catch
(
e
)
{
console
.
log
(
e
.
message
)
}
finally
{
await
sqllitedb
.
closeDB
();
//
await sqllitedb.closeDB();
}
},
async
info
(
id
)
{
...
...
baseData/user.json
浏览文件 @
4fb061b4
[
{
"userId"
:
"1"
,
"user"
:
"姜安平"
,
"avatar"
:
""
,
"passWord"
:
"Jap@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"2"
,
"user"
:
"段树梁"
,
"avatar"
:
""
,
"passWord"
:
"Dsl@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"3"
,
"user"
:
"孔佳真"
,
"avatar"
:
""
,
"passWord"
:
"Kjz@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"4"
,
"user"
:
"钟校明"
,
"avatar"
:
""
,
"passWord"
:
"Zxm@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"LastSynchronizationTime"
:
""
}
[{
"userId"
:
"1"
,
"user"
:
"姜安平"
,
"avatar"
:
""
,
"passWord"
:
"Jap@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"isAdmin"
:
""
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"2"
,
"user"
:
"段树梁"
,
"avatar"
:
""
,
"passWord"
:
"Dsl@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"isAdmin"
:
""
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"3"
,
"user"
:
"孔佳真"
,
"avatar"
:
""
,
"passWord"
:
"Kjz@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"isAdmin"
:
""
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"4"
,
"user"
:
"钟校明"
,
"avatar"
:
""
,
"passWord"
:
"Zxm@123"
,
"roleName"
:
"运维"
,
"unitName"
:
"运维"
,
"isAdmin"
:
""
,
"LastSynchronizationTime"
:
""
},
{
"userId"
:
"5"
,
"user"
:
"admin"
,
"avatar"
:
""
,
"passWord"
:
"123456"
,
"roleName"
:
"超级管理员"
,
"isAdmin"
:
1
,
"unitName"
:
"运维"
,
"LastSynchronizationTime"
:
""
}
]
\ No newline at end of file
components/searchCom/index.vue
浏览文件 @
4fb061b4
...
...
@@ -6,11 +6,11 @@
v-model=
"searchFrom.inspectionType"
:localdata=
"inspectArr"
@
change=
"(e) => change(e, 'inspectionType')"
placeholder=
"类型"
></uni-data-select>
<uni-data-select
v-if=
"!hiddenSearch.includes('synFlag')"
class=
"uni-search-item"
v-model=
"searchFrom.synFlag"
:localdata=
"synchronization"
placeholder=
"
状态
"
<uni-data-select
v-if=
"!hiddenSearch.includes('synFlag')"
class=
"uni-search-item"
v-model=
"searchFrom.synFlag"
:localdata=
"synchronization"
placeholder=
"
是否同步
"
@
change=
"(e) => change(e, 'synFlag')"
></uni-data-select>
<uni-data-select
v-if=
"!hiddenSearch.includes('isException')"
class=
"uni-search-item"
v-model=
"searchFrom.isException"
:localdata=
"exceptionArr"
placeholder=
"异常"
v-model=
"searchFrom.isException"
:localdata=
"exceptionArr"
placeholder=
"
有无
异常"
@
change=
"(e) => change(e, 'isException')"
:key=
"new Date().getTime()"
></uni-data-select>
</view>
...
...
@@ -54,7 +54,7 @@
},
],
synchronization
:
[{
value
:
""
,
value
:
"
-1
"
,
text
:
"全部"
},
{
...
...
@@ -71,7 +71,7 @@
},
],
exceptionArr
:
[{
value
:
""
,
value
:
"
-1
"
,
text
:
"全部"
},
{
...
...
@@ -87,6 +87,7 @@
},
methods
:
{
change
(
e
,
key
)
{
if
(
e
==
-
1
)
e
=
""
this
.
searchFrom
[
key
]
=
e
;
this
.
$emit
(
"change"
,
this
.
searchFrom
);
},
...
...
pages/home/home.vue
浏览文件 @
4fb061b4
...
...
@@ -5,7 +5,7 @@
<view
class=
"header"
>
<view
class=
"title"
>
杭州内网监管在线-运维在线
</view>
<view
class=
"header-buttons"
>
<view
class=
"log-button"
@
click=
"lookLog"
>
操作日志
</view>
<view
class=
"log-button"
@
click=
"lookLog"
v-if=
"isAdmin"
>
操作日志
</view>
<div
class=
"exit-button"
@
click=
"logOut"
>
<image
class=
"logout"
...
...
pages/inspectionManagement/index.vue
浏览文件 @
4fb061b4
...
...
@@ -104,10 +104,11 @@
uni
.
navigateTo
({
url
:
"/pages/shaftInspection/shaftInspectionList"
,
});
}
}
},
async
init
()
{
let
res
=
await
inspectApi
.
selectDataForTime
(
this
.
searchForm
)
console
.
log
(
this
.
userInfo
,
'=================='
)
let
res
=
await
inspectApi
.
selectDataForTime
({...
this
.
searchForm
,
userId
:
this
.
userInfo
.
userId
})
this
.
propList
=
res
.
filter
(
e
=>
e
.
synFlag
==
0
)
this
.
countNum
=
res
.
length
const
resultMap
=
{};
...
...
@@ -142,7 +143,7 @@
delete
this
.
searchForm
.
inspectionTime
}
console
.
log
(
'搜索'
,
this
.
searchForm
)
this
.
init
(
this
.
searchForm
);
this
.
init
();
},
async
onLongPress
(
item
)
{
let
rs
=
await
inspectApi
.
batchRemove
(
item
.
id
)
...
...
request/index.js
浏览文件 @
4fb061b4
...
...
@@ -105,6 +105,7 @@ export const getDarft = () => {
export
const
getAllDeviceData
=
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
store
.
state
.
deviceData
.
length
)
debugger
if
(
store
.
state
.
deviceData
.
length
){
const
tempRes
=
lodash
.
orderBy
(
store
.
state
.
deviceData
,
"creatTime"
,
[
'desc'
]);
...
...
utils/IoReadingAndWriting.js
浏览文件 @
4fb061b4
...
...
@@ -214,7 +214,6 @@ export const readDeviceData = () => {
// ? `${SYNCHRONIZE_DATA_PAD}/设备上架`
// : `${SYNCHRONIZE_DATA_PAD}/设备上架/${now_user.user}`;
const
directoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/设备上架/
${
now_user
.
user
}
`
;
console
.
log
(
"directoryPath"
,
directoryPath
);
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
utils/fileImport.js
浏览文件 @
4fb061b4
...
...
@@ -39,7 +39,6 @@ async function importBaseFile() {
await
ioUtil
.
decompressZip
(
zipFileEntry
.
fullPath
,
unzipPath
)
unzipEntry
=
await
ioUtil
.
getFileEntry
(
unzipPath
);
}
debugger
// 导入
let
fileEntries
=
[]
if
(
unzipEntry
)
{
...
...
utils/systemCofig.js
浏览文件 @
4fb061b4
...
...
@@ -240,7 +240,7 @@ export async function checkFileExists(directoryPath, fileName) {
);
});
}
createFileWithPlusIO
export
const
readFilesInDirectory
=
async
(
directoryPath
)
=>
{
const
promiseArr
=
[];
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论