From 88193bd0a834ba55e7e6bec6dc55ac38cecf3d7d Mon Sep 17 00:00:00 2001
From: ly19960718 <1622779752@qq.com>
Date: Thu, 15 Apr 2021 14:43:16 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=BA=93=E6=96=B0=E5=A2=9Ewe?=
=?UTF-8?q?b=E9=A1=B5=E9=9D=A2=E6=A0=91=E5=BD=A2=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dtos/indexgeneral/IndexGeneralDTO.java | 21 ++
.../indexGeneral/indexGeneral-mapper.xml | 21 +-
.../static/route/indexGeneral/list.html | 118 +++++-
.../static/route/indexGeneral/show.html | 341 ++++++++++++++++++
.../static/route/indexGeneral/update.html | 10 +-
5 files changed, 491 insertions(+), 20 deletions(-)
create mode 100644 src/main/resources/static/route/indexGeneral/show.html
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 @@
+
+
+