Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
9efe6645
提交
9efe6645
authored
9月 19, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(pad): bug修改
上级
d522c8ff
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
39 行增加
和
43 行删除
+39
-43
App.vue
App.vue
+8
-6
pages.json
pages.json
+20
-31
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+8
-3
systemCofig.js
utils/systemCofig.js
+3
-3
没有找到文件。
App.vue
浏览文件 @
9efe6645
...
...
@@ -68,14 +68,16 @@ export default {
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
});
uni
.
clearStorage
();
//将所有缓存清除
//
uni.redirectTo({
//
url: "/pages/login/login",
//
});
//
uni.clearStorage(); //将所有缓存清除
console
.
log
(
"---测试"
,
)
console
.
log
(
"---onHide"
,
)
},
onUnload
()
{
console
.
log
(
"-----onUnload-------"
)
},
onUnload
()
{},
methods
:
{
/**
* 第一步: 检查目录是否存在,如果没有就创建
...
...
pages.json
浏览文件 @
9efe6645
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/home/home"
,
"style"
:
{
"navigationBarTitleText"
:
""
"path"
:
"pages/login/login"
},
{
"path"
:
"pages/home/home"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
//操作日志
"path"
:
"pages/index/operLog"
},
...
...
@@ -16,7 +16,7 @@
"path"
:
"pages/synchronization/synchronization"
},
//巡检管理
{
{
"path"
:
"pages/inspection/inspection"
},
{
...
...
@@ -46,7 +46,6 @@
},
{
//报告管理
"path"
:
"pages/report/report"
},
{
//查看报告
"path"
:
"pages/report/lookReport"
...
...
@@ -59,10 +58,6 @@
},
{
//报修样表
"path"
:
"pages/repair/sampleTable"
},
{
"path"
:
"pages/login/login"
},
{
//报告管理
1
"path"
:
"pages/report/report-detail/deatil_first"
...
...
@@ -71,44 +66,38 @@
"path"
:
"pages/index/editPd"
},
{
"path"
:
"pages/home/home"
,
"style"
:
{
"navigationBarTitleText"
:
""
"path"
:
"pages/home/home"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/inspectionPage/inspectionPage"
,
"style"
:
{
"navigationBarTitleText"
:
""
"path"
:
"pages/inspectionPage/inspectionPage"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/inspectionContent/inspectionContent"
,
"style"
:
{
"navigationBarTitleText"
:
""
"path"
:
"pages/inspectionContent/inspectionContent"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"pages/shaftInspection/shaftInspection"
,
"style"
:
{
"navigationBarTitleText"
:
""
"path"
:
"pages/shaftInspection/shaftInspection"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
}
],
"globalStyle"
:
{
"pageOrientation"
:
"landscape"
,
"navigationStyle"
:
"custom"
,
"rpxCalcMaxDeviceWidth"
:
2000
,
"rpxCalcIncludeWidth"
:
750
},
"uniIdRouter"
:
{},
"condition"
:
{
//模式配置,仅开发期间生效
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
{
...
...
utils/IoReadingAndWriting.js
浏览文件 @
9efe6645
...
...
@@ -54,10 +54,11 @@ export const addLog = (content) => {
const
now_user
=
store
.
state
.
now_user
;
let
timeStr
=
moment
().
format
(
"yyyy-MM-DD"
);
let
fileName
=
`
${
timeStr
}
.txt`
;
const
temp
=
content
.
filter
(
item
=>
item
.
user
==
now_user
.
user
)
console
.
log
(
"-新增日志-"
,
content
);
console
.
log
(
"-新增日志-"
,
temp
);
const
fileContent
=
Base64
.
encode
(
JSON
.
stringify
(
content
));
// 方便验证
const
fileContent
=
Base64
.
encode
(
JSON
.
stringify
(
temp
));
// 方便验证
createFileWithPlusIO
(
`
${
SYNCHRONIZE_DATA_PAD
}
/日志文件/
${
now_user
.
user
}
`
,
...
...
@@ -82,12 +83,16 @@ export const readLogData = () => {
return
new
Promise
((
resolve
,
reject
)
=>
{
readFilesInDirectory
(
directoryPath
)
.
then
((
res
)
=>
{
// console.log("--读取日志-, ", directoryPath, res);
const
temp
=
res
.
map
((
element
)
=>
{
return
JSON
.
parse
(
Base64
.
decode
(
element
));
});
console
.
log
(
"--读取日志-, "
,
temp
,
);
resolve
(
lodash
.
flattenDeep
(
temp
));
})
.
catch
((
error
)
=>
reject
(
error
));
...
...
utils/systemCofig.js
浏览文件 @
9efe6645
...
...
@@ -63,7 +63,7 @@ export const USER_LiST = [
user
:
"admin"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
roleName
:
"超管"
,
// 有用 -- 职位名称
unitName
:
"所属单位"
,
// 所属单位
unitName
:
"
超管
所属单位"
,
// 所属单位
isAdmin
:
true
,
// 标识超管权限
LastSynchronizationTime
:
""
,
// 上次同步时间
},
...
...
@@ -72,7 +72,7 @@ export const USER_LiST = [
user
:
"test1"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
roleName
:
"巡检员1"
,
// 有用
unitName
:
"所属单位"
,
// 所属单位
unitName
:
"
巡检员1
所属单位"
,
// 所属单位
isAdmin
:
false
,
// 标识超管权限
LastSynchronizationTime
:
""
,
// 上次同步时间
},
...
...
@@ -81,7 +81,7 @@ export const USER_LiST = [
user
:
"test2"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
roleName
:
"巡检员2"
,
// 有用
unitName
:
"所属单位"
,
// 所属单位
unitName
:
"
巡检员1
所属单位"
,
// 所属单位
isAdmin
:
false
,
// 标识超管权限
LastSynchronizationTime
:
""
,
// 上次同步时间
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论