李旭东
2023-11-09 9a12866758b1749953e1330c2e64d25d7a6a05b5
Merge branch 'master' of http://111.30.93.211:10101/r/supipe
已修改20个文件
已添加7个文件
1028 ■■■■■ 文件已修改
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TRawMaterial.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/entity/TDataValue.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/entity/dto/TypeName.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/mapper/HelmetMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/HelmetService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/controller/HiddenDangerController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/HiddenDangerService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/api/module/robeSystem.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/api/module/system.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/pages.json 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/pages/robeHome/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/robePages/safeManage/addHidden.vue 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/robePages/safeManage/areaPolling.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/robePages/safeManage/detailsHidden.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xcx/robePages/safeManage/hiddenReport.vue 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/controller/TMaterialReleaseController.java
@@ -79,5 +79,9 @@
        return materialReleaseService.materialReleaseExcel(values,response);
    }
    //搅拌站 消耗列表
    @PostMapping("/materialRew")
    public BasicResult materialRew(@RequestBody HashMap<String,Object> values)  {
        return materialReleaseService.materialRew(values);
    }
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/TRawMaterial.java
对比新文件
@@ -0,0 +1,82 @@
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;
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/entity/dto/PieceDto.java
对比新文件
@@ -0,0 +1,17 @@
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;
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/mapper/TMaterialReleaseMappper.java
@@ -2,7 +2,9 @@
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;
@@ -22,4 +24,8 @@
    void releaseDataDel(String materialReleaseId);
    void materialReleaseDel(String materialReleaseId);
    List<PieceDto> pieceList(HashMap<String, Object> values);
    List<TRawMaterial> materialRew(Integer byId);
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/TMaterialReleaseService.java
@@ -19,4 +19,6 @@
    BasicResult materialReleaseDel(String materialReleaseId);
    BasicResult materialReleaseExcel(HashMap<String, Object> values, HttpServletResponse response) throws FileNotFoundException;
    BasicResult materialRew(HashMap<String, Object> values);
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/concret/service/impl/TMaterialReleaseServiceImpl.java
@@ -6,8 +6,10 @@
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;
@@ -205,4 +207,18 @@
        }
        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);
    }
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/controller/HelmetController.java
@@ -4,10 +4,7 @@
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;
@@ -94,5 +91,16 @@
    }
    // 智能监控
    @PostMapping("/dataAIList")
    public BasicResult dataAIList(@RequestBody Map<String,Object> values){
        return helmetService.dataAIList(values);
    }
    //智能监控类型
    @GetMapping("dataAIType")
    public BasicResult dataAIType(){
        return helmetService.dataAIType();
    }
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/entity/TDataValue.java
@@ -20,7 +20,7 @@
    /**
     * 设备编号
     */
    private Integer deviceId;
    private String deviceId;
    /**
     * 设备名称
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/entity/dto/TypeName.java
对比新文件
@@ -0,0 +1,13 @@
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;
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/mapper/HelmetMapper.java
@@ -2,6 +2,7 @@
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;
@@ -55,4 +56,8 @@
    List<TDataValue> dataValuesList(Map<String, Object> values);
    void dataBox(TDataAi tDataAi);
    List<TDataAi> dataAIList(Map<String, Object> values);
    List<TypeName> dataAIType();
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/HelmetService.java
@@ -50,4 +50,8 @@
    BasicResult dataValuesList(Map<String, Object> values);
    BasicResult dataBox(JSONObject result);
    BasicResult dataAIList(Map<String, Object> values);
    BasicResult dataAIType();
}
hd/pipe/materialsManage/src/main/java/com/thhy/materials/modules/biz/helmet/service/impl/HelmetServiceImpl.java
@@ -6,6 +6,7 @@
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;
@@ -235,4 +236,20 @@
        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);
    }
}
hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml
@@ -1131,4 +1131,29 @@
      </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>
hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
@@ -146,5 +146,21 @@
    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>
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/controller/HiddenDangerController.java
@@ -6,6 +6,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
/**
@@ -61,13 +62,13 @@
    }
    /**
     * 小程序
     * 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);
    }
    /**
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/entity/HiddenDangerEntity.java
@@ -1,5 +1,6 @@
package com.thhy.secure.modules.biz.hiddenDanger.entity;
import com.thhy.general.annotations.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -24,36 +25,42 @@
    /**
     * 隐患地点
     */
    @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;
    }
@@ -71,6 +78,7 @@
    /**
     * 积分
     */
    @Excel(sort = 7,title = "积分")
    private Double integral;
    /**
@@ -78,4 +86,34 @@
     */
    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;
    }
}
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/HiddenDangerService.java
@@ -3,7 +3,7 @@
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;
/**
@@ -21,7 +21,7 @@
    BasicResult selectPageList(Map<String,Object> map);
    BasicResult selectNoPageList(Map<String,Object> map);
    void export(Map<String,Object> map, HttpServletResponse response);
    BasicResult selectInfo(String id);
hd/pipe/secure/src/main/java/com/thhy/secure/modules/biz/hiddenDanger/service/impl/HiddenDangerServiceImpl.java
@@ -4,6 +4,7 @@
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;
@@ -13,6 +14,7 @@
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;
@@ -96,24 +98,51 @@
    }
    @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();
    }
hd/pipe/secure/src/main/resources/mapping/HiddenDangerMapper.xml
@@ -39,6 +39,9 @@
            <if test="integral != null">
                integral,
            </if>
            <if test="level != null">
                `level`,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -74,6 +77,9 @@
            </if>
            <if test="integral != null">
                #{integral,jdbcType=DOUBLE},
            </if>
            <if test="level != null">
                #{level,jdbcType=INTEGER},
            </if>
        </trim>
    </insert>
@@ -113,6 +119,10 @@
            <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>
@@ -135,8 +145,13 @@
                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>
@@ -152,7 +167,10 @@
                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
@@ -162,7 +180,7 @@
            <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删除-->
xcx/api/module/robeSystem.js
@@ -268,4 +268,23 @@
    //获取宿舍人头
    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),
}
xcx/api/module/system.js
@@ -22,8 +22,13 @@
            },
        }),
    // 获取分公司信息
    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),
xcx/pages.json
@@ -237,6 +237,38 @@
                    }
                },
                {
                    "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": "生产监控",
xcx/pages/robeHome/index.vue
@@ -216,6 +216,13 @@
                    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;
xcx/robePages/safeManage/addHidden.vue
对比新文件
@@ -0,0 +1,191 @@
<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>
xcx/robePages/safeManage/areaPolling.vue
对比新文件
@@ -0,0 +1,11 @@
<template>
    <view class="areaPolling">
        区域巡检
    </view>
</template>
<script>
</script>
<style>
</style>
xcx/robePages/safeManage/detailsHidden.vue
对比新文件
@@ -0,0 +1,106 @@
<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>
xcx/robePages/safeManage/hiddenReport.vue
对比新文件
@@ -0,0 +1,290 @@
<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>