Browse Source

git-svn-id: https://192.168.57.71/svn/jsgkj@540 931142cf-59ea-a443-aa0e-51397b428577

ld_zhoutl 9 years ago
parent
commit
52ce947c31

+ 147 - 0
xtdsp/trunk/src/main/java/com/xt/dsp/common/TreeNode.java

@@ -0,0 +1,147 @@
+package com.xt.dsp.common;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * 树类
+ *
+ */
+public class TreeNode {
+
+    /**
+     * 树id
+     */
+    protected String id;
+
+    /**
+     * 树tid可存放code代码
+     */
+    protected String tId;
+
+    /**
+     * 树名称
+     */
+    protected String name;
+
+    /**
+     * 父节点
+     */
+    protected String   pId;
+
+    /**
+     * 是否父节点(父节点存在时,改字段可以不实用)
+     */
+    protected Long   isParent;
+
+    /**
+     * icon图标
+     */
+    protected String iconSkin;
+
+    /**
+     * 节点是否可以展开
+     */
+    protected String open;
+
+    protected String icon;
+    
+    /**
+     * 自定义属性
+     */
+    private Map<String, String> attributes   = new HashMap<String, String>();
+    
+    public String getIconSkin() {
+
+        return this.iconSkin;
+    }
+
+    public String getId() {
+
+        return this.id;
+    }
+
+    public Long getIsParent() {
+
+        return this.isParent;
+    }
+
+    public String getName() {
+
+        return this.name;
+    }
+
+    public String getOpen() {
+
+        return this.open;
+    }
+
+    public String getpId() {
+
+        return this.pId;
+    }
+
+    public String gettId() {
+
+        return this.tId;
+    }
+
+    public void setIconSkin(String iconSkin) {
+
+        this.iconSkin = iconSkin;
+    }
+
+    public void setId(String id) {
+
+        this.id = id;
+    }
+
+    public void setIsParent(Long isParent) {
+
+        this.isParent = isParent;
+    }
+
+    public void setName(String name) {
+
+        this.name = name;
+    }
+
+    public void setOpen(String open) {
+
+        this.open = open;
+    }
+
+    public void setpId(String pId) {
+
+        this.pId = pId;
+    }
+
+    public void settId(String tId) {
+
+        this.tId = tId;
+    }
+
+	public String getIcon() {
+		return icon;
+	}
+
+	public void setIcon(String icon) {
+		this.icon = icon;
+	}
+	
+	public void addAttribute(String name, String value) {
+
+        this.attributes.put(name, value);
+    }
+
+    public String getAttribute(String name) {
+
+        return this.attributes.get(name);
+    }
+
+    public Map<String, String> getAttributes() {
+
+        return this.attributes;
+    }
+}

+ 163 - 0
xtdsp/trunk/src/main/java/com/xt/dsp/controller/CodeCtl.java

@@ -0,0 +1,163 @@
+package com.xt.dsp.controller;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.h2.util.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.xt.dsp.common.TreeNode;
+import com.xt.dsp.common.util.CommonUtil;
+import com.xt.dsp.model.CodeBean;
+import com.xt.dsp.service.CodeService;
+import com.xt.dsp.vo.CodeVo;
+import com.yuanxd.tools.pagehelper.PageHelper;
+import com.yuanxd.tools.pagehelper.PageInfo;
+
+@Controller
+@RequestMapping("code")
+public class CodeCtl {
+	@Autowired
+	private CodeService codeService;
+
+	/**
+	 * 主画面
+	 * 
+	 * @return
+	 */
+	@RequestMapping("main")
+	public String main() {
+		return "sys/code/code";
+	}
+
+	/**
+	 * 初始化页面加载数据
+	 */
+	@RequestMapping("initCode")
+	@ResponseBody
+	public PageInfo<CodeBean> initCode(Model model, CodeVo vo) {
+		// 初始化参数
+		if (vo.getPage() < 1) {
+			vo.setPage(1);
+		}
+		if (vo.getRows() < 1) {
+			vo.setRows(1);
+		}
+		String pCode = vo.getpCode(); 
+		if (StringUtils.isNullOrEmpty(vo.getpCode())) {
+			pCode = "00";
+		}
+		PageHelper.startPage(vo.getPage(), vo.getRows());
+		List<CodeBean> list = codeService.selectByPCode(pCode);
+		PageInfo<CodeBean> pageResult = new PageInfo<>(list);
+		return pageResult;
+	}
+	
+	/**
+	 * 主画面
+	 * 
+	 * @return
+	 */
+	@RequestMapping("initTree")
+	@ResponseBody
+	public List<TreeNode> initTree() {
+		List<CodeBean> beanList = codeService.selectAll();
+		List<TreeNode> treeList = new ArrayList<TreeNode>();
+		TreeNode node = null;
+		for(CodeBean bean : beanList) {
+			node = new TreeNode();
+			node.setId(bean.getCode());
+			node.settId(bean.getCode());
+			node.setName(bean.getName());
+			node.setpId(bean.getpCode());
+			node.addAttribute("id", bean.getId());
+			node.addAttribute("code", bean.getCode());
+			if (StringUtils.isNullOrEmpty(bean.getpCode())) {
+				node.setOpen("true");
+				node.setIconSkin("home");
+			} else {
+				node.setOpen("false");
+				node.setIconSkin("child");
+			}
+			treeList.add(node);
+		}
+		return treeList;
+	}
+
+	/**
+	 * 保存实体
+	 * 
+	 * @param vo
+	 * @return
+	 */
+	@RequestMapping("save")
+	@ResponseBody
+	public CodeBean saveCode(Model model, CodeVo vo) {
+		CodeBean saveBean = new CodeBean();
+		// 新增
+		if (StringUtils.isNullOrEmpty(vo.getId())) {
+			BeanUtils.copyProperties(vo, saveBean);
+			saveBean.setId(CommonUtil.getUUID());
+			saveBean.setXh(Long.parseLong(vo.getXh()));
+			saveBean.setUpdateTime(new Date());
+			codeService.insert(saveBean);
+		} else {
+			// 修改
+			saveBean = codeService.selectByPrimaryKey(vo.getId());
+			saveBean.setName(vo.getName());
+			saveBean.setCode(vo.getCode());
+			saveBean.setMapName(vo.getMapName());
+			saveBean.setMapCode(vo.getMapCode());
+			saveBean.setValid(vo.getValid());
+			saveBean.setXh(Long.parseLong(vo.getXh()));
+			saveBean.setRemark(vo.getRemark());
+			saveBean.setUpdateTime(new Date());
+			codeService.updateByPrimaryKey(saveBean);
+		}
+		return saveBean;
+	}
+
+	/**
+	 * 初始化页面加载数据
+	 */
+	@RequestMapping("initEditCode")
+	@ResponseBody
+	public CodeBean initEditCode(Model model, String id) {
+		CodeBean bean = codeService.selectByPrimaryKey(id);
+		return bean;
+	}
+
+	/**
+	 * 删除数据
+	 */
+	@RequestMapping("delCode")
+	@ResponseBody
+	public int delCode(Model model, String ids) {
+		int cnt = 0;
+		if (!StringUtils.isNullOrEmpty(ids)) {
+			String[] idArr = ids.split(",");
+			for(String id : idArr) {
+				if(!StringUtils.isNullOrEmpty(id)) {
+					cnt += codeService.deleteByPrimaryKey(id);
+				}
+			}
+		}
+		return cnt;
+	}
+	
+	/**
+     * 获取任务下拉数据
+     */
+	@RequestMapping("getCodeForDdl")
+	@ResponseBody
+    public List<CodeBean> getCodeForDdl(Model model) {
+		List<CodeBean> list = codeService.selectAll();
+    	return list;
+    }
+}

