Merge branch 'master' of http://111.30.93.211:10101/r/supipe
| | |
| | | return materialReleaseService.materialReleaseExcel(values,response); |
| | | } |
| | | |
| | | |
| | | //搅拌站 消耗列表 |
| | | @PostMapping("/materialRew") |
| | | public BasicResult materialRew(@RequestBody HashMap<String,Object> values) { |
| | | return materialReleaseService.materialRew(values); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.concret.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @ToString |
| | | public class TRawMaterial implements Serializable { |
| | | /** |
| | | * 搅拌id |
| | | */ |
| | | private Integer rawMaterialId; |
| | | |
| | | /** |
| | | * 盘次 |
| | | */ |
| | | private String piece; |
| | | |
| | | /** |
| | | * 原材料仓 |
| | | */ |
| | | private String storage; |
| | | |
| | | /** |
| | | * 原材料 |
| | | */ |
| | | private String material; |
| | | |
| | | /** |
| | | * 原材料规格 |
| | | */ |
| | | private String spec; |
| | | |
| | | /** |
| | | * 含水率*100、含固率*100... |
| | | */ |
| | | private String watfull; |
| | | |
| | | /** |
| | | * 配方用量 |
| | | */ |
| | | private String recamnt; |
| | | |
| | | /** |
| | | * 设定用量 |
| | | */ |
| | | private String planamnt; |
| | | |
| | | /** |
| | | * 实际用量 |
| | | */ |
| | | private String factamnt; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String flag; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String savestamp; |
| | | |
| | | /** |
| | | * 搅拌站接入主键 |
| | | */ |
| | | private Integer byId; |
| | | |
| | | /** |
| | | * This field was generated by MyBatis Generator. |
| | | * This field corresponds to the database table t_raw_material |
| | | * |
| | | * @mbg.generated Fri Nov 03 09:16:01 CST 2023 |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.concret.entity.dto; |
| | | |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PieceDto implements Serializable { |
| | | |
| | | private Integer byId; |
| | | |
| | | |
| | | private List<TRawMaterial> rawMaterials; |
| | | |
| | | } |
| | |
| | | |
| | | import com.thhy.general.annotations.Idkey; |
| | | import com.thhy.materials.modules.biz.concret.entity.TMaterialRelease; |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import com.thhy.materials.modules.biz.concret.entity.TReleaseData; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.PieceDto; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | void releaseDataDel(String materialReleaseId); |
| | | |
| | | void materialReleaseDel(String materialReleaseId); |
| | | |
| | | List<PieceDto> pieceList(HashMap<String, Object> values); |
| | | |
| | | List<TRawMaterial> materialRew(Integer byId); |
| | | } |
| | |
| | | BasicResult materialReleaseDel(String materialReleaseId); |
| | | |
| | | BasicResult materialReleaseExcel(HashMap<String, Object> values, HttpServletResponse response) throws FileNotFoundException; |
| | | |
| | | BasicResult materialRew(HashMap<String, Object> values); |
| | | } |
| | |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.materials.modules.biz.concret.entity.TMaterialRelease; |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import com.thhy.materials.modules.biz.concret.entity.TReleaseData; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.PieceDto; |
| | | import com.thhy.materials.modules.biz.concret.mapper.TMaterialReleaseMappper; |
| | | import com.thhy.materials.modules.biz.concret.service.TMaterialReleaseService; |
| | | import com.thhy.materials.modules.biz.weigh.mapper.WeighMapper; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult materialRew(HashMap<String, Object> values) { |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<PieceDto> pieceDtos = materialReleaseMappper.pieceList(values); |
| | | for (PieceDto pieceDto : pieceDtos){ |
| | | List<TRawMaterial> rawMaterials = materialReleaseMappper.materialRew(pieceDto.getById()); |
| | | pieceDto.setRawMaterials(rawMaterials); |
| | | } |
| | | PageInfo<PieceDto> pieceDtoPageInfo = new PageInfo<>(pieceDtos); |
| | | return BasicResult.success(pieceDtoPageInfo); |
| | | } |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | |
| | | } |
| | | |
| | | |
| | | // 智能监控 |
| | | @PostMapping("/dataAIList") |
| | | public BasicResult dataAIList(@RequestBody Map<String,Object> values){ |
| | | return helmetService.dataAIList(values); |
| | | } |
| | | |
| | | //智能监控类型 |
| | | @GetMapping("dataAIType") |
| | | public BasicResult dataAIType(){ |
| | | return helmetService.dataAIType(); |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | private Integer deviceId; |
| | | private String deviceId; |
| | | |
| | | /** |
| | | * 设备名称 |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.helmet.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | @Data |
| | | public class TypeName implements Serializable { |
| | | |
| | | private Integer type; |
| | | |
| | | private String typeName; |
| | | |
| | | } |
| | |
| | | |
| | | import com.thhy.materials.modules.biz.helmet.entity.*; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.ReportNumDto; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.TypeName; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<TDataValue> dataValuesList(Map<String, Object> values); |
| | | |
| | | void dataBox(TDataAi tDataAi); |
| | | |
| | | List<TDataAi> dataAIList(Map<String, Object> values); |
| | | |
| | | List<TypeName> dataAIType(); |
| | | } |
| | |
| | | BasicResult dataValuesList(Map<String, Object> values); |
| | | |
| | | BasicResult dataBox(JSONObject result); |
| | | |
| | | BasicResult dataAIList(Map<String, Object> values); |
| | | |
| | | BasicResult dataAIType(); |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.entity.*; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.ReportNumDto; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.TypeName; |
| | | import com.thhy.materials.modules.biz.helmet.mapper.HelmetMapper; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | helmetMapper.dataBox(tDataAi); |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataAIList(Map<String, Object> values) { |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<TDataAi> tDataAis = helmetMapper.dataAIList(values); |
| | | PageInfo<TDataAi> tDataAiPageInfo = new PageInfo<>(tDataAis); |
| | | return BasicResult.success(tDataAiPageInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataAIType() { |
| | | List<TypeName> typeNames = helmetMapper.dataAIType(); |
| | | return BasicResult.success(typeNames); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <select id="dataAIList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataAi"> |
| | | select |
| | | sign_time as signTime, |
| | | box_name as boxName, |
| | | device_name as deviceName, |
| | | type_name as typeName, |
| | | `type` as `type`, |
| | | sign_avatar as signAvatar |
| | | from t_data_ai where |
| | | 1=1 |
| | | <if test="strTime!=null and strTime!='' and endTime!='' and endTime!=null "> |
| | | and sign_time between #{strTime} and #{endTime} |
| | | </if> |
| | | <if test="type!=null and type!='' "> |
| | | and `type` =#{type} |
| | | </if> |
| | | order by sign_time desc |
| | | </select> |
| | | <select id="dataAIType" resultType="com.thhy.materials.modules.biz.helmet.entity.dto.TypeName"> |
| | | select `type`, |
| | | type_name as typeName |
| | | from t_data_ai_type |
| | | order by `type` asc |
| | | </select> |
| | | </mapper> |
| | |
| | | is_use=2 |
| | | where material_release_id=#{materialReleaseId} |
| | | </update> |
| | | |
| | | <select id="pieceList" resultType="com.thhy.materials.modules.biz.concret.entity.dto.PieceDto"> |
| | | select by_id as byId from t_piece |
| | | where 1=1 |
| | | <if test="byId!=null and byId!='' "> |
| | | and by_id=#{byId} |
| | | </if> |
| | | ORDER BY by_id desc |
| | | </select> |
| | | <select id="materialRew" resultType="com.thhy.materials.modules.biz.concret.entity.TRawMaterial"> |
| | | select Storage as storage, |
| | | Material as material, |
| | | RecAmnt as recamnt, |
| | | PlanAmnt as planamnt, |
| | | FactAmnt as factamnt |
| | | from t_raw_material |
| | | where Piece=#{byId} |
| | | </select> |
| | | </mapper> |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 小程序 |
| | | * web端导出 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "selectNoPageList") |
| | | BasicResult selectNoPageList(@RequestBody Map<String,Object> map){ |
| | | return hiddenDangerService.selectNoPageList(map); |
| | | @PostMapping(value = "export") |
| | | void export(@RequestBody Map<String,Object> map, HttpServletResponse response){ |
| | | hiddenDangerService.export(map, response); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.entity; |
| | | |
| | | import com.thhy.general.annotations.Excel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 隐患地点 |
| | | */ |
| | | @Excel(sort = 2,title = "隐患地点") |
| | | private String dangerLocation; |
| | | |
| | | /** |
| | | * 隐患标题 |
| | | */ |
| | | @Excel(sort = 3,title = "隐患标题") |
| | | private String title; |
| | | |
| | | /** |
| | | * 隐患时间 |
| | | */ |
| | | @Excel(sort = 1,title = "举报时间",patter = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 隐患审核状态 审核状态 0未审核 1审核通过 2审核失败 |
| | | */ |
| | | private Integer auditStatus; |
| | | @Excel(sort = 6,title = "审核状态") |
| | | private String auditStatusName; |
| | | |
| | | public String getAuditStatusName() { |
| | | String name = ""; |
| | | switch (auditStatus){ |
| | | case 0: |
| | | name = "未审核"; |
| | | break; |
| | | case 1: |
| | | name = "已审核"; |
| | | break; |
| | | case 2: |
| | | name = "审核失败"; |
| | | break; |
| | | if (auditStatus != null){ |
| | | switch (auditStatus){ |
| | | case 0: |
| | | name = "未审核"; |
| | | break; |
| | | case 1: |
| | | name = "已审核"; |
| | | break; |
| | | case 2: |
| | | name = "审核失败"; |
| | | break; |
| | | } |
| | | } |
| | | return name; |
| | | } |
| | |
| | | /** |
| | | * 积分 |
| | | */ |
| | | @Excel(sort = 7,title = "积分") |
| | | private Double integral; |
| | | |
| | | /** |
| | |
| | | */ |
| | | private List<HiddenDangerImgEntity> imgEntities; |
| | | |
| | | /** |
| | | * 举报人 |
| | | */ |
| | | @Excel(sort = 4,title = "提交人") |
| | | private String reporter; |
| | | |
| | | /** |
| | | * 隐患等级 |
| | | */ |
| | | private Integer level; |
| | | @Excel(sort = 5,title = "隐患等级") |
| | | private String levelName; |
| | | |
| | | public String getLevelName() { |
| | | String name = ""; |
| | | if (level != null){ |
| | | switch (level){ |
| | | case 1: |
| | | name = "一般隐患"; |
| | | break; |
| | | case 2: |
| | | name = "重大隐患"; |
| | | break; |
| | | case 3: |
| | | name = "不存在"; |
| | | break; |
| | | } |
| | | } |
| | | return name; |
| | | } |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | BasicResult selectPageList(Map<String,Object> map); |
| | | |
| | | BasicResult selectNoPageList(Map<String,Object> map); |
| | | void export(Map<String,Object> map, HttpServletResponse response); |
| | | |
| | | BasicResult selectInfo(String id); |
| | | |
| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.utils.ExcelUtils; |
| | | import com.thhy.general.utils.UUIDUtils; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectNoPageList(Map<String, Object> map) { |
| | | public void export(Map<String, Object> map, HttpServletResponse response) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | map.put("companyId",sysUserInfo.getCompanyId()); |
| | | List<HiddenDangerEntity> hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); |
| | | hiddenDangerEntities.forEach(obj ->{ |
| | | String id = obj.getId(); |
| | | obj.setImgEntities(hiddenDangerMapper.selectImgList(id)); |
| | | Integer auditStatus = obj.getAuditStatus(); |
| | | Integer level = obj.getLevel(); |
| | | switch (auditStatus){ |
| | | case 0: |
| | | obj.setAuditStatusName("未审核"); |
| | | break; |
| | | case 1: |
| | | obj.setAuditStatusName("审核通过"); |
| | | break; |
| | | case 2: |
| | | obj.setAuditStatusName("审核失败"); |
| | | break; |
| | | } |
| | | if (level != null){ |
| | | switch (level){ |
| | | case 1: |
| | | obj.setLevelName("一般隐患"); |
| | | break; |
| | | case 2: |
| | | obj.setLevelName("重大隐患"); |
| | | break; |
| | | case 3: |
| | | obj.setLevelName("不存在"); |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | | return BasicResult.success(hiddenDangerEntities); |
| | | ExcelUtils.downExcel(hiddenDangerEntities,HiddenDangerEntity.class,response,"隐患举报"); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectInfo(String id) { |
| | | return BasicResult.success(hiddenDangerMapper.selectInfo(id)); |
| | | HiddenDangerEntity hiddenDangerEntity = hiddenDangerMapper.selectInfo(id); |
| | | hiddenDangerEntity.setImgEntities(hiddenDangerMapper.selectImgList(id)); |
| | | return BasicResult.success(hiddenDangerEntity); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult examine(HiddenDangerEntity hiddenDangerEntity) { |
| | | hiddenDangerEntity.setAuditStatus(1);//1审核通过 |
| | | hiddenDangerMapper.update(hiddenDangerEntity); |
| | | return BasicResult.success(); |
| | | } |
| | |
| | | <if test="integral != null"> |
| | | integral, |
| | | </if> |
| | | <if test="level != null"> |
| | | `level`, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | |
| | |
| | | </if> |
| | | <if test="integral != null"> |
| | | #{integral,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="level != null"> |
| | | #{level,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="integral != null"> |
| | | integral = #{integral,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="level != null"> |
| | | `level` = #{level,jdbcType=INTEGER}, |
| | | </if> |
| | | |
| | | </set> |
| | | where id=#{id,jdbcType=VARCHAR} |
| | | </update> |
| | |
| | | t.createUser, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.companyId |
| | | t.companyId, |
| | | t.level, |
| | | t.integral, |
| | | su.real_name reporter |
| | | from t_hidden_danger t |
| | | LEFT JOIN sys_users su ON su.user_id = t.createUser |
| | | LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser |
| | | where t.id=#{id} |
| | | </select> |
| | | |
| | |
| | | t.createUser, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.companyId |
| | | t.companyId, |
| | | t.level, |
| | | t.integral, |
| | | su.real_name reporter |
| | | from t_hidden_danger t |
| | | LEFT JOIN sys_users su ON su.user_id = t.createUser |
| | | LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser |
| | |
| | | <if test="startTime!= null and endTime!=null and startTime != '' and endTime !=''"> |
| | | and t.createTime BETWEEN #{startTime} and #{endTime} |
| | | </if> |
| | | order by t.createUser desc |
| | | order by t.createTime desc |
| | | </select> |
| | | |
| | | <!--根据ID删除--> |
| | |
| | | //获取宿舍人头 |
| | | getDormNumsLists: (params) => |
| | | axios.post('/staff/dorm/findUserList', params), |
| | | |
| | | /* |
| | | *隐患举报模块 |
| | | */ |
| | | //查询隐患列表 |
| | | searchHiddenLists: (params) => |
| | | axios.post('/secure/hiddendanger/selectPageList', params), |
| | | //添加隐患举报 |
| | | addHiddenInfo: (params) => |
| | | axios.post('/secure/hiddendanger/insert', params), |
| | | //修改隐患举报 |
| | | updateHiddenInfo: (params) => |
| | | axios.post('/secure/hiddendanger/update', params), |
| | | //删除隐患举报 |
| | | deleteHiddenInfo: (params) => |
| | | axios.get('/secure/hiddendanger/delete?id='+params), |
| | | //隐患举报详情 |
| | | detailsHiddenInfo: (params) => |
| | | axios.get('/secure/hiddendanger/selectInfo?id='+params), |
| | | } |
| | |
| | | }, |
| | | }), |
| | | // 获取分公司信息 |
| | | getCompanyData: () => |
| | | axios.post('/engineering/company/pulldown'), |
| | | getCompanyData: (params) => |
| | | axios.post('/engineering/company/pulldown',{ |
| | | header: { |
| | | "content-type":'application/json' |
| | | }, |
| | | ...params |
| | | }), |
| | | // 获取岗位信息 |
| | | getPositionData: (params) => |
| | | axios.post('/staff/position/findall', params), |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path":"safeManage/areaPolling", |
| | | "style": { |
| | | "navigationBarTitleText": "区域巡检", |
| | | "navigationBarBackgroundColor": "#1976FF", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path":"safeManage/hiddenReport", |
| | | "style": { |
| | | "navigationBarTitleText": "隐患举报", |
| | | "navigationBarBackgroundColor": "#1976FF", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "safeManage/addHidden", |
| | | "style": { |
| | | "navigationBarTitleText": "添加", |
| | | "navigationBarBackgroundColor": "#1976FF", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "safeManage/detailsHidden", |
| | | "style": { |
| | | "navigationBarTitleText": "详情", |
| | | "navigationBarBackgroundColor": "#1976FF", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | }, |
| | | { |
| | | "path": "dataBoard/productMonitor", |
| | | "style": { |
| | | "navigationBarTitleText": "生产监控", |
| | |
| | | border-radius: 10rpx; |
| | | margin-bottom: 20rpx; |
| | | background-color: #FFFFFF; |
| | | &:nth-child(3){ |
| | | .users_content{ |
| | | .users_menu{ |
| | | margin-left: -30px; |
| | | } |
| | | } |
| | | } |
| | | .users_title{ |
| | | height: 8vh; |
| | | display: flex; |
对比新文件 |
| | |
| | | <template> |
| | | <view class="check_add_index"> |
| | | <u-form |
| | | ref="form" |
| | | :model="formCheck" |
| | | :rules="rulesCkeck" |
| | | labelWidth="auto" |
| | | labelPosition="left"> |
| | | <view style="overflow: auto;width: 100%;background-color: #FFFFFF;" class="upload_items items_tyle"> |
| | | <u-form-item label="问题照片"> |
| | | <u-upload |
| | | :fileList="formCheck.imageList" |
| | | @afterRead="afterRead" |
| | | @delete="deleteImage" |
| | | name="66" |
| | | :previewFullImage="true" |
| | | :maxCount="6" |
| | | width="150" |
| | | height="150"> |
| | | <image src="https://pipe.thhy-tj.com/group1/M00/00/02/bx5d1GSihuWAA-kBAAAICqDtUn8566.png" mode="widthFix" style="width:64px;height: 100px;display: flex;justify-content: center;"></image> |
| | | <view style="text-align: center;font-size: 16px;color: #666666;">上传照片</view> |
| | | </u-upload> |
| | | </u-form-item> |
| | | </view> |
| | | <u-form-item |
| | | label="隐患地点" |
| | | prop="dangerLocation" |
| | | borderBottom> |
| | | <u-input |
| | | v-model="formCheck.dangerLocation" |
| | | placeholder="请输入隐患地点" |
| | | border="none"> |
| | | </u-input> |
| | | </u-form-item> |
| | | <view class="items_tyle"> |
| | | <u-form-item |
| | | label="隐患标题" |
| | | prop="title" |
| | | borderBottom> |
| | | <u--textarea v-model="formCheck.title" placeholder="请输入隐患标题" height="100"></u--textarea> |
| | | </u-form-item> |
| | | </view> |
| | | </u-form> |
| | | <view class="submit_bnt"> |
| | | <u-button type="primary" color="#1976FF" text="提交" @click="submitInsertForm()"></u-button> |
| | | </view> |
| | | <u-picker |
| | | :show="showUser" |
| | | :columns="userColumns" |
| | | keyName="realName" |
| | | @cancel="showUser = false" |
| | | @confirm="selectCompany"> |
| | | </u-picker> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { throttle } from '../../plugins/public.js'; |
| | | import { basrUrl } from '@/api/http'; |
| | | export default{ |
| | | data(){ |
| | | return{ |
| | | showUser: false,//整改人弹框显隐 |
| | | formCheck:{ |
| | | imageList:[],//上传图片 |
| | | userId:'',//整改人 |
| | | }, |
| | | rulesCkeck: { |
| | | dangerLocation: [{ |
| | | required: true, |
| | | message: '请输入隐患地点', |
| | | trigger: 'blur' |
| | | }], |
| | | title: [{ |
| | | required: true, |
| | | message: '请输入隐患标题', |
| | | trigger: 'blur' |
| | | }], |
| | | } |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | }, |
| | | methods:{ |
| | | //提交按钮 |
| | | submitInsertForm: throttle(function() { |
| | | this.$refs.form.validate().then((valid) => { |
| | | if(valid) { |
| | | const params = Object.assign({}, this.formCheck); |
| | | params.imgEntities = this.formCheck.imageList.map(item=>{ |
| | | return { |
| | | imgPath:item.data, |
| | | } |
| | | }); |
| | | delete params.userId |
| | | delete params.imageList; |
| | | this.$api.reboSystem.addHiddenInfo(params).then((res) => { |
| | | if(res.success) { |
| | | uni.$u.toast("提交成功!"); |
| | | uni.redirectTo({ |
| | | url: './hiddenReport' |
| | | }); |
| | | } else { |
| | | uni.$u.toast(res.statusMsg); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, 3000), |
| | | // 读取图片后 |
| | | afterRead(event) { |
| | | this.formCheck.imageList.push({ |
| | | status: 'loading', |
| | | message: '上传中', |
| | | }) |
| | | uni.uploadFile({ |
| | | url: `${basrUrl}/file/file/upload`, |
| | | fileType: event.file.type, |
| | | filePath: event.file.url, |
| | | name: 'file', |
| | | success: (res) => { |
| | | const data = JSON.parse(res.data); |
| | | console.log(data,event,'名字') |
| | | this.$set(this.formCheck.imageList, this.formCheck.imageList.length - 1, { |
| | | id: this.formCheck.imageList.length + 1, |
| | | status: 'success', |
| | | message: '', |
| | | data: data.data, |
| | | url: `https://pipe.thhy-tj.com/${data.data}` |
| | | }) |
| | | }, |
| | | fail: (error) => { |
| | | uni.$u.toast('上传失败!'); |
| | | } |
| | | }) |
| | | }, |
| | | // 删除图片 |
| | | deleteImage(event) { |
| | | this.$nextTick(() => { |
| | | this.formCheck.imageList.splice(event.index, 1); |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .check_add_index{ |
| | | background-color: #F6F6F6; |
| | | padding: 0 15px; |
| | | position: relative; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | } |
| | | .submit_bnt { |
| | | position: absolute; |
| | | bottom: 5%; |
| | | width: calc(100% - 30px); |
| | | } |
| | | |
| | | |
| | | ::v-deep .u-input__content__field-wrapper__field { |
| | | text-align: right !important; |
| | | } |
| | | ::v-deep .u-form-item{ |
| | | margin: 15px 0; |
| | | padding: 0 10px; |
| | | background-color: #FFFFFF; |
| | | line-height: 40px; |
| | | border-radius: 4px; |
| | | } |
| | | ::v-deep .u-upload{ |
| | | flex: none !important; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | ::v-deep .u-textarea{ |
| | | background-color: #EFEFEF !important; |
| | | color: #999999 !important; |
| | | } |
| | | |
| | | </style> |
| | | <style scoped> |
| | | .items_tyle /deep/.u-form-item__body{ |
| | | flex-direction: column !important; |
| | | } |
| | | .upload_items /deep/.u-upload__wrap{ |
| | | flex-wrap: nowrap; |
| | | align-items: center; |
| | | } |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <view class="areaPolling"> |
| | | 区域巡检 |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <view class="check_details_index"> |
| | | <view class="check_details_matter"> |
| | | <view class="check_details_card" > |
| | | <view class="hidden_text">问题照片</view> |
| | | <view class="check_details_phone hidden_datas" v-for="(item,index) in hiddenPhone"> |
| | | <!-- <u-image :src="`https://pipe.thhy-tj.com/${item.imgPath}`" ></u-image> --> |
| | | <u-album :urls="[`https://pipe.thhy-tj.com/${item.imgPath}`]"></u-album> |
| | | </view> |
| | | </view> |
| | | <view class="check_details_card"> |
| | | <view class="hidden_text">举报时间</view> |
| | | <view class="hidden_datas">{{hiddenDetails.createTime}}</view> |
| | | </view> |
| | | <view class="check_details_card"> |
| | | <view class="hidden_text">隐患地点</view> |
| | | <view class="hidden_datas">{{hiddenDetails.dangerLocation}}</view> |
| | | </view> |
| | | <view class="check_details_card"> |
| | | <view class="hidden_text">隐患标题</view> |
| | | <view class="hidden_datas">{{hiddenDetails.title}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default{ |
| | | data(){ |
| | | return{ |
| | | hiddenDetails:[],//隐患举报详情 |
| | | hiddenPhone:[],//隐患举报图片 |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.getDetailsInfo(option.id) |
| | | }, |
| | | methods:{ |
| | | //获取信息详情 |
| | | getDetailsInfo(val){ |
| | | this.$api.reboSystem.detailsHiddenInfo(val).then(res=>{ |
| | | if(res.statusMsg === 'ok'){ |
| | | this.hiddenDetails = res.data |
| | | this.hiddenPhone = res.data.imgEntities |
| | | }else{ |
| | | uni.$u.toast(res.statusMsg); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .check_details_index{ |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | background-color: #F6F6F6; |
| | | padding: 15px; |
| | | |
| | | .check_details_matter{ |
| | | height: calc(100vh - 112px); |
| | | background-color: #FFFFFF; |
| | | border-radius: 6px; |
| | | |
| | | .check_details_card{ |
| | | padding: 15px 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .hidden_text{ |
| | | color: rgba(153, 153, 153, 1); |
| | | font-size: 16px; |
| | | flex: none; |
| | | } |
| | | .hidden_datas{ |
| | | color: rgba(51, 51, 51, 1); |
| | | font-size: 15px; |
| | | text-align: left; |
| | | flex: 1; |
| | | margin-left: 15px; |
| | | } |
| | | } |
| | | .check_details_contents{ |
| | | height: calc(100% - 460px); |
| | | margin: 15px; |
| | | padding: 15px; |
| | | display: flex; |
| | | // align-items: center; |
| | | background-color: #F6FAFF; |
| | | color:#666666 ; |
| | | } |
| | | .check_details_phone{ |
| | | margin-top: 5px; |
| | | margin-left: 15px; |
| | | display: flex; |
| | | justify-content: center; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep image{ |
| | | width: 320px!important; |
| | | height: 240px!important; |
| | | } |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <view class="check_index"> |
| | | <view class="check_select"> |
| | | <view @click="startClick()"> |
| | | <u--input placeholder="举报起始时间" disabled disabledColor="#FFFFFF" placeholderStyle="color:#999999;padding-left:10px" v-model="search.startTime" border="none" suffixIcon="calendar" suffixIconStyle="color: #666666;font-size:30px;"></u--input> |
| | | </view> |
| | | <view @click="endClick()"> |
| | | <u--input placeholder="举报截止时间" disabled disabledColor="#FFFFFF" placeholderStyle="color:#999999;padding-left:10px" v-model="search.endTime" border="none" suffixIcon="calendar" suffixIconStyle="color: #666666;font-size:30px;"></u--input> |
| | | </view> |
| | | <view style="width:60px"> |
| | | <u-button type="primary" color="#1977FF" text="查询" @click="searchCheckList()"></u-button> |
| | | </view> |
| | | </view> |
| | | <view class="hidden_add"> |
| | | <u-button type="primary" color="#1977FF" text="添加" @click="goAddHidden()"></u-button> |
| | | </view> |
| | | <view class="check_main"> |
| | | <scroll-view |
| | | scroll-y="true" |
| | | class="check_index_scroll" |
| | | :scroll-top="scrollTop" |
| | | refresher-enabled="true" |
| | | refresher-background="#EAEAEA" |
| | | :refresher-triggered="triggered" |
| | | @refresherpulling="refresherrefresh" |
| | | @scrolltolower="scrolltoLower"> |
| | | <view class="check_card_index" v-for="(item,index) in hiddenDatas" :key="index"> |
| | | <view class="check_card_header"> |
| | | <view class="check_header_times">{{item.createTime}}</view> |
| | | <view class="check_header_names" @click="goDetailsPage(item)">详情></view> |
| | | </view> |
| | | <view class="check_card_main"> |
| | | <view class="check_main_items"> |
| | | <view class="check_main_items_titles">隐患地点</view> |
| | | <view class="check_main_items_datas">{{item.dangerLocation}}</view> |
| | | </view> |
| | | <view class="check_main_items"> |
| | | <view class="check_main_items_titles">隐患标题</view> |
| | | <view class="check_main_items_datas">{{item.title}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" /> |
| | | </scroll-view> |
| | | </view> |
| | | <u-datetime-picker |
| | | :show="showStart" |
| | | v-model="startTime" |
| | | mode="date" |
| | | @confirm="changeStart" |
| | | @cancel="showStart = false" |
| | | ></u-datetime-picker> |
| | | <u-datetime-picker |
| | | :show="showEnd" |
| | | v-model="endTime" |
| | | mode="date" |
| | | @confirm="changeEnd" |
| | | @cancel="showEnd = false" |
| | | ></u-datetime-picker> |
| | | <u-popup :show="showResult" @close="closeResult" mode="center" :round="6" :closeable="true"> |
| | | <view class="result_main_style"> |
| | | {{resultContent===null?'':resultContent}} |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import {changeTime,throttle} from '@/plugins/public.js' |
| | | export default{ |
| | | data(){ |
| | | return{ |
| | | showResult:false,//是否展示检查结果弹框 |
| | | resultContent:"",//检查结果内容 |
| | | search:{},//查询条件 |
| | | showStart:false,//是否显示起始时间 |
| | | showEnd:false,//是否展示截止时间弹框 |
| | | startTime:Number(new Date()),//起始时间默认当天 |
| | | endTime:Number(new Date()),//截止时间默认当天 |
| | | hiddenDatas:[{}],//列表数据 |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | loadPage: 0, |
| | | scrollTop: 0, |
| | | triggered: true, |
| | | status: 'loading', |
| | | loadText: { |
| | | loading: '努力加载中', |
| | | nomore: '没有更多数据了' |
| | | }, |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | | this.searchCheckList() |
| | | }, |
| | | methods:{ |
| | | //关闭弹框 |
| | | closeResult(){ |
| | | this.showResult = false |
| | | }, |
| | | //跳转详情页 |
| | | goDetailsPage(val){ |
| | | uni.navigateTo({ |
| | | url: `./detailsHidden?id=${val.id}` |
| | | }) |
| | | }, |
| | | //跳转隐患举报添加按钮 |
| | | goAddHidden(){ |
| | | uni.navigateTo({ |
| | | url: `./addHidden` |
| | | }) |
| | | }, |
| | | //查询列表 |
| | | searchCheckList(){ |
| | | this.triggered = true; |
| | | this.hiddenDatas = []; |
| | | let params =Object.assign({},this.search,{ |
| | | pageNum: this.pageNum, |
| | | pageSize:this.pageSize, |
| | | }) |
| | | this.$api.reboSystem.searchHiddenLists(params).then(res=>{ |
| | | if(res.statusMsg === 'ok'){ |
| | | this.hiddenDatas = res.data.list |
| | | this.loadPage = res.data.pages; |
| | | this.triggered = false; |
| | | this.status = 'nomore'; |
| | | }else{ |
| | | uni.$u.toast(res.statusMsg); |
| | | } |
| | | }).catch((err) => { |
| | | uni.$u.toast('请检查网络服务或联系管理员!') |
| | | }) |
| | | }, |
| | | //自定义下拉刷新 |
| | | refresherrefresh: throttle(function() { |
| | | this.status = 'loading'; |
| | | this.pageNum = 1; |
| | | this.searchCheckList(); |
| | | uni.$u.toast('刷新成功'); |
| | | }, 500), |
| | | //触底刷新 |
| | | scrolltoLower: throttle(function() { |
| | | this.status = 'loading'; |
| | | if(this.pageNum >= this.loadPage) { |
| | | setTimeout(() => { |
| | | this.status = 'nomore' |
| | | uni.$u.toast('没有更多数据了'); |
| | | },1000) |
| | | return |
| | | } else { |
| | | this.pageNum+=1 |
| | | let params =Object.assign({},this.search,{ |
| | | pageNum: this.pageNum, |
| | | pageSize:this.pageSize, |
| | | }) |
| | | this.$api.reboSystem.searchHiddenLists(params).then(res=>{ |
| | | if(res.statusMsg === 'ok'){ |
| | | this.hiddenDatas.push(...res.data.list) |
| | | this.loadPage = res.data.pages; |
| | | this.triggered = false; |
| | | this.status = 'nomore'; |
| | | }else{ |
| | | uni.$u.toast(res.statusMsg); |
| | | } |
| | | }).catch((err) => { |
| | | uni.$u.toast('请检查网络服务或联系管理员!') |
| | | }) |
| | | } |
| | | }, 1500), |
| | | //点击弹出选择起始时间 |
| | | startClick(){ |
| | | this.showStart = true |
| | | this.$set(this.search,'startTime','') |
| | | }, |
| | | //确定选择的起始时间 |
| | | changeStart({value}){ |
| | | this.showStart = false |
| | | this.$set(this.search,'startTime',changeTime(value)) |
| | | }, |
| | | //点击弹出选择截止时间 |
| | | endClick(){ |
| | | this.showEnd = true |
| | | this.$set(this.search,'endTime','') |
| | | }, |
| | | //确定选择的起始时间 |
| | | changeEnd({value}){ |
| | | this.showEnd = false |
| | | this.$set(this.search,'endTime',changeTime(value)) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .check_index{ |
| | | height: 100vh; |
| | | background-color: #F6F6F6; |
| | | padding: 10px 15px; |
| | | |
| | | .hidden_add{ |
| | | width: 100%; |
| | | line-height:20px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .check_select{ |
| | | display: flex; |
| | | margin-bottom: 10px; |
| | | } |
| | | .check_main{ |
| | | height: calc(100% - 135px); |
| | | .check_index_scroll{ |
| | | height: 95%; |
| | | |
| | | .check_card_index{ |
| | | height: 120px; |
| | | background-color: #FFFFFF; |
| | | border-radius: 6px; |
| | | margin-bottom: 10px; |
| | | .check_card_header{ |
| | | line-height: 40px; |
| | | border-bottom: 1px solid #F2F2F2; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .check_header_times{ |
| | | font-size: 15px; |
| | | padding-left: 28px; |
| | | color: #333333; |
| | | position: relative; |
| | | &::before{ |
| | | width: 15px; |
| | | height: 15px; |
| | | content: ""; |
| | | background: url('../../static/times.png') no-repeat; |
| | | position: absolute; |
| | | top: 13px; |
| | | left: 10px; |
| | | } |
| | | } |
| | | .check_header_names{ |
| | | padding-right: 15px; |
| | | font-size: 17px; |
| | | color: #1977FF; |
| | | } |
| | | } |
| | | .check_card_main{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | .check_main_items{ |
| | | display: flex; |
| | | line-height: 30px; |
| | | .check_main_items_titles{ |
| | | padding-left: 15px; |
| | | width: 80px; |
| | | flex: none; |
| | | color: #999999; |
| | | font-size: 15px; |
| | | } |
| | | .check_main_items_datas{ |
| | | padding-right: 10px; |
| | | color: #333333; |
| | | font-size: 15px; |
| | | flex: 1; |
| | | text-align: left; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ::v-deep .u-input { |
| | | margin-right: 10px!important; |
| | | background-color: #FFFFFF; |
| | | border-radius: 0px; |
| | | height: 40px; |
| | | } |
| | | .result_main_style{ |
| | | width: 200px; |
| | | height: 200px; |
| | | padding: 30px 15px 15px; |
| | | overflow: auto; |
| | | margin-right: 15px; |
| | | } |
| | | </style> |