Blame view

src/api/inspection/inspectionPlanApi.js 2.25 KB
1d73dc48   wuxw   继续晚上巡检功能
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
  import request from '@/utils/request'
  import { getCommunityId } from '@/api/community/communityApi'
  
  // 获取字典数据
  export function getDict(dictType, state) {
    return request({
      url: '/dict.listDict',
      method: 'get',
      params: { dictType, state }
    }).then(res => res.data)
  }
  
  // 查询巡检计划列表
  export function listInspectionPlans(params) {
    return request({
      url: '/inspectionPlan.listInspectionPlans',
      method: 'get',
      params: {
        communityId: getCommunityId(),
        ...params
      }
    }).then(res => res.data)
  }
  
  // 更新巡检计划状态
  export function updateInspectionPlanState(data) {
    return request({
      url: '/inspectionPlan.updateInspectionPlanState',
      method: 'post',
      data: {
        communityId: getCommunityId(),
        ...data
      }
    }).then(res => res.data)
  }
  
  // 删除巡检计划
  export function deleteInspectionPlan(data) {
    return request({
      url: '/inspectionPlan.deleteInspectionPlan',
      method: 'post',
      data: {
        communityId: getCommunityId(),
        ...data
      }
    }).then(res => res.data)
  }
  
  // 更新巡检计划
  export function updateInspectionPlan(data) {
    return request({
      url: '/inspectionPlan.updateInspectionPlan',
      method: 'post',
      data: {
        communityId: getCommunityId(),
        ...data
      }
    }).then(res => res.data)
  }
  
  // 查询巡检路线列表
  export function listInspectionRoutes(params) {
    return request({
      url: '/inspectionRoute.listInspectionRoutes',
      method: 'get',
      params: {
        communityId: getCommunityId(),
        ...params
      }
    }).then(res => res.data)
  }
  
  // 查询巡检计划员工
  export function listInspectionPlanStaffs(params) {
    return request({
      url: '/inspection.listInspectionPlanStaffs',
      method: 'get',
      params: {
        communityId: getCommunityId(),
        ...params
      }
    }).then(res => res.data)
  }
  
  // 查询组织树
  export function listOrgTree() {
    return request({
      url: '/org.listOrgTree',
      method: 'get',
      params: { communityId: getCommunityId() }
    }).then(res => res.data)
  }
  
  // 根据组织ID查询员工
  export function listStaffsByOrgId(params) {
    return request({
      url: '/query.staff.infos',
      method: 'get',
      params: {
        communityId: getCommunityId(),
        ...params
      }
    }).then(res => res.data)
  }