18516761980
2022-01-14 111d09d2f3fadf841e3df1c72dfd423ea1c91649
src/main/webapp/static/js/projectPlan/projectPlan.js
@@ -1,5 +1,5 @@
var pageCurr;
var firstId;
var items;
getItems();
layui.config({
@@ -23,14 +23,14 @@
        toolbar: '#toolbar',
        cellMinWidth: 50,
        where: {
            target: firstId
            items: items
        },
        cols: [[
            {type: 'checkbox'}
            {type: 'checkbox', hide:true}
            // ,{field: 'id', align: 'center',title: '唯一ID'}
            // ,{field: 'itemId', align: 'center',title: '项目ID'}
            ,{field: 'flowName', align: 'center',title: '节点名称'}
            ,{field: 'itemId$', align: 'center',title: '项目名称'}
            ,{field: 'flowId$', align: 'center',title: '节点名称'}
            ,{field: 'weightNum', align: 'center',title: '权重值'}
            // ,{field: 'flowId', align: 'center',title: '节点ID'}
@@ -81,6 +81,11 @@
            where: searchData,
            page: {curr: 1}
        });
    });
    form.on('select(items)',function (data) {
        items = data.value
        tableReload();
    });
    // 监听头工具栏事件
@@ -157,6 +162,7 @@
    /* 弹窗 - 新增、修改 */
    function showEditModel(mData) {
        admin.open({
            type: 1,
            area: '600px',
@@ -166,7 +172,9 @@
                layDateRender();
                form.val('detail', mData);
                form.on('submit(editSubmit)', function (data) {
                    if(mData === '添加'){
                        data.field.push(items);
                    }
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/projectPlan/"+(mData?'update':'add')+"/auth",
@@ -288,7 +296,8 @@
        if (res.data != null) {
            // console.log(res.data[0].key)
            firstId = res.data[0].key;
            // items = res.data[0].key;
            items='0';
            var tpl = $("#parentNodeGroup").html();
            var template = Handlebars.compile(tpl);
            var html = template(res);
@@ -296,4 +305,5 @@
        }
    });
}
}