

<div class="detailCon">
	<ul class="line lineL">
		<li class="line lineA1">
			<label id="watchSwitchDes" class="des desF1">{%menuStr.watch%}</label>
			<div id="watchSwitch" class="switchCon">
				<i class="switchBg"></i>
				<i class="switchBall"></i>
			</div>
			<label class="des desH1">ON</label>
		</li>
		<div style="position:relative;*z-index:2;">
			<div id="hidebg"></div>
		</div>
		<!-- 守望等待时间 -->
		<li class="line lineA2">
			<label class="des desF">{%label.watchWaitTime%}</label>
			<input id="watchWaitTimeSel" class="text textA1" maxLength="3" type="text" /><span class="tip">{%label.second%} (5~720)</span>
		</li>
		<!-- 守望模式 -->
		<li class="line lineA1">
			<label class="des desF">{%label.watchMode%}</label>
			<span class="selCon IEPZD">
				<span id="watchModeSel" class="select">
					<span class="value hsValueA"></span>
					<i class="arrow"></i>
				</span>
			</span>
		</li>
		<!-- 守望模式编号 预置点 -->
		<li class="line lineA1 watchModeSet1">
			<label class="des desF">{%label.watchModeId%}</label>
			<span class="selCon IEPZD">
				<span id="watchModeIdSel1" class="select">
					<span class="value hsValueA"></span>
					<i class="arrow"></i>
				</span>
			</span>
		<!-- 守望模式编号 巡航扫描 -->
		<li class="line lineA1 watchModeSet2">
			<label class="des desF">{%label.watchModeId%}</label>
			<span class="selCon IEPZD">
				<span id="watchModeIdSel2" class="select">
					<span class="value hsValueA"></span>
					<i class="arrow"></i>
				</span>
			</span>
		</li>
		<!-- 守望模式编号 花样扫描 -->
		<li class="line lineA1 watchModeSet3">
			<label class="des desF">{%label.watchModeId%}</label>
			<span class="selCon IEPZD">
				<span id="watchModeIdSel3" class="select">
					<span class="value hsValueA"></span>
					<i class="arrow"></i>
				</span>
			</span>
		</li>
	</ul>
	<!-- 功能按钮 -->
	<div class="funcBtnCon">
		<input id="save" type="button" value="{%btn.save%}" class="subBtn btnA" />
	</div>
