提交代码
parent
0f0ab5dc80
commit
9b73771165
|
@ -9,6 +9,15 @@ export function listDefinition(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询流程定义我的角色相关列表
|
||||||
|
export function myDefinitionList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/flowable/definition/myList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 部署流程实例
|
// 部署流程实例
|
||||||
export function definitionStart(procDefId, data) {
|
export function definitionStart(procDefId, data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -22,12 +22,19 @@ const getZgsDeptList = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取项目
|
// 获取项目
|
||||||
const getMyProjectList = () => {
|
const getProjectList = () => {
|
||||||
return request({
|
return request({
|
||||||
url: '/publics/projectList',
|
url: '/publics/projectList',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取和我相关的项目信息
|
||||||
|
const getMyProjectList = () => {
|
||||||
|
return request({
|
||||||
|
url: '/publics/findMyProjectList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取人员
|
// 获取人员
|
||||||
const getUserList = (data) => {
|
const getUserList = (data) => {
|
||||||
return request({
|
return request({
|
||||||
|
@ -65,6 +72,7 @@ export default{
|
||||||
getMyDeptList,
|
getMyDeptList,
|
||||||
getDeptTree,
|
getDeptTree,
|
||||||
getZgsDeptList,
|
getZgsDeptList,
|
||||||
|
getProjectList,
|
||||||
getMyProjectList,
|
getMyProjectList,
|
||||||
getUserList,
|
getUserList,
|
||||||
queryUnitList,
|
queryUnitList,
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
>
|
||||||
<el-form-item label="角色名称" prop="roleName">
|
<el-form-item label="角色名称" prop="roleName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.roleName"
|
v-model="queryParams.roleName"
|
||||||
|
@ -11,35 +17,48 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-show="checkType === 'multiple'" ref="dataTable" v-loading="loading" :data="roleList" @selection-change="handleMultipleRoleSelect">
|
<el-table
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
v-show="checkType === 'multiple'"
|
||||||
<el-table-column label="角色编号" prop="roleId" width="120" />
|
ref="dataTable"
|
||||||
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
|
v-loading="loading"
|
||||||
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" />
|
:data="roleList"
|
||||||
<el-table-column label="显示顺序" prop="roleSort" width="100" />
|
@selection-change="handleMultipleRoleSelect"
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
>
|
||||||
|
<el-table-column width="55" type="selection" align="center" />
|
||||||
|
<el-table-column label="角色编号" prop="roleId" />
|
||||||
|
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="显示顺序" prop="roleSort" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table v-show="checkType === 'single'" v-loading="loading" :data="roleList" @current-change="handleSingleRoleSelect">
|
<el-table
|
||||||
<el-table-column width="55" align="center" >
|
v-show="checkType === 'single'"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="roleList"
|
||||||
|
@current-change="handleSingleRoleSelect"
|
||||||
|
>
|
||||||
|
<el-table-column width="55" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
|
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
|
||||||
<el-radio v-model="radioSelected" :label="scope.row.roleId">{{''}}</el-radio>
|
<el-radio v-model="radioSelected" :label="scope.row.roleId">{{ "" }}</el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="角色编号" prop="roleId" width="120" />
|
<el-table-column label="角色编号" prop="roleId" />
|
||||||
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
|
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" />
|
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="显示顺序" prop="roleSort" width="100" />
|
<el-table-column label="显示顺序" prop="roleSort" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -47,9 +66,9 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page-sizes="[5,10]"
|
:page-sizes="[5, 10]"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
|
@ -58,25 +77,34 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
|
import {
|
||||||
|
listRole,
|
||||||
|
getRole,
|
||||||
|
delRole,
|
||||||
|
addRole,
|
||||||
|
updateRole,
|
||||||
|
dataScope,
|
||||||
|
changeRoleStatus,
|
||||||
|
deptTreeSelect,
|
||||||
|
} from "@/api/system/role";
|
||||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
||||||
import {StrUtil} from "@/utils/StrUtil";
|
import { StrUtil } from "@/utils/StrUtil";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FlowRole",
|
name: "FlowRole",
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ["sys_normal_disable"],
|
||||||
// 接受父组件的值
|
// 接受父组件的值
|
||||||
props: {
|
props: {
|
||||||
// 回显数据传值
|
// 回显数据传值
|
||||||
selectValues: {
|
selectValues: {
|
||||||
type: Number | String | Array,
|
type: Number | String | Array,
|
||||||
default: null,
|
default: null,
|
||||||
required: false
|
required: false,
|
||||||
},
|
},
|
||||||
checkType: {
|
checkType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'multiple',
|
default: "multiple",
|
||||||
required: false
|
required: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -105,12 +133,12 @@ export default {
|
||||||
pageSize: 5,
|
pageSize: 5,
|
||||||
roleName: undefined,
|
roleName: undefined,
|
||||||
roleKey: undefined,
|
roleKey: undefined,
|
||||||
status: undefined
|
status: undefined,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
radioSelected: null, // 单选框传值
|
radioSelected: null, // 单选框传值
|
||||||
selectRoleList: [] // 回显数据传值
|
selectRoleList: [], // 回显数据传值
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -118,30 +146,31 @@ export default {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (StrUtil.isNotBlank(newVal)) {
|
if (StrUtil.isNotBlank(newVal)) {
|
||||||
if (newVal instanceof Number || newVal instanceof String) {
|
if (newVal instanceof Number || newVal instanceof String) {
|
||||||
this.radioSelected = newVal
|
this.radioSelected = newVal;
|
||||||
} else {
|
} else {
|
||||||
this.selectRoleList = newVal;
|
this.selectRoleList = newVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true,
|
||||||
},
|
},
|
||||||
roleList: {
|
roleList: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (StrUtil.isNotBlank(newVal) && this.selectRoleList.length > 0) {
|
if (StrUtil.isNotBlank(newVal) && this.selectRoleList.length > 0) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.dataTable.clearSelection();
|
this.$refs.dataTable.clearSelection();
|
||||||
this.selectRoleList?.split(',').forEach(key => {
|
this.selectRoleList?.split(",").forEach((key) => {
|
||||||
this.$refs.dataTable.toggleRowSelection(newVal.find(
|
this.$refs.dataTable.toggleRowSelection(
|
||||||
item => key == item.roleId
|
newVal.find((item) => key == item.roleId),
|
||||||
), true)
|
true
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true, // 立即生效
|
immediate: true, // 立即生效
|
||||||
deep: true //监听对象或数组的时候,要用到深度监听
|
deep: true, //监听对象或数组的时候,要用到深度监听
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -150,24 +179,23 @@ export default {
|
||||||
/** 查询角色列表 */
|
/** 查询角色列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listRole(this.queryParams).then(response => {
|
listRole(this.queryParams).then((response) => {
|
||||||
this.roleList = response.rows;
|
this.roleList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleMultipleRoleSelect(selection) {
|
handleMultipleRoleSelect(selection) {
|
||||||
const idList = selection.map(item => item.roleId);
|
const idList = selection.map((item) => item.roleId);
|
||||||
const nameList = selection.map(item => item.roleName);
|
const nameList = selection.map((item) => item.roleName);
|
||||||
this.$emit('handleRoleSelect', idList.join(','), nameList.join(','));
|
this.$emit("handleRoleSelect", idList.join(","), nameList.join(","));
|
||||||
},
|
},
|
||||||
// 单选框选中数据
|
// 单选框选中数据
|
||||||
handleSingleRoleSelect(selection) {
|
handleSingleRoleSelect(selection) {
|
||||||
this.radioSelected = selection.roleId;
|
this.radioSelected = selection.roleId;
|
||||||
const roleName = selection.roleName;
|
const roleName = selection.roleName;
|
||||||
this.$emit('handleRoleSelect', this.radioSelected.toString(), roleName);
|
this.$emit("handleRoleSelect", this.radioSelected.toString(), roleName);
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
@ -178,7 +206,7 @@ export default {
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
placeholder="请输入流程名称"
|
placeholder="请输入流程名称"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程分类" prop="category">
|
<el-form-item label="流程分类" prop="category">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.category"
|
v-model="queryParams.category"
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
placeholder="请选择流程分类"
|
placeholder="请选择流程分类"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -84,6 +84,12 @@
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="项目名称"
|
||||||
|
align="left"
|
||||||
|
prop="projectName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="流程编号"
|
label="流程编号"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -111,8 +117,8 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="耗时" align="center" prop="duration" width="180" />
|
|
||||||
<el-table-column label="当前节点" align="center" prop="taskName" />
|
<el-table-column label="当前节点" align="center" prop="taskName" />
|
||||||
|
<el-table-column label="耗时" align="center" prop="duration" width="180" />
|
||||||
<el-table-column label="办理人" align="center">
|
<el-table-column label="办理人" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<label v-if="scope.row.assigneeName"
|
<label v-if="scope.row.assigneeName"
|
||||||
|
@ -171,13 +177,13 @@
|
||||||
placeholder="请输入流程名称"
|
placeholder="请输入流程名称"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleProcessQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程分类" prop="category">
|
<el-form-item label="流程分类" prop="category">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.category"
|
v-model="queryProcessParams.category"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleProcessQuery"
|
||||||
placeholder="请选择流程分类"
|
placeholder="请选择流程分类"
|
||||||
clearable
|
clearable
|
||||||
>
|
>
|
||||||
|
@ -203,7 +209,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-loading="processLoading" fit :data="definitionList" border>
|
<el-table v-loading="processLoading" fit :data="definitionList" border>
|
||||||
<el-table-column label="流程名称" align="center" prop="name" />
|
<el-table-column label="流程名称" align="center" prop="name" width="280" />
|
||||||
<el-table-column label="流程版本" align="center">
|
<el-table-column label="流程版本" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag size="medium">v{{ scope.row.version }}</el-tag>
|
<el-tag size="medium">v{{ scope.row.version }}</el-tag>
|
||||||
|
@ -232,9 +238,10 @@
|
||||||
:total="processTotal"
|
:total="processTotal"
|
||||||
:page.sync="queryProcessParams.pageNum"
|
:page.sync="queryProcessParams.pageNum"
|
||||||
:limit.sync="queryProcessParams.pageSize"
|
:limit.sync="queryProcessParams.pageSize"
|
||||||
@pagination="listDefinition"
|
@pagination="myDefinitionList"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -248,11 +255,12 @@ import {
|
||||||
flowRecord,
|
flowRecord,
|
||||||
} from "@/api/flowable/finished";
|
} from "@/api/flowable/finished";
|
||||||
import { myProcessList, stopProcess } from "@/api/flowable/process";
|
import { myProcessList, stopProcess } from "@/api/flowable/process";
|
||||||
import { listDefinition } from "@/api/flowable/definition";
|
import { myDefinitionList } from "@/api/flowable/definition";
|
||||||
|
import initTaskDrawer from "./initTaskDrawer.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "Deploy",
|
name: "Deploy",
|
||||||
dicts: ["sys_process_category"],
|
dicts: ["sys_process_category"],
|
||||||
components: {},
|
components: { initTaskDrawer },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
@ -358,7 +366,7 @@ export default {
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleProcessQuery() {
|
handleProcessQuery() {
|
||||||
this.queryProcessParams.pageNum = 1;
|
this.queryProcessParams.pageNum = 1;
|
||||||
this.listDefinition();
|
this.myDefinitionList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetProcessQuery() {
|
resetProcessQuery() {
|
||||||
|
@ -375,10 +383,10 @@ export default {
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "发起流程";
|
this.title = "发起流程";
|
||||||
this.listDefinition();
|
this.myDefinitionList();
|
||||||
},
|
},
|
||||||
listDefinition() {
|
myDefinitionList() {
|
||||||
listDefinition(this.queryProcessParams).then((response) => {
|
myDefinitionList(this.queryProcessParams).then((response) => {
|
||||||
this.definitionList = response.data.records;
|
this.definitionList = response.data.records;
|
||||||
this.processTotal = response.data.total;
|
this.processTotal = response.data.total;
|
||||||
this.processLoading = false;
|
this.processLoading = false;
|
||||||
|
@ -386,13 +394,15 @@ export default {
|
||||||
},
|
},
|
||||||
/** 发起流程申请 */
|
/** 发起流程申请 */
|
||||||
handleStartProcess(row) {
|
handleStartProcess(row) {
|
||||||
this.$router.push({
|
this.open = false;
|
||||||
path: "/flowable/task/myProcess/send/index",
|
this.$refs.initTaskDrawer.show(row);
|
||||||
query: {
|
// this.$router.push({
|
||||||
deployId: row.deploymentId,
|
// path: "/flowable/task/myProcess/send/index",
|
||||||
procDefId: row.id,
|
// query: {
|
||||||
},
|
// deployId: row.deploymentId,
|
||||||
});
|
// procDefId: row.id,
|
||||||
|
// },
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
/** 取消流程申请 */
|
/** 取消流程申请 */
|
||||||
handleStop(row) {
|
handleStop(row) {
|
||||||
|
|
|
@ -1,279 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-card
|
|
||||||
class="box-card"
|
|
||||||
v-for="dict in dict.type.sys_process_category"
|
|
||||||
:key="dict.value"
|
|
||||||
>
|
|
||||||
<div slot="header" class="clearfix">
|
|
||||||
<span>{{ dict.label }}</span>
|
|
||||||
</div>
|
|
||||||
<div :key="o" class="text item">
|
|
||||||
{{ "列表内容 " + o }}
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
getDeployment,
|
|
||||||
delDeployment,
|
|
||||||
addDeployment,
|
|
||||||
updateDeployment,
|
|
||||||
exportDeployment,
|
|
||||||
flowRecord,
|
|
||||||
} from "@/api/flowable/finished";
|
|
||||||
import { myProcessList, stopProcess } from "@/api/flowable/process";
|
|
||||||
import { listDefinition } from "@/api/flowable/definition";
|
|
||||||
export default {
|
|
||||||
name: "Deploy",
|
|
||||||
dicts: ["sys_process_category"],
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
processLoading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
processTotal: 0,
|
|
||||||
// 我发起的流程列表数据
|
|
||||||
myProcessList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
src: "",
|
|
||||||
definitionList: [],
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
name: null,
|
|
||||||
category: null,
|
|
||||||
key: null,
|
|
||||||
tenantId: null,
|
|
||||||
deployTime: null,
|
|
||||||
derivedFrom: null,
|
|
||||||
derivedFromRoot: null,
|
|
||||||
parentDeploymentId: null,
|
|
||||||
engineVersion: null,
|
|
||||||
},
|
|
||||||
// 查询参数
|
|
||||||
queryProcessParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
name: null,
|
|
||||||
category: null,
|
|
||||||
key: null,
|
|
||||||
tenantId: null,
|
|
||||||
deployTime: null,
|
|
||||||
derivedFrom: null,
|
|
||||||
derivedFromRoot: null,
|
|
||||||
parentDeploymentId: null,
|
|
||||||
engineVersion: null,
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {},
|
|
||||||
processCategoryList: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询流程定义列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
myProcessList(this.queryParams).then((response) => {
|
|
||||||
this.myProcessList = response.data.records;
|
|
||||||
this.total = response.data.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
name: null,
|
|
||||||
category: null,
|
|
||||||
key: null,
|
|
||||||
tenantId: null,
|
|
||||||
deployTime: null,
|
|
||||||
derivedFrom: null,
|
|
||||||
derivedFromRoot: null,
|
|
||||||
parentDeploymentId: null,
|
|
||||||
engineVersion: null,
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleProcessQuery() {
|
|
||||||
this.queryProcessParams.pageNum = 1;
|
|
||||||
this.listDefinition();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetProcessQuery() {
|
|
||||||
this.resetForm("queryProcessForm");
|
|
||||||
this.handleProcessQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map((item) => item.procInsId);
|
|
||||||
this.single = selection.length !== 1;
|
|
||||||
this.multiple = !selection.length;
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.open = true;
|
|
||||||
this.title = "发起流程";
|
|
||||||
this.listDefinition();
|
|
||||||
},
|
|
||||||
listDefinition() {
|
|
||||||
listDefinition(this.queryProcessParams).then((response) => {
|
|
||||||
this.definitionList = response.data.records;
|
|
||||||
this.processTotal = response.data.total;
|
|
||||||
this.processLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 发起流程申请 */
|
|
||||||
handleStartProcess(row) {
|
|
||||||
this.$router.push({
|
|
||||||
path: "/flowable/task/myProcess/send/index",
|
|
||||||
query: {
|
|
||||||
deployId: row.deploymentId,
|
|
||||||
procDefId: row.id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 取消流程申请 */
|
|
||||||
handleStop(row) {
|
|
||||||
const params = {
|
|
||||||
instanceId: row.procInsId,
|
|
||||||
};
|
|
||||||
stopProcess(params).then((res) => {
|
|
||||||
this.$modal.msgSuccess(res.msg);
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 流程流转记录 */
|
|
||||||
handleFlowRecord(row) {
|
|
||||||
this.$router.push({
|
|
||||||
path: "/flowable/task/myProcess/detail/index",
|
|
||||||
query: {
|
|
||||||
procInsId: row.procInsId,
|
|
||||||
deployId: row.deployId,
|
|
||||||
taskId: row.taskId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids;
|
|
||||||
getDeployment(id).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改流程定义";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateDeployment(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addDeployment(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.procInsId || this.ids; // 暂不支持删除多个流程
|
|
||||||
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning",
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return delDeployment(ids);
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
const queryParams = this.queryParams;
|
|
||||||
this.$confirm("是否确认导出所有流程定义数据项?", "警告", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning",
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
return exportDeployment(queryParams);
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
this.download(response.msg);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.text {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
.item {
|
|
||||||
margin-bottom: 18px;
|
|
||||||
}
|
|
||||||
.clearfix:before,
|
|
||||||
.clearfix:after {
|
|
||||||
display: table;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
.clearfix:after {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.box-card {
|
|
||||||
width: 28%;
|
|
||||||
margin-left: 3%;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -411,11 +411,13 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getImageUrl(url) {
|
getImageUrl(url) {
|
||||||
return process.env.VUE_APP_BASE_API + url + ".min.jpg";
|
return process.env.VUE_APP_BASE_API + url.split(",")[0] + ".min.jpg";
|
||||||
},
|
},
|
||||||
onPreview(url) {
|
onPreview(url) {
|
||||||
this.previewList = [];
|
this.previewList = [];
|
||||||
this.previewList.push(process.env.VUE_APP_BASE_API + url);
|
url.split(",").forEach((item) => {
|
||||||
|
this.previewList.push(process.env.VUE_APP_BASE_API + item);
|
||||||
|
});
|
||||||
this.showViewer = true;
|
this.showViewer = true;
|
||||||
},
|
},
|
||||||
closeViewer() {
|
closeViewer() {
|
||||||
|
|
|
@ -310,7 +310,7 @@ export default {
|
||||||
data: {}
|
data: {}
|
||||||
}
|
}
|
||||||
//获取项目列表的接口
|
//获取项目列表的接口
|
||||||
this.$api.publics.getMyProjectList(param).then(response => {
|
this.$api.publics.getProjectList(param).then(response => {
|
||||||
this.projectOptions = response.rows
|
this.projectOptions = response.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -415,7 +415,7 @@ export default {
|
||||||
data: {},
|
data: {},
|
||||||
};
|
};
|
||||||
//获取项目列表的接口
|
//获取项目列表的接口
|
||||||
this.$api.publics.getMyProjectList(param).then((response) => {
|
this.$api.publics.getProjectList(param).then((response) => {
|
||||||
this.projectOptions = response.rows;
|
this.projectOptions = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue