jack-PC\jack 8 anni fa
parent
commit
e79384cc99
52 ha cambiato i file con 1401 aggiunte e 798 eliminazioni
  1. BIN
      .DS_Store
  2. 1 0
      VisualInspection/css/common/foot.css
  3. 7 1
      VisualInspection/css/statistics/toll_station_statistics.css
  4. 3 2
      VisualInspection/css/user/addUser.css
  5. BIN
      VisualInspection/images/back.png
  6. BIN
      VisualInspection/images/end.png
  7. BIN
      VisualInspection/images/start.png
  8. BIN
      VisualInspection/images/up.png
  9. 6 1
      VisualInspection/js/appeal_management/appeal_checked.js
  10. 6 6
      VisualInspection/js/constant/constant.js
  11. 191 256
      VisualInspection/js/lib/imageupload/css/common.css
  12. 78 5
      VisualInspection/js/main.js
  13. 1 1
      VisualInspection/js/mytask/apply_task.js
  14. 10 5
      VisualInspection/js/mytask/check.js
  15. 43 13
      VisualInspection/js/other_check/other_check.js
  16. 4 0
      VisualInspection/js/role/addpermision.js
  17. 3 1
      VisualInspection/js/role/addrole.js
  18. 25 17
      VisualInspection/js/role/permision.js
  19. 9 7
      VisualInspection/js/role/role.js
  20. 11 3
      VisualInspection/js/statistics/appeal.js
  21. 12 12
      VisualInspection/js/statistics/assess_ranking.js
  22. 7 2
      VisualInspection/js/statistics/check_workload_statistics.js
  23. 72 30
      VisualInspection/js/statistics/personal_data_statistics.js
  24. 76 33
      VisualInspection/js/statistics/road_manage_statistics.js
  25. 33 18
      VisualInspection/js/statistics/toll_station_statistics.js
  26. 72 26
      VisualInspection/js/statistics/total_company_statistics.js
  27. 1 1
      VisualInspection/js/teamClass/charge_team_schedule.js
  28. 52 34
      VisualInspection/js/user/addUser.js
  29. 4 3
      VisualInspection/js/user/adddept.js
  30. 19 15
      VisualInspection/js/user/userManager.js
  31. 49 27
      VisualInspection/js/util/service.js
  32. 25 5
      VisualInspection/js/util/util.js
  33. 34 4
      VisualInspection/view/common/head.html
  34. 2 2
      VisualInspection/view/mytask/appealDetail.html
  35. 2 2
      VisualInspection/view/mytask/applyDetail.html
  36. 316 218
      VisualInspection/view/mytask/taskDetail.html
  37. 134 0
      VisualInspection/view/other_check/toubleshoot_check.html
  38. 2 2
      VisualInspection/view/role/addpermision.html
  39. 3 0
      VisualInspection/view/role/permision.html
  40. 24 20
      VisualInspection/view/statistics/check_workload_statistics.html
  41. 2 2
      VisualInspection/view/statistics/personal_data_statistics.html
  42. 8 2
      VisualInspection/view/statistics/toll_station_statistics.html
  43. 2 2
      VisualInspection/view/term_management/charge_stuff_schedule.html
  44. 2 2
      VisualInspection/view/user/addDept.html
  45. 7 3
      VisualInspection/view/user/addUser.html
  46. 4 1
      VisualInspection/view/user/userManager.html
  47. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/JobController.java
  48. 2 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TaskController.java
  49. 10 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java
  50. 12 2
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  51. 2 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java
  52. 12 7
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

BIN
.DS_Store


+ 1 - 0
VisualInspection/css/common/foot.css