+ 76 - 0
xtdsp/trunk/src/main/java/com/xt/dsp/vo/CodeVo.java

@@ -0,0 +1,76 @@
+package com.xt.dsp.vo;
+
+import com.xt.dsp.common.BaseVo;
+
+public class CodeVo extends BaseVo{
+	private String id;
+	private String name;
+	private String code;
+	private String valid;
+	private String pCode;
+	private String mapName;
+	private String mapCode;
+	private String remark;
+	private String xh;
+	private String updateTime;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getCode() {
+		return code;
+	}
+	public void setCode(String code) {
+		this.code = code;
+	}
+	public String getValid() {
+		return valid;
+	}
+	public void setValid(String valid) {
+		this.valid = valid;
+	}
+	public String getpCode() {
+		return pCode;
+	}
+	public void setpCode(String pCode) {
+		this.pCode = pCode;
+	}
+	public String getMapName() {
+		return mapName;
+	}
+	public void setMapName(String mapName) {
+		this.mapName = mapName;
+	}
+	public String getMapCode() {
+		return mapCode;
+	}
+	public void setMapCode(String mapCode) {
+		this.mapCode = mapCode;
+	}
+	public String getRemark() {
+		return remark;
+	}
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+	public String getXh() {
+		return xh;
+	}
+	public void setXh(String xh) {
+		this.xh = xh;
+	}
+	public String getUpdateTime() {
+		return updateTime;
+	}
+	public void setUpdateTime(String updateTime) {
+		this.updateTime = updateTime;
+	}
+}

+ 3 - 3
xtdsp/trunk/src/main/webapp/WEB-INF/view/rwgl/tasksql/tasksql.jsp

@@ -111,7 +111,7 @@
 								<label for="taskCode" class="col-sm-2 control-label">所在任务</label>
 								<div class="col-sm-3">
 									<div id="taskCodeError"></div>
-                                    <select class="form-control" id="taskCode" name="taskCode">
+                                    <select class="form-control {required:true}" id="taskCode" name="taskCode">
                                     </select>
 								</div>
 								<div class="col-sm-1">
@@ -121,7 +121,7 @@
 								<label for="srcConn" class="col-sm-2 control-label">源连接地址</label>
 								<div class="col-sm-3">
 									<div id="srcConnError"></div>
-                                    <select class="form-control" id="srcConn" name="srcConn">
+                                    <select class="form-control {required:true}" id="srcConn" name="srcConn">
                                     </select>
 								</div>
 								<div class="col-sm-1">
@@ -133,7 +133,7 @@
 								<label for="targetConn" class="col-sm-2 control-label">目标连接地址</label>
 								<div class="col-sm-3">
 									<div id="targetConnError"></div>
-                                    <select class="form-control" id="targetConn" name="targetConn">
+                                    <select class="form-control {required:true}" id="targetConn" name="targetConn">
                                     </select>
 								</div>
 								<div class="col-sm-1">

+ 223 - 0
xtdsp/trunk/src/main/webapp/WEB-INF/view/sys/code/code.jsp

