Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BCDH-APP
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
首开风险隐患双控平台
BCDH-APP
Commits
61dd7cab
Commit
61dd7cab
authored
Oct 28, 2021
by
王李辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐患模块接口对接(80%)
parent
b455b64d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1048 additions
and
767 deletions
+1048
-767
src/service/danger.js
src/service/danger.js
+107
-9
src/views/danger/addDanger/addDanger.vue
src/views/danger/addDanger/addDanger.vue
+31
-6
src/views/danger/changeDanger/changeDanger.vue
src/views/danger/changeDanger/changeDanger.vue
+0
-123
src/views/danger/changeDanger/changeInfo.vue
src/views/danger/changeDanger/changeInfo.vue
+73
-4
src/views/danger/changeDanger/index.vue
src/views/danger/changeDanger/index.vue
+145
-16
src/views/danger/confirmeDanger/confirmeDanger.vue
src/views/danger/confirmeDanger/confirmeDanger.vue
+117
-67
src/views/danger/confirmeDanger/index.vue
src/views/danger/confirmeDanger/index.vue
+123
-6
src/views/danger/confirmeDanger/waitConList.vue
src/views/danger/confirmeDanger/waitConList.vue
+0
-123
src/views/danger/reportReturn/index.vue
src/views/danger/reportReturn/index.vue
+149
-7
src/views/danger/reportReturn/returned.vue
src/views/danger/reportReturn/returned.vue
+0
-125
src/views/danger/reviewDanger/index.vue
src/views/danger/reviewDanger/index.vue
+149
-19
src/views/danger/reviewDanger/reviewAdd.vue
src/views/danger/reviewDanger/reviewAdd.vue
+31
-5
src/views/danger/reviewDanger/waitReview.vue
src/views/danger/reviewDanger/waitReview.vue
+0
-123
src/views/danger/standBook/index.vue
src/views/danger/standBook/index.vue
+123
-19
src/views/danger/standBook/normalList.vue
src/views/danger/standBook/normalList.vue
+0
-115
No files found.
src/service/danger.js
View file @
61dd7cab
import
request
from
'
@/utils/axios
'
import
request
from
'
@/utils/axios
'
// 隐患上报模块
// 隐患上报模块
// 隐患上报已退回
export
function
dangerReturn
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 请求新增表单数据信息的
// 请求新增表单数据信息的
export
function
getFormList
(
url
,
params
)
{
export
function
getFormList
(
url
,
params
)
{
return
request
({
return
request
({
...
@@ -59,6 +50,7 @@ export function postHdShowPeople(url,data) {
...
@@ -59,6 +50,7 @@ export function postHdShowPeople(url,data) {
})
})
}
}
// 隐患上报保存接口
// 隐患上报保存接口
export
function
postHdReportAdd
(
url
,
data
)
{
export
function
postHdReportAdd
(
url
,
data
)
{
return
request
({
return
request
({
...
@@ -67,3 +59,109 @@ export function postHdReportAdd(url,data) {
...
@@ -67,3 +59,109 @@ export function postHdReportAdd(url,data) {
data
data
})
})
}
}
// 隐患上报已退回列表
export
function
dangerReturn
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 隐患上报已退回删除
export
function
dangerReturnDel
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 隐患上报已退回 回显所有数据接口
export
function
dangerReturnEcho
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
get
'
,
data
})
}
// 隐患确认模块
// 隐患确认列表
export
function
dangerConfirm
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 隐患确认form表单列表数据
export
function
getConfirmFormList
(
url
,
params
)
{
return
request
({
url
:
url
,
method
:
'
get
'
,
params
})
}
// 隐患确认提交
export
function
dangerConSub
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 隐患整改模块
// 隐患整改列表
export
function
dangerRect
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 隐患整改 有退回原因的
export
function
dangerRectReturn
(
url
,
params
)
{
return
request
({
url
:
url
,
method
:
'
get
'
,
params
})
}
// 隐患整改保存 没有退回原因
export
function
dangerRectAdd
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 整改复查模块
// 整改复查列表
export
function
dangerReview
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 整改复查保存
export
function
dangerReviewAdd
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
// 隐患历史台账模块
export
function
dangerStandBook
(
url
,
data
)
{
return
request
({
url
:
url
,
method
:
'
post
'
,
data
})
}
src/views/danger/addDanger/addDanger.vue
View file @
61dd7cab
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
v-model=
"returnCause"
v-model=
"returnCause"
readonly
readonly
rows=
"1"
rows=
"1"
autosize
=
""
autosize
label=
"退回原因"
label=
"退回原因"
type=
"textarea"
type=
"textarea"
/>
/>
...
@@ -266,22 +266,27 @@ import {
...
@@ -266,22 +266,27 @@ import {
postHdInventories
,
postHdInventories
,
postHdRiskSource
,
postHdRiskSource
,
postHdShowPeople
,
postHdShowPeople
,
postHdReportAdd
postHdReportAdd
,
dangerReturnEcho
}
from
"
@/service/danger
"
;
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
LHeader
},
},
created
()
{
created
()
{
if
(
this
.
$route
.
params
.
status
)
{
this
.
taskId
=
this
.
$route
.
params
.
taskId
if
(
this
.
taskId
)
{
this
.
isShowreturnCause
=
true
;
this
.
isShowreturnCause
=
true
;
this
.
text
=
"
隐患上报退回
"
;
this
.
text
=
"
隐患上报退回
"
;
this
.
postReturnEcho
()
}
}
console
.
log
(
"
taskid
"
+
this
.
taskId
);
this
.
getList
();
this
.
getList
();
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
新增隐患
"
,
text
:
"
新增隐患
"
,
taskId
:
""
,
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
projectName
:
""
,
showProjectName
:
false
,
showProjectName
:
false
,
...
@@ -334,8 +339,8 @@ export default {
...
@@ -334,8 +339,8 @@ export default {
formdata
.
append
(
"
dangerSource
"
,
values
.
dangerSource
)
formdata
.
append
(
"
dangerSource
"
,
values
.
dangerSource
)
formdata
.
append
(
"
hdPosition
"
,
values
.
hdPosition
)
formdata
.
append
(
"
hdPosition
"
,
values
.
hdPosition
)
formdata
.
append
(
"
hdDescribe
"
,
values
.
hdDescribe
)
formdata
.
append
(
"
hdDescribe
"
,
values
.
hdDescribe
)
formdata
.
append
(
"
hdPicture1
"
,
values
.
hdPicture1
)
formdata
.
append
(
"
hdPicture1
[]
"
,
values
.
hdPicture1
)
formdata
.
append
(
"
hdVideo1
"
,
values
.
hdVideo1
)
formdata
.
append
(
"
hdVideo1
[]
"
,
values
.
hdVideo1
)
formdata
.
append
(
"
hdExpirationTime
"
,
values
.
hdExpirationTime
)
formdata
.
append
(
"
hdExpirationTime
"
,
values
.
hdExpirationTime
)
formdata
.
append
(
"
rectificationUser
"
,
values
.
rectificationUser
)
formdata
.
append
(
"
rectificationUser
"
,
values
.
rectificationUser
)
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
...
@@ -379,6 +384,25 @@ export default {
...
@@ -379,6 +384,25 @@ export default {
});
});
},
},
// 请求已退回详情数据
postReturnEcho
(){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerReturnEcho
(
`/hdreport/edit/
${
this
.
taskId
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
console
.
log
(
res
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
// 所属工程名称
// 所属工程名称
onConProjectName
(
value
)
{
onConProjectName
(
value
)
{
this
.
projectId
=
value
.
id
;
this
.
projectId
=
value
.
id
;
...
@@ -456,7 +480,8 @@ export default {
...
@@ -456,7 +480,8 @@ export default {
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
}
},
}
}
};
};
</
script
>
</
script
>
...
...
src/views/danger/changeDanger/changeDanger.vue
deleted
100644 → 0
View file @
b455b64d
<
template
>
<div>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"read(item)"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
所属工程名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
project
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患项目名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
subject
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患发现时间:
</van-col>
<van-col
span=
"17"
>
{{
item
.
findTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患级别:
</van-col>
<van-col
span=
"17"
>
{{
item
.
level
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
touchstart=
"goConfirm(item)"
>
确认
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
messageList
:
[
{
project
:
"
朝阳区和平街14区简易住宅楼改造项目
"
,
subject
:
"
临时用电施工组织设计未对盾构施工用电进行专项说明。
"
,
findTime
:
"
2021-10-26 16:30:00
"
,
level
:
"
一般隐患A
"
}
],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
},
mounted
()
{},
methods
:
{
read
()
{},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/change-detail
"
);
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/change-info
"
);
this
.
showIndex
=
null
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
src/views/danger/changeDanger/changeInfo.vue
View file @
61dd7cab
...
@@ -3,14 +3,24 @@
...
@@ -3,14 +3,24 @@
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-form
<van-form
@
submit=
"onSubmit"
@
submit=
"onSubmit"
:show-error=
'false'
:show-error=
"false"
:scroll-to-error=
"true"
:scroll-to-error=
"true"
validate-trigger=
"onSubmit"
validate-trigger=
"onSubmit"
>
>
<van-field
v-if=
"isShowreturnCause"
v-model=
"returnCause"
readonly
rows=
"1"
autosize
label=
"退回原因"
type=
"textarea"
/>
<van-field
<van-field
v-model=
"value"
v-model=
"value"
label=
"隐患整改描述"
label=
"隐患整改描述"
name=
"
隐患整改描述
"
name=
"
details
"
rows=
"3"
rows=
"3"
type=
"textarea"
type=
"textarea"
placeholder=
"请输入"
placeholder=
"请输入"
...
@@ -20,7 +30,6 @@
...
@@ -20,7 +30,6 @@
<van-field
<van-field
name=
"uploader"
name=
"uploader"
label=
"整改照片"
label=
"整改照片"
:rules=
"[
{ required: true, message: '请上传图像' }]"
>
>
<template
#input
>
<template
#input
>
<van-uploader
v-model=
"uploaderImg"
/>
<van-uploader
v-model=
"uploaderImg"
/>
...
@@ -49,6 +58,7 @@
...
@@ -49,6 +58,7 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
{
dangerRectReturn
,
dangerRectAdd
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
LHeader
...
@@ -56,16 +66,75 @@ export default {
...
@@ -56,16 +66,75 @@ export default {
data
()
{
data
()
{
return
{
return
{
text
:
"
整改确认
"
,
text
:
"
整改确认
"
,
taskId
:
""
,
taskName
:
""
,
returnCause
:
""
,
isShowreturnCause
:
false
,
value
:
""
,
value
:
""
,
uploaderImg
:
[],
//图像上传
uploaderImg
:
[],
//图像上传
uploaderVideo
:
[]
//视频上传
uploaderVideo
:
[]
//视频上传
};
};
},
},
mounted
()
{},
created
()
{
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
this
.
taskName
=
this
.
$route
.
params
.
taskName
;
if
(
this
.
taskName
==
"
隐患整改(已退回)
"
)
{
this
.
isShowreturnCause
=
true
;
// 请求退回原因
this
.
getRectReturn
();
}
},
methods
:
{
methods
:
{
onSubmit
(
values
)
{
onSubmit
(
values
)
{
console
.
log
(
"
submit
"
,
values
);
console
.
log
(
"
submit
"
,
values
);
this
.
$toast
.
loading
({
message
:
"
提交中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
formdata
=
new
FormData
();
formdata
.
append
(
"
details
"
,
this
.
value
);
// formdata.append("rePicture[]", values.uploader);
// formdata.append("reVideo[]", values.uploader2);
// 判断保存的url
let
url
=
`/rectification/add1/
${
this
.
taskId
}
`
;
if
(
this
.
taskName
==
"
隐患整改(已退回)
"
)
{
url
=
`/rectification/add2/
${
this
.
taskId
}
`
;
}
dangerRectAdd
(
url
,
formdata
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
},
},
// 请求退回原因方法
getRectReturn
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerRectReturn
(
`/rectification/addReturn/
${
this
.
taskId
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
returnCause
=
res
.
data
.
reason
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
}
}
...
...
src/views/danger/changeDanger/index.vue
View file @
61dd7cab
...
@@ -2,42 +2,171 @@
...
@@ -2,42 +2,171 @@
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-tabs
<!-- 内容列表 -->
v-model=
"active"
<div
class=
"con-list"
>
color=
"#247df7"
<van-cell-group
title-inactive-colo=
"#d0d1d1"
inset
title-active-color=
"#000000"
v-for=
"(item, index) in messageList"
>
:key=
"index"
<van-tab
title=
"隐患整改"
>
@
click=
"read(item)"
<change-danger></change-danger>
@
touchstart=
"touchstart(index, item)"
</van-tab>
@
touchend.prevent=
"touchend(index)"
</van-tabs>
>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
所属项目:
</van-col>
<van-col
span=
"19"
>
{{
item
.
proId
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患级别:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdLev
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
适用范围:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdRange
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患类型:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdType
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
发现时间:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdDiscoveryTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
超期标识:
</van-col>
<van-col
span=
"19"
>
{{
item
.
dueDate
|
formatTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
状态:
</van-col>
<van-col
span=
"19"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
touchstart=
"goConfirm(item)"
>
确认
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
changeDanger
from
"
./changeDanger.vue
"
;
import
{
dangerRect
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
,
LHeader
,
changeDanger
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
隐患整改
"
,
text
:
"
隐患整改
"
,
active
:
"
1
"
,
searchValue
:
""
,
searchValue
:
""
messageList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
};
},
},
mounted
()
{},
created
()
{
this
.
postList
()
},
methods
:
{
methods
:
{
onSearch
(
val
)
{
onSearch
(
val
)
{
console
.
log
(
val
);
console
.
log
(
val
);
},
postList
(){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerRect
(
"
/rectification/list
"
).
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
rows
}).
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
({
name
:
"
change-info
"
,
params
:{
"
taskId
"
:
data
.
taskId
,
"
taskName
"
:
data
.
taskName
}
});
this
.
showIndex
=
null
;
}
},
filters
:{
formatTime
:
function
(
val
){
if
(
new
Date
(
val
).
getTime
()
<=
new
Date
().
getTime
()){
return
"
超期
"
}
else
if
(
new
Date
(
val
).
getTime
()
>=
new
Date
().
getTime
()
&&
new
Date
(
val
).
getTime
()
<=
new
Date
().
getTime
()
+
259200000
){
return
"
临期
"
}
else
{
return
"
正常
"
}
}
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
</
style
>
src/views/danger/confirmeDanger/confirmeDanger.vue
View file @
61dd7cab
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-form
<van-form
@
submit=
"onSubmit"
@
submit=
"onSubmit"
:show-error=
'false'
:show-error=
"false"
:scroll-to-error=
"true"
:scroll-to-error=
"true"
validate-trigger=
"onSubmit"
validate-trigger=
"onSubmit"
>
>
<van-field
name=
"
radio
"
label=
"隐患确认信息"
>
<van-field
name=
"
confirmResult
"
label=
"隐患确认信息"
>
<template
#input
>
<template
#input
>
<van-radio-group
<van-radio-group
v-model=
"radio"
v-model=
"radio"
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
@
change=
"selectResult"
@
change=
"selectResult"
>
>
<van-radio
name=
"1"
>
同意
</van-radio>
<van-radio
name=
"1"
>
同意
</van-radio>
<van-radio
name=
"
2
"
>
退回
</van-radio>
<van-radio
name=
"
0
"
>
退回
</van-radio>
</van-radio-group>
</van-radio-group>
</
template
>
</
template
>
</van-field>
</van-field>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<van-field
<van-field
readonly
readonly
clickable
clickable
name=
"
整改截止时间
"
name=
"
endTime
"
:value=
"value"
:value=
"value"
label=
"整改截止时间"
label=
"整改截止时间"
placeholder=
"点击选择日期"
placeholder=
"点击选择日期"
...
@@ -33,69 +33,62 @@
...
@@ -33,69 +33,62 @@
:rules=
"[{ required: true, message: '请选择日期' }]"
:rules=
"[{ required: true, message: '请选择日期' }]"
/>
/>
<van-popup
v-model=
"showCalendar"
position=
"bottom"
>
<van-popup
v-model=
"showCalendar"
position=
"bottom"
>
<van-datetime-picker
<van-datetime-picker
type=
"datetime"
type=
"datetime"
@
confirm=
"onConfirm"
@
confirm=
"onConfirm"
@
cancel=
"showCalendar = false"
@
cancel=
"showCalendar = false"
/>
/>
</van-popup>
</van-popup>
<van-field
<van-field
readonly
readonly
clickable
clickable
name=
"
隐患整改人
"
name=
"
rectificationUser
"
:value=
"value
Zhenggai
"
:value=
"value
Rect
"
label=
"隐患整改人"
label=
"隐患整改人"
placeholder=
"请选择"
placeholder=
"请选择"
@
click=
"showPicker
Zhenggai
= true"
@
click=
"showPicker
Rect
= true"
:rules=
"[{ required: true, message: '请选择隐患整改人' }]"
:rules=
"[{ required: true, message: '请选择隐患整改人' }]"
/>
/>
<van-popup
v-model=
"showPicker
Zhenggai
"
position=
"bottom"
>
<van-popup
v-model=
"showPicker
Rect
"
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
:columns=
"columnsZhenggai"
value-key=
"userName"
@
confirm=
"onConfirmZhenggai"
:columns=
"columnsRect"
@
cancel=
"showPickerZhenggai = false"
@
confirm=
"onConRect"
@
cancel=
"showPickerRect = false"
/>
/>
</van-popup>
</van-popup>
<van-field
<van-field
readonly
readonly
clickable
clickable
name=
"
隐患复查人
"
name=
"
rectificationReview
"
:value=
"value
Fucha
"
:value=
"value
Review
"
label=
"隐患复查人"
label=
"隐患复查人"
placeholder=
"请选择"
placeholder=
"请选择"
@
click=
"showPicker
Fucha
= true"
@
click=
"showPicker
Review
= true"
:rules=
"[{ required: true, message: '请选择隐患复查人' }]"
:rules=
"[{ required: true, message: '请选择隐患复查人' }]"
/>
/>
<van-popup
v-model=
"showPicker
Fucha
"
position=
"bottom"
>
<van-popup
v-model=
"showPicker
Review
"
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
:columns=
"columnsFucha"
value-key=
"userName"
@
confirm=
"onConfirmFucha"
:columns=
"columnsReview"
@
cancel=
"showPickerFucha = false"
@
confirm=
"onConReview"
@
cancel=
"showPickerReview = false"
/>
/>
</van-popup>
</van-popup>
<van-field
<van-field
readonly
v-model=
"valueIdea"
clickable
label=
"意见"
name=
"意见"
name=
"confirmOpinion"
:value=
"valueIdea"
rows=
"3"
label=
"意见"
type=
"textarea"
placeholder=
"请选择"
placeholder=
"请输入"
@
click=
"showPickerIdea = true"
:rules=
"[{ required: true, message: '意见不能为空' }]"
:rules=
"[{ required: true, message: '请选择意见' }]"
/>
<van-popup
v-model=
"showPickerIdea"
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"columnsIdea"
@
confirm=
"onConfirmIdea"
@
cancel=
"showPickerIdea = false"
/>
/>
</van-popup>
</div>
</div>
<!-- 退回是的选项 -->
<!-- 退回是的选项 -->
...
@@ -103,7 +96,7 @@
...
@@ -103,7 +96,7 @@
<van-field
<van-field
v-model=
"returnReason"
v-model=
"returnReason"
label=
"退回原因"
label=
"退回原因"
name
=
"退回原因
"
name
=
"confirmOpinion
"
rows=
"3"
rows=
"3"
type=
"textarea"
type=
"textarea"
placeholder=
"请输入"
placeholder=
"请输入"
...
@@ -127,58 +120,115 @@
...
@@ -127,58 +120,115 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
{
timestampToTime
}
from
'
@/utils/format
'
import
{
timestampToTime
}
from
"
@/utils/format
"
;
import
{
getConfirmFormList
,
dangerConSub
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
LHeader
},
},
data
()
{
data
()
{
return
{
return
{
taskId
:
""
,
radio
:
"
1
"
,
radio
:
"
1
"
,
text
:
"
隐患确认
"
,
text
:
"
隐患确认
"
,
value
:
""
,
value
:
""
,
showCalendar
:
false
,
showCalendar
:
false
,
valueZhenggai
:
""
,
rectId
:
""
,
// 隐患整改人
columnsZhenggai
:
[
"
张三
"
,
"
李四
"
,
"
王五
"
],
valueRect
:
""
,
showPickerZhenggai
:
false
,
columnsRect
:
[],
valueFucha
:
""
,
showPickerRect
:
false
,
columnsFucha
:
[
"
张三1
"
,
"
李四2
"
,
"
王五3
"
],
reviewId
:
""
,
// 隐患复查人
showPickerFucha
:
false
,
valueReview
:
""
,
columnsReview
:
[],
showPickerReview
:
false
,
valueIdea
:
""
,
valueIdea
:
""
,
columnsIdea
:
[
"
同意,立即整改
"
,
"
退回,重新上报
"
],
showPickerIdea
:
false
,
returnReason
:
""
returnReason
:
""
};
};
},
},
mounted
()
{},
created
()
{
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
this
.
getFormList
();
},
methods
:
{
methods
:
{
getFormList
()
{
if
(
!
this
.
taskId
)
{
return
;
}
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
getConfirmFormList
(
`confirm/add/
${
this
.
taskId
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
columnsRect
=
res
.
data
.
rectificationUser
;
this
.
columnsReview
=
res
.
data
.
rectificationReview
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
// 保存时的操作
onSubmit
(
values
)
{
console
.
log
(
"
submit
"
,
values
);
if
(
!
this
.
taskId
)
{
return
;
}
let
formdata
=
new
FormData
()
formdata
.
append
(
'
confirmResult
'
,
this
.
radio
)
formdata
.
append
(
'
endTime
'
,
values
.
endTime
)
formdata
.
append
(
'
rectificationUser
'
,
this
.
rectId
)
formdata
.
append
(
'
rectificationReview
'
,
this
.
reviewId
)
formdata
.
append
(
'
confirmOpinion
'
,
values
.
confirmOpinion
)
this
.
$toast
.
loading
({
message
:
"
提交中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerConSub
(
`/confirm/add1/
${
this
.
taskId
}
`
,
formdata
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
},
selectResult
(
val
)
{
selectResult
(
val
)
{
this
.
radio
=
val
;
this
.
radio
=
val
;
this
.
returnReason
=
""
;
this
.
valueIdea
=
""
;
},
},
onConfirm
(
date
)
{
onConfirm
(
date
)
{
this
.
value
=
timestampToTime
(
date
,
'
DT1
'
,
true
)
this
.
value
=
timestampToTime
(
date
,
"
DT1
"
,
true
);
this
.
showCalendar
=
false
;
this
.
showCalendar
=
false
;
},
},
onConfirmZhenggai
(
value
)
{
onConRect
(
value
)
{
this
.
valueZhenggai
=
value
;
this
.
valueRect
=
value
.
userName
;
this
.
showPickerZhenggai
=
false
;
this
.
rectId
=
value
.
userId
;
this
.
showPickerRect
=
false
;
},
},
onConfirmFucha
(
value
)
{
onConReview
(
value
)
{
this
.
valueFucha
=
value
;
this
.
valueReview
=
value
.
userName
;
this
.
showPickerFucha
=
false
;
this
.
reviewId
=
value
.
userId
;
},
this
.
showPickerReview
=
false
;
onConfirmIdea
(
value
)
{
this
.
valueIdea
=
value
;
this
.
showPickerIdea
=
false
;
},
},
onSubmit
(
values
)
{
console
.
log
(
"
submit
"
,
values
);
},
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
}
,
}
}
}
};
};
</
script
>
</
script
>
...
...
src/views/danger/confirmeDanger/index.vue
View file @
61dd7cab
...
@@ -9,7 +9,49 @@
...
@@ -9,7 +9,49 @@
title-active-color=
"#000000"
title-active-color=
"#000000"
>
>
<van-tab
title=
"待确认"
>
<van-tab
title=
"待确认"
>
<wait-con-list></wait-con-list>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
所属项目:
</van-col>
<van-col
span=
"19"
>
{{
item
.
proId
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患级别:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdLev
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
适用范围:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdRange
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患类型:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdTdueDateype
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
发现时间:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdDiscoveryTime
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
touchstart=
"goConfirm(item)"
>
确认
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</van-tab>
</van-tab>
<van-tab
title=
"已确认"
>
已确认
</van-tab>
<van-tab
title=
"已确认"
>
已确认
</van-tab>
<van-tab
title=
"已退回"
>
已退回
</van-tab>
<van-tab
title=
"已退回"
>
已退回
</van-tab>
...
@@ -19,28 +61,103 @@
...
@@ -19,28 +61,103 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
waitConList
from
"
./waitConList.vue
"
;
import
{
dangerConfirm
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
,
LHeader
,
waitConList
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
隐患确认
"
,
text
:
"
隐患确认
"
,
active
:
"
1
"
,
active
:
"
1
"
,
searchValue
:
""
searchValue
:
""
,
messageList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
};
},
},
mounted
()
{},
created
()
{
this
.
postList
()
},
methods
:
{
methods
:
{
onSearch
(
val
)
{
onSearch
(
val
)
{
console
.
log
(
val
);
console
.
log
(
val
);
},
postList
(){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerConfirm
(
"
/confirm/list
"
).
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
rows
console
.
log
(
this
.
messageList
);
}).
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/con-detail
"
);
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
({
name
:
"
affirm-danger
"
,
params
:{
"
taskId
"
:
data
.
taskId
}
});
this
.
showIndex
=
null
;
}
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px .533333rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
</
style
>
src/views/danger/confirmeDanger/waitConList.vue
deleted
100644 → 0
View file @
b455b64d
<
template
>
<div>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"read(item)"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
所属工程名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
project
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患项目名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
subject
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患发现时间:
</van-col>
<van-col
span=
"17"
>
{{
item
.
findTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患级别:
</van-col>
<van-col
span=
"17"
>
{{
item
.
level
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
touchstart=
"goConfirm(item)"
>
确认
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
messageList
:
[
{
project
:
"
朝阳区和平街14区简易住宅楼改造项目
"
,
subject
:
"
临时用电施工组织设计未对盾构施工用电进行专项说明。
"
,
findTime
:
"
2021-10-26 16:30:00
"
,
level
:
"
一般隐患A
"
}
],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
},
mounted
()
{},
methods
:
{
read
()
{},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/con-detail
"
);
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/affirm-danger
"
);
this
.
showIndex
=
null
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
src/views/danger/reportReturn/index.vue
View file @
61dd7cab
...
@@ -2,33 +2,175 @@
...
@@ -2,33 +2,175 @@
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<returned></returned>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
所属项目:
</van-col>
<van-col
span=
"19"
>
{{
item
.
proId
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患级别:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdLev
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
适用范围:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdRange
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患类型:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdType
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
发现时间:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdDiscoveryTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
状态:
</van-col>
<van-col
span=
"19"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goSubmit(item)"
>
上报
</van-button
>
<van-button
round
type=
"warning"
@
touchstart=
"goDelete(item)"
>
删除
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
Returned
from
"
./returned
"
;
import
{
dangerReturn
,
dangerReturnDel
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
:
LHeader
,
LHeader
:
LHeader
Returned
,
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
上报退回
"
,
text
:
"
上报退回
"
,
searchValue
:
""
searchValue
:
""
,
messageList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
};
},
},
mounted
()
{},
created
()
{
this
.
postList
();
},
methods
:
{
methods
:
{
postList
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerReturn
(
"
/hdreport/list
"
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
rows
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
onSearch
(
val
)
{
onSearch
(
val
)
{
console
.
log
(
val
);
console
.
log
(
val
);
},
},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 提交
goSubmit
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
({
name
:
"
add-danger
"
,
params
:
{
status
:
"
退回
"
,
taskId
:
data
.
taskId
}
});
this
.
showIndex
=
null
;
},
// 删除
goDelete
(
data
)
{
console
.
log
(
data
);
this
.
$toast
.
loading
({
message
:
"
删除中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerReturnDel
(
`/hdreport/delete/
${
data
.
taskId
}
`
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
删除成功
"
,
duration
:
2000
});
this
.
postList
();
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
删除失败,请稍后再试
"
);
});
this
.
showIndex
=
null
;
}
}
}
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0.533333rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
</
style
>
src/views/danger/reportReturn/returned.vue
deleted
100644 → 0
View file @
b455b64d
<
template
>
<div>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"read(item)"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
所属工程名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
project
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患项目名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
subject
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患发现时间:
</van-col>
<van-col
span=
"17"
>
{{
item
.
findTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患级别:
</van-col>
<van-col
span=
"17"
>
{{
item
.
level
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"warning"
@
touchstart=
"goDelete(item)"
>
删除
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
messageList
:
[
{
project
:
"
朝阳区和平街14区简易住宅楼改造项目
"
,
subject
:
"
临时用电施工组织设计未对盾构施工用电进行专项说明。
"
,
findTime
:
"
2021-10-26 16:30:00
"
,
level
:
"
一般隐患A
"
}
],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
},
mounted
()
{},
methods
:
{
read
()
{},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
({
name
:
'
add-danger
'
,
params
:
{
status
:
"
退回
"
}
});
this
.
showIndex
=
null
;
},
// 删除
goDelete
(
data
)
{
console
.
log
(
data
);
this
.
showIndex
=
null
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
src/views/danger/reviewDanger/index.vue
View file @
61dd7cab
...
@@ -2,45 +2,175 @@
...
@@ -2,45 +2,175 @@
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-tabs
<!-- 内容列表 -->
v-model=
"active"
<div
class=
"con-list"
>
color=
"#247df7"
<van-cell-group
title-inactive-colo=
"#d0d1d1"
inset
title-active-color=
"#000000"
v-for=
"(item, index) in messageList"
>
:key=
"index"
<van-tab
title=
"待复查"
>
@
touchstart=
"touchstart(index, item)"
<wait-review></wait-review>
@
touchend.prevent=
"touchend(index)"
</van-tab>
>
<van-tab
title=
"已办结"
>
已办结
</van-tab>
<van-row
gutter=
""
>
<van-tab
title=
"已退回"
>
已退回
</van-tab>
<van-col
span=
"5"
>
所属项目:
</van-col>
</van-tabs>
<van-col
span=
"19"
>
{{
item
.
proId
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患级别:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdLev
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
适用范围:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdRange
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患类型:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdType
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
发现时间:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdDiscoveryTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
超期标识:
</van-col>
<van-col
span=
"19"
>
{{
item
.
dueDate
|
formatTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
状态:
</van-col>
<van-col
span=
"19"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
touchstart=
"goConfirm(item)"
>
确认
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
waitReview
from
"
./waitReview.vue
"
;
import
{
dangerReview
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
,
LHeader
waitReview
,
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
隐患复查
"
,
text
:
"
隐患复查
"
,
active
:
"
1
"
,
searchValue
:
""
,
searchValue
:
""
messageList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
};
},
},
mounted
()
{},
created
()
{
this
.
postList
();
},
methods
:
{
methods
:
{
onSearch
(
val
)
{
onSearch
(
val
)
{
console
.
log
(
val
);
console
.
log
(
val
);
},
postList
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerReview
(
"
/review/list
"
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
rows
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/review-detail
"
);
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
({
name
:
"
review-add
"
,
params
:
{
taskId
:
data
.
taskId
}
});
this
.
showIndex
=
null
;
}
},
filters
:
{
formatTime
:
function
(
val
)
{
if
(
new
Date
(
val
).
getTime
()
<=
new
Date
().
getTime
())
{
return
"
超期
"
;
}
else
if
(
new
Date
(
val
).
getTime
()
>=
new
Date
().
getTime
()
&&
new
Date
(
val
).
getTime
()
<=
new
Date
().
getTime
()
+
259200000
)
{
return
"
临期
"
;
}
else
{
return
"
正常
"
;
}
}
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0.533333rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row {
margin-bottom: 0.133333rem;
line-height: 0.64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
</
style
>
src/views/danger/reviewDanger/reviewAdd.vue
View file @
61dd7cab
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
@
change=
"selectResult"
@
change=
"selectResult"
>
>
<van-radio
name=
"1"
>
合格
</van-radio>
<van-radio
name=
"1"
>
合格
</van-radio>
<van-radio
name=
"
2
"
>
退回
</van-radio>
<van-radio
name=
"
0
"
>
退回
</van-radio>
</van-radio-group>
</van-radio-group>
</
template
>
</
template
>
</van-field>
</van-field>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<van-field
<van-field
v-model=
"detail"
v-model=
"detail"
label=
"详情描述"
label=
"详情描述"
name=
"
详情描述
"
name=
"
reviewDetails
"
rows=
"3"
rows=
"3"
type=
"textarea"
type=
"textarea"
placeholder=
"请输入"
placeholder=
"请输入"
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
<van-field
<van-field
name=
"uploader"
name=
"uploader"
label=
"隐患复查照片"
label=
"隐患复查照片"
:rules=
"[{ required: true, message: '请上传图像' }]"
>
>
<
template
#input
>
<
template
#input
>
<van-uploader
v-model=
"uploaderImg"
/>
<van-uploader
v-model=
"uploaderImg"
/>
...
@@ -47,7 +46,7 @@
...
@@ -47,7 +46,7 @@
<van-field
<van-field
v-model=
"returnReason"
v-model=
"returnReason"
label=
"退回原因"
label=
"退回原因"
name=
"
退回原因
"
name=
"
reviewDetails
"
rows=
"3"
rows=
"3"
type=
"textarea"
type=
"textarea"
placeholder=
"请输入"
placeholder=
"请输入"
...
@@ -71,12 +70,14 @@
...
@@ -71,12 +70,14 @@
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
{
dangerReviewAdd
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
LHeader
},
},
data
()
{
data
()
{
return
{
return
{
taskId
:
""
,
radio
:
"
1
"
,
radio
:
"
1
"
,
text
:
"
隐患复查
"
,
text
:
"
隐患复查
"
,
detail
:
""
,
detail
:
""
,
...
@@ -84,7 +85,9 @@ export default {
...
@@ -84,7 +85,9 @@ export default {
returnReason
:
""
returnReason
:
""
};
};
},
},
mounted
()
{},
created
()
{
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
},
methods
:
{
methods
:
{
selectResult
(
val
)
{
selectResult
(
val
)
{
this
.
radio
=
val
;
this
.
radio
=
val
;
...
@@ -92,6 +95,29 @@ export default {
...
@@ -92,6 +95,29 @@ export default {
onSubmit
(
values
)
{
onSubmit
(
values
)
{
console
.
log
(
"
submit
"
,
values
);
console
.
log
(
"
submit
"
,
values
);
this
.
$toast
.
loading
({
message
:
"
提交中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
formdata
=
new
FormData
()
formdata
.
append
(
'
reviewResult
'
,
this
.
radio
)
// formdata.append('reviewPicture[]', values.uploader)
formdata
.
append
(
'
reviewDetails
'
,
values
.
reviewDetails
)
dangerReviewAdd
(
`/review/add1/
${
this
.
taskId
}
`
,
formdata
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
},
},
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
...
...
src/views/danger/reviewDanger/waitReview.vue
deleted
100644 → 0
View file @
b455b64d
<
template
>
<div>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"read(item)"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
所属工程名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
project
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患项目名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
subject
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患发现时间:
</van-col>
<van-col
span=
"17"
>
{{
item
.
findTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患级别:
</van-col>
<van-col
span=
"17"
>
{{
item
.
level
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
<van-button
round
type=
"info"
@
touchstart=
"goConfirm(item)"
>
确认
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
messageList
:
[
{
project
:
"
朝阳区和平街14区简易住宅楼改造项目
"
,
subject
:
"
临时用电施工组织设计未对盾构施工用电进行专项说明。
"
,
findTime
:
"
2021-10-26 16:30:00
"
,
level
:
"
一般隐患A
"
}
],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
},
mounted
()
{},
methods
:
{
read
()
{},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/review-detail
"
);
this
.
showIndex
=
null
;
},
// 确认
goConfirm
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/review-add
"
);
this
.
showIndex
=
null
;
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
src/views/danger/standBook/index.vue
View file @
61dd7cab
...
@@ -2,45 +2,149 @@
...
@@ -2,45 +2,149 @@
<div>
<div>
<LHeader
:text=
"text"
></LHeader>
<LHeader
:text=
"text"
></LHeader>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-search
v-model=
"searchValue"
placeholder=
"搜索"
@
search=
"onSearch"
/>
<van-tabs
<!-- 内容列表 -->
v-model=
"active"
<div
class=
"con-list"
>
color=
"#247df7"
<van-cell-group
title-inactive-colo=
"#d0d1d1"
inset
title-active-color=
"#000000"
v-for=
"(item, index) in messageList"
>
:key=
"index"
<van-tab
title=
"正常"
>
@
click=
"read(item)"
<normal-list></normal-list>
@
touchstart=
"touchstart(index, item)"
</van-tab>
@
touchend.prevent=
"touchend(index)"
<van-tab
title=
"临期"
>
临期
</van-tab>
>
<van-tab
title=
"超期"
>
超期
</van-tab>
<van-row
gutter=
""
>
</van-tabs>
<van-col
span=
"5"
>
所属项目:
</van-col>
<van-col
span=
"19"
>
{{
item
.
proId
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患级别:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdLev
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
适用范围:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdRange
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
隐患类型:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdType
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
发现时间:
</van-col>
<van-col
span=
"19"
>
{{
item
.
hdDiscoveryTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
超期标识:
</van-col>
<van-col
span=
"19"
>
{{
item
.
dueDate
|
formatTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"5"
>
状态:
</van-col>
<van-col
span=
"19"
>
{{
item
.
taskName
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
NormalList
from
"
./normalList
"
;
import
{
dangerStandBook
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
components
:
{
components
:
{
LHeader
,
LHeader
,
NormalList
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
隐患历史台账
"
,
text
:
"
隐患历史台账
"
,
active
:
"
1
"
,
searchValue
:
""
,
searchValue
:
""
messageList
:
[],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
};
},
},
mounted
()
{},
created
()
{
this
.
postList
();
},
methods
:
{
methods
:
{
onSearch
(
val
)
{
onSearch
(
val
)
{
console
.
log
(
val
);
console
.
log
(
val
);
}
},
postList
()
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
dangerStandBook
(
"
/review/list
"
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
rows
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/normal-detail
"
);
this
.
showIndex
=
null
;
},
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px .533333rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
</
style
>
src/views/danger/standBook/normalList.vue
deleted
100644 → 0
View file @
b455b64d
<
template
>
<div>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"read(item)"
@
touchstart=
"touchstart(index, item)"
@
touchend.prevent=
"touchend(index)"
>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
所属工程名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
project
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患项目名称:
</van-col>
<van-col
span=
"17"
>
{{
item
.
subject
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患发现时间:
</van-col>
<van-col
span=
"17"
>
{{
item
.
findTime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"7"
>
隐患级别:
</van-col>
<van-col
span=
"17"
>
{{
item
.
level
}}
</van-col>
</van-row>
<!-- 长按显示遮罩层 -->
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click
.
stop
>
<van-button
round
type=
"primary"
@
touchstart=
"goDetail(item)"
>
详情
</van-button
>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
messageList
:
[
{
project
:
"
朝阳区和平街14区简易住宅楼改造项目
"
,
subject
:
"
临时用电施工组织设计未对盾构施工用电进行专项说明。
"
,
findTime
:
"
2021-10-26 16:30:00
"
,
level
:
"
一般隐患A
"
}
],
Loop
:
""
,
// 定时器
showIndex
:
null
// 是否显示遮罩层
};
},
mounted
()
{},
methods
:
{
read
()
{},
touchstart
(
index
,
item
)
{
clearTimeout
(
this
.
Loop
);
//再次清空延时器,防止重复注册定时器
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
Loop
=
setTimeout
(()
=>
{
this
.
showIndex
=
index
;
},
300
);
// 这里的1000是指需要长按的时间,单位为ms
},
touchend
(
index
)
{
// 这个方法主要是用来将每次手指移出之后将计时器清零
clearInterval
(
this
.
Loop
);
},
// 详情
goDetail
(
data
)
{
console
.
log
(
data
);
this
.
$router
.
push
(
"
/normal-detail
"
);
this
.
showIndex
=
null
;
},
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.con-list {
padding: 10px 10px 0;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 10px;
padding: 10px;
font-size: 13px;
position: relative;
.van-row{
margin-bottom: .133333rem;
line-height: .64rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
</
style
>
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