Browse Source

整合列表展开收起js

laiguoran 5 years ago
parent
commit
52cda64289

+ 2 - 0
app/controller/tender_controller.js

@@ -65,6 +65,8 @@ module.exports = app => {
                     auditConst,
                     userPermission,
                     valuations,
+                    uid: this.ctx.session.sessionUser.accountId,
+                    pid: this.ctx.session.sessionProject.id,
                 };
                 await this.layout(view, renderData, modal);
             } catch (err) {

+ 3 - 124
app/public/js/tender_list.js

@@ -47,7 +47,6 @@ const levelTreeSetting = {
 const levelNodes =[];
 const tenderTree = [];
 let parentId = 0;
-// let hideList = [];
 function createTree() {
     const zTree = $.fn.zTree.getZTreeObj('treeLevel');
     if (zTree) {
@@ -326,6 +325,7 @@ function getTenderTreeHtml () {
         html.push('<th>', '计量期数', '</th>');
         html.push('<th>', '审批状态', '</th>');
         html.push('</tr>', '</thead>');
+        parentId = 0;
         for (const t of tenderTree) {
             html.push(recursiveGetTenderNodeHtml(t, tenderTree, ''));
         }
@@ -352,37 +352,6 @@ function bindTenderUrl() {
     });
 }
 
-// function removeValueToCate(cate) {
-//     const changeCate = JSON.parse(JSON.stringify(cate));
-//     const newCate = [];
-//     for (const c of changeCate) {
-//         delete c.value;
-//         newCate.push(c);
-//     }
-//     return newCate;
-// }
-//
-// function localHideList() {
-//     const pro_cate = getLocalCache('pro_'+ pid + '_category_list');
-//     const cate = JSON.stringify(removeValueToCate(category));
-//     if (pro_cate && cate === pro_cate) {
-//         const userTenderHideList = getLocalCache(uphlname);
-//         if (userTenderHideList) {
-//             hideList = JSON.parse(userTenderHideList);
-//             for (const h of hideList) {
-//                 const cid = h.sort_id;
-//                 const node = findTenderTreeNode(parseInt(cid), tenderTree);
-//                 $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-//                 $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
-//                 doTrStatus(returnItem, 'hide');
-//             }
-//         }
-//     } else {
-//         removeLocalCache(uphlname);
-//         setLocalCache('pro_'+ pid + '_category_list', cate);
-//     }
-// }
-
 $(document).ready(() => {
     autoFlashHeight();
     sortCategory();
@@ -420,6 +389,7 @@ $(document).ready(() => {
             initCategoryLevelNode();
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
+            localHideList();
             $('#cate-set').modal('hide');
         });
     });
@@ -451,101 +421,10 @@ $(document).ready(() => {
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
             bindTenderUrl();
+            localHideList();
             $('#add-bd').modal('hide');
             $('[name=name]', '#add-bd').val('');
             $('#hide-all').hide();
         });
     });
-
-    // // 展开和收起
-    // $('body').on('click', '.fold-switch', function () {
-    //     if ($(this).children('i').hasClass('fa-minus-square-o')) {
-    //         $(this).children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-    //         $(this).attr('title', '展开');
-    //         const cid = $(this).attr('cid');
-    //         const node = findTenderTreeNode(parseInt(cid), tenderTree);
-    //         doTrStatus(returnItem, 'hide');
-    //         hideList.push({sort_id: cid});
-    //         setLocalCache(uphlname, JSON.stringify(hideList));
-    //     } else {
-    //         $(this).children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-    //         $(this).attr('title', '收起');
-    //         const cid = $(this).attr('cid');
-    //         const node = findTenderTreeNode(parseInt(cid), tenderTree);
-    //         doTrStatus(returnItem, 'show');
-    //         const index = hideList.findIndex(function(item) {
-    //             return parseInt(item.sort_id) === parseInt(cid);
-    //         });
-    //         hideList.splice(index, 1);
-    //         setLocalCache(uphlname, JSON.stringify(hideList));
-    //     }
-    // });
-    //
-    // // 一键展开和收起
-    // $('body').on('click', '.tree-toggle', function () {
-    //     const item = $(this).attr('data-item');
-    //     hideList = [];
-    //     if (item === 'open') {
-    //         setLocalCache(uphlname, JSON.stringify(hideList));
-    //     }
-    //     for (const tree of tenderTree) {
-    //         if (tree && tree.sort_id !== undefined) {
-    //             const cid = tree.sort_id;
-    //             const node = findTenderTreeNode(parseInt(cid), tenderTree);
-    //             if (item === 'open') {
-    //                 $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-    //                 $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
-    //                 doTrStatus(returnItem, 'show', 'all');
-    //             } else if (item === 'hide') {
-    //                 $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-    //                 $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
-    //                 doTrStatus(returnItem, 'hide', 'all');
-    //             }
-    //         }
-    //     }
-    // })
 });
