Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
monthReport_smzx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
monthReport_smzx
Commits
a529e2fc
提交
a529e2fc
authored
9月 18, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(功能走查): 功能走查60%
上级
5833726b
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
142 行增加
和
88 行删除
+142
-88
App.vue
App.vue
+2
-1
index.vue
components/inspectionItem/index.vue
+0
-2
content.vue
pages/home/content.vue
+7
-14
home.vue
pages/home/home.vue
+6
-5
inspFirst.vue
pages/inspection/inspFirst.vue
+1
-0
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+24
-10
index.vue
pages/inspectionManagement/index.vue
+9
-2
login.vue
pages/login/login.vue
+52
-34
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+32
-17
index.vue
pages/synchronousManagement/index.vue
+8
-2
systemCofig.js
utils/systemCofig.js
+1
-1
没有找到文件。
App.vue
浏览文件 @
a529e2fc
...
...
@@ -68,7 +68,7 @@ export default {
onHide
:
function
()
{
// app关闭时将数据存储到本地缓存
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
// uni.setStorageSync("last_time", this.$store.state.last_t
ime);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
loginT
ime
);
},
onUnload
()
{},
...
...
@@ -114,6 +114,7 @@ export default {
});
})
.
then
((
res
)
=>
{
// console.log("-xxxxxxxxxxx---", res)
// 获取文件数据
let
userData
=
Base64
.
decode
(
res
);
...
...
components/inspectionItem/index.vue
浏览文件 @
a529e2fc
...
...
@@ -68,8 +68,6 @@ export default {
this
.
isDisable
?
1
:
0
}
`
;
console
.
log
(
" this.details"
,
url
,
this
.
details
);
uni
.
navigateTo
({
url
:
`
${
url
}
&uid=
${
this
.
details
.
uid
}
`
,
});
...
...
pages/home/content.vue
浏览文件 @
a529e2fc
...
...
@@ -7,7 +7,7 @@
>
HI,欢迎回来
{{
userInfo
.
name
}}{{
userInfo
.
user
}}
!
</view
>
<view
class=
"unit"
>
所属单位:
{{
userInfo
.
unitName
||
"--"
}}
</view>
<view
class=
"time"
>
上次登录时间:
{{
userInfo
.
last_t
ime
||
"--"
}}
</view>
<view
class=
"time"
>
上次登录时间:
{{
lastT
ime
||
"--"
}}
</view>
<image
class=
"bg-img"
...
...
@@ -86,7 +86,6 @@ export default {
},
data
()
{
return
{
isDialog
:
false
,
//
list
:
[],
// 展示数据
all_data
:
[],
// 所有数据
...
...
@@ -96,11 +95,12 @@ export default {
countNum
:
0
,
// 统计查询总数
syncCount
:
0
,
// 待同步条数
//
lastTime: "", // 上次登陆时间
lastTime
:
""
,
// 上次登陆时间
};
},
created
()
{
// this.lastTime = uni.getStorageSync("last_time") || "";
this
.
lastTime
=
uni
.
getStorageSync
(
"last_time"
)
||
""
;
// uni.getStorageSync("last_time", this.$store.state.now_user.loginTime || "");
},
mounted
()
{
this
.
init
();
...
...
@@ -110,6 +110,7 @@ export default {
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
},
},
methods
:
{
init
()
{
...
...
@@ -135,7 +136,7 @@ export default {
});
},
toSyncPage
()
{
this
.
$emit
(
"changeTab"
,
{},
2
)
this
.
$emit
(
"changeTab"
,
{},
2
)
;
},
// 待同步数据
...
...
@@ -217,8 +218,6 @@ export default {
this
.
init
();
},
toIndex
()
{
uni
.
navigateTo
({
url
:
"/pages/index/index"
,
...
...
@@ -226,13 +225,7 @@ export default {
},
toPage
()
{
// if (this.userInfo.isAdmin) {
// uni.showToast({
// title: "暂无权限",
// icon: "none",
// });
// return;
// }
uni
.
showLoading
();
...
...
pages/home/home.vue
浏览文件 @
a529e2fc
...
...
@@ -119,15 +119,16 @@ export default {
//退出--弹出对话框
dialogInputConfirm2
()
{
let
_this
=
this
;
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
success
()
{
_this
.
$store
.
commit
(
"SET_USER"
,
{});
success
:
()
=>
{
// uni.clearStorage(); //测试将所有缓存清除
// console.log("-退出---",this.$store.state.now_user.loginTime)
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
// uni.setStorageSync("last_time", this.$store.state.last_time
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
loginTime
||
""
);
uni
.
clearStorage
();
//测试将所有缓存清除
},
});
},
...
...
pages/inspection/inspFirst.vue
浏览文件 @
a529e2fc
...
...
@@ -108,6 +108,7 @@ export default {
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm:ss"
),
inspectionBy
:
this
.
$store
.
state
.
now_user
.
name
,
inspectionById
:
this
.
$store
.
state
.
now_user
.
id
,
cureatByName
:
this
.
$store
.
state
.
now_user
.
user
,
isException
:
""
,
// 是否有异常
position
:
""
,
// 位置
isSubmit
:
""
,
// 0 是草稿态; 1 是正式提交
...
...
pages/inspectionContent/inspectionContent.vue
浏览文件 @
a529e2fc
...
...
@@ -15,7 +15,7 @@
<block
slot=
"right"
>
<view
class=
"nav-right"
>
<view
class=
"uni-nav-bar-text"
@
click=
"deleteClick"
>
<view
v-if=
"isOperationPermissions"
class=
"uni-nav-bar-text"
@
click=
"deleteClick"
>
<text
class=
"iconfont icon-delete"
></text
></view>
...
...
@@ -82,7 +82,7 @@
></DutyHandover>
</view>
<view
v-if=
"!isDisable"
class=
"fixed-btns"
>
<view
v-if=
"
isOperationPermissions &&
!isDisable"
class=
"fixed-btns"
>
<view
class=
"button-group"
>
<!-- isSubmit 标识: 0 是草稿态; 1 是正式提交 -->
<view
...
...
@@ -187,10 +187,18 @@ export default {
isDisable
:
false
,
// 禁用
};
},
computed
:
{
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
},
isOperationPermissions
(){
// 是否有操作权限
const
{
uid
,
cureatByName
}
=
this
.
detailsInfo
;
return
!
uid
||
(
uid
&&
cureatByName
==
this
.
userInfo
.
user
)
}
},
onLoad
(
options
)
{
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
this
.
init
();
if
(
options
.
uid
)
{
// 获取详情
this
.
getDetails
(
options
.
uid
);
...
...
@@ -206,6 +214,7 @@ export default {
this
.
tempForm
=
darf_data
.
originData
.
tempForm
;
console
.
log
(
"获取草稿数据---"
,
darf_data
);
this
.
detailsInfo
=
darf_data
;
this
.
init
()
uni
.
hideLoading
();
})
...
...
@@ -220,6 +229,15 @@ export default {
}
},
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
pad_room_type
.
rows
.
forEach
((
item
,
index
)
=>
{
this
.
tabList
[
index
].
value
=
item
.
dictValue
;
});
if
(
this
.
detailsInfo
.
inspectionType
)
{
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
);
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -232,13 +250,6 @@ export default {
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
}
},
methods
:
{
init
()
{
pad_room_type
.
rows
.
forEach
((
item
,
index
)
=>
{
this
.
tabList
[
index
].
value
=
item
.
dictValue
;
});
},
// 回显数据
getDetails
(
uid
)
{
uni
.
showLoading
();
...
...
@@ -254,6 +265,9 @@ export default {
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
uni
.
hideLoading
();
this
.
init
()
})
.
catch
((
error
)
=>
{
uni
.
showToast
({
...
...
pages/inspectionManagement/index.vue
浏览文件 @
a529e2fc
...
...
@@ -35,7 +35,9 @@
</view>
<!-- 开始巡检 -->
<view
class=
"inspection-button"
@
click=
"toPage"
>
开始巡检
</view>
<view
class=
"inspection-button"
@
click=
"toPage"
>
开始巡检
</view
>
</view>
</
template
>
...
...
@@ -84,6 +86,12 @@ export default {
uni
.
hideLoading
();
});
},
computed
:
{
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
},
},
methods
:
{
init
()
{
const
all_data
=
this
.
all_data
||
[];
...
...
@@ -141,7 +149,6 @@ export default {
}
=
this
.
searchForm
;
return
arr
.
filter
((
item
)
=>
{
return
(
(
!
isException
||
item
.
isException
==
isException
)
&&
(
!
inspectionType
||
item
.
inspectionType
==
inspectionType
)
&&
...
...
pages/login/login.vue
浏览文件 @
a529e2fc
...
...
@@ -63,9 +63,7 @@ export default {
};
},
created
()
{},
onShow
()
{
this
.
setUser
();
},
onShow
()
{},
mounted
()
{},
// 定义返回退出
onBackPress
(
options
)
{
...
...
@@ -74,7 +72,7 @@ export default {
uni
.
setStorageSync
(
"oper_record"
,
this
.
$store
.
state
.
oper_record
);
uni
.
setStorageSync
(
"all_data"
,
this
.
$store
.
state
.
all_data
);
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
// uni.setStorageSync("last_time", this.$store.state.last_t
ime);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
loginT
ime
);
plus
.
runtime
.
quit
();
}
else
{
plus
.
nativeUI
.
toast
(
"再划一次退出应用"
);
...
...
@@ -85,47 +83,39 @@ export default {
return
true
;
},
methods
:
{
setSm2
(
data
)
{
const
sm2
=
require
(
"sm-crypto"
).
sm2
;
// 获取sm2对象
const
cipherMode
=
1
;
// 选择加密策略,1 - C1C3C2,0 - C1C2C3,默认为1
const
sysPublicKey
=
"042580b43bad40cc813a032ef3a4c3c38fc58796e0684dd9b5087195a305f4241f9bbefcc92a10e7296ffc167d22a921c164b8cbbbdbcf91ddc3f15202b993f03b"
;
// 系统后台公钥
if
(
data
)
{
return
sm2
.
doEncrypt
(
JSON
.
stringify
(
data
),
sysPublicKey
,
cipherMode
);
}
else
{
return
null
;
}
},
setUser
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
try
{
const
value
=
uni
.
getStorageSync
(
"user_data"
);
if
(
value
)
{
this
.
personList
=
JSON
.
parse
(
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
=
JSON
.
parse
(
res
.
data
)
;
// this.personList =
;
// console.log("---this.personList", this.personList);
resolve
(
eval
(
value
));
},
});
}
}
catch
(
e
)
{}
// console.log(this.personList, "用户数据");
}
catch
(
e
)
{
console
.
log
(
"setUser--"
,
e
);
}
});
},
// 点击登录
login
()
{
// uni.navigateTo({
// url: "/pages/home/home",
// });
// return;
this
.
setUser
().
then
((
personList
)
=>
{
this
.
personList
=
personList
;
console
.
log
(
"111"
,
personList
);
// 是否输入账号密码
if
(
this
.
person
.
user
&&
this
.
person
.
pd
)
{
let
key
=
null
;
console
.
log
(
"-this.personList--"
,
this
.
personList
);
const
obj
=
this
.
personList
.
some
((
item
,
index
)
=>
{
if
(
item
.
user
==
this
.
person
.
user
)
{
key
=
index
;
...
...
@@ -144,19 +134,38 @@ export default {
this
.
person
.
user
==
this
.
personList
[
key
].
user
&&
this
.
person
.
pd
==
this
.
personList
[
key
].
passWord
)
{
const
last_time
=
moment
().
format
(
"yyyy-MM-DD HH:mm:ss"
);
this
.
personList
[
key
].
last_time
=
last_time
;
// 存储最近一次登陆时间
const
userInfo
=
this
.
personList
[
key
];
uni
.
setStorageSync
(
"last_time"
,
userInfo
.
loginTime
||
""
);
// console.log("--last_time----",userInfo.loginTime)
// 更新用户登陆时间
const
loginTime
=
moment
().
format
(
"yyyy-MM-DD HH:mm:ss"
);
this
.
personList
[
key
].
loginTime
=
loginTime
;
userInfo
.
loginTime
=
loginTime
;
this
.
$store
.
commit
(
"SET_USER"
,
userInfo
);
uni
.
setStorageSync
(
"now_user"
,
userInfo
);
// const fileContent = JSON.stringify(Base64.encode(this.personList));
// createFileWithPlusIO(
// SYNCHRONIZE_DATA_PAD,
// USER_FILE_NAME,
// fileContent
// );
// 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
({
url
:
"/pages/home/home"
,
...
...
@@ -187,6 +196,14 @@ export default {
});
return
;
}
const
log_list
=
[];
// 更新日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
login
);
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
);
});
// 密码不正确
...
...
@@ -215,6 +232,7 @@ export default {
duration
:
2000
,
});
}
});
},
},
};
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
a529e2fc
...
...
@@ -15,7 +15,7 @@
<block
slot=
"right"
>
<view
class=
"nav-right"
>
<view
class=
"uni-nav-bar-text"
@
click=
"deleteClick"
>
<view
v-if=
"isOperationPermissions"
class=
"uni-nav-bar-text"
@
click=
"deleteClick"
>
<text
class=
"iconfont icon-delete"
></text
></view>
...
...
@@ -63,7 +63,7 @@
></TabContentItem>
</view>
<view
v-if=
"!isDisable"
class=
"fixed-btns"
>
<view
v-if=
"
isOperationPermissions &&
!isDisable"
class=
"fixed-btns"
>
<view
class=
"button-group"
>
<!-- 保存草稿 0:草稿 1:提交 -->
<view
...
...
@@ -123,6 +123,16 @@ export default {
isDisable
:
false
,
// 禁用
};
},
computed
:
{
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
},
isOperationPermissions
(){
// 是否有操作权限
const
{
uid
,
cureatByName
}
=
this
.
detailsInfo
;
return
!
uid
||
(
uid
&&
cureatByName
==
this
.
userInfo
.
user
)
}
},
onLoad
(
options
)
{
this
.
isDisable
=
options
.
isDisable
==
1
?
true
:
false
;
...
...
@@ -139,6 +149,8 @@ export default {
console
.
log
(
"获取草稿数据---"
,
darf_data
);
this
.
detailsInfo
=
darf_data
;
uni
.
hideLoading
();
this
.
init
();
})
.
catch
((
error
)
=>
{
uni
.
showToast
({
...
...
@@ -152,21 +164,7 @@ export default {
}
},
mounted
()
{
this
.
init
().
then
(()
=>
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
);
setTimeout
(()
=>
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
item
.
isVaild
=
fillCheck
.
includes
(
item
.
value
);
this
.
tempForm
[
index
]
&&
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
});
},
500
);
}
else
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
}
});
this
.
init
();
},
methods
:
{
...
...
@@ -182,6 +180,21 @@ export default {
refName
:
`TabContentItem_
${
index
}
`
,
};
});
if
(
this
.
detailsInfo
.
inspectionType
)
{
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
);
setTimeout
(()
=>
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
item
.
isVaild
=
fillCheck
.
includes
(
item
.
value
);
this
.
tempForm
[
index
]
&&
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
});
},
500
);
}
else
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
}
resolve
();
});
},
...
...
@@ -200,6 +213,8 @@ export default {
this
.
isDisable
=
this
.
isDisable
||
detailsInfo
.
synchronization
==
1
;
// 是否禁用 1:已同步数据 0: 未同步数据
uni
.
hideLoading
();
this
.
init
();
})
.
catch
((
error
)
=>
{
uni
.
showToast
({
...
...
pages/synchronousManagement/index.vue
浏览文件 @
a529e2fc
...
...
@@ -37,7 +37,7 @@
<!-- 数据打包 -->
<view
v-show=
"isPackedDataBtn"
v-show=
"isPackedDataBtn
"
class=
"synchronous-button"
@
click=
"openDialog(true)"
>
数据打包
</view
...
...
@@ -77,6 +77,12 @@ export default {
mounted
()
{
this
.
init
();
},
computed
:
{
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
},
},
methods
:
{
init
()
{
...
...
@@ -84,7 +90,7 @@ export default {
getAllInspections
()
.
then
((
res
)
=>
{
this
.
all_data
=
res
.
filter
(
item
=>
item
.
synchronization
==
0
);
this
.
all_data
=
res
.
filter
(
(
item
)
=>
item
.
synchronization
==
0
);
this
.
getList
();
uni
.
hideLoading
();
...
...
utils/systemCofig.js
浏览文件 @
a529e2fc
...
...
@@ -61,7 +61,7 @@ export const USER_LiST = [
{
id
:
1
,
// 有用
user
:
"hzsgjy"
,
// 有用
user
:
"hzsgjy"
,
// 有用
谁创建,谁有权限编辑和删除
passWord
:
"JFXJ85250920"
,
// 有用
areaName
:
"市本级"
,
// 有用
permission
:
1
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论