累计跟新

main
liukewei 9 months ago
parent 56a1571a53
commit 6fa3437de0

@ -62,7 +62,7 @@ public class EhsMaterialController extends BaseController
public TableDataInfo list(EhsMaterial ehsMaterial) public TableDataInfo list(EhsMaterial ehsMaterial)
{ {
startPage(); startPage();
List<EhsMaterial> list = ehsMaterialService.selectEhsMaterialList(ehsMaterial); List<EhsMaterial> list = ehsMaterialService.selectEhsMateriallExportList(ehsMaterial);
return getDataTable(list); return getDataTable(list);
} }

@ -69,14 +69,14 @@ spring:
enabled: true enabled: true
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址 120.46.159.203
host: 120.46.159.203 host: 127.0.0.1
# 端口默认为6379 # 端口默认为6379 16379
port: 16379 port: 6379
# 数据库索引 # 数据库索引
database: 3 database: 1
# 密码 # 密码
password: a8EYUSoT8wHbuRkX password:
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s
lettuce: lettuce:

@ -3,6 +3,8 @@ package com.ruoyi.common.core.domain.entity;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -69,7 +71,8 @@ public class SysUser extends BaseEntity
/** 最后登录时间 */ /** 最后登录时间 */
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
private Date loginDate; private Date loginDate;
@TableField(exist = false)
private String deptType;
/** 部门对象 */ /** 部门对象 */
@Excels({ @Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
@ -297,6 +300,14 @@ public class SysUser extends BaseEntity
this.roleId = roleId; this.roleId = roleId;
} }
public String getDeptType() {
return deptType;
}
public void setDeptType(String deptType) {
this.deptType = deptType;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -58,12 +58,12 @@ public class EhsEnterprise extends BaseEntity
@Excel(name = "注册资本") @Excel(name = "注册资本")
private String registeredCapital; private String registeredCapital;
/** 营业执照核定的经营范围 */ /** 证照上核定的业务范围 */
@Excel(name = "营业执照核定的经营范围") @Excel(name = "证照上核定的业务范围")
private String businessScope; private String businessScope;
/** 企业实际从事的经营项目 */ /** 实际从事的业务范围 */
@Excel(name = "企业实际从事的经营项目") @Excel(name = "实际从事的业务范围")
private String businessProjects; private String businessProjects;
/** 企业现状0停业、1正常经营 */ /** 企业现状0停业、1正常经营 */

@ -44,7 +44,8 @@ public class EhsHiddenDanger extends BaseEntity
/** 行业 字典 */ /** 行业 字典 */
@Excel(name = "行业" , dictType = "enterprise_type") @Excel(name = "行业" , dictType = "enterprise_type")
private String enterpriseType; private String enterpriseType;
@Excel(name = "隐患数量" )
private Integer hdCount;
/** 隐患情况 */ /** 隐患情况 */
@Excel(name = "隐患情况") @Excel(name = "隐患情况")
private String hiddenDangerDesc; private String hiddenDangerDesc;

@ -74,4 +74,7 @@ public class EhsMaterial extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private Long materialDetailId; private Long materialDetailId;
@TableField(exist = false)
private String classNameKey;
} }

