123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- @using Bowin.Web.Controls.Mvc;
- @using EMIS.Entities;
- @using EMIS.Web.Controls;
- @{
- ViewBag.Title = "List";
- }
- <link href="~/Content/Bowin.Control.Core/themes/base/jquery-ui.css" rel="stylesheet"
- type="text/css" />
- <link href="~/Content/Bowin.Control.Core/themes/default/easyui.css" rel="stylesheet"
- type="text/css" />
- <link href="~/Content/Bowin.Control.Core/themes/icon.css" rel="stylesheet" type="text/css" />
- <script src="../../Scripts/jquery-ui.min.js" type="text/javascript"></script>
- <script src="~/Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
- <script src="~/Scripts/Bowin.Control.Core/Plugins/EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
- <style type="text/css">
- .drag{
- padding:4px;
- margin:2px;
- border:1px solid #ccc;
- background:#AACCFF;
- }
- .dp{
- opacity:0.5;
- filter:alpha(opacity=50);
- }
- .over{
- background:#FBEC88;
- }
- .indicator{
- position:absolute;
- font-size:9px;
- width:10px;
- height:10px;
- display:none;
- color:red;
- }
- .drag-item{
- padding:4px;
- margin:2px;
- border:1px solid #ccc;
- background:#AACCFF;
- }
- input[type=button]
- {
- background-color:#f0f0f0;
- }
- </style>
- @section scripts{
- <script type="text/javascript">
- var mnu = "";
- var windowID;
- $(function () {
- windowID = $.SystemGeneral.getUrlParam("WindowID");
- setleftdiv();
- });
- function setleftdiv() {
- $.getJSON("../../Config/StudentColumnName.json", function (result) {
- $.each(result.all, function (i, field) {
- var colList = eval(field);
- for (var key in colList) {
- var str = '<div id="' + i + '" class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
- $('#source').append(str);
- }
- });
- setdraggableanddroppable();
- });
- };
- function removeright() {
- $('#target').find('div').remove();
- $('#source').find('div').remove();
- setleftdiv();
- }
- function setdraggableanddroppable() {
- $('.drag').draggable({
- proxy: 'clone',
- revert: true,
- cursor: 'auto',
- onStartDrag: function () {
- $(this).draggable('options').cursor = 'not-allowed';
- $(this).draggable('proxy').addClass('dp');
- },
- onStopDrag: function () {
- $(this).draggable('options').cursor = 'auto';
- }
- });
- $('#target').droppable({
- deltaX: 0,
- deltaY: 0,
- onDragEnter: function (e, source) {
- $(source).draggable('options').cursor = 'auto';
- $(source).draggable('proxy').css('border', '1px solid red');
- $(this).addClass('over');
- },
- onDragLeave: function (e, source) {
- $(source).draggable('options').cursor = 'not-allowed';
- $(source).draggable('proxy').css('border', '1px solid #ccc');
- $(this).removeClass('over');
- },
- onDrop: function (e, source) {
- source.className = "drag";
- var x = event.clientX;
- var y = event.clientY;
- var lis = $("#target").find("div");
- if (lis.length > 0) {
- var number = 0;
- $.each(lis, function (index, item) {
- var divtop = lis.eq(index).position().top;
- //var thistop = lis.eq(index).offset().top;
- var scrollTop = $(this).parent().scrollTop();
- var targettop = $(this).parent().position().top;
- var divheight = $(this).height();
- if (source.id == item.id) {
- return true;
- }
- if (divtop + scrollTop - targettop + divheight - (y - targettop + scrollTop) >= 0) {
- number = index + 1;
- return false;
- }
- });
- if (number == 0) {
- $(this).append(source);
- } else {
- var nametext = lis.eq(number - 1).attr("name");
- $("[name='" + nametext + "']").before(source);
- //$(lis.eq(2)).append(source);
- }
- }
- else {
- $(this).append(source);
- }
- $(this).removeClass('over');
- }
- });
- $('#source').droppable({
- //accept: '#d1,#d3',
- onDragEnter: function (e, source) {
- $(source).draggable('options').cursor = 'auto';
- $(source).draggable('proxy').css('border', '1px solid red');
- $(this).addClass('over');
- },
- onDragLeave: function (e, source) {
- $(source).draggable('options').cursor = 'not-allowed';
- $(source).draggable('proxy').css('border', '1px solid #ccc');
- $(this).removeClass('over');
- },
- onDrop: function (e, source) {
- $(this).append(source);
- $(this).removeClass('over');
- }
- });
- };
- function getall() {
- $('#target').find('div').remove();
-
- $.getJSON("../../Config/StudentColumnName.json", function (result) {
- $.each(result.all, function (i, field) {
- var colList = eval(field);
- for (var key in colList) {
- var str = '<div id="' + i + '"class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
- $('#source #' + i).remove();
- $('#target').append(str);
- }
- });
- setdraggableanddroppable();
- });
- };
- function getstru_xjzc() {
- $('#target').find('div').remove();
- $('#source').find('div').remove();
- setleftdiv();
- $.getJSON("../../Config/StudentColumnName.json", function (result) {
- $.each(result.stru_xjzc, function (i, field) {
- var colList = eval(field);
- for (var key in colList) {
- var str = '<div id="' + i + '"class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
- $('#source #' + i).remove();
- $('#target').append(str);
- }
- });
- setdraggableanddroppable();
- });
- };
- function getstru_sjxg() {
- $('#target').find('div').remove();
- $('#source').find('div').remove();
- setleftdiv();
- $.getJSON("../../Config/StudentColumnName.json", function (result) {
- $.each(result.stru_sjxg, function (i, field) {
- var colList = eval(field);
- for (var key in colList) {
- var str = '<div id="' + i + '"class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
- $('#source #' + i).remove();
- $('#target').append(str);
- }
- });
- setdraggableanddroppable();
- });
- };
- function getstru_xnzc() {
- $('#target').find('div').remove();
- $('#source').find('div').remove();
- setleftdiv();
- $.getJSON("../../Config/StudentColumnName.json", function (result) {
- $.each(result.stru_xnzc, function (i, field) {
- var colList = eval(field);
- for (var key in colList) {
- var str = '<div id="' + i + '"class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
- $('#source #' + i).remove();
- $('#target').append(str);
- }
- });
- setdraggableanddroppable();
- });
- };
- function getstru_jszc() {
- $('#target').find('div').remove();
- $('#source').find('div').remove();
- setleftdiv();
- $.getJSON("../../Config/StudentColumnName.json", function (result) {
- $.each(result.stru_jszc, function (i, field) {
- var colList = eval(field);
- for (var key in colList) {
- var str = '<div id="' + i + '"class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
- $('#source #' + i).remove();
- $('#target').append(str);
- }
- });
- setdraggableanddroppable();
- });
- };
- function GetRequest() {
- var url = location.search; //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- function Student_Infodbf() {
- var Request = new Object();
- Request = GetRequest();
- var Studentselect = top.$("#" + windowID).data("inputData");
- $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
- Studentselect.selectedIDs = Request["selectedIDs"];
- $("[name='selectedIDs']").val(Studentselect.selectedIDs);
- var colnames = "";
- var showname = "";
- $('#target').children('div').each(function () {
- colnames = colnames + $(this).attr('id') + ",";
- });
- $('#target').children('div').each(function () {
- showname = showname + $(this).attr('name') + ",";
- });
- $("[name='colnames']").val(colnames);
- $("[name='showname']").val(showname);
- $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/Students/DbfExport");
- $(document.forms[0]).submit();
- }
- function Student_InfoExcel() {
- var Request = new Object();
- Request = GetRequest();
- var Studentselect = top.$("#" + windowID).data("inputData");
- $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
- Studentselect.selectedIDs = Request["selectedIDs"];
- $("[name='selectedIDs']").val(Studentselect.selectedIDs);
- var colnames = "";
- var showname = "";
- $('#target').children('div').each(function () {
- colnames = colnames + $(this).attr('id') + ",";
- });
- $('#target').children('div').each(function () {
- showname = showname + $(this).attr('name') + ",";
- });
- $("[name='colnames']").val(colnames);
- $("[name='showname']").val(showname);
- $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/Students/InfoExcel");
- $(document.forms[0]).submit();
- }
- </script>
- }
- <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
- 学生信息列表
- </div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("InfoExport")</div>
- </div>
- <form id="formQuery" method="post" action="@Url.Content("~/Students/InfoExcel")">
- @Html.Hidden("QueryParamsDatas")
- @Html.Hidden("selectedIDs")
- @Html.Hidden("colnames")
- @Html.Hidden("showname")
- </form>
- <div id = "bodycss">
- <div style="margin:20px 0;"></div>
- <div id = "buttondiv" style = "margin-left:20px;">
- <div style = "float:left;margin:0 4px"><input type="button" onclick = "getall()" class = "all" value="全部字段" /></div>
- <div style = "float:left;margin:0 4px" ><input type="button" onclick = "getstru_xjzc()" class = "stru_xjzc" value="新生学籍电子注册上报" /></div>
- <div style = "float:left;margin:0 4px"><input type="button" onclick = "getstru_sjxg()" class = "stru_sjxg" value="在校生数据批量修改上报" /></div>
- <div style = "float:left;margin:0 4px"><input type="button" onclick = "getstru_xnzc()" class = "stru_xnzc" value="在校生学年电子注册上报" /></div>
- <div style = "float:left;margin:0 4px"><input type="button" onclick = "getstru_jszc()" class = "stru_jszc" value="毕业生学历电子注册上报" /></div>
- <div><input style = "margin:0 4px" type="button" onclick = "removeright()" class = "stru_jszc" value="清空" /></div>
- </div>
- <div id = "selectdiv">
- <div id="source" style="border:1px solid #ccc;width:300px;height:450px;float:left;margin:5px 90px;overflow:auto">
- 候选字段
- </div>
- <div id="target" style="border:1px solid #ccc;width:300px;height:450px;float:left;margin:5px 0px;overflow:auto">
- 需打印字段
- </div>
- <div style="clear:both"></div>
- </div>
- </div>
- </div>
|