Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
王浩
zh-baseversion-project
Commits
a293de31
Commit
a293de31
authored
Jul 26, 2024
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 台账管理-燃气事故台账 逻辑调整,企业和政府都可以录入,政府查看企业数据。
2 台账管理-燃气事故台账 详情界面展示优化。
parent
78a38583
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
334 additions
and
45 deletions
+334
-45
TSafeEquipmentStandingBook.java
.../com/zehong/system/domain/TSafeEquipmentStandingBook.java
+1
-1
TTroubleStandingBook.java
...n/java/com/zehong/system/domain/TTroubleStandingBook.java
+37
-8
TTroubleStandingBookForm.java
...m/zehong/system/domain/form/TTroubleStandingBookForm.java
+2
-0
TSafeEquipmentStandingBookServiceImpl.java
...m/service/impl/TSafeEquipmentStandingBookServiceImpl.java
+1
-1
TTroubleStandingBookServiceImpl.java
.../system/service/impl/TTroubleStandingBookServiceImpl.java
+16
-0
TTroubleStandingBookMapper.xml
...in/resources/mapper/system/TTroubleStandingBookMapper.xml
+22
-10
index.vue
...aseversion-web/src/views/standingBook/equipment/index.vue
+4
-0
DetailInfo.vue
...version-web/src/views/standingBook/trouble/DetailInfo.vue
+170
-0
index.vue
zh-baseversion-web/src/views/standingBook/trouble/index.vue
+81
-25
No files found.
zh-baseversion-system/src/main/java/com/zehong/system/domain/TSafeEquipmentStandingBook.java
View file @
a293de31
...
@@ -53,7 +53,7 @@ public class TSafeEquipmentStandingBook extends BaseEntity
...
@@ -53,7 +53,7 @@ public class TSafeEquipmentStandingBook extends BaseEntity
private
String
brandName
;
private
String
brandName
;
/** 是否删除(0正常,1删除) */
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除
(0正常,1删除)
"
)
@Excel
(
name
=
"是否删除
"
,
readConverterExp
=
"0=否,1=是
"
)
private
String
isDel
;
private
String
isDel
;
/** 备注 */
/** 备注 */
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TTroubleStandingBook.java
View file @
a293de31
...
@@ -25,7 +25,7 @@ public class TTroubleStandingBook extends BaseEntity
...
@@ -25,7 +25,7 @@ public class TTroubleStandingBook extends BaseEntity
@Excel
(
name
=
"事故名称"
)
@Excel
(
name
=
"事故名称"
)
private
String
troubleName
;
private
String
troubleName
;
private
Stri
ng
township
;
private
Lo
ng
township
;
/** 事故地点 */
/** 事故地点 */
@Excel
(
name
=
"事故地点"
)
@Excel
(
name
=
"事故地点"
)
...
@@ -38,7 +38,7 @@ public class TTroubleStandingBook extends BaseEntity
...
@@ -38,7 +38,7 @@ public class TTroubleStandingBook extends BaseEntity
private
BigDecimal
latitude
;
private
BigDecimal
latitude
;
/** 事故类型:1.生产安全事故 2.非生产安全事故 */
/** 事故类型:1.生产安全事故 2.非生产安全事故 */
@Excel
(
name
=
"事故类型
:1.生产安全事故 2.
非生产安全事故"
)
@Excel
(
name
=
"事故类型
"
,
readConverterExp
=
"1=生产安全事故,2=
非生产安全事故"
)
private
String
troubleType
;
private
String
troubleType
;
/** 简要经过 */
/** 简要经过 */
...
@@ -46,11 +46,11 @@ public class TTroubleStandingBook extends BaseEntity
...
@@ -46,11 +46,11 @@ public class TTroubleStandingBook extends BaseEntity
private
String
briefProcess
;
private
String
briefProcess
;
/** 事故原因 */
/** 事故原因 */
@Excel
(
name
=
"事故原因"
)
@Excel
(
name
=
"事故原因"
,
dictType
=
"t_trouble_reason"
)
private
String
troubleReason
;
private
String
troubleReason
;
/** 是否人员伤亡 */
/** 是否人员伤亡 */
@Excel
(
name
=
"是否人员伤亡"
)
@Excel
(
name
=
"是否人员伤亡"
,
readConverterExp
=
"1=是,2=否"
)
private
String
isCasualties
;
private
String
isCasualties
;
/** 受伤人数 */
/** 受伤人数 */
...
@@ -70,7 +70,7 @@ public class TTroubleStandingBook extends BaseEntity
...
@@ -70,7 +70,7 @@ public class TTroubleStandingBook extends BaseEntity
private
String
responsiblePeople
;
private
String
responsiblePeople
;
/** 是否处理:1.已处理 2.未处理 */
/** 是否处理:1.已处理 2.未处理 */
@Excel
(
name
=
"是否处理
:1.已处理 2.未处理
"
)
@Excel
(
name
=
"是否处理
"
,
readConverterExp
=
"1=是,2=否
"
)
private
String
isDeal
;
private
String
isDeal
;
/** 事故发生时间 */
/** 事故发生时间 */
...
@@ -84,18 +84,47 @@ public class TTroubleStandingBook extends BaseEntity
...
@@ -84,18 +84,47 @@ public class TTroubleStandingBook extends BaseEntity
private
Date
dealDate
;
private
Date
dealDate
;
/** 是否删除(0正常,1删除) */
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除
(0正常,1删除)
"
)
@Excel
(
name
=
"是否删除
"
,
readConverterExp
=
"0=否,1=是
"
)
private
String
isDel
;
private
String
isDel
;
/** 备注 */
/** 备注 */
@Excel
(
name
=
"备注"
)
@Excel
(
name
=
"备注"
)
private
String
remarks
;
private
String
remarks
;
public
String
getTownship
()
{
/**
* 所属企业id 不是必填
*/
private
String
enterpriseId
;
/**
* 所属企业name 查询 和 导出使用
*/
/** 备注 */
@Excel
(
name
=
"所属企业"
)
private
String
enterpriseName
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
Long
getTownship
()
{
return
township
;
return
township
;
}
}
public
void
setTownship
(
Stri
ng
township
)
{
public
void
setTownship
(
Lo
ng
township
)
{
this
.
township
=
township
;
this
.
township
=
township
;
}
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/form/TTroubleStandingBookForm.java
View file @
a293de31
...
@@ -44,4 +44,6 @@ public class TTroubleStandingBookForm
...
@@ -44,4 +44,6 @@ public class TTroubleStandingBookForm
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
dealDateEnd
;
private
Date
dealDateEnd
;
private
String
enterpriseId
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TSafeEquipmentStandingBookServiceImpl.java
View file @
a293de31
...
@@ -48,7 +48,7 @@ public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentSta
...
@@ -48,7 +48,7 @@ public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentSta
public
List
<
TSafeEquipmentStandingBook
>
selectTSafeEquipmentStandingBookList
(
TSafeEquipmentStandingBookForm
tSafeEquipmentStandingBook
)
public
List
<
TSafeEquipmentStandingBook
>
selectTSafeEquipmentStandingBookList
(
TSafeEquipmentStandingBookForm
tSafeEquipmentStandingBook
)
{
{
// 20240725 调整 政府和企业都可以录,企业看自己,政府看所有
// 20240725 调整 政府和企业都可以录,企业看自己,政府看所有
if
(
isEnterprise
())
{
if
(
isEnterprise
()
&&
tSafeEquipmentStandingBook
!=
null
)
{
tSafeEquipmentStandingBook
.
setEnterpriseId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
());
tSafeEquipmentStandingBook
.
setEnterpriseId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
());
}
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TTroubleStandingBookServiceImpl.java
View file @
a293de31
...
@@ -2,8 +2,11 @@ package com.zehong.system.service.impl;
...
@@ -2,8 +2,11 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.zehong.common.core.domain.entity.SysRole
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
com.zehong.system.domain.Statistics
;
import
com.zehong.system.domain.Statistics
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.vo.TTroubleStandingBookVo
;
import
com.zehong.system.domain.vo.TTroubleStandingBookVo
;
...
@@ -46,6 +49,10 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
...
@@ -46,6 +49,10 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
@Override
@Override
public
List
<
TTroubleStandingBook
>
selectTTroubleStandingBookList
(
TTroubleStandingBookForm
tTroubleStandingBook
)
public
List
<
TTroubleStandingBook
>
selectTTroubleStandingBookList
(
TTroubleStandingBookForm
tTroubleStandingBook
)
{
{
// 20240725 调整 政府和企业都可以录,企业看自己,政府看所有
if
(
isEnterprise
()
&&
tTroubleStandingBook
!=
null
)
{
tTroubleStandingBook
.
setEnterpriseId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
());
}
return
tTroubleStandingBookMapper
.
selectTTroubleStandingBookList
(
tTroubleStandingBook
);
return
tTroubleStandingBookMapper
.
selectTTroubleStandingBookList
(
tTroubleStandingBook
);
}
}
...
@@ -159,4 +166,13 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
...
@@ -159,4 +166,13 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
}
}
/**
* 判断是否为企业
* @return
*/
private
boolean
isEnterprise
(){
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
List
<
String
>
roleKeys
=
roles
.
stream
().
map
(
item
->
item
.
getRoleKey
()).
collect
(
Collectors
.
toList
());
return
roleKeys
.
contains
(
"qy"
);
}
}
}
zh-baseversion-system/src/main/resources/mapper/system/TTroubleStandingBookMapper.xml
View file @
a293de31
...
@@ -28,24 +28,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -28,24 +28,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"remarks"
column=
"remarks"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"enterpriseName"
column=
"enterpriseName"
/>
</resultMap>
</resultMap>
<sql
id=
"selectTTroubleStandingBookVo"
>
<sql
id=
"selectTTroubleStandingBookVo"
>
select trouble_id, trouble_name, trouble_location,township, longitude, latitude, trouble_type, brief_process, trouble_reason, is_casualties, injury_num, death_num, responsible_unit, responsible_people, is_deal,happen_date, deal_date, create_by, create_time, update_by, update_time, is_del, remarks from t_trouble_standing_book
select book.trouble_id, book.trouble_name, book.trouble_location,book.township, book.longitude, book.latitude,
book.trouble_type,book.brief_process, book.trouble_reason, book.is_casualties, book.injury_num,
book.death_num, book.responsible_unit,book.responsible_people, book.is_deal,book.happen_date,
book.deal_date, book.create_by, book.create_time, book.update_by,book.update_time, book.is_del,
book.remarks,book.enterprise_id,info.enterprise_name as enterpriseName
from t_trouble_standing_book book
left join t_enterprise_info info on book.enterprise_id = info.enterprise_id
</sql>
</sql>
<select
id=
"selectTTroubleStandingBookList"
parameterType=
"TTroubleStandingBookForm"
resultMap=
"TTroubleStandingBookResult"
>
<select
id=
"selectTTroubleStandingBookList"
parameterType=
"TTroubleStandingBookForm"
resultMap=
"TTroubleStandingBookResult"
>
<include
refid=
"selectTTroubleStandingBookVo"
/>
<include
refid=
"selectTTroubleStandingBookVo"
/>
<where>
is_del = '0'
<where>
book.is_del = '0'
<if
test=
"troubleName != null and troubleName != ''"
>
and trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"troubleName != null and troubleName != ''"
>
and book.trouble_name like concat('%', #{troubleName}, '%')
</if>
<if
test=
"troubleType != null and troubleType != ''"
>
and trouble_type = #{troubleType}
</if>
<if
test=
"troubleType != null and troubleType != ''"
>
and book.trouble_type = #{troubleType}
</if>
<if
test=
"isDeal != null and isDeal != ''"
>
and is_deal = #{isDeal}
</if>
<if
test=
"isDeal != null and isDeal != ''"
>
and book.is_deal = #{isDeal}
</if>
<if
test=
"happenDateStart != null "
>
and happen_date
>
= #{happenDateStart}
</if>
<if
test=
"happenDateStart != null "
>
and book.happen_date
>
= #{happenDateStart}
</if>
<if
test=
"happenDateEnd != null "
>
and happen_date
<
= #{happenDateEnd}
</if>
<if
test=
"happenDateEnd != null "
>
and book.happen_date
<
= #{happenDateEnd}
</if>
<if
test=
"dealDateStart != null "
>
and deal_date
>
= #{dealDateStart}
</if>
<if
test=
"dealDateStart != null "
>
and book.deal_date
>
= #{dealDateStart}
</if>
<if
test=
"dealDateEnd != null "
>
and deal_date
<
= #{dealDateEnd}
</if>
<if
test=
"dealDateEnd != null "
>
and book.deal_date
<
= #{dealDateEnd}
</if>
<if
test=
"enterpriseId != null and enterpriseId!= '' "
>
and book.enterprise_id = #{enterpriseId}
</if>
</where>
</where>
order by create_time desc
order by
book.
create_time desc
</select>
</select>
<select
id=
"selectTTroubleStandingBookStatistic"
resultType=
"TTroubleStandingBookVo"
>
<select
id=
"selectTTroubleStandingBookStatistic"
resultType=
"TTroubleStandingBookVo"
>
...
@@ -86,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -86,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"troubleName != null"
>
#{troubleName},
</if>
<if
test=
"troubleName != null"
>
#{troubleName},
</if>
...
@@ -110,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -110,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -138,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -138,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
</trim>
</trim>
where trouble_id = #{troubleId}
where trouble_id = #{troubleId}
</update>
</update>
...
...
zh-baseversion-web/src/views/standingBook/equipment/index.vue
View file @
a293de31
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userName"
width=
"200px"
/>
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userName"
width=
"200px"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"idCard"
width=
"180px"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"idCard"
width=
"180px"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"linkMobile"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"linkMobile"
/>
<el-table-column
label=
"所属企业"
align=
"center"
prop=
"enterpriseName"
:formatter=
"enterpriseFormat"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"详细地址"
align=
"center"
prop=
"userAddress"
width=
"380px"
/>
<el-table-column
label=
"详细地址"
align=
"center"
prop=
"userAddress"
width=
"380px"
/>
<el-table-column
label=
"安装时间"
align=
"center"
prop=
"installTime"
/>
<el-table-column
label=
"安装时间"
align=
"center"
prop=
"installTime"
/>
<el-table-column
label=
"品牌名称"
align=
"center"
prop=
"brandName"
/>
<el-table-column
label=
"品牌名称"
align=
"center"
prop=
"brandName"
/>
...
@@ -391,6 +392,9 @@ export default {
...
@@ -391,6 +392,9 @@ export default {
this
.
open2
=
false
;
this
.
open2
=
false
;
this
.
reset2
();
this
.
reset2
();
},
},
enterpriseFormat
(
row
){
return
row
.
enterpriseName
==
null
?
"-"
:
row
.
enterpriseName
;
},
// 表单重置
// 表单重置
reset1
()
{
reset1
()
{
this
.
form
=
{
this
.
form
=
{
...
...
zh-baseversion-web/src/views/standingBook/trouble/DetailInfo.vue
0 → 100644
View file @
a293de31
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"1200px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-row>
<el-col
:span=
"14"
>
<el-form
label-width=
"120px"
>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"事故名称:"
>
<span
v-if=
"detailInfo.troubleName"
>
{{
detailInfo
.
troubleName
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
<el-form-item
label=
"事故原因:"
>
<span
v-if=
"detailInfo.troubleReason"
>
{{
detailInfo
.
troubleReason
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
<el-form-item
label=
"责任单位:"
>
<span
v-if=
"detailInfo.responsibleUnit"
>
{{
detailInfo
.
responsibleUnit
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
<el-form-item
label=
"是否人员伤亡:"
>
<span
v-if=
"detailInfo.isCasualties == '1'"
>
是
</span>
<span
v-else-if=
"detailInfo.isCasualties == '2'"
>
否
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"事故类型:"
>
<span
v-if=
"detailInfo.troubleType == '1'"
>
安全生产事故
</span>
<span
v-else-if=
"detailInfo.troubleType == '2'"
>
非生产安全事故
</span>
<span
v-else
>
-
</span>
</el-form-item>
<el-form-item
label=
"事故地点:"
>
<span
v-if=
"detailInfo.troubleLocation"
>
{{
detailInfo
.
troubleLocation
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
<el-form-item
label=
"责任人员:"
>
<span
v-if=
"detailInfo.responsiblePeople"
>
{{
detailInfo
.
responsiblePeople
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
<el-form-item
label=
"是否处理:"
>
<span
v-if=
"detailInfo.isDeal == '1'"
>
已处理
</span>
<span
v-else-if=
"detailInfo.isDeal == '2'"
>
未处理
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if=
"detailInfo.isCasualties == '1'"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"受伤人数:"
>
<span
v-if=
"detailInfo.injuryNum"
>
{{
detailInfo
.
injuryNum
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"死亡人数:"
>
<span
v-if=
"detailInfo.deathNum"
>
{{
detailInfo
.
deathNum
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"处理完成时间:"
>
<span
v-if=
"detailInfo.dealDate"
>
{{
detailInfo
.
dealDate
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"简要经过:"
>
<span
v-if=
"detailInfo.briefProcess"
>
{{
detailInfo
.
briefProcess
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"备注信息:"
>
<span
v-if=
"detailInfo.remarks"
>
{{
detailInfo
.
remarks
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"所属企业:"
>
<span
v-if=
"detailInfo.enterpriseName"
>
{{
detailInfo
.
enterpriseName
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-col>
<el-col
:span=
"9"
>
<div
style=
"width: 100%;height: 390px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;"
>
<div
style=
"width: 100%;height: 100%"
id=
"troubleContainer"
></div>
</div>
</el-col>
</el-row>
</el-dialog>
</
template
>
<
script
>
import
{
getTrouble
}
from
"@/api/standingBook/trouble"
;
import
{
EditorMap
}
from
"@/utils/mapClass/getPath.js"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailInfo
:
{},
enterpriseName
:
""
,
detailOpen
:
false
,
devicePos
:
[],
map
:
null
,
reasonOptions
:[],
}
},
created
()
{
this
.
getDicts
(
"t_trouble_reason"
).
then
(
response
=>
{
this
.
reasonOptions
=
response
.
data
;
});
},
methods
:{
statusFormat2
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
reasonOptions
,
row
.
troubleReason
);
},
getDetailInfo
(
id
){
getTrouble
(
id
).
then
(
response
=>
{
this
.
detailInfo
=
response
.
data
;
this
.
detailInfo
.
troubleReason
=
this
.
statusFormat2
(
this
.
detailInfo
,
0
);
this
.
devicePos
=
[
this
.
detailInfo
.
longitude
,
this
.
detailInfo
.
latitude
];
this
.
detailOpen
=
true
;
this
.
$nextTick
(()
=>
{
this
.
map
=
new
EditorMap
(
"troubleContainer"
,
{},
this
);
this
.
map
.
addDevice
({
path
:
this
.
devicePos
});
this
.
map
.
nowMouseTarget
=
null
;
this
.
map
.
mousetoolClose
(
false
);
});
});
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
zh-baseversion-web/src/views/standingBook/trouble/index.vue
View file @
a293de31
...
@@ -81,7 +81,8 @@
...
@@ -81,7 +81,8 @@
<span
v-if=
"scope.row.troubleType == 2"
>
非生产安全事故
</span>
<span
v-if=
"scope.row.troubleType == 2"
>
非生产安全事故
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"所属乡镇"
align=
"center"
prop=
"township"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"所属企业"
align=
"center"
prop=
"enterpriseName"
:formatter=
"enterpriseFormat"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"所属乡镇"
align=
"center"
prop=
"township"
:formatter=
"beyondCountyFormat"
/>
<el-table-column
label=
"事故地点"
align=
"center"
prop=
"troubleLocation"
width=
"300px"
/>
<el-table-column
label=
"事故地点"
align=
"center"
prop=
"troubleLocation"
width=
"300px"
/>
<el-table-column
label=
"事故发生时间"
align=
"center"
prop=
"happenDate"
width=
"150px"
/>
<el-table-column
label=
"事故发生时间"
align=
"center"
prop=
"happenDate"
width=
"150px"
/>
...
@@ -154,12 +155,12 @@
...
@@ -154,12 +155,12 @@
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"所属乡镇"
prop=
"township"
>
<el-form-item
label=
"所属乡镇"
prop=
"township"
>
<el-select
v-model=
"form.township"
placeholder=
"请选择处理结果"
filterable
style=
"width: 100%"
>
<el-select
v-model=
"form.township"
placeholder=
"请选择处理结果"
filterable
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"dict in addressOptions
"
v-for=
"county in countyInfo
"
:key=
"dict.dictValue
"
:key=
"county.fId
"
:label=
"dict.dictLabel
"
:label=
"county.fName.trim()
"
:value=
"dict.dictValue
"
:value=
"county.fId
"
></el-option
>
/
>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -230,12 +231,12 @@
...
@@ -230,12 +231,12 @@
<el-row
v-if=
"form.isCasualties == '1'"
>
<el-row
v-if=
"form.isCasualties == '1'"
>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"受伤人数"
prop=
"injuryNum"
>
<el-form-item
label=
"受伤人数"
prop=
"injuryNum"
>
<el-input
v-model
.
number=
"form.injuryNum"
placeholder=
"请输入受伤人数"
/>
<el-input
-number
style=
"width: 100%;"
class=
"left-aligned-input"
:controls=
"false"
:min=
"0"
v-model
.
number=
"form.injuryNum"
placeholder=
"请输入受伤人数"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"死亡人数"
prop=
"deathNum"
>
<el-form-item
label=
"死亡人数"
prop=
"deathNum"
>
<el-input
v-model
.
number=
"form.deathNum"
placeholder=
"请输入死亡人数"
/>
<el-input
-number
style=
"width: 100%;"
class=
"left-aligned-input"
:controls=
"false"
:min=
"0"
v-model
.
number=
"form.deathNum"
placeholder=
"请输入死亡人数"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -282,6 +283,16 @@
...
@@ -282,6 +283,16 @@
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入备注信息"
/>
<el-input
type=
"textarea"
v-model=
"form.remarks"
placeholder=
"请输入备注信息"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"所属企业"
prop=
"enterpriseId"
>
<el-select
v-model=
"form.enterpriseId"
placeholder=
"请在下拉框中选择名称"
maxlength=
"255"
style=
"width: 100%;"
>
<el-option
v-for=
"item in enterpriseList"
:key=
"item.enterpriseId"
:label=
"item.enterpriseName"
:value=
"item.enterpriseId"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-form>
</el-form>
...
@@ -380,6 +391,8 @@
...
@@ -380,6 +391,8 @@
@
getPath=
"getPath"
@
getPath=
"getPath"
/>
/>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</div>
</template>
</template>
...
@@ -387,11 +400,14 @@
...
@@ -387,11 +400,14 @@
import
{
listTrouble
,
getTrouble
,
delTrouble
,
addTrouble
,
updateTrouble
,
exportTrouble
}
from
"@/api/standingBook/trouble"
;
import
{
listTrouble
,
getTrouble
,
delTrouble
,
addTrouble
,
updateTrouble
,
exportTrouble
}
from
"@/api/standingBook/trouble"
;
import
GetPos
from
'@/components/GetPos'
;
import
GetPos
from
'@/components/GetPos'
;
import
{
EditorMap
}
from
"@/utils/mapClass/getPath.js"
;
import
{
EditorMap
}
from
"@/utils/mapClass/getPath.js"
;
import
{
selectTEnterprise
}
from
"@/api/regulation/supervise"
;
import
{
getDefaultCountyList
}
from
"@/api/area/county"
;
import
DetailInfo
from
"./DetailInfo"
;
export
default
{
export
default
{
name
:
"Trouble"
,
name
:
"Trouble"
,
components
:
{
components
:
{
GetPos
GetPos
,
DetailInfo
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -401,6 +417,10 @@ export default {
...
@@ -401,6 +417,10 @@ export default {
exportLoading
:
false
,
exportLoading
:
false
,
// 选中数组
// 选中数组
ids
:
[],
ids
:
[],
// 企业数据
enterpriseList
:[],
//县级行政区
countyInfo
:
[],
// 非单个禁用
// 非单个禁用
single
:
true
,
single
:
true
,
// 非多个禁用
// 非多个禁用
...
@@ -490,8 +510,30 @@ export default {
...
@@ -490,8 +510,30 @@ export default {
this
.
getDicts
(
"t_trouble_reason"
).
then
(
response
=>
{
this
.
getDicts
(
"t_trouble_reason"
).
then
(
response
=>
{
this
.
reasonOptions
=
response
.
data
;
this
.
reasonOptions
=
response
.
data
;
});
});
this
.
getEnterp
();
this
.
getCountyInfo
();
},
},
methods
:
{
methods
:
{
//获取县级
getCountyInfo
(){
getDefaultCountyList
().
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
countyInfo
=
res
.
data
;
}
})
},
enterpriseFormat
(
row
){
return
row
.
enterpriseName
==
null
?
"-"
:
row
.
enterpriseName
;
},
beyondCountyFormat
(
row
){
let
info
=
this
.
countyInfo
.
find
(
item
=>
item
.
fId
==
row
.
township
);
return
info
?
info
.
fName
:
"-"
;
},
getEnterp
(){
selectTEnterprise
().
then
(
response
=>
{
this
.
enterpriseList
=
response
.
data
;
});
},
/** 查询事故台账列表 */
/** 查询事故台账列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -602,6 +644,10 @@ export default {
...
@@ -602,6 +644,10 @@ export default {
this
.
reset1
();
this
.
reset1
();
this
.
open1
=
true
;
this
.
open1
=
true
;
this
.
title1
=
"添加燃气事故台账"
;
this
.
title1
=
"添加燃气事故台账"
;
// 如果当前是企业,则直接赋值
if
(
this
.
$store
.
state
.
user
.
roleId
==
5
)
{
this
.
form
.
enterpriseId
=
this
.
enterpriseList
[
0
].
enterpriseId
;
}
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
...
@@ -665,22 +711,24 @@ export default {
...
@@ -665,22 +711,24 @@ export default {
},
},
/** 详细信息跳转 */
/** 详细信息跳转 */
showDetail
(
row
)
{
showDetail
(
row
)
{
this
.
reset2
();
//
this.reset2();
getTrouble
(
row
.
troubleId
).
then
(
response
=>
{
//
getTrouble(row.troubleId).then(response => {
this
.
detailForm
=
response
.
data
;
//
this.detailForm = response.data;
this
.
detailForm
.
troubleReason
=
this
.
statusFormat2
(
this
.
detailForm
,
0
);
//
this.detailForm.troubleReason = this.statusFormat2(this.detailForm,0);
this
.
devicePos
=
[
this
.
detailForm
.
longitude
,
this
.
detailForm
.
latitude
];
//
this.devicePos = [this.detailForm.longitude, this.detailForm.latitude];
console
.
log
(
"this.devicePos"
,
this
.
devicePos
);
//
console.log("this.devicePos",this.devicePos);
this
.
open2
=
true
;
//
this.open2 = true;
this
.
title2
=
"燃气事故台账详情"
;
//
this.title2 = "燃气事故台账详情";
this
.
$nextTick
(()
=>
{
// this.$nextTick(() => {
this
.
map
=
new
EditorMap
(
"troubleContainer"
,
{},
this
);
// this.map = new EditorMap("troubleContainer", {}, this);
this
.
map
.
addDevice
({
path
:
this
.
devicePos
});
// this.map.addDevice({ path: this.devicePos });
this
.
map
.
nowMouseTarget
=
null
;
// this.map.nowMouseTarget = null;
this
.
map
.
mousetoolClose
(
false
);
// this.map.mousetoolClose(false);
});
// });
});
// });
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
troubleId
);
},
},
MapdialogFun
()
{
MapdialogFun
()
{
this
.
dialogTableVisible
=
true
;
this
.
dialogTableVisible
=
true
;
...
@@ -698,3 +746,11 @@ export default {
...
@@ -698,3 +746,11 @@ export default {
}
}
};
};
</
script
>
</
script
>
<
style
>
/* 自定义输入框样式 */
.left-aligned-input
.el-input__inner
{
text-align
:
left
;
padding-left
:
5px
;
/* 根据需要调整内边距 */
}
</
style
>
\ No newline at end of file
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