Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
1fde1ba1
Commit
1fde1ba1
authored
Feb 11, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
违章人员记录和供应商信息详情 gengdidi
parent
4f723e07
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1309 additions
and
2 deletions
+1309
-2
TBreakRulesPersonRecordController.java
...troller/contractor/TBreakRulesPersonRecordController.java
+123
-0
TBreakRulesPersonRecord.java
...ava/com/zehong/system/domain/TBreakRulesPersonRecord.java
+208
-0
TBreakRulesPersonRecordMapper.java
...m/zehong/system/mapper/TBreakRulesPersonRecordMapper.java
+61
-0
ITBreakRulesPersonRecordService.java
...ehong/system/service/ITBreakRulesPersonRecordService.java
+61
-0
TBreakRulesPersonRecordServiceImpl.java
...stem/service/impl/TBreakRulesPersonRecordServiceImpl.java
+93
-0
TBreakRulesPersonRecordMapper.xml
...resources/mapper/system/TBreakRulesPersonRecordMapper.xml
+100
-0
breakRulesPersonRecord.js
...r-manage-web/src/api/contractor/breakRulesPersonRecord.js
+53
-0
index.vue
...web/src/views/contractor/breakRulesPersonRecord/index.vue
+404
-0
index.vue
...-manage-web/src/views/contractor/contractorInfo/index.vue
+206
-2
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/contractor/TBreakRulesPersonRecordController.java
0 → 100644
View file @
1fde1ba1
package
com
.
zehong
.
web
.
controller
.
contractor
;
import
java.util.List
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TContractor
;
import
com.zehong.system.service.ISysUserService
;
import
com.zehong.system.service.ITContractorService
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TBreakRulesPersonRecord
;
import
com.zehong.system.service.ITBreakRulesPersonRecordService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 违章人员记录Controller
*
* @author zehong
* @date 2023-02-11
*/
@RestController
@RequestMapping
(
"/breakRulesPerson/record"
)
public
class
TBreakRulesPersonRecordController
extends
BaseController
{
@Autowired
private
ITBreakRulesPersonRecordService
tBreakRulesPersonRecordService
;
@Autowired
private
ITContractorService
tContractorService
;
@Autowired
private
ISysUserService
iSysUserService
;
/**
* 查询违章人员记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
startPage
();
List
<
TBreakRulesPersonRecord
>
list
=
tBreakRulesPersonRecordService
.
selectTBreakRulesPersonRecordList
(
tBreakRulesPersonRecord
);
return
getDataTable
(
list
);
}
/**
* 导出违章人员记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:record:export')")
@Log
(
title
=
"违章人员记录"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
List
<
TBreakRulesPersonRecord
>
list
=
tBreakRulesPersonRecordService
.
selectTBreakRulesPersonRecordList
(
tBreakRulesPersonRecord
);
for
(
TBreakRulesPersonRecord
record
:
list
){
if
(
null
!=
record
.
getContractId
()){
TContractor
contractor
=
tContractorService
.
selectTContractorById
(
record
.
getContractId
());
record
.
setContractName
(
contractor
.
getContractorName
());
}
SysUser
user
=
iSysUserService
.
selectUserById
(
record
.
getReportPerson
());
record
.
setReportPersonName
(
user
.
getNickName
());
}
ExcelUtil
<
TBreakRulesPersonRecord
>
util
=
new
ExcelUtil
<
TBreakRulesPersonRecord
>(
TBreakRulesPersonRecord
.
class
);
return
util
.
exportExcel
(
list
,
"违章人员记录数据"
);
}
/**
* 获取违章人员记录详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:record:query')")
@GetMapping
(
value
=
"/{breakRulesPersonId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"breakRulesPersonId"
)
Long
breakRulesPersonId
)
{
return
AjaxResult
.
success
(
tBreakRulesPersonRecordService
.
selectTBreakRulesPersonRecordById
(
breakRulesPersonId
));
}
/**
* 新增违章人员记录
*/
//@PreAuthorize("@ss.hasPermi('system:record:add')")
@Log
(
title
=
"违章人员记录"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
return
toAjax
(
tBreakRulesPersonRecordService
.
insertTBreakRulesPersonRecord
(
tBreakRulesPersonRecord
));
}
/**
* 修改违章人员记录
*/
//@PreAuthorize("@ss.hasPermi('system:record:edit')")
@Log
(
title
=
"违章人员记录"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
return
toAjax
(
tBreakRulesPersonRecordService
.
updateTBreakRulesPersonRecord
(
tBreakRulesPersonRecord
));
}
/**
* 删除违章人员记录
*/
//@PreAuthorize("@ss.hasPermi('system:record:remove')")
@Log
(
title
=
"违章人员记录"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{breakRulesPersonIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
breakRulesPersonIds
)
{
return
toAjax
(
tBreakRulesPersonRecordService
.
deleteTBreakRulesPersonRecordByIds
(
breakRulesPersonIds
));
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TBreakRulesPersonRecord.java
0 → 100644
View file @
1fde1ba1
package
com
.
zehong
.
system
.
domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 违章人员记录对象 t_break_rules_person_record
*
* @author zehong
* @date 2023-02-11
*/
public
class
TBreakRulesPersonRecord
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
Long
breakRulesPersonId
;
/** 承包商id */
private
Long
contractId
;
/**承包商名称*/
@Excel
(
name
=
"承包商"
)
private
String
contractName
;
/** 违规人员姓名 */
@Excel
(
name
=
"人员姓名"
)
private
String
breakRulesPersonName
;
/** 违规时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"违规时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
breakTime
;
/** 违规照片 */
@Excel
(
name
=
"违规照片"
)
private
String
breakPicUrl
;
/** 违规说明 */
@Excel
(
name
=
"违规说明"
)
private
String
breakDescription
;
/** 电子签名 */
//@Excel(name = "电子签名")
private
String
signature
;
/** 上报人 */
private
Long
reportPerson
;
/**上报人姓名*/
@Excel
(
name
=
"上报人"
)
private
String
reportPersonName
;
/** 上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
reportTime
;
/** 是否删除(0正常,1删除) */
private
String
isDel
;
private
Date
reportTimeBegin
;
private
Date
reportTimeEnd
;
public
void
setBreakRulesPersonId
(
Long
breakRulesPersonId
)
{
this
.
breakRulesPersonId
=
breakRulesPersonId
;
}
public
Long
getBreakRulesPersonId
()
{
return
breakRulesPersonId
;
}
public
void
setContractId
(
Long
contractId
)
{
this
.
contractId
=
contractId
;
}
public
Long
getContractId
()
{
return
contractId
;
}
public
void
setBreakRulesPersonName
(
String
breakRulesPersonName
)
{
this
.
breakRulesPersonName
=
breakRulesPersonName
;
}
public
String
getBreakRulesPersonName
()
{
return
breakRulesPersonName
;
}
public
void
setBreakTime
(
Date
breakTime
)
{
this
.
breakTime
=
breakTime
;
}
public
Date
getBreakTime
()
{
return
breakTime
;
}
public
void
setBreakPicUrl
(
String
breakPicUrl
)
{
this
.
breakPicUrl
=
breakPicUrl
;
}
public
String
getBreakPicUrl
()
{
return
breakPicUrl
;
}
public
void
setBreakDescription
(
String
breakDescription
)
{
this
.
breakDescription
=
breakDescription
;
}
public
String
getBreakDescription
()
{
return
breakDescription
;
}
public
void
setSignature
(
String
signature
)
{
this
.
signature
=
signature
;
}
public
String
getSignature
()
{
return
signature
;
}
public
void
setReportPerson
(
Long
reportPerson
)
{
this
.
reportPerson
=
reportPerson
;
}
public
Long
getReportPerson
()
{
return
reportPerson
;
}
public
void
setReportTime
(
Date
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
public
Date
getReportTime
()
{
return
reportTime
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
Date
getReportTimeBegin
()
{
return
reportTimeBegin
;
}
public
void
setReportTimeBegin
(
Date
reportTimeBegin
)
{
this
.
reportTimeBegin
=
reportTimeBegin
;
}
public
Date
getReportTimeEnd
()
{
return
reportTimeEnd
;
}
public
void
setReportTimeEnd
(
Date
reportTimeEnd
)
{
this
.
reportTimeEnd
=
reportTimeEnd
;
}
public
String
getContractName
()
{
return
contractName
;
}
public
void
setContractName
(
String
contractName
)
{
this
.
contractName
=
contractName
;
}
public
String
getReportPersonName
()
{
return
reportPersonName
;
}
public
void
setReportPersonName
(
String
reportPersonName
)
{
this
.
reportPersonName
=
reportPersonName
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"breakRulesPersonId"
,
getBreakRulesPersonId
())
.
append
(
"contractId"
,
getContractId
())
.
append
(
"breakRulesPersonName"
,
getBreakRulesPersonName
())
.
append
(
"breakTime"
,
getBreakTime
())
.
append
(
"breakPicUrl"
,
getBreakPicUrl
())
.
append
(
"breakDescription"
,
getBreakDescription
())
.
append
(
"signature"
,
getSignature
())
.
append
(
"reportPerson"
,
getReportPerson
())
.
append
(
"reportTime"
,
getReportTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
danger-manage-system/src/main/java/com/zehong/system/mapper/TBreakRulesPersonRecordMapper.java
0 → 100644
View file @
1fde1ba1
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TBreakRulesPersonRecord
;
/**
* 违章人员记录Mapper接口
*
* @author zehong
* @date 2023-02-11
*/
public
interface
TBreakRulesPersonRecordMapper
{
/**
* 查询违章人员记录
*
* @param breakRulesPersonId 违章人员记录ID
* @return 违章人员记录
*/
public
TBreakRulesPersonRecord
selectTBreakRulesPersonRecordById
(
Long
breakRulesPersonId
);
/**
* 查询违章人员记录列表
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 违章人员记录集合
*/
public
List
<
TBreakRulesPersonRecord
>
selectTBreakRulesPersonRecordList
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
);
/**
* 新增违章人员记录
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 结果
*/
public
int
insertTBreakRulesPersonRecord
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
);
/**
* 修改违章人员记录
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 结果
*/
public
int
updateTBreakRulesPersonRecord
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
);
/**
* 删除违章人员记录
*
* @param breakRulesPersonId 违章人员记录ID
* @return 结果
*/
public
int
deleteTBreakRulesPersonRecordById
(
Long
breakRulesPersonId
);
/**
* 批量删除违章人员记录
*
* @param breakRulesPersonIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTBreakRulesPersonRecordByIds
(
Long
[]
breakRulesPersonIds
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ITBreakRulesPersonRecordService.java
0 → 100644
View file @
1fde1ba1
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TBreakRulesPersonRecord
;
/**
* 违章人员记录Service接口
*
* @author zehong
* @date 2023-02-11
*/
public
interface
ITBreakRulesPersonRecordService
{
/**
* 查询违章人员记录
*
* @param breakRulesPersonId 违章人员记录ID
* @return 违章人员记录
*/
public
TBreakRulesPersonRecord
selectTBreakRulesPersonRecordById
(
Long
breakRulesPersonId
);
/**
* 查询违章人员记录列表
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 违章人员记录集合
*/
public
List
<
TBreakRulesPersonRecord
>
selectTBreakRulesPersonRecordList
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
);
/**
* 新增违章人员记录
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 结果
*/
public
int
insertTBreakRulesPersonRecord
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
);
/**
* 修改违章人员记录
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 结果
*/
public
int
updateTBreakRulesPersonRecord
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
);
/**
* 批量删除违章人员记录
*
* @param breakRulesPersonIds 需要删除的违章人员记录ID
* @return 结果
*/
public
int
deleteTBreakRulesPersonRecordByIds
(
Long
[]
breakRulesPersonIds
);
/**
* 删除违章人员记录信息
*
* @param breakRulesPersonId 违章人员记录ID
* @return 结果
*/
public
int
deleteTBreakRulesPersonRecordById
(
Long
breakRulesPersonId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TBreakRulesPersonRecordServiceImpl.java
0 → 100644
View file @
1fde1ba1
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TBreakRulesPersonRecordMapper
;
import
com.zehong.system.domain.TBreakRulesPersonRecord
;
import
com.zehong.system.service.ITBreakRulesPersonRecordService
;
/**
* 违章人员记录Service业务层处理
*
* @author zehong
* @date 2023-02-11
*/
@Service
public
class
TBreakRulesPersonRecordServiceImpl
implements
ITBreakRulesPersonRecordService
{
@Autowired
private
TBreakRulesPersonRecordMapper
tBreakRulesPersonRecordMapper
;
/**
* 查询违章人员记录
*
* @param breakRulesPersonId 违章人员记录ID
* @return 违章人员记录
*/
@Override
public
TBreakRulesPersonRecord
selectTBreakRulesPersonRecordById
(
Long
breakRulesPersonId
)
{
return
tBreakRulesPersonRecordMapper
.
selectTBreakRulesPersonRecordById
(
breakRulesPersonId
);
}
/**
* 查询违章人员记录列表
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 违章人员记录
*/
@Override
public
List
<
TBreakRulesPersonRecord
>
selectTBreakRulesPersonRecordList
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
return
tBreakRulesPersonRecordMapper
.
selectTBreakRulesPersonRecordList
(
tBreakRulesPersonRecord
);
}
/**
* 新增违章人员记录
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 结果
*/
@Override
public
int
insertTBreakRulesPersonRecord
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
return
tBreakRulesPersonRecordMapper
.
insertTBreakRulesPersonRecord
(
tBreakRulesPersonRecord
);
}
/**
* 修改违章人员记录
*
* @param tBreakRulesPersonRecord 违章人员记录
* @return 结果
*/
@Override
public
int
updateTBreakRulesPersonRecord
(
TBreakRulesPersonRecord
tBreakRulesPersonRecord
)
{
return
tBreakRulesPersonRecordMapper
.
updateTBreakRulesPersonRecord
(
tBreakRulesPersonRecord
);
}
/**
* 批量删除违章人员记录
*
* @param breakRulesPersonIds 需要删除的违章人员记录ID
* @return 结果
*/
@Override
public
int
deleteTBreakRulesPersonRecordByIds
(
Long
[]
breakRulesPersonIds
)
{
return
tBreakRulesPersonRecordMapper
.
deleteTBreakRulesPersonRecordByIds
(
breakRulesPersonIds
);
}
/**
* 删除违章人员记录信息
*
* @param breakRulesPersonId 违章人员记录ID
* @return 结果
*/
@Override
public
int
deleteTBreakRulesPersonRecordById
(
Long
breakRulesPersonId
)
{
return
tBreakRulesPersonRecordMapper
.
deleteTBreakRulesPersonRecordById
(
breakRulesPersonId
);
}
}
danger-manage-system/src/main/resources/mapper/system/TBreakRulesPersonRecordMapper.xml
0 → 100644
View file @
1fde1ba1
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TBreakRulesPersonRecordMapper"
>
<resultMap
type=
"TBreakRulesPersonRecord"
id=
"TBreakRulesPersonRecordResult"
>
<result
property=
"breakRulesPersonId"
column=
"break_rules_person_id"
/>
<result
property=
"contractId"
column=
"contract_id"
/>
<result
property=
"breakRulesPersonName"
column=
"break_rules_person_name"
/>
<result
property=
"breakTime"
column=
"break_time"
/>
<result
property=
"breakPicUrl"
column=
"break_pic_url"
/>
<result
property=
"breakDescription"
column=
"break_description"
/>
<result
property=
"signature"
column=
"signature"
/>
<result
property=
"reportPerson"
column=
"report_person"
/>
<result
property=
"reportTime"
column=
"report_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectTBreakRulesPersonRecordVo"
>
select break_rules_person_id, contract_id, break_rules_person_name, break_time, break_pic_url, break_description, signature, report_person, report_time, is_del, remark from t_break_rules_person_record
</sql>
<select
id=
"selectTBreakRulesPersonRecordList"
parameterType=
"TBreakRulesPersonRecord"
resultMap=
"TBreakRulesPersonRecordResult"
>
<include
refid=
"selectTBreakRulesPersonRecordVo"
/>
<where>
<if
test=
"contractId != null "
>
and contract_id = #{contractId}
</if>
<if
test=
"breakRulesPersonName != null and breakRulesPersonName != ''"
>
and break_rules_person_name like concat('%', #{breakRulesPersonName}, '%')
</if>
<if
test=
"breakTime != null "
>
and break_time = #{breakTime}
</if>
<if
test=
"breakPicUrl != null and breakPicUrl != ''"
>
and break_pic_url = #{breakPicUrl}
</if>
<if
test=
"breakDescription != null and breakDescription != ''"
>
and break_description = #{breakDescription}
</if>
<if
test=
"signature != null and signature != ''"
>
and signature = #{signature}
</if>
<if
test=
"reportPerson != null "
>
and report_person = #{reportPerson}
</if>
<if
test=
"reportTimeBegin != null and reportTimeEnd != null"
>
and report_time BETWEEN #{ reportTimeBegin } AND #{ reportTimeEnd }
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
</select>
<select
id=
"selectTBreakRulesPersonRecordById"
parameterType=
"Long"
resultMap=
"TBreakRulesPersonRecordResult"
>
<include
refid=
"selectTBreakRulesPersonRecordVo"
/>
where break_rules_person_id = #{breakRulesPersonId}
</select>
<insert
id=
"insertTBreakRulesPersonRecord"
parameterType=
"TBreakRulesPersonRecord"
useGeneratedKeys=
"true"
keyProperty=
"breakRulesPersonId"
>
insert into t_break_rules_person_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contractId != null"
>
contract_id,
</if>
<if
test=
"breakRulesPersonName != null"
>
break_rules_person_name,
</if>
<if
test=
"breakTime != null"
>
break_time,
</if>
<if
test=
"breakPicUrl != null"
>
break_pic_url,
</if>
<if
test=
"breakDescription != null"
>
break_description,
</if>
<if
test=
"signature != null"
>
signature,
</if>
<if
test=
"reportPerson != null"
>
report_person,
</if>
<if
test=
"reportTime != null"
>
report_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contractId != null"
>
#{contractId},
</if>
<if
test=
"breakRulesPersonName != null"
>
#{breakRulesPersonName},
</if>
<if
test=
"breakTime != null"
>
#{breakTime},
</if>
<if
test=
"breakPicUrl != null"
>
#{breakPicUrl},
</if>
<if
test=
"breakDescription != null"
>
#{breakDescription},
</if>
<if
test=
"signature != null"
>
#{signature},
</if>
<if
test=
"reportPerson != null"
>
#{reportPerson},
</if>
<if
test=
"reportTime != null"
>
#{reportTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateTBreakRulesPersonRecord"
parameterType=
"TBreakRulesPersonRecord"
>
update t_break_rules_person_record
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"contractId != null"
>
contract_id = #{contractId},
</if>
<if
test=
"breakRulesPersonName != null"
>
break_rules_person_name = #{breakRulesPersonName},
</if>
<if
test=
"breakTime != null"
>
break_time = #{breakTime},
</if>
<if
test=
"breakPicUrl != null"
>
break_pic_url = #{breakPicUrl},
</if>
<if
test=
"breakDescription != null"
>
break_description = #{breakDescription},
</if>
<if
test=
"signature != null"
>
signature = #{signature},
</if>
<if
test=
"reportPerson != null"
>
report_person = #{reportPerson},
</if>
<if
test=
"reportTime != null"
>
report_time = #{reportTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where break_rules_person_id = #{breakRulesPersonId}
</update>
<delete
id=
"deleteTBreakRulesPersonRecordById"
parameterType=
"Long"
>
delete from t_break_rules_person_record where break_rules_person_id = #{breakRulesPersonId}
</delete>
<delete
id=
"deleteTBreakRulesPersonRecordByIds"
parameterType=
"String"
>
delete from t_break_rules_person_record where break_rules_person_id in
<foreach
item=
"breakRulesPersonId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{breakRulesPersonId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
danger-manage-web/src/api/contractor/breakRulesPersonRecord.js
0 → 100644
View file @
1fde1ba1
import
request
from
'@/utils/request'
// 查询违章人员记录列表
export
function
listRecord
(
query
)
{
return
request
({
url
:
'/breakRulesPerson/record/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询违章人员记录详细
export
function
getRecord
(
breakRulesPersonId
)
{
return
request
({
url
:
'/breakRulesPerson/record/'
+
breakRulesPersonId
,
method
:
'get'
})
}
// 新增违章人员记录
export
function
addRecord
(
data
)
{
return
request
({
url
:
'/breakRulesPerson/record'
,
method
:
'post'
,
data
:
data
})
}
// 修改违章人员记录
export
function
updateRecord
(
data
)
{
return
request
({
url
:
'/breakRulesPerson/record'
,
method
:
'put'
,
data
:
data
})
}
// 删除违章人员记录
export
function
delRecord
(
breakRulesPersonId
)
{
return
request
({
url
:
'/breakRulesPerson/record/'
+
breakRulesPersonId
,
method
:
'delete'
})
}
// 导出违章人员记录
export
function
exportRecord
(
query
)
{
return
request
({
url
:
'/breakRulesPerson/record/export'
,
method
:
'get'
,
params
:
query
})
}
danger-manage-web/src/views/contractor/breakRulesPersonRecord/index.vue
0 → 100644
View file @
1fde1ba1
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"承包商"
prop=
"contractId"
>
<el-select
v-model=
"queryParams.contractId"
placeholder=
"请选择承包商"
clearable
size=
"small"
>
<el-option
v-for=
"dict in contractorInfos"
:key=
"dict.id"
:label=
"dict.contractorName"
:value=
"dict.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"人员姓名"
prop=
"breakRulesPersonName"
>
<el-input
v-model=
"queryParams.breakRulesPersonName"
placeholder=
"请输入人员姓名"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"上报时间"
prop=
"reportTime"
>
<el-date-picker
v-model=
"reportTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"上报开始日期"
end-placeholder=
"上报结束日期"
@
change=
"dateFormat"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:record:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:record:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:record:remove']"
>
删除
</el-button>
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
v-hasPermi=
"['system:record:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"recordList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!--
<el-table-column
label=
"违章id"
align=
"center"
prop=
"breakRulesPersonId"
/>
-->
<el-table-column
label=
"承包商"
align=
"center"
prop=
"contractId"
:formatter=
"contractorFormate"
/>
<el-table-column
label=
"人员姓名"
align=
"center"
prop=
"breakRulesPersonName"
/>
<el-table-column
label=
"违规时间"
align=
"center"
prop=
"breakTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
breakTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"违规照片"
align
=
"center"
prop
=
"breakPicUrl"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
image
style
=
"height: 30px;width: 30px"
size
=
"small"
:
preview
-
src
-
list
=
"[scope.row.breakPicUrl]"
:
src
=
"scope.row.breakPicUrl"
><
/el-image
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"违规说明"
align
=
"center"
prop
=
"breakDescription"
min
-
width
=
"100"
:
show
-
overflow
-
tooltip
=
"true"
/>
<
el
-
table
-
column
label
=
"电子签名"
align
=
"center"
prop
=
"signature"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
image
style
=
"height: 30px;width: 30px"
size
=
"small"
:
preview
-
src
-
list
=
"[scope.row.signature]"
:
src
=
"scope.row.signature"
><
/el-image
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"上报人"
align
=
"center"
prop
=
"reportPerson"
:
formatter
=
"reportPersonFormate"
/>
<
el
-
table
-
column
label
=
"上报时间"
align
=
"center"
prop
=
"reportTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
reportTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<!--
<
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-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['system:record:edit']"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['system:record:remove']"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column>--
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改违章人员记录对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"承包商id"
prop
=
"contractId"
>
<
el
-
input
v
-
model
=
"form.contractId"
placeholder
=
"请输入承包商id"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"违规人员姓名"
prop
=
"breakRulesPersonName"
>
<
el
-
input
v
-
model
=
"form.breakRulesPersonName"
placeholder
=
"请输入违规人员姓名"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"违规时间"
prop
=
"breakTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.breakTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择违规时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"违规照片"
prop
=
"breakPicUrl"
>
<
el
-
input
v
-
model
=
"form.breakPicUrl"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"违规说明"
prop
=
"breakDescription"
>
<
el
-
input
v
-
model
=
"form.breakDescription"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"电子签名"
prop
=
"signature"
>
<
el
-
input
v
-
model
=
"form.signature"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"上报人"
prop
=
"reportPerson"
>
<
el
-
input
v
-
model
=
"form.reportPerson"
placeholder
=
"请输入上报人"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"上报时间"
prop
=
"reportTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.reportTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择上报时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"是否删除(0正常,1删除)"
prop
=
"isDel"
>
<
el
-
input
v
-
model
=
"form.isDel"
placeholder
=
"请输入是否删除(0正常,1删除)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remark"
>
<
el
-
input
v
-
model
=
"form.remark"
placeholder
=
"请输入备注"
/>
<
/el-form-item
>
<
/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
>
<
/div
>
<
/template
>
<
script
>
import
{
listRecord
,
getRecord
,
delRecord
,
addRecord
,
updateRecord
,
exportRecord
}
from
"@/api/contractor/breakRulesPersonRecord"
;
import
{
listAll
}
from
"@/api/contractor/contractorInfo"
;
import
{
getAllUserName
}
from
"@/api/system/user"
export
default
{
name
:
"Record"
,
components
:
{
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 违章人员记录表格数据
recordList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
contractId
:
null
,
breakRulesPersonName
:
null
,
breakTime
:
null
,
breakPicUrl
:
null
,
breakDescription
:
null
,
signature
:
null
,
reportPerson
:
null
,
reportTime
:
null
,
isDel
:
null
,
reportTimeBegin
:
""
,
reportTimeEnd
:
""
,
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
}
,
//承包商信息
contractorInfos
:[],
userInfo
:[],
reportTime
:[]
}
;
}
,
created
()
{
this
.
getList
();
this
.
contractorInfo
();
this
.
userInfos
();
}
,
methods
:
{
/** 查询违章人员记录列表 */
getList
()
{
this
.
loading
=
true
;
listRecord
(
this
.
queryParams
).
then
(
response
=>
{
this
.
recordList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
breakRulesPersonId
:
null
,
contractId
:
null
,
breakRulesPersonName
:
null
,
breakTime
:
null
,
breakPicUrl
:
null
,
breakDescription
:
null
,
signature
:
null
,
reportPerson
:
null
,
reportTime
:
null
,
isDel
:
null
,
remark
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
reportTime
=
null
;
this
.
queryParams
.
reportTimeBegin
=
null
;
this
.
queryParams
.
reportTimeEnd
=
null
;
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
breakRulesPersonId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加违章人员记录"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
breakRulesPersonId
=
row
.
breakRulesPersonId
||
this
.
ids
getRecord
(
breakRulesPersonId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改违章人员记录"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
breakRulesPersonId
!=
null
)
{
updateRecord
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addRecord
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
breakRulesPersonIds
=
row
.
breakRulesPersonId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除违章人员记录编号为"'
+
breakRulesPersonIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delRecord
(
breakRulesPersonIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有违章人员记录数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportRecord
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
,
//承包商信息
contractorInfo
(){
listAll
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
contractorInfos
=
res
.
data
;
}
}
)
}
,
//承包商名称
contractorFormate
(
row
){
const
contrator
=
this
.
contractorInfos
.
find
(
contractor
=>
contractor
.
id
==
row
.
contractId
);
return
contrator
?
contrator
.
contractorName
:
""
;
}
,
userInfos
(){
getAllUserName
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
userInfo
=
res
.
data
;
}
}
)
}
,
//上报人信息
reportPersonFormate
(
row
){
const
user
=
this
.
userInfo
.
find
(
user
=>
user
.
userId
==
row
.
reportPerson
);
return
user
?
user
.
nickName
:
""
;
}
,
dateFormat
(
picker
){
this
.
reportTime
=
picker
;
this
.
queryParams
.
reportTimeBegin
=
picker
[
0
];
this
.
queryParams
.
reportTimeEnd
=
picker
[
1
];
}
,
}
}
;
<
/script
>
danger-manage-web/src/views/contractor/contractorInfo/index.vue
View file @
1fde1ba1
...
@@ -82,6 +82,12 @@
...
@@ -82,6 +82,12 @@
<el-table-column
label=
"承包商状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"承包商状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"300"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"300"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-document-copy"
@
click=
"detailInfo(scope.row)"
>
详情
</el-button>
<el-button
<el-button
v-if=
"scope.row.status == '0'"
v-if=
"scope.row.status == '0'"
size=
"mini"
size=
"mini"
...
@@ -238,12 +244,139 @@
...
@@ -238,12 +244,139 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 详情承包商信息对话框 -->
<el-dialog
title=
"信息详情"
:visible
.
sync=
"openDetail"
width=
"800px"
append-to-body
>
<el-form
label-width=
"120px"
>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"单位名称:"
prop=
"contractorName"
>
<span>
{{ form.contractorName }}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"法定代表人:"
prop=
"legalPerson"
>
<span>
{{ form.legalPerson }}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"法定代表人手机:"
prop=
"legalPersonPhone"
>
<span>
{{ form.legalPerson }}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"主要负责人:"
prop=
"keyPerson"
>
<span>
{{ form.keyPerson }}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"主要负责人手机:"
prop=
"keyPersonPhone"
>
<span>
{{ form.keyPersonPhone }}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"安全负责人:"
prop=
"safetyPerson"
>
<span>
{{ form.safetyPerson }}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"安全负责人手机:"
prop=
"safetyPersonPhone"
>
<span>
{{ form.safetyPersonPhone }}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"单位资质名称:"
prop=
"certificateName"
>
<span>
{{ form.certificateName }}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"单位资质证照"
prop=
"certificateUrl"
>
<img
:src=
"form.certificateUrl"
style=
"width: 20%;vertical-align:middle;cursor:pointer;"
@
click=
"showPicture(form)"
/>
<el-image
:zIndex=
"9999"
:ref=
"'a'+form.id"
:src=
"form.certificateUrl"
v-show=
"false"
:preview-src-list=
"[form.certificateUrl]"
v-if=
"form.certificateUrl != '' && form.certificateUrl != null"
></el-image>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"团队信息记录"
prop=
"teamInformation"
>
<span>
{{ form.teamInformation }}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"23"
>
<el-form-item
label=
"违章记录"
prop=
"violationRecords"
>
<el-table
class=
"breakTable"
v-loading=
"loading"
:data=
"breakRulesPersonRecords"
height=
"250px"
>
<el-table-column
label=
"承包商"
align=
"center"
prop=
"contractId"
:formatter=
"contractorFormate"
width=
"180"
/>
<el-table-column
label=
"人员姓名"
align=
"center"
prop=
"breakRulesPersonName"
/>
<el-table-column
label=
"违规时间"
align=
"center"
prop=
"breakTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
breakTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"违规照片"
align
=
"center"
prop
=
"breakPicUrl"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
image
style
=
"height: 30px;width: 30px"
size
=
"small"
:
preview
-
src
-
list
=
"[scope.row.breakPicUrl]"
:
src
=
"scope.row.breakPicUrl"
><
/el-image
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"违规说明"
align
=
"center"
prop
=
"breakDescription"
min
-
width
=
"100"
:
show
-
overflow
-
tooltip
=
"true"
/>
<
el
-
table
-
column
label
=
"电子签名"
align
=
"center"
prop
=
"signature"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
image
style
=
"height: 30px;width: 30px"
size
=
"small"
:
preview
-
src
-
list
=
"[scope.row.signature]"
:
src
=
"scope.row.signature"
><
/el-image
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"上报人"
align
=
"center"
prop
=
"reportPerson"
:
formatter
=
"reportPersonFormate"
/>
<
el
-
table
-
column
label
=
"上报时间"
align
=
"center"
prop
=
"reportTime"
width
=
"180"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
reportTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"pageNum"
:
limit
.
sync
=
"pageSize"
@
pagination
=
"breakPersonRecords"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"23"
>
<
el
-
form
-
item
label
=
"承包商评定"
prop
=
"contractorEvaluate"
>
<
el
-
radio
-
group
v
-
model
=
"form.contractorEvaluate"
disabled
>
<
el
-
radio
label
=
"1"
>
优
<
/el-radio
>
<
el
-
radio
label
=
"2"
>
中
<
/el-radio
>
<
el
-
radio
label
=
"3"
>
差
<
/el-radio
>
<
/el-radio-group
>
<
/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
=
"openDetail = false"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
MyFileUpload
from
'@/components/MyFileUpload'
;
import
{
listContractorInfo
,
getContractorInfo
,
delContractorInfo
,
addContractorInfo
,
updateContractorInfo
,
exportContractorInfo
}
from
"@/api/contractor/contractorInfo"
;
import
{
listContractorInfo
,
getContractorInfo
,
delContractorInfo
,
addContractorInfo
,
updateContractorInfo
,
exportContractorInfo
,
listAll
}
from
"@/api/contractor/contractorInfo"
;
import
{
listRecord
}
from
"@/api/contractor/breakRulesPersonRecord"
;
import
{
getAllUserName
}
from
"@/api/system/user"
export
default
{
export
default
{
name
:
"ContractorInfo"
,
name
:
"ContractorInfo"
,
...
@@ -304,7 +437,17 @@ export default {
...
@@ -304,7 +437,17 @@ export default {
contractorName
:
[
contractorName
:
[
{
required
:
true
,
message
:
"请输入单位名称"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请输入单位名称"
,
trigger
:
"blur"
}
],
],
}
}
,
openDetail
:
false
,
breakRulesPersonRecords
:
[],
//承包商信息
contractorInfos
:[],
userInfo
:[],
// 总条数
total
:
0
,
pageNum
:
1
,
pageSize
:
10
,
contractId
:
""
}
;
}
;
}
,
}
,
created
()
{
created
()
{
...
@@ -315,6 +458,8 @@ export default {
...
@@ -315,6 +458,8 @@ export default {
this
.
getDicts
(
"t_contractor_status"
).
then
(
response
=>
{
this
.
getDicts
(
"t_contractor_status"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
this
.
statusOptions
=
response
.
data
;
}
);
}
);
this
.
contractorInfo
();
this
.
userInfos
();
}
,
}
,
methods
:
{
methods
:
{
// 承包商评定
// 承包商评定
...
@@ -397,6 +542,20 @@ export default {
...
@@ -397,6 +542,20 @@ export default {
this
.
title
=
"修改承包商信息"
;
this
.
title
=
"修改承包商信息"
;
}
);
}
);
}
,
}
,
detailInfo
(
row
){
const
id
=
row
.
id
||
this
.
ids
getContractorInfo
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
this
.
form
.
certificateUrl
)
{
this
.
fileList
.
push
({
url
:
this
.
form
.
certificateUrl
,
}
);
}
this
.
openDetail
=
true
;
this
.
contractId
=
id
;
this
.
breakPersonRecords
();
}
);
}
,
/** 审核按钮操作 */
/** 审核按钮操作 */
handleApproval
(
row
)
{
handleApproval
(
row
)
{
this
.
readOnly
=
true
;
this
.
readOnly
=
true
;
...
@@ -491,6 +650,51 @@ export default {
...
@@ -491,6 +650,51 @@ export default {
this
.
$refs
[
'a'
+
row
.
id
].
showViewer
=
true
;
this
.
$refs
[
'a'
+
row
.
id
].
showViewer
=
true
;
console
.
log
(
"==="
,
row
.
id
);
console
.
log
(
"==="
,
row
.
id
);
}
,
}
,
breakPersonRecords
(){
listRecord
({
contractId
:
this
.
contractId
,
pageNum
:
this
.
pageNum
,
pageSize
:
this
.
pageSize
}
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
breakRulesPersonRecords
=
res
.
rows
;
this
.
total
=
res
.
total
;
}
}
)
}
,
//承包商信息
contractorInfo
(){
listAll
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
contractorInfos
=
res
.
data
;
}
}
)
}
,
//承包商名称
contractorFormate
(
row
){
const
contrator
=
this
.
contractorInfos
.
find
(
contractor
=>
contractor
.
id
==
row
.
contractId
);
return
contrator
?
contrator
.
contractorName
:
""
;
}
,
userInfos
(){
getAllUserName
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
userInfo
=
res
.
data
;
}
}
)
}
,
//上报人信息
reportPersonFormate
(
row
){
const
user
=
this
.
userInfo
.
find
(
user
=>
user
.
userId
==
row
.
reportPerson
);
return
user
?
user
.
nickName
:
""
;
}
,
}
}
}
;
}
;
<
/script
>
<
/script
>
<
style
lang
=
"scss"
>
// 滚动条的宽度
.
breakTable
.
el
-
table__body
-
wrapper
::
-
webkit
-
scrollbar
{
width
:
8
px
;
// 横向滚动条
height
:
8
px
;
// 纵向滚动条 必写
}
// 滚动条的滑块
.
breakTable
.
el
-
table__body
-
wrapper
::
-
webkit
-
scrollbar
-
thumb
{
background
-
color
:
#
ddd
;
border
-
radius
:
3
px
;
}
<
/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