let setting = {
    view: {
        addHoverDom: zTreeOprObj.addHoverDom,
        removeHoverDom: zTreeOprObj.removeHoverDom,
        expandSpeed: "",
        selectedMulti: false
    },
    edit: {
        enable: true,
        editNameSelectAll: true,
        showRemoveBtn: true,
        showRenameBtn: true,
        removeTitle: "删除节点",
        renameTitle: "更改名称",
        drag: {
            isCopy: true,
            isMove: true
        }
    },
    check: {
        enable: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: "items",
            name: "name",
            title: "refId"
        },
        simpleData: {
            enable: true,
            rootPId: -1
        }
    },
    callback:{
        beforeClick: zTreeOprObj.beforeClick,
        onClick: zTreeOprObj.onClick,
        beforeEditName: zTreeOprObj.beforeEditName,
        beforeRename: zTreeOprObj.beforeRename,
        beforeRemove: zTreeOprObj.onBeforeRemove,
        onRemove: zTreeOprObj.onRemove,
        onRename: zTreeOprObj.onRename,
        onCheck: zTreeOprObj.onCheck,
        beforeDrag: zTreeOprObj.onBeforeDrag,
        beforeDrop: zTreeOprObj.onBeforeDrop,
        onDrop: zTreeOprObj.onDrop
    }
};

let common_rpt_type_ids = {
    flow: 4,
    bill: 6,
    cross: 5
};

let bandSetting = {
    view: {
        addHoverDom: bandTreeOprObj.addHoverDom,
        removeHoverDom: bandTreeOprObj.removeHoverDom,
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false
    },
    edit: {
        enable: true,
        editNameSelectAll: true,
        showRemoveBtn: true,
        showRenameBtn: true,
        removeTitle: "删除模板框",
        renameTitle: "更改名称"
    },
    check: {
        enable: true,
        chkStyle: "radio",
        radioType: "all"
    },
    drag: {
        isCopy: false,
        isMove: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'band_s',
            name: "Name"
        },
        simpleData: {
            enable: true
            //,idKey: "ID",
            //pIdKey: "ParentID",
            //rootPId: -1
        }
    },
    callback:{
        onClick: bandTreeOprObj.onClick,
        onCheck: bandTreeOprObj.onCheck,
        beforeDrag: bandTreeOprObj.onBeforeDrag,
        beforeDrop: bandTreeOprObj.onBeforeDrop,
        beforeRemove: bandTreeOprObj.onBeforeRemove
    }
};

let selectedFieldMapSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false
    },
    edit: {
        enable: true,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false,
        drag: {
            isCopy: true,
            isMove: false
        }
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title"
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        beforeDrag: dataInfoMapTreeOprObj.onBeforeDrag,
        beforeDrop: dataInfoMapTreeOprObj.onBeforeDrop,
        onDrop: dataInfoMapTreeOprObj.onDrop
    }
};

let fieldMapSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false
    },
    edit: {
        enable: true,
        editNameSelectAll: true,
        showRemoveBtn: true,
        showRenameBtn: false,
        removeTitle: "删除",
        renameTitle: "更改名称",
        drag: {
            isCopy: false,
            isMove: true
        }
    },
    check: {
        enable: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title"
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onClick: fieldMapTreeOprObj.onClick,
        beforeRename: fieldMapTreeOprObj.beforeRename,
        beforeRemove: fieldMapTreeOprObj.onBeforeRemove,
        onRemove: fieldMapTreeOprObj.onRemove,
        onRename: fieldMapTreeOprObj.onRename,
        beforeDrop: fieldMapTreeOprObj.onBeforeDrop
    }
};

let caculationSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false,
        addHoverDom: calculationTreeOprObj.addHoverDom,
        removeHoverDom: calculationTreeOprObj.removeHoverDom
    },
    edit: {
        enable: true,
        editNameSelectAll: true,
        showRemoveBtn: true,
        showRenameBtn: true,
        removeTitle: "删除",
        renameTitle: "更改名称",
        drag: {
            isCopy: false,
            isMove: true
        }
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name"
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onClick: calculationTreeOprObj.onClick,
        beforeRename: calculationTreeOprObj.beforeRename,
        beforeRemove: calculationTreeOprObj.onBeforeRemove,
        beforeDrop: calculationTreeOprObj.onBeforeDrop
    }
};

let extCodeSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false
    },
    edit: {
        enable: false,
        showRemoveBtn: false,
        showRenameBtn: false
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Description"
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onClick: calculationTreeOprObj.onExtCodeTreeClick
    }
};

let rptDataInfoSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false,
        addHoverDom: dataInfoMapTreeOprObj.addHoverDom,
        removeHoverDom: dataInfoMapTreeOprObj.removeHoverDom,
        addDiyDom: dataInfoMapTreeOprObj.addDiyDom
    },
    edit: {
        enable: true,
        editNameSelectAll: true,
        showRemoveBtn: true,
        showRenameBtn: true,
        removeTitle: "删除",
        renameTitle: "更改文本名称",
        drag: {
            isCopy: false,
            isMove: true
        }
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title"
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onClick: dataInfoMapTreeOprObj.onTabDataClick,
        beforeRemove: dataInfoMapTreeOprObj.onBeforeRemove,
        beforeEditName: dataInfoMapTreeOprObj.beforeEditName,
        onRemove: dataInfoMapTreeOprObj.onRemove,
        onRename: dataInfoMapTreeOprObj.onRename,
        beforeDrag: function () { return false; }
        //,beforeDrop: dataInfoMapTreeOprObj.onBeforeDrop
    }
};

let selectableFieldSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false
        //,addDiyDom: selectableFiledTreeOprObj.addDiyDom
    },
    edit: {
        enable: true,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false,
        removeTitle: "删除",
        renameTitle: "更改名称",
        drag: {
            isCopy: true,
            isMove: false
        }
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title"
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onClick: selectableFiledTreeOprObj.onClick,
        beforeDrag: selectableFiledTreeOprObj.onBeforeDrag,
        beforeDrop: selectableFiledTreeOprObj.onBeforeDrop
    }
};

let discreteFieldParamSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false,
        addHoverDom: discreteFieldParamTreeOprObj.addHoverDom,
        removeHoverDom: discreteFieldParamTreeOprObj.removeHoverDom
    },
    edit: {
        enable: true,
        editNameSelectAll: false,
        showRemoveBtn: true,
        showRenameBtn: true,
        removeTitle: "删除",
        renameTitle: "更改名称",
        drag: {
            isCopy: true,
            isMove: false
        }
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        beforeRename: discreteFieldParamTreeOprObj.beforeRename,
        beforeRemove: discreteFieldParamTreeOprObj.onBeforeRemove,
        onRemove: discreteFieldParamTreeOprObj.onRemove,
        onRename: discreteFieldParamTreeOprObj.onRename,
        beforeDrag: discreteFieldParamTreeOprObj.onBeforeDrag,
        beforeDrop: dataInfoMapTreeOprObj.onBeforeDrop,
        onDrop: dataInfoMapTreeOprObj.onDrop
    }
};

let preHandleSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false,
        addHoverDom: preHandleObj.addHoverDom,
        removeHoverDom: preHandleObj.removeHoverDom
    },
    edit: {
        enable: true,
        editNameSelectAll: false,
        showRemoveBtn: true,
        showRenameBtn: false,
        removeTitle: "删除",
        drag: {
            isCopy: false,
            isMove: true
        }
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onClick: preHandleObj.onPreHandleClick,
        beforeRemove: preHandleObj.onBeforeRemove,
        beforeDrag: preHandleObj.onBeforeDrag,
        beforeDrop: preHandleObj.onBeforeDrop
    }
};

