From ff763a446d39da32a3dcd89544e516df023ed9ac Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Tue, 29 Aug 2023 17:32:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/flowable.js | 41 +++- src/utils/request.js | 2 + src/utils/upload.js | 11 + src/views/system/fieldCorresManage/index.vue | 36 ++- .../processManage/historicalProcess/index.vue | 65 +++++- .../processManage/processDeployment/index.vue | 218 +++++++++++------- .../processDeployment/module/form.vue | 96 ++++---- .../processManage/runningProcess/index.vue | 64 ++++- .../runningProcess/module/detail.vue | 27 +-- src/views/system/role/index.vue | 2 +- 10 files changed, 389 insertions(+), 173 deletions(-) diff --git a/src/api/system/flowable.js b/src/api/system/flowable.js index 91c7789..51c3c60 100644 --- a/src/api/system/flowable.js +++ b/src/api/system/flowable.js @@ -9,7 +9,7 @@ export function FetchInitFlowAll(params) { }) } -// 获取全部流程列表 +// 获取运行中/历史流程列表 export function FetchFlowList(params) { return request({ url: 'api/flowable/getFlowList', @@ -18,20 +18,49 @@ export function FetchFlowList(params) { }) } -export function add(data) { +// 部署 +export function FetchDeloy(data) { return request({ - url: 'api/fourTests/editFourTests', + url: 'api/flowable/deploy', method: 'post', data }) } -export function edit(data) { +// 激活挂起 +export function FetchSuspendActivate(params) { + return request({ + url: 'api/flowable/suspendActivate', + method: 'get', + params + }) +} + +// 根据key获取历史版本 +export function FetchAllByKey(params) { + return request({ + url: 'api/flowable/getAllByKey', + method: 'get', + params + }) +} + +// 下载 +export function FetchLeadingOutModelXml(params) { + return request({ + url: 'api/flowable/leadingOutModelXml', + method: 'get', + params + }) +} + +// 部署 +export function FetchGenProcessDiagram(data) { return request({ - url: 'api/fourTests/editFourTests', + url: 'api/flowable/genProcessDiagram', method: 'post', data }) } -export default { FetchInitFlowAll, add, edit } +export default { FetchInitFlowAll, FetchFlowList, FetchDeloy, FetchSuspendActivate, FetchAllByKey, FetchLeadingOutModelXml } diff --git a/src/utils/request.js b/src/utils/request.js index aa5460d..a20cc88 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -38,6 +38,8 @@ service.interceptors.response.use( return response.data.data } else if (response.data instanceof Blob) { return response.data + } else if (response.data) { + return response.data } else { Message.error({ message: errorMsg, diff --git a/src/utils/upload.js b/src/utils/upload.js index 2aa8489..beb99dc 100644 --- a/src/utils/upload.js +++ b/src/utils/upload.js @@ -20,3 +20,14 @@ export function archivesUpload(api, file, categoryId) { } return axios.post(api, data, config) } + +// 上传模型 +export function modelUpload(api, file, name) { + var data = new FormData() + data.append('multipartFile', file) + data.append('name', name) + const config = { + headers: { 'Authorization': getToken() } + } + return axios.post(api, data, config) +} diff --git a/src/views/system/fieldCorresManage/index.vue b/src/views/system/fieldCorresManage/index.vue index dc5f3a0..ff84e77 100644 --- a/src/views/system/fieldCorresManage/index.vue +++ b/src/views/system/fieldCorresManage/index.vue @@ -33,6 +33,12 @@ 编辑 + @@ -115,6 +121,9 @@ import rrOperation from '@crud/RR.operation' import crudOperation from '@crud/CRUD.operation' import eForm from './module/form' import DetailModule from './module/detail' +import { exportFile } from '@/utils/index' +import qs from 'qs' +import { mapGetters } from 'vuex' // crud交由presenter持有 const defaultForm = { documentId: null, categoryId: null } @@ -131,7 +140,7 @@ export default { edit: false, del: true, reset: false, - download: true, + download: false, group: false } }) @@ -158,6 +167,11 @@ export default { } } }, + computed: { + ...mapGetters([ + 'baseApi' + ]) + }, created() { this.getCategoryDataTree() this.getDocumentDataTree() @@ -317,6 +331,26 @@ export default { console.log(err) }) }, + doExport(data) { + console.log(data) + crud.downloadLoading = true + this.$confirm('此操作将导出所选数据' + '你是否还要继续?', '提示', { + confirmButtonText: '继续', + cancelButtonText: '取消', + type: 'warning', + dangerouslyUseHTMLString: true + }).then(() => { + const ids = [] + data.forEach(val => { + ids.push(val.id) + }) + const params = { + 'fieldMates': ids + } + exportFile(this.baseApi + '/api/fieldMate/download?' + qs.stringify(params, { indices: false })) + }).catch(() => { + }) + }, normalizer(node) { if (node.children && !node.children.length) { delete node.children diff --git a/src/views/system/processManage/historicalProcess/index.vue b/src/views/system/processManage/historicalProcess/index.vue index 1b7f7e3..018d08d 100644 --- a/src/views/system/processManage/historicalProcess/index.vue +++ b/src/views/system/processManage/historicalProcess/index.vue @@ -32,14 +32,25 @@ @cell-dblclick="tableDoubleClick" @selection-change="crud.selectionChangeHandler" > - - - - - - + + + + + + + + + + + @@ -60,7 +71,7 @@ export default { name: 'RunningProcess', components: { rrOperation, DateRangePicker, pagination, Detail }, cruds() { - return CRUD({ title: '运行中流程', url: 'api/dept', crudMethod: {}}) + return CRUD({ title: '运行中流程', url: 'api/flowable/getFlowList', crudMethod: {}}) }, mixins: [presenter(), header(), crud()], data() { @@ -86,6 +97,9 @@ export default { } }, methods: { + [CRUD.HOOK.beforeRefresh]() { + this.crud.query.isEnd = true + }, // table - 双击查看详情 tableDoubleClick(row) { this.$refs.processDetail.detailVisible = true @@ -95,4 +109,39 @@ export default { diff --git a/src/views/system/processManage/processDeployment/index.vue b/src/views/system/processManage/processDeployment/index.vue index e0c5358..f0648c9 100644 --- a/src/views/system/processManage/processDeployment/index.vue +++ b/src/views/system/processManage/processDeployment/index.vue @@ -2,31 +2,25 @@
- + - 新增 + 部署 - - - 编辑 + + + 激活 - + + + 挂起 + + 导出
-
-
- - - 激活 - - - - 挂起 - -
- +
+ @@ -34,20 +28,29 @@
    -
  • -

    {{ item.name }}

    - +
  • +

    {{ item.deployName }}

    +
