vardesc.jsp 7.32 KB
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/mobilemode/admin/init.jsp"%>
<html>
<head>
    <head>
	<title></title>
	<style type="text/css">
        *{
            font-family: 'Microsoft YaHei', Arial;
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100%;
            margin: 0px;
        }
        body{
        	font-size: 12px;
        	overflow: auto;
        }
        .title {
		    border-left: 6px solid #017afd;
		    height: 22px;
		    position: relative;
		    margin-top: 10px;
		}
		.title div {
		    height: 22px;
		    line-height: 22px;
		    position: absolute;
		    top: 0px;
		    left: 0;
		    background: #fff;
		    z-index: 1;
		    padding: 0px 13px;
		    font-size: 14px;
		    color: #333;
		}
		.title:after {
		    content: '';
		    height: 1px;
		    background-color: #ececec;
		    position: absolute;
		    left: 0px;
		    right: 0px;
		    top: 50%;
		}
		.content-bar {
		    padding-left: 15px;
		    overflow: hidden;
		}
		.content-bar div.system-var {
		    float: left;
		    margin: 10px 10px 0px 0px;
		    background: #efefef;
		    padding: 5px 10px;
		    border-radius: 5px;
			cursor: pointer;
		}
		.content-bar div.system-var.active{
			background: #ddd;
		}
		.content-text{
			margin: 10px 15px;
		    border: 1px dotted #ddd;
		    padding: 5px;
		    line-height: 22px;
		    color: #444;
		    border-radius: 3px;
		}
		#message {
			position: absolute;
		    top: 1px;
		    left: 50%;
		    padding: 5px 10px;
		    text-align: center;
		    font-family: 'Microsoft YaHei';
		    font-size: 13px;
		    z-index: 999;
		    border-radius: 3px;
		    transform: translateX(-50%);
			box-sizing: border-box;
			overflow: hidden;
			background: #000;
			display: none;
		}
		#message.success{
			color: #007AFB;
		}
		#message.error{
			color: #F699B4;	
		}
		#message.fff{
			color: #fff;
		}
		.tip{
			position: absolute;
		    top: 10px;
		    left: 50%;
		    transform: translateX(-50%);
		    color: #aaa;
		    font-size: 12px;
		    background: #fff;
		    z-index: 2;
		    height: 22px;
		    line-height: 22px;
		    padding: 0px 5px;
		}
    </style>

    <script>
		var languageId = <%=user.getLanguage()%>;
		var varContent = '';
        require(["jquery"], function(){
            $.get('../scriptlib/template/vardesc.html').then(function(data){
                varContent = $(data).find('.content-bar[language-id="'+languageId+'"]').html();
                $('.content-bar').html(varContent);
                $(".content-bar div.system-var").each(function(){
                    initCopyEvent(this);
                });
            });
        });
        
        function initCopyEvent(eles) {
        	if (!eles) return;

        	require(['clipboard'], function(Clipboard) {
        		var clip = new Clipboard(eles, {
        			text: function(trigger) {
        				return $(trigger).attr("copy-content");
        			}
        		});

        		clip.on('success', function(e) {
        		    showMsg("<%=SystemEnv.getHtmlLabelName(127484,user.getLanguage())%>", "fff", 1500);
                });
        	})
        }
        
        function showMsg(msg, cn, t){
			var $msg = $("#message");
			$msg.html(msg);
			$msg.show();
			
			if(cn){
				$msg[0].className = "";
				$msg.addClass(cn);
			}
			
			if(t){
				setTimeout(function(){
					$msg.hide();
				}, t);
			}
		}
    </script>
