.
18516761980
2022-04-06 e52ba640d14d79570345aa766dacbd15c7bad1cf
src/main/webapp/static/js/item/item.js
@@ -49,7 +49,7 @@
            // ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '备注'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:180}
        ]],
        request: {
            pageName: 'curr',
@@ -159,6 +159,9 @@
                var ids = [data.id];
                del(ids);
                break;
            case "initPlan":
                initPlan(data.id);
                break;
        }
    });
@@ -228,6 +231,34 @@
        });
    }
    /* 初始化项目节点 */
    function initPlan(id) {
        layer.confirm('确定要生成该项目计划节点吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/item/initPlan/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {id: id},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        tableReload();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 搜索
    form.on('submit(search)', function (data) {