提交 9efe6645 authored 作者: 邓文彬's avatar 邓文彬

fix(pad): bug修改

上级 d522c8ff
...@@ -68,14 +68,16 @@ export default { ...@@ -68,14 +68,16 @@ export default {
uni.setStorageSync("now_user", this.$store.state.now_user); uni.setStorageSync("now_user", this.$store.state.now_user);
uni.setStorageSync("last_time", this.$store.state.now_user.LastSynchronizationTime); uni.setStorageSync("last_time", this.$store.state.now_user.LastSynchronizationTime);
uni.redirectTo({ // uni.redirectTo({
url: "/pages/login/login", // url: "/pages/login/login",
}); // });
uni.clearStorage(); //将所有缓存清除 // uni.clearStorage(); //将所有缓存清除
console.log("---测试", ) console.log("---onHide", )
},
onUnload() {
console.log("-----onUnload-------")
}, },
onUnload() {},
methods: { methods: {
/** /**
* 第一步: 检查目录是否存在,如果没有就创建 * 第一步: 检查目录是否存在,如果没有就创建
......
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path" : "pages/home/home", "path": "pages/login/login"
"style" : },
{ {
"navigationBarTitleText" : "" "path": "pages/home/home",
"style": {
"navigationBarTitleText": ""
} }
}, },
{ //操作日志 { //操作日志
"path": "pages/index/operLog" "path": "pages/index/operLog"
}, },
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"path": "pages/synchronization/synchronization" "path": "pages/synchronization/synchronization"
}, },
//巡检管理 //巡检管理
{ {
"path": "pages/inspection/inspection" "path": "pages/inspection/inspection"
}, },
{ {
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
}, },
{ //报告管理 { //报告管理
"path": "pages/report/report" "path": "pages/report/report"
}, },
{ //查看报告 { //查看报告
"path": "pages/report/lookReport" "path": "pages/report/lookReport"
...@@ -59,10 +58,6 @@ ...@@ -59,10 +58,6 @@
}, },
{ //报修样表 { //报修样表
"path": "pages/repair/sampleTable" "path": "pages/repair/sampleTable"
},
{
"path": "pages/login/login"
}, },
{ //报告管理1 { //报告管理1
"path": "pages/report/report-detail/deatil_first" "path": "pages/report/report-detail/deatil_first"
...@@ -71,44 +66,38 @@ ...@@ -71,44 +66,38 @@
"path": "pages/index/editPd" "path": "pages/index/editPd"
}, },
{ {
"path" : "pages/home/home", "path": "pages/home/home",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "pages/inspectionPage/inspectionPage", "path": "pages/inspectionPage/inspectionPage",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "pages/inspectionContent/inspectionContent", "path": "pages/inspectionContent/inspectionContent",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "pages/shaftInspection/shaftInspection", "path": "pages/shaftInspection/shaftInspection",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
} }
], ],
"globalStyle": { "globalStyle": {
"pageOrientation": "landscape", "pageOrientation": "landscape",
"navigationStyle": "custom", "navigationStyle": "custom",
"rpxCalcMaxDeviceWidth": 2000, "rpxCalcMaxDeviceWidth": 2000,
"rpxCalcIncludeWidth": 750 "rpxCalcIncludeWidth": 750
}, },
"uniIdRouter": {}, "uniIdRouter": {},
"condition" : { //模式配置,仅开发期间生效 "condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项) "current": 0, //当前激活的模式(list 的索引项)
"list": [ "list": [
{ {
......
...@@ -54,10 +54,11 @@ export const addLog = (content) => { ...@@ -54,10 +54,11 @@ export const addLog = (content) => {
const now_user = store.state.now_user; const now_user = store.state.now_user;
let timeStr = moment().format("yyyy-MM-DD"); let timeStr = moment().format("yyyy-MM-DD");
let fileName = `${timeStr}.txt`; 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( createFileWithPlusIO(
`${SYNCHRONIZE_DATA_PAD}/日志文件/${now_user.user}`, `${SYNCHRONIZE_DATA_PAD}/日志文件/${now_user.user}`,
...@@ -82,12 +83,16 @@ export const readLogData = () => { ...@@ -82,12 +83,16 @@ export const readLogData = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
readFilesInDirectory(directoryPath) readFilesInDirectory(directoryPath)
.then((res) => { .then((res) => {
// console.log("--读取日志-, ", directoryPath, res);
const temp = res.map((element) => { const temp = res.map((element) => {
return JSON.parse(Base64.decode(element)); return JSON.parse(Base64.decode(element));
}); });
console.log("--读取日志-, ", temp, );
resolve(lodash.flattenDeep(temp)); resolve(lodash.flattenDeep(temp));
}) })
.catch((error) => reject(error)); .catch((error) => reject(error));
......
...@@ -63,7 +63,7 @@ export const USER_LiST = [ ...@@ -63,7 +63,7 @@ export const USER_LiST = [
user: "admin", // 有用 谁创建,谁有权限编辑和删除 user: "admin", // 有用 谁创建,谁有权限编辑和删除
passWord: "JF123456", // 有用 passWord: "JF123456", // 有用
roleName: "超管", // 有用 -- 职位名称 roleName: "超管", // 有用 -- 职位名称
unitName: "所属单位", // 所属单位 unitName: "超管所属单位", // 所属单位
isAdmin: true, // 标识超管权限 isAdmin: true, // 标识超管权限
LastSynchronizationTime: "", // 上次同步时间 LastSynchronizationTime: "", // 上次同步时间
}, },
...@@ -72,7 +72,7 @@ export const USER_LiST = [ ...@@ -72,7 +72,7 @@ export const USER_LiST = [
user: "test1", // 有用 谁创建,谁有权限编辑和删除 user: "test1", // 有用 谁创建,谁有权限编辑和删除
passWord: "JF123456", // 有用 passWord: "JF123456", // 有用
roleName: "巡检员1", // 有用 roleName: "巡检员1", // 有用
unitName: "所属单位", // 所属单位 unitName: "巡检员1所属单位", // 所属单位
isAdmin: false, // 标识超管权限 isAdmin: false, // 标识超管权限
LastSynchronizationTime: "", // 上次同步时间 LastSynchronizationTime: "", // 上次同步时间
}, },
...@@ -81,7 +81,7 @@ export const USER_LiST = [ ...@@ -81,7 +81,7 @@ export const USER_LiST = [
user: "test2", // 有用 谁创建,谁有权限编辑和删除 user: "test2", // 有用 谁创建,谁有权限编辑和删除
passWord: "JF123456", // 有用 passWord: "JF123456", // 有用
roleName: "巡检员2", // 有用 roleName: "巡检员2", // 有用
unitName: "所属单位", // 所属单位 unitName: "巡检员1所属单位", // 所属单位
isAdmin: false, // 标识超管权限 isAdmin: false, // 标识超管权限
LastSynchronizationTime: "", // 上次同步时间 LastSynchronizationTime: "", // 上次同步时间
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论