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
e7e8d28a
Commit
e7e8d28a
authored
Aug 30, 2023
by
p-wanping.song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增签到和固有风险模板
parent
3b09dd00
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
906 additions
and
281 deletions
+906
-281
src/App.vue
src/App.vue
+15
-11
src/components/header.vue
src/components/header.vue
+62
-63
src/router/index.js
src/router/index.js
+28
-0
src/store/mutations.js
src/store/mutations.js
+6
-0
src/store/state.js
src/store/state.js
+4
-0
src/views/my/index.vue
src/views/my/index.vue
+70
-65
src/views/my/sign.vue
src/views/my/sign.vue
+89
-0
src/views/my/signRecode.vue
src/views/my/signRecode.vue
+21
-0
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+168
-142
src/views/riskProject/add/inherentTemplate/detail.vue
src/views/riskProject/add/inherentTemplate/detail.vue
+295
-0
src/views/riskProject/add/inherentTemplate/list.vue
src/views/riskProject/add/inherentTemplate/list.vue
+148
-0
No files found.
src/App.vue
View file @
e7e8d28a
...
...
@@ -26,7 +26,7 @@ import tabBar from "@/components/TabBar";
export
default
{
components
:
{
tabBar
tabBar
,
},
data
()
{
return
{
...
...
@@ -64,7 +64,11 @@ export default {
"
riskApprove
"
,
"
taskList
"
,
"
taskDetail
"
,
"
modelResult
"
"
modelResult
"
,
"
inherent-template-detail
"
,
"
inherent-template
"
,
"
my-sign
"
,
"
sign-recode
"
,
],
// cachePage预先定义的缓存页面
otherCache
:
[],
...
...
@@ -80,8 +84,8 @@ export default {
"
my-delay
"
,
"
risk-account
"
,
"
risk-confirme
"
,
"
my-delay
"
]
"
my-delay
"
,
]
,
// 'report-return', 'risk-return', 风险和隐患的上报退回不需要缓存
};
},
...
...
@@ -104,26 +108,26 @@ export default {
computed
:
{
showTab
()
{
return
!
this
.
noTab
.
includes
(
this
.
$route
.
name
);
}
}
,
},
methods
:
{
// 处理缓存的方法
handleCache
(
roterFromName
,
roterToName
,
markRoterName
)
{
if
(
roterToName
==
markRoterName
)
{
// 从定义缓存列表中移除
if
(
this
.
cachePage
.
findIndex
(
item
=>
item
==
roterFromName
)
!=
-
1
)
{
if
(
this
.
cachePage
.
findIndex
(
(
item
)
=>
item
==
roterFromName
)
!=
-
1
)
{
this
.
cachePage
.
splice
(
this
.
cachePage
.
findIndex
(
item
=>
item
==
roterFromName
),
this
.
cachePage
.
findIndex
(
(
item
)
=>
item
==
roterFromName
),
1
);
}
}
else
{
// 判断有无路由 加入缓存
if
(
this
.
cachePage
.
findIndex
(
item
=>
item
==
roterFromName
)
==
-
1
)
{
if
(
this
.
cachePage
.
findIndex
(
(
item
)
=>
item
==
roterFromName
)
==
-
1
)
{
this
.
cachePage
.
push
(
roterFromName
);
}
}
}
}
,
},
watch
:
{
$route
(
to
,
from
)
{
...
...
@@ -169,8 +173,8 @@ export default {
}
else
{
this
.
transitionName
=
""
;
//同级无过渡效果
}
}
}
}
,
}
,
};
</
script
>
...
...
src/components/header.vue
View file @
e7e8d28a
...
...
@@ -9,76 +9,75 @@
-->
<
template
>
<div>
<van-sticky>
<header
class=
"header"
>
<van-icon
@
click=
"to"
name=
"arrow-left"
class=
"iconColorLeft"
/>
<span>
{{
text
}}
</span>
<!--
<van-icon
name=
"bars"
class=
"iconColorRight"
/>
-->
</header>
</van-sticky>
</div>
<div>
<van-sticky>
<header
class=
"header"
>
<van-icon
@
click=
"to"
name=
"arrow-left"
class=
"iconColorLeft"
/>
<span>
{{
text
}}
</span>
<!--
<van-icon
name=
"bars"
class=
"iconColorRight"
/>
-->
<div
class=
"iconColorRight"
>
<slot
name=
"right"
></slot>
</div>
</header>
</van-sticky>
</div>
</
template
>
<
script
>
export
default
{
props
:{
text
:{
default
:
"
未知
"
,
type
:
String
},
customBack
:{
type
:
Function
,
}
props
:
{
text
:
{
default
:
"
未知
"
,
type
:
String
,
},
data
()
{
return
{
}
customBack
:
{
type
:
Function
,
},
mounted
()
{
},
data
()
{
return
{};
},
mounted
()
{},
methods
:
{
/* 左侧图标跳转方法 */
to
()
{
if
(
this
.
customBack
)
{
this
.
customBack
();
}
else
{
history
.
go
(
-
1
);
}
},
methods
:
{
/* 左侧图标跳转方法 */
to
(){
if
(
this
.
customBack
){
this
.
customBack
()
}
else
{
history
.
go
(
-
1
)
}
}
}
}
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.header
{
width:
100%;
height:
1.5rem;
background:#2980F
7;
text-align: center;
line-height: 1.5rem;
}
.iconColorLeft
{
color: white;
transform: scale(2);
float: left;
position: relative;
top: 40%;
left: 5%;
}
.header span
{
color: white;
font-size: 16px;
margin: auto;
font-family: 'Microsoft YaHei'
;
}
.header .iconColorRight
{
color: white;
float: right;
position: relative;
top: 40
%;
right: 5%
;
transform: scale(2)
;
}
.header
{
width:
100%;
height:
1.5rem;
background: #2980f
7;
text-align: center;
line-height: 1.5rem;
}
.iconColorLeft
{
color: white;
transform: scale(2);
float: left;
position: relative;
top: 40%;
left: 5%;
}
.header span
{
color: white;
font-size: 16px;
margin: auto;
font-family: "Microsoft YaHei"
;
}
.header .iconColorRight
{
color: white;
float: right;
position: relative;
right: 5
%;
font-size: 13px
;
vertical-align: middle
;
}
</
style
>
src/router/index.js
View file @
e7e8d28a
...
...
@@ -35,6 +35,22 @@ const routes = [
},
component
:
()
=>
import
(
"
@/views/my/resetPas
"
),
},
{
path
:
"
/my-sign
"
,
name
:
"
my-sign
"
,
meta
:
{
title
:
"
我的签到
"
,
},
component
:
()
=>
import
(
"
@/views/my/sign
"
),
},
{
path
:
"
/sign-recode
"
,
name
:
"
sign-recode
"
,
meta
:
{
title
:
"
我的签到
"
,
},
component
:
()
=>
import
(
"
@/views/my/signRecode
"
),
},
// 安全工作台页面
{
path
:
"
/save-workbench
"
,
...
...
@@ -150,6 +166,18 @@ const routes = [
name
:
"
riskInherent
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/inherentRisks.vue
"
),
},
//固有风险模板详情
{
path
:
"
/inherent/template/detail
"
,
name
:
"
inherent-template-detail
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/inherentTemplate/detail.vue
"
),
},
//固有风险模板列表
{
path
:
"
/inherent/template
"
,
name
:
"
inherent-template
"
,
component
:
()
=>
import
(
"
../views/riskProject/add/inherentTemplate/list.vue
"
),
},
//新增固有风险
{
path
:
"
/addInherent
"
,
...
...
src/store/mutations.js
View file @
e7e8d28a
...
...
@@ -35,4 +35,10 @@ export default {
SET_ASSESS_RESULT
(
state
,
data
)
{
state
.
assessModel
.
result
=
data
;
},
// 固有风险模板
SET_INHERENT_TEMPLATE
(
state
,
data
)
{
state
.
inherentTemplate
.
id
=
data
;
}
};
src/store/state.js
View file @
e7e8d28a
...
...
@@ -11,5 +11,9 @@ export default {
level
:
""
,
score
:
""
,
},
// 固有风险模板
inherentTemplate
:
{
id
:
''
}
},
};
src/views/my/index.vue
View file @
e7e8d28a
...
...
@@ -2,9 +2,7 @@
<div>
<!-- 头部标签 -->
<van-sticky>
<header
class=
"header-wrap"
>
我的
</header>
<header
class=
"header-wrap"
>
我的
</header>
</van-sticky>
<!-- 内容 -->
...
...
@@ -49,28 +47,26 @@
</div>
</van-cell-group>
-->
<van-cell-group
inset
class=
"my-cell-group"
>
<div
class=
"set-wrap"
v-for=
"(item, key) in menus"
:key=
"key"
@
click=
"$router.push(
{ name: item['name'] })"
>
<van-image
width=
"0.613rem"
height=
"0.613rem"
fit=
"fill"
:src=
"item['img']"
/>
<span>
{{
item
[
"
title
"
]
}}
</span>
</div>
<div
class=
"set-wrap"
v-for=
"(item, key) in menus"
:key=
"key"
@
click=
"$router.push(
{ name: item['name'] })"
>
<van-image
width=
"0.613rem"
height=
"0.613rem"
fit=
"fill"
:src=
"item['img']"
/>
<span>
{{
item
[
"
title
"
]
}}
</span>
</div>
</van-cell-group>
</div>
<!-- 退出系统 -->
<footer
class=
"sign-out"
>
<van-button
type=
"info"
block
@
click=
"logout"
>
退出系统
</van-button>
</footer>
<!-- 退出系统 -->
<footer
class=
"sign-out"
>
<van-button
type=
"info"
block
@
click=
"logout"
>
退出系统
</van-button>
</footer>
<!-- tanBar -->
<tab-bar
:index=
"2"
></tab-bar>
...
...
@@ -79,45 +75,54 @@
<
script
>
import
tabBar
from
"
@/components/TabBar
"
;
import
{
removeToken
}
from
'
@/utils/auth
'
// get token from cookie
import
{
getUserInfo
,
removeLocalUserInfo
,
removeUserInfo
}
from
'
@/utils/userInfo
'
import
{
removeToken
}
from
"
@/utils/auth
"
;
// get token from cookie
import
{
getUserInfo
,
removeLocalUserInfo
,
removeUserInfo
,
}
from
"
@/utils/userInfo
"
;
export
default
{
components
:
{
tabBar
tabBar
,
},
data
()
{
return
{
menus
:
[
// 菜单
{
title
:
"
我的权限
"
,
img
:
require
(
"
@/assets/myTerritory/role.png
"
),
name
:
"
my-role
"
,
},
{
title
:
"
修改密码
"
,
img
:
require
(
"
@/assets/myTerritory/set.png
"
),
name
:
"
my-reset-pas
"
,
},
],
// 菜单
{
title
:
"
我的权限
"
,
img
:
require
(
"
@/assets/myTerritory/role.png
"
),
name
:
"
my-role
"
,
},
{
title
:
"
修改密码
"
,
img
:
require
(
"
@/assets/myTerritory/set.png
"
),
name
:
"
my-reset-pas
"
,
},
{
title
:
"
签到
"
,
img
:
require
(
"
@/assets/myTerritory/set.png
"
),
name
:
"
my-sign
"
,
},
],
userInfo
:
{
portrait
:
require
(
"
@/assets/myTerritory/touxiang.png
"
),
name
:
getUserInfo
()
?
getUserInfo
().
userName
:
"
xxx
"
,
position
:
getUserInfo
()
?
getUserInfo
().
deptName
:
"
xxx部
"
,
}
name
:
getUserInfo
()
?
getUserInfo
().
userName
:
"
xxx
"
,
position
:
getUserInfo
()
?
getUserInfo
().
deptName
:
"
xxx部
"
,
}
,
};
},
mounted
()
{},
methods
:
{
logout
()
{
removeToken
()
// removeLocalUserInfo()
removeUserInfo
()
sessionStorage
.
clear
()
this
.
$router
.
push
(
"
/login
"
);
// location.reload();
}
}
removeToken
();
// removeLocalUserInfo()
removeUserInfo
();
sessionStorage
.
clear
();
this
.
$router
.
push
(
"
/login
"
);
// location.reload();
}
,
}
,
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
@@ -136,7 +141,7 @@ export default {
padding: 10px 0 50px 0;
background-color: #f0f1f5;
position: relative;
.user-box{
.user-box
{
display: flex;
align-items: center;
}
...
...
@@ -172,22 +177,22 @@ export default {
// }
// }
.my-cell-group {
padding: 10px 10px !important;
.set-wrap {
height: 1.1rem;
display: flex;
align-items: center;
border-bottom: 1px solid #e8e8e8;
&:last-child {
border-bottom: none;
}
span {
margin-left: 0.2666rem;
font-size: 13px;
font-weight: none;
}
}
padding: 10px 10px !important;
.set-wrap {
height: 1.1rem;
display: flex;
align-items: center;
border-bottom: 1px solid #e8e8e8;
&:last-child {
border-bottom: none;
}
span {
margin-left: 0.2666rem;
font-size: 13px;
font-weight: none;
}
}
}
}
.sign-out {
...
...
src/views/my/sign.vue
0 → 100644
View file @
e7e8d28a
<
template
>
<div>
<LHeader
:text=
"$route.meta.title"
>
<span
slot=
"right"
@
click=
"() => this.$router.push('sign-recode')"
>
签到记录
</span
>
</LHeader>
<van-form
ref=
"signForm"
label-width=
"4em"
validate-trigger=
"onSubmit"
:colon=
"true"
>
<van-field
readonly
name=
"projectName"
:value=
"form.projectName"
label=
"用户名"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '用户名不能为空' }]"
>
</van-field>
<van-field
required
name=
"remark"
:value=
"form.remark"
label=
"备注"
placeholder=
"请输入"
type=
"textarea"
:rules=
"[
{ required: true, message: '备注不能为空' }]"
>
</van-field>
<van-field
readonly
required
name=
"photo"
label=
"照片"
:rules=
"[
{ required: true, message: '照片不能为空' }]"
>
<template
#input
>
<van-uploader
v-model=
"form.photo"
:after-read=
"afterRead"
:max-count=
"1"
>
</van-uploader>
</
template
>
</van-field>
<div
class=
"submit-btns"
>
<van-button
round
block
type=
"info"
@
click=
"toSign(1)"
>
签到
</van-button>
<van-button
round
block
type=
"info"
@
click=
"toSign(0)"
>
签退
</van-button>
</div>
</van-form>
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
components
:
{
LHeader
,
},
data
()
{
return
{
form
:
{
photo
:
[],
},
};
},
methods
:
{
afterRead
(
file
)
{
this
.
form
.
photo
=
file
.
file
;
},
toSign
(
type
)
{
this
.
$refs
.
signForm
.
validate
();
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.submit-btns {
display: flex;
padding: 20px 0 20px 20px;
> .van-button {
margin-right: 20px;
}
}
</
style
>
src/views/my/signRecode.vue
0 → 100644
View file @
e7e8d28a
<
template
>
<div>
<LHeader
text=
"签到记录"
>
</LHeader>
<div>
<van-cell
title=
"签到"
value=
"2023/08/30 "
>
<template
#label
>
<div>
备注:123
</div>
<div>
照片:
<img
src=
""
alt=
""
/></div>
</
template
>
</van-cell>
<van-cell
title=
"签退"
value=
"2023/08/30 "
/>
</div>
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
export
default
{
components
:
{
LHeader
}
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/riskProject/add/addInherent.vue
View file @
e7e8d28a
This diff is collapsed.
Click to expand it.
src/views/riskProject/add/inherentTemplate/detail.vue
0 → 100644
View file @
e7e8d28a
<!-- 导入固有风险模板详情 -->
<
template
>
<div>
<LHeader
text=
"固有风险信息"
></LHeader>
<van-form>
<van-field
required
clickable
name=
"name"
v-model=
"form.name"
label=
"危险源名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '危险源名称不能为空' }]"
/>
<!-- 单选 -->
<van-field
readonly
required
clickable
name=
"pointType"
v-model=
"form.pointType"
label=
"风险点类型"
placeholder=
"请选择"
:rules=
"[
{ required: true, message: '风险点类型不能为空' }]"
/>
<van-field
required
label=
"是否为特种设备"
v-show=
"form.pointType == '设备设施类'"
>
<template
#input
>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<van-switch
v-model=
"form.specialEquipment"
size=
"20"
name=
"specialEquipment"
/>
<span
style=
"margin-left: 10px; color: green"
>
是
</span>
</
template
>
</van-field>
<!-- 多选 -->
<van-field
v-model=
"form.safetyWarningSigns"
readonly
required
name=
"safetyWarningSigns"
label=
"安全警示标志"
placeholder=
"请选择"
:rules=
"[{ required: true, message: '安全警示标志不能为空' }]"
/>
<van-field
v-model=
"form.factor"
readonly
required
name=
"factor"
label=
"风险因素"
placeholder=
"请选择"
:rules=
"[{ required: true, message: '风险因素不能为空' }]"
/>
<van-field
readonly
v-model=
"form.type"
required
name=
"type"
label=
"准事故类型"
placeholder=
"请选择"
:rules=
"[{ required: true, message: '准事故类型不能为空' }]"
/>
<van-field
readonly
v-model=
"form.level"
required
name=
"level"
label=
"风险等级"
placeholder=
"请选择"
:rules=
"[{ required: true, message: '风险等级不能为空' }]"
/>
<van-field
required
name=
"presenceLocation"
v-model=
"form.presenceLocation"
label=
"存在部位"
placeholder=
"请输入"
:rules=
"[{ required: true, message: '存在部位不能为空' }]"
/>
<div
style=
"
height: 1rem;
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
font-weight: 700;
line-height: 1rem;
"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative; top: 32%; transform: translateY(-50%)"
/>
应采取的管控措施
</div>
<van-field
label=
"技术措施"
>
<
template
#input
>
<van-field
v-model=
"form.measuresProject"
name=
"measuresProject"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</van-field>
<van-field
label=
"管理措施"
>
<
template
#input
>
<van-field
v-model=
"form.measuresAdministration"
name=
"measuresAdministration"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</van-field>
<van-field
label=
"应急措施"
>
<
template
#input
>
<van-field
v-model=
"form.measuresEmergency"
name=
"measuresEmergency"
label=
""
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
style=
"padding-left: 0; padding-top: 0"
/>
</
template
>
</van-field>
<van-field
v-model=
"form.measuresDeptName"
name=
"measuresDeptName"
label=
"管控责任单位 "
type=
"input"
rows=
"1"
autosize
placeholder=
"请输入"
list=
"measure-deptname"
@
input=
"measuresDeptNameChange"
/>
<van-field
v-model=
"form.measuresUserName"
name=
"measuresUserName"
label=
"管控责任人 "
type=
"input"
rows=
"1"
autosize
placeholder=
"请输入"
list=
"measure-name"
@
input=
"measuresUserNameChange"
/>
<van-field
v-model=
"form.measuresUserPhone"
name=
"measuresUserPhone"
label=
"管控责任人联系方式"
type=
"input"
rows=
"1"
autosize
placeholder=
"请输入"
maxlength=
"11"
/>
<div
style=
"
height: 1rem;
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑';
font-weight: 700;
line-height: 1rem;
"
>
<img
src=
"@/assets/accidentIcon/bookmark.svg"
alt=
""
style=
"position: relative; top: 32%; transform: translateY(-50%)"
/>
重大危险源管理
</div>
<van-field
name=
"majorHazardSource"
label=
"是否为重大危险源"
>
<
template
#input
>
<span
style=
"margin-right: 10px; color: red"
>
否
</span>
<van-switch
v-model=
"form.majorHazardSource"
size=
"20"
/>
<span
style=
"margin-left: 10px; color: green"
>
是
</span>
</
template
>
</van-field>
<van-field
:disabled=
"!form.majorHazardSource"
v-model=
"form.hazardSourceName"
:required=
"form.majorHazardSource"
name=
"hazardSourceName"
label=
"危险源名称 "
type=
"textarea"
rows=
"1"
autosize
placeholder=
"请输入"
:key=
"form.majorHazardSource + '123'"
:rules=
"
form.majorHazardSource
? [{ required: true, message: '危险源名称不能为空' }]
: []
"
/>
<van-field
label=
"重大危险源描述"
:disabled=
"!form.majorHazardSource"
:required=
"form.majorHazardSource"
>
<
template
#input
>
<van-field
:disabled=
"!form.majorHazardSource"
v-model=
"form.majorHazardSourceDescription"
name=
"majorHazardSourceDescription"
type=
"textarea"
rows=
"3"
autosize
placeholder=
"请输入"
:key=
"form.majorHazardSource + '456'"
:rules=
"
form.majorHazardSource
? [
{ required: true, message: '重大危险源描述不能为空' }]
: []
"
style="padding-left: 0; padding-top: 0"
/>
</
template
>
</van-field>
<van-field
:disabled=
"!form.majorHazardSource"
:required=
"form.majorHazardSource"
readonly
clickable
name=
"referenceBasis"
:value=
"form.referenceBasis == 'null' ? '' : form.referenceBasis"
label=
"判断依据"
placeholder=
"请选择"
:key=
"form.majorHazardSource + '789'"
:rules=
"
form.majorHazardSource
? [{ required: true, message: '判断依据不能为空' }]
: []
"
/>
<van-button
round
block
type=
"info"
@
click=
"toImport"
>
导入
</van-button>
</van-form>
</div>
</template>
<
script
>
import
LHeader
from
"
@/components/header.vue
"
;
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
export
default
{
components
:
{
LHeader
},
data
()
{
return
{
form
:
{},
};
},
mounted
()
{
this
.
postReturnEcho
();
},
methods
:
{
// 请求详情数据
postReturnEcho
()
{
getFun
(
`/risk/plan/inherent/details/135`
)
.
then
((
res
)
=>
{
this
.
form
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
clear
();
});
},
toImport
()
{
this
.
$router
.
go
(
-
2
);
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/views/riskProject/add/inherentTemplate/list.vue
0 → 100644
View file @
e7e8d28a
<!-- 导入固有风险模板列表 -->
<
template
>
<div
class=
"inherent-template"
>
<LHeader
text=
"固有风险模板"
></LHeader>
<div
class=
"con-list"
>
<van-cell-group
inset
v-for=
"(item, index) in messageList"
:key=
"index"
@
click=
"touchstart(index, item)"
>
<div
style=
"font-size: 0.45rem; padding: 5px 0"
>
{{
item
.
name
}}
</div>
<van-row
gutter=
""
>
<van-col
span=
"17"
>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
发起时间:
</van-col>
<van-col
span=
"15"
>
{{
timestampToTimes
(
item
.
createTime
)
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
楼层:
</van-col>
<van-col
span=
"15"
>
{{
item
.
floorName
}}
</van-col>
</van-row>
<van-row
gutter=
""
>
<van-col
span=
"9"
>
房间:
</van-col>
<van-col
span=
"15"
>
{{
item
.
roomName
}}
</van-col>
</van-row>
</van-col>
<!--
<van-col
span=
"7"
:style=
"
{ color: item.state == 1 ? '#0069e5' : '#03b615' }">
{{
"
●待审批
"
}}
</van-col>
-->
</van-row>
<van-overlay
:show=
"showIndex == index"
>
<div
class=
"wrapper"
@
click.stop=
"showIndex = null"
>
<van-button
round
type=
"info"
@
click=
"toImport(item)"
>
导入
</van-button
>
<van-button
round
type=
"primary"
@
click=
"toDetail(item)"
>
详情
</van-button
>
</div>
</van-overlay>
</van-cell-group>
<div
style=
"
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if=
"messageList['length'] == 0"
>
暂无数据
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getFun
,
postFun
}
from
"
@/service/table.js
"
;
import
LHeader
from
"
@/components/header.vue
"
;
import
{
timestampToTime
,
generateId
}
from
"
@/utils/format
"
;
export
default
{
components
:
{
LHeader
},
data
()
{
return
{
messageList
:
[],
showIndex
:
null
,
item
:
null
,
};
},
mounted
()
{
this
.
getList
();
},
methods
:
{
toDetail
(
item
)
{
this
.
$router
.
push
({
path
:
"
/inherent/template/detail
"
,
query
:
{
id
:
item
.
id
,
},
});
},
toImport
()
{
this
.
$router
.
go
(
-
1
);
},
touchstart
(
index
,
item
)
{
this
.
showIndex
=
index
;
this
.
item
=
item
;
},
getList
()
{
getFun
(
`/risk/plan/inherent/list/137/1`
)
.
then
((
res
)
=>
{
this
.
messageList
=
res
.
data
;
})
.
catch
(()
=>
{
this
.
$toast
.
fail
(
"
加载失败,请稍后再试
"
);
});
},
timestampToTimes
(
time
)
{
return
timestampToTime
(
new
Date
(
time
),
"
DT2
"
,
true
);
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.inherent-template {
.con-list {
padding: 0;
min-height: 10rem;
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%;
}
}
}
}
}
</
style
>
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