소스 검색

模块优化

Ming 4 년 전
부모
커밋
82b7ce8a5f
10개의 변경된 파일251개의 추가작업 그리고 191개의 파일을 삭제
  1. 13 13
      api/request.js
  2. 1 1
      js/device-communicate.js
  3. 65 70
      js/main.js
  4. 73 56
      js/plan-inner.js
  5. 41 36
      js/plan.js
  6. 17 5
      js/team-inner.js
  7. 12 6
      js/team.js
  8. 25 0
      js/util.js
  9. 2 2
      pages/operation/plan.html
  10. 2 2
      pages/operation/team.html

+ 13 - 13
api/request.js

@@ -1,24 +1,24 @@
-// // 动态获取url
-// const BASEURL = getRequestPrefix();
+// 动态获取url
+const BASEURL = getRequestPrefix();
 
-// // 动态获取用户名密码
-// const LOGIN_NAME = sessionStorage.getItem('V_LOGINNAME');
-// const LOGIN_PASSWORD = sessionStorage.getItem('V_PASSWORD');
+// 动态获取用户名密码
+const LOGIN_NAME = sessionStorage.getItem('V_LOGINNAME');
+const LOGIN_PASSWORD = sessionStorage.getItem('V_PASSWORD');
 
 
 
-// //服务端url
-// // const BASEURL = "http://101.133.214.75:8080/Device_Manager/";
+//服务端url
+// const BASEURL = "http://101.133.214.75:8080/Device_Manager/";
 
-// //最新测试url
+//最新测试url
 // const BASEURL = "http://121.40.217.77:8080/Device_Manager/";
 
-//本地调试url
-const BASEURL = "http://127.0.0.1:8080/Device_Manager/";
+// // 本地调试url
+// const BASEURL = "http://127.0.0.1:8080/Device_Manager/";
 
-// 用户名、 密码
-const LOGIN_NAME = "admin";
-const LOGIN_PASSWORD = "e10adc3949ba59abbe56e057f20f883e";
+// // 用户名、 密码
+// const LOGIN_NAME = "admin";
+// const LOGIN_PASSWORD = "e10adc3949ba59abbe56e057f20f883e";
 
 
 

+ 1 - 1
js/device-communicate.js

