update 修改业务单据流程提交
This commit is contained in:
commit
a3a0fae63b
10
.eslintrc.js
10
.eslintrc.js
@ -5,15 +5,9 @@ module.exports = {
|
||||
node: true
|
||||
},
|
||||
parser: 'vue-eslint-parser',
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:vue/vue3-essential',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'./.eslintrc-auto-import.json',
|
||||
'plugin:prettier/recommended'
|
||||
],
|
||||
extends: ['eslint:recommended', 'plugin:vue/vue3-essential', 'plugin:@typescript-eslint/recommended', './.eslintrc-auto-import.json', 'plugin:prettier/recommended'],
|
||||
parserOptions: {
|
||||
ecmaVersion: '2020',
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
parser: '@typescript-eslint/parser'
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
module.exports = {
|
||||
// 一行最多多少个字符
|
||||
printWidth: 150,
|
||||
printWidth: 200,
|
||||
// 指定每个缩进级别的空格数
|
||||
tabWidth: 2,
|
||||
// 使用制表符而不是空格缩进行
|
||||
@ -12,6 +12,8 @@ module.exports = {
|
||||
semi: true,
|
||||
// 是否使用单引号
|
||||
singleQuote: true,
|
||||
// 是否缩进 Vue 文件中的代码<script>和<style>标签
|
||||
vueIndentScriptAndStyle: true,
|
||||
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
||||
quoteProps: 'as-needed',
|
||||
// 在JSX中使用单引号而不是双引号
|
||||
|
@ -14,42 +14,51 @@ export interface BusinessFormVO {
|
||||
*/
|
||||
formId: string | number;
|
||||
|
||||
/**
|
||||
* 表单内容
|
||||
*/
|
||||
content: string;
|
||||
|
||||
/**
|
||||
* 表单值
|
||||
*/
|
||||
contentValue: string;
|
||||
|
||||
/**
|
||||
* 表单名称
|
||||
*/
|
||||
formName: string;
|
||||
wfFormDefinitionVo: {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 动态表单id
|
||||
*/
|
||||
formId: string | number;
|
||||
/**
|
||||
* 动态表单id
|
||||
*/
|
||||
formId: string | number;
|
||||
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionKey: string;
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionKey: string;
|
||||
|
||||
/**
|
||||
* 流程定义名称
|
||||
*/
|
||||
processDefinitionName: string;
|
||||
/**
|
||||
* 流程定义名称
|
||||
*/
|
||||
processDefinitionName: string;
|
||||
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionId: string | number;
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionId: string | number;
|
||||
|
||||
/**
|
||||
* 流程定义版本
|
||||
*/
|
||||
processDefinitionVersion: number;
|
||||
/**
|
||||
* 流程定义版本
|
||||
*/
|
||||
processDefinitionVersion: number;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface BusinessFormForm extends BaseEntity {
|
||||
@ -82,11 +91,9 @@ export interface BusinessFormForm extends BaseEntity {
|
||||
* 表单值
|
||||
*/
|
||||
contentValue?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface BusinessFormQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 申请编码
|
||||
*/
|
||||
@ -97,11 +104,8 @@ export interface BusinessFormQuery extends PageQuery {
|
||||
*/
|
||||
formName?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -24,6 +24,7 @@ export interface CategoryVO {
|
||||
*/
|
||||
sortNum: number;
|
||||
|
||||
children?: CategoryVO[];
|
||||
}
|
||||
|
||||
export interface CategoryForm extends BaseEntity {
|
||||
@ -51,7 +52,6 @@ export interface CategoryForm extends BaseEntity {
|
||||
* 排序
|
||||
*/
|
||||
sortNum?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface CategoryQuery extends PageQuery {
|
||||
@ -64,5 +64,4 @@ export interface CategoryQuery extends PageQuery {
|
||||
* 分类编码
|
||||
*/
|
||||
categoryCode?: string;
|
||||
|
||||
}
|
||||
|
@ -6,35 +6,35 @@ export interface FormVO extends BaseEntity {
|
||||
status?: string;
|
||||
remark: string;
|
||||
wfFormDefinitionVo: {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 动态表单id
|
||||
*/
|
||||
formId: string | number;
|
||||
/**
|
||||
* 动态表单id
|
||||
*/
|
||||
formId: string | number;
|
||||
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionKey: string;
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionKey: string;
|
||||
|
||||
/**
|
||||
* 流程定义名称
|
||||
*/
|
||||
processDefinitionName: string;
|
||||
/**
|
||||
* 流程定义名称
|
||||
*/
|
||||
processDefinitionName: string;
|
||||
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionId: string | number;
|
||||
/**
|
||||
* 流程定义id
|
||||
*/
|
||||
processDefinitionId: string | number;
|
||||
|
||||
/**
|
||||
* 流程定义版本
|
||||
*/
|
||||
processDefinitionVersion: number;
|
||||
/**
|
||||
* 流程定义版本
|
||||
*/
|
||||
processDefinitionVersion: number;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ export interface FormDefinitionVO {
|
||||
* 流程定义版本
|
||||
*/
|
||||
processDefinitionVersion: number;
|
||||
|
||||
}
|
||||
|
||||
export interface FormDefinitionForm extends BaseEntity {
|
||||
@ -61,11 +60,9 @@ export interface FormDefinitionForm extends BaseEntity {
|
||||
* 流程定义版本
|
||||
*/
|
||||
processDefinitionVersion?: number;
|
||||
|
||||
}
|
||||
|
||||
export interface FormDefinitionQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 动态表单id
|
||||
*/
|
||||
@ -91,11 +88,8 @@ export interface FormDefinitionQuery extends PageQuery {
|
||||
*/
|
||||
processDefinitionVersion?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -117,8 +117,8 @@ export const backProcess = (data: object) => {
|
||||
|
||||
/**
|
||||
* 获取流程状态
|
||||
* @param taskId
|
||||
* @returns
|
||||
* @param taskId
|
||||
* @returns
|
||||
*/
|
||||
export const getBusinessStatus = (taskId: string) => {
|
||||
return request({
|
||||
@ -129,8 +129,8 @@ export const getBusinessStatus = (taskId: string) => {
|
||||
|
||||
/**
|
||||
* 加签
|
||||
* @param data
|
||||
* @returns
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
export const addMultiInstanceExecution = (data: object) => {
|
||||
return request({
|
||||
@ -142,8 +142,8 @@ export const addMultiInstanceExecution = (data: object) => {
|
||||
|
||||
/**
|
||||
* 减签
|
||||
* @param data
|
||||
* @returns
|
||||
* @param data
|
||||
* @returns
|
||||
*/
|
||||
export const deleteMultiInstanceExecution = (data: object) => {
|
||||
return request({
|
||||
@ -152,4 +152,3 @@ export const deleteMultiInstanceExecution = (data: object) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -36,4 +36,3 @@ export const getUserListByIds = (userIdList: Array<any>) => {
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@ const whiteList = ['/login', '/register', '/social-callback'];
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start();
|
||||
if (getToken()) {
|
||||
to.meta.title && useSettingsStore().setTitle(to.meta.title as string);
|
||||
to.meta.title && useSettingsStore().setTitle(to.meta.title);
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' });
|
||||
|
4
src/types/router.d.ts
vendored
4
src/types/router.d.ts
vendored
@ -1,6 +1,10 @@
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
title: string;
|
||||
}
|
||||
|
||||
declare type RouteOption = {
|
||||
hidden?: boolean;
|
||||
permissions?: string[];
|
||||
|
@ -40,9 +40,7 @@
|
||||
<p>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://gitee.com/dromara/RuoYi-Vue-Plus')">访问码云</el-button>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://github.com/dromara/RuoYi-Vue-Plus')">访问GitHub</el-button>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://plus-doc.dromara.org/#/ruoyi-vue-plus/changlog')"
|
||||
>更新日志</el-button
|
||||
>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://plus-doc.dromara.org/#/ruoyi-vue-plus/changlog')">更新日志</el-button>
|
||||
</p>
|
||||
</el-col>
|
||||
|
||||
@ -85,9 +83,7 @@
|
||||
<p>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://gitee.com/dromara/RuoYi-Cloud-Plus')">访问码云</el-button>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://github.com/dromara/RuoYi-Cloud-Plus')">访问GitHub</el-button>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://plus-doc.dromara.org/#/ruoyi-cloud-plus/changlog')"
|
||||
>更新日志</el-button
|
||||
>
|
||||
<el-button type="primary" icon="Cloudy" plain @click="goTarget('https://plus-doc.dromara.org/#/ruoyi-cloud-plus/changlog')">更新日志</el-button>
|
||||
</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div>
|
||||
<img
|
||||
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwBAMAAAA0zul4AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURf///zKW+ur0/nO4+6XR/YvE/Eqi+5DG/Nnr/sPg/brnfYAAAAFMSURBVFjD7dfPSsNAEAbwNTGtuXVM09pbqCAeFV8gwYNXtU+wioI3FcFrLorH+OeBncYuSnYl+wUKEueDNmHhR8rO7myqqGOUQIECBQoUaDK5dsQD3ihXNtth6YTqtQ0mbqcGbXD8C4z6BYPFUSP3ftCawOVU+8ANezH5QXuVzDwnJ5g38nfruP/SSOYHh9bkjNdcjrDrAghOHhvJe7ettlab6RaFA9fDkTpOURivbi963OX+H/x4qLrA4IzHzjvA57pzVDCMsU7+nT0eKfiTofCQKF2SAxAGPLBdf4GQz63LXB1rHsVgRDtfD05BGLKofQJDOuXLHQyHdQm5mOhPjQ2coXXUXIiM6zFCYUGj3aTUlKMwpIQPOd9j7ufS0abDotsqMu+wcAd40nRV+sCp1W0ysxbW9GpNlRsWrTB9mzvyLn/KBAoUKFCgyScZMYmWkzKSDQAAAABJRU5ErkJggg=="
|
||||
width="60">
|
||||
width="60" />
|
||||
</div>
|
||||
<div style="display: inline-block;padding-left: 15px;">
|
||||
<div class="from-font">{{ item.formName }}</div>
|
||||
@ -65,6 +65,7 @@ import { addBusinessForm, updateBusinessForm } from '@/api/workflow/businessForm
|
||||
import { BusinessFormForm } from '@/api/workflow/businessForm/types';
|
||||
import { startWorkFlow } from '@/api/workflow/task';
|
||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
//提交组件
|
||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
||||
@ -78,7 +79,7 @@ const buttonLoading = ref(false);
|
||||
const processDefinitionKey = ref<string>('');
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const vfRenderRef = ref(null);
|
||||
const vfRenderRef = ref();
|
||||
|
||||
const render = reactive<DialogOption>({
|
||||
visible: false,
|
||||
@ -126,6 +127,7 @@ const queryFromList = async () => {
|
||||
const handleAppay = async (row?: FormVO) => {
|
||||
render.visible = true;
|
||||
fromLoading.value = true
|
||||
buttonLoading.value = true
|
||||
render.title = row?.formName;
|
||||
const formId = row?.formId || ids.value[0];
|
||||
initFormData.value.formId = row?.formId
|
||||
@ -134,6 +136,7 @@ const handleAppay = async (row?: FormVO) => {
|
||||
const res = await getForm(formId);
|
||||
if (vfRenderRef.value) {
|
||||
fromLoading.value = false
|
||||
buttonLoading.value = false
|
||||
if (res.data.wfFormDefinitionVo && res.data.wfFormDefinitionVo.processDefinitionKey) {
|
||||
processDefinitionKey.value = res.data.wfFormDefinitionVo.processDefinitionKey
|
||||
}
|
||||
@ -146,7 +149,7 @@ const submitData = (status: string) => {
|
||||
if (vfRenderRef.value) {
|
||||
fromLoading.value = true
|
||||
buttonLoading.value = true;
|
||||
vfRenderRef.value.getFormData().then((formData) => {
|
||||
vfRenderRef.value.getFormData().then((formData: object) => {
|
||||
initFormData.value.contentValue = JSON.stringify(formData)
|
||||
if ('draft' === status) {
|
||||
addBusinessForm(initFormData.value).then(res => {
|
||||
@ -206,7 +209,7 @@ onMounted(() => {
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.from-font {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
|
@ -21,10 +21,6 @@
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
|
||||
v-hasPermi="['workflow:businessForm:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['workflow:businessForm:export']">导出</el-button>
|
||||
@ -99,7 +95,6 @@ import { BusinessFormVO, BusinessFormQuery, BusinessFormForm } from '@/api/workf
|
||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||
import { startWorkFlow } from '@/api/workflow/task';
|
||||
|
||||
//提交组件
|
||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
||||
//审批记录组件
|
||||
@ -119,7 +114,7 @@ const total = ref(0);
|
||||
const processDefinitionKey = ref<string>('');
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const vfRenderRef = ref(null);
|
||||
const vfRenderRef = ref();
|
||||
|
||||
const render = reactive<DialogOption>({
|
||||
visible: false,
|
||||
@ -133,7 +128,7 @@ const initFormData: BusinessFormForm = {
|
||||
formName: undefined,
|
||||
content: undefined,
|
||||
contentValue: undefined
|
||||
}
|
||||
};
|
||||
const data = reactive<PageData<BusinessFormForm, BusinessFormQuery>>({
|
||||
form: { ...initFormData },
|
||||
queryParams: {
|
||||
@ -141,8 +136,7 @@ const data = reactive<PageData<BusinessFormForm, BusinessFormQuery>>({
|
||||
pageSize: 10,
|
||||
applyCode: undefined,
|
||||
formName: undefined,
|
||||
params: {
|
||||
}
|
||||
params: {}
|
||||
},
|
||||
rules: {}
|
||||
});
|
||||
@ -162,77 +156,76 @@ const getList = async () => {
|
||||
businessFormList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
};
|
||||
|
||||
/** 多选框选中数据 */
|
||||
const handleSelectionChange = (selection: BusinessFormVO[]) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
applyCodes.value = selection.map(item => item.applyCode);
|
||||
ids.value = selection.map((item) => item.id);
|
||||
applyCodes.value = selection.map((item) => item.applyCode);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: BusinessFormVO) => {
|
||||
const _id = row?.id || ids.value[0]
|
||||
fromLoading.value = true
|
||||
buttonLoading.value = true
|
||||
const _id = row?.id || ids.value[0];
|
||||
fromLoading.value = true;
|
||||
buttonLoading.value = true;
|
||||
render.visible = true;
|
||||
const res = await getBusinessForm(_id);
|
||||
form.value = res.data
|
||||
render.title = "修改单据";
|
||||
form.value = res.data;
|
||||
render.title = '修改单据';
|
||||
if (res.data.wfFormDefinitionVo && res.data.wfFormDefinitionVo.processDefinitionKey) {
|
||||
processDefinitionKey.value = res.data.wfFormDefinitionVo.processDefinitionKey
|
||||
processDefinitionKey.value = res.data.wfFormDefinitionVo.processDefinitionKey;
|
||||
}
|
||||
if (vfRenderRef.value) {
|
||||
fromLoading.value = false
|
||||
buttonLoading.value = false
|
||||
fromLoading.value = false;
|
||||
buttonLoading.value = false;
|
||||
vfRenderRef.value.setFormJson(res.data.content);
|
||||
vfRenderRef.value.setFormData(JSON.parse(res.data.contentValue))
|
||||
vfRenderRef.value.setFormData(JSON.parse(res.data.contentValue));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitData = (status: string) => {
|
||||
if (vfRenderRef.value) {
|
||||
buttonLoading.value = true;
|
||||
fromLoading.value = true;
|
||||
vfRenderRef.value.getFormData().then((formData) => {
|
||||
form.value.contentValue = JSON.stringify(formData)
|
||||
vfRenderRef.value.getFormData().then((formData: object) => {
|
||||
form.value.contentValue = JSON.stringify(formData);
|
||||
if ('draft' === status) {
|
||||
updateBusinessForm(form.value).then(res => {
|
||||
proxy?.$modal.msgSuccess("暂存成功");
|
||||
updateBusinessForm(form.value).then((res) => {
|
||||
proxy?.$modal.msgSuccess('暂存成功');
|
||||
render.visible = false;
|
||||
buttonLoading.value = false;
|
||||
fromLoading.value = false;
|
||||
})
|
||||
});
|
||||
} else {
|
||||
if (!processDefinitionKey.value) {
|
||||
proxy?.$modal.msgError("未绑定流程!");
|
||||
proxy?.$modal.msgError('未绑定流程!');
|
||||
buttonLoading.value = false;
|
||||
fromLoading.value = false;
|
||||
return
|
||||
return;
|
||||
}
|
||||
updateBusinessForm(form.value).then(res => {
|
||||
handleStartWorkFlow(res.data)
|
||||
})
|
||||
updateBusinessForm(form.value).then((res) => {
|
||||
handleStartWorkFlow(res.data);
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
//提交申请
|
||||
const handleStartWorkFlow = async (data: any) => {
|
||||
submitFormData.value.processKey = processDefinitionKey.value;
|
||||
@ -267,7 +260,7 @@ const handleDelete = async (row?: BusinessFormVO) => {
|
||||
proxy?.$modal.msgSuccess("删除成功");
|
||||
loading.value = false;
|
||||
await getList();
|
||||
}
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
|
@ -29,14 +29,7 @@
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="categoryList"
|
||||
row-key="id"
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
ref="categoryTableRef"
|
||||
>
|
||||
<el-table v-loading="loading" :data="categoryList" row-key="id" :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" ref="categoryTableRef">
|
||||
<el-table-column label="分类名称" prop="categoryName" />
|
||||
<el-table-column label="分类编码" align="center" prop="categoryCode" />
|
||||
<el-table-column label="排序" align="center" prop="sortNum" />
|
||||
@ -132,6 +125,8 @@ const initFormData: CategoryForm = {
|
||||
const data = reactive<PageData<CategoryForm, CategoryQuery>>({
|
||||
form: {...initFormData},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
categoryName: undefined,
|
||||
categoryCode: undefined,
|
||||
},
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="search" v-show="showSearch">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="70">
|
||||
<el-form-item label="表单名称" prop="formName">
|
||||
@ -18,20 +17,16 @@
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['workflow:form:add']">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['workflow:form:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
|
||||
v-hasPermi="['workflow:form:edit']">修改</el-button>
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['workflow:form:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||
v-hasPermi="['workflow:form:remove']">删除</el-button>
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['workflow:form:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['workflow:form:export']">导出</el-button>
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['workflow:form:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -43,8 +38,7 @@
|
||||
<el-table-column label="表单名称" align="center" prop="formName" />
|
||||
<el-table-column label="状态" align="center" key="status">
|
||||
<template #default="scope">
|
||||
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
|
||||
@change="handleStatusChange(scope.row)"></el-switch>
|
||||
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程定义KEY" align="center" prop="wfFormDefinitionVo">
|
||||
@ -60,16 +54,13 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="详情" placement="top">
|
||||
<el-button link type="primary" icon="View" @click="handleDetail(scope.row)"
|
||||
v-hasPermi="['workflow:form:query']"></el-button>
|
||||
<el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['workflow:form:query']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['workflow:form:edit']"></el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['workflow:form:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['workflow:form:remove']"></el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['workflow:form:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="绑定流程" placement="top">
|
||||
<el-button link type="primary" icon="Tickets" @click="handleProcess(scope.row)"></el-button>
|
||||
@ -77,8 +68,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
|
||||
<!-- 流程表单设计器对话框 -->
|
||||
@ -115,8 +105,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible"
|
||||
:title="processDefinitionDialog.title" width="70%">
|
||||
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%">
|
||||
<el-table v-loading="loading" :data="processDefinition.list">
|
||||
<el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column>
|
||||
<el-table-column fixed align="center" prop="name" label="流程定义名称"></el-table-column>
|
||||
@ -130,17 +119,20 @@
|
||||
<el-tag type="danger" v-else>挂起</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" @click="handleConfirm(scope.row)">确认绑定</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="processDefinition.total > 0" :total="processDefinition.total"
|
||||
v-model:page="processQueryParams.pageNum" v-model:limit="processQueryParams.pageSize"
|
||||
@pagination="getDefinitionList" />
|
||||
<pagination
|
||||
v-show="processDefinition.total > 0"
|
||||
:total="processDefinition.total"
|
||||
v-model:page="processQueryParams.pageNum"
|
||||
v-model:limit="processQueryParams.pageSize"
|
||||
@pagination="getDefinitionList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -174,8 +166,8 @@ const processDefinition = reactive<any>({
|
||||
|
||||
|
||||
|
||||
const vfDesignerRef = ref(null);
|
||||
const vfRenderRef = ref(null);
|
||||
const vfDesignerRef = ref();
|
||||
const vfRenderRef = ref();
|
||||
const formFormRef = ref(ElForm);
|
||||
const queryFormRef = ref(ElForm);
|
||||
|
||||
|
@ -5,14 +5,22 @@
|
||||
<el-col :lg="4" :xs="24" style="">
|
||||
<el-card shadow="hover">
|
||||
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
|
||||
<el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
|
||||
:props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
|
||||
:filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
|
||||
<el-tree
|
||||
class="mt-2"
|
||||
ref="categoryTreeRef"
|
||||
node-key="id"
|
||||
:data="categoryOptions"
|
||||
:props="{ label: 'categoryName', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="20" :xs="24">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]" v-show="showSearch">
|
||||
<el-card shadow="hover">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="80px">
|
||||
@ -58,29 +66,24 @@
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="Pointer"
|
||||
@click="clickDesign(scope.row.id)">设计流程</el-button>
|
||||
<el-button link type="primary" size="small" icon="Pointer" @click="clickDesign(scope.row.id)">设计流程</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="Download"
|
||||
@click="clickExportZip(scope.row)">导出</el-button>
|
||||
<el-button link type="primary" size="small" icon="Download" @click="clickExportZip(scope.row)">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="ScaleToOriginal"
|
||||
@click="clickDeploy(scope.row.id, scope.row.key)"> 流程部署 </el-button>
|
||||
<el-button link type="primary" size="small" icon="ScaleToOriginal" @click="clickDeploy(scope.row.id, scope.row.key)"> 流程部署 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="Delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button link type="primary" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -97,9 +100,14 @@
|
||||
<el-input v-model="form.key" maxlength="20" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程分类" prop="categoryCode">
|
||||
<el-tree-select v-model="form.categoryCode" :data="categoryOptions"
|
||||
:props="{ value: 'categoryCode', label: 'categoryName', children: 'children' }" value-key="categoryCode"
|
||||
placeholder="请选择流程分类" check-strictly />
|
||||
<el-tree-select
|
||||
v-model="form.categoryCode"
|
||||
:data="categoryOptions"
|
||||
:props="{ value: 'categoryCode', label: 'categoryName', children: 'children' }"
|
||||
value-key="categoryCode"
|
||||
placeholder="请选择流程分类"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" prop="description">
|
||||
<el-input type="textarea" v-model="form.description" maxlength="30" show-word-limit></el-input>
|
||||
@ -142,7 +150,7 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const modelList = ref<Record<string, any>>([]);
|
||||
const modelList = ref<any[]>([]);
|
||||
const categoryOptions = ref<CategoryOption[]>([]);
|
||||
const categoryName = ref('');
|
||||
const categoryTreeRef = ref(ElTree);
|
||||
@ -164,7 +172,8 @@ const data = reactive<PageData<ModelForm, ModelQuery>>({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: '',
|
||||
key: ''
|
||||
key: '',
|
||||
categoryCode: ''
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '模型不能为空', trigger: 'blur' }],
|
||||
|
@ -16,14 +16,14 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
const data = reactive({
|
||||
visible: false,
|
||||
url: [],
|
||||
url: new Array<string>,
|
||||
type: ''
|
||||
})
|
||||
//打开
|
||||
function openDialog (url, type) {
|
||||
const openDialog = (url: string[], type: string) => {
|
||||
data.visible = true
|
||||
data.url = url
|
||||
data.type = type
|
||||
|
@ -5,14 +5,22 @@
|
||||
<el-col :lg="4" :xs="24" style="">
|
||||
<el-card shadow="hover">
|
||||
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
|
||||
<el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
|
||||
:props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
|
||||
:filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
|
||||
<el-tree
|
||||
class="mt-2"
|
||||
ref="categoryTreeRef"
|
||||
node-key="id"
|
||||
:data="categoryOptions"
|
||||
:props="{ label: 'categoryName', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="20" :xs="24">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]" v-show="showSearch">
|
||||
<el-card shadow="hover">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px">
|
||||
@ -30,8 +38,7 @@
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]" v-show="showSearch">
|
||||
<el-card shadow="hover">
|
||||
<el-button type="primary" icon="UploadFilled" @click="uploadDialog.visible = true">部署流程文件</el-button>
|
||||
@ -54,14 +61,12 @@
|
||||
<el-table-column align="center" prop="version" label="版本号" width="90">
|
||||
<template #default="scope"> v{{ scope.row.version }}.0</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="resourceName" label="流程XML" min-width="80"
|
||||
:show-overflow-tooltip="true">
|
||||
<el-table-column align="center" prop="resourceName" label="流程XML" min-width="80" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80"
|
||||
:show-overflow-tooltip="true">
|
||||
<el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName
|
||||
}}</el-link>
|
||||
@ -73,40 +78,31 @@
|
||||
<el-tag type="danger" v-else>挂起</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small"
|
||||
:icon="scope.row.suspensionState === 1 ? 'Lock' : 'Unlock'"
|
||||
@click="handleProcessDefState(scope.row)">
|
||||
<el-button link type="primary" size="small" :icon="scope.row.suspensionState === 1 ? 'Lock' : 'Unlock'" @click="handleProcessDefState(scope.row)">
|
||||
{{ scope.row.suspensionState === 1 ? "挂起流程" : "激活流程" }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="Delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button link type="primary" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="Sort" @click="handleConvertToModel(scope.row)"> 转换模型
|
||||
</el-button>
|
||||
<el-button link type="primary" size="small" icon="Sort" @click="handleConvertToModel(scope.row)"> 转换模型 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" icon="Document"
|
||||
@click="getProcessDefinitionHitoryList(scope.row.id, scope.row.key)">
|
||||
历史版本
|
||||
</el-button>
|
||||
<el-button link type="primary" size="small" icon="Document" @click="getProcessDefinitionHitoryList(scope.row.id, scope.row.key)"> 历史版本 </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -115,8 +111,7 @@
|
||||
|
||||
<!-- 部署文件 -->
|
||||
<el-dialog v-if="uploadDialog.visible" v-model="uploadDialog.visible" :title="uploadDialog.title" width="30%">
|
||||
<el-upload class="upload-demo" drag accept="application/zip,application/xml,.bpmn"
|
||||
:http-request="handerDeployProcessFile">
|
||||
<el-upload class="upload-demo" drag accept="application/zip,application/xml,.bpmn" :http-request="handerDeployProcessFile">
|
||||
<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>
|
||||
@ -125,8 +120,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 历史版本 -->
|
||||
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible"
|
||||
:title="processDefinitionDialog.title" width="70%">
|
||||
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%">
|
||||
<el-table v-loading="loading" :data="processDefinitionHistoryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column>
|
||||
@ -140,8 +134,7 @@
|
||||
<el-link type="primary" @click="clickPreviewXML(scope.row.id)">{{ scope.row.resourceName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80"
|
||||
:show-overflow-tooltip="true">
|
||||
<el-table-column align="center" prop="diagramResourceName" label="流程图片" min-width="80" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="clickPreviewImg(scope.row.id)">{{ scope.row.diagramResourceName }}</el-link>
|
||||
</template>
|
||||
@ -152,14 +145,12 @@
|
||||
<el-tag type="danger" v-else>挂起</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" size="small" :icon="scope.row.suspensionState === 1 ? 'Lock' : 'Unlock'"
|
||||
@click="handleProcessDefState(scope.row)">
|
||||
<el-button link type="primary" size="small" :icon="scope.row.suspensionState === 1 ? 'Lock' : 'Unlock'" @click="handleProcessDefState(scope.row)">
|
||||
{{ scope.row.suspensionState === 1 ? "挂起流程" : "激活流程" }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -169,8 +160,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button link type="primary" icon="Sort" size="small" @click="handleConvertToModel(scope.row)"> 转换模型
|
||||
</el-button>
|
||||
<el-button link type="primary" icon="Sort" size="small" @click="handleConvertToModel(scope.row)"> 转换模型 </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -325,7 +315,7 @@ const clickPreviewImg = (id: string) => {
|
||||
url.value = [];
|
||||
url.value.push('data:image/png;base64,' + resp.data);
|
||||
loading.value = false;
|
||||
previewRef.value.openDialog(url, 'png');
|
||||
previewRef.value.openDialog(url.value, 'png');
|
||||
}
|
||||
})
|
||||
|
||||
@ -338,7 +328,7 @@ const clickPreviewXML = (id: string) => {
|
||||
url.value = [];
|
||||
url.value = response.data.xml;
|
||||
loading.value = false;
|
||||
previewRef.value.openDialog(url, 'xml');
|
||||
previewRef.value.openDialog(url.value, 'xml');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -5,14 +5,22 @@
|
||||
<el-col :lg="4" :xs="24" style="">
|
||||
<el-card shadow="hover">
|
||||
<el-input placeholder="请输入流程分类名" v-model="categoryName" prefix-icon="Search" clearable />
|
||||
<el-tree class="mt-2" ref="categoryTreeRef" node-key="id" :data="categoryOptions"
|
||||
:props="{ label: 'categoryName', children: 'children' }" :expand-on-click-node="false"
|
||||
:filter-node-method="filterNode" highlight-current default-expand-all @node-click="handleNodeClick"></el-tree>
|
||||
<el-tree
|
||||
class="mt-2"
|
||||
ref="categoryTreeRef"
|
||||
node-key="id"
|
||||
:data="categoryOptions"
|
||||
:props="{ label: 'categoryName', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="20" :xs="24">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<center>
|
||||
@ -24,8 +32,7 @@
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]" v-show="showSearch">
|
||||
<el-card shadow="hover">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="120px">
|
||||
@ -74,14 +81,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="startTime" label="启动时间" width="160"></el-table-column>
|
||||
<el-table-column align="center" v-if="tab === 'finish'" prop="endTime" label="结束时间"
|
||||
width="160"></el-table-column>
|
||||
<el-table-column align="center" v-if="tab === 'finish'" prop="endTime" label="结束时间" width="160"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="text" size="small" icon="Document"
|
||||
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
|
||||
<el-button type="text" size="small" icon="Document" @click="handleApprovalRecord(scope.row)">审批记录</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="text" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
@ -89,8 +94,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="10" class="mb8" v-if="tab === 'running'">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="text" size="small" icon="Sort"
|
||||
@click="getProcessDefinitionHitoryList(scope.row.processDefinitionId, scope.row.processDefinitionKey)">切换版本</el-button>
|
||||
<el-button type="text" size="small" icon="Sort" @click="getProcessDefinitionHitoryList(scope.row.processDefinitionId, scope.row.processDefinitionKey)">切换版本</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-popover trigger="click" :ref="`popoverRef${scope.$index}`" placement="left" :width="300">
|
||||
@ -108,13 +112,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible"
|
||||
:title="processDefinitionDialog.title" width="70%">
|
||||
<el-dialog v-if="processDefinitionDialog.visible" v-model="processDefinitionDialog.visible" :title="processDefinitionDialog.title" width="70%">
|
||||
<el-table v-loading="loading" :data="processDefinitionHistoryList">
|
||||
<el-table-column fixed align="center" type="index" label="序号" width="50"></el-table-column>
|
||||
<el-table-column fixed align="center" prop="name" label="流程定义名称"></el-table-column>
|
||||
@ -128,8 +130,7 @@
|
||||
<el-tag type="danger" v-else>挂起</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间"
|
||||
:show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column align="center" prop="deploymentTime" label="部署时间" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column fixed="right" label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" size="small" icon="Sort" @click="handleChange(scope.row.id)">切换</el-button>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<center>
|
||||
@ -13,8 +12,7 @@
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]" v-show="showSearch">
|
||||
<el-card shadow="hover">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
@ -22,12 +20,10 @@
|
||||
<el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程定义名称" label-width="100" prop="name">
|
||||
<el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程定义KEY" label-width="100" prop="name">
|
||||
<el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
@ -80,23 +76,19 @@
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="text" size="small" icon="Document"
|
||||
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
|
||||
<el-button type="text" size="small" icon="Document" @click="handleApprovalRecord(scope.row)">审批记录</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="scope.row.multiInstance">
|
||||
<el-button type="text" size="small" icon="CirclePlus"
|
||||
@click="addMultiInstanceUser(scope.row)">加签</el-button>
|
||||
<el-button type="text" size="small" icon="CirclePlus" @click="addMultiInstanceUser(scope.row)">加签</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="scope.row.multiInstance">
|
||||
<el-button type="text" size="small" icon="Remove"
|
||||
@click="deleteMultiInstanceUser(scope.row)">减签</el-button>
|
||||
<el-button type="text" size="small" icon="Remove" @click="deleteMultiInstanceUser(scope.row)">减签</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
</el-card>
|
||||
<!-- 审批记录 -->
|
||||
<approvalRecord ref="approvalRecordRef" />
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<center>
|
||||
@ -13,8 +12,7 @@
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter"
|
||||
:leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div class="mb-[10px]" v-show="showSearch">
|
||||
<el-card shadow="hover">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
@ -22,12 +20,10 @@
|
||||
<el-input v-model="queryParams.name" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程定义名称" label-width="100" prop="name">
|
||||
<el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.processDefinitionName" placeholder="请输入流程定义名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程定义KEY" label-width="100" prop="name">
|
||||
<el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable
|
||||
@keyup.enter="handleQuery" />
|
||||
<el-input v-model="queryParams.processDefinitionKey" placeholder="请输入流程定义KEY" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
@ -80,27 +76,22 @@
|
||||
<template #default="scope">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="text" size="small" icon="Document"
|
||||
@click="handleApprovalRecord(scope.row)">审批记录</el-button>
|
||||
<el-button type="text" size="small" icon="Document" @click="handleApprovalRecord(scope.row)">审批记录</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5"
|
||||
v-if="tab === 'waiting' && scope.row.participantVo && (scope.row.participantVo.claim === null || scope.row.participantVo.claim === true)">
|
||||
<el-col :span="1.5" v-if="tab === 'waiting' && scope.row.participantVo && (scope.row.participantVo.claim === null || scope.row.participantVo.claim === true)">
|
||||
<el-button type="text" size="small" icon="Edit" @click="submitVerifyOpen(scope.row.id)">办理</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5"
|
||||
v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === true">
|
||||
<el-col :span="1.5" v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === true">
|
||||
<el-button type="text" size="small" icon="Document" @click="handleReturnTask(scope.row.id)">归还</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5"
|
||||
v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === false">
|
||||
<el-col :span="1.5" v-if="tab === 'waiting' && scope.row.participantVo && scope.row.participantVo.claim === false">
|
||||
<el-button type="text" size="small" icon="Document" @click="handleClaimTask(scope.row.id)">认领</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="handleQuery" />
|
||||
</el-card>
|
||||
<!-- 审批记录 -->
|
||||
<approvalRecord ref="approvalRecordRef" />
|
||||
|
@ -69,8 +69,6 @@
|
||||
<el-button type="text" size="small" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" v-if="scope.row.businessStatus === 'waiting'">
|
||||
<el-button type="text" size="small" icon="Notification"
|
||||
@click="handleCancelProcessApply(scope.row.id)">撤销</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5"
|
||||
v-if="scope.row.businessStatus === 'draft' || scope.row.businessStatus === 'cancel' || scope.row.businessStatus === 'back'">
|
||||
|
Loading…
x
Reference in New Issue
Block a user