

<div class="detailCon">
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.snapshotSize%}</label>
		</div>
		<div class="configDiv" id="configDiv">
			<ul class="line long">
				<!-- 抓图尺寸 -->
				<li class="line lineI long">
					<label class="des desA">{%label.snapshotSize%}</label>
					<span class="select modeSelect">
						<i name="snapSize" id="costomize" value="costomize" style="scale:0.75"></i>
						<label class="des desH1" style="font-size:12px">{%label.customize%}</label>
					</span>
					<span class="select modeSelect">
						<i name="snapSize" id="bighead" value="bighead" style="scale:0.75"></i>
						<label class="des desH1" style="font-size:12px">{%label.mugshot%}</label>
					</span>
					<span class="select modeSelect">
						<i name="snapSize" id="wholebody" value="wholebody" style="scale:0.75"></i>
						<label class="des desH1" style="font-size:12px">{%label.fullBodyShot%}</label>
					</span>
					<span class="select modeSelect">
						<i name="snapSize" id="halfbody" value="halfbody" style="scale:0.75"></i>
						<label class="des desH1" style="font-size:12px">{%label.halfBodyShot%}</label>
					</span>
				</li>

				<li class="line lineD">
					<label class="des desC">{%label.snapshotWidth%}</label>
					<label class="des desE">{%label.faceWidth%}</label>
					<input id="faceWidth" class="text textA4" maxLength="3" value="1.5" type="text" /><span class="tip">{%label.rangeValue1%}</span>
				</li>

				<li class="line lineD">
					<label class="des desC">{%label.snapshotHeight%}</label>
					<label class="des desG">{%label.heightFomula%}</label>
				</li>
				<li class="line lineD">
					<label class="des desC">{%label.facePartHeight%}</label>
					<label class="des desE">{%label.faceHeight%}</label>
					<input id="faceHeight" class="text textA4" maxLength="3" value="1.5" type="text" /><span class="tip">{%label.rangeValue2%}</span>
				</li>
				<li class="line lineD">
					<label class="des desC">{%label.bodyPartHeight%}</label>
					<label class="des desE">{%label.faceHeight%}</label>
					<input id="bodyHeight" class="text textA4" maxLength="3" value="0.5" type="text" /><span class="tip">{%label.rangeValue3%}</span>
				</li>

				<li class="line lineD">
					<i name="picHeightSetting" id="FixSnapHeightCheck" value="1"></i>
					<label class="des desE">{%label.fixSnapshotHeight%}</label>
					<input id="fixSnapHeight" class="text textA fixSnapHeightInput" maxlength="4" value="1000" type="text" /><span class="tip fixSnapHeightInput">{%label.rangeValue4%}</span>
				</li>
				<!-- ip mask -->
			</ul>
		</div>
	</div>

	<!-- 全图设置 -->
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.snapshotSetting%}</label>
		</div>
		<div class="configDiv" id="configDiv">
			<ul class="line">
				<li class="line lineD">
					<i name="picSave" id="SnapshotSaveCheck" value="1"></i>
					<label class="des desA">{%label.snapshotSave%}</label>
				</li>
				<li class="line lineD">
					<label class="des desA">{%label.snapshotQuality%}</label>
					<span class="selCon">
						<span id="picQualitySel" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
				</li>
				<li class="line">
					<label class="des desA">{%label.snapshotRes%}</label>
					<span class="selCon">
						<span id="picResSel" class="select">
							<span class="value hsValueA"></span>
							<i class="arrow"></i>
						</span>
					</span>
				</li>
			</ul>
		</div>
	</div>

	<!-- 监控信息叠加 -->
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.monitorInfoAdd%}</label>
		</div>
		<div class="configDiv" id="configDiv">
			<ul class="line">
				<li class="line lineD">
					<i name="spotName" id="SpotNameCheck" value="-1"></i>
					<label class="des desA">{%label.monitorName%}</label>
					<input type="text" class="text textB5" id="SpotName" value="" maxlength="32" />
				</li>
				<li class="line lineD">
					<i name="spotNum" id="SpotNumCheck" value="0"></i>
					<label class="des desA">{%label.monitorNum%}</label>
					<input type="text" class="text textB5" id="SpotNum" value="" maxlength="32" />
				</li>
				<li class="line lineD">
					<i name="snapshotTime" id="DateCheck" value="1"></i>
					<label class="des desA">{%label.snapTime%}</label>
					<label id="date" class="des desG">YYYY-MM-DD HH:MM:SS</label>
				</li>
			</ul>
		</div>
	</div>

	<div class="funcBtnCon">
		<input id="save" type="button" value="{%btn.save%}" class="subBtn btnA" />
	</div>
