Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
monthReport_smzx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
monthReport_smzx
Commits
d522c8ff
提交
d522c8ff
authored
9月 19, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(pad): bug修改
上级
db344710
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
140 行增加
和
107 行删除
+140
-107
App.vue
App.vue
+8
-4
content.vue
pages/home/content.vue
+10
-14
home.vue
pages/home/home.vue
+16
-13
inspFirst.vue
pages/inspection/inspFirst.vue
+3
-2
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+2
-0
index.vue
pages/inspectionManagement/index.vue
+5
-4
login.vue
pages/login/login.vue
+17
-57
sampleTable.vue
pages/report/sampleTable.vue
+1
-1
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+1
-0
dialog.vue
pages/synchronousManagement/dialog.vue
+38
-0
index.vue
pages/synchronousManagement/index.vue
+4
-4
jd_bg.png
static/img/add-img/jd_bg.png
+0
-0
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+1
-1
systemCofig.js
utils/systemCofig.js
+34
-7
没有找到文件。
App.vue
浏览文件 @
d522c8ff
...
@@ -55,7 +55,6 @@ export default {
...
@@ -55,7 +55,6 @@ export default {
function
(
e
)
{}
function
(
e
)
{}
);
);
// #endif
// #endif
},
},
onShow
:
function
()
{
onShow
:
function
()
{
const
now_user
=
uni
.
getStorageSync
(
"now_user"
)
||
{};
const
now_user
=
uni
.
getStorageSync
(
"now_user"
)
||
{};
...
@@ -63,13 +62,18 @@ export default {
...
@@ -63,13 +62,18 @@ export default {
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
}
}
this
.
init
();
this
.
init
();
},
},
onHide
:
function
()
{
onHide
:
function
()
{
// app关闭时将数据存储到本地缓存
// app关闭时将数据存储到本地缓存
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
.
loginTime
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
});
uni
.
clearStorage
();
//将所有缓存清除
console
.
log
(
"---测试"
,
)
},
},
onUnload
()
{},
onUnload
()
{},
methods
:
{
methods
:
{
...
@@ -95,7 +99,7 @@ export default {
...
@@ -95,7 +99,7 @@ export default {
});
});
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
console
.
log
(
"--USER_LiST-"
,
USER_LiST
)
console
.
log
(
"--USER_LiST-"
,
USER_LiST
)
;
// 文件不存在, 写入文件
// 文件不存在, 写入文件
const
fileContent
=
JSON
.
stringify
(
const
fileContent
=
JSON
.
stringify
(
Base64
.
encode
(
JSON
.
stringify
(
USER_LiST
))
Base64
.
encode
(
JSON
.
stringify
(
USER_LiST
))
...
...
pages/home/content.vue
浏览文件 @
d522c8ff
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
>
HI,欢迎回来
{{
userInfo
.
name
}}{{
userInfo
.
user
}}
!
</view
>
HI,欢迎回来
{{
userInfo
.
name
}}{{
userInfo
.
user
}}
!
</view
>
>
<view
class=
"unit"
>
所属单位:
{{
userInfo
.
unitName
||
"--"
}}
</view>
<view
class=
"unit"
>
所属单位:
{{
userInfo
.
unitName
||
"--"
}}
</view>
<view
class=
"time"
>
上次
登录
时间:
{{
lastTime
||
"--"
}}
</view>
<view
class=
"time"
>
上次
同步
时间:
{{
lastTime
||
"--"
}}
</view>
<image
<image
class=
"bg-img"
class=
"bg-img"
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
></image>
></image>
</view>
</view>
<view
class=
"card-item"
@
click=
"toSyncPage"
>
<view
class=
"card-item"
@
click=
"toSyncPage"
>
<view
class=
"title2x"
>
巡检
、报修
记录
</view>
<view
class=
"title2x"
>
巡检记录
</view>
<view
class=
"count"
>
<view
class=
"count"
>
<text
class=
"num"
>
{{
syncCount
}}
</text
<text
class=
"num"
>
{{
syncCount
}}
</text
>
条
>
条
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
:key=
"index"
:key=
"index"
>
>
<view
v-if=
"(item.list || []).length"
class=
"seconed-title"
>
<view
v-if=
"(item.list || []).length"
class=
"seconed-title"
>
{{
item
.
time
}}
{{
item
.
submitTime
||
item
.
time
}}
</view>
</view>
<view
class=
"inspect-list"
>
<view
class=
"inspect-list"
>
...
@@ -100,7 +100,7 @@ export default {
...
@@ -100,7 +100,7 @@ export default {
},
},
created
()
{
created
()
{
this
.
lastTime
=
uni
.
getStorageSync
(
"last_time"
)
||
""
;
this
.
lastTime
=
uni
.
getStorageSync
(
"last_time"
)
||
""
;
// uni.getStorageSync("last_time", this.$store.state.now_user.
logi
nTime || "");
// uni.getStorageSync("last_time", this.$store.state.now_user.
LastSynchronizatio
nTime || "");
},
},
mounted
()
{
mounted
()
{
this
.
init
();
this
.
init
();
...
@@ -110,7 +110,6 @@ export default {
...
@@ -110,7 +110,6 @@ export default {
userInfo
()
{
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
...
@@ -152,11 +151,11 @@ export default {
...
@@ -152,11 +151,11 @@ export default {
const
tempAllData
=
{};
const
tempAllData
=
{};
all_data
.
forEach
((
item
)
=>
{
all_data
.
forEach
((
item
)
=>
{
const
val
=
tempAllData
[
item
.
submit
Time
]
||
[];
const
val
=
tempAllData
[
item
.
submit
Month
]
||
[];
if
(
val
.
length
)
{
if
(
val
.
length
)
{
tempAllData
[
item
.
submit
Time
].
push
(
item
);
tempAllData
[
item
.
submit
Month
].
push
(
item
);
}
else
{
}
else
{
tempAllData
[
item
.
submit
Time
]
=
[
item
];
tempAllData
[
item
.
submit
Month
]
=
[
item
];
}
}
});
});
...
@@ -225,8 +224,6 @@ export default {
...
@@ -225,8 +224,6 @@ export default {
},
},
toPage
()
{
toPage
()
{
uni
.
showLoading
();
uni
.
showLoading
();
getDarft
()
getDarft
()
...
@@ -278,7 +275,7 @@ export default {
...
@@ -278,7 +275,7 @@ export default {
margin-right: 16px;
margin-right: 16px;
height: 166px;
height: 166px;
box-sizing: border-box;
box-sizing: border-box;
padding: 32px 0 24px
24
px;
padding: 32px 0 24px
12
px;
position: relative;
position: relative;
overflow: hidden;
overflow: hidden;
...
@@ -296,9 +293,8 @@ export default {
...
@@ -296,9 +293,8 @@ export default {
position: absolute;
position: absolute;
right: 0px;
right: 0px;
bottom: 0px;
bottom: 0px;
width: 160px;
width: 110px;
height: 150px;
height: 130px;
// z-index: -1;
z-index: 1;
z-index: 1;
}
}
...
...
pages/home/home.vue
浏览文件 @
d522c8ff
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<view
class=
"user-info"
>
<view
class=
"user-info"
>
<image
class=
"user-img"
src=
"@/static/img/add-img/home1.png"
></image>
<image
class=
"user-img"
src=
"@/static/img/add-img/home1.png"
></image>
<text
class=
"text"
>
{{
userName
}}
</text>
<text
class=
"text"
>
{{
userName
}}
</text>
</view>
</view>
<view
class=
"tab-list"
>
<view
class=
"tab-list"
>
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
<view
class=
"button-group"
>
<view
class=
"button-group"
>
<!-- v-if="isAdmin" -->
<!-- v-if="isAdmin" -->
<view
<view
class=
"log-button"
@
click=
"lookLog"
>
操作日志
</view>
class=
"log-button"
@
click=
"lookLog"
>
操作日志
</view>
<view
class=
"reset-password-button"
@
click=
"updatePassword"
<view
class=
"reset-password-button"
@
click=
"updatePassword"
>
修改密码?
</view
>
修改密码?
</view
>
>
...
@@ -81,7 +80,7 @@ export default {
...
@@ -81,7 +80,7 @@ export default {
{
{
defaultIcon
:
"iconfont icon-yingyongyewuguanli1"
,
defaultIcon
:
"iconfont icon-yingyongyewuguanli1"
,
isActive
:
true
,
isActive
:
true
,
text
:
"
首
页"
,
text
:
"
主
页"
,
},
},
{
{
defaultIcon
:
"iconfont icon-Inspection"
,
defaultIcon
:
"iconfont icon-Inspection"
,
...
@@ -98,14 +97,17 @@ export default {
...
@@ -98,14 +97,17 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
isAdmin
(){
isAdmin
()
{
return
this
.
$store
.
state
.
now_user
.
isAdmin
return
this
.
$store
.
state
.
now_user
.
isAdmin
;
}
}
,
},
},
onLoad
(
options
=
{})
{
onLoad
(
options
=
{})
{
// options就是路由参数,它是一个对象
// options就是路由参数,它是一个对象
// this.tabIndex = ;
// this.tabIndex = ;
this
.
tabClick
({},
options
.
tabIndex
||
0
);
this
.
tabClick
({},
options
.
tabIndex
||
0
);
},
watch
:
{
},
},
methods
:
{
methods
:
{
// 修改密码
// 修改密码
...
@@ -128,14 +130,15 @@ export default {
...
@@ -128,14 +130,15 @@ export default {
dialogInputConfirm2
()
{
dialogInputConfirm2
()
{
uni
.
redirectTo
({
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
url
:
"/pages/login/login"
,
success
:
()
=>
{
success
:
()
=>
{
// uni.clearStorage(); //测试将所有缓存清除
// uni.clearStorage(); //测试将所有缓存清除
// console.log("-退出---",this.$store.state.now_user.
logi
nTime)
// console.log("-退出---",this.$store.state.now_user.
LastSynchronizatio
nTime)
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
.
loginTime
||
""
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
||
""
);
},
},
});
});
},
},
...
@@ -181,7 +184,7 @@ export default {
...
@@ -181,7 +184,7 @@ export default {
align-items: center;
align-items: center;
justify-content: flex-end;
justify-content: flex-end;
height: 72px;
height: 72px;
// border: 1px solid;
// border: 1px solid;
.user-img {
.user-img {
height: 48px;
height: 48px;
...
...
pages/inspection/inspFirst.vue
浏览文件 @
d522c8ff
...
@@ -104,7 +104,7 @@ export default {
...
@@ -104,7 +104,7 @@ export default {
this
.
formData
=
{
this
.
formData
=
{
inspectionType
:
"1"
,
inspectionType
:
"1"
,
inspectionCode
:
`JFXJ
${
moment
().
format
(
"yyyyMMDDhhmmss"
)}
`
,
inspectionCode
:
`JFXJ
${
moment
().
format
(
"yyyyMMDDhhmmss"
)}
`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD
hhmmss
"
)}
-机房巡检记录`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDD"
)}
-机房巡检记录`
,
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm:ss"
),
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm:ss"
),
inspectionBy
:
this
.
$store
.
state
.
now_user
.
user
,
inspectionBy
:
this
.
$store
.
state
.
now_user
.
user
,
inspectionById
:
this
.
$store
.
state
.
now_user
.
userId
,
inspectionById
:
this
.
$store
.
state
.
now_user
.
userId
,
...
@@ -116,6 +116,7 @@ export default {
...
@@ -116,6 +116,7 @@ export default {
fillCheck
:
""
,
// tab字典的value值, 校验通过的
fillCheck
:
""
,
// tab字典的value值, 校验通过的
creatTime
:
`
${
new
Date
().
getTime
()}
`
,
creatTime
:
`
${
new
Date
().
getTime
()}
`
,
items
:
[
items
:
[
// {
// {
// "itemCode": "1", // 检查项
// "itemCode": "1", // 检查项
...
@@ -127,7 +128,7 @@ export default {
...
@@ -127,7 +128,7 @@ export default {
},
},
change
(
val
)
{
change
(
val
)
{
this
.
formData
.
recordName
=
`
${
moment
().
format
(
"yyyyMMDD
hhmmss
"
)}
-
${
this
.
formData
.
recordName
=
`
${
moment
().
format
(
"yyyyMMDD"
)}
-
${
val
.
detail
.
data
.
text
val
.
detail
.
data
.
text
}
`
;
}
`
;
this
.
formData
.
inspectionType
=
val
.
detail
.
value
;
this
.
formData
.
inspectionType
=
val
.
detail
.
value
;
...
...
pages/inspectionContent/inspectionContent.vue
浏览文件 @
d522c8ff
...
@@ -436,6 +436,8 @@ export default {
...
@@ -436,6 +436,8 @@ export default {
isException
,
isException
,
synchronization
:
0
,
// 是否导出过
synchronization
:
0
,
// 是否导出过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
originData
:
{
originData
:
{
baseInfo
,
baseInfo
,
tempForm
,
tempForm
,
...
...
pages/inspectionManagement/index.vue
浏览文件 @
d522c8ff
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
:key=
"index"
:key=
"index"
>
>
<view
v-if=
"(item.list || []).length"
class=
"seconed-title"
>
<view
v-if=
"(item.list || []).length"
class=
"seconed-title"
>
{{
item
.
time
}}
{{
item
.
submitTime
||
item
.
time
}}
</view>
</view>
<view
class=
"inspect-list"
>
<view
class=
"inspect-list"
>
...
@@ -98,11 +99,11 @@ export default {
...
@@ -98,11 +99,11 @@ export default {
const
tempAllData
=
{};
const
tempAllData
=
{};
all_data
.
forEach
((
item
)
=>
{
all_data
.
forEach
((
item
)
=>
{
const
val
=
tempAllData
[
item
.
submit
Time
]
||
[];
const
val
=
tempAllData
[
item
.
submit
Month
]
||
[];
if
(
val
.
length
)
{
if
(
val
.
length
)
{
tempAllData
[
item
.
submit
Time
].
push
(
item
);
tempAllData
[
item
.
submit
Month
].
push
(
item
);
}
else
{
}
else
{
tempAllData
[
item
.
submit
Time
]
=
[
item
];
tempAllData
[
item
.
submit
Month
]
=
[
item
];
}
}
});
});
...
...
pages/login/login.vue
浏览文件 @
d522c8ff
...
@@ -33,6 +33,7 @@ import {
...
@@ -33,6 +33,7 @@ import {
TEST
,
TEST
,
TEST_2X
,
TEST_2X
,
USER_FILE_NAME
,
USER_FILE_NAME
,
getUserList
,
}
from
"@/utils/systemCofig"
;
}
from
"@/utils/systemCofig"
;
import
{
import
{
...
@@ -72,7 +73,10 @@ export default {
...
@@ -72,7 +73,10 @@ export default {
uni
.
setStorageSync
(
"oper_record"
,
this
.
$store
.
state
.
oper_record
);
uni
.
setStorageSync
(
"oper_record"
,
this
.
$store
.
state
.
oper_record
);
uni
.
setStorageSync
(
"all_data"
,
this
.
$store
.
state
.
all_data
);
uni
.
setStorageSync
(
"all_data"
,
this
.
$store
.
state
.
all_data
);
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
.
loginTime
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
plus
.
runtime
.
quit
();
plus
.
runtime
.
quit
();
}
else
{
}
else
{
plus
.
nativeUI
.
toast
(
"再划一次退出应用"
);
plus
.
nativeUI
.
toast
(
"再划一次退出应用"
);
...
@@ -83,33 +87,9 @@ export default {
...
@@ -83,33 +87,9 @@ export default {
return
true
;
return
true
;
},
},
methods
:
{
methods
:
{
setUser
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
const
value
=
uni
.
getStorageSync
(
"user_data"
);
if
(
value
)
{
// this.personList = JSON.parse(value);
// console.log("---this.personList", this.personList);
resolve
(
eval
(
value
));
}
else
{
uni
.
getStorage
({
key
:
"user_data"
,
success
:
function
(
res
)
{
// this.personList =;
// console.log("---this.personList", this.personList);
resolve
(
eval
(
value
));
},
});
}
}
catch
(
e
)
{
console
.
log
(
"setUser--"
,
e
);
}
});
},
// 点击登录
// 点击登录
login
()
{
login
()
{
this
.
setUser
().
then
((
personList
)
=>
{
getUserList
().
then
((
personList
)
=>
{
this
.
personList
=
personList
;
this
.
personList
=
personList
;
console
.
log
(
"111"
,
personList
);
console
.
log
(
"111"
,
personList
);
...
@@ -134,42 +114,14 @@ export default {
...
@@ -134,42 +114,14 @@ export default {
this
.
person
.
user
==
this
.
personList
[
key
].
user
&&
this
.
person
.
user
==
this
.
personList
[
key
].
user
&&
this
.
person
.
pd
==
this
.
personList
[
key
].
passWord
this
.
person
.
pd
==
this
.
personList
[
key
].
passWord
)
{
)
{
// 存储最近一次登陆时间
const
userInfo
=
this
.
personList
[
key
];
const
userInfo
=
this
.
personList
[
key
];
uni
.
setStorageSync
(
"last_time"
,
userInfo
.
loginTime
||
""
);
// console.log("--last_time----",userInfo.loginTime)
// 更新用户登陆时间
const
loginTime
=
moment
().
format
(
"yyyy-MM-DD"
);
this
.
personList
[
key
].
loginTime
=
loginTime
;
userInfo
.
loginTime
=
loginTime
;
this
.
$store
.
commit
(
"SET_USER"
,
userInfo
);
this
.
$store
.
commit
(
"SET_USER"
,
userInfo
);
uni
.
setStorageSync
(
"now_user"
,
userInfo
);
uni
.
setStorageSync
(
"now_user"
,
userInfo
);
// console.log("--userInfo---", userInfo);
// console.log("写入用户数据内容---", this.personList);
// 更新用户数据
const
fileContent
=
JSON
.
stringify
(
Base64
.
encode
(
JSON
.
stringify
(
personList
))
);
uni
.
setStorage
({
key
:
"user_data"
,
data
:
JSON
.
stringify
(
personList
),
fail
:
(
error
)
=>
{
console
.
log
(
"APP.vue 存储数据失败"
,
error
);
},
});
createFileWithPlusIO
(
SYNCHRONIZE_DATA_PAD
,
USER_FILE_NAME
,
fileContent
);
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/home/home"
,
url
:
"/pages/home/home"
,
});
});
uni
.
showToast
({
uni
.
showToast
({
title
:
"登录成功"
,
title
:
"登录成功"
,
icon
:
"none"
,
icon
:
"none"
,
...
@@ -181,6 +133,9 @@ export default {
...
@@ -181,6 +133,9 @@ export default {
const
log_list
=
res
;
const
log_list
=
res
;
// 更新日志信息
// 更新日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
login
);
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
login
);
log_list
.
push
(
logContent
);
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
);
addLog
(
log_list
);
...
@@ -188,6 +143,7 @@ export default {
...
@@ -188,6 +143,7 @@ export default {
uni
.
hideLoading
();
uni
.
hideLoading
();
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
if
(
error
.
code
==
0
)
{
if
(
error
.
code
==
0
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
error
.
msg
,
title
:
error
.
msg
,
...
@@ -207,8 +163,10 @@ export default {
...
@@ -207,8 +163,10 @@ export default {
// 密码不正确
// 密码不正确
}
else
{
}
else
{
console
.
log
(
"222"
);
uni
.
showToast
({
uni
.
showToast
({
title
:
"密码错误"
,
title
:
"密码错误
,请重试
"
,
icon
:
"none"
,
icon
:
"none"
,
duration
:
2000
,
duration
:
2000
,
});
});
...
@@ -216,8 +174,10 @@ export default {
...
@@ -216,8 +174,10 @@ export default {
}
}
// 不存在该账号
// 不存在该账号
}
else
{
}
else
{
console
.
log
(
"3333"
);
uni
.
showToast
({
uni
.
showToast
({
title
:
"
账号不存在
"
,
title
:
"
您无权登录,请联系管理员处理
"
,
icon
:
"none"
,
icon
:
"none"
,
duration
:
2000
,
duration
:
2000
,
});
});
...
...
pages/report/sampleTable.vue
浏览文件 @
d522c8ff
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<view
class=
"image-item top-image"
>
<view
class=
"image-item top-image"
>
<image
<image
src=
"@/static/img/add-img/jd_
table
.png"
src=
"@/static/img/add-img/jd_
bg
.png"
mode=
"widthFix"
mode=
"widthFix"
></image>
></image>
</view>
</view>
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
d522c8ff
...
@@ -338,6 +338,7 @@ export default {
...
@@ -338,6 +338,7 @@ export default {
items
:
[],
items
:
[],
synchronization
:
0
,
// 是否导出过
synchronization
:
0
,
// 是否导出过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
submitMonth
:
moment
().
format
(
"yyyy-MM"
),
// 记录提交月份
originData
:
{
originData
:
{
baseInfo
,
baseInfo
,
tempForm
,
tempForm
,
...
...
pages/synchronousManagement/dialog.vue
浏览文件 @
d522c8ff
...
@@ -43,6 +43,8 @@ import {
...
@@ -43,6 +43,8 @@ import {
checkAndCreateDirectory
,
checkAndCreateDirectory
,
createFileWithPlusIO
,
createFileWithPlusIO
,
setSm2
,
setSm2
,
USER_FILE_NAME
,
getUserList
,
}
from
"@/utils/systemCofig"
;
}
from
"@/utils/systemCofig"
;
import
{
import
{
...
@@ -174,6 +176,7 @@ export default {
...
@@ -174,6 +176,7 @@ export default {
}
}
});
});
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
allList
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
allList
);
console
.
log
(
"---userData---"
,
userData
);
const
keys
=
Object
.
keys
(
userData
);
const
keys
=
Object
.
keys
(
userData
);
const
promiseArr
=
keys
.
map
((
key
)
=>
{
const
promiseArr
=
keys
.
map
((
key
)
=>
{
...
@@ -205,6 +208,9 @@ export default {
...
@@ -205,6 +208,9 @@ export default {
addLog
(
log_list
).
then
((
res
)
=>
{
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
console
.
log
(
"日志文件写入成功"
);
});
});
// 更新同步时间
this
.
updateSysTime
();
},
2
*
1000
);
},
2
*
1000
);
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
@@ -239,6 +245,38 @@ export default {
...
@@ -239,6 +245,38 @@ export default {
fileContent
fileContent
);
);
},
},
// 更新最近一次同步时间
updateSysTime
()
{
getUserList
().
then
((
personList
)
=>
{
const
now_user
=
this
.
$store
.
state
.
now_user
;
const
key
=
personList
.
findIndex
(
item
=>
item
.
userId
==
now_user
.
userId
)
// 更新用户同步时间
const
userInfo
=
personList
[
key
];
const
LastSynchronizationTime
=
moment
().
format
(
"yyyy-MM-DD HH:mm"
);
personList
[
key
].
LastSynchronizationTime
=
LastSynchronizationTime
;
userInfo
.
LastSynchronizationTime
=
LastSynchronizationTime
;
console
.
log
(
"---更新最近一次同步时间--"
,
userInfo
)
this
.
$store
.
commit
(
"SET_USER"
,
userInfo
);
uni
.
setStorageSync
(
"last_time"
,
userInfo
.
LastSynchronizationTime
||
""
);
// 更新用户数据
const
fileContent
=
JSON
.
stringify
(
Base64
.
encode
(
JSON
.
stringify
(
personList
))
);
uni
.
setStorage
({
key
:
"user_data"
,
data
:
JSON
.
stringify
(
personList
),
fail
:
(
error
)
=>
{
console
.
log
(
"APP.vue 存储数据失败"
,
error
);
},
});
createFileWithPlusIO
(
SYNCHRONIZE_DATA_PAD
,
USER_FILE_NAME
,
fileContent
);
});
},
},
},
};
};
</
script
>
</
script
>
...
...
pages/synchronousManagement/index.vue
浏览文件 @
d522c8ff
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
:key=
"index"
:key=
"index"
>
>
<view
v-if=
"(item.list || []).length"
class=
"seconed-title"
>
{{
<view
v-if=
"(item.list || []).length"
class=
"seconed-title"
>
{{
item
.
time
item
.
submitTime
||
item
.
time
}}
</view>
}}
</view>
<view
class=
"inspect-list"
>
<view
class=
"inspect-list"
>
...
@@ -116,11 +116,11 @@ export default {
...
@@ -116,11 +116,11 @@ export default {
const
tempAllData
=
{};
const
tempAllData
=
{};
all_data
.
forEach
((
item
)
=>
{
all_data
.
forEach
((
item
)
=>
{
const
val
=
tempAllData
[
item
.
submit
Time
]
||
[];
const
val
=
tempAllData
[
item
.
submit
Month
]
||
[];
if
(
val
.
length
)
{
if
(
val
.
length
)
{
tempAllData
[
item
.
submit
Time
].
push
(
item
);
tempAllData
[
item
.
submit
Month
].
push
(
item
);
}
else
{
}
else
{
tempAllData
[
item
.
submit
Time
]
=
[
item
];
tempAllData
[
item
.
submit
Month
]
=
[
item
];
}
}
});
});
...
...
static/img/add-img/jd_bg.png
0 → 100644
浏览文件 @
d522c8ff
58.8 KB
utils/IoReadingAndWriting.js
浏览文件 @
d522c8ff
...
@@ -82,7 +82,7 @@ export const readLogData = () => {
...
@@ -82,7 +82,7 @@ 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
);
//
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
));
...
...
utils/systemCofig.js
浏览文件 @
d522c8ff
...
@@ -65,25 +65,25 @@ export const USER_LiST = [
...
@@ -65,25 +65,25 @@ export const USER_LiST = [
roleName
:
"超管"
,
// 有用 -- 职位名称
roleName
:
"超管"
,
// 有用 -- 职位名称
unitName
:
"所属单位"
,
// 所属单位
unitName
:
"所属单位"
,
// 所属单位
isAdmin
:
true
,
// 标识超管权限
isAdmin
:
true
,
// 标识超管权限
loginTime
:
""
,
// 登录
时间
LastSynchronizationTime
:
""
,
// 上次同步
时间
},
},
{
{
userId
:
2
,
// 有用
userId
:
2
,
// 有用
user
:
"test1"
,
// 有用 谁创建,谁有权限编辑和删除
user
:
"test1"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
passWord
:
"JF123456"
,
// 有用
roleName
:
"巡检员"
,
// 有用
roleName
:
"巡检员
1
"
,
// 有用
unitName
:
"所属单位"
,
// 所属单位
unitName
:
"所属单位"
,
// 所属单位
isAdmin
:
tru
e
,
// 标识超管权限
isAdmin
:
fals
e
,
// 标识超管权限
loginTime
:
""
,
// 登录
时间
LastSynchronizationTime
:
""
,
// 上次同步
时间
},
},
{
{
userId
:
3
,
// 有用
userId
:
3
,
// 有用
user
:
"test2"
,
// 有用 谁创建,谁有权限编辑和删除
user
:
"test2"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
passWord
:
"JF123456"
,
// 有用
roleName
:
"巡检员"
,
// 有用
roleName
:
"巡检员
2
"
,
// 有用
unitName
:
"所属单位"
,
// 所属单位
unitName
:
"所属单位"
,
// 所属单位
isAdmin
:
tru
e
,
// 标识超管权限
isAdmin
:
fals
e
,
// 标识超管权限
loginTime
:
""
,
// 登录
时间
LastSynchronizationTime
:
""
,
// 上次同步
时间
},
},
];
];
...
@@ -433,3 +433,30 @@ export function setSm2(data) {
...
@@ -433,3 +433,30 @@ export function setSm2(data) {
}
}
}
}
// 获取用户数据
export
function
getUserList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
const
value
=
uni
.
getStorageSync
(
"user_data"
);
if
(
value
)
{
// this.personList = JSON.parse(value);
// console.log("---this.personList", this.personList);
resolve
(
eval
(
value
));
}
else
{
uni
.
getStorage
({
key
:
"user_data"
,
success
:
function
(
res
)
{
// this.personList =;
// console.log("---this.personList", this.personList);
resolve
(
eval
(
value
));
},
});
}
}
catch
(
e
)
{
reject
(
e
)
console
.
log
(
"getUserList--"
,
e
);
}
});
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论