Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
c6f979a4
提交
c6f979a4
authored
9月 30, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(pad): bug修改
上级
cf769f30
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
55 行增加
和
33 行删除
+55
-33
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+2
-0
dutyHandover.vue
pages/inspectionContent/model/dutyHandover.vue
+0
-9
tabs.vue
pages/shaftInspection/model/tabs.vue
+3
-3
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+44
-18
dialog.vue
pages/synchronousManagement/dialog.vue
+3
-0
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+3
-3
没有找到文件。
pages/inspectionContent/inspectionContent.vue
浏览文件 @
c6f979a4
...
@@ -325,11 +325,13 @@ export default {
...
@@ -325,11 +325,13 @@ export default {
userInfo
.
user
userInfo
.
user
);
);
if
(
!
detailsInfo
.
uid
){
// 清空草稿数据
// 清空草稿数据
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
// 缓存[巡检信息]
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
// 缓存[巡检信息]
writeDarf
(
""
).
then
((
res
)
=>
{
writeDarf
(
""
).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
console
.
log
(
"写入草稿文件成功"
);
});
});
}
// 更新日志
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
const
log_list
=
this
.
$store
.
state
.
log_list
;
...
...
pages/inspectionContent/model/dutyHandover.vue
浏览文件 @
c6f979a4
...
@@ -99,15 +99,6 @@ export default {
...
@@ -99,15 +99,6 @@ export default {
successor
:
""
,
// 接班人
successor
:
""
,
// 接班人
},
},
quickTextList
:
[
quickTextList
:
[
{
text
:
"进出总人数:"
,
},
{
text
:
"访客记录:"
,
},
{
{
text
:
"未完成事项:"
,
text
:
"未完成事项:"
,
...
...
pages/shaftInspection/model/tabs.vue
浏览文件 @
c6f979a4
...
@@ -18,15 +18,15 @@
...
@@ -18,15 +18,15 @@
<!-- 描述 -->
<!-- 描述 -->
<view
class=
"descript"
>
<view
class=
"descript"
>
<view
v-if=
"
list[activeIndex]
.position"
class=
"descript-item"
>
<view
v-if=
"
(list[activeIndex] ||
{})
.position" class="descript-item">
<text
class=
"name"
>
巡检位置
</text>
<text
class=
"name"
>
巡检位置
</text>
<text
class=
"text"
>
{{
<text
class=
"text"
>
{{
list
[
activeIndex
].
position
.
map
((
item
)
=>
item
.
dictLabel
).
join
(
"、"
)
(
list
[
activeIndex
].
position
||
[])
.
map
((
item
)
=>
item
.
dictLabel
).
join
(
"、"
)
}}
</text>
}}
</text>
</view>
</view>
<view
class=
"descript-item"
>
<view
class=
"descript-item"
>
<text
class=
"name"
>
巡检说明
</text>
<text
class=
"name"
>
巡检说明
</text>
<text
class=
"text"
>
{{
list
[
activeIndex
]
.
descript
}}
</text>
<text
class=
"text"
>
{{
(
list
[
activeIndex
]
||
{
}
)
.
descript
}}
<
/text
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
/view
>
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
c6f979a4
...
@@ -15,7 +15,11 @@
...
@@ -15,7 +15,11 @@
<block
slot=
"right"
>
<block
slot=
"right"
>
<view
class=
"nav-right"
>
<view
class=
"nav-right"
>
<view
v-if=
"isOperationPermissions"
class=
"uni-nav-bar-text"
@
click=
"deleteClick"
>
<view
v-if=
"isOperationPermissions"
class=
"uni-nav-bar-text"
@
click=
"deleteClick"
>
<text
class=
"iconfont icon-delete"
></text
<text
class=
"iconfont icon-delete"
></text
></view>
></view>
...
@@ -102,7 +106,7 @@ import {
...
@@ -102,7 +106,7 @@ import {
writeDarf
,
writeDarf
,
writeInspectionData
,
writeInspectionData
,
}
from
"@/utils/IoReadingAndWriting.js"
;
}
from
"@/utils/IoReadingAndWriting.js"
;
import
{
pad_2_1_inspection_position
,
pad_2_1_floor
}
from
"@/utils/dict.js"
;
import
{
pad_2_1_inspection_position
,
pad_2_1_floor
}
from
"@/utils/dict.js"
;
import
{
getInspectionDetails
,
getDarft
}
from
"@/request/index.js"
;
import
{
getInspectionDetails
,
getDarft
}
from
"@/request/index.js"
;
...
@@ -127,10 +131,11 @@ export default {
...
@@ -127,10 +131,11 @@ export default {
userInfo
()
{
userInfo
()
{
return
this
.
$store
.
state
.
now_user
||
{};
return
this
.
$store
.
state
.
now_user
||
{};
},
},
isOperationPermissions
(){
// 是否有操作权限
isOperationPermissions
()
{
const
{
uid
,
createByName
}
=
this
.
detailsInfo
;
// 是否有操作权限
return
!
uid
||
(
uid
&&
createByName
==
this
.
userInfo
.
user
)
const
{
uid
,
createByName
}
=
this
.
detailsInfo
;
}
return
!
uid
||
(
uid
&&
createByName
==
this
.
userInfo
.
user
);
},
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -177,7 +182,7 @@ export default {
...
@@ -177,7 +182,7 @@ export default {
// type: 1, // 枚举值
// type: 1, // 枚举值
position
:
pad_2_1_floor
.
rows
,
position
:
pad_2_1_floor
.
rows
,
refName
:
`TabContentItem_
${
index
}
`
,
refName
:
`TabContentItem_
${
index
}
`
,
descript
:
"检查内容包括门禁、卫生、设备告警。"
descript
:
"检查内容包括门禁、卫生、设备告警。"
,
};
};
});
});
...
@@ -225,38 +230,51 @@ export default {
...
@@ -225,38 +230,51 @@ export default {
},
},
// 回显组件数据
// 回显组件数据
setComponentData
(
refName
,
componentData
)
{
setComponentData
(
refName
,
componentData
)
{
this
.
$refs
[
refName
][
0
].
setForm
(
componentData
);
this
.
$refs
[
refName
][
0
]
&&
this
.
$refs
[
refName
][
0
]
.
setForm
(
componentData
);
},
},
//--弹出对话框
//--弹出对话框
dialogInputConfirm2
()
{
dialogInputConfirm2
()
{
uni
.
redirectTo
({
//
uni.redirectTo({
url
:
"/pages/home/home?tabIndex=1"
,
//
url: "/pages/home/home?tabIndex=1",
success
:
()
=>
{
//
success: () => {
const
userInfo
=
this
.
userInfo
.
user
const
userInfo
=
this
.
userInfo
;
const
all_data
=
this
.
$store
.
state
.
all_data
;
const
all_data
=
this
.
$store
.
state
.
all_data
;
const
detailsInfo
=
this
.
detailsInfo
;
const
detailsInfo
=
this
.
detailsInfo
;
const
baseInfo
=
this
.
baseInfo
;
const
tempAllData
=
all_data
.
filter
(
const
tempAllData
=
all_data
.
filter
(
(
element
)
=>
element
.
uid
!=
detailsInfo
.
uid
(
element
)
=>
element
.
uid
!=
detailsInfo
.
uid
).
filter
(
item
=>
item
.
createByName
==
userInfo
.
user
)
);
// console.log(
// "---删除内容",
// all_data.filter((element) => element.uid == detailsInfo.uid)
// );
// 更新巡检list
// 更新巡检list
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
tempAllData
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
tempAllData
);
writeInspectionData
(
tempAllData
,
userInfo
.
user
);
const
inspectList
=
tempAllData
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
if
(
!
detailsInfo
.
uid
)
{
// 清空草稿数据
// 清空草稿数据
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
// 缓存[巡检信息]
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
// 缓存[巡检信息]
writeDarf
(
""
).
then
((
res
)
=>
{
writeDarf
(
""
).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
console
.
log
(
"写入草稿文件成功"
);
});
});
}
// 更新日志
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
const
log_list
=
this
.
$store
.
state
.
log_list
;
const
logContent
=
getLogContent
(
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
delete
,
LOG_TYPE_ENUM
.
delete
,
`
${
detailsInfo
.
recordName
}
(
${
details
Info
.
inspectionCode
}
)`
,
`
${
baseInfo
.
recordName
}
(
${
base
Info
.
inspectionCode
}
)`
,
"巡检模块"
"巡检模块"
);
);
logContent
.
inspectionType
=
details
Info
.
inspectionType
;
logContent
.
inspectionType
=
base
Info
.
inspectionType
;
log_list
.
push
(
logContent
);
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
...
@@ -268,8 +286,15 @@ export default {
...
@@ -268,8 +286,15 @@ export default {
icon
:
`success`
,
icon
:
`success`
,
title
:
`删除成功`
,
title
:
`删除成功`
,
});
});
uni
.
redirectTo
({
url
:
"/pages/home/home?tabIndex=1"
,
success
()
{
uni
.
hideLoading
();
},
},
});
});
// },
// });
},
},
// 删除
// 删除
deleteClick
()
{
deleteClick
()
{
...
@@ -389,7 +414,9 @@ export default {
...
@@ -389,7 +414,9 @@ export default {
// 更新巡检list
// 更新巡检list
const
userInfo
=
this
.
userInfo
;
const
userInfo
=
this
.
userInfo
;
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
const
inspectList
=
all_data
.
filter
((
item
)
=>
item
.
createByName
==
userInfo
.
user
)
const
inspectList
=
all_data
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
writeInspectionData
(
inspectList
,
userInfo
.
user
);
...
@@ -410,7 +437,6 @@ export default {
...
@@ -410,7 +437,6 @@ export default {
// 清空基础缓存信息
// 清空基础缓存信息
this
.
$store
.
commit
(
"SET_TEMP_DATA"
,
{});
// 缓存[巡检信息]
this
.
$store
.
commit
(
"SET_TEMP_DATA"
,
{});
// 缓存[巡检信息]
}
}
uni
.
showToast
({
uni
.
showToast
({
...
...
pages/synchronousManagement/dialog.vue
浏览文件 @
c6f979a4
...
@@ -113,15 +113,18 @@ export default {
...
@@ -113,15 +113,18 @@ export default {
* 读取上一次打包的文件, 复制到 [ history ] 文件夹中
* 读取上一次打包的文件, 复制到 [ history ] 文件夹中
*/
*/
clickHandle
()
{
clickHandle
()
{
if
(
this
.
loading
)
return
;
const
directoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/发送数据`
;
const
directoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/发送数据`
;
const
targetDirectoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/history`
;
const
targetDirectoryPath
=
`
${
SYNCHRONIZE_DATA_PAD
}
/history`
;
checkAndCreateDirectory
(
directoryPath
).
then
(()
=>
{
checkAndCreateDirectory
(
directoryPath
).
then
(()
=>
{
copyDirectory
(
directoryPath
,
targetDirectoryPath
)
copyDirectory
(
directoryPath
,
targetDirectoryPath
)
.
then
(()
=>
{
.
then
(()
=>
{
return
deleteAllFilesInDirectory
(
directoryPath
);
return
deleteAllFilesInDirectory
(
directoryPath
);
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
coverData
();
this
.
coverData
();
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
...
utils/IoReadingAndWriting.js
浏览文件 @
c6f979a4
...
@@ -156,8 +156,7 @@ export const writeInspectionData = (content, userName) => {
...
@@ -156,8 +156,7 @@ export const writeInspectionData = (content, userName) => {
const
fileContent
=
Base64
.
encode
(
JSON
.
stringify
(
content
));
const
fileContent
=
Base64
.
encode
(
JSON
.
stringify
(
content
));
// store 更新 巡检数据
store
.
commit
(
"SET_ALL_DATA"
,
content
);
createFileWithPlusIO
(
createFileWithPlusIO
(
...
@@ -165,7 +164,8 @@ export const writeInspectionData = (content, userName) => {
...
@@ -165,7 +164,8 @@ export const writeInspectionData = (content, userName) => {
fileName
,
fileName
,
fileContent
fileContent
).
then
((
res
)
=>
{
).
then
((
res
)
=>
{
// store 更新 巡检数据. 缓存数据置为空,让接口重新读取文件数据
store
.
commit
(
"SET_ALL_DATA"
,
[]);
resolve
();
resolve
();
});
});
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论