modelCmd.ts 580 B

123456789101112131415161718192021222324
  1. import { addModelCmd, getModelCmd, updateModelCmd, delModelCmd } from '@/api/iot/model'
  2. import { message } from 'ant-design-vue'
  3. export class ModelCmdController {
  4. static async page (params: any) {
  5. return await getModelCmd(params)
  6. }
  7. static async post (data: IOT.API.CMD.Cmd) {
  8. await addModelCmd(data)
  9. message.success('新增成功')
  10. }
  11. static async update (data: IOT.API.CMD.Cmd) {
  12. await updateModelCmd(data)
  13. message.success('修改成功')
  14. }
  15. static async del (id: string) {
  16. await delModelCmd(id)
  17. message.success('删除成功')
  18. }
  19. }