</head>
<body>
<div id="message"></div>
<%if(user.getLanguage() == 7){ %>
<div class="tip">点击复制</div>
<div class="title"><div>系统变量</div></div>
<div class="content-bar">
</div>
<div class="title" style="margin-top: 20px;"><div>页面参数</div></div>
<div class="content-text">
	我们使用下面的链接打开了一个id为3的页面,同时我们在链接中加上了名称为prjid的参数,如下:<br/>
	/mobilemode/appHomepageView.jsp?appHomepageId=3&prjid=15<br/>
	如果我们想在这个id为3的页面上获取参数prjid,我们可以这样写:<br/>
	{参数名称},即 {prjid},使用大括号参数名称就可以获取到了。<br/>
	移动建模所有的控件都是支持这种写法的。<br/>
</div>
<div class="title" style="margin-top: 20px;"><div>内置参数</div></div>
<div class="content-text">
	【列表】【时间轴】【表格】默认接收名称为<font color="red">sqlwhere</font>的参数,会将参数值作为查询过滤条件带入数据查询。<br/>
	例如:sqlwhere=type=1<br/>
	<br/>
	【表单】默认接收名称为<font color="red">billid</font>的参数,会将参数值作为数据id<br/>
	例如:我们已知项目的显示布局页面id为3,我们要显示id为15的项目信息,链接如下:<br/>
	/mobilemode/appHomepageView.jsp?appHomepageId=3&billid=15<br/>
</div>
<%}else if(user.getLanguage() == 8){ %>
<div class="tip">Click to copy</div>
<div class="title"><div>System variables</div></div>
<div class="content-bar">
</div>
<div class="title" style="margin-top: 20px;"><div>Page variables</div></div>
<div class="content-text">
	We use the link below to open a page with an id of 3, and we add a parameter named prjid to the link as follows:<br/>
	/mobilemode/appHomepageView.jsp?appHomepageId=3&prjid=15<br/>
	If we want to get the parameter prjid on this id 3 page, we can write:<br/>
	{Param Name}, {prjid}, can be obtained using the braces parameter name.<br/>
	All controls for mobile modeling support this type of writing.<br/>
</div>
<div class="title" style="margin-top: 20px;"><div>Built-in parameters</div></div>
<div class="content-text">
	[List] [Time Line] [Table] By default, a parameter named <font color="red">sqlwhere</font> is accepted, and the parameter value is used as a query filter condition to bring the data query.<br/>
	Such as:sqlwhere=type=1<br/>
	<br/>
	[Form] accepts the parameter named <font color="red">billid</font> by default, and takes the parameter value as the data id<br/>
	For example: the display layout page id is 3, to display item information with id 15, the link is as follows:<br/>
	/mobilemode/appHomepageView.jsp?appHomepageId=3&billid=15<br/>
</div>
<%}else if(user.getLanguage() == 9){ %>
<div class="tip">點擊復制</div>
<div class="title"><div>系統變量</div></div>
<div class="content-bar">
</div>
<div class="title" style="margin-top: 20px;"><div>頁面參數</div></div>
<div class="content-text">
	我們使用下面的鏈接打開了壹個id為3的頁面,同時我們在鏈接中加上了名稱為prjid的參數,如下:<br/>
	/mobilemode/appHomepageView.jsp?appHomepageId=3&prjid=15<br/>
	如果我們想在這個id為3的頁面上獲取參數prjid,我們可以這樣寫:<br/>
	{參數名稱},即 {prjid},使用大括號參數名稱就可以獲取到了。<br/>
	移動建模所有的控件都是支持這種寫法的。<br/>
</div>
<div class="title" style="margin-top: 20px;"><div>內置參數</div></div>
<div class="content-text">
	【列表】【時間軸】【表格】默認接收名稱為<font color="red">sqlwhere</font>的參數,會將參數值作為查詢過濾條件帶入數據查詢。<br/>
	例如:sqlwhere=type=1<br/>
	<br/>
	【表單】默認接收名稱為<font color="red">billid</font>的參數,會將參數值作為數據id<br/>
	例如:我們已知項目的顯示布局頁面id為3,我們要顯示id為15的項目信息,鏈接如下:<br/>
	/mobilemode/appHomepageView.jsp?appHomepageId=3&billid=15<br/>
</div>
<%} %>
</body>
</html>