Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
4b9c8a9d
提交
4b9c8a9d
authored
9月 17, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(功能走查): 基本功能完成,待自测
上级
66584b83
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
131 行增加
和
79 行删除
+131
-79
index.vue
components/searchCom/index.vue
+13
-9
content.vue
pages/home/content.vue
+2
-2
operLog.vue
pages/index/operLog.vue
+11
-24
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+7
-1
index.vue
pages/inspectionManagement/index.vue
+3
-2
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+34
-4
dialog.vue
pages/synchronousManagement/dialog.vue
+34
-15
index.vue
pages/synchronousManagement/index.vue
+27
-22
没有找到文件。
components/searchCom/index.vue
浏览文件 @
4b9c8a9d
...
...
@@ -7,14 +7,17 @@
:localdata=
"inspectArr"
@
change=
"(e) => change(e, 'inspectionType')"
placeholder=
"全部巡检"
:clear=
"true"
></uni-data-select>
<uni-data-select
class=
"uni-search-item"
v-model=
"searchFrom.
iS
ynchronization"
v-model=
"searchFrom.
s
ynchronization"
:localdata=
"synchronization"
placeholder=
"全部"
@
change=
"(e) => change(e, 'iSynchronization')"
@
change=
"(e) => change(e, 'synchronization')"
:clear=
"true"
></uni-data-select>
<uni-data-select
...
...
@@ -23,6 +26,8 @@
:localdata=
"exceptionArr"
placeholder=
"有无异常"
@
change=
"(e) => change(e, 'isException')"
:clear=
"true"
></uni-data-select>
</view>
...
...
@@ -43,22 +48,23 @@ export default {
return
{
searchFrom
:
{
inspectionType
:
""
,
// 巡检类型
iS
ynchronization
:
""
,
// 同部数据
s
ynchronization
:
""
,
// 同部数据
isException
:
""
,
// 有无异常
inspectionTime
:
""
,
// 时间选择
},
inspectArr
:
[
// { value: 0, text: "全部巡检
" },
{
value
:
""
,
text
:
"全部
"
},
{
value
:
1
,
text
:
"机房巡检"
},
{
value
:
2
,
text
:
"井道巡检"
},
],
synchronization
:
[
{
value
:
0
,
text
:
"未同步"
},
{
value
:
1
,
text
:
"已同步"
},
{
value
:
""
,
text
:
"全部"
},
{
value
:
"0"
,
text
:
"未同步"
},
{
value
:
"1"
,
text
:
"已同步"
},
],
exceptionArr
:
[
{
value
:
0
,
text
:
"有无异常
"
},
{
value
:
""
,
text
:
"全部
"
},
{
value
:
1
,
text
:
"有异常"
},
{
value
:
2
,
text
:
"无异常"
},
],
...
...
@@ -81,7 +87,6 @@ export default {
.search-com-left {
display: flex;
align-items: center;
border: 1px solid;
flex: 1;
.uni-search-item {
margin-right: 12px;
...
...
@@ -95,7 +100,6 @@ export default {
width: 300px;
.uni-datetime-picker {
background: #fff;
border: 1px solid;
}
}
}
...
...
pages/home/content.vue
浏览文件 @
4b9c8a9d
...
...
@@ -211,14 +211,14 @@ export default {
const
{
isException
=
""
,
inspectionType
=
""
,
iS
ynchronization
=
""
,
s
ynchronization
=
""
,
}
=
this
.
searchForm
;
return
arr
.
filter
((
item
)
=>
{
return
(
(
!
isException
||
item
.
isException
==
isException
)
&&
(
!
inspectionType
||
item
.
inspectionType
==
inspectionType
)
&&
(
!
iSynchronization
||
item
.
iSynchronization
==
iS
ynchronization
)
(
!
synchronization
||
item
.
synchronization
==
s
ynchronization
)
);
});
},
...
...
pages/index/operLog.vue
浏览文件 @
4b9c8a9d
<
template
>
<view
class=
"operLog"
>
<!--
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
left-icon=
"left"
left-text=
"返回"
@
clickLeft=
"back"
title=
"杭州内网监管在线"
>
</uni-nav-bar>
-->
<uni-nav-bar
:fixed=
"true"
background-color=
"rgba(214, 240, 255, 0.0)"
...
...
@@ -38,7 +26,7 @@
v-model=
"searchFrom.type"
:localdata=
"typeList"
@
change=
"change"
placeholder=
"全部
巡检
"
placeholder=
"全部"
></uni-data-select>
<view
class=
"search-com-right"
>
...
...
@@ -87,6 +75,7 @@
<
script
>
import
timeSelect
from
"@/components/global/timeSelect.vue"
;
import
{
getLogList
}
from
"@/request/index.js"
;
import
{
LOG_TYPE_ENUM
}
from
"@/utils/IoReadingAndWriting.js"
;
export
default
{
components
:
{
timeSelect
,
...
...
@@ -94,14 +83,8 @@ export default {
data
()
{
return
{
searchFrom
:
{
type
:
""
,
type
:
-
1
,
},
inspectArr
:
[
// { value: 0, text: "全部巡检" },
{
value
:
1
,
text
:
"机房巡检"
},
{
value
:
2
,
text
:
"井道巡检"
},
],
searchVal
:
""
,
allData
:
[],
tableData
:
[],
...
...
@@ -113,11 +96,13 @@ export default {
total
:
0
,
loading
:
false
,
typeList
:
[
{
value
:
""
,
text
:
"全部"
},
{
value
:
1
,
text
:
"机房巡检"
},
{
value
:
2
,
text
:
"井道巡检"
},
{
text
:
"其他"
,
value
:
"
其他
"
,
value
:
"
-1
"
,
},
],
searchForm
:
{
...
...
@@ -184,7 +169,11 @@ export default {
let
matchType
=
true
;
// 类型筛选
let
matchTime
=
true
;
// 时间筛选
if
(
type
)
{
matchType
=
item
.
module
==
type
||
item
.
type
==
type
;
if
(
type
==
-
1
)
{
matchType
=
Object
.
values
(
LOG_TYPE_ENUM
).
indexOf
(
item
.
type
)
>
-
1
;
}
else
{
matchType
=
item
.
inspectionType
==
type
||
item
.
inspectionType
==
type
;
}
}
if
(
startTime
&&
endTime
)
{
...
...
@@ -225,7 +214,6 @@ export default {
.search-com-left {
display: flex;
align-items: center;
border: 1px solid;
.uni-search-item {
margin-right: 12px;
width: 200px;
...
...
@@ -238,7 +226,6 @@ export default {
width: 300px;
.uni-datetime-picker {
background: #fff;
border: 1px solid;
}
}
}
...
...
pages/inspectionContent/inspectionContent.vue
浏览文件 @
4b9c8a9d
...
...
@@ -315,6 +315,7 @@ export default {
`
${
detailsInfo
.
recordName
}
(
${
detailsInfo
.
inspectionCode
}
)`
,
"巡检模块"
);
logContent
.
inspectionType
=
detailsInfo
.
inspectionType
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
...
...
@@ -402,7 +403,7 @@ export default {
const
isException
=
items
.
filter
((
item
)
=>
item
.
inspectionResult
>
0
)
.
length
?
1
:
0
;
:
2
;
return
{
...
temp
,
...
...
@@ -447,6 +448,7 @@ export default {
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
all_data
.
push
(
params
);
...
...
@@ -463,6 +465,8 @@ export default {
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
logContent
.
inspectionType
=
params
.
inspectionType
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
...
...
@@ -553,6 +557,8 @@ export default {
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
logContent
.
inspectionType
=
params
.
inspectionType
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
...
...
pages/inspectionManagement/index.vue
浏览文件 @
4b9c8a9d
...
...
@@ -137,14 +137,15 @@ export default {
const
{
isException
=
""
,
inspectionType
=
""
,
iS
ynchronization
=
""
,
s
ynchronization
=
""
,
}
=
this
.
searchForm
;
return
arr
.
filter
((
item
)
=>
{
return
(
(
!
isException
||
item
.
isException
==
isException
)
&&
(
!
inspectionType
||
item
.
inspectionType
==
inspectionType
)
&&
(
!
iSynchronization
||
item
.
iSynchronization
==
iS
ynchronization
)
(
!
synchronization
||
item
.
synchronization
==
s
ynchronization
)
);
});
},
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
4b9c8a9d
...
...
@@ -219,14 +219,41 @@ export default {
uni
.
redirectTo
({
url
:
"/pages/home/home?tabIndex=1"
,
success
:
()
=>
{
const
all_data
=
this
.
$store
.
state
.
all_data
;
const
detailsInfo
=
this
.
detailsInfo
;
const
tempAllData
=
all_data
.
filter
(
(
element
)
=>
element
.
uid
!=
detailsInfo
.
uid
);
// 更新巡检list
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
tempAllData
);
writeInspectionData
(
tempAllData
);
// 清空草稿数据
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
// 缓存[巡检信息]
writeDarf
(
""
).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
});
// 清空基础缓存信息
this
.
$store
.
commit
(
"SET_TEMP_DATA"
,
{});
// 缓存[巡检信息]
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
delete
,
`
${
detailsInfo
.
recordName
}
(
${
detailsInfo
.
inspectionCode
}
)`
,
"巡检模块"
);
logContent
.
inspectionType
=
detailsInfo
.
inspectionType
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
uni
.
showToast
({
icon
:
`success`
,
title
:
`删除成功`
,
});
},
});
},
...
...
@@ -274,7 +301,7 @@ export default {
(
item
)
=>
item
.
inspectionResult
>
0
).
length
?
1
:
0
;
:
2
;
return
{
...
baseInfo
,
...
...
@@ -291,7 +318,7 @@ export default {
...
temp
[
0
],
isSubmit
:
0
,
isException
:
temp
.
filter
((
item
)
=>
item
.
isException
>
0
).
length
?
1
:
0
,
// 总的数据
isException
:
temp
.
filter
((
item
)
=>
item
.
isException
>
0
).
length
?
1
:
2
,
// 总的数据
items
:
[],
synchronization
:
0
,
// 是否导出过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
...
...
@@ -350,6 +377,7 @@ export default {
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
logContent
.
inspectionType
=
params
.
inspectionType
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
...
...
@@ -418,6 +446,8 @@ export default {
);
const
log_list
=
this
.
$store
.
state
.
log_list
;
logContent
.
inspectionType
=
params
.
inspectionType
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
...
...
pages/synchronousManagement/dialog.vue
浏览文件 @
4b9c8a9d
...
...
@@ -5,7 +5,7 @@
<text
class=
"title"
>
待打包数据
</text>
</view>
<view
class=
"row-item count-num"
>
<text
class=
"num"
>
{{
all_data
.
length
}}
</text>
<text
class=
"num"
>
{{
notSynchronizationList
.
length
}}
</text>
<text>
条
</text>
</view>
...
...
@@ -55,18 +55,25 @@ import {
LOG_TYPE_ENUM
,
}
from
"@/utils/IoReadingAndWriting.js"
;
import
moment
from
"moment"
;
import
{
getAllInspections
}
from
"@/request/index.js"
;
export
default
{
components
:
{},
data
()
{
return
{
loading
:
false
,
all_data
:
[],
notSynchronizationList
:
[],
// 未同步数据
allList
:
[],
// 所有数据
};
},
mounted
()
{
this
.
all_data
=
(
this
.
$store
.
state
.
all_data
||
[]).
filter
(
item
=>
item
.
synchronization
==
0
);
getAllInspections
().
then
((
res
)
=>
{
this
.
allList
=
res
;
this
.
notSynchronizationList
=
(
res
||
[]).
filter
(
(
item
)
=>
item
.
synchronization
==
0
);
});
},
methods
:
{
change
(
e
)
{},
...
...
@@ -108,15 +115,16 @@ export default {
// 处理数据
coverData
()
{
const
userName
=
this
.
$store
.
state
.
now_user
.
name
;
const
all_data
=
this
.
all_data
;
const
notSynchronizationList
=
this
.
notSynchronizationList
;
const
allList
=
this
.
allList
;
console
.
log
(
"-同步数据--"
,
all_data
);
// console.log("-同步数据--", notSynchronizationList
);
let
timeStr
=
moment
().
format
(
"yyyy-MM-DD_hh:mm:ss"
);
let
JFXJ_DATA_FILE_NAME
=
`
${
userName
}
_JFXJ_
${
timeStr
}
.txt`
;
let
JDXJ_DATA_FILE_NAME
=
`
${
userName
}
_JDXJ_
${
timeStr
}
.txt`
;
const
JFXJ_DATA
=
all_data
const
JFXJ_DATA
=
notSynchronizationList
.
filter
((
item
)
=>
item
.
inspectionType
==
1
)
.
map
((
item
)
=>
{
return
{
...
...
@@ -124,15 +132,33 @@ export default {
originData
:
[],
};
});
// 机房数据类型是 1
const
JDXJ_DATA
=
all_data
.
filter
((
item
)
=>
item
.
inspectionType
==
2
);
// 井道数据类型是 2
const
JDXJ_DATA
=
notSynchronizationList
.
filter
(
(
item
)
=>
item
.
inspectionType
==
2
);
// 井道数据类型是 2
this
.
loading
=
true
;
Promise
.
all
([
this
.
packedData
(
JFXJ_DATA
,
JFXJ_DATA_FILE_NAME
),
this
.
packedData
(
JDXJ_DATA
,
JDXJ_DATA_FILE_NAME
),
])
.
then
(()
=>
{
writeInspectionData
(
all_data
)
// 更新巡检数据状态
const
synchronizationUids
=
notSynchronizationList
.
map
((
item
)
=>
{
return
item
.
uid
;
});
allList
.
forEach
((
item
)
=>
{
if
(
synchronizationUids
.
includes
(
item
.
uid
))
{
item
.
synchronization
=
1
;
}
});
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
allList
);
writeInspectionData
(
allList
)
.
then
(()
=>
{
setTimeout
(()
=>
{
uni
.
showToast
({
...
...
@@ -144,13 +170,6 @@ export default {
this
.
close
();
this
.
loading
=
false
;
// 更新巡检数据状态
const
newAllData
=
all_data
.
map
((
item
)
=>
{
item
.
synchronization
=
1
;
return
item
;
});
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
newAllData
);
// 生成日志
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
...
...
pages/synchronousManagement/index.vue
浏览文件 @
4b9c8a9d
...
...
@@ -75,28 +75,33 @@ export default {
};
},
mounted
()
{
uni
.
showLoading
();
getAllInspections
()
.
then
((
res
)
=>
{
this
.
all_data
=
res
;
this
.
init
();
uni
.
hideLoading
();
})
.
catch
((
error
)
=>
{
if
(
0
==
error
.
code
)
{
uni
.
showToast
({
title
:
error
.
msg
,
icon
:
"none"
,
duration
:
1000
,
});
}
this
.
all_data
=
[];
uni
.
hideLoading
();
});
this
.
init
();
},
methods
:
{
init
()
{
uni
.
showLoading
();
getAllInspections
()
.
then
((
res
)
=>
{
this
.
all_data
=
res
;
this
.
getList
();
uni
.
hideLoading
();
})
.
catch
((
error
)
=>
{
if
(
0
==
error
.
code
)
{
uni
.
showToast
({
title
:
error
.
msg
,
icon
:
"none"
,
duration
:
1000
,
});
}
this
.
all_data
=
[];
uni
.
hideLoading
();
});
},
getList
()
{
const
all_data
=
this
.
all_data
||
[];
this
.
isPackedDataBtn
=
all_data
.
filter
((
item
)
=>
item
.
synchronization
==
0
).
length
>
0
;
...
...
@@ -151,14 +156,14 @@ export default {
const
{
isException
=
""
,
inspectionType
=
""
,
iS
ynchronization
=
""
,
s
ynchronization
=
""
,
}
=
this
.
searchForm
;
return
arr
.
filter
((
item
)
=>
{
return
(
(
!
isException
||
item
.
isException
==
isException
)
&&
(
!
inspectionType
||
item
.
inspectionType
==
inspectionType
)
&&
(
!
iSynchronization
||
item
.
iSynchronization
==
iS
ynchronization
)
(
!
synchronization
||
item
.
synchronization
==
s
ynchronization
)
);
});
},
...
...
@@ -166,7 +171,7 @@ export default {
console
.
log
(
"----"
,
e
);
this
.
searchForm
=
e
;
this
.
ini
t
();
this
.
getLis
t
();
},
openDialog
(
show
)
{
this
.
isDialog
=
show
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论