累计跟新

main
liukewei 10 months ago
parent 6f9d7e9acc
commit ac3d2c5726

@ -147,8 +147,8 @@ public class EhsDocumentController extends BaseController {
@Transactional @Transactional
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
ehsDocumentService.removeByIds(Arrays.asList(ids));
boolean result = transferService.removeByDocumentIds(Arrays.asList(ids)); int result = transferService.removeByDocumentIds(Arrays.asList(ids));
return toAjax(result); return toAjax(ehsDocumentService.removeByIds(Arrays.asList(ids)));
} }
} }

@ -188,8 +188,12 @@ public class EhsHiddenDangerController extends BaseController
ehsMyMessage.setMyUserId(SecurityUtils.getUserId()); ehsMyMessage.setMyUserId(SecurityUtils.getUserId());
EhsMyMessage msg = ehsMyMessageService.selectEhsMyMessageByMyMessageMax(ehsMyMessage); EhsMyMessage msg = ehsMyMessageService.selectEhsMyMessageByMyMessageMax(ehsMyMessage);
boolean isNew =false; boolean isNew =false;
if(ehsHiddenDanger == null){
ehsMyMessage.setMyMessageDesc("");
return success(ehsMyMessage);
}
if(msg==null ){ if(msg==null ){
if(StringUtils.isNotEmpty(ehsHiddenDanger.getOverTimeId())) if(ehsHiddenDanger!=null && StringUtils.isNotEmpty(ehsHiddenDanger.getOverTimeId()))
isNew = true; isNew = true;
else else
isNew = false; isNew = false;

@ -248,4 +248,12 @@ public class SysUserController extends BaseController
{ {
return success(deptService.selectDeptTreeList(dept)); return success(deptService.selectDeptTreeList(dept));
} }
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/deptTreeSelectByDeptType/{deptType}")
public AjaxResult deptTreeSelectByDeptType(@PathVariable("deptType") String deptType)
{
SysDept dept = new SysDept();
dept.setDeptType(deptType);
return success(deptService.selectDeptTreeList(dept));
}
} }

@ -56,6 +56,17 @@ public class SysDept extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private String deptIds; private String deptIds;
/** 部门分类 */
private String deptType;
public String getDeptType() {
return deptType;
}
public void setDeptType(String deptType) {
this.deptType = deptType;
}
public String getDeptIds() { public String getDeptIds() {
return deptIds; return deptIds;

@ -39,5 +39,5 @@ public interface EhsDocTransferMapper extends BaseMapper<EhsDocTransfer> {
* @param documentIds * @param documentIds
* @return * @return
*/ */
boolean removeByDocumentIds(List<Long> documentIds); int removeByDocumentIds(List<Long> documentIds);
} }

@ -39,5 +39,5 @@ public interface IEhsDocTransferService extends IService<EhsDocTransfer> {
* @param documentIds * @param documentIds
* @return * @return
*/ */
boolean removeByDocumentIds(List<Long> documentIds); int removeByDocumentIds(List<Long> documentIds);
} }

@ -62,7 +62,7 @@ public class EhsDocTransferServiceImpl extends ServiceImpl<EhsDocTransferMapper,
* @return * @return
*/ */
@Override @Override
public boolean removeByDocumentIds(List<Long> documentIds) { public int removeByDocumentIds(List<Long> documentIds) {
return ehsDocTransferMapper.removeByDocumentIds(documentIds); return ehsDocTransferMapper.removeByDocumentIds(documentIds);
} }

@ -50,8 +50,12 @@ public class EhsDocumentServiceImpl extends ServiceImpl<EhsDocumentMapper, EhsDo
@Override @Override
public List<EhsDocument> selectEhsDocumentList(EhsDocument ehsDocument) { public List<EhsDocument> selectEhsDocumentList(EhsDocument ehsDocument) {
// 按部门区分权限,局端没有查询全部的权限 // 按部门区分权限,局端没有查询全部的权限
SysUser currentUser = SecurityUtils.getLoginUser().getUser(); /*SysUser currentUser = SecurityUtils.getLoginUser().getUser();
ehsDocument.setDeptId(currentUser.getDept().getDeptId().longValue()); ehsDocument.setDeptId(currentUser.getDept().getDeptId().longValue());*/
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null &&
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0) {
ehsDocument.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
return ehsDocumentMapper.selectEhsDocumentList(ehsDocument); return ehsDocumentMapper.selectEhsDocumentList(ehsDocument);
} }
/*@Override /*@Override

@ -27,4 +27,5 @@ public interface EhsMaterialMapper extends BaseMapper<EhsMaterial> {
* @return * @return
*/ */
public List<EhsMaterial> selectEhsMaterialList(EhsMaterial ehsMaterial); public List<EhsMaterial> selectEhsMaterialList(EhsMaterial ehsMaterial);
public List<EhsMaterial> selectEhsMateriallExportList(EhsMaterial ehsMaterial);
} }