@@ -33,7 +33,7 @@ function getListDataAjax(queryParam = {}, pageNo = 1) {
                     "<td>" + item.interface_parameter + "</td>" +
                     "<td>" + interface_transmission_mode + "</td>" +
                     "<td>" + item.interface_explain + "</td>" +
-                    "<td><a class='interface-doc' href='" + item.interface_file_route + "' download target='_blank'> 下载</a>  </td> " +
+                    "<td><a class='interface-doc' href='" + item.interface_file_route + "' download> 下载</a>  </td> " +
                     "<td>" + item.business + "</td>" +
                     "<td>" + item.add_people + "</td>" +
                     "<td>" + getFormatDate(item.add_time.time) + "</td>" +

+ 65 - 70
js/main.js

@@ -1,3 +1,6 @@
+var arr99 = []; //保存选中的变量
+var arrDelPd = []; //回显数据中被取消的变量
+
 $(function() {
 
     //树形结构
@@ -17,94 +20,86 @@ $(function() {
     }
     treeOpenOrClose();
 
-
-
-
-
     // 表格单选框选项卡
     $(document).on('click', '.pure-table  tbody:not(.multipleChoice)  tr', function() {
         $(this).addClass("selected").siblings().removeClass("selected");
         $(this).find(".status").addClass('checked').parent().siblings().find(".status").removeClass('checked');
 
     })
+})
 
 
-    /** 多选start*/
-    //复选框 选中 取消选中  
-    $(document).on('click', '.pure-table tbody.multipleChoice  tr', function() {
-        // alert(1)
-        if ($(this).hasClass('selected')) {
-            $(this).removeClass('selected')
-            $(this).find("td:eq(0)").removeClass('checked');
-            filterAll()
-        } else {
-            $(this).addClass("selected");
-            $(this).find("td:eq(0)").addClass('checked');
-            filterAll()
+/** 多选start*/
 
-        }
-    });
-
-    //过滤是否全部为选中状态
-    function filterAll() {
-        var allCheckNum = $(".pure-table tbody.multipleChoice  tr").length;
-        console.log("allCheckNum" + allCheckNum)
-        var checkedNum = $(".pure-table tbody.multipleChoice  .selected").length;
-        console.log("checkedNum " + checkedNum)
-
-        if (allCheckNum == checkedNum) {
-            $('.checkall').addClass('checked')
-        } else {
-            $('.checkall').removeClass('checked')
-        }
-    }
+//复选框 选中 取消选中  
+$(document).on('click', '.pure-table tbody.multipleChoice  tr', function() {
+
+    if ($(this).hasClass('selected')) {
+        $(this).removeClass('selected')
+        $(this).find("td:eq(0)").removeClass('checked');
+        filterAll();
+
+        removeByValue(arr99, $(this).find("td:eq(0)").data('id'));
+
+        console.log('数组变量')
+        console.log(arr99)
+
+        if (arrDelPd.indexOf($(this).find("td:eq(0)").data('id')) > -1) {
 
-    //全选 取消全选
-    $(".checkall").click(function() {
-        if ($(this).hasClass('checked')) {
-            $(this).removeClass('checked');
-            $(".pure-table tbody.multipleChoice  tr").removeClass("selected")
-            $(".pure-table tbody.multipleChoice  tr").find("td:eq(0)").removeClass('checked');
-        } else {
-            $(".pure-table tbody.multipleChoice  tr").addClass("selected")
-            $(".pure-table tbody.multipleChoice  tr").find("td:eq(0)").addClass('checked');
-            $(this).addClass('checked');
         }
 
-    });
+    } else {
+        $(this).addClass("selected");
+        $(this).find("td:eq(0)").addClass('checked');
 
-    /** 多选end*/
+        filterAll()
 
+        arr99.push($(this).find("td:eq(0)").data('id'))
+        console.log('数组变量')
+        console.log(arr99)
 
+    }
+});
+
+
+//过滤是否全部为选中状态
+function filterAll() {
+    var allCheckNum = $(".pure-table tbody.multipleChoice  tr").length;
+    var checkedNum = $(".pure-table tbody.multipleChoice  .selected").length;
+    // console.log('比较')
+    // console.log(allCheckNum)
+    // console.log(checkedNum)
+    if (allCheckNum && allCheckNum == checkedNum) {
+        $('.checkall').addClass('checked')
+    } else {
+        $('.checkall').removeClass('checked')
+    }
+}
 
+//全选 取消全选
+$(".checkall").click(function() {
+    if ($(this).hasClass('checked')) {
+        $(this).removeClass('checked');
+        $(".pure-table tbody.multipleChoice  tr").removeClass("selected")
+        $(".pure-table tbody.multipleChoice  tr").find("td:eq(0)").removeClass('checked');
 
+        $(".pure-table-inner #dataList2 td").each(function() {
+            removeByValue(arr99, $(this).data('id'));
+        });
+        alert(arr99)
 
-    //列表删除功能
-    // $(".delete").click(function () {/** 批量删除*/
-    //     // alert(1)
-    //     $(".pure-table tbody tr.selected").each(function () {// 遍历选中的checkbox
-    //         var n = $(this).index();  // 获取checkbox所在行的顺序
-    //         delRow(n);
-    //         //alert(n)
-    //     });
-    //     //getListDataAjax(getSearchParamObj());
-    // });
-    // function delRow(n) {
-    //     $(".pure-table tbody").find("tr:eq(" + n + ")").remove(); //移除选中的行
-    // }
+    } else {
+        $(".pure-table tbody.multipleChoice  tr").addClass("selected")
+        $(".pure-table tbody.multipleChoice  tr").find("td:eq(0)").addClass('checked');
+        $(this).addClass('checked');
 
-    //新增模态框
-    // $('.xcConfirm').hide()
-    // $('.add').click(function () {
-    //     $('.xcConfirm').show()
-    // })
-    // $('.clsBtn,.cancel').click(function () {
-    //     //alert(1)
-    //     $('.xcConfirm').hide()
-    // })
-    // $('.handle').click(function () {
-    //     $('.xcConfirm.xcConfirm-handle').show()
-    // })
+        $(".pure-table-inner #dataList2 td.checked").each(function() {
+            arr99.push($(this).data('id'));
+        });
+        arr99 = unique(arr99)
+        alert(arr99)
+    }
 
+});
 
-})
+/** 多选end*/

+ 73 - 56
js/plan-inner.js

@@ -1,65 +1,81 @@
 /**新增 修改弹框中的列表渲染及分页操作**/
 
 var innerPage = 1;
+
+
 // 新增修改 组织人员 列表渲染 ajax请求
 function getTeamInnerList(queryParam = {}, innerPage = 1) {
+
+
     queryParam.page = innerPage;
     queryParam.limit = 8; // 每页显示条数
     queryParam.start = (queryParam.page - 1) * queryParam.limit;
     ajaxRequest(RECORD_POINT_DETAIL, "POST", queryParam, function(result) {
-        let data = result.RESULT;
-        let items = '';
-        if (result.totalCount > 0) {
-            data.forEach(function(item, key) {
-                if (item.pd) {
-                    items += "<tr class='selected'>" + "<td class='status checked' data-id='" + item.id + "'></td>" + "<td>" + item.spot_name + "</td>" + "<td>" + item.spot_address + "</td>" + "<td ><a class='pointDetail' data-id=" + item.id + "><img src='../../images/tupianbtn.png'></a></td>" + "</tr>"
-                } else {
-                    items += "<tr>" + "<td class='status' data-id='" + item.id + "'></td>" + "<td>" + item.spot_name + "</td>" + "<td>" + item.spot_address + "</td>" + "<td ><a class='pointDetail' data-id=" + item.id + "><img src='../../images/tupianbtn.png'></a></td>" + "</tr>"
-                }
-            })
-            $('#dataList2').html(items);
-            $('#dataList3').html(items);
-        } else {
-            $('#dataList2').html('');
-            $('#dataList3').html('');
-        }
-        console.log(result)
-        totalPages = result.totalCount / result.limit;
-        totalPages = Math.ceil(totalPages);
-        $('#totalPage2,#totalPage3').html(totalPages); // 总共多少页
-        $('#dataTotal2,#dataTotal3').html(result.totalCount); // 总共多少条数据
-        $('#currentPage2,#currentPage3').val(innerPage); // 当前页面
-        let pageFrom = (innerPage - 1) * result.limit + 1; // 开始
-        let pageTo = result.page * result.limit; // 结束
-        pageTo = pageTo > result.totalCount ? result.totalCount : pageTo;
-        $('#pageFrom2,#pageFrom3').html(pageFrom);
-        $('#pageTo2,#pageTo3').html(pageTo);
-
-        // 无数据时
-        if (!result.totalCount) {
-            $('.pager2.has-data').hide()
-            $('.pager2.no-data').show()
-        } else {
-            $('.pager2.has-data').show()
-            $('.pager2.no-data').hide()
-        }
-        if (innerPage < totalPages) {
-            $('#nextPageButton2,#lastPageButton2').removeClass('disabled');
-            $('#nextPageButton3,#lastPageButton3').removeClass('disabled');
-        } else {
-            $('#nextPageButton2,#lastPageButton2').addClass('disabled');
-            $('#nextPageButton3,#lastPageButton3').addClass('disabled');
-        }
-        if (innerPage === 1) {
-            $('#firstPageButton2,#prevPageButton2').addClass('disabled');
-            $('#firstPageButton3,#prevPageButton3').addClass('disabled');
-        } else {
-            $('#firstPageButton2,#prevPageButton2').removeClass('disabled');
-            $('#firstPageButton3,#prevPageButton3').removeClass('disabled');
-        }
-    }, function(errorMsg) {
-        alert("请求数据失败!");
-    }, 3)
+
+            let data = result.RESULT;
+            let items = '';
+            if (result.totalCount > 0) {
+                data.forEach(function(item, key) {
+                    if (item.pd) {
+
+                        arr99.push(item.id)
+                        arr99 = unique(arr99);
+
+                        arrDelPd.push(item.id);
+                        arrDelPd = unique(arrDelPd);
+                        console.log('arr99')
+                        console.log(arr99)
+                    }
+                    // 如果数组里含有item.id  被选中
+                    if (arr99.indexOf(item.id) > -1) {
+                        items += "<tr class='selected'>" + "<td class='status checked' data-id='" + item.id + "'></td>" + "<td>" + item.spot_name + "</td>" + "<td>" + item.spot_address + "</td>" + "<td ><a class='pointDetail' data-id=" + item.id + "><img src='../../images/tupianbtn.png'></a></td>" + "</tr>"
+                    } else {
+                        items += "<tr>" + "<td class='status' data-id='" + item.id + "'></td>" + "<td>" + item.spot_name + "</td>" + "<td>" + item.spot_address + "</td>" + "<td ><a class='pointDetail' data-id=" + item.id + "><img src='../../images/tupianbtn.png'></a></td>" + "</tr>"
+                    }
+                });
+                $('#dataList2').html(items);
+                $('#dataList3').html(items);
+            } else {
+                $('#dataList2').html('');
+                $('#dataList3').html('');
+            }
+            totalPages = result.totalCount / result.limit;
+            totalPages = Math.ceil(totalPages);
+            $('#totalPage2,#totalPage3').html(totalPages); // 总共多少页
+            $('#dataTotal2,#dataTotal3').html(result.totalCount); // 总共多少条数据
+            $('#currentPage2,#currentPage3').val(innerPage); // 当前页面
+            let pageFrom = (innerPage - 1) * result.limit + 1; // 开始
+            let pageTo = result.page * result.limit; // 结束
+            pageTo = pageTo > result.totalCount ? result.totalCount : pageTo;
+            $('#pageFrom2,#pageFrom3').html(pageFrom);
+            $('#pageTo2,#pageTo3').html(pageTo);
+
+            // 无数据时
+            if (!result.totalCount) {
+                $('.pager2.has-data').hide()
+                $('.pager2.no-data').show()
+            } else {
+                $('.pager2.has-data').show()
+                $('.pager2.no-data').hide()
+            }
+            if (innerPage < totalPages) {
+                $('#nextPageButton2,#lastPageButton2').removeClass('disabled');
+                $('#nextPageButton3,#lastPageButton3').removeClass('disabled');
+            } else {
+                $('#nextPageButton2,#lastPageButton2').addClass('disabled');
+                $('#nextPageButton3,#lastPageButton3').addClass('disabled');
+            }
+            if (innerPage === 1) {
+                $('#firstPageButton2,#prevPageButton2').addClass('disabled');
+                $('#firstPageButton3,#prevPageButton3').addClass('disabled');
+            } else {
+                $('#firstPageButton2,#prevPageButton2').removeClass('disabled');
+                $('#firstPageButton3,#prevPageButton3').removeClass('disabled');
+            }
+        },
+        function(errorMsg) {
+            alert("请求数据失败!");
+        }, 3)
 };
 
 
