ソースを参照

feat: 事项设置的接口

outaozhen 3 年 前
コミット
f8b790eb2b
2 ファイル変更80 行追加0 行削除
  1. 46 0
      src/services/api/business.ts
  2. 34 0
      src/services/api/typings.d.ts

+ 46 - 0
src/services/api/business.ts

@@ -106,3 +106,49 @@ export async function delExecutor(params: { ID: string }) {
     data: params
   })
 }
+
+/** 获取事项列表 */
+export async function queryMatterList(params: {
+  subjectID: string
+  businessType: BusinessType
+  pageSize: number
+}) {
+  return request('/Matter/list', {
+    params
+  })
+}
+
+/** 获取事项树 */
+export async function queryMatterTree(params: {
+  subjectID: string
+  businessType: BusinessType
+  pageSize: number
+}) {
+  return request('/Matter/tree', {
+    params
+  })
+}
+
+/** 新建事项分类 */
+export async function addMatter(params: API.MatterItem) {
+  return request('/matter/add', {
+    method: 'POST',
+    data: params
+  })
+}
+
+/** 编辑事项分类 */
+export async function updateMatter(params: API.MatterItem) {
+  return request('/Matter/update', {
+    method: 'POST',
+    data: params
+  })
+}
+
+/** 删除事项分类 */
+export async function delMatter(params: { ID: string }) {
+  return request('/Matter/delete', {
+    method: 'POST',
+    data: params
+  })
+}

+ 34 - 0
src/services/api/typings.d.ts

@@ -477,6 +477,7 @@ declare namespace API {
     participantInfo?: ParticipantInfo
     conditionInfo?: ConditionInfo[]
   }
+
   type LoginLogParams = {
     ID: string
     ip: string
@@ -488,4 +489,37 @@ declare namespace API {
     createTime: number
     id: string
   }
+
+  type MatterParams = {
+    ID: string
+    subjectID: string
+    matterType: string
+    businessType: string
+    parentID: string
+    name: string
+    sort: number
+    assembly: any[]
+    id: string
+    children: any[]
+  }
+
+  type MatterListParams = {
+    ID: string
+    subjectID: string
+    matterType: string
+    businessType: string
+    parentID: string
+    name: string
+    sort: number
+    assembly: any[]
+    id: string
+  }
+
+  type MatterItem = {
+    subjectID: string
+    businessType: string
+    matterType: string
+    ID: string
+    name: string
+  }
 }