升级
This commit is contained in:
@@ -15,6 +15,25 @@
|
||||
ov
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
/*定义父容器*/
|
||||
.content{
|
||||
width: 550px;
|
||||
height: 30px;
|
||||
background: #E4F1FB;
|
||||
margin:0 auto;
|
||||
}
|
||||
/*定义进度条*/
|
||||
.box{
|
||||
width: 0px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
background: #3BAAE3;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
@@ -35,6 +54,7 @@
|
||||
</f:Button>--%>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
|
||||
</f:Button>
|
||||
<f:Button ID="btnRefresh" runat="server" ClientIDMode="Static" Text="关闭" Icon="SystemSave" OnClick="btnRefresh_Click" Hidden="true"></f:Button>
|
||||
<%--<f:Button ID="btnOut" Icon="Pencil" runat="server" Text="导出" ToolTip="导出错误列表" ValidateForms="SimpleForm1"
|
||||
OnClick="btnOut_Click" Hidden="true"></f:Button>--%>
|
||||
</Items>
|
||||
@@ -203,6 +223,60 @@
|
||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window2_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="900px" Height="600px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" Hidden="true" runat="server" MinHeight="30px"
|
||||
Target="Parent" ShowHeader="false" BodyPadding="0" Margin="0"
|
||||
IsModal="true" Width="550px" Height="32px">
|
||||
<Items >
|
||||
<f:ContentPanel ShowBorder="false" Height="30px" ShowHeader="false" ID="ContentPanel3" runat="server">
|
||||
<div class="content" id="content">
|
||||
<div class="box" id="box"></div >
|
||||
</div >
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Window>
|
||||
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePageMethods="true">
|
||||
<Scripts>
|
||||
<asp:ScriptReference Path="~/res/DataInTable.js"/>
|
||||
</Scripts>
|
||||
</asp:ScriptManager>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
function parse(y) {
|
||||
var box = document.getElementById("box");
|
||||
//获取进度条div的宽度
|
||||
var x = box.style.width;
|
||||
x = parseInt(x) + 1;
|
||||
y = y + 1;
|
||||
//将y值加上百分号赋值给box的宽度。这样每次+1就可以实现进度条占父容器的100%;
|
||||
box.style.width = y + "%";
|
||||
//将y值加上百分号并赋值给显示下载百分比的div上
|
||||
document.getElementById("box").innerHTML = y + "%";
|
||||
//判断当y已经100的时候,也就是进度条的宽度和父容器的宽度一致的时候停止。
|
||||
if (y >= 100) {
|
||||
document.getElementById("box").innerHTML = "100%";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function printX() {
|
||||
var userid = '<%= CurrUser.UserId %>';
|
||||
F.ui.Window3.show();
|
||||
parse(0);
|
||||
var begin = setInterval(function () {
|
||||
PageMethods.getPercent(userid,function (result) {
|
||||
console.log(result);
|
||||
parse(result);
|
||||
if (result >= 100) {
|
||||
F.ui.Window3.hide();
|
||||
document.getElementById('btnRefresh').click();
|
||||
clearInterval(begin);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
y = 0;
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user