Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
monthReport_smzx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
monthReport_smzx
Commits
5833726b
提交
5833726b
authored
9月 18, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(功能走查): 上次登录时间逻辑, 待完善
上级
5520d488
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
83 行增加
和
132 行删除
+83
-132
App.vue
App.vue
+0
-1
index.vue
components/empty/index.vue
+29
-15
index.vue
components/inspectionItem/index.vue
+5
-5
index.vue
components/searchCom/index.vue
+16
-3
content.vue
pages/home/content.vue
+1
-1
home.vue
pages/home/home.vue
+0
-2
operLog.vue
pages/index/operLog.vue
+14
-6
inspFirst.vue
pages/inspection/inspFirst.vue
+4
-4
index.vue
pages/inspectionManagement/index.vue
+1
-1
login.vue
pages/login/login.vue
+9
-13
index.vue
pages/synchronousManagement/index.vue
+4
-3
empty.png
static/img/add-img/empty.png
+0
-0
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+0
-1
systemCofig.js
utils/systemCofig.js
+0
-77
没有找到文件。
App.vue
浏览文件 @
5833726b
...
...
@@ -116,7 +116,6 @@ export default {
.
then
((
res
)
=>
{
// 获取文件数据
let
userData
=
Base64
.
decode
(
res
);
console
.
log
(
"---读取用户数据"
,
res
);
uni
.
setStorage
({
key
:
"user_data"
,
...
...
components/empty/index.vue
浏览文件 @
5833726b
<
template
>
<view
class=
"empty-components"
>
暂无数据
<image
class=
"bg-img"
mode=
"aspectFill"
src=
"@/static/img/add-img/empty.png"
alt=
""
>
</image>
</view>
</
template
>
<
script
>
export
default
{
name
:
'Empty'
,
props
:
{
text
:
{
type
:
String
,
default
:
''
}
}
}
export
default
{
name
:
"Empty"
,
props
:
{
text
:
{
type
:
String
,
default
:
""
,
},
},
};
</
script
>
<
style
scoped
lang=
"less"
>
.empty-components{
.empty-components {
width: 100%;
height: 80%;
display: flex;
align-items: center;
justify-content: center;
// border: 1px solid;
// text-align: center;
.bg-img {
width: 200px;
height: 200px;
}
}
</
style
>
\ No newline at end of file
</
style
>
components/inspectionItem/index.vue
浏览文件 @
5833726b
...
...
@@ -92,9 +92,9 @@ export default {
height: 84px;
box-sizing: border-box;
position: relative;
background-image: linear-gradient(-67deg, #ffab24
87, #ffab2425
50%);
background-image: linear-gradient(-67deg, #ffab24
23, #ffab2411
50%);
.name {
background: #ffab24
71
;
background: #ffab24
23
;
border-radius: 12px;
width: 54px;
height: 54px;
...
...
@@ -163,14 +163,14 @@ export default {
}
.synchronization {
background-image: linear-gradient(-67deg, #9c9c9c
, #9c9c9c
50%);
background-image: linear-gradient(-67deg, #9c9c9c
16, #9c9c9c09
50%);
.name {
background: #
7c7c7ca0
;
background: #
9c9c9c16
;
border-radius: 12px;
color: #4a4a4a;
}
.status {
background: #
e0e0e0
!important;
background: #
9c9c9c16
!important;
color: #4a4a4a !important;
}
}
...
...
components/searchCom/index.vue
浏览文件 @
5833726b
...
...
@@ -2,6 +2,7 @@
<view
class=
"search-com"
>
<view
class=
"search-com-left"
>
<uni-data-select
v-if=
"!hiddenSearch.includes('inspectionType')"
class=
"uni-search-item"
v-model=
"searchFrom.inspectionType"
:localdata=
"inspectArr"
...
...
@@ -11,27 +12,30 @@
></uni-data-select>
<uni-data-select
v-if=
"!hiddenSearch.includes('synchronization')"
class=
"uni-search-item"
v-model=
"searchFrom.synchronization"
:localdata=
"synchronization"
placeholder=
"全部"
@
change=
"(e) => change(e, 'synchronization')"
:clear=
"true"
></uni-data-select>
<uni-data-select
v-if=
"!hiddenSearch.includes('isException')"
class=
"uni-search-item"
v-model=
"searchFrom.isException"
:localdata=
"exceptionArr"
placeholder=
"有无异常"
@
change=
"(e) => change(e, 'isException')"
:clear=
"true"
></uni-data-select>
</view>
<view
class=
"search-com-right"
>
<view
class=
"search-com-right"
v-if=
"!hiddenSearch.includes('inspectionTime')"
>
<uni-datetime-picker
class=
"uni-datetime-picker"
type=
"daterange"
...
...
@@ -44,6 +48,15 @@
</
template
>
<
script
>
export
default
{
props
:
{
hiddenSearch
:
{
// 隐藏搜索项
type
:
Array
,
default
:
()
=>
{
return
[];
},
},
},
data
()
{
return
{
searchFrom
:
{
...
...
pages/home/content.vue
浏览文件 @
5833726b
...
...
@@ -63,7 +63,7 @@
<view
class=
"inspect-list"
>
<InspectionItem
v-for=
"ele in item.list"
:key=
"ele.
inspectionCode
"
:key=
"ele.
uid
"
:details=
"ele"
/>
</view>
...
...
pages/home/home.vue
浏览文件 @
5833726b
...
...
@@ -59,7 +59,6 @@
</
template
>
<
script
>
import
InspectionItem
from
"@/components/inspectionItem/index.vue"
;
import
InspectionManagement
from
"@/pages/inspectionManagement/index.vue"
;
import
SynchronousManagement
from
"@/pages/synchronousManagement/index.vue"
;
import
OperLog
from
"@/pages/index/operLog.vue"
;
...
...
@@ -68,7 +67,6 @@ import Content from "./content.vue";
export
default
{
components
:
{
InspectionItem
,
Content
,
InspectionManagement
,
SynchronousManagement
,
...
...
pages/index/operLog.vue
浏览文件 @
5833726b
...
...
@@ -98,8 +98,9 @@ export default {
typeList
:
[
{
value
:
""
,
text
:
"全部"
},
{
value
:
1
,
text
:
"机房巡检"
},
{
value
:
2
,
text
:
"井道巡检"
},
{
value
:
"1"
,
text
:
"巡检"
},
{
value
:
"2"
,
text
:
"同步"
},
{
text
:
"其他"
,
value
:
"-1"
,
...
...
@@ -163,16 +164,23 @@ export default {
getData
()
{
this
.
loading
=
true
;
const
{
type
,
startTime
,
endTime
}
=
this
.
searchForm
;
console
.
log
(
"--this.recordData--"
,
this
.
recordData
);
this
.
tableData
=
this
.
recordData
.
filter
((
item
)
=>
{
let
matchType
=
true
;
// 类型筛选
let
matchTime
=
true
;
// 时间筛选
if
(
type
)
{
if
(
type
==
-
1
)
{
matchType
=
Object
.
values
(
LOG_TYPE_ENUM
).
indexOf
(
item
.
type
)
>
-
1
;
}
else
{
matchType
=
item
.
inspectionType
==
type
||
item
.
inspectionType
==
type
;
// [其他]搜索项
matchType
=
Object
.
values
(
LOG_TYPE_ENUM
).
indexOf
(
item
.
type
)
>
-
1
&&
!
item
.
inspectionType
&&
item
.
module
.
indexOf
(
"同步"
)
<
0
;
}
else
if
(
type
==
1
)
{
// [巡检]搜索项
matchType
=
(
item
.
inspectionType
||
0
)
>
0
;
}
else
if
(
type
==
2
)
{
// [同步]搜索项
matchType
=
item
.
module
.
indexOf
(
"同步"
)
>
-
1
;
}
}
...
...
pages/inspection/inspFirst.vue
浏览文件 @
5833726b
...
...
@@ -103,8 +103,8 @@ export default {
init
()
{
this
.
formData
=
{
inspectionType
:
"1"
,
inspectionCode
:
`JFXJ
${
moment
().
format
(
"yyyyMMDDhhmm"
)}
`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDDhhmm"
)}
-机房巡检记录`
,
inspectionCode
:
`JFXJ
${
moment
().
format
(
"yyyyMMDDhhmm
ss
"
)}
`
,
recordName
:
`
${
moment
().
format
(
"yyyyMMDDhhmm
ss
"
)}
-机房巡检记录`
,
inspectionTime
:
moment
().
format
(
"yyyy-MM-DD HH:mm:ss"
),
inspectionBy
:
this
.
$store
.
state
.
now_user
.
name
,
inspectionById
:
this
.
$store
.
state
.
now_user
.
id
,
...
...
@@ -126,14 +126,14 @@ export default {
},
change
(
val
)
{
this
.
formData
.
recordName
=
`
${
moment
().
format
(
"yyyyMMDDhhmm"
)}
-
${
this
.
formData
.
recordName
=
`
${
moment
().
format
(
"yyyyMMDDhhmm
ss
"
)}
-
${
val
.
detail
.
data
.
text
}
`
;
this
.
formData
.
inspectionType
=
val
.
detail
.
value
;
const
inspectionCode
=
`
${
val
.
detail
.
value
==
1
?
"JFXJ"
:
"JDXJ"
}${
moment
().
format
(
"yyyyMMDDhhmm"
)}
`
;
}${
moment
().
format
(
"yyyyMMDDhhmm
ss
"
)}
`
;
this
.
formData
.
inspectionCode
=
inspectionCode
;
},
...
...
pages/inspectionManagement/index.vue
浏览文件 @
5833726b
...
...
@@ -24,7 +24,7 @@
<view
class=
"inspect-list"
>
<InspectionItem
v-for=
"ele in item.list"
:key=
"ele.
inspectionCode
"
:key=
"ele.
uid
"
:details=
"ele"
/>
</view>
...
...
pages/login/login.vue
浏览文件 @
5833726b
...
...
@@ -33,7 +33,6 @@ import {
TEST
,
TEST_2X
,
USER_FILE_NAME
,
}
from
"@/utils/systemCofig"
;
import
{
...
...
@@ -46,7 +45,6 @@ import {
import
moment
from
"moment"
;
import
{
Base64
}
from
"js-base64"
;
export
default
{
components
:
{
hintInput
,
...
...
@@ -127,7 +125,7 @@ export default {
// 是否输入账号密码
if
(
this
.
person
.
user
&&
this
.
person
.
pd
)
{
let
key
=
null
;
console
.
log
(
"-this.personList--"
,
this
.
personList
)
console
.
log
(
"-this.personList--"
,
this
.
personList
);
const
obj
=
this
.
personList
.
some
((
item
,
index
)
=>
{
if
(
item
.
user
==
this
.
person
.
user
)
{
key
=
index
;
...
...
@@ -169,10 +167,16 @@ export default {
duration
:
2000
,
});
let
log_list
=
[];
readLogData
()
.
then
((
res
)
=>
{
log_list
=
res
;
const
log_list
=
res
;
// 更新日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
login
);
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
);
uni
.
hideLoading
();
})
.
catch
((
error
)
=>
{
if
(
error
.
code
==
0
)
{
...
...
@@ -184,14 +188,6 @@ export default {
return
;
}
});
// 更新日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
login
);
// const log_list = this.$store.state.log_list || [];
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
);
uni
.
hideLoading
();
// 密码不正确
}
else
{
...
...
pages/synchronousManagement/index.vue
浏览文件 @
5833726b
<
template
>
<view
class=
"synchronous-management"
>
<!-- 搜索项 -->
<SearchCom
@
change=
"change"
/>
<SearchCom
@
change=
"change"
:hiddenSearch=
"['synchronization']"
/>
<!-- 结果 -->
<view
class=
"synchronous-management-content"
>
...
...
@@ -24,7 +24,7 @@
<view
class=
"inspect-list"
>
<InspectionItem
v-for=
"ele in item.list"
:key=
"ele.
inspectionCode
"
:key=
"ele.
uid
"
:details=
"ele"
:isDisable=
"true"
/>
...
...
@@ -84,7 +84,8 @@ export default {
getAllInspections
()
.
then
((
res
)
=>
{
this
.
all_data
=
res
;
this
.
all_data
=
res
.
filter
(
item
=>
item
.
synchronization
==
0
);
this
.
getList
();
uni
.
hideLoading
();
})
...
...
static/img/add-img/empty.png
0 → 100644
浏览文件 @
5833726b
114.5 KB
utils/IoReadingAndWriting.js
浏览文件 @
5833726b
...
...
@@ -186,7 +186,6 @@ export const readInspectionData = () => {
const
temp
=
res
.
map
((
element
)
=>
{
return
JSON
.
parse
(
Base64
.
decode
(
element
));
});
// console.log("读取【巡检数据】文件--", lodash.flattenDeep(temp));
resolve
(
lodash
.
flattenDeep
(
temp
));
})
...
...
utils/systemCofig.js
浏览文件 @
5833726b
...
...
@@ -332,84 +332,7 @@ export async function checkFileExists(directoryPath, fileName) {
});
}
// 读取文件夹下面所有的文件
export
const
readFilesInDirectory11
=
async
(
directoryPath
)
=>
{
const
promiseArr
=
[];
return
new
Promise
((
resolve
,
reject
)
=>
{
plus
.
io
.
requestFileSystem
(
plus
.
io
.
PRIVATE_DOC
,
function
(
fs
)
{
// 获取指定文件夹路径的目录条目
fs
.
root
.
getDirectory
(
directoryPath
,
{
create
:
false
},
function
(
dirEntry
)
{
// 创建一个空的目录读取器
let
directoryReader
=
dirEntry
.
createReader
();
// 读取目录中的所有文件和子目录
directoryReader
.
readEntries
(
function
(
entries
)
{
// 遍历文件和子目录
for
(
let
i
=
0
;
i
<
entries
.
length
;
i
++
)
{
let
entry
=
entries
[
i
];
if
(
entry
.
isFile
)
{
promiseArr
.
push
(
readFileContent
(
entry
));
// 确保是文件 执行读取文件内容的操作
// readFileContent(entry).then(res => {
// console.log("读取的文件内容", Base64.decode(res))
// promiseArr.push(JSON.parse( Base64.decode(res)) )
// }).catch((error) => {
// reject(error)
// })
}
}
Promise
.
all
(
promiseArr
)
.
then
((
res
)
=>
{
resolve
(
res
);
})
.
catch
((
error
)
=>
{
console
.
log
(
"readFilesInDirectory:"
,
error
);
reject
({
...
FILE_ENUM
.
getFileError
// "读取文件内容失败:" + error.message
});
});
},
function
(
error
)
{
console
.
log
(
"readFilesInDirectory:"
,
error
);
reject
({
...
FILE_ENUM
.
readDirectoryError
// "读取目录条目失败:" + error.message
});
}
);
},
function
(
error
)
{
console
.
log
(
"readFilesInDirectory:"
,
error
,
directoryPath
);
reject
({
...
FILE_ENUM
.
getDirectoryError
// "获取目录失败:" + error.message
});
}
);
},
function
(
error
)
{
console
.
log
(
"readFilesInDirectory:"
,
error
);
reject
({
...
FILE_ENUM
.
fileSystemError
// "请求文件系统失败:" + error.message
});
}
);
});
};
export
const
readFilesInDirectory
=
async
(
directoryPath
)
=>
{
const
promiseArr
=
[];
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论