|
|
@@ -1,113 +1,95 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <div class="filter-container">
|
|
|
- <el-checkbox v-model="listQuery.latestVersion">最新版本</el-checkbox>
|
|
|
- <el-checkbox v-model="listQuery.suspended">挂起的</el-checkbox>
|
|
|
- <el-checkbox v-model="listQuery.active">激活的</el-checkbox>
|
|
|
- </div>
|
|
|
- <div class="filter-container">
|
|
|
- <el-form
|
|
|
- label-width="100px"
|
|
|
- class="ele-form-search"
|
|
|
- @keyup.enter.native="search"
|
|
|
- @submit.native.prevent
|
|
|
- >
|
|
|
- <el-row :gutter="15">
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
|
|
|
- <el-form-item label="流程定义ID:">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="listQuery.processDefinitionId"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
|
|
|
- <el-form-item label="流程定义名称:">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="listQuery.processDefinitionName"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
|
|
|
- <el-form-item label="流程定义KEY:">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="listQuery.processDefinitionKey"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <div class="ele-body">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <div class="filter-container">
|
|
|
+ <el-checkbox v-model="listQuery.latestVersion">最新版本</el-checkbox>
|
|
|
+ <el-checkbox v-model="listQuery.suspended">挂起的</el-checkbox>
|
|
|
+ <el-checkbox v-model="listQuery.active">激活的</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div class="filter-container">
|
|
|
+ <el-form
|
|
|
+ label-width="100px"
|
|
|
+ class="ele-form-search"
|
|
|
+ @keyup.enter.native="search"
|
|
|
+ @submit.native.prevent
|
|
|
+ >
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
|
|
|
+ <el-form-item label="流程定义ID:">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="listQuery.processDefinitionId"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
|
|
|
+ <el-form-item label="流程定义名称:">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="listQuery.processDefinitionName"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
|
|
|
+ <el-form-item label="流程定义KEY:">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="listQuery.processDefinitionKey"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 9, md: 12 } : { span: 6 }">
|
|
|
- <div class="ele-form-actions">
|
|
|
- <el-button @click="btnReset">重置</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-search"
|
|
|
- class="ele-btn-icon"
|
|
|
- @click="btnQuery"
|
|
|
- >
|
|
|
- 查询
|
|
|
- </el-button>
|
|
|
+ <el-col v-bind="styleResponsive ? { lg: 9, md: 12 } : { span: 6 }">
|
|
|
+ <div class="ele-form-actions">
|
|
|
+ <el-button @click="btnReset">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="btnQuery"
|
|
|
+ >
|
|
|
+ 查询
|
|
|
+ </el-button>
|
|
|
|
|
|
- <el-button
|
|
|
- icon="el-icon-plus"
|
|
|
- type="primary"
|
|
|
- @click="btnImport"
|
|
|
- class="filter-item"
|
|
|
- >导入
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- :data="records"
|
|
|
- ref="multipleTable"
|
|
|
- border
|
|
|
- fit
|
|
|
- highlight-current-row
|
|
|
- style="width: 100%"
|
|
|
- :cell-style="{ padding: '3px' }"
|
|
|
- >
|
|
|
- <el-table-column type="index" align="center" label="序号" width="50px">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="流程定义名称" prop="name" align="center">
|
|
|
- <template slot-scope="scope"
|
|
|
- ><span>{{ scope.row.name }}</span></template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="流程定义KEY" prop="key" align="center">
|
|
|
- <template slot-scope="scope"
|
|
|
- ><span>{{ scope.row.key }}</span></template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="流程定义分类" prop="category" align="center">
|
|
|
- <template slot-scope="scope"
|
|
|
- ><span>{{ scope.row.category }}</span></template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="版本" prop="version" align="center">
|
|
|
- <template slot-scope="scope"
|
|
|
- ><span>{{ scope.row.version }}</span></template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="状态" prop="suspended" align="center">
|
|
|
- <template slot-scope="scope"
|
|
|
- ><span>{{ scope.row.suspended ? '挂起' : '激活' }}</span></template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="表单key" prop="formKey" align="center">
|
|
|
- <template slot-scope="scope"
|
|
|
- ><span>{{ scope.row.formKey }}</span></template
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center">
|
|
|
- <template slot-scope="{ row }">
|
|
|
+ <!-- <el-button
|
|
|
+ icon="el-icon-plus"
|
|
|
+ type="primary"
|
|
|
+ @click="btnImport"
|
|
|
+ class="filter-item"
|
|
|
+ >导入
|
|
|
+ </el-button> -->
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ cache-key="systemRoleTable"
|
|
|
+ >
|
|
|
+ <!-- 表头工具栏 -->
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-plus"
|
|
|
+ type="primary"
|
|
|
+ @click="btnImport"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ >导入
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template v-slot:category="{ row }">
|
|
|
+ <span v-html="getDictValue('流程分类', row.category)"></span>
|
|
|
+ </template>
|
|
|
+ <template v-slot:suspended="{ row }">
|
|
|
+ <span>{{ row.suspended ? '挂起' : '激活' }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 操作列 -->
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
<el-dropdown>
|
|
|
<span class="el-dropdown-link"
|
|
|
>操作<i class="el-icon-arrow-down el-icon--right"></i
|
|
|
@@ -164,15 +146,8 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <pagination
|
|
|
- v-show="total > 0"
|
|
|
- :total="total"
|
|
|
- :current.sync="listQuery.current"
|
|
|
- :size.sync="listQuery.size"
|
|
|
- @pagination="list"
|
|
|
- />
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
|
|
|
<el-dialog title="流程定义" :visible.sync="dialogFormVisible">
|
|
|
<el-form
|
|
|
@@ -281,23 +256,83 @@
|
|
|
postAction,
|
|
|
putAction
|
|
|
} from '@/api/flowable/manage';
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
import { Message } from 'element-ui';
|
|
|
|
|
|
import ProcessImage from './components/ProcessImage';
|
|
|
import ProcessDefinitionIdentityLink from './ProcessDefinitionIdentityLink';
|
|
|
|
|
|
export default {
|
|
|
+ mixins: [dictMixins],
|
|
|
+
|
|
|
name: 'FlowableProcessDefinition',
|
|
|
components: { ProcessImage, ProcessDefinitionIdentityLink, Pagination },
|
|
|
data() {
|
|
|
return {
|
|
|
- dicts: [],
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ type: 'index',
|
|
|
+ label: '序号',
|
|
|
+ width: 50,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '流程定义名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'key',
|
|
|
+ label: '流程定义KEY',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'category',
|
|
|
+ label: '流程定义分类',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'category',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'version',
|
|
|
+ label: '版本',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'suspended',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'suspended',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'formKey',
|
|
|
+ label: '表单key',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 230,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
records: null,
|
|
|
- selectedRecords: [],
|
|
|
+
|
|
|
total: 0,
|
|
|
listQuery: {
|
|
|
- current: 1,
|
|
|
- size: 10,
|
|
|
processDefinitionId: undefined,
|
|
|
processDefinitionName: undefined,
|
|
|
processDefinitionKey: undefined,
|
|
|
@@ -309,7 +344,7 @@
|
|
|
dialogImportVisible: false,
|
|
|
// importTenantId: '',
|
|
|
dialogProcessImageVisible: false,
|
|
|
- imagePath: '',
|
|
|
+
|
|
|
// formJson: {"list":[{"type":"input","icon":"icon-input","options":{"width":"100%","defaultValue":"","required":false,"dataType":"string","pattern":"","placeholder":"","customClass":"","disabled":false,"labelWidth":100,"isLabelWidth":false,"hidden":false,"dataBind":true,"showPassword":false,"remoteFunc":"func_1575897887618","remoteOption":"option_1575897887618"},"name":"名称","key":"1575897887618","model":"name","rules":[{"type":"string","message":"名称格式不正确"}]}],"config":{"labelWidth":100,"labelPosition":"right","size":"small","customClass":""}},
|
|
|
formJson: undefined,
|
|
|
temp: {
|
|
|
@@ -330,7 +365,7 @@
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.list();
|
|
|
+ this.requestDict('流程分类');
|
|
|
},
|
|
|
computed: {
|
|
|
// 是否开启响应式布局
|
|
|
@@ -339,20 +374,29 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- list() {
|
|
|
- getAction('/flowable/processDefinition/list', this.listQuery).then(
|
|
|
- (res) => {
|
|
|
- if (res.data.code == 0) {
|
|
|
- const { data } = res.data;
|
|
|
- this.records = data.records;
|
|
|
- this.total = data.total;
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
+ /* 表格数据源 */
|
|
|
+ async datasource({ page, limit }) {
|
|
|
+ // return pageRoles({ pageNum: page, size: limit, ...where });
|
|
|
+ const res = await getAction('/flowable/processDefinition/list', {
|
|
|
+ current: page,
|
|
|
+ size: limit,
|
|
|
+ ...this.listQuery
|
|
|
+ });
|
|
|
+
|
|
|
+ const { data } = res.data;
|
|
|
+ return {
|
|
|
+ list: data.records,
|
|
|
+ count: data.total
|
|
|
+ };
|
|
|
+ // return data;
|
|
|
+ },
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload() {
|
|
|
+ this.$refs.table.reload({ page: 1 });
|
|
|
},
|
|
|
+
|
|
|
btnQuery() {
|
|
|
- this.listQuery.current = 1;
|
|
|
- this.list();
|
|
|
+ this.reload();
|
|
|
},
|
|
|
btnReset() {
|
|
|
this.listQuery = {
|
|
|
@@ -365,7 +409,7 @@
|
|
|
suspended: false,
|
|
|
active: false
|
|
|
};
|
|
|
- this.list();
|
|
|
+ this.reload();
|
|
|
},
|
|
|
btnView(row) {
|
|
|
this.temp = Object.assign({}, row);
|
|
|
@@ -396,7 +440,7 @@
|
|
|
cascade: cascade
|
|
|
}).then(({ data }) => {
|
|
|
Message.success('删除' + data.message);
|
|
|
- this.list();
|
|
|
+ this.reload();
|
|
|
});
|
|
|
},
|
|
|
btnSuspendOrActivate(processDefinitionId, suspend) {
|
|
|
@@ -405,7 +449,7 @@
|
|
|
processDefinitionId
|
|
|
}).then((res) => {
|
|
|
Message.success((suspend ? '激活' : '挂起') + res.data.message);
|
|
|
- this.list();
|
|
|
+ this.reload();
|
|
|
});
|
|
|
},
|
|
|
btnImport() {
|
|
|
@@ -436,7 +480,7 @@
|
|
|
({ msg }) => {
|
|
|
this.dialogImportVisible = false;
|
|
|
Message.success(msg);
|
|
|
- this.list();
|
|
|
+ this.reload();
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
@@ -449,15 +493,6 @@
|
|
|
);
|
|
|
},
|
|
|
btnImage(processDefinitionId) {
|
|
|
- // this.imagePath =
|
|
|
- // `${process.env.VUE_APP_API_BASE_URL}` +
|
|
|
- // '/flowable/processDefinition/image?processDefinitionId=' +
|
|
|
- // processDefinitionId +
|
|
|
- // '&access_token=' +
|
|
|
- // getToken() +
|
|
|
- // '&time=' +
|
|
|
- // new Date();
|
|
|
- // console.log(this.imagePath);
|
|
|
this.selectedProcessDefinitionId = processDefinitionId;
|
|
|
this.dialogProcessImageVisible = true;
|
|
|
},
|
|
|
@@ -465,9 +500,6 @@
|
|
|
this.selectedProcessDefinitionId = row.id;
|
|
|
this.selectedProcessDefinitionName = row.name;
|
|
|
this.dialogProcessDefinitionIdentityLinkVisible = true;
|
|
|
- },
|
|
|
- selectionChange(selectedRecords) {
|
|
|
- this.selectedRecords = selectedRecords;
|
|
|
}
|
|
|
}
|
|
|
};
|