@ -29,5 +29,5 @@ public interface IEhsMaterialService extends IService<EhsMaterial> {
*/ */
public List<EhsMaterial> selectEhsMaterialList(EhsMaterial ehsMaterial); public List<EhsMaterial> selectEhsMaterialList(EhsMaterial ehsMaterial);
public String importMaterial(List<EhsMaterial> list,String classType, Boolean isUpdateSupport); public String importMaterial(List<EhsMaterial> list,String classType, Boolean isUpdateSupport);
public List<EhsMaterial> selectEhsMateriallExportList(EhsMaterial ehsMaterial);
} }

@ -66,7 +66,13 @@ public class EhsMaterialServiceImpl extends ServiceImpl<EhsMaterialMapper, EhsMa
} }
return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial); return ehsMaterialMapper.selectEhsMaterialList(ehsMaterial);
} }
public List<EhsMaterial> selectEhsMateriallExportList(EhsMaterial ehsMaterial){
if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null &&
SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){
ehsMaterial.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue());
}
return ehsMaterialMapper.selectEhsMateriallExportList(ehsMaterial);
}
private LambdaQueryWrapper<EhsMaterial> buildQueryWrapper(EhsMaterial query) { private LambdaQueryWrapper<EhsMaterial> buildQueryWrapper(EhsMaterial query) {
Map<String, Object> params = query.getParams(); Map<String, Object> params = query.getParams();

@ -24,15 +24,16 @@
</resultMap> </resultMap>
<sql id="selectEhsDocumentVo"> <sql id="selectEhsDocumentVo">
select id, doc_name, doc_font, draft_dept, doc_type, doc_number, receive_time, status, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_document select e.*, d.dept_name from ehs_document e
left join sys_dept d on e.dept_id = d.dept_id
</sql> </sql>
<select id="selectEhsDocumentList" parameterType="EhsDocument" resultMap="EhsDocumentResult"> <select id="selectEhsDocumentList" parameterType="EhsDocument" resultMap="EhsDocumentResult">
<include refid="selectEhsDocumentVo"/> <include refid="selectEhsDocumentVo"/>
<where> <where>
<if test="deptId != null "> and e.dept_Id = #{deptId}</if>
<if test="docName != null and docName != ''"> and doc_name like concat('%', #{docName}, '%')</if> <if test="docName != null and docName != ''"> and doc_name like concat('%', #{docName}, '%')</if>
<if test="docType != null "> and doc_type = #{docType}</if> <if test="docType != null "> and doc_type = #{docType}</if>
<if test="deptId != null">and dept_id = #{deptId}</if>
<if test="status !=null">and status = #{status}</if> <if test="status !=null">and status = #{status}</if>
</where> </where>
</select> </select>

@ -36,7 +36,22 @@
on dt.material_id= m.material_id and dt.outbound_user_id is null group by dt.material_id ) a on dt.material_id= m.material_id and dt.outbound_user_id is null group by dt.material_id ) a
on a.material_id= m.material_id on a.material_id= m.material_id
</sql> </sql>
<sql id="selectEhsMaterialExportVo">
SELECT
m1.class_name_mast class_Second,m2.class_name_sub material_Name,
m.*, d.dept_name, a.send_quantity, a.material_detail_id
FROM
ehs_material m
LEFT JOIN sys_dept d ON m.dept_id = d.dept_id
left join sys_dict_data dict on dict.dict_value=m.class_first and dict.dict_type ='material_class_fast'
left join material_class_master m1 on m1.class_mast_type = m.class_first and m.class_second=m1.class_mast_id
left join material_class_sub m2 on m2.class_mast_id=m.class_second and m2.class_sub_id=m.material_name and m2.class_mast_type=m.class_first
LEFT JOIN ( SELECT GROUP_CONCAT( send_quantity ) send_quantity, m.material_id, material_detail_id
FROM ehs_material m
LEFT JOIN ehs_material_detail dt ON dt.material_id = m.material_id AND dt.outbound_user_id IS NULL
GROUP BY dt.material_id
) a ON a.material_id = m.material_id
</sql>
<select id="selectEhsMaterialList" parameterType="EhsMaterial" resultMap="EhsMaterialResult"> <select id="selectEhsMaterialList" parameterType="EhsMaterial" resultMap="EhsMaterialResult">
<include refid="selectEhsMaterialVo"/> <include refid="selectEhsMaterialVo"/>
<where> <where>
@ -54,7 +69,23 @@
<if test="isSendQuantity == 1 "> and a.send_quantity is not null </if> <if test="isSendQuantity == 1 "> and a.send_quantity is not null </if>
</where> </where>
</select> </select>
<select id="selectEhsMateriallExportList" parameterType="EhsMaterial" resultMap="EhsMaterialResult">
<include refid="selectEhsMaterialExportVo"/>
<where>
<if test="deptId != null "> and m.dept_Id = #{deptId}</if>
<if test="materialType != null "> and material_type = #{materialType}</if>
<if test="classFirst != null "> and class_first = #{classFirst}</if>
<if test="classSecond != null and classSecond != ''"> and class_second = #{classSecond}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="materialSpecs != null and materialSpecs != ''"> and material_specs = #{materialSpecs}</if>
<if test="materialQuantity != null and materialQuantity != ''"> and material_quantity = #{materialQuantity}</if>
<if test="reserveLocation != null and reserveLocation != ''"> and reserve_location like concat('%', #{reserveLocation}, '%')</if>
<if test="managerPerson != null and managerPerson != ''"> and Manager_person like concat('%', #{managerPerson}, '%')</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 == 1 "> and a.send_quantity is not null </if>
</where>
</select>
<select id="selectEhsMaterialByMaterialId" parameterType="Long" resultMap="EhsMaterialResult"> <select id="selectEhsMaterialByMaterialId" parameterType="Long" resultMap="EhsMaterialResult">
<include refid="selectEhsMaterialVo"/> <include refid="selectEhsMaterialVo"/>
where m.material_id = #{materialId} where m.material_id = #{materialId}

@ -20,10 +20,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<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="deptType" column="dept_type" />
</resultMap> </resultMap>
<sql id="selectDeptVo"> <sql id="selectDeptVo">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone,
d.email, d.status, d.del_flag, d.create_by, d.create_time ,d.dept_type
from sys_dept d from sys_dept d
</sql> </sql>
@ -42,6 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="deptType != null and deptType != ''">
AND (dept_Type = #{deptType} or dept_Type ='0')
</if>
<if test="deptIds != null and deptIds != ''"> <if test="deptIds != null and deptIds != ''">
and dept_id in ( ${deptIds} ) and dept_id in ( ${deptIds} )
</if> </if>
@ -82,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by d.order_num order by d.order_num
</select> </select>
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email,d.dept_type, d.status,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d from sys_dept d
where d.dept_id = #{deptId} where d.dept_id = #{deptId}
@ -122,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">email,</if> <if test="email != null and email != ''">email,</if>
<if test="status != null">status,</if> <if test="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="deptType != null and deptType != ''">dept_Type,</if>
create_time create_time
)values( )values(
<if test="deptId != null and deptId != 0">#{deptId},</if> <if test="deptId != null and deptId != 0">#{deptId},</if>
@ -134,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null and email != ''">#{email},</if> <if test="email != null and email != ''">#{email},</if>
<if test="status != null">#{status},</if> <if test="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="deptType != null and deptType != ''">#{deptType},</if>
sysdate() sysdate()
) )
</insert> </insert>
@ -150,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null">email = #{email},</if> <if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="deptType != null and deptType != ''">dept_Type = #{deptType},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
where dept_id = #{deptId} where dept_id = #{deptId}

@ -133,3 +133,11 @@ export function deptTreeSelect() {
method: 'get' method: 'get'
}) })
} }
// 查询部门下拉树结构
export function deptTreeSelectByDeptType(deptType) {
return request({
url: '/system/user/deptTreeSelectByDeptType/'+deptType,
method: 'get'
})
}