-
-// function doTrStatus(node, status, all = '') {
-//     if (status === 'show') {
-//         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-//         if (all === 'all') {
-//             $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-//             $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
-//         }
-//     } else {
-//         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-//         if (all === 'all') {
-//             if (node.children) {
-//                 hideList.push({sort_id: node.sort_id});
-//                 setLocalCache(uphlname, JSON.stringify(hideList));
-//             }
-//             $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-//             $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-//         }
-//     }
-//     // 判断是否还有一层
-//     if (node.children && all === '') {
-//         for (const [index,c] of node.children.entries()) {
-//             const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
-//             if (title === '收起') {
-//                 doTrStatus(c, status);
-//             }
-//         }
-//     } else if (node.children && all === 'all') {
-//         for (const c of node.children) {
-//             doTrStatus(c, status, 'all');
-//         }
-//     }
-// }
-// let returnItem;
-// const findTenderTreeNode = function(sortId, tree) {
-//     tree.forEach((item) => {
-//         if (item.sort_id !== undefined && item.sort_id === sortId) {
-//             returnItem = item;
-//             return item;
-//         } else if (item.children && item.children.length > 0) {
-//             findTenderTreeNode(sortId, item.children);
-//         }
-//     });
-// }

+ 4 - 79
app/public/js/tender_list_info.js

@@ -357,6 +357,7 @@ function getTenderTreeHtml () {
         html.push('<th>', '本期应付', '</th>');
         html.push('<th>', '截止本期应付', '</th>');
         html.push('</tr>', '</thead>');
+        parentId = 0;
         for (const t of tenderTree) {
             html.push(recursiveGetTenderNodeHtml(t, tenderTree, ''));
         }
@@ -393,6 +394,7 @@ $(document).ready(() => {
     initTenderTree();
     $('.c-body').html(getTenderTreeHtml());
     bindTenderUrl();
+    localHideList();
     // 分类
     $('#cate-set').on('show.bs.modal', function () {
         createTree();
@@ -418,6 +420,7 @@ $(document).ready(() => {
             initCategoryLevelNode();
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
+            localHideList();
             $('#cate-set').modal('hide');
         });
     });
@@ -449,88 +452,10 @@ $(document).ready(() => {
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
             bindTenderUrl();
+            localHideList();
             $('#add-bd').modal('hide');
             $('[name=name]', '#add-bd').val('');
             $('#hide-all').hide();
         });
     });
-
-    // 展开和收起
-    $('body').on('click', '.fold-switch', function () {
-        if ($(this).children('i').hasClass('fa-minus-square-o')) {
-            $(this).children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-            $(this).attr('title', '展开');
-            const cid = $(this).attr('cid');
-            const node = findTenderTreeNode(parseInt(cid), tenderTree);
-            doTrStatus(returnItem, 'hide');
-        } else {
-            $(this).children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-            $(this).attr('title', '收起');
-            const cid = $(this).attr('cid');
-            const node = findTenderTreeNode(parseInt(cid), tenderTree);
-            doTrStatus(returnItem, 'show');
-        }
-    });
-
-    // 一键展开和收起
-    $('body').on('click', '.tree-toggle', function () {
-        const item = $(this).attr('data-item');
-        for (const tree of tenderTree) {
-            if (tree && tree.sort_id !== undefined) {
-                const cid = tree.sort_id;
-                const node = findTenderTreeNode(parseInt(cid), tenderTree);
-                console.log(node);
-                console.log(returnItem);
-                if (item === 'open') {
-                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
-                    doTrStatus(returnItem, 'show', 'all');
-                } else if (item === 'hide') {
-                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
-                    doTrStatus(returnItem, 'hide', 'all')
-                }
-            }
-        }
-    })
 });
