Commit 8f0df404 by wuchengwu

日志信息管理页面编写添加新增、修改、删除功能

parent 7ef5263e
......@@ -2,20 +2,26 @@ package com.founder.controller;
import com.founder.khtj.domain.RstBean;
import com.founder.model.SysSystemlogs;
import com.founder.model.SysWhgl;
import com.founder.model.User;
import com.founder.module.redis.service.IDicItemService;
import com.founder.service.ISysLogSystemService;
import com.founder.service.SequenceService;
import com.founder.utils.DateUtil;
import com.founder.utils.EasyUIPage;
import com.founder.utils.SysUitl;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
......@@ -23,6 +29,7 @@ import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Controller
......@@ -36,6 +43,9 @@ public class RzglController {
@Autowired
private ISysLogSystemService sysLogSystemService;
@Resource
private SequenceService sequenceService;
@RequestMapping("/toRzgl")
public ModelAndView toRzgl(ModelAndView model, HttpServletRequest request,HttpServletResponse response,String ifFirst) {
User user = (User)request.getSession().getAttribute("User");
......@@ -75,6 +85,89 @@ public class RzglController {
return model;
}
@RequestMapping("/toAddRzgl")
public String toAddRzgl(Model model, HttpServletRequest request) {
String ips = "";
try {
ips = SysUitl.getIp(request);
} catch (Exception e) {
e.printStackTrace();
}
User user = (User) request.getSession().getAttribute("User");
String xxzjbh = sequenceService.getNextSerialNo("SYS_LOG_SYSTEM", user.getUnitcode(), user);
SysSystemlogs sysLogSystem = sysLogSystemService.getSysLogSystem(xxzjbh);
//String mac = SysUitl.getMac(ips);
model.addAttribute("username", user.getUsername());
model.addAttribute("unitcode", user.getUnitcode());
model.addAttribute("sysLogs", sysLogSystem);
model.addAttribute("user", user);
return "rzcx/addRzcx";
}
@RequestMapping("/doAddsysLogs")
public String doAddsysLogs(SysSystemlogs sysSystemlogs, String rzsjStr, String yhdwdm, String yhxm, String rznr, Model model, HttpServletRequest request) {
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String formatDate = sf.format(new Date());
User user = (User) request.getSession().getAttribute("User");
String xxzjbh = sequenceService.getNextSerialNo("SYS_LOG_SYSTEM", user.getUnitcode(), user);
sysSystemlogs.setXxzjbh(xxzjbh);
sysSystemlogs.setYhdwdm(yhdwdm);
sysSystemlogs.setYhxm(yhxm);
sysSystemlogs.setRznr(rznr);
sysSystemlogs.setRzsjStr(rzsjStr);
sysLogSystemService.saveSysLogSystem(sysSystemlogs);
SysSystemlogs sysLogSystem = sysLogSystemService.getSysLogSystem(xxzjbh);
model.addAttribute("username", user.getUsername());
model.addAttribute("unitcode", user.getUnitcode());
model.addAttribute("user", user);
model.addAttribute("sysLogs", sysLogSystem);
return "rzcx/addRzcx.html";
}
@RequestMapping("/toEditRzgl")
public String toEditRzgl(String xxzjbh, Model model, HttpServletRequest request) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
User user = (User) request.getSession().getAttribute("User");
model.addAttribute("username", user.getUsername());
model.addAttribute("unitcode", user.getUnitcode());
model.addAttribute("user", user);
if (xxzjbh == null || "".equals(xxzjbh)) {
SysSystemlogs sysSystemlogs = new SysSystemlogs();
model.addAttribute("sysLogs", sysSystemlogs);
} else {
SysSystemlogs sysSystemlogs = sysLogSystemService.getSysLogSystem(xxzjbh);
model.addAttribute("sysLogs", sysSystemlogs);
}
String ips = "";
try {
ips = SysUitl.getIp(request);
} catch (Exception e) {
e.printStackTrace();
}
model.addAttribute("clent", ips);
return "rzcx/addRzcx";
}
@RequestMapping("/doEditsysLogs")
public String doEditWhgl(SysSystemlogs sysSystemlogs, String yhdwdm, String yhxm, String rznr, Model model, HttpServletRequest request) {
User user = (User) request.getSession().getAttribute("User");
sysSystemlogs.setYhdwdm(yhdwdm);
sysSystemlogs.setYhxm(yhxm);
sysSystemlogs.setRznr(rznr);
// sysSystemlogs.setRzsjStr(rzsj);
sysLogSystemService.updateSysLogSystem(sysSystemlogs);
SysSystemlogs sysLogSystem = sysLogSystemService.getSysLogSystem(sysSystemlogs.getXxzjbh());
model.addAttribute("username", user.getUsername());
model.addAttribute("unitcode", user.getUnitcode());
model.addAttribute("user", user);
model.addAttribute("sysLogs", sysLogSystem);
return "rzcx/addRzcx.html";
}
@RequestMapping("/queryRzcxList")
@ResponseBody
public EasyUIPage queryRzcxList(@ModelAttribute SysSystemlogs sysSystemlogs,
......@@ -84,6 +177,13 @@ public class RzglController {
return easyUIPage;
}
@RequestMapping("/deleteRzgl")
@ResponseBody
public boolean deleteRzgl(Model model, String xxzjbh) {
boolean bool = sysLogSystemService.deleteSysRzgl(xxzjbh);
return bool;
}
public String getTjdw(String tjdw,String unitgrade){
String result = "";
if (tjdw == null || "".equals(tjdw)) {
......
......@@ -10,9 +10,16 @@ import java.util.Map;
@Component
@Mapper
public interface SysLogSystemDao {
public Integer querySysLogSystemPageCount(Map<String, Object> map);
public List<SysSystemlogs> querySysLogSystemPageList(Map<String, Object> map);
Integer querySysLogSystemPageCount(Map<String, Object> map);
List<SysSystemlogs> querySysLogSystemPageList(Map<String, Object> map);
Boolean insertSysLogSystem(SysSystemlogs entity);
Boolean updateSysLogSystem(SysSystemlogs entity);
List<SysSystemlogs> getSysLogSystem(SysSystemlogs sysSystemlogs);
List<SysSystemlogs> getSysLogSystem(Map<String, Object> map);
/**
* 日志管理删除
* @param xxzjbh
* @return
*/
boolean deleteSysRzgl(String xxzjbh);
}
......@@ -6,7 +6,7 @@ public class SysSystemlogs extends PageBean{
private String xxzjbh;
private Date rzsj;
private String rzsj;
private Date maxrzsj; //统计时间的截止日期
private Date minrzsj; //统计时间的起始日期
......@@ -47,11 +47,11 @@ public class SysSystemlogs extends PageBean{
this.xxzjbh = xxzjbh;
}
public Date getRzsj() {
public String getRzsj() {
return rzsj;
}
public void setRzsj(Date rzsj) {
public void setRzsj(String rzsj) {
this.rzsj = rzsj;
}
......
......@@ -25,8 +25,15 @@ public interface ISysLogSystemService {
/**
* 查询系统日志
* @param sysLogSystem
* @param xxzjbh
* @return
*/
SysSystemlogs getSysLogSystem(String xxzjbh );
/**
* 日志管理删除
* @param xxzjbh
* @return
*/
List<SysSystemlogs> getSysLogSystem(SysSystemlogs sysLogSystem);
boolean deleteSysRzgl(String xxzjbh);
}
......@@ -88,7 +88,19 @@ public class SysLogSystemServiceImpl implements ISysLogSystemService {
return b;
}
@Override
public List<SysSystemlogs> getSysLogSystem(SysSystemlogs entity){
return sysLogSystemDao.getSysLogSystem(entity);
public SysSystemlogs getSysLogSystem(String xxzjbh){
SysSystemlogs sysSystemlogs = new SysSystemlogs();
Map<String, Object> map = new HashMap<>();
map.put("xxzjbh", xxzjbh);
List<SysSystemlogs> sysLogSystem = sysLogSystemDao.getSysLogSystem(map);
if(sysLogSystem!=null&&sysLogSystem.size()>0){
sysSystemlogs = sysLogSystem.get(0);
}
return sysSystemlogs;
}
@Override
public boolean deleteSysRzgl(String xxzjbh) {
return sysLogSystemDao.deleteSysRzgl(xxzjbh);
}
}
......@@ -17,7 +17,7 @@ mybatis.mapperLocations=classpath:mapper/*.xml
#协同数据源配置
spring.datasource.xzxtdb.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
spring.datasource.xzxtdb.url=jdbc:oracle:thin:@47.92.129.99:1600:orcl
spring.datasource.xzxtdb.username=XZXT
spring.datasource.xzxtdb.password=XZXT
spring.datasource.xzxtdb.driver-class-name=oracle.jdbc.driver.OracleDriver
......@@ -60,21 +60,21 @@ spring.datasource.stamsisajzwdb.password=WSZZPT
spring.datasource.stamsisajzwdb.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.stamsisajzwdb.type: com.alibaba.druid.pool.DruidDataSource
#警综数据源配置(山西使用)
spring.datasource.jwzhdb.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
spring.datasource.jwzhdb.url=jdbc:oracle:thin:@47.92.129.99:1600:ORCL
spring.datasource.jwzhdb.username=XZXT
spring.datasource.jwzhdb.password=XZXT
spring.datasource.jwzhdb.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.jwzhdb.type: com.alibaba.druid.pool.DruidDataSource
#在逃数据源配置
spring.datasource.ztrydb.url=jdbc:oracle:thin:127.0.0.1:1521:ORCL
spring.datasource.ztrydb.url=jdbc:oracle:thin:47.92.129.99:1600:ORCL
spring.datasource.ztrydb.username=XZXT
spring.datasource.ztrydb.password=XZXT
spring.datasource.ztrydb.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.ztrydb.type: com.alibaba.druid.pool.DruidDataSource
#海南刑专数据源配置
spring.datasource.hnxzxtdb.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
spring.datasource.hnxzxtdb.url=jdbc:oracle:thin:@47.92.129.99:1600:ORCL
spring.datasource.hnxzxtdb.username=XZXT
spring.datasource.hnxzxtdb.password=XZXT
spring.datasource.hnxzxtdb.driver-class-name=oracle.jdbc.driver.OracleDriver
......
......@@ -2,36 +2,53 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.founder.dao.SysLogSystemDao">
<resultMap id="BaseMap" type="com.founder.model.SysSystemlogs">
<result column="XXZJBH" property="xxzjbh" jdbcType="VARCHAR"/>
<result column="RZSJ" property="rzsj" jdbcType="VARCHAR"/>
<result column="YHJH" property="yhjh" jdbcType="VARCHAR"/>
<result column="YHXM" property="yhxm" jdbcType="VARCHAR"/>
<result column="YHIDNUM" property="yhidnum" jdbcType="VARCHAR"/>
<result column="RZNR" property="rznr" jdbcType="VARCHAR"/>
<result column="YHDWDM" property="yhdwdm" jdbcType="VARCHAR"/>
<result column="YHDWMC" property="yhdwmc" jdbcType="VARCHAR"/>
<result column="SJB" property="sjb" jdbcType="VARCHAR"/>
<result column="SJZJ1" property="sjzj1" jdbcType="VARCHAR"/>
<result column="SJZJ2" property="sjzj2" jdbcType="VARCHAR"/>
<result column="CZGJC" property="czgjc" jdbcType="VARCHAR"/>
<result column="CXDW" property="cxdw" jdbcType="VARCHAR"/>
<result column="SCBZ" property="scbz" jdbcType="VARCHAR"/>
</resultMap>
<insert id="insertSysLogSystem" parameterType="com.founder.model.SysSystemlogs">
insert into SYS_LOG_SYSTEM (
RYBH,
XM,
GMSFHM,
WCJX,
WCJSM,
ZPSJ0,
ZPSJ1,
ZPSJ2,
ZPSJ3,
XXDJDW_GAJGJGDM,
XXDJRY_XM,
DJSJ,
GXSJ,
XXSC_PDBZ
XXZJBH,
RZSJ,
YHJH,
YHXM,
YHIDNUM,
RZNR,
YHDWDM,
YHDWMC,
SJB,
SJZJ1,
SJZJ2,
CZGJC,
CXDW,
SCBZ
) values (
#{rybh ,jdbcType=VARCHAR},
#{xm ,jdbcType=VARCHAR},
#{gmsfhm ,jdbcType=VARCHAR},
#{wcjx ,jdbcType=VARCHAR},
#{wcjsm ,jdbcType=VARCHAR},
#{zpsj0 ,jdbcType=VARCHAR},
#{zpsj1 ,jdbcType=VARCHAR},
#{zpsj2 ,jdbcType=VARCHAR},
#{zpsj3 ,jdbcType=VARCHAR},
#{lrr,jdbcType=VARCHAR},
#{lrdwdm,jdbcType=VARCHAR},
sysdate,
sysdate,
#{xxzjbh , jdbcType=VARCHAR },
to_date(#{rzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd'),
#{yhjh , jdbcType=VARCHAR },
#{yhxm , jdbcType=VARCHAR },
#{yhidnum , jdbcType=VARCHAR },
#{rznr , jdbcType=VARCHAR },
#{yhdwdm , jdbcType=VARCHAR },
(select name from sys_dictitem s where s.groupid='CODE_UNIT' and s.code = #{yhdwdm , jdbcType=VARCHAR }) ,
#{sjb , jdbcType=VARCHAR },
#{sjzj1 , jdbcType=VARCHAR },
#{sjzj2 , jdbcType=VARCHAR },
#{czgjc , jdbcType=VARCHAR },
#{cxdw , jdbcType=VARCHAR },
'0'
)
......@@ -39,40 +56,45 @@
<update id="updateSysLogSystem" parameterType="com.founder.model.SysSystemlogs">
update SYS_LOG_SYSTEM SET
<if test="xm != null and xm != ''">XM=#{xm , jdbcType=VARCHAR },</if>
<if test="xm == null or xm == ''">XM=NULL, </if>
<if test="gmsfhm != null and gmsfhm != ''">GMSFHM= #{gmsfhm , jdbcType=VARCHAR },</if>
<if test="gmsfhm == null or gmsfhm == ''">GMSFHM=NULL, </if>
<if test="wcjx != null and wcjx != ''">WCJX= #{wcjx , jdbcType=VARCHAR },</if>
<if test="wcjx == null or wcjx == ''">WCJX=NULL, </if>
<if test="wcjsm != null and wcjsm != ''">WCJSM= #{wcjsm , jdbcType=VARCHAR },</if>
<if test="wcjsm == null or wcjsm == ''">WCJSM=NULL, </if>
<if test="zpsj0 != null and zpsj0 != ''">ZPSJ0= #{zpsj0 , jdbcType=VARCHAR },</if>
<if test="zpsj0 == null or zpsj0 == ''">ZPSJ0=NULL, </if>
<if test="zpsj1 != null and zpsj1 != ''">ZPSJ1= #{zpsj1 , jdbcType=VARCHAR },</if>
<if test="zpsj1 == null or zpsj1 == ''">ZPSJ1=NULL, </if>
<if test="zpsj2 != null and zpsj2 != ''">ZPSJ2= #{zpsj2 , jdbcType=VARCHAR },</if>
<if test="zpsj2 == null or zpsj2 == ''">ZPSJ2=NULL, </if>
<if test="zpsj3 != null and zpsj3 != ''">ZPSJ3= #{zpsj3 , jdbcType=VARCHAR },</if>
<if test="zpsj3 == null or zpsj3 == ''">ZPSJ3=NULL, </if>
XXCZDW_GAJGJGDM = #{gxdwdm,jdbcType=VARCHAR},
XXCZRY_XM = #{gxr,jdbcType=VARCHAR},
GXSJ = sysdate
WHERE RYBH = #{rybh, jdbcType=VARCHAR }
RZSJ = to_date(#{rzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd'),
YHJH = #{yhjh , jdbcType=VARCHAR },
YHXM = #{yhxm , jdbcType=VARCHAR },
YHIDNUM = #{yhidnum , jdbcType=VARCHAR },
RZNR = #{rznr , jdbcType=VARCHAR },
YHDWDM = #{yhdwdm , jdbcType=VARCHAR },
YHDWMC = (select name from sys_dictitem s where s.groupid='CODE_UNIT' and s.code = #{yhdwdm , jdbcType=VARCHAR }),
SJB = #{sjb , jdbcType=VARCHAR },
SJZJ1 = #{sjzj1 , jdbcType=VARCHAR },
SJZJ2 = #{sjzj2 , jdbcType=VARCHAR },
CZGJC = #{czgjc , jdbcType=VARCHAR },
CXDW = #{cxdw , jdbcType=VARCHAR }
WHERE XXZJBH = #{xxzjbh , jdbcType=VARCHAR }
</update>
<select id="getSysLogSystem" parameterType="com.founder.model.SysSystemlogs" resultType="com.founder.model.SysSystemlogs">
select * from SYS_LOG_SYSTEM where (SCBZ='0' or SCBZ is null) and YHDWDM = #{yhdwdm, jdbcType=VARCHAR }
<select id="getSysLogSystem" parameterType="map"
resultType="com.founder.model.SysSystemlogs">
select * from SYS_LOG_SYSTEM where (SCBZ='0' or SCBZ is null) and XXZJBH = #{xxzjbh , jdbcType=VARCHAR }
</select>
<select id="querySysLogSystemPageCount" resultType="int" parameterType="map">
select count(1) from SYS_LOG_SYSTEM wp where (SCBZ='0' or SCBZ is null)
<if test="entity.minrzsjStr != null and entity.minrzsjStr != ''"> AND RZSJ <![CDATA[>=]]> to_date(#{entity.minrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd') </if>
<if test="entity.maxrzsjStr != null and entity.maxrzsjStr != ''"> AND RZSJ <![CDATA[<]]> to_date(#{entity.maxrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')+1 </if>
<if test="entity.yhdwdm != null and entity.yhdwdm != ''"> AND YHDWDM like #{entity.yhdwdm , jdbcType=VARCHAR }||'%' </if>
<if test="entity.cxdw != null and entity.cxdw != ''"> AND YHDWDM like #{entity.cxdw , jdbcType=VARCHAR }||'%' </if>
<if test="entity.minrzsjStr != null and entity.minrzsjStr != ''">AND RZSJ <![CDATA[>=]]>
to_date(#{entity.minrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')
</if>
<if test="entity.maxrzsjStr != null and entity.maxrzsjStr != ''">AND RZSJ <![CDATA[<]]>
to_date(#{entity.maxrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')+1
</if>
<if test="entity.yhdwdm != null and entity.yhdwdm != ''">AND YHDWDM like
#{entity.yhdwdm , jdbcType=VARCHAR }||'%'
</if>
<if test="entity.cxdw != null and entity.cxdw != ''">AND YHDWDM = #{entity.cxdw , jdbcType=VARCHAR }
</if>
</select>
<update id="deleteSysRzgl" parameterType="java.lang.String">
UPDATE SYS_LOG_SYSTEM SET SCBZ='1' where XXZJBH = #{xxzjbh , jdbcType=VARCHAR }
</update>
<select id="querySysLogSystemPageList" resultType="com.founder.model.SysSystemlogs" parameterType="map">
<![CDATA[SELECT t.* FROM (
SELECT a.* , rownum r FROM (]]>
......@@ -80,10 +102,17 @@
wp.*,
to_char(wp.RZSJ,'YYYY-MM-DD HH24:MI:SS') as rzsjStr
from SYS_LOG_SYSTEM wp where (SCBZ='0' or SCBZ is null)
<if test="entity.minrzsjStr != null and entity.minrzsjStr != ''"> AND RZSJ <![CDATA[>=]]> to_date(#{entity.minrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd') </if>
<if test="entity.maxrzsjStr != null and entity.maxrzsjStr != ''"> AND RZSJ <![CDATA[<]]> to_date(#{entity.maxrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')+1 </if>
<if test="entity.yhdwdm != null and entity.yhdwdm != ''"> AND YHDWDM like #{entity.yhdwdm , jdbcType=VARCHAR }||'%' </if>
<if test="entity.cxdw != null and entity.cxdw != ''"> AND YHDWDM like #{entity.cxdw , jdbcType=VARCHAR }||'%' </if>
<if test="entity.minrzsjStr != null and entity.minrzsjStr != ''">AND RZSJ <![CDATA[>=]]>
to_date(#{entity.minrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')
</if>
<if test="entity.maxrzsjStr != null and entity.maxrzsjStr != ''">AND RZSJ <![CDATA[<]]>
to_date(#{entity.maxrzsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')+1
</if>
<if test="entity.yhdwdm != null and entity.yhdwdm != ''">AND YHDWDM like
#{entity.yhdwdm , jdbcType=VARCHAR }||'%'
</if>
<if test="entity.cxdw != null and entity.cxdw != ''">AND YHDWDM = #{entity.cxdw , jdbcType=VARCHAR }
</if>
<![CDATA[ order by ${sort} ${order} ) a
WHERE ROWNUM <= #{ end } ) t
WHERE r > #{ begin } ]]>
......
......@@ -178,6 +178,9 @@
<li id="H10E03">
<a onclick="cjsq()">采集授权申请</a>
</li>
<li id="H10E04">
<a onclick="toWhgl()">维护管理</a>
</li>
</ul>
</div>
</div>
......@@ -378,6 +381,10 @@
window.open("/toRzgl?isfirst=1",'_blank');
}
function toWhgl(){
window.open("/toWhgl?isfirst=1",'_blank');
}
function toSjcjtj(){
window.open("/toSjtj?isfirst=1",'_blank');
}
......
......@@ -630,7 +630,7 @@
$(".zwwc").show();
}
function avalidate(){
alert($("#hjdzDzmc").val())
if($("#xm").val()==null||$("#xm").val()==""){
$.messager.alert( '提示',"姓名不能为空!");
return -1;
......
......@@ -64,6 +64,7 @@
<a href="javascript:doQuery();" class="btn_cx">查询</a>
<a href="javascript:doClear();" class="btn_qkcxtj">清空</a>
<!--<a href="javascript:doExportExcel();" class="btn btn_dc">导出</a>-->
<a href="javascript:addpage();" class="btn_dc">新增</a>
</td>
</tr>
</table>
......@@ -87,7 +88,7 @@
<!--<script type="text/javascript" src="static/ajgl/js/jquery.easyui.min.js"></script>-->
<script type="text/javascript" src="static/xtba/zljc/js/zljc.js"></script>
<script type="text/javascript" th:inline="none">
openCombotree('yhdwdm');
// openCombotree('yhdwdm');
window.onload = function () {
$("#yhdwdm").combotree("setValue",$("#yhdwdmStr").val());
$("#minrzsjStr").datebox("setValue",$("#minrzsj").val());
......@@ -121,10 +122,31 @@
})
return o;
}
//新增
function addpage() {
window.open("/toAddRzgl");
}
function doQuery(){
$('#rzxxTable').datagrid({
url: "queryRzcxList",
columns : [[
{title: "日志编号", field: "xxzjbh", align: 'left', width: 120, hidden: true},
{
title: "操作",
field: "scbz",
align: 'center',
color: 'gree',
width: 110,
formatter: function (val, row, index) {
var xxzjbh = row.xxzjbh;
var yhdwmc = row.yhdwmc;
var yhxm = row.yhxm;
return "<a href='javascript:void(0)' class='easyui-linkbutton zdy-btn l-btn l-btn-small' onclick=\"modify('" + xxzjbh + "')\">修改</a>" +
"<a href='javascript:void(0)' onclick=\"deleteRzgl('" + xxzjbh + "','" + yhdwmc + "','" + yhxm + "')\" class='easyui-linkbutton zdy-btn l-btn l-btn-small' >删除</a>";
}
},
{title:"日志时间",field:"rzsjStr",align:'left',width:150},
{title:"日志内容",field:"rznr",align:'left',width:250},
{title:"日志单位",field:"yhdwmc",align:'left',width:150},
......@@ -148,8 +170,37 @@
}
});
}
//修改
function modify(xxzjbh) {
window.open("/toEditRzgl?xxzjbh=" + xxzjbh);
}
//删除
function deleteRzgl(xxzjbh, yhdwmc, yhxm) {
$.messager.confirm('信息删除', '确定要删除日志单位为:' + yhdwmc + ',日志用户为:' + yhxm + ' 的日志信息?', function (r) {
if (r) {
$.ajax({
url: "/deleteRzgl?xxzjbh=" + xxzjbh,
type: "POST",
success: function (data) {
if (data) {
$.messager.alert('提示', "日志删除成功!", '', function (r) {
doQuery();
});
} else {
$.messager.alert('提示', "日志删除失败!");
}
}
});
}
});
}
function doClear(){
$("form[name='rzxxForm']") .find("input").val('');
doQuery();
}
//格式化字典
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment