⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 advquery.vm

📁 负责公文的传输及一些处理功能
💻 VM
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<title>高级查询</title>
<link rel="stylesheet" type="text/css" href="$request.getContextPath()/csslib/style.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script Language="JavaScript" src="$request.getContextPath()/jslib/FloatButton.js"></script>
<script Language="JavaScript" src="$request.getContextPath()/jslib/function.js"></script>
<script Language="JavaScript" src="$request.getContextPath()/jslib/date.js"></script>
<script language=javascript>
 var comp=new Array(1);
 var comps=new Array(1);
 comp[0]="等于";
 comps[0]="eqrange";
 
 var tcomp=new Array(1);
 var tcomps=new Array(1);
 tcomp[0]="包含";
 tcomps[0]="inrange";
 
 var scomp=new Array(2);
 var scomps=new Array(2);
 scomp[0]="包含";
 scomp[1]="等于";
 scomps[0]="inrange";
 scomps[1]="eqrange";
 
 var icomp=new Array(3);
 var icomps=new Array(3);
 icomp[0]="等于";
 icomp[1]="早于";
 icomp[2]="晚于";
 icomp[3]="介于";
 icomps[0]="eq";
 icomps[1]="st";
 icomps[2]="lt";
 icomps[3]="jy";

 
 function DoCal(elTarget)
 {
  if (!window.showModalDialog)	return false;
  var sRtn;
  var mydate=new Date();
  var year = mydate.getYear();
  var month = mydate.getMonth()+1;
  var date = mydate.getDate();
  var time=year+"-"+month+"-"+date;
  var defaultValue=time;
  sRtn = showModalDialog("$request.getContextPath()/include/calendar.jsp?beginYear=1940&endYear=2040&defaultDate=" + defaultValue, "", "help=no;status=no;center=yes;dialogWidth=200pt;dialogHeight=180pt");
  if (sRtn!="")
    elTarget.value=sRtn;
 }
 
 function create_comp()
 {
  if(document.mform.vtype.selectedIndex==0 || document.mform.vtype.selectedIndex==1 || document.mform.vtype.selectedIndex==2 || document.mform.vtype.selectedIndex==5)
  {
    z1.style.visibility="visible";
    z2.style.visibility="hidden";
    z3.style.visibility="hidden";
    z4.style.visibility="hidden";
    create_Select(document.mform.operate1,scomps,scomp);
    document.mform.operate1.onchange=null;
    return false;
  }
  
  if(document.mform.vtype.selectedIndex==3 || document.mform.vtype.selectedIndex==4)
  {
    z1.style.visibility="hidden";
    z2.style.visibility="visible";
    z3.style.visibility="hidden";
    z4.style.visibility="hidden";
    create_Select(document.mform.operate1,comps,comp);
    document.mform.operate1.onchange=null;
    
    if (document.mform.vtype.selectedIndex==3) create_secret();   //构造秘级程度列表
    if (document.mform.vtype.selectedIndex==4) create_emergency(); //构造紧急程度列表
    
    return false;
  }
  
  if(document.mform.vtype.selectedIndex==6)
  {
    z1.style.visibility="hidden";
    z2.style.visibility="hidden";
    z3.style.visibility="visible";
    z4.style.visibility="hidden";
    create_Select(document.mform.operate1,icomps,icomp);
    document.mform.operate1.onchange=show_jy_div;
    return false;
  } 
 }
 
//当选择“登记时间”,document.mform.operate1添加的onchange函数
function show_jy_div(){
  if(document.mform.operate1.selectedIndex==3){
    z3.style.visibility="hidden";
    z4.style.visibility="visible";
  }
  else{
    z3.style.visibility="visible";
    z4.style.visibility="hidden";
  }
}
function del_Select(){
  while(document.mform.operate1.options.length>0) {
   document.mform.operate1.options.remove(document.mform.operate1.options.length-1);
 }
}
function create_Select(se,arr,arr2){
 while(se.options.length>0) {
   se.options.remove(se.options.length-1);
 }
 for(var i=0;i<arr.length;i++) {
  var moption=document.createElement("OPTION");
  moption.value=arr[i];
  moption.text=arr2[i];
  se.options.add(moption);
  }
}

function create_emergency()
{
  while(this.document.mform.select_type.length>0)
  {
    this.document.mform.select_type.options.remove(this.document.mform.select_type.options.length-1);
  }

  var content=document.createElement("option");
  content.value="";
  content.text="请选择紧急";
  this.document.mform.select_type.options.add(content);
  
  #foreach($emergencydata in $!emergencylist)
    var content=document.createElement("option");
    content.value="$!emergencydata.getId()";
    content.text="$!emergencydata.getContent()";
    this.document.mform.select_type.options.add(content);
  #end
}

function create_secret()
{
  while(this.document.mform.select_type.length>0)
  {
    this.document.mform.select_type.options.remove(this.document.mform.select_type.options.length-1);
  }
  
  var content=document.createElement("option");
  content.value="";
  content.text="请选择秘级";
  this.document.mform.select_type.options.add(content);
  
  #foreach($secretdata in $!secretlist)
    var content=document.createElement("option");
    content.value="$!secretdata.getId()";
    content.text="$!secretdata.getContent()";
    this.document.mform.select_type.options.add(content);
  #end
}

function add_it()
{
  var str="";
  var vtype="";
  var vtypev="";
  var opr="";
  var oprv="";
  var keyt="";
  var keyv="";
  var strv="";
  var vlinkflag="";
  var vlinkflagv="";

  var starttime="";
  var starttimev="";
  var endtime="";
  var endtimev="";
  
  if (document.mform.se.options.length>0&&document.mform.vlinkflag.selectedIndex==0)
  {
    alert("请选择查询的连接符,\"并且\"还是\"或者\"");
    return false;
  }
  vlinkflag=document.mform.vlinkflag.options[document.mform.vlinkflag.selectedIndex].text;
  vlinkflagv=document.mform.vlinkflag.options[document.mform.vlinkflag.selectedIndex].value;
  if (vlinkflagv=="")
    {
      vlinkflag="";
    }
  else
    {
      vlinkflag=vlinkflag+" ";
    }
  
  vtype=document.mform.vtype.options[document.mform.vtype.selectedIndex].text;
  vtypev=document.mform.vtype.options[document.mform.vtype.selectedIndex].value;
  if (vtypev=="")
  {
    alert("请选择要查询的项目!");
    return false;
  }
  
  opr=document.mform.operate1.options[document.mform.operate1.selectedIndex].text;
  oprv=document.mform.operate1.options[document.mform.operate1.selectedIndex].value;
  if (z1.style.visibility=="visible") 
  {
    keyt=document.mform.keywords.value;
    keyv=document.mform.keywords.value;
    document.mform.keywords.value="";
  }
  if (z2.style.visibility=="visible") 
  {
    keyt=document.mform.select_type.options[document.mform.select_type.selectedIndex].text;
    keyv=document.mform.select_type.options[document.mform.select_type.selectedIndex].value;
  }
  if (z3.style.visibility=="visible") 
  {
    keyt=document.mform.time.value;
    keyv=document.mform.time.value;
    document.mform.time.value="";
  }
  if (z4.style.visibility=="visible") 
  {
    starttime=document.mform.timestart.value;
    starttimev=document.mform.timestart.value;
    document.mform.timestart.value="";

    endtime=document.mform.timeend.value;
    endtimev=document.mform.timeend.value;
    document.mform.timeend.value="";
  }

  if (z4.style.visibility=="visible")
  {
    if (starttimev=="" || endtimev=="")
    {
      alert("请输入查询条件!");
      return false;
    }
    if (comparedate(starttimev,endtimev))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -