import apolloClient from "@/utils/graphql"; import gql from "graphql-tag"; //全部 export function getTeamDtoAll(params) { return apolloClient.query({ query: gql` query vars( $staffId: Int! $types: [TeamType!]! $keyword: String $pageIn: PageIn! ) { findTeamDtoAll( staffId: $staffId types: $types keyword: $keyword pageIn: $pageIn ) { ls { team { id name voucher { id name } sessionStaffs { id name } } playerCount } pageOut { total index size } } } `, fetchPolicy:'no-cache', variables: params, }); } //停用 export function getDeletedItem(params) { return apolloClient.query({ query: gql` query vars( $staffId: Int! $itemType: ItemType! $keyword: String $pageIn: PageIn! ) { findDeletedItem( staffId: $staffId itemType: $itemType keyword: $keyword pageIn: $pageIn ) { ls { id name modifyTime } pageOut { total index size } } } `, fetchPolicy:'no-cache', variables: params, }); } export function findClassAttendance(params) { return apolloClient.query({ query: gql`query vars($staffId:Int!,$campusId:Int, $beginDate:LocalDate!,$endDate:LocalDate!,$pageIn:PageIn!){ findClassAttendance(staffId:$staffId,campusId:$campusId, beginDate:$beginDate,endDate:$endDate,pageIn:$pageIn) {ls{teamId teamName completeCount leaveCount absenceCount allCount staffName placeName} pageOut{total index size} } } `, fetchPolicy:'no-cache', variables: params, }); }