/** * @description 行为规则任务 - 左侧菜单树 - 行为下的规则列表 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** behaviorId */ behaviorId: number; } export const init = new defs.TreeNodeBO(); export async function request(params = {}) { return Request({ url: '/api/tree/oneid/op/node/behavior/{behaviorId}/rule', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl( '/api/tree/oneid/op/node/behavior/{behaviorId}/rule', params, 'GET', ), params, init, }; }; }