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
cc374d2c
Commit
cc374d2c
authored
Jul 27, 2023
by
p-wanping.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
任务单添加筛选
parent
f6db7daf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
20 deletions
+82
-20
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+80
-18
vue.config.js
vue.config.js
+2
-2
No files found.
src/views/riskProject/add/taskList.vue
View file @
cc374d2c
...
@@ -158,9 +158,10 @@
...
@@ -158,9 +158,10 @@
<van-tab
title=
"风险清单"
>
<van-tab
title=
"风险清单"
>
<van-sticky>
<van-sticky>
<van-dropdown-menu>
<van-dropdown-menu>
<van-dropdown-item
v-model=
"value1"
:options=
"option1"
/>
<van-dropdown-item
v-model=
"buildingFValue"
:options=
"buildingFList"
get-container=
"body"
@
change=
"changeNextList('GroundList','buildingF')"
/>
<!-- 楼栋 -->
<van-dropdown-item
v-model=
"value2"
:options=
"option2"
/>
<van-dropdown-item
v-model=
"groundValue"
:options=
"groundList"
get-container=
"body"
@
change=
"changeNextList('FloorList','ground')"
/>
<!-- 地上地下 -->
<van-dropdown-item
v-model=
"value3"
:options=
"option3"
/>
<van-dropdown-item
v-model=
"floorValue"
:options=
"floorList"
get-container=
"body"
@
change=
"changeNextList('RoomList','floor')"
/>
<!-- 楼层 -->
<van-dropdown-item
v-model=
"roomValue"
:options=
"roomList"
get-container=
"body"
@
change=
"changeNextList('','room')"
/>
<!-- 房间 -->
</van-dropdown-menu>
</van-dropdown-menu>
</van-sticky>
</van-sticky>
<div
style=
"overflow-y: auto;padding: 10px;"
>
<div
style=
"overflow-y: auto;padding: 10px;"
>
...
@@ -599,21 +600,22 @@ export default {
...
@@ -599,21 +600,22 @@ export default {
form
:
{},
form
:
{},
tabs
:
[],
tabs
:
[],
riskList
:
[],
riskList
:
[],
value1
:
0
,
floorValue
:
0
,
value2
:
"
a
"
,
groundValue
:
0
,
value3
:
"
1
"
,
roomValue
:
0
,
option1
:
[
buildingFValue
:
0
,
{
text
:
"
楼栋
"
,
value
:
0
},
buildingFList
:
[
{
text
:
"
全部
"
,
value
:
1
}
{
text
:
"
全部
"
,
value
:
0
}
],
],
option2
:
[
groundList
:
[
{
text
:
"
楼层
"
,
value
:
"
a
"
},
{
text
:
"
全部
"
,
value
:
0
,
children
:[]}
{
text
:
"
全部
"
,
value
:
"
b
"
}
],
floorList
:
[
{
text
:
"
全部
"
,
value
:
0
}
],
roomList
:
[
{
text
:
"
全部
"
,
value
:
0
}
],
],
option3
:
[
{
text
:
"
房间
"
,
value
:
"
1
"
},
{
text
:
"
全部
"
,
value
:
"
2
"
}
]
};
};
},
},
created
()
{
created
()
{
...
@@ -623,11 +625,71 @@ export default {
...
@@ -623,11 +625,71 @@ export default {
this
.
pathAuth
=
sessionStorage
.
getItem
(
"
pathAuth
"
);
this
.
pathAuth
=
sessionStorage
.
getItem
(
"
pathAuth
"
);
this
.
postList
(
this
.
planId
,
buildingId
);
this
.
postList
(
this
.
planId
,
buildingId
);
this
.
getRiskTaskList
(
this
.
planId
,
buildingId
);
this
.
getRiskTaskList
(
this
.
planId
,
buildingId
);
this
.
getBuildingFList
()
},
},
methods
:
{
methods
:
{
timestampToTimes
(
time
,
type
)
{
timestampToTimes
(
time
,
type
)
{
return
timestampToTime
(
new
Date
(
time
),
type
,
true
);
return
timestampToTime
(
new
Date
(
time
),
type
,
true
);
},
},
/* swp add 风险清单筛选 */
changeData
(
arr
)
{
if
(
Array
.
isArray
(
arr
)){
return
arr
.
map
(
item
=>
({
text
:
item
.
name
,
value
:
item
.
id
||
item
.
name
,...
item
}))
}
},
getBuildingFList
(){
getFun
(
`/risk/plan/plan/building/list/
${
this
.
planId
}
`
).
then
(
res
=>
{
const
data
=
res
.
data
;
this
.
buildingFList
=
[{
text
:
"
全部
"
,
value
:
0
},...
this
.
changeData
(
data
)]
})
},
getGroundList
(){
getFun
(
`/risk/plan/floor/list/
${
this
.
buildingFValue
}
`
)
.
then
(
res
=>
{
const
data
=
res
.
data
;
this
.
groundList
=
[{
text
:
"
全部
"
,
value
:
0
,
children
:[]
},...
this
.
changeData
(
data
)]
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
getFloorList
()
{
const
getfloors
=
this
.
groundList
.
find
(
x
=>
x
.
value
===
this
.
groundValue
)
if
(
getfloors
){
this
.
floorList
=
[{
text
:
"
全部
"
,
value
:
0
},...
this
.
changeData
(
getfloors
.
children
)]
}
},
getRoomList
()
{
getFun
(
`/risk/plan/room/list/
${
this
.
floorValue
}
`
)
.
then
(
res
=>
{
const
data
=
res
.
data
;
this
.
roomList
=
[{
text
:
"
全部
"
,
value
:
0
},...
this
.
changeData
(
data
)]
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
/* 切换楼栋,楼层 */
changeNextList
(
needChange
,
from
){
this
.
getRiskTaskList
(
this
.
planId
,
this
.
buildingFValue
||
''
,{
floorId
:
this
.
floorValue
||
''
,
roomId
:
this
.
roomValue
||
''
,
})
/* 清空后面子项 start*/
const
list
=
[
'
buildingF
'
,
'
ground
'
,
'
floor
'
,
'
room
'
];
const
i
=
list
.
indexOf
(
from
);
if
(
i
>-
1
){
list
.
slice
(
i
+
1
).
forEach
(
val
=>
{
this
[
val
+
'
Value
'
]
=
0
;
this
[
val
+
'
List
'
]
=
[{
text
:
"
全部
"
,
value
:
0
}];
})
}
/* 清空后面子项 end*/
needChange
&&
this
[
'
get
'
+
needChange
]()
},
/* swp end 风险清单筛选 */
//执行任务
//执行任务
performTasks
()
{
performTasks
()
{
sessionStorage
.
setItem
(
sessionStorage
.
setItem
(
...
@@ -713,9 +775,9 @@ export default {
...
@@ -713,9 +775,9 @@ export default {
});
});
},
},
//风险清单列表
//风险清单列表
getRiskTaskList
(
planId
,
buildingId
)
{
getRiskTaskList
(
planId
,
buildingId
,
data
)
{
if
(
buildingId
)
{
if
(
buildingId
)
{
getFun
(
`/risk/plan/inherent/list/
${
planId
}
/
${
buildingId
}
`
).
then
(
res
=>
{
getFun
(
`/risk/plan/inherent/list/
${
planId
}
/
${
buildingId
}
`
,
data
).
then
(
res
=>
{
this
.
riskList
=
res
.
data
;
this
.
riskList
=
res
.
data
;
});
});
}
else
{
}
else
{
...
...
vue.config.js
View file @
cc374d2c
...
@@ -9,11 +9,11 @@ module.exports = {
...
@@ -9,11 +9,11 @@ module.exports = {
proxy
:
{
proxy
:
{
//配置跨域
//配置跨域
"
/app-api
"
:
{
"
/app-api
"
:
{
//
target: "http://192.168.4.232:8080/", //这里是后台的地址
target
:
"
http://192.168.4.232:8080/
"
,
//这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
// target: 'http://192.168.10.36:8080/', //这里是昊哥的地址
target
:
'
http://localhost:8081/
'
,
//这里是后台的地址
//
target: 'http://localhost:8081/', //这里是后台的地址
ws
:
true
,
ws
:
true
,
changOrigin
:
true
//允许跨域
changOrigin
:
true
//允许跨域
// logLevel: 'debug', // 显示代理调试信息
// logLevel: 'debug', // 显示代理调试信息
...
...
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