merge
This commit is contained in:
@@ -49,7 +49,7 @@ import PlanningInformation from '@/tenants/lyric/views/task/components/planningI
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import {
|
||||
getDeptListData,
|
||||
// getDeptListData,
|
||||
setPhaseListByProjectId,
|
||||
setMachineListByPhaseId,
|
||||
setWorkspaceListByMachineId,
|
||||
@@ -57,6 +57,13 @@ import {
|
||||
toggleUrgencyDesc,
|
||||
} from './lib';
|
||||
|
||||
defineProps({
|
||||
deptOptions: {
|
||||
type: Array<any>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['submit']);
|
||||
const TableFormRef = ref();
|
||||
const hideKeys = ref([
|
||||
@@ -80,10 +87,10 @@ const attachmentRemark = ref(
|
||||
);
|
||||
|
||||
const editFormInfo = ref<any>({});
|
||||
const deptOptions = ref<any>([]);
|
||||
// const deptOptions = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
deptOptions.value = await getDeptListData();
|
||||
// deptOptions.value = await getDeptListData();
|
||||
TableFormRef.value.setOptionsFun('simType', getSimTypeList('机器人仿真'));
|
||||
});
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ import PlanningInformation from '@/tenants/lyric/views/task/components/planningI
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import {
|
||||
getDeptListData,
|
||||
// getDeptListData,
|
||||
setPhaseListByProjectId,
|
||||
setMachineListByPhaseId,
|
||||
setWorkspaceListByMachineId,
|
||||
@@ -74,8 +74,16 @@ import {
|
||||
getPurposeList,
|
||||
toggleUrgencyDesc,
|
||||
toggleMaterialNo,
|
||||
disposeFiniteElementDeptMember,
|
||||
} from './lib';
|
||||
|
||||
const props = defineProps({
|
||||
deptOptions: {
|
||||
type: Array<any>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['submit']);
|
||||
const TableFormRef = ref();
|
||||
const hideKeys = ref([
|
||||
@@ -105,11 +113,11 @@ const simTypeTipText = ref(`
|
||||
`);
|
||||
|
||||
const editFormInfo = ref<any>({});
|
||||
const deptOptions = ref<any>([]);
|
||||
// const deptOptions = ref<any>([]);
|
||||
const finiteElementPurposeOptions = ref<any>(getPurposeList());
|
||||
|
||||
onMounted(async () => {
|
||||
deptOptions.value = await getDeptListData();
|
||||
// deptOptions.value = await getDeptListData();
|
||||
TableFormRef.value.setOptionsFun('simType', getSimTypeList('机器人仿真'));
|
||||
});
|
||||
|
||||
@@ -130,6 +138,7 @@ const changeFun = async (cbData: any) => {
|
||||
ref: TableFormRef.value,
|
||||
cbData,
|
||||
});
|
||||
disposeFiniteElementDeptMember(editFormInfo.value, props.deptOptions);
|
||||
}
|
||||
if (['projectId', 'phaseId', 'machineId'].includes(key)) {
|
||||
await setWorkspaceListByMachineId({
|
||||
@@ -154,6 +163,9 @@ const changeFun = async (cbData: any) => {
|
||||
hideKeys: hideKeys.value,
|
||||
});
|
||||
}
|
||||
if (key === 'simType') {
|
||||
disposeFiniteElementDeptMember(editFormInfo.value, props.deptOptions);
|
||||
}
|
||||
};
|
||||
|
||||
const submitFun = async () => {
|
||||
|
||||
@@ -67,12 +67,12 @@
|
||||
@close="closeFun"
|
||||
>
|
||||
<div v-if="diaVisible">
|
||||
<Animation v-if="currentName === 'animation'" ref="CurrentRef" @submit="submitFun" />
|
||||
<FiniteElement v-if="currentName === 'finiteElement'" ref="CurrentRef" @submit="submitFun" />
|
||||
<Industry v-if="currentName === 'industry'" ref="CurrentRef" @submit="submitFun" />
|
||||
<Logistics v-if="currentName === 'logistics'" ref="CurrentRef" @submit="submitFun" />
|
||||
<Robot v-if="currentName === 'robot'" ref="CurrentRef" @submit="submitFun" />
|
||||
<Tolerance v-if="currentName === 'tolerance'" ref="CurrentRef" @submit="submitFun" />
|
||||
<Animation v-if="currentName === 'animation'" ref="CurrentRef" @submit="submitFun" :deptOptions="deptOptions"/>
|
||||
<FiniteElement v-if="currentName === 'finiteElement'" ref="CurrentRef" @submit="submitFun" :deptOptions="deptOptions" />
|
||||
<Industry v-if="currentName === 'industry'" ref="CurrentRef" @submit="submitFun" :deptOptions="deptOptions" />
|
||||
<Logistics v-if="currentName === 'logistics'" ref="CurrentRef" @submit="submitFun" :deptOptions="deptOptions" />
|
||||
<Robot v-if="currentName === 'robot'" ref="CurrentRef" @submit="submitFun" :deptOptions="deptOptions" />
|
||||
<Tolerance v-if="currentName === 'tolerance'" ref="CurrentRef" @submit="submitFun" :deptOptions="deptOptions" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<div>
|
||||
@@ -84,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { nextTick, ref } from 'vue';
|
||||
import { nextTick, onMounted, ref } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import Animation from './animation.vue';
|
||||
import FiniteElement from './finiteElement.vue';
|
||||
@@ -102,6 +102,7 @@ import LogisticsBg from './imgs/logistics.png';
|
||||
import { addDemandNoPermissionApi } from '@/api/project/demand';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import { getDeptListData } from './lib';
|
||||
|
||||
const diaVisible = ref(false);
|
||||
const currentName = ref('');
|
||||
@@ -117,6 +118,12 @@ const titleMap: any = {
|
||||
tolerance: '公差分析',
|
||||
};
|
||||
|
||||
const deptOptions = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
deptOptions.value = await getDeptListData();
|
||||
});
|
||||
|
||||
const openFun = (name: string) => {
|
||||
currentName.value = name;
|
||||
diaTitle.value = titleMap[name];
|
||||
|
||||
@@ -158,3 +158,60 @@ export const toggleMaterialNo = (data: any) => {
|
||||
}
|
||||
return newKeys;
|
||||
};
|
||||
|
||||
// 处理有限元的确认人
|
||||
export const disposeFiniteElementDeptMember = async (editFormInfo: any, deptList: any[]) => {
|
||||
console.log('editFormInfo', editFormInfo);
|
||||
let pMemberId = '';
|
||||
editFormInfo.pMemberList = '';
|
||||
editFormInfo.pMemberName = '';
|
||||
if (!editFormInfo.projectUndertaker) {
|
||||
return '';
|
||||
}
|
||||
const matchingDeptList = deptList.filter((item: any) => {
|
||||
// 非设计阶段 走技术中心 设计阶段不走技术中心
|
||||
if (editFormInfo?.selectPhaseName.indexOf('设计') !== -1) {
|
||||
return (
|
||||
item.deptName.startsWith(editFormInfo.projectUndertaker) &&
|
||||
!item.deptName.endsWith('技术中心')
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
item.deptName.startsWith(editFormInfo.projectUndertaker) &&
|
||||
item.deptName.endsWith('技术中心')
|
||||
);
|
||||
}
|
||||
});
|
||||
if (matchingDeptList.length > 0) {
|
||||
const machDept = matchingDeptList.find((item: any) => {
|
||||
return item.deptName.indexOf(editFormInfo.simType) !== -1;
|
||||
});
|
||||
if (machDept) {
|
||||
pMemberId = machDept.userId;
|
||||
editFormInfo.pMemberList = machDept.userId + '-' + machDept.deptName;
|
||||
editFormInfo.pMemberName = machDept.userResp.nickname;
|
||||
}
|
||||
// }
|
||||
}
|
||||
return pMemberId;
|
||||
};
|
||||
|
||||
// 处理非有限元的确认人
|
||||
export const disposeNotFiniteElementDeptMember = async (editFormInfo: any, deptList: any[]) => {
|
||||
console.log('editFormInfo', editFormInfo);
|
||||
let pMemberId = '';
|
||||
editFormInfo.pMemberList = '';
|
||||
editFormInfo.pMemberName = '';
|
||||
if (!editFormInfo.projectUndertaker) {
|
||||
return '';
|
||||
}
|
||||
for (let index = 0; index < deptList.length; index++) {
|
||||
if (editFormInfo.simType === deptList[index].deptName) {
|
||||
editFormInfo.pMemberList =
|
||||
deptList[index].userId + '-' + deptList[index].deptName;
|
||||
pMemberId = deptList[index].userId;
|
||||
editFormInfo.pMemberName = deptList[index].userResp.nickname;
|
||||
}
|
||||
}
|
||||
return pMemberId;
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ import PlanningInformation from '@/tenants/lyric/views/task/components/planningI
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import {
|
||||
getDeptListData,
|
||||
// getDeptListData,
|
||||
setPhaseListByProjectId,
|
||||
setMachineListByPhaseId,
|
||||
setWorkspaceListByMachineId,
|
||||
@@ -60,6 +60,13 @@ import {
|
||||
} from './lib';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
defineProps({
|
||||
deptOptions: {
|
||||
type: Array<any>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['submit']);
|
||||
const TableFormRef = ref();
|
||||
const hideKeys = ref([
|
||||
@@ -85,10 +92,10 @@ CAD布局
|
||||
时序节拍参数`);
|
||||
|
||||
const editFormInfo = ref<any>({});
|
||||
const deptOptions = ref<any>([]);
|
||||
// const deptOptions = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
deptOptions.value = await getDeptListData();
|
||||
// deptOptions.value = await getDeptListData();
|
||||
TableFormRef.value.setOptionsFun('simType', getSimTypeList('机器人仿真'));
|
||||
});
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ import PlanningInformation from '@/tenants/lyric/views/task/components/planningI
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import {
|
||||
getDeptListData,
|
||||
// getDeptListData,
|
||||
setPhaseListByProjectId,
|
||||
setMachineListByPhaseId,
|
||||
setWorkspaceListByMachineId,
|
||||
@@ -57,6 +57,13 @@ import {
|
||||
toggleUrgencyDesc,
|
||||
} from './lib';
|
||||
|
||||
defineProps({
|
||||
deptOptions: {
|
||||
type: Array<any>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['submit']);
|
||||
const TableFormRef = ref();
|
||||
const hideKeys = ref([
|
||||
@@ -87,10 +94,10 @@ const attachmentRemark = ref(`
|
||||
`);
|
||||
|
||||
const editFormInfo = ref<any>({});
|
||||
const deptOptions = ref<any>([]);
|
||||
// const deptOptions = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
deptOptions.value = await getDeptListData();
|
||||
// deptOptions.value = await getDeptListData();
|
||||
TableFormRef.value.setOptionsFun('simType', getSimTypeList('机器人仿真'));
|
||||
});
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ import PlanningInformation from '@/tenants/lyric/views/task/components/planningI
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import {
|
||||
getDeptListData,
|
||||
// getDeptListData,
|
||||
setPhaseListByProjectId,
|
||||
setMachineListByPhaseId,
|
||||
setWorkspaceListByMachineId,
|
||||
@@ -54,6 +54,13 @@ import {
|
||||
toggleUrgencyDesc,
|
||||
} from './lib';
|
||||
|
||||
defineProps({
|
||||
deptOptions: {
|
||||
type: Array<any>,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['submit']);
|
||||
const TableFormRef = ref();
|
||||
const hideKeys = ref([
|
||||
@@ -80,10 +87,10 @@ const hideKeys = ref([
|
||||
const endTimeRemark = ref('【需求时间】请参考发图时间或客户评审时间');
|
||||
|
||||
const editFormInfo = ref<any>({});
|
||||
const deptOptions = ref<any>([]);
|
||||
// const deptOptions = ref<any>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
deptOptions.value = await getDeptListData();
|
||||
// deptOptions.value = await getDeptListData();
|
||||
TableFormRef.value.setOptionsFun('simType', getSimTypeList('机器人仿真'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user