-
-function doTrStatus(node, status, all = '') {
-    if (status === 'show') {
-        $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        if (all === 'all') {
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
-        }
-    } else {
-        $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        if (all === 'all') {
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-        }
-    }
-    // 判断是否还有一层
-    if (node.children && all === '') {
-        for (const [index,c] of node.children.entries()) {
-            const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
-            if (title === '收起') {
-                doTrStatus(c, status);
-            }
-        }
-    } else if (node.children && all === 'all') {
-        for (const c of node.children) {
-            doTrStatus(c, status, 'all');
-        }
-    }
-}
-let returnItem;
-const findTenderTreeNode = function(sortId, tree) {
-    tree.forEach((item) => {
-        if (item.sort_id !== undefined && item.sort_id === sortId) {
-            returnItem = item;
-            return item;
-        } else if (item.children && item.children.length > 0) {
-            findTenderTreeNode(sortId, item.children);
-        }
-    });
-}

+ 5 - 80
app/public/js/tender_list_manage.js

@@ -316,6 +316,7 @@ function getTenderTreeHtml () {
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
         html.push(getTenderTreeHeaderHtml());
+        parentId = 0;
         for (const t of tenderTree) {
             html.push(recursiveGetTenderNodeHtml(t, tenderTree, ''));
         }
@@ -373,6 +374,7 @@ $(document).ready(() => {
     initTenderTree();
     $('.c-body').html(getTenderTreeHtml());
     bindTenderUrl();
+    localHideList();
     // 分类
     $('#cate-set').on('show.bs.modal', function () {
         createTree();
@@ -398,6 +400,7 @@ $(document).ready(() => {
             initCategoryLevelNode();
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
+            localHideList();
             $('#cate-set').modal('hide');
         });
     });
@@ -436,6 +439,7 @@ $(document).ready(() => {
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
             bindTenderUrl();
+            localHideList();
             $('#add-bd').modal('hide');
             $('[name=name]', '#add-bd').val('');
         });
@@ -471,6 +475,7 @@ $(document).ready(() => {
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
             bindTenderUrl();
+            localHideList();
             $('#edit-bd').modal('hide');
         });
     });
@@ -516,84 +521,4 @@ $(document).ready(() => {
             $('#del-bd').modal('hide');
         }
     });
-
-    // 展开和收起
-    $('body').on('click', '.fold-switch', function () {
-        if ($(this).children('i').hasClass('fa-minus-square-o')) {
-            $(this).children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-            $(this).attr('title', '展开');
-            const cid = $(this).attr('cid');
-            const node = findTenderTreeNode(parseInt(cid), tenderTree);
-            doTrStatus(returnItem, 'hide');
-        } else {
-            $(this).children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-            $(this).attr('title', '收起');
-            const cid = $(this).attr('cid');
-            const node = findTenderTreeNode(parseInt(cid), tenderTree);
-            doTrStatus(returnItem, 'show');
-        }
-    });
-
-    // 一键展开和收起
-    $('body').on('click', '.tree-toggle', function () {
-        const item = $(this).attr('data-item');
-        for (const tree of tenderTree) {
-            if (tree && tree.sort_id !== undefined) {
-                const cid = tree.sort_id;
-                const node = findTenderTreeNode(parseInt(cid), tenderTree);
-                console.log(node);
-                console.log(returnItem);
-                if (item === 'open') {
-                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
-                    doTrStatus(returnItem, 'show', 'all');
-                } else if (item === 'hide') {
-                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
-                    doTrStatus(returnItem, 'hide', 'all')
-                }
-            }
-        }
-    })
 });
