修改样式
This commit is contained in:
parent
b5670cc007
commit
4c30a1cd21
33
src/main/java/com/cm/inspection/config/ResourceConfig.java
Normal file
33
src/main/java/com/cm/inspection/config/ResourceConfig.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.cm.inspection.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
|
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||||
|
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
|
||||||
|
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ResourceConfig
|
||||||
|
* @Description: 资源服务器
|
||||||
|
* @Author: WangGeng
|
||||||
|
* @Date: 2019/2/27 11:33 AM
|
||||||
|
* @Version: 1.0
|
||||||
|
**/
|
||||||
|
@Configuration
|
||||||
|
@EnableResourceServer
|
||||||
|
public class ResourceConfig extends ResourceServerConfigurerAdapter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configure(HttpSecurity http) throws Exception {
|
||||||
|
http
|
||||||
|
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
|
||||||
|
.and()
|
||||||
|
.requestMatchers()
|
||||||
|
.antMatchers("/resource/**", "/client/**")
|
||||||
|
.and()
|
||||||
|
.authorizeRequests()
|
||||||
|
.antMatchers("/resource/**", "/client/**")
|
||||||
|
.authenticated();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -55,6 +55,10 @@ public class CheckDTO {
|
|||||||
private String masterJoinByEnterpriseId;
|
private String masterJoinByEnterpriseId;
|
||||||
@ApiModelProperty(name = "phoneJoinByEnterpriseId", value = "企业ID的联系电话")
|
@ApiModelProperty(name = "phoneJoinByEnterpriseId", value = "企业ID的联系电话")
|
||||||
private String phoneJoinByEnterpriseId;
|
private String phoneJoinByEnterpriseId;
|
||||||
|
@ApiModelProperty(name = "enterpriseLngByEnterpriseId", value = "企业经度")
|
||||||
|
private String enterpriseLngByEnterpriseId;
|
||||||
|
@ApiModelProperty(name = "enterpriseLatByEnterpriseId", value = "企业纬度")
|
||||||
|
private String enterpriseLatByEnterpriseId;
|
||||||
@ApiModelProperty(name = "checkType", value = "检查类型")
|
@ApiModelProperty(name = "checkType", value = "检查类型")
|
||||||
private Integer checkType;
|
private Integer checkType;
|
||||||
@ApiModelProperty(name = "taskCheckId", value = "任务检查ID")
|
@ApiModelProperty(name = "taskCheckId", value = "任务检查ID")
|
||||||
@ -224,6 +228,23 @@ public class CheckDTO {
|
|||||||
this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId;
|
this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getEnterpriseLngByEnterpriseId() {
|
||||||
|
return enterpriseLngByEnterpriseId == null ? "" : enterpriseLngByEnterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseLngByEnterpriseId(String enterpriseLngByEnterpriseId) {
|
||||||
|
this.enterpriseLngByEnterpriseId = enterpriseLngByEnterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterpriseLatByEnterpriseId() {
|
||||||
|
return enterpriseLatByEnterpriseId == null ? "" : enterpriseLatByEnterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseLatByEnterpriseId(String enterpriseLatByEnterpriseId) {
|
||||||
|
this.enterpriseLatByEnterpriseId = enterpriseLatByEnterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getCheckType() {
|
public Integer getCheckType() {
|
||||||
return checkType;
|
return checkType;
|
||||||
}
|
}
|
||||||
@ -326,46 +347,50 @@ public class CheckDTO {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder sb = new StringBuilder("{");
|
final StringBuilder sb = new StringBuilder("{");
|
||||||
sb.append("\"checkId\":")
|
sb.append("\"checkId\":\"")
|
||||||
.append("\"").append(checkId).append("\"");
|
.append(checkId).append('\"');
|
||||||
sb.append(",\"enterpriseId\":")
|
sb.append(",\"enterpriseId\":\"")
|
||||||
.append("\"").append(enterpriseId).append("\"");
|
.append(enterpriseId).append('\"');
|
||||||
sb.append(",\"nameJoinByEnterpriseId\":")
|
sb.append(",\"nameJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(nameJoinByEnterpriseId).append("\"");
|
.append(nameJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"typeJoinByEnterpriseId\":")
|
sb.append(",\"typeJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(typeJoinByEnterpriseId).append("\"");
|
.append(typeJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"typeDictionaryName\":")
|
sb.append(",\"typeDictionaryName\":\"")
|
||||||
.append("\"").append(typeDictionaryName).append("\"");
|
.append(typeDictionaryName).append('\"');
|
||||||
sb.append(",\"area1JoinByEnterpriseId\":")
|
sb.append(",\"area1JoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(area1JoinByEnterpriseId).append("\"");
|
.append(area1JoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"area2JoinByEnterpriseId\":")
|
sb.append(",\"area2JoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(area2JoinByEnterpriseId).append("\"");
|
.append(area2JoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"area3JoinByEnterpriseId\":")
|
sb.append(",\"area3JoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(area3JoinByEnterpriseId).append("\"");
|
.append(area3JoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"area4JoinByEnterpriseId\":")
|
sb.append(",\"area4JoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(area4JoinByEnterpriseId).append("\"");
|
.append(area4JoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"area5JoinByEnterpriseId\":")
|
sb.append(",\"area5JoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(area5JoinByEnterpriseId).append("\"");
|
.append(area5JoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"addressJoinByEnterpriseId\":")
|
sb.append(",\"addressJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(addressJoinByEnterpriseId).append("\"");
|
.append(addressJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"industryJoinByEnterpriseId\":")
|
sb.append(",\"industryJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(industryJoinByEnterpriseId).append("\"");
|
.append(industryJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"industryDictionaryName\":")
|
sb.append(",\"industryDictionaryName\":\"")
|
||||||
.append("\"").append(industryDictionaryName).append("\"");
|
.append(industryDictionaryName).append('\"');
|
||||||
sb.append(",\"engagedCountJoinByEnterpriseId\":")
|
sb.append(",\"engagedCountJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(engagedCountJoinByEnterpriseId).append("\"");
|
.append(engagedCountJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"riskOperationJoinByEnterpriseId\":")
|
sb.append(",\"riskOperationJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(riskOperationJoinByEnterpriseId).append("\"");
|
.append(riskOperationJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"riskOperationDictionaryName\":")
|
sb.append(",\"riskOperationDictionaryName\":\"")
|
||||||
.append("\"").append(riskOperationDictionaryName).append("\"");
|
.append(riskOperationDictionaryName).append('\"');
|
||||||
sb.append(",\"masterJoinByEnterpriseId\":")
|
sb.append(",\"masterJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(masterJoinByEnterpriseId).append("\"");
|
.append(masterJoinByEnterpriseId).append('\"');
|
||||||
sb.append(",\"phoneJoinByEnterpriseId\":")
|
sb.append(",\"phoneJoinByEnterpriseId\":\"")
|
||||||
.append("\"").append(phoneJoinByEnterpriseId).append("\"");
|
.append(phoneJoinByEnterpriseId).append('\"');
|
||||||
|
sb.append(",\"enterpriseLngByEnterpriseId\":\"")
|
||||||
|
.append(enterpriseLngByEnterpriseId).append('\"');
|
||||||
|
sb.append(",\"enterpriseLatByEnterpriseId\":\"")
|
||||||
|
.append(enterpriseLatByEnterpriseId).append('\"');
|
||||||
sb.append(",\"checkType\":")
|
sb.append(",\"checkType\":")
|
||||||
.append(checkType);
|
.append(checkType);
|
||||||
sb.append(",\"taskCheckId\":")
|
sb.append(",\"taskCheckId\":\"")
|
||||||
.append("\"").append(taskCheckId).append("\"");
|
.append(taskCheckId).append('\"');
|
||||||
sb.append(",\"isCoordination\":")
|
sb.append(",\"isCoordination\":")
|
||||||
.append(isCoordination);
|
.append(isCoordination);
|
||||||
sb.append(",\"isComplete\":")
|
sb.append(",\"isComplete\":")
|
||||||
@ -376,14 +401,14 @@ public class CheckDTO {
|
|||||||
.append(immediatelyChangeType);
|
.append(immediatelyChangeType);
|
||||||
sb.append(",\"rectificationDays\":")
|
sb.append(",\"rectificationDays\":")
|
||||||
.append(rectificationDays);
|
.append(rectificationDays);
|
||||||
sb.append(",\"summary\":")
|
sb.append(",\"summary\":\"")
|
||||||
.append("\"").append(summary).append("\"");
|
.append(summary).append('\"');
|
||||||
sb.append(",\"checkLng\":")
|
sb.append(",\"checkLng\":\"")
|
||||||
.append("\"").append(checkLng).append("\"");
|
.append(checkLng).append('\"');
|
||||||
sb.append(",\"checkLat\":")
|
sb.append(",\"checkLat\":\"")
|
||||||
.append("\"").append(checkLat).append("\"");
|
.append(checkLat).append('\"');
|
||||||
sb.append(",\"gmtCreate\":")
|
sb.append(",\"gmtCreate\":\"")
|
||||||
.append("\"").append(gmtCreate).append("\"");
|
.append(gmtCreate).append('\"');
|
||||||
sb.append(",\"checkItems\":")
|
sb.append(",\"checkItems\":")
|
||||||
.append(checkItems);
|
.append(checkItems);
|
||||||
sb.append('}');
|
sb.append('}');
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
<result column="risk_operation_dictionary_name" property="riskOperationDictionaryName"/>
|
<result column="risk_operation_dictionary_name" property="riskOperationDictionaryName"/>
|
||||||
<result column="master_join_by_enterprise_id" property="masterJoinByEnterpriseId"/>
|
<result column="master_join_by_enterprise_id" property="masterJoinByEnterpriseId"/>
|
||||||
<result column="phone_join_by_enterprise_id" property="phoneJoinByEnterpriseId"/>
|
<result column="phone_join_by_enterprise_id" property="phoneJoinByEnterpriseId"/>
|
||||||
|
<result column="enterprise_lng_by_enterprise_id" property="enterpriseLngByEnterpriseId"/>
|
||||||
|
<result column="enterprise_lat_by_enterprise_id" property="enterpriseLatByEnterpriseId"/>
|
||||||
<result column="check_type" property="checkType"/>
|
<result column="check_type" property="checkType"/>
|
||||||
<result column="task_check_id" property="taskCheckId"/>
|
<result column="task_check_id" property="taskCheckId"/>
|
||||||
<result column="rectification_type" property="rectificationType"/>
|
<result column="rectification_type" property="rectificationType"/>
|
||||||
@ -187,6 +189,8 @@
|
|||||||
dt3.dictionary_name risk_operation_dictionary_name,
|
dt3.dictionary_name risk_operation_dictionary_name,
|
||||||
jt1.master master_join_by_enterprise_id,
|
jt1.master master_join_by_enterprise_id,
|
||||||
jt1.phone phone_join_by_enterprise_id,
|
jt1.phone phone_join_by_enterprise_id,
|
||||||
|
jt1.enterprise_lng enterprise_lng_by_enterprise_id,
|
||||||
|
jt1.enterprise_lat enterprise_lat_by_enterprise_id,
|
||||||
t1.check_type,
|
t1.check_type,
|
||||||
t1.task_check_id,
|
t1.task_check_id,
|
||||||
t1.is_coordination,
|
t1.is_coordination,
|
||||||
|
@ -9,6 +9,51 @@
|
|||||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
<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/layui/css/layui.css" media="all">
|
||||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
<style>
|
||||||
|
tbody .layui-table-cell {
|
||||||
|
height: 108px;
|
||||||
|
line-height: 42px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table td {
|
||||||
|
height: 38px;
|
||||||
|
border-style: dotted;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-title {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-content-opition {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-content {
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-content .col-content-name {
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-half-right span {
|
||||||
|
display: block;
|
||||||
|
width: 99px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-content .col-content-div {
|
||||||
|
width: 400px;
|
||||||
|
padding: 0 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
tbody .layui-table-cell table .col-content-opition .col-content-div {
|
||||||
|
width: 120px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
@ -141,131 +186,77 @@
|
|||||||
cols: [[
|
cols: [[
|
||||||
{type:'checkbox', fixed: 'left'},
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
{field: 'gmtCreate', width: 200, title: '检查时间', align:'center',
|
{field:'col1', width: 300, title: '检查企业', align: 'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var infoDiv = '<table>';
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
infoDiv += '<tr><td colspan="2" class="col-content">'+ row.gmtCreate +'</td></tr>';
|
||||||
return '-';
|
infoDiv += '<tr><td class="col-title">企业名称</td><td class="col-content"><div class="col-content-name">'+ row.nameJoinByEnterpriseId +'</div></td></tr>';
|
||||||
}
|
infoDiv += '<tr><td class="col-title">企业类型</td><td class="col-content">'+ row.typeDictionaryName +'</td></tr>';
|
||||||
return rowData;
|
infoDiv += '</table>';
|
||||||
|
return infoDiv;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'nameJoinByEnterpriseId', width: 200, title: '企业名称', align:'center',
|
{field:'col2', width: 400, title: '行业风险', align: 'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var infoDiv = '<table>';
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
infoDiv += '<tr><td class="col-title">管理行业</td><td class="col-content">'+ (row.industryDictionaryName ? row.industryDictionaryName : '-') +'</td></tr>';
|
||||||
return '-';
|
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-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 enterprise-location" title="'+ row.addressJoinByEnterpriseId +'">'+ (row.addressJoinByEnterpriseId ? row.addressJoinByEnterpriseId : '-') +'</div></td></tr>';
|
||||||
}
|
}
|
||||||
return rowData;
|
infoDiv += '</table>';
|
||||||
|
return infoDiv;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'typeDictionaryName', width: 200, title: '企业类型', align:'center',
|
{field:'col3', width: 240, title: '人员信息', align: 'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var infoDiv = '<table>';
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
infoDiv += '<tr><td class="col-title">负责人</td><td class="col-content"><i class="fa fa-user-circle"></i> '+ (row.masterJoinByEnterpriseId ? row.masterJoinByEnterpriseId : '-') +'</td></tr>';
|
||||||
return '-';
|
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>';
|
||||||
return rowData;
|
infoDiv += '</table>';
|
||||||
|
return infoDiv;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'addressJoinByEnterpriseId', width: 200, title: '详细地址', align:'center',
|
{field:'col4', width: 100, title: '状态', align: 'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var checkType = '【无检查类型】';
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(row.checkType == 1) {
|
||||||
return '-';
|
checkType = '【检查】';
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'industryDictionaryName', width: 200, title: '管理行业', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'engagedCountJoinByEnterpriseId', width: 100, title: '从业人数', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'riskOperationDictionaryName', width: 200, title: '风险作业', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'masterJoinByEnterpriseId', width: 150, title: '负责人', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'phoneJoinByEnterpriseId', width: 150, title: '联系电话', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'checkType', width: 150, title: '检查类型', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
if(rowData == 1) {
|
|
||||||
return '检查';
|
|
||||||
} else if(rowData == 2) {
|
} else if(rowData == 2) {
|
||||||
return '复查';
|
checkType = '【复查】';
|
||||||
}
|
}
|
||||||
return '无';
|
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: 'isCoordination', width: 100, title: '是否配合', align:'center',
|
{field:'col5', width: 120, title: '操作', align: 'center',
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null) {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
if(rowData == 1) {
|
|
||||||
return '配合'
|
|
||||||
}
|
|
||||||
return '不配合';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'isComplete', width: 100, title: '是否完成', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null) {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
if(rowData == 1) {
|
|
||||||
return '完成'
|
|
||||||
}
|
|
||||||
return '未完成';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'updateCheckMine', width: 110, title: '检查结果', fixed:'right', align:'center',
|
|
||||||
templet: function(row) {
|
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) {
|
if(row.isCoordination != 1) {
|
||||||
return '不配合';
|
isCoordinationBtn = '不配合';
|
||||||
}
|
}
|
||||||
return '<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="getCheckMineEvent"><i class="fa fa-lg fa-search"></i> 检查项</button>';
|
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 +'"><i class="fa fa-map-marker"></i> 查看检查位置</div></td></tr>';
|
||||||
|
}
|
||||||
|
infoDiv += '</table>';
|
||||||
|
return infoDiv;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]],
|
]],
|
||||||
@ -328,6 +319,10 @@
|
|||||||
reloadTable();
|
reloadTable();
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
// 60s自动刷新
|
||||||
|
setInterval(function() {
|
||||||
|
reloadTable();
|
||||||
|
}, 60000);
|
||||||
// 事件 - 搜索
|
// 事件 - 搜索
|
||||||
$(document).on('click', '#search', function() {
|
$(document).on('click', '#search', function() {
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
@ -385,17 +380,35 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
table.on('tool(dataTable)', function(obj) {
|
$(document).on('click', '.check-detail', function() {
|
||||||
var layEvent = obj.event;
|
var checkId = this.dataset.checkid;
|
||||||
var data = obj.data;
|
var nameJoinByEnterpriseId = this.dataset.name;
|
||||||
if(layEvent === 'getCheckMineEvent') {
|
top.dialog.open({
|
||||||
top.dialog.open({
|
url: top.restAjax.path('route/check/get-check-item.html?checkId={checkId}', [checkId]),
|
||||||
url: top.restAjax.path('route/check/get-check-item.html?checkId={checkId}', [data.checkId]),
|
title: '【'+ nameJoinByEnterpriseId + '】检、复查选项',
|
||||||
title: '【'+ data.nameJoinByEnterpriseId + '】检、复查选项',
|
width: '80%',
|
||||||
width: '80%',
|
height: '80%',
|
||||||
height: '80%',
|
onClose: function() {}
|
||||||
onClose: function() {}
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.enterprise-location', function() {
|
||||||
|
var lng = this.dataset.lng;
|
||||||
|
var lat = this.dataset.lat;
|
||||||
|
if(lng && lat) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
top.dialog.msg('暂无定位信息');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.check-location', function() {
|
||||||
|
var lng = this.dataset.lng;
|
||||||
|
var lat = this.dataset.lat;
|
||||||
|
if(lng && lat) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
top.dialog.msg('暂无检查定位信息');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user