@ -55,7 +55,7 @@ export default {
// (MB) // (MB)
fileSize: { fileSize: {
type: Number, type: Number,
default: 5, default: 50,
}, },
// , ['png', 'jpg', 'jpeg'] // , ['png', 'jpg', 'jpeg']
fileType: { fileType: {

@ -8,6 +8,16 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item label="登记部门" prop="deptId" v-show="deptShow">
<el-select v-model="queryParams.deptId" filterable placeholder="请选择部门" clearable>
<el-option
v-for="dict in allDeptList"
:key="dict.deptId"
:label="dict.deptName"
:value="dict.deptId"
/>
</el-select>
</el-form-item>
<el-form-item label="公文名称" prop="docName"> <el-form-item label="公文名称" prop="docName">
<el-input <el-input
v-model="queryParams.docName" v-model="queryParams.docName"
@ -110,6 +120,7 @@
<span>{{ Number(scope.$index) + 1 }}</span> <span>{{ Number(scope.$index) + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="登记部门" align="center" prop="deptName" v-if="this.$store.state.user.parentId==0"/>
<el-table-column label="公文名称" align="center" prop="docName" /> <el-table-column label="公文名称" align="center" prop="docName" />
<el-table-column label="公文字号" align="center" prop="docFont" /> <el-table-column label="公文字号" align="center" prop="docFont" />
<el-table-column label="拟稿部门" align="center" prop="draftDept" /> <el-table-column label="拟稿部门" align="center" prop="draftDept" />
@ -366,6 +377,7 @@ import {
returnEhsDoc, returnEhsDoc,
} from "@/api/ehs/ehsDocTransfer"; } from "@/api/ehs/ehsDocTransfer";
import { parseTime } from "../../../utils/ruoyi"; import { parseTime } from "../../../utils/ruoyi";
import {listAllDept } from "@/api/system/dept";
import dict from "@/utils/dict"; import dict from "@/utils/dict";
export default { export default {
name: "EhsDocument", name: "EhsDocument",
@ -386,6 +398,10 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
deptShow: false,
//
allDeptList: [],
// //
ehsDocumentList: [], ehsDocumentList: [],
// //
@ -406,6 +422,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
deptId: null,
docName: null, docName: null,
docType: null, docType: null,
}, },
@ -420,9 +437,11 @@ export default {
}; };
}, },
created() { created() {
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.getList(); this.getList();
// 稿 // 稿
this.getAllDraftDept(); this.getAllDraftDept();
this.getListAllDept();
}, },
methods: { methods: {
dict, dict,
@ -436,7 +455,15 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 单位信息列表 */
getListAllDept() {
console.log(this.$store.state.user.deptId);
this.loading = true;
listAllDept().then(response => {
this.allDeptList = response.data;
this.loading = false;
});
},
/** 获取拟稿部门下拉列表 */ /** 获取拟稿部门下拉列表 */
getAllDraftDept() { getAllDraftDept() {
getAllDraftDept().then((res) => { getAllDraftDept().then((res) => {

@ -225,7 +225,7 @@
<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" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="curDeptId == scope.row.deptId"> <template slot-scope="scope" >
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -470,10 +470,12 @@ export default {
{ required: true, message: "不能为空", trigger: "change" } { required: true, message: "不能为空", trigger: "change" }
], ],
leaderTel: [ leaderTel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
safetyManagerTel: [ safetyManagerTel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
} }
}; };

@ -146,7 +146,7 @@
<el-table-column label="救援人员数量" align="center" prop="rescueWorkerNum" /> <el-table-column label="救援人员数量" align="center" prop="rescueWorkerNum" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="curDeptId == scope.row.deptId"> <template slot-scope="scope" >
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -303,7 +303,8 @@ export default {
{ required: true, message: "队伍名称不能为空", trigger: "blur" } { required: true, message: "队伍名称不能为空", trigger: "blur" }
], ],
phone: [ phone: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
}, },
// teamId // teamId

@ -287,7 +287,8 @@ export default {
// //
rules: { rules: {
phone: [ phone: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
workerName: [ workerName: [
{ required: true, message: "人员姓名不能为空", trigger: "blur" } { required: true, message: "人员姓名不能为空", trigger: "blur" }

@ -217,7 +217,7 @@
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:edit']" v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:edit']"
>修改</el-button> >修改</el-button>
</el-col>--> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
@ -228,7 +228,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']" v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -362,14 +362,14 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleUpdate(scope.row,true)" @click="handleUpdate(scope.row,true)"
>明细</el-button> >明细</el-button>-->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']" v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']"
>删除</el-button>--> >删除</el-button>
<!--<el-button v-if="scope.row.isSupervise==0" <!--<el-button v-if="scope.row.isSupervise==0"
size="mini" size="mini"
type="text" type="text"
@ -710,6 +710,7 @@ export default {
isReadOnly:false,//form isReadOnly:false,//form
// //
deptShow: false, deptShow: false,
curDeptId:null,//id
// //
allDeptList: [], allDeptList: [],
currEnterpriseInfo:{},// currEnterpriseInfo:{},//
@ -837,6 +838,7 @@ export default {
this.$route.query.overTime = null; this.$route.query.overTime = null;
this.getListAllDept(); this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false; this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.curDeptId = this.$store.state.user.deptId;
console.log(this.$route.query.overTime); console.log(this.$route.query.overTime);
}, },

@ -220,7 +220,7 @@
/> />
<!-- 添加或修改行政执法台账对话框 --> <!-- 添加或修改行政执法台账对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="单位名称" prop="enterpriseName"> <el-form-item label="单位名称" prop="enterpriseName">
<el-input v-model="form.enterpriseName" placeholder="请输入单位名称" /> <el-input v-model="form.enterpriseName" placeholder="请输入单位名称" />
@ -228,16 +228,24 @@
<el-form-item label="地址" prop="location"> <el-form-item label="地址" prop="location">
<el-input v-model="form.location" placeholder="请输入地址" /> <el-input v-model="form.location" placeholder="请输入地址" />
</el-form-item> </el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="responsiblePerson"> <el-form-item label="负责人" prop="responsiblePerson">
<el-input v-model="form.responsiblePerson" placeholder="请输入负责人" /> <el-input v-model="form.responsiblePerson" placeholder="请输入负责人" />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="phone"> <el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" /> <el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-form-item label="存在隐患" prop="risk"> <el-form-item label="存在隐患" prop="risk">
<el-input v-model="form.risk" placeholder="请输入存在隐患" /> <el-input v-model="form.risk" placeholder="请输入存在隐患" />
</el-form-item> </el-form-item>
<el-form-item label="是否重大隐患" prop="isLargeRisk"> <el-row>
<el-col :span="12">
<el-form-item label="是否重大隐患" prop="isLargeRisk" label-width="100px">
<el-select v-model="form.isLargeRisk" placeholder="请选择是否重大隐患"> <el-select v-model="form.isLargeRisk" placeholder="请选择是否重大隐患">
<el-option <el-option
v-for="dict in dict.type.sys_yes_no" v-for="dict in dict.type.sys_yes_no"
@ -247,12 +255,26 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否建立双预防" prop="isEstablishPrevention" label-width="110px">
<el-select v-model="form.isEstablishPrevention" placeholder="请选择是否建立双预防">
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="整改措施" prop="rectificationMeasure"> <el-form-item label="整改措施" prop="rectificationMeasure">
<el-input v-model="form.rectificationMeasure" placeholder="请输入整改措施" /> <el-input v-model="form.rectificationMeasure" placeholder="请输入整改措施" />
</el-form-item> </el-form-item>
<el-form-item label="整改责任人" prop="rectificationPeople">
<el-input v-model="form.rectificationPeople" placeholder="请输入整改责任人" /> <el-row>
</el-form-item> <el-col :span="12">
<el-form-item label="企业类别" prop="enterpriseCategory"> <el-form-item label="企业类别" prop="enterpriseCategory">
<el-select v-model="form.enterpriseCategory" placeholder="请选择企业类别"> <el-select v-model="form.enterpriseCategory" placeholder="请选择企业类别">
<el-option <el-option
@ -263,20 +285,16 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业人数" prop="employeeNum"> <el-form-item label="企业人数" prop="employeeNum">
<el-input v-model="form.employeeNum" placeholder="请输入企业人数" /> <el-input v-model="form.employeeNum" placeholder="请输入企业人数" />
</el-form-item> </el-form-item>
<el-form-item label="是否建立双预防" prop="isEstablishPrevention"> </el-col>
<el-select v-model="form.isEstablishPrevention" placeholder="请选择是否建立双预防"> </el-row>
<el-option <el-row>
v-for="dict in dict.type.sys_yes_no" <el-col :span="12">
:key="dict.value" <el-form-item label="时间" prop="time" label-width="60px">
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间" prop="time">
<el-date-picker clearable <el-date-picker clearable
v-model="form.time" v-model="form.time"
type="date" type="date"
@ -284,6 +302,14 @@
placeholder="请选择时间"> placeholder="请选择时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="整改责任人" prop="rectificationPeople" label-width="90px">
<el-input v-model="form.rectificationPeople" placeholder="请输入整改责任人" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="其他" prop="other"> <el-form-item label="其他" prop="other">
<el-input v-model="form.other" placeholder="请输入其他" /> <el-input v-model="form.other" placeholder="请输入其他" />
</el-form-item> </el-form-item>
@ -367,7 +393,8 @@ export default {
{ required: true, message: "单位名称不能为空", trigger: "blur" } { required: true, message: "单位名称不能为空", trigger: "blur" }
], ],
phone: [ phone: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
} }
}; };

@ -198,14 +198,14 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="curDeptId==scope.row.deptId" <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['ehsMaterial:ehsMaterial:edit']" v-hasPermi="['ehsMaterial:ehsMaterial:edit']"
>修改</el-button> >修改</el-button>
<el-button v-if="curDeptId==scope.row.deptId" <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@ -539,7 +539,8 @@
{ required: true, message: "数量不能为空", trigger: "blur" } { required: true, message: "数量不能为空", trigger: "blur" }
], ],
tel: [ tel: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
receiveName: [ receiveName: [
{ required: true, message: "领取人不能为空", trigger: "blur" } { required: true, message: "领取人不能为空", trigger: "blur" }
@ -554,7 +555,8 @@
{ required: true, message: "经手人不能为空", trigger: "blur" } { required: true, message: "经手人不能为空", trigger: "blur" }
], ],
receiveTel: [ receiveTel: [
{ required: true, message: "领取人电话不能为空", trigger: "blur", pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/ } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ required: true, message: "领取人电话不能为空", trigger: "blur", pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/ }*/
], ],
}, },
@ -789,7 +791,7 @@
handleExport() { handleExport() {
this.download('ehsMaterial/ehsMaterial/export', { this.download('ehsMaterial/ehsMaterial/export', {
...this.queryParams ...this.queryParams
}, `ehsMaterial_${new Date().getTime()}.xlsx`) }, `物资信息_${new Date().getTime()}.xlsx`)
}, },
handleSendCommand(row) { handleSendCommand(row) {
if(row.sendQuantity!=null){ if(row.sendQuantity!=null){

@ -340,7 +340,8 @@ export default {
{ required: true, message: "队伍名称不能为空", trigger: "blur" } { required: true, message: "队伍名称不能为空", trigger: "blur" }
], ],
phone: [ phone: [
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" } { required: true, message: "电话不能为空", trigger: "blur" },
/*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
} }
}; };

@ -352,7 +352,7 @@ export default {
], ],
phone: [ phone: [
{ required: true, message: "电话不能为空", trigger: "blur" }, { required: true, message: "电话不能为空", trigger: "blur" },
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" } /*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系方式必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
} }
}; };

@ -285,14 +285,14 @@
<!--<el-table-column label="创建者部门" align="center" prop="deptId" />--> <!--<el-table-column label="创建者部门" align="center" prop="deptId" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="curDeptId==scope.row.deptId" <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['ehsRisk:ehsRisk:edit']" v-hasPermi="['ehsRisk:ehsRisk:edit']"
>修改</el-button> >修改</el-button>
<el-button v-if="curDeptId==scope.row.deptId" <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@ -340,8 +340,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="风险点位置" prop="riskLocation1"> <el-form-item label="风险点位置" prop="riskLocation1">
@ -560,21 +558,21 @@
], ],
villageTel: [ villageTel: [
{ required: true, message: "乡级责任人联系电话不能为空", trigger: "blur" }, { required: true, message: "乡级责任人联系电话不能为空", trigger: "blur" },
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } /* { pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
villageName1: [ villageName1: [
{ required: true, message: "村级责任人姓名不能为空", trigger: "blur" } { required: true, message: "村级责任人姓名不能为空", trigger: "blur" }
], ],
villageTel1: [ villageTel1: [
{ required: true, message: "村级责任人联系电话不能为空", trigger: "blur" }, { required: true, message: "村级责任人联系电话不能为空", trigger: "blur" },
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } /*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
], ],
inspectionName: [ inspectionName: [
{ required: true, message: "巡查责任人姓名不能为空", trigger: "blur" } { required: true, message: "巡查责任人姓名不能为空", trigger: "blur" }
], ],
inspectionTel: [ inspectionTel: [
{ required: true, message: "巡查责任人电话不能为空", trigger: "blur" }, { required: true, message: "巡查责任人电话不能为空", trigger: "blur" },
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" } /*{ pattern:/^((0\d{2,3}-\d{7,8})|(1[345678]\d{9}))$/, message: "联系电话必须是手机或固话(区号-固话)", trigger: "change" }*/
] ]
} }
}; };

