新增1.0.2快照版本,只保留菜单、数据权限
This commit is contained in:
parent
4d48a48c79
commit
c6f9f7dca2
4
pom.xml
4
pom.xml
@ -24,7 +24,7 @@
|
||||
<mysql.version>5.1.47</mysql.version>
|
||||
<freemarker.version>2.3.28</freemarker.version>
|
||||
<druid.version>1.1.9</druid.version>
|
||||
<cm-cloud.version>1.0.1-SNAPSHOT</cm-cloud.version>
|
||||
<cm-cloud.version>1.0.2-SNAPSHOT</cm-cloud.version>
|
||||
<activiti5.version>5.22.0</activiti5.version>
|
||||
<activiti.version>7.1.0.M6</activiti.version>
|
||||
<xmlgraphics.version>1.7</xmlgraphics.version>
|
||||
@ -148,7 +148,7 @@
|
||||
<dependency>
|
||||
<groupId>com.cm</groupId>
|
||||
<artifactId>cloud-central-control-client</artifactId>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<version>${cm-cloud.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -1,19 +1,25 @@
|
||||
package com.cm.inspection.controller.apis.check;
|
||||
|
||||
import com.cm.common.annotation.CheckRequestBodyAnnotation;
|
||||
import com.cm.common.base.AbstractController;
|
||||
import com.cm.common.component.SecurityComponent;
|
||||
import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.exception.ParamsException;
|
||||
import com.cm.common.exception.RemoveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.ErrorResult;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.inspection.enums.GridPersonnelTypeEnum;
|
||||
import com.cm.inspection.pojo.dtos.check.Check2DTO;
|
||||
import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO;
|
||||
import com.cm.inspection.pojo.dtos.hiddendangerreport.HiddenDangerReportDTO;
|
||||
import com.cm.inspection.pojo.vos.check.CheckCompleteVO;
|
||||
import com.cm.inspection.pojo.vos.check.StreetToLeaderVO;
|
||||
import com.cm.inspection.service.check.ICheck2Service;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -146,6 +152,36 @@ public class Check2Controller extends AbstractController {
|
||||
return check2Service.listPageStreetOfMine(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "街道案件完成", notes = "街道案件完成接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "checkId", value = "检查ID", paramType = "path"),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update-street-complete/{checkId}")
|
||||
public SuccessResult updateStreetComplete(@PathVariable("checkId") String checkId,
|
||||
@RequestBody CheckCompleteVO checkCompleteVO) {
|
||||
check2Service.updateStreetComplete(checkId, checkCompleteVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "街道案件上报领导", notes = "街道案件上报领导接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "checkId", value = "检查ID", paramType = "path"),
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update-street-to-leader/{checkId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult updateStreetToLeader(@PathVariable("checkId") String checkId,
|
||||
@RequestBody StreetToLeaderVO streetToLeaderVO) {
|
||||
if (StringUtils.equals(GridPersonnelTypeEnum.DISTRICT.getValue(), streetToLeaderVO.getLeaderType())) {
|
||||
if (StringUtils.isBlank(streetToLeaderVO.getLeaderId())) {
|
||||
throw new ParamsException("领导不能为空");
|
||||
}
|
||||
}
|
||||
check2Service.updateStreetToLeader(checkId, streetToLeaderVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我的旗县区委办局案件列表", notes = "我的旗县区委办局案件列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "Integer", defaultValue = "1"),
|
||||
|
@ -14,7 +14,9 @@ public enum CheckProcessParamsEnum {
|
||||
|
||||
IS_ALL_PASS("isAllPass", "是否全部通过"),
|
||||
IS_RE_REPORT("isReReport", "是否复查"),
|
||||
LAST_CHECK_ID("lastCheckId", "最后的检查ID");
|
||||
LAST_CHECK_ID("lastCheckId", "最后的检查ID"),
|
||||
HANDLE_TYPE("handleType", "处理类型"),
|
||||
LEADER("leader", "领导");
|
||||
|
||||
private String value;
|
||||
private String summary;
|
||||
|
32
src/main/java/com/cm/inspection/enums/HandleTypeEnum.java
Normal file
32
src/main/java/com/cm/inspection/enums/HandleTypeEnum.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.cm.inspection.enums;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: HandleTypeEnum
|
||||
* @Description: 处理类型
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/7/16 2:37 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public enum HandleTypeEnum {
|
||||
LEADER("leader", "领导"),
|
||||
HANDLE("handle", "处理");
|
||||
|
||||
private String value;
|
||||
private String summary;
|
||||
|
||||
HandleTypeEnum(String value, String summary) {
|
||||
this.value = value;
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value == null ? "" : value;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary == null ? "" : summary;
|
||||
}
|
||||
}
|
32
src/main/java/com/cm/inspection/enums/LeaderTypeEnum.java
Normal file
32
src/main/java/com/cm/inspection/enums/LeaderTypeEnum.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.cm.inspection.enums;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: LeaderEnum
|
||||
* @Description: 领导类型
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/7/16 3:07 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public enum LeaderTypeEnum {
|
||||
DEPARTMENT("department", "旗县区委办局"),
|
||||
DISTRICT("district", "旗县区");
|
||||
|
||||
private String value;
|
||||
private String summary;
|
||||
|
||||
LeaderTypeEnum(String value, String summary) {
|
||||
this.value = value;
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value == null ? "" : value;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary == null ? "" : summary;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.cm.inspection.pojo.vos.check;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: CheckCompleteVO
|
||||
* @Description: 检查结束
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/7/16 2:31 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@ApiModel
|
||||
@Data
|
||||
@ToString
|
||||
public class CheckCompleteVO {
|
||||
|
||||
@ApiModelProperty(name = "summary", value = "说明")
|
||||
private String summary;
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.cm.inspection.pojo.vos.check;
|
||||
|
||||
import com.cm.common.annotation.CheckEmptyAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: StreetToLeaderVO
|
||||
* @Description: 街道选择领导
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/7/16 2:10 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@ToString
|
||||
public class StreetToLeaderVO {
|
||||
|
||||
@ApiModelProperty(name = "leaderType", value = "领导类型")
|
||||
@CheckEmptyAnnotation(name = "领导类型", types = {"districtDepartment", "district"})
|
||||
private String leaderType;
|
||||
@ApiModelProperty(name = "leaderId", value = "上级领导ID")
|
||||
private String leaderId;
|
||||
@ApiModelProperty(name = "summary", value = "说明")
|
||||
@CheckEmptyAnnotation(name = "说明")
|
||||
private String summary;
|
||||
|
||||
}
|
@ -6,6 +6,8 @@ import com.cm.inspection.pojo.dtos.check.Check2DTO;
|
||||
import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO;
|
||||
import com.cm.inspection.pojo.dtos.hiddendangerreport.HiddenDangerReportDTO;
|
||||
import com.cm.inspection.pojo.vos.check.Check2VO;
|
||||
import com.cm.inspection.pojo.vos.check.CheckCompleteVO;
|
||||
import com.cm.inspection.pojo.vos.check.StreetToLeaderVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -154,5 +156,19 @@ public interface ICheck2Service {
|
||||
*/
|
||||
SuccessResultList<List<Check2DTO>> listPageCityOfMine(ListPage page);
|
||||
|
||||
/**
|
||||
* 结束街道案件
|
||||
*
|
||||
* @param checkId
|
||||
* @param checkCompleteVO
|
||||
*/
|
||||
void updateStreetComplete(String checkId, CheckCompleteVO checkCompleteVO);
|
||||
|
||||
/**
|
||||
* 街道案件上报领导
|
||||
*
|
||||
* @param checkId
|
||||
* @param streetToLeaderVO
|
||||
*/
|
||||
void updateStreetToLeader(String checkId, StreetToLeaderVO streetToLeaderVO);
|
||||
}
|
||||
|
@ -6,17 +6,18 @@ import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.common.utils.HashMapUtil;
|
||||
import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.inspection.dao.check.ICheck2Dao;
|
||||
import com.cm.inspection.enums.CheckProcessParamsEnum;
|
||||
import com.cm.inspection.enums.CheckTypeEnum;
|
||||
import com.cm.inspection.enums.GridPersonnelTypeEnum;
|
||||
import com.cm.inspection.enums.HiddenDangerReportTypeEnum;
|
||||
import com.cm.inspection.enums.*;
|
||||
import com.cm.inspection.pojo.dtos.check.Check2DTO;
|
||||
import com.cm.inspection.pojo.dtos.checkitem.CheckItemDTO;
|
||||
import com.cm.inspection.pojo.dtos.checkitemoption.CheckItemOptionDTO;
|
||||
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||
import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO;
|
||||
import com.cm.inspection.pojo.dtos.hiddendangerreport.HiddenDangerReportDTO;
|
||||
import com.cm.inspection.pojo.dtos.industrycheckitem.IndustryCheckItemDTO;
|
||||
import com.cm.inspection.pojo.pos.gridpersonnel.GridPersonnelPO;
|
||||
import com.cm.inspection.pojo.vos.check.Check2VO;
|
||||
import com.cm.inspection.pojo.vos.check.CheckCompleteVO;
|
||||
import com.cm.inspection.pojo.vos.check.StreetToLeaderVO;
|
||||
import com.cm.inspection.pojo.vos.hiddendangerreport.HiddenDangerReportVO;
|
||||
import com.cm.inspection.service.BaseService;
|
||||
import com.cm.inspection.service.check.ICheck2Service;
|
||||
@ -225,6 +226,77 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
|
||||
return listPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStreetComplete(String checkId, CheckCompleteVO checkCompleteVO) {
|
||||
Task task = processService.getTaskByAssigneeAndVariableKeyAndValue(securityComponent.getCurrentUser().getUserId(), CheckProcessParamsEnum.LAST_CHECK_ID.getValue(), checkId);
|
||||
if (task == null) {
|
||||
throw new SearchException("任务不存在");
|
||||
}
|
||||
LOG.debug("标记任务为完成状态");
|
||||
updateCheckIsCompleteInfo(null, checkId, 1);
|
||||
|
||||
LOG.debug("执行流程");
|
||||
Map<String, Object> params = getHashMap(4);
|
||||
params.put("summary", checkCompleteVO.getSummary());
|
||||
params.put(CheckProcessParamsEnum.HANDLE_TYPE.getValue(), HandleTypeEnum.HANDLE.getValue());
|
||||
processService.saveTaskCompleteByTaskId(task.getId(), params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStreetToLeader(String checkId, StreetToLeaderVO streetToLeaderVO) {
|
||||
Task task = processService.getTaskByAssigneeAndVariableKeyAndValue(securityComponent.getCurrentUser().getUserId(), CheckProcessParamsEnum.LAST_CHECK_ID.getValue(), checkId);
|
||||
if (task == null) {
|
||||
throw new SearchException("任务不存在");
|
||||
}
|
||||
if (StringUtils.equals(streetToLeaderVO.getLeaderType(), GridPersonnelTypeEnum.DISTRICT_DEPARTMENT.getValue())) {
|
||||
updateStreetToDistrictDepartment(task, streetToLeaderVO.getSummary());
|
||||
} else {
|
||||
updateStreetToDistrict(streetToLeaderVO.getLeaderId(), task, streetToLeaderVO.getSummary());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上报案件到委办局,逻辑:查找当前用户上级网格员,存在则将案件进行转发,否则抛出异常
|
||||
*
|
||||
* @param task
|
||||
* @param summary
|
||||
*/
|
||||
private void updateStreetToDistrictDepartment(Task task, String summary) {
|
||||
String userId = securityComponent.getCurrentUser().getUserId();
|
||||
GridPersonnelPO gridPersonnelPO = gridPersonnelService.getLeaderPOByUserId(userId);
|
||||
if (gridPersonnelPO == null) {
|
||||
throw new SearchException("上级领导不存在");
|
||||
}
|
||||
Map<String, Object> params = getHashMap(4);
|
||||
params.put(CheckProcessParamsEnum.HANDLE_TYPE.getValue(), HandleTypeEnum.LEADER.getValue());
|
||||
params.put(CheckProcessParamsEnum.LEADER.getValue(), LeaderTypeEnum.DEPARTMENT.getValue());
|
||||
params.put(GridPersonnelTypeEnum.DISTRICT_DEPARTMENT.getValue(), userId);
|
||||
params.put("summary", summary);
|
||||
|
||||
processService.saveTaskCompleteByTaskId(task.getId(), params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上报案件到旗县区管理员,逻辑:根据传入的用户ID(用户选择的)查找网格员,存在则将案件进行转发,否则抛出异常
|
||||
*
|
||||
* @param leaderUserId
|
||||
* @param task
|
||||
* @param summary
|
||||
*/
|
||||
private void updateStreetToDistrict(String leaderUserId, Task task, String summary) {
|
||||
GridPersonnelDTO gridPersonnelDTO = gridPersonnelService.getGridPersonnelByUserId(leaderUserId);
|
||||
if (gridPersonnelDTO == null) {
|
||||
throw new SearchException("上级领导不存在");
|
||||
}
|
||||
Map<String, Object> params = getHashMap(4);
|
||||
params.put(CheckProcessParamsEnum.HANDLE_TYPE.getValue(), HandleTypeEnum.LEADER.getValue());
|
||||
params.put(CheckProcessParamsEnum.LEADER.getValue(), LeaderTypeEnum.DISTRICT.getValue());
|
||||
params.put(GridPersonnelTypeEnum.DISTRICT_DEPARTMENT.getValue(), gridPersonnelDTO.getUserId());
|
||||
params.put("summary", summary);
|
||||
|
||||
processService.saveTaskCompleteByTaskId(task.getId(), params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启检查流程
|
||||
*
|
||||
|
@ -9,6 +9,7 @@ import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.inspection.enums.GridPersonnelTypeEnum;
|
||||
import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO;
|
||||
import com.cm.inspection.pojo.pos.gridpersonnel.GridPersonnelPO;
|
||||
import com.cm.inspection.pojo.vos.gridpersonnel.GridPersonnelVO;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@ -166,6 +167,14 @@ public interface IGridPersonnelService {
|
||||
*/
|
||||
GridPersonnelDTO getLeader(String userId, int isGridOperator) throws SearchException;
|
||||
|
||||
/**
|
||||
* 上级领导(网格员)
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return
|
||||
*/
|
||||
GridPersonnelPO getLeaderPOByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 网格员数量
|
||||
*
|
||||
|
@ -270,7 +270,8 @@ public class GridPersonnelServiceImpl extends BaseService implements IGridPerson
|
||||
return gridPersonnelPO.getUserId();
|
||||
}
|
||||
|
||||
private GridPersonnelPO getLeaderPOByUserId(String userId) {
|
||||
@Override
|
||||
public GridPersonnelPO getLeaderPOByUserId(String userId) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("userId", userId);
|
||||
return gridPersonnelDao.getLeaderPO(params);
|
||||
|
@ -20,14 +20,14 @@ spring:
|
||||
max-request-size: 1GB
|
||||
datasource:
|
||||
druid:
|
||||
# url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||
url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||
url: jdbc:mysql://49.233.36.36:6688/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||
# url: jdbc:mysql://127.0.0.1:3306/db_cloud_inspection?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false
|
||||
db-type: mysql
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
# username: wanggeng
|
||||
username: root
|
||||
# password: WenG>2132997
|
||||
password: root
|
||||
username: wanggeng
|
||||
# username: root
|
||||
password: WenG>2132997
|
||||
# password: root
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 5
|
||||
@ -88,8 +88,8 @@ security:
|
||||
oauth-server: http://127.0.0.1:7001/usercenter
|
||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
client:
|
||||
client-id: 32ec344a5fd04fd9911586df5d1dc36b
|
||||
client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
||||
client-id: 44a8dc867f7f4465b7ba6065d87e30d7
|
||||
client-secret: bTRCTEw1TEZkL284bVhLOXJ2NDYrSUlGdU1DSlNGaGdLTWhEb1l1VHZHMG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
|
||||
user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize
|
||||
access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token
|
||||
grant-type: authorization_code
|
||||
|
@ -1,578 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" href="assets/js/vendor/swiper3/css/swiper.min.css" media="all">
|
||||
<link rel="stylesheet" href="assets/css/list-css.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline search-item-width-100">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox"></div>
|
||||
<script id="typeSelectTemplate" type="text/html">
|
||||
<select id="type" name="type">
|
||||
<option value="">企业类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="industrySelectTemplateBox" lay-filter="industrySelectTemplateBox"></div>
|
||||
<script id="industrySelectTemplate" type="text/html">
|
||||
<select id="industry" name="industry">
|
||||
<option value="">管理行业</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="checkType" name="checkType">
|
||||
<option value="">检查类型</option>
|
||||
<option value="1">检查</option>
|
||||
<option value="2">复查</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isCoordination" id="isCoordination">
|
||||
<option value="">是否配合</option>
|
||||
<option value="0">不配合</option>
|
||||
<option value="1">配合</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isComplete" id="isComplete">
|
||||
<option value="">是否完成</option>
|
||||
<option value="0">未完成</option>
|
||||
<option value="1">完成</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline layui-form search-item" id="area1SelectTemplateBox" lay-filter="area1SelectTemplateBox"></div>
|
||||
<script id="area1SelectTemplate" type="text/html">
|
||||
<select id="area1" name="area1" lay-filter="area1" lay-search>
|
||||
<option value="">选择省</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area2SelectTemplateBox" lay-filter="area2SelectTemplateBox"></div>
|
||||
<script id="area2SelectTemplate" type="text/html">
|
||||
<select id="area2" name="area2" lay-filter="area2" lay-search>
|
||||
<option value="">市</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area3SelectTemplateBox" lay-filter="area3SelectTemplateBox"></div>
|
||||
<script id="area3SelectTemplate" type="text/html">
|
||||
<select id="area3" name="area3" lay-filter="area3" lay-search>
|
||||
<option value="">旗县区</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area4SelectTemplateBox" lay-filter="area4SelectTemplateBox"></div>
|
||||
<script id="area4SelectTemplate" type="text/html">
|
||||
<select id="area4" name="area4" lay-filter="area4" lay-search>
|
||||
<option value="">乡镇街道</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area5SelectTemplateBox" lay-filter="area5SelectTemplateBox"></div>
|
||||
<script id="area5SelectTemplate" type="text/html">
|
||||
<select id="area5" name="area5" lay-filter="area5" lay-search>
|
||||
<option value="">村社区</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/swiper3/js/swiper.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/check2/listpage?checkType=1';
|
||||
|
||||
// 初始化选择框、单选、复选模板
|
||||
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
|
||||
laytpl(document.getElementById(templateId).innerHTML).render(data, function(html) {
|
||||
document.getElementById(templateBoxId).innerHTML = html;
|
||||
});
|
||||
form.render('select', templateBoxId);
|
||||
}
|
||||
|
||||
// 初始化1级区域下拉选择
|
||||
function initArea1Select() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/81583ade-5466-49aa-b7b6-c643c131ea34', []), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化2级区域下拉选择
|
||||
function initArea2Select(area1) {
|
||||
if(!area1) {
|
||||
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area1}', [area1]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化3级区域下拉选择
|
||||
function initArea3Select(area2) {
|
||||
$('#area3Box').show();
|
||||
if(!area2) {
|
||||
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area2}', [area2]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化4级区域下拉选择
|
||||
function initArea4Select(area3) {
|
||||
if(!area3) {
|
||||
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area3}', [area3]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化5级区域下拉选择
|
||||
function initArea5Select(area4) {
|
||||
$('#area5Box').show();
|
||||
if(!area4) {
|
||||
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area4}', [area4]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
initArea1Select();
|
||||
initArea2Select();
|
||||
initArea3Select();
|
||||
initArea4Select();
|
||||
initArea5Select();
|
||||
|
||||
// 初始化企业类型下拉选择
|
||||
function initTypeSelect() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('typeSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('typeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'typeSelectTemplateBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initTypeSelect();
|
||||
// 初始化管理行业下拉选择
|
||||
function initIndustrySelect() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('industrySelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('industrySelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'industrySelectTemplateBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initIndustrySelect();
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 130,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field:'photos', width: 200, title: '企业图片',
|
||||
templet: function(row) {
|
||||
var photos = '';
|
||||
if(row.factoryGateByEnterpriseId) {
|
||||
var photoArray = row.factoryGateByEnterpriseId.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(row.workplaceByEnterpriseId) {
|
||||
var photoArray = row.workplaceByEnterpriseId.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(!photos) {
|
||||
photos = '<img class="swiper-slide" src="assets/images/nonephoto.jpg">';
|
||||
}
|
||||
var photoDiv = '<div id="photo_'+ row.checkId +'" class="swiper-container enterprise-photos-box"><div class="swiper-wrapper">'+ photos +'</div></div>';
|
||||
setTimeout(function() {
|
||||
new Swiper('#photo_'+ row.checkId, {
|
||||
autoplay: 3000
|
||||
})
|
||||
}, 50);
|
||||
return photoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col1', width: 300, title: '检查企业', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.nameJoinByEnterpriseId +'">'+ row.nameJoinByEnterpriseId +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.typeDictionaryName +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.riskOperationDictionaryName ? row.riskOperationDictionaryName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLngByEnterpriseId && row.enterpriseLatByEnterpriseId) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.addressJoinByEnterpriseId +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'" data-lng="'+ row.enterpriseLngByEnterpriseId +'" data-lat="'+ row.enterpriseLatByEnterpriseId +'"><i class="fa fa-map-marker"></i> '+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '查看企业定位') +'</div></td></tr>';
|
||||
} else {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.addressJoinByEnterpriseId +'">'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +'</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.phoneJoinByEnterpriseId ? row.phoneJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.engagedCountJoinByEnterpriseId ? (row.engagedCountJoinByEnterpriseId +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col4', width: 100, title: '状态', align: 'center',
|
||||
templet: function(row) {
|
||||
var checkType = '【无检查类型】';
|
||||
if(row.checkType == 1) {
|
||||
checkType = '【检查】';
|
||||
} else if(rowData == 2) {
|
||||
checkType = '【复查】';
|
||||
}
|
||||
var isCoordination = '<span style="color: #FF5722;">【不配合】</span>';
|
||||
if(row.isCoordination == 1) {
|
||||
isCoordination = '<span style="color: #009688;">【配合】</span>';
|
||||
}
|
||||
var isComplete = '<span style="color: #FF5722;">【未完成】</span>';
|
||||
if(row.isComplete == 1) {
|
||||
isComplete = '<span style="color: #009688;">【完成】</span>'
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ checkType +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordination +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isComplete +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col5', width: 120, title: '操作', align: 'center',
|
||||
templet: function(row) {
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.nameJoinByEnterpriseId +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
if(row.isCoordination != 1) {
|
||||
isCoordinationBtn = '不配合';
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordinationBtn +'</td></tr>';
|
||||
if(row.checkLng && row.checkLat) {
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
]],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
type: $('#type').val(),
|
||||
industry: $('#industry').val(),
|
||||
checkType: $('#checkType').val(),
|
||||
isCoordination: $('#isCoordination').val(),
|
||||
isComplete: $('#isComplete').val(),
|
||||
area1: $('#area1').val(),
|
||||
area2: $('#area2').val(),
|
||||
area3: $('#area3').val(),
|
||||
area4: $('#area4').val(),
|
||||
area5: $('#area5').val(),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 90,
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function removeData(ids) {
|
||||
top.dialog.msg(top.dataMessage.delete, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/check/removecheck/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/save-check.html', []),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/update-check.html?checkId={checkId}', [checkDatas[0].checkId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['checkId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-detail', function() {
|
||||
var checkId = this.dataset.checkid;
|
||||
var nameJoinByEnterpriseId = this.dataset.name;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ nameJoinByEnterpriseId + '】检、复查选项',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.enterprise-location', function() {
|
||||
var lng = this.dataset.lng;
|
||||
var lat = this.dataset.lat;
|
||||
if(lng && lat) {
|
||||
top.dialog.dialogData.enterpriseCheckData = {
|
||||
enterpriseId: this.dataset.enterpriseId,
|
||||
enterpriseName: this.dataset.enterpriseName,
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '企业位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
top.dialog.dialogData.enterpriseCheckData = null;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
top.dialog.msg('暂无定位信息');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-location', function() {
|
||||
var lng = this.dataset.lng;
|
||||
var lat = this.dataset.lat;
|
||||
if(lng && lat) {
|
||||
top.dialog.dialogData.enterpriseCheckData = {
|
||||
enterpriseId: this.dataset.enterpriseId,
|
||||
enterpriseName: this.dataset.enterpriseName,
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '检查位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
top.dialog.dialogData.enterpriseCheckData = null;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
top.dialog.msg('暂无检查定位信息');
|
||||
}
|
||||
});
|
||||
|
||||
// 联动事件
|
||||
// area1 选择事件
|
||||
// form.on('select(area1)', function(data) {
|
||||
// initArea2Select(data.value);
|
||||
// initArea3Select();
|
||||
// initArea4Select();
|
||||
// initArea5Select();
|
||||
// });
|
||||
initArea2Select('6aba668e-8ab3-4fbb-8886-b2d468ccf00e');
|
||||
// area2 选择事件
|
||||
form.on('select(area2)', function(data) {
|
||||
initArea3Select(data.value);
|
||||
initArea4Select();
|
||||
initArea5Select();
|
||||
});
|
||||
// area3 选择事件
|
||||
form.on('select(area3)', function(data) {
|
||||
initArea4Select(data.value);
|
||||
initArea5Select();
|
||||
});
|
||||
// area4 选择事件
|
||||
form.on('select(area4)', function(data) {
|
||||
initArea5Select(data.value);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -47,13 +47,6 @@
|
||||
<option value="2">复查</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isCoordination" id="isCoordination">
|
||||
<option value="">是否配合</option>
|
||||
<option value="0">不配合</option>
|
||||
<option value="1">配合</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isComplete" id="isComplete">
|
||||
<option value="">是否完成</option>
|
||||
@ -271,14 +264,14 @@
|
||||
{field:'photos', width: 200, title: '企业图片',
|
||||
templet: function(row) {
|
||||
var photos = '';
|
||||
if(row.factoryGateByEnterpriseId) {
|
||||
var photoArray = row.factoryGateByEnterpriseId.split(',');
|
||||
if(row.enterpriseFactoryGate) {
|
||||
var photoArray = row.enterpriseFactoryGate.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(row.workplaceByEnterpriseId) {
|
||||
var photoArray = row.workplaceByEnterpriseId.split(',');
|
||||
if(row.enterpriseWorkplace) {
|
||||
var photoArray = row.enterpriseWorkplace.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
@ -299,8 +292,8 @@
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.nameJoinByEnterpriseId +'">'+ row.nameJoinByEnterpriseId +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.typeDictionaryName +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.enterpriseName +'">'+ row.enterpriseName +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.enterpriseTypeName +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -308,12 +301,12 @@
|
||||
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.riskOperationDictionaryName ? row.riskOperationDictionaryName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLngByEnterpriseId && row.enterpriseLatByEnterpriseId) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.addressJoinByEnterpriseId +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'" data-lng="'+ row.enterpriseLngByEnterpriseId +'" data-lat="'+ row.enterpriseLatByEnterpriseId +'"><i class="fa fa-map-marker"></i> '+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '查看企业定位') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.enterpriseIndustryName ? row.enterpriseIndustryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.enterpriseRiskOperationName ? row.enterpriseRiskOperationName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLng && row.enterpriseLat) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.enterpriseAddress +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.enterpriseFactoryGate +'" data-lng="'+ row.enterpriseLng +'" data-lat="'+ row.enterpriseLat +'"><i class="fa fa-map-marker"></i> '+ (row.enterpriseAddress ? row.enterpriseAddress : '查看企业定位') +'</div></td></tr>';
|
||||
} else {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.addressJoinByEnterpriseId +'">'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.enterpriseAddress +'">'+ (row.enterpriseAddress ? row.enterpriseAddress : '-') +'</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -322,9 +315,9 @@
|
||||
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.phoneJoinByEnterpriseId ? row.phoneJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.engagedCountJoinByEnterpriseId ? (row.engagedCountJoinByEnterpriseId +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.enterpriseMaster ? row.enterpriseMaster : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.enterprisePhone ? row.enterprisePhone : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.enterpriseEngagedCount ? (row.enterpriseEngagedCount +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -334,20 +327,15 @@
|
||||
var checkType = '【无检查类型】';
|
||||
if(row.checkType == 1) {
|
||||
checkType = '【检查】';
|
||||
} else if(rowData == 2) {
|
||||
} else if(row.checkType == 2) {
|
||||
checkType = '【复查】';
|
||||
}
|
||||
var isCoordination = '<span style="color: #FF5722;">【不配合】</span>';
|
||||
if(row.isCoordination == 1) {
|
||||
isCoordination = '<span style="color: #009688;">【配合】</span>';
|
||||
}
|
||||
var isComplete = '<span style="color: #FF5722;">【未完成】</span>';
|
||||
if(row.isComplete == 1) {
|
||||
isComplete = '<span style="color: #009688;">【完成】</span>'
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ checkType +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordination +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isComplete +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -355,14 +343,14 @@
|
||||
},
|
||||
{field:'col5', width: 120, title: '操作', align: 'center',
|
||||
templet: function(row) {
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.nameJoinByEnterpriseId +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.enterpriseName +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
if(row.isCoordination != 1) {
|
||||
isCoordinationBtn = '不配合';
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordinationBtn +'</td></tr>';
|
||||
if(row.checkLng && row.checkLat) {
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -412,7 +400,7 @@
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/check/removecheck/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.restAjax.delete(top.restAjax.path('api/check2/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
@ -437,65 +425,13 @@
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/save-check.html', []),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/update-check.html?checkId={checkId}', [checkDatas[0].checkId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['checkId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-detail', function() {
|
||||
var checkId = this.dataset.checkid;
|
||||
var nameJoinByEnterpriseId = this.dataset.name;
|
||||
var enterpriseName = this.dataset.name;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ nameJoinByEnterpriseId + '】检、复查选项',
|
||||
url: top.restAjax.path('route/check2/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ enterpriseName + '】检、复查选项',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
@ -512,7 +448,7 @@
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '企业位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
@ -535,7 +471,7 @@
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '检查位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
@ -47,13 +47,6 @@
|
||||
<option value="2">复查</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isCoordination" id="isCoordination">
|
||||
<option value="">是否配合</option>
|
||||
<option value="0">不配合</option>
|
||||
<option value="1">配合</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isComplete" id="isComplete">
|
||||
<option value="">是否完成</option>
|
||||
@ -146,7 +139,7 @@
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/check2/listpage?checkType=1';
|
||||
var tableUrl = 'api/check2/listpage-street-of-mine';
|
||||
|
||||
// 初始化选择框、单选、复选模板
|
||||
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
|
||||
@ -271,14 +264,14 @@
|
||||
{field:'photos', width: 200, title: '企业图片',
|
||||
templet: function(row) {
|
||||
var photos = '';
|
||||
if(row.factoryGateByEnterpriseId) {
|
||||
var photoArray = row.factoryGateByEnterpriseId.split(',');
|
||||
if(row.enterpriseFactoryGate) {
|
||||
var photoArray = row.enterpriseFactoryGate.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(row.workplaceByEnterpriseId) {
|
||||
var photoArray = row.workplaceByEnterpriseId.split(',');
|
||||
if(row.enterpriseWorkplace) {
|
||||
var photoArray = row.enterpriseWorkplace.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
@ -299,8 +292,8 @@
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.nameJoinByEnterpriseId +'">'+ row.nameJoinByEnterpriseId +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.typeDictionaryName +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.enterpriseName +'">'+ row.enterpriseName +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.enterpriseTypeName +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -308,12 +301,12 @@
|
||||
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.riskOperationDictionaryName ? row.riskOperationDictionaryName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLngByEnterpriseId && row.enterpriseLatByEnterpriseId) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.addressJoinByEnterpriseId +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'" data-lng="'+ row.enterpriseLngByEnterpriseId +'" data-lat="'+ row.enterpriseLatByEnterpriseId +'"><i class="fa fa-map-marker"></i> '+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '查看企业定位') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.enterpriseIndustryName ? row.enterpriseIndustryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.enterpriseRiskOperationName ? row.enterpriseRiskOperationName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLng && row.enterpriseLat) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.enterpriseAddress +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.enterpriseFactoryGate +'" data-lng="'+ row.enterpriseLng +'" data-lat="'+ row.enterpriseLat +'"><i class="fa fa-map-marker"></i> '+ (row.enterpriseAddress ? row.enterpriseAddress : '查看企业定位') +'</div></td></tr>';
|
||||
} else {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.addressJoinByEnterpriseId +'">'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.enterpriseAddress +'">'+ (row.enterpriseAddress ? row.enterpriseAddress : '-') +'</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -322,9 +315,9 @@
|
||||
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.phoneJoinByEnterpriseId ? row.phoneJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.engagedCountJoinByEnterpriseId ? (row.engagedCountJoinByEnterpriseId +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.enterpriseMaster ? row.enterpriseMaster : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.enterprisePhone ? row.enterprisePhone : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.enterpriseEngagedCount ? (row.enterpriseEngagedCount +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -334,20 +327,15 @@
|
||||
var checkType = '【无检查类型】';
|
||||
if(row.checkType == 1) {
|
||||
checkType = '【检查】';
|
||||
} else if(rowData == 2) {
|
||||
} else if(row.checkType == 2) {
|
||||
checkType = '【复查】';
|
||||
}
|
||||
var isCoordination = '<span style="color: #FF5722;">【不配合】</span>';
|
||||
if(row.isCoordination == 1) {
|
||||
isCoordination = '<span style="color: #009688;">【配合】</span>';
|
||||
}
|
||||
var isComplete = '<span style="color: #FF5722;">【未完成】</span>';
|
||||
if(row.isComplete == 1) {
|
||||
isComplete = '<span style="color: #009688;">【完成】</span>'
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ checkType +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordination +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isComplete +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -355,14 +343,14 @@
|
||||
},
|
||||
{field:'col5', width: 120, title: '操作', align: 'center',
|
||||
templet: function(row) {
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.nameJoinByEnterpriseId +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.enterpriseName +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
if(row.isCoordination != 1) {
|
||||
isCoordinationBtn = '不配合';
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordinationBtn +'</td></tr>';
|
||||
if(row.checkLng && row.checkLat) {
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -412,7 +400,7 @@
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/check/removecheck/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.restAjax.delete(top.restAjax.path('api/check2/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
@ -437,65 +425,13 @@
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/save-check.html', []),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/update-check.html?checkId={checkId}', [checkDatas[0].checkId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['checkId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-detail', function() {
|
||||
var checkId = this.dataset.checkid;
|
||||
var nameJoinByEnterpriseId = this.dataset.name;
|
||||
var enterpriseName = this.dataset.name;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ nameJoinByEnterpriseId + '】检、复查选项',
|
||||
url: top.restAjax.path('route/check2/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ enterpriseName + '】检、复查选项',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
@ -512,7 +448,7 @@
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '企业位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
@ -535,7 +471,7 @@
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '检查位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
@ -47,13 +47,6 @@
|
||||
<option value="2">复查</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isCoordination" id="isCoordination">
|
||||
<option value="">是否配合</option>
|
||||
<option value="0">不配合</option>
|
||||
<option value="1">配合</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isComplete" id="isComplete">
|
||||
<option value="">是否完成</option>
|
||||
@ -146,7 +139,7 @@
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/check2/listpage?checkType=1';
|
||||
var tableUrl = 'api/check2/listpage-street-of-mine';
|
||||
|
||||
// 初始化选择框、单选、复选模板
|
||||
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
|
||||
@ -271,14 +264,14 @@
|
||||
{field:'photos', width: 200, title: '企业图片',
|
||||
templet: function(row) {
|
||||
var photos = '';
|
||||
if(row.factoryGateByEnterpriseId) {
|
||||
var photoArray = row.factoryGateByEnterpriseId.split(',');
|
||||
if(row.enterpriseFactoryGate) {
|
||||
var photoArray = row.enterpriseFactoryGate.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(row.workplaceByEnterpriseId) {
|
||||
var photoArray = row.workplaceByEnterpriseId.split(',');
|
||||
if(row.enterpriseWorkplace) {
|
||||
var photoArray = row.enterpriseWorkplace.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
@ -299,8 +292,8 @@
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.nameJoinByEnterpriseId +'">'+ row.nameJoinByEnterpriseId +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.typeDictionaryName +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.enterpriseName +'">'+ row.enterpriseName +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.enterpriseTypeName +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -308,12 +301,12 @@
|
||||
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.riskOperationDictionaryName ? row.riskOperationDictionaryName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLngByEnterpriseId && row.enterpriseLatByEnterpriseId) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.addressJoinByEnterpriseId +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'" data-lng="'+ row.enterpriseLngByEnterpriseId +'" data-lat="'+ row.enterpriseLatByEnterpriseId +'"><i class="fa fa-map-marker"></i> '+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '查看企业定位') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.enterpriseIndustryName ? row.enterpriseIndustryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.enterpriseRiskOperationName ? row.enterpriseRiskOperationName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLng && row.enterpriseLat) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.enterpriseAddress +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.enterpriseFactoryGate +'" data-lng="'+ row.enterpriseLng +'" data-lat="'+ row.enterpriseLat +'"><i class="fa fa-map-marker"></i> '+ (row.enterpriseAddress ? row.enterpriseAddress : '查看企业定位') +'</div></td></tr>';
|
||||
} else {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.addressJoinByEnterpriseId +'">'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.enterpriseAddress +'">'+ (row.enterpriseAddress ? row.enterpriseAddress : '-') +'</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -322,9 +315,9 @@
|
||||
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.phoneJoinByEnterpriseId ? row.phoneJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.engagedCountJoinByEnterpriseId ? (row.engagedCountJoinByEnterpriseId +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.enterpriseMaster ? row.enterpriseMaster : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.enterprisePhone ? row.enterprisePhone : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.enterpriseEngagedCount ? (row.enterpriseEngagedCount +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -334,20 +327,15 @@
|
||||
var checkType = '【无检查类型】';
|
||||
if(row.checkType == 1) {
|
||||
checkType = '【检查】';
|
||||
} else if(rowData == 2) {
|
||||
} else if(row.checkType == 2) {
|
||||
checkType = '【复查】';
|
||||
}
|
||||
var isCoordination = '<span style="color: #FF5722;">【不配合】</span>';
|
||||
if(row.isCoordination == 1) {
|
||||
isCoordination = '<span style="color: #009688;">【配合】</span>';
|
||||
}
|
||||
var isComplete = '<span style="color: #FF5722;">【未完成】</span>';
|
||||
if(row.isComplete == 1) {
|
||||
isComplete = '<span style="color: #009688;">【完成】</span>'
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ checkType +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordination +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isComplete +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -355,14 +343,14 @@
|
||||
},
|
||||
{field:'col5', width: 120, title: '操作', align: 'center',
|
||||
templet: function(row) {
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.nameJoinByEnterpriseId +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.enterpriseName +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
if(row.isCoordination != 1) {
|
||||
isCoordinationBtn = '不配合';
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordinationBtn +'</td></tr>';
|
||||
if(row.checkLng && row.checkLat) {
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -412,7 +400,7 @@
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/check/removecheck/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.restAjax.delete(top.restAjax.path('api/check2/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
@ -437,65 +425,13 @@
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/save-check.html', []),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/check/update-check.html?checkId={checkId}', [checkDatas[0].checkId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['checkId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-detail', function() {
|
||||
var checkId = this.dataset.checkid;
|
||||
var nameJoinByEnterpriseId = this.dataset.name;
|
||||
var enterpriseName = this.dataset.name;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ nameJoinByEnterpriseId + '】检、复查选项',
|
||||
url: top.restAjax.path('route/check2/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ enterpriseName + '】检、复查选项',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
@ -512,7 +448,7 @@
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '企业位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
@ -535,7 +471,7 @@
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '检查位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
500
src/main/resources/static/route/check2/list-street-of-mine.html
Normal file
500
src/main/resources/static/route/check2/list-street-of-mine.html
Normal file
@ -0,0 +1,500 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" href="assets/js/vendor/swiper3/css/swiper.min.css" media="all">
|
||||
<link rel="stylesheet" href="assets/css/list-css.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline search-item-width-100">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox"></div>
|
||||
<script id="typeSelectTemplate" type="text/html">
|
||||
<select id="type" name="type">
|
||||
<option value="">企业类型</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="industrySelectTemplateBox" lay-filter="industrySelectTemplateBox"></div>
|
||||
<script id="industrySelectTemplate" type="text/html">
|
||||
<select id="industry" name="industry">
|
||||
<option value="">管理行业</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select id="checkType" name="checkType">
|
||||
<option value="">检查类型</option>
|
||||
<option value="1">检查</option>
|
||||
<option value="2">复查</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item">
|
||||
<select name="isComplete" id="isComplete">
|
||||
<option value="">是否完成</option>
|
||||
<option value="0">未完成</option>
|
||||
<option value="1">完成</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline layui-form search-item" id="area1SelectTemplateBox" lay-filter="area1SelectTemplateBox"></div>
|
||||
<script id="area1SelectTemplate" type="text/html">
|
||||
<select id="area1" name="area1" lay-filter="area1" lay-search>
|
||||
<option value="">选择省</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area2SelectTemplateBox" lay-filter="area2SelectTemplateBox"></div>
|
||||
<script id="area2SelectTemplate" type="text/html">
|
||||
<select id="area2" name="area2" lay-filter="area2" lay-search>
|
||||
<option value="">市</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area3SelectTemplateBox" lay-filter="area3SelectTemplateBox"></div>
|
||||
<script id="area3SelectTemplate" type="text/html">
|
||||
<select id="area3" name="area3" lay-filter="area3" lay-search>
|
||||
<option value="">旗县区</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area4SelectTemplateBox" lay-filter="area4SelectTemplateBox"></div>
|
||||
<script id="area4SelectTemplate" type="text/html">
|
||||
<select id="area4" name="area4" lay-filter="area4" lay-search>
|
||||
<option value="">乡镇街道</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<div class="layui-inline layui-form search-item" id="area5SelectTemplateBox" lay-filter="area5SelectTemplateBox"></div>
|
||||
<script id="area5SelectTemplate" type="text/html">
|
||||
<select id="area5" name="area5" lay-filter="area5" lay-search>
|
||||
<option value="">村社区</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/swiper3/js/swiper.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/check2/listpage-street-of-mine';
|
||||
|
||||
// 初始化选择框、单选、复选模板
|
||||
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
|
||||
laytpl(document.getElementById(templateId).innerHTML).render(data, function(html) {
|
||||
document.getElementById(templateBoxId).innerHTML = html;
|
||||
});
|
||||
form.render('select', templateBoxId);
|
||||
}
|
||||
|
||||
// 初始化1级区域下拉选择
|
||||
function initArea1Select() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/81583ade-5466-49aa-b7b6-c643c131ea34', []), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化2级区域下拉选择
|
||||
function initArea2Select(area1) {
|
||||
if(!area1) {
|
||||
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area1}', [area1]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化3级区域下拉选择
|
||||
function initArea3Select(area2) {
|
||||
$('#area3Box').show();
|
||||
if(!area2) {
|
||||
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area2}', [area2]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化4级区域下拉选择
|
||||
function initArea4Select(area3) {
|
||||
if(!area3) {
|
||||
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area3}', [area3]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化5级区域下拉选择
|
||||
function initArea5Select(area4) {
|
||||
$('#area5Box').show();
|
||||
if(!area4) {
|
||||
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', []);
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area4}', [area4]), {}, null, function(code, data, args) {
|
||||
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
initArea1Select();
|
||||
initArea2Select();
|
||||
initArea3Select();
|
||||
initArea4Select();
|
||||
initArea5Select();
|
||||
|
||||
// 初始化企业类型下拉选择
|
||||
function initTypeSelect() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('typeSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('typeSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'typeSelectTemplateBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initTypeSelect();
|
||||
// 初始化管理行业下拉选择
|
||||
function initIndustrySelect() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('industrySelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('industrySelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'industrySelectTemplateBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
initIndustrySelect();
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 130,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field:'photos', width: 200, title: '企业图片',
|
||||
templet: function(row) {
|
||||
var photos = '';
|
||||
if(row.enterpriseFactoryGate) {
|
||||
var photoArray = row.enterpriseFactoryGate.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(row.enterpriseWorkplace) {
|
||||
var photoArray = row.enterpriseWorkplace.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(!photos) {
|
||||
photos = '<img class="swiper-slide" src="assets/images/nonephoto.jpg">';
|
||||
}
|
||||
var photoDiv = '<div id="photo_'+ row.checkId +'" class="swiper-container enterprise-photos-box"><div class="swiper-wrapper">'+ photos +'</div></div>';
|
||||
setTimeout(function() {
|
||||
new Swiper('#photo_'+ row.checkId, {
|
||||
autoplay: 3000
|
||||
})
|
||||
}, 50);
|
||||
return photoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col1', width: 300, title: '检查企业', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.enterpriseName +'">'+ row.enterpriseName +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.enterpriseTypeName +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.enterpriseIndustryName ? row.enterpriseIndustryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.enterpriseRiskOperationName ? row.enterpriseRiskOperationName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLng && row.enterpriseLat) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.enterpriseAddress +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.enterpriseFactoryGate +'" data-lng="'+ row.enterpriseLng +'" data-lat="'+ row.enterpriseLat +'"><i class="fa fa-map-marker"></i> '+ (row.enterpriseAddress ? row.enterpriseAddress : '查看企业定位') +'</div></td></tr>';
|
||||
} else {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.enterpriseAddress +'">'+ (row.enterpriseAddress ? row.enterpriseAddress : '-') +'</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.enterpriseMaster ? row.enterpriseMaster : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.enterprisePhone ? row.enterprisePhone : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.enterpriseEngagedCount ? (row.enterpriseEngagedCount +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col4', width: 100, title: '状态', align: 'center',
|
||||
templet: function(row) {
|
||||
var checkType = '【无检查类型】';
|
||||
if(row.checkType == 1) {
|
||||
checkType = '【检查】';
|
||||
} else if(row.checkType == 2) {
|
||||
checkType = '【复查】';
|
||||
}
|
||||
var isComplete = '<span style="color: #FF5722;">【未完成】</span>';
|
||||
if(row.isComplete == 1) {
|
||||
isComplete = '<span style="color: #009688;">【完成】</span>'
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ checkType +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isComplete +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
{field:'col5', width: 100, title: '操作', align: 'center', fixed: 'right',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content-opition">' +
|
||||
'<button class="layui-btn layui-btn-xs" lay-event="handleCompleteEvent">处理完成</button>' +
|
||||
'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content-opition">' +
|
||||
'<button class="layui-btn layui-btn-xs layui-btn-normal">上级处理</button>' +
|
||||
'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-content-opition">' +
|
||||
'<div class="layui-btn-group">' +
|
||||
'<button class="layui-btn layui-btn-xs layui-btn-primary">流程</button>' +
|
||||
'<button class="layui-btn layui-btn-xs layui-btn-primary">详情</button>' +
|
||||
'</div>' +
|
||||
'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
},
|
||||
]],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
type: $('#type').val(),
|
||||
industry: $('#industry').val(),
|
||||
checkType: $('#checkType').val(),
|
||||
isComplete: $('#isComplete').val(),
|
||||
area1: $('#area1').val(),
|
||||
area2: $('#area2').val(),
|
||||
area3: $('#area3').val(),
|
||||
area4: $('#area4').val(),
|
||||
area5: $('#area5').val(),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 130,
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-detail', function() {
|
||||
var checkId = this.dataset.checkid;
|
||||
var enterpriseName = this.dataset.name;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check2/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ enterpriseName + '】检、复查选项',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.enterprise-location', function() {
|
||||
var lng = this.dataset.lng;
|
||||
var lat = this.dataset.lat;
|
||||
if(lng && lat) {
|
||||
top.dialog.dialogData.enterpriseCheckData = {
|
||||
enterpriseId: this.dataset.enterpriseId,
|
||||
enterpriseName: this.dataset.enterpriseName,
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '企业位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
top.dialog.dialogData.enterpriseCheckData = null;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
top.dialog.msg('暂无定位信息');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.check-location', function() {
|
||||
var lng = this.dataset.lng;
|
||||
var lat = this.dataset.lat;
|
||||
if(lng && lat) {
|
||||
top.dialog.dialogData.enterpriseCheckData = {
|
||||
enterpriseId: this.dataset.enterpriseId,
|
||||
enterpriseName: this.dataset.enterpriseName,
|
||||
photoArray: this.dataset.photoArray,
|
||||
}
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check2/get-map-location.html?lng={lng}&lat={lat}', [lng, lat]),
|
||||
title: '检查位置信息',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {
|
||||
top.dialog.dialogData.enterpriseCheckData = null;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
top.dialog.msg('暂无检查定位信息');
|
||||
}
|
||||
});
|
||||
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var data = obj.data;
|
||||
var event = obj.event;
|
||||
if(event === 'handleCompleteEvent') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check2/update-street-complete.html?checkId={checkId}', [data.checkId]),
|
||||
title: '处理完成',
|
||||
width: '400px',
|
||||
height: '350px',
|
||||
onClose: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 联动事件
|
||||
// area1 选择事件
|
||||
// form.on('select(area1)', function(data) {
|
||||
// initArea2Select(data.value);
|
||||
// initArea3Select();
|
||||
// initArea4Select();
|
||||
// initArea5Select();
|
||||
// });
|
||||
initArea2Select('6aba668e-8ab3-4fbb-8886-b2d468ccf00e');
|
||||
// area2 选择事件
|
||||
form.on('select(area2)', function(data) {
|
||||
initArea3Select(data.value);
|
||||
initArea4Select();
|
||||
initArea5Select();
|
||||
});
|
||||
// area3 选择事件
|
||||
form.on('select(area3)', function(data) {
|
||||
initArea4Select(data.value);
|
||||
initArea5Select();
|
||||
});
|
||||
// area4 选择事件
|
||||
form.on('select(area4)', function(data) {
|
||||
initArea5Select(data.value);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -271,14 +271,14 @@
|
||||
{field:'photos', width: 200, title: '企业图片',
|
||||
templet: function(row) {
|
||||
var photos = '';
|
||||
if(row.factoryGateByEnterpriseId) {
|
||||
var photoArray = row.factoryGateByEnterpriseId.split(',');
|
||||
if(row.enterpriseFactoryGate) {
|
||||
var photoArray = row.enterpriseFactoryGate.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
}
|
||||
if(row.workplaceByEnterpriseId) {
|
||||
var photoArray = row.workplaceByEnterpriseId.split(',');
|
||||
if(row.enterpriseWorkplace) {
|
||||
var photoArray = row.enterpriseWorkplace.split(',');
|
||||
for(var i = 0, item; item = photoArray[i++];) {
|
||||
photos += '<img class="swiper-slide" src="route/file/downloadfile/false/'+ item +'">';
|
||||
}
|
||||
@ -299,8 +299,8 @@
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.nameJoinByEnterpriseId +'">'+ row.nameJoinByEnterpriseId +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.typeDictionaryName +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name" title="'+ row.enterpriseName +'">'+ row.enterpriseName +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.enterpriseTypeName +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -308,12 +308,12 @@
|
||||
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.riskOperationDictionaryName ? row.riskOperationDictionaryName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLngByEnterpriseId && row.enterpriseLatByEnterpriseId) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.addressJoinByEnterpriseId +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'" data-lng="'+ row.enterpriseLngByEnterpriseId +'" data-lat="'+ row.enterpriseLatByEnterpriseId +'"><i class="fa fa-map-marker"></i> '+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '查看企业定位') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.enterpriseIndustryName ? row.enterpriseIndustryName : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">作业风险</td><td class="col-content">'+ (row.enterpriseRiskOperationName ? row.enterpriseRiskOperationName : '-') +'</td></tr>';
|
||||
if(row.enterpriseLng && row.enterpriseLat) {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div enterprise-location" title="'+ row.enterpriseAddress +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.enterpriseFactoryGate +'" data-lng="'+ row.enterpriseLng +'" data-lat="'+ row.enterpriseLat +'"><i class="fa fa-map-marker"></i> '+ (row.enterpriseAddress ? row.enterpriseAddress : '查看企业定位') +'</div></td></tr>';
|
||||
} else {
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.addressJoinByEnterpriseId +'">'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +'</div></td></tr>';
|
||||
infoDiv += '<tr><td colspan="2" class="col-content"><div class="col-content-div" title="'+ row.enterpriseAddress +'">'+ (row.enterpriseAddress ? row.enterpriseAddress : '-') +'</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -322,9 +322,9 @@
|
||||
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||
templet: function(row) {
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.phoneJoinByEnterpriseId ? row.phoneJoinByEnterpriseId : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.engagedCountJoinByEnterpriseId ? (row.engagedCountJoinByEnterpriseId +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.enterpriseMaster ? row.enterpriseMaster : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">联系电话</td><td class="col-content"><i class="fa fa-mobile-phone"></i> '+ (row.enterprisePhone ? row.enterprisePhone : '-') +'</td></tr>';
|
||||
infoDiv += '<tr><td class="col-title">从业人数</td><td class="col-content"><i class="fa fa-users"></i> '+ (row.enterpriseEngagedCount ? (row.enterpriseEngagedCount +' 人') : '-') +'</td></tr>';
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
}
|
||||
@ -334,7 +334,7 @@
|
||||
var checkType = '【无检查类型】';
|
||||
if(row.checkType == 1) {
|
||||
checkType = '【检查】';
|
||||
} else if(rowData == 2) {
|
||||
} else if(row.checkType == 2) {
|
||||
checkType = '【复查】';
|
||||
}
|
||||
var isComplete = '<span style="color: #FF5722;">【未完成】</span>';
|
||||
@ -350,14 +350,14 @@
|
||||
},
|
||||
{field:'col5', width: 120, title: '操作', align: 'center',
|
||||
templet: function(row) {
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.nameJoinByEnterpriseId +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
var isCoordinationBtn = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs check-detail" data-checkid="'+ row.checkId +'" data-name="'+ row.enterpriseName +'"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
||||
if(row.isCoordination != 1) {
|
||||
isCoordinationBtn = '不配合';
|
||||
}
|
||||
var infoDiv = '<table>';
|
||||
infoDiv += '<tr><td class="col-content">'+ isCoordinationBtn +'</td></tr>';
|
||||
if(row.checkLng && row.checkLat) {
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.nameJoinByEnterpriseId +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
infoDiv += '<tr><td class="col-content-opition"><div class="col-content-div check-location" data-lng="'+ row.checkLng +'" data-lat="'+ row.checkLat +'" data-enterprise-name="'+ row.enterpriseName +'" data-enterprise-id="'+ row.enterpriseId +'" data-enterprise-photos="'+ row.factoryGateByEnterpriseId +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||
}
|
||||
infoDiv += '</table>';
|
||||
return infoDiv;
|
||||
@ -487,10 +487,10 @@
|
||||
|
||||
$(document).on('click', '.check-detail', function() {
|
||||
var checkId = this.dataset.checkid;
|
||||
var nameJoinByEnterpriseId = this.dataset.name;
|
||||
var enterpriseName = this.dataset.name;
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/check2/get-check-item.html?checkId={checkId}', [checkId]),
|
||||
title: '【'+ nameJoinByEnterpriseId + '】检、复查选项',
|
||||
title: '【'+ enterpriseName + '】检、复查选项',
|
||||
width: '80%',
|
||||
height: '80%',
|
||||
onClose: function() {}
|
@ -0,0 +1,96 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<base href="/inspection/">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>提交</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="summary" name="summary" placeholder="请输入说明" class="layui-textarea"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl', 'tableSelect'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var checkId = top.restAjax.params(window.location.href).checkId;
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field['content'] = wangEditorObj['content'].txt.html();
|
||||
top.restAjax.post(top.restAjax.path('api/check2/update-street-complete/{checkId}', [checkId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
closeBox();
|
||||
},
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user