diff --git a/src/main/java/com/tenlion/twoduty/pojo/dtos/indexgeneral/IndexGeneralDTO.java b/src/main/java/com/tenlion/twoduty/pojo/dtos/indexgeneral/IndexGeneralDTO.java index edd1618..82c0fdf 100644 --- a/src/main/java/com/tenlion/twoduty/pojo/dtos/indexgeneral/IndexGeneralDTO.java +++ b/src/main/java/com/tenlion/twoduty/pojo/dtos/indexgeneral/IndexGeneralDTO.java @@ -30,6 +30,11 @@ public class IndexGeneralDTO { private String indexGeneralImage; @ApiModelProperty(name = "auditStatus", value = "审核状态") private Integer auditStatus; + @ApiModelProperty(name = "gmtCreate", value = "创建时间") + private String gmtCreate; + @ApiModelProperty(name = "creatorName", value = "创建人") + private String creatorName; + public String getIndexGeneralId() { return indexGeneralId == null ? "" : indexGeneralId.trim(); @@ -95,4 +100,20 @@ public class IndexGeneralDTO { public void setAuditStatus(Integer auditStatus) { this.auditStatus = auditStatus; } + + public String getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getCreatorName() { + return creatorName; + } + + public void setCreatorName(String creatorName) { + this.creatorName = creatorName; + } } diff --git a/src/main/resources/mybatis/mapper/indexGeneral/indexGeneral-mapper.xml b/src/main/resources/mybatis/mapper/indexGeneral/indexGeneral-mapper.xml index a662d75..64fe058 100644 --- a/src/main/resources/mybatis/mapper/indexGeneral/indexGeneral-mapper.xml +++ b/src/main/resources/mybatis/mapper/indexGeneral/indexGeneral-mapper.xml @@ -5,11 +5,14 @@ + + + @@ -139,9 +142,14 @@ t1.index_general_file, t1.index_general_image, t1.audit_status, - t1.index_general_id + t1.index_general_id, + t1.gmt_create, + t1.creator, + t2.index_lib_name FROM duty_index_general t1 + LEFT JOIN duty_index_lib t2 + ON t1.index_lib_id = t2.index_lib_id WHERE t1.is_delete = 0 @@ -209,15 +217,19 @@ t1.index_general_content, t1.index_general_file, t1.index_general_image, - t1.audit_status + t1.audit_status, + t1.gmt_create, + t1.creator, + t2.index_lib_name FROM duty_index_general t1 + LEFT JOIN duty_index_lib t2 + ON t1.index_lib_id = t2.index_lib_id WHERE t1.is_delete = 0 AND ( - - t1.id LIKE CONCAT('%', #{keywords}, '%') + t1.index_general_title LIKE CONCAT('%', #{keywords}, '%') ) @@ -241,6 +253,7 @@ AND t1.audit_status = #{auditStatus} + ORDER BY t1.gmt_create DESC diff --git a/src/main/resources/static/route/indexGeneral/list.html b/src/main/resources/static/route/indexGeneral/list.html index 5b995d4..4b43057 100644 --- a/src/main/resources/static/route/indexGeneral/list.html +++ b/src/main/resources/static/route/indexGeneral/list.html @@ -26,6 +26,15 @@
+
+ +
@@ -72,8 +81,17 @@ }, cols: [ [ - {type:'checkbox', fixed: 'left'}, + /*{type:'checkbox', fixed: 'left'},*/ {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, + {field: 'indexLibName', width: 250, title: '指标名称', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, {field: 'indexGeneralTitle', width: 250, title: '上报标题', align:'center', templet: function(row) { var rowData = row[this.field]; @@ -126,6 +144,24 @@ return downloadFile; } }, + {field: 'creatorName', width: 100, title: '上报人', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + {field: 'gmtCreate', width: 200, title: '上报时间', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, {field: 'auditStatus', width: 100, title: '状态', align:'center',fixed: 'right', templet: function(row) { var rowData = row[this.field]; @@ -146,11 +182,14 @@ }, {field: 'cz', width: 200, title: '操作', align:'center',fixed: 'right', templet: function(row) { - var rowData = '
' + - '' + - '' + - '' + - '
'; + var auditStatus = row['auditStatus']; + var rowData = '
'; + rowData +=''; + if (auditStatus === -1) { + rowData +=''; + } + rowData +='' + rowData +='
'; return rowData; } } @@ -170,11 +209,12 @@ // 重载表格 function reloadTable(currentPage) { table.reload('dataTable', { - url: top.restAjax.path(tableUrl, []), + url: top.restAjax.path(tableUrl, [indexLibId]), where: { keywords: $('#keywords').val(), startTime: $('#startTime').val(), - endTime: $('#endTime').val() + endTime: $('#endTime').val(), + auditStatus: $('#auditStatus').val() }, page: { curr: currentPage @@ -281,6 +321,68 @@ } } }); + + + + table.on('tool(dataTable)', function(obj) { + var layEvent = obj.event; + var data = obj.data; + if(layEvent === 'show') { + layer.open({ + type: 2, + title: false, + closeBtn: 0, + area: ['100%', '100%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/indexGeneral/show.html?indexGeneralId={indexGeneralId}', [data.indexGeneralId]), + end: function() { + reloadTable(); + } + }); + } else if(layEvent === 'update') { + layer.open({ + type: 2, + title: false, + closeBtn: 0, + area: ['100%', '100%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('route/indexgeneral/update.html?indexGeneralId={indexGeneralId}', [data.indexGeneralId]), + end: function() { + reloadTable(); + } + }); + } else if (layEvent === 'audithistory') { + layer.open({ + type: 2, + title: false, + closeBtn: 0, + area: ['100%', '100%'], + shadeClose: true, + anim: 2, + content: top.restAjax.path('', [data.indexGeneralId]), + 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['indexGeneralId']; + // } + // removeData(ids); + // } + // } + }); + }); diff --git a/src/main/resources/static/route/indexGeneral/show.html b/src/main/resources/static/route/indexGeneral/show.html new file mode 100644 index 0000000..6c8c6f7 --- /dev/null +++ b/src/main/resources/static/route/indexGeneral/show.html @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/indexGeneral/update.html b/src/main/resources/static/route/indexGeneral/update.html index 622b5e5..d7bab59 100644 --- a/src/main/resources/static/route/indexGeneral/update.html +++ b/src/main/resources/static/route/indexGeneral/update.html @@ -25,8 +25,8 @@
- - + +
@@ -122,12 +122,6 @@
-
- -
- -
-