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
319bec6e
Commit
319bec6e
authored
Jun 29, 2023
by
胡占生
🇨🇳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 现状风险列表,新增现状列表接口联调对接
parent
1ef2a6d0
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1180 additions
and
278 deletions
+1180
-278
src/router/index.js
src/router/index.js
+5
-0
src/views/riskProject/add/addCurrent.vue
src/views/riskProject/add/addCurrent.vue
+817
-0
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+232
-202
src/views/riskProject/add/inherentRisks.vue
src/views/riskProject/add/inherentRisks.vue
+115
-70
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+11
-6
No files found.
src/router/index.js
View file @
319bec6e
...
...
@@ -156,6 +156,11 @@ const routes = [{
name
:
'
addInherent
'
,
component
:
()
=>
import
(
'
../views/riskProject/add/addInherent.vue
'
),
},
{
path
:
'
/addCurrent
'
,
name
:
'
addCurrent
'
,
component
:
()
=>
import
(
'
../views/riskProject/add/addCurrent.vue
'
),
},
]
const
router
=
new
VueRouter
({
...
...
src/views/riskProject/add/addCurrent.vue
0 → 100644
View file @
319bec6e
This diff is collapsed.
Click to expand it.
src/views/riskProject/add/addInherent.vue
View file @
319bec6e
This diff is collapsed.
Click to expand it.
src/views/riskProject/add/inherentRisks.vue
View file @
319bec6e
...
...
@@ -7,18 +7,17 @@
<div
style=
"margin-bottom: 1.5rem;"
>
<van-tabs
v-model=
"active"
@
change=
"postList(searchValue);showIndex = null;
"
@
change=
"tabList
"
color=
"#2980f7"
animated
>
<van-tab
v-for=
"
index in 8"
:title=
"index + '号楼'"
:key=
"index
"
>
<van-tab
v-for=
"
(item) in riskLogList"
:title=
"item.name"
:name=
"item.id"
:key=
"item.id
"
>
<van-dropdown-menu
z-index=
"1000"
>
<van-dropdown-item
v-model=
"value1"
:options=
"option1"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value2"
:options=
"option2"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value1"
@
change=
"changeFloor"
:options=
"option1"
get-container=
"body"
/>
<van-dropdown-item
v-model=
"value2"
@
change=
"changeRoom"
:options=
"option2"
get-container=
"body"
/>
</van-dropdown-menu>
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
<van-cell-group
inset
...
...
@@ -32,15 +31,15 @@
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{
item
.
t
ime
}}
</van-col>
<van-col
span=
"15"
>
{{
item
.
createT
ime
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
楼层:
</van-col>
<van-col
span=
"15"
>
{{
item
.
n
ame
}}
</van-col>
<van-col
span=
"15"
>
{{
item
.
floorN
ame
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
房间:
</van-col>
<van-col
span=
"15"
>
{{
item
.
n
ame
}}
</van-col>
<van-col
span=
"15"
>
{{
item
.
roomN
ame
}}
</van-col>
</van-row>
</van-col>
<van-col
span=
"7"
:style=
"
{'color':item.state == 1 ? '#0069e5':'#03b615'}">
...
...
@@ -93,44 +92,17 @@
return
{
text
:
"
固有风险列表
"
,
searchValue
:
""
,
value1
:
0
,
value2
:
'
a
'
,
option1
:
[
{
text
:
'
楼层
'
,
value
:
0
},
{
text
:
'
新款商品
'
,
value
:
1
},
{
text
:
'
活动商品
'
,
value
:
2
},
],
option2
:
[
{
text
:
'
房间
'
,
value
:
'
a
'
},
{
text
:
'
好评排序
'
,
value
:
'
b
'
},
{
text
:
'
销量排序
'
,
value
:
'
c
'
},
],
planId
:
0
,
value1
:
1
,
value2
:
1
,
option1
:
[],
option2
:
[],
isHaveNews
:
false
,
messageList
:
[
{
title
:
'
回显风险源名称
'
,
time
:
'
2022-12-12
'
,
name
:
'
Mr.周
'
,
state
:
1
}
],
riskLogList
:[
{
completedTime
:
'
审批通过
'
,
startTime
:
'
2022-12-12
'
,
approvalUserName
:
'
Mr.周
'
,
taskName
:
'
审批负责人
'
},
{
completedTime
:
'
审批通过
'
,
startTime
:
'
2022-12-12
'
,
approvalUserName
:
'
Mr.周
'
,
taskName
:
'
审批负责人
'
},
],
messageList
:
[],
riskLogList
:[],
Loop
:
""
,
// 定时器
showIndex
:
null
,
// 是否显示遮罩层,
active
:
0
,
active
:
1
,
form
:{
},
...
...
@@ -139,14 +111,29 @@
};
},
created
()
{
// this.postList();s
this
.
planId
=
this
.
$route
.
params
.
id
this
.
getRiskList
(
this
.
planId
);
// this.postList();
},
methods
:
{
changeData
(
arr
){
var
arrList
=
[]
arr
.
forEach
(
item
=>
{
arrList
.
push
(
{
text
:
item
.
name
,
value
:
item
.
id
}
)
})
return
arrList
},
performTasks
(){
this
.
$router
.
push
({
name
:
"
addInherent
"
,
params
:
{
title
:
'
新增
'
id
:
this
.
active
,
planId
:
this
.
planId
},
})
},
...
...
@@ -158,30 +145,87 @@
},
})
},
postList
(
select
=
""
)
{
buildingList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/plan/building/list/
${
id
}
`
).
then
((
res
)
=>
{
this
.
riskLogList
=
res
.
data
||
res
.
rows
;
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
floorList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/floor/list/
${
id
}
`
).
then
((
res
)
=>
{
this
.
option1
=
this
.
changeData
(
res
.
data
)
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
roomList
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getFun
(
`/risk/plan/room/list/
${
id
}
`
).
then
((
res
)
=>
{
this
.
option2
=
this
.
changeData
(
res
.
data
)
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
riskList
(
planId
,
buildingId
,
floorId
,
roomId
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
paramsJson
=
{}
if
(
floorId
||
roomId
){
paramsJson
=
{
floorId
,
roomId
}
}
else
{
paramsJson
=
{}
}
getFun
(
`/risk/plan/inherent/list/
${
planId
}
/
${
buildingId
}
`
,
paramsJson
).
then
((
res
)
=>
{
this
.
messageList
=
res
.
data
resolve
(
res
.
data
)
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
})
},
async
getRiskList
(
id
){
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
let
formdata
=
new
FormData
();
formdata
.
append
(
"
select
"
,
select
);
postFun
(
this
.
tabs
[
this
.
active
][
'
api
'
],
formdata
)
.
then
((
res
)
=>
{
let
building
=
await
this
.
buildingList
(
id
)
let
floor
=
await
this
.
floorList
(
building
[
0
].
id
)
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
)
let
risk
=
await
this
.
riskList
(
id
,
building
[
0
].
id
)
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
// 判断有无数据返回
if
(
this
.
messageList
.
length
==
0
)
{
this
.
isHaveNews
=
true
;
}
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
async
tabList
(
value
){
let
floor
=
await
this
.
floorList
(
value
)
let
room
=
await
this
.
roomList
(
floor
[
0
].
id
)
let
risk
=
await
this
.
riskList
(
this
.
planId
,
value
)
},
async
changeFloor
(){
let
room
=
await
this
.
roomList
(
this
.
value1
)
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
active
,
this
.
value1
)
},
async
changeRoom
(){
let
risk
=
await
this
.
riskList
(
this
.
planId
,
this
.
active
,
this
.
value1
,
this
.
value2
)
},
onSearch
(
val
)
{
this
.
postList
(
this
.
searchValue
);
},
...
...
@@ -266,6 +310,7 @@
}
.con-list {
padding: 0;
min-height: 10rem;
background-color: #f0f1f5;
.van-cell-group--inset {
margin: 0;
...
...
src/views/riskProject/add/taskList.vue
View file @
319bec6e
...
...
@@ -102,6 +102,9 @@
name=
"location"
label=
"任务开始时间"
input-align=
"right"
:formatter=
"()=>
{
return timestampToTimes(form.startTime)
}"
:rules="[{ required: true, message: '任务开始时间不能为空' }]"
/>
...
...
@@ -110,6 +113,9 @@
readonly
name=
"location"
label=
"任务结束时间"
:formatter=
"()=>
{
return timestampToTimes(form.endTime)
}"
input-align="right"
:rules="[{ required: true, message: '任务结束时间不能为空' }]"
/>
...
...
@@ -136,7 +142,7 @@
<div
class=
"step-wrap"
>
<van-row>
<van-col
span=
"24"
><div
class=
"info-title"
>
{{
item
.
startTime
}}
</div></van-col
><div
class=
"info-title"
>
{{
timestampToTimes
(
item
.
startTime
)
}}
</div></van-col
>
</van-row>
<van-row>
...
...
@@ -149,13 +155,13 @@
<van-col
span=
"7"
><span
class=
"field-title"
>
审批结果:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
completedTi
me
}}
</van-col>
<van-col
span=
"17"
>
{{
item
.
taskNa
me
}}
</van-col>
</van-row>
<van-row>
<van-col
span=
"7"
><span
class=
"field-title"
>
岗位:
</span></van-col
>
<van-col
span=
"17"
>
{{
item
.
task
Name
}}
</van-col>
<van-col
span=
"17"
>
{{
item
.
task
Result
}}
</van-col>
</van-row>
<!--
<van-row>
<van-col
span=
"7"
...
...
@@ -265,7 +271,7 @@
this
.
$router
.
push
({
name
:
"
riskInherent
"
,
params
:
{
title
:
'
新增
'
id
:
this
.
messageList
.
id
},
})
},
...
...
@@ -286,11 +292,10 @@
});
getFun
(
`/risk/plan/details/
${
id
}
`
)
.
then
((
res
)
=>
{
console
.
log
(
'
%c [ res ]-309
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
res
)
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
data
||
res
.
rows
;
this
.
form
=
this
.
messageList
.
detailsDto
console
.
log
(
'
%c [ messageList ]-292
'
,
'
font-size:13px; background:pink; color:#bf2c9f;
'
,
this
.
messageList
)
this
.
riskLogList
=
this
.
messageList
.
approveListDtos
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
...
...
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