123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- /*
- * Copyright 2022 Pnoker All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- import request from '@/config/axios'
- /**
- * 新增模板
- *
- * @param profile Profile
- * @returns MyAxiosPromise
- */
- export const addProfile = (profile: any) =>
- request<R>({
- url: `api/v3/manager/profile/add`,
- method: 'post',
- data: profile,
- })
- /**
- * 删除模板
- *
- * @param id 模板ID
- * @returns MyAxiosPromise
- */
- export const deleteProfile = (id: string) =>
- request<R>({
- url: `api/v3/manager/profile/delete/${id}`,
- method: 'post',
- })
- /**
- * 修改模板
- *
- * @param profile Profile
- * @returns MyAxiosPromise
- */
- export const updateProfile = (profile: any) =>
- request<R>({
- url: `api/v3/manager/profile/update`,
- method: 'post',
- data: profile,
- })
- /**
- * 通过模板ID查询模板
- *
- * @param id 模板ID
- * @returns MyAxiosPromise
- */
- export const getProfileById = (id: string) =>
- request<R>({
- url: `api/v3/manager/profile/id/${id}`,
- method: 'get',
- })
- /**
- * 通过模板ID集查询模板
- *
- * @param profileIds ProfileId Array
- * @returns MyAxiosPromise
- */
- export const getProfileByIds = (profileIds: any) =>
- request<R>({
- url: `api/v3/manager/profile/ids`,
- method: 'post',
- data: profileIds,
- })
- /**
- * 通过设备ID查询模板
- *
- * @param deviceId DeviceId
- * @returns MyAxiosPromise
- */
- export const getProfileByDeviceId = (deviceId: string) =>
- request<R>({
- url: `api/v3/manager/profile/device_id/${deviceId}`,
- method: 'get',
- })
- /**
- * 分页查询
- *
- * @param profile Profile
- * @returns MyAxiosPromise
- */
- export const getProfileList = (profile: any) =>
- request<R>({
- url: `api/v3/manager/profile/list`,
- method: 'post',
- data: profile,
- })
|