-
-function doTrStatus(node, status, all = '') {
-    if (status === 'show') {
-        $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        if (all === 'all') {
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
-        }
-    } else {
-        $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        if (all === 'all') {
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-        }
-    }
-    // 判断是否还有一层
-    if (node.children && all === '') {
-        for (const [index,c] of node.children.entries()) {
-            const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
-            if (title === '收起') {
-                doTrStatus(c, status);
-            }
-        }
-    } else if (node.children && all === 'all') {
-        for (const c of node.children) {
-            doTrStatus(c, status, 'all');
-        }
-    }
-}
-let returnItem;
-const findTenderTreeNode = function(sortId, tree) {
-    tree.forEach((item) => {
-        if (item.sort_id !== undefined && item.sort_id === sortId) {
-            returnItem = item;
-            return item;
-        } else if (item.children && item.children.length > 0) {
-            findTenderTreeNode(sortId, item.children);
-        }
-    });
-}
-

+ 4 - 79
app/public/js/tender_list_progress.js

@@ -335,6 +335,7 @@ function getTenderTreeHtml () {
         html.push('<th>', '总价 <i class="fa fa-question-circle text-primary"  data-placement="bottom" data-toggle="tooltip" data-original-title="0号台账+截止本期数量变更"></i>', '</th>');
         html.push('<th>', '截止上期完成/本期完成/未完成', '</th>');
         html.push('</tr>', '</thead>');
+        parentId = 0;
         for (const t of tenderTree) {
             html.push(recursiveGetTenderNodeHtml(t, tenderTree, ''));
         }
@@ -371,6 +372,7 @@ $(document).ready(() => {
     initTenderTree();
     $('.c-body').html(getTenderTreeHtml());
     bindTenderUrl();
+    localHideList();
     // 分类
     $('#cate-set').on('show.bs.modal', function () {
         createTree();
@@ -396,6 +398,7 @@ $(document).ready(() => {
             initCategoryLevelNode();
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
+            localHideList();
             $('#cate-set').modal('hide');
         });
     });
@@ -426,87 +429,9 @@ $(document).ready(() => {
             initTenderTree();
             $('.c-body').html(getTenderTreeHtml());
             bindTenderUrl();
+            localHideList();
             $('#add-bd').modal('hide');
             $('[name=name]', '#add-bd').val('');
         });
     });
-
-    // 展开和收起
-    $('body').on('click', '.fold-switch', function () {
-        if ($(this).children('i').hasClass('fa-minus-square-o')) {
-            $(this).children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-            $(this).attr('title', '展开');
-            const cid = $(this).attr('cid');
-            const node = findTenderTreeNode(parseInt(cid), tenderTree);
-            doTrStatus(returnItem, 'hide');
-        } else {
-            $(this).children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-            $(this).attr('title', '收起');
-            const cid = $(this).attr('cid');
-            const node = findTenderTreeNode(parseInt(cid), tenderTree);
-            doTrStatus(returnItem, 'show');
-        }
-    });
-
-    // 一键展开和收起
-    $('body').on('click', '.tree-toggle', function () {
-        const item = $(this).attr('data-item');
-        for (const tree of tenderTree) {
-            if (tree && tree.sort_id !== undefined) {
-                const cid = tree.sort_id;
-                const node = findTenderTreeNode(parseInt(cid), tenderTree);
-                console.log(node);
-                console.log(returnItem);
-                if (item === 'open') {
-                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
-                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
-                    doTrStatus(returnItem, 'show', 'all');
-                } else if (item === 'hide') {
-                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
-                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
-                    doTrStatus(returnItem, 'hide', 'all')
-                }
-            }
-        }
-    })
 });
