处置申请-审批流程数据修改
This commit is contained in:
@@ -369,6 +369,7 @@ const getTemplateList = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
const {data,error} = await templateListApi();
|
const {data,error} = await templateListApi();
|
||||||
if(!error){
|
if(!error){
|
||||||
|
// 过滤出资料关闭模板
|
||||||
const result = data.filter((item:any) => item.type === 3);
|
const result = data.filter((item:any) => item.type === 3);
|
||||||
// ******审批模板********
|
// ******审批模板********
|
||||||
currentTemplate.value = result[0]?.steps || [];
|
currentTemplate.value = result[0]?.steps || [];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useRouterPush } from '@/hooks/common/router';
|
|||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { tagTextColor, tagBgColor, tagBorderColor, formatTimestamp, downloadFileFun } from '@/utils/common';
|
import { tagTextColor, tagBgColor, tagBorderColor, formatTimestamp, downloadFileFun } from '@/utils/common';
|
||||||
import { AiError, aiTypeJudge } from "@/service/api/ai";
|
import { AiError, aiTypeJudge } from "@/service/api/ai";
|
||||||
import { systemConfigApi, peopleListApi } from '@/service/api/system';
|
import { systemConfigApi, peopleListApi, templateListApi } from '@/service/api/system';
|
||||||
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
|
import { getChangeDetailApi, urgeApi } from '@/service/api/change';
|
||||||
import { myTasksDisposalSubmitApi, myTasksAddItemApi } from '@/service/api/myTasks';
|
import { myTasksDisposalSubmitApi, myTasksAddItemApi } from '@/service/api/myTasks';
|
||||||
import previewComponent from '@/components/previewFile/index.vue'
|
import previewComponent from '@/components/previewFile/index.vue'
|
||||||
@@ -47,6 +47,8 @@ const delayDate = ref<number | null>(null);
|
|||||||
const approvalDrawer = ref<boolean>(false);
|
const approvalDrawer = ref<boolean>(false);
|
||||||
const flowList = ref<any[]>([]);
|
const flowList = ref<any[]>([]);
|
||||||
const steps = ref<any[]>([]);
|
const steps = ref<any[]>([]);
|
||||||
|
// 处置申请模板
|
||||||
|
const templateList = ref<any[]>([]);
|
||||||
// 专业
|
// 专业
|
||||||
const SPECIALTIES = [
|
const SPECIALTIES = [
|
||||||
{ label: '生产', value: '生产' },
|
{ label: '生产', value: '生产' },
|
||||||
@@ -369,8 +371,21 @@ const getDetail = async () => {
|
|||||||
if(!error){
|
if(!error){
|
||||||
currentInfo.value = data;
|
currentInfo.value = data;
|
||||||
// ******审批流程********
|
// ******审批流程********
|
||||||
flowList.value = data?.approval_flow?.steps || [];
|
if(data?.disposal_approval_flow && data?.disposal_approval_flow?.steps?.length){
|
||||||
steps.value = data?.approval_flow?.steps || [];
|
flowList.value = data?.disposal_approval_flow?.steps || [];
|
||||||
|
steps.value = data?.disposal_approval_flow?.steps || [];
|
||||||
|
}else{
|
||||||
|
let template = templateList.value.find((item: any) =>
|
||||||
|
item.level === data?.apply_form?.change_level &&
|
||||||
|
item.category === data?.apply_form?.change_type &&
|
||||||
|
item.duration === data?.apply_form?.duration_type
|
||||||
|
) || null;
|
||||||
|
if(template){
|
||||||
|
flowList.value = template?.steps || [];
|
||||||
|
steps.value = template?.steps || [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ******解析 PSSR 检查内容********
|
// ******解析 PSSR 检查内容********
|
||||||
const map = new Map();
|
const map = new Map();
|
||||||
for (const item of currentInfo.value?.pssr?.items) {
|
for (const item of currentInfo.value?.pssr?.items) {
|
||||||
@@ -548,8 +563,22 @@ const delMember = (s: any, p: number) => {
|
|||||||
s.members = s.members.filter((m:any) => m.user_id !== p);
|
s.members = s.members.filter((m:any) => m.user_id !== p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取所有模板
|
||||||
|
const getTemplateList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const {data,error} = await templateListApi();
|
||||||
|
if(!error){
|
||||||
|
// 过滤出处置申请模板
|
||||||
|
const result = data.filter((item:any) => item.type === 2);
|
||||||
|
// ******审批模板********
|
||||||
|
templateList.value = result || [];
|
||||||
|
}
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
getAllMembers();
|
getAllMembers();
|
||||||
|
await getTemplateList();
|
||||||
if(route.query && route.query.id){
|
if(route.query && route.query.id){
|
||||||
if(route.query.id){
|
if(route.query.id){
|
||||||
currentId.value = Number(route.query.id);
|
currentId.value = Number(route.query.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user