@ -64,6 +64,7 @@ public class EhsMaterialServiceImpl extends ServiceImpl<EhsMaterialMapper, EhsMa
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){ SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){
ehsMaterial.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue()); ehsMaterial.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
} }
return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial); return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial);
} }
public List<EhsMaterial> selectEhsMateriallExportList(EhsMaterial ehsMaterial){ public List<EhsMaterial> selectEhsMateriallExportList(EhsMaterial ehsMaterial){

@ -10,6 +10,7 @@
<result property="enterpriseStatus" column="enterprise_status" /> <result property="enterpriseStatus" column="enterprise_status" />
<result property="enterpriseType" column="enterprise_type" /> <result property="enterpriseType" column="enterprise_type" />
<result property="hiddenDangerDesc" column="hidden_danger_desc" /> <result property="hiddenDangerDesc" column="hidden_danger_desc" />
<result property="hdCount" column="hd_count" />
<result property="checkTime" column="check_time" /> <result property="checkTime" column="check_time" />
<result property="checkType" column="check_type" /> <result property="checkType" column="check_type" />
<result property="hiddenDangerImg" column="hidden_danger_img" /> <result property="hiddenDangerImg" column="hidden_danger_img" />
@ -69,6 +70,7 @@ FROM ehs_hidden_danger h LEFT JOIN sys_dept d ON h.dept_id = d.dept_id
<if test="hiddenDangerType != null and hiddenDangerType != ''"> and hidden_danger_type = #{hiddenDangerType}</if> <if test="hiddenDangerType != null and hiddenDangerType != ''"> and hidden_danger_type = #{hiddenDangerType}</if>
<if test="assistDept != null and assistDept != ''"> and FIND_IN_SET( #{assistDept}, assist_dept )</if> <if test="assistDept != null and assistDept != ''"> and FIND_IN_SET( #{assistDept}, assist_dept )</if>
<if test="areaId != null and areaId != ''">and area_id = #{areaId}</if> <if test="areaId != null and areaId != ''">and area_id = #{areaId}</if>
<if test="isTowns != null and isTowns != ''">and is_Towns = #{isTowns}</if>
<if test="currMonth == 1">and DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT( h.check_time, '%Y-%m') </if> <if test="currMonth == 1">and DATE_FORMAT(NOW(), '%Y-%m') = DATE_FORMAT( h.check_time, '%Y-%m') </if>
<if test="overTime == 7 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>3 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt;= 7 </if> <if test="overTime == 7 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>3 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt;= 7 </if>
<if test="overTime == 3 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>=0 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt; 3 </if> <if test="overTime == 3 ">and (h.STATUS = 0 or h.STATUS = 5 ) AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) )>=0 AND DATEDIFF(h.rectify_term_time ,ifnull(h.rectify_time,CURDATE()) ) &lt; 3 </if>

@ -92,14 +92,14 @@ SELECT
r.area_id , r.area_id ,
(select count(1) from ehs_enterprise e where e.area_id = d.dict_value and e.create_time>= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' )) thisUnitNum, (select count(1) from ehs_enterprise e where e.area_id = d.dict_value and e.create_time>= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' )) thisUnitNum,
(select count(1) from ehs_enterprise e where e.area_id = d.dict_value) totalUnitNum, (select count(1) from ehs_enterprise e where e.area_id = d.dict_value) totalUnitNum,
sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN 1 ELSE 0 END ) 'thisReportNum', sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN r.hd_count ELSE 0 END ) 'thisReportNum',
sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN 1 ELSE 0 END ) 'totalReportNum', sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN r.hd_count ELSE 0 END ) 'totalReportNum',
sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN 1 ELSE 0 END ) 'thisHaveNum', sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN r.hd_count ELSE 0 END ) 'thisHaveNum',
sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN 1 ELSE 0 END ) 'totalHaveNum', sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN r.hd_count ELSE 0 END ) 'totalHaveNum',
sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status != 10 THEN 1 ELSE 0 END ) 'thisNotNum', sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status != 10 THEN r.hd_count ELSE 0 END ) 'thisNotNum',
sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status != 10 THEN 1 ELSE 0 END ) 'totalNotNum', sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status != 10 THEN r.hd_count ELSE 0 END ) 'totalNotNum',
CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN 1 ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN 1 ELSE 0 END ),0)*100,2),'%') 'thisRate', CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) and r.status = 10 THEN r.hd_count ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.check_time >= DATE_FORMAT( now(), '%Y-%m-01 00:00:00' ) THEN r.hd_count ELSE 0 END ),0)*100,2),'%') 'thisRate',
CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN 1 ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN 1 ELSE 0 END ),0)*100,2),'%') 'totalRate' CONCAT(round(ifnull(sum( CASE WHEN r.hidden_danger_id IS NOT NULL and r.status = 10 THEN r.hd_count ELSE 0 END )/sum( CASE WHEN r.hidden_danger_id IS NOT NULL THEN r.hd_count ELSE 0 END ),0)*100,2),'%') 'totalRate'
FROM FROM
sys_dict_data d sys_dict_data d
LEFT JOIN ehs_hidden_danger r ON r.area_id = d.dict_value LEFT JOIN ehs_hidden_danger r ON r.area_id = d.dict_value