-
-function doTrStatus(node, status, all = '') {
-    if (status === 'show') {
-        $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        if (all === 'all') {
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
-        }
-    } else {
-        $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        if (all === 'all') {
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-        }
-    }
-    // 判断是否还有一层
-    if (node.children && all === '') {
-        for (const [index,c] of node.children.entries()) {
-            const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
-            if (title === '收起') {
-                doTrStatus(c, status);
-            }
-        }
-    } else if (node.children && all === 'all') {
-        for (const c of node.children) {
-            doTrStatus(c, status, 'all');
-        }
-    }
-}
-let returnItem;
-const findTenderTreeNode = function(sortId, tree) {
-    tree.forEach((item) => {
-        if (item.sort_id !== undefined && item.sort_id === sortId) {
-            returnItem = item;
-            return item;
-        } else if (item.children && item.children.length > 0) {
-            findTenderTreeNode(sortId, item.children);
-        }
-    });
-}

+ 8 - 0
app/public/js/tender_showhide.js

@@ -1,5 +1,12 @@
 'use strict';
 
+/**
+ *
+ *
+ * @author EllisRan
+ * @date 2020/03/06
+ * @version
+ */
 let hideList = [];
 let returnItem;
 const findTenderTreeNode = function(sortId, tree) {
@@ -25,6 +32,7 @@ function removeValueToCate(cate) {
 
 function localHideList() {
     const pro_cate = getLocalCache('pro_'+ pid + '_category_list');
+    console.log(category);
     const cate = JSON.stringify(removeValueToCate(category));
     if (pro_cate && cate === pro_cate) {
         const userTenderHideList = getLocalCache(uphlname);

+ 1 - 1
app/view/tender/index.ejs

@@ -15,5 +15,5 @@
     const measureType = JSON.parse('<%- JSON.stringify(measureType) %>');
     const uid = '<%- uid %>';
     const pid = '<%- pid %>';
-    const uphlname = 'user_' + uid + '_pro_' + pid + '_category_hide_list_index';
+    const uphlname = 'user_' + uid + '_pro_' + pid + '_category_hide_list';
 </script>

+ 4 - 1
app/view/tender/info.ejs

@@ -13,4 +13,7 @@
     const category = JSON.parse('<%- JSON.stringify(categoryData) %>');
     const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
     const measureType = JSON.parse('<%- JSON.stringify(measureType) %>');
-</script>
+    const uid = '<%- uid %>';
+    const pid = '<%- pid %>';
+    const uphlname = 'user_' + uid + '_pro_' + pid + '_category_hide_list';
+</script>

+ 3 - 0
app/view/tender/manage.ejs

@@ -12,4 +12,7 @@
     const categoryType = JSON.parse('<%- JSON.stringify(settingConst.cType) %>');
     const category = JSON.parse('<%- JSON.stringify(categoryData) %>');
     const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
+    const uid = '<%- uid %>';
+    const pid = '<%- pid %>';
+    const uphlname = 'user_' + uid + '_pro_' + pid + '_category_hide_manange_list';
 </script>

+ 4 - 1
app/view/tender/progress.ejs

@@ -11,4 +11,7 @@
     const tenders = JSON.parse('<%- JSON.stringify(tenderList) %>');
     const categoryType = JSON.parse('<%- JSON.stringify(settingConst.cType) %>');
     const category = JSON.parse('<%- JSON.stringify(categoryData) %>');
-</script>
+    const uid = '<%- uid %>';
+    const pid = '<%- pid %>';
+    const uphlname = 'user_' + uid + '_pro_' + pid + '_category_hide_list';
+</script>

+ 3 - 0
config/web.js

@@ -75,6 +75,7 @@ const JsFiles = {
                 ],
                 mergeFiles: [
                     "/public/js/zh_calc.js",
+                    "/public/js/tender_showhide.js",
                     "/public/js/tender_list_info.js"
                 ],
                 mergeFile: 'tender_list_info',
@@ -87,6 +88,7 @@ const JsFiles = {
                 ],
                 mergeFiles: [
                     "/public/js/zh_calc.js",
+                    "/public/js/tender_showhide.js",
                     "/public/js/tender_list_progress.js"
                 ],
                 mergeFile: 'tender_list_progress',
@@ -100,6 +102,7 @@ const JsFiles = {
                 ],
                 mergeFiles: [
                     "/public/js/zh_calc.js",
+                    "/public/js/tender_showhide.js",
                     "/public/js/tender_list_manage.js",
                 ],
                 mergeFile: 'tender_list_manage',