let preHandleTypeSetting = {
    view: {
        showIcon: true,
        expandSpeed: "",
        selectedMulti: false
    },
    edit: {
        enable: true,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false
    },
    check: {
        enable: true,
        chkStyle: "radio",
        radioType: "all"
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onCheck: preHandleObj.onTypeClick,
        beforeDrag: function() {return false;}
    }
};

let sortingKeysSetting = {
    view: {
        // showIcon: true,
        // expandSpeed: "",
        // selectedMulti: false,
        addDiyDom: preHandleSortObj.addDiyDom
    },
    edit: {
        enable: false,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false
    },
    check: {
        enable: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onCheck: preHandleSortObj.onCheck,
        beforeDrag: function(){return false;}
    }
};

let sortingTreeSetting = {
    view: {
    },
    edit: {
        enable: false,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false
    },
    check: {
        enable: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onCheck: preHandleSortObj.onTopBillsNodeCheck
        // beforeDrag: function(){return false;}
    }
};

let sortingTreeSetting2 = {
    view: {
    },
    edit: {
        enable: false,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false
    },
    check: {
        enable: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onCheck: preHandleSortObj.onOtherBillsNodeCheck
        // beforeDrag: function(){return false;}
    }
};

let filterKeysSetting = {
    view: {
        addDiyDom: preHandleFilterObj.addDiyDom
    },
    edit: {
        enable: false,
        editNameSelectAll: false,
        showRemoveBtn: false,
        showRenameBtn: false
    },
    check: {
        enable: true
    },
    data: {
        keep: {
            parent:true,
            leaf:true
        },
        key: {
            children: 'items',
            name: "Name",
            title: "Title",
        },
        simpleData: {
            enable: true
        }
    },
    callback:{
        onCheck: preHandleFilterObj.onCheck,
        beforeDrag: function(){return false;}
    }
};

const engineering = {
    // 建筑工程
    ARCHITECTURE: 1,
    // 装饰工程
    DECORATE: 2,
    // 仿古建筑工程
    ANTIQUE_ARCHITECTURE: 3,
    // 安装工程
    BUILD_IN: 4,
    // 市政土建工程
    MUNICIPAL_CONSTRUCTION: 5,
    // 市政安装工程
    MUNICIPAL_BUILD_IN: 6,
    // 人工土石方工程
    ARTIFICIAL_EARTHWORK: 7,
    // 机械土石方工程
    MECHANICAL_EARTHWORK: 8,
    // 炉窖砌筑工程
    KILN_MASONRY: 9,
    // 园林工程
    GARDEN: 10,
    // 绿化工程
    PLANTING: 11,
    // 单拆除工程
    DISMANTLE: 12,
    // 建筑修缮工程
    BUILDING_REPAIR: 13,
    // 安装修缮工程
    BUILD_IN_REPAIR: 14
};

const engineeringList = [
    {name: "建筑工程", value: engineering.ARCHITECTURE},
    {name: "装饰工程", value: engineering.DECORATE},
    {name: "仿古建筑工程", value: engineering.ANTIQUE_ARCHITECTURE},
    {name: "安装工程", value: engineering.BUILD_IN},
    {name: "市政土建工程", value: engineering.MUNICIPAL_CONSTRUCTION},
    {name: "市政安装工程", value: engineering.MUNICIPAL_BUILD_IN},
    {name: "人工土石方工程", value: engineering.ARTIFICIAL_EARTHWORK},
    {name: "机械土石方工程", value: engineering.MECHANICAL_EARTHWORK},
    {name: "炉窖砌筑工程", value: engineering.KILN_MASONRY},
    {name: "园林工程", value: engineering.GARDEN},
    {name: "绿化工程", value: engineering.PLANTING},
    {name: "单拆除工程", value: engineering.DISMANTLE},
    {name: "建筑修缮工程", value: engineering.BUILDING_REPAIR},
    {name: "安装修缮工程", value: engineering.BUILD_IN_REPAIR},
];
