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
bb9a462e
Commit
bb9a462e
authored
Jan 09, 2024
by
kaitly205422@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加异常处理
parent
aefa8254
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
3150 additions
and
1497 deletions
+3150
-1497
package-lock.json
package-lock.json
+5
-5
package.json
package.json
+1
-1
src/router/index.js
src/router/index.js
+12
-1
src/views/drawCanvas/riskView.vue
src/views/drawCanvas/riskView.vue
+63
-131
src/views/messageCenter/index.vue
src/views/messageCenter/index.vue
+117
-0
src/views/messageCenter/infoTip/index.vue
src/views/messageCenter/infoTip/index.vue
+298
-0
src/views/messageCenter/iso/index.vue
src/views/messageCenter/iso/index.vue
+107
-0
src/views/messageCenter/iso/isoDetail/index.vue
src/views/messageCenter/iso/isoDetail/index.vue
+156
-0
src/views/messageCenter/waitEvent/index.vue
src/views/messageCenter/waitEvent/index.vue
+279
-0
src/views/messageCenter/warning/index.vue
src/views/messageCenter/warning/index.vue
+323
-0
src/views/messageCenter/warningForm/index.vue
src/views/messageCenter/warningForm/index.vue
+344
-0
src/views/riskPatrol/patrolApprove/index.vue
src/views/riskPatrol/patrolApprove/index.vue
+80
-29
src/views/riskPatrol/patrolCancle/create.vue
src/views/riskPatrol/patrolCancle/create.vue
+168
-0
src/views/riskPatrol/patrolCancle/index.vue
src/views/riskPatrol/patrolCancle/index.vue
+82
-156
src/views/riskPatrol/patrolExecute/addDanger.vue
src/views/riskPatrol/patrolExecute/addDanger.vue
+181
-0
src/views/riskPatrol/patrolExecute/implement.vue
src/views/riskPatrol/patrolExecute/implement.vue
+155
-176
src/views/riskPatrol/patrolExecute/index.vue
src/views/riskPatrol/patrolExecute/index.vue
+111
-105
src/views/riskPatrol/patrolLog/index.vue
src/views/riskPatrol/patrolLog/index.vue
+142
-29
src/views/riskPatrol/patrolLog/logDetail.vue
src/views/riskPatrol/patrolLog/logDetail.vue
+144
-0
src/views/riskProject/add/addPresent.vue
src/views/riskProject/add/addPresent.vue
+150
-464
src/views/riskProject/add/taskList.vue
src/views/riskProject/add/taskList.vue
+170
-345
src/views/riskProject/assess/model/result.vue
src/views/riskProject/assess/model/result.vue
+59
-52
vue.config.js
vue.config.js
+3
-3
No files found.
package-lock.json
View file @
bb9a462e
...
...
@@ -5302,7 +5302,7 @@
},
"echarts"
:
{
"version"
:
"5.4.3"
,
"resolved"
:
"https://registry.npm
js.org
/echarts/-/echarts-5.4.3.tgz"
,
"resolved"
:
"https://registry.npm
mirror.com
/echarts/-/echarts-5.4.3.tgz"
,
"integrity"
:
"sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA=="
,
"requires"
:
{
"tslib"
:
"2.3.0"
,
...
...
@@ -5311,7 +5311,7 @@
"dependencies"
:
{
"tslib"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npm
js.org
/tslib/-/tslib-2.3.0.tgz"
,
"resolved"
:
"https://registry.npm
mirror.com
/tslib/-/tslib-2.3.0.tgz"
,
"integrity"
:
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
...
...
@@ -15715,7 +15715,7 @@
},
"vue-lazyload"
:
{
"version"
:
"1.2.3"
,
"resolved"
:
"https://registry.npm
mirror.com
/vue-lazyload/-/vue-lazyload-1.2.3.tgz"
,
"resolved"
:
"https://registry.npm
js.org
/vue-lazyload/-/vue-lazyload-1.2.3.tgz"
,
"integrity"
:
"sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"vue-loader"
:
{
...
...
@@ -16454,7 +16454,7 @@
},
"zrender"
:
{
"version"
:
"5.4.4"
,
"resolved"
:
"https://registry.npm
js.org
/zrender/-/zrender-5.4.4.tgz"
,
"resolved"
:
"https://registry.npm
mirror.com
/zrender/-/zrender-5.4.4.tgz"
,
"integrity"
:
"sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw=="
,
"requires"
:
{
"tslib"
:
"2.3.0"
...
...
@@ -16462,7 +16462,7 @@
"dependencies"
:
{
"tslib"
:
{
"version"
:
"2.3.0"
,
"resolved"
:
"https://registry.npm
js.org
/tslib/-/tslib-2.3.0.tgz"
,
"resolved"
:
"https://registry.npm
mirror.com
/tslib/-/tslib-2.3.0.tgz"
,
"integrity"
:
"sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
...
...
package.json
View file @
bb9a462e
...
...
@@ -11,7 +11,7 @@
"
axios
"
:
"
^0.19.2
"
,
"
better-scroll
"
:
"
^1.15.2
"
,
"
core-js
"
:
"
^3.4.3
"
,
"
echarts
"
:
"
^5.
3.2
"
,
"
echarts
"
:
"
^5.
4.3
"
,
"
file-saver
"
:
"
^2.0.5
"
,
"
image-tools
"
:
"
^1.4.0
"
,
"
js-base64
"
:
"
^3.7.2
"
,
...
...
src/router/index.js
View file @
bb9a462e
...
...
@@ -269,7 +269,7 @@ const routes = [
name
:
"
modelResult
"
,
component
:
()
=>
import
(
"
../views/riskProject/assess/model/result.vue
"
),
},
// 风险巡查管理 -巡查执行
{
path
:
"
/patrolExecute
"
,
...
...
@@ -293,6 +293,11 @@ const routes = [
name
:
"
patrolCancle
"
,
component
:
()
=>
import
(
"
../views/riskPatrol/patrolCancle
"
),
},
{
path
:
"
/patrolCancle/create
"
,
name
:
"
patrolCreate
"
,
component
:
()
=>
import
(
"
../views/riskPatrol/patrolCancle/create.vue
"
),
},
// 风险巡查管理 -巡查记录
{
path
:
"
/patrolLog
"
,
...
...
@@ -332,6 +337,12 @@ const routes = [
name
:
"
patrolStatistics
"
,
component
:
()
=>
import
(
"
../views/riskPatrol/patrolStatistics
"
),
},
// 消息中心
{
path
:
'
/message-center
'
,
name
:
'
message-center
'
,
component
:
()
=>
import
(
'
@/views/messageCenter
'
),
},
];
const
router
=
new
VueRouter
({
...
...
src/views/drawCanvas/riskView.vue
View file @
bb9a462e
This diff is collapsed.
Click to expand it.
src/views/messageCenter/index.vue
0 → 100644
View file @
bb9a462e
<
template
>
<div>
<!-- 头部标签 -->
<van-sticky>
<header
class=
"header-wrap"
>
消息中心
</header>
</van-sticky>
<!-- 内容 -->
<div
class=
"con"
>
<van-tabs
v-model=
"activeName"
color=
"#247df7"
title-inactive-colo=
"#d0d1d1"
title-active-color=
"#000000"
sticky
offset-top=
"1.333333rem"
@
change=
"changeTab"
>
<van-tab
title=
"消息提醒"
name=
"消息提醒"
>
<info-tip></info-tip>
</van-tab>
<!--
<van-tab
title=
"预警提醒"
name=
"预警提醒"
>
<Warning></Warning>
</van-tab>
-->
<!--
<van-tab
title=
"SOS求救"
name=
"SOS求救"
>
<Iso></Iso>
</van-tab>
-->
<van-tab
title=
"待办事项"
name=
"待办事项"
>
<wait-event></wait-event>
</van-tab>
</van-tabs>
</div>
<!-- tanBar -->
<tab-bar
:index=
"0"
></tab-bar>
</div>
</
template
>
<
script
>
import
infoTip
from
"
./infoTip
"
;
import
waitEvent
from
"
./waitEvent
"
;
// import Warning from "./warning";
// import Iso from "./iso";
import
tabBar
from
"
@/components/TabBar
"
;
export
default
{
components
:
{
infoTip
,
waitEvent
,
// Iso,
tabBar
,
// Warning
},
data
()
{
return
{
activeName
:
"
消息提醒
"
,
};
},
mounted
()
{
// 判断路由跳转有没有带text
if
(
this
.
$route
.
params
.
text
)
{
this
.
activeName
=
this
.
$route
.
params
.
text
;
}
else
{
// 判断缓存中有没有infoActiveName
let
currentTab
=
sessionStorage
.
getItem
(
"
infoActiveName
"
);
switch
(
currentTab
)
{
case
"
预警提醒
"
:
this
.
activeName
=
"
预警提醒
"
break
;
case
"
SOS求救
"
:
this
.
activeName
=
"
SOS求救
"
break
;
case
"
待办事项
"
:
this
.
activeName
=
"
待办事项
"
break
;
default
:
this
.
activeName
=
"
消息提醒
"
break
;
}
}
},
beforeRouteLeave
(
to
,
from
,
next
)
{
// 如果取得路由地址是 save-workbench 则清空session缓存
if
(
to
.
name
==
"
save-workbench
"
||
to
.
name
==
"
my
"
)
{
sessionStorage
.
removeItem
(
"
infoActiveName
"
);
}
next
();
},
methods
:
{
changeTab
(
title
)
{
this
.
showIndex
=
null
;
// 把点击的页卡名字纯到缓存中
sessionStorage
.
setItem
(
"
infoActiveName
"
,
title
);
},
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.header-wrap {
width: 100%;
height: 1.333333rem;
background-color: #2980f7;
font-size: 17px;
line-height: 1.333333rem;
color: white;
text-align: center;
}
.con {
// height: calc(100% - 110px);
// height: 100%;
padding: 0 0 50px 0;
background-color: #f0f1f5;
position: relative;
/deep/ .van-info {
right: -6px;
background-color: #fa4c4c;
}
}
</
style
>
src/views/messageCenter/infoTip/index.vue
0 → 100644
View file @
bb9a462e
<
template
>
<div>
<div
class=
"message-wrap"
>
<!-- 搜索 -->
<div
class=
"search-wrap"
>
<van-search
v-model=
"searchVal"
placeholder=
"搜索"
@
input=
"onSearch"
/>
</div>
<!-- 标签 -->
<div
class=
"category-wrap"
>
<span
class=
"my-tag-style"
:class=
"index == activeIndex ? 'active' : ''"
v-for=
"(item, index) in messageCategory"
:key=
"item.key"
@
click=
"clickCategory(index, item.category)"
>
{{
item
.
category
}}
</span
>
</div>
<!-- 内容列表 -->
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<div
class=
"approval-title"
>
{{
item
.
noticeTitle
}}
<span
class=
"title-icon"
>
待处理
</span></div>
<!--
<div
class=
"row"
><span
class=
"row-title"
>
作业类型
</span>
:
<span>
{{
item
.
id
}}
</span></div>
-->
<div
class=
"row"
><span
class=
"row-title"
>
作业类型
</span>
:
<span>
{{
item
.
jobType
}}
</span></div>
<div
class=
"row"
><span
class=
"row-title"
>
作业单号
</span>
:
<span>
{{
item
.
pid
}}
</span></div>
<div
class=
"row"
><span
class=
"row-title"
>
发送人
</span>
:
<span>
{{
item
.
createName
}}
</span></div>
<div
class=
"row"
><span
class=
"row-title"
>
消息内容
</span>
:
<span>
{{
item
.
noticeContent
}}
</span></div>
<div
class=
"row"
><span
class=
"row-title"
>
发送时间
</span>
:
<span>
{{
item
.
sendTime
}}
</span></div>
<van-tag
class=
"status"
:color=
"item.status == '已读' ? '#07c160' : '#ee0a24'"
plain
>
{{
item
.
status
}}
</van-tag>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"closeOverlay"
>
<van-button
round
type=
"info"
@
click=
"onClick(item)"
>
查看
</van-button>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getFun
,
postFun
}
from
'
@/service/table
'
import
{
debounce
}
from
'
@/utils/common.js
'
export
default
{
data
()
{
return
{
searchVal
:
""
,
showIndex
:
null
,
// 是否显示遮罩层
activeIndex
:
0
,
activeVal
:
"
全部
"
,
messageList
:
[],
completeList
:
[],
messageCategory
:
[
{
key
:
"
0
"
,
category
:
"
未读
"
},
{
key
:
"
1
"
,
category
:
"
已读
"
},
{
key
:
"
2
"
,
category
:
"
全部
"
},
],
};
},
mounted
()
{
this
.
getList
(
this
.
searchVal
);
},
methods
:
{
// 搜索事件
// 搜索事件
onSearch
:
debounce
(
function
(){
if
(
this
.
searchVal
){
this
.
getList
(
this
.
searchVal
)
}
else
{
this
.
getList
(
""
)
}
},
800
),
getList
(
val
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
formdata
=
new
FormData
()
formdata
.
append
(
"
search
"
,
val
);
postFun
(
"
mobile/notice
"
,
formdata
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
this
.
messageList
=
res
.
rows
.
filter
(
item
=>
{
return
item
.
status
==
"
未读
"
;
});
this
.
completeList
=
res
.
rows
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
'
加载失败,请稍后再试
'
);
});
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
showIndex
=
index
;
},
closeOverlay
()
{
this
.
showIndex
=
null
;
},
onClick
(
data
)
{
let
updateId
=
data
.
id
this
.
showIndex
=
null
;
if
(
data
.
jobType
==
""
||
data
.
pid
==
""
||
data
.
noticeTitle
==
""
)
return
;
// 进入对应的操作页面
switch
(
data
.
jobType
+
"
-
"
+
data
.
noticeTitle
)
{
// 作业审批的情况
case
"
动火作业-审批通过
"
:
case
"
动火作业-开始作业
"
:
case
"
动火作业-结束作业
"
:
this
.
$router
.
push
({
name
:
"
detail-work
"
,
params
:
{
id
:
data
.
pid
}
});
break
;
case
"
有限空间作业-审批通过
"
:
case
"
有限空间作业-开始作业
"
:
case
"
有限空间作业-结束作业
"
:
this
.
$router
.
push
({
name
:
"
limit-detail
"
,
params
:
{
id
:
data
.
pid
}
});
break
;
case
"
动火作业-问题上报
"
:
case
"
动火作业-问题处置
"
:
case
"
动火作业-督导提醒
"
:
// 把 data.中的pid 改为 id 在跳转
data
.
id
=
data
.
proId
this
.
$router
.
push
({
name
:
"
prorec-detail
"
,
params
:
{
data
:
data
}
});
break
;
default
:
break
;
}
// 把未读的消息改为已读状态
if
(
data
.
status
==
"
未读
"
){
let
formdata
=
new
FormData
()
formdata
.
append
(
"
id
"
,
updateId
)
postFun
(
"
mobile/updateStatus
"
,
formdata
)
.
then
(
res
=>
{})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
'
状态更新失败
'
);
});
}
},
// 点击类别
clickCategory
(
index
,
data
)
{
// 关闭遮罩层
this
.
showIndex
=
null
;
this
.
activeIndex
=
index
;
this
.
activeVal
=
this
.
messageCategory
[
index
].
category
;
// 过滤数组
switch
(
this
.
activeVal
)
{
case
"
未读
"
:
this
.
messageList
=
this
.
completeList
.
filter
(
item
=>
{
return
item
.
status
==
"
未读
"
;
});
break
;
case
"
已读
"
:
this
.
messageList
=
this
.
completeList
.
filter
(
item
=>
{
return
item
.
status
==
"
已读
"
;
});
console
.
log
(
this
.
messageList
);
break
;
default
:
this
.
messageList
=
this
.
completeList
;
break
;
}
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.message-wrap {
padding: 10px 10px 0;
background-color: #f0f1f5;
// 标签
// 搜索
.search-wrap {
margin: 0 0 0.26667rem 0;
.van-search {
border-radius: 5px;
padding: 5px 12px;
}
.van-search__content {
background-color: #ffffff;
}
}
.category-wrap {
margin-bottom: 10px;
.my-tag-style {
width: 75px;
height: 21px;
font-size: 13px;
border: 1px solid #1989fa;
border-radius: 4px;
color: #1989fa;
display: inline-block;
text-align: center;
line-height: 21px;
margin-right: 10px;
}
.active {
color: white;
background-color: #1989fa;
}
}
// 内容
.con-list {
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.266667rem;
padding: 0.266667rem;
position: relative;
.approval-title{
font-size: 0.4rem;
font-weight: bold;
line-height: 0.7rem;
color: #000;
.title-icon{
text-align: center !important;
font-weight: normal;
background-color: #2980f7;
color: white;
font-size: .32rem;
padding: .026667rem .08rem;
height: -webkit-fill-available;
display: inline;
margin-left: .266667rem;
position: relative;
top: -0.026667rem;
}
}
.row{
line-height: 0.7rem;
font-size: 0.4rem;
display: flex;
flex: none;
.row-title {
width: 1.733333rem;
display: inline-block;
text-align-last: justify;
flex: inherit;
}
}
.status {
display: inline-block;
padding: 3px 8px;
position: absolute;
top: 0.4rem;
right: 0.586667rem;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
.van-button__text {
width: initial;
}
}
}
}
}
}
</
style
>
src/views/messageCenter/iso/index.vue
0 → 100644
View file @
bb9a462e
<
template
>
<div>
<van-search
v-model=
"value"
placeholder=
"搜索"
@
search=
"onSearch"
>
</van-search>
<div
class=
"card"
v-for=
"(item,index) in list"
:key=
"index"
@
click=
"warningClick(item)"
>
<div
class=
"card-header"
>
<van-row>
<van-col
span=
"10"
>
<span
class=
"card-header-left"
>
{{
item
.
warningName
}}
</span>
</van-col>
<van-col
span=
"6"
class=
"card-header-medium"
>
<van-tag
size=
"medium"
type=
"danger"
>
SOS
</van-tag>
</van-col>
<van-col
span=
"8"
class=
"card-header-right"
>
<van-tag
:color=
"item.isreading? '#07c160': '#ee0a24'"
class=
"status"
plain
v-if=
"item.isreading"
>
已读
</van-tag>
<van-tag
:color=
"item.isreading? '#07c160': '#ee0a24'"
class=
"status"
plain
v-else-if=
"!item.isreading"
>
未读
</van-tag>
</van-col>
</van-row>
</div>
<div
class=
"card-body"
>
{{
item
.
content
}}
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getFun
,
postFun
}
from
'
@/service/table
'
export
default
{
name
:
'
SOS
'
,
components
:
{
},
data
()
{
return
{
value
:
''
,
//搜索值
list
:[
{
warningName
:
'
SOS求救报警
'
,
isreading
:
false
,
content
:
'
2021年8月23日 12:34:32 有限空间作业-0294758 张天爱 发出 SOS求救报警,请附近人员及时进行赶往现场进行救援。
'
},
]
}
},
mounted
()
{
},
methods
:
{
//搜索查询
onSearch
(){
},
//点击卡片跳转
warningClick
(
item
){
this
.
$router
.
push
(
'
/isoDetail
'
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
/* 搜索框 */
.van-search{
margin:0.26667rem auto 0;
width: 95%;
border-radius: 4%;
border-radius: 5px;
padding: 5px 12px;
}
.van-search__content {
background-color: #ffffff;
}
/* 卡片系列 */
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.26667rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.7rem;
}
.card-header-left{
font-weight: bolder;
}
.card-header-left{
font-size: 0.45rem;
}
.card-header-right{
text-align: right;
}
.card-header-medium{
text-align: left;
}
.status {
padding: 3px 8px !important;
right: 0.286667rem !important;
}
</
style
>
\ No newline at end of file
src/views/messageCenter/iso/isoDetail/index.vue
0 → 100644
View file @
bb9a462e
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<
template
>
<div>
<LHeader
v-bind:text=
"text"
></LHeader>
<div
class=
"card"
>
<div>
作业类型:有限空间作业-123123123123
</div>
<div>
求救等级:SOS求救
</div>
<div>
求救时间:2021-10-22 17:23:23
</div>
<div>
作业地点:朝阳区西大街34号
</div>
<div>
地图坐标:
<span
@
click=
"goMap"
>
X:124124.23423 Y:1231254.124
</span></div>
</div>
<div
class=
"medium-text"
>
救援队伍
</div>
<div
class=
"card"
v-for=
"(item,index) in cardList2"
:key=
"index"
>
<div
class=
"card-type1"
>
<div
class=
"card-number"
>
<div
class=
"card-circle"
>
{{
index
+
1
}}
</div>
</div>
<div
class=
"card-text"
>
<div>
{{
item
.
army
}}
</div>
<div>
{{
item
.
personName
}}
</div>
<div
class=
"card-personNum"
>
人员:
{{
item
.
personNum
}}
人;
</div>
</div>
</div>
</div>
<!--
<tab-bar
:index=
"1"
></tab-bar>
-->
</div>
</
template
>
<
script
>
// import tabBar from "@/components/TabBar";
import
LHeader
from
'
@/components/header.vue
'
import
{
getFun
,
postFun
}
from
'
@/service/table
'
export
default
{
name
:
'
SOSDetail
'
,
components
:
{
"
LHeader
"
:
LHeader
,
// "tabBar":tabBar
},
data
()
{
return
{
text
:
'
SOS详情
'
,
//顶部文本
list
:{},
//详情列表
id
:
''
,
//详情列表id
cardList2
:[
{
army
:
'
有限空间作业队伍-123124121241
'
,
personName
:
'
王天力(已读)
'
,
personNum
:
'
11/12
'
},
{
army
:
'
有限空间作业队伍-123124121241
'
,
personName
:
'
王天力(已读)
'
,
personNum
:
'
11/12
'
}
],
//卡片2数据
}
},
mounted
()
{
this
.
id
=
this
.
$route
.
query
.
id
this
.
init
()
},
methods
:
{
/* 获取详情列表 */
goMap
()
{
this
.
$router
.
push
({
name
:
"
map-location-two
"
,
// params: {
// data: coordinate
// }
});
},
init
(){
this
.
list
=
{}
// getFun('check/carry/trouble/'+this.id).then((Response)=>{
// this.list=JSON.parse(JSON.stringify(Response.data))
// //数据处理
// this.list.deptNames=this.list.deptNames.join('/')
// this.list.pictures=[]
// this.list.videos=[]
// Response.data.pictures.forEach((item) => {
// this.list.pictures.push({
// url:item
// })
// });
// Response.data.videos.forEach((item) => {
// this.list.videos.push({
// url:item
// })
// });
// })
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.7rem;
}
.card div:nth-child(5)>span{
color: blue;
cursor: pointer;
}
.card-type1{
width: 100%;
display: flex;
}
.card-number{
width: 12%;
height: 100%;
margin: 0.2rem auto;
}
.card-circle{
width:1rem;
height: 1rem;
border-radius: 30%;
background: #2980F7;
font-weight: bolder;
line-height: 1rem !important;
font-size: 0.5rem !important;
color: white;
text-align: center;
}
.card-text{
width: 80%;
}
.medium-text{
font-size: 0.4rem;
margin-left: 0.5rem;
font-weight: bolder;
}
.card-personNum{
width: 95%;
background: #F2F2F2;
padding: 0.026667rem 0.133333rem;
// padding: 0.2rem 0 0.2rem 0.2rem;
}
</
style
>
src/views/messageCenter/waitEvent/index.vue
0 → 100644
View file @
bb9a462e
<
template
>
<div>
<div
class=
"message-wrap"
>
<!-- 搜索 -->
<div
class=
"search-wrap"
>
<van-search
v-model=
"searchVal"
placeholder=
"搜索"
@
input=
"onSearch"
/>
</div>
<!-- 内容列表 -->
<div
class=
"con-list"
@
touchmove=
"showIndex = null"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<div
class=
"approval-title"
>
{{
item
.
taskName
}}
<span
class=
"title-icon"
>
待处理
</span></div>
<div><span>
作业类型
</span>
:
{{
item
.
businessDes
}}
</div>
<div><span>
作业单号
</span>
:
{{
item
.
businessId
}}
</div>
<div><span>
申请人
</span>
:
{{
item
.
createBy
}}
</div>
<div><span>
作业地点
</span>
:
{{
item
.
place
}}
</div>
<div><span>
开始时间
</span>
:
{{
item
.
startTime
}}
</div>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"closeOverlay"
>
<van-button
round
type=
"info"
@
click=
"onClick(item)"
>
处理
</van-button>
</div>
</van-overlay>
</van-cell-group>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getFun
,
postFun
}
from
'
@/service/table
'
import
{
debounce
}
from
'
@/utils/common.js
'
export
default
{
data
()
{
return
{
searchVal
:
""
,
showIndex
:
null
,
// 是否显示遮罩层
messageList
:
[]
};
},
mounted
()
{
this
.
getList
(
this
.
searchVal
);
},
methods
:
{
// 搜索事件
onSearch
:
debounce
(
function
(){
this
.
getList
(
this
.
searchVal
)
},
500
),
getList
(
val
)
{
this
.
$toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
});
let
formdata
=
new
FormData
();
formdata
.
append
(
"
processDefinitionKey
"
,
"
dhzy_main,yxkj_main
"
);
formdata
.
append
(
"
search
"
,
val
);
postFun
(
"
dhzyreport/list
"
,
formdata
)
.
then
(
res
=>
{
this
.
messageList
=
res
.
data
;
})
},
touchstart
(
index
,
item
)
{
if
(
this
.
showIndex
!=
null
)
{
this
.
showIndex
=
null
;
return
;
}
this
.
showIndex
=
index
;
},
closeOverlay
()
{
this
.
showIndex
=
null
;
},
onClick
(
data
)
{
this
.
showIndex
=
null
;
if
(
data
.
businessDes
==
""
||
data
.
taskName
==
""
)
return
;
// 进入对应的操作页面
switch
(
data
.
businessDes
+
"
-
"
+
data
.
taskName
)
{
// 作业审批的情况
case
"
动火作业-作业负责人确认
"
:
case
"
有限空间作业-作业负责人确认
"
:
this
.
$router
.
push
({
name
:
"
approval-handle
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-项目负责人审批
"
:
case
"
有限空间作业-项目负责人审批
"
:
this
.
$router
.
push
({
name
:
"
project-handle
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-会签部室会签
"
:
case
"
有限空间作业-会签部室会签
"
:
this
.
$router
.
push
({
name
:
"
safe-dept-handle
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-安全管理部门审批
"
:
case
"
有限空间作业-安全管理部门审批
"
:
this
.
$router
.
push
({
name
:
"
safe-officer-handle
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-主管领导审批
"
:
case
"
有限空间作业-主管领导审批
"
:
this
.
$router
.
push
({
name
:
"
executive-director
"
,
params
:
{
data
:
data
}
});
break
;
// 现场作业的情况
case
"
动火作业-重点人员签到
"
:
this
.
$router
.
push
({
name
:
"
hot-work-confirm
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-现场人员签字
"
:
this
.
$router
.
push
({
name
:
"
site-confirm
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-结束作业
"
:
this
.
$router
.
push
({
name
:
"
work-patrol
"
,
params
:
{
data
:
data
}
});
break
;
case
"
动火作业-安全部门结束确认
"
:
this
.
$router
.
push
({
name
:
"
check-accept
"
,
params
:
{
data
:
data
}
});
break
;
case
"
有限空间作业-重点人员签到
"
:
this
.
$router
.
push
({
name
:
"
job-affirm
"
,
params
:
{
data
:
data
}
});
break
;
case
"
有限空间作业-交底上传
"
:
this
.
$router
.
push
({
name
:
"
job-sign
"
,
params
:
{
data
:
data
}
});
break
;
case
"
有限空间作业-安全措施确认
"
:
this
.
$router
.
push
({
name
:
"
safe-disclosure
"
,
params
:
{
data
:
data
}
});
break
;
case
"
有限空间作业-作业前确认
"
:
this
.
$router
.
push
({
name
:
"
begin-work
"
,
params
:
{
data
:
data
}
});
break
;
case
"
有限空间作业-结束作业
"
:
this
.
$router
.
push
({
name
:
"
end-work
"
,
params
:
{
data
:
data
}
});
break
;
default
:
break
;
}
},
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/* @import url(); 引入css类 */
.message-wrap {
padding: 10px 10px 0;
background-color: #f0f1f5;
// 标签
// 搜索
.search-wrap {
margin: 0 0 0.26667rem 0;
.van-search {
border-radius: 5px;
padding: 5px 12px;
}
.van-search__content {
background-color: #ffffff;
}
}
// 内容
.con-list {
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.266667rem;
padding: 0.266667rem;
position: relative;
.approval-title{
font-weight: bold;
color: #000;
.title-icon{
text-align: center !important;
font-weight: normal;
background-color: #2980f7;
color: white;
font-size: .32rem;
padding: .026667rem .08rem;
height: -webkit-fill-available;
display: inline;
margin-left: .266667rem;
position: relative;
top: -0.026667rem;
}
}
div {
line-height: 0.7rem;
font-size: 0.4rem;
span {
width: 1.733333rem;
display: inline-block;
text-align-last: justify;
}
}
.operation {
text-align: right;
margin-right: 5px;
color: #2980f7;
font-weight: normal;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
.van-button__text {
width: initial;
}
}
}
}
}
}
</
style
>
src/views/messageCenter/warning/index.vue
0 → 100644
View file @
bb9a462e
This diff is collapsed.
Click to expand it.
src/views/messageCenter/warningForm/index.vue
0 → 100644
View file @
bb9a462e
This diff is collapsed.
Click to expand it.
src/views/riskPatrol/patrolApprove/index.vue
View file @
bb9a462e
...
...
@@ -3,39 +3,61 @@
<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()"
>
<div
v-for=
"(child, index) in group"
:key=
"index"
>
<van-row
gutter
class=
"con_tip"
>
<van-col
span=
"12"
class=
"con_type"
>
{{
child
.
time
}}
</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-row>
</van-cell-group>
</div>
</van-list>
</van-pull-refresh>
</div>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
name
:
'
patrolApprove
'
,
//巡查审批
components
:
{
LHeader
,
},
props
:
{
},
data
()
{
return
{
text
:
'
巡查审批
'
,
}
},
computed
:
{
},
watch
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
},
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
name
:
'
patrolApprove
'
,
//巡查审批
components
:
{
LHeader
,
},
props
:
{
},
data
()
{
return
{
text
:
'
巡查审批
'
,
}
},
computed
:
{
},
watch
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
},
}
</
script
>
...
...
@@ -44,4 +66,33 @@
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;
}
}
}
}
</
style
>
src/views/riskPatrol/patrolCancle/create.vue
0 → 100644
View file @
bb9a462e
<
template
>
<div
class=
"wrap"
>
<LHeader
:text=
"text"
></LHeader>
<!-- 内容列表 -->
<div
class=
"con-list"
>
<!-- v-for="(item, index) in messageList" :key="index" -->
<van-cell-group
inset
>
<van-row
gutter
class=
"cont-operation"
>
<van-col
span=
"24"
>
申请原因
</van-col>
</van-row>
<van-row
gutter
class=
"cont-operation"
style=
"margin-top: 10px;"
>
<van-col
span=
"24"
>
<van-radio-group
v-model=
"radio"
direction=
"horizontal"
@
change=
"operation"
>
<van-radio
name=
"1"
shape=
"square"
>
快捷申请
</van-radio>
<van-radio
name=
"2"
shape=
"square"
>
自定义
</van-radio>
</van-radio-group>
</van-col>
</van-row>
</van-cell-group>
</div>
<van-form
style=
"margin: 0 10px"
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-field
v-if=
"isShow"
readonly
clickable
required
label=
"申请原因"
name=
"applyReason"
:value=
"applyReason"
placeholder=
"请选择"
@
click=
"showReason = true"
:rules=
"[
{ required: true, message: '请选择申请原因' }]" />
<van-popup
v-model=
"showReason"
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"columnsReason"
@
confirm=
"onConSetReason"
@
cancel=
"showReason = false"
/>
</van-popup>
<van-field
v-if=
"!isShow"
v-model=
"measures"
name=
"measures"
label=
"申请原因"
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<div
class=
"operation-btn"
>
<!--
<van-button
block
type=
"info"
plain
native-type=
"button"
style=
"border-radius: 5px; background-color: #f0f1f5; margin-bottom: 10px;"
@
click=
"cancel"
>
取消
</van-button>
-->
<van-button
block
type=
"info"
native-type=
"submit"
style=
"border-radius: 5px;"
>
提交
</van-button>
</div>
</van-form>
</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
{
text
:
'
巡查取消
'
,
radio
:
"
1
"
,
applyReason
:
""
,
setRank
:
""
,
//风险定级
showReason
:
false
,
columnsReason
:
[
"
今日请假
"
,
"
今日外出、离岗
"
,
"
今日调休
"
],
measures
:
""
,
isShow
:
true
,
content
:
''
,
applyTime
:
this
.
util
.
timestampToTime
(
new
Date
(),
'
DT2
'
,
true
)
}
},
computed
:
{
},
watch
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
operation
()
{
if
(
this
.
radio
==
"
1
"
)
{
this
.
isShow
=
true
;
}
else
{
this
.
isShow
=
false
;
}
},
onConSetReason
(
value
)
{
this
.
showReason
=
false
;
this
.
applyReason
=
value
;
},
onSubmit
(
values
)
{
console
.
log
(
values
)
this
.
$toast
.
loading
({
message
:
"
提交中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
if
(
this
.
radio
==
'
1
'
)
{
this
.
content
=
this
.
applyReason
}
else
if
(
this
.
radio
==
'
2
'
)
{
this
.
content
=
this
.
measures
}
postFun
(
'
risk/currentRiskHoliday/save
'
,
{
reason
:
this
.
content
,
holidayTime
:
this
.
applyTime
})
.
then
((
res
)
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
,
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
},
save
()
{
},
cancel
()
{
this
.
$router
.
go
(
-
1
);
}
},
}
</
script
>
<
style
scoped
lang=
'less'
>
.wrap {
height: 100vh;
width: 100vw;
}
.con-list {
padding: 0;
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 @
bb9a462e
<
template
>
<div
class=
"wrap"
>
<LHeader
:text=
"text"
></LHeader>
<!-- 内容列表 -->
<div
class=
"wrap"
>
<van-sticky
offset-top=
"0"
>
<LHeader
:text=
"text"
></LHeader>
</van-sticky>
<div
class=
"con-list"
>
<!-- v-for="(item, index) in messageList" :key="index" -->
<van-cell-group
inset
>
<van-row
gutter
class=
"cont-operation"
>
<van-col
span=
"24"
>
申请原因
</van-col>
</van-row>
<van-row
gutter
class=
"cont-operation"
style=
"margin-top: 10px;"
>
<van-col
span=
"24"
>
<van-radio-group
v-model=
"radio"
direction=
"horizontal"
@
change=
"operation"
>
<van-radio
name=
"1"
shape=
"square"
>
快捷申请
</van-radio>
<van-radio
name=
"2"
shape=
"square"
>
自定义
</van-radio>
</van-radio-group>
</van-col>
</van-row>
</van-cell-group>
<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=
""
/>
</van-list>
</van-pull-refresh>
</div>
<van-form
style=
"margin: 0 10px"
@
submit=
"onSubmit"
:scroll-to-error=
"true"
:show-error=
"false"
validate-trigger=
"onSubmit"
>
<van-field
v-if=
"isShow"
readonly
clickable
required
label=
"申请原因"
name=
"applyReason"
:value=
"applyReason"
placeholder=
"请选择"
@
click=
"showReason = true"
:rules=
"[
{ required: true, message: '请选择申请原因' }]"
/>
<van-popup
v-model=
"showReason"
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"columnsReason"
@
confirm=
"onConSetReason"
@
cancel=
"showReason = false"
/>
</van-popup>
<van-field
v-if=
"!isShow"
v-model=
"measures"
name=
"measures"
label=
"申请原因"
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
/>
<div
class=
"operation-btn"
>
<!--
<van-button
block
type=
"info"
plain
native-type=
"button"
style=
"border-radius: 5px; background-color: #f0f1f5; margin-bottom: 10px;"
@
click=
"cancel"
>
取消
</van-button>
-->
<van-button
block
type=
"info"
native-type=
"submit"
style=
"border-radius: 5px;"
>
提交
</van-button>
</div>
</van-form>
</div>
<div
class=
"accident-icon"
@
click=
"handadd"
>
<img
src=
"@/assets/accidentIcon/add.svg"
alt=
""
width=
"100%"
/>
</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
'
,
//巡查取消
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
'
patrolApprove
'
,
//巡查审批
components
:
{
LHeader
,
LHeader
,
},
props
:
{
},
data
()
{
return
{
text
:
'
巡查取消
'
,
radio
:
"
1
"
,
applyReason
:
""
,
setRank
:
""
,
//风险定级
showReason
:
false
,
columnsReason
:
[
"
今日请假
"
,
"
今日外出、离岗
"
,
"
今日调休
"
],
measures
:
""
,
isShow
:
true
,
content
:
''
,
applyTime
:
this
.
util
.
timestampToTime
(
new
Date
(),
'
DT2
'
,
true
)
}
return
{
text
:
'
申请记录
'
,
group
:
[],
pages
:
{
current
:
1
},
refreshing
:
false
}
},
computed
:
{
},
watch
:
{
},
created
(){
created
()
{
},
mounted
()
{
this
.
getData
()
},
methods
:
{
operation
()
{
if
(
this
.
radio
==
"
1
"
)
{
this
.
isShow
=
true
;
}
else
{
this
.
isShow
=
false
;
}
},
onConSetReason
(
value
)
{
this
.
showReason
=
false
;
this
.
applyReason
=
value
;
},
onSubmit
(
values
)
{
console
.
log
(
values
)
this
.
$toast
.
loading
({
message
:
"
提交中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
if
(
this
.
radio
==
'
1
'
){
this
.
content
=
this
.
applyReason
}
else
if
(
this
.
radio
==
'
2
'
){
this
.
content
=
this
.
measures
}
postFun
(
'
risk/currentRiskHoliday/save
'
,
{
reason
:
this
.
content
,
holidayTime
:
this
.
applyTime
})
.
then
((
res
)
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
success
({
message
:
"
提交成功
"
,
duration
:
2000
,
});
history
.
go
(
-
1
);
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
this
.
$toast
.
fail
(
"
提交失败,请稍后再试
"
);
});
},
save
(){
},
cancel
()
{
this
.
$router
.
go
(
-
1
);
}
onLoad
()
{
return
false
},
handadd
()
{
this
.
$router
.
push
({
name
:
'
patrolCreate
'
})
},
onRefresh
()
{
this
.
pages
.
current
=
1
;
this
.
group
=
[]
this
.
getData
()
},
getData
()
{
getFun
(
"
risk/currentRiskHoliday/list
"
,
this
.
pages
).
then
(
res
=>
{
this
.
group
=
this
.
group
.
concat
(
res
.
rows
);
this
.
refreshing
=
false
;
})
}
},
}
</
script
>
<
style
scoped
lang=
'less'
>
.wrap {
height: 100vh;
width: 100vw;
height: 100vh;
width: 100vw;
}
.accident-icon {
width: 60px;
position: fixed;
right: 5%;
top: 80%;
}
.con-list {
padding: 0;
background-color: #f0f1f5;
// padding: 0.2rem 0.4rem;
height: calc(100vh - 1.5rem);
.van-pull-refresh {
height: 100%;
}
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
position: relative;
border-radius:
4%
;
border-radius:
10px
;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%
;
margin: 0.4rem auto;
.van-row {
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;
}
}
}
}
.operation-btn {
width: 95%;
margin: 20px 10px 10px;
position: fixed;
bottom: 50px;
right: 0;
left: 0;
}
</
style
>
src/views/riskPatrol/patrolExecute/addDanger.vue
View file @
bb9a462e
<
template
>
<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
class=
"content"
>
应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。
</div>
<div
class=
"title"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
巡查地点
</div>
<div
class=
"content"
>
西南厂区一车间西北角
</div>
<div
class=
"list"
>
<div
class=
"title"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
class=
"title-img"
/>
异常上报
</div>
<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>
</template>
</van-field>
<van-field
label=
"异常说明"
>
<
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
readonly
v-model=
"form.assessmentLevel"
required
name=
"assessmentLevel"
label=
"风险等级"
placeholder=
"请选择"
@
click=
"seletGrade"
:rules=
"[{ required: true, message: '风险等级不能为空' }]"
/>
<div
style=
"margin: 16px 16px 0"
>
<van-button
:loading=
"loadingStatus"
loading-text=
"加载中..."
round
block
type=
"info"
native-type=
"submit"
>
提交
</van-button>
</div>
</div>
</van-form>
<div
style=
"margin: 10px 16px 0px; padding-bottom: 16px"
>
<van-button
round
block
type=
"warning"
@
click.native=
"cancel"
>
取消
</van-button>
</div>
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
name
:
"
addCurrent
"
,
components
:
{
LHeader
,
},
data
()
{
return
{
form
:
{},
text
:
"
异常上报
"
};
},
mounted
()
{
const
formData
=
sessionStorage
.
getItem
(
'
addDanger
'
);
if
(
formData
)
{
const
{
level
,
score
}
=
this
.
$store
.
state
.
assessModel
.
result
this
.
form
=
JSON
.
parse
(
formData
);
this
.
form
.
assessmentLevel
=
level
;
sessionStorage
.
removeItem
(
'
addDanger
'
)
}
},
methods
:
{
//风险等级
seletGrade
(
name
)
{
this
.
saveFormData
()
this
.
$router
.
push
(
'
/assess/model/step1
'
)
},
saveFormData
()
{
sessionStorage
.
setItem
(
"
addDanger
"
,
JSON
.
stringify
(
this
.
form
));
},
jsonToFormData
(
config
)
{
const
formData
=
new
FormData
();
//循环传入的值转换formData
Object
.
keys
(
config
).
forEach
((
key
)
=>
{
if
(
key
==
'
abnormalPics
'
)
{
config
[
key
].
forEach
(
val
=>
{
formData
.
append
(
'
abnormalPics[]
'
,
val
.
file
)
})
}
else
{
formData
.
append
(
key
,
config
[
key
]);
}
});
return
formData
;
},
onSubmit
()
{
var
formDataJson
=
this
.
jsonToFormData
(
this
.
form
);
postFun
(
'
/risk/currentRiskAbnormal/save
'
,
formDataJson
)
}
},
};
</
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%)
}
}
.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;
.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;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
}
}
.dialogContain {
width: 100%;
height: 100%;
padding: 10px;
box-sizing: border-box;
}
</
style
>
src/views/riskPatrol/patrolExecute/implement.vue
View file @
bb9a462e
This diff is collapsed.
Click to expand it.
src/views/riskPatrol/patrolExecute/index.vue
View file @
bb9a462e
<
template
>
<div
class=
"wrap"
>
<LHeader
:text=
"text"
></LHeader>
<!-- 内容列表 -->
<div
class=
"title"
>
{{
nowTime
}}
</div>
<p
class=
"title-text"
>
系统提示:请按照下列巡查清单完成巡查工作。
</p>
<div
class=
"wrap"
>
<LHeader
:text=
"text"
></LHeader>
<!-- 内容列表 -->
<div
class=
"title"
>
{{
nowTime
}}
</div>
<p
class=
"title-text"
>
系统提示:请按照下列巡查清单完成巡查工作。
</p>
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in contentList"
:key=
"index"
@
click=
"onClick(item)"
>
<van-cell-group
inset
v-for=
"(item, index) in contentList"
:key=
"index"
@
click=
"onClick(item)"
>
<div
class=
"icon-wrap"
>
<span
class=
"icon-img"
>
<van-image
width=
"45"
height=
"45"
style=
"margin: 0 10px;overflow: hidden; border-radius: 5px;"
:src=
"item.imgUrl"
/>
<van-image
width=
"45"
height=
"45"
style=
"margin: 0 10px;overflow: hidden; border-radius: 5px;"
:src=
"item.imgUrl"
/>
</span>
<div
class=
"icon_wrap_text"
>
<div
class=
"icon_wrap_text1"
>
{{
item
.
content
}}
</div>
<span
class=
"icon_wrap_text2"
v-if=
"item.content=='日查清单'"
>
{{
item
.
startTime
|
formatDate
}}
</span>
<span
class=
"icon_wrap_text2"
v-else
>
{{
item
.
startTime
|
formatDate
}}
至
{{
item
.
validityTime
|
formatDate
}}
</span>
</div>
<div
class=
"icon_wrap_text"
>
<div
class=
"icon_wrap_text1"
>
{{
item
.
content
}}
</div>
<span
class=
"icon_wrap_text2"
v-if=
"item.content == '日查清单'"
>
{{
item
.
startTime
|
formatDate
}}
</span>
<span
class=
"icon_wrap_text2"
v-else
>
{{
item
.
startTime
|
formatDate
}}
至
{{
item
.
validityTime
|
formatDate
}}
</span>
</div>
</div>
</van-cell-group>
</div>
</div>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
postWork
}
from
"
@/service/workbench
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
}
from
"
@/utils/format
"
;
export
default
{
import
LHeader
from
"
@/components/header.vue
"
;
import
{
postWork
}
from
"
@/service/workbench
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
{
timestampToTime
}
from
"
@/utils/format
"
;
export
default
{
name
:
'
patrolExecute
'
,
//巡查执行
components
:
{
LHeader
,
LHeader
,
},
props
:
{
},
data
()
{
return
{
text
:
'
巡查执行
'
,
nowTime
:
""
,
contentList
:
[
],
contentLists
:
[
{
title
:
"
1
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/day_list.png
"
),
content
:
"
日查清单
"
},
{
title
:
"
2
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/week_list.png
"
),
content
:
"
周查清单
"
},
{
title
:
"
3
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/half_month_list.png
"
),
content
:
"
半月查清单
"
},
{
title
:
"
4
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/month_list.png
"
),
content
:
"
月查清单
"
},
{
title
:
"
5
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/quarter_list.png
"
),
content
:
"
季查清单
"
},
{
title
:
"
6
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/year_list.png
"
),
content
:
"
半年查清单
"
},
{
title
:
"
7
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/year_list.png
"
),
content
:
"
年查清单
"
}
]
}
return
{
text
:
'
巡查执行
'
,
nowTime
:
""
,
contentList
:
[
],
contentLists
:
[
{
title
:
"
1
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/day_list.png
"
),
content
:
"
日查清单
"
},
{
title
:
"
2
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/week_list.png
"
),
content
:
"
周查清单
"
},
{
title
:
"
3
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/half_month_list.png
"
),
content
:
"
半月查清单
"
},
{
title
:
"
4
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/month_list.png
"
),
content
:
"
月查清单
"
},
{
title
:
"
5
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/quarter_list.png
"
),
content
:
"
季查清单
"
},
{
title
:
"
6
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/year_list.png
"
),
content
:
"
半年查清单
"
},
{
title
:
"
7
"
,
imgUrl
:
require
(
"
@/assets/dangerPatrol/year_list.png
"
),
content
:
"
年查清单
"
}
]
}
},
created
(){
created
()
{
},
mounted
()
{
this
.
nowTime
=
timestampToTime
(
new
Date
(),
"
DT7
"
,
true
);
this
.
loading
()
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,
status
:
'
0
'
}
loading
()
{
let
userInfoData
=
JSON
.
parse
(
localStorage
.
getItem
(
'
LocalUserInfo
'
))
console
.
log
(
'
userInfoData==>>
'
,
userInfoData
.
userId
)
let
params
=
{
// userId: userInfoData.userId,
status
:
'
0
'
}
getFun
(
"
risk/riskUserPatrol/list
"
,
params
).
then
((
res
)
=>
{
this
.
contentLists
.
forEach
((
x
)
=>
{
res
.
rows
.
forEach
((
y
)
=>
{
if
(
x
.
title
==
y
.
patrolType
)
{
x
.
startTime
=
y
.
startTime
x
.
validityTime
=
y
.
validityTime
this
.
contentLists
.
forEach
((
x
)
=>
{
res
.
rows
.
forEach
((
y
)
=>
{
if
(
x
.
title
==
y
.
patrolType
)
{
x
.
startTime
=
y
.
startTime
x
.
validityTime
=
y
.
validityTime
this
.
contentList
.
push
(
x
)
}
})
...
...
@@ -131,26 +124,32 @@
sessionStorage
.
removeItem
(
'
type
'
)
this
.
$router
.
push
({
name
:
"
implement
"
,
query
:{
id
:
val
.
title
,
content
:
val
.
content
query
:
{
id
:
val
.
title
,
content
:
val
.
content
}
});
},
getProjectId
()
{
getFun
(
'
/risk/riskUserPatrol/getPatrolProjectList
'
).
then
(
res
=>
{
})
}
},
filters
:
{
formatDate
(
time
)
{
return
timestampToTime
(
time
,
"
DT7
"
,
true
)
}
filters
:
{
formatDate
(
time
)
{
return
timestampToTime
(
time
,
"
DT7
"
,
true
)
}
}
}
</
script
>
<
style
scoped
lang=
'less'
>
.wrap {
height: 100vh;
width: 100vw;
height: 100vh;
width: 100vw;
}
.van-cell-group--inset {
// height: 2.266667rem;
line-height: 2.266667rem;
...
...
@@ -159,22 +158,27 @@
margin: 0.266667rem;
padding-left: 0.666667rem;
color: #646566;
.icon-wrap {
display: flex;
align-items: center;
.icon-img {
margin-right: 0.533333rem;
display: inherit;
}
.icon_wrap_text{
.icon_wrap_text {
width: 100%;
// padding-top: 0.3rem;
padding-bottom: 0.3rem;
position: relative;
.icon_wrap_text1{
.icon_wrap_text1 {
margin-top: -0.3rem;
}
.icon_wrap_text2{
.icon_wrap_text2 {
position: absolute;
left: 0%;
top: 15%;
...
...
@@ -184,14 +188,16 @@
}
}
}
.title{
.title {
text-align: left;
font-weight: bolder;
margin-top: 0.5rem;
font-size: 13px;
padding-left: 0.666667rem;
}
.title-text{
.title-text {
font-size: 13px;
padding-left: 0.666667rem;
}
...
...
src/views/riskPatrol/patrolLog/index.vue
View file @
bb9a462e
...
...
@@ -3,39 +3,93 @@
<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()"
>
<div
v-for=
"(child, index) in group"
:key=
"index"
>
<van-row
gutter
class=
"con_tip"
>
<van-col
span=
"12"
class=
"con_type"
>
{{
child
.
time
}}
</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-row>
</van-cell-group>
</div>
</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
:
'
巡查记录
'
,
}
},
computed
:
{
},
watch
:
{
},
created
(){
},
mounted
()
{
},
methods
:
{
},
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
name
:
'
patrolLog
'
,
//巡查记录
components
:
{
LHeader
,
},
props
:
{
},
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
},]
}
]
}
},
computed
:
{
},
watch
:
{
},
created
()
{
},
mounted
()
{
},
methods
:
{
},
}
</
script
>
...
...
@@ -44,4 +98,63 @@
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/riskPatrol/patrolLog/logDetail.vue
View file @
bb9a462e
<
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/addPresent.vue
View file @
bb9a462e
This diff is collapsed.
Click to expand it.
src/views/riskProject/add/taskList.vue
View file @
bb9a462e
This diff is collapsed.
Click to expand it.
src/views/riskProject/assess/model/result.vue
View file @
bb9a462e
...
...
@@ -3,10 +3,11 @@
<LHeader
:text=
"text"
></LHeader>
<div
class=
"section"
>
<p>
该次测评风险值为:
</p>
<div
class=
"resultScore"
:style=
"
{ background: result.
color}"
>
<div
class=
"resultScore"
:style=
"
{ background: result.
riskColor }"
>
<p
style=
"font-weight: bold;font-size: 20px;color: white;"
>
{{
this
.
score
}}
</p>
</div>
<div>
本次评估结果评定为:
<h4
style=
"display: inline-block;"
>
{{
result
.
level
}}
</h4></div>
<div>
本次评估结果评定为:
<h4
style=
"display: inline-block;"
>
{{
result
.
level
}}
</h4>
</div>
<ul
class=
"level-group"
>
<div>
测评风险参考值:
</div>
<li>
0%-5% 重大风险
</li>
...
...
@@ -27,62 +28,66 @@
<
script
>
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
name
:
'
modelResult
'
,
components
:{
LHeader
},
data
(){
return
{
text
:
'
测评结果
'
,
score
:
0
,
result
:
null
}
export
default
{
name
:
'
modelResult
'
,
components
:
{
LHeader
},
data
()
{
return
{
text
:
'
测评结果
'
,
score
:
0
,
result
:
null
}
},
created
()
{
this
.
score
=
this
.
$route
.
query
.
score
-
''
;
this
.
getResult
()
},
methods
:
{
getResult
()
{
this
.
result
=
(()
=>
{
if
(
this
.
score
<=
2
)
{
return
{
level
:
'
低风险
'
,
color
:
"
#0091EA
"
}
}
else
if
(
this
.
score
>
2
&&
this
.
score
<=
3
)
{
return
{
level
:
'
一般风险
'
,
color
:
"
#FFFF00
"
}
}
else
if
(
this
.
score
>
3
&&
this
.
score
<=
4
)
{
return
{
level
:
'
较大风险
'
,
color
:
"
#FF9800
"
}
}
else
if
(
this
.
score
>
4
)
{
return
{
level
:
'
重大风险
'
,
color
:
"
#FF4433
"
}
}
else
{
return
{
level
:
''
,
color
:
"
orange
"
}
}
})()
getFun
(
`/risk/plan/existing/matrix/score`
,
{
score
:
this
.
score
,
buildingId
:
sessionStorage
.
getItem
(
'
buildingId
'
)
}).
then
(
res
=>
{
if
(
res
.
data
.
levelScore
)
{
this
.
score
=
res
.
data
.
levelScore
;
}
if
(
res
.
data
.
level
)
{
this
.
result
.
level
=
res
.
data
.
level
;
}
})
},
created
(){
this
.
score
=
this
.
$route
.
query
.
score
-
''
;
this
.
getResult
()
resetClose
()
{
history
.
go
(
-
1
)
},
methods
:{
getResult
(){
this
.
result
=
(()
=>
{
if
(
this
.
score
<=
2
){
return
{
level
:
'
低风险
'
,
color
:
"
#0091EA
"
}
}
else
if
(
this
.
score
>
2
&&
this
.
score
<=
3
){
return
{
level
:
'
一般风险
'
,
color
:
"
#FFFF00
"
}
}
else
if
(
this
.
score
>
3
&&
this
.
score
<=
4
){
return
{
level
:
'
较大风险
'
,
color
:
"
#FF9800
"
}
}
else
if
(
this
.
score
>
4
){
return
{
level
:
'
重大风险
'
,
color
:
"
#FF4433
"
}
}
else
{
return
{
level
:
''
,
color
:
"
orange
"
}
}
})()
getFun
(
`/risk/plan/existing/matrix/score/
${
this
.
score
}
`
).
then
(
res
=>
{
if
(
res
.
data
.
score
){
this
.
score
=
res
.
data
.
score
;
}
if
(
res
.
data
.
level
){
this
.
result
.
level
=
res
.
data
.
level
;
}
})
},
resetClose
(){
history
.
go
(
-
1
)
},
sureClose
(){
this
.
$store
.
commit
(
'
SET_ASSESS_RESULT
'
,{...
this
.
result
,
score
:
this
.
score
})
history
.
go
(
-
3
)
}
sureClose
()
{
this
.
$store
.
commit
(
'
SET_ASSESS_RESULT
'
,
{
...
this
.
result
,
score
:
this
.
score
})
history
.
go
(
-
3
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.wrapper {
width: 100%;
height: 100%;
.section {
width: 100%;
padding: 10px;
...
...
@@ -91,7 +96,8 @@ import LHeader from "@/components/header.vue";
font-size: 14px;
padding-bottom: 50px;
}
.resultScore{
.resultScore {
width: 48px;
height: 48px;
background: #ffc600;
...
...
@@ -100,9 +106,10 @@ import LHeader from "@/components/header.vue";
border-radius: 50%;
margin: 0 auto;
}
.level-group{
>li{
padding:0 20px;
.level-group {
>li {
padding: 0 20px;
margin-top: 20px;
}
}
...
...
vue.config.js
View file @
bb9a462e
...
...
@@ -12,10 +12,10 @@ module.exports = {
// target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://localhost:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: "http://192.168.1
0.137:8080/", //这里是周昊的地址
//
target: "http://192.168.15.230:8080/", //这里是晓静的地址
// target: "http://192.168.1
4.152:8080/", //这里是鲍德的地址
target
:
"
http://192.168.15.230:8080/
"
,
//这里是晓静的地址
// target: 'http://localhost:8081/', //这里是后台的地址
target
:
'
http://127.0.0.1:8080
'
,
//这里是后台的地址
//
target: 'http://127.0.0.1:8080', //这里是后台的地址
ws
:
true
,
changOrigin
:
true
,
//允许跨域
// 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