add 增加催办
This commit is contained in:
@@ -191,3 +191,16 @@ export const getNextNodeList = (data: any): any => {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 催办任务
|
||||||
|
* @param data参数
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
export const urgeTask = (data: any): any => {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/task/urgeTask',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
100
src/components/Process/MessageType.vue
Normal file
100
src/components/Process/MessageType.vue
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="visible" :title="props.title" width="50%" draggable :before-close="cancel" center :close-on-click-modal="false">
|
||||||
|
<el-form v-loading="loading" ref="ruleFormRef" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="消息提醒" prop="messageType">
|
||||||
|
<el-checkbox-group v-model="form.messageType">
|
||||||
|
<el-checkbox value="1" name="type" disabled>站内信</el-checkbox>
|
||||||
|
<el-checkbox value="2" name="type">邮件</el-checkbox>
|
||||||
|
<el-checkbox value="3" name="type">短信</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="消息内容" prop="message">
|
||||||
|
<el-input v-model="form.message" type="textarea" resize="none" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer" style="float: right; padding-bottom: 20px">
|
||||||
|
<el-button :disabled="buttonDisabled" type="primary" @click="submit(ruleFormRef)">确认</el-button>
|
||||||
|
<el-button :disabled="buttonDisabled" @click="cancel">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { ComponentInternalInstance } from 'vue';
|
||||||
|
import { ElForm, FormInstance } from 'element-plus';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const emits = defineEmits(['submitCallback', 'cancelCallback']);
|
||||||
|
const props = defineProps({
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '提示'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const ruleFormRef = ref<FormInstance>();
|
||||||
|
//遮罩层
|
||||||
|
const loading = ref(true);
|
||||||
|
const visible = ref(false);
|
||||||
|
const buttonDisabled = ref(true);
|
||||||
|
const form = ref<Record<string, any>>({
|
||||||
|
message: undefined,
|
||||||
|
messageType: ['1']
|
||||||
|
});
|
||||||
|
const rules = reactive<Record<string, any>>({
|
||||||
|
messageType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择消息提醒',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
message: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入消息内容',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
//确认
|
||||||
|
//打开弹窗
|
||||||
|
const open = async () => {
|
||||||
|
reset();
|
||||||
|
visible.value = true;
|
||||||
|
loading.value = false;
|
||||||
|
buttonDisabled.value = false;
|
||||||
|
};
|
||||||
|
//关闭弹窗
|
||||||
|
const close = async () => {
|
||||||
|
reset();
|
||||||
|
visible.value = false;
|
||||||
|
};
|
||||||
|
const submit = async (formEl: FormInstance | undefined) => {
|
||||||
|
if (!formEl) return;
|
||||||
|
await formEl.validate((valid, fields) => {
|
||||||
|
if (valid) {
|
||||||
|
emits('submitCallback', form.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
//取消
|
||||||
|
const cancel = async () => {
|
||||||
|
visible.value = false;
|
||||||
|
buttonDisabled.value = false;
|
||||||
|
emits('cancelCallback');
|
||||||
|
};
|
||||||
|
//重置
|
||||||
|
const reset = async () => {
|
||||||
|
form.value.taskIdList = [];
|
||||||
|
form.value.message = '';
|
||||||
|
form.value.messageType = ['1'];
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 对外暴露子组件方法
|
||||||
|
*/
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -27,7 +27,8 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5" v-if="tab === 'waiting'">
|
<el-col :span="1.5" v-if="tab === 'waiting'">
|
||||||
<el-button type="primary" plain icon="Edit" :disabled="multiple" @click="handleUpdate">修改办理人 </el-button>
|
<el-button type="primary" plain icon="Edit" :disabled="multiple" @click="handleUserOpen()">修改办理人 </el-button>
|
||||||
|
<el-button type="primary" plain icon="Bell" :disabled="multiple" @click="handleUrgeTaskOpen()">催办 </el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar>
|
<right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -97,21 +98,24 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 选人组件 -->
|
<!-- 选人组件 -->
|
||||||
<UserSelect ref="userSelectRef" :multiple="false" @confirm-call-back="submitCallback"></UserSelect>
|
<UserSelect ref="userSelectRef" :multiple="userMultiple" @confirm-call-back="submitCallback"></UserSelect>
|
||||||
<!-- 流程干预组件 -->
|
<!-- 流程干预组件 -->
|
||||||
<processMeddle ref="processMeddleRef" @submitCallback="getWaitingList"></processMeddle>
|
<processMeddle ref="processMeddleRef" @submitCallback="getWaitingList"></processMeddle>
|
||||||
<!-- 申请人 -->
|
<!-- 申请人 -->
|
||||||
<UserSelect ref="applyUserSelectRef" :multiple="true" :data="selectUserIds" @confirm-call-back="userSelectCallBack"></UserSelect>
|
<UserSelect ref="applyUserSelectRef" :multiple="true" :data="selectUserIds" @confirm-call-back="userSelectCallBack"></UserSelect>
|
||||||
|
<!-- 流程干预组件 -->
|
||||||
|
<messageType ref="messageTypeRef" @submitCallback="handleUserTask"></messageType>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { pageByAllTaskWait, pageByAllTaskFinish, updateAssignee } from '@/api/workflow/task';
|
import { pageByAllTaskWait, pageByAllTaskFinish, updateAssignee, urgeTask } from '@/api/workflow/task';
|
||||||
import UserSelect from '@/components/UserSelect';
|
import UserSelect from '@/components/UserSelect';
|
||||||
import { TaskQuery } from '@/api/workflow/task/types';
|
import { TaskQuery } from '@/api/workflow/task/types';
|
||||||
import workflowCommon from '@/api/workflow/workflowCommon';
|
import workflowCommon from '@/api/workflow/workflowCommon';
|
||||||
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
import { RouterJumpVo } from '@/api/workflow/workflowCommon/types';
|
||||||
import processMeddle from '@/components/Process/processMeddle';
|
import processMeddle from '@/components/Process/processMeddle';
|
||||||
|
import messageType from '@/components/Process/MessageType';
|
||||||
import { UserVO } from '@/api/system/user/types';
|
import { UserVO } from '@/api/system/user/types';
|
||||||
import { TabsPaneContext } from 'element-plus';
|
import { TabsPaneContext } from 'element-plus';
|
||||||
//选人组件
|
//选人组件
|
||||||
@@ -120,6 +124,8 @@ const userSelectRef = ref<InstanceType<typeof UserSelect>>();
|
|||||||
const processMeddleRef = ref<InstanceType<typeof processMeddle>>();
|
const processMeddleRef = ref<InstanceType<typeof processMeddle>>();
|
||||||
//选人组件
|
//选人组件
|
||||||
const applyUserSelectRef = ref<InstanceType<typeof UserSelect>>();
|
const applyUserSelectRef = ref<InstanceType<typeof UserSelect>>();
|
||||||
|
//消息组件
|
||||||
|
const messageTypeRef = ref<InstanceType<typeof messageType>>();
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
||||||
@@ -132,13 +138,14 @@ const ids = ref<Array<any>>([]);
|
|||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
|
const userMultiple = ref(false);
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
// 总条数
|
// 总条数
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
// 模型定义表格数据
|
// 模型定义表格数据
|
||||||
const taskList = ref([]);
|
const taskList = ref([]);
|
||||||
const title = ref('');
|
const buttonType = ref('');
|
||||||
//申请人id
|
//申请人id
|
||||||
const selectUserIds = ref<Array<number | string>>([]);
|
const selectUserIds = ref<Array<number | string>>([]);
|
||||||
//申请人选择数量
|
//申请人选择数量
|
||||||
@@ -204,10 +211,24 @@ const getFinishList = () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 打开催办
|
||||||
|
const handleUrgeTaskOpen = () => {
|
||||||
|
messageTypeRef.value.open();
|
||||||
|
};
|
||||||
//打开修改选人
|
//打开修改选人
|
||||||
const handleUpdate = () => {
|
const handleUserOpen = () => {
|
||||||
userSelectRef.value.open();
|
userSelectRef.value.open();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//打开修改选人
|
||||||
|
const handleUserTask = async (data) => {
|
||||||
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
|
data.taskIdList = ids.value;
|
||||||
|
await urgeTask(data);
|
||||||
|
messageTypeRef.value.close();
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
//修改办理人
|
//修改办理人
|
||||||
const submitCallback = async (data) => {
|
const submitCallback = async (data) => {
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
@@ -227,8 +248,7 @@ const handleView = (row) => {
|
|||||||
taskId: row.id,
|
taskId: row.id,
|
||||||
type: 'view',
|
type: 'view',
|
||||||
formCustom: row.formCustom,
|
formCustom: row.formCustom,
|
||||||
formPath: row.formPath,
|
formPath: row.formPath
|
||||||
instanceId: row.instanceId
|
|
||||||
});
|
});
|
||||||
workflowCommon.routerJump(routerJumpVo, proxy);
|
workflowCommon.routerJump(routerJumpVo, proxy);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user