@ -84,6 +84,7 @@ FROM
<if test="tel != null and tel != ''"> and tel like concat('%', #{tel}, '%')</if> <if test="tel != null and tel != ''"> and tel like concat('%', #{tel}, '%')</if>
<if test="isSendQuantity == 0 "> and a.send_quantity is null </if> <if test="isSendQuantity == 0 "> and a.send_quantity is null </if>
<if test="isSendQuantity == 1 "> and a.send_quantity is not null </if> <if test="isSendQuantity == 1 "> and a.send_quantity is not null </if>
<if test="classNameKey != null and classNameKey != ''"> and m2.class_name_sub like concat('%', #{classNameKey}, '%')</if>
</where> </where>
</select> </select>
<select id="selectEhsMaterialByMaterialId" parameterType="Long" resultMap="EhsMaterialResult"> <select id="selectEhsMaterialByMaterialId" parameterType="Long" resultMap="EhsMaterialResult">

@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<association property="dept" javaType="SysDept" resultMap="deptResult" /> <association property="dept" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap> </resultMap>
@ -82,6 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null and deptId != 0"> <if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) )) AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
</if> </if>
<if test="deptType != null and deptType != ''">
AND d.dept_Type = #{deptType}
</if>
order by u.order_num order by u.order_num
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}

@ -1,4 +1,41 @@
## 开发 ## 开发
nodejs手动升级到16 npm run dev 如下错误
可在npm install后手动修改报错的Defaults.js文件
在第九行后增加一行
os.hostname=()=>"localhost"
增加后
const os = require('os');
os.hostname=()=>"localhost"
node:os:68
throw new ERR_SYSTEM_ERROR(ctx);
^
SystemError [ERR_SYSTEM_ERROR]: A system error occurred: uv_os_gethostname returned ENOSYS (function not implemented)
at new Defaults (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\entities\Defaults.js:26:20)
at new Parser (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\entities\EventParser.js:8:14)
at Object.<anonymous> (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\dao\client.js:11:19)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (D:\mywork\ehs-tanghHe\ehs\ruoyi-ui\node_modules\@achrinza\node-ipc\services\IPC.js:4:14) {
code: 'ERR_SYSTEM_ERROR',
info: {
errno: -4054,
code: 'ENOSYS',
message: 'function not implemented',
syscall: 'uv_os_gethostname'
},
errno: [Getter/Setter],
syscall: [Getter/Setter]
}
```bash ```bash
# 克隆项目 # 克隆项目

@ -80,18 +80,18 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="营业执照核定的经营范围" prop="businessScope"> <el-form-item label="证照上核定的业务范围" prop="businessScope">
<el-input <el-input
v-model="queryParams.businessScope" v-model="queryParams.businessScope"
placeholder="请输入营业执照核定的经营范围" placeholder="请输入证照上核定的业务范围"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="企业实际从事的经营项目" prop="businessProjects"> <el-form-item label="实际从事的业务范围" prop="businessProjects">
<el-input <el-input
v-model="queryParams.businessProjects" v-model="queryParams.businessProjects"
placeholder="请输入企业实际从事的经营项目" placeholder="请输入实际从事的业务范围"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -219,8 +219,8 @@
<el-table-column label="企业负责人" align="center" prop="enterpriseLeader" /> <el-table-column label="企业负责人" align="center" prop="enterpriseLeader" />
<el-table-column label="企业负责人电话" align="center" prop="leaderTel" /> <el-table-column label="企业负责人电话" align="center" prop="leaderTel" />
<el-table-column label="注册资本" align="center" prop="registeredCapital" /> <el-table-column label="注册资本" align="center" prop="registeredCapital" />
<el-table-column label="营业执照核定的经营范围" align="center" prop="businessScope" /> <el-table-column label="证照上核定的业务范围" align="center" prop="businessScope" />
<el-table-column label="企业实际从事的经营项目" align="center" prop="businessProjects" /> <el-table-column label="实际从事的业务范围" align="center" prop="businessProjects" />
<el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" /> <el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" />
<el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" /> <el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
@ -347,11 +347,11 @@
<el-form-item label="注册资本" prop="registeredCapital"> <el-form-item label="注册资本" prop="registeredCapital">
<el-input v-model="form.registeredCapital" placeholder="请输入注册资本" /> <el-input v-model="form.registeredCapital" placeholder="请输入注册资本" />
</el-form-item> </el-form-item>
<el-form-item label="营业执照核定的经营范围" prop="businessScope"> <el-form-item label="证照上核定的业务范围" prop="businessScope">
<el-input v-model="form.businessScope" placeholder="请输入营业执照核定的经营范围" /> <el-input v-model="form.businessScope" placeholder="请输入证照上核定的业务范围" />
</el-form-item> </el-form-item>
<el-form-item label="企业实际从事的经营项目" prop="businessProjects"> <el-form-item label="实际从事的业务范围" prop="businessProjects">
<el-input v-model="form.businessProjects" placeholder="请输入企业实际从事的经营项目" /> <el-input v-model="form.businessProjects" placeholder="请输入实际从事的业务范围" />
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">

@ -75,8 +75,8 @@
<el-table-column label="企业负责人" align="center" prop="enterpriseLeader" /> <el-table-column label="企业负责人" align="center" prop="enterpriseLeader" />
<el-table-column label="企业负责人电话" align="center" prop="leaderTel" /> <el-table-column label="企业负责人电话" align="center" prop="leaderTel" />
<el-table-column label="注册资本" align="center" prop="registeredCapital" /> <el-table-column label="注册资本" align="center" prop="registeredCapital" />
<el-table-column label="营业执照核定的经营范围" align="center" prop="businessScope" /> <el-table-column label="证照上核定的业务范围" align="center" prop="businessScope" />
<el-table-column label="企业实际从事的经营项目" align="center" prop="businessProjects" /> <el-table-column label="实际从事的业务范围" align="center" prop="businessProjects" />
<el-table-column label="企业现状" align="center" prop="enterpriseStatus" /> <el-table-column label="企业现状" align="center" prop="enterpriseStatus" />
<el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" /> <el-table-column label="分管安全副职姓名" align="center" prop="safetyManagerName" />
<el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" /> <el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" />

@ -180,7 +180,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--<el-form-item label="是否乡镇(街道)" prop="isTowns" label-width="130px"> <el-form-item label="是否乡镇(街道)" prop="isTowns" label-width="130px">
<el-select v-model="queryParams.isTowns" placeholder="请选择是否乡镇(街道)" clearable> <el-select v-model="queryParams.isTowns" placeholder="请选择是否乡镇(街道)" clearable>
<el-option <el-option
v-for="dict in dict.type.ehs_yes_no" v-for="dict in dict.type.ehs_yes_no"
@ -189,7 +189,7 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item>--> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -253,7 +253,7 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="ehsHiddenDangerList" @selection-change="handleSelectionChange" max-height="550" style="width: 100%" :row-class-name="tableRowClassName"> <el-table v-loading="loading" :data="ehsHiddenDangerList" @selection-change="handleSelectionChange" max-height="550" style="width: 100%" :row-class-name="tableRowClassName">
<el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="主键" align="center" prop="hiddenDangerId" />--> <!-- <el-table-column label="主键" align="center" prop="hiddenDangerId" />-->
<el-table-column label="上报部门" align="center" prop="deptName" v-if="deptShow"/> <el-table-column label="上报部门" align="center" prop="deptName" v-if="deptShow"/>
<el-table-column label="单位名称" align="center" prop="enterpriseName" > <el-table-column label="单位名称" align="center" prop="enterpriseName" >
@ -266,42 +266,43 @@
<dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/> <dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="企业现状" align="center" prop="enterpriseStatus"> <el-table-column label="企业现状" align="center" prop="enterpriseStatus" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span> <span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="隐患数量" align="center" prop="hdCount" width="50"/>
<el-table-column label="隐患情况" align="center" prop="hiddenDangerDesc" /> <el-table-column label="隐患情况" align="center" prop="hiddenDangerDesc" />
<el-table-column label="排查时间" align="center" prop="checkTime" width="100"> <el-table-column label="排查时间" align="center" prop="checkTime" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="排查方式" align="center" prop="checkType"> <el-table-column label="排查方式" align="center" prop="checkType"width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.check_type" :value="scope.row.checkType"/> <dict-tag :options="dict.type.check_type" :value="scope.row.checkType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整改措施" align="center" prop="rectifyMeasure" /> <el-table-column label="整改措施" align="center" prop="rectifyMeasure" />
<el-table-column label="要求整改时间" align="center" prop="rectifyTermTime" width="100"> <el-table-column label="要求整改时间" align="center" prop="rectifyTermTime" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.rectifyTermTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.rectifyTermTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整改进度" align="center" prop="status"> <el-table-column label="整改进度" align="center" prop="status"width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/> <dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整改时间" align="center" prop="rectifyTime" width="100"> <el-table-column label="整改时间" align="center" prop="rectifyTime" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.rectifyTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.rectifyTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整改责任人" align="center" prop="principalName" /> <el-table-column label="整改责任人" align="center" prop="principalName" width="50"/>
<el-table-column label="监管部门" align="center" prop="regulatoryDept" /> <el-table-column label="监管部门" align="center" prop="regulatoryDept" />
<el-table-column label="监管部门责任人" align="center" prop="regulatoryName" /> <el-table-column label="监管部门责任人" align="center" prop="regulatoryName" width="50"/>
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade"> <el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade"width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/> <dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
</template> </template>
@ -332,18 +333,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="整改资金" align="center" prop="rectifyMoney" />--> <el-table-column label="整改资金" align="center" prop="rectifyMoney" />-->
<el-table-column label="是否督办" align="center" prop="isSupervise"> <el-table-column label="是否督办" align="center" prop="isSupervise"width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isSupervise==1" @change="val => {isSuperviseChange(val, scope.row);}" ></el-switch> <el-switch v-model="scope.row.isSupervise==1" @change="val => {isSuperviseChange(val, scope.row);}" ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否协办" align="center" prop="assistDept"> <el-table-column label="是否协办" align="center" prop="assistDept"width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click="val => {assistDeptClick(val, scope.row);}" > {{(scope.row.assistDept=='' ||scope.row.assistDept==null)?"无协办单位": "显示协办单位" }} </el-link> <el-link type="primary" @click="val => {assistDeptClick(val, scope.row);}" > {{(scope.row.assistDept=='' ||scope.row.assistDept==null)?"无协办单位": "显示协办单位" }} </el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标签" align="center" prop="hiddenDangerLabel"> <el-table-column label="标签" align="center" prop="hiddenDangerLabel"width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_label" :value="scope.row.hiddenDangerLabel"/> <dict-tag :options="dict.type.hidden_danger_label" :value="scope.row.hiddenDangerLabel"/>
</template> </template>
@ -499,22 +500,34 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<!--<el-form-item label="是否乡镇(街道)" prop="isTowns"> <el-form-item label="整改进度" prop="status">
<el-select v-model="form.isTowns" placeholder="请选择是否乡镇(街道)" :disabled="isReadOnly"> <el-select v-model="form.status" placeholder="请选择整改进度" :disabled="isReadOnly">
<el-option <el-option
v-for="dict in dict.type.ehs_yes_no" v-for="dict in dict.type.hidden_danger_status"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item>--> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="整改进度" prop="status"> <el-form-item label="排查时间" prop="checkTime" >
<el-select v-model="form.status" placeholder="请选择整改进度" :disabled="isReadOnly"> <el-date-picker clearable :readonly="isReadOnly"
v-model="form.checkTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择排查时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="是否乡镇(街道)" prop="isTowns" label-width="130px">
<el-select v-model="form.isTowns" placeholder="请选择是否乡镇(街道)" :disabled="isReadOnly">
<el-option <el-option
v-for="dict in dict.type.hidden_danger_status" v-for="dict in dict.type.ehs_yes_no"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -527,19 +540,9 @@
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" /> <el-input v-model="form.address" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
<el-form-item label="隐患情况" prop="hiddenDangerDesc"> <el-form-item label="隐患情况" prop="hiddenDangerDesc">
<el-input v-model="form.hiddenDangerDesc" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" /> <el-input v-model="form.hiddenDangerDesc" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" @blur="handleBlur" />
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12">
<el-form-item label="排查时间" prop="checkTime" >
<el-date-picker clearable :readonly="isReadOnly"
v-model="form.checkTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择排查时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="整改期限" prop="rectifyTermTime" > <el-form-item label="整改期限" prop="rectifyTermTime" >
<el-date-picker clearable :readonly="isReadOnly" <el-date-picker clearable :readonly="isReadOnly"
@ -550,6 +553,11 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="隐患数量" prop="hdCount">
<el-input v-model="form.hdCount" :readonly="true"/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item label="隐患照片" prop="hiddenDangerImg"> <el-form-item label="隐患照片" prop="hiddenDangerImg">
<image-upload v-if="!isReadOnly" v-model="form.hiddenDangerImg" /> <image-upload v-if="!isReadOnly" v-model="form.hiddenDangerImg" />
@ -708,6 +716,7 @@ export default {
// //
open: false, open: false,
isReadOnly:false,//form isReadOnly:false,//form
// //
deptShow: false, deptShow: false,
curDeptId:null,//id curDeptId:null,//id
@ -754,6 +763,7 @@ export default {
isTowns:null, isTowns:null,
overTime:null, overTime:null,
address:null, address:null,
hdCount:0,//
}, },
alertState: [{ alertState: [{
value: '7', value: '7',
@ -947,7 +957,12 @@ export default {
this.form.hiddenDangerLabelArray.push("1");*/ this.form.hiddenDangerLabelArray.push("1");*/
console.log(this.form.hiddenDangerLabelArray); console.log(this.form.hiddenDangerLabelArray);
this.open = true; this.open = true;
if(isReadOnly){
this.title = "显示隐患信息";
}else {
this.title = "修改隐患信息"; this.title = "修改隐患信息";
}
}); });
}, },
@ -958,6 +973,8 @@ export default {
if(this.form.hiddenDangerLabelArray!=null){ if(this.form.hiddenDangerLabelArray!=null){
this.form.hiddenDangerLabel = this.form.hiddenDangerLabelArray.join(); this.form.hiddenDangerLabel = this.form.hiddenDangerLabelArray.join();
} }
let str =this.form.hiddenDangerDesc.replace(//g, ';');
this.form.hdCount=str.split(';').length;
if (this.form.hiddenDangerId != null) { if (this.form.hiddenDangerId != null) {
updateEhsHiddenDanger(this.form).then(response => { updateEhsHiddenDanger(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -974,15 +991,20 @@ export default {
} }
}); });
}, },
/** */
handleBlur() {
console.log("handleBlur");
if(this.form.hiddenDangerDesc!=null &&this.form.hiddenDangerDesc !=null){
let str =this.form.hiddenDangerDesc.replace(//g, ';');
this.form.hdCount=str.split(';').length;
}else{
this.form.hdCount =0;
}
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;
this.$modal.confirm('是否确认删除选中的隐患的数据项?').then(function() {
return delEhsHiddenDanger(hiddenDangerIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {

@ -39,6 +39,14 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="物资关键字" prop="classNameKey" label-width="98px">
<el-input
v-model="queryParams.classNameKey"
placeholder="请输入单位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="类别" prop="classSecond"> <!-- <el-form-item label="类别" prop="classSecond">
<el-cascader style="width:500px" <el-cascader style="width:500px"
@ -176,12 +184,17 @@
<!-- <el-table-column label="类别" align="center" prop="classFirst" />--> <!-- <el-table-column label="类别" align="center" prop="classFirst" />-->
<el-table-column label="类别" align="center" prop="classSecond"> <el-table-column label="类别" align="center" prop="classSecond">
<template slot-scope="scope"> <template slot-scope="scope">
<!--<span>{{classToStr(scope.row.classSecond,1)}}</span>-->
<span>{{classToStr(scope.row.classSecond,1)}}</span> <span>{{classToStr(scope.row.classSecond,1)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物资名称" align="center" prop="materialName" > <el-table-column label="物资名称" align="center" prop="materialName" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{classToStr(scope.row.materialName,2)}}</span> <span
@click="handleUpdate(scope.row,true)"
style="color: blue; cursor: pointer"
>{{classToStr(scope.row.materialName,2)}}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格/参数" align="center" prop="materialSpecs" /> <el-table-column label="规格/参数" align="center" prop="materialSpecs" />
@ -202,7 +215,7 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row,false)"
v-hasPermi="['ehsMaterial:ehsMaterial:edit']" v-hasPermi="['ehsMaterial:ehsMaterial:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
@ -265,7 +278,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="性质" prop="materialType"> <el-form-item label="性质" prop="materialType">
<el-select v-model="form.materialType" placeholder="请选择性质" clearable> <el-select v-model="form.materialType" placeholder="请选择性质" clearable :disabled="isReadOnly">
<el-option <el-option
v-for="dict in materialTypeOptions" v-for="dict in materialTypeOptions"
:key="dict.value" :key="dict.value"
@ -290,7 +303,7 @@
</el-row> </el-row>
<el-form-item label="物资名称" prop="materialNameId" style="width:500px"> <el-form-item label="物资名称" prop="materialNameId" style="width:500px">
<!--<el-input v-model="form.materialName" placeholder="请输入物资名称" />--> <!--<el-input v-model="form.materialName" placeholder="请输入物资名称" />-->
<el-cascader style="width:500px" <el-cascader style="width:500px" :disabled="isReadOnly"
v-model="form.materialNameId" v-model="form.materialNameId"
:options="options" :options="options"
@change="handleChange"></el-cascader> @change="handleChange"></el-cascader>
@ -298,36 +311,36 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="规格/参数" prop="materialSpecs"> <el-form-item label="规格/参数" prop="materialSpecs">
<el-input v-model="form.materialSpecs" placeholder="请输入规格/参数" /> <el-input v-model="form.materialSpecs" placeholder="请输入规格/参数" :readonly="isReadOnly"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数量" prop="materialQuantity"> <el-form-item label="数量" prop="materialQuantity">
<el-input v-model="form.materialQuantity" placeholder="请输入数量" /> <el-input v-model="form.materialQuantity" placeholder="请输入数量" :readonly="isReadOnly"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="储备地点" prop="reserveLocation"> <el-form-item label="储备地点" prop="reserveLocation">
<el-input v-model="form.reserveLocation" placeholder="请输入储备地点" /> <el-input v-model="form.reserveLocation" placeholder="请输入储备地点" :readonly="isReadOnly"/>
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="管理责任人" prop="managerPerson"> <el-form-item label="管理责任人" prop="managerPerson">
<el-input v-model="form.managerPerson" placeholder="请输入管理责任人" /> <el-input v-model="form.managerPerson" placeholder="请输入管理责任人" :readonly="isReadOnly"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="tel"> <el-form-item label="联系电话" prop="tel">
<el-input v-model="form.tel" placeholder="请输入联系电话" /> <el-input v-model="form.tel" placeholder="请输入联系电话" :readonly="isReadOnly"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :readonly="isReadOnly"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm" v-if="!isReadOnly"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -463,6 +476,7 @@
title: "", title: "",
// //
open: false, open: false,
isReadOnly:false,//form
// //
titleDetail: "出入库明细", titleDetail: "出入库明细",
// //
@ -511,7 +525,8 @@
managerPerson: null, managerPerson: null,
tel: null, tel: null,
classFirst:this.$route.query.classFirst, classFirst:this.$route.query.classFirst,
isSendQuantity:null isSendQuantity:null,
classNameKey:null
}, },
// //
form: { form: {
@ -728,8 +743,9 @@
this.title = "添加物资信息包含"; this.title = "添加物资信息包含";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row,isReadOnly) {
this.reset(); this.reset();
this.isReadOnly = isReadOnly;
const materialId = row.materialId || this.ids const materialId = row.materialId || this.ids
getEhsMaterial(materialId).then(response => { getEhsMaterial(materialId).then(response => {
this.form = response.data; this.form = response.data;
@ -739,6 +755,11 @@
console.log(this.form.materialNameId); console.log(this.form.materialNameId);
this.open = true; this.open = true;
this.title = "修改物资信息"; this.title = "修改物资信息";
if(isReadOnly){
this.title = "显示物资信息";
}else {
this.title = "修改物资信息";
}
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -884,7 +905,7 @@
} }
}, },
classToStr(value,type) { classToStr(value,type) {
let str =""; let str =value;
if(type==1){ if(type==1){
this.options.forEach(item =>{ this.options.forEach(item =>{
if(item.value==value){ if(item.value==value){

@ -251,7 +251,9 @@
<el-form-item label="驻地" prop="station"> <el-form-item label="驻地" prop="station">
<el-input v-model="form.station" placeholder="请输入驻地" /> <el-input v-model="form.station" placeholder="请输入驻地" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="队伍属性" prop="teamProperty"> <el-form-item label="队伍属性" prop="teamProperty">
<el-select v-model="form.teamProperty" placeholder="请选择队伍属性"> <el-select v-model="form.teamProperty" placeholder="请选择队伍属性">
<el-option <el-option
@ -262,9 +264,6 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>

@ -87,7 +87,7 @@
<el-form-item label="部门分类" prop="deptType"> <el-form-item label="部门分类" prop="deptType">
<el-button-group> <el-button-group>
<el-button type="info" size="small" @click="deptClick('0')">-</el-button> <el-button type="info" size="small" @click="deptClick('0')"></el-button>
<el-button type="info" size="small" @click="deptClick('1')"></el-button> <el-button type="info" size="small" @click="deptClick('1')"></el-button>
<el-button type="info" size="small" @click="deptClick('2')"></el-button> <el-button type="info" size="small" @click="deptClick('2')"></el-button>
</el-button-group> </el-button-group>
@ -466,11 +466,11 @@ export default {
} }
], ],
phonenumber: [ phonenumber: [
{ /* {
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码", message: "请输入正确的手机号码",
trigger: "blur" trigger: "blur"
}, },*/
{ required: true, message: "手机号不能为空", trigger: "blur" } { required: true, message: "手机号不能为空", trigger: "blur" }
] ]
} }
@ -519,6 +519,7 @@ export default {
deptTreeSelectByDeptType(type).then(response => { deptTreeSelectByDeptType(type).then(response => {
this.deptOptions = response.data; this.deptOptions = response.data;
}); });
this.getList();
}, },
// //
filterNode(value, data) { filterNode(value, data) {

Loading…
Cancel
Save