merge
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { post, get } from '@/api/request';
|
||||
import { userListFormat } from '@/utils/common';
|
||||
|
||||
const env = import.meta.env;
|
||||
const PREFIX = env.VITE_API_PREFIX_SYSTEM;
|
||||
@@ -37,6 +38,11 @@ export const userAddGroupApi = (params: any) => {
|
||||
export const userQueryGroupApi = (params: any) => {
|
||||
return post(`${PREFIX}user/queryGroup`, params);
|
||||
};
|
||||
// 分页获取用户
|
||||
export const listUserDetailPageApi = async (params: any) => {
|
||||
const res = await post(`${PREFIX}user/listUserDetailPage`, params);
|
||||
return userListFormat(res);
|
||||
};
|
||||
|
||||
// 用户组详情
|
||||
export const userQueryGroupDetailApi = (params: any) => {
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
<BaseTable
|
||||
ref="tableRef"
|
||||
:api="disposeQueryWorkApi"
|
||||
:params="{ taskId: taskInfo.uuid, nodeTypeMap: getTagMapList() }"
|
||||
:params="{
|
||||
taskId: taskInfo.uuid,
|
||||
nodeTypeMap: getTagMapList(),
|
||||
type: props.operateType === 'addWork' ? 0 : 1,
|
||||
}"
|
||||
showIndex
|
||||
tableName="CREATE_WORK_TIME"
|
||||
:actionList="actionList"
|
||||
|
||||
@@ -170,6 +170,17 @@ export const resListFormat = (res: any) => {
|
||||
});
|
||||
return res;
|
||||
};
|
||||
// CID用户列表返回数据格式化
|
||||
export const userListFormat = (res: any) => {
|
||||
res?.data?.data?.forEach((item: any) => {
|
||||
item.userId = item.userInfo.userId;
|
||||
item.nickname = item.userInfo.nickname;
|
||||
item.roleListStr = item.roleList.map((item: any) => item.roleName).join(',');
|
||||
item.postListStr = item.postList.map((item: any) => item.postName).join(',');
|
||||
item.deptListStr = item.deptList.map((item: any) => item.deptName).join(',');
|
||||
});
|
||||
return res;
|
||||
};
|
||||
|
||||
const pageStorageData: any = JSON.parse(localStorage.getItem('PAGE_STORAGE_DATA') || '{}');
|
||||
// 设置页面本地存储
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
<template #currentVersion="{ row }">
|
||||
{{ row.currentVersion || row.versions?.[0] || '--' }}
|
||||
</template>
|
||||
<template #iconFile="{ row }">
|
||||
<UploadImg v-model="row.iconFile" :multiple="true" :disabled="true" viewMode="inline" />
|
||||
</template>
|
||||
</BaseTable>
|
||||
<DelPoolModal
|
||||
v-model="delPoolModalVisible"
|
||||
@@ -68,6 +71,7 @@ import { getAllTaskPoolApi } from '@/api/task/taskpool';
|
||||
import { filterExcludeStandardScene } from '@/utils/node';
|
||||
import { jumpPage } from '@/utils/common';
|
||||
import { TABLE_NAME } from '@/utils/enum/tableName';
|
||||
import UploadImg from '@/components/common/uploadImg/index.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const baseTableRef = ref();
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
<div class="page-footer">
|
||||
<el-button type="primary" @click="submitFun" :disabled="isLoading">提交</el-button>
|
||||
<el-button type="" @click="resetFormFun" :disabled="isLoading">重置</el-button>
|
||||
<el-button type="" @click="testSubmitFun">测试提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -284,6 +285,27 @@ const uploadFinishedFun = async (data: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const testSubmitFun = async () => {
|
||||
const params = JSON.parse(localStorage.getItem('SUBMIT_JOB_INFO') as string) || null;
|
||||
if (params) {
|
||||
let res: any;
|
||||
|
||||
try {
|
||||
if (params.type === 'single') {
|
||||
res = await webSubmitApi(params);
|
||||
} else {
|
||||
res = await batchWebSubmitApi(params);
|
||||
}
|
||||
|
||||
if (res && res.code === 200) {
|
||||
ElMessage.success('提交成功');
|
||||
}
|
||||
} catch {}
|
||||
} else {
|
||||
ElMessage.warning('执行参数丢失,请重新提交');
|
||||
}
|
||||
};
|
||||
|
||||
// 切换批量或者单个提交计算模式
|
||||
const typeChangeFun = () => {
|
||||
formData.masterFile = [];
|
||||
|
||||
@@ -243,19 +243,19 @@ const formatNodeAndEdge = (edgeArr: any[], nodeArr: any[]) => {
|
||||
formatItem['extensionElements']['executeConfig'].executeType = 'exportWordScript';
|
||||
}
|
||||
|
||||
formatItem.type = formatItem['extensionElements']['executeConfig'].type;
|
||||
// if (node.nodeTypeValue === FLOW_APP_TYPE.HPC) {
|
||||
// // HPC节点异步回调为true
|
||||
// // formatItem.asyncCallback = true;
|
||||
// // formatItem.waitUser = node.exeMethod === 'serviceTask';
|
||||
// // HPC节点type为serviceTask
|
||||
// formatItem.type = 'serviceTask';
|
||||
// } else {
|
||||
// // 非HPC节点异步回调为false
|
||||
// // formatItem.asyncCallback = false;
|
||||
// // 非HPC节点type为userTask
|
||||
// formatItem.type = 'userTask';
|
||||
// }
|
||||
// formatItem.type = formatItem['extensionElements']['executeConfig'].type;
|
||||
if (node.nodeTypeValue === FLOW_APP_TYPE.HPC) {
|
||||
// HPC节点异步回调为true
|
||||
// formatItem.asyncCallback = true;
|
||||
// formatItem.waitUser = node.exeMethod === 'serviceTask';
|
||||
// HPC节点type为serviceTask
|
||||
formatItem.type = 'serviceTask';
|
||||
} else {
|
||||
// 非HPC节点异步回调为false
|
||||
// formatItem.asyncCallback = false;
|
||||
// 非HPC节点type为userTask
|
||||
formatItem.type = 'userTask';
|
||||
}
|
||||
|
||||
if (node.nodeTypeValue === FLOW_APP_TYPE.SCRIPT_NODE) {
|
||||
formatItem.type = 'serviceTask';
|
||||
|
||||
@@ -531,7 +531,6 @@ export const selectComponents = [
|
||||
// },
|
||||
{
|
||||
label: '上传',
|
||||
|
||||
englishLabel: null,
|
||||
tag: 'el-upload',
|
||||
tagIcon: 'upload',
|
||||
@@ -597,11 +596,12 @@ export const selectComponents = [
|
||||
];
|
||||
export const layoutComponents = [
|
||||
{
|
||||
layout: 'rowFormItem',
|
||||
englishLabel: null,
|
||||
tag: 'el-input',
|
||||
|
||||
tagIcon: 'row',
|
||||
type: 'default',
|
||||
tagType: 'VIEW',
|
||||
tagType: 'INPUT',
|
||||
justify: 'start',
|
||||
align: 'top',
|
||||
label: '行容器',
|
||||
|
||||
117
src/views/system/configuration/components/checkedDataDialog.vue
Normal file
117
src/views/system/configuration/components/checkedDataDialog.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<Dialog
|
||||
v-model="dialogVisible"
|
||||
diaTitle="已选数据列表"
|
||||
:width="'50%'"
|
||||
:height="'80%'"
|
||||
:confirm-closable="false"
|
||||
@close="closeDialog"
|
||||
>
|
||||
<div class="compare-content">
|
||||
<BaseTable
|
||||
v-if="dialogVisible"
|
||||
ref="compareTableRef"
|
||||
showIndex
|
||||
showCheckbox
|
||||
fullHeight
|
||||
table-name="WORKLOAD_CONFIG_TABLE"
|
||||
:hide-pagination="true"
|
||||
:action-list="actionList"
|
||||
@load="tableLoadFun"
|
||||
@checkbox-change="checkboxChangeFun"
|
||||
@checkbox-all="checkboxAllChangeFun"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<el-button :disabled="!selectedRows.length" @click="deleteMultiple">批量删除</el-button>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</div>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
|
||||
interface Props {
|
||||
modelValue: boolean;
|
||||
checkedData: any[];
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: boolean): void;
|
||||
(e: 'data-change', value: any[]): void;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const compareTableRef = ref();
|
||||
const selectedRows = ref<any[]>([]);
|
||||
|
||||
const actionList = ref([
|
||||
{
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
click: (row: any) => {
|
||||
deleteSingle(row);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
dialogVisible.value = val;
|
||||
}
|
||||
);
|
||||
|
||||
watch(dialogVisible, (val) => {
|
||||
emit('update:modelValue', val);
|
||||
});
|
||||
|
||||
const closeDialog = () => {
|
||||
dialogVisible.value = false;
|
||||
};
|
||||
|
||||
const tableLoadFun = () => {
|
||||
compareTableRef.value?.setDataFun(props.checkedData);
|
||||
selectedRows.value = [];
|
||||
};
|
||||
|
||||
const deleteSingle = (data: any) => {
|
||||
const newData = props.checkedData.filter((item: any) => item.userId !== data.userId);
|
||||
emit('data-change', newData);
|
||||
refreshTable();
|
||||
};
|
||||
|
||||
const deleteMultiple = () => {
|
||||
const newData = props.checkedData.filter((item: any) => {
|
||||
return !selectedRows.value.some((selected: any) => selected.userId === item.userId);
|
||||
});
|
||||
emit('data-change', newData);
|
||||
refreshTable();
|
||||
};
|
||||
|
||||
const checkboxChangeFun = () => {
|
||||
selectedRows.value = compareTableRef.value?.tableRef?.getCheckboxRecords();
|
||||
};
|
||||
|
||||
const checkboxAllChangeFun = () => {
|
||||
selectedRows.value = compareTableRef.value?.tableRef?.getCheckboxRecords();
|
||||
};
|
||||
|
||||
const refreshTable = () => {
|
||||
nextTick(() => {
|
||||
compareTableRef.value?.setDataFun(props.checkedData);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.compare-content {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
213
src/views/system/configuration/components/workloadPermission.vue
Normal file
213
src/views/system/configuration/components/workloadPermission.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div class="workload-permission">
|
||||
<DragSplit leftContentWidth="50%" :showToggleBtn="false">
|
||||
<template #left>
|
||||
<div class="left">
|
||||
<div class="table-head">
|
||||
<div class="title">
|
||||
<el-icon class="icon"><Avatar /></el-icon>
|
||||
<span class="tip">负责人</span>
|
||||
<span class="divider">|</span>
|
||||
<span class="text">已选</span>
|
||||
<span class="user-num" @click="showLeftCheckedData">{{
|
||||
leftCheckedData.length
|
||||
}}</span>
|
||||
<span class="text">位</span>
|
||||
</div>
|
||||
<div class="filter">
|
||||
<el-form label-width="auto" @submit.prevent class="demo-form-inline">
|
||||
<el-form-item label="部门:">
|
||||
<el-select
|
||||
v-model="leftParams.deptId"
|
||||
placeholder="请选择要过滤的部门"
|
||||
filterable
|
||||
clearable
|
||||
class="department-select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in groupData"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<BaseTable
|
||||
ref="leftTableRef"
|
||||
showCheckbox
|
||||
tableName="WORKLOAD_CONFIG_TABLE"
|
||||
fullHeight
|
||||
:params="leftParams"
|
||||
:showSetting="false"
|
||||
:api="listUserDetailPageApi"
|
||||
:rowConfig="{
|
||||
keyField: 'userId',
|
||||
}"
|
||||
@checkbox-change="leftChangeFun"
|
||||
@checkbox-all="leftAllChangeFun"
|
||||
@tableDataLoad="leftTableDataLoad"
|
||||
>
|
||||
</BaseTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #right> 34 </template>
|
||||
</DragSplit>
|
||||
<checkedDataDialog
|
||||
v-model="checkTableDataVisible"
|
||||
:checked-data="leftCheckedData"
|
||||
@data-change="handleDataChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, nextTick, onMounted } from 'vue';
|
||||
import DragSplit from '@/components/common/dragSplit/index.vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { userListUserApi } from '@/api/system/user';
|
||||
import checkedDataDialog from './checkedDataDialog.vue';
|
||||
import { userQueryGroupApi, listUserDetailPageApi } from '@/api/system/user';
|
||||
|
||||
// 用户组/部门
|
||||
const groupData = ref<any>([]);
|
||||
const getUserGroup = async () => {
|
||||
const { data } = await userQueryGroupApi({ current: 1, size: 1000 });
|
||||
groupData.value = data?.data || [];
|
||||
};
|
||||
onMounted(() => {
|
||||
getUserGroup();
|
||||
});
|
||||
|
||||
// #region 左侧表格
|
||||
const leftTableRef = ref();
|
||||
const leftParams = ref({
|
||||
deptId: '',
|
||||
});
|
||||
const leftCheckedData = ref<any>([]);
|
||||
// 更新选中数据
|
||||
const leftChangeFun = (data: any) => {
|
||||
if (data.checked) {
|
||||
leftCheckedData.value.push(data.row);
|
||||
} else {
|
||||
leftCheckedData.value = leftCheckedData.value.filter(
|
||||
(item: any) => item.userId !== data.row.userId
|
||||
);
|
||||
}
|
||||
};
|
||||
// 更新全选
|
||||
const leftAllChangeFun = (data: any) => {
|
||||
if (data.checked) {
|
||||
leftCheckedData.value = [...leftCheckedData.value, ...leftTableRef.value.tableData];
|
||||
// 根据id去重
|
||||
leftCheckedData.value = leftCheckedData.value.filter(
|
||||
(item: any, index: number, arr: any) =>
|
||||
arr.findIndex((i: any) => i.userId === item.userId) === index
|
||||
);
|
||||
} else {
|
||||
leftCheckedData.value = leftCheckedData.value.filter((item: any) => {
|
||||
return !leftTableRef.value.tableData.some((i: any) => i.userId === item.userId);
|
||||
});
|
||||
}
|
||||
};
|
||||
const leftTableDataLoad = () => {
|
||||
nextTick(() => {
|
||||
const selectedKeys = leftCheckedData.value.map((item: any) => item.userId);
|
||||
leftTableRef.value.tableRef.setCheckboxRowKey(selectedKeys, true); // 设置为选中
|
||||
});
|
||||
};
|
||||
|
||||
const checkTableDataVisible = ref(false);
|
||||
const checkTableData = ref<any>([]);
|
||||
const showLeftCheckedData = () => {
|
||||
checkTableDataVisible.value = true;
|
||||
checkTableData.value = leftCheckedData.value;
|
||||
};
|
||||
|
||||
const handleDataChange = (newData: any[]) => {
|
||||
leftCheckedData.value = newData;
|
||||
// 同步更新左侧表格的选中状态
|
||||
nextTick(() => {
|
||||
leftTableRef.value?.tableRef?.clearCheckboxRow();
|
||||
leftTableDataLoad();
|
||||
});
|
||||
};
|
||||
|
||||
// # endregion
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.workload-permission {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
.left {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.table-head {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-right: 20px;
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
.icon {
|
||||
font-size: 18px;
|
||||
color: var(--el-color-primary);
|
||||
margin-right: 8px;
|
||||
}
|
||||
.tip {
|
||||
font-size: 14px;
|
||||
color: var(--el-text-color-primary);
|
||||
margin-right: 8px;
|
||||
}
|
||||
.divider {
|
||||
color: var(--el-border-color);
|
||||
margin: 0 8px;
|
||||
}
|
||||
.text {
|
||||
font-size: 14px;
|
||||
color: var(--el-text-color-regular);
|
||||
}
|
||||
.user-num {
|
||||
color: var(--el-color-primary);
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
margin: 0 4px;
|
||||
padding: 0px 6px;
|
||||
display: inline-block;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
background: var(--el-color-primary-light-9);
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
background: var(--el-color-primary-light-8);
|
||||
}
|
||||
}
|
||||
}
|
||||
.filter {
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.department-select {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -165,6 +165,7 @@ const initGraph = async () => {
|
||||
autoResize: true,
|
||||
// 画布的最小最大缩放级别
|
||||
scaling: { min: 0.5, max: 3 },
|
||||
mousewheel: true,
|
||||
// grid: true,
|
||||
// width: 800,
|
||||
// height: 800,
|
||||
|
||||
@@ -86,8 +86,8 @@ import {
|
||||
getPurposeList,
|
||||
toggleUrgencyDesc,
|
||||
toggleMaterialNo,
|
||||
disposeFiniteElementDeptMember,
|
||||
setPMemberName,
|
||||
// disposeFiniteElementDeptMember,
|
||||
} from './lib';
|
||||
|
||||
interface Props {
|
||||
@@ -174,7 +174,7 @@ const changeFun = async (cbData: any) => {
|
||||
ref: TableFormRef.value,
|
||||
cbData,
|
||||
});
|
||||
disposeFiniteElementDeptMember(editFormInfo.value, props.deptOptions);
|
||||
// disposeFiniteElementDeptMember(editFormInfo.value, props.deptOptions);
|
||||
}
|
||||
if (['projectId', 'phaseId', 'machineId'].includes(key)) {
|
||||
await setWorkspaceListByMachineId({
|
||||
@@ -206,7 +206,7 @@ const changeFun = async (cbData: any) => {
|
||||
});
|
||||
}
|
||||
if (key === 'simType') {
|
||||
disposeFiniteElementDeptMember(editFormInfo.value, props.deptOptions);
|
||||
// disposeFiniteElementDeptMember(editFormInfo.value, props.deptOptions);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { getChildrenNodeListApi } from '@/api/project/node';
|
||||
import { dataQueryDirApi } from '@/api/data/data';
|
||||
import { queryByDeptAndDisciplineApi } from '@/api/system/departMent';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
|
||||
// 初始化
|
||||
@@ -242,55 +243,76 @@ export const setPMemberName = async (data: any) => {
|
||||
};
|
||||
|
||||
// 处理有限元的确认人
|
||||
export const disposeFiniteElementDeptMember = async (editFormInfo: any, deptList: any[]) => {
|
||||
let pMemberId = '';
|
||||
editFormInfo.pMemberList = '';
|
||||
editFormInfo.pMemberName = '';
|
||||
export const disposeFiniteElementDeptMember = async (data: any) => {
|
||||
const { editFormInfo, deptList } = data;
|
||||
// let pMemberId = '';
|
||||
let pMemberList = '';
|
||||
let pMemberName = '';
|
||||
// editFormInfo.pMemberList = '';
|
||||
// editFormInfo.pMemberName = '';
|
||||
if (!editFormInfo.projectUndertaker) {
|
||||
return '';
|
||||
return {
|
||||
pMemberList,
|
||||
pMemberName,
|
||||
};
|
||||
}
|
||||
if (!editFormInfo.simType) {
|
||||
return {
|
||||
pMemberList,
|
||||
pMemberName,
|
||||
};
|
||||
}
|
||||
const matchingDeptList = deptList.filter((item: any) => {
|
||||
const currentPhaseName = editFormInfo?.selectPhaseName || editFormInfo?.phaseName;
|
||||
// 非设计阶段 走技术中心 设计阶段不走技术中心
|
||||
if (editFormInfo?.selectPhaseName.indexOf('设计') !== -1) {
|
||||
if (currentPhaseName.indexOf('设计') !== -1) {
|
||||
return (
|
||||
item.deptName.startsWith(editFormInfo.projectUndertaker) &&
|
||||
!item.deptName.endsWith('技术中心')
|
||||
item.label.startsWith(editFormInfo.projectUndertaker) && !item.label.endsWith('技术中心')
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
item.deptName.startsWith(editFormInfo.projectUndertaker) &&
|
||||
item.deptName.endsWith('技术中心')
|
||||
item.label.startsWith(editFormInfo.projectUndertaker) && item.label.endsWith('技术中心')
|
||||
);
|
||||
}
|
||||
});
|
||||
if (matchingDeptList.length > 0) {
|
||||
const machDept = matchingDeptList.find((item: any) => {
|
||||
return item.deptName.indexOf(editFormInfo.simType) !== -1;
|
||||
return item.label.indexOf(editFormInfo.simType) !== -1;
|
||||
});
|
||||
if (machDept) {
|
||||
pMemberId = machDept.userId;
|
||||
editFormInfo.pMemberList = machDept.userId + '-' + machDept.deptName;
|
||||
editFormInfo.pMemberName = machDept.userResp.nickname;
|
||||
// pMemberId = machDept.value;
|
||||
pMemberList = machDept.value + '-' + machDept.label;
|
||||
pMemberName = machDept.userName;
|
||||
}
|
||||
}
|
||||
return pMemberId;
|
||||
if (!pMemberName) {
|
||||
ElMessage.warning('未匹配到确认人,请联系管理员进行配置!');
|
||||
}
|
||||
return {
|
||||
pMemberList,
|
||||
pMemberName,
|
||||
};
|
||||
};
|
||||
|
||||
// 处理非有限元的确认人
|
||||
export const disposeNotFiniteElementDeptMember = async (editFormInfo: any, deptList: any[]) => {
|
||||
export const disposeNotFiniteElementDeptMember = async (data: any) => {
|
||||
const { editFormInfo, deptList, simName } = data;
|
||||
let pMemberId = '';
|
||||
editFormInfo.pMemberList = '';
|
||||
editFormInfo.pMemberName = '';
|
||||
if (!editFormInfo.projectUndertaker) {
|
||||
return '';
|
||||
}
|
||||
// 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;
|
||||
if (simName === deptList[index].label) {
|
||||
editFormInfo.pMemberList = deptList[index].value + '-' + deptList[index].label;
|
||||
pMemberId = deptList[index].value;
|
||||
editFormInfo.pMemberName = deptList[index].userName;
|
||||
}
|
||||
}
|
||||
if (!editFormInfo.pMemberName) {
|
||||
ElMessage.warning('未匹配到确认人,请联系管理员进行配置!');
|
||||
}
|
||||
return pMemberId;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user