@@ -113,15 +129,17 @@ $('#nextPageButton3').on('click', function() {
 $('.pg-refresh2').click(resetForm);
 
 function resetForm() {
+    arr99 = [];
     innerPage = 1;
     getTeamInnerList();
 }
 
 
 // 修改分页刷新
-$('.pg-refresh3').click(resetForm);
+$('.pg-refresh3').click(resetForm2);
 
-function resetForm() {
+function resetForm2() {
+    arr99 = [];
     let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
     innerPage = 1;
     getTeamInnerList({ 'dwid': dataId });
@@ -152,7 +170,6 @@ $(document).on('click', 'a.pointDetail', function(event) {
         content: $(".pointDetailOut"),
         success: function() {
             ajaxRequest(RECORD_POINT_DETAIL, "POST", { "id": dwId }, function(result) {
-                console.log(result.RESULT[0])
                 var data = result.RESULT[0];
                 $('#pointDetailUrl').attr('src', data.picture_route);
             }, function(errorMsg) {

+ 41 - 36
js/plan.js

@@ -180,6 +180,8 @@ $('#nextPageButton').on('click', function() {
 layui.use('layer', function() {
     // 新增弹框
     $(document).on('click', '.add', function() {
+        arr99 = [];
+
         layerCreateIndex = layer.open({
             type: 1,
             title: false,
@@ -200,6 +202,9 @@ layui.use('layer', function() {
 
     //修改弹框信息 
     $('.edit').click(function() {
+        arr99 = [];
+        filterAll();
+
         let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
 
         if (!$('.pure-table tr').has('.checked').length) {
@@ -290,20 +295,20 @@ $('#addData').click(function() {
             return;
         }
         //验证组织人员
-        if (!$('.pure-table.pure-table-inner tr').has('.checked').length) {
+
+        // if (!$('.pure-table.pure-table-inner #dataList2 tr').has('.checked').length) {
+        if (!arr99.length) {
             layer.msg('请选择一条需要修改的信息!', { icon: 5 });
             return
         } else {
-
             let spot_id = [];
-            $(".pure-table-inner #dataList2 td.checked").each(function() {
-                spot_id.push($(this).attr("data-id"));
-            });
+            spot_id = arr99;
+            // alert(spot_id)
             spot_id = spot_id.join(',')
             allParam.spot_id = spot_id;
         }
 
-        //验证通过 请求ajax
+        // 验证通过 请求ajax
         ajaxRequest(PLAN_ADD, "POST", allParam, function(result) {
             layer.close(layerCreateIndex);
             layer.msg('添加成功!', { icon: 6 });
@@ -320,46 +325,48 @@ $('#updateData').click(function() {
     let allParam = serializeArrayToObj($("#editDataForm").serializeArray());
 
     //验证数据是否为空
-    // let res = validParamIsEmpty(allParam, {
-    //     "plan_name": "请输入任务名称",
-    //     "team_id": "请选择执行团队",
-    //     "company_code": "请选择单位",
-    //     "cycle": "请选择周期",
-    //     "start_inspect_time": "请选择维保开始时间",
-    //     "end_inspect_time": "请选择维保结束时间",
-    //     "start_date": "请选择执行开始日期",
-    //     "end_date": "请选择执行结束日期",
-    // });
-
-    // if (res.code == -1) {
-    //     alert(res.msg);
-    //     return;
-    // }
+    let res = validParamIsEmpty(allParam, {
+        "plan_name": "请输入任务名称",
+        "team_id": "请选择执行团队",
+        "company_code": "请选择单位",
+        "cycle": "请选择周期",
+        "start_inspect_time": "请选择维保开始时间",
+        "end_inspect_time": "请选择维保结束时间",
+        "start_date": "请选择执行开始日期",
+        "end_date": "请选择执行结束日期",
+    });
+
+    if (res.code == -1) {
+        alert(res.msg);
+        return;
+    }
     //验证组织人员
-    if (!$('.pure-table.pure-table-inner tr').has('.checked').length) {
+
+
+    //如果所有页面中没有被选中的,请选则提示
+    if (!arr99.length) {
+        // if (!$('.pure-table.pure-table-inner #dataList3 tr').has('.checked').length && !arrDelPd.length) {
         layer.msg('请选择一条需要修改的信息!', { icon: 5 });
         return
     } else {
         let spot_id = [];
-        $(".pure-table-inner #dataList3 td.checked").each(function() {
-            spot_id.push($(this).attr("data-id"));
-        });
+        spot_id = arr99;
         spot_id = spot_id.join(',');
-        alert(spot_id);
+        // alert(spot_id);
 
         allParam.spot_id = spot_id;
     }
     let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
     allParam.id = dataId;
 
-    // ajaxRequest(PLAN_EDIT, "POST", allParam, function(result) {
-    //     innerPage = 1;
-    //     layer.close(layerUpdateIndex);
-    //     layer.msg('修改成功!', { icon: 6 });
-    //     getListDataAjax();
-    // }, function(errorMsg) {
-    //     alert("数据修改失败!");
-    // }, 2)
+    ajaxRequest(PLAN_EDIT, "POST", allParam, function(result) {
+        innerPage = 1;
+        layer.close(layerUpdateIndex);
+        layer.msg('修改成功!', { icon: 6 });
+        getListDataAjax();
+    }, function(errorMsg) {
+        alert("数据修改失败!");
+    }, 2)
 })
 
 
@@ -372,8 +379,6 @@ function getDataExport(queryParam = {}) {
     // 输出base64编码
     const base64 = s => window.btoa(unescape(encodeURIComponent(s)));
     ajaxRequest(PLAN_EXPORT, "POST", queryParam, function(result) {
-        console.log('result.RESULT')
-        console.log(result.RESULT)
         let data = result.RESULT;
         let newData = [];
         if (data) {

+ 17 - 5
js/team-inner.js

@@ -5,7 +5,7 @@ var innerPage = 1;
 // 新增修改 组织人员 列表渲染 ajax请求
 function getTeamInnerList(queryParam = {}, innerPage = 1) {
     queryParam.page = innerPage;
-    queryParam.limit = 5; // 每页显示条数
+    queryParam.limit = 3; // 每页显示条数
     queryParam.start = (queryParam.page - 1) * queryParam.limit;
     ajaxRequest(TEAM_INNERLIST, "POST", queryParam, function(result) {
         let data = result.RESULT;
@@ -13,9 +13,19 @@ function getTeamInnerList(queryParam = {}, innerPage = 1) {
         if (result.totalCount > 0) {
             data.forEach(function(item, key) {
                 if (item.pd) {
-                    items += "<tr class='selected'>" + "<td class='status checked' data-username='" + item.username + "' data-phone='" + item.phone + "'></td>" + "<td>" + item.username + "</td>" + "<td>" + item.phone + "</td>" + "</tr>"
+                    arr99.push(item.username)
+                    arr99 = unique(arr99);
+
+                    // arrDelPd.push(item.username);
+                    // arrDelPd = unique(arrDelPd);
+                    console.log('arr99')
+                    console.log(arr99)
+                }
+                // 如果数组里含有item.id  被选中
+                if (arr99.indexOf(item.username) > -1) {
+                    items += "<tr class='selected'>" + "<td class='status checked' data-id='" + item.username + "' data-username='" + item.username + "' data-phone='" + item.phone + "'></td>" + "<td>" + item.username + "</td>" + "<td>" + item.phone + "</td>" + "</tr>"
                 } else {
-                    items += "<tr>" + "<td class='status' data-username='" + item.username + "' data-phone='" + item.phone + "'></td>" + "<td>" + item.username + "</td>" + "<td>" + item.phone + "</td>" + "</tr>"
+                    items += "<tr>" + "<td class='status' data-id='" + item.username + "' data-username='" + item.username + "' data-phone='" + item.phone + "'></td>" + "<td>" + item.username + "</td>" + "<td>" + item.phone + "</td>" + "</tr>"
                 }
             })
             $('#dataList2').html(items);
@@ -115,15 +125,17 @@ $('#nextPageButton3').on('click', function() {
 $('.pg-refresh2').click(resetForm);
 
 function resetForm() {
+    arr99 = [];
     innerPage = 1;
     getTeamInnerList();
 }
 
 
 // 修改分页刷新
-$('.pg-refresh3').click(resetForm);
+$('.pg-refresh3').click(resetForm2);
 
-function resetForm() {
+function resetForm2() {
+    arr99 = [];
     let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
     innerPage = 1;
     getTeamInnerList({ 'dwid': dataId });

+ 12 - 6
js/team.js

@@ -163,6 +163,7 @@ $('#nextPageButton').on('click', function() {
 layui.use('layer', function() {
     // 新增弹框
     $(document).on('click', '.add', function() {
+        arr99 = [];
         layerCreateIndex = layer.open({
             type: 1,
             title: false,
@@ -183,6 +184,8 @@ layui.use('layer', function() {
 
     //修改弹框信息 
     $('.edit').click(function() {
+        arr99 = [];
+        filterAll();
         let dataId = $('.pure-table #dataList tr').find('.checked').data('id');
         if (!$('.pure-table tr').has('.checked').length) {
             layer.msg('请选择一条需要修改的信息!', { icon: 5 });
@@ -259,9 +262,10 @@ $('#addData').click(function() {
             allParam.phone = phone;
 
             let userName = [];
-            $(".pure-table-inner #dataList2 td.checked").each(function() {
-                userName.push($(this).attr("data-username"));
-            });
+            // $(".pure-table-inner #dataList2 td.checked").each(function() {
+            //     userName.push($(this).attr("data-username"));
+            // });
+            userName = arr99;
             allParam.RY_LIST = userName;
         }
 
@@ -302,9 +306,11 @@ $('#dataUpdate').click(function() {
         allParam.phone = phone;
 
         let userName = [];
-        $(".editTeamOut .pure-table tr td.checked").each(function() {
-            userName.push($(this).attr("data-username"));
-        });
+
+        userName = arr99;
+        // $(".editTeamOut .pure-table tr td.checked").each(function() {
+        //     userName.push($(this).attr("data-username"));
+        // });
         allParam.RY_LIST = userName;
     }
     let dataId = $('.pure-table tr').find('.checked').data('id');

+ 25 - 0
js/util.js

@@ -97,4 +97,29 @@ function downExcel(str, titleName) {
     link.download = titleName + ".xls";
     link.click();
 
+}
+
+
+
+//删除数组中的某一个元素
+function removeByValue(arr, val) {
+    for (var i = 0; i < arr.length; i++) {
+        if (arr[i] == val) {
+            arr.splice(i, 1);
+            break;
+        }
+    }
+}
+
+// 数组去重
+function unique(arr) {
+    for (var i = 0; i < arr.length; i++) {
+        for (var j = i + 1; j < arr.length; j++) {
+            if (arr[i] == arr[j]) { //第一个等同于第二个,splice方法删除第二个
+                arr.splice(j, 1);
+                j--;
+            }
+        }
+    }
+    return arr;
 }

+ 2 - 2
pages/operation/plan.html

@@ -168,7 +168,7 @@
                 <thead>
                     <tr>
                         <th style="width:24px">
-                            <span class="checkall status"></span>
+                            <!-- <span class="checkall status"></span> -->
                         </th>
                         <th>点位名称</th>
                         <th>点位地址</th>
@@ -302,7 +302,7 @@
                 <thead>
                     <tr>
                         <th style="width:24px">
-                            <span class="checkall status"></span>
+                            <!-- <span class="checkall status"></span> -->
                         </th>
                         <th>点位名称</th>
                         <th>点位地址</th>

+ 2 - 2
pages/operation/team.html

@@ -125,7 +125,7 @@
                 <thead>
                     <tr>
                         <th style="width:24px">
-                            <span class="checkall status"></span>
+                            <!-- <span class="checkall status"></span> -->
                         </th>
                         <th>姓名</th>
                         <th>联系方式</th>
@@ -203,7 +203,7 @@
                 <thead>
                     <tr>
                         <th style="width:24px">
-                            <span class="checkall status"></span>
+                            <!-- <span class="checkall status"></span> -->
                         </th>
                         <th>姓名</th>
                         <th>联系方式</th>