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 个修改的文件
包含
185 行增加
和
99 行删除
+185
-99
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+18
-11
batteryRoom.vue
pages/inspectionContent/model/batteryRoom.vue
+5
-5
gatherDataCenter.vue
pages/inspectionContent/model/gatherDataCenter.vue
+12
-10
shieldedComputerRoom.vue
pages/inspectionContent/model/shieldedComputerRoom.vue
+0
-0
index.vue
pages/inspectionManagement/index.vue
+15
-3
tabContentItem.vue
pages/shaftInspection/model/tabContentItem.vue
+14
-7
tabs.vue
pages/shaftInspection/model/tabs.vue
+4
-9
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+61
-46
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 {
onLoad
(
options
)
{
this
.
init
();
if
(
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
()
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
)
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
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
...
...
@@ -285,7 +296,7 @@ export default {
const
tempForm
=
this
.
tempForm
;
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
=
{
...
baseInfo
,
isSubmit
:
1
,
...
...
@@ -459,15 +470,11 @@ export default {
});
// 写入草稿文件 更新 store 草稿内容
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{
...
this
.
tempForm
,
...
this
.
baseInfo
,
});
// 缓存[巡检信息]
writeDarf
({
...
this
.
tempForm
,
...
this
.
baseInfo
,
}).
then
((
res
)
=>
{
const
params
=
this
.
getParams
();
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
params
);
console
.
log
(
"--写入草稿文件-"
,
params
);
// 缓存草稿
writeDarf
(
params
).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
uni
.
showToast
({
icon
:
"success"
,
...
...
pages/inspectionContent/model/batteryRoom.vue
浏览文件 @
c58687b4
...
...
@@ -30,7 +30,7 @@
class=
"row-item"
label=
"异常定位"
name=
"measuredDataArr"
v-if=
"item.inspectionResult == 1"
>
<view
class=
"tags"
>
<view
...
...
@@ -47,7 +47,7 @@
<!-- 异常状态时显示 -->
<uni-forms-item
v-if=
"item.inspectionResult == 1"
required
class=
"row-item"
label=
"情况摘要"
...
...
@@ -251,13 +251,13 @@ export default {
align-items: center;
.tag {
background: #f2f3f5;
width:
80
px;
width:
55
px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 1
2
px;
font-size: 1
6
px;
margin-right: 1
0
px;
font-size: 1
4
px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
...
...
pages/inspectionContent/model/gatherDataCenter.vue
浏览文件 @
c58687b4
...
...
@@ -47,6 +47,8 @@
<!-- 异常状态时显示 -->
<uni-forms-item
v-if=
"item.inspectionResult == 1"
required
class=
"row-item"
label=
"情况摘要"
...
...
@@ -252,16 +254,16 @@ export default {
align-items: center;
.tag {
background: #f2f3f5;
width: 80
px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 12
px;
font-size: 16
px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
width: 55
px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 10
px;
font-size: 14
px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
}
.active-tag {
background: #3774f6;
...
...
pages/inspectionContent/model/shieldedComputerRoom.vue
浏览文件 @
c58687b4
差异被折叠。
点击展开。
pages/inspectionManagement/index.vue
浏览文件 @
c58687b4
...
...
@@ -45,9 +45,21 @@ export default {
},
toPage
()
{
uni
.
navigateTo
({
url
:
"/pages/inspection/inspFirst"
,
});
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
({
url
:
"/pages/inspection/inspFirst"
,
});
}
},
},
};
...
...
pages/shaftInspection/model/tabContentItem.vue
浏览文件 @
c58687b4
...
...
@@ -194,13 +194,17 @@ export default {
});
this
.
list
=
temp
;
console
.
log
(
"---temp"
,
temp
);
//
console.log("---temp", temp);
},
// 回显数据
setForm
(
componentData
)
{
// 回显数据
setForm
(
componentData
)
{
console
.
log
(
"-componentData---"
,
componentData
);
this
.
list
=
componentData
.
temp
;
this
.
form
.
conclusion
=
componentData
.
conclusion
if
(
componentData
.
conclusion
)
{
this
.
form
=
{
conclusion
:
componentData
.
conclusion
,
};
}
},
// 获取数据
getForm
()
{
...
...
@@ -220,6 +224,7 @@ export default {
async
vaildForm
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
let
result
=
""
;
console
.
log
(
"--vaildForm--"
,
this
.
form
);
this
.
$refs
.
forms
.
validate
()
.
then
((
res
)
=>
{
...
...
@@ -253,6 +258,8 @@ export default {
// vaild: this.list.length == allVaildList.length,
// formData,
// };
console
.
log
(
"--result-"
,
result
);
console
.
log
(
"--allVaildList-"
,
allVaildList
);
resolve
({
vaild
:
result
&&
this
.
list
.
length
==
allVaildList
.
length
,
...
...
@@ -297,13 +304,13 @@ export default {
align-items: center;
.tag {
background: #f2f3f5;
width:
80
px;
width:
55
px;
height: 36px;
border-radius: 10px;
text-align: center;
line-height: 36px;
margin-right: 1
2
px;
font-size: 1
6
px;
margin-right: 1
0
px;
font-size: 1
4
px;
color: #4a4a4a;
text-align: center;
font-weight: 400;
...
...
pages/shaftInspection/model/tabs.vue
浏览文件 @
c58687b4
...
...
@@ -32,8 +32,6 @@
</view>
</
template
>
<
script
>
export
default
{
props
:
{
options
:
{
...
...
@@ -46,19 +44,16 @@ export default {
list
:
[],
};
},
created
()
{
},
created
()
{},
mounted
()
{
this
.
list
=
this
.
options
this
.
list
=
this
.
options
;
},
watch
:
{
options
(
newData
)
{
this
.
list
=
newData
}
this
.
list
=
newData
;
},
},
methods
:
{
tabClick
(
index
,
item
)
{
this
.
activeIndex
=
index
;
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
c58687b4
...
...
@@ -49,11 +49,11 @@
<Tabs
class=
"tabs"
ref=
"tabs"
:options=
"tabList"
@
change=
"changeTab"
/>
<TabContentItem
v-for=
"(item, index) in tabList
.length
"
v-for=
"(item, index) in tabList"
:key=
"index"
:ref=
"item.refName"
v-show=
"activeTabIndex == index"
:ref=
"`TabContentItem_$
{index}`"
/>
></TabContentItem>
</view>
<view
class=
"fixed-btns"
>
...
...
@@ -113,23 +113,31 @@ export default {
onLoad
(
options
)
{
if
(
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
()
{
// this.baseInfo = this.$store.state.temp_data;
// console.log("---baseInfo-", this.baseInfo);
this
.
init
().
then
(()
=>
{
if
(
this
.
detailsInfo
.
inspectionType
)
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
});
const
fillCheck
=
this
.
detailsInfo
.
fillCheck
.
split
(
","
);
setTimeout
(()
=>
{
this
.
tabList
.
forEach
((
item
,
index
)
=>
{
item
.
isVaild
=
fillCheck
.
includes
(
item
.
value
);
this
.
tempForm
[
index
]
&&
this
.
setComponentData
(
item
.
refName
,
this
.
tempForm
[
index
]);
});
},
500
);
}
else
{
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 {
refName
:
`TabContentItem_
${
index
}
`
,
};
});
resolve
();
});
},
...
...
@@ -154,16 +161,14 @@ export default {
getDetails
(
uid
)
{
const
all_data
=
this
.
$store
.
state
.
all_data
||
[];
const
detailsInfo
=
all_data
.
filter
((
item
)
=>
item
.
uid
==
uid
)[
0
]
||
{};
console
.
log
(
"--detailsInfo-"
,
detailsInfo
);
this
.
baseInfo
=
detailsInfo
.
originData
.
baseInfo
;
this
.
tempForm
=
detailsInfo
.
originData
.
tempForm
;
this
.
detailsInfo
=
detailsInfo
;
},
// 回显组件数据
setComponentData
(
refName
,
componentData
)
{
console
.
log
(
"--refs--"
);
console
.
log
(
"--refName--"
,
refName
);
// this.$refs[refName][0].setForm(componentData);
this
.
$refs
[
refName
][
0
].
setForm
(
componentData
);
},
//--弹出对话框
dialogInputConfirm2
()
{
...
...
@@ -188,7 +193,6 @@ export default {
// tab选中change 时间
changeTab
(
index
,
item
)
{
console
.
log
(
"-index--"
,
index
);
this
.
draft
(
this
.
activeTabIndex
,
false
,
false
).
then
(()
=>
{
this
.
activeTabIndex
=
index
;
});
...
...
@@ -207,7 +211,7 @@ export default {
getParams
()
{
const
baseInfo
=
this
.
baseInfo
;
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
items
=
tempForm
[
index
].
temp
.
map
((
ele
)
=>
{
...
...
@@ -217,6 +221,7 @@ export default {
inspectionResult
:
ele
.
inspectionResult
,
};
});
// 一个tab栏下的数据,是否有异常
const
isException
=
tempForm
[
index
].
temp
.
filter
(
(
item
)
=>
item
.
inspectionResult
>
0
).
length
...
...
@@ -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 {
const
params
=
this
.
getParams
();
const
all_data
=
this
.
$store
.
state
.
all_data
;
const
temp
=
{
...
params
[
0
],
items
:
[],
synchronization
:
0
,
// 是否导出过
submitTime
:
moment
().
format
(
"yyyy-MM-DD"
),
// 记录提交时间
//
const temp = {
//
...params[0],
//
items: [],
//
synchronization: 0, // 是否导出过
//
submitTime: moment().format("yyyy-MM-DD"), // 记录提交时间
originData
:
{
baseInfo
:
this
.
baseInfo
,
tempForm
:
this
.
tempForm
,
},
};
//
originData: {
//
baseInfo: this.baseInfo,
//
tempForm: this.tempForm,
//
},
//
};
temp
[
this
.
baseInfo
.
inspectionCode
]
=
params
;
//
temp[this.baseInfo.inspectionCode] = params;
// const tempItem = all_data[time] || [];
...
...
@@ -282,11 +300,11 @@ export default {
const
index
=
all_data
.
findIndex
(
(
element
)
=>
element
.
uid
==
params
.
uid
);
all_data
[
index
]
=
temp
;
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
);
}
else
{
temp
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
all_data
.
push
(
temp
);
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
);
}
...
...
@@ -338,18 +356,18 @@ export default {
let
refName
=
this
.
tabList
[
activeTabIndex
].
refName
;
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
refName
][
0
].
vaildForm
().
then
(({
vaild
,
formData
})
=>
{
console
.
log
(
"---校验---"
,
vaild
);
this
.
$refs
.
tabs
.
setTabVaild
(
activeTabIndex
,
vaild
,
iSwtich
)
.
then
(()
=>
{
this
.
tempForm
[
activeTabIndex
]
=
formData
;
console
.
log
(
"--xxxx--"
,
{
...
this
.
tempForm
,
...
this
.
baseInfo
,
}
);
console
.
log
(
"---isSave---"
,
isSave
);
const
params
=
this
.
getParams
();
console
.
log
(
"--保存草稿--"
,
params
);
if
(
isSave
)
{
// 更新store 和 [草稿文件] 日志数据
console
.
log
(
"--保存草稿--"
);
// // 新增日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
darf
);
...
...
@@ -361,14 +379,11 @@ export default {
});
// 写入草稿文件 更新 store 草稿内容
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{
...
this
.
tempForm
,
...
this
.
baseInfo
,
});
// 缓存[巡检信息]
writeDarf
({
...
this
.
tempForm
,
...
this
.
baseInfo
,
}).
then
((
res
)
=>
{
const
params
=
this
.
getParams
();
console
.
log
(
"--保存草稿--"
,
params
);
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
params
);
// 缓存[巡检信息]
writeDarf
(
params
).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
uni
.
showToast
({
icon
:
"success"
,
...
...
utils/IoReadingAndWriting.js
浏览文件 @
c58687b4
...
...
@@ -128,7 +128,7 @@ export const readDarfData = () => {
resolve
({});
}
else
{
console
.
log
(
"读取草稿文件--"
,
JSON
.
parse
(
Base64
.
decode
(
res
)));
resolve
(
JSON
.
parse
(
Base64
.
decode
(
element
)));
resolve
(
JSON
.
parse
(
Base64
.
decode
(
res
)));
}
})
.
catch
((
error
)
=>
{
...
...
utils/dict.js
浏览文件 @
c58687b4
...
...
@@ -1055,7 +1055,8 @@ export const pad_2_1_inspection_position = {
// 井道巡检_楼层
export
const
pad_2_1_floor
=
{
"total"
:
13
,
"msg"
:
"操作成功"
,
"code"
:
200
,
"rows"
:
[
{
"createBy"
:
"admin"
,
...
...
@@ -1226,13 +1227,60 @@ export const pad_2_1_floor = {
"isDefault"
:
"N"
,
"status"
:
"0"
,
"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
=
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论