/**
* 单击事件
* @param obj
*/
var dom;
var state;
WarningIllegalIntime.onRowClick=function(obj) {
console.log(obj.data.id,"6666666")
var data = obj.data;
console.log(data.id);
if (state != 1) {
if(state==0){
if(dom==null){//state 0
bbb(obj);
state=1;
}else{//state 0
bbb(obj)
state=1;
}
}else{
bbb(obj);
state=1;
}
}else{//state 1 打开状态
if(dom!=null){
if(data.id==dom){
var ids = document.getElementById(dom);
ids.remove();
state = 0;
}else if(data.id==null){
var ids = document.getElementById(dom);
ids.remove();
state = 0;
}else{
var ids = document.getElementById(dom);
ids.remove();
bbb(obj);
state = 1;
}
}else{
bbb(obj);
state = 1;
}
}
} function bbb(obj){
var assayName=[];
var standardValue=[];
var assayValue=[];
var value=obj.data.assayDetailList;
for(var i=0;i<value.length;i++){
assayName[i]=value[i].assayName;
standardValue[i]=value[i].standardValue;
assayValue[i]=value[i].assayValue;
}
var data = obj.data;
var html = "<tr id=" + data.id + "><td colspan='18' align='center' valign='middle'>"
html+="<table>"
html+="<tr><td>指标项</td>"
for(a in assayName){
html+="<td style='width: 90px;text-align: center' >"+assayName[a]+"</td>"
}
html+="</tr>"
html+="<tr><td>标准值</td>"
for(b in standardValue){
html+="<td style='width: 90px;text-align: center'>"+standardValue[b]+"</td>"
}
html+="</tr>"
html+="<tr><td>化验值</td>"
for(c in assayValue){
html+="<td style='width: 90px;text-align: center'>"+assayValue[c]+"</td>"
}
html+="</tr>"
html+="</table>"
html+="<table><tr>"
html+='<td data-role="fieldcontain"><a class="aaa" id="zoom8" style="max-width:200px;display: block" href='+data.storageInImg.roughFront+' data-gallery=""><img onclick="ab(this)" class="img-thumbnail" src="'+data.storageInImg.roughFront+'" style="max-width:200px;height: 120px;"></a></td>'
html+='<td data-role="fieldcontain"><a class="aaa" id="zoom9" style="max-width:200px;display: block" href='+data.storageInImg.roughBack+' data-gallery=""><img onclick="ab(this)" class="img-thumbnail" src='+data.storageInImg.roughBack+' style="max-width:200px;height: 120px;"></a></td>'
html+='<td data-role="fieldcontain"><a class="aaa" id="zoom10" style="max-width:200px;display: block" href='+data.storageInImg.tareFront+' data-gallery=""><img onclick="ab(this)" class="img-thumbnail" src='+data.storageInImg.tareFront+' style="max-width:200px;height: 120px;"></a></td>'
html+='<td data-role="fieldcontain"><a class="aaa" id="zoom11" style="max-width:200px;display: block" href='+data.storageInImg.tareBack+' data-gallery=""><img onclick="ab(this)" class="img-thumbnail" src='+data.storageInImg.tareBack+' style="max-width:200px;height: 120px;"></a></td>'
html+='<td data-role="fieldcontain"><a class="aaa" id="zoom12" style="max-width:200px;display: block" href='+data.storageInImg.settlementPic+' data-gallery=""><img onclick="ab(this)" class="img-thumbnail" src='+data.storageInImg.settlementPic+' style="max-width:200px;height: 120px;"></a></td></tr><table>'
html+="</td></tr>"
dom =data.id;
obj.tr.after(html)
}

最新文章

  1. VisualStudio2013 如何打开之前版本开发的(.vdproj )安装项目
  2. xargs的原理剖析及用法详解
  3. sublime 3 注册码 - 亲测可用
  4. [LeetCode]题解(python):113 Path Sum II
  5. WEB简单数据操作练习
  6. DataGridView复选框实现全选功能,并取被选中的某行某列的值(三)
  7. HIVE配置文件
  8. x86、i386、i486、i586、i686和x86_64
  9. BZOJ NOI十连测 第二测 T2
  10. win7本地搭建git ssh服务器
  11. 第16章 观察者模式(Oberver Pattern)
  12. iOS开发之App主题切换完整解决方案(Swift版)
  13. ubuntu14.04下安装有道词典
  14. 20. Valid Parentheses【leetcode】
  15. 获取选中的radio的value值
  16. Django中自定义过滤器的使用
  17. [Codeforces]850E - Random Elections
  18. Centos7下用户登录失败N次后锁定用户禁止登陆的方法
  19. linux tomcat jvm调优
  20. c语言之要点-泛篇

热门文章

  1. UVA 10891 区间DP+博弈思想
  2. Libevent 学习笔记 (1)——Libevent 2.0安装与简单演示样例
  3. JEval使用实例
  4. 2015 年度新增开源软件排名TOP100
  5. python 004 执行环境对比
  6. SIS
  7. SolrCloud 分布式集群部署步骤
  8. SIPp web frontend(2)
  9. oc33--构造方法2
  10. 深入理解Android开发中的CoordinatorLayout Behavior