diff --git a/yudao-ui-admin-vue3/src/api/bpm/model/index.ts b/yudao-ui-admin-vue3/src/api/bpm/model/index.ts index cc577a7fc..0d95727e4 100644 --- a/yudao-ui-admin-vue3/src/api/bpm/model/index.ts +++ b/yudao-ui-admin-vue3/src/api/bpm/model/index.ts @@ -2,20 +2,20 @@ import { useAxios } from '@/hooks/web/useAxios' import { ModelVO } from './types' const request = useAxios() -export const getModelPage = async (params) => { +export const getModelPageApi = async (params) => { return await request.get({ url: '/bpm/model/page', params }) } -export const getModel = async (id: number) => { +export const getModelApi = async (id: number) => { return await request.get({ url: '/bpm/model/get?id=' + id }) } -export const updateModel = async (data: ModelVO) => { +export const updateModelApi = async (data: ModelVO) => { return await request.put({ url: '/bpm/model/update', data: data }) } // 任务状态修改 -export const updateModelState = async (id: number, state: string) => { +export const updateModelStateApi = async (id: number, state: number) => { const data = { id: id, state: state @@ -23,14 +23,14 @@ export const updateModelState = async (id: number, state: string) => { return await request.put({ url: '/bpm/model/update-state', data: data }) } -export const createModel = async (data: ModelVO) => { +export const createModelApi = async (data: ModelVO) => { return await request.post({ url: '/bpm/model/create', data: data }) } -export const deleteModel = async (id: number) => { +export const deleteModelApi = async (id: number) => { return await request.delete({ url: '/bpm/model/delete?id=' + id }) } -export const deployModel = async (id: number) => { +export const deployModelApi = async (id: number) => { return await request.post({ url: '/bpm/model/deploy?id=' + id }) } diff --git a/yudao-ui-admin-vue3/src/api/bpm/model/types.ts b/yudao-ui-admin-vue3/src/api/bpm/model/types.ts index 96266fab3..36f4aab1b 100644 --- a/yudao-ui-admin-vue3/src/api/bpm/model/types.ts +++ b/yudao-ui-admin-vue3/src/api/bpm/model/types.ts @@ -1,3 +1,10 @@ +export type ProcessDefinitionVO = { + id: string + version: number + deploymentTIme: string + suspensionState: number +} + export type ModelVO = { id: number formName: string @@ -9,6 +16,7 @@ export type ModelVO = { formId: number formCustomCreatePath: string formCustomViewPath: string + processDefinition: ProcessDefinitionVO status: number remark: string createTime: string diff --git a/yudao-ui-admin-vue3/src/api/bpm/processInstance/index.ts b/yudao-ui-admin-vue3/src/api/bpm/processInstance/index.ts index b49dfa615..48715f853 100644 --- a/yudao-ui-admin-vue3/src/api/bpm/processInstance/index.ts +++ b/yudao-ui-admin-vue3/src/api/bpm/processInstance/index.ts @@ -2,15 +2,15 @@ import { useAxios } from '@/hooks/web/useAxios' import { ProcessInstanceVO } from './types' const request = useAxios() -export const getMyProcessInstancePage = async (params) => { +export const getMyProcessInstancePageApi = async (params) => { return await request.get({ url: '/bpm/process-instance/my-page', params }) } -export const createProcessInstance = async (data: ProcessInstanceVO) => { +export const createProcessInstanceApi = async (data: ProcessInstanceVO) => { return await request.post({ url: '/bpm/process-instance/create', data: data }) } -export const cancelProcessInstance = async (id: number, reason: string) => { +export const cancelProcessInstanceApi = async (id: number, reason: string) => { const data = { id: id, reason: reason @@ -18,6 +18,6 @@ export const cancelProcessInstance = async (id: number, reason: string) => { return await request.delete({ url: '/bpm/process-instance/cancel', data: data }) } -export const getProcessInstance = async (id: number) => { +export const getProcessInstanceApi = async (id: number) => { return await request.get({ url: '/bpm/process-instance/get?id=' + id }) } diff --git a/yudao-ui-admin-vue3/src/api/infra/codegen/index.ts b/yudao-ui-admin-vue3/src/api/infra/codegen/index.ts index dbce9518b..8b4c30f97 100644 --- a/yudao-ui-admin-vue3/src/api/infra/codegen/index.ts +++ b/yudao-ui-admin-vue3/src/api/infra/codegen/index.ts @@ -1,5 +1,5 @@ import { useAxios } from '@/hooks/web/useAxios' -import type { CodegenTableVO } from './types' +import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' const request = useAxios() @@ -14,12 +14,12 @@ export const getCodegenTableApi = (id: number) => { } // 新增代码生成表定义 -export const createCodegenTableApi = (data: CodegenTableVO) => { +export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { return request.post({ url: '/infra/codegen/create', data }) } // 修改代码生成表定义 -export const updateCodegenTableApi = (data: CodegenTableVO) => { +export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => { return request.put({ url: '/infra/codegen/update', data }) } diff --git a/yudao-ui-admin-vue3/src/api/infra/codegen/types.ts b/yudao-ui-admin-vue3/src/api/infra/codegen/types.ts index 237be1488..d4f87f3a9 100644 --- a/yudao-ui-admin-vue3/src/api/infra/codegen/types.ts +++ b/yudao-ui-admin-vue3/src/api/infra/codegen/types.ts @@ -1,5 +1,6 @@ export type CodegenTableVO = { - id: number + tableId: number + isParentMenuIdValid: boolean dataSourceConfigId: number scene: number tableName: string @@ -49,3 +50,11 @@ export type CodegenPreviewVO = { filePath: string code: string } +export type CodegenUpdateReqVO = { + table: CodegenTableVO + columns: CodegenColumnVO[] +} +export type CodegenCreateListReqVO = { + dataSourceConfigId: number + tableNames: string[] +} diff --git a/yudao-ui-admin-vue3/src/components/Crontab/index.ts b/yudao-ui-admin-vue3/src/components/Crontab/index.ts new file mode 100644 index 000000000..a91f929d3 --- /dev/null +++ b/yudao-ui-admin-vue3/src/components/Crontab/index.ts @@ -0,0 +1,3 @@ +import Crontab from './src/index.vue' + +export { Crontab } diff --git a/yudao-ui-admin-vue3/src/components/Crontab/day.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/day.vue similarity index 96% rename from yudao-ui-admin-vue3/src/components/Crontab/day.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/day.vue index 6e368f3a3..7186baf35 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/day.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/day.vue @@ -1,60 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/hour.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/hour.vue similarity index 95% rename from yudao-ui-admin-vue3/src/components/Crontab/hour.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/hour.vue index d26a2b7e6..e258572ed 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/hour.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/hour.vue @@ -1,45 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/src/components/index.ts b/yudao-ui-admin-vue3/src/components/Crontab/src/components/index.ts new file mode 100644 index 000000000..bc95ebd24 --- /dev/null +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/index.ts @@ -0,0 +1,19 @@ +import CrontabSecond from './second.vue' +import CrontabMin from './min.vue' +import CrontabHour from './hour.vue' +import CrontabDay from './day.vue' +import CrontabMonth from './month.vue' +import CrontabWeek from './week.vue' +import CrontabYear from './year.vue' +import CrontabResult from './result.vue' + +export { + CrontabSecond, + CrontabMin, + CrontabHour, + CrontabDay, + CrontabMonth, + CrontabWeek, + CrontabYear, + CrontabResult +} diff --git a/yudao-ui-admin-vue3/src/components/Crontab/min.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/min.vue similarity index 95% rename from yudao-ui-admin-vue3/src/components/Crontab/min.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/min.vue index ed961acf8..491749e0e 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/min.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/min.vue @@ -1,45 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/month.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/month.vue similarity index 95% rename from yudao-ui-admin-vue3/src/components/Crontab/month.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/month.vue index 2cc074c4d..8b0669a93 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/month.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/month.vue @@ -1,45 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/result.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/result.vue similarity index 99% rename from yudao-ui-admin-vue3/src/components/Crontab/result.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/result.vue index 6a0f2b838..37e2aec99 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/result.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/result.vue @@ -1,16 +1,4 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/second.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/second.vue similarity index 95% rename from yudao-ui-admin-vue3/src/components/Crontab/second.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/second.vue index 42b5496af..f3cf00ae5 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/second.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/second.vue @@ -1,45 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/week.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/week.vue similarity index 97% rename from yudao-ui-admin-vue3/src/components/Crontab/week.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/week.vue index ea3e7760a..5a940fa02 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/week.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/week.vue @@ -1,97 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/year.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/components/year.vue similarity index 96% rename from yudao-ui-admin-vue3/src/components/Crontab/year.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/components/year.vue index f798f70c2..c17f3f399 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/year.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/components/year.vue @@ -1,53 +1,6 @@ - - - + diff --git a/yudao-ui-admin-vue3/src/components/Crontab/index.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/index.vue similarity index 94% rename from yudao-ui-admin-vue3/src/components/Crontab/index.vue rename to yudao-ui-admin-vue3/src/components/Crontab/src/index.vue index 0819dd595..e71276bac 100644 --- a/yudao-ui-admin-vue3/src/components/Crontab/index.vue +++ b/yudao-ui-admin-vue3/src/components/Crontab/src/index.vue @@ -1,126 +1,15 @@ - - - + + + +
+ + + + + + +
+ diff --git a/yudao-ui-admin-vue3/src/views/bpm/model/model.data.ts b/yudao-ui-admin-vue3/src/views/bpm/model/model.data.ts new file mode 100644 index 000000000..a1ffaadfc --- /dev/null +++ b/yudao-ui-admin-vue3/src/views/bpm/model/model.data.ts @@ -0,0 +1,81 @@ +import { reactive } from 'vue' +import { useI18n } from '@/hooks/web/useI18n' +import { required } from '@/utils/formRules' +import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' +import { DICT_TYPE } from '@/utils/dict' +const { t } = useI18n() // 国际化 + +// 表单校验 +export const rules = reactive({ + name: [required] +}) + +// CrudSchema +const crudSchemas = reactive([ + { + label: t('common.index'), + field: 'id', + type: 'index', + form: { + show: false + }, + detail: { + show: false + } + }, + { + label: '流程标识', + field: 'key', + search: { + show: true + } + }, + { + label: '流程名称', + field: 'name', + search: { + show: true + } + }, + { + label: '流程分类', + field: 'category', + dictType: DICT_TYPE.BPM_MODEL_CATEGORY, + search: { + show: true + } + }, + { + label: '表单信息', + field: 'formId' + }, + { + label: '最新部署的流程定义', + field: 'processDefinition', + form: { + show: false + }, + detail: { + show: false + } + }, + { + label: t('common.createTime'), + field: 'createTime', + form: { + show: false + } + }, + { + label: t('table.action'), + field: 'action', + width: '240px', + form: { + show: false + }, + detail: { + show: false + } + } +]) +export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/bpm/processInstance/index.vue b/yudao-ui-admin-vue3/src/views/bpm/processInstance/index.vue index b03cb75c8..a49d911f3 100644 --- a/yudao-ui-admin-vue3/src/views/bpm/processInstance/index.vue +++ b/yudao-ui-admin-vue3/src/views/bpm/processInstance/index.vue @@ -1,7 +1,121 @@ - + + + + + + + +
+ + {{ t('action.add') }} + +
+ + + + + +
+
- + + + + + + + + + + diff --git a/yudao-ui-admin-vue3/src/views/bpm/processInstance/process.data.ts b/yudao-ui-admin-vue3/src/views/bpm/processInstance/process.data.ts new file mode 100644 index 000000000..dff3dc076 --- /dev/null +++ b/yudao-ui-admin-vue3/src/views/bpm/processInstance/process.data.ts @@ -0,0 +1,84 @@ +import { reactive } from 'vue' +import { useI18n } from '@/hooks/web/useI18n' +import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas' +import { DICT_TYPE } from '@/utils/dict' +const { t } = useI18n() // 国际化 + +// CrudSchema +const crudSchemas = reactive([ + { + label: t('common.index'), + field: 'id', + type: 'index', + form: { + show: false + }, + detail: { + show: false + } + }, + { + label: '流程名', + field: 'name', + search: { + show: true + } + }, + { + label: '流程分类', + field: 'category', + dictType: DICT_TYPE.BPM_MODEL_CATEGORY, + search: { + show: true + } + }, + { + label: '当前审批任务', + field: 'tasks' + }, + { + label: t('common.status'), + field: 'status', + dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS, + search: { + show: true + } + }, + { + label: '结果', + field: 'result', + dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT, + search: { + show: true + } + }, + { + label: '提交时间', + field: 'createTime', + form: { + show: false + }, + search: { + show: true + } + }, + { + label: '结束时间', + field: 'endTime', + form: { + show: false + } + }, + { + label: t('table.action'), + field: 'action', + width: '240px', + form: { + show: false + }, + detail: { + show: false + } + } +]) +export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/yudao-ui-admin-vue3/src/views/infra/codegen/components/EditTable.vue b/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue similarity index 57% rename from yudao-ui-admin-vue3/src/views/infra/codegen/components/EditTable.vue rename to yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue index 47e2c89e6..fc52ce51c 100644 --- a/yudao-ui-admin-vue3/src/views/infra/codegen/components/EditTable.vue +++ b/yudao-ui-admin-vue3/src/views/infra/codegen/EditTable.vue @@ -1,18 +1,16 @@