累计跟新

main
liukewei 7 months ago
parent 56a1571a53
commit 6fa3437de0

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

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

@ -3,6 +3,8 @@ package com.ruoyi.common.core.domain.entity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.*;
import com.baomidou.mybatisplus.annotation.TableField;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
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)
private Date loginDate;
@TableField(exist = false)
private String deptType;
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
@ -297,6 +300,14 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public String getDeptType() {
return deptType;
}
public void setDeptType(String deptType) {
this.deptType = deptType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

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

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

@ -74,4 +74,7 @@ public class EhsMaterial extends BaseEntity
@TableField(exist = false)
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){
ehsMaterial.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial);
}
public List<EhsMaterial> selectEhsMateriallExportList(EhsMaterial ehsMaterial){

@ -10,6 +10,7 @@
<result property="enterpriseStatus" column="enterprise_status" />
<result property="enterpriseType" column="enterprise_type" />
<result property="hiddenDangerDesc" column="hidden_danger_desc" />
<result property="hdCount" column="hd_count" />
<result property="checkTime" column="check_time" />
<result property="checkType" column="check_type" />
<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="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="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="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>

@ -92,14 +92,14 @@ SELECT
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) 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 THEN 1 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.status = 10 THEN 1 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.status != 10 THEN 1 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.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'
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 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 r.hd_count ELSE 0 END ) 'thisHaveNum',
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 r.hd_count ELSE 0 END ) 'thisNotNum',
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 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 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
sys_dict_data d
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="isSendQuantity == 0 "> and a.send_quantity is 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>
</select>
<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="updateTime" column="update_time" />
<result property="remark" column="remark" />
<association property="dept" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
@ -82,6 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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) ))
</if>
<if test="deptType != null and deptType != ''">
AND d.dept_Type = #{deptType}
</if>
order by u.order_num
<!-- 数据范围过滤 -->
${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
# 克隆项目

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

@ -1,4 +1,4 @@
<template>
<template>
<div class="dap">
<indexHD ref="indexHDRef" ></indexHD>
<div class="row">

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

@ -180,7 +180,7 @@
/>
</el-select>
</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-option
v-for="dict in dict.type.ehs_yes_no"
@ -189,7 +189,7 @@
:value="dict.value"
/>
</el-select>
</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 icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -253,7 +253,7 @@
</el-row>
<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="deptName" v-if="deptShow"/>
<el-table-column label="单位名称" align="center" prop="enterpriseName" >
@ -266,42 +266,43 @@
<dict-tag :options="dict.type.enterprise_type" :value="scope.row.enterpriseType"/>
</template>
</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">
<span> {{ (scope.row.enterpriseStatus !=null && scope.row.enterpriseStatus != "") ? statusOptions[scope.row.enterpriseStatus].label:""}}</span>
</template>
</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="checkTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }}</span>
</template>
</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">
<dict-tag :options="dict.type.check_type" :value="scope.row.checkType"/>
</template>
</el-table-column>
<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">
<span>{{ parseTime(scope.row.rectifyTermTime, '{y}-{m}-{d}') }}</span>
</template>
</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">
<dict-tag :options="dict.type.hidden_danger_status" :value="scope.row.status"/>
</template>
</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">
<span>{{ parseTime(scope.row.rectifyTime, '{y}-{m}-{d}') }}</span>
</template>
</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="regulatoryName" />
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade">
<el-table-column label="监管部门责任人" align="center" prop="regulatoryName" width="50"/>
<el-table-column label="隐患级别" align="center" prop="hiddenDangerGrade"width="50">
<template slot-scope="scope">
<dict-tag :options="dict.type.hidden_danger_grade" :value="scope.row.hiddenDangerGrade"/>
</template>
@ -332,18 +333,18 @@
</template>
</el-table-column>
<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">
<el-switch v-model="scope.row.isSupervise==1" @change="val => {isSuperviseChange(val, scope.row);}" ></el-switch>
</template>
</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">
<el-link type="primary" @click="val => {assistDeptClick(val, scope.row);}" > {{(scope.row.assistDept=='' ||scope.row.assistDept==null)?"无协办单位": "显示协办单位" }} </el-link>
</template>
</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">
<dict-tag :options="dict.type.hidden_danger_label" :value="scope.row.hiddenDangerLabel"/>
</template>
@ -499,22 +500,34 @@
</el-row>
<el-row>
<el-col :span="12">
<!--<el-form-item label="是否乡镇(街道)" prop="isTowns">
<el-select v-model="form.isTowns" placeholder="请选择是否乡镇(街道)" :disabled="isReadOnly">
<el-form-item label="整改进度" prop="status">
<el-select v-model="form.status" placeholder="请选择整改进度" :disabled="isReadOnly">
<el-option
v-for="dict in dict.type.ehs_yes_no"
v-for="dict in dict.type.hidden_danger_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>-->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改进度" prop="status">
<el-select v-model="form.status" placeholder="请选择整改进度" :disabled="isReadOnly">
<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-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
v-for="dict in dict.type.hidden_danger_status"
v-for="dict in dict.type.ehs_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -527,19 +540,9 @@
<el-input v-model="form.address" type="textarea" placeholder="请输入内容" :readonly="isReadOnly" />
</el-form-item>
<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-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-form-item label="整改期限" prop="rectifyTermTime" >
<el-date-picker clearable :readonly="isReadOnly"
@ -550,6 +553,11 @@
</el-date-picker>
</el-form-item>
</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-form-item label="隐患照片" prop="hiddenDangerImg">
<image-upload v-if="!isReadOnly" v-model="form.hiddenDangerImg" />
@ -708,6 +716,7 @@ export default {
//
open: false,
isReadOnly:false,//form
//
deptShow: false,
curDeptId:null,//id
@ -754,6 +763,7 @@ export default {
isTowns:null,
overTime:null,
address:null,
hdCount:0,//
},
alertState: [{
value: '7',
@ -947,7 +957,12 @@ export default {
this.form.hiddenDangerLabelArray.push("1");*/
console.log(this.form.hiddenDangerLabelArray);
this.open = true;
if(isReadOnly){
this.title = "显示隐患信息";
}else {
this.title = "修改隐患信息";
}
});
},
@ -958,6 +973,8 @@ export default {
if(this.form.hiddenDangerLabelArray!=null){
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) {
updateEhsHiddenDanger(this.form).then(response => {
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) {
const hiddenDangerIds = row.hiddenDangerId || this.ids;
this.$modal.confirm('是否确认删除选中的隐患的数据项?').then(function() {
return delEhsHiddenDanger(hiddenDangerIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {

@ -39,6 +39,14 @@
></el-option>
</el-select>
</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-cascader style="width:500px"
@ -176,12 +184,17 @@
<!-- <el-table-column label="类别" align="center" prop="classFirst" />-->
<el-table-column label="类别" align="center" prop="classSecond">
<template slot-scope="scope">
<!--<span>{{classToStr(scope.row.classSecond,1)}}</span>-->
<span>{{classToStr(scope.row.classSecond,1)}}</span>
</template>
</el-table-column>
<el-table-column label="物资名称" align="center" prop="materialName" >
<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>
</el-table-column>
<el-table-column label="规格/参数" align="center" prop="materialSpecs" />
@ -202,7 +215,7 @@
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
@click="handleUpdate(scope.row,false)"
v-hasPermi="['ehsMaterial:ehsMaterial:edit']"
>修改</el-button>
<el-button
@ -265,7 +278,7 @@
<el-row>
<el-col :span="12">
<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
v-for="dict in materialTypeOptions"
:key="dict.value"
@ -290,7 +303,7 @@
</el-row>
<el-form-item label="物资名称" prop="materialNameId" style="width:500px">
<!--<el-input v-model="form.materialName" placeholder="请输入物资名称" />-->
<el-cascader style="width:500px"
<el-cascader style="width:500px" :disabled="isReadOnly"
v-model="form.materialNameId"
:options="options"
@change="handleChange"></el-cascader>
@ -298,36 +311,36 @@
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<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-col>
</el-row>
<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-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
<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-col>
</el-row>
<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>
<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>
</div>
</el-dialog>
@ -463,6 +476,7 @@
title: "",
//
open: false,
isReadOnly:false,//form
//
titleDetail: "出入库明细",
//
@ -511,7 +525,8 @@
managerPerson: null,
tel: null,
classFirst:this.$route.query.classFirst,
isSendQuantity:null
isSendQuantity:null,
classNameKey:null
},
//
form: {
@ -728,8 +743,9 @@
this.title = "添加物资信息包含";
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row,isReadOnly) {
this.reset();
this.isReadOnly = isReadOnly;
const materialId = row.materialId || this.ids
getEhsMaterial(materialId).then(response => {
this.form = response.data;
@ -739,6 +755,11 @@
console.log(this.form.materialNameId);
this.open = true;
this.title = "修改物资信息";
if(isReadOnly){
this.title = "显示物资信息";
}else {
this.title = "修改物资信息";
}
});
},
/** 提交按钮 */
@ -884,7 +905,7 @@
}
},
classToStr(value,type) {
let str ="";
let str =value;
if(type==1){
this.options.forEach(item =>{
if(item.value==value){

@ -251,7 +251,9 @@
<el-form-item label="驻地" prop="station">
<el-input v-model="form.station" placeholder="请输入驻地" />
</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-select v-model="form.teamProperty" placeholder="请选择队伍属性">
<el-option
@ -262,9 +264,6 @@
></el-option>
</el-select>
</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>

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

Loading…
Cancel
Save