</div>
<script type="text/javascript">function init(){function M(a,ca){var b="";switch(a){case ENONE:return!0;case IPCSYSLOGTIMEERR:b=errStr.sysLogTimeErr;break;case IPCUMGUESTNAUTH:b=errStr.invPermissionDenied;break;case EIDREACHLIMIT:b=errStr.clientFull;break;case EINVARG:b=errStr.IPCParamInvalid;break;case ECHNEMPTY:b=errStr.playNoChan;break;case ENOEVENTS:b=errStr.noEvents;break;case ECLIPLAYING:b=errStr.cannotSearch;break;case EUNKNOWN:b=errStr.linkUnknown;break;case IPCOSDTEXTERR:b=errStr.fssTextError;break;default:b=errStr.invRequestFail}closeToast();
showAlert(b,ca);return!1}function w(a){a=parseFloat(a);return a.toFixed(1).toString()}function p(a){a!=k?(l.readOnly=!0,m.readOnly=!0,n.readOnly=!0,l.style.background="#EEEEEE",m.style.background="#EEEEEE",n.style.background="#EEEEEE",l.value=c[a][q],m.value=c[a][r],n.value=c[a][s]):(l.readOnly=!1,m.readOnly=!1,n.readOnly=!1,l.style.background="#FFFFFF",m.style.background="#FFFFFF",n.style.background="#FFFFFF")}function da(){var a=0,a=getRadioChs(x);return a=a==k?3:a==d?2:a==e?1:0}function N(a,b,
c){for(var d=0;d<=a;){var e=parseInt((d+a)/2),f=c.substring(0,e);if(b==getDisplayStrLen(f))return f;b>getDisplayStrLen(f)&&(d=e+1);b<getDisplayStrLen(f)&&(a=e-1)}return-1}function ea(a,b,c){var d=id(a).value;if(null!=d.match(/^(\d+)$/)&&parseInt(d)>=b&&parseInt(d)<=c)return!0;showNote(a,label.snapShotIllegalTips+String(b)+" - "+String(c));return!1}function D(a,b,c){var d=id(a).value;if(null!=d.match(/^(\d*)(\.?)(\d+)$/)&&parseFloat(d)>=b&&parseFloat(d)<=c)return!0;showNote(a,label.snapShotIllegalTips+
String(b)+" - "+String(c));return!1}function O(a,b,g){a==c[f][q]&&b==c[f][r]&&g==c[f][s]?(changeRadioInput(f,!0),changeRadioInput(k,!1),changeRadioInput(d,!1),changeRadioInput(e,!1),p(f)):a==c[e][q]&&b==c[e][r]&&g==c[e][s]?(changeRadioInput(f,!1),changeRadioInput(k,!1),changeRadioInput(d,!1),changeRadioInput(e,!0),p(e)):a==c[d][q]&&b==c[d][r]&&g==c[d][s]?(changeRadioInput(f,!1),changeRadioInput(k,!1),changeRadioInput(d,!0),changeRadioInput(e,!1),p(d)):(changeRadioInput(f,!1),changeRadioInput(k,!0),
changeRadioInput(d,!1),changeRadioInput(e,!1),p(k))}var P,b=uciFaceSnapShot.fileName,h=uciFaceSnapShot.secName.fssSizeConfig,t=uciFaceSnapShot.secName.fssPicCfg,g=uciFaceSnapShot.secName.fssOsdCfg,q=uciFaceSnapShot.optName.faceWidthRatio,r=uciFaceSnapShot.optName.faceHeightRatio,s=uciFaceSnapShot.optName.bodyHeightRatio,A=uciFaceSnapShot.optName.imgHeight,Q=uciFaceSnapShot.optName.fssMode,R=uciFaceSnapShot.optName.picResolution,S=uciFaceSnapShot.optName.picQuality,E=uciFaceSnapShot.optName.savePicSwitch,
F=uciFaceSnapShot.optName.spotNameSwitch,G=uciFaceSnapShot.optName.spotName,H=uciFaceSnapShot.optName.spotNumSwitch,I=uciFaceSnapShot.optName.spotNum,J=uciFaceSnapShot.optName.spotTimeSwitch,u=uciFaceSnapShot.optValue.enableOn,v=uciFaceSnapShot.optValue.enableOff,B=uciAiEnhanceCapability.secName.faceEnhance,fa=uciAiEnhanceCapability.optName.supportFSSMode,ga=uciAiEnhanceCapability.optName.BigHeadParmsArr,ha=uciAiEnhanceCapability.optName.HalfBodyParmsArr,ia=uciAiEnhanceCapability.optName.FullBodyParmsArr,
C,T,ja=[{str:label.common,value:"common"},{str:label.good,value:"good"},{str:label.best,value:"best"}],ka=[{str:label.resValue1,value:"1920*1080"},{str:label.resValue2,value:"1280*720"}],l=document.getElementById("faceWidth"),m=document.getElementById("faceHeight"),n=document.getElementById("bodyHeight"),U=document.getElementById("fixSnapHeight"),K=document.getElementById("SpotName"),L=document.getElementById("SpotNum"),V=id("FixSnapHeightCheck"),W=id("SnapshotSaveCheck"),X=id("SpotNameCheck"),Y=
id("SpotNumCheck"),Z=id("DateCheck"),aa=id("picQualitySel"),ba=id("picResSel"),x="snapSize",la=[{textId:"SpotName"},{textId:"SpotNum"}],f="bighead",d="wholebody",e="halfbody",k="costomize",c={};c[f]={};c[e]={};c[d]={};c[f][q]="2.3";c[f][r]="2.3";c[f][s]="0.0";c[e][q]="3.0";c[e][r]="2.0";c[e][s]="4.0";c[d][q]="3.0";c[d][r]="2.0";c[d][s]="7.0";selectInit("picQualitySel",ja,"common");selectInit("picResSel",ka,"1920*1080");initRadioInput(x,function(){var a=getRadioChs(x);P!=a&&(P=a,p(a))});initCheckInput("picHeightSetting",
function(a){!0==a?$(".fixSnapHeightInput").show():$(".fixSnapHeightInput").hide()});initCheckInput("picSave",null);initCheckInput("spotName",null);initCheckInput("spotNum",null);initCheckInput("snapshotTime",null);(function(){for(var a=0;1>=a;a++)id(la[a].textId).onkeyup=function(){var a=this.value;getDisplayStrLen(a)>this.maxLength&&(this.value=N(a.length-1,this.maxLength,a),-1==this.value&&(this.value=N(a.length-1,this.maxLength-1,a)))}})();(function(){var a={};a[b]={};a[b][NAME]=[h,t,g];showToast("loading");
$.query(a,function(a){if(!0==M(a[ERR_CODE])){C=$.AIEnhanceCapability[B][fa];1==C&&(T=a[b][h][Q]);l.value=w(a[b][h][q]);m.value=w(a[b][h][r]);n.value=w(a[b][h][s]);if(1!=C)O(l.value,m.value,n.value);else{var c=$.AIEnhanceCapability[B][ga],v=$.AIEnhanceCapability[B][ia],x=$.AIEnhanceCapability[B][ha];if(void 0==c||void 0==v||void 0==x)O(l.value,m.value,n.value);else{var z=T,y;0==z?(y=c,changeRadioInput(f,!0),changeRadioInput(k,!1),changeRadioInput(d,!1),changeRadioInput(e,!1),p(f)):1==z?(y=x,changeRadioInput(f,
!1),changeRadioInput(k,!1),changeRadioInput(d,!1),changeRadioInput(e,!0),p(e)):2==z?(y=v,changeRadioInput(f,!1),changeRadioInput(k,!1),changeRadioInput(d,!0),changeRadioInput(e,!1),p(d)):(changeRadioInput(f,!1),changeRadioInput(k,!0),changeRadioInput(d,!1),changeRadioInput(e,!1),p(k));2>=z&&(l.value=w(y[0]),m.value=w(y[1]),n.value=w(y[2]))}}"-1"!=a[b][h][A]?(changeCheckInput("FixSnapHeightCheck","true"),U.value=a[b][h][A].toString(),$(".fixSnapHeightInput").show()):(changeCheckInput("FixSnapHeightCheck",
"false"),$(".fixSnapHeightInput").hide());a[b][t][E]==u&&changeCheckInput("SnapshotSaveCheck","true");aa.resetSel(a[b][t][S]);ba.resetSel(a[b][t][R]);a[b][g][F]==u&&changeCheckInput("SpotNameCheck","true");a[b][g][H]==u&&changeCheckInput("SpotNumCheck","true");a[b][g][J]==u&&changeCheckInput("DateCheck","true");void 0!=a[b][g][G]&&(K.value=a[b][g][G]);void 0!=a[b][g][I]&&(L.value=a[b][g][I])}showDetailCon()})})();id("save").onclick=function(){var a={};if(!0==(D("faceWidth",1,5)&&D("faceHeight",1,
3)&&D("bodyHeight",0,10)&&ea("fixSnapHeight",100,1E3))){a[b]={};a[b][h]={};a[b][t]={};a[b][g]={};a[b][h][q]=l.value;a[b][h][r]=m.value;a[b][h][s]=n.value;1==C&&(a[b][h][Q]=da());null!=V.getAttribute("checked")&&"true"==V.getAttribute("checked").toString()?a[b][h][A]=U.value:a[b][h][A]="-1";null!=W.getAttribute("checked")&&"true"==W.getAttribute("checked").toString()?a[b][t][E]=u:a[b][t][E]=v;a[b][t][S]=aa.value;a[b][t][R]=ba.value;if(null!=X.getAttribute("checked")&&"true"==X.getAttribute("checked").toString()){if(""==
K.value){showNote("SpotName",label.snapShotInputTips+label.monitorName);return}a[b][g][F]=u;a[b][g][G]=K.value}else a[b][g][F]=v;if(null!=Y.getAttribute("checked")&&"true"==Y.getAttribute("checked").toString()){if(""==L.value){showNote("SpotNum",label.snapShotInputTips+label.monitorNum);return}a[b][g][H]=u;a[b][g][I]=L.value}else a[b][g][H]=v;null!=Z.getAttribute("checked")&&"true"==Z.getAttribute("checked").toString()?a[b][g][J]=u:a[b][g][J]=v;showToast();$.modify(a,function(a){!0==M(a[ERR_CODE])&&
showToast("success")})}}}init();
</script><style type="text/css">li.line span.firstInfoLabel{font-size:13px;vertical-align:middle;color:#666;width:90px;height:30px;padding:4px;line-height:30px;border-width:1px;border-style:solid;border-radius:2px;border-color:#cdcdcd;background-color:#fff}li.line span.infoLabel{font-size:13px;vertical-align:middle;color:#666;width:90px;height:30px;padding:4px;line-height:30px;border-left:0;border-right:1px;border-top:1px;border-bottom:1px;border-style:solid;border-radius:2px;border-color:#cdcdcd;background-color:#fff}span.modeSelect{width:70px;text-align:center}li.long{width:800px!important}ul.line li.lineC{display:block;width:100%}ul.line li.lineD{display:block}ul.lineL{margin-bottom:25px}</style>