天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

274 lines
10 KiB

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.DefaultModel>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Main</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<%
Response.Expires = -1;
Response.CacheControl = "no-cache";
%>
<!--应用样式-->
<link rel="stylesheet" type="text/css" href="../../Content/Site.css"/>
<!--EASYUI样式-->
<link rel="stylesheet" type="text/css" href="../../Scripts/jquery.easyui/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="../../Scripts/jquery.easyui/themes/icon.css"/>
<!--jquery+easyui-->
<link rel="stylesheet" type="text/css" href="../../Content/plugin/redmond/jquery-ui-1.9.2.custom.css" />
<script type="text/javascript" src="../../Scripts/jquery.1.11.0.min.js"></script>
<script type="text/javascript" src="../../Scripts/jquery.easyui/jquery.easyui.min.js"></script>
<!--搜索帮助-->
<script language="javascript" src="../../Scripts/jquery.ui.autocomplete/jquery-ui-1.9.2.custom.js" type="text/javascript"></script>
<script language="javascript" src="../../Scripts/QPerceptText.js" type="text/javascript"></script>
<!--json转换-->
<script type="text/javascript" src="../../Scripts/json2.js"></script>
<!--日期控件-->
<script language="javascript" src="../../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<!--多语言-->
<%
string langId = Session["MULT_LANG"] as string;
if (langId == null)
langId = "zh-CN";
switch (langId)
{
case "zh-CN":
%>
<script type="text/javascript" src="../../Scripts/jquery.easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../Scripts/Common-zh-CN.js"></script>
<%
break;
case "en":
%>
<script type="text/javascript" src="../../Scripts/jquery.easyui/locale/easyui-lang-en.js"></script>
<script type="text/javascript" src="../../Scripts/Common-en.js"></script>
<%
break;
default:
%>
<script type="text/javascript" src="../../Scripts/jquery.easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../Scripts/Common-zh-CN.js"></script>
<%
break;
}
%>
<script type="text/javascript" src="../../Scripts/app/qmDrag.js"></script>
<style type="text/css">
body
{
overflow: scroll;
vertical-align: top;
padding: 0 0 0 0;
}
.iconContainer
{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
float:left;
}
.dIcon
{
margin: 0px;
font-family: 黑体;
width: 156px;
height: 110px;
float: left;
}
.enter
{
border: 2px solid #362168;
}
.over
{
background: #FBEC88;
}
.dp
{
opacity: 0.5;
filter: alpha(opacity=50);
}
</style>
</head>
<body style="background-color:#F5F5F5">
<div region="center" style="overflow:hidden;">
<form name="Mainform" id="Mainform" action="/Home/Index" enctype="multipart/form-data" method="post">
<div fit="true" style="width:100%; height:100%; ">
<div id="divDustbin" style="visibility: hidden; background: #666; bottom: 0px;
left: 0px; position: fixed; width: 100%; height: 36px;opacity: 0.5;filter: alpha(opacity=90);z-index: 1001">
<img id="imgDustbin" style="width: 32px; height:32px; margin-left: 45%; border: none;" src="../../Content/default/dustbin.png" />
</div>
<div class="iconContainer">
<%=Model.MenuHtml %>
<div class='dIcon' style="background: #009AAC;" onclick="add()">
<table style="width: 100%; height: 100%;">
<tr style="vertical-align: middle;">
<td rowspan="2" align=center>
<img style="width: 60px; border: none;" src="../../Content/default/desk_set.png"
title="设置" />
</td>
<td rowspan="2" align=left>
<div style="height: 30px; color: #fff; font-size: 18px; font-weight: 900; font-family: 黑体;">
设置
</div>
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
/// <summary>
/// 调用实例
/// </summary>
$(function () {
$.qm.drag(
$(".dIcon"),
{
delay: 600,
proxy: 'clone',
revert: true,
container: document.documentElement,
onStartDrag: function (e) {
$(this).addClass("dp");
document.getElementById('divDustbin').style.visibility = 'visible';
},
onStopDrag: function (e) {
$(this).removeClass("dp");
document.getElementById('divDustbin').style.visibility = 'hidden';
}
}
);
$.qm.drop(
$(".dIcon"),
{
onDrop: function (e, source, target) {
var sourcePos = $(source).position();
var targetPos = $(target).position();
$(source).css({ left: targetPos.left, top: targetPos.top });
$(target).css({ left: sourcePos.left, top: sourcePos.top });
source.swapNode(target);
exchang(source.value, target.value);
}
}
);
$.qm.drop(
$("#imgDustbin"),
{
onDrop: function (e, source, target) {
deleteItem(source);
return false;
}
}
);
//鼠标滑过特效
$('.dIcon').hover(function () {
$('.dIcon table').removeClass('enter');
$(this.getElementsByTagName("table")[0]).addClass('enter');
}, function () {
//$(this.getElementsByTagName("table")[0]).removeClass('enter');
$('.dIcon table').removeClass('enter');
});
$.qm.AdjustIcons = function () {
//获得图标对象
var icons = $('.dIcon');
icons.css('position', 'absolute');
//隐藏图标
//container.hide();
//获得容器的宽度
var containerWidth = document.documentElement.clientWidth - 16; // 减16是因为BODY的padding被easy-ui样式控制
//设置图标最小宽度
var iconSmallWidth = 140;
//设置图标高度
var iconHeight = 110;
//设置图标间距
var iconInnerSpace = 10;
var iconCount = parseInt(containerWidth / (iconSmallWidth + iconInnerSpace));
//计算图标当前宽度
var iconWidth = (containerWidth - iconInnerSpace * (iconCount - 1)) / iconCount;
//重新设置图标宽度
$('.dIcon').css('width', iconWidth + 'px');
//重新调整图标位置
for (var i = 0; i < icons.length; i++) {
var lineIndex = parseInt(i / iconCount);
var iconLeft = 8 + (iconInnerSpace + iconWidth) * (i % iconCount) + 'px';
var iconTop = 8 + lineIndex * (iconInnerSpace + iconHeight) + 'px';
$(icons.get(i)).css({ left: iconLeft, top: iconTop });
}
}
$.qm.AdjustIcons();
//调整图片宽度
$(window).bind('resize', $.qm.AdjustIcons);
});
//添加桌面显示项
function add() {
openAppWindow1('添加', 'AddDesktopItem', '520', '480');
}
//桌面显示项交换位置
function exchang(id1, id2) {
$.ajax({
type: "POST",
url: "/AppDesktop/ExchangeSort?guid1=" + id1 + "&guid2=" + id2,
cache: false,
data: {
},
dataType: "json"
});
}
//删除(win8风格用)
function deleteItem(element) {
MSQ(MsgNormalTitle, "是否移除该快捷方式?", function () {
$.ajax({
type: "POST",
url: "/AppDesktop/Delete?guid=" + element.value,
cache: false,
data: {
},
dataType: "json"
});
element.removeNode(true);
$.qm.AdjustIcons();
});
}
//根据菜单id进行页面跳转
function gotoMenu(menuID,systemID) {
if(systemID=="")
{
systemID = "ManageCenter";
}
top.window.location.href = "/Home/Default?SystemID="+systemID+"&menuID="+menuID;
}
</script>
</div>
</form>
</div>
<div id="dialog" ><div id="dialogText" style=" padding:20,20,20,20;"></div> </div>
<div id="appWindow1" class="easyui-window" closed="true" modal="true" title="My Window" iconCls="icon-save" style="width:300px;height:500px;padding:2px;background: #E9F1FF;">
<iframe id="appWindow1_Frm" width=100% height="100%" frameborder="0"></iframe>
</div>
<script type="text/javascript">
$.ajaxSetup({
cache: false //关闭AJAX相应的缓存
});
function showTitle(message) {
MSI("提示", message);
}
</script>
</body>
</html>