| | |
| | | <el-col :span="1.5"> |
| | | <el-button type="warning" icon="Download" :disabled="single" @click="handleExportDef">导出</el-button> |
| | | </el-col> |
| | | <right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar> |
| | | <right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar> |
| | | </el-row> |
| | | </template> |
| | | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| | |
| | | v-model:page="queryParams.pageNum" |
| | | v-model:limit="queryParams.pageSize" |
| | | :total="total" |
| | | @pagination="handleQuery" |
| | | @pagination="getPageList" |
| | | /> |
| | | </el-tabs> |
| | | </el-card> |
| | |
| | | class="upload-demo" |
| | | drag |
| | | multiple |
| | | accept="application/zip,application/xml,.bpmn" |
| | | accept="application/json,application/text" |
| | | :before-upload="handlerBeforeUpload" |
| | | :http-request="handlerImportDefinition" |
| | | > |
| | | <el-icon class="UploadFilled"><upload-filled /></el-icon> |
| | | <div class="el-upload__text"><em>点击上传,选择BPMN流程文件</em></div> |
| | | <div class="el-upload__text">仅支持 .zip、.bpmn20.xml、bpmn 格式文件</div> |
| | | <div class="el-upload__text"><em>点击上传,选择JSON流程文件</em></div> |
| | | <div class="el-upload__text">仅支持json格式文件</div> |
| | | <div class="el-upload__text">PS:如若部署请部署从本项目模型管理导出的数据</div> |
| | | </el-upload> |
| | | </div> |
| | |
| | | formPath: '' |
| | | }); |
| | | onMounted(() => { |
| | | handleQuery(); |
| | | getPageList(); |
| | | getTreeselect(); |
| | | }); |
| | | |
| | |
| | | multiple.value = !selection.length; |
| | | }; |
| | | //分页 |
| | | const getPageList = async () => { |
| | | console.log(proxy.$route.query.activeName) |
| | | if (proxy.$route.query.activeName) { |
| | | activeName.value = proxy.$route.query.activeName; |
| | | } |
| | | if (activeName.value === '0') { |
| | | getList(); |
| | | } else { |
| | | getUnPublishList(); |
| | | } |
| | | }; |
| | | //分页 |
| | | const getList = async () => { |
| | | loading.value = true; |
| | | const resp = await listDefinition(queryParams.value); |
| | |
| | | loading.value = true; |
| | | await publish(row.id).finally(() => (loading.value = false)); |
| | | processDefinitionDialog.visible = false; |
| | | activeName.value = "0" |
| | | await handleQuery(); |
| | | proxy?.$modal.msgSuccess('发布成功'); |
| | | }; |
| | |
| | | .then(() => { |
| | | uploadDialog.visible = false; |
| | | proxy?.$modal.msgSuccess('部署成功'); |
| | | activeName.value = "1" |
| | | handleQuery(); |
| | | }) |
| | | .finally(() => { |
| | |
| | | path: `/workflow/design/index`, |
| | | query: { |
| | | definitionId: row.id, |
| | | disabled: false |
| | | disabled: false, |
| | | activeName: activeName.value |
| | | } |
| | | }); |
| | | }; |
| | |
| | | path: `/workflow/design/index`, |
| | | query: { |
| | | definitionId: row.id, |
| | | disabled: true |
| | | disabled: true, |
| | | activeName: activeName.value |
| | | } |
| | | }); |
| | | }; |
| | |
| | | |
| | | /** 导出按钮操作 */ |
| | | const handleExportDef = () => { |
| | | proxy?.download(`/workflow/definition/exportDef/${ids.value[0]}`, {}, `${flowCodeList.value[0]}.xml`); |
| | | proxy?.download(`/workflow/definition/exportDef/${ids.value[0]}`, {}, `${flowCodeList.value[0]}.json`); |
| | | }; |
| | | </script> |