@ -133,8 +133,8 @@ export default {
return { return {
codeUrl: "", codeUrl: "",
loginForm: { loginForm: {
username: "admin", username: "",
password: "admin123", password: "",
rememberMe: false, rememberMe: false,
code: "", code: "",
uuid: "", uuid: "",

@ -19,6 +19,16 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="部门分类" prop="deptType">
<el-select v-model="queryParams.deptType" placeholder="部门分类" clearable>
<el-option
v-for="dict in dict.type.dept_type"
:key="dict.value"
:label="dict.label"
: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 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>
@ -63,6 +73,11 @@
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="deptType" label="部门分类" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.dept_type" :value="scope.row.deptType"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="200"> <el-table-column label="创建时间" align="center" prop="createTime" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
@ -148,6 +163,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="部门分类" prop="deptType">
<el-select v-model="form.deptType" placeholder="请选择部门分类">
<el-option
v-for="dict in dict.type.dept_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
</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>
@ -164,7 +196,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "Dept", name: "Dept",
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable',"dept_type"],
components: { Treeselect }, components: { Treeselect },
data() { data() {
return { return {
@ -187,7 +219,8 @@ export default {
// //
queryParams: { queryParams: {
deptName: undefined, deptName: undefined,
status: undefined status: undefined,
deptType: undefined,
}, },
// //
form: {}, form: {},
@ -202,6 +235,9 @@ export default {
orderNum: [ orderNum: [
{ required: true, message: "显示排序不能为空", trigger: "blur" } { required: true, message: "显示排序不能为空", trigger: "blur" }
], ],
deptType: [
{ required: true, message: "部门类型不能为空", trigger: "blur" }
],
email: [ email: [
{ {
type: "email", type: "email",
@ -257,7 +293,8 @@ export default {
leader: undefined, leader: undefined,
phone: undefined, phone: undefined,
email: undefined, email: undefined,
status: "0" status: "0",
deptType:undefined,
}; };
this.resetForm("form"); this.resetForm("form");
}, },

@ -74,6 +74,16 @@
end-placeholder="结束日期" end-placeholder="结束日期"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="部门分类" prop="deptType">
<el-select v-model="queryParams.deptType" placeholder="部门分类" clearable>
<el-option
v-for="dict in dict.type.dept_type"
:key="dict.value"
:label="dict.label"
: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 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>
@ -341,14 +351,14 @@
</template> </template>
<script> <script>
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user"; import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect ,deptTreeSelectByDeptType} from "@/api/system/user";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "User", name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'], dicts: ['sys_normal_disable', 'sys_user_sex', 'dept_type'],
components: { Treeselect }, components: { Treeselect },
data() { data() {
return { return {
@ -482,9 +492,16 @@ export default {
}, },
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
getDeptTree() { getDeptTree() {
if(this.queryParams.deptType==null ||this.queryParams.deptType==""){
deptTreeSelect().then(response => { deptTreeSelect().then(response => {
this.deptOptions = response.data; this.deptOptions = response.data;
}); });
}else{
deptTreeSelectByDeptType(this.queryParams.deptType).then(response => {
this.deptOptions = response.data;
});
}
}, },
// //
filterNode(value, data) { filterNode(value, data) {
@ -533,6 +550,7 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getDeptTree()
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

Loading…
Cancel
Save