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
26cd1e8f
Commit
26cd1e8f
authored
Oct 30, 2021
by
王李辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上报风险源可以多选
parent
e616b47d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
82 deletions
+135
-82
src/App.vue
src/App.vue
+1
-1
src/views/danger/addDanger/addDanger.vue
src/views/danger/addDanger/addDanger.vue
+130
-80
src/views/danger/confirmeDanger/confirmeDanger.vue
src/views/danger/confirmeDanger/confirmeDanger.vue
+1
-0
src/views/risk/riskAdd/index.vue
src/views/risk/riskAdd/index.vue
+3
-1
No files found.
src/App.vue
View file @
26cd1e8f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
data
()
{
data
()
{
return
{
return
{
transitionName
:
'
slide-left
'
,
transitionName
:
'
slide-left
'
,
cachePage
:[
"
change-info
"
,
"
affirm-danger
"
,
"
risk-affirm
"
,
"
manager-survey
"
,
"
super-survey
"
,
"
major-survey
"
]
cachePage
:[
"
add-danger
"
,
"
change-info
"
,
"
affirm-danger
"
,
"
risk-affirm
"
,
"
manager-survey
"
,
"
super-survey
"
,
"
major-survey
"
]
}
}
},
},
watch
:
{
watch
:
{
...
...
src/views/danger/addDanger/addDanger.vue
View file @
26cd1e8f
...
@@ -143,8 +143,7 @@
...
@@ -143,8 +143,7 @@
@
click=
"showSource = true"
@
click=
"showSource = true"
:rules=
"[
{ required: true, message: '风险源不能为空' }]"
:rules=
"[
{ required: true, message: '风险源不能为空' }]"
/>
/>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-popup
v-model=
"showSource"
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
...
@@ -155,19 +154,18 @@
...
@@ -155,19 +154,18 @@
/>
/>
</van-popup>
</van-popup>
<van-field
<
!--
<
van-field
readonly
readonly
clickable
clickable
name=
"dangerSource"
name=
"dangerSource"
:value=
"source1"
:value=
"source1"
label=
" "
label=
" "
@
click=
"showSource1 = true"
@
click=
"showSource1 = true"
placeholder=
"请选择"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险源不能为空' }]"
:rules=
"[
{ required: true, message: '风险源不能为空' }]"
/>
/>
<!-- @click="goSelectTwo" -->
<van-popup
v-model=
"showSource1"
position=
"bottom"
>
<van-popup
v-model=
"showSource1"
position=
"bottom"
>
<van-picker
<van-picker
show-toolbar
show-toolbar
value-key=
"riskSource"
value-key=
"riskSource"
...
@@ -175,7 +173,20 @@
...
@@ -175,7 +173,20 @@
@
confirm=
"onConSource1"
@
confirm=
"onConSource1"
@
cancel=
"showSource1 = false"
@
cancel=
"showSource1 = false"
/>
/>
</van-popup>
</van-popup>
-->
<van-field
v-model=
"source1"
readonly
rows=
"3"
autosize
label=
" "
name=
"dangerSource"
type=
"textarea"
@
click=
"goSelectTwo"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '隐患描述不能为空' }]"
/>
<van-field
<van-field
v-model=
"location"
v-model=
"location"
...
@@ -195,10 +206,7 @@
...
@@ -195,10 +206,7 @@
:rules=
"[
{ required: true, message: '隐患描述不能为空' }]"
:rules=
"[
{ required: true, message: '隐患描述不能为空' }]"
/>
/>
<van-field
<van-field
name=
"hdPicture1"
label=
"隐患照片"
>
name=
"hdPicture1"
label=
"隐患照片"
>
<template
#input
>
<template
#input
>
<van-uploader
v-model=
"uploaderImg"
/>
<van-uploader
v-model=
"uploaderImg"
/>
</
template
>
</
template
>
...
@@ -270,25 +278,73 @@ import {
...
@@ -270,25 +278,73 @@ import {
postHdRiskSource
,
postHdRiskSource
,
postHdShowPeople
,
postHdShowPeople
,
postHdReportAdd
,
postHdReportAdd
,
dangerReturnEcho
,
dangerReturnEcho
}
from
"
@/service/danger
"
;
}
from
"
@/service/danger
"
;
export
default
{
export
default
{
name
:
"
add-danger
"
,
components
:
{
components
:
{
LHeader
LHeader
},
},
cre
ated
()
{
activ
ated
()
{
this
.
taskId
=
this
.
$route
.
params
.
taskId
this
.
taskId
=
this
.
$route
.
params
.
taskId
;
if
(
this
.
taskId
)
{
if
(
this
.
taskId
)
{
this
.
isShowreturnCause
=
true
;
this
.
isShowreturnCause
=
true
;
this
.
text
=
"
隐患上报退回
"
;
this
.
text
=
"
隐患上报退回
"
;
this
.
postReturnEcho
()
this
.
postReturnEcho
()
;
}
}
this
.
getList
();
this
.
getList
();
this
.
$bus
.
$on
(
"
sourceAyy
"
,
res
=>
{
console
.
log
(
res
.
join
(
"
,
"
));
this
.
source1
=
res
.
join
(
"
,
"
);
});
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
((
to
.
name
!=
"
choose-people
"
))
{
// 如果去的路由是
this
.
projectId
=
""
;
// 所属工程
this
.
taskId
=
""
;
this
.
projectName
=
""
;
this
.
showProjectName
=
false
;
this
.
columnsProjectName
=
[];
this
.
range
=
""
;
//适用范围
this
.
showRange
=
false
;
this
.
columnsRange
=
[];
this
.
type
=
""
;
//隐患类型
this
.
showType
=
false
;
this
.
columnsType
=
[];
this
.
dangerName
=
""
;
//隐患项目名称
this
.
showDangerName
=
false
;
this
.
columnsDangerName
=
[];
this
.
dangerNum
=
""
;
//隐患项目编号
this
.
dangerLevel
=
""
;
//隐患项目级别
this
.
findTime
=
""
;
//隐患发现时间
this
.
showFindTime
=
false
;
this
.
source
=
""
;
// 风险源
this
.
showSource
=
false
;
this
.
columnsSource
=
[];
this
.
source1
=
""
;
// 风险源第二个字段
this
.
showSource1
=
false
;
this
.
columnsSource1
=
[];
this
.
location
=
""
;
// 检查部位
this
.
describe
=
""
;
// 隐患描述
this
.
uploaderImg
=
[];
//图像上传
this
.
uploaderVideo
=
[];
//视频上传
this
.
expireTime
=
""
;
// 隐患到期时间
this
.
showExpireTime
=
false
;
this
.
recPeople
=
""
;
this
.
showRecPeople
=
false
;
this
.
columnsRecPeople
=
[];
this
.
isShowreturnCause
=
false
;
this
.
returnCause
=
""
;
// 退回原因
}
next
();
},
},
data
()
{
data
()
{
return
{
return
{
text
:
"
新增隐患
"
,
text
:
"
新增隐患
"
,
taskId
:
""
,
taskId
:
""
,
projectId
:
""
,
// 所属工程
projectId
:
""
,
// 所属工程
projectName
:
""
,
projectName
:
""
,
showProjectName
:
false
,
showProjectName
:
false
,
...
@@ -325,39 +381,35 @@ export default {
...
@@ -325,39 +381,35 @@ export default {
returnCause
:
""
// 退回原因
returnCause
:
""
// 退回原因
};
};
},
},
mounted
(){
this
.
$bus
.
$on
(
"
sourceAyy
"
,
res
=>
{
console
.
log
(
res
.
join
(
"
,
"
));
})
},
methods
:
{
methods
:
{
onSubmit
(
values
)
{
onSubmit
(
values
)
{
console
.
log
(
"
submit
"
,
values
);
console
.
log
(
"
submit
"
,
values
);
let
formdata
=
new
FormData
()
let
formdata
=
new
FormData
()
;
formdata
.
append
(
"
proId
"
,
this
.
projectId
)
formdata
.
append
(
"
proId
"
,
this
.
projectId
)
;
formdata
.
append
(
"
hdRange
"
,
values
.
hdRange
)
formdata
.
append
(
"
hdRange
"
,
values
.
hdRange
)
;
formdata
.
append
(
"
hdType
"
,
values
.
hdType
)
formdata
.
append
(
"
hdType
"
,
values
.
hdType
)
;
formdata
.
append
(
"
hdProjectName
"
,
values
.
hdProjectName
)
formdata
.
append
(
"
hdProjectName
"
,
values
.
hdProjectName
)
;
formdata
.
append
(
"
hdProjectId
"
,
values
.
hdProjectId
)
formdata
.
append
(
"
hdProjectId
"
,
values
.
hdProjectId
)
;
formdata
.
append
(
"
hdLev
"
,
values
.
hdLev
)
formdata
.
append
(
"
hdLev
"
,
values
.
hdLev
);
formdata
.
append
(
"
hdDiscoveryTime
"
,
values
.
hdDiscoveryTime
)
formdata
.
append
(
"
hdDiscoveryTime
"
,
values
.
hdDiscoveryTime
)
;
formdata
.
append
(
"
dangerId
"
,
values
.
dangerId
)
formdata
.
append
(
"
dangerId
"
,
values
.
dangerId
)
;
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
({
message
:
"
提交中...
"
,
message
:
"
提交中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
loadingType
:
"
spinner
"
,
duration
:
0
duration
:
0
});
});
let
url
=
"
/hdreport/add
"
let
url
=
"
/hdreport/add
"
;
if
(
this
.
taskId
)
{
if
(
this
.
taskId
)
{
url
=
`/hdreport/editSave/
${
this
.
taskId
}
`
url
=
`/hdreport/editSave/
${
this
.
taskId
}
`
;
}
}
postHdReportAdd
(
url
,
formdata
)
postHdReportAdd
(
url
,
formdata
)
...
@@ -396,7 +448,7 @@ export default {
...
@@ -396,7 +448,7 @@ export default {
},
},
// 请求已退回详情数据
// 请求已退回详情数据
postReturnEcho
(){
postReturnEcho
()
{
this
.
$toast
.
loading
({
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
message
:
"
加载中...
"
,
forbidClick
:
true
,
forbidClick
:
true
,
...
@@ -406,31 +458,30 @@ export default {
...
@@ -406,31 +458,30 @@ export default {
dangerReturnEcho
(
`/hdreport/edit/
${
this
.
taskId
}
`
)
dangerReturnEcho
(
`/hdreport/edit/
${
this
.
taskId
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
let
msg
=
res
.
data
.
hdReport
let
msg
=
res
.
data
.
hdReport
;
// 对数据进行赋值
// 对数据进行赋值
this
.
returnCause
=
res
.
data
.
reason
;
this
.
returnCause
=
res
.
data
.
reason
;
this
.
projectId
=
msg
.
proId
;
this
.
projectId
=
msg
.
proId
;
// 对所属工程数组筛选出 相同id 的工程名
// 对所属工程数组筛选出 相同id 的工程名
let
name
=
this
.
columnsProjectName
.
filter
(
item
=>
{
let
name
=
this
.
columnsProjectName
.
filter
(
item
=>
{
return
item
.
id
==
msg
.
proId
return
item
.
id
==
msg
.
proId
;
})
});
this
.
projectName
=
name
[
0
].
projectName
this
.
projectName
=
name
[
0
].
projectName
;
this
.
range
=
msg
.
hdRange
this
.
range
=
msg
.
hdRange
;
this
.
type
=
msg
.
hdType
this
.
type
=
msg
.
hdType
;
this
.
dangerName
=
msg
.
hdProjectName
this
.
dangerName
=
msg
.
hdProjectName
;
this
.
dangerNum
=
msg
.
hdProjectId
this
.
dangerNum
=
msg
.
hdProjectId
;
this
.
dangerLevel
=
msg
.
hdLev
this
.
dangerLevel
=
msg
.
hdLev
;
this
.
findTime
=
msg
.
hdDiscoveryTime
this
.
source
=
msg
.
dangerId
this
.
source1
=
msg
.
dangerSource
this
.
location
=
msg
.
hdPosition
this
.
describe
=
msg
.
hdDescribe
this
.
hdPicture1
=
msg
.
hdPicture1
this
.
hdVideo1
=
msg
.
hdVideo1
this
.
expireTime
=
msg
.
hdExpirationTime
this
.
recPeople
=
msg
.
rectificationUser
this
.
findTime
=
msg
.
hdDiscoveryTime
;
this
.
source
=
msg
.
dangerId
;
this
.
source1
=
msg
.
dangerSource
;
this
.
location
=
msg
.
hdPosition
;
this
.
describe
=
msg
.
hdDescribe
;
this
.
hdPicture1
=
msg
.
hdPicture1
;
this
.
hdVideo1
=
msg
.
hdVideo1
;
this
.
expireTime
=
msg
.
hdExpirationTime
;
this
.
recPeople
=
msg
.
rectificationUser
;
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
clear
();
...
@@ -452,10 +503,10 @@ export default {
...
@@ -452,10 +503,10 @@ export default {
onConRange
(
value
)
{
onConRange
(
value
)
{
this
.
range
=
value
.
hdRange
;
this
.
range
=
value
.
hdRange
;
this
.
showRange
=
false
;
this
.
showRange
=
false
;
this
.
type
=
""
this
.
type
=
""
;
this
.
dangerName
=
""
this
.
dangerName
=
""
;
this
.
dangerNum
=
""
this
.
dangerNum
=
""
;
this
.
dangerLevel
=
""
this
.
dangerLevel
=
""
;
// 去请求隐患类型的数据
// 去请求隐患类型的数据
postHdTyp
(
`/hdreport/showHdType/
${
this
.
range
}
`
).
then
(
res
=>
{
postHdTyp
(
`/hdreport/showHdType/
${
this
.
range
}
`
).
then
(
res
=>
{
this
.
columnsType
=
res
.
data
;
this
.
columnsType
=
res
.
data
;
...
@@ -465,9 +516,9 @@ export default {
...
@@ -465,9 +516,9 @@ export default {
onConType
(
value
)
{
onConType
(
value
)
{
this
.
type
=
value
.
hdType
;
this
.
type
=
value
.
hdType
;
this
.
showType
=
false
;
this
.
showType
=
false
;
this
.
dangerName
=
""
this
.
dangerName
=
""
;
this
.
dangerNum
=
""
this
.
dangerNum
=
""
;
this
.
dangerLevel
=
""
this
.
dangerLevel
=
""
;
// 请求隐患项目名称的数据
// 请求隐患项目名称的数据
console
.
log
(
this
.
range
);
console
.
log
(
this
.
range
);
postHdName
(
`/hdreport/showHdName/
${
this
.
range
}
/
${
this
.
type
}
`
).
then
(
postHdName
(
`/hdreport/showHdName/
${
this
.
range
}
/
${
this
.
type
}
`
).
then
(
...
@@ -509,16 +560,16 @@ export default {
...
@@ -509,16 +560,16 @@ export default {
this
.
source1
=
value
.
riskSource
;
this
.
source1
=
value
.
riskSource
;
this
.
showSource1
=
false
;
this
.
showSource1
=
false
;
},
},
goSelectTwo
(){
goSelectTwo
()
{
if
(
this
.
source
)
{
if
(
this
.
source
)
{
// 跳转到多选页面
// 跳转到多选页面
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"
choose-people
"
,
name
:
"
choose-people
"
,
params
:
{
params
:
{
source
:
this
.
source
source
:
this
.
source
}
}
})
});
}
else
{
}
else
{
this
.
$toast
(
"
请先选择风险源
"
);
this
.
$toast
(
"
请先选择风险源
"
);
}
}
},
},
...
@@ -535,8 +586,7 @@ export default {
...
@@ -535,8 +586,7 @@ export default {
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
},
}
}
}
};
};
</
script
>
</
script
>
...
...
src/views/danger/confirmeDanger/confirmeDanger.vue
View file @
26cd1e8f
...
@@ -185,6 +185,7 @@ export default {
...
@@ -185,6 +185,7 @@ export default {
let
paramsData
=
to
.
params
.
data
;
let
paramsData
=
to
.
params
.
data
;
vm
.
taskId
=
paramsData
.
taskId
;
vm
.
taskId
=
paramsData
.
taskId
;
vm
.
messageList
.
push
(
paramsData
);
vm
.
messageList
.
push
(
paramsData
);
vm
.
radio
=
"
1
"
,
vm
.
value
=
""
;
vm
.
value
=
""
;
vm
.
rectId
=
""
;
// 隐患整改人
vm
.
rectId
=
""
;
// 隐患整改人
vm
.
valueRect
=
""
;
vm
.
valueRect
=
""
;
...
...
src/views/risk/riskAdd/index.vue
View file @
26cd1e8f
...
@@ -519,7 +519,9 @@ export default {
...
@@ -519,7 +519,9 @@ export default {
// 自己定义风险等级点击方法
// 自己定义风险等级点击方法
myRiskRank
(){
myRiskRank
(){
console
.
log
(
this
.
setRank
);
console
.
log
(
this
.
setRank
);
if
(
this
.
setRank
==
"
其他定级方式
"
){
if
(
this
.
setRank
==
""
){
this
.
$toast
(
"
请先选择风险源
"
);
}
else
if
(
this
.
setRank
==
"
其他定级方式
"
){
this
.
showRiskRank
=
true
;
this
.
showRiskRank
=
true
;
}
}
},
},
...
...
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