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
149ffcf9
Commit
149ffcf9
authored
Jun 29, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
意外事故
parent
2dc91e00
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
475 additions
and
57 deletions
+475
-57
TConGasProIncController.java
...ng/web/controller/thirdbuild/TConGasProIncController.java
+15
-0
TConGasProInforController.java
.../web/controller/thirdbuild/TConGasProInforController.java
+5
-0
TConGasProInc.java
...src/main/java/com/zehong/system/domain/TConGasProInc.java
+16
-5
TConGasProIncVo.java
...ain/java/com/zehong/system/domain/vo/TConGasProIncVo.java
+81
-0
ITConGasProIncService.java
...java/com/zehong/system/service/ITConGasProIncService.java
+7
-0
TConGasProIncServiceImpl.java
.../zehong/system/service/impl/TConGasProIncServiceImpl.java
+43
-4
TConGasProInforServiceImpl.java
...ehong/system/service/impl/TConGasProInforServiceImpl.java
+3
-2
TConGasProIncMapper.xml
.../src/main/resources/mapper/system/TConGasProIncMapper.xml
+21
-9
accident.js
zh-baseversion-web/src/api/thirdbuild/accident.js
+8
-0
project.js
zh-baseversion-web/src/api/thirdbuild/project.js
+8
-0
DetailInfo.vue
...b/src/views/thirdbuild/accident/components/DetailInfo.vue
+101
-0
index.vue
zh-baseversion-web/src/views/thirdbuild/accident/index.vue
+167
-37
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/thirdbuild/TConGasProIncController.java
View file @
149ffcf9
...
...
@@ -94,4 +94,19 @@ public class TConGasProIncController extends BaseController
{
return
toAjax
(
tConGasProIncService
.
deleteTConGasProIncByIds
(
fConGasProIncIds
));
}
/**
* 上传第三方施工意外事件
* @param fConGasProIncId 意外事件工id
* @return
*/
@GetMapping
(
"/reportAccidentInfo"
)
public
AjaxResult
reportAccidentInfo
(
Long
fConGasProIncId
){
try
{
return
toAjax
(
tConGasProIncService
.
reportAccidentInfo
(
fConGasProIncId
));
}
catch
(
Exception
e
){
logger
.
error
(
"上传第三方施意外事件工接口异常====="
,
e
);
return
AjaxResult
.
error
(
"上传第三方施工意外事件接口异常"
);
}
}
}
zh-baseversion-admin/src/main/java/com/zehong/web/controller/thirdbuild/TConGasProInforController.java
View file @
149ffcf9
...
...
@@ -44,6 +44,11 @@ public class TConGasProInforController extends BaseController
return
getDataTable
(
list
);
}
@GetMapping
(
"/conGasProInfoList"
)
public
AjaxResult
conGasProInfoList
(
TConGasProInfor
tConGasProInfor
){
return
AjaxResult
.
success
(
tConGasProInforService
.
selectTConGasProInforList
(
tConGasProInfor
));
}
/**
* 导出第三方施工-涉气第三方施工项目档案列表
*/
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TConGasProInc.java
View file @
149ffcf9
...
...
@@ -19,19 +19,21 @@ public class TConGasProInc extends BaseEntity
private
Long
fConGasProIncId
;
/** 项目编码 */
@Excel
(
name
=
"项目编码"
)
private
String
fIntersectConstructionId
;
@Excel
(
name
=
"项目编码"
)
private
String
projectCode
;
/** 意外事件标题 */
@Excel
(
name
=
"意外事件标题"
)
private
String
fTitle
;
/** 意外事件描述,施工过程中发生了燃气管道破坏的情况,但及时妥善处置,未发生事故的详细情况 */
@Excel
(
name
=
"意外事件描述
,施工过程中发生了燃气管道破坏的情况,但及时妥善处置,未发生事故的详细情况
"
)
@Excel
(
name
=
"意外事件描述"
)
private
String
fDescription
;
/** 意外事件发生事件 yyyy-MM-dd hh:mm:ss */
@Excel
(
name
=
"意外事件发生事件
yyyy-MM-dd hh:mm:ss
"
)
@Excel
(
name
=
"意外事件发生事件
时间
"
)
private
String
fOccurrenctTime
;
/** 附件 */
...
...
@@ -43,7 +45,7 @@ public class TConGasProInc extends BaseEntity
private
String
fRemark
;
/** 最后修改时间 yyyy-MM-dd hh:mm:ss */
@Excel
(
name
=
"最后修改时间
yyyy-MM-dd hh:mm:ss
"
)
@Excel
(
name
=
"最后修改时间"
)
private
String
fUpdateTime
;
public
void
setfConGasProIncId
(
Long
fConGasProIncId
)
...
...
@@ -64,6 +66,15 @@ public class TConGasProInc extends BaseEntity
{
return
fIntersectConstructionId
;
}
public
String
getProjectCode
()
{
return
projectCode
;
}
public
void
setProjectCode
(
String
projectCode
)
{
this
.
projectCode
=
projectCode
;
}
public
void
setfTitle
(
String
fTitle
)
{
this
.
fTitle
=
fTitle
;
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/vo/TConGasProIncVo.java
0 → 100644
View file @
149ffcf9
package
com
.
zehong
.
system
.
domain
.
vo
;
public
class
TConGasProIncVo
{
/**项目编码*/
private
String
intersectConstructionId
;
/**意外事件标题*/
private
String
title
;
/**意外事件描述*/
private
String
description
;
/**意 外 事 件 发 生 时 间*/
private
String
occurrenceTime
;
/**附件*/
private
String
attachment
;
/**备注*/
private
String
remark
;
/**最后修改时间*/
private
String
updateTime
;
public
String
getIntersectConstructionId
()
{
return
intersectConstructionId
;
}
public
void
setIntersectConstructionId
(
String
intersectConstructionId
)
{
this
.
intersectConstructionId
=
intersectConstructionId
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getOccurrenceTime
()
{
return
occurrenceTime
;
}
public
void
setOccurrenceTime
(
String
occurrenceTime
)
{
this
.
occurrenceTime
=
occurrenceTime
;
}
public
String
getAttachment
()
{
return
attachment
;
}
public
void
setAttachment
(
String
attachment
)
{
this
.
attachment
=
attachment
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/ITConGasProIncService.java
View file @
149ffcf9
...
...
@@ -58,4 +58,11 @@ public interface ITConGasProIncService
* @return 结果
*/
public
int
deleteTConGasProIncById
(
Long
fConGasProIncId
);
/**
* 上传第三方施工意外事件
* @param fConGasProIncId 意外事件工id
* @return
*/
int
reportAccidentInfo
(
Long
fConGasProIncId
)
throws
Exception
;
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TConGasProIncServiceImpl.java
View file @
149ffcf9
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.Lis
t
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.
system.mapper.TConGasProIncMapper
;
import
com.alibaba.fastjson.JSONObjec
t
;
import
com.zehong.common.exception.CustomException
;
import
com.zehong.common.utils.GovernmentDataCopyUtil
;
import
com.zehong.
common.utils.GovernmentDataUtil
;
import
com.zehong.system.domain.TConGasProInc
;
import
com.zehong.system.domain.vo.TConGasProIncVo
;
import
com.zehong.system.mapper.TConGasProIncMapper
;
import
com.zehong.system.service.ITConGasProIncService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* 第三方施工-涉气第三方施工意外事件Service业务层处理
...
...
@@ -16,9 +28,15 @@ import com.zehong.system.service.ITConGasProIncService;
@Service
public
class
TConGasProIncServiceImpl
implements
ITConGasProIncService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
TConGasProIncServiceImpl
.
class
);
@Autowired
private
TConGasProIncMapper
tConGasProIncMapper
;
@Resource
private
GovernmentDataUtil
governmentDataUtil
;
/**
* 查询第三方施工-涉气第三方施工意外事件
*
...
...
@@ -52,6 +70,7 @@ public class TConGasProIncServiceImpl implements ITConGasProIncService
@Override
public
int
insertTConGasProInc
(
TConGasProInc
tConGasProInc
)
{
tConGasProInc
.
setfUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
return
tConGasProIncMapper
.
insertTConGasProInc
(
tConGasProInc
);
}
...
...
@@ -64,6 +83,7 @@ public class TConGasProIncServiceImpl implements ITConGasProIncService
@Override
public
int
updateTConGasProInc
(
TConGasProInc
tConGasProInc
)
{
tConGasProInc
.
setfUpdateTime
(
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
()));
return
tConGasProIncMapper
.
updateTConGasProInc
(
tConGasProInc
);
}
...
...
@@ -90,4 +110,23 @@ public class TConGasProIncServiceImpl implements ITConGasProIncService
{
return
tConGasProIncMapper
.
deleteTConGasProIncById
(
fConGasProIncId
);
}
/**
* 上传第三方施工意外事件
* @param fConGasProIncId 意外事件工id
* @return
*/
@Override
public
int
reportAccidentInfo
(
Long
fConGasProIncId
)
throws
Exception
{
TConGasProInc
conGasProInc
=
tConGasProIncMapper
.
selectTConGasProIncById
(
fConGasProIncId
);
TConGasProIncVo
conGasProIncVo
=
new
TConGasProIncVo
();
GovernmentDataCopyUtil
.
copyToGovernData
(
conGasProInc
,
conGasProIncVo
);
conGasProIncVo
.
setIntersectConstructionId
(
conGasProInc
.
getProjectCode
());
List
<
TConGasProIncVo
>
data
=
new
ArrayList
<>();
data
.
add
(
conGasProIncVo
);
JSONObject
reportResult
=
governmentDataUtil
.
setInfo
(
"construction/gas/project/incident"
,
"WRITE"
,
data
);
log
.
info
(
"上传第三方施工意外事件结果==================="
+
reportResult
.
toJSONString
());
if
(!
"0"
.
equals
(
reportResult
.
getString
(
"resultCode"
)))
throw
new
CustomException
(
"上传第三方施意外事件工接口失败"
);
return
1
;
}
}
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TConGasProInforServiceImpl.java
View file @
149ffcf9
...
...
@@ -18,8 +18,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.text.SimpleDateFormat
;
import
java.time.Year
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -94,8 +96,7 @@ public class TConGasProInforServiceImpl implements ITConGasProInforService
* @return 结果
*/
@Override
public
int
updateTConGasProInfor
(
TConGasProInfor
tConGasProInfor
)
{
public
int
updateTConGasProInfor
(
TConGasProInfor
tConGasProInfor
){
return
tConGasProInforMapper
.
updateTConGasProInfor
(
tConGasProInfor
);
}
...
...
zh-baseversion-system/src/main/resources/mapper/system/TConGasProIncMapper.xml
View file @
149ffcf9
...
...
@@ -16,25 +16,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTConGasProIncVo"
>
select f_con_gas_pro_inc_id, f_intersect_construction_id, f_title, f_description, f_occurrenct_time, f_attachment, f_remark, f_update_time from t_con_gas_pro_inc
SELECT
inc.f_con_gas_pro_inc_id,
inc.f_intersect_construction_id,
inc.f_title,
inc.f_description,
inc.f_occurrenct_time,
inc.f_attachment,
inc.f_remark,
inc.f_update_time,
info.f_project_code AS projectCode
FROM
t_con_gas_pro_inc inc
LEFT JOIN t_con_gas_pro_infor info ON info.f_con_gas_pro_infor_id = inc.f_intersect_construction_id
</sql>
<select
id=
"selectTConGasProIncList"
parameterType=
"TConGasProInc"
resultMap=
"TConGasProIncResult"
>
<include
refid=
"selectTConGasProIncVo"
/>
<where>
<if
test=
"fIntersectConstructionId != null and fIntersectConstructionId != ''"
>
and f_intersect_construction_id = #{fIntersectConstructionId}
</if>
<if
test=
"fTitle != null and fTitle != ''"
>
and f_title = #{fTitle}
</if>
<if
test=
"fDescription != null and fDescription != ''"
>
and f_description = #{fDescription}
</if>
<if
test=
"fOccurrenctTime != null and fOccurrenctTime != ''"
>
and f_occurrenct_time = #{fOccurrenctTime}
</if>
<if
test=
"fAttachment != null and fAttachment != ''"
>
and f_attachment = #{fAttachment}
</if>
<if
test=
"fRemark != null and fRemark != ''"
>
and f_remark = #{fRemark}
</if>
<if
test=
"fUpdateTime != null and fUpdateTime != ''"
>
and f_update_time = #{fUpdateTime}
</if>
<if
test=
"fIntersectConstructionId != null and fIntersectConstructionId != ''"
>
and
inc.
f_intersect_construction_id = #{fIntersectConstructionId}
</if>
<if
test=
"fTitle != null and fTitle != ''"
>
and
inc.
f_title = #{fTitle}
</if>
<if
test=
"fDescription != null and fDescription != ''"
>
and
inc.
f_description = #{fDescription}
</if>
<if
test=
"fOccurrenctTime != null and fOccurrenctTime != ''"
>
and
inc.
f_occurrenct_time = #{fOccurrenctTime}
</if>
<if
test=
"fAttachment != null and fAttachment != ''"
>
and
inc.
f_attachment = #{fAttachment}
</if>
<if
test=
"fRemark != null and fRemark != ''"
>
and
inc.
f_remark = #{fRemark}
</if>
<if
test=
"fUpdateTime != null and fUpdateTime != ''"
>
and
inc.
f_update_time = #{fUpdateTime}
</if>
</where>
</select>
<select
id=
"selectTConGasProIncById"
parameterType=
"Long"
resultMap=
"TConGasProIncResult"
>
<include
refid=
"selectTConGasProIncVo"
/>
where f_con_gas_pro_inc_id = #{fConGasProIncId}
where
inc.
f_con_gas_pro_inc_id = #{fConGasProIncId}
</select>
<insert
id=
"insertTConGasProInc"
parameterType=
"TConGasProInc"
useGeneratedKeys=
"true"
keyProperty=
"fConGasProIncId"
>
...
...
zh-baseversion-web/src/api/thirdbuild/accident.js
View file @
149ffcf9
...
...
@@ -51,3 +51,11 @@ export function exportInc(query) {
params
:
query
})
}
export
function
reportAccidentInfo
(
query
)
{
return
request
({
url
:
'/third/accident/reportAccidentInfo'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/api/thirdbuild/project.js
View file @
149ffcf9
...
...
@@ -59,3 +59,11 @@ export function reportConGasProInfo(query) {
params
:
query
})
}
export
function
conGasProInfoList
(
query
)
{
return
request
({
url
:
'/third/project/conGasProInfoList'
,
method
:
'get'
,
params
:
query
})
}
zh-baseversion-web/src/views/thirdbuild/accident/components/DetailInfo.vue
0 → 100644
View file @
149ffcf9
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"800px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
label-width=
"140px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"项目编码"
>
<span
v-if=
"detailInfo.projectCode"
>
{{
detailInfo
.
projectCode
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"意外事件标题"
>
<span
v-if=
"detailInfo.fTitle"
>
{{
detailInfo
.
fTitle
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"意外事件描述"
>
<span
v-if=
"detailInfo.fDescription"
>
{{
detailInfo
.
fDescription
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"意外事件发生时间"
>
<span
v-if=
"detailInfo.fOccurrenctTime"
>
{{
detailInfo
.
fOccurrenctTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"附件"
>
<span
class=
"dbtn"
@
click=
"$parent.checkFile(detailInfo.fAttachment)"
v-if=
"detailInfo.fAttachment != null && detailInfo.fAttachment!=''"
>
<i
class=
"el-icon el-icon-view"
></i>
查看/下载
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
>
<span
v-if=
"detailInfo.fRemark"
>
{{
detailInfo
.
fRemark
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"更新时间"
>
<span
v-if=
"detailInfo.fUpdateTime"
>
{{
detailInfo
.
fUpdateTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
getInc
}
from
"@/api/thirdbuild/accident"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailInfo
:
{},
detailOpen
:
false
}
},
methods
:{
getDetailInfo
(
id
){
getInc
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
detailInfo
=
res
.
data
;
this
.
detailOpen
=
true
;
}
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.dbtn
{
display
:
inline-block
;
line-height
:
normal
;
padding-left
:
2px
;
padding-right
:
2px
;
cursor
:
pointer
;
border-radius
:
3px
;
border-style
:
solid
;
border-width
:
0
;
color
:
rgb
(
48
,
180
,
107
);
}
</
style
>
zh-baseversion-web/src/views/thirdbuild/accident/index.vue
View file @
149ffcf9
...
...
@@ -70,16 +70,39 @@
<el-table
v-loading=
"loading"
:data=
"incList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"id"
align=
"center"
prop=
"fConGasProIncId"
/>
<el-table-column
label=
"项目编码"
align=
"center"
prop=
"fIntersectConstructionId"
/>
<el-table-column
label=
"意外事件标题"
align=
"center"
prop=
"fTitle"
/>
<el-table-column
label=
"意外事件描述"
align=
"center"
prop=
"fDescription"
/>
<el-table-column
label=
"意外事件发生事件"
align=
"center"
prop=
"fOccurrenctTime"
/>
<el-table-column
label=
"附件"
align=
"center"
prop=
"fAttachment"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"fRemark"
/>
<el-table-column
label=
"项目编码"
align=
"center"
prop=
"projectCode"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"意外事件标题"
align=
"center"
prop=
"fTitle"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"意外事件描述"
align=
"center"
prop=
"fDescription"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"意外事件发生事件"
align=
"center"
prop=
"fOccurrenctTime"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"附件"
align=
"center"
prop=
"fAttachment"
>
<template
slot-scope=
"scope"
>
<span
class=
"dbtn"
@
click=
"checkFile(scope.row.fAttachment)"
v-if=
"scope.row.fAttachment != null && scope.row.fAttachment!=''"
>
<i
class=
"el-icon el-icon-view"
></i>
查看/下载
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
align=
"center"
prop=
"fRemark"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.fRemark"
>
{{
scope
.
row
.
fRemark
}}
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"最后修改时间"
align=
"center"
prop=
"fUpdateTime"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-document"
@
click=
"handleDetail(scope.row)"
>
详情
</el-button>
<el-button
size=
"mini"
type=
"text"
...
...
@@ -92,6 +115,11 @@
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleReport(scope.row)"
>
上传
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -105,41 +133,93 @@
/>
<!-- 添加或修改涉气第三方施工意外事件对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"140px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"项目编码"
prop=
"fIntersectConstructionId"
>
<el-input
v-model=
"form.fIntersectConstructionId"
placeholder=
"请输入项目编码"
/>
<el-select
v-model=
"form.fIntersectConstructionId"
placeholder=
"请输入项目编码"
style=
"width: 100%"
>
<el-option
v-for=
"item in projectInfo"
:key=
"'' + item.fConGasProInforId"
:label=
"item.fProjectCode"
:value=
"'' +item.fConGasProInforId"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"意外事件标题"
prop=
"fTitle"
>
<el-input
v-model=
"form.fTitle"
placeholder=
"请输入意外事件标题"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"意外事件描述"
prop=
"fDescription"
>
<el-input
type=
"textarea"
v-model=
"form.fDescription"
placeholder=
"请输入意外事件描述"
/>
</el-form-item>
<el-form-item
label=
"意外事件发生事件"
prop=
"fOccurrenctTime"
>
<el-input
v-model=
"form.fOccurrenctTime"
placeholder=
"请输入意外事件发生事件"
/>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"意外事件发生时间"
prop=
"fOccurrenctTime"
>
<el-date-picker
style=
"width: 100%"
v-model=
"form.fOccurrenctTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"意外事件发生事件时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"附件"
prop=
"fAttachment"
>
<el-input
v-model=
"form.fAttachment"
placeholder=
"请输入附件"
/>
<FileUpload
listType=
"picture"
@
resFun=
"getFileInfo"
@
remove=
"listRemove"
:fileArr=
"fileList"
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.fAttachment"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"fRemark"
>
<el-input
v-model=
"form.fRemark"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!-- 详情 -->
<DetailInfo
ref=
"detail"
/>
</div>
</template>
<
script
>
import
{
listInc
,
getInc
,
delInc
,
addInc
,
updateInc
,
exportInc
}
from
"@/api/thirdbuild/accident"
;
import
{
listInc
,
getInc
,
delInc
,
addInc
,
updateInc
,
exportInc
,
reportAccidentInfo
}
from
"@/api/thirdbuild/accident"
;
import
{
conGasProInfoList
}
from
"@/api/thirdbuild/project"
;
import
FileUpload
from
'@/components/FileUpload'
;
let
uploadfile
=
require
(
"@/assets/uploadfile.png"
);
import
DetailInfo
from
"./components/DetailInfo"
;
export
default
{
name
:
"Inc"
,
components
:
{
FileUpload
,
DetailInfo
},
data
()
{
return
{
...
...
@@ -194,17 +274,14 @@ export default {
fAttachment
:
[
{
required
:
true
,
message
:
"附件不能为空"
,
trigger
:
"blur"
}
],
fRemark
:
[
{
required
:
true
,
message
:
"备注不能为空"
,
trigger
:
"blur"
}
],
fUpdateTime
:
[
{
required
:
true
,
message
:
"最后修改时间不能为空"
,
trigger
:
"blur"
}
]
}
},
projectInfo
:
[],
fileList
:
[]
};
},
created
()
{
this
.
getList
();
this
.
getProjectInfo
();
},
methods
:
{
/** 查询涉气第三方施工意外事件列表 */
...
...
@@ -315,7 +392,60 @@ export default {
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
},
//获取第三方施工项目信息
getProjectInfo
(){
conGasProInfoList
({}).
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
projectInfo
=
res
.
data
;
}
})
},
//上传
getFileInfo
(
res
){
this
.
form
.
fAttachment
=
res
.
url
;
this
.
fileList
.
push
({
name
:
res
.
fileName
,
url
:
uploadfile
,
});
},
listRemove
(
e
)
{
this
.
form
.
fAttachment
=
""
;
this
.
fileList
=
[];
},
checkFile
(
url
)
{
window
.
open
(
url
,
'_blank'
);
},
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
fConGasProIncId
);
},
/** 删除按钮操作 */
handleReport
(
row
)
{
this
.
$confirm
(
'是否确认上传项目编号为"'
+
row
.
projectCode
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
()
{
return
reportAccidentInfo
({
fConGasProIncId
:
row
.
fConGasProIncId
});
}).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"上传成功"
);
}).
catch
(()
=>
{});
},
}
};
</
script
>
<
style
scoped
lang=
"scss"
>
.dbtn
{
display
:
inline-block
;
line-height
:
normal
;
padding-left
:
2px
;
padding-right
:
2px
;
cursor
:
pointer
;
border-radius
:
3px
;
border-style
:
solid
;
border-width
:
0
;
color
:
rgb
(
48
,
180
,
107
);
}
</
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