| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776 |
- <html>
- <head>
- <style>
- #pmtEdit {
- /*overflow: auto!important;*/
- }
- .icon {
- float: left;
- width: 50px;
- height: 20px;
- font-size: 10px;
- /* text-align: center; */
- margin-right: 8px;
- line-height: 20px;
- }
- .name {
- font-size: 14px;
- /* font-weight: bold; */
- }
- .warningProgress-div {
- position: absolute;
- bottom: 0px;
- left: 0px;
- width: 100%;
- }
- .warningProgress-done {
- position: absolute;
- bottom: 0px;
- }
- .checkin .warningProgress-done {
- width: 0%;
- }
- .toolate .warningProgress-done {
- width: 50%;
- left: 0px;
- }
- .tooearly .warningProgress-done {
- width: 50%;
- right: 0px;
- }
- .crunk .warningProgress-done {
- width: 100%;
- left: 0px;
- }
- .top-font {
- font-size: 12px;
- color: #000;
- }
- .red {
- font-size: 12px;
- color: #f00;
- }
- .checkin .red {
- color: #010101;
- }
- .bottom-div {
- /*bottom: 40px !important;*/
- }
- #ascrail2001 {
- margin-top: -4px;
- }
- .bjbox:last-child {
- margin-bottom: 70px;
- }
- .scrollbar:last-child {
- /*margin-bottom: 1rem;*/
- }
- </style>
- <script type="text/javascript">
- window.onunload = function(){
- var twin = wd.display.getwdDialogOpener();
- $(twin.document).find("li[bjlb=5011] .icon-schedule").trigger("click");//触发外层的刷新
- }
- function refreshHomePluginRjkcb(){
- var twin = wd.display.getwdDialogOpener();
- $(twin.document).find("li[bjlb=5011] .icon-schedule").trigger("click");//触发外层的刷新
- wd.display.closeDialog();
- }
- </script>
- </head>
- <body>
- <input name="kcbid" type="hidden" value="${kcb.kcbid}" />
- <div class="search-div hLine" style="position: sticky;background: #fff;top: 0;z-index: 99999;">
- <div style="padding: 15px 25px 12px 25px;">
- <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
- 出勤:<span class="zc">${later==0?'-':(pmtDataSize - kqtj.kk - kqtj.cd - kqtj.zt -kqtj.qj)}</span>
- <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
- <div class="warningProgress-done" style="width: 0%;right: 0px;"></div>
- </div>
- </div>
- <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
- 旷课:<span class="kk">${later==0?'-':kqtj.kk}</span>
- <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
- <div class="warningProgress-done" style="width: 100%;left: 0px;"></div>
- </div>
- </div>
- <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
- 迟到:<span class="cd">${later==0?'-':kqtj.cd}</span>
- <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
- <div class="warningProgress-done" style="width: 50%;left: 0px;"></div>
- </div>
- </div>
- <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
- 早退:<span class="zt">${later==0?'-':kqtj.zt}</span>
- <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
- <div class="warningProgress-done" style="width: 50%;right: 0px;"></div>
- </div>
- </div>
- <div style="height: 20px;display: inline-block;vertical-align: middle;position: relative;text-indent: 5px;margin-right:20px;" class="top-font">
- 请假:<span class="qj">${kqtj.qj}</span>
- <div class="warningProgress-div" style="width: 34px;bottom: 0px;left: 12px;">
- <div class="progress-done" style="width: 100%;right: 0px;height: 3px"></div>
- </div>
- </div>
- <input type="button" id="rjkcb_qq" class="content-onButton" style="float: right;margin-right: -12px;display:none;" value="全勤">
- <equal.ss val="${later==0}" val2="false">
- <script>
- $("#rjkcb_qq").css("display","");
- var yczs=${kqtj.kk + kqtj.cd + kqtj.zt + kqtj.qj}
- if(yczs==0){
- $("#rjkcb_qq").removeClass("content-offButton").addClass("content-onButton");
- }else{
- $("#rjkcb_qq").removeClass("content-onButton").addClass("content-offButton");
- }
- </script>
- </equal.ss>
- </div>
- <equal.ss val="${later==0}" val2="true">
- <script>
- function isQQ() { // 全勤。Lin
- $.ajax({
- url: '@service{name:"homePluginRjkcb_dm_qqdm"}@',
- data: {
- kcbid: kcbid
- },
- dataType: "json",
- type: "post",
- success: function(result) {
- if (result.success) {
- $(".cd").text(0);
- $(".zt").text(0);
- $(".kk").text(0);
- var rs = $('#pmtDataSize').val();
- $(".zc").text(rs);
- $("#rjkcbDiv").remove();
- $("#rjkcb_qq").css("display","");
- $("#rjkcb_qq").removeClass("content-offButton").addClass("content-onButton");
- }
- }
- })
- }
- function tsj() { // 同上节。Lin
- $.ajax({
- url: '@service{name:"homePluginRjkcb_dm_tsj"}@',
- data: {
- kcbid: kcbid
- },
- dataType: "json",
- type: "post",
- success: function(result) {
- if (result.success) {
- location.reload();
- $("#rjkcbDiv").remove();
- }
- }
- })
- }
- </script>
- <div id="rjkcbDiv" style="float: right;margin-right: 10px;">
- <input type="button" id="rjkcb_qd" onclick="isQQ()" class="content-button" value="全到">
- <equal.ss val="${hasSjdm==1}" val2="true">
- <input type="button" id="rjkcb_tsj" onclick="tsj()" class="content-button" value="同上节">
- </equal.ss>
- </div>
- </equal.ss>
- <%--
- <wd:equal leftValue="${later==0}" rightValue="true">
- <script>
- function isQQ(){
- $.ajax({
- url:'@service{name:"homePluginRjkcb_dm_qqdm"}@',
- data:{kcbid:kcbid},
- dataType:"json",
- type:"post",
- success:function(result){
- if(result.success){
- //$("#rjkcbDiv").remove();
- }
- }
- })
- }
- function tsj(){
- $.ajax({
- url:'@service{name:"homePluginRjkcb_dm_tsj"}@',
- data:{kcbid:kcbid},
- dataType:"json",
- type:"post",
- success:function(result){
- if(result.success){
- location.reload();
- // $("#rjkcbDiv").remove();
- }
- }
- })
- }
- </script>
- <div id="rjkcbDiv" style="display:flex;justify-content: flex-end; position: absolute;right: 0;top:10px;z-index:9999;">
- <input type="button" id="rjkcb_tsj" class="content-offButton" onclick="tsj()" style="margin-right: 40px;" value="同上节" >
- <input type="button" id="rjkcb_qq" class="content-offButton" onclick="isQQ()" style="margin-right: 40px;" value="全勤" >
- </div>
- </wd:equal>
- --%>
- </div>
- <input type="hidden" id="pmtDataSize" value='${pmtDataSize}' />
- <div class="plugin-component-div">
- <div id="sybjBody" class="scrollbar" style="height: calc(100% - 111px)!important;width: 100%;box-sizing: border-box;padding: 0 10px;margin-top:10px;">
- <equal.ss val="${!empty pmtid }" val2="true">
- <div style="overflow: auto;height: 500px;margin-bottom: 26px;" class="scrollbar">
- <%-- 改。Lin
- <input type="hidden" id="changestateUrl" value='@service{name:"homePluginRjkcb_dm_qhzt"}@' /> --%>
- <input type="hidden" id="changestateUrl" value="<serv.ss name='rjkcbHomep_swState'/>"/>
- <input type="hidden" name="pmtid" value='${pmtid}' />
- <input type="hidden" name="pmtdata" value='${pmtData}' />
- <div id="pmtEdit" class="scrollbar" style='border: 1px solid #E4E4E4;position: absolute;height: 425px;width: calc(100% - 20px);margin-left:10px;overflow: auto;'>
- </div>
- <form.ss name="pmt"/>
- </div>
- </equal.ss>
- <equal.ss val="${empty pmtid }" val2="true">
- <rpt.ss name="bjList" id="bjItem">
- <div style="overflow: auto;height: auto;margin-bottom: 26px;display: grid;" class="scrollbar bjbox">
- <div id="bt" class="plugin-title hLine-highlightBlod" style="margin-bottom: 5px;">
- <span style="vertical-align: middle;margin-left: 15px;">${bjItem[0].bjmc} 班级人数:${bjItem[0].size}人</span>
- </div>
- <div style="padding-left:36px;">
- <rpt.ss name="${bjItem}" id="item">
- <equal.ss val="${item.rcid > 0}" val2="true">
- <div name="kqjl" kqjlid="${item.kqjlid eq 0? '' : item.kqjlid}" kqlbm="${item.kqlbm}" rcid="${item.rcid}"
- xyid="${item.xyid}" jlztm="${item.jlztm}" class='toolate wd leave' style="border-radius:0;width: 240px;height: 84px;display: flex;margin-bottom: 5px;margin-top: 0px;float:left;;padding:0 6px 6px 6px">
- <div class="rightBar" style="background:rgb(108,158,215)">
- </div>
- <equal.ss val="${empty item.zpwj}" val2="true">
- <div style="box-sizing: border-box;width:auto;height:82px;padding-top: 6px;">
- <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src="${sessionScope.ssUser.skinDir}image/default-photo.png" /> <%-- ="$@{sessionScope['wd.yh'].pflj}。Lin --%>
- </div>
- </equal.ss>
- <equal.ss val="${empty item.zpwj}" val2="false">
- <div style="box-sizing: border-box;padding-top: 6px;width:60px;height:82px;display: flex;align-items: center;justify-content: center;">
- <%-- 改。Lin
- <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src="@service{name:'getData',param:{path:'${item.zpwj}'}}@" /> --%>
- <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0
- src="<serv.ss name='dlByHttp' parm='{path:"${item.zpwj}"}'/>"/>
- </div>
- </equal.ss>
- <div style="display: flex;flex-direction: column;justify-content: flex-start;align-items: flex-start;margin-left: 6px;">
- <span class="name longCardList-highlight" style="">${item.xm}</span>
- <div class="longCardList-dim" id="ms" style="overflow: unset!important;padding-top: 8px;line-height: 16px;width: 182px;font-size:12px;color:#666;font-family:'黑体';">
- <span>${item.pwxh}</span>
- <br />
- <span>${item.xyh}</span>
- <span class="longCardList" style="display: flex;margin-top: 9px;">
- <span class="red">请假</span>
- </span>
- </div>
- </div>
- </div>
- </equal.ss>
- <equal.ss val="${item.rcid == 0}" val2="true">
- <div name="kqjl" kqjlid="${item.kqjlid eq 0? '' : item.kqjlid }" kqlbm="${item.kqlbm }" rcid="${item.rcid }"
- xyid="${item.ryid}" xyxm="${item.xm}" jlztm="${item.jlztm}" onclick="xy_dm_lr(this)" <%-- 增加 xyxm,RjkcbHomepServ.swStateByA() 不用再取。Lin --%>
- class='
- <equal.ss val="${item.kqlbm==81 && item.rcid==0}" val2="true">
- checkin wd
- </equal.ss>
- <equal.ss val="${item.kqlbm==11 && item.rcid==0}" val2="true">
- toolate wd
- </equal.ss>
- <equal.ss val="${item.kqlbm==21 && item.rcid==0}" val2="true">
- tooearly wd
- </equal.ss>
- <equal.ss val="${item.kqlbm==1 && item.rcid==0}" val2="true">
- crunk wd
- </equal.ss>
- '
- style="border-radius:0;width: 240px;height: 84px;display: flex;margin-bottom: 5px;margin-top: 0px;float: none;padding:0 6px 6px 6px;float: left;">
- <div class="rightBar">
- <div class="rightBar-xdiv"></div>
- </div>
- <equal.ss val="${empty item.zpwj}" val2="true">
- <div style="box-sizing: border-box;width:auto;height:82px;padding-top: 6px;">
- <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src='${sessionScope.ssUser.skinDir}image/default-photo.png' /> <%-- ='$@{sessionScope["wd.yh"].pflj}。Lin --%>
- </div>
- </equal.ss>
- <equal.ss val="${empty item.zpwj}" val2="false">
- <div style="box-sizing: border-box;padding-top: 6px;width:60px;height:82px;display: flex;align-items: center;justify-content: center;">
- <%-- 改。Lin
- <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0 src="@service{name:'getData',param:{path:'${item.zpwj}'}}@" /> --%>
- <img style="border-bottom:none;margin-bottom: 0px;width:auto;height:auto;max-width: 100%;max-height: 100%" border=0
- src="<serv.ss name='dlByHttp' parm='{path:"${item.zpwj}"}'/>"/>
- </div>
- </equal.ss>
- <div style="display: flex;flex-direction: column;justify-content: flex-start;align-items: flex-start;margin-left: 6px;">
- <span class="name longCardList-highlight" style="">${item.xm}</span>
- <div class="longCardList-dim" id="ms" style="overflow: unset!important;padding-top: 8px;line-height: 16px;width: 182px;font-size:12px;color:#666;font-family:'黑体';">
- <span>${item.pwxh}</span>
- <br />
- <span>${item.xyh}</span>
- <span class="longCardList" style="display: flex;margin-top: 9px;">
- <span class="itemZt red" id="zt">
- <equal.ss val="${item.kqlbm == 81}" val2="true">
- 出勤
- </equal.ss>
- <equal.ss val="${item.kqlbm == 11}" val2="true">
- 迟到
- </equal.ss>
- <equal.ss val="${item.kqlbm == 21}" val2="true">
- 早退
- </equal.ss>
- <equal.ss val="${item.kqlbm == 1}" val2="true">
- 旷课
- </equal.ss>
- </span>
- </span>
- </div>
- </div>
- </div>
- </equal.ss>
- </rpt.ss>
- </div>
- </div>
- </rpt.ss>
- </equal.ss>
- </div>
- </div>
- <div class="bottom-div">
- <div class="bottom-down-div">
- <equal.ss val="${empty dataType}" val2="true">
- <input class="bottom-button" type="button" value="关闭" onclick="refreshHomePluginRjkcb()">
- </equal.ss>
- </div>
- </div>
- </body>
- <style>
- /* 顶掉样式表line-height */
- .longCardList-highlight {
- line-height: 29px;
- }
- .wd {
- width: 150px;
- height: 150px;
- border-radius: 15px;
- margin: 5px;
- overflow-x: hidden;
- overflow: auto;
- float: left;
- border: 1px solid #E4E4E5;
- font-size: 14px;
- position: relative;
- background-color: #fff;
- }
- .wd img {
- max-width: 100%;
- width: 100%;
- height: 100px;
- border-bottom: 1px solid #e4e4e4;
- margin-bottom: 15px;
- }
- .wraper img {
- width: 80px;
- height: 90px;
- margin-left: 10px;
- }
- .bottomDiv {
- width: 100%;
- height: 20px;
- line-height: 20px;
- position: absolute;
- bottom: 0;
- font-size: 12px;
- overflow: hidden;
- }
- .bottomDiv .num {
- display: inline-block;
- width: 20px;
- text-align: center;
- background: #999;
- padding: 0;
- color: #fff;
- line-height: 20px;
- height: 20px;
- }
- .rightBar {
- width: 15px;
- height: 100%;
- position: absolute;
- right: 0px;
- background: #e1e1e1;
- }
- .rightBar-xdiv {
- width: 100%;
- position: absolute;
- background-color: #f00;
- }
- .checkin .rightBar .rightBar-xdiv {
- display: none
- }
- .crunk .rightBar .rightBar-xdiv {
- height: 100%;
- }
- .toolate .rightBar .rightBar-xdiv {
- height: 50%;
- top: 0px;
- }
- .tooearly .rightBar .rightBar-xdiv {
- height: 50%;
- bottom: 0;
- }
- </style>
- <equal.ss val='${dataType=="play"}' val2="false">
- <script>
- var kcbid = "${kcbid}";
- var bdm = "${bdm}";
- var lskcbid = "${lskcbid==null?kcbid:lskcbid}";
- //jlztm为1时 或不存在考情记录
- function xy_homePluginRjkcb_dm_qhzt(_obj) {
- var kqjlid = $(_obj).attr("kqjlid");
- var kqlbm = getQhKqlbm(_obj);
- var xyid = $(_obj).attr("xyid");
- var xyxm = $(_obj).attr("xyxm"); // 增加,RjkcbHomepServ.swStateByA() 不用再取。Lin --%>
- ajaxqhzt(_obj, kqjlid, kqlbm, xyid, xyxm); // 增加 xyxm,RjkcbHomepServ.swStateByA() 不用再取。Lin --%>
- }
- function onOrOffQq(kqtj) {
- var yczs = kqtj.kk + kqtj.cd + kqtj.zt + Number($(".qj").text());
- if (yczs > 0) {
- $("#rjkcb_qq").removeClass("content-onButton").addClass("content-offButton");
- } else {
- $("#rjkcb_qq").removeClass("content-offButton").addClass("content-onButton");
- }
- }
- function ajaxqhzt(_obj, kqjlid, kqlbm, xyid, xyxm) { // 增加 xyxm,RjkcbHomepServ.swStateByA() 不用再取。Lin --%>
- /* 改。Lin
- var qhztUrl = '@service{name:"homePluginRjkcb_dm_qhzt"}@';
- */ var qhztUrl = "<serv.ss name='rjkcbHomep_swState'/>";
- $.ajax({
- url: qhztUrl,
- type: "POST",
- data: {
- kcbid: kcbid,
- kqjlid: kqjlid,
- kqlbm: kqlbm,
- ryid: xyid,
- xyxm: xyxm, // 增加,RjkcbHomepServ.swStateByA() 不用再取。Lin --%>
- aa: 1,
- lskcbid: lskcbid,
- bdm: bdm
- },
- dataType: "json",
- async: true,
- success: function(result) {
- console.log("==aaa===:" + result.msg);
- if (result.msg) {
- onOrOffQq(result.kqjl);
- if (result.kqjlid) {
- $(_obj).attr("kqjlid", result.kqjlid);
- }
- if (result.del) {
- $(_obj).attr("kqjlid", "");
- }
- $(".search-div").find(".cd").text(result.kqjl.cd);
- $(".search-div").find(".zt").text(result.kqjl.zt);
- $(".search-div").find(".kk").text(result.kqjl.kk);
- //
- var rs = $('#pmtDataSize').val();
- var qj = $('.qj').text();
- var zc = rs - result.kqjl.cd - result.kqjl.zt - result.kqjl.kk - qj;
- $(".search-div").find(".zc").text(zc);
- //
- qhzt(_obj, kqlbm);
- $("#rjkcbDiv").remove();
- }
- if (window.parent.isExist) {
- window.parent.isExist(kcbid, false);
- }
- }
- });
- }
- //pmt切换状态
- function pmt_qhzt(cell) {
- var dom = cell._dom;
- var rcid = $(dom).children(".bottomDiv").attr("rcid");
- if (rcid != 0) {
- return;
- }
- if (cell.data) {
- var objectState = parseInt(cell.objectState);
- console.log(typeof objectState);
- //正常-缺勤-迟到-早退
- switch (objectState) {
- case 81:
- cell.objectState = 1 //正常->缺勤
- break;
- case 1:
- cell.objectState = 11 //缺勤->迟到
- break;
- case 11:
- cell.objectState = 21 //迟到->早退
- break;
- case 21:
- cell.objectState = 81 //早退->正常
- break;
- }
- var qhztUrl = document.querySelector("#changestateUrl").value;
- $.ajax({
- url: qhztUrl,
- type: "POST",
- data: {
- kqjlid: cell.data.kqjlid,
- kqlbm: cell.objectState,
- ryid: cell.data.ryid,
- kcbid: kcbid,
- bb: 2,
- bdm: bdm
- },
- dataType: "json",
- async: true,
- success: function(result) {
- console.log("??????===" + result.msg);
- if (result.msg) {
- onOrOffQq(result.kqjl);
- if (result.kqjlid) {
- cell.data.kqjlid = result.kqjlid;
- }
- if (result.del) {
- cell.data.kqjlid = "";
- }
- wd.form.pmt.refresh();
- $(".cd").text(result.kqjl.cd);
- $(".zt").text(result.kqjl.zt);
- $(".kk").text(result.kqjl.kk);
- var rs = $('#pmtDataSize').val();
- var qj = $(".qj").text();
- var zc = rs - result.kqjl.cd - result.kqjl.zt - result.kqjl.kk - qj;
- $(".zc").text(zc);
- console.log(result.kqjl)
- $("#rjkcbDiv").remove();
- }
- if (window.parent.isExist) {
- window.parent.isExist(kcbid, false);
- }
- }
- });
- }
- }
- //获取切换的类别
- function getQhKqlbm(_obj) {
- var kqlbm = parseInt($(_obj).attr("kqlbm"));
- //正常-缺勤-迟到-早退
- switch (kqlbm) {
- case 81:
- return 1 //正常->缺勤
- case 11:
- return 21 //迟到->早退
- case 21:
- return 81 //早退->正常
- case 1:
- return 11 //缺勤->迟到
- }
- }
- function qhzt(_obj, kqlbm) {
- $(_obj).removeClass();
- switch (parseInt(kqlbm)) {
- case 81:
- $(_obj).addClass("checkin wd");
- $(_obj).find('.itemZt').text('出勤');
- break;
- case 11:
- $(_obj).addClass("toolate wd"); //迟到
- $(_obj).find('.itemZt').text('迟到');
- break;
- case 21:
- $(_obj).addClass("tooearly wd"); //早退
- $(_obj).find('.itemZt').text('早退');
- break;
- case 1:
- $(_obj).addClass("crunk wd"); // 旷课
- $(_obj).find('.itemZt').text('旷课');
- break;
- }
- $(_obj).attr("kqlbm", kqlbm);
- }
- </script>
- </equal.ss>
- <script>
- function wdAlert(msg) {
- var json = {};
- json["msg"] = encodeURI(msg);
- var url = '@service{dest:"sys_alert",show:"wdDialog",param: {"msg":"wdVal{msg}"}}@';
- evalUrl(url, json);
- }
- function wdInfo(msg) {
- var json = {};
- json["msg"] = encodeURI(msg);
- var url = '@service{dest:"sys_info",show:"wdDialog",param: {"msg":"wdVal{msg}"}}@';
- evalUrl(url, json);
- }
- function evalUrl(url, json) {
- url = wd.display.replaceDynamicParam(url, json);
- eval(url, json);
- }
- function notNull(str) {
- if (str != null && str != undefined && str != "") {
- return true;
- }
- return false;
- }
- // 没平面图的切换
- function xy_dm_lr(_obj) {
- if (xy_homePluginRjkcb_dm_qhzt) {
- var jlztm = $(_obj).attr("jlztm");
- xy_homePluginRjkcb_dm_qhzt(_obj);
- }
- }
- //有平面图的切换
- wd.form.pmt.cellClass = {
- objectState: {
- "81": "checkin iconList-boxDiv", //正常
- "11": "toolate iconList-boxDiv",
- "21": "tooearly iconList-boxDiv",
- "1": "crunk iconList-boxDiv"
- }
- }
- wd.form.pmt.leftClick = function(cell) {
- if (pmt_qhzt) {
- var jlztm = cell.data.jlztm;
- pmt_qhzt(cell);
- }
- }
- wd.form.pmt.loadFinish = function() {
- console.log("这是点名的log!!!!!!!!!!!!!!!!");
- var $div = $("#pmtEdit").find("div");
- $div.addClass('iconList-boxDiv');
- var $data = $("input[name='pmtdata']").val();
- var json = JSON.parse($data);
- var qj = 0;
- for (var i = 0; i < json.length; i++) {
- if (json[i].rcid != 0) {
- qj++
- };
- var image = json[i].image;
- var hl = json[i].lineNum + '_' + json[i].columnNum;
- if (!image) {
- image = '${sessionScope.ssUser.skinDir}image/default-photo.png'; // = '$@{sessionScope["wd.yh"].pflj}。Lin
- } else {
- image = "/service?wdService=getData&path=" + encodeURIComponent(image);
- }
- console.log(image);
- var width = $("[hl='" + hl + "']").width();
- if (json[i].rcid == 0) {
- $("[hl='" + hl + "']").empty().append(
- '<img style="max-height:calc(100% - 26px);height:auto;width:auto;max-width:calc(100% - 2px);display:block;margin:0 auto;margin-top:5px;" src="' +
- image + '" width="' + width +
- '"><div class="bottomDiv" rcid="' + json[i].rcid +
- '"><span class="className" style="display:inline-block;text-align:center;line-height:15px;width:100%;">' +
- json[i].text +
- '</span><div class="warningProgress-div"><div class="warningProgress-done"></div></div></div>');
- } else {
- $("[hl='" + hl + "']").empty().append(
- '<img style="max-height:calc(100% - 26px);height:auto;width:auto;max-width:calc(100% - 2px);display:block;margin:0 auto;margin-top:5px;" src="' +
- image + '" width="' + width +
- '"><div class="bottomDiv" rcid="' + json[i].rcid +
- '"><span class="className" style="display:inline-block;text-align:center;line-height:15px;width:100%;">' +
- json[i].text +
- '</span><div class="warningProgress-div" style="background:rgb(108,158,215)"></div></div>');
- }
- }
- $('.qj').text(qj);
- }
- //wd.form.pmt.loadFinish();
- initShake();
- // 抖动
- function initShake() {
- var rector = 16
- ///////DONE EDITTING///////////
- var stopit = 0
- var a = 1
- function init(which) {
- stopit = 0;
- shake = which;
- shake.style.left = 0;
- shake.style.top = 0;
- shake.style.position = "relative";
- // alert("init")
- }
- function rattleimage() {
- // alert("rattleimage")
- if ((!document.all && !document.getElementById) || stopit == 1)
- return
- if (a == 1) {
- shake.style.left = parseInt(shake.style.left) + rector
- } else if (a == 2) {
- shake.style.left = 0
- } else if (a == 3) {
- shake.style.left = parseInt(shake.style.left) - rector
- } else if (a == 4) {
- shake.style.left = 0
- } else if (a == 5) {
- shake.style.left = parseInt(shake.style.left) + rector / 2
- } else if (a == 6) {
- shake.style.left = 0
- } else if (a == 7) {
- shake.style.left = parseInt(shake.style.left) - rector / 2
- } else if (a == 8) {
- shake.style.left = 0
- }
- console.log(a, parseInt(shake.style.left))
- if (a < 8) {
- a++
- } else {
- a = 1
- }
- setTimeout(rattleimage, 65)
- }
- function stoprattle(which) {
- a = 1
- stopit = 1
- which.style.left = 0
- which.style.top = 0
- }
- $(document).on('click', ".leave", function() {
- init(this);
- rattleimage();
- setTimeout(() => {
- stoprattle(this)
- }, 500)
- })
- }
- function aa(a) {
- $(window.parent.document.body).find('iframe').eq(0).attr('src', a)
- }
- </script>
- </html>
|