</div><script type="text/javascript">function init(){function G(b){var a="";closeNoteAll();switch(b){case ENONE:return!0;case PTZ_ERR_UNKNOWN:a=errStr.ptzUnknown;break;case PTZ_ERR_ARGUMENT_INVALID:a=errStr.ptzArgumentInvalid;break;case PTZ_ERR_REQUEST_CONFLICT:a=errStr.ptzRequestConflict;break;case PTZ_ERR_CONFIGURATION_CONFILICT:a=errStr.ptzConfigConflict;break;case PTZ_ERR_CONFIGURATION_FIXED:a=errStr.ptzConfigFixed;break;default:a=errStr.unknown+b}closeToast();showAlert(a);return!1}function T(){if(!0!=checkNum(f.value)||!0!=checkNumRange(parseInt(f.value),
720,5))showNote("watchWaitTimeSel",errStr.watchWaitTimeErr);else{var b,a={};a[g]={};b=a[g][uciPTZ.secName.watch]={};b.enabled=h.toString();b.park_time=f.value;b.action_mode=k.value;k.value==l&&(b.action_id=H.value);k.value==q&&(b.action_id=I.value);k.value==r&&(b.action_id=J.value);showToast();$.modify(a,function(a){!0==G(a[ERR_CODE])&&showToast("success");showDetailCon()})}}function U(b){!0==G(b[ERR_CODE])&&(b=b[g][uciPTZ.secName.watch],h=b.enabled,K.setState(h==z?1:0),L(h==z?1:0),A=b.park_time,
d=b.action_mode,d==l&&(s=b.action_id),d==q&&(t=b.action_id),d==r&&(u=b.action_id),f.value=A,k.resetSel(d),H.resetSel(s),I.resetSel(t),J.resetSel(u),B(d),showDetailCon())}function L(b){b?v.style.display="none":(v.style.display="block",v.style.width="660px",v.style.height="126px");h=1==b?z:V}function W(){!0==checkNum(this.value)&&!0==checkNumRange(parseInt(this.value),720,5)||showNote("watchWaitTimeSel",errStr.watchWaitTimeErr)}function B(b){switch(b){case l:m.css("display","block");n.css("display",
"none");p.css("display","none");break;case q:m.css("display","none");n.css("display","block");p.css("display","none");break;case r:m.css("display","none");n.css("display","none");p.css("display","block");break;default:m.css("display","none"),n.css("display","none"),p.css("display","none")}}function X(b){B(b)}var f=id("watchWaitTimeSel"),k=id("watchModeSel"),H=id("watchModeIdSel1"),I=id("watchModeIdSel2"),J=id("watchModeIdSel3"),m=$(".watchModeSet1"),n=$(".watchModeSet2"),p=$(".watchModeSet3"),Y=id("save"),
K=null,h=0,A,d,s,t,u,w=[],M=[],x=[],N=[],y=[],O=[],g=uciPTZ.fileName,c=uciPTZ.optValue,e=uciPTZ.optName,z=uciPTZ.optValue.on,V=uciPTZ.optValue.off,l=c.preset,q=c.tour,r=c.pattern,C=[{str:label.preset,value:l},{str:label.tour,value:q},{str:label.pattern,value:r},{str:label.autoScan,value:c.autoScan},{str:label.tiltScan,value:c.tiltScan},{str:label.randomScan,value:c.randomScan},{str:label.frameScan,value:c.frameScan},{str:label.panoramaScan,value:c.panoramaScan}],P=[],Q,R,S,D=32,E=8,F=4,v=document.getElementById("hidebg");
(function(){var b={};b[g]={};b[g][NAME]=uciPTZ.secName.watch;Y.onclick=T;Q=1==parseInt($.ptzCapability[e.presetSupported])?!0:!1;R=1==parseInt($.ptzCapability[e.tourSupported])?!0:!1;S=1==parseInt($.ptzCapability[e.patternSupported])?!0:!1;Q&&(D=isNaN(parseInt($.ptzCapability[e.presetNumMax]))?D:parseInt($.ptzCapability[e.presetNumMax]));R&&(E=isNaN(parseInt($.ptzCapability[e.tourNumMax]))?E:parseInt($.ptzCapability[e.tourNumMax]));S&&(F=isNaN(parseInt($.ptzCapability[e.patternNumMax]))?F:parseInt($.ptzCapability[e.patternNumMax]));
A=5;d=l;u=t=s="1";m.css("display","none");n.css("display","none");p.css("display","none");f.onchange=W;K=new Switch("watchSwitch",0,L);for(var a=0;a<D;a++)w[a]=(a+1).toString();for(a=0;a<w.length;a++)tmp={},tmp.str=w[a],tmp.value=w[a],M.push(tmp);for(a=0;a<E;a++)x[a]=(a+1).toString();for(a=0;a<x.length;a++)tmp={},tmp.str=x[a],tmp.value=x[a],N.push(tmp);for(a=0;a<F;a++)y[a]=(a+1).toString();for(a=0;a<y.length;a++)tmp={},tmp.str=y[a],tmp.value=y[a],O.push(tmp);selectInit("watchModeIdSel1",M,s,null,
void 0,{listMaxHeight:240});selectInit("watchModeIdSel2",N,t,null,void 0,{type:"down"});selectInit("watchModeIdSel3",O,u,null,void 0,{type:"down"});for(a=0;a<C.length;a++)for(var c=0;c<$.ptzCapability.park_support_mode_list.length;c++)C[a].value==$.ptzCapability.park_support_mode_list[c]&&P.push(C[a]);selectInit("watchModeSel",P,d,X,void 0,{type:"down"});B(d);$.query(b,U)})()}init();
</script><style type="text/css">ul.line.lineL{width:70%}ul.line li.lineA1{height:40px;margin-bottom:8px;width:328px}ul.line li.lineA2{height:40px;margin-bottom:8px;width:380px}ul.line label.desF1{font-size:13px;color:#000;line-height:30px;width:85px}ul.line label.desH1{font-size:13px;color:#333;line-height:30px;margin-left:17px}}</style>