Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-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
融通安全管理系统
rongtong-app
Commits
9e33fff9
Commit
9e33fff9
authored
Jan 11, 2024
by
kaitly205422@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加异常处理
parent
bb9a462e
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
660 additions
and
444 deletions
+660
-444
src/App.vue
src/App.vue
+10
-1
src/router/index.js
src/router/index.js
+5
-0
src/store/mutations.js
src/store/mutations.js
+4
-0
src/store/state.js
src/store/state.js
+3
-1
src/views/my/sign.vue
src/views/my/sign.vue
+15
-63
src/views/riskPatrol/patrolCancle/detail.vue
src/views/riskPatrol/patrolCancle/detail.vue
+97
-0
src/views/riskPatrol/patrolCancle/index.vue
src/views/riskPatrol/patrolCancle/index.vue
+8
-2
src/views/riskPatrol/patrolExecute/addDanger.vue
src/views/riskPatrol/patrolExecute/addDanger.vue
+66
-21
src/views/riskPatrol/patrolExecute/implement.vue
src/views/riskPatrol/patrolExecute/implement.vue
+81
-187
src/views/riskPatrol/patrolExecute/index.vue
src/views/riskPatrol/patrolExecute/index.vue
+12
-12
src/views/riskPatrol/patrolLog/index.vue
src/views/riskPatrol/patrolLog/index.vue
+50
-42
src/views/riskPatrol/patrolLog/logDetail.vue
src/views/riskPatrol/patrolLog/logDetail.vue
+152
-102
src/views/riskPatrol/patrolLog/logDetail1.vue
src/views/riskPatrol/patrolLog/logDetail1.vue
+144
-0
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+13
-13
No files found.
src/App.vue
View file @
9e33fff9
...
...
@@ -84,7 +84,7 @@ export default {
"
my-delay
"
,
"
risk-account
"
,
"
risk-confirme
"
,
"
my-delay
"
,
"
my-delay
"
],
// 'report-return', 'risk-return', 风险和隐患的上报退回不需要缓存
};
...
...
@@ -127,6 +127,7 @@ export default {
this
.
cachePage
.
push
(
roterFromName
);
}
}
console
.
log
(
this
.
cachePage
,
'
cach
'
)
},
},
watch
:
{
...
...
@@ -147,6 +148,8 @@ export default {
}
else
if
(
from
.
name
==
"
risk-confirme
"
||
to
.
name
==
"
risk-confirme
"
)
{
// 风险确认页面缓存处理
this
.
handleCache
(
"
risk-confirme
"
,
to
.
name
,
"
risk-affirm
"
);
}
else
if
(
to
.
name
==
'
taskLedger
'
||
from
.
name
==
'
taskLedger
'
)
{
this
.
handleCache
(
"
riskTaskList
"
,
to
.
name
,
"
taskLedger
"
);
}
// 列表页面动态添加缓存
...
...
@@ -182,6 +185,7 @@ export default {
body {
background-color: #f0f1f5;
}
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
...
...
@@ -196,6 +200,7 @@ body {
// background-color: #f0f1f5;
// z-index:999999999999
}
#app-content {
box-sizing: border-box;
overflow: hidden;
...
...
@@ -243,18 +248,22 @@ body {
position: absolute;
backface-visibility: hidden;
}
.slide-right-enter {
opacity: 0;
transform: translate3d(-100%, 0, 0);
}
.slide-right-leave-active {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
.slide-left-enter {
opacity: 0;
transform: translate3d(100%, 0, 0);
}
.slide-left-leave-active {
opacity: 0;
transform: translate3d(-100%, 0, 0);
...
...
src/router/index.js
View file @
9e33fff9
...
...
@@ -298,6 +298,11 @@ const routes = [
name
:
"
patrolCreate
"
,
component
:
()
=>
import
(
"
../views/riskPatrol/patrolCancle/create.vue
"
),
},
{
path
:
"
/patrolCancle/detail
"
,
name
:
"
patrolDetail
"
,
component
:
()
=>
import
(
"
../views/riskPatrol/patrolCancle/detail.vue
"
),
},
// 风险巡查管理 -巡查记录
{
path
:
"
/patrolLog
"
,
...
...
src/store/mutations.js
View file @
9e33fff9
...
...
@@ -39,5 +39,9 @@ export default {
// 固有风险模板
SET_INHERENT_TEMPLATE
(
state
,
data
)
{
state
.
inherentTemplate
=
data
;
},
// 异常上报
SET_DANGER_DATA
(
state
,
data
)
{
state
.
danger
=
data
;
}
};
src/store/state.js
View file @
9e33fff9
...
...
@@ -14,5 +14,7 @@ export default {
},
// 固有风险模板
inherentTemplate
:
{
}
},
// 异常上报
danger
:
{}
};
src/views/my/sign.vue
View file @
9e33fff9
<
template
>
<div>
<LHeader
:text=
"$route.meta.title"
>
<span
slot=
"right"
@
click=
"() => this.$router.push('sign-recode')"
>
签到记录
</span
>
<span
slot=
"right"
@
click=
"() => this.$router.push('sign-recode')"
>
签到记录
</span>
</LHeader>
<van-form
ref=
"signForm"
label-width=
"4.5em"
validate-trigger=
"onSubmit"
:colon=
"true"
>
<van-field
readonly
name=
"userName"
:value=
"userName"
label=
"用户名"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '用户名不能为空' }]"
/>
<van-field
readonly
name=
"userName"
label=
"签定时间"
placeholder=
"请输入"
key=
"nowTime"
:value=
"form.signTime"
>
<van-form
ref=
"signForm"
label-width=
"4.5em"
validate-trigger=
"onSubmit"
:colon=
"true"
>
<van-field
readonly
name=
"userName"
:value=
"userName"
label=
"用户名"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '用户名不能为空' }]" />
<van-field
readonly
name=
"userName"
label=
"签定时间"
placeholder=
"请输入"
key=
"nowTime"
:value=
"form.signTime"
>
<!--
<template
#input
>
<div>
{{
form
.
signTime
}}
</div>
</
template
>
-->
</van-field>
<van-field
required
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"关联项目"
placeholder=
"请选择"
@
click=
"showProject = true"
:rules=
"[{ required: true, message: '关联项目不能为空' }]"
>
<van-field
required
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"关联项目"
placeholder=
"请选择"
@
click=
"showProject = true"
:rules=
"[{ required: true, message: '关联项目不能为空' }]"
>
</van-field>
<van-field
required
name=
"remark"
v-model=
"form.remark"
label=
"备注"
placeholder=
"请输入"
type=
"textarea"
:rules=
"[{ required: true, message: '备注不能为空' }]"
>
<van-field
required
name=
"remark"
v-model=
"form.remark"
label=
"备注"
placeholder=
"请输入"
type=
"textarea"
:rules=
"[{ required: true, message: '备注不能为空' }]"
>
</van-field>
<van-field
readonly
required
name=
"file"
label=
"照片"
:rules=
"[{ required: true, message: '照片不能为空' }]"
>
<van-field
readonly
required
name=
"file"
label=
"照片"
:rules=
"[{ required: true, message: '照片不能为空' }]"
>
<
template
#input
>
<van-uploader
v-model=
"form.file"
:after-read=
"afterRead"
>
</van-uploader>
</
template
>
</van-field>
<div
class=
"submit-btns"
>
<van-button
round
block
type=
"info"
@
click=
"toSign(true)"
>
签到
</van-button
>
<van-button
round
block
type=
"warning"
@
click=
"toSign(false)"
>
签退
</van-button
>
<van-button
round
block
type=
"info"
@
click=
"toSign(true)"
>
签到
</van-button>
<van-button
round
block
type=
"warning"
@
click=
"toSign(false)"
>
签退
</van-button>
</div>
</van-form>
<van-popup
v-model=
"showProject"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<van-popup
v-model=
"showProject"
position=
"bottom"
:style=
"{ height: '100%' }"
>
<selectPeople
@
onClose=
"onClose"
@
onSave=
"onSave"
></selectPeople>
</van-popup>
</div>
...
...
@@ -196,7 +147,8 @@ export default {
.submit-btns {
display: flex;
padding: 20px 0 20px 20px;
> .van-button {
>.van-button {
margin-right: 20px;
}
}
...
...
src/views/riskPatrol/patrolCancle/detail.vue
0 → 100644
View file @
9e33fff9
<
template
>
<div
class=
"wrap"
>
<LHeader
:text=
"text"
></LHeader>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<van-form>
<van-field
v-model=
"form.reason"
readonly
label=
"申请原因:"
name=
"applyReason"
/>
<van-field
v-model=
"form.applyTime"
readonly
label=
"申请时间:"
name=
"applyReason"
/>
<van-field
v-model=
"form.holidayTime"
readonly
label=
"请假时间:"
name=
"applyReason"
/>
</van-form>
</div>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
'
patrolCancle
'
,
//巡查取消
components
:
{
LHeader
,
},
data
()
{
return
{
id
:
''
,
text
:
'
巡查取消
'
,
form
:
{
measures
:
'
123
'
,
createTime
:
'
2022
'
}
}
},
computed
:
{
},
watch
:
{
},
created
()
{
},
mounted
()
{
if
(
!
this
.
$route
.
query
.
id
)
{
this
.
$toast
}
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
getData
();
},
methods
:
{
getData
()
{
getFun
(
'
/risk/currentRiskHoliday/
'
+
this
.
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
;
})
}
},
}
</
script
>
<
style
scoped
lang=
'less'
>
.wrap {
height: 100vh;
width: 100vw;
}
.con-list {
padding-top: 20px;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
}
}
.operation-btn {
width: 95%;
margin: 20px 10px 10px;
position: fixed;
bottom: 50px;
right: 0;
left: 0;
}
</
style
>
src/views/riskPatrol/patrolCancle/index.vue
View file @
9e33fff9
...
...
@@ -7,7 +7,12 @@
<van-pull-refresh
@
refresh=
"onRefresh"
v-model=
"refreshing"
>
<van-list
finished-text=
"没有更多了"
@
load=
"onLoad()"
>
<van-cell
v-for=
"(child) in group"
:key=
"child.id"
:title=
"child.applyTime"
:value=
"child.reason"
label=
""
/>
label=
""
@
click=
"() => $router.push(
{
name: 'patrolDetail',
query: {
id: child.id
}
})" />
</van-list>
</van-pull-refresh>
</div>
...
...
@@ -65,7 +70,8 @@ export default {
this
.
getData
()
},
getData
()
{
getFun
(
"
risk/currentRiskHoliday/list
"
,
this
.
pages
).
then
(
res
=>
{
let
userInfoData
=
JSON
.
parse
(
localStorage
.
getItem
(
'
LocalUserInfo
'
))
getFun
(
"
risk/currentRiskHoliday/list
"
,
{
...
this
.
pages
,
userId
:
userInfoData
.
userId
}).
then
(
res
=>
{
this
.
group
=
this
.
group
.
concat
(
res
.
rows
);
this
.
refreshing
=
false
;
})
...
...
src/views/riskPatrol/patrolExecute/addDanger.vue
View file @
9e33fff9
...
...
@@ -6,12 +6,39 @@
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
巡查内容
</div>
<div
class=
"content"
>
应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。
</div>
<div>
<van-field
label=
"风险因素"
required
readonly
>
<template
#input
>
<van-field
readonly
v-model=
"form.factor"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"风险类型"
readonly
required
>
<
template
#input
>
<van-field
readonly
v-model=
"form.type"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"风险等级"
required
>
<
template
#input
>
<van-field
readonly
v-model=
"form.level"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"管控措施"
readonly
required
>
<
template
#input
>
<van-field
readonly
v-model=
"form.measuresProject"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
</div>
<div
class=
"title"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
巡查地点
</div>
<div
class=
"content"
>
西南厂区一车间西北角
</div>
<van-field
label=
"巡查地点"
required
>
<
template
#input
>
<van-field
v-model=
"form.riskLocation"
name=
"abnormalDesc"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<div
class=
"list"
>
<div
class=
"title"
>
...
...
@@ -21,24 +48,17 @@
<van-field
name=
"hdPicture1"
label=
"异常照片"
>
<
template
#input
>
<van-uploader
@
delete=
"deleteFile"
multiple
:max-count=
"5"
upload-text=
"最多上传五个"
v-model=
"form.abnormalPics"
>
<template
slot=
"default"
>
<div
class=
"content-upload"
>
<img
src=
"@/assets/upload/pic.png"
alt=
""
style=
"width: 0.64rem; height: 0.64rem"
/>
<span
class=
"van-uploader__upload-text"
>
最多上传五个
</span>
</div>
</
template
>
</van-uploader>
v-model=
"form.abnormalPics"
:after-read=
"afterRead"
></van-uploader>
</
template
>
</van-field>
<van-field
label=
"异常说明"
>
<van-field
label=
"异常说明"
required
>
<
template
#input
>
<van-field
v-model=
"form.abnormalDesc"
name=
"abnormalDesc"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</van-field>
<van-field
re
adonly
v-model=
"form.assessmentLevel"
required
name=
"assessmentLevel"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
re
quired
readonly
v-model=
"form.assessmentLevel"
name=
"assessmentLevel"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
/>
<div
style=
"margin: 16px 16px 0"
>
<van-button
:loading=
"loadingStatus"
loading-text=
"加载中..."
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button>
...
...
@@ -61,17 +81,37 @@ export default {
},
data
()
{
return
{
form
:
{},
form
:
{
abnormalPics
:
[]
},
text
:
"
异常上报
"
};
},
// 退出前,将测评模型数据清空
beforeRouteLeave
(
to
,
_
,
next
)
{
if
(
to
.
name
!=
'
assessModelStep1
'
)
{
this
.
$store
.
commit
(
'
SET_ASSESS_STEP2
'
,
""
)
this
.
$store
.
commit
(
'
SET_ASSESS_STEP1
'
,
""
)
this
.
$store
.
commit
(
'
SET_ASSESS_RESULT
'
,
{
level
:
""
,
score
:
""
,
})
this
.
$store
.
commit
(
'
SET_DANGER_DATA
'
,
{})
}
next
()
},
mounted
()
{
const
formData
=
sessionStorage
.
getItem
(
'
addDanger
'
);
const
formData
=
this
.
$store
.
state
.
danger
;
//这里的数据是从”implement.vue“页面传递过来的
if
(
!
formData
.
riskContent
)
{
//不存在巡查地点返回
this
.
$router
.
go
(
-
1
)
}
if
(
formData
)
{
const
{
level
,
score
}
=
this
.
$store
.
state
.
assessModel
.
result
this
.
form
=
JSON
.
parse
(
formData
);
this
.
form
=
formData
}
const
{
level
,
score
}
=
this
.
$store
.
state
.
assessModel
.
result
if
(
level
)
{
this
.
form
.
assessmentLevel
=
level
;
sessionStorage
.
removeItem
(
'
addDanger
'
)
}
},
methods
:
{
...
...
@@ -81,7 +121,7 @@ export default {
this
.
$router
.
push
(
'
/assess/model/step1
'
)
},
saveFormData
()
{
sessionStorage
.
setItem
(
"
addDanger
"
,
JSON
.
stringify
(
this
.
form
));
this
.
$store
.
commit
(
'
SET_DANGER_DATA
'
,
this
.
form
)
},
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
...
...
@@ -89,7 +129,7 @@ export default {
Object
.
keys
(
config
).
forEach
((
key
)
=>
{
if
(
key
==
'
abnormalPics
'
)
{
config
[
key
].
forEach
(
val
=>
{
formData
.
append
(
'
abnormalPics
[]
'
,
val
.
file
)
formData
.
append
(
'
file
[]
'
,
val
.
file
)
})
}
else
{
formData
.
append
(
key
,
config
[
key
]);
...
...
@@ -99,7 +139,12 @@ export default {
},
onSubmit
()
{
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
postFun
(
'
/risk/currentRiskAbnormal/save
'
,
formDataJson
)
postFun
(
'
/risk/currentRiskAbnormal/save
'
,
formDataJson
).
then
(
res
=>
{
this
.
cancel
()
})
},
cancel
()
{
this
.
$router
.
go
(
-
1
)
}
},
};
...
...
src/views/riskPatrol/patrolExecute/implement.vue
View file @
9e33fff9
This diff is collapsed.
Click to expand it.
src/views/riskPatrol/patrolExecute/index.vue
View file @
9e33fff9
...
...
@@ -41,17 +41,18 @@ export default {
return
{
text
:
'
巡查执行
'
,
nowTime
:
""
,
projectId
:
''
,
contentList
:
[
],
contentLists
:
[
{
title
:
"
1
"
,
title
:
"
0
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/day_list.png
"
),
content
:
"
日查清单
"
},
{
title
:
"
2
"
,
title
:
"
1
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/week_list.png
"
),
content
:
"
周查清单
"
},
...
...
@@ -61,12 +62,12 @@ export default {
content
:
"
半月查清单
"
},
{
title
:
"
4
"
,
title
:
"
2
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/month_list.png
"
),
content
:
"
月查清单
"
},
{
title
:
"
5
"
,
title
:
"
3
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/quarter_list.png
"
),
content
:
"
季查清单
"
},
...
...
@@ -76,7 +77,7 @@ export default {
content
:
"
半年查清单
"
},
{
title
:
"
7
"
,
title
:
"
4
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/year_list.png
"
),
content
:
"
年查清单
"
}
...
...
@@ -89,14 +90,13 @@ export default {
mounted
()
{
this
.
nowTime
=
timestampToTime
(
new
Date
(),
"
DT7
"
,
true
);
this
.
getProjectId
()
// this.loading()
},
methods
:
{
loading
()
{
let
userInfoData
=
JSON
.
parse
(
localStorage
.
getItem
(
'
LocalUserInfo
'
))
console
.
log
(
'
userInfoData==>>
'
,
userInfoData
.
userId
)
let
params
=
{
// userId: userInfoData.userId,
userId
:
userInfoData
.
userId
,
projectId
:
this
.
projectId
,
status
:
'
0
'
}
getFun
(
"
risk/riskUserPatrol/list
"
,
params
).
then
((
res
)
=>
{
...
...
@@ -109,7 +109,6 @@ export default {
}
})
})
console
.
log
(
this
.
contentList
)
// this.contentList.forEach((x)=>{
// res.data.forEach((y)=>{
// if(x.title==y.cycle){
...
...
@@ -120,19 +119,20 @@ export default {
})
},
onClick
(
val
)
{
console
.
log
(
val
)
sessionStorage
.
removeItem
(
'
type
'
)
this
.
$router
.
push
({
name
:
"
implement
"
,
query
:
{
id
:
val
.
title
,
id
:
this
.
projectId
,
content
:
val
.
content
}
});
},
getProjectId
()
{
getFun
(
'
/risk/riskUserPatrol/getPatrolProjectList
'
).
then
(
res
=>
{
const
project
=
res
.
data
.
length
&&
res
.
data
[
0
]
this
.
projectId
=
project
.
id
;
this
.
loading
()
})
}
},
...
...
src/views/riskPatrol/patrolLog/index.vue
View file @
9e33fff9
...
...
@@ -5,21 +5,24 @@
</van-sticky>
<div
class=
"con-list"
>
<van-pull-refresh
@
refresh=
"onRefresh"
>
<van-list
finished-text=
"没有更多了"
@
load=
"onLoad()
"
>
<van-pull-refresh
v-model=
"refreshing"
@
refresh=
"onRefresh"
>
<van-list
v-model=
"loading"
:finished=
"finished"
@
load=
"onLoad
"
>
<div
v-for=
"(child, index) in group"
:key=
"index"
>
<van-row
gutter
class=
"con_tip"
>
<van-col
span=
"12"
class=
"con_type"
>
{{
child
.
t
ime
}}
{{
child
.
startT
ime
}}
</van-col>
<van-col
span=
"12"
class=
"cont-end"
>
已执行
</van-col>
</van-row>
<van-cell-group
inset
v-for=
"item in child.list"
:key=
"item.job"
>
<van-row
gutter
>
<van-col
span=
"24"
>
岗
位:
{{
item
.
job
}}
</van-col>
<van-row><van-col
span=
"18"
>
巡查频次:
{{
item
.
time
}}
</van-col><van-col
span=
"6"
class=
"con_right"
@
click=
"() => $router.push('/patrolLog/logDetail')"
>
查看详情
</van-col></van-row>
<van-col
span=
"24"
>
上报异常:
{{
item
.
count
}}
</van-col>
<van-cell-group
inset
>
<van-row
gutter
type=
"flex"
justify=
"center"
align=
"center"
>
<van-col
span=
"18"
>
<van-col>
项目名称:
{{
child
.
projectName
}}
</van-col>
<van-col
span=
"24"
>
岗
位:
{{
child
.
riskPostName
}}
</van-col>
<van-col
span=
"24"
>
巡查类型:
{{
patrolTypeList
[
child
.
patrolType
]
}}
</van-col>
<van-col
span=
"24"
v-if=
"child.exceptStatus == 1"
>
上报异常:1
</van-col>
</van-col><van-col
span=
"6"
class=
"con_right"
@
click=
"() => $router.push(
{ path: '/patrolLog/logDetail', query: { id: child.id } })">查看详情
</van-col>
</van-row>
</van-cell-group>
</div>
...
...
@@ -31,6 +34,7 @@
<
script
type=
"text/ecmascript-6"
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
'
patrolLog
'
,
//巡查记录
components
:
{
...
...
@@ -42,37 +46,15 @@ export default {
data
()
{
return
{
text
:
'
巡查记录
'
,
group
:
[
{
time
:
'
2023年7月8日
'
,
list
:
[{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},]
}
]
loading
:
false
,
finished
:
false
,
patrolTypeList
:
[
'
日查
'
,
'
周查
'
,
'
月查
'
,
'
年查
'
],
group
:
[],
pages
:
{
current
:
0
},
refreshing
:
false
,
total
:
0
}
},
computed
:
{
...
...
@@ -85,10 +67,36 @@ export default {
},
mounted
()
{
},
methods
:
{
onRefresh
()
{
this
.
pages
.
current
=
1
;
this
.
group
=
[]
this
.
getData
()
},
//上拉页面加载数据
onLoad
()
{
if
(
this
.
total
<=
this
.
group
.
length
)
{
this
.
finished
=
true
}
this
.
pages
.
current
+=
1
;
setTimeout
(()
=>
{
this
.
getData
();
},
1000
)
},
getData
()
{
this
.
loading
=
true
;
let
userInfoData
=
JSON
.
parse
(
localStorage
.
getItem
(
'
LocalUserInfo
'
))
getFun
(
'
/risk/riskUserPatrol/list
'
,
{
userId
:
userInfoData
.
userId
,
...
this
.
pages
}).
then
(
res
=>
{
this
.
group
=
this
.
group
.
concat
(
res
.
rows
);
this
.
refreshing
=
false
;
this
.
loading
=
false
;
this
.
total
=
!
this
.
total
&&
res
.
total
;
})
}
},
}
</
script
>
...
...
src/views/riskPatrol/patrolLog/logDetail.vue
View file @
9e33fff9
<
template
>
<div
class=
"wrap"
>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
class=
"con-list"
>
<van-pull-refresh
@
refresh=
"onRefresh"
>
<van-list
finished-text=
"没有更多了"
@
load=
"onLoad()"
>
<van-cell-group
inset
v-for=
"item in list"
:key=
"item.job"
>
<van-row
gutter
>
<van-col
span=
"24"
>
岗
位:
{{
item
.
job
}}
</van-col>
<van-col
span=
"24"
>
巡查频次:
{{
item
.
time
}}
</van-col>
<van-col
span=
"24"
>
上报异常:
{{
item
.
count
}}
</van-col>
</van-row>
</van-cell-group>
</van-list>
</van-pull-refresh>
</div>
<div>
<LHeader
:text=
"text"
></LHeader>
<van-form
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<div
class=
"title"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
基本信息
</div>
<div>
<van-field
label=
"项目名称"
>
<template
#input
>
<van-field
readonly
v-model=
"form.projectName"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"风险因素"
>
<
template
#input
>
<van-field
readonly
v-model=
"form.factor"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"风险类型"
>
<
template
#input
>
<van-field
readonly
v-model=
"form.type"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"风险等级"
>
<
template
#input
>
<van-field
readonly
v-model=
"form.level"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"管控措施"
>
<
template
#input
>
<van-field
readonly
v-model=
"form.measuresProject"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"岗位"
>
<
template
#input
>
<van-field
readonly
v-model=
"form.riskPostName"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<van-field
label=
"巡查类型"
>
<
template
#input
>
<van-field
readonly
:value=
"patrolTypeList[form.patrolType]"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
</div>
<div
class=
"title"
v-if=
"form.exceptStatus == 1"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
巡查地点
</div>
<van-field
label=
"巡查地点"
>
<
template
#input
>
<van-field
v-model=
"form.currentailAbnormal.riskLocation"
name=
"abnormalDesc"
label=
""
autosize
placeholder=
"请输入"
style=
"padding: 0"
/>
</
template
>
</van-field>
<div
class=
"list"
v-if=
"form.exceptStatus == 1"
>
<div
class=
"title"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
异常上报
</div>
<van-field
name=
"hdPicture1"
label=
"异常照片"
>
<
template
#input
>
<div>
<img
v-for=
"item in form.currentailAbnormal.abnormalPics"
:src=
"item.filePath"
:key=
"item.fileId"
alt=
""
>
</div>
</
template
>
</van-field>
<van-field
label=
"异常说明"
>
<
template
#input
>
<van-field
readonly
v-model=
"form.currentailAbnormal.abnormalDesc"
name=
"abnormalDesc"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</van-field>
<van-field
readonly
v-model=
"form.currentailAbnormal.assessmentLevel"
name=
"assessmentLevel"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
/>
</div>
</van-form>
</div>
</template>
<
script
type=
"text/ecmascript-6"
>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
'
patrolLog
'
,
//巡查记录
name
:
"
logDetail
"
,
components
:
{
LHeader
,
},
props
:
{
},
data
()
{
return
{
text
:
'
记录详情
'
,
list
:
[{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},]
}
},
computed
:
{
},
watch
:
{
},
created
()
{
form
:
{
},
text
:
"
巡查详情
"
,
id
:
''
,
patrolTypeList
:
[
'
日查
'
,
'
周查
'
,
'
月查
'
,
'
年查
'
],
};
},
mounted
()
{
if
(
!
this
.
$route
.
query
.
id
)
{
this
.
$router
.
go
(
-
1
)
}
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
getData
()
},
methods
:
{
getData
()
{
getFun
(
'
/risk/riskUserPatrol/patrolInfoDetail/
'
+
this
.
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
})
}
},
}
}
;
</
script
>
<
style
lang=
"less"
scoped
>
.title {
height: 1rem;
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
font-weight: 700;
line-height: 1rem;
.title-img {
position: relative;
top: 32%;
transform: translateY(-50%)
}
}
<
style
scoped
lang=
'less'
>
.wrap {
height: 100vh;
width: 100vw;
.content {
background: #fff;
padding: 14px 20px;
line-height: 21px;
font-size: 14px;
}
.content-upload {
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
/* @import url(); 引入css类 */
.con-list {
padding: 0;
background-color: #f0f1f5;
padding: 0.2rem 0.4rem;
.van-cell-group--inset {
margin: 0;
...
...
@@ -94,51 +161,34 @@ export default {
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius:
10px
;
border-radius:
4%
;
box-shadow: 0px 0px 10px 2px #f3f3f3;
margin: 0 auto 0.4rem;
width: 90%;
margin: 0.4rem auto;
&>
.van-row {
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
padding: 0 0.2rem;
.con_right {
display: flex;
justify-content: flex-end;
color: #05a7f0;
}
}
.van-overlay {
position: absolute;
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.con_tip {
font-size: 0.4rem;
margin-bottom: 0.2rem;
padding: 0 0.3rem;
.con_type {
color: #a1a1a1;
padding-right: 10px;
}
.cont-end {
display: flex;
justify-content: flex-end;
color: #a1a1a1;
padding-right: 0;
}
}
.dialogContain {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
}
</
style
>
src/views/riskPatrol/patrolLog/logDetail1.vue
0 → 100644
View file @
9e33fff9
<
template
>
<div
class=
"wrap"
>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
class=
"con-list"
>
<van-pull-refresh
@
refresh=
"onRefresh"
>
<van-list
finished-text=
"没有更多了"
@
load=
"onLoad()"
>
<van-cell-group
inset
v-for=
"item in list"
:key=
"item.job"
>
<van-row
gutter
>
<van-col
span=
"24"
>
岗
位:
{{
item
.
job
}}
</van-col>
<van-col
span=
"24"
>
巡查频次:
{{
item
.
time
}}
</van-col>
<van-col
span=
"24"
>
上报异常:
{{
item
.
count
}}
</van-col>
</van-row>
</van-cell-group>
</van-list>
</van-pull-refresh>
</div>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
name
:
'
patrolLog
'
,
//巡查记录
components
:
{
LHeader
,
},
props
:
{
},
data
()
{
return
{
text
:
'
记录详情
'
,
list
:
[{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},
{
name
:
'
电工
'
,
job
:
'
专职巡查人员
'
,
time
:
'
日查
'
,
count
:
1
},]
}
},
computed
:
{
},
watch
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
},
}
</
script
>
<
style
scoped
lang=
'less'
>
.wrap {
height: 100vh;
width: 100vw;
}
.con-list {
background-color: #f0f1f5;
padding: 0.2rem 0.4rem;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius: 10px;
box-shadow: 0px 0px 10px 2px #f3f3f3;
margin: 0 auto 0.4rem;
&>.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
padding: 0 0.2rem;
.con_right {
display: flex;
justify-content: flex-end;
color: #05a7f0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.con_tip {
font-size: 0.4rem;
margin-bottom: 0.2rem;
padding: 0 0.3rem;
.con_type {
color: #a1a1a1;
padding-right: 10px;
}
.cont-end {
display: flex;
justify-content: flex-end;
color: #a1a1a1;
padding-right: 0;
}
}
}
</
style
>
src/views/riskProject/add/taskList.vue
View file @
9e33fff9
...
...
@@ -69,13 +69,13 @@
input-align=
"right"
:rules=
"[
{ required: true, message: '评估成员不能为空' }]" />
<van-field
v-model=
"form.startTime"
readonly
name=
"location"
label=
"任务开始时间"
input-align=
"right"
:formatter=
"() =>
{
return timestampToTimes(form.startTime, 'DT2');
}
return timestampToTimes(form.startTime, 'DT2');
}
" :rules="[{ required: true, message: '任务开始时间不能为空' }]" />
<van-field
v-model=
"form.endTime"
readonly
name=
"location"
label=
"任务结束时间"
:formatter=
"() =>
{
return timestampToTimes(form.endTime, 'DT2');
}
return timestampToTimes(form.endTime, 'DT2');
}
" input-align="right" :rules="[{ required: true, message: '任务结束时间不能为空' }]" />
</van-form>
</van-tab>
...
...
@@ -99,12 +99,12 @@
<van-col>
<van-image
style=
"vertical-align: middle;margin-right: 15px;margin-left: 10px;"
width=
"58"
height=
"58"
:src=
"item.level == '重大风险'
? require('@/assets/imgs/redInherent.png')
: item.level == '较大风险'
? require('@/assets/imgs/inherentOrange.png')
: item.level === '一般风险'
? require('@/assets/imgs/yellowInherent.png')
: require('@/assets/imgs/blueInherent.png')
? require('@/assets/imgs/redInherent.png')
: item.level == '较大风险'
? require('@/assets/imgs/inherentOrange.png')
: item.level === '一般风险'
? require('@/assets/imgs/yellowInherent.png')
: require('@/assets/imgs/blueInherent.png')
"
/>
<!--
<van-image
width=
"46"
height=
"46"
:src=
"item.avatar"
/>
-->
</van-col>
...
...
@@ -342,7 +342,7 @@
<van-col
span=
"6"
>
<van-row>
<van-button
type=
"info"
size=
"mini"
@
click=
"
{
{
checkValue = [item.buildingId];
approveTask(0);
}
...
...
@@ -362,7 +362,7 @@
position: fixed;
bottom: 0;"
>
<div
@
click=
"
{
{
checkValue = [];
isShowAppvoreList = false;
}
...
...
@@ -395,7 +395,7 @@ import LHeader from "@/components/header.vue";
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
"
risk
-confirme
"
,
name
:
"
risk
TaskList
"
,
components
:
{
LHeader
},
...
...
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