@@ -0,0 +1,223 @@
+<%@ page contentType="text/html;charset=UTF-8"%>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<title>代码管理</title>
+<%@ include file="../../layouts/header.jsp"%>
+	<script src="<%=base%>/js/common/zTree_v3/js/jquery.ztree.core-3.5.min.js"></script>
+	<script type="text/javascript" src="<%=base%>/js/sys/code/code.js"></script>
+	<link href="<%=base%>/js/common/zTree_v3/css/demo.css" rel="stylesheet" />
+    <link href="<%=base%>/js/common/zTree_v3/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
+    <script src="<%=base%>/js/common/zTree_v3/js/jquery.ztree.all-3.5.min.js"></script>
+	<style type="text/css"> 
+	</style>
+</head>
+
+<body class="no-skin">
+	<!-- #section:basics/navbar.layout -->
+	<%@ include file="../../layouts/navbar.jsp"%>
+
+	<div class="main-container" id="main-container">
+		<script type="text/javascript">
+			try {
+				ace.settings.check('main-container', 'fixed')
+			} catch (e) {
+			}
+		</script>
+
+		<!-- #section:basics/sidebar -->
+		<%@ include file="../../layouts/sidebar.jsp"%>
+		<div class="main-content">
+			<div class="breadcrumbs" id="breadcrumbs">
+				<ul class="breadcrumb">
+					<li><i class="ace-icon fa fa-home home-icon"></i> <a
+						href="<%=home%>">首页</a></li>
+
+					<li class="active">系统管理</li>
+					<li class="active">代码管理</li>
+				</ul>
+			</div>
+			<div id="leftDiv" class="col-sm-3 col-tree-content">
+				<!-- <div class="widget-box widget-color-blue2">
+					<div class="widget-header">
+						<h4 class="widget-title lighter smaller">Choose Categories</h4>
+					</div>
+
+					<div class="widget-body">
+						<ul id="codeTree" class="ztree"></ul>
+					</div>
+				</div> -->
+				<ul id="codeTree" class="ztree"></ul>
+			</div>
+			<div class="col-sm-9 col-tree-content">
+				<div class="main-content-inner">
+					<div class="page-content">
+						<div class="widget-box">
+							<div class="widget-header">
+								<h4 class="widget-title">代码查询</h4>
+								<div class="widget-toolbar">
+									<a href="#" data-action="collapse"> <i
+										class="ace-icon fa fa-chevron-up"></i>
+									</a> <a href="#" data-action="close"> <i
+										class="ace-icon fa fa-times"></i>
+									</a>
+								</div>
+							</div>
+	
+							<div class="widget-body">
+								<div class="widget-main">
+									<form class="form-horizontal" onsubmit="return false">
+										<label class="col-sm-12 control-label"></label>
+										<div class="form-group">
+											<label for="srchName" class="col-sm-2 control-label">代码名称</label>
+											<div class="col-sm-2">
+												<input type="text" class="form-control limited"
+													id="srchName" placeholder="">
+											</div>
+											<label for="srchCode" class="col-sm-2 control-label">代码编码</label>
+											<div class="col-sm-2">
+												<input type="text" class="form-control limited"
+													id="srchCode" placeholder="">
+											</div>
+											<div class="col-sm-2">
+												<button class="btn btn-purple btn-round btn-sm"
+													onclick="searchRecord()">
+													<i class="ace-icon fa fa-search"></i> 查询
+												</button>
+	
+											</div>
+											<label class="col-sm-1 control-label"></label>
+										</div>
+									</form>
+								</div>
+							</div>
+						</div>
+						<!--列表部分-->
+						<div>
+							<div>
+								<table id="grid-table"></table>
+								<div id="grid-pager"></div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			
+		</div>
+		<!--弹出新增界面-->
+		<div id="modal-table" class="modal fade" tabindex="-1">
+			<div class="modal-dialog" style="width: 700px; height: 500px;">
+				<div class="modal-content">
+					<div class="modal-header no-padding">
+						<div class="table-header">
+							<button type="button" class="close" data-dismiss="modal"
+								aria-hidden="true">
+								<span class="white">&times;</span>
+							</button>
+							<label class="modal-title" id="myModalLabel"></label>
+						</div>
+					</div>
+					<div class="modal-body no-padding">
+						<form class="form-horizontal" id="form" method="post"
+							onsubmit="return false;">
+							<input type="hidden" id="id" name="id">
+							<div class="form-group">
+								<label for="name" class="col-sm-2 control-label">代码名称</label>
+								<div class="col-sm-3">
+									<div id="nameError"></div>
+									<input type="text" class="form-control limited {required:true}"
+										id="name" name="name" maxlength="100">
+								</div>
+								<div class="col-sm-1">
+									<span id="nameImageTip" class="sp_yes"
+										style="display: none"></span>
+								</div>
+								<label for="code" class="col-sm-2 control-label">代码编码</label>
+								<div class="col-sm-3">
+									<div id="codeError"></div>
+									<input type="text" class="form-control limited {required:true}"
+										id="code" name="code" maxlength="100"
+										placeholder="">
+								</div>
+								<div class="col-sm-1">
+									<span id="codeImageTip" class="sp_yes"
+										style="display: none"></span>
+								</div>
+							</div>
+							<div class="form-group">
+								<label for="mapName" class="col-sm-2 control-label">映射后名称</label>
+								<div class="col-sm-3">
+									<input type="text" class="form-control limited"
+										id="mapName" name="mapName" maxlength="100">
+								</div>
+								<div class="col-sm-1"></div>
+								<label for="mapCode" class="col-sm-2 control-label">映射后编码</label>
+								<div class="col-sm-3">
+									<input type="text" class="form-control limited"
+										id="mapCode" name="mapCode" maxlength="100"
+										placeholder="">
+								</div>
+								<div class="col-sm-1"></div>
+							</div>
+							<div class="form-group">
+								<label for="valid" class="col-sm-2 control-label">是否有效</label>
+								<div class="col-sm-3">
+                                    <select class="form-control" id="valid" name="valid">
+                                    	<option value="1">是</option>
+                                    	<option value="0">否</option>
+                                    </select>
+								</div>
+								<div class="col-sm-1"></div>
+								<label for="xh" class="col-sm-2 control-label">序号</label>
+								<div class="col-sm-3">
+									<div id="xhError"></div>
+									<input type="text" class="form-control limited {required:true,digits:true}"
+										id="xh" name="xh" maxlength="100"
+										placeholder="">
+								</div>
+								<div class="col-sm-1">
+									<span id="xhImageTip" class="sp_yes"
+										style="display: none"></span>
+								</div>
+							</div>
+							<div class="form-group">
+								<label for="remark" class="col-sm-2 control-label">备注</label>
+								<div class="col-sm-9">
+									<textarea rows="3" cols="" id="remark" class="form-control limited"
+										name="remark" maxlength="255">
+									</textarea>
+								</div>
+							</div>
+					
+					<div class="modal-footer no-margin-top center modal-foot-border">
+						<button id="btnSave" class="btn btn-success btn-round btn-sm">
+							<i class="ace-icon fa fa-save"></i> 保存
+						</button>
+						<button type="button" class="btn btn-grey btn-round btn-sm"
+							onclick="closeWin()">
+							<i class="ace-icon fa fa-remove"></i> 关闭
+						</button>
+					</div>
+					</form>
+				</div>
+			</div>
+		</div>
+	</div>
+
+	<!-- #section:basics/footer -->
+	<%@ include file="../../layouts/footer.jsp"%>
+	</div>
+
+	<script type="text/javascript">
+		$(function() {
+			$("#form").validate({
+				submitHandler : function(form) {
+					submitForm();
+				}
+			});
+		});
+	</script>
+	<!-- /.main-container -->
+</body>
+</html>
+

+ 5 - 1
xtdsp/trunk/src/main/webapp/WEB-INF/view/sys/column/column.jsp

@@ -110,10 +110,14 @@
 							<div class="form-group">
 								<label for="columnName" class="col-sm-2 control-label">数据列名称</label>
 								<div class="col-sm-3">
