| | |
| | | <el-card shadow="hover"> |
| | | <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 style="width: 240px" @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 style="width: 240px" @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-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> |
| | | <right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar> |
| | | </el-row> |
| | | </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="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link> |
| | | <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"> |
| | | <template #default="scope"> |
| | | <el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName }}</el-link> |
| | | <el-link type="primary" @click="clickPreview(scope.row.id, 'bpmn')">{{ scope.row.diagramResourceName }}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="suspensionState" label="状态" width="80"> |
| | |
| | | const previewRef = ref<InstanceType<typeof ProcessPreview>>(); |
| | | const queryFormRef = ref<ElFormInstance>(); |
| | | const categoryTreeRef = ref<ElTreeInstance>(); |
| | | const definitionConfigForm = ref<DefinitionConfigForm>(); |
| | | const definitionConfigForm = ref<DefinitionConfigForm>({}); |
| | | |
| | | type CategoryOption = { |
| | | categoryCode: string; |
| | |
| | | const uploadDialogLoading = ref(false); |
| | | const processDefinitionList = ref<ProcessDefinitionVO[]>([]); |
| | | const processDefinitionHistoryList = ref<ProcessDefinitionVO[]>([]); |
| | | const url = ref<string[]>([]); |
| | | const categoryOptions = ref<CategoryOption[]>([]); |
| | | const categoryName = ref(''); |
| | | /** 部署文件分类选择 */ |
| | |
| | | loading.value = false; |
| | | }; |
| | | |
| | | //预览图片 |
| | | const clickPreviewImg = async (id: string) => { |
| | | loading.value = true; |
| | | const resp = await definitionImage(id); |
| | | if (previewRef.value) { |
| | | url.value = []; |
| | | url.value.push('data:image/png;base64,' + resp.data); |
| | | loading.value = false; |
| | | previewRef.value.openDialog(url.value, 'png'); |
| | | } |
| | | }; |
| | | //预览xml |
| | | const clickPreviewXML = async (id: string) => { |
| | | type PreviewType = 'xml' | 'bpmn'; |
| | | //预览 公共方法 |
| | | const clickPreview = async (id: string, type: PreviewType) => { |
| | | loading.value = true; |
| | | const resp = await definitionXml(id); |
| | | if (previewRef.value) { |
| | | url.value = []; |
| | | url.value = resp.data.xml; |
| | | const xmlStr = resp.data.xmlStr; |
| | | loading.value = false; |
| | | previewRef.value.openDialog(url.value, 'xml'); |
| | | previewRef.value.openDialog(xmlStr, type); |
| | | } |
| | | }; |
| | | |
| | | /** 删除按钮操作 */ |
| | | const handleDelete = async (row?: ProcessDefinitionVO) => { |
| | | const id = row?.id || ids.value; |