@@ -4,6 +4,7 @@ footer {
     position: absolute;
     width: 100%;
     z-index: 0;
+    position: absolute;
 }
 
 footer p {

+ 7 - 1
VisualInspection/css/statistics/toll_station_statistics.css

@@ -108,8 +108,14 @@
 .view_change{
     width:60px;
     height:40px;
-    background: url("/images/change-btn.png?time=2017725152348") no-repeat center center ;
+    background: url("/images/up.png?time=2017725152349") no-repeat center center ;
     cursor: pointer;
+    background-size: 30%;
+}
+
+.view_change.active{
+    background: url("/images/back.png?time=2017725152349") no-repeat center center ;
+    background-size: 30%;
 }
 
 .row-3,.row-4,.row-6,.row-7{

+ 3 - 2
VisualInspection/css/user/addUser.css

@@ -1,10 +1,11 @@
-.ll{
+.ll {
     width: 120px;
 }
 
-.lll{
+.lll {
     padding-right: 0px;
 }
+
 .cc {
     padding-left: 20px;
 }

BIN
VisualInspection/images/back.png


BIN
VisualInspection/images/end.png


BIN
VisualInspection/images/start.png


BIN
VisualInspection/images/up.png


+ 6 - 1
VisualInspection/js/appeal_management/appeal_checked.js

@@ -53,5 +53,10 @@ function queryCheckedAppealTask(){
 function showTaskDetail(id){
     var rowData=getItemByIdFromArr(id,$('#checked_datatable').mytable('getTableData'));
     $.checkTask = rowData;
-    changePage("/view/mytask/taskDetail.html",checkedAppealTableObj);
+    post_common_service("/checkAppeal/getByTaskId", {"task_id":rowData.id}, function(data){
+        $.checkTask = rowData;
+        $.checkTask.appeal = data;
+        changePage("/view/mytask/taskDetail.html", checkedAppealTableObj);
+    });
+    // changePage("/view/mytask/taskDetail.html",checkedAppealTableObj);
 }

+ 6 - 6
VisualInspection/js/constant/constant.js

@@ -4,14 +4,14 @@ function queryConstant(){
         "flag_name": $("#keywords").val()
     }
     var cols = [
-                {width: 80, text: '序号', type: 'number', flex: false, field: 'num'},
-                {width: 80, text: '字典值', type: 'string', flex: false, field: 'code_value'},
+                {width: 40, text: '序号', type: 'number', flex: true, field: 'num'},
+                {width: 40, text: '字典值', type: 'string', flex: true, field: 'code_value'},
                 {width: 80, text: '字典名称', type: 'string', flex: true, field: 'code_name'},
-                {width: 80, text: '有效标志', type: 'string', flex: false, field: 'valid'},
-                {width: 80, text: '字典标识', type: 'string', flex: true, field: 'code_flag'},
-                {width: 160, text: '标识名称', type: 'string', flex: false, field: 'flag_name'},
+                {width: 60, text: '有效标志', type: 'string', flex: true, field: 'valid'},
+                {width: 160, text: '字典标识', type: 'string', flex: true, field: 'code_flag'},
+                {width: 160, text: '标识名称', type: 'string', flex: true, field: 'flag_name'},
                 {width: 80, text: '备注', type: 'string', flex: true, field: 'remark'},
-                {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
+                {width: 80, text: '操作', type: 'string', flex: true, field: 'id',
                     oper:[
                         {func:'showEditConstant',text:'修改',icon_class:'icon-edit'},
                         {func:'deleteConstant',text:'删除',icon_class:'icon-remove-circle'}

+ 191 - 256
VisualInspection/js/lib/imageupload/css/common.css

@@ -1,256 +1,191 @@
-* {
-	box-sizing: border-box;
-	-moz-box-sizing: border-box;
-	/* Firefox */
-	-webkit-box-sizing: border-box;
-	/* Safari */
-}
-.up-section .type-upimg{
-	display: none;
-}
-::-ms-clear,::-ms-reveal{display:none;}
-textarea{
-	outline: none;
-	line-height: 14px;
-	padding-left: 4px;
-	padding-top: 4px;
-	border: 1px solid #ccc;
-	color: #444;
-	font-size: 14px;
-	outline: none;
-	text-align: left;
-}
-.overflow{
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-}
-button{
-	outline: none;
-	border: 0px;
-	font-family: "微软雅黑", "PingFang SC", "arial, helvetica, sans-serif";
-}
-input{
-	font-family: "微软雅黑", "PingFang SC", "arial, helvetica, sans-serif";
-	outline: none;
-}
-a {
-	outline: none;
-}
-a,button{cursor:pointer;} 
-
-body {
-	background: #f4f4f4;
-	font-size: 14px;
-	font-family: "微软雅黑", "PingFang SC", "arial, helvetica, sans-serif";
-}
-.clear {
-	clear: both;
-}
-.full{
-	width: 1210px;
-	min-width: 1210px;
-	margin: 0 auto;
-}
-.full-big{
-	width: 1340px;
-	min-width: 1340px;
-	margin: 0 auto;
-}
-.img-full{
-	display: block;
-	width: 100%;
-}
-::-webkit-input-placeholder {
-	color: #777;
-	font-size: 14px;
-}
-:-moz-placeholder {
-	/* Firefox 18- */
-	color: #777;
-	font-size: 14px;
-}
-::-moz-placeholder {
-	/* Firefox 19+ */
-	color: #777;
-	font-size: 14px;
-}
-:-ms-input-placeholder {
-	color:#777;
-	font-size: 14px;
-}
-/* ====clear float====== */
-/*nav a:visited{color: rgb(65,65,65);}
-aside a:visited{color: rgb(65,65,65);}*/
-.fl {
-	float: left;
-}
-.fr {
-	float: right;
-}
-.clear:after {
-	content: '';
-	display: block;
-	clear: both;
-}
-/* reset */
-.pic img{display: none;}
-i,
-p,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-hr,
-br,
-em,
-dl,
-dd,
-li,
-ul,
-ol,
-td,
-th,
-pre,
-form,
-body,
-input,
-strong,
-textarea,
-select,figcaption,figure{
-	margin: 0;
-	padding: 0;
-}
-em {
-	font-style: normal
-}
-li {
-	list-style: none
-}
-a {
-	text-decoration: none;
-}
-img {
-	border: none;
-	
-}
-table {
-	border-collapse: collapse;
-}
-textarea {
-	resize: none;
-	overflow: auto;
-}
-a,button{cursor:pointer;} 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+* {
+    box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    /* Firefox */
+    -webkit-box-sizing: border-box;
+    /* Safari */
+}
+
+.up-section .type-upimg {
+    display: none;
+}
+
+::-ms-clear,
+::-ms-reveal {
+    display: none;
+}
+
+textarea {
+    outline: none;
+    line-height: 14px;
+    padding-left: 4px;
+    padding-top: 4px;
+    border: 1px solid #ccc;
+    color: #444;
+    font-size: 14px;
+    outline: none;
+    text-align: left;
+}
+
+.overflow {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+button {
+    outline: none;
+    border: 0px;
+    font-family: "微软雅黑", "PingFang SC", "arial, helvetica, sans-serif";
+}
+
+input {
+    font-family: "微软雅黑", "PingFang SC", "arial, helvetica, sans-serif";
+    outline: none;
+}
+
+a {
+    outline: none;
+}
+
+a,
+button {
+    cursor: pointer;
+}
+
+body {
+    background: #f4f4f4;
+    font-family: "微软雅黑", "PingFang SC", "arial, helvetica, sans-serif";
+}
+
+.clear {
+    clear: both;
+}
+
+.full {
+    width: 1210px;
+    min-width: 1210px;
+    margin: 0 auto;
+}
+
+.full-big {
+    width: 1340px;
+    min-width: 1340px;
+    margin: 0 auto;
+}
+
+.img-full {
+    display: block;
+    width: 100%;
+}
+
+::-webkit-input-placeholder {
+    color: #777;
+    font-size: 14px;
+}
+
+:-moz-placeholder {
+    /* Firefox 18- */
+    color: #777;
+    font-size: 14px;
+}
+
+::-moz-placeholder {
+    /* Firefox 19+ */
+    color: #777;
+    font-size: 14px;
+}
+
+:-ms-input-placeholder {
+    color: #777;
+    font-size: 14px;
+}
+
+
+/* ====clear float====== */
+
+
+/*nav a:visited{color: rgb(65,65,65);}
+aside a:visited{color: rgb(65,65,65);}*/
+
+.fl {
+    float: left;
+}
+
+.fr {
+    float: right;
+}
+
+.clear:after {
+    content: '';
+    display: block;
+    clear: both;
+}
+
+
+/* reset */
+
+.pic img {
+    display: none;
+}
+
+i,
+p,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+hr,
+br,
+em,
+dl,
+dd,
+li,
+ul,
+ol,
+td,
+th,
+pre,
+form,
+body,
+input,
+strong,
+textarea,
+select,
+figcaption,
+figure {
+    margin: 0;
+    padding: 0;
+}
+
+em {
+    font-style: normal
+}
+
+li {
+    list-style: none
+}
+
+a {
+    text-decoration: none;
+}
+
+img {
+    border: none;
+}
+
+table {
+    border-collapse: collapse;
+}
+
+textarea {
+    resize: none;
+    overflow: auto;
+}
+
+a,
+button {
+    cursor: pointer;
+}

+ 78 - 5
VisualInspection/js/main.js

@@ -1,7 +1,8 @@
 var MENU;
+
 //计算左面的
 $(document).ready(function() {
-
+    initUserinfo();
 
     setletftime();
     getServerTime();
@@ -48,6 +49,13 @@ $(document).ready(function() {
         });
     });
 
+    $("#update_user").on("click", function() {
+        edittype = "update"
+        user = $.zui.store.get("user")
+        loadUserData(user)
+        $('#updateUserModal').modal('show')
+    })
+
 
 
     MenuGetAll(function(data) {
@@ -105,6 +113,71 @@ $(document).ready(function() {
 
 });
 
+
+var roles = [];
+var zdata = [];
+
+function initUserinfo() {
+
+    getJob();
+
+    RoleGetALLNoData(function(data) {
+
+        roles = [];
+        for (var i = 0; i < data.length; i++) {
+            var m = data[i];
+            var zdataItem = {};
+            zdataItem["id"] = m.id;
+            zdataItem["title"] = m.des;
+            roles.push(zdataItem);
+        }
+    }, function(error) {
+
+    });
+
+    DeptGetAll(function(data) {
+        zdata = [];
+        for (var i = 0; i < data.length; i++) {
+            var m = data[i];
+            var zdataItem = {};
+            zdataItem["id"] = m.id;
+            zdataItem["value"] = m.id;
+            zdataItem["pId"] = null;
+            zdataItem["name"] = m.organname;
+            zdataItem["open"] = true;
+            zdataItem["children"] = addobj_child(m);
+            zdata.push(zdataItem);
+        }
+        // dept_tree = $.fn.zTree.init($("#department_tree"), setting, zdata)
+    }, function(error) {
+
+    });
+
+}
+
+function addobj_child(data) {
+    var zdata = [];
+    if (typeof(data.childs) != "undefined" && data.childs != null &&
+        data.childs.length > 0) {
+        for (var i = 0; i < data.childs.length; i++) {
+            var m = data.childs[i];
+            var zdataItem = {};
+            zdataItem["id"] = m.id;
+            zdataItem["value"] = m.id;
+            zdataItem["pId"] = data.id;
+            zdataItem["icon"] = "";
+            zdataItem["open"] = true;
+            zdataItem["name"] = m.organname;
+            zdataItem["children"] = addobj_child(m);
+            zdata.push(zdataItem);
+        }
+        return zdata;
+    } else {
+        return [];
+    }
+}
+
+
 function chageToPageUI(menu) {
     $('#treeMenu').tree('expand', $("#" + menu.parentId).parent());
     $('#treeMenu li.active').removeClass('active');
@@ -170,10 +243,10 @@ function changePage(url, tableObj) {
     // console.log(pre_param);
     if (typeof(url) != "undefined") {
         //记住表格当前页
-        if(tableObj){
-            var data_param = $.zui.store.get('store_param_'+current_url);
-            if(data_param) data_param.currentpage=tableObj.options.pager.p_cur;
-            $.zui.store.set('store_param_'+current_url,data_param);
+        if (tableObj) {
+            var data_param = $.zui.store.get('store_param_' + current_url);
+            if (data_param) data_param.currentpage = tableObj.options.pager.p_cur;
+            $.zui.store.set('store_param_' + current_url, data_param);
         }
 
         CURRENT_PAGE_URL = url;

+ 1 - 1
VisualInspection/js/mytask/apply_task.js

@@ -96,7 +96,7 @@ function queryUnexaminedTask(){
     console.log(colFunc.oper);
     cols.push(colFunc);
     var checkable = false;
-    if(cur_status==21){
+    if(cur_status==21 && hasRole(ROLE_JICHA_ADMIN)){
         checkable = true;
     }
     $('#unexamined_datatable').mytable({'cols':cols,

+ 10 - 5
VisualInspection/js/mytask/check.js

@@ -256,7 +256,7 @@ function checkUserCount() {
 }
 
 function showCheckDetailCount() {
-    scoreDetailLayer = showPopup4Common('本周已考核任务', null, ['450px', '350px'], '#checked_task_list_div', 'r');
+    scoreDetailLayer = showPopup4Common('本周已考核任务', null, ['450px', '350px'], '#checked_task_list_div', 'r', '确定');
     var param = {
         "period_id": $.checkTask.period_id,
         "checked_person": $.checkTask.checked_person,
@@ -298,6 +298,7 @@ function initCheckAppealBtns() {
 function showAppealLayer() {
     layer.open({
         type: 1,
+        area: ['400px', "400px"],
         title: "申诉详情",
         closeBtn: 1,
         shade: false,
@@ -567,7 +568,7 @@ function showChangeUser() {
     };
 
     post_common_service("/user/getUserList/", param, function(data) {
-        changePersonLayer = showPopup4Common('更改人员', null, ['550px', '600px'], null, 'r');
+        changePersonLayer = showPopup4Common('更改人员', null, ['550px', '600px'], null, 'r', '确定');
         $("#user_container").empty();
         var userStr = "";
         for (var i in data) {
@@ -767,20 +768,23 @@ function getCheckItems() {
     };
 
     get_common_service('checkItem/getAll', null, function(data) {
+        console.log(data);
         zdata = [];
         for (var i = 0; i < data.length; i++) {
             var m = data[i];
             zdata.push(genNode(m));
         }
+        console.log(zdata);
         menu_tree = $.fn.zTree.init($("#items_tree"), setting, zdata)
     }, function(error) {
 
     });
 }
 
-function addobj(data) {
+function addobj_checkitem(data) {
+    console.log(data.subCheckItem);
     var zdata = [];
-    if (typeof(data.subCheckItem) != "undefinde" && data.subCheckItem != null &&
+    if (typeof(data.subCheckItem) != "undefined" && data.subCheckItem != null &&
         data.subCheckItem.length > 0) {
         for (var i = 0; i < data.subCheckItem.length; i++) {
             var m = data.subCheckItem[i];
@@ -803,7 +807,8 @@ function genNode(m) {
     //zdataItem["content"] = m.name;
     if (m.score) zdataItem["name"] = m.name + '(' + m.score + ')';
     zdataItem["open"] = true;
-    zdataItem["children"] = addobj(m);
+    console.log(m.subCheckItem);
+    zdataItem["children"] = addobj_checkitem(m);
     return zdataItem;
 }
 

+ 43 - 13
VisualInspection/js/other_check/other_check.js

@@ -74,6 +74,7 @@ var al_data = [];
         })
         queryTable();
     }
+
      //关闭弹窗
     $("#close-layer").click(function(){
         layer.closeAll();
@@ -173,12 +174,21 @@ var al_data = [];
         $("#editImage").empty();
         layerUpdateTeam('form-div','稽查记录新增','550px');
         $("#save-check").html("保存");
+
+        
+        //debugger;
+        var nodedata;
+        $("#add_btn").data("tree_flag",1);
+        loadData(nodedata);
+        $("#add_btn").data("tree_flag",0);
+      
+
         $("#check_item_select input").on("click", function() {
             //debugger;
-            var nodedata;
-            $("#add_btn").data("tree_flag",1);
-            loadData(nodedata);
-            $("#add_btn").data("tree_flag",0);
+            // var nodedata;
+            // $("#add_btn").data("tree_flag",1);
+            // loadData(nodedata);
+            // $("#add_btn").data("tree_flag",0);
         })
     })
 function queryTable(){
@@ -239,15 +249,23 @@ function updateCheckTeam(id){
         edittype = "edit";
         layerUpdateTeam('form-div','稽查记录修改','550px');
         $("#save-check").html("修改");
+
+         var nodedata;
+        if($("#check_item_select input") != undefined && $("#check_item_select input") != ""){
+            nodedata = check_item_tree.getNodeByParam("name",$("#check_item_select input").val(), null);
+        }
+        loadData(nodedata);
+
+
         $("#check_item_select input").on("click", function() {
             //debugger;
-            var nodedata;
-            if($("#check_item_select input") != undefined && $("#check_item_select input") != ""){
-                nodedata = check_item_tree.getNodeByParam("name",$("#check_item_select input").val(), null);
-            }
-            $("#add_btn").data("tree_flag",1);
-            loadData(nodedata);
-            $("#add_btn").data("tree_flag",0);
+            // var nodedata;
+            // if($("#check_item_select input") != undefined && $("#check_item_select input") != ""){
+            //     nodedata = check_item_tree.getNodeByParam("name",$("#check_item_select input").val(), null);
+            // }
+            // $("#add_btn").data("tree_flag",1);
+            // loadData(nodedata);
+            // $("#add_btn").data("tree_flag",0);
         })
     }, function(){
 
@@ -369,6 +387,16 @@ function refreshUploader(){
         setPersonal();
     });
 
+    $("#check_item_select").delegate("div[id*='treeSelect_panel_'] ","blur",function(){
+        // alert(1)
+        if($(this).is(":hidden")){
+            if(map[dept_selectinput.value] != null ){
+                $("#check_score").val( map[dept_selectinput.value]  );
+            }else{
+                 $("#check_score").val("");
+            }
+        }
+    })
     
     function layerUpdateTeam(domId,title,area){
         var uploader = $('#uploaderExample').data('zui.uploader');
@@ -461,7 +489,6 @@ function refreshUploader(){
      }
 
      function zTreeOnClick(event, treeId, treeNode) {
-
         var rowdata = [];
 
         seq = 0 ;
@@ -559,9 +586,12 @@ function refreshUploader(){
             zdataItem["children"] = addobj(m);
             zdataItem.open = false;
             zdata.push(zdataItem);
+            map[m.id] =  m.score ;
         }
         return zdata;
     } else {
         return [];
     }
-}
+}
+
+var map =  {} ;

+ 4 - 0
VisualInspection/js/role/addpermision.js

@@ -7,8 +7,12 @@ function loadPermisionData(nodedata) {
 
     if (edittype == "add") {
         $("#dept_name").val("")
+        $('#addModal .modal-title').html('添加权限');
+        $('#permision_add_btn').html('添加');
     }
     if (edittype == "edit") {
+        $('#addModal .modal-title').html('修改权限');
+        $('#permision_add_btn').html('保存');
         permisiontemp = PermisionMap.get(nodedata[0].id);
         setPermison();
     }

+ 3 - 1
VisualInspection/js/role/addrole.js

@@ -5,11 +5,13 @@ function loadRoleData(role) {
     $("#role_level").val("");
 
     if(role!=null && edittype=="edit"){
+       $('#addRoleModal .modal-title').html('修改角色');
          $("#role_name").val(role.name);
         $("#role_des").val(role.des);
         $("#role_level").val(role.level);
         roletemp = role;
-       
+    }else{
+        $('#addRoleModal .modal-title').html('添加角色');
     }
 
     $("#role_add_btn").off("click");

+ 25 - 17
VisualInspection/js/role/permision.js

@@ -63,14 +63,18 @@ $(document).ready(function () {
             });
             return;
         }
-        PermisionDelete(nodedata[0].id, function (data) {
-            layer.msg('删除成功!', {
-                time: 2000, //20s后自动关闭
-            });
-            dept_tree.removeNode(nodedata[0]);
-        }, function (error) {
 
-        });
+        deleteItem4Common(function(){
+            PermisionDelete(nodedata[0].id, function (data) {
+                layer.msg('删除成功!', {
+                    time: 2000, //20s后自动关闭
+                });
+                dept_tree.removeNode(nodedata[0]);
+            }, function (error) {
+
+            });
+        }); 
+        
     });
     $("#role_add").on("click", function () {
         var nodedata = dept_tree.getSelectedNodes();
@@ -83,6 +87,7 @@ $(document).ready(function () {
         }
         loadPermisionRoleData(nodedata, 0)
         $('#addRoleModal').modal('show');
+        $('#addRoleModal .modal-title').html('添加角色');
     });
 
     $('.datatable').datatable({
@@ -97,10 +102,11 @@ $(document).ready(function () {
     $('.datatable').on('click', 'button', function () {
         if (this.name == "user_edit") {
             var nodedata = dept_tree.getSelectedNodes();
-            edittype = "edit"
-            var user = nodedata
-            loadPermisionRoleData(user, this.id)
-            $('#addRoleModal').modal('show')
+            edittype = "edit";
+            var user = nodedata;
+            loadPermisionRoleData(user, this.id);
+            $('#addRoleModal').modal('show');
+            $('#addRoleModal .modal-title').html('修改角色');
         }
         if (this.name == "user_delete") {
             var nodedata = dept_tree.getSelectedNodes();
@@ -108,17 +114,19 @@ $(document).ready(function () {
                 "role_id": this.id,
                 "permission_id": nodedata[0].id
             }
-            PermisionRoleDELETE(data, function (data) {
-                layer.msg('角色删除成功!', {
-                    time: 2000, //20s后自动关闭
-                }, function () {
+            deleteItem4Common(function(){
+                PermisionRoleDELETE(data, function (data) {
                     var nodedata = dept_tree.getSelectedNodes();
                     updateRole(nodedata[0].id)
-                });
-            },
+                    layer.msg('角色删除成功!', {
+                        time: 2000, //20s后自动关闭
+                    }, function () {
+                    });
+                },
                 function (error) {
 
                 })
+            });
         }
     });
 

+ 9 - 7
VisualInspection/js/role/role.js

@@ -57,17 +57,19 @@ $(document).ready(function () {
             $('#addRoleModal').modal('show');
         }
         if (this.name == "user_delete") {
-
-            RoleDelete(this.id, function (data) {
-                layer.msg('角色删除成功!', {
-                    time: 2000, //20s后自动关闭
-                }, function () {
+            var roleId = this.id;
+            deleteItem4Common(function(){
+                RoleDelete(roleId, function (data) {
                     getrole(pagesize, 1);
-                });
-            },
+                    layer.msg('角色删除成功!', {
+                        time: 2000, //20s后自动关闭
+                    }, function () {
+                    });
+                },
                 function (error) {
 
                 })
+            });           
         }
     });
 

+ 11 - 3
VisualInspection/js/statistics/appeal.js

@@ -162,15 +162,18 @@ function getappleTaskList(deptid, name, status) {
 
 
     var title = name + " " + $("#sel_month").val() + "月份" + (status == 0 ? "所有" : status == 1 ? "成功" : "失败") + "申诉任务列表"
+    var isshownumber = false;
 
-
+    if (hasRole(ROLE_JICHA_ADMIN) || hasRole(ROLE_ADMIN)) {
+        isshownumber = true;
+    }
 
     var cols = [
         { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
         { width: 160, text: '任务名称', type: 'href_link', flex: true, sort: 'down', field: '<a href=\"javascript:void(0);\" onclick=\"jumptodetail(\'$field=id$\')\">$field=name$</a>' },
         { width: 80, text: '考核人员', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
         { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
-        { width: 80, text: '稽查人员', type: 'string', flex: true, hide: false, colClass: '', field: 'checkman_name' },
+        { width: 80, text: '稽查人员', type: 'href_link', flex: true, hide: false, colClass: '', field: isshownumber ? '$field=checkman_name$' : '-' },
         { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' }
     ];
 
@@ -239,7 +242,12 @@ function jumptodetail(id) {
         $.zui.store.set('store_param_' + current_url, pdata);
 
         url = "/view/mytask/taskDetail.html"
-        changePage(url);
+
+        post_common_service("/checkAppeal/getByTaskId", { "task_id": id }, function(data) {
+            $.checkTask.appeal = data;
+            changePage(url);
+        });
+
     }, function(error) {
 
     });

+ 12 - 12
VisualInspection/js/statistics/assess_ranking.js

@@ -270,10 +270,10 @@ function showAddTaskListView(data, widthtemp, heighttemp, start_date, end_date)
 
 
     var days = (endday.valueOf() - satrtday.valueOf()) / (1000 * 60 * 60 * 24);
-    var header = "<td></td>"
-    var nighttd = "<td>夜班</td>"
-    var middletd = "<td>中班</td>"
-    var morningtd = "<td>早班</td>"
+    var header = "<td style='background:#e5e5e5'></td>"
+    var nighttd = "<td style='background:#e5e5e5'>夜班</td>"
+    var middletd = "<td style='background:#e5e5e5'>中班</td>"
+    var morningtd = "<td style='background:#e5e5e5'>早班</td>"
 
     for (var i = 1; i <= days; i++) {
         var daytime = new Date(satrtday.valueOf() + i * 1000 * 60 * 60 * 24 - 1000 * 60 * 60 * 23);
@@ -411,7 +411,7 @@ function showAddTaskListView(data, widthtemp, heighttemp, start_date, end_date)
 
 
 
-        header += "<td>" + daytime.Format("dd") + "</td>"
+        header += "<td style='background:#ddd'>" + daytime.Format("dd") + "</td>"
     }
 
 
@@ -457,13 +457,13 @@ function showAddTaskListView(data, widthtemp, heighttemp, start_date, end_date)
         '    <tr style="height:10px" >' +
         header +
         '    </tr>' +
-        '    <tr class="danger">' +
+        '    <tr>' +
         nighttd +
         '    </tr>' +
-        '    <tr class="warning">' +
+        '    <tr  style="background:#f1f1f1">' +
         morningtd +
         '    </tr>' +
-        '    <tr class="active">' +
+        '    <tr>' +
         middletd +
         '    </tr>' +
         '  </tbody>' +
@@ -523,9 +523,9 @@ function addTask(userid, username, stationname, checknum, start_date, end_date)
 
     post_common_service(url, param, function(data) {
 
-        var allheight = 600;
+        var allheight = 700;
         var height = allheight - 150 - 45;
-        var allwidth = 1100;
+        var allwidth = 1200;
 
 
         var html = showAddTaskListView(data, allwidth, allheight, start_date, end_date);
@@ -601,9 +601,9 @@ function creatTask() {
                         }
                         post_common_service(url, param, function(data) {
 
-                            var allheight = 600;
+                            var allheight = 700;
                             var height = allheight - 150 - 45;
-                            var allwidth = 1100;
+                            var allwidth = 1200;
 
                             var html = showAddTaskListView(data, allwidth, allheight, data_p.start_date, data_p.end_date);
 

+ 7 - 2
VisualInspection/js/statistics/check_workload_statistics.js

@@ -134,8 +134,9 @@ $(function() {
         }
         var user_id = $("#select-personal").val();
         // 表格
-        initAppealPage(start_date, end_date, user_id);
         checkman_info(start_date, end_date, user_id);
+        initAppealPage(start_date, end_date, user_id);
+
     });
 
     /**
@@ -154,9 +155,10 @@ $(function() {
                 sec.innerHTML = '';
             }
             var user_id = $("#select-personal").val();
+            checkman_info(start_date, end_date, user_id);
             // 初始化表格
             initAppealPage(start_date, end_date, user_id);
-            checkman_info(start_date, end_date, user_id);
+
         }, function(error) {
             return "";
         });
@@ -178,7 +180,10 @@ $(function() {
             "end_date": end_date,
             "checkman_id": user_id
         }
+
+
         post_common_service("statistics/checkman/info", param, function(data) {
+            console.log(data)
             if (data != null) {
                 WH(".all_check_task", GDV(data.all_task_num, 0));
                 WH(".all_check_minute", convertT(GDV(data.all_check_minute, 0)));

+ 72 - 30
VisualInspection/js/statistics/personal_data_statistics.js

@@ -26,6 +26,9 @@ var end_date = $(".div-end input").val() + " 23:00:00";
 $(function() {
     setVisit();
 
+
+
+
     //*************************************数据表格******************************************
     function initAppealPage(start_date, end_date, user_id) {
         initQueryParams();
@@ -95,15 +98,15 @@ $(function() {
                 if (p_c.fee_station_ranking != undefined && p_l.fee_station_ranking != undefined) {
                     var dept_r = p_c.fee_station_ranking - p_l.fee_station_ranking;
                     if (dept_r != 0) {
-                        $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
+                        $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "#08a208") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
                     }
                     var com_r = p_c.company_ranking - p_l.company_ranking;
                     if (com_r != 0) {
-                        $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
+                        $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "#08a208") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
                     }
                     var road_r = p_c.center_ranking - p_l.center_ranking;
                     if (road_r != 0) {
-                        $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "green") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
+                        $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "#08a208") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
                     }
                 }
             }
@@ -111,34 +114,73 @@ $(function() {
 
 
 
-        var data = {
-            "start_date": start_date,
-            "end_date": end_date,
-            "user_id": user_id,
-            "queryType": 0,
-            "score_flag": $(".score-select").val()
-        }
-        if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || hasRole(ROLE_JICHA) || roleContains('STATION')) {
-            hide = true;
-        }
 
-        var cols = [
-            { width: 50, text: '序号', flex: true, colClass: 'text-center', field: 'num' },
-            { width: 100, text: '时间段', flex: true, colClass: 'text-center', field: 'check_task_time_name' },
-            { width: 80, text: '扣分人', flex: true, colClass: 'text-center', field: 'checked_name' },
-            { width: 40, text: '扣分数', flex: true, colClass: 'text-center', field: 'score', nullvalue: '0' },
-            { width: 100, text: '考核类型', flex: true, colClass: 'text-center', sort: 'down', field: 'parent_name' },
-            { width: 100, text: '考核项', flex: true, colClass: 'text-center', sort: 'down', field: 'name' },
-            { width: 100, text: '扣分凭证', type: 'imagedd', flex: true, hide: hide, field: 'pics' },
-        ];
-        if (cur_status == 12 || cur_status == 13) {
-            data.check_status_arr = [12, 13];
-        }
-        $('#personal_data_table').mytable({
-            'cols': cols,
-            'url': "/statistics/one/checkedItem/detail/info",
-            'param': data
-        });
+        $.ajax({
+            type: "OPTIONS",
+            url: base_ui_url,
+            complete: function(x) {
+
+                //计算当前周期
+                var now_date_time = moment(new Date(x.getResponseHeader("Date")))
+                var current_start_date = null;
+
+                if (now_date_time.date() >= 26) {
+                    current_start_date = moment(now_date_time.format("YYYY-MM") + "-25 23:00:00Z").subtract(0, "month");
+                } else {
+                    current_start_date = moment(now_date_time.format("YYYY-MM") + "-25 23:00:00Z").subtract(1, "month");
+                }
+                var end_date_time = moment(end_date + "Z");
+
+                if (end_date_time.valueOf() > current_start_date.valueOf()) {
+                    if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || roleContains('STATION')) {
+                        $(".score-select").val(1)
+                    }
+                }
+
+                var data = {
+                    "start_date": start_date,
+                    "end_date": end_date,
+                    "user_id": user_id,
+                    "queryType": 0,
+                }
+                if ($(".score-select").val() == "0") {
+                    data["score_flag"] = 0;
+                }
+                if ($(".score-select").val() == "1") {
+                    data["score_flag"] = 1;
+                }
+
+                if (hasRole(ROLE_STATION_ADMIN) || hasRole(ROLE_STATION) || hasRole(ROLE_JICHA) || roleContains('STATION')) {
+                    hide = true;
+                }
+
+                var cols = [
+                    { width: 50, text: '序号', flex: true, colClass: 'text-center', field: 'num' },
+                    { width: 100, text: '时间段', flex: true, colClass: 'text-center', field: 'check_task_time_name' },
+                    { width: 80, text: '扣分人', flex: true, colClass: 'text-center', field: 'checked_name' },
+                    { width: 40, text: '扣分数', flex: true, colClass: 'text-center', field: 'score', nullvalue: '0' },
+                    { width: 100, text: '考核类型', flex: true, colClass: 'text-center', sort: 'down', field: 'parent_name' },
+                    { width: 100, text: '考核项', flex: true, colClass: 'text-center', sort: 'down', field: 'name' },
+                    { width: 100, text: '扣分凭证', type: 'imagedd', flex: true, hide: hide, field: 'pics' },
+                ];
+                if (cur_status == 12 || cur_status == 13) {
+                    data.check_status_arr = [12, 13];
+                }
+                $('#personal_data_table').mytable({
+                    'cols': cols,
+                    'url': "/statistics/one/checkedItem/detail/info",
+                    'param': data
+                });
+
+            }
+        })
+
+
+
+
+
+
+
     }
 
 

+ 76 - 33
VisualInspection/js/statistics/road_manage_statistics.js

@@ -1,5 +1,6 @@
 var year = new Date().getFullYear();
 var month = new Date().getMonth();
+var x_m_array = new Array();
 var date = new Date().getDate();
 var year_assess;
 var score_rank;
@@ -85,13 +86,12 @@ $(function() {
         echart(flag);
         var select_month = $("#month_date").val();
         var select_road = $(".div-roadManage select").val();
-        console.log(select_road);
-        if (flag == true) {
-            init_company_year_assess("statistics/score/year/info", select_road);
-        }
+
+        init_company_year_assess("statistics/score/year/info", select_road, select_month.split('/')[0], select_month.split('/')[1]);
+
         // 查询图二
         // init_company_points_assess("statistics/lost/score/rate",select_month+'',select_road);
-        init_company_points_assess("statistics/score/info", select_month.split('/')[1] + '');
+        init_company_points_assess("statistics/score/info", select_month.split('/')[0], select_month.split('/')[1]);
         // 查询图三
         init_stationAll_rank("statistics/score/manage/tollgate/info", select_month + '', select_road);
         // 查询图四
@@ -107,10 +107,21 @@ $(function() {
     /**
      * 初始化图一
      */
-    function init_company_year_assess(url, select_road) {
+    function init_company_year_assess(url, select_road, y, m) {
+        x_m_array = new Array();
+        for (var i = 1; i <= 12; i++) {
+            var month = parseInt(m) + i;
+            var starty = parseInt(y) - 1
+            if (month > 12) {
+                month = month - 12;
+                starty = y;
+            }
+            x_m_array.push(starty + "/" + (month >= 10 ? month : ("0" + month)));
+        }
+
         var param = {
-            "start_date": (year - 1) + "-" + new Date().getMonth() + "-25" + " 23:00:00",
-            "end_date": year + "-" + (new Date().getMonth() + 1) + "-25" + " 23:00:00",
+            "start_date": (parseInt(y) - 1) + "-" + m + "-25" + " 23:00:00",
+            "end_date": y + "-" + m + "-25" + " 23:00:00",
             "dept_id": select_road,
             "queryType": 1
         }
@@ -120,15 +131,16 @@ $(function() {
     /**
      * 初始化图二
      */
-    function init_company_points_assess(url, mon, select_road) {
-        // var param = {
-        // 	"mth":mon,
-        // 	"dept_id":select_road,
-        // 	"queryType":1
-        // }
-        // initRqueset(url,param,2);
+    function init_company_points_assess(url, y, mon, select_road) {
+        var starty = y;
+        var startm = parseInt(mon) - 1;
+
+        if (startm <= 0) {
+            startm = 12;
+            starty = parseInt(y) - 1;
+        }
         var param = {
-            "start_date": year + '-' + (mon - 1) + '-25 23:00:00',
+            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-25 23:00:00',
             "end_date": year + '-' + mon + '-25 23:00:00'
         }
         initRqueset(url, param, 2);
@@ -284,22 +296,27 @@ $(function() {
         if (type == 1) {
             array_year_score.length = 0;
             if (data != null && data.length != 0) {
-                if (data.length < 14) {
-                    for (var i = 0; i < 14 - data.length; i++) {
-                        // 不足月份补0
-                        array_year_score.push(0);
+
+
+                for (var i = 0; i < x_m_array.length; i++) {
+
+                    var index = -1;
+                    for (var j = 0; j < data.length; j++) {
+                        if (x_m_array[i] == data[j].mth) {
+                            index = j;
+                            break;
+                        }
                     }
-                }
-                for (var i = 0; i < data.length; i++) {
-                    if (months.indexOf(data[i].mth.substr(2))) {
-                        // 指定位置插入值
-                        array_year_score.splice(months.indexOf(data[i].mth.substr(2)), 0,
-                            (1000 - (filter_handler(data[i].all_check_score, data[i].checked_num, 1.0, 0))));
+                    if (index < 0) array_year_score.push(0);
+                    else {
+                        array_year_score.push(
+                            (1000 - (filter_handler(data[index].all_check_score, data[index].checked_num, 1.0, 0))));
                     }
                 }
+
             } else {
                 array_year_score.length = 0;
-                months.length = 0;
+                x_m_array = new Array();
             }
             if (eval("Math.min(" + array_year_score.toString() + ")") == 0)
                 min_year = 0;
@@ -688,7 +705,7 @@ $(function() {
             xAxis: [{
                 type: 'category',
                 boundaryGap: false,
-                data: months
+                data: x_m_array
             }],
             yAxis: [{
                 type: 'value',
@@ -1178,8 +1195,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
 
-                                    return '上月\n' + t_map_p.get(name);
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1221,8 +1240,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
 
-                                    return '上月\n' + t_map_p.get(name);
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1267,8 +1288,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
 
-                                    return '本月\n' + t_map_c.get(name);
                                 },
                                 textStyle: {
                                     color: 'red'
@@ -1303,6 +1326,19 @@ $(function() {
                                 show: true,
                                 position: 'top',
                                 formatter: '本月',
+                                formatter: function(params) {
+                                    var name = params.name
+                                    if (name == '仪表') {
+                                        name = '仪容仪表着装';
+                                    }
+                                    if (name == '行为') {
+                                        name = '工作纪律及行为举止';
+                                    }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
+
+                                },
                                 textStyle: {
                                     color: 'red'
                                 }
@@ -1314,7 +1350,13 @@ $(function() {
             }
         }
 
-
+        var maxvaluedata = 0;
+        t_map_c.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+        t_map_p.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
 
 
         var namelist = new Array();
@@ -1379,7 +1421,8 @@ $(function() {
                 data: namelist
             }],
             yAxis: [{
-                type: 'value'
+                type: 'value',
+                max: (maxvaluedata + 200)
             }],
             series: sdata
         };

+ 33 - 18
VisualInspection/js/statistics/toll_station_statistics.js

@@ -1,5 +1,6 @@
      	var year = new Date().getFullYear();
      	var month = new Date().getMonth();
+     	var x_m_array = new Array();
      	var date = new Date().getDate();
      	var select_road = $(".div-roadManage select").val();
      	var select_station = $("#second").val();
@@ -70,9 +71,9 @@
      	        echart(flag);
      	        echart_change();
      	        echart_change2();
-     	        if (flag == true) {
-     	            init_tollStation_year_assess("statistics/score/year/info", select_station);
-     	        }
+
+     	        init_tollStation_year_assess("statistics/score/year/info", select_station, select_month.split('/')[0], select_month.split('/')[1]);
+
      	        // flag = false;
 
      	        top5_change(select_month, select_station);
@@ -89,10 +90,21 @@
      	    /**
      	     * 初始化图一
      	     */
-     	    function init_tollStation_year_assess(url, select_station) {
+     	    function init_tollStation_year_assess(url, select_station, y, m) {
+     	        x_m_array = new Array();
+     	        for (var i = 1; i <= 12; i++) {
+     	            var month = parseInt(m) + i;
+     	            var starty = parseInt(y) - 1
+     	            if (month > 12) {
+     	                month = month - 12;
+     	                starty = y;
+     	            }
+     	            x_m_array.push(starty + "/" + (month >= 10 ? month : ("0" + month)));
+     	        }
+
      	        var param = {
-     	                "start_date": (year - 1) + "-" + new Date().getMonth() + "-25" + " 23:00:00",
-     	                "end_date": year + "-" + (new Date().getMonth() + 1) + "-25" + " 23:00:00",
+     	                "start_date": (parseInt(y) - 1) + "-" + m + "-25" + " 23:00:00",
+     	                "end_date": y + "-" + m + "-25" + " 23:00:00",
      	                "dept_id": select_station,
      	                "queryType": 2
      	            }
@@ -258,22 +270,25 @@
      	        if (type == 1) {
      	            array_year_score.length = 0;
      	            if (data != '' &&  data.length != 0) {
-     	                if (data.length < 14) {
-     	                    for (var i = 0; i < 14 - data.length; i++) {
-     	                        // 不足月份补0
-     	                        array_year_score.push(0);
+
+     	                for (var i = 0; i < x_m_array.length; i++) {
+
+     	                    var index = -1;
+     	                    for (var j = 0; j < data.length; j++) {
+     	                        if (x_m_array[i] == data[j].mth) {
+     	                            index = j;
+     	                            break;
+     	                        }
      	                    }
-     	                }
-     	                for (var i = 0; i < data.length; i++) {
-     	                    if (months.indexOf(data[i].mth.substr(2))) {
-     	                        // 指定位置插入值
-     	                        array_year_score.splice(months.indexOf(data[i].mth.substr(2)), 0,
-     	                            (1000 - (filter_handler(data[i].all_check_score, data[i].checked_num * 1.00, 1.00, 0))));
+     	                    if (index < 0) array_year_score.push(0);
+     	                    else {
+     	                        array_year_score.push(
+     	                            (1000 - (filter_handler(data[index].all_check_score, data[index].checked_num * 1.00, 1.0, 0))));
      	                    }
      	                }
      	            } else {
      	                array_year_score.length = 0;
-     	                months.length = 0;
+     	                x_m_array = new Array();
      	            }
      	            if (eval("Math.min(" + array_year_score.toString() + ")") == 0)
      	                min_year = 0;
@@ -667,7 +682,7 @@
      	            xAxis: [{
      	                type: 'category',
      	                boundaryGap: false,
-     	                data: months
+     	                data: x_m_array
      	            }],
      	            yAxis: [{
      	                type: 'value',

+ 72 - 26
VisualInspection/js/statistics/total_company_statistics.js

@@ -1,4 +1,5 @@
 var year = new Date().getFullYear();
+var x_m_array = new Array();
 var date = new Date().getDate();
 var array_year_score = new Array();
 var array_points = new Array();
@@ -59,10 +60,10 @@ $(function() {
         echart(flag);
         var select_month = $("#month_date").val();
         // console.log(select_month);
-        if (flag) init_company_year_assess();
+        init_company_year_assess(select_month.split('/')[0], select_month.split('/')[1]);
         // 查询图二
         //	init_company_points_assess("statistics/lost/score/rate",select_month+'');
-        init_company_points_assess("statistics/score/info", select_month.split('/')[1] + '');
+        init_company_points_assess("statistics/score/info", select_month.split('/')[0], select_month.split('/')[1]);
         // 查询图三
         init_road_manager_score_rank_three("statistics/score/center/manage/info", select_month + '');
         // 查询图四
@@ -75,11 +76,25 @@ $(function() {
     /**
      * 初始化图一
      */
-    function init_company_year_assess() {
+    function init_company_year_assess(y, m) {
+
+        x_m_array = new Array();
+        for (var i = 1; i <= 12; i++) {
+            var month = parseInt(m) + i;
+            var starty = parseInt(y) - 1
+            if (month > 12) {
+                month = month - 12;
+                starty = y;
+            }
+            x_m_array.push(starty + "/" + (month >= 10 ? month : ("0" + month)));
+        }
+
         var param = {
-            "start_date": (year - 1) + "-" + new Date().getMonth() + "-25" + " 23:00:00",
-            "end_date": year + "-" + (new Date().getMonth() + 1) + "-25" + " 23:00:00"
+            "start_date": (parseInt(y) - 1) + "-" + m + "-25" + " 23:00:00",
+            "end_date": y + "-" + (m) + "-25" + " 23:00:00"
         }
+
+
         initRqueset("statistics/score/year/info", param, 1);
 
     }
@@ -87,10 +102,17 @@ $(function() {
     /**
      * 初始化图二
      */
-    function init_company_points_assess(url, mon) {
+    function init_company_points_assess(url, y, mon) {
+        var starty = y;
+        var startm = parseInt(mon) - 1;
+
+        if (startm <= 0) {
+            startm = 12;
+            starty = parseInt(y) - 1;
+        }
         var param = {
-            "start_date": year + '-' + (mon - 1) + '-25 23:00:00',
-            "end_date": year + '-' + mon + '-25 23:00:00'
+            "start_date": starty + '-' + (startm >= 10 ? startm : ("0" + startm)) + '-25 23:00:00',
+            "end_date": y + '-' + mon + '-25 23:00:00'
         }
         initRqueset(url, param, 2);
     }
@@ -244,25 +266,31 @@ $(function() {
      */
     function data_array(data, type) {
         if (type == 1) {
+
             array_year_score.length = 0;
             if (data != '' && data.length != 0) {
-                if (data.length < 14) {
-                    for (var i = 0; i < 14 - data.length; i++) {
-                        // 不足月份补0
-                        array_year_score.push(0);
+
+                for (var i = 0; i < x_m_array.length; i++) {
+
+                    var index = -1;
+                    for (var j = 0; j < data.length; j++) {
+                        if (x_m_array[i] == data[j].mth) {
+                            index = j;
+                            break;
+                        }
                     }
-                }
-                for (var i = 0; i < data.length; i++) {
-                    if (months.indexOf(data[i].mth.substr(2))) {
-                        // 指定位置插入值
-                        array_year_score.splice(months.indexOf(data[i].mth.substr(2)), 0,
-                            (1000 - (filter_handler(data[i].all_check_score, data[i].checked_num, 1.0, 0))));
+                    if (index < 0) array_year_score.push(0);
+                    else {
+                        array_year_score.push(
+                            (1000 - (filter_handler(data[index].all_check_score, data[index].checked_num, 1.0, 0))));
                     }
                 }
             } else {
                 array_year_score.length = 0;
-                months.length = 0;
+                x_m_array = new Array();
             }
+
+
             if (eval("Math.min(" + array_year_score.toString() + ")") == 0)
                 min_year = 0;
             else
@@ -614,7 +642,7 @@ $(function() {
             xAxis: [{
                 type: 'category',
                 boundaryGap: false,
-                data: months
+                data: x_m_array
             }],
             yAxis: [{
                 type: 'value',
@@ -979,6 +1007,7 @@ $(function() {
         var t_map_p = new HashMap();
         var t_map_c = new HashMap();
 
+
         var sdata = new Array();
 
         for (var j = 0; j < array_all_deptname.length; j++) {
@@ -1020,7 +1049,9 @@ $(function() {
                                         name = '工作纪律及行为举止';
                                     }
 
-                                    return '上月\n' + t_map_p.get(name);
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1062,8 +1093,9 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
-
-                                    return '上月\n' + t_map_p.get(name);
+                                    var v = t_map_p.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '上月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'blue'
@@ -1109,7 +1141,9 @@ $(function() {
                                         name = '工作纪律及行为举止';
                                     }
 
-                                    return '本月\n' + t_map_c.get(name);
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
+                                    return '本月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'red'
@@ -1150,8 +1184,10 @@ $(function() {
                                     if (name == '行为') {
                                         name = '工作纪律及行为举止';
                                     }
+                                    var v = t_map_c.get(name);
+                                    if (isNaN(v)) v = 0;
 
-                                    return '本月\n' + t_map_c.get(name);
+                                    return '本月\n' + v;
                                 },
                                 textStyle: {
                                     color: 'red'
@@ -1164,6 +1200,15 @@ $(function() {
             }
         }
 
+        var maxvaluedata = 0;
+        t_map_c.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+        t_map_p.forEach(function(value, key) {
+            if (value > maxvaluedata) maxvaluedata = value;
+        })
+
+
 
         var namelist = new Array();
         for (var i = 0; i < array_all_name.length; i++) {
@@ -1227,7 +1272,8 @@ $(function() {
                 data: namelist
             }],
             yAxis: [{
-                type: 'value'
+                type: 'value',
+                max: (maxvaluedata + 200)
             }],
             series: sdata
         };

+ 1 - 1
VisualInspection/js/teamClass/charge_team_schedule.js

@@ -523,7 +523,7 @@
                   for (var i = 0; i < data.length; i++) {
                       var ct = data[i].class_type;
                       $(".tr-" + ct).data("cache", data[i]);
-                      $(".tr-" + ct).append("<td vertical-align='middle' align='center' style='width:140px;'><span style='font-weight:bold;'>" + classCode[ct].class_name + "<br></span><span>" + classCode[ct].start_time + "</span> - <span>" + classCode[ct].end_time + "</span></td>");
+                      $(".tr-" + ct).append("<td vertical-align='middle' align='center' style='width:140px;background:#F8F8F8;'><span style='font-weight:bold;'>" + classCode[ct].class_name + "<br></span><span>" + classCode[ct].start_time + "</span> - <span>" + classCode[ct].end_time + "</span></td>");
 
 
 

+ 52 - 34
VisualInspection/js/user/addUser.js

@@ -20,7 +20,7 @@ function loadUserData(nodedata) {
 
     $(".ComboTreeItemChlid").find("input").prop('checked', false);
 
-    if (edittype == "edit") {
+    if (edittype == "edit" || edittype == "update") {
         usertemp = nodedata;
         pnode = [{ "id": usertemp.organid }]
         initUserInfo()
@@ -40,7 +40,7 @@ function loadUserData(nodedata) {
     });
 
     $("#user_add_btn").off("click");
-    $("#user_add_btn").on("click", function () {
+    $("#user_add_btn").on("click", function() {
         addUser();
     })
 
@@ -52,7 +52,7 @@ function resetform() {
     $("#user_workno").val("");
     $("#user_password").val("");
     $("#user_confirm_password").val("")
-    // $("#user_birth").val("")
+        // $("#user_birth").val("")
     $("#user_mobile").val("")
     $("#user_position").val("")
     $("#user_idno").val("")
@@ -61,6 +61,15 @@ function resetform() {
     $("#user_img_add").removeClass("hide");
     $("#user_img_pre").addClass("hide");
 
+
+    var html = "";
+    for (var i = 0; i < job_array.length; i++) {
+        html += "<option value='" + job_array[i].id + "'>" + job_array[i].name + "</option>"
+    }
+    $("#user_position").html(html);
+
+
+
 }
 
 function initUserInfo() {
@@ -70,7 +79,7 @@ function initUserInfo() {
     $("#user_workno").val(usertemp.workno);
     $("#user_password").val(usertemp.password);
     $("#user_confirm_password").val(usertemp.password)
-    // $("#user_birth").val(moment.unix(usertemp.birth / 1000).format("YYYY-MM-DD"))
+        // $("#user_birth").val(moment.unix(usertemp.birth / 1000).format("YYYY-MM-DD"))
     $("#user_mobile").val(usertemp.mobile)
     $("#user_position").val(usertemp.positionid)
     $("#user_idno").val(usertemp.idno)
@@ -79,13 +88,13 @@ function initUserInfo() {
     $("#user_img_pre2").html("")
     $("#user_img_add").removeClass("hide");
     $("#user_img_pre").addClass("hide");
-    if (typeof (usertemp.pic) != "undefinde" && usertemp.pic != null) {
+    if (typeof(usertemp.pic) != "undefinde" && usertemp.pic != null) {
         $("#user_img_pre").removeClass("hide");
         $("#user_img_add").addClass("hide");
         var $section = $("#user_img_pre2");
         var $span = $("<span class='up-span'>");
         $span.appendTo($section);
-        var $img0 = $("<img class='close-upimg'>").on("click", function (event) {
+        var $img0 = $("<img class='close-upimg'>").on("click", function(event) {
             event.preventDefault();
             event.stopPropagation();
             // $(".works-mask").show();
@@ -98,7 +107,7 @@ function initUserInfo() {
         });
         $img0.attr("src", "/js/lib/imageupload/img/a7.png").appendTo($section);
         var $img = $("<img class='up-img up-opcity' id='user_pic' style='height:200px;width: auto;'>");
-        $img.attr("src", base_image_server_url+usertemp.pic);
+        $img.attr("src", base_image_server_url + usertemp.pic);
         $img.appendTo($section);
         var $p = $("<p class='img-name-p'>");
         $p.html("image").appendTo($section);
@@ -118,11 +127,11 @@ function initUserInfo() {
             ii["title"] = usertemp.roles[j].des;
             attr.push(ii);
 
-            $("span[data-id='"+usertemp.roles[j].id+"']").find("input").prop('checked', true)
+            $("span[data-id='" + usertemp.roles[j].id + "']").find("input").prop('checked', true)
         }
     }
 
-    
+
 
     role_selectinput._selectedItems = attr;
     role_selectinput.refreshInputVal();
@@ -145,7 +154,7 @@ function addUser() {
     var userposition = $("#user_position").val();
     var usertruename = $("#user_true_name").val();
     var userroles = role_selectinput.getSelectedItemsId();
-    if (userpassword != null && typeof (userpassword) != "undefined" && userpassword != userconfirmpassword) {
+    if (userpassword != null && typeof(userpassword) != "undefined" && userpassword != userconfirmpassword) {
         layer.msg('密码不一致!', {
             time: 2000, //20s后自动关闭
         });
@@ -157,72 +166,81 @@ function addUser() {
         "truename": usertruename,
         "roleids": userroles
     }
-    if(!parm.roleids) {
+    if (!parm.roleids) {
         layer.msg('用户角色不能为空!', {
             time: 2000, //20s后自动关闭
         });
         return;
     }
-    if (userpassword != "" && userpassword != null && typeof (userpassword) != "undefined") {
+    if (userpassword != "" && userpassword != null && typeof(userpassword) != "undefined") {
         parm["password"] = userpassword;
-    }else{
-        layer.msg('密码不能为空!', {
-            time: 2000, //20s后自动关闭
-        });
-        return;
+    } else {
+        // layer.msg('密码不能为空!', {
+        //     time: 2000, //20s后自动关闭
+        // });
+        // return;
     }
-    if (usermobile != null && typeof (usermobile) != "undefined") {
+    if (usermobile != null && typeof(usermobile) != "undefined") {
         parm["mobile"] = usermobile;
         parm["phone"] = usermobile;
     }
-    if (username != "" && username != null && typeof (username) != "undefined") {
+    if (username != "" && username != null && typeof(username) != "undefined") {
         parm["username"] = username;
-    }else{
+    } else {
         layer.msg('账号不能为空!', {
             time: 2000, //20s后自动关闭
         });
         return;
     }
-    if (userworkno != null && typeof (userworkno) != "undefined") {
+    if (userworkno != null && typeof(userworkno) != "undefined") {
         parm["workno"] = userworkno;
     }
-    if (useridno != null && typeof (useridno) != "undefined") {
+    if (useridno != null && typeof(useridno) != "undefined") {
         parm["idno"] = useridno;
     }
-    if (useremail != null && typeof (useremail) != "undefined") {
+    if (useremail != null && typeof(useremail) != "undefined") {
         parm["email"] = useridno;
     }
-    if (userpic != null && typeof (userpic) != "undefined") {
+    if (userpic != null && typeof(userpic) != "undefined") {
         parm["pic"] = userpic;
     }
 
 
 
 
-    if (edittype == "edit") {
+    if (edittype == "edit" || edittype == "update") {
         parm["id"] = usertemp.id;
-        UserUpdate(parm, function (data) {
+        UserUpdate(parm, function(data) {
             layer.msg('修改成功!', {
                 time: 2000, //20s后自动关闭
-            }, function () {
-                $('#addUserModal').modal('hide')
-                updateUser(dept_selectinput.value)
+            }, function() {
+                if (edittype == "edit") {
+                    updateUser(dept_selectinput.value)
+                    $('#addUserModal').modal('hide')
+                }
+                if (edittype == "update") {
+                    $('#updateUserModal').modal('hide')
+                    GetUserInfo(function(data) {
+                        var html = "<i class=\"icon icon-user\"></i>  " + data.truename + " " + data.organname + ",欢迎您"
+                        $("#user").html(html);
+                    }, function(error) {})
+                }
             });
-        }, function (error) {
+        }, function(error) {
 
         });
 
         return;
     }
 
-    UserAdd(parm, function (data) {
+    UserAdd(parm, function(data) {
         layer.msg('添加成功!', {
             time: 2000, //20s后自动关闭
-        }, function(data) { 
+        }, function(data) {
             $('#addUserModal').modal('hide');
-            updateUser(dept_selectinput.value);           
+            updateUser(dept_selectinput.value);
         });
-    }, function (error) {
+    }, function(error) {
         layer.msg('添加失败!输入参数不正确!', {
             time: 2000, //20s后自动关闭
         });

+ 4 - 3
VisualInspection/js/user/adddept.js

@@ -3,20 +3,21 @@ var selectednodetemp;
 
 function loadData(nodedata) {
     var pnode = nodedata;
-
+    
     if (edittype == "add") {
         $("#dept_name").val("")
+        $('#addModal .modal-title').html('添加部门');
     }
     if (edittype == "edit") {
         selectednodetemp = nodedata[0];
         $("#dept_name").val(nodedata[0].name)
         $("#dept_add_btn").html("保存")
-        if (pnode != null && pnode.length > 0) {
+        $('#addModal .modal-title').html('修改部门');
+        if (pnode != null && pnode[0].pId && pnode.length > 0) {
             pnode = [dept_tree.getNodeByParam("id", pnode[0].pId, null)]
         }
     }
 
-
     dept_selectinput = new TreeSelect({
         element: '#dept_select',
         data: zdata,

+ 19 - 15
VisualInspection/js/user/userManager.js

@@ -50,6 +50,7 @@
 
  var roles = [];
  $(document).ready(function() {
+     getJob();
 
      //  $("#main_content_title").html("用户管理")
 
@@ -101,24 +102,27 @@
          edittype = "edit"
          loadData(nodedata)
          $('#addModal').modal('show');
+         
      });
 
      $("#dept_delete").on("click", function() {
-         //获取选中的节点
-         var nodedata = dept_tree.getSelectedNodes();
-         if (nodedata.length < 1) {
-             layer.msg('请先选择部门!', {
-                 time: 2000, //20s后自动关闭
-             });
-             return;
-         }
-         DeptDelete(nodedata[0].id, function(data) {
-             layer.msg('删除成功!', {
-                 time: 2000, //20s后自动关闭
-             });
-             dept_tree.removeNode(nodedata[0]);
-         }, function(error) {
-
+         
+        //获取选中的节点
+        var nodedata = dept_tree.getSelectedNodes();
+        if (nodedata.length < 1) {
+            layer.msg('请先选择部门!', {
+                time: 2000, //20s后自动关闭
+            });
+            return;
+        }
+        deleteItem4CallBack(function(){
+            DeptDelete(nodedata[0].id, function(data) {
+                layer.msg('删除成功!', {
+                    time: 2000, //20s后自动关闭
+                });
+                dept_tree.removeNode(nodedata[0]);
+            }, function(error) {
+            });
          });
      });
 

+ 49 - 27
VisualInspection/js/util/service.js

@@ -14,6 +14,28 @@ function UserLogin(body, success, fail) {
         fail("网络错误");
     });
 }
+
+function GetUserInfo(success, fail) {
+
+    var url = base_server_url + "/user/getUserInfo"
+    ajaxGet(url, "", function(response) {
+        var data = response;
+        if (data.result_code == 0) {
+            //存储token
+            var user = $.zui.store.get("user");
+            data.result_data.token = user.token;
+            $.zui.store.set("user", data.result_data);
+            success(data.result_data)
+        } else {
+            fail(data.result_desc);
+        }
+    }, function(error) {
+        fail("网络错误");
+    });
+
+}
+
+
 function UserLoginOUT(success, fail) {
     var url = base_server_url + USER_LOGOUT
     ajaxGet(url, "", function(response) {
@@ -117,7 +139,7 @@ function PermisionGetAll(success, fail) {
     });
 }
 
-function PermisionRoleAdd(data,success, fail) {
+function PermisionRoleAdd(data, success, fail) {
     var url = base_server_url + PERMISION_ROLE_ADD
     ajaxPost(url, data, function(response) {
         var data = response;
@@ -131,7 +153,7 @@ function PermisionRoleAdd(data,success, fail) {
     });
 }
 
-function PermisionRoleEDIT(data,success, fail) {
+function PermisionRoleEDIT(data, success, fail) {
     var url = base_server_url + PERMISION_ROLE_EDIT
     ajaxPut(url, data, function(response) {
         var data = response;
@@ -146,7 +168,7 @@ function PermisionRoleEDIT(data,success, fail) {
 }
 
 
-function PermisionRoleDELETE(data,success, fail) {
+function PermisionRoleDELETE(data, success, fail) {
     var url = base_server_url + PERMISION_ROLE_DELETE
     ajaxDelete(url, data, function(response) {
         var data = response;
@@ -163,7 +185,7 @@ function PermisionRoleDELETE(data,success, fail) {
 
 
 
-function PermisionAdd(data,success, fail) {
+function PermisionAdd(data, success, fail) {
     var url = base_server_url + PERMISION_ADD
     ajaxPost(url, data, function(response) {
         var data = response;
@@ -177,8 +199,8 @@ function PermisionAdd(data,success, fail) {
     });
 }
 
-function PermisionEdit(data,success, fail) {
-    var url = base_server_url + PermisionEdit+data.id
+function PermisionEdit(data, success, fail) {
+    var url = base_server_url + PermisionEdit + data.id
     ajaxPut(url, data, function(response) {
         var data = response;
         if (data.result_code == 0) {
@@ -191,8 +213,8 @@ function PermisionEdit(data,success, fail) {
     });
 }
 
-function PermisionDelete(id,success, fail) {
-    var url = base_server_url + PERMISION_DELETE+id;
+function PermisionDelete(id, success, fail) {
+    var url = base_server_url + PERMISION_DELETE + id;
     ajaxDelete(url, "", function(response) {
         var data = response;
         if (data.result_code == 0) {
@@ -281,7 +303,7 @@ function getConstantList(url, param, success, fail) {
 
 
 function VideoGetById(id, success, fail) {
-    var url = base_server_url + VIDEO_GET_ID +id;
+    var url = base_server_url + VIDEO_GET_ID + id;
     ajaxGet(url, "", function(response) {
         var data = response;
         if (data.result_code == 0) {
@@ -300,11 +322,11 @@ function no_return_common_service(url, param, success, fail) {
     ajaxPost(url, param, function(response) {
         var data = response;
         if (data.result_code == 0) {
-            if(success)
+            if (success)
                 success(data.result_desc)
         } else {
             layer.msg(data.result_desc, {
-                time: 2000//20s后自动关闭
+                time: 2000 //20s后自动关闭
             });
         }
     }, function(error) {
@@ -319,13 +341,13 @@ function post_common_service(url, param, success, fail) {
         if (data.result_code == 0) {
             success(data.result_data)
         } else {
-            if(fail)
+            if (fail)
                 fail(data.result_desc);
             else
                 console.log(data.result_desc);
         }
     }, function(error) {
-        if(fail)
+        if (fail)
             fail("网络错误");
         else
             console.log("网络错误");
@@ -363,14 +385,14 @@ function get_common_service_nohead(url, param, success, fail) {
 
 
 // 上传文件
-function uploadFile(file, name, successfunc, errorfunc,parentPath) {
-    var dataurl = base_image_server_url+"/fileServer" + FILE_UPLOAD
+function uploadFile(file, name, successfunc, errorfunc, parentPath) {
+    var dataurl = base_image_server_url + "/fileServer" + FILE_UPLOAD
     var form = new FormData();
     form.append(name, file);
-    if(parentPath)
-        form.append('parentPath',parentPath);
+    if (parentPath)
+        form.append('parentPath', parentPath);
     else
-        form.append('parentPath','head');
+        form.append('parentPath', 'head');
     $.ajax({
         url: dataurl,
         type: "POST",
@@ -407,7 +429,7 @@ function RoleGetALLNoData(success, fail) {
     });
 }
 
-function RoleAdd(data,success, fail) {
+function RoleAdd(data, success, fail) {
     var url = base_server_url + ROLE_ADD;
     ajaxPost(url, data, function(response) {
         var data = response;
@@ -421,8 +443,8 @@ function RoleAdd(data,success, fail) {
     });
 }
 
-function RoleUpdate(data,success, fail) {
-    var url = base_server_url + ROLE_EDIT+data.id;
+function RoleUpdate(data, success, fail) {
+    var url = base_server_url + ROLE_EDIT + data.id;
     ajaxPut(url, data, function(response) {
         var data = response;
         if (data.result_code == 0) {
@@ -435,8 +457,8 @@ function RoleUpdate(data,success, fail) {
     });
 }
 
-function RoleDelete(roleid,success, fail) {
-    var url = base_server_url + ROLE_DELETE +roleid;
+function RoleDelete(roleid, success, fail) {
+    var url = base_server_url + ROLE_DELETE + roleid;
     ajaxDelete(url, "", function(response) {
         var data = response;
         if (data.result_code == 0) {
@@ -454,8 +476,8 @@ function RoleDelete(roleid,success, fail) {
 
 
 
-function RoleGetByPermision(permisionid,success, fail) {
-    var url = base_server_url + ROLE_GET_BY_PERMISION+permisionid;
+function RoleGetByPermision(permisionid, success, fail) {
+    var url = base_server_url + ROLE_GET_BY_PERMISION + permisionid;
     ajaxGet(url, "", function(response) {
         var data = response;
         if (data.result_code == 0) {
@@ -469,8 +491,8 @@ function RoleGetByPermision(permisionid,success, fail) {
 }
 
 
-function RoleGetALL(page,size, success, fail) {
-    var url = base_server_url + ROLE_GET_ALL_DATA+"/"+page+"/"+size;
+function RoleGetALL(page, size, success, fail) {
+    var url = base_server_url + ROLE_GET_ALL_DATA + "/" + page + "/" + size;
     ajaxGet(url, "", function(response) {
         var data = response;
         if (data.result_code == 0) {

+ 25 - 5
VisualInspection/js/util/util.js

@@ -14,7 +14,7 @@ function doajax(method, dataurl, data, sucessCallBack, errorCallBack) {
             dataType: "json",
             async: true,
             data: JSON.stringify(data),
-            success: function(data){
+            success: function(data) {
                 sucessCallBack(data);
             },
             error: function(error) {
@@ -112,10 +112,11 @@ function getItemByIdFromArr(id, curDatas) {
     return rowData;
 }
 
-function showPopup4Common(title, callback, area, divId, offset) {
+function showPopup4Common(title, callback, area, divId, offset, btnName) {
     if (!area) area = 'auto';
     if (!divId) divId = '#form-div';
     if (!offset) offset = 'auto';
+    if (!btnName) btnName = '保存';
     //添加常量页面
     return layer.open({
         type: 1,
@@ -126,7 +127,7 @@ function showPopup4Common(title, callback, area, divId, offset) {
         offset: offset,
         skin: 'layui-layer-lan',
         content: $(divId),
-        btn: '保存',
+        btn: btnName,
         btnAlign: 'c', //按钮居中
         shade: 0, //不显示遮罩
         yes: function(index) {
@@ -160,6 +161,17 @@ function deleteItem4Common(id, url, okCb, offset) {
     });
 }
 
+function deleteItem4CallBack(cb) {
+    layer.confirm('确定删除记录?', {
+        shade: 0,
+        btn: ['确定', '取消'] //按钮
+    }, function() {
+        if (cb) cb();
+    }, function(index) {
+        layer.close(index);
+    });
+}
+
 function addOrUpdateItem4Common(param, url, okCb) {
     no_return_common_service(url, param, function(data) {
         if (okCb) okCb(); //重新加载表格数据
@@ -640,7 +652,15 @@ function settime() {
     nowStr = moment(nowStr).format('YYYY-MM-DD HH:mm:ss');
     $("#time_p").html(nowStr);
     $("#main").css("min-height", window.innerHeight);
-    var height = window.innerHeight - $("#main").height();
-    $("#foot").css("bottom", height > 0 ? 0 : height);
+    var height = window.innerHeight - $("body").height();
+    $("#foot").css("bottom", height > 0 ? 0 : height - $("#foot").height() - 20);
     setTimeout(gettime, 1000);
+}
+
+var job_array = new Array();
+
+function getJob() {
+    post_common_service("/job/getList", {}, function(data) {
+        job_array = data;
+    }, function(error) {});
 }

+ 34 - 4
VisualInspection/view/common/head.html

@@ -2,10 +2,10 @@
     <div class="container-fluid">
         <ul class="nav navbar-nav navbar-left">
             <li>
-                <img src="/images/logo.png"/>
+                <img src="/images/logo.png" />
             </li>
             <li>
-                <img src="/images/logo_name.png"/>
+                <img src="/images/logo_name.png" />
             </li>
         </ul>
 
@@ -13,15 +13,45 @@
 
         <ul class="nav navbar-nav navbar-right">
             <li>
-                <p id="user" class="header_font" style="padding-right:20px;cursor:pointer;"></p>
+
+                <div class="btn-group dropdown ">
+
+                    <p id="user" class="header_font" data-toggle="dropdown" style="padding-right:20px;cursor:pointer;"></p>
+
+                    <ul class="dropdown-menu" role="menu">
+                        <li><a href="javascript:void(0)" id="update_user">修改个人信息</a></li>
+                        <!-- <li><a href="###">另一个操作</a></li>
+                        <li class="divider"></li>
+                        <li><a href="###">更多操作</a></li> -->
+                    </ul>
+                </div>
+
+                <!-- <p id="user" class="header_font" style="padding-right:20px;cursor:pointer;"></p> -->
             </li>
             <li>
                 <p id="time_p" class="header_font"></p>
             </li>
 
             <li>
-               <button class="header_font logout_btn " id="login_out_btn"> <i class="icon icon-signout" style="font-size: 24px;"></i> </button>
+                <button class="header_font logout_btn " id="login_out_btn"> <i class="icon icon-signout" style="font-size: 24px;"></i> </button>
             </li>
         </ul>
     </div>
+</div>
+
+<div class="modal fade" id="updateUserModal">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-header">
+                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
+                <h4 class="modal-title">添加用户</h4>
+            </div>
+            <div class="modal-body">
+                <link rel="import" href="/view/user/addUser.html?__inline">
+            </div>
+            <div class="modal-footer">
+                <button type="button" id="user_add_btn" class="btn btn-primary">保存</button>
+            </div>
+        </div>
+    </div>
 </div>

+ 2 - 2
VisualInspection/view/mytask/appealDetail.html

@@ -12,8 +12,8 @@
             </td>
         </tr>
         <tr>
-            <td width="80%"><textarea id="recheck_result" style="height:50px;"></textarea></td>
+            <td width="80%"><textarea id="recheck_result" style="height: 150px;width:90%;"></textarea></td>
             <td width="20%"><button class="btn btn-primary" type="button" onclick="saveRecheckResult()">保存</button></td>
         </tr>
     </table>
-</div>
+</div>

+ 2 - 2
VisualInspection/view/mytask/applyDetail.html

@@ -16,8 +16,8 @@
         <div class="form-group">
             <label class="col-md-4 col-sm-2">原因</label>
             <div class="col-md-6 col-sm-10">
-                <input type="text" class="form-control" id="apply_reason" disabled="disabled" placeholder="">
+                <textarea class="form-control" id="apply_reason" disabled="disabled" placeholder="" rows="10"></textarea>
             </div>
         </div>
     </form>
-</div>
+</div>

+ 316 - 218
VisualInspection/view/mytask/taskDetail.html

@@ -1,7 +1,6 @@
-
 <div class="container-fluid ">
-      <div class="row">
-        <h3>考核基本信息</h3>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核基本信息</h3>
         <div>
             <table style="width:100%;">
                 <tr>
@@ -13,23 +12,23 @@
                 </tr>
             </table>
         </div>
-      </div>
-      <hr>
-      <div class="row">
-        <h3>考核任务流程</h3>
+    </div>
+    <hr>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核任务流程</h3>
         <div id="flow_div">
         </div>
-      </div>
-      <hr>
-      <div class="row">
-        <h3>考核详细内容</h3>
+    </div>
+    <hr>
+    <div class="row">
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">考核详细内容</h3>
         <div>
             <div id="score_datatable" data-checkable="true" data-sortable="true"></div>
         </div>
     </div>
     <hr>
     <div class="row" id="appeal_div">
-        <h3>申诉基本信息</h3>
+        <h3 style="padding-top: 10px;padding-bottom: 15px;">申诉基本信息</h3>
         <div>
             <table style="width:100%;">
                 <tr>
@@ -39,21 +38,21 @@
                 <tr>
                     <td width="20%">附件:
                         <div class="file-list" id="appeal_file_list">
-                         </div>
+                        </div>
                     </td>
                     <td>
                     </td>
                 </tr>
                 <tr>
                     <td width="20%">复核结果:
-                         <label id="recheck_result"></label>
+                        <label id="recheck_result"></label>
                     </td>
                     <td>
                     </td>
                 </tr>
             </table>
         </div>
-      </div>
+    </div>
     <div class="row" style="margin-top:5px;text-align:center">
         <div>
             <button id="submitBtn" style="display:none" type="button" class="btn btn-warning" onclick="submitCheck()">提交</button>
@@ -72,32 +71,38 @@
     <div class="row">
         <div id="img_container" class="cards cards-borderless col-sm-12">
         </div>
-    </div> 
+    </div>
 </div>
 <div id="appealDetail-div" style="display:none;text-align:center;">
-    <link rel="import" href="/view/appeal_management/appealDetail.html?__inline">   
+    <link rel="import" href="/view/appeal_management/appealDetail.html?__inline">
 </div>
 <div id="chooseCheckman-div" style="display:none;text-align:center;">
-    <link rel="import" href="/view/mytask/chooseCheckman.html?__inline">   
-</div> 
+    <link rel="import" href="/view/mytask/chooseCheckman.html?__inline">
+</div>
 <style>
-    .line{
-        text-align:center;font-size:20px;height:10px;margin:15px 0px;width:100%;background:#516784;overflow:hidden;
+    .line {
+        text-align: center;
+        font-size: 20px;
+        height: 5px;
+        margin: 15px 0px;
+        width: 100%;
+        background: #1296db;
+        overflow: hidden;
     }
+    
     .timeline_item_station {
-        left: 50%;
-        margin-left: 60px;
-        margin-top: 50px;
-        width: 40px;
-        height: 40px;
+        left: 42%;
+        /* margin-left: 55px; */
+        margin-top: 18px;
+        width: 25px;
+        height: 25px;
         padding: 15px;
         border-width: 6px;
-        background-color: #516784;
+        background-color: rgb(50, 141, 199);
         position: absolute;
         border-radius: 50%;
         padding: 10px;
         top: 0;
-        left: 10%;
         -webkit-transition: all .3s ease-out;
         transition: all .3s ease-out;
     }
@@ -112,106 +117,158 @@
         $("#checked_person").html($.checkTask.checked_person_name);
         $("#checked_dept").html($.checkTask.checked_dept_name);
 
-        if($.checkTask.appeal) {
+
+
+        if ($.checkTask.appeal) {
             $("#appeal_div").show();
             $("#appeal_time").html($.checkTask.appeal.appeal_time);
-            $("#appeal_reason").html($.checkTask.appeal.appeal_reason);       
+            $("#appeal_reason").html($.checkTask.appeal.appeal_reason);
             $("#appeal_file_list").html(genAppeaFiles($.checkTask.appeal.file_src));
             $("#recheck_result").html($.checkTask.appeal.recheck_result);
-        }else{
+        } else {
             $("#appeal_div").hide();
         }
 
         genFlow();
         queryScores();
     });
-    
+
     //初始化表行按钮
     function initBtns() {
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA+"_2",["#submitBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA+"_3",["#submitBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA+"_7",["#submitBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA+"_12",["#submitAppealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA+"_13",["#submitAppealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA+"_17",["#submitAppealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA_ADMIN+"_4",["#backBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA_ADMIN+"_6",["#backConfirmBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA_ADMIN+"_14",["#backAppealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_JICHA_ADMIN+"_11",["#assignBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_STATION_ADMIN+"_5",["#confirmBtn","#appealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_STATION_ADMIN+"_15",["#confirmAppealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_STATION_AGENT+"_5",["#confirmBtn","#appealBtn"]);
-        $.zui.store.set("task_detail_btn_"+ROLE_STATION_AGENT+"_15",["#confirmAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_2", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_3", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_7", ["#submitBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_12", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_13", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA + "_17", ["#submitAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_4", ["#backBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_6", ["#backConfirmBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_14", ["#backAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_JICHA_ADMIN + "_11", ["#assignBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_ADMIN + "_5", ["#confirmBtn", "#appealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_ADMIN + "_15", ["#confirmAppealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_AGENT + "_5", ["#confirmBtn", "#appealBtn"]);
+        $.zui.store.set("task_detail_btn_" + ROLE_STATION_AGENT + "_15", ["#confirmAppealBtn"]);
     }
-    function checkAuth(){
-        initBtns();        
-        showBtn(ROLE_JICHA,$.checkTask.check_status);
-        showBtn(ROLE_JICHA_ADMIN,$.checkTask.check_status);
-        showBtn(ROLE_STATION_ADMIN,$.checkTask.check_status);
-        showBtn(ROLE_STATION_AGENT,$.checkTask.check_status);
+
+    function checkAuth() {
+        initBtns();
+        showBtn(ROLE_JICHA, $.checkTask.check_status);
+        showBtn(ROLE_JICHA_ADMIN, $.checkTask.check_status);
+        showBtn(ROLE_STATION_ADMIN, $.checkTask.check_status);
+        showBtn(ROLE_STATION_AGENT, $.checkTask.check_status);
     }
+
     function showBtn(role, status) {
-        if(hasRole(role)) {
-             var btnArr = $.zui.store.get("task_detail_btn_"+role+"_"+status);
-             if(btnArr) {
-                 for(var i in btnArr) {
-                     $(btnArr[i]).show();
-                 }
-             }
+        if (hasRole(role)) {
+            var btnArr = $.zui.store.get("task_detail_btn_" + role + "_" + status);
+            if (btnArr) {
+                for (var i in btnArr) {
+                    $(btnArr[i]).show();
+                }
+            }
         }
     }
-    function queryScores(){
+
+    function queryScores() {
         // 使用data参数更新数据:
         var data = {
             "task_id": $.checkTask.id
         }
-        
-        var cols = [
-                    {width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center',field: 'num'},
-                    {width: 60, text: '评分记录', type: 'string', flex: true, sort: 'down',field: 'content'},
-                    {width: 80, text: '分数', type: 'string', flex: true, colClass: '',field: 'check_item_score'},
-                    {width: 80, text: '扣分人', type: 'string', flex: true, colClass: '',field: 'checked_person_name'},
-                    {width: 80, text: '备注', type: 'string', flex: true, colClass: '',field: 'remark'},
-                    {width: 200, text: '图片', type: 'imagedd', flex: true, colClass: '',field: 'pics'}
-                ];
-        if(hasRole(ROLE_JICHA) && ($.checkTask.check_status==2||$.checkTask.check_status==2||$.checkTask.check_status==12
-            ||$.checkTask.check_status==13)) {
-            var oper = {width: 160, text: '操作', type: 'string', flex: true, field: 'id',
-                        oper:[
-                            {func:'showEditScore',text:'修改',icon_class:'icon-edit'},
-                            {func:'deleteScore',text:'删除',icon_class:'icon-remove-circle'}
-                        ]
-                    }
+
+        var cols = [{
+            width: 80,
+            text: '序号',
+            type: 'number',
+            flex: true,
+            colClass: 'text-center',
+            field: 'num'
+        }, {
+            width: 60,
+            text: '评分记录',
+            type: 'string',
+            flex: true,
+            sort: 'down',
+            field: 'content'
+        }, {
+            width: 80,
+            text: '分数',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'check_item_score'
+        }, {
+            width: 80,
+            text: '扣分人',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'checked_person_name'
+        }, {
+            width: 80,
+            text: '备注',
+            type: 'string',
+            flex: true,
+            colClass: '',
+            field: 'remark'
+        }, {
+            width: 200,
+            text: '图片',
+            type: 'imagedd',
+            flex: true,
+            colClass: '',
+            field: 'pics'
+        }];
+        if (hasRole(ROLE_JICHA) && ($.checkTask.check_status == 2 || $.checkTask.check_status == 2 || $.checkTask.check_status == 12 ||
+                $.checkTask.check_status == 13)) {
+            var oper = {
+                width: 160,
+                text: '操作',
+                type: 'string',
+                flex: true,
+                field: 'id',
+                oper: [{
+                    func: 'showEditScore',
+                    text: '修改',
+                    icon_class: 'icon-edit'
+                }, {
+                    func: 'deleteScore',
+                    text: '删除',
+                    icon_class: 'icon-remove-circle'
+                }]
+            }
             cols.push(oper);
         }
-        $('#score_datatable').mytable({'cols':cols,
-                                'url':"/score/getScoreList/",
-                                'param':data}
-                                );
+        $('#score_datatable').mytable({
+            'cols': cols,
+            'url': "/score/getScoreList/",
+            'param': data
+        });
         $('a.lightbox-toggle').lightbox();
     }
     var curScoreId;
-    function showEditScore(id){
-        
-        var rowData=getItemByIdFromArr(id,$('#score_datatable').mytable('getTableData'));
+
+    function showEditScore(id) {
+
+        var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
         // alert(rowData.pics);
         curScoreId = rowData.id;
-        scoreImageLayer = showPopup4Common('修改图片',updateImg,'600px');
+        scoreImageLayer = showPopup4Common('修改图片', updateImg, '600px');
         showTaskDetailPics(rowData.pics);
     }
 
-    function showTaskDetailPics(pics,divId){
-        var picStr='';
-        if(!divId) divId = '#img_container';
+    function showTaskDetailPics(pics, divId) {
+        var picStr = '';
+        if (!divId) divId = '#img_container';
         $(divId).html(picStr);
-        if(pics){
+        if (pics) {
             var picArr = pics.split(',');
-            for(var i in picArr){
+            for (var i in picArr) {
 
                 var ispic = true;
-                var src =  picArr[i];
+                var src = picArr[i];
                 if (!src.startWith("http"))
-                        src = base_image_server_url + src;
+                    src = base_image_server_url + src;
 
                 var videosrc = src;
                 if (src.indexOf('.avi') != -1) {
@@ -227,108 +284,148 @@
                     ispic = false;
                 }
 
-            
-                var pic = '<div id="img_item_'+i+'" class="col-md-4 col-sm-6 col-lg-3">'
-                    +  '<a href="javascript:void(0)" onclick="removeImg(\'#img_item_'+i+'\')" style="float:right;position:absolute;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>'
-                    +(ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') 
-                    +      '<img class="pic-class img-thumbnail" style="width:200px;height:150px;" src="'+src+'" alt="">'+ (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 40px;left:80px;color: white;"></i>') 
-                    +  '</a>'
-                    +'</div>';
-                picStr+=pic;
+
+                var pic = '<div id="img_item_' + i + '" class="col-md-4 col-sm-6 col-lg-3">' +
+                    '<a href="javascript:void(0)" onclick="removeImg(\'#img_item_' + i + '\')" style="float:right;position:absolute;z-index:100;"><span class="label label-danger"><i class="icon icon-remove-circle"></i> 删除</span></a>' +
+                    (ispic ? '<a class="card lightbox-toggle" data-group="image-group-1" data-lightbox-group="example-3" href="' + src + '" style="position:absolute">' : '<a class="card" onclick="video_paly(\'' + videosrc + '\')" href="javascript:void(0)" style="position:absolute">') +
+                    '<img class="pic-class img-thumbnail" style="width:200px;height:150px;" src="' + src + '" alt="">' + (ispic ? '' : '<i class="icon icon-play-circle" style=" font-size: 30px;position: absolute;top: 40px;left:80px;color: white;"></i>') +
+                    '</a>' +
+                    '</div>';
+                picStr += pic;
             }
             $(divId).html(picStr);
             $('a.lightbox-toggle').lightbox();
         }
     }
-    function updateImg(){
-        
+
+    function updateImg() {
+
         var imgArr = $("#img_container .pic-class");
-        var picsStr="";
-        if(imgArr && imgArr.length>0) {
-            for(var i=0;i<imgArr.length;i++){
-                picsStr+=imgArr[i].src+","
+        var picsStr = "";
+        if (imgArr && imgArr.length > 0) {
+            for (var i = 0; i < imgArr.length; i++) {
+                picsStr += imgArr[i].src + ","
             }
-            picsStr = picsStr.substr(0,picsStr.length-1);
-        }
-        var param= {
-            'id':curScoreId,
-            'pics':picsStr
+            picsStr = picsStr.substr(0, picsStr.length - 1);
         }
-        // alert("dddd");
-        addOrUpdateItem4Common(param,"/score/update",queryScores);
-        curScoreId="";
+        var param = {
+                'id': curScoreId,
+                'pics': picsStr
+            }
+            // alert("dddd");
+        addOrUpdateItem4Common(param, "/score/update", queryScores);
+        curScoreId = "";
     }
-    function deleteScore(id){
-        deleteItem4Common(id,"/score/delete/",queryScores);
+
+    function deleteScore(id) {
+        deleteItem4Common(id, "/score/delete/", queryScores);
     }
-    function genFlow(){
+
+    function genFlow() {
         var data = {
             "id": $.checkTask.id
         };
-        post_common_service("/task/getStatusById/",data,function(data){
-            if(data) {
-                var flowStr="";
-                for(var i in data) {
-                    var str = '<div class="col-sm-2" style="text-align:center;padding:0px;">'
-                                + '<div class="row">'
-                                +  '   <label>'+data[i].update_time+'</label>'
-                                + '</div>'
-                                + '<div class="row">'
-                                +  '   <label>'+data[i].check_status_name+'</label>'
-                                + '</div>'
-                                + '<div class="row line">'
-                                + '    <div class="timeline_item_station"></div>'
-                                + '</div>'
-                                +'</div>';
-                    flowStr+=str;
+        post_common_service("/task/getStatusById/", data, function(data) {
+            if (data) {
+                console.log(data)
+                var flowStr = "";
+
+                var color_t = new $.zui.Color("#63B8FF");
+                for (var i in data) {
+                    var color = new $.zui.Color(color_t.r - i * 10, color_t.g - i * 10, color_t.b - i * 10);
+
+                    var startcolor = new $.zui.Color(color_t.r - i * 10 + 5, color_t.g - i * 10 + 5, color_t.b - i * 10 + 5);
+
+                    var endcolor = new $.zui.Color(color_t.r - i * 10 - 5, color_t.g - i * 10 - 5, color_t.b - i * 10 - 5);
+
+                    var background = "background:-webkit-gradient(linear, 0 % 0 % , 0 % 100 % , from(" + startcolor.hexStr() + "), to(" + endcolor.hexStr() + "));" +
+                        "background:-webkit-linear-gradient(top, " + startcolor.hexStr() + ", " + endcolor.hexStr() + ");" + "background:-moz-linear-gradient(top," + startcolor.hexStr() + "," + endcolor.hexStr() + ");"
+
+
+
+                    var str = "";
+                    if (i == 0) {
+                        str = '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-60px;">' +
+                            '<img src="/images/start.png" style="width: 28px;right:-1px; position: absolute; top:16px;">' +
+                            '</div>'
+                    }
+                    str +=
+                        // '<div class="col-sm-2" style="text-align:center;padding:0px;width: 87px;margin-left:-88px;">' +
+
+                        // '   <img src="/images/end.png" style="width: 35px;margin-left: 36px;margin-top: 25px;">' +
+                        // '</div>' +
+
+                        '<div class="col-sm-2" style="text-align:center;padding:0px;width: 140px;margin-bottom: 33px;">' +
+                        '<div class="row">' +
+                        '   <label>' + data[i].check_status_name + '</label>' +
+                        '</div>' +
+                        '<div class="row line" style="margin-top: 3px;' + background + '">' +
+                        '    <div class="timeline_item_station" style="background:' + color.hexStr() + '"></div>' +
+                        '</div>' +
+                        '<div class="row" style="margin-top: -5px;">' +
+                        '   <label style="    font-weight: 400;">' + data[i].update_time + '</label>' +
+                        '</div>' +
+                        (i == data.length - 1 ? (
+                            '<i class="icon icon-angle-right" style="font-size: 45px;right: -5px;position: absolute;top: 6px;color:' + endcolor.hexStr() + '"></i>'
+                            // '   <img src="/images/end.png" style="width: 28px;right:-10px; position: absolute; top:16px;">'
+                        ) : "") +
+                        '</div>';
+
+
+                    flowStr += str;
+
+
                 }
                 $("#flow_div").html(flowStr);
             }
         })
     }
-    function submitCheck(){
+
+    function submitCheck() {
         var param = {
             "id": $.checkTask.id,
-            "check_status":4
+            "check_status": 4
         }
-        no_return_common_service("/task/taskEnd/",param,function(data){
-             layer.msg("提交成功", {
-                time: 2000//20s后自动关闭
-             });
-           redirectLastPage();
+        no_return_common_service("/task/taskEnd/", param, function(data) {
+            layer.msg("提交成功", {
+                time: 2000 //20s后自动关闭
+            });
+            redirectLastPage();
         });
-        
+
     }
 
-    function submitCheck4Appeal(){
-        var appeal_result=1;
+    function submitCheck4Appeal() {
+        var appeal_result = 1;
         //询问框
         layer.confirm('该申诉是否成功?', {
-            btn: ['成功','失败'] //按钮
-        }, function(){
-            appeal_result=1;
+            btn: ['成功', '失败'] //按钮
+        }, function() {
+            appeal_result = 1;
             submitAppealResult(appeal_result);
-        }, function(){
-            appeal_result=2;
+        }, function() {
+            appeal_result = 2;
             submitAppealResult(appeal_result);
-        });     
+        });
     }
-    function submitAppealResult(appeal_result){
+
+    function submitAppealResult(appeal_result) {
         var param = {
             "id": $.checkTask.id,
             "check_status": 14,
-            "appeal_id":$.checkTask.appeal.id,
-            "appeal_result":appeal_result
+            "appeal_id": $.checkTask.appeal.id,
+            "appeal_result": appeal_result
         }
-        no_return_common_service("/task/update/",param,function(data){
+        no_return_common_service("/task/update/", param, function(data) {
             layer.msg("提交成功", {
-                time: 2000//20s后自动关闭
+                time: 2000 //20s后自动关闭
             });
             redirectLastPage();
         });
     }
     var appealLayer;
-    function showAppeal(){
+
+    function showAppeal() {
         // appealLayer = showPopup4Common('申诉',saveAppeal,'600px','#appealDetail-div');
         layer.open({
             type: 1,
@@ -340,127 +437,128 @@
             content: $('#appealDetail-div'),
             btn: '保存',
             btnAlign: 'c', //按钮居中
-            shade: 0 ,//不显示遮罩
-            yes: function(index){
+            shade: 0, //不显示遮罩
+            yes: function(index) {
                 saveAppeal();
             }
         });
     }
 
-    function confirmCheck(){
+    function confirmCheck() {
         layer.confirm('是否确认该稽查结果?', {
-            btn: ['确认','取消'], //按钮
-            offset:'auto'
-        }, function(){
+            btn: ['确认', '取消'], //按钮
+            offset: 'auto'
+        }, function() {
             var param = {
                 "id": $.checkTask.id,
-                "check_status":6
+                "check_status": 6
             }
-            no_return_common_service("/task/update/",param,function(data){
+            no_return_common_service("/task/update/", param, function(data) {
                 layer.msg("确认成功", {
-                    time: 2000//20s后自动关闭
+                    time: 2000 //20s后自动关闭
                 });
                 redirectLastPage();
             });
-        }, function(index){
+        }, function(index) {
             layer.close(index);
         });
-       
+
     }
 
-    function confirmCheck4Appeal(){
+    function confirmCheck4Appeal() {
         layer.confirm('是否确认该申诉结果?', {
-            btn: ['确认','取消'], //按钮
-            offset:'auto'
-        }, function(){
+            btn: ['确认', '取消'], //按钮
+            offset: 'auto'
+        }, function() {
             var param = {
                 "id": $.checkTask.id,
-                "check_status":16
+                "check_status": 16
             }
-            no_return_common_service("/task/update/",param,function(data){
+            no_return_common_service("/task/update/", param, function(data) {
                 layer.msg("确认成功", {
-                    time: 2000//20s后自动关闭
+                    time: 2000 //20s后自动关闭
                 });
                 redirectLastPage();
             });
-        }, function(index){
+        }, function(index) {
             layer.close(index);
         });
-        
+
     }
 
-    function showAssign(){
-        showPopup4Common('分配稽查员',function(){
+    function showAssign() {
+        showPopup4Common('分配稽查员', function() {
             saveAssign();
-        },'400px','#chooseCheckman-div');
-        setCheckmanSelect('#choseCheckmanList',null,$.checkTask.checkman,
-        function(){
-           $('#choseCheckmanList').chosen({
-                // width:'200px',
-                height:'100px',
-                no_results_text: '没有找到',    // 当检索时没有找到匹配项时显示的提示文本
-                disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
-                search_contains: true         // 从任意位置开始检索
-            });   
-        });
-       
+        }, '400px', '#chooseCheckman-div');
+        setCheckmanSelect('#choseCheckmanList', null, $.checkTask.checkman,
+            function() {
+                $('#choseCheckmanList').chosen({
+                    // width:'200px',
+                    height: '100px',
+                    no_results_text: '没有找到', // 当检索时没有找到匹配项时显示的提示文本
+                    disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
+                    search_contains: true // 从任意位置开始检索
+                });
+            });
+
     }
 
-    function saveAssign(){
-         var param = {
+    function saveAssign() {
+        var param = {
             "id": $.checkTask.id,
             "recheckman": $('#choseCheckmanList').val(),
-            "check_status":12
+            "check_status": 12
         }
-        no_return_common_service("/task/update/",param,function(data){
-             layer.msg("分配成功", {
-                time: 2000//20s后自动关闭
-             });
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("分配成功", {
+                time: 2000 //20s后自动关闭
+            });
             redirectLastPage();
         });
     }
 
-    function back2Check(){
+    function back2Check() {
         //退回到待提交页面
         var param = {
             "id": $.checkTask.id,
-            "check_status":3,
-            "check_status_name":"退回"
+            "check_status": 3,
+            "check_status_name": "退回"
         }
-        no_return_common_service("/task/update/",param,function(data){
-             layer.msg("退回成功", {
-                time: 2000//20s后自动关闭
-             });
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
             redirectLastPage();
         });
     }
-    function back2Confirm(){
+
+    function back2Confirm() {
         //退回到待提交页面
         var param = {
             "id": $.checkTask.id,
-            "check_status":5,
-            "check_status_name":"退回重新确认"
+            "check_status": 5,
+            "check_status_name": "退回重新确认"
         }
-        no_return_common_service("/task/update/",param,function(data){
-             layer.msg("退回成功", {
-                time: 2000//20s后自动关闭
-             });
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
             redirectLastPage();
         });
     }
 
-    function back2AppealCheck(){
+    function back2AppealCheck() {
         //退回到待提交页面
         var param = {
             "id": $.checkTask.id,
-            "check_status":13,
-            "check_status_name":"退回"
+            "check_status": 13,
+            "check_status_name": "退回"
         }
-        no_return_common_service("/task/update/",param,function(data){
-             layer.msg("退回成功", {
-                time: 2000//20s后自动关闭
-             });
+        no_return_common_service("/task/update/", param, function(data) {
+            layer.msg("退回成功", {
+                time: 2000 //20s后自动关闭
+            });
             redirectLastPage();
         });
     }
-    </script>
+</script>

+ 134 - 0
VisualInspection/view/other_check/toubleshoot_check.html

@@ -0,0 +1,134 @@
+<link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
+<script src="/js/other_check/other_check.js?_inline"></script>
+<!--  start -->
+<div class="container-fluid ">
+        <div class="row">
+             <div>
+                <div class="div-month">
+                    <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
+                 </div>
+                 <div class="div-roadManage">
+                    <select class="form-control" id="first"></select>
+                </div>
+                <div class="div-station">
+                    <select class="form-control" id="second"></select>
+                </div>
+
+               <div class="col-xs-3">
+                    <div class="input-group">
+                        <button class="btn btn-primary " type="button" id="conditional_query">查询</button>
+                    </div>
+                </div>
+
+                 <div style="float:right;margin-right:30px;">
+                    <button class="btn btn-primary" type="button" id="add_btn"><i class="icon icon-plus-sign"></i> 增加稽查记录</button>
+                </div>
+            </div>
+        </div>
+        <hr>
+        <div class="row">
+            <!-- 使用一个div来显示数据表格 -->
+            <div class="datatable" data-checkable="true" data-sortable="true"></div>
+        </div>
+        <div class="">
+            
+
+        </div>
+
+</div>
+<!--  end -->          
+<div style="display:none;" id="form-div">
+    <div class="layer-content" style="width:100%;height:100%;">
+        <div style="width:350px;overflow:hidden;zoom:1;margin:auto;">
+            <div style="width:100%;margin-top:20px;overflow:hidden;zoom:1;">
+                <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                    <div style="width:80px;float:left;">
+                        <span style="line-height:32px;">选择人员</span>
+                    </div>
+                    <div style="width:260px;float:left;">
+                        <div class="div-select"><select class="form-control" id="select-dept"></select></button>
+                        </div>
+                        <div class="div-select"><select class="form-control" id="select-personal"></select></button>
+                        </div>
+                    </div>
+                </div>
+            <div style="width:100%;margin-top:10px;">
+                <div style="width:80px;float:left;">
+                    <span style="line-height:32px;">扣分类别</span>
+                </div>
+                <div style="width:260px;float:left;">
+                    <div id="check_item_select" style="position: relative;">
+                        <input class="form-control" id="check_item_id">
+                    </div>
+                     <div class="form-group check_item_group">
+                        <!--<label for="exampleInputPassword4" class="col-sm-2">分类:</label>-->
+                        <div class="col-md-6 col-sm-10">
+                            <div id="check_item_select"></div>
+
+                        </div>
+                    </div>
+                </div>
+                <div class="panel-body" style="display:none;">
+                    <ul id="check_rule_tree2" class="ztree">
+
+                    </ul>
+                </div>
+            </div>
+             <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                <div style="width:80px;float:left;">
+                    <span style="line-height:32px;">扣分描述</span>
+                </div>
+                <div style="width:260px;float:left;">
+                   <input class="form-control" id="remark">
+                </div>
+            </div>
+            <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                <div style="width:80px;float:left;">
+                    <span style="line-height:32px;">扣分值</span>
+                </div>
+                <div style="width:260px;float:left;">
+                    <input class="form-control" id="check_score" onkeypress="return kkpager.keypress_gopage(event);">
+                </div>
+            </div>
+            <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                <div style="width:80px;float:left;">
+                    <span style="line-height:32px;">附件上传</span>
+                </div>
+                <div style="width:260px;float:left;">
+                    <div class="col-md-10">
+                        <div id="uploaderExample" class="uploader">
+                            <div id="editImage" file_src="" style="overflow:hidden;zoom:1;"></div>
+                            <div class="file-list" data-drag-placeholder="请拖拽文件到此处"></div>
+                            <button type="button" class="btn btn-primary  uploader-btn-browse" style="float:left;"><i class="icon icon-cloud-upload"></i> 选择文件</button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                <div style="width:80px;float:left;">
+                    <span style="line-height:32px;">稽查时间</span>
+                </div>
+                <div style="width:260px;float:left;">
+                    <div class="div-month2">
+                        <input id="month_date2" class="form-control form-date" type="text" placeholder="请选择" style="height:32px;">
+                    </div>
+                    <select class="form-control" style="width:130px;" id="check_num">
+                        <option value="1">第一次检查</option>
+                        <option value="2">第二次检查</option>
+                        <option value="3">第三次检查</option>
+                    </select>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="operation" style="width:100%;overflow:hidden;zoom:1;border-top:1px solid #ddd;margin-top:20px;padding:10px 10px 10px 10px;">
+        <button class="btn btn-primary" type="button"  style="float:right;" id="save-check"> 保存</button>
+        <button class="btn btn-primary" type="button" style="float:right;background-color:#fff;color:#333;margin-right:20px;" id="close-layer"> 关闭</button>
+    </div>
+</div>
+<script>
+    $(document).ready(function() {
+        check_type = 5;
+        init();
+    });
+</script>

+ 2 - 2
VisualInspection/view/role/addpermision.html

@@ -47,10 +47,10 @@
             </div>
         </div>
         
-        <div class="form-group">
+        <!-- <div class="form-group">
             <div class="col-sm-offset-2 col-sm-10">
                 <button type="button" id="permision_add_btn" class="btn btn-default" >添加</button>
             </div>
-        </div>
+        </div> -->
     </form>
 </div>

+ 3 - 0
VisualInspection/view/role/permision.html

@@ -57,6 +57,9 @@
             <div class="modal-body">
                 <link rel="import" href="/view/role/addpermision.html?__inline">
             </div>
+            <div class="modal-footer">
+                <button type="button" id="permision_add_btn" class="btn btn-primary" >添加</button>
+            </div>
         </div>
     </div>
 </div>

+ 24 - 20
VisualInspection/view/statistics/check_workload_statistics.html

@@ -8,10 +8,14 @@
     <div class="row-2">
         <div>
             <div class="name1" style="width:70px;"><span>稽查人员:</span></div>
-            <div class="div-select"><select id="select-personal"></select></button></div>
-            <div class="div-start"><input placeholder="请选择考核开始时间"></input></div>
+            <div class="div-select"><select id="select-personal"></select></button>
+            </div>
+            <div class="name1" style="width:70px;"><span>考核时间:</span></div>
+            <div class="div-start" style='margin-left:0px'><input placeholder="请选择考核开始时间"></input>
+            </div>
             <div class="div-to"><label>-</label></div>
-            <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
+            <div class="div-end"><input placeholder="请选择考核结束时间"></input>
+            </div>
             <div class="div-select" style="margin-left:25px;"><select class="score-select">
                     <option value="">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
                 </select>
@@ -20,11 +24,11 @@
 
             <div style="margin-right:30px;float:right;" class="div-button"><button id="export-check-info">导出</button></div>
         </div>
-    </div> 
+    </div>
 
     <div class="row-3">
-       <table class="table table-bordered" style="text-align:center;">
-           <tr>
+        <table class="table table-bordered" style="text-align:center;">
+            <tr>
                 <td>总稽查任务数</td>
                 <td>扣分任务数</td>
                 <td>无效任务数</td>
@@ -34,22 +38,22 @@
                 <td>考核人员扣分数量</td>
                 <td>总扣分数</td>
             </tr>
-           <tr>
-               <td class="all_check_task"></td>
-               <td class="checked_task_num"></td>
-               <td class="unable_task_num"></td>            
-               <td class="all_check_minute"></td>
-               <td class="all_checkman"></td>
-               <td class="checked_num"></td>
-               <td class="checked_people_num"></td>
-               <td class="all_check_score"></td>
+            <tr>
+                <td class="all_check_task"></td>
+                <td class="checked_task_num"></td>
+                <td class="unable_task_num"></td>
+                <td class="all_check_minute"></td>
+                <td class="all_checkman"></td>
+                <td class="checked_num"></td>
+                <td class="checked_people_num"></td>
+                <td class="all_check_score"></td>
             </tr>
-       </table>
+        </table>
     </div>
 
-<div class="row" style="width:100%;margin:0 auto;">
-            <!-- 使用一个div来显示数据表格 -->
-            <div id="check_workload_table" class="datatable" data-checkable="true" data-sortable="true"></div>
+    <div class="row" style="width:100%;margin:0 auto;">
+        <!-- 使用一个div来显示数据表格 -->
+        <div id="check_workload_table" class="datatable" data-checkable="true" data-sortable="true"></div>
     </div>
-  
+
 </div>

+ 2 - 2
VisualInspection/view/statistics/personal_data_statistics.html

@@ -20,8 +20,8 @@
             <div class="div-end"><input class="form-control" placeholder="请选择考核结束时间"></input>
             </div>
             <div class="div-select">
-                <select class="form-control score-select ">
-                    <option value="">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
+                <select class="form-control score-select" id="score_select">
+                    <option value="2">全部</option><option value="1" selected>扣分</option><option value="0">不扣分</option>
                 </select>
             </div>
             <div class="query div-button"><button>查询</button></div>

+ 8 - 2
VisualInspection/view/statistics/toll_station_statistics.html

@@ -48,7 +48,7 @@
     <div class="row-4">
         <div class="col-1"><span>收费站考核扣分情况占比</span></div><div class="line-2"></div>
         <div class="col-1" id="progress"><span>考核进步Top5排行榜</span><div class="btn-change">
-            <div class="view_change" title="切换"></div></div></div>
+            <div title="切换" class="view_change" title="切换排行榜"></div></div></div>
         <div class="col-1" id="backward" style="display:none;"><span>考核退步Top5排行榜</span></div>
     </div>
     <div class="row-5">
@@ -80,7 +80,13 @@
 </div>
 <script>
     $(document).ready(function() {
-
+        $(".view_change").click(function(){
+            if($(this).hasClass("active")){
+                $(this).removeClass("active");
+            }else{
+                 $(this).addClass("active");
+            }
+        })
     });
 </script>
        

+ 2 - 2
VisualInspection/view/term_management/charge_stuff_schedule.html

@@ -61,7 +61,7 @@
 
 
 <div class="modal fade" id="add_fee_station">
-    <div class="modal-dialog modal-lg" style="width:1200px;">
+    <div class="modal-dialog modal-lg" style="width:1200px">
         <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
@@ -85,7 +85,7 @@
                                     <tr class="tr-3">
 
                                     </tr>
-                                    <tr class="tr-1">
+                                    <tr class="tr-1" style="background:#f1f1f1;">
 
                                     </tr>
                                     <tr class="tr-2">

+ 2 - 2
VisualInspection/view/user/addDept.html

@@ -24,10 +24,10 @@
             </div>
         </div>
 
-        <div class="form-group">
+        <!-- <div class="form-group">
             <div class="col-sm-offset-2 col-sm-10">
                 <button type="button" id="dept_add_btn" class="btn btn-default" onclick="addDept()">添加</button>
             </div>
-        </div>
+        </div> -->
     </form>
 </div>

+ 7 - 3
VisualInspection/view/user/addUser.html

@@ -3,6 +3,7 @@
 <link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/uploader/zui.uploader.min.css">
 <script type="text/javascript" src="/js/user/addUser.js?__inline"></script>
 <link rel="stylesheet" type="text/css" href="/css/user/addUser.css?__inline">
+<link rel="stylesheet" type="text/css" href="/css/user/userManager.css?__inline">
 
 
 <script type="text/javascript" src="/js/lib/imageupload/js/imgUp.js?__inline"></script>
@@ -33,13 +34,13 @@
                 </div>
 
                 <div class="form-group">
-                    <label for="exampleInputAccount4" class="col-sm-3 ll required">密码:</label>
+                    <label for="exampleInputAccount4" class="col-sm-3 ll ">密码:</label>
                     <div class="col-md-9 col-sm-9">
                         <input type="text" id="user_password" class="form-control" placeholder="密码" maxlength="20">
                     </div>
                 </div>
                 <div class="form-group">
-                    <label for="exampleInputAccount4" class="col-sm-3 ll required">确定密码:</label>
+                    <label for="exampleInputAccount4" class="col-sm-3 ll ">确定密码:</label>
                     <div class="col-md-9 col-sm-9">
                         <input type="text" id="user_confirm_password" class="form-control" placeholder="确认密码" maxlength="20">
                     </div>
@@ -99,7 +100,10 @@
         <div class="form-group">
             <label for="exampleInputAccount4" class="col-sm-2  ll">职位:</label>
             <div class="col-md-10 col-sm-10">
-                <input type="text" id="user_position" class="form-control" placeholder="职位">
+                <select id="user_position" data-placeholder="选择职位" class="chosen-select form-control">
+
+                </select>
+                <!-- <input type="text" id="user_position" class="form-control" placeholder="职位"> -->
             </div>
         </div>
         <div class="form-group">

+ 4 - 1
VisualInspection/view/user/userManager.html

@@ -57,12 +57,15 @@
             <div class="modal-body">
                 <link rel="import" href="/view/user/addDept.html?__inline">
             </div>
+            <div class="modal-footer">
+                <button type="button" id="dept_add_btn" class="btn btn-primary" onclick="addDept()">添加</button>
+            </div>
         </div>
     </div>
 </div>
 
 <div class="modal fade" id="addUserModal">
-    <div class="modal-dialog modal-lg">
+    <div class="modal-dialog">
         <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>

+ 1 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/JobController.java

@@ -33,7 +33,7 @@ public class JobController extends BaseController {
      * @since  1.0.0
      */
     @RequestMapping(value = "/getList")
-    public String add(@Valid @RequestBody Job job){
+    public String add(@Valid @RequestBody(required = false) Job job){
     	List<Job> jlist = jobService.getJobList(job) ;
     	return super.returnSuccessResult(jlist);
     }

+ 2 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TaskController.java

@@ -301,7 +301,8 @@ public class TaskController extends BaseController {
     @RequestMapping(value = "/gettasklistbydept/{page}/{size}")
     public String getTaskListByDept(HttpServletRequest request, @PathVariable Integer page,@PathVariable Integer size,@RequestBody TaskListByDeptAppeal task){
         PageHelper.startPage(page, size);
-        List<Task> taskList = taskService.getTaskListByDept(task);
+        User user = getCurrentUser(request);
+        List<Task> taskList = taskService.getTaskListByDept(task,user);
 
         if(taskList==null) return super.returnSuccessResult(new PageInfo(new ArrayList()));
         return super.returnSuccessResult(new PageInfo(taskList));

+ 10 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/UserController.java

@@ -174,8 +174,16 @@ public class UserController extends BaseController {
         	throw new BusinessException(20001);
         }
     }
-    
-    
+
+    @RequestMapping(value = "/getUserInfo",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
+    public String getUserInfo(HttpServletRequest request){
+        User user = getCurrentUser(request);
+        user.setOrganname(CacheUtil.getOrgannameFromMap(new Long(user.getOrganid())));
+        user.setPassword(null);
+        return returnResult(0, "获取成功", user);
+    }
+
+
     @RequestMapping(value = "/getUserById/{userid}",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
     public String getUser(@PathVariable Integer userid){
         User u = userService.getOne(userid);

+ 12 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml

@@ -515,10 +515,10 @@
          LEFT JOIN (SELECT ci.* ,cp.name AS parent_name FROM check_item  ci LEFT JOIN check_item cp ON ci.parent_id = cp.id) ci ON ci.id = cs.check_item_id
      		where   t.check_status !=22 and t.id not in <include refid="taskexclouddeleteUser"/>
      		<if test="queryType!=null and queryType==0">
-     			AND (cs.checked_person = #{user_id} OR t.monitor_user_id = #{user_id}  )
+     			AND (t.checked_person = #{user_id} OR t.monitor_user_id = #{user_id}  )
      		</if>
      		<if test="queryType!=null and queryType==1 and user_id!=null and user_id!=''">
-     			AND  cs.checkman = #{user_id}
+     			AND  t.checkman = #{user_id}
      		</if>
      		<if test="start_date !=null and end_date !=null and queryType ==1">
      			AND t.check_time >= #{start_date} AND t.check_time &lt; #{end_date}
@@ -571,6 +571,10 @@
 				WHERE
 				  t.check_time >= #{start_date}
 					AND t.check_time &lt; #{end_date}
+
+        <if test="checkman_id!=null">
+            AND t.checkman = #{checkman_id}
+        </if>
     </select>
     
     
@@ -584,6 +588,9 @@
 				WHERE
 				  t.check_time >= #{start_date}
 					AND t.check_time &lt; #{end_date}
+        <if test="checkman_id!=null">
+            AND t.checkman = #{checkman_id}
+        </if>
     </select>
     
      <select id="selectCheckManInfo3" parameterType="com.xintong.visualinspection.bean.CheckmanStatisticsBean" resultType="com.xintong.visualinspection.bean.CheckmanStatisticsBean">
@@ -591,6 +598,9 @@
     		t.check_time >= #{start_date}
 			AND t.check_time &lt; #{end_date}
     		AND t.check_status = 22 and t.id not in <include refid="taskexclouddeleteUser"/>
+         <if test="checkman_id!=null">
+             AND t.checkman = #{checkman_id}
+         </if>
     </select>
     <!--稽查人员工作量统计 end  -->
     

+ 2 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java

@@ -5,6 +5,7 @@ import java.util.Map;
 
 import com.xintong.visualinspection.bean.Task;
 import com.xintong.visualinspection.bean.TaskStatus;
+import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.bean.UserClassCount;
 import com.xintong.visualinspection.pojo.TaskListByDeptAppeal;
 
@@ -35,6 +36,6 @@ public interface TaskService {
     public void deleteInvalidTaskCount(Long task_id);
     public void updateInvalidTaskCount(Task task);
     public List<UserClassCount> getUserCount(Task task);
-    public List<Task> getTaskListByDept(TaskListByDeptAppeal taskListByDeptAppeal);
+    public List<Task> getTaskListByDept(TaskListByDeptAppeal taskListByDeptAppeal,User user);
 
 }

+ 12 - 7
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -5,17 +5,15 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import com.xintong.visualinspection.bean.*;
 import com.xintong.visualinspection.pojo.TaskListByDeptAppeal;
+import com.xintong.visualinspection.util.AuthorUtil;
+import com.xintong.visualinspection.util.Constants;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.mysql.jdbc.StringUtils;
-import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.bean.Log;
-import com.xintong.visualinspection.bean.Task;
-import com.xintong.visualinspection.bean.TaskStatus;
-import com.xintong.visualinspection.bean.UserClassCount;
 import com.xintong.visualinspection.dao.master.LogDao;
 import com.xintong.visualinspection.dao.master.TaskDao;
 import com.xintong.visualinspection.service.BaseService;
@@ -202,13 +200,20 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 	}
 
     @Override
-    public List<Task> getTaskListByDept(TaskListByDeptAppeal taskListByDeptAppeal){
+    public List<Task> getTaskListByDept(TaskListByDeptAppeal taskListByDeptAppeal,User user){
 	    List<Task> list = taskDao.getTaskListByDept(taskListByDeptAppeal);
 	    if(list!=null && list.size()>0){
             for (Task t:list
                  ) {
                 t.setChecked_person_name(CacheUtil.getUserTurenameFromMap(t.getChecked_person()));
-                t.setCheckman_name(CacheUtil.getUserTurenameFromMap(t.getCheckman()));
+                if(AuthorUtil.hasRole(user, Constants.ROLE_JICHA_ADMIN)
+                        ||AuthorUtil.hasRole(user, Constants.ROLE_JICHA)||AuthorUtil.hasRole(user, Constants.ROLE_MANAGER)
+                        ){
+                    t.setCheckman_name(CacheUtil.getUserTurenameFromMap(t.getCheckman()));
+                }else{
+                    t.setCheckman_name("-");
+                }
+
                 t.setChecked_dept_name(CacheUtil.getOrgannameFromMap(t.getChecked_dept()));
                 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm");
                 SimpleDateFormat df1 = new SimpleDateFormat("hh:mm");