Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
c528b6d4
提交
c528b6d4
authored
4月 07, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://git.yfzx.zjtys.com.cn/privateNetwork/inspection-pad-web
into dev
上级
432fafda
11748db1
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
710 行增加
和
730 行删除
+710
-730
init.js
api/sqllite/init.js
+3
-2
table.js
api/sqllite/table.js
+198
-186
user.js
api/user.js
+26
-7
assroom.json
baseData/assroom.json
+126
-18
user.json
baseData/user.json
+22
-7
home.vue
pages/home/home.vue
+85
-84
editPd.vue
pages/index/editPd.vue
+234
-274
login.vue
pages/login/login.vue
+11
-19
fileImport.js
utils/fileImport.js
+5
-132
sqllitedb.js
utils/sqllitedb.js
+0
-1
没有找到文件。
api/sqllite/init.js
浏览文件 @
c528b6d4
...
@@ -8,6 +8,7 @@ import assRoomApi from '@/api/assRoom.js'
...
@@ -8,6 +8,7 @@ import assRoomApi from '@/api/assRoom.js'
import
hoistwayjson
from
'../../baseData/hoistway.json'
import
hoistwayjson
from
'../../baseData/hoistway.json'
import
userjson
from
'../../baseData/user.json'
import
userjson
from
'../../baseData/user.json'
import
assroomjson
from
'../../baseData/assroom.json'
import
assroomjson
from
'../../baseData/assroom.json'
import
fileImport
from
'@/utils/fileImport.js'
export
default
{
export
default
{
// app初始化
// app初始化
...
@@ -25,8 +26,8 @@ export default {
...
@@ -25,8 +26,8 @@ export default {
// 导入用戶文件文件
// 导入用戶文件文件
// await this.importFileData();
// await this.importFileData();
await
userApi
.
saveBatch
(
userjson
)
await
userApi
.
saveBatch
(
userjson
)
await
hoistwayApi
.
saveBatch
(
hoistwayjson
)
//
await hoistwayApi.saveBatch(hoistwayjson)
await
assRoomApi
.
saveBatch
(
assroomjson
)
//
await assRoomApi.saveBatch(assroomjson)
// 初始化完成通知首页
// 初始化完成通知首页
uni
.
$emit
(
"initDone"
,
"ok"
)
uni
.
$emit
(
"initDone"
,
"ok"
)
uni
.
hideLoading
()
uni
.
hideLoading
()
...
...
api/sqllite/table.js
浏览文件 @
c528b6d4
...
@@ -27,190 +27,201 @@ module.exports = {
...
@@ -27,190 +27,201 @@ module.exports = {
},
},
],
],
// 巡检记录表
// 巡检记录表
inspectionRecordName
:
"INSPECTION_RECORD"
,
inspectionRecordName
:
"INSPECTION_RECORD"
,
inspectionRecord
:
[{
inspectionRecord
:
[
field
:
"id"
,
{
format
:
"TEXT NOT NULL"
,
field
:
"id"
,
},
format
:
"TEXT NOT NULL"
,
{
},
field
:
"inspectionType"
,
{
format
:
"TEXT"
,
field
:
"inspectionType"
,
},
format
:
"TEXT"
,
{
},
field
:
"recordName"
,
{
format
:
"TEXT"
,
field
:
"recordName"
,
},
format
:
"TEXT"
,
{
},
field
:
"userId"
,
{
format
:
"TEXT"
,
field
:
"userId"
,
},
format
:
"TEXT"
,
{
},
field
:
"userName"
,
{
format
:
"TEXT"
,
field
:
"userName"
,
},
format
:
"TEXT"
,
{
},
field
:
"inspectionTime"
,
{
format
:
"TEXT"
,
field
:
"inspectionTime"
,
},
format
:
"TEXT"
,
{
},
field
:
"inspectionCode"
,
{
format
:
"TEXT"
,
field
:
"inspectionCode"
,
},
format
:
"TEXT"
,
{
},
field
:
"synFlag"
,
{
format
:
"TEXT"
,
field
:
"synFlag"
,
},
format
:
"TEXT"
,
},
{
field
:
"createTime"
,
{
format
:
"TEXT"
,
field
:
"createTime"
,
},
format
:
"TEXT"
,
{
},
field
:
"createBy"
,
{
format
:
"TEXT"
,
field
:
"createBy"
,
},
format
:
"TEXT"
,
{
},
field
:
"updateTime"
,
{
format
:
"TEXT"
,
field
:
"updateTime"
,
},
format
:
"TEXT"
,
{
},
field
:
"updateBy"
,
{
format
:
"TEXT"
,
field
:
"updateBy"
,
},
format
:
"TEXT"
,
{
},
field
:
"delFlag"
,
{
format
:
"TEXT"
,
field
:
"delFlag"
,
},
format
:
"TEXT"
,
{
},
field
:
"isException"
,
{
format
:
"TEXT"
,
field
:
"isException"
,
},
format
:
"TEXT"
,
{
},
field
:
"inspectionData"
,
{
format
:
"TEXT"
,
field
:
"inspectionData"
,
}
format
:
"TEXT"
,
],
}
],
// 机房、井道信息表
assRoomName
:
"ASS_ROOM"
,
// 机房、井道信息表
assRoom
:
[{
assRoomName
:
"ASS_ROOM"
,
field
:
"id"
,
assRoom
:
[
format
:
"TEXT NOT NULL"
,
{
},
field
:
"id"
,
format
:
"TEXT NOT NULL"
,
{
},
field
:
"roomName"
,
format
:
"TEXT"
,
{
},
field
:
"roomName"
,
{
format
:
"TEXT"
,
field
:
"buildingId"
,
},
format
:
"TEXT"
,
{
},
field
:
"buildingId"
,
format
:
"TEXT"
,
{
},
field
:
"buildingName"
,
format
:
"TEXT"
,
{
},
field
:
"buildingName"
,
{
format
:
"TEXT"
,
field
:
"roomType"
,
},
format
:
"TEXT"
,
{
},
field
:
"roomType"
,
{
format
:
"TEXT"
,
field
:
"roomFile"
,
},
format
:
"TEXT"
,
{
},
field
:
"roomFile"
,
{
format
:
"TEXT"
,
field
:
"roomAddress"
,
},
format
:
"TEXT"
,
{
},
field
:
"roomAddress"
,
{
format
:
"TEXT"
,
field
:
"keynoteFlag"
,
},
format
:
"TEXT"
,
{
},
field
:
"keynoteFlag"
,
{
format
:
"TEXT"
,
field
:
"sort"
,
},
format
:
"TEXT"
,
{
},
field
:
"sort"
,
{
format
:
"TEXT"
,
field
:
"roomDesc"
,
},
format
:
"TEXT"
,
{
},
field
:
"roomDesc"
,
{
format
:
"TEXT"
,
field
:
"remark"
,
},
format
:
"TEXT"
,
{
},
field
:
"remark"
,
{
format
:
"TEXT"
,
field
:
"createTime"
,
},
format
:
"TEXT"
,
{
},
field
:
"createTime"
,
{
format
:
"TEXT"
,
field
:
"createBy"
,
},
format
:
"TEXT"
,
{
},
field
:
"createBy"
,
{
format
:
"TEXT"
,
field
:
"updateTime"
,
},
format
:
"TEXT"
,
{
},
field
:
"updateTime"
,
{
format
:
"TEXT"
,
field
:
"updateBy"
,
},
format
:
"TEXT"
,
{
},
field
:
"updateBy"
,
{
format
:
"TEXT"
,
field
:
"delFlag"
,
},
format
:
"TEXT"
,
{
},
field
:
"delFlag"
,
{
format
:
"TEXT"
,
field
:
"synFlag"
,
},
format
:
"TEXT"
,
{
},
field
:
"synFlag"
,
{
format
:
"TEXT"
,
field
:
"SHOW"
,
},
format
:
"TEXT"
,
{
}
field
:
"SHOW"
,
],
format
:
"TEXT"
,
// 楼宇信息
},
assBuildingName
:
"ASS_BUILDING"
,
{
assBuilding
:
[{
field
:
"roomFeature"
,
field
:
"id"
,
format
:
"TEXT"
,
format
:
"TEXT NOT NULL"
,
},
},
{
field
:
"dictValue"
,
{
format
:
"TEXT"
,
field
:
"buildingName"
,
}
format
:
"TEXT"
,
],
},
// 楼宇信息
assBuildingName
:
"ASS_BUILDING"
,
{
assBuilding
:
[
field
:
"sort"
,
{
format
:
"TEXT"
,
field
:
"id"
,
},
format
:
"TEXT NOT NULL"
,
{
},
field
:
"remark"
,
format
:
"TEXT"
,
{
},
field
:
"buildingName"
,
{
format
:
"TEXT"
,
field
:
"createTime"
,
},
format
:
"TEXT"
,
},
{
{
field
:
"sort"
,
field
:
"createBy"
,
format
:
"TEXT"
,
format
:
"TEXT"
,
},
},
{
{
field
:
"remark"
,
field
:
"updateTime"
,
format
:
"TEXT"
,
format
:
"TEXT"
,
},
},
{
{
field
:
"createTime"
,
field
:
"updateBy"
,
format
:
"TEXT"
,
format
:
"TEXT"
,
},
},
{
{
field
:
"createBy"
,
field
:
"delFlag"
,
format
:
"TEXT"
,
format
:
"TEXT"
,
},
},
{
{
field
:
"updateTime"
,
field
:
"synFlag"
,
format
:
"TEXT"
,
format
:
"TEXT"
,
},
}
{
]
field
:
"updateBy"
,
format
:
"TEXT"
,
},
{
field
:
"delFlag"
,
format
:
"TEXT"
,
},
{
field
:
"synFlag"
,
format
:
"TEXT"
,
}
]
};
};
\ No newline at end of file
api/user.js
浏览文件 @
c528b6d4
...
@@ -15,9 +15,10 @@ export default {
...
@@ -15,9 +15,10 @@ export default {
async
login
(
data
)
{
async
login
(
data
)
{
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
()
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
()
let
account
=
data
.
account
let
{
let
pwd
=
data
.
pwd
account
,
pwd
}
=
data
const
sql
=
`select * from
${
table
.
userName
}
where userName = '
${
account
}
'`
const
sql
=
`select * from
${
table
.
userName
}
where userName = '
${
account
}
'`
let
res
=
await
sqllitedb
.
selectSQL
(
sql
);
let
res
=
await
sqllitedb
.
selectSQL
(
sql
);
...
@@ -27,7 +28,7 @@ export default {
...
@@ -27,7 +28,7 @@ export default {
msg
:
'登录成功'
msg
:
'登录成功'
};
};
},
},
async
remove
(
id
)
{
async
remove
(
id
)
{
if
(
!
id
)
{
if
(
!
id
)
{
return
return
}
}
...
@@ -47,12 +48,30 @@ async remove(id) {
...
@@ -47,12 +48,30 @@ async remove(id) {
async
changePwd
(
data
)
{
async
changePwd
(
data
)
{
let
{
let
{
userName
,
userName
,
userPwd
,
oldPwd
,
newPwd
,
userId
userId
}
=
data
}
=
data
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
()
let
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
()
let
sql
=
`update
${
table
.
userName
}
set userPwd =
${
userPwd
}
where userName = '
${
userName
}
and userId = '
${
userId
}
'`
;
const
[
current
]
=
await
sqllitedb
.
selectSQL
(
let
res
=
await
sqllitedb
.
executeSQL
(
sql
);
`select * from
${
table
.
userName
}
where userId = '
${
userId
}
' and userName = '
${
userName
}
'`
,
[
userId
,
userName
]
);
if
(
current
.
password
!==
oldPwd
)
{
return
{
data
:
false
,
msg
:
'原密码错误'
};
}
const
update
=
await
sqllitedb
.
executeSQL
(
`UPDATE
${
table
.
userName
}
SET password = '
${
newPwd
}
'
WHERE userId = '
${
userId
}
'`
);
return
{
data
:
true
,
msg
:
'恭喜您,密码更新成功。'
};
},
},
async
saveBatch
(
list
)
{
async
saveBatch
(
list
)
{
...
...
baseData/assroom.json
浏览文件 @
c528b6d4
[
[
{
{
"id"
:
"f7f20d3d78902f8d105e7d62d6e60ba0"
,
"id"
:
"1"
,
"roomName"
:
"测试机房1"
,
"roomName"
:
"F3内环屏蔽机房"
,
"roomFeature"
:
"2"
,
"dictValue"
:
"1"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"G座-1层"
,
"roomDesc"
:
"G座-1层"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/25/20de409bc81f48dbbeaeb9c198683ee6_20250325143326A008.jpeg,http://192.168.100.103:8099/profile/upload/2025/03/25/1711459331134717_20250325143340A009.png"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/25/20de409bc81f48dbbeaeb9c198683ee6_20250325143326A008.jpeg,http://192.168.100.103:8099/profile/upload/2025/03/25/1711459331134717_20250325143340A009.png"
,
"delFlag"
:
"0"
,
"delFlag"
:
"0"
,
"synFlag"
:
1
,
"synFlag"
:
0
,
"sort"
:
1
,
"sort"
:
1
,
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"8a02454d00bd9df7bda41f7d1a6c471e"
,
"buildingId"
:
"8a02454d00bd9df7bda41f7d1a6c471e"
,
"buildingName"
:
"G座"
,
"buildingName"
:
"G座"
,
"keynoteFlag"
:
0
,
"roomFeature"
:
"1"
,
"roomArea"
:
"60"
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
174
3593139
000
,
"createTime"
:
174
4009761
000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
"updateTime"
:
174
3593139
000
,
"updateTime"
:
174
4009761
000
,
"params"
:
{}
"params"
:
{}
},
},
{
{
...
@@ -26,6 +31,7 @@
...
@@ -26,6 +31,7 @@
"sort"
:
1
,
"sort"
:
1
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"71dbde340369e1188acbbb8307d4504e"
,
"buildingId"
:
"71dbde340369e1188acbbb8307d4504e"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -41,6 +47,7 @@
...
@@ -41,6 +47,7 @@
"sort"
:
1
,
"sort"
:
1
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -56,6 +63,7 @@
...
@@ -56,6 +63,7 @@
"sort"
:
1
,
"sort"
:
1
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"cf53d80f01241013d498a9f52d58b793"
,
"buildingId"
:
"cf53d80f01241013d498a9f52d58b793"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -71,6 +79,7 @@
...
@@ -71,6 +79,7 @@
"sort"
:
1
,
"sort"
:
1
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -86,6 +95,7 @@
...
@@ -86,6 +95,7 @@
"delFlag"
:
"0"
,
"delFlag"
:
"0"
,
"synFlag"
:
1
,
"synFlag"
:
1
,
"sort"
:
2
,
"sort"
:
2
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742546558000
,
"createTime"
:
1742546558000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -101,6 +111,7 @@
...
@@ -101,6 +111,7 @@
"sort"
:
2
,
"sort"
:
2
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -116,6 +127,7 @@
...
@@ -116,6 +127,7 @@
"sort"
:
2
,
"sort"
:
2
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"cf53d80f01241013d498a9f52d58b793"
,
"buildingId"
:
"cf53d80f01241013d498a9f52d58b793"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -131,6 +143,7 @@
...
@@ -131,6 +143,7 @@
"sort"
:
2
,
"sort"
:
2
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"71dbde340369e1188acbbb8307d4504e"
,
"buildingId"
:
"71dbde340369e1188acbbb8307d4504e"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -146,6 +159,7 @@
...
@@ -146,6 +159,7 @@
"sort"
:
2
,
"sort"
:
2
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -161,6 +175,7 @@
...
@@ -161,6 +175,7 @@
"sort"
:
3
,
"sort"
:
3
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -176,6 +191,7 @@
...
@@ -176,6 +191,7 @@
"sort"
:
3
,
"sort"
:
3
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -191,6 +207,7 @@
...
@@ -191,6 +207,7 @@
"sort"
:
3
,
"sort"
:
3
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"cf53d80f01241013d498a9f52d58b793"
,
"buildingId"
:
"cf53d80f01241013d498a9f52d58b793"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -198,8 +215,10 @@
...
@@ -198,8 +215,10 @@
"params"
:
{}
"params"
:
{}
},
},
{
{
"id"
:
"58b0d83a6d34ac1f39d3f6af0123d657"
,
"id"
:
"2"
,
"roomName"
:
"A2汇聚机房2"
,
"roomName"
:
"F3外环屏蔽机房"
,
"roomFeature"
:
"2"
,
"dictValue"
:
"2"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"A座3楼"
,
"roomDesc"
:
"A座3楼"
,
"roomFile"
:
"/profile/upload/2025/03/24/sample_640×426 - 副本_20250324135659A007.JPG"
,
"roomFile"
:
"/profile/upload/2025/03/24/sample_640×426 - 副本_20250324135659A007.JPG"
,
...
@@ -209,6 +228,7 @@
...
@@ -209,6 +228,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"buildingName"
:
"A座"
,
"buildingName"
:
"A座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742804535000
,
"createTime"
:
1742804535000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -224,6 +244,7 @@
...
@@ -224,6 +244,7 @@
"sort"
:
4
,
"sort"
:
4
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -231,8 +252,10 @@
...
@@ -231,8 +252,10 @@
"params"
:
{}
"params"
:
{}
},
},
{
{
"id"
:
"9"
,
"id"
:
"3"
,
"roomName"
:
"F3内环机房"
,
"roomName"
:
"F2汇聚机房"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"3"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"市民中心A座3楼"
,
"roomDesc"
:
"市民中心A座3楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/20de409bc81f48dbbeaeb9c198683ee6_20250318141902A009.jpeg"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/20de409bc81f48dbbeaeb9c198683ee6_20250318141902A009.jpeg"
,
...
@@ -242,6 +265,7 @@
...
@@ -242,6 +265,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"buildingName"
:
"B座"
,
"buildingName"
:
"B座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742799587000
,
"createTime"
:
1742799587000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -249,8 +273,10 @@
...
@@ -249,8 +273,10 @@
"params"
:
{}
"params"
:
{}
},
},
{
{
"id"
:
"3e08f060b5fbb94b213be5dff7ee22a7"
,
"id"
:
"4"
,
"roomName"
:
"泰源8楼"
,
"roomName"
:
" A2汇聚机房"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"4"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"泰源8楼"
,
"roomDesc"
:
"泰源8楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/27/微信截图_20250327155657_20250327155711A005.png"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/27/微信截图_20250327155657_20250327155711A005.png"
,
...
@@ -260,6 +286,7 @@
...
@@ -260,6 +286,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"buildingName"
:
"B座"
,
"buildingName"
:
"B座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -275,6 +302,7 @@
...
@@ -275,6 +302,7 @@
"sort"
:
5
,
"sort"
:
5
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -282,8 +310,11 @@
...
@@ -282,8 +310,11 @@
"params"
:
{}
"params"
:
{}
},
},
{
{
"id"
:
"10"
,
"id"
:
"5"
,
"roomName"
:
"A2汇聚机房3"
,
"roomName"
:
"A3屏蔽机房"
,
"roomFeature"
:
"2"
,
"dictValue"
:
"5"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"市民中心A座4楼"
,
"roomDesc"
:
"市民中心A座4楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/1711459331134717_20250318150705A002.png"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/1711459331134717_20250318150705A002.png"
,
...
@@ -293,6 +324,7 @@
...
@@ -293,6 +324,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"buildingName"
:
"B座"
,
"buildingName"
:
"B座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742785634000
,
"createTime"
:
1742785634000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -300,8 +332,10 @@
...
@@ -300,8 +332,10 @@
"params"
:
{}
"params"
:
{}
},
},
{
{
"id"
:
"1"
,
"id"
:
"6"
,
"roomName"
:
"A2汇聚机房4"
,
"roomName"
:
"A-1UPS间"
,
"roomFeature"
:
"3"
,
"dictValue"
:
"6"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"市民中心A座4楼"
,
"roomDesc"
:
"市民中心A座4楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/1711459331134717_20250318150705A002.png"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/1711459331134717_20250318150705A002.png"
,
...
@@ -311,6 +345,7 @@
...
@@ -311,6 +345,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"buildingName"
:
"A1座"
,
"buildingName"
:
"A1座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742785643000
,
"createTime"
:
1742785643000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -326,6 +361,7 @@
...
@@ -326,6 +361,7 @@
"sort"
:
6
,
"sort"
:
6
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -341,6 +377,7 @@
...
@@ -341,6 +377,7 @@
"sort"
:
7
,
"sort"
:
7
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -349,7 +386,9 @@
...
@@ -349,7 +386,9 @@
},
},
{
{
"id"
:
"7"
,
"id"
:
"7"
,
"roomName"
:
"A2汇聚机房5"
,
"roomName"
:
"B2汇聚机房"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"7"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"市民中心A座4楼"
,
"roomDesc"
:
"市民中心A座4楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/1711459331134717_20250318150705A002.png"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/18/1711459331134717_20250318150705A002.png"
,
...
@@ -359,6 +398,7 @@
...
@@ -359,6 +398,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"10"
,
"buildingId"
:
"10"
,
"buildingName"
:
"B座"
,
"buildingName"
:
"B座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742785651000
,
"createTime"
:
1742785651000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -374,6 +414,7 @@
...
@@ -374,6 +414,7 @@
"sort"
:
8
,
"sort"
:
8
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -389,6 +430,7 @@
...
@@ -389,6 +430,7 @@
"sort"
:
9
,
"sort"
:
9
,
"roomType"
:
0
,
"roomType"
:
0
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1743407833000
,
"createTime"
:
1743407833000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
@@ -396,8 +438,73 @@
...
@@ -396,8 +438,73 @@
"params"
:
{}
"params"
:
{}
},
},
{
{
"id"
:
"586a67286d9d1d6e737f32d9e42c3054"
,
"id"
:
"8"
,
"roomName"
:
"测试机房2"
,
"roomName"
:
"C2汇聚机房"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"8"
,
"show"
:
"0"
,
"roomDesc"
:
"A座-3楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/20/sample_640×426 - 副本_20250320091529A001.JPG"
,
"delFlag"
:
"0"
,
"synFlag"
:
1
,
"sort"
:
9
,
"roomType"
:
1
,
"buildingId"
:
"8"
,
"buildingName"
:
"A1座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createTime"
:
1742785675000
,
"updateBy"
:
""
,
"updateTime"
:
1742785675000
,
"params"
:
{}
},
{
"id"
:
"9"
,
"roomName"
:
"D2汇聚机房"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"9"
,
"show"
:
"0"
,
"roomDesc"
:
"A座-3楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/20/sample_640×426 - 副本_20250320091529A001.JPG"
,
"delFlag"
:
"0"
,
"synFlag"
:
1
,
"sort"
:
9
,
"roomType"
:
1
,
"buildingId"
:
"8"
,
"buildingName"
:
"A1座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createTime"
:
1742785675000
,
"updateBy"
:
""
,
"updateTime"
:
1742785675000
,
"params"
:
{}
},
{
"id"
:
"10"
,
"roomName"
:
"E2汇聚机房"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"10"
,
"show"
:
"0"
,
"roomDesc"
:
"A座-3楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/20/sample_640×426 - 副本_20250320091529A001.JPG"
,
"delFlag"
:
"0"
,
"synFlag"
:
1
,
"sort"
:
9
,
"roomType"
:
1
,
"buildingId"
:
"8"
,
"buildingName"
:
"A1座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createTime"
:
1742785675000
,
"updateBy"
:
""
,
"updateTime"
:
1742785675000
,
"params"
:
{}
},
{
"id"
:
"11"
,
"roomName"
:
"F-2UPS间"
,
"roomFeature"
:
"1"
,
"dictValue"
:
"11"
,
"show"
:
"0"
,
"show"
:
"0"
,
"roomDesc"
:
"A座-3楼"
,
"roomDesc"
:
"A座-3楼"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/20/sample_640×426 - 副本_20250320091529A001.JPG"
,
"roomFile"
:
"http://192.168.100.103:8099/profile/upload/2025/03/20/sample_640×426 - 副本_20250320091529A001.JPG"
,
...
@@ -407,6 +514,7 @@
...
@@ -407,6 +514,7 @@
"roomType"
:
1
,
"roomType"
:
1
,
"buildingId"
:
"8"
,
"buildingId"
:
"8"
,
"buildingName"
:
"A1座"
,
"buildingName"
:
"A1座"
,
"keynoteFlag"
:
0
,
"createBy"
:
""
,
"createBy"
:
""
,
"createTime"
:
1742785675000
,
"createTime"
:
1742785675000
,
"updateBy"
:
""
,
"updateBy"
:
""
,
...
...
baseData/user.json
浏览文件 @
c528b6d4
[
{
[
{
"userId"
:
29
,
"userId"
:
1
,
"userName"
:
"叶一凡"
,
"userName"
:
"姜安平"
,
"userType"
:
"normal"
,
"avatar"
:
""
,
"password"
:
"Jap@123"
,
"rememberPwd"
:
"0"
},
{
"userId"
:
2
,
"userName"
:
"段树梁"
,
"userType"
:
"sys_user"
,
"avatar"
:
""
,
"password"
:
"Dsl@123"
,
"rememberPwd"
:
"0"
},
{
"userId"
:
3
,
"userName"
:
"孔佳真"
,
"userType"
:
"sys_user"
,
"userType"
:
"sys_user"
,
"avatar"
:
""
,
"avatar"
:
""
,
"password"
:
"
123456
"
,
"password"
:
"
Kjz@123
"
,
"rememberPwd"
:
"0"
"rememberPwd"
:
"0"
},
{
},
{
"userId"
:
30
,
"userId"
:
4
,
"userName"
:
"
bjqxj
"
,
"userName"
:
"
钟校明
"
,
"userType"
:
"sys_user"
,
"userType"
:
"sys_user"
,
"avatar"
:
""
,
"avatar"
:
""
,
"password"
:
"
JF85250920
"
,
"password"
:
"
Zxm@123
"
,
"rememberPwd"
:
"0"
"rememberPwd"
:
"0"
}]
}]
\ No newline at end of file
pages/home/home.vue
浏览文件 @
c528b6d4
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
src=
"@/static/img/add-img/home1.png"
src=
"@/static/img/add-img/home1.png"
mode=
"aspectFit"
mode=
"aspectFit"
></image>
></image>
<
!--
<
view
class=
"change-password"
@
click=
"updatePassword"
<view
class=
"change-password"
@
click=
"updatePassword"
>
修改密码
</view
>
修改密码
</view
>
-->
>
</view>
</view>
<view
class=
"username"
>
{{
userName
}}
</view>
<view
class=
"username"
>
{{
userName
}}
</view>
</view>
</view>
...
@@ -74,88 +74,89 @@
...
@@ -74,88 +74,89 @@
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
cards
:
[
cards
:
[{
{
image
:
'../../static/img/jf.png'
,
image
:
"../../static/img/jf.png"
,
text
:
'机房巡检'
,
text
:
"机房巡检"
,
url
:
"/pages/inspectionContent/inspectionContentList?backValue=home"
url
:
"/pages/inspectionContent/inspectionContentList?backValue=home"
,
},
},
{
{
image
:
'../../static/img/jd.png'
,
image
:
"../../static/img/jd.png"
,
text
:
'井道巡检'
,
text
:
"井道巡检"
,
url
:
"/pages/shaftInspection/shaftInspectionList?backValue=home"
url
:
"/pages/shaftInspection/shaftInspectionList?backValue=home"
,
},
},
{
{
image
:
'../../static/img/sj.png'
,
image
:
"../../static/img/sj.png"
,
text
:
'设备上架'
,
text
:
"设备上架"
,
url
:
"/pages/listingManagement/index?backValue=home"
url
:
"/pages/listingManagement/index?backValue=home"
,
}
},
],
],
userName
:
this
.
$store
.
state
.
now_user
.
userName
,
userName
:
this
.
$store
.
state
.
now_user
.
user
,
};
};
},
},
computed
:
{
computed
:
{
isAdmin
()
{
isAdmin
()
{
return
this
.
$store
.
state
.
now_user
.
isAdmin
;
return
this
.
$store
.
state
.
now_user
.
isAdmin
;
},
},
},
},
methods
:
{
methods
:
{
// 修改密码
// 修改密码
updatePassword
()
{
updatePassword
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/index/editPd"
,
url
:
"/pages/index/editPd"
,
});
});
},
},
//退出
//退出
logOut
()
{
logOut
()
{
this
.
$refs
.
inputDialog2
.
open
();
this
.
$refs
.
inputDialog2
.
open
();
},
},
// 查看操作日志
// 查看操作日志
lookLog
()
{
lookLog
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/index/operLog"
,
url
:
"/pages/index/operLog"
,
});
});
},
},
// 三模块卡片跳转页面
// 三模块卡片跳转页面
toList
(
url
){
toList
(
url
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
url
,
url
:
url
,
});
});
},
},
// 巡检管理
// 巡检管理
toInspectionManagement
()
{
toInspectionManagement
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/inspectionManagement/index?backValue=home"
,
url
:
"/pages/inspectionManagement/index?backValue=home"
,
});
});
},
},
toListingManagement
()
{
toListingManagement
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/listingManagement/index?backValue=home"
,
url
:
"/pages/listingManagement/index?backValue=home"
,
});
});
},
},
// 井道巡检
// 井道巡检
toShaftInspection
()
{
toShaftInspection
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/shaftInspection/shaftInspectionNew?backValue=home"
,
url
:
"/pages/shaftInspection/shaftInspectionNew?backValue=home"
,
});
});
},
},
//退出--弹出对话框
//退出--弹出对话框
dialogInputConfirm2
()
{
dialogInputConfirm2
()
{
uni
.
redirectTo
({
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
url
:
"/pages/login/login"
,
success
:
()
=>
{
success
:
()
=>
{
// uni.clearStorage(); //测试将所有缓存清除
// uni.clearStorage(); //测试将所有缓存清除
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
uni
.
setStorageSync
(
"last_time"
,
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
||
""
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
||
""
);
);
},
},
});
});
},
},
},
}
};
};
</
script
>
</
script
>
...
...
pages/index/editPd.vue
浏览文件 @
c528b6d4
<
template
>
<
template
>
<view
class=
"edit-password"
>
<view
class=
"edit-password"
>
<uni-nav-bar
<uni-nav-bar
:fixed=
"true"
background-color=
"rgba(214, 240, 255, 0.0)"
status-bar
rightWidth=
"300"
>
:fixed=
"true"
<block
slot=
"left"
>
background-color=
"rgba(214, 240, 255, 0.0)"
<view
class=
"uni-nav-bar-text"
@
click=
"back"
>
status-bar
<text
class=
"iconfont icon-fanhui"
></text>
rightWidth=
"300"
</view>
>
</block>
<block
slot=
"left"
>
</uni-nav-bar>
<view
class=
"uni-nav-bar-text"
@
click=
"back"
>
{{
user
}}
<text
class=
"iconfont icon-fanhui"
></text
<view
class=
"edit-main"
>
></view>
<!-- 占位---不可删除 -->
</block>
<view
class=
"seize-seat"
>
</view>
</uni-nav-bar>
<view
class=
"content-main box-shaow-box"
>
<view
class=
"edit-main"
>
<view
class=
"content_header"
>
修改密码
</view>
<!-- 占位---不可删除 -->
<view
class=
"input-content"
>
<view
class=
"seize-seat"
>
</view>
<!--
<input
type=
"text"
class=
"uni-input"
v-model=
"user.user"
disabled=
"true"
>
-->
<uni-forms
ref=
"form"
:modelValue=
"formData"
:rules=
"rules"
>
<view
class=
"content-main box-shaow-box"
>
<uni-forms-item>
<view
class=
"content_header"
>
修改密码
</view>
<uni-easyinput
class=
"uni-input"
v-model=
"user.userName"
:disabled=
"true"
></uni-easyinput>
<view
class=
"input-content"
>
</uni-forms-item>
<!--
<input
type=
"text"
class=
"uni-input"
v-model=
"user.user"
disabled=
"true"
>
-->
<uni-forms-item
name=
"oldPd"
>
<uni-forms
ref=
"form"
:modelValue=
"formData"
:rules=
"rules"
>
<uni-easyinput
type=
"password"
class=
"uni-input"
placeholder=
"原密码"
v-model=
"formData.oldPd"
>
<uni-forms-item>
</uni-easyinput>
<uni-easyinput
</uni-forms-item>
class=
"uni-input"
<uni-forms-item
name=
"newPd"
>
v-model=
"user.user"
<uni-easyinput
type=
"password"
class=
"uni-input"
placeholder=
"新密码(密码必须为字母、数字,6-18个字符,区分大小写)"
:disabled=
"true"
v-model=
"formData.newPd"
>
></uni-easyinput>
</uni-easyinput>
</uni-forms-item>
</uni-forms-item>
<uni-forms-item
name=
"oldPd"
>
<button
type=
"primary"
class=
"uni-btn"
@
click=
"clickEdit"
>
<uni-easyinput
保存
type=
"password"
</button>
class=
"uni-input"
</uni-forms>
placeholder=
"原密码"
</view>
v-model=
"formData.oldPd"
</view>
>
</view>
</uni-easyinput>
</view>
</uni-forms-item>
<uni-forms-item
name=
"newPd"
>
<uni-easyinput
type=
"password"
class=
"uni-input"
placeholder=
"新密码(密码必须为字母、数字,6-18个字符,区分大小写)"
v-model=
"formData.newPd"
>
</uni-easyinput>
</uni-forms-item>
<button
type=
"primary"
class=
"uni-btn"
@
click=
"clickEdit"
>
保存
</button>
</uni-forms>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
getDateTime
from
"@/common/getdateTime.js"
;
import
getDateTime
from
"@/common/getdateTime.js"
;
import
{
Base64
}
from
"js-base64"
;
import
{
import
{
Base64
addLog
,
}
from
"js-base64"
;
getLogContent
,
import
{
LOG_TYPE_ENUM
,
addLog
,
}
from
"@/utils/IoReadingAndWriting.js"
;
getLogContent
,
LOG_TYPE_ENUM
,
import
{
}
from
"@/utils/IoReadingAndWriting.js"
;
SYNCHRONIZE_DATA_PAD
,
createFileWithPlusIO
,
import
{
USER_FILE_NAME
,
SYNCHRONIZE_DATA_PAD
,
}
from
"@/utils/systemCofig"
;
createFileWithPlusIO
,
export
default
{
USER_FILE_NAME
,
data
()
{
}
from
"@/utils/systemCofig"
;
return
{
import
userApi
from
'@/api/user.js'
user
:
{},
export
default
{
personList
:
[],
data
()
{
formData
:
{
return
{
oldPd
:
""
,
user
:
{},
newPd
:
""
,
personList
:
[],
},
formData
:
{
rules
:
{
oldPd
:
""
,
oldPd
:
{
newPd
:
""
,
rules
:
[
},
{
rules
:
{
required
:
true
,
oldPd
:
{
errorMessage
:
"请输入原密码"
,
rules
:
[{
},
required
:
true
,
],
errorMessage
:
"请输入原密码"
,
},
},
],
newPd
:
{
},
rules
:
[
newPd
:
{
{
rules
:
[{
required
:
true
,
required
:
true
,
errorMessage
:
"请输入新密码"
,
errorMessage
:
"请输入新密码"
,
},
},
// 进行长度验证
// 进行长度验证
{
{
minLength
:
6
,
minLength
:
6
,
maxLength
:
18
,
maxLength
:
18
,
errorMessage
:
errorMessage
:
"更新失败,密码必须为字母、数字,{minLength}-{maxLength}个字符,区分大小写"
,
"更新失败,密码必须为字母、数字,{minLength}-{maxLength}个字符,区分大小写"
,
},
},
],
],
label
:
"新密码"
,
label
:
"新密码"
,
},
},
},
},
};
};
},
},
onNavigationBarButtonTap
(
val
)
{
onNavigationBarButtonTap
(
val
)
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onShow
()
{
onShow
()
{
const
value
=
this
.
$store
.
state
.
now_user
;
const
value
=
this
.
$store
.
state
.
now_user
;
console
.
log
(
value
,
'----'
)
if
(
value
)
{
if
(
value
)
{
this
.
user
=
value
;
this
.
user
=
value
;
}
}
const
val
=
uni
.
getStorageSync
(
"user_data"
);
const
val
=
uni
.
getStorageSync
(
"user_data"
);
if
(
val
)
{
if
(
val
)
{
this
.
personList
=
JSON
.
parse
(
val
);
this
.
personList
=
JSON
.
parse
(
val
);
}
}
},
},
methods
:
{
methods
:
{
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
// 退出登录
// 退出登录
logOut
()
{
logOut
()
{
uni
.
removeStorage
({
uni
.
removeStorage
({
key
:
"now_user"
,
key
:
"now_user"
,
});
});
// uni.clearStorage(); //测试将所有缓存清除
// uni.clearStorage(); //测试将所有缓存清除
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/login/login"
,
url
:
"/pages/login/login"
,
});
});
},
},
clickEdit
()
{
clickEdit
()
{
this
.
$refs
.
form
this
.
$refs
.
form
.
validate
()
.
validate
()
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
// 输入密码与该账号密码一致
// 输入密码与该账号密码一致
if
(
this
.
formData
.
oldPd
==
this
.
user
.
passWord
)
{
userApi
.
changePwd
({
const
userId
=
this
.
user
.
userId
;
userId
:
this
.
user
.
userId
,
const
tempPersonList
=
this
.
personList
.
map
((
item
)
=>
{
userName
:
this
.
user
.
userName
,
if
(
item
.
userId
==
userId
)
{
oldPwd
:
this
.
formData
.
oldPd
,
item
.
passWord
=
this
.
formData
.
newPd
;
newPwd
:
this
.
formData
.
newPd
}
}).
then
((
res
)
=>
{
return
item
;
if
(
res
.
data
){
});
uni
.
showToast
({
title
:
"恭喜您,密码更新成功!"
,
const
temp
=
JSON
.
stringify
(
tempPersonList
);
icon
:
"success"
,
duration
:
3000
,
const
fileContent
=
JSON
.
stringify
(
Base64
.
encode
(
temp
));
});
createFileWithPlusIO
(
this
.
logOut
();
SYNCHRONIZE_DATA_PAD
,
}
else
{
USER_FILE_NAME
,
uni
.
showToast
({
fileContent
title
:
res
.
msg
,
).
then
((
res
)
=>
{
icon
:
"error"
,
uni
.
setStorageSync
(
"user_data"
,
temp
);
duration
:
3000
,
uni
.
showToast
({
});
title
:
"恭喜您,密码更新成功!"
,
}
icon
:
"none"
,
duration
:
2000
,
});
});
})
// 生成日志
.
catch
((
err
)
=>
{});
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
updatePassword
);
},
const
log_list
=
this
.
$store
.
state
.
log_list
;
},
log_list
.
push
(
logContent
);
};
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
});
this
.
logOut
();
});
}
else
{
this
.
formData
=
{
oldPd
:
""
,
newPd
:
""
,
};
uni
.
showToast
({
title
:
"更新失败,原密码错误,请重新输入!"
,
icon
:
"none"
,
duration
:
2000
,
});
}
})
.
catch
((
err
)
=>
{});
},
},
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.uni-easyinput__placeholder-class {
.uni-easyinput__placeholder-class {
font-size: 14px !important;
font-size: 14px !important;
}
}
.edit-password {
.edit-password {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
background-image: linear-gradient(
background-image: linear-gradient(90deg,
90deg,
#e9f7fe 0%,
#e9f7fe 0%,
#dceffe 40%,
#dceffe 40%,
#d5ebfd 66%,
#d5ebfd 66%,
#c9e8fe 100%);
#c9e8fe 100%
);
.edit-main {
.edit-main {
margin-top: -44px;
margin-top: -44px;
width: 100%;
width: 100%;
// height: calc(100vh - 90px);
// height: calc(100vh - 90px);
// background-image: linear-gradient(
// background-image: linear-gradient(
// 0deg,
// 0deg,
// #f3f6fa 0%,
// #f3f6fa 0%,
// rgba(130, 153, 238, 0.73) 49%,
// rgba(130, 153, 238, 0.73) 49%,
// #5474e8 100%
// #5474e8 100%
// );
// );
background-size: 100% 40rpx;
background-size: 100% 40rpx;
background-repeat: no-repeat;
background-repeat: no-repeat;
.content-main {
.content-main {
height: calc(100vh - 44px - var(--status-bar-height) - 20px);
height: calc(100vh - 44px - var(--status-bar-height) - 20px);
width: 95%;
width: 95%;
margin: 0 auto;
margin: 0 auto;
padding: 20px 30px 30px 20px;
padding: 20px 30px 30px 20px;
background: #fff;
background: #fff;
.content_header {
.content_header {
padding-left: 5px;
padding-left: 5px;
height: 18px;
height: 18px;
line-height: 18px;
line-height: 18px;
}
}
.input-content {
.input-content {
display: flex;
display: flex;
justify-content: center;
justify-content: center;
margin-top: 29.41rpx;
margin-top: 29.41rpx;
.uni-input {
.uni-input {
width: 400px;
width: 400px;
}
}
.uni-btn {
.uni-btn {
width: 400px;
width: 400px;
}
}
}
}
}
}
}
}
.seize-seat {
.seize-seat {
height: 50px;
height: 50px;
width: 100%;
width: 100%;
background-image: linear-gradient(90deg,
background-image: linear-gradient(
#e9f7fe 0%,
90deg,
#dceffe 40%,
#e9f7fe 0%,
#d5ebfd 66%,
#dceffe 40%,
#c9e8fe 100%);
#d5ebfd 66%,
}
#c9e8fe 100%
);
// 导航栏样式
}
.uni-nav-bar-text {
// 导航栏样式
height: 36px;
.uni-nav-bar-text {
width: 36px;
height: 36px;
background: #ffffff;
width: 36px;
border: 0.4px solid rgba(224, 224, 224, 1);
background: #ffffff;
border-radius: 18px;
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 50%;
border-radius: 18px;
color: #333;
border-radius: 50%;
text-align: center;
color: #333;
text-align: center;
.iconfont {
.iconfont {
font-size: 20px;
font-size: 20px;
line-height: 36px;
line-height: 36px;
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/login/login.vue
浏览文件 @
c528b6d4
...
@@ -43,11 +43,8 @@
...
@@ -43,11 +43,8 @@
data
()
{
data
()
{
return
{
return
{
person
:
{
person
:
{
// user: "bjqxj",
account
:
"姜安平"
,
// 超管账号
// pd: "JF85250920",
pwd
:
"Jap@123"
,
account
:
"叶一凡"
,
// 超管账号
pwd
:
"123456"
,
},
},
backButtonPress
:
0
,
backButtonPress
:
0
,
personList
:
[],
personList
:
[],
...
@@ -61,7 +58,7 @@
...
@@ -61,7 +58,7 @@
return
this
.
passwordVisible
?
"密码"
:
"********"
;
return
this
.
passwordVisible
?
"密码"
:
"********"
;
},
},
},
},
created
()
{},
created
()
{},
onShow
()
{},
onShow
()
{},
async
mounted
()
{
async
mounted
()
{
...
@@ -88,25 +85,20 @@
...
@@ -88,25 +85,20 @@
return
true
;
return
true
;
},
},
methods
:
{
methods
:
{
changePwd
(){
userApi
.
changePwd
({
userName
:
'叶一凡'
,
userPwd
:
'qwer1234'
,
userId
:
'29'
})
},
// 切换密码显示/隐藏
// 切换密码显示/隐藏
togglePasswordVisible
()
{
togglePasswordVisible
()
{
this
.
passwordVisible
=
!
this
.
passwordVisible
;
this
.
passwordVisible
=
!
this
.
passwordVisible
;
},
},
// 点击登录
// 点击登录
async
login
()
{
async
login
()
{
userApi
.
login
(
this
.
person
).
then
((
personList
)
=>
{
userApi
.
login
(
this
.
person
).
then
((
res
)
=>
{
this
.
personList
=
personList
.
data
;
if
(
res
.
data
)
{
this
.
$store
.
commit
(
"SET_USER"
,
this
.
personList
);
this
.
personList
=
res
.
data
;
uni
.
navigateTo
({
this
.
$store
.
commit
(
"SET_USER"
,
this
.
personList
);
url
:
"/pages/home/home"
,
uni
.
navigateTo
({
});
url
:
"/pages/home/home"
,
});
}
});
});
},
},
},
},
...
...
utils/fileImport.js
浏览文件 @
c528b6d4
...
@@ -9,19 +9,12 @@
...
@@ -9,19 +9,12 @@
// const userFilePath = "/storage/emulated/0/Android/data/io.dcloud.HBuilder/inspect/user/user.json"
// const userFilePath = "/storage/emulated/0/Android/data/io.dcloud.HBuilder/inspect/user/user.json"
// const userFilePath = "/storage/emulated/0/Android/data/io.dcloud.HBuilder/inspect/export/"
// const userFilePath = "/storage/emulated/0/Android/data/io.dcloud.HBuilder/inspect/export/"
import
userApi
from
'@/api/service/user'
import
userApi
from
'@/api/user.js'
import
feedbackApi
from
'@/api/service/feedback'
import
assroomApi
from
'@/api/assRoom.js'
import
checkDetailApi
from
'@/api/service/checkDetail'
import
hoistwayApi
from
'@/api/hoistway.js'
import
templateApi
from
'@/api/service/feedbackTemplate'
import
inspectApi
from
'@/api/inspect.js'
import
peopleApi
from
'@/api/service/peopleConfig'
import
sampleApi
from
'@/api/service/sample'
import
presenceApi
from
'@/api/service/presence'
import
doubleRandomApi
from
'@/api/service/doubleRandom'
import
_Path
from
'@/constant/ioPath'
import
_Path
from
'@/constant/ioPath'
import
logger
from
'./logger'
import
ioUtil
from
"./ioUtil"
;
import
ioUtil
from
"./ioUtil"
;
import
dateUtil
from
"./date"
;
import
cookie
from
'./cookie'
// 检查是否有zip包
// 检查是否有zip包
async
function
hasCheckFile
()
{
async
function
hasCheckFile
()
{
...
@@ -31,126 +24,6 @@ async function hasCheckFile() {
...
@@ -31,126 +24,6 @@ async function hasCheckFile() {
zipFiles
=
zipFiles
.
filter
(
i
=>
i
.
name
.
indexOf
(
'.zip'
)
!==
-
1
);
zipFiles
=
zipFiles
.
filter
(
i
=>
i
.
name
.
indexOf
(
'.zip'
)
!==
-
1
);
return
zipFiles
.
length
;
return
zipFiles
.
length
;
}
}
// 导入检查数据
async
function
importCheckFile
()
{
const
baseFilePath
=
_Path
.
getImportData
()
const
baseFileEntry
=
await
ioUtil
.
getFileEntry
(
baseFilePath
)
const
unzipPath
=
baseFileEntry
.
fullPath
+
'unzip/'
;
const
zipFiles
=
await
ioUtil
.
getFiles
(
baseFileEntry
);
if
(
!
zipFiles
||
zipFiles
.
length
===
0
)
{
return
}
// 此处为每次导入的包
for
(
let
zipFile
of
zipFiles
)
{
// 解压
if
(
zipFile
.
isDirectory
||
zipFile
.
name
.
indexOf
(
'.zip'
)
===
-
1
)
{
continue
;
}
let
dirName
=
zipFile
.
name
.
indexOf
(
'.'
)
>
-
1
?
zipFile
.
name
.
substring
(
0
,
zipFile
.
name
.
indexOf
(
'.'
))
:
zipFile
.
name
let
unzipDir
=
unzipPath
+
dirName
+
'/'
await
ioUtil
.
removeExistFile
(
unzipDir
)
// 防止解压文件有问题
try
{
let
errorInfo
=
await
ioUtil
.
decompressZip
(
zipFile
.
fullPath
,
unzipDir
)
if
(
errorInfo
&&
errorInfo
.
message
)
{
const
errorDate
=
dateUtil
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
)
await
ioUtil
.
createDir
(
_Path
.
getErrorDir
(),
errorDate
)
const
errorDirEntry
=
await
ioUtil
.
getFileEntry
(
_Path
.
getErrorDir
()
+
errorDate
+
'/'
)
await
ioUtil
.
moveFile
(
zipFile
,
errorDirEntry
)
}
}
catch
(
e
){
console
.
log
(
e
.
message
)
}
let
unzipDirEntry
=
await
ioUtil
.
getFileEntry
(
unzipDir
)
let
checkZipFiles
=
await
ioUtil
.
getFiles
(
unzipDirEntry
)
// 导入数据
// 仅仅保证单个完整包不重复导入,单词导出检查数据是一致的
let
checkList
=
[]
for
(
let
checkZipEntry
of
checkZipFiles
)
{
if
(
!
checkZipEntry
.
isFile
||
checkZipEntry
.
name
.
indexOf
(
'.zip'
)
===
-
1
)
{
continue
}
let
filename
=
ioUtil
.
getFilenameNoExt
(
checkZipEntry
.
name
)
if
(
!
filename
||
checkList
.
indexOf
(
filename
)
>
-
1
)
{
continue
;
}
checkList
.
push
(
filename
)
let
nameArr
=
filename
.
split
(
'_'
)
let
id
=
nameArr
[
0
]
let
checkType
=
nameArr
[
1
]
let
checkPath
=
unzipDir
+
checkType
+
'/'
+
id
await
ioUtil
.
decompressZip
(
checkZipEntry
.
fullPath
,
checkPath
)
// 导入
await
importCheck
(
checkPath
,
id
,
checkType
)
}
// 处理完毕删除
await
ioUtil
.
removeExistFile
(
zipFile
.
fullPath
)
await
ioUtil
.
removeExistFile
(
unzipDirEntry
.
fullPath
)
}
}
// 导入检查
async
function
importCheck
(
checkPath
,
id
,
checkType
)
{
const
checkDirEntry
=
await
ioUtil
.
getFileEntry
(
checkPath
)
const
files
=
await
ioUtil
.
getFiles
(
checkDirEntry
)
if
(
!
files
||
files
.
length
===
0
)
{
return
}
// 创建附件文件目录
let
checkFilePath
=
_Path
.
getCheckFileDir
()
+
checkType
+
'/'
+
id
await
ioUtil
.
removeExistFile
(
checkFilePath
)
await
ioUtil
.
createDir
(
_Path
.
getCheckFileDir
(),
checkType
)
await
ioUtil
.
createDir
(
_Path
.
getCheckFileDir
()
+
'/'
+
checkType
,
id
)
let
checkFileEntry
=
await
ioUtil
.
getFileEntry
(
checkFilePath
)
for
(
let
checkEntry
of
files
)
{
if
(
checkEntry
.
isFile
&&
checkEntry
.
name
.
indexOf
(
'.json'
)
!==
-
1
)
{
// 写入数据库
let
data
=
await
ioUtil
.
readFile
(
checkEntry
)
if
(
!
data
)
{
continue
}
let
checkData
=
JSON
.
parse
(
data
)
// 把评分结果预先存入缓存,用于判断首页用户是否已评分
let
checkScored
=
cookie
.
get
(
'checkScored'
)
if
(
!
checkScored
)
{
checkScored
=
{}
cookie
.
set
(
'checkScored'
,
checkScored
)
}
const
key
=
checkData
.
id
+
'_'
+
checkData
.
checkType
if
(
checkData
.
recheck
===
'1'
&&
checkData
.
recheckScore
)
{
checkScored
[
key
]
=
true
}
else
if
(
checkData
.
recheck
===
'0'
&&
checkData
.
firstScore
)
{
checkScored
[
key
]
=
true
}
else
{
checkScored
[
key
]
=
false
}
cookie
.
set
(
'checkScored'
,
checkScored
)
// 评分
await
feedbackApi
.
saveBatch
(
checkData
.
feedbackList
)
// 明细
await
checkDetailApi
.
saveBatch
(
checkData
.
checkDetailList
)
// 检查
if
(
checkData
.
checkType
===
'1'
)
{
await
sampleApi
.
save
(
checkData
)
}
else
if
(
checkData
.
checkType
===
'2'
)
{
await
presenceApi
.
save
(
checkData
)
}
else
if
(
checkData
.
checkType
>
2
)
{
await
doubleRandomApi
.
save
(
checkData
)
}
}
else
{
await
ioUtil
.
copyFileDir
(
checkEntry
,
checkFileEntry
)
}
}
}
// 导入基础数据,包括:用户、人员配置、检查明细、评分表模板等
// 导入基础数据,包括:用户、人员配置、检查明细、评分表模板等
async
function
importBaseFile
()
{
async
function
importBaseFile
()
{
...
@@ -166,6 +39,7 @@ async function importBaseFile() {
...
@@ -166,6 +39,7 @@ async function importBaseFile() {
await
ioUtil
.
decompressZip
(
zipFileEntry
.
fullPath
,
unzipPath
)
await
ioUtil
.
decompressZip
(
zipFileEntry
.
fullPath
,
unzipPath
)
unzipEntry
=
await
ioUtil
.
getFileEntry
(
unzipPath
);
unzipEntry
=
await
ioUtil
.
getFileEntry
(
unzipPath
);
}
}
debugger
// 导入
// 导入
let
fileEntries
=
[]
let
fileEntries
=
[]
if
(
unzipEntry
)
{
if
(
unzipEntry
)
{
...
@@ -207,7 +81,6 @@ async function importBaseFile() {
...
@@ -207,7 +81,6 @@ async function importBaseFile() {
}
}
export
default
{
export
default
{
importCheckFile
,
importBaseFile
,
importBaseFile
,
hasCheckFile
hasCheckFile
};
};
utils/sqllitedb.js
浏览文件 @
c528b6d4
...
@@ -109,7 +109,6 @@ export default class SqlliteDB {
...
@@ -109,7 +109,6 @@ export default class SqlliteDB {
// 增删改使用
// 增删改使用
async
executeSQL
(
sql
)
{
async
executeSQL
(
sql
)
{
await
this
.
checkDB
();
// console.log('excuteSQL:' + sql)
// console.log('excuteSQL:' + sql)
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
plus
.
sqlite
.
executeSql
({
plus
.
sqlite
.
executeSql
({
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论