累计跟新

main
liukewei 10 months ago
parent 6f9d7e9acc
commit ac3d2c5726

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

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

@ -248,4 +248,12 @@ public class SysUserController extends BaseController
{
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)
private String deptIds;
/** 部门分类 */
private String deptType;
public String getDeptType() {
return deptType;
}
public void setDeptType(String deptType) {
this.deptType = deptType;
}
public String getDeptIds() {
return deptIds;

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

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

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

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

@ -27,4 +27,5 @@ public interface EhsMaterialMapper extends BaseMapper<EhsMaterial> {
* @return
*/
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 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);
}
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) {
Map<String, Object> params = query.getParams();

@ -24,15 +24,16 @@
</resultMap>
<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>
<select id="selectEhsDocumentList" parameterType="EhsDocument" resultMap="EhsDocumentResult">
<include refid="selectEhsDocumentVo"/>
<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="docType != null "> and doc_type = #{docType}</if>
<if test="deptId != null">and dept_id = #{deptId}</if>
<if test="status !=null">and status = #{status}</if>
</where>
</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 a.material_id= m.material_id
</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">
<include refid="selectEhsMaterialVo"/>
<where>
@ -54,7 +69,23 @@
<if test="isSendQuantity == 1 "> and a.send_quantity is not null </if>
</where>
</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">
<include refid="selectEhsMaterialVo"/>
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="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="deptType" column="dept_type" />
</resultMap>
<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
</sql>
@ -42,6 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="deptType != null and deptType != ''">
AND (dept_Type = #{deptType} or dept_Type ='0')
</if>
<if test="deptIds != null and deptIds != ''">
and dept_id in ( ${deptIds} )
</if>
@ -82,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by d.order_num
</select>
<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
from sys_dept d
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="status != null">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="deptType != null and deptType != ''">dept_Type,</if>
create_time
)values(
<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="status != null">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="deptType != null and deptType != ''">#{deptType},</if>
sysdate()
)
</insert>
@ -150,6 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="email != null">email = #{email},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="deptType != null and deptType != ''">dept_Type = #{deptType},</if>
update_time = sysdate()
</set>
where dept_id = #{deptId}

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

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

@ -8,6 +8,16 @@
v-show="showSearch"
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-input
v-model="queryParams.docName"
@ -110,6 +120,7 @@
<span>{{ Number(scope.$index) + 1 }}</span>
</template>
</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="docFont" />
<el-table-column label="拟稿部门" align="center" prop="draftDept" />
@ -366,6 +377,7 @@ import {
returnEhsDoc,
} from "@/api/ehs/ehsDocTransfer";
import { parseTime } from "../../../utils/ruoyi";
import {listAllDept } from "@/api/system/dept";
import dict from "@/utils/dict";
export default {
name: "EhsDocument",
@ -386,6 +398,10 @@ export default {
showSearch: true,
//
total: 0,
//
deptShow: false,
//
allDeptList: [],
//
ehsDocumentList: [],
//
@ -406,6 +422,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
docName: null,
docType: null,
},
@ -420,9 +437,11 @@ export default {
};
},
created() {
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.getList();
// 稿
this.getAllDraftDept();
this.getListAllDept();
},
methods: {
dict,
@ -436,7 +455,15 @@ export default {
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().then((res) => {

@ -225,7 +225,7 @@
<el-table-column label="分管安全副职电话" align="center" prop="safetyManagerTel" />
<el-table-column label="备注" align="center" prop="remark" />
<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
size="mini"
type="text"
@ -470,10 +470,12 @@ export default {
{ required: true, message: "不能为空", trigger: "change" }
],
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: [
{ 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="remark" />
<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
size="mini"
type="text"
@ -303,7 +303,8 @@ export default {
{ required: true, message: "队伍名称不能为空", trigger: "blur" }
],
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

@ -287,7 +287,8 @@ export default {
//
rules: {
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: [
{ required: true, message: "人员姓名不能为空", trigger: "blur" }

@ -217,7 +217,7 @@
@click="handleUpdate"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:edit']"
>修改</el-button>
</el-col>-->
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -228,7 +228,7 @@
@click="handleDelete"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']"
>删除</el-button>
</el-col>
</el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
@ -362,14 +362,14 @@
type="text"
icon="el-icon-delete"
@click="handleUpdate(scope.row,true)"
>明细</el-button>
>明细</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['ehsHiddenDanger:ehsHiddenDanger:remove']"
>删除</el-button>-->
>删除</el-button>
<!--<el-button v-if="scope.row.isSupervise==0"
size="mini"
type="text"
@ -710,6 +710,7 @@ export default {
isReadOnly:false,//form
//
deptShow: false,
curDeptId:null,//id
//
allDeptList: [],
currEnterpriseInfo:{},//
@ -837,6 +838,7 @@ export default {
this.$route.query.overTime = null;
this.getListAllDept();
this.deptShow = this.$store.state.user.parentId==0 ?true :false;
this.curDeptId = this.$store.state.user.deptId;
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-item label="单位名称" prop="enterpriseName">
<el-input v-model="form.enterpriseName" placeholder="请输入单位名称" />
@ -228,62 +228,88 @@
<el-form-item label="地址" prop="location">
<el-input v-model="form.location" placeholder="请输入地址" />
</el-form-item>
<el-form-item label="负责人" prop="responsiblePerson">
<el-input v-model="form.responsiblePerson" placeholder="请输入负责人" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="responsiblePerson">
<el-input v-model="form.responsiblePerson" placeholder="请输入负责人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="存在隐患" prop="risk">
<el-input v-model="form.risk" placeholder="请输入存在隐患" />
</el-form-item>
<el-form-item label="是否重大隐患" prop="isLargeRisk">
<el-select v-model="form.isLargeRisk" 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-row>
<el-col :span="12">
<el-form-item label="是否重大隐患" prop="isLargeRisk" label-width="100px">
<el-select v-model="form.isLargeRisk" 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-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-input v-model="form.rectificationMeasure" placeholder="请输入整改措施" />
</el-form-item>
<el-form-item label="整改责任人" prop="rectificationPeople">
<el-input v-model="form.rectificationPeople" placeholder="请输入整改责任人" />
</el-form-item>
<el-form-item label="企业类别" prop="enterpriseCategory">
<el-select v-model="form.enterpriseCategory" placeholder="请选择企业类别">
<el-option
v-for="dict in dict.type.enterprise_category"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="企业人数" prop="employeeNum">
<el-input v-model="form.employeeNum" placeholder="请输入企业人数" />
</el-form-item>
<el-form-item label="是否建立双预防" prop="isEstablishPrevention">
<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-form-item label="时间" prop="time">
<el-date-picker clearable
v-model="form.time"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择时间">
</el-date-picker>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="企业类别" prop="enterpriseCategory">
<el-select v-model="form.enterpriseCategory" placeholder="请选择企业类别">
<el-option
v-for="dict in dict.type.enterprise_category"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业人数" prop="employeeNum">
<el-input v-model="form.employeeNum" placeholder="请输入企业人数" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="时间" prop="time" label-width="60px">
<el-date-picker clearable
v-model="form.time"
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="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-input v-model="form.other" placeholder="请输入其他" />
</el-form-item>
@ -367,7 +393,8 @@ export default {
{ required: true, message: "单位名称不能为空", trigger: "blur" }
],
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 label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="curDeptId==scope.row.deptId"
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['ehsMaterial:ehsMaterial:edit']"
>修改</el-button>
<el-button v-if="curDeptId==scope.row.deptId"
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@ -539,7 +539,8 @@
{ required: true, message: "数量不能为空", trigger: "blur" }
],
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: [
{ required: true, message: "领取人不能为空", trigger: "blur" }
@ -554,7 +555,8 @@
{ required: true, message: "经手人不能为空", trigger: "blur" }
],
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() {
this.download('ehsMaterial/ehsMaterial/export', {
...this.queryParams
}, `ehsMaterial_${new Date().getTime()}.xlsx`)
}, `物资信息_${new Date().getTime()}.xlsx`)
},
handleSendCommand(row) {
if(row.sendQuantity!=null){

@ -340,7 +340,8 @@ export default {
{ required: true, message: "队伍名称不能为空", trigger: "blur" }
],
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: [
{ 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" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="curDeptId==scope.row.deptId"
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['ehsRisk:ehsRisk:edit']"
>修改</el-button>
<el-button v-if="curDeptId==scope.row.deptId"
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@ -340,8 +340,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="风险点位置" prop="riskLocation1">
@ -560,21 +558,21 @@
],
villageTel: [
{ 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: [
{ required: true, message: "村级责任人姓名不能为空", trigger: "blur" }
],
villageTel1: [
{ 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: [
{ required: true, message: "巡查责任人姓名不能为空", trigger: "blur" }
],
inspectionTel: [
{ 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 {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
username: "",
password: "",
rememberMe: false,
code: "",
uuid: "",

@ -19,6 +19,16 @@
/>
</el-select>
</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-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>
@ -63,6 +73,11 @@
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</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">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
@ -148,6 +163,23 @@
</el-form-item>
</el-col>
</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>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -164,7 +196,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Dept",
dicts: ['sys_normal_disable'],
dicts: ['sys_normal_disable',"dept_type"],
components: { Treeselect },
data() {
return {
@ -187,7 +219,8 @@ export default {
//
queryParams: {
deptName: undefined,
status: undefined
status: undefined,
deptType: undefined,
},
//
form: {},
@ -202,6 +235,9 @@ export default {
orderNum: [
{ required: true, message: "显示排序不能为空", trigger: "blur" }
],
deptType: [
{ required: true, message: "部门类型不能为空", trigger: "blur" }
],
email: [
{
type: "email",
@ -257,7 +293,8 @@ export default {
leader: undefined,
phone: undefined,
email: undefined,
status: "0"
status: "0",
deptType:undefined,
};
this.resetForm("form");
},

@ -74,6 +74,16 @@
end-placeholder="结束日期"
></el-date-picker>
</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-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>
@ -341,14 +351,14 @@
</template>
<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 Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'],
dicts: ['sys_normal_disable', 'sys_user_sex', 'dept_type'],
components: { Treeselect },
data() {
return {
@ -482,9 +492,16 @@ export default {
},
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
if(this.queryParams.deptType==null ||this.queryParams.deptType==""){
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
}else{
deptTreeSelectByDeptType(this.queryParams.deptType).then(response => {
this.deptOptions = response.data;
});
}
},
//
filterNode(value, data) {
@ -533,6 +550,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getDeptTree()
this.getList();
},
/** 重置按钮操作 */

Loading…
Cancel
Save