/**
 * Created by 1 at 2022-08-08 16:28:04
 * 注册事件类【数据权限组】，参看event.defaultEvent.js
 */
window.$swEvent.setup("bpm.sys.user.dataRightGroup.drgList", {
    setup(page) {
        const {$params, $refs, $widgets, $model, $utils, $tabRouter, $api} = page || {};
        const {$$message, $$http} = $utils || {};

        const onEditItem = () => {
            $model.drgItemList.data.list.rows = $model.drgCard.getFormVal("sdrg_content");
        }
        // 示例
        const onBeforeSave = () => {
            $model.drgCard.setFormVal("sdrg_content", $model.drgItemList.data.list.rows);
        };

        const onDataRightChange = () => {
            $model.drgItemList.data.list.rows = [];
        };

        return {
            onEditItem,
            onBeforeSave,
            onDataRightChange
        }
    }
});