+									<div id="columnNameError"></div>
 									<input type="text" class="form-control limited {required:true}"
 										id="columnName" name="columnName" maxlength="100">
 								</div>
-								<div class="col-sm-1"></div>
+								<div class="col-sm-1">
+									<span id="columnNameImageTip" class="sp_yes"
+										style="display: none"></span>
+								</div>
 								<label for="taskId" class="col-sm-2 control-label">所属任务</label>
 								<div class="col-sm-3">
                                     <select class="form-control" id="taskId" name="taskId">

+ 4 - 4
xtdsp/trunk/src/main/webapp/WEB-INF/view/sys/datasource/datasource.jsp

@@ -108,19 +108,19 @@
 							onsubmit="return false;">
 							<input type="hidden" id="id" name="id">
 							<div class="form-group">
-								<label for="code" class="col-sm-2 control-label">CODE</label>
+								<label for="code" class="col-sm-2 control-label">编码</label>
 								<div class="col-sm-9">
-									<div id="idError"></div>
+									<div id="codeError"></div>
 									<input type="text" class="form-control limited {required:true}"
 										id="code" name="code" maxlength="100">
 								</div>
 								<div class="col-sm-1">
-									<span id="idImageTip" class="sp_yes"
+									<span id="codeImageTip" class="sp_yes"
 										style="display: none"></span>
 								</div>
 							</div>
 							<div class="form-group">
-								<label for="url" class="col-sm-2 control-label">URL</label>
+								<label for="url" class="col-sm-2 control-label">地址</label>
 								<div class="col-sm-9">
 									<input type="text" class="form-control limited" id="url"
 										name="url" maxlength="200" placeholder="">

+ 8 - 8
xtdsp/trunk/src/main/webapp/css/common/main.css

@@ -41,16 +41,16 @@
 	padding-top: 5px;
 	padding-bottom: 5px;
 }
-/***寮瑰嚭妗嗗簳閮ㄨ竟妗�/
+/***瀵懓鍤鍡楃俺闁劏绔熷锟�
 .modal-foot-border{
 	border-top :1px solid #c5d0dc
 }
-/* 绂佹鏂囨湰鍩熸嫋鍔�*/
+/* 缁備焦顒涢弬鍥ㄦ拱閸╃喐瀚嬮崝锟�/
 textarea {
 	resize: none;
 }
 
-/* 鍒楄〃鐐瑰嚮鏌ョ湅鏍峰紡 */
+/* 閸掓銆冮悙鐟板毊閺屻儳婀呴弽宄扮础 */
 .viewbtn{
 	cursor:pointer;text-decoration:none;color:blue;
 }
@@ -82,15 +82,15 @@ textarea {
     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../../ace/assets/images/fivestar_bg.jpg', sizingMethod='scale')\9;  
 } 
 
