From 8a7730936ce7879741669cdc15dfa50ae0461e71 Mon Sep 17 00:00:00 2001 From: LiuHao Date: Mon, 15 Jan 2024 15:34:15 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B5=81=E7=A8=8B=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A2=84=E8=A7=88=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/leave/index.ts | 6 +- src/api/workflow/leave/types.ts | 52 ---------- src/api/workflow/model/index.ts | 16 +-- src/api/workflow/model/types.ts | 53 +++++++++- src/directive/common/copyText.ts | 3 +- src/views/workflow/category/index.vue | 138 ++++++++++++------------- src/views/workflow/leave/index.vue | 139 ++++++++++++++------------ src/views/workflow/model/design.vue | 15 +-- src/views/workflow/model/index.vue | 95 ++++++++++-------- 9 files changed, 267 insertions(+), 250 deletions(-) diff --git a/src/api/workflow/leave/index.ts b/src/api/workflow/leave/index.ts index 064b8da..36c6fdf 100644 --- a/src/api/workflow/leave/index.ts +++ b/src/api/workflow/leave/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { LeaveVO, LeaveForm, LeaveQuery } from '@/api/demo/leave/types'; +import { LeaveVO, LeaveQuery, LeaveForm } from '@/api/workflow/leave/types'; /** * 查询请假列表 @@ -31,7 +31,7 @@ export const getLeave = (id: string | number): AxiosPromise => { * 新增请假 * @param data */ -export const addLeave = (data: LeaveForm) => { +export const addLeave = (data: LeaveForm): AxiosPromise => { return request({ url: '/demo/leave', method: 'post', @@ -43,7 +43,7 @@ export const addLeave = (data: LeaveForm) => { * 修改请假 * @param data */ -export const updateLeave = (data: LeaveForm) => { +export const updateLeave = (data: LeaveForm): AxiosPromise => { return request({ url: '/demo/leave', method: 'put', diff --git a/src/api/workflow/leave/types.ts b/src/api/workflow/leave/types.ts index 700a7cf..9405257 100644 --- a/src/api/workflow/leave/types.ts +++ b/src/api/workflow/leave/types.ts @@ -1,74 +1,22 @@ export interface LeaveVO { - /** - * 主键 - */ id: string | number; - - /** - * 请假类型 - */ leaveType: string; - - /** - * 开始时间 - */ startDate: string; - - /** - * 结束时间 - */ endDate: string; - - /** - * 请假天数 - */ leaveDays: number; - - /** - * 请假原因 - */ remark: string; } export interface LeaveForm extends BaseEntity { - /** - * 主键 - */ id?: string | number; - - /** - * 请假类型 - */ leaveType?: string; - - /** - * 开始时间 - */ startDate?: string; - - /** - * 结束时间 - */ endDate?: string; - - /** - * 请假天数 - */ leaveDays?: number; - - /** - * 请假原因 - */ remark?: string; } export interface LeaveQuery extends PageQuery { - /** - * 请假天数 - */ startLeaveDays?: number; - /** - * 请假天数 - */ endLeaveDays?: number; } diff --git a/src/api/workflow/model/index.ts b/src/api/workflow/model/index.ts index 022c651..dcfd76c 100644 --- a/src/api/workflow/model/index.ts +++ b/src/api/workflow/model/index.ts @@ -1,11 +1,13 @@ import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { ModelForm, ModelQuery, ModelVO } from '@/api/workflow/model/types'; /** * 查询模型列表 * @param query * @returns {*} */ -export const listModel = (query: object) => { +export const listModel = (query: ModelQuery): AxiosPromise => { return request({ url: '/workflow/model/list', method: 'get', @@ -15,10 +17,10 @@ export const listModel = (query: object) => { /** * 新增模型 - * @param query + * @param data * @returns {*} */ -export const addModel = (data: object) => { +export const addModel = (data: ModelForm): AxiosPromise => { return request({ url: '/workflow/model/rest/models', method: 'post', @@ -28,10 +30,10 @@ export const addModel = (data: object) => { /** * 按id删除模型 - * @param {模型id} id * @returns {*} + * @param id 模型id */ -export function delModel(id: object) { +export function delModel(id: string | string[]): AxiosPromise { return request({ url: '/workflow/model/' + id, method: 'delete' @@ -40,10 +42,10 @@ export function delModel(id: object) { /** * 模型部署 - * @param {模型id} id * @returns {*} + * @param id 模型id */ -export const modelDeploy = (id: string) => { +export const modelDeploy = (id: string): AxiosPromise => { return request({ url: `/workflow/model/modelDeploy/${id}`, method: 'post' diff --git a/src/api/workflow/model/types.ts b/src/api/workflow/model/types.ts index 563aab8..ff0c987 100644 --- a/src/api/workflow/model/types.ts +++ b/src/api/workflow/model/types.ts @@ -6,7 +6,58 @@ export interface ModelForm { } export interface ModelQuery extends PageQuery { + name?: string; + key?: string; + categoryCode?: string; +} + +export interface OriginalPersistentState { + metaInfo: string; + editorSourceValueId: string; + createTime: string; + deploymentId?: string; + name: string; + tenantId: string; + category?: string; + version: number; + editorSourceExtraValueId?: string; + key: string; + lastUpdateTime: string; +} + +export interface PersistentState { + metaInfo: string; + editorSourceValueId: string; + createTime: string; + deploymentId?: string; + name: string; + tenantId: string; + category?: string; + version: number; + editorSourceExtraValueId?: string; + key: string; + lastUpdateTime: string; +} + +export interface ModelVO { + id: string; + revision: number; + originalPersistentState: OriginalPersistentState; name: string; key: string; - categoryCode: string; + category?: string; + createTime: string; + lastUpdateTime: string; + version: number; + metaInfo: string; + deploymentId?: string; + editorSourceValueId: string; + editorSourceExtraValueId?: string; + tenantId: string; + persistentState: PersistentState; + revisionNext: number; + idPrefix: string; + inserted: boolean; + updated: boolean; + deleted: boolean; } diff --git a/src/directive/common/copyText.ts b/src/directive/common/copyText.ts index b6805f8..0e605d3 100644 --- a/src/directive/common/copyText.ts +++ b/src/directive/common/copyText.ts @@ -2,9 +2,10 @@ * v-copyText 复制文本内容 * Copyright (c) 2022 ruoyi */ +import { DirectiveBinding } from 'vue'; export default { - beforeMount(el: any, { value, arg }: any) { + beforeMount(el: any, { value, arg }: DirectiveBinding) { if (arg === 'callback') { el.$copyCallback = value; } else { diff --git a/src/views/workflow/category/index.vue b/src/views/workflow/category/index.vue index 486b2a4..3fa4307 100644 --- a/src/views/workflow/category/index.vue +++ b/src/views/workflow/category/index.vue @@ -1,8 +1,8 @@