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

fix(pad): bug修改

上级 d522c8ff
......@@ -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": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/home/home",
"style" :
"path": "pages/login/login"
},
{
"navigationBarTitleText" : ""
"path": "pages/home/home",
"style": {
"navigationBarTitleText": ""
}
},
{ //操作日志
"path": "pages/index/operLog"
},
......@@ -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": [
{
......
......@@ -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));
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论