Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
7a83284c
提交
7a83284c
authored
4月 08, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: bugs
上级
aba2afd2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
53 行增加
和
58 行删除
+53
-58
home.vue
pages/home/home.vue
+2
-2
inspectionContentNew.vue
pages/inspectionContent/inspectionContentNew.vue
+51
-56
没有找到文件。
pages/home/home.vue
浏览文件 @
7a83284c
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
<view
class=
"container"
>
<view
class=
"container"
>
<view
class=
"flex"
>
<view
class=
"flex"
>
<navigator
<navigator
url=
"/pages/inspectionContent/inspectionContentList?uid=
15
"
url=
"/pages/inspectionContent/inspectionContentList?uid=
23
"
hover-class=
"navigator-hover"
hover-class=
"navigator-hover"
>
>
<button
type=
"default"
class=
"uni-btn"
>
15
</button>
<button
type=
"default"
class=
"uni-btn"
>
23
</button>
</navigator>
</navigator>
<navigator
<navigator
url=
"/pages/inspectionContent/inspectionContentList?uid=16"
url=
"/pages/inspectionContent/inspectionContentList?uid=16"
...
...
pages/inspectionContent/inspectionContentNew.vue
浏览文件 @
7a83284c
...
@@ -504,7 +504,7 @@ export default {
...
@@ -504,7 +504,7 @@ export default {
realSave
(
data
)
{
realSave
(
data
)
{
const
send
=
dataToSql
(
data
);
const
send
=
dataToSql
(
data
);
const
api
=
this
.
uid
?
inspectApi
.
update
:
inspectApi
.
save
;
const
api
=
this
.
uid
?
inspectApi
.
update
:
inspectApi
.
save
;
api
(
this
.
uid
?
{
id
:
this
.
uid
,
...
send
}
:
send
).
then
((
res
)
=>
{
return
api
(
this
.
uid
?
{
id
:
this
.
uid
,
...
send
}
:
send
).
then
((
res
)
=>
{
if
(
!
this
.
uid
)
{
if
(
!
this
.
uid
)
{
this
.
uid
=
res
.
lastInsertId
;
this
.
uid
=
res
.
lastInsertId
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -529,65 +529,58 @@ export default {
...
@@ -529,65 +529,58 @@ export default {
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
const
params
=
this
.
getParams
(
isSubmit
);
//数据获取
console
.
log
(
"提交时获取一次"
,
params
);
console
.
log
(
"提交时获取一次"
,
params
);
this
.
realSave
(
params
);
this
.
realSave
(
params
).
then
(()
=>
{
let
logContent
=
""
;
// const all_data = this.$store.state.all_data; //获取全部数据
console
.
log
(
"all_data"
,
this
.
all_data
);
let
logContent
=
""
;
if
(
this
.
uid
)
{
console
.
log
(
"all_data"
,
this
.
all_data
);
const
index
=
this
.
all_data
.
findIndex
(
if
(
this
.
uid
)
{
(
element
)
=>
element
.
uid
==
this
.
uid
const
index
=
this
.
all_data
.
findIndex
(
);
(
element
)
=>
element
.
uid
==
this
.
uid
params
.
uid
=
this
.
uid
;
this
.
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
this
.
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
// 更新巡检list
const
userInfo
=
this
.
userInfo
;
console
.
log
(
"all_data存储"
,
this
.
all_data
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
this
.
all_data
);
const
inspectList
=
this
.
all_data
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
);
params
.
uid
=
this
.
uid
;
this
.
all_data
[
index
]
=
params
;
console
.
log
(
"inspectList"
,
inspectList
);
logContent
=
getLogContent
(
writeInspectionData
(
inspectList
,
userInfo
.
user
);
LOG_TYPE_ENUM
.
edit
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
this
.
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
// 更新巡检list
const
userInfo
=
this
.
userInfo
;
console
.
log
(
"all_data存储"
,
this
.
all_data
);
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
this
.
all_data
);
const
inspectList
=
this
.
all_data
.
filter
(
(
item
)
=>
item
.
createByName
==
userInfo
.
user
);
console
.
log
(
"inspectList"
,
inspectList
);
// 更新日志
writeInspectionData
(
inspectList
,
userInfo
.
user
);
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
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
// 更新日志
if
(
isSubmit
)
{
const
log_list
=
this
.
$store
.
state
.
log_list
;
this
.
startDialog
();
logContent
.
inspectionType
=
params
.
inspectionType
;
}
else
{
log_list
.
push
(
logContent
);
uni
.
showToast
({
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
title
:
"暂存成功"
,
addLog
(
log_list
).
then
((
res
)
=>
{
icon
:
"none"
,
console
.
log
(
"日志文件写入成功"
);
});
}
});
});
// 清空基础缓存信息
// this.$store.commit("SET_TEMP_DATA", {}); // 缓存[巡检信息]
// uni.showToast({
// title: isSubmit ? "提交成功" : "保存草稿成功",
// icon: "success",
// });
if
(
isSubmit
)
{
this
.
startDialog
();
}
else
{
uni
.
showToast
({
title
:
"暂存成功"
,
icon
:
"none"
,
});
}
},
},
startDialog
()
{
startDialog
()
{
let
allIsSubmitOne
=
this
.
listData
.
every
((
item
)
=>
item
.
isSubmit
===
1
);
let
allIsSubmitOne
=
this
.
listData
.
every
((
item
)
=>
item
.
isSubmit
===
1
);
...
@@ -597,7 +590,9 @@ export default {
...
@@ -597,7 +590,9 @@ export default {
// let item = this.findTargetObject(this.listData);
// let item = this.findTargetObject(this.listData);
const
item
=
this
.
listData
.
find
((
item
)
=>
item
.
status
!=
1
);
const
item
=
this
.
listData
.
find
(
(
item
)
=>
!
item
.
status
||
item
.
isSubmit
==
0
);
console
.
log
(
"即将操作的机房"
,
item
);
console
.
log
(
"即将操作的机房"
,
item
);
this
.
name
=
item
&&
item
.
name
?
item
.
name
:
""
;
this
.
name
=
item
&&
item
.
name
?
item
.
name
:
""
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论