修改样式

This commit is contained in:
wenc000 2020-05-21 19:30:49 +08:00
parent b5670cc007
commit 4c30a1cd21
4 changed files with 239 additions and 164 deletions

View 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();
}
}

View File

@ -55,6 +55,10 @@ public class CheckDTO {
private String masterJoinByEnterpriseId;
@ApiModelProperty(name = "phoneJoinByEnterpriseId", value = "企业ID的联系电话")
private String phoneJoinByEnterpriseId;
@ApiModelProperty(name = "enterpriseLngByEnterpriseId", value = "企业经度")
private String enterpriseLngByEnterpriseId;
@ApiModelProperty(name = "enterpriseLatByEnterpriseId", value = "企业纬度")
private String enterpriseLatByEnterpriseId;
@ApiModelProperty(name = "checkType", value = "检查类型")
private Integer checkType;
@ApiModelProperty(name = "taskCheckId", value = "任务检查ID")
@ -224,6 +228,23 @@ public class CheckDTO {
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() {
return checkType;
}
@ -326,46 +347,50 @@ public class CheckDTO {
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"checkId\":")
.append("\"").append(checkId).append("\"");
sb.append(",\"enterpriseId\":")
.append("\"").append(enterpriseId).append("\"");
sb.append(",\"nameJoinByEnterpriseId\":")
.append("\"").append(nameJoinByEnterpriseId).append("\"");
sb.append(",\"typeJoinByEnterpriseId\":")
.append("\"").append(typeJoinByEnterpriseId).append("\"");
sb.append(",\"typeDictionaryName\":")
.append("\"").append(typeDictionaryName).append("\"");
sb.append(",\"area1JoinByEnterpriseId\":")
.append("\"").append(area1JoinByEnterpriseId).append("\"");
sb.append(",\"area2JoinByEnterpriseId\":")
.append("\"").append(area2JoinByEnterpriseId).append("\"");
sb.append(",\"area3JoinByEnterpriseId\":")
.append("\"").append(area3JoinByEnterpriseId).append("\"");
sb.append(",\"area4JoinByEnterpriseId\":")
.append("\"").append(area4JoinByEnterpriseId).append("\"");
sb.append(",\"area5JoinByEnterpriseId\":")
.append("\"").append(area5JoinByEnterpriseId).append("\"");
sb.append(",\"addressJoinByEnterpriseId\":")
.append("\"").append(addressJoinByEnterpriseId).append("\"");
sb.append(",\"industryJoinByEnterpriseId\":")
.append("\"").append(industryJoinByEnterpriseId).append("\"");
sb.append(",\"industryDictionaryName\":")
.append("\"").append(industryDictionaryName).append("\"");
sb.append(",\"engagedCountJoinByEnterpriseId\":")
.append("\"").append(engagedCountJoinByEnterpriseId).append("\"");
sb.append(",\"riskOperationJoinByEnterpriseId\":")
.append("\"").append(riskOperationJoinByEnterpriseId).append("\"");
sb.append(",\"riskOperationDictionaryName\":")
.append("\"").append(riskOperationDictionaryName).append("\"");
sb.append(",\"masterJoinByEnterpriseId\":")
.append("\"").append(masterJoinByEnterpriseId).append("\"");
sb.append(",\"phoneJoinByEnterpriseId\":")
.append("\"").append(phoneJoinByEnterpriseId).append("\"");
sb.append("\"checkId\":\"")
.append(checkId).append('\"');
sb.append(",\"enterpriseId\":\"")
.append(enterpriseId).append('\"');
sb.append(",\"nameJoinByEnterpriseId\":\"")
.append(nameJoinByEnterpriseId).append('\"');
sb.append(",\"typeJoinByEnterpriseId\":\"")
.append(typeJoinByEnterpriseId).append('\"');
sb.append(",\"typeDictionaryName\":\"")
.append(typeDictionaryName).append('\"');
sb.append(",\"area1JoinByEnterpriseId\":\"")
.append(area1JoinByEnterpriseId).append('\"');
sb.append(",\"area2JoinByEnterpriseId\":\"")
.append(area2JoinByEnterpriseId).append('\"');
sb.append(",\"area3JoinByEnterpriseId\":\"")
.append(area3JoinByEnterpriseId).append('\"');
sb.append(",\"area4JoinByEnterpriseId\":\"")
.append(area4JoinByEnterpriseId).append('\"');
sb.append(",\"area5JoinByEnterpriseId\":\"")
.append(area5JoinByEnterpriseId).append('\"');
sb.append(",\"addressJoinByEnterpriseId\":\"")
.append(addressJoinByEnterpriseId).append('\"');
sb.append(",\"industryJoinByEnterpriseId\":\"")
.append(industryJoinByEnterpriseId).append('\"');
sb.append(",\"industryDictionaryName\":\"")
.append(industryDictionaryName).append('\"');
sb.append(",\"engagedCountJoinByEnterpriseId\":\"")
.append(engagedCountJoinByEnterpriseId).append('\"');
sb.append(",\"riskOperationJoinByEnterpriseId\":\"")
.append(riskOperationJoinByEnterpriseId).append('\"');
sb.append(",\"riskOperationDictionaryName\":\"")
.append(riskOperationDictionaryName).append('\"');
sb.append(",\"masterJoinByEnterpriseId\":\"")
.append(masterJoinByEnterpriseId).append('\"');
sb.append(",\"phoneJoinByEnterpriseId\":\"")
.append(phoneJoinByEnterpriseId).append('\"');
sb.append(",\"enterpriseLngByEnterpriseId\":\"")
.append(enterpriseLngByEnterpriseId).append('\"');
sb.append(",\"enterpriseLatByEnterpriseId\":\"")
.append(enterpriseLatByEnterpriseId).append('\"');
sb.append(",\"checkType\":")
.append(checkType);
sb.append(",\"taskCheckId\":")
.append("\"").append(taskCheckId).append("\"");
sb.append(",\"taskCheckId\":\"")
.append(taskCheckId).append('\"');
sb.append(",\"isCoordination\":")
.append(isCoordination);
sb.append(",\"isComplete\":")
@ -376,14 +401,14 @@ public class CheckDTO {
.append(immediatelyChangeType);
sb.append(",\"rectificationDays\":")
.append(rectificationDays);
sb.append(",\"summary\":")
.append("\"").append(summary).append("\"");
sb.append(",\"checkLng\":")
.append("\"").append(checkLng).append("\"");
sb.append(",\"checkLat\":")
.append("\"").append(checkLat).append("\"");
sb.append(",\"gmtCreate\":")
.append("\"").append(gmtCreate).append("\"");
sb.append(",\"summary\":\"")
.append(summary).append('\"');
sb.append(",\"checkLng\":\"")
.append(checkLng).append('\"');
sb.append(",\"checkLat\":\"")
.append(checkLat).append('\"');
sb.append(",\"gmtCreate\":\"")
.append(gmtCreate).append('\"');
sb.append(",\"checkItems\":")
.append(checkItems);
sb.append('}');

View File

@ -21,6 +21,8 @@
<result column="risk_operation_dictionary_name" property="riskOperationDictionaryName"/>
<result column="master_join_by_enterprise_id" property="masterJoinByEnterpriseId"/>
<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="task_check_id" property="taskCheckId"/>
<result column="rectification_type" property="rectificationType"/>
@ -187,6 +189,8 @@
dt3.dictionary_name risk_operation_dictionary_name,
jt1.master master_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.task_check_id,
t1.is_coordination,

View File

@ -9,6 +9,51 @@
<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">
<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>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
@ -141,131 +186,77 @@
cols: [[
{type:'checkbox', fixed: 'left'},
{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) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
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">'+ 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: 'nameJoinByEnterpriseId', width: 200, title: '企业名称', align:'center',
{field:'col2', width: 400, title: '行业风险', align: 'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
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-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) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
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: 'addressJoinByEnterpriseId', width: 200, title: '详细地址', align:'center',
{field:'col4', width: 100, title: '状态', align: 'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
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 '检查';
var checkType = '【无检查类型】';
if(row.checkType == 1) {
checkType = '【检查】';
} 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',
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',
{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) {
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();
}, 500);
});
// 60s自动刷新
setInterval(function() {
reloadTable();
}, 60000);
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
@ -385,17 +380,35 @@
}
});
table.on('tool(dataTable)', function(obj) {
var layEvent = obj.event;
var data = obj.data;
if(layEvent === 'getCheckMineEvent') {
$(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}', [data.checkId]),
title: '【'+ data.nameJoinByEnterpriseId + '】检、复查选项',
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) {
} 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('暂无检查定位信息');
}
});
});