Commit 30f91260 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of...

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/zhengyuan-danger-chemistry-manage into master
parents b0b020f9 9810defb
......@@ -100,4 +100,14 @@ public class TStaningBookController extends BaseController
{
return toAjax(tStaningBookService.deleteTStaningBookByIds(bookIds));
}
/**
* 统计,按年、月、日统计发现数量和已处置数量
* 日,为当日;月为当前30日内;年为当前365日内
* @return
*/
@GetMapping(value = "/statics")
public AjaxResult statics(String type){
return AjaxResult.success(tStaningBookService.statics(type));
}
}
......@@ -58,6 +58,18 @@ public class TNfcSettingController extends BaseController
return getDataTable(list);
}
/**
* 导出巡检打卡列表
*/
@Log(title = "setting", businessType = BusinessType.EXPORT)
@GetMapping("/exportPunchClockList")
public AjaxResult exportPunchClockList(TNfcSetting tNfcSetting)
{
List<TNfcRecord> list = tNfcSettingService.punchClockList(tNfcSetting);
ExcelUtil<TNfcRecord> util = new ExcelUtil<TNfcRecord>(TNfcRecord.class);
return util.exportExcel(list, "巡检打卡数据");
}
/**
* 导出巡检列表
*/
......
......@@ -9,7 +9,11 @@ import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TSpecialWorkPermit;
import com.zehong.system.domain.TSpecialWorkPermitSign;
import com.zehong.system.domain.TWorkPermit;
import com.zehong.system.service.ITSpecialWorkPermitService;
import com.zehong.system.service.ITSpecialWorkPermitSignService;
import com.zehong.system.service.ITWorkPermitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -29,6 +33,12 @@ public class TWorkPermitController extends BaseController
@Autowired
private ITWorkPermitService tWorkPermitService;
@Autowired
private ITSpecialWorkPermitService tSpecialWorkPermitService;
@Autowired
private ITSpecialWorkPermitSignService tSpecialWorkPermitSignService;
/**
* 查询作业许可证列表
*/
......@@ -38,9 +48,50 @@ public class TWorkPermitController extends BaseController
startPage();
List<TWorkPermit> list = tWorkPermitService.selectTWorkPermitList(tWorkPermit);
//setOperator(list);
setApprovalInfo(list);
return getDataTable(list);
}
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
@GetMapping("/selectTWorkPermitListByLoginUser")
public TableDataInfo selectTWorkPermitListByLoginUser(TWorkPermit tWorkPermit){
startPage();
tWorkPermit.setCurrentLoginUser(SecurityUtils.getLoginUser().getUser().getUserId());
List<TWorkPermit> list = tWorkPermitService.selectTWorkPermitListByLoginUser(tWorkPermit);
//setOperator(list);
setApprovalInfo(list);
return getDataTable(list);
}
/**
* 获取审核人信息
* @param list 作业许可证列表
*/
private void setApprovalInfo(List<TWorkPermit> list){
for(TWorkPermit tWorkPermit : list){
List<Long> approvalIds = new ArrayList<>();
if("1".equals(tWorkPermit.getApplyStatus())){
TSpecialWorkPermit tSpecialWorkPermit = new TSpecialWorkPermit();
tSpecialWorkPermit.setWorkPermitId(tWorkPermit.getWorkPermitId());
List<TSpecialWorkPermit> specialWorkPermits =tSpecialWorkPermitService.selectTSpecialWorkPermitList(tSpecialWorkPermit);
for(TSpecialWorkPermit specialWorkPermit : specialWorkPermits){
TSpecialWorkPermitSign tSpecialWorkPermitSign = new TSpecialWorkPermitSign();
tSpecialWorkPermitSign.setPermitId(specialWorkPermit.getSpecialWorkPermitId());
List<TSpecialWorkPermitSign> specialWorkPermitSigns = tSpecialWorkPermitSignService.selectTSpecialWorkPermitSignList(tSpecialWorkPermitSign);
for(TSpecialWorkPermitSign specialWorkPermitSign: specialWorkPermitSigns){
approvalIds.add(specialWorkPermitSign.getStaffId());
}
}
}
tWorkPermit.setApprovals(approvalIds);
}
}
/**
* 根据许可证状态及登录人设置操作权限
* @param list 作业许可证列表
......
......@@ -21,47 +21,41 @@ public class TNfcRecord extends BaseEntity {
/**
* nfc_id
*/
@Excel(name = "nfc_id")
private Long nfcId;
/**
* 是否正常 0否 1是
*/
@Excel(name = "是否正常 0否 1是")
private Integer isNormal;
/**
* 图片地址
*/
@Excel(name = "图片地址")
private String picture;
/**
* 备注
*/
@Excel(name = "备注")
private String remarks;
/**上报时间*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 上报人姓名
*/
@Excel(name = "上报人")
private Long createUser;
/**巡检地点*/
@Excel(name = "巡检地点")
private String patrolAddress;
/**巡检区域*/
@Excel(name = "巡检区域")
private String dictLabel;
/**巡检内容*/
@Excel(name = "巡检内容")
private String patrolComent;
/**巡检频次*/
@Excel(name = "巡检频次")
private String patrolFrequency;
/** 巡检人*/
@Excel(name = "上报人")
private String nickName;
private String userName;
......@@ -70,8 +64,45 @@ public class TNfcRecord extends BaseEntity {
private String endTime;
/**巡检区域*/
private String dictLabel;
/**
* 是否正常 0否 1是
*/
@Excel(name = "巡检结果", readConverterExp = "0=异常,1=正常")
private Integer isNormal;
/**上报时间*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String applyWorkStartTime;
/**
* 结束时间
* @return
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String applyWorkEndTime;
public String getApplyWorkStartTime() {
return applyWorkStartTime;
}
public void setApplyWorkStartTime(String applyWorkStartTime) {
this.applyWorkStartTime = applyWorkStartTime;
}
public String getApplyWorkEndTime() {
return applyWorkEndTime;
}
public void setApplyWorkEndTime(String applyWorkEndTime) {
this.applyWorkEndTime = applyWorkEndTime;
}
public String getDictLabel() {
return dictLabel;
......
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* setting对象 t_nfc_setting
*
......@@ -51,8 +51,37 @@ public class TNfcSetting extends BaseEntity
*/
private String nickName;
/**
* 开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String applyWorkStartTime;
/**
* 结束时间
* @return
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String applyWorkEndTime;
public String getApplyWorkStartTime() {
return applyWorkStartTime;
}
public void setApplyWorkStartTime(String applyWorkStartTime) {
this.applyWorkStartTime = applyWorkStartTime;
}
public String getApplyWorkEndTime() {
return applyWorkEndTime;
}
public void setApplyWorkEndTime(String applyWorkEndTime) {
this.applyWorkEndTime = applyWorkEndTime;
}
public String getNickName() {
return nickName;
}
......@@ -149,6 +178,8 @@ public class TNfcSetting extends BaseEntity
", isDel=" + isDel +
", region='" + region + '\'' +
", nickName='" + nickName + '\'' +
", applyWorkStartTime=" + applyWorkStartTime +
", applyWorkEndTime=" + applyWorkEndTime +
'}';
}
}
......@@ -102,6 +102,26 @@ public class TWorkPermit extends BaseEntity
private String operator;
private List<Long> approvals;
private long currentLoginUser;
public long getCurrentLoginUser() {
return currentLoginUser;
}
public void setCurrentLoginUser(long currentLoginUser) {
this.currentLoginUser = currentLoginUser;
}
public List<Long> getApprovals() {
return approvals;
}
public void setApprovals(List<Long> approvals) {
this.approvals = approvals;
}
/**
* 签字人身份
*/
......
package com.zehong.system.mapper;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TStaningBook;
/**
......@@ -58,4 +60,6 @@ public interface TStaningBookMapper
* @return 结果
*/
public int deleteTStaningBookByIds(Long[] bookIds);
public Map statics(String type);
}
......@@ -58,4 +58,11 @@ public interface TWorkPermitMapper
* @return 结果
*/
public int deleteTWorkPermitByIds(Long[] workPermitIds);
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
List<TWorkPermit> selectTWorkPermitListByLoginUser(TWorkPermit tWorkPermit);
}
package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TStaningBook;
/**
......@@ -58,4 +60,11 @@ public interface ITStaningBookService
* @return 结果
*/
public int deleteTStaningBookById(Long bookId);
/**
* 统计数量
* @param type
* @return
*/
public Map statics(String type);
}
......@@ -58,4 +58,11 @@ public interface ITWorkPermitService
* @return 结果
*/
public int deleteTWorkPermitById(Long workPermitId);
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
List<TWorkPermit> selectTWorkPermitListByLoginUser(TWorkPermit tWorkPermit);
}
......@@ -86,8 +86,7 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService
return a;
}
TNfcSetting ts = tNfcSettingMapper.getInfoByNfcNum(tNfcSetting.getNfcNum());
int nfcNum = tNfcSettingMapper.getNfcNum(tNfcSetting.getNfcNum());
if (nfcNum!=0){
if(ts.getNfcId()!=tNfcSetting.getNfcId()){
ts.setNfcNum("");
tNfcSettingMapper.updateTNfcSetting(ts);
}
......
......@@ -160,7 +160,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
TWorkPermitVo tWorkPermitVo = new TWorkPermitVo();
TWorkPermit tWorkPermit = itWorkPermitService.selectTWorkPermitById(workPermitId);
tWorkPermitVo.settWorkPermit(tWorkPermit);
/*
List<Integer> postIds = postService.selectPostListByUserId(SecurityUtils.getLoginUser().getUser().getUserId());
if(SecurityUtils.getLoginUser().getUser().getUserId().equals(Long.valueOf(tWorkPermit.getLinkMan()))){
postIds.add(-1);
......@@ -168,7 +168,7 @@ public class TSpecialWorkPermitServiceImpl implements ITSpecialWorkPermitService
if(SecurityUtils.getLoginUser().getUser().getUserId().equals(Long.valueOf(tWorkPermit.getRatifier()))){
postIds.add(-2);
}
tWorkPermitVo.setPostIds(postIds);
tWorkPermitVo.setPostIds(postIds);*/
TSpecialWorkPermit tSpecialWorkPermit = new TSpecialWorkPermit();
tSpecialWorkPermit.setWorkPermitId(workPermitId);
tWorkPermitVo.setSpecialWorkPermits(tSpecialWorkPermitMapper.selectTSpecialWorkPermitList(tSpecialWorkPermit));
......
package com.zehong.system.service.impl;
import java.util.List;
import java.util.Map;
import com.zehong.common.core.domain.entity.SysDept;
import com.zehong.common.utils.DateUtils;
......@@ -110,4 +111,9 @@ public class TStaningBookServiceImpl implements ITStaningBookService
{
return tStaningBookMapper.deleteTStaningBookById(bookId);
}
@Override
public Map statics(String type) {
return tStaningBookMapper.statics(type);
}
}
......@@ -93,4 +93,14 @@ public class TWorkPermitServiceImpl implements ITWorkPermitService
{
return tWorkPermitMapper.deleteTWorkPermitById(workPermitId);
}
/**
* 根据登录用户查询作业单
* @param tWorkPermit
* @return
*/
@Override
public List<TWorkPermit> selectTWorkPermitListByLoginUser(TWorkPermit tWorkPermit){
return tWorkPermitMapper.selectTWorkPermitListByLoginUser(tWorkPermit);
}
}
......@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TNfcRecordMapper">
<resultMap type="TNfcRecord" id="TNfcRecordResult">
<result property="recordId" column="record_id" />
<result property="nfcId" column="nfc_id" />
......@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ns.`patrol_address` ,ns.`patrol_coment`,ns.`patrol_frequency`
FROM t_nfc_record nr LEFT JOIN t_nfc_setting ns ON ns.`nfc_id` = nr.`nfc_id`
LEFT JOIN sys_user u ON u.user_id = nr.create_user
<where>
<where>
<if test="nfcId != null "> and nr.nfc_id = #{nfcId}</if>
<if test="isNormal != null "> and nr.is_normal = #{isNormal}</if>
<if test="picture != null and picture != ''"> and nr.picture = #{picture}</if>
......@@ -39,12 +39,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order By nr.create_time desc
</select>
<select id="selectTNfcRecordById" parameterType="Long" resultMap="TNfcRecordResult">
<include refid="selectTNfcRecordVo"/>
where record_id = #{recordId}
</select>
<insert id="insertTNfcRecord" parameterType="TNfcRecord" useGeneratedKeys="true" keyProperty="recordId">
insert into t_nfc_record
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -83,9 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTNfcRecordByIds" parameterType="String">
delete from t_nfc_record where record_id in
delete from t_nfc_record where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
</mapper>
......@@ -28,6 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="region != null and region != ''"> and region = #{region}</if>
<if test="patrolAddress != null and patrolAddress != ''"> and patrol_address = #{patrolAddress}</if>
<if test="nfcNum != null and nfcNum != ''"> and nfc_num = #{nfcNum}</if>
<if test="applyWorkStartTime!=null and applyWorkStartTime!=''">
and a.create_time &gt;= #{applyWorkStartTime}
</if>
<if test="applyWorkEndTime!=null and applyWorkEndTime!=''">
and a.create_time &lt;= #{applyWorkEndTime}
</if>
</where>
order by patrol_sort
</select>
......@@ -107,6 +113,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="region != null and region != ''">
and b.region=#{region}
</if>
<if test="applyWorkStartTime!=null and applyWorkStartTime!=''">
and a.create_time &gt;= #{applyWorkStartTime}
</if>
<if test="applyWorkEndTime!=null and applyWorkEndTime!=''">
and a.create_time &lt;= #{applyWorkEndTime}
</if>
</where>
group by a.create_time desc
</select>
......
......@@ -180,4 +180,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{bookId}
</foreach>
</delete>
<select id="statics" parameterType="String" resultType="Map">
select count(1) faxian,sum(case state when '2' then 1 else 0 end )as zhenggai from t_staning_book where is_del=0
<if test="type=='day'">
and DATE_SUB(now(), INTERVAL 1 DAY) &lt; date(find_time)
</if>
<if test="type=='month'">
and DATE_SUB(now(), INTERVAL 30 DAY) &lt; date(find_time)
</if>
<if test="type=='year'">
and DATE_SUB(now(), INTERVAL 365 DAY) &lt; date(find_time)
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -152,4 +152,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{workPermitId}
</foreach>
</delete>
<select id="selectTWorkPermitListByLoginUser" parameterType="TWorkPermit" resultMap="TWorkPermitResult">
SELECT
permit.work_permit_id,
permit.apply_dept,
permit.link_man,
permit.link_phone,
permit.work_bound,
permit.device_name,
permit.device_num,
permit.apply_work_start_time,
permit.apply_work_end_time,
permit.work_content,
permit.contractor,
permit.ratifier,
permit.main_dangerous_mark,
permit.dangerous_mark_detial,
permit.licence_info,
permit.relation_sign,
permit.produce_comfirm,
permit.work_deal,
permit.apply_status,
permit.create_time,
permit.update_time,
permit.remarks
FROM
t_work_permit permit
LEFT JOIN t_special_work_permit special ON permit.work_permit_id = special.work_permit_id
LEFT JOIN t_special_work_permit_sign sign ON special.special_work_permit_id = sign.permit_id
WHERE (
permit.link_man = #{currentLoginUser}
OR sign.sign_id = #{currentLoginUser}
)
<where>
<if test="applyDept != null and applyDept != ''"> and apply_dept = #{applyDept}</if>
<if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if>
<if test="linkPhone != null and linkPhone != ''"> and link_phone = #{linkPhone}</if>
<if test="workBound != null and workBound != ''"> and work_bound = #{workBound}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceNum != null and deviceNum != ''"> and device_num like concat('%', #{deviceNum},'%')</if>
<if test="applyWorkStartTime != null "> and apply_work_start_time = #{applyWorkStartTime}</if>
<if test="applyWorkEndTime != null "> and apply_work_end_time = #{applyWorkEndTime}</if>
<if test="workContent != null and workContent != ''"> and work_content = #{workContent}</if>
<if test="contractor != null "> and contractor = #{contractor}</if>
<if test="ratifier != null "> and ratifier = #{ratifier}</if>
<if test="mainDangerousMark != null and mainDangerousMark != ''"> and main_dangerous_mark = #{mainDangerousMark}</if>
<if test="dangerousMarkDetial != null and dangerousMarkDetial != ''"> and dangerous_mark_detial = #{dangerousMarkDetial}</if>
<if test="licenceInfo != null and licenceInfo != ''"> and licence_info = #{licenceInfo}</if>
<if test="relationSign != null and relationSign != ''"> and relation_sign = #{relationSign}</if>
<if test="produceComfirm != null and produceComfirm != ''"> and produce_comfirm = #{produceComfirm}</if>
<if test="workDeal != null and workDeal != ''"> and work_deal = #{workDeal}</if>
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
GROUP BY permit.work_permit_id
ORDER BY create_time DESC
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-10-07 09:05:29
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-07 10:16:10
* @LastEditTime: 2022-10-22 11:25:50
* @FilePath: /danger-manage-web/src/api/indexChars/chars.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -17,3 +17,11 @@ export function getRypbData(query) {
params: query,
});
}
// 巡检统计年月日
export function getxjtjYMD(query) {
return request({
url: "/system/book/statics",
method: "get",
params: query,
});
}
......@@ -51,3 +51,12 @@ export function exportSetting(query) {
params: query
})
}
//
export function exportPunchClockList(query) {
return request({
url: '/system/inspection/exportPunchClockList',
method: 'get',
params: query
})
}
......@@ -9,6 +9,14 @@ export function listPermit(query) {
})
}
export function selectTWorkPermitListByLoginUser(query) {
return request({
url: '/work/permit/selectTWorkPermitListByLoginUser',
method: 'get',
params: query
})
}
// 查询作业许可证详细
export function getPermit(workPermitId) {
return request({
......
<template>
<div>
<input class="editInput" placeholder="请签名" v-if="resultImg == '' || resultImg == null" @click="signOpen =true"/>
<el-dialog title="签名" :visible.sync="signOpen" :close-on-click-modal="false" :z-index="2000">
<div style="border: 1px solid #cccccc">
<vue-esign ref="esign" :width="width" :height="height" :isCrop="isCrop" :lineWidth="lineWidth" :lineColor="lineColor" :bgColor.sync="bgColor" />
<div style="text-align: right">
<button @click="handleReset" style="margin-right: 2px">清空</button>
<button @click="handleGenerate">确定</button>
</div>
</div>
</el-dialog>
<div>
<img v-if="resultImg" :src="resultImg" alt="" style="width: 100%;height: 100%" @click="reWriteSign"/>
</div>
</div>
</template>
<script>
import vueEsign from 'vue-esign'
export default {
name: "esign",
components:{
vueEsign
},
props:{
width:{
type:Number
},
height:{
type:Number
},
resultImg:{
type:String,
default:""
},
isReWrite:{
type:Boolean,
default:true
}
},
data () {
return {
lineWidth: 3,
lineColor: '#000000',
bgColor: '',
isCrop: false,
signOpen:false
}
},
methods: {
handleReset () {
this.$refs['esign'].reset() //清空画布
},
handleGenerate () {
this.$refs['esign'].generate().then(res => {
this.$emit('update:resultImg',res);
this.signOpen = false;
//this.resultImg = res // 得到了签字生成的base64图片
}).catch(err => { // 没有签名,点击生成图片时调用
this.$message({
message: err + ' 未签名!',
type: 'warning'
})
})
},
//重签
reWriteSign(){
if(this.isReWrite){
this.signOpen = true;
}
}
}
}
</script>
<style scoped scss="lang">
.editInput{
border: none;
width: 100%;
height: 100%;
text-align: center;
}
.editInput:focus{
outline: none;
}
</style>
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-21 09:24:11
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-06-24 17:38:50
* @LastEditTime: 2022-10-22 14:08:16
* @FilePath: /danger-manage-web/src/components/bigWindow/Danger.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -11,80 +11,100 @@
<div class="close" @click="close">
<img src="@/assets/images/closeBtn.png" alt="" />
</div>
<div class="up pb10" :class="{noBroder:deviceData.colorNum>2}">
<div class="tit fz16 pb10">风险辨识</div>
<div class="up pb10" :class="{ noBroder: deviceData.data.colorNum > 2 }">
<div class="tit fz16 pb10">{{ deviceData.name }}</div>
<div class="one flex fz16">
<div class="flex-item">
<span class="left">风险类别:</span
><span v-unValue class="right">{{ deviceData.fxlb }}</span>
><span v-unValue class="right">{{ deviceData.data.fxlb }}</span>
</div>
<div class="flex-item">
<span class="left">辨识计划:</span
><span v-unValue class="right">{{ deviceData.bsjh }}</span>
><span v-unValue class="right">{{ deviceData.data.bsjh }}</span>
</div>
<div class="flex-item">
<span class="left">危险源:</span
><span v-unValue class="right">{{ deviceData.wxy }}</span>
><span v-unValue class="right">{{ deviceData.data.wxy }}</span>
</div>
<!-- <div class="flex-item">
<span class="left">风险点:</span
><span v-unValue class="right">{{ deviceData.fxd }}</span>
><span v-unValue class="right">{{ deviceData.data.fxd }}</span>
</div> -->
</div>
<div class="item">
<span class="left">危险因素:</span
><span v-unValue class="right">{{ deviceData.wxys }}</span>
><span v-unValue class="right">{{ deviceData.data.wxys }}</span>
</div>
<div class="item">
<span class="left">危害后果:</span
><span v-unValue class="right">{{ deviceData.fxlb }}</span>
><span v-unValue class="right">{{ deviceData.data.whhg }}</span>
</div>
<div class="one flex fz16">
<div class="flex-item">
<span class="left">事故类型:</span
><span v-unValue class="right">{{ deviceData.sglx }}</span>
><span v-unValue class="right">{{ deviceData.data.sglx }}</span>
</div>
<div class="flex-item">
<span class="left">事故发生频率:</span
><span v-unValue class="right">{{ deviceData.sgfspl }}</span>
><span v-unValue class="right">{{ deviceData.data.sgfspl }}</span>
</div>
<div class="flex-item">
<span class="left">管控层级:</span
><span v-unValue class="right">{{ deviceData.gkcj }}</span>
><span v-unValue class="right">{{ deviceData.data.gkcj }}</span>
</div>
<div class="flex-item">
<span class="left">管控部门:</span
><span v-unValue class="right">{{ deviceData.gkbm }}</span>
><span v-unValue class="right">{{ deviceData.data.gkbm }}</span>
</div>
<div class="flex-item">
<span class="left">管控责任岗位:</span
><span v-unValue class="right">{{ deviceData.gkzrgw }}</span>
><span v-unValue class="right">{{ deviceData.data.gkzrgw }}</span>
</div>
<div class="flex-item">
<span class="left">管控责任人:</span
><span v-unValue class="right">{{ deviceData.gkzrr }}</span>
><span v-unValue class="right">{{ deviceData.data.gkzrr }}</span>
</div>
</div>
</div>
<!-- deviceData.colorNum<3的风险区域没有下面这些东西 -->
<div class="bottom pb10" v-if="deviceData.colorNum<3">
<!-- deviceData.data.colorNum<3的风险区域没有下面这些东西 -->
<div class="bottom pb10" v-if="deviceData.colorNum < 3">
<div class="tit fz16 pb10">采取的风险管控措施</div>
<div class="item">
<span class="left">管理:</span
><span v-unValue class="right">{{ deviceData.gl }}</span>
><span v-unValue class="right">{{ deviceData.data.gl }}</span>
</div>
<div class="item">
<span class="left">工程技术:</span
><span v-unValue class="right">{{ deviceData.gcjs }}</span>
><span v-unValue class="right">{{ deviceData.data.gcjs }}</span>
</div>
<div class="item">
<div class="item flex">
<span class="left">警示标识:</span>
<span v-unValue class="img"><img :src="deviceData.src" alt="" /></span>
<template v-if="deviceData.data.src && deviceData.data.src.length > 0">
<span v-unValue class="img">
<!-- <img
v-for="src in deviceData.data.src"
:key="src"
:src="src"
alt=""
/> -->
<el-image
v-for="src in deviceData.data.src"
:key="src"
style="width: 70px; height: 90px;margin-left:5px"
:src="src"
:preview-src-list="[src]"
:z-index="9999999"
></el-image>
</span>
</template>
<template v-else>
<span class="right">-</span>
</template>
</div>
</div>
</div>
......@@ -97,7 +117,7 @@ export default {
return {};
},
mounted() {
console.log(this.deviceData);
console.log(this.deviceData.data);
},
methods: {
close() {
......@@ -119,11 +139,9 @@ export default {
.up {
border-bottom: 1px solid #cccccc;
margin-bottom: 15px;
&.noBroder{
border-bottom: 0px solid #cccccc;
margin-bottom: 10px;
&.noBroder {
border-bottom: 0px solid #cccccc;
margin-bottom: 10px;
}
}
.tit {
......@@ -173,14 +191,20 @@ export default {
margin-left: 5px;
}
.img {
width: 300px;
height: 120px;
flex: 1;
width: 100%;
height: 90px;
display: inline-block;
vertical-align: top;
margin-left: 5px;
#img,
img {
width: 100%;
height: 100%;
// width: 100%;
width: 70px;
height: 90px;
margin-left: 5px;
cursor: pointer;
}
}
}
......
/*
* @Author: your name
* @Date: 2021-12-07 14:19:18
* @LastEditTime: 2022-10-12 10:09:44
* @LastEditTime: 2022-10-22 10:31:44
* @LastEditors: 纪泽龙 jizelong@qq.com
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /cesium-vue/src/utils/seieumClass.js
......@@ -1122,9 +1122,9 @@ export default class CreateCesium {
this.dangerArr.forEach((item) => {
item.show = bool;
});
this.deviceTilesArr[10].forEach((item) => {
item.show = bool;
});
// this.deviceTilesArr[10].forEach((item) => {
// item.show = bool;
// });
}
// 危险源与风险分布区切换
dangeDeviceChange(type, bottomDeviceArr) {
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-06-16 15:03:40
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-12 09:20:17
* @LastEditTime: 2022-10-22 10:39:48
* @FilePath: /danger-manage-web/src/views/bigwindow/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -224,13 +224,13 @@ export default {
// this.data1.forEach((item) => {
// this.Cesium.addDevice(item, "pic", Video);
// });
this.data2.forEach((item, index) => {
if (index == 0) {
this.Cesium.addDevice(item, "pic", weixiandian);
} else {
this.Cesium.addDevice(item, "pic", ydqt);
}
});
// this.data2.forEach((item, index) => {
// if (index == 0) {
// this.Cesium.addDevice(item, "pic", weixiandian);
// } else {
// this.Cesium.addDevice(item, "pic", ydqt);
// }
// });
},
methods: {
dangerChange() {
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-03 10:51:24
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-10-12 09:22:21
* @LastEditTime: 2022-10-20 10:25:41
* @FilePath: /danger-manage-web/src/views/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -379,13 +379,13 @@ export default {
// },
init() {
this.data2.forEach((item, index) => {
if (index == 0) {
this.Cesium.addDevice(item, "pic", weixiandian);
} else {
this.Cesium.addDevice(item, "pic", ydqt);
}
});
// this.data2.forEach((item, index) => {
// if (index == 0) {
// this.Cesium.addDevice(item, "pic", weixiandian);
// } else {
// this.Cesium.addDevice(item, "pic", ydqt);
// }
// });
// 如果有缓存
// const J = localStorage.getItem("J");
// if (J) {
......@@ -413,7 +413,7 @@ export default {
};
})
.forEach((item) => {
this.Cesium.addDanger(item, Danger2);
this.Cesium.addDanger(item, Danger);
});
// this.data11.forEach((item) => {
// item.config = { scale: 1, textHeight: -32 };
......
......@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-06 13:42:45
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2022-09-14 11:44:50
* @LastEditTime: 2022-10-22 11:36:35
* @FilePath: /danger-manage-web/src/views/indexComponents/leftComponents/deviceYx.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -51,6 +51,7 @@ import Title from "@/views/indexComponents/allComponents/Title";
import Chars from "@/components/allCharsCom/Chars";
import rimg1 from "@/assets/indexImages/rimg1.png";
import rimg2 from "@/assets/indexImages/rimg2.png";
import { getxjtjYMD } from "@/api/indexChars/chars";
export default {
name: "",
......@@ -62,8 +63,8 @@ export default {
return {
yearActive: "年",
numData: [
{ icon: rimg1, name: "发现隐患数量", num: 56 },
{ icon: rimg2, name: "整改隐患数量", num: 50 },
// { icon: rimg1, name: "发现隐患数量", num: 2 },
// { icon: rimg2, name: "整改隐患数量", num: 1 },
],
options: {
xAxis: {
......@@ -128,25 +129,45 @@ export default {
},
};
},
created() {
this.getxjtjYMD({ type: "year" });
},
methods: {
getxjtjYMD(query) {
getxjtjYMD(query).then((res) => {
if (res.code == 200) {
const { faxian, zhenggai } = res.data;
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: faxian },
{ icon: rimg2, name: "整改隐患数量", num: zhenggai },
];
}
});
},
timeChange(e) {
if (this.yearActive == e) return;
this.yearActive = e;
if (this.yearActive == "日") {
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: 3 },
{ icon: rimg2, name: "整改隐患数量", num: 2 },
];
this.getxjtjYMD({ type: "day" });
// this.numData = [
// { icon: rimg1, name: "发现隐患数量", num: 3 },
// { icon: rimg2, name: "整改隐患数量", num: 2 },
// ];
} else if (this.yearActive == "月") {
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: 6 },
{ icon: rimg2, name: "整改隐患数量", num: 10 },
];
this.getxjtjYMD({ type: "month" });
// this.numData = [
// { icon: rimg1, name: "发现隐患数量", num: 6 },
// { icon: rimg2, name: "整改隐患数量", num: 10 },
// ];
} else {
this.numData = [
{ icon: rimg1, name: "发现隐患数量", num: 56 },
{ icon: rimg2, name: "整改隐患数量", num: 50 },
];
this.getxjtjYMD({ type: "year" });
// this.numData = [
// { icon: rimg1, name: "发现隐患数量", num: 56 },
// { icon: rimg2, name: "整改隐患数量", num: 50 },
// ];
}
},
},
......
......@@ -20,13 +20,29 @@
/>
</el-select>
</el-form-item>
<el-form-item label="开始时间" prop="applyWorkStartTime">
<el-date-picker clearable size="small"
v-model="queryParams.applyWorkStartTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择开始时间">
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="applyWorkEndTime">
<el-date-picker clearable size="small"
v-model="queryParams.applyWorkEndTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择结束时间">
</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-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
......@@ -59,19 +75,19 @@
<!-- v-hasPermi="['system:setting: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:setting:export']"-->
<!-- >导出</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:setting:export']"
>导出</el-button>
</el-col>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
<!-- </el-row>-->
</el-row>
<el-table v-loading="loading" :data="settingList" @selection-change="handleSelectionChange">
<el-table-column width="250" label="巡检地点" align="center" prop="patrolAddress" />
......@@ -146,7 +162,7 @@
</template>
<script>
import { listSetting, getSetting, delSetting, addSetting, updateSetting, exportSetting } from "@/api/system/statistics.js";
import { listSetting, getSetting, delSetting, addSetting, updateSetting, exportPunchClockList } from "@/api/system/statistics.js";
export default {
name: "Setting",
......@@ -185,6 +201,8 @@ export default {
patrolAddress: null,
nfcNum: null,
region:null,
applyWorkStartTime:null,
applyWorkEndTime:null
},
// 表单参数
form: {},
......@@ -313,7 +331,7 @@ export default {
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportSetting(queryParams);
return exportPunchClockList(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
......
......@@ -29,6 +29,22 @@
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="开始时间" prop="applyWorkStartTime">-->
<!-- <el-date-picker clearable size="small"-->
<!-- v-model="queryParams.applyWorkStartTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择开始时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="结束时间" prop="applyWorkEndTime">-->
<!-- <el-date-picker clearable size="small"-->
<!-- v-model="queryParams.applyWorkEndTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="选择结束时间">-->
<!-- </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>
......@@ -98,7 +114,8 @@
<el-table-column label="nfc编号" align="center" prop="nfcNum" >
<span slot-scope="scope" v-if="scope.row.nfcNum">{{scope.row.nfcNum}}</span>
<span v-else>-</span>
</el-table-column>>
</el-table-column>
<!-- <el-table-column label="创建时间" width="170" align="center" prop="createTime" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -128,7 +145,7 @@
/>
<!-- 添加或修改setting对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :visible.sync="open" width="700px" style="height: 150%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="排序" prop="patrolSort">
<el-input v-model="form.patrolSort" placeholder="请输入排序" />
......@@ -152,8 +169,8 @@
<el-form-item label="nfc编号" prop="nfcNum">
<el-input v-model="form.nfcNum" placeholder="请输入nfc编号" />
</el-form-item>
<el-form-item label="巡检内容" prop="patrolComent" >
<el-input v-model="form.patrolComent" type="textarea" placeholder="请输入内容" height="100px"/>
<el-form-item label="巡检内容" prop="patrolComent" >
<el-input v-model="form.patrolComent" :autosize="{ minRows: 9, maxRows: 14}" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
......@@ -203,6 +220,8 @@ export default {
patrolAddress: null,
nfcNum: null,
region:null,
applyWorkStartTime:null,
applyWorkEndTime:null
},
// 表单参数
form: {},
......
......@@ -36,6 +36,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_TARGET,
// target: `http://192.168.2.16:8908/dangerManage`,
// target: `http://192.168.2.17:8908/dangerManage`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment