|
|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
<div class="p-2">
|
|
|
- <el-row :gutter="20">
|
|
|
+ <el-row>
|
|
|
<!-- 流程分类树 -->
|
|
|
- <el-col :lg="4" :xs="24" style="">
|
|
|
- <el-card shadow="hover">
|
|
|
- <el-input v-model="categoryName" placeholder="请输入流程分类名" prefix-icon="Search" clearable />
|
|
|
+ <el-col :lg="4" :xs="24">
|
|
|
+ <el-card shadow="hover" style="height: 90vh;margin-top: 10px">
|
|
|
+ <el-input v-model="categoryName" placeholder="请输入流程分类名" prefix-icon="Search" clearable/>
|
|
|
<el-tree
|
|
|
ref="categoryTreeRef"
|
|
|
class="mt-2"
|
|
|
@@ -22,49 +22,43 @@
|
|
|
<el-col :lg="20" :xs="24">
|
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
- <el-card shadow="hover">
|
|
|
+ <el-card shadow="hover" :style="{ marginTop: '10px', height: '60px' }">
|
|
|
<el-form v-show="showSearch" ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px">
|
|
|
<el-form-item label="流程定义名称" prop="name">
|
|
|
- <el-input v-model="queryParams.name" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
|
|
|
+ <el-input v-model="queryParams.name" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="流程定义KEY" prop="key">
|
|
|
- <el-input v-model="queryParams.key" placeholder="请输入流程定义KEY" clearable @keyup.enter="handleQuery" />
|
|
|
+ <el-input v-model="queryParams.key" placeholder="请输入流程定义KEY" clearable @keyup.enter="handleQuery"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button type="primary" icon="UploadFilled" @click="uploadDialog.visible = true">部署流程文件</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
</transition>
|
|
|
- <el-card shadow="hover">
|
|
|
- <template #header>
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button type="danger" icon="Delete" :disabled="multiple" @click="handleDelete()">删除</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button type="primary" icon="UploadFilled" @click="uploadDialog.visible = true">部署流程文件</el-button>
|
|
|
- </el-col>
|
|
|
- <right-toolbar v-model:showSearch="showSearch" @query-table="getList"></right-toolbar>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
-
|
|
|
- <el-table v-loading="loading" border :data="processDefinitionList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
|
|
- <el-table-column align="center" prop="name" label="流程定义名称" :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <el-table-column align="center" prop="key" label="标识KEY" width="80"></el-table-column>
|
|
|
- <el-table-column align="center" prop="version" label="版本号" width="80">
|
|
|
- <template #default="scope"> v{{ scope.row.version }}.0</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="resourceName" label="流程XML" width="100" :show-overflow-tooltip="true">
|
|
|
- <template #default="scope">
|
|
|
- <el-link type="primary" @click="clickPreview(scope.row.id, 'xml')">{{ scope.row.resourceName }}</el-link>
|
|
|
- </template>
|
|
|
+ <el-card shadow="hover" style="border: none">
|
|
|
+ <div class="table-content" style="height: 72vh;">
|
|
|
+ <el-table v-loading="loading" :data="processDefinitionList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
|
|
+ <el-table-column align="left" prop="name" label="流程定义名称"
|
|
|
+ :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column align="left" prop="key" label="标识KEY" width="140"></el-table-column>
|
|
|
+ <el-table-column align="left" prop="version" label="版本号" width="80">
|
|
|
+ <template #default="scope"> v{{ scope.row.version }}.0</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="left" prop="resourceName" label="流程XML" width="140"
|
|
|
+ :show-overflow-tooltip="true">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-link type="primary" @click="clickPreview(scope.row.id, 'xml')">{{
|
|
|
+ scope.row.resourceName
|
|
|
+ }}
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="diagramResourceName" label="流程图片" width="100" :show-overflow-tooltip="true">
|
|
|
+ <el-table-column align="left" prop="diagramResourceName" label="流程图片" width="140" :show-overflow-tooltip="true">
|
|
|
<template #default="scope">
|
|
|
<el-link type="primary" @click="clickPreview(scope.row.id, 'bpmn')">{{ scope.row.diagramResourceName }}</el-link>
|
|
|
</template>
|
|
|
@@ -75,8 +69,8 @@
|
|
|
<el-tag v-else type="danger">挂起</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="deploymentTime" label="部署时间" width="120" :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <el-table-column align="center" label="表名/表单KEY" width="120" :show-overflow-tooltip="true">
|
|
|
+ <el-table-column align="left" prop="deploymentTime" label="部署时间" width="160" :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column align="left" label="表名/表单KEY" width="135" :show-overflow-tooltip="true">
|
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.wfDefinitionConfigVo">
|
|
|
{{ scope.row.wfDefinitionConfigVo.tableName }}
|
|
|
@@ -108,15 +102,20 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button link type="primary" size="small" icon="Sort" @click="handleConvertToModel(scope.row)"> 转换模型 </el-button>
|
|
|
+ <el-button link type="primary" size="small" icon="Sort" @click="handleConvertToModel(scope.row)">
|
|
|
+ 转换模型
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button link type="primary" size="small" icon="Tickets" @click="handleDefinitionConfigOpen(scope.row)">绑定业务</el-button>
|
|
|
+ <el-button link type="primary" size="small" icon="Tickets"
|
|
|
+ @click="handleDefinitionConfigOpen(scope.row)">绑定业务
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
<pagination
|
|
|
v-show="total > 0"
|
|
|
v-model:page="queryParams.pageNum"
|
|
|
@@ -131,7 +130,7 @@
|
|
|
<process-preview ref="previewRef" />
|
|
|
|
|
|
<!-- 部署文件 -->
|
|
|
- <el-dialog v-if="uploadDialog.visible" v-model="uploadDialog.visible" :title="uploadDialog.title" width="30%">
|
|
|
+ <el-dialog v-if="uploadDialog.visible" v-model="uploadDialog.visible" :title="uploadDialog.title" width="40%">
|
|
|
<div v-loading="uploadDialogLoading">
|
|
|
<div class="mb5">
|
|
|
<el-text class="mx-1" size="large"><span class="text-danger">*</span>请选择部署流程分类:</el-text>
|
|
|
@@ -144,6 +143,7 @@
|
|
|
:render-after-expand="false"
|
|
|
check-strictly
|
|
|
style="width: 240px"
|
|
|
+ :default-expand-all="true"
|
|
|
/>
|
|
|
</div>
|
|
|
<el-upload
|
|
|
@@ -164,32 +164,34 @@
|
|
|
|
|
|
<!-- 历史版本 -->
|
|
|
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%">
|
|
|
- <el-table v-loading="loading" :data="processDefinitionHistoryList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table border v-loading="loading" :data="processDefinitionHistoryList" @selection-change="handleSelectionChange">
|
|
|
+<!--
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
+-->
|
|
|
<el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
|
|
- <el-table-column align="center" prop="name" label="流程定义名称" :show-overflow-tooltip="true" min-width="80"></el-table-column>
|
|
|
- <el-table-column align="center" prop="key" label="标识KEY"></el-table-column>
|
|
|
- <el-table-column align="center" prop="version" label="版本号" width="90">
|
|
|
+ <el-table-column align="left" prop="name" label="流程定义名称" :show-overflow-tooltip="true" min-width="80"></el-table-column>
|
|
|
+ <el-table-column align="left" prop="key" label="标识KEY"></el-table-column>
|
|
|
+ <el-table-column align="left" prop="version" label="版本号" width="80">
|
|
|
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="resourceName" label="流程XML" min-width="80" :show-overflow-tooltip="true">
|
|
|
+ <el-table-column align="left" prop="resourceName" label="流程XML" min-width="80" :show-overflow-tooltip="true">
|
|
|
<template #default="scope">
|
|
|
<el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80" :show-overflow-tooltip="true">
|
|
|
+ <el-table-column align="left" prop="diagramResourceName" label="流程图片" min-width="80" :show-overflow-tooltip="true">
|
|
|
<template #default="scope">
|
|
|
<el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName }}</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="suspensionState" label="状态" min-width="70">
|
|
|
+ <el-table-column align="center" prop="suspensionState" label="状态" min-width="60">
|
|
|
<template #default="scope">
|
|
|
<el-tag v-if="scope.row.suspensionState == 1" type="success">激活</el-tag>
|
|
|
<el-tag v-else type="danger">挂起</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column>
|
|
|
- <el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column align="left" prop="deploymentTime" label="部署时间" width="160" :show-overflow-tooltip="true"></el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
|
|
<template #default="scope">
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
@@ -228,15 +230,15 @@
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <el-form :model="definitionConfigForm" label-width="auto">
|
|
|
- <el-form-item label="流程KEY">
|
|
|
+ <el-form :model="definitionConfigForm" label-width="40">
|
|
|
+ <el-form-item label="KEY">
|
|
|
<el-input v-model="definitionConfigForm.processKey" disabled />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="表名" prop="formId">
|
|
|
<el-input v-model="definitionConfigForm.tableName" placeholder="示例:test_leave" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注">
|
|
|
- <el-input v-model="definitionConfigForm.remark" type="textarea" resize="none" />
|
|
|
+ <el-input v-model="definitionConfigForm.remark" :rows="3" type="textarea" resize="none" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -252,24 +254,23 @@
|
|
|
|
|
|
<script lang="ts" setup name="processDefinition">
|
|
|
import {
|
|
|
- listProcessDefinition,
|
|
|
- definitionImage,
|
|
|
+ convertToModel,
|
|
|
definitionXml,
|
|
|
deleteProcessDefinition,
|
|
|
- updateDefinitionState,
|
|
|
- convertToModel,
|
|
|
deployProcessFile,
|
|
|
- getListByKey
|
|
|
+ getListByKey,
|
|
|
+ listProcessDefinition,
|
|
|
+ updateDefinitionState
|
|
|
} from '@/api/workflow/processDefinition';
|
|
|
-import { getByTableNameNotDefId, getByDefId, saveOrUpdate } from '@/api/workflow/definitionConfig';
|
|
|
+import {getByDefId, getByTableNameNotDefId, saveOrUpdate} from '@/api/workflow/definitionConfig';
|
|
|
import ProcessPreview from './components/processPreview.vue';
|
|
|
-import { listCategory } from '@/api/workflow/category';
|
|
|
-import { CategoryVO } from '@/api/workflow/category/types';
|
|
|
-import { ProcessDefinitionQuery, ProcessDefinitionVO } from '@/api/workflow/processDefinition/types';
|
|
|
-import { DefinitionConfigForm } from '@/api/workflow/definitionConfig/types';
|
|
|
-import { UploadRequestOptions, ElMessage, ElMessageBox } from 'element-plus';
|
|
|
+import {listCategory} from '@/api/workflow/category';
|
|
|
+import {CategoryVO} from '@/api/workflow/category/types';
|
|
|
+import {ProcessDefinitionQuery, ProcessDefinitionVO} from '@/api/workflow/processDefinition/types';
|
|
|
+import {DefinitionConfigForm} from '@/api/workflow/definitionConfig/types';
|
|
|
+import {ElMessageBox, UploadRequestOptions} from 'element-plus';
|
|
|
|
|
|
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
|
const previewRef = ref<InstanceType<typeof ProcessPreview>>();
|
|
|
const queryFormRef = ref<ElFormInstance>();
|