-/* 运行进度图片样式@yanzai */
+/* 杩愯杩涘害鍥剧墖鏍峰紡@yanzai */
 .spin_running {
 	z-index: 99;
 	width: 600px;
 	height: 60px;
 	left: 50%;/*FF IE7*/
 	top: 50%;/*FF IE7*/
-	margin-left: -300px!important;/*FF IE7 该值为本身宽的一半 */
-	margin-top: -30px!important;/*FF IE7 该值为本身高的一半*/
+	margin-left: -300px!important;/*FF IE7 璇ュ�涓烘湰韬鐨勪竴鍗�*/
+	margin-top: -30px!important;/*FF IE7 璇ュ�涓烘湰韬珮鐨勪竴鍗�/
 	margin-top: 0px;
 	position: fixed!important;/*FF IE7*/
 	position: absolute;/*IE6*/
@@ -106,8 +106,8 @@ textarea {
 	height: 60px;
 	left: 30%;/*FF IE7*/
 	top: 20%;/*FF IE7*/
-	margin-left: -300px!important;/*FF IE7 该值为本身宽的一半 */
-	margin-top: -30px!important;/*FF IE7 该值为本身高的一半*/
+	margin-left: -300px!important;/*FF IE7 璇ュ�涓烘湰韬鐨勪竴鍗�*/
+	margin-top: -30px!important;/*FF IE7 璇ュ�涓烘湰韬珮鐨勪竴鍗�/
 	margin-top: 0px;
 	position: fixed!important;/*FF IE7*/
 	position: absolute;/*IE6*/

+ 123 - 31
xtdsp/trunk/src/main/webapp/js/common/zTree_v3/css/demo.css

@@ -1,113 +1,205 @@
-html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike,
-  strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
-  margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline;
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
+	blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn,
+	em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup,
+	tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table,
+	caption, tbody, tfoot, thead, tr, th, td {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	font-weight: inherit;
+	font-style: inherit;
+	font-size: 100%;
+	font-family: inherit;
+	vertical-align: baseline;
 }
 
 body {
-  color: #2f332a; font: 15px/21px Arial, Helvetica, simsun, sans-serif; background: #f0f6e4 \9;
+	color: #2f332a;
+	font: 15px/21px Arial, Helvetica, simsun, sans-serif;
+	background: #f0f6e4 \9;
 }
 
 h1, h2, h3, h4, h5, h6 {
-  color: #2f332a; font-weight: bold; font-family: Helvetica, Arial, sans-serif; padding-bottom: 5px;
+	color: #2f332a;
+	font-weight: bold;
+	font-family: Helvetica, Arial, sans-serif;
+	padding-bottom: 5px;
 }
 
 h1 {
-  font-size: 24px; line-height: 34px; text-align: center;
+	font-size: 24px;
+	line-height: 34px;
+	text-align: center;
 }
 
 h2 {
-  font-size: 14px; line-height: 24px; padding-top: 5px;
+	font-size: 14px;
+	line-height: 24px;
+	padding-top: 5px;
 }
 
 h6 {
-  font-weight: normal; font-size: 12px; letter-spacing: 1px; line-height: 24px; text-align: center;
+	font-weight: normal;
+	font-size: 12px;
+	letter-spacing: 1px;
+	line-height: 24px;
+	text-align: center;
 }
-
+/* 
 a {
   color: #3C6E31; text-decoration: underline;
 }
 
 a:hover {
   background-color: #3C6E31; color: white;
-}
-
+} */
 input.radio {
-  margin: 0 2px 0 8px;
+	margin: 0 2px 0 8px;
 }
 
 input.radio.first {
-  margin-left: 0;
+	margin-left: 0;
 }
 
 input.empty {
-  color: lightgray;
+	color: lightgray;
 }
 
 code {
-  color: #2f332a;
+	color: #2f332a;
 }
 
 .highlight_red {
-  color: #A60000;
+	color: #A60000;
 }
 
 .highlight_green {
-  color: #A7F43D;
+	color: #A7F43D;
 }
 
 li {
-  list-style: circle; font-size: 12px;
+	list-style: circle;
+	font-size: 12px;
 }
 
 li.title {
-  list-style: none;
+	list-style: none;
 }
 
 ul.list {
-  margin-left: 17px;
+	margin-left: 17px;
 }
 
 div.content_wrap {
-  width: 600px; height: 380px;
+	width: 600px;
+	height: 380px;
 }
 
 div.content_wrap div.left {
-  float: left; width: 250px;
+	float: left;
+	width: 250px;
 }
 
 div.content_wrap div.right {
-  float: right; width: 340px;
+	float: right;
+	width: 340px;
 }
 
 div.zTreeDemoBackground {
-  width: 250px; height: 362px; text-align: left;
+	width: 250px;
+	height: 362px;
+	text-align: left;
 }
 
 ul.ztree {
-  margin-top: 10px; border: 1px solid #617775; background: #f0f6e4; width: 220px; height: 360px; overflow-y: scroll; overflow-x: auto;
+	margin-top: 5px;
+	border: 1px solid #c5c5c5;
+	background: #ffffff;
+	width: 220px;
+	height: 360px;
+	overflow-y: scroll;
+	overflow-x: auto;
 }
 
 ul.log {
-  border: 1px solid #617775; background: #f0f6e4; width: 300px; height: 170px; overflow: hidden;
+	border: 1px solid #617775;
+	background: #f0f6e4;
+	width: 300px;
+	height: 170px;
+	overflow: hidden;
 }
 
 ul.log.small {
-  height: 45px;
+	height: 45px;
 }
 
 ul.log li {
-  color: #666666; list-style: none; padding-left: 10px;
+	color: #666666;
+	list-style: none;
+	padding-left: 10px;
 }
 
 ul.log li.dark {
-  background-color: #E3E3E3;
+	background-color: #E3E3E3;
 }
 
 /* ruler */
 div.ruler {
-  height: 20px; width: 220px; background-color: #f0f6e4; border: 1px solid #333; margin-bottom: 5px; cursor: pointer
+	height: 20px;
+	width: 220px;
+	background-color: #f0f6e4;
+	border: 1px solid #333;
+	margin-bottom: 5px;
+	cursor: pointer
 }
 
 div.ruler div.cursor {
-  height: 20px; width: 30px; background-color: #3C6E31; color: white; text-align: right; padding-right: 5px; cursor: pointer
+	height: 20px;
+	width: 30px;
+	background-color: #3C6E31;
+	color: white;
+	text-align: right;
+	padding-right: 5px;
+	cursor: pointer
+}
+
+.ztree li span.button.home_ico_open {
+	margin-right: 2px;
+	background: url(zTreeStyle/img/diy/1_open.png) no-repeat scroll 0 0
+		transparent;
+	vertical-align: top;
+	*vertical-align: middle
+}
+
+.ztree li span.button.home_ico_close {
+	margin-right: 2px;
+	background: url(zTreeStyle/img/diy/1_close.png) no-repeat scroll 0 0
+		transparent;
+	vertical-align: top;
+	*vertical-align: middle
+}
+
+.ztree li span.button.child_ico_open {
+	margin-right: 2px;
+	background: url(zTreeStyle/img/diy/3.png) no-repeat scroll 0 0
+		transparent;
+	vertical-align: top;
+	*vertical-align: middle
+}
+
+.ztree li span.button.child_ico_close {
+	margin-right: 2px;
+	background: url(zTreeStyle/img/diy/3.png) no-repeat scroll 0 0
+		transparent;
+	vertical-align: top;
+	*vertical-align: middle
+}
+
+.ztree li span.button.child_ico_docu {
+	margin-right: 2px;
+	background: url(zTreeStyle/img/diy/3.png) no-repeat scroll 0 0
+		transparent;
+	vertical-align: top;
+	*vertical-align: middle
 }

+ 17 - 0
xtdsp/trunk/src/main/webapp/js/rwgl/job/job.js

@@ -63,6 +63,9 @@ function initGrid() {
 			index : 'name',
 			editable : false,
 			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				return "<a onclick=\"viewInfo('"+rowObject["id"]+"')\" class='viewbtn'>"+cellvalue+"</a>";
+			}
 		},{
 			name : 'code',
 			index : 'code',
@@ -515,4 +518,18 @@ function initBaseInfo(rowid, flg){
  * 隐藏校验图标
  */
 function hideValidateTip() {
+	$("#nameImageTip").css("display","none");
+	$("#codeImageTip").css("display","none");
+}
+
+/**
+ * 查看
+ * @param rid
+ */
+function viewInfo(rid){
+	$("#btnSave").hide();
+	// 隐藏校验图标
+	hideValidateTip();
+	$("#modal-table #myModalLabel").text("查看工作");
+	initBaseInfo(rid,"VIEW");
 }

+ 17 - 0
xtdsp/trunk/src/main/webapp/js/rwgl/task/task.js

@@ -65,6 +65,9 @@ function initGrid() {
 			index : 'name',
 			editable : false,
 			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				return "<a onclick=\"viewInfo('"+rowObject["id"]+"')\" class='viewbtn'>"+cellvalue+"</a>";
+			}
 		},{
 			name : 'code',
 			index : 'code',
@@ -382,4 +385,18 @@ function initBaseInfo(rowid, flg){
  * 隐藏校验图标
  */
 function hideValidateTip() {
+	$("#nameImageTip").css("display","none");
+	$("#codeImageTip").css("display","none");
+}
+
+/**
+ * 查看
+ * @param rid
+ */
+function viewInfo(rid){
+	$("#btnSave").hide();
+	// 隐藏校验图标
+	hideValidateTip();
+	$("#modal-table #myModalLabel").text("查看任务");
+	initBaseInfo(rid,"VIEW");
 }

+ 18 - 0
xtdsp/trunk/src/main/webapp/js/rwgl/tasksql/tasksql.js

@@ -65,6 +65,9 @@ function initGrid() {
 			index : 'taskCode',
 			editable : false,
 			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				return "<a onclick=\"viewInfo('"+rowObject["id"]+"')\" class='viewbtn'>"+cellvalue+"</a>";
+			}
 		},{
 			name : 'srcConn',
 			index : 'srcConn',
@@ -407,4 +410,19 @@ function initBaseInfo(rowid, flg){
  * 隐藏校验图标
  */
 function hideValidateTip() {
+	$("#taskCodeImageTip").css("display","none");
+	$("#srcConnImageTip").css("display","none");
+	$("#targetConnImageTip").css("display","none");
+}
+
+/**
+ * 查看
+ * @param rid
+ */
+function viewInfo(rid){
+	$("#btnSave").hide();
+	// 隐藏校验图标
+	hideValidateTip();
+	$("#modal-table #myModalLabel").text("查看执行语句");
+	initBaseInfo(rid,"VIEW");
 }

+ 506 - 0
xtdsp/trunk/src/main/webapp/js/sys/code/code.js

@@ -0,0 +1,506 @@
+/**
+ * 任务管理定义引用的js
+ */
+
+var grid_selector = "#grid-table";
+var pager_selector = "#grid-pager";
+var currPNode = null;
+jQuery(function($) {
+	//初始化日期控件
+	initDateTime();
+	// 初始化Grid
+	initGrid();
+	// 初始化树
+	initTree();
+});
+
+/**
+ * 初始化Grid
+ */
+function initGrid() {
+	//resize to fit page size
+	$(window).on('resize.jqGrid', function() {
+		$(grid_selector).jqGrid('setGridWidth', $(".page-content").width()-1);
+	});
+	//resize on sidebar collapse/expand
+	var parent_column = $(grid_selector).closest('[class*="col-"]');
+	$(document).on(
+			'settings.ace.jqGrid',
+			function(ev, event_name, collapsed) {
+				if (event_name === 'sidebar_collapsed'
+						|| event_name === 'main_container_fixed') {
+					//setTimeout is for webkit only to give time for DOM changes and then redraw!!!
+					setTimeout(function() {
+						$(grid_selector).jqGrid('setGridWidth',
+								parent_column.width());
+					}, 0);
+				}
+			});
+
+	// 数据表格初始化
+	jQuery(grid_selector).jqGrid({
+		url : basePath + '/code/initCode',
+		mtype : "POST", //提交方式
+		datatype : "json",
+		autowidth: false,
+		height :"auto",
+	    shrinkToFit: true,
+		sortname : "", //默认的排序列
+		sortorder : "", //默认的排序列
+		colNames : [ '','id','代码名称', '代码编码','是否有效','映射后名称','映射后编码','序号'],
+		colModel : [ {
+            name:'Edit',
+            index:'Edit',
+            width:30,
+			sortable : false,
+            fixed : true
+        },{
+			name : 'id',
+			index : 'id',
+			key : true,
+			hidden:true,
+			editable : false,
+			sortable : false
+		},{
+			name : 'name',
+			index : 'name',
+			editable : false,
+			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				return "<a onclick=\"viewInfo('"+rowObject["id"]+"')\" class='viewbtn'>"+cellvalue+"</a>";
+			}
+		},{
+			name : 'code',
+			index : 'code',
+			editable : false,
+			sortable : true
+		},  {
+			name : 'valid',
+			index : 'valid', 
+			editable : false,
+			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				if(cellvalue == "0"){
+					return '否';
+				} else if(cellvalue == "1"){
+					return '是';
+				} else{
+					return '';
+				}
+			}
+		},  {
+			name : 'mapName',
+			index : 'mapName',
+			editable : false,
+			sortable : true
+		},  {
+			name : 'mapCode',
+			index : 'mapCode',
+			editable : false,
+			sortable : true
+		},  {
+			name : 'xh',
+			index : 'xh',
+			editable : false,
+			sortable : true
+		} ],
+		rowNum : _rowNum, //每页显示记录数
+		rowList : _rowList, //用于改变显示行数的下拉列表框的元素数组。
+		pager : pager_selector, //定义翻页用的导航栏
+		page : 1, //设置初始的页码,初始为1
+		pagerpos : 'right', //指定分页栏的位置
+		altRows : true, //设置为交替行表格,默认为false
+		multiselect : true, //可以多选
+		multiboxonly : true, //只有选择checkbox才会起作用 
+		loadComplete : function() {
+			var table = this;
+			setTimeout(function() {
+				updatePagerIcons(table);
+				enableTooltips(table);
+			}, 0);
+		},
+		prmNames : {
+             oper : "oper",
+             page : "page",
+             rows : "rows",
+             sort : "sidx",
+             order : "sord"
+        },
+		postData :{
+			wldwCode : function(){ return ""; },//问题内容
+			wldwName : function(){ return ""; }//服务类型
+		},
+		jsonReader : {
+			root : "list", // json中代表实际模型数据的入口
+			page : "page", // json中代表当前页码的数据
+			total : "pages", // json中代表页码总数的数据
+			records : "total", // json中代表数据行总数的数据
+			repeatitems : false// 如果设为false,则jqGrid在解析json时,会根据name来搜索对应的数据元素
+		},
+        gridComplete: function () {
+            comGridComplete("grid-table", "editRecord");
+        },
+		onPaging: function(){
+			comGridPage("grid-table");
+		}
+	});
+
+	$(window).triggerHandler('resize.jqGrid');//trigger window resize to make the grid get the correct size
+	// 隐藏水平垂直滚动条
+	jQuery(grid_selector).closest(".ui-jqgrid-bdiv").css({ 'overflow-x' : 'hidden' ,'overflow-y':'hidden'});
+	//navButtons
+	jQuery(grid_selector).jqGrid(
+			'navGrid',
+			pager_selector,
+			{ //navbar options
+				edit : false,
+				editicon : 'ace-icon fa fa-pencil blue',
+				add : false,
+				addicon : 'ace-icon fa fa-plus-circle purple',
+				del : false,
+				delicon : 'ace-icon fa fa-trash-o red',
+				search : false,
+				searchicon : 'ace-icon fa fa-search orange',
+				refresh : false,
+				refreshicon : 'ace-icon fa fa-refresh green',
+				view : false,
+				viewicon : 'ace-icon fa fa-search-plus grey',
+			});
+	//初始化操作按钮
+	intOperButton();
+	$(document).one('ajaxloadstart.page', function(e) {
+		$(grid_selector).jqGrid('GridUnload');
+		$('.ui-jqdialog').remove();
+	});
+	
+	setMulti();
+
+};
+
+/**
+ * 初始化操作按钮
+ */
+function intOperButton() {
+	jQuery(grid_selector).navButtonAdd(pager_selector, {
+		caption : "新增",
+		buttonicon : "ui-icon ui-icon  btn-minier ace-icon fa fa-plus-circle",
+		onClickButton : function() {
+			comClearFormData("form");
+			// 隐藏校验图标
+			hideValidateTip();
+			$("#id").val("");
+			$("#btnSave").show();
+			// 启用元素
+			comEnableElements("modal-table");
+			$("#valid").val("1");
+			$("#modal-table #myModalLabel").text("新增任务");
+			$('#modal-table').modal('show');
+		},
+		position : "last"
+	});
+	jQuery(grid_selector).navButtonAdd(pager_selector, {
+		caption : "删除",
+		buttonicon : "ui-icon ui-icon ace-icon fa fa-trash-o red",
+		onClickButton : function() {
+			var idsStr = getMultiData();
+			if(idsStr.length >=1 ){
+				showMsgConfimDialog("确定删除吗?",function(){
+					$.ajax({
+						async : false,
+						type : 'POST',
+						dataType : "json",
+						data : {"ids":idsStr, opt:'QY'},
+						url : basePath + '/code/delCode',//请求的路径				
+						success : function(data) {
+							refreshTree();
+							// 成功后刷新页面
+							if (data == "SUCCESS") {
+								showMsgDialog("数据已删除!");
+							}
+							jQuery(grid_selector).trigger("reloadGrid");
+						},
+						error: function (XMLHttpRequest, textStatus, errorThrown) {
+				            showMsgDialog("error:" + errorThrown);
+				        }
+					});
+				});
+			} else {
+				showMsgDialog("请至少选择一条记录");
+			}
+		},
+		position : "last"
+	});
+}
+
+/**
+ * 初始化日期控件
+ */
+function initDateTime() {
+	$('#startTime').datetimepicker({
+		format : 'yyyy-mm-dd hh:ii:ss',
+		minView: 1
+	}).next().on(ace.click_event, function(){
+		$(this).prev().focus();
+	});
+	
+	$('#endTime').datetimepicker({
+		format : 'yyyy-mm-dd hh:ii:ss',
+		minView: 1
+	}).next().on(ace.click_event, function(){
+		$(this).prev().focus();
+	});
+};
+
+/**
+ * 编辑
+ * @param rid
+ */
+function editRecord(rid) {
+	var data = jQuery("#grid-table").jqGrid('getRowData', rid);
+	$("#btnSave").show();
+	// 隐藏校验图标
+	hideValidateTip();
+	// 启用元素
+	comEnableElements("modal-table");
+	$("#modal-table #myModalLabel").text("编辑任务");
+	initBaseInfo(rid);
+}
+
+/**
+ *	获取多行选中的id 
+ */
+function getMultiData(opt){
+	var ids = "";
+	//获取选择行的id
+	var row = jQuery(grid_selector).jqGrid('getGridParam','selarrrow');
+	if (row.length >= 1) {
+		for (var i = 0; i < row.length; i++) {
+			//获取选择的行的数据,只要传入rowId即可
+			var data = jQuery(grid_selector).jqGrid('getRowData', row[i]);
+			ids += data.id +",";
+		}
+		ids = ids.substr(0, ids.length - 1);
+	}
+	return ids;
+}
+
+/**
+ * 查询事件
+ */
+function searchRecord() {
+	
+	 //$.extend(jQuery(grid_selector)[0].p.postData);
+	 jQuery("#grid-table").trigger("reloadGrid", [{ page: 1 }]);
+};
+
+
+/**
+ * form提交事件
+ */
+function submitForm() {
+	$.ajax({
+		async:false,
+		type : "post",
+		url : basePath + '/code/save',
+		dataType:'json',
+		data : $.param({'pCode':currPNode.id}) + '&' + $('#form').serialize()
+		, //表单序列化,获取数据
+		success : function(data) {
+			// 成功删除后刷新页面
+			if (data) {
+				showMsgDialog("数据已成功保存!");
+				closeWin();
+				searchRecord();
+				refreshTree();
+			} else {
+				showMsgDialog("数据保存失败!");
+			}
+		}, //操作成功后的操作!data是后台传过来的值 
+		error: function (XMLHttpRequest, textStatus, errorThrown) {
+            showMsgDialog("error:" + errorThrown);
+        }
+	});
+};
+
+// 关闭弹出窗口,刷新列表
+function closeWin(){
+	$('.layui-layer').hide();
+	$('#modal-table').modal('hide');
+}
+
+/**
+ * 根据id查询所有信息并赋值
+ */
+function initBaseInfo(rowid, flg){
+	// 后台获取
+	$.ajax({
+		async : true,
+		type : 'POST',
+		dataType : "json",
+		data : {id:rowid},
+		url : basePath + '/code/initEditCode', //请求的路径				
+		success : function(data) {
+			// 填充信息
+			$('#id').val(data.id);
+			$('#name').val(data.name);
+			$('#code').val(data.code);
+			$('#mapName').val(data.mapName);
+			$('#mapCode').val(data.mapCode);
+			$('#valid').val(data.valid);
+			$('#xh').val(data.xh);
+			$('#remark').val(data.remark);
+			if(flg && flg=="VIEW") {
+				comDisableElements("modal-table");
+			}
+		},
+		error: function (XMLHttpRequest, textStatus, errorThrown) {
+            showMsgDialog("error:" + errorThrown);
+        }
+	});		
+	$('#modal-table').modal('show');					
+};
+
+/**
+ * 隐藏校验图标
+ */
+function hideValidateTip() {
+	$("#nameImageTip").css("display","none");
+	$("#codeImageTip").css("display","none");
+	$("#xhImageTip").css("display","none");
+}
+
+/**
+ * 查看
+ * @param rid
+ */
+function viewInfo(rid){
+	$("#btnSave").hide();
+	// 隐藏校验图标
+	hideValidateTip();
+	$("#modal-table #myModalLabel").text("查看代码");
+	initBaseInfo(rid,"VIEW");
+}
+
+/**
+ * 隐藏校验图标
+ */
+function getSetting() {
+	var setting = {
+	        //check: {
+	        //    enable: true
+	        //},
+	        view: {
+	            fontCss: getFontCss,
+	            dblClickExpand: false,
+	            showLine: true
+	        }, 
+	        data: {
+	            key: {
+	                title: "name"
+	            },
+	            simpleData: {
+	                enable: true 
+	                //checked: true
+	            }
+	        },
+	        callback: {
+	            onClick: onClick
+	        }
+	    };
+	return setting;
+}
+
+/**
+ * 初始化树
+ */
+function setTreeData() {
+    //返回的数据格式
+    $.ajax({
+		async:false,
+		type : "post",
+		url : basePath + '/code/initTree',
+		dataType:'json',
+		data : {},
+		success : function(data) {
+			// 成功删除后刷新页面
+			if (data) {
+				$.fn.zTree.init($("#codeTree"), getSetting(), data);
+				var treeObj = $.fn.zTree.getZTreeObj("codeTree");
+				//返回一个根节点  
+//				var node = treeObj.getNodesByFilter(function (node) { return node.level == 0 }, true);  
+//				treeObj.selectNode(node);
+				if(null == currPNode) {
+					var nodes = treeObj.getNodesByParam("id", "00", null);
+					//treeObj.selectNode(nodes[0]);
+					currPNode = nodes[0];
+				} else {
+					treeObj.selectNode(currPNode);
+					treeObj.expandNode(currPNode, true, true, true);
+				}
+			}
+		}, //操作成功后的操作!data是后台传过来的值 
+		error: function (XMLHttpRequest, textStatus, errorThrown) {
+            showMsgDialog("error:" + errorThrown);
+        }
+	});
+}
+
+/**
+ * 设置树的宽和高
+ */
+function setTreeWH() {
+	// 设置tree宽度和高度
+	var bodyHeight = $(window).height();
+	var navbarHeight = $("#navbar").height();
+	var breadcrumbsHeight = $("#breadcrumbs").height();
+	var treeHeight = bodyHeight - navbarHeight - breadcrumbsHeight - 90;
+	$("#codeTree").css('width',$("#leftDiv").width()-8);
+	$("#codeTree").css('height', treeHeight);
+}
+
+/**
+ * 初始化树
+ */
+function initTree() {
+    //请求树状数据,初始化树
+//	var zNodes =[
+//        { id:1, pId:0, name:"父节点1 - 展开", open:true},
+//        { id:11, pId:1, name:"父节点11 - 折叠"}];
+//	$.fn.zTree.init($("#codeTree"), setting, zNodes);
+	setTreeData();
+	setTreeWH();
+}
+
+//搜索变色
+function getFontCss(treeId, treeNode) {
+    return (!!treeNode.highlight) ? 
+    		{ color: "#A60000", "font-weight": "bold" } : 
+    		{ color: "#333", "font-weight": "normal" };
+}
+
+function onClick(e, treeId, treeNode) {
+    var treeObj = $.fn.zTree.getZTreeObj("codeTree");
+    var pId="";
+    if(treeNode.id != "00" && treeNode.pId !="00") {
+    	return;
+    }
+	currPNode = treeNode;
+    // 刷新表格
+    $(grid_selector).jqGrid('setGridParam',{  
+        datatype:'json',
+        postData:{'pCode':treeNode.id},
+        page:1
+    }).trigger("reloadGrid");
+}
+/**
+ * 刷新树
+ */
+function refreshTree() {
+    var treeObj = $.fn.zTree.getZTreeObj("codeTree");
+//    treeObj.refresh();
+//    treeObj.selectNode(currPNode);
+//    treeObj.expandAll(false);//折叠全部节点,参数为true时表示展开全部节点  
+    treeObj.removeChildNodes(currPNode);
+    setTreeData();//刷新zTree,实现不选中任何节点  
+}
+

+ 16 - 0
xtdsp/trunk/src/main/webapp/js/sys/column/column.js

@@ -65,6 +65,9 @@ function initGrid() {
 			index : 'columnName',
 			editable : false,
 			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				return "<a onclick=\"viewInfo('"+rowObject["id"]+"')\" class='viewbtn'>"+cellvalue+"</a>";
+			}
 		},{
 			name : 'taskName',
 			index : 'taskName',
@@ -371,4 +374,17 @@ function initBaseInfo(rowid, flg){
  * 隐藏校验图标
  */
 function hideValidateTip() {
+	$("#columnNameImageTip").css("display","none");
+}
+
+/**
+ * 查看
+ * @param rid
+ */
+function viewInfo(rid){
+	$("#btnSave").hide();
+	// 隐藏校验图标
+	hideValidateTip();
+	$("#modal-table #myModalLabel").text("查看数据列");
+	initBaseInfo(rid,"VIEW");
 }

+ 16 - 0
xtdsp/trunk/src/main/webapp/js/sys/datasource/datasource.js

@@ -65,6 +65,9 @@ function initGrid() {
             width:80,
 			editable : false,
 			sortable : true
+			,formatter:function(cellvalue, options, rowObject){
+				return "<a onclick=\"viewInfo('"+rowObject["id"]+"')\" class='viewbtn'>"+cellvalue+"</a>";
+			}
 		},{
 			name : 'url',
 			index : 'url',
@@ -375,4 +378,17 @@ function initBaseInfo(rowid, flg){
  * 隐藏校验图标
  */
 function hideValidateTip() {
+	$("#codeImageTip").css("display","none");
+}
+
+/**
+ * 查看
+ * @param rid
+ */
+function viewInfo(rid){
+	$("#btnSave").hide();
+	// 隐藏校验图标
+	hideValidateTip();
+	$("#modal-table #myModalLabel").text("查看数据源");
+	initBaseInfo(rid,"VIEW");
 }