-
+
-

当前版本:1.0

-

部署时间:2022-10-01 10:00:05

+

当前版本: + + + +

+

部署时间:{{ modelInfo.deploymentTime | parseTime }}

-

运行中:2

-

已完成:5

+

运行中:{{ modelInfo.runCount }}

+

已完成:{{ modelInfo.completeCount }}

@@ -55,95 +58,137 @@
- - - -
-
-

此操作将导出所选数据

- 你是否还要继续? -
- -
-
- - -
-
-

此操作将{{ activateName }} “ {{ selectedItem.length !== 0 ? selectedItem[0].name : '' }} ”

- 你是否还要继续? -
- -
-
+
diff --git a/src/views/system/processManage/runningProcess/module/detail.vue b/src/views/system/processManage/runningProcess/module/detail.vue index c4b01b4..4b21a00 100644 --- a/src/views/system/processManage/runningProcess/module/detail.vue +++ b/src/views/system/processManage/runningProcess/module/detail.vue @@ -27,12 +27,11 @@
    -
  • 流程示意图
  • -
  • 业务详情
  • -
  • 任务列表
  • -
  • 审批列表
  • +
  • 档案列表
  • +
  • 任务列表
  • +
  • 流程图
-
双击列表数据查看详情
+
双击列表数据查看详情