Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-SDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
GaoQuYingJiH5-SDT
Commits
8533a96d
Commit
8533a96d
authored
Mar 11, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add 字段正式化处理
parent
cfb83799
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
142 additions
and
20 deletions
+142
-20
common.js
js/common.js
+6
-0
yh-list-detail.html
views/yh-list-detail.html
+5
-5
yh-list-detail.js
views/yh-list-detail.js
+131
-15
No files found.
js/common.js
View file @
8533a96d
...
...
@@ -55,3 +55,9 @@ localStorage.setItem('appCounty', userInfo.user.county)
localStorage
.
setItem
(
'
companyId
'
,
userInfo
.
user
.
companyId
)
localStorage
.
setItem
(
'
userInfo
'
,
JSON
.
stringify
(
userInfo
))
// curSelectCounty: '威海火炬高技术开发区', //当前选择区域 eg:环翠
// curSelectCountyValue: '371071000000',
localStorage
.
setItem
(
'
appCounty
'
,
'
371071000000
'
)
views/yh-list-detail.html
View file @
8533a96d
...
...
@@ -68,21 +68,21 @@
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell
is-link
@
click=
"showPopup4secCheckTypeReplace=true"
>
安全检查类别:
<span
class=
"formValue"
>
{{form.curSelectSec
Typ
e}}
</span></van-cell>
<van-cell
is-link
@
click=
"showPopup4secCheckTypeReplace=true"
>
安全检查类别:
<span
class=
"formValue"
>
{{form.curSelectSec
CheckTypeReplac
e}}
</span></van-cell>
<van-popup
v-model=
"showPopup4secCheckTypeReplace"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"secCheckTypeReplace"
@
cancel=
"showPopup4secCheckTypeReplace = false"
@
confirm=
"onConfirm4secCheckTypeReplace"
/>
<van-picker
show-toolbar
:columns=
"secCheckTypeReplace"
value-key=
"name"
@
cancel=
"showPopup4secCheckTypeReplace = false"
@
confirm=
"onConfirm4secCheckTypeReplace"
/>
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell
is-link
@
click=
"showPopup4secCheckContent=true"
>
安全检查内容:
<span
class=
"formValue"
>
{{form.curSelectCheckContent}}
</span></van-cell>
<van-popup
v-model=
"showPopup4secCheckContent"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"secCheckContent"
@
cancel=
"showPopup4secCheckContent = false"
@
confirm=
"onConfirm4secCheckContent"
/>
<van-picker
show-toolbar
:columns=
"secCheckContent"
value-key=
"name"
@
cancel=
"showPopup4secCheckContent = false"
@
confirm=
"onConfirm4secCheckContent"
/>
</van-popup>
</van-cell-group>
<van-cell-group>
<van-cell
is-link
@
click=
"showPopup4secCheckDiscover=true"
>
发现问题:
<span
class=
"formValue"
>
{{form.hdName}}
</span></van-cell>
<van-popup
v-model=
"showPopup4secCheckDiscover"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"secCheckDiscover"
@
cancel=
"showPopup4secCheckDiscover = false"
@
confirm=
"onConfirm4secCheckDiscover"
/>
<van-picker
show-toolbar
:columns=
"secCheckDiscover"
value-key=
"name"
@
cancel=
"showPopup4secCheckDiscover = false"
@
confirm=
"onConfirm4secCheckDiscover"
/>
</van-popup>
</van-cell-group>
<van-cell-group>
...
...
@@ -92,7 +92,7 @@
<van-field
v-model=
"form.basis"
label=
"检查依据"
placeholder=
""
/>
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.
hdRectificationSug
"
label=
"整改建议"
placeholder=
""
/>
<van-field
v-model=
"form.
suggestion
"
label=
"整改建议"
placeholder=
""
/>
</van-cell-group>
<van-cell-group>
<van-cell
is-link
@
click=
"showPopup4hdRectificationDate=true"
>
整改期限
<span
class=
"formValue"
>
{{form.hdRectificationDate}}
</span></van-cell>
...
...
views/yh-list-detail.js
View file @
8533a96d
/**
* author: dabao
*/
var
VUE
=
null
window
.
addEventListener
(
"
load
"
,
function
()
{
var
VUE
=
new
Vue
({
VUE
=
new
Vue
({
el
:
'
#app
'
,
data
()
{
return
{
...
...
@@ -26,7 +27,7 @@ window.addEventListener("load", function() {
// 检查依据
basis
:
''
,
// 隐患整改建议
hdRectificationSug
:
''
,
suggestion
:
''
,
// 隐患图片
hdPic
:
null
,
// 隐患整改日期
...
...
@@ -48,7 +49,7 @@ window.addEventListener("load", function() {
// 安全类别列表数据
secType
:
[{
name
:
'
安全资料类
'
,
},{
},
{
name
:
'
现场检查类
'
,
}],
showPopup4secType
:
false
,
...
...
@@ -76,11 +77,54 @@ window.addEventListener("load", function() {
// columns4findQuestion: ['杭州', '宁波', '温州', '绍兴', '湖州', '嘉兴', '金华', '衢州'],
// findQuestion: '',
}
},
mounted
()
{},
methods
:
{
submit
()
{
if
(
!
this
.
form
.
hdInspectDate
)
{
vant
.
Dialog
.
alert
({
message
:
'
检查日期不能为空
'
,
})
return
}
if
(
!
this
.
data
.
curSelectSecType
)
{
vant
.
Dialog
.
alert
({
message
:
'
请选择安全类别
'
,
})
return
;
}
if
(
!
this
.
data
.
curSelectSecCheckTypeReplace
)
{
vant
.
Dialog
.
alert
({
message
:
'
请选择安全检查类别
'
,
})
return
;
}
if
(
!
this
.
data
.
curSelectCheckContent
)
{
vant
.
Dialog
.
alert
({
message
:
'
请选择安全检查内容
'
,
})
return
;
}
if
(
!
this
.
data
.
hdName
)
{
vant
.
Dialog
.
alert
({
message
:
'
请选择发现问题
'
,
})
return
;
}
if
(
!
this
.
data
.
imgsrcurl
)
{
vant
.
Dialog
.
alert
({
message
:
'
没有隐患照片
'
,
})
return
}
},
formatDate
(
date
)
{
return
`
${
date
.
getFullYear
()
+
1
}
/
${
date
.
getMonth
()
+
1
}
/
${
date
.
getDate
()}
`
;
},
...
...
@@ -88,19 +132,91 @@ window.addEventListener("load", function() {
console
.
log
(
'
value
'
,
value
)
this
.
form
.
curSelectSecType
=
value
.
name
this
.
showPopup4secType
=
false
/**
逻辑处理相关
1、清理安全检查类别、检查内容和发现问题的相关信息
2、请求获取下级列表数据 检查类别
*/
this
.
secCheckTypeReplace
=
[]
this
.
secCheckContent
=
[]
this
.
secCheckDiscover
=
[]
// 安全检查类别
this
.
form
.
curSelectSecCheckTypeReplace
=
''
// 当前选择的安全检查内容
this
.
form
.
curSelectCheckContent
=
''
// 发现问
this
.
form
.
hdName
=
''
http
.
get
(
'
/api/enterpriseSafetyInspectionContent
'
,
{
county
:
localStorage
.
getItem
(
'
appCounty
'
),
level
:
1
,
type
:
value
.
name
,
page
:
0
,
size
:
99999
,
}).
then
((
res
)
=>
{
this
.
secCheckTypeReplace
=
res
.
content
||
[]
})
},
onConfirm4secCheckTypeReplace
(
value
,
index
)
{
console
.
log
(
'
value
'
,
value
)
this
.
form
.
curSelectSecCheckTypeReplace
=
value
.
name
this
.
showPopup4secCheckTypeReplace
=
false
/**
逻辑处理相关
1、清理安全检查类别、检查内容和发现问题的相关信息
2、请求获取下级列表数据 检查类别
*/
this
.
secCheckContent
=
[]
this
.
secCheckDiscover
=
[]
// 当前选择的安全检查内容
this
.
form
.
curSelectCheckContent
=
''
// 发现问题
this
.
form
.
hdName
=
''
http
.
get
(
'
/api/enterpriseSafetyInspectionContent
'
,
{
county
:
localStorage
.
getItem
(
'
appCounty
'
),
level
:
2
,
pid
:
value
.
id
,
page
:
0
,
size
:
99999
,
}).
then
((
res
)
=>
{
this
.
secCheckContent
=
res
.
content
||
[]
})
},
onConfirm4secCheckContent
(
value
){
onConfirm4secCheckContent
(
value
)
{
this
.
form
.
curSelectCheckContent
=
value
.
name
this
.
showPopup4secCheckContent
=
false
/**
逻辑处理相关
1、清理安全检查类别、检查内容和发现问题的相关信息
2、请求获取下级列表数据 检查类别
*/
this
.
secCheckDiscover
=
[]
// 发现问题
this
.
form
.
hdName
=
''
http
.
get
(
'
/api/enterpriseSafetyMatter
'
,
{
inspectionContentId
:
value
.
id
,
page
:
0
,
size
:
99999
,
}).
then
((
res
)
=>
{
this
.
secCheckDiscover
=
res
.
content
||
[]
})
},
onConfirm4secCheckDiscover
(
value
){
this
.
form
.
hdName
=
value
onConfirm4secCheckDiscover
(
value
)
{
this
.
form
.
hdName
=
value
.
name
this
.
showPopup4secCheckDiscover
=
false
// 给检查依据和整改建议赋默认值
this
.
form
.
basis
=
value
.
basis
this
.
form
.
suggestion
=
value
.
suggestion
},
confirm4hdInspectDate
(
value
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment