update:新增代办,更具阶段选择确认人
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 968 KiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 833 KiB |
|
Before Width: | Height: | Size: 921 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB |
@@ -122,12 +122,12 @@ import Industry from './industry.vue';
|
||||
import Logistics from './logistics.vue';
|
||||
import Robot from './robot.vue';
|
||||
import Tolerance from './tolerance.vue';
|
||||
import RobotBg from './imgs/robot.png';
|
||||
import AnimationBg from './imgs/animation.png';
|
||||
import IndustryBg from './imgs/industry.png';
|
||||
import ToleranceBg from './imgs/tolerance.png';
|
||||
import FiniteElementBg from './imgs/finiteElement.png';
|
||||
import LogisticsBg from './imgs/logistics.png';
|
||||
import RobotBg from '@/assets/imgs/projectList/project-blue.png';
|
||||
import AnimationBg from '@/assets/imgs/projectList/project-green.png';
|
||||
import IndustryBg from '@/assets/imgs/projectList/project-blue.png';
|
||||
import ToleranceBg from '@/assets/imgs/projectList/project-green.png';
|
||||
import FiniteElementBg from '@/assets/imgs/projectList/project-green.png';
|
||||
import LogisticsBg from '@/assets/imgs/projectList/project-blue.png';
|
||||
// import PlanBg from './imgs/plan.png';
|
||||
import { addDemandNoPermissionApi } from '@/api/project/demand';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
@@ -229,6 +229,9 @@ const closeFun = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.gl-page-content-full {
|
||||
min-height: 400px;
|
||||
}
|
||||
.card-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -4,6 +4,7 @@ import { dataQueryDirApi } from '@/api/data/data';
|
||||
import { queryByDeptAndDisciplineApi } from '@/api/system/departMent';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
// 初始化
|
||||
export const initDetailData = async (initData: any) => {
|
||||
@@ -107,7 +108,7 @@ export const getNodeListData = async (nodeId: any, nodeType: any) => {
|
||||
|
||||
// 根据项目设置阶段
|
||||
export const setPhaseListByProjectId = async (data: any) => {
|
||||
const { nodeId, formData, ref, cbData } = data;
|
||||
const { nodeId, formData = {}, ref, cbData } = data;
|
||||
ref.setOptionsFun('phaseId', []);
|
||||
if (!nodeId) {
|
||||
return;
|
||||
@@ -116,7 +117,6 @@ export const setPhaseListByProjectId = async (data: any) => {
|
||||
ref.setOptionsFun('phaseId', options);
|
||||
formData.phaseId = '';
|
||||
formData.phaseName = '';
|
||||
formData.selectPhaseName = '';
|
||||
let defaultIndex = 0;
|
||||
const currentPhaseIndex = options.findIndex((item: any) => {
|
||||
return item.label === cbData.val?.currentPhase;
|
||||
@@ -128,7 +128,6 @@ export const setPhaseListByProjectId = async (data: any) => {
|
||||
if (current) {
|
||||
formData.phaseId = current.value;
|
||||
formData.phaseName = current.label;
|
||||
formData.selectPhaseName = current.label;
|
||||
}
|
||||
for (let index = 0; index < cbData.val.extras.length; index++) {
|
||||
if (cbData.val.extras[index]?.propertyName === 'projectUndertaker') {
|
||||
@@ -142,12 +141,18 @@ export const setPhaseListByProjectId = async (data: any) => {
|
||||
|
||||
// 根据阶段设置机台
|
||||
export const setMachineListByPhaseId = async (data: any) => {
|
||||
const { nodeId, formData, ref } = data;
|
||||
const { nodeId, formData = {}, ref, cbData } = data;
|
||||
ref.setOptionsFun('machineId', []);
|
||||
formData.machineId = '';
|
||||
if (!nodeId) {
|
||||
return;
|
||||
}
|
||||
if (cbData.key === 'phaseId') {
|
||||
formData.phaseName = cbData.val.label;
|
||||
formData.simType = '';
|
||||
formData.pMemberName = '';
|
||||
formData.pMemberList = '';
|
||||
}
|
||||
const options = await getNodeListData(nodeId, 'machine');
|
||||
ref.setOptionsFun('machineId', options);
|
||||
const defaultIndex = 0;
|
||||
@@ -159,7 +164,7 @@ export const setMachineListByPhaseId = async (data: any) => {
|
||||
|
||||
// 根据机台设置工位
|
||||
export const setWorkspaceListByMachineId = async (data: any) => {
|
||||
const { nodeId, formData, ref } = data;
|
||||
const { nodeId, formData = {}, ref } = data;
|
||||
ref.setOptionsFun('workspaceId', []);
|
||||
formData.workspaceId = '';
|
||||
if (!nodeId) {
|
||||
@@ -231,10 +236,21 @@ export const setPMemberName = async (data: any) => {
|
||||
};
|
||||
const res = await queryByDeptAndDisciplineApi(params);
|
||||
if (res.code === 200) {
|
||||
if (res.data[0]) {
|
||||
formData.pMemberName = res.data[0]?.userResp?.nickname || '';
|
||||
formData.pMemberList = res.data[0]?.userId || '';
|
||||
let defaultIndex = -1;
|
||||
if (formData.phaseName) {
|
||||
if (formData.phaseName.indexOf('设计') > -1) {
|
||||
// 设计阶段获取包含设计阶段的确认人
|
||||
defaultIndex = res.data.findIndex((i: any) => i.stage === '设计');
|
||||
} else {
|
||||
// 非设计阶段获取包含非设计阶段的确认人
|
||||
defaultIndex = res.data.findIndex((i: any) => i.stage === '非设计');
|
||||
}
|
||||
}
|
||||
if (res.data[defaultIndex]) {
|
||||
formData.pMemberName = res.data[defaultIndex]?.userResp?.nickname || '';
|
||||
formData.pMemberList = res.data[defaultIndex]?.userId || '';
|
||||
} else {
|
||||
ElMessage.warning('未匹配到确认人,请联系管理员');
|
||||
formData.pMemberName = '';
|
||||
formData.pMemberList = '';
|
||||
}
|
||||
|
||||