Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
c58687b4
提交
c58687b4
authored
9月 13, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(Pad): 井道数回显完成
上级
af224f81
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
189 行增加
和
105 行删除
+189
-105
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+18
-11
batteryRoom.vue
pages/inspectionContent/model/batteryRoom.vue
+5
-5
gatherDataCenter.vue
pages/inspectionContent/model/gatherDataCenter.vue
+5
-3
shieldedComputerRoom.vue
pages/inspectionContent/model/shieldedComputerRoom.vue
+19
-21
index.vue
pages/inspectionManagement/index.vue
+12
-0
tabContentItem.vue
pages/shaftInspection/model/tabContentItem.vue
+12
-5
tabs.vue
pages/shaftInspection/model/tabs.vue
+4
-9
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+58
-43
IoReadingAndWriting.js
utils/IoReadingAndWriting.js
+1
-1
dict.js
utils/dict.js
+55
-7
没有找到文件。
pages/inspectionContent/inspectionContent.vue
浏览文件 @
c58687b4
...
@@ -170,13 +170,24 @@ export default {
...
@@ -170,13 +170,24 @@ export default {
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
init
();
this
.
init
();
if
(
options
.
uid
)
{
if
(
options
.
uid
)
{
// 获取详情
this
.
getDetails
(
options
.
uid
);
this
.
getDetails
(
options
.
uid
);
}
else
if
(
options
.
isDarf
)
{
// 获取草稿数据
const
darf_data
=
this
.
$store
.
state
.
darf_data
;
this
.
baseInfo
=
darf_data
.
originData
.
baseInfo
;
this
.
tempForm
=
darf_data
.
originData
.
tempForm
;
console
.
log
(
"获取草稿数据---"
,
darf_data
);
this
.
detailsInfo
=
darf_data
;
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
)
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
this
.
setComponentData
(
index
,
this
.
tempForm
[
index
]);
item
.
isVaild
=
fillCheck
.
includes
(
item
.
value
)
this
.
tempForm
[
index
]
&&
this
.
setComponentData
(
index
,
this
.
tempForm
[
index
]);
});
});
}
else
{
}
else
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
...
@@ -285,7 +296,7 @@ export default {
...
@@ -285,7 +296,7 @@ export default {
const
tempForm
=
this
.
tempForm
;
const
tempForm
=
this
.
tempForm
;
const
baseInfo
=
this
.
baseInfo
;
const
baseInfo
=
this
.
baseInfo
;
const
fillCheck
=
tabList
.
map
((
item
)
=>
item
.
value
).
join
(
","
);
const
fillCheck
=
tabList
.
filter
(
item
=>
item
.
isVaild
).
map
((
item
)
=>
item
.
value
).
join
(
","
);
let
temp
=
{
let
temp
=
{
...
baseInfo
,
...
baseInfo
,
isSubmit
:
1
,
isSubmit
:
1
,
...
@@ -459,15 +470,11 @@ export default {
...
@@ -459,15 +470,11 @@ export default {
});
});
// 写入草稿文件 更新 store 草稿内容
// 写入草稿文件 更新 store 草稿内容
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{
const
params
=
this
.
getParams
();
...
this
.
tempForm
,
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
params
);
...
this
.
baseInfo
,
console
.
log
(
"--写入草稿文件-"
,
params
);
});
// 缓存草稿
// 缓存[巡检信息]
writeDarf
(
params
).
then
((
res
)
=>
{
writeDarf
({
...
this
.
tempForm
,
...
this
.
baseInfo
,
}).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
console
.
log
(
"写入草稿文件成功"
);
uni
.
showToast
({
uni
.
showToast
({
icon
:
"success"
,
icon
:
"success"
,
...
...
pages/inspectionContent/model/batteryRoom.vue
浏览文件 @
c58687b4
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
class=
"row-item"
class=
"row-item"
label=
"异常定位"
label=
"异常定位"
name=
"measuredDataArr"
name=
"measuredDataArr"
v-if=
"item.inspectionResult == 1"
>
>
<view
class=
"tags"
>
<view
class=
"tags"
>
<view
<view
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<!-- 异常状态时显示 -->
<!-- 异常状态时显示 -->
<uni-forms-item
<uni-forms-item
v-if=
"item.inspectionResult == 1"
required
required
class=
"row-item"
class=
"row-item"
label=
"情况摘要"
label=
"情况摘要"
...
@@ -251,13 +251,13 @@ export default {
...
@@ -251,13 +251,13 @@ export default {
align-items: center;
align-items: center;
.tag {
.tag {
background: #f2f3f5;
background: #f2f3f5;
width:
80
px;
width:
55
px;
height: 36px;
height: 36px;
border-radius: 10px;
border-radius: 10px;
text-align: center;
text-align: center;
line-height: 36px;
line-height: 36px;
margin-right: 1
2
px;
margin-right: 1
0
px;
font-size: 1
6
px;
font-size: 1
4
px;
color: #4a4a4a;
color: #4a4a4a;
text-align: center;
text-align: center;
font-weight: 400;
font-weight: 400;
...
...
pages/inspectionContent/model/gatherDataCenter.vue
浏览文件 @
c58687b4
...
@@ -47,6 +47,8 @@
...
@@ -47,6 +47,8 @@
<!-- 异常状态时显示 -->
<!-- 异常状态时显示 -->
<uni-forms-item
<uni-forms-item
v-if=
"item.inspectionResult == 1"
required
required
class=
"row-item"
class=
"row-item"
label=
"情况摘要"
label=
"情况摘要"
...
@@ -252,13 +254,13 @@ export default {
...
@@ -252,13 +254,13 @@ export default {
align-items: center;
align-items: center;
.tag {
.tag {
background: #f2f3f5;
background: #f2f3f5;
width: 80
px;
width: 55
px;
height: 36px;
height: 36px;
border-radius: 10px;
border-radius: 10px;
text-align: center;
text-align: center;
line-height: 36px;
line-height: 36px;
margin-right: 12
px;
margin-right: 10
px;
font-size: 16
px;
font-size: 14
px;
color: #4a4a4a;
color: #4a4a4a;
text-align: center;
text-align: center;
font-weight: 400;
font-weight: 400;
...
...
pages/inspectionContent/model/shieldedComputerRoom.vue
浏览文件 @
c58687b4
...
@@ -51,24 +51,24 @@
...
@@ -51,24 +51,24 @@
class=
"row-item"
class=
"row-item"
label=
"情况摘要"
label=
"情况摘要"
name=
"notes"
name=
"notes"
v-if=
"item.inspectionResult == 1"
>
>
<input
type=
"text"
v-model=
"item.notes"
placeholder=
"请输入内容"
/>
<input
type=
"text"
v-model=
"item.notes"
placeholder=
"请输入内容"
/>
</uni-forms-item>
</uni-forms-item>
</uni-forms>
</uni-forms>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
pad_1_2_inspection_items
,
pad_1_2_inspection_items
,
pad_1_2_inspection_position
,
pad_1_2_inspection_position
,
pad_room_type
,
pad_room_type
,
}
from
"@/utils/dict.js"
;
}
from
"@/utils/dict.js"
;
/**
/**
* 屏蔽机房巡检
* 屏蔽机房巡检
*/
*/
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
list
:
[],
list
:
[],
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
},
},
// 回显数据
// 回显数据
setForm
(
componentData
)
{
setForm
(
componentData
)
{
this
.
list
=
componentData
this
.
list
=
componentData
;
},
},
// 获取数据
// 获取数据
getForm
()
{
getForm
()
{
...
@@ -211,19 +211,19 @@
...
@@ -211,19 +211,19 @@
return
Promise
.
all
(
temp
).
then
((
res
)
=>
{
return
Promise
.
all
(
temp
).
then
((
res
)
=>
{
const
allVaildList
=
res
.
filter
((
item
)
=>
item
.
result
);
const
allVaildList
=
res
.
filter
((
item
)
=>
item
.
result
);
const
formData
=
this
.
getForm
();
const
formData
=
this
.
getForm
();
return
{
return
{
vaild
:
this
.
list
.
length
==
allVaildList
.
length
,
vaild
:
this
.
list
.
length
==
allVaildList
.
length
,
formData
formData
,
};
};
});
});
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.gather-dataCenter {
.gather-dataCenter {
.inspection-item {
.inspection-item {
border: 1px solid;
border: 1px solid;
margin-bottom: 12px;
margin-bottom: 12px;
...
@@ -251,13 +251,13 @@
...
@@ -251,13 +251,13 @@
align-items: center;
align-items: center;
.tag {
.tag {
background: #f2f3f5;
background: #f2f3f5;
width: 80
px;
width: 55
px;
height: 36px;
height: 36px;
border-radius: 10px;
border-radius: 10px;
text-align: center;
text-align: center;
line-height: 36px;
line-height: 36px;
margin-right: 12
px;
margin-right: 10
px;
font-size: 16
px;
font-size: 14
px;
color: #4a4a4a;
color: #4a4a4a;
text-align: center;
text-align: center;
font-weight: 400;
font-weight: 400;
...
@@ -274,6 +274,5 @@
...
@@ -274,6 +274,5 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/inspectionManagement/index.vue
浏览文件 @
c58687b4
...
@@ -45,9 +45,21 @@ export default {
...
@@ -45,9 +45,21 @@ export default {
},
},
toPage
()
{
toPage
()
{
const
darf_data
=
this
.
$store
.
state
.
darf_data
||
{};
console
.
log
(
"---读取的草稿数据"
,
darf_data
)
if
(
darf_data
.
inspectionType
==
1
)
{
uni
.
navigateTo
({
url
:
`/pages/inspectionContent/inspectionContent?isDarf=1`
,
});
}
else
if
(
darf_data
.
inspectionType
==
2
)
{
uni
.
navigateTo
({
url
:
`/pages/shaftInspection/shaftInspection?isDarf=1`
,
});
}
else
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/inspection/inspFirst"
,
url
:
"/pages/inspection/inspFirst"
,
});
});
}
},
},
},
},
};
};
...
...
pages/shaftInspection/model/tabContentItem.vue
浏览文件 @
c58687b4
...
@@ -194,13 +194,17 @@ export default {
...
@@ -194,13 +194,17 @@ export default {
});
});
this
.
list
=
temp
;
this
.
list
=
temp
;
console
.
log
(
"---temp"
,
temp
);
//
console.log("---temp", temp);
},
},
// 回显数据
// 回显数据
setForm
(
componentData
)
{
setForm
(
componentData
)
{
console
.
log
(
"-componentData---"
,
componentData
);
console
.
log
(
"-componentData---"
,
componentData
);
this
.
list
=
componentData
.
temp
;
this
.
list
=
componentData
.
temp
;
this
.
form
.
conclusion
=
componentData
.
conclusion
if
(
componentData
.
conclusion
)
{
this
.
form
=
{
conclusion
:
componentData
.
conclusion
,
};
}
},
},
// 获取数据
// 获取数据
getForm
()
{
getForm
()
{
...
@@ -220,6 +224,7 @@ export default {
...
@@ -220,6 +224,7 @@ export default {
async
vaildForm
()
{
async
vaildForm
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
let
result
=
""
;
let
result
=
""
;
console
.
log
(
"--vaildForm--"
,
this
.
form
);
this
.
$refs
.
forms
this
.
$refs
.
forms
.
validate
()
.
validate
()
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -253,6 +258,8 @@ export default {
...
@@ -253,6 +258,8 @@ export default {
// vaild: this.list.length == allVaildList.length,
// vaild: this.list.length == allVaildList.length,
// formData,
// formData,
// };
// };
console
.
log
(
"--result-"
,
result
);
console
.
log
(
"--allVaildList-"
,
allVaildList
);
resolve
({
resolve
({
vaild
:
result
&&
this
.
list
.
length
==
allVaildList
.
length
,
vaild
:
result
&&
this
.
list
.
length
==
allVaildList
.
length
,
...
@@ -297,13 +304,13 @@ export default {
...
@@ -297,13 +304,13 @@ export default {
align-items: center;
align-items: center;
.tag {
.tag {
background: #f2f3f5;
background: #f2f3f5;
width:
80
px;
width:
55
px;
height: 36px;
height: 36px;
border-radius: 10px;
border-radius: 10px;
text-align: center;
text-align: center;
line-height: 36px;
line-height: 36px;
margin-right: 1
2
px;
margin-right: 1
0
px;
font-size: 1
6
px;
font-size: 1
4
px;
color: #4a4a4a;
color: #4a4a4a;
text-align: center;
text-align: center;
font-weight: 400;
font-weight: 400;
...
...
pages/shaftInspection/model/tabs.vue
浏览文件 @
c58687b4
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
options
:
{
options
:
{
...
@@ -46,19 +44,16 @@ export default {
...
@@ -46,19 +44,16 @@ export default {
list
:
[],
list
:
[],
};
};
},
},
created
()
{
created
()
{},
},
mounted
()
{
mounted
()
{
this
.
list
=
this
.
options
this
.
list
=
this
.
options
;
},
},
watch
:
{
watch
:
{
options
(
newData
)
{
options
(
newData
)
{
this
.
list
=
newData
this
.
list
=
newData
;
},
}
},
},
methods
:
{
methods
:
{
tabClick
(
index
,
item
)
{
tabClick
(
index
,
item
)
{
this
.
activeIndex
=
index
;
this
.
activeIndex
=
index
;
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
c58687b4
...
@@ -49,11 +49,11 @@
...
@@ -49,11 +49,11 @@
<Tabs
class=
"tabs"
ref=
"tabs"
:options=
"tabList"
@
change=
"changeTab"
/>
<Tabs
class=
"tabs"
ref=
"tabs"
:options=
"tabList"
@
change=
"changeTab"
/>
<TabContentItem
<TabContentItem
v-for=
"(item, index) in tabList
.length
"
v-for=
"(item, index) in tabList"
:key=
"index"
:key=
"index"
:ref=
"item.refName"
v-show=
"activeTabIndex == index"
v-show=
"activeTabIndex == index"
:ref=
"`TabContentItem_$
{index}`"
></TabContentItem>
/>
</view>
</view>
<view
class=
"fixed-btns"
>
<view
class=
"fixed-btns"
>
...
@@ -113,23 +113,31 @@ export default {
...
@@ -113,23 +113,31 @@ export default {
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
.
uid
)
{
if
(
options
.
uid
)
{
this
.
getDetails
(
options
.
uid
);
this
.
getDetails
(
options
.
uid
);
}
else
if
(
options
.
isDarf
)
{
// 获取草稿数据
const
darf_data
=
this
.
$store
.
state
.
darf_data
;
this
.
baseInfo
=
darf_data
.
originData
.
baseInfo
;
this
.
tempForm
=
darf_data
.
originData
.
tempForm
;
console
.
log
(
"获取草稿数据---"
,
darf_data
);
this
.
detailsInfo
=
darf_data
;
}
}
},
},
mounted
()
{
mounted
()
{
// this.baseInfo = this.$store.state.temp_data;
// console.log("---baseInfo-", this.baseInfo);
this
.
init
().
then
(()
=>
{
this
.
init
().
then
(()
=>
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
);
setTimeout
(()
=>
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
item
.
isVaild
=
fillCheck
.
includes
(
item
.
value
);
this
.
tempForm
[
index
]
&&
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
});
});
},
500
);
}
else
{
}
else
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
}
}
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
});
});
});
},
},
...
@@ -146,7 +154,6 @@ export default {
...
@@ -146,7 +154,6 @@ export default {
refName
:
`TabContentItem_
${
index
}
`
,
refName
:
`TabContentItem_
${
index
}
`
,
};
};
});
});
resolve
();
resolve
();
});
});
},
},
...
@@ -154,16 +161,14 @@ export default {
...
@@ -154,16 +161,14 @@ export default {
getDetails
(
uid
)
{
getDetails
(
uid
)
{
const
all_data
=
this
.
$store
.
state
.
all_data
||
[];
const
all_data
=
this
.
$store
.
state
.
all_data
||
[];
const
detailsInfo
=
all_data
.
filter
((
item
)
=>
item
.
uid
==
uid
)[
0
]
||
{};
const
detailsInfo
=
all_data
.
filter
((
item
)
=>
item
.
uid
==
uid
)[
0
]
||
{};
console
.
log
(
"--detailsInfo-"
,
detailsInfo
);
this
.
baseInfo
=
detailsInfo
.
originData
.
baseInfo
;
this
.
baseInfo
=
detailsInfo
.
originData
.
baseInfo
;
this
.
tempForm
=
detailsInfo
.
originData
.
tempForm
;
this
.
tempForm
=
detailsInfo
.
originData
.
tempForm
;
this
.
detailsInfo
=
detailsInfo
;
this
.
detailsInfo
=
detailsInfo
;
},
},
// 回显组件数据
// 回显组件数据
setComponentData
(
refName
,
componentData
)
{
setComponentData
(
refName
,
componentData
)
{
console
.
log
(
"--refs--"
);
this
.
$refs
[
refName
][
0
].
setForm
(
componentData
);
console
.
log
(
"--refName--"
,
refName
);
// this.$refs[refName][0].setForm(componentData);
},
},
//--弹出对话框
//--弹出对话框
dialogInputConfirm2
()
{
dialogInputConfirm2
()
{
...
@@ -188,7 +193,6 @@ export default {
...
@@ -188,7 +193,6 @@ export default {
// tab选中change 时间
// tab选中change 时间
changeTab
(
index
,
item
)
{
changeTab
(
index
,
item
)
{
console
.
log
(
"-index--"
,
index
);
this
.
draft
(
this
.
activeTabIndex
,
false
,
false
).
then
(()
=>
{
this
.
draft
(
this
.
activeTabIndex
,
false
,
false
).
then
(()
=>
{
this
.
activeTabIndex
=
index
;
this
.
activeTabIndex
=
index
;
});
});
...
@@ -207,7 +211,7 @@ export default {
...
@@ -207,7 +211,7 @@ export default {
getParams
()
{
getParams
()
{
const
baseInfo
=
this
.
baseInfo
;
const
baseInfo
=
this
.
baseInfo
;
const
tempForm
=
this
.
tempForm
;
const
tempForm
=
this
.
tempForm
;
const
fillCheck
=
this
.
tabList
.
map
((
item
)
=>
item
.
value
).
join
(
","
);
const
fillCheck
=
this
.
tabList
.
filter
(
item
=>
item
.
isVaild
).
map
((
item
)
=>
item
.
value
).
join
(
","
);
const
temp
=
this
.
tabList
.
map
((
item
,
index
)
=>
{
const
temp
=
this
.
tabList
.
map
((
item
,
index
)
=>
{
const
items
=
tempForm
[
index
].
temp
.
map
((
ele
)
=>
{
const
items
=
tempForm
[
index
].
temp
.
map
((
ele
)
=>
{
...
@@ -217,6 +221,7 @@ export default {
...
@@ -217,6 +221,7 @@ export default {
inspectionResult
:
ele
.
inspectionResult
,
inspectionResult
:
ele
.
inspectionResult
,
};
};
});
});
// 一个tab栏下的数据,是否有异常
const
isException
=
tempForm
[
index
].
temp
.
filter
(
const
isException
=
tempForm
[
index
].
temp
.
filter
(
(
item
)
=>
item
.
inspectionResult
>
0
(
item
)
=>
item
.
inspectionResult
>
0
).
length
).
length
...
@@ -234,7 +239,20 @@ export default {
...
@@ -234,7 +239,20 @@ export default {
};
};
});
});
return
temp
;
const
item
=
{
...
temp
[
0
],
isException
:
temp
.
filter
((
item
)
=>
item
.
isException
>
0
).
length
?
1
:
0
,
// 总的数据
items
:
[],
synchronization
:
0
,
// 是否导出过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
originData
:
{
baseInfo
,
tempForm
,
},
};
item
[
baseInfo
.
inspectionCode
]
=
temp
;
console
.
log
(
"----item--"
,
item
);
return
item
;
},
},
// 提交按钮
// 提交按钮
...
@@ -253,19 +271,19 @@ export default {
...
@@ -253,19 +271,19 @@ export default {
const
params
=
this
.
getParams
();
const
params
=
this
.
getParams
();
const
all_data
=
this
.
$store
.
state
.
all_data
;
const
all_data
=
this
.
$store
.
state
.
all_data
;
const
temp
=
{
//
const temp = {
...
params
[
0
],
//
...params[0],
items
:
[],
//
items: [],
synchronization
:
0
,
// 是否导出过
//
synchronization: 0, // 是否导出过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
//
submitTime: moment().format("yyyy-MM-DD"), // 记录提交时间
originData
:
{
//
originData: {
baseInfo
:
this
.
baseInfo
,
//
baseInfo: this.baseInfo,
tempForm
:
this
.
tempForm
,
//
tempForm: this.tempForm,
},
//
},
};
//
};
temp
[
this
.
baseInfo
.
inspectionCode
]
=
params
;
//
temp[this.baseInfo.inspectionCode] = params;
// const tempItem = all_data[time] || [];
// const tempItem = all_data[time] || [];
...
@@ -282,11 +300,11 @@ export default {
...
@@ -282,11 +300,11 @@ export default {
const
index
=
all_data
.
findIndex
(
const
index
=
all_data
.
findIndex
(
(
element
)
=>
element
.
uid
==
params
.
uid
(
element
)
=>
element
.
uid
==
params
.
uid
);
);
all_data
[
index
]
=
temp
;
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
);
}
else
{
}
else
{
temp
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
all_data
.
push
(
temp
);
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
);
}
}
...
@@ -338,18 +356,18 @@ export default {
...
@@ -338,18 +356,18 @@ export default {
let
refName
=
this
.
tabList
[
activeTabIndex
].
refName
;
let
refName
=
this
.
tabList
[
activeTabIndex
].
refName
;
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
refName
][
0
].
vaildForm
().
then
(({
vaild
,
formData
})
=>
{
this
.
$refs
[
refName
][
0
].
vaildForm
().
then
(({
vaild
,
formData
})
=>
{
console
.
log
(
"---校验---"
,
vaild
);
this
.
$refs
.
tabs
this
.
$refs
.
tabs
.
setTabVaild
(
activeTabIndex
,
vaild
,
iSwtich
)
.
setTabVaild
(
activeTabIndex
,
vaild
,
iSwtich
)
.
then
(()
=>
{
.
then
(()
=>
{
this
.
tempForm
[
activeTabIndex
]
=
formData
;
this
.
tempForm
[
activeTabIndex
]
=
formData
;
console
.
log
(
"--xxxx--"
,
{
...
this
.
tempForm
,
console
.
log
(
"---isSave---"
,
isSave
);
...
this
.
baseInfo
,
const
params
=
this
.
getParams
();
}
);
console
.
log
(
"--保存草稿--"
,
params
);
if
(
isSave
)
{
if
(
isSave
)
{
// 更新store 和 [草稿文件] 日志数据
// 更新store 和 [草稿文件] 日志数据
console
.
log
(
"--保存草稿--"
);
// // 新增日志信息
// // 新增日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
darf
);
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
darf
);
...
@@ -361,14 +379,11 @@ export default {
...
@@ -361,14 +379,11 @@ export default {
});
});
// 写入草稿文件 更新 store 草稿内容
// 写入草稿文件 更新 store 草稿内容
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{
const
params
=
this
.
getParams
();
...
this
.
tempForm
,
console
.
log
(
"--保存草稿--"
,
params
);
...
this
.
baseInfo
,
});
// 缓存[巡检信息]
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
params
);
// 缓存[巡检信息]
writeDarf
({
writeDarf
(
params
).
then
((
res
)
=>
{
...
this
.
tempForm
,
...
this
.
baseInfo
,
}).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
console
.
log
(
"写入草稿文件成功"
);
uni
.
showToast
({
uni
.
showToast
({
icon
:
"success"
,
icon
:
"success"
,
...
...
utils/IoReadingAndWriting.js
浏览文件 @
c58687b4
...
@@ -128,7 +128,7 @@ export const readDarfData = () => {
...
@@ -128,7 +128,7 @@ export const readDarfData = () => {
resolve
({});
resolve
({});
}
else
{
}
else
{
console
.
log
(
"读取草稿文件--"
,
JSON
.
parse
(
Base64
.
decode
(
res
)));
console
.
log
(
"读取草稿文件--"
,
JSON
.
parse
(
Base64
.
decode
(
res
)));
resolve
(
JSON
.
parse
(
Base64
.
decode
(
element
)));
resolve
(
JSON
.
parse
(
Base64
.
decode
(
res
)));
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
...
...
utils/dict.js
浏览文件 @
c58687b4
...
@@ -1055,7 +1055,8 @@ export const pad_2_1_inspection_position = {
...
@@ -1055,7 +1055,8 @@ export const pad_2_1_inspection_position = {
// 井道巡检_楼层
// 井道巡检_楼层
export
const
pad_2_1_floor
=
{
export
const
pad_2_1_floor
=
{
"total"
:
13
,
"msg"
:
"操作成功"
,
"code"
:
200
,
"rows"
:
[
"rows"
:
[
{
{
"createBy"
:
"admin"
,
"createBy"
:
"admin"
,
...
@@ -1226,13 +1227,60 @@ export const pad_2_1_floor = {
...
@@ -1226,13 +1227,60 @@ export const pad_2_1_floor = {
"isDefault"
:
"N"
,
"isDefault"
:
"N"
,
"status"
:
"0"
,
"status"
:
"0"
,
"default"
:
false
"default"
:
false
},
{
"createBy"
:
"admin"
,
"createTime"
:
"2024-09-05 16:01:31"
,
"updateBy"
:
null
,
"updateTime"
:
null
,
"remark"
:
null
,
"dictCode"
:
1329
,
"dictSort"
:
11
,
"dictLabel"
:
"22楼"
,
"dictValue"
:
"11"
,
"dictType"
:
"pad_2_1_floor"
,
"cssClass"
:
null
,
"listClass"
:
"default"
,
"isDefault"
:
"N"
,
"status"
:
"0"
,
"default"
:
false
},
{
"createBy"
:
"admin"
,
"createTime"
:
"2024-09-05 16:01:37"
,
"updateBy"
:
null
,
"updateTime"
:
null
,
"remark"
:
null
,
"dictCode"
:
1330
,
"dictSort"
:
12
,
"dictLabel"
:
"24楼"
,
"dictValue"
:
"12"
,
"dictType"
:
"pad_2_1_floor"
,
"cssClass"
:
null
,
"listClass"
:
"default"
,
"isDefault"
:
"N"
,
"status"
:
"0"
,
"default"
:
false
},
{
"createBy"
:
"admin"
,
"createTime"
:
"2024-09-05 16:01:46"
,
"updateBy"
:
null
,
"updateTime"
:
null
,
"remark"
:
null
,
"dictCode"
:
1331
,
"dictSort"
:
13
,
"dictLabel"
:
"26楼"
,
"dictValue"
:
"13"
,
"dictType"
:
"pad_2_1_floor"
,
"cssClass"
:
null
,
"listClass"
:
"default"
,
"isDefault"
:
"N"
,
"status"
:
"0"
,
"default"
:
false
}
}
],
]
"code"
:
200
,
}
"msg"
:
"查询成功"
,
"status"
:
null
,
"map"
:
null
};
// 机房巡检类型
// 机房巡检类型
export
const
pad_room_type
=
{
export
const
pad_room_type
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论