From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/api/bpm/model/index.ts |   79 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 79 insertions(+), 0 deletions(-)

diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts
new file mode 100644
index 0000000..6d2b4d2
--- /dev/null
+++ b/src/api/bpm/model/index.ts
@@ -0,0 +1,79 @@
+import request from '@/config/axios'
+
+export type ProcessDefinitionVO = {
+  id: string
+  version: number
+  deploymentTIme: string
+  suspensionState: number
+  formType?: number
+  formCustomCreatePath?: string
+}
+
+export type ModelVO = {
+  id: number
+  formName: string
+  key: string
+  name: string
+  description: string
+  category: string
+  formType: number
+  formId: number
+  formCustomCreatePath: string
+  formCustomViewPath: string
+  processDefinition: ProcessDefinitionVO
+  status: number
+  remark: string
+  createTime: string
+  bpmnXml: string
+}
+
+export const getModelList = async (name: string | undefined) => {
+  return await request.get({ url: '/bpm/model/list', params: { name } })
+}
+
+export const getModel = async (id: string) => {
+  return await request.get({ url: '/bpm/model/get?id=' + id })
+}
+
+export const updateModel = async (data: ModelVO) => {
+  return await request.put({ url: '/bpm/model/update', data: data })
+}
+
+// 鎵归噺淇敼娴佺▼鍒嗙被鐨勬帓搴�
+export const updateModelSortBatch = async (ids: number[]) => {
+  return await request.put({
+    url: `/bpm/model/update-sort-batch`,
+    params: {
+      ids: ids.join(',')
+    }
+  })
+}
+
+export const updateModelBpmn = async (data: ModelVO) => {
+  return await request.put({ url: '/bpm/model/update-bpmn', data: data })
+}
+
+// 浠诲姟鐘舵�佷慨鏀�
+export const updateModelState = async (id: number, state: number) => {
+  const data = {
+    id: id,
+    state: state
+  }
+  return await request.put({ url: '/bpm/model/update-state', data: data })
+}
+
+export const createModel = async (data: ModelVO) => {
+  return await request.post({ url: '/bpm/model/create', data: data })
+}
+
+export const deleteModel = async (id: number) => {
+  return await request.delete({ url: '/bpm/model/delete?id=' + id })
+}
+
+export const deployModel = async (id: number) => {
+  return await request.post({ url: '/bpm/model/deploy?id=' + id })
+}
+
+export const cleanModel = async (id: number) => {
+  return await request.delete({ url: '/bpm/model/clean?id=' + id })
+}

--
Gitblit v1.8.0