diff --git a/login/login.html b/login/login.html index 1feb8c8..9c8e0e7 100644 --- a/login/login.html +++ b/login/login.html @@ -27,8 +27,8 @@ - - + + \ No newline at end of file diff --git a/resource/js/unit.js b/resource/js/unit.js index d5b13b2..8b4be9b 100644 --- a/resource/js/unit.js +++ b/resource/js/unit.js @@ -10,9 +10,11 @@ sysComm = { //阿里云测试环境,别删 -//var parkcloudbaseUrl = 'http://localhost:8101/';// url公用地址 var parkcloudbaseUrl = 'http://47.96.41.38:8101/';// url公用地址 +// var parkcloudbaseUrl = 'http://127.0.0.1:8101/';// url公用地址 +//var parkcloudbaseUrl = 'http://localhost:8101/';// url公用地址 + @@ -129,20 +131,24 @@ var fn ={ }, //登出系统 loginOut: function () { - fn.toLoginPage(); - sessionStorage.clear(); - fn.setToken(''); + var token = fn.getToken(); + if (token != "" && token != null) { + var opt = { method: "post", url: dataUrl.util.getLoginOut(), success: function(res){ - console.log(" redis session has been cleared...") + sessionStorage.clear() + fn.setToken(''); + fn.toLoginPage(); + } }; sysAjax(opt); + } }, @@ -338,10 +344,8 @@ function sysAjax(opts) { }else{ xhr.setRequestHeader("X-Auth-Token", fn.getToken()); } - }, success: function (res, status, xhr) { - debugger; var msg = (typeof res.msg == 'string') && (res.msg.constructor == String) ? res.msg : res.errMsg; //成功 if (res.code=='2003') { diff --git a/topages/workfill/workfill.html b/topages/workfill/workfill.html index 276fdeb..1299722 100644 --- a/topages/workfill/workfill.html +++ b/topages/workfill/workfill.html @@ -14,9 +14,9 @@ -
  • +
  • @@ -62,9 +62,9 @@ - +
  • -
  • 取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价
  • +
  • 取政策,收紧了异地购房、离婚购房提取公积金等操作,但多地也都强调,支持提取公积金用于购买首套住房或二套改善型住房。此外,由于房价
  • @@ -74,9 +74,9 @@ -
  • +
  • @@ -104,9 +104,9 @@ -
  • +
  • @@ -134,9 +134,9 @@ -
  • +
  • @@ -164,9 +164,9 @@ -
  • +
  • @@ -194,9 +194,9 @@ -
  • +
  • diff --git a/topages/workfill/workfill.js b/topages/workfill/workfill.js index 15e8e94..b3fbb06 100644 --- a/topages/workfill/workfill.js +++ b/topages/workfill/workfill.js @@ -71,7 +71,7 @@ var fun = { }, /***获取项目下拉框.*/ getAsraProject:function(){ - //debugger; + // debugger; fn.getAsraProject("",function(data){ var html=""; $.each(data,function(index,row){ @@ -122,32 +122,49 @@ var fun = { getAsraDailyListMsg:function(){ // debugger; fun.queryAsraDailyList(function(data){ + /**先进性初始化*/ for(var i=1;i<8;i++){ - $("#btn-commit"+i).parent().parent().attr("style","display:block;"); + if($("#weekday" + i).next().hasClass("commited-icon")) { + $("#weekday" + i).next().removeClass("commited-icon"); + $("#weekday" + i).next().addClass("nocommited-icon"); + $("#weekday" + i).next().html("未填写"); + } + $("#weekday"+i).parent().parent().show(); + $("#btn-commit"+i).html('提交'); $("#work-projectName"+i).selectpicker('val',''); $("#work-projectName"+i).selectpicker('refresh'); $("#daily-report"+i).html(""); //如果不是本周则隐藏按钮 - if(clicknum == 1){ - $("#btn-commit"+i).attr("style","display:none;"); - $("#btn-commit"+i).parent().parent().find(".workfill-list-container").attr("contenteditable","false"); - $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); - var projectName=$("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); - $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); - $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); + if(clicknum >= 1) { + $("#btn-commit" + i).attr("style", "display:none;"); + $("#daily-report" + i).attr("contenteditable", "false"); + $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); + var projectName = $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); + $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); + $("#btn-commit" + i).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); + var ele = $("#weekday" + i).parent(); + ele.find('.slide-text').text('全部展开') + ele.parent().siblings().find('.slide-icon').removeClass('slide-icon-active'); + ele.find('.slide-icon').addClass('slide-icon-active'); + ele.parent().siblings().find('.workquery-list-container').slideUp(); + ele.parent().find('.workquery-list-container').slideUp(); }else if(clicknum == 0){ //日期回填 var date = moment().subtract('days', weekOfday-i).format('YYYY-MM-DD 01:00:00'); $("#weekday"+i).attr("data-date",date); if(weekOfday-i < 0){ $("#btn-commit"+i).attr("style","display:none;"); - $("#btn-commit"+i).parent().parent().attr("style","display:none;"); - }else { + $("#weekday"+i).parent().parent().hide(); + }else if(weekOfday-i == 0){ + if(weekOfday-i == 0){ + var ele = $("#weekday"+i).parent(); + fun.listToggle(ele); + } $("#btn-commit"+i).attr("style","display:block;"); } //展示变更 - $("#btn-commit"+i).parent().parent().find(".workfill-list-container").attr("contenteditable","true"); + $("#daily-report"+i).attr("contenteditable","true"); if($("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')) { $("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').removeClass('display-none'); var projectName=$("#btn-commit"+i).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); @@ -156,14 +173,21 @@ var fun = { } } } + /**回填数据*/ $.each(data,function(index,row){ + if($("#weekday" + row.weeksNum).next().hasClass("nocommited-icon")) { + $("#weekday" + row.weeksNum).next().removeClass("nocommited-icon"); + $("#weekday" + row.weeksNum).next().addClass("commited-icon"); + $("#weekday" + row.weeksNum).next().html("已填写"); + } + $("#weekday"+row.weeksNum).attr("data-id",row.id); $("#daily-report"+row.weeksNum).html(row.dailyContent); $("#work-projectName"+row.weeksNum).selectpicker('val',row.projectId); $("#work-projectName"+row.weeksNum).selectpicker('refresh'); $("#btn-commit"+row.weeksNum).html('编辑'); - $("#btn-commit"+row.weeksNum).parent().parent().find(".workfill-list-container").attr("contenteditable","false"); + $("#daily-report"+row.weeksNum).attr("contenteditable","false"); $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); var projectName=$("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); $("#btn-commit"+row.weeksNum).parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); @@ -206,13 +230,20 @@ var fun = { var asraId = res.data; $("#weekday"+id).attr("data-id",asraId); _this.html('编辑'); - _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); + _this.parent().next().attr("contenteditable","false"); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').addClass('display-none'); var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').removeClass('display-none'); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); _this.removeAttr("disabled"); + if($("#weekday" + id).next().hasClass("nocommited-icon")) { + $("#weekday" + id).next().removeClass("nocommited-icon"); + $("#weekday" + id).next().addClass("commited-icon"); + $("#weekday" + id).next().html("已填写"); + } + + }else{ $('.ITD-alertmodel-contentmsg').text('提交失败!'); $('#ITD-tipsmodel').modal('show'); @@ -249,7 +280,7 @@ documentBindFunc.on('click','.workfill-list-btn',function () { var _this=$(this); if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){ _this.html('提交'); - _this.parent().parent().find(".workfill-list-container").attr("contenteditable","true"); + _this.parent().next().attr("contenteditable","true"); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none');