@@ -177,6 +177,12 @@
:params="delParams"
@confirm="deleteConfirmFun"
/>
+
{
- // console.log('node', node);
if (node.level === 0) {
const data = props.pageType ? props.pageParams : node.data;
const listData: any = await getSimulationParameterTreeDAtaFun(data);
@@ -439,6 +445,7 @@ const deleteConfirmFun = () => {
};
const deleteParamFun = async (flag: any, row?: any) => {
+ currentNode.value = { ...row };
// 如果删除的是参数,要走审批流程
if (flag === 'param') {
delParams.value = {
@@ -460,7 +467,6 @@ const deleteParamFun = async (flag: any, row?: any) => {
delParams.value = {
type: row.type,
id: row.id,
- isApprove: false,
};
approveDelShow.value = true;
} else {
@@ -475,8 +481,9 @@ const deleteParamFun = async (flag: any, row?: any) => {
}
).then(async () => {
const res: any = await deleteSimulationParameterApi({
- type: currentNode.value.type,
- id: currentNode.value.id,
+ type: row.type,
+ id: row.id,
+ isApprove: false,
});
if (res && res.code === 200) {
ElMessage.success('删除成功!');
@@ -489,18 +496,23 @@ const deleteParamFun = async (flag: any, row?: any) => {
}
};
+const updateParams = ref({});
+const approveUpdateShow = ref(false);
const updateParamFun = () => {
- // dzh todo 增加审批
- const params = {
+ // 增加审批
+ updateParams.value = {
fileId: currentNode.value.fileId,
parameterList: newParamTableData.value,
};
- updateSimulationParameterValuesApi(params).then((res: any) => {
- if (res.code === 200) {
- ElMessage.success('操作成功');
- currentChangeFun(currentNode.value);
- }
- });
+ approveUpdateShow.value = true;
+};
+const updateConfirmFun = () => {
+ currentChangeFun(currentNode.value);
+ const node = libTreeRef.value.getNode(currentNode.value.nodeKey);
+ // 参数对象节点 更新审批状态为删除中
+ if (node && node?.data?.type === 3) {
+ node.data.approveType = 2;
+ }
};
const openParamFun = () => {
diff --git a/src/views/task/projectDetail/index.vue b/src/views/task/projectDetail/index.vue
index 47f4c393..4739896a 100644
--- a/src/views/task/projectDetail/index.vue
+++ b/src/views/task/projectDetail/index.vue
@@ -131,6 +131,7 @@
diff --git a/src/views/task/projectList/components/taskDialog.vue b/src/views/task/projectList/components/taskDialog.vue
index 5bc592c2..eeb1e09f 100644
--- a/src/views/task/projectList/components/taskDialog.vue
+++ b/src/views/task/projectList/components/taskDialog.vue
@@ -314,7 +314,7 @@ import { getFormConfigureApi } from '@/api/system/systemData';
import { NODE_TYPE, getTagKeyMap, tagSortList } from '@/utils/enum/node';
import nodeLevel2Select from '@/components/project/nodeLevel2Select.vue';
import { getTaskTreeFun } from '../../projectDetail/components/projectApi';
-import { disposeTagKey } from '../../projectDetail/components/project';
+import { disposeTagKey, getIdMap } from '../../projectDetail/components/project';
import { disposeTaskMembers, getTagMapList } from '@/utils/task';
import { modifyNodeTaskPerformanceApi, modifyWithApproveAPi } from '@/api/project/node';
import { TASK_CALCULATE_STATUS, TASK_PROCESS_STATUS } from '@/utils/enum/task';
@@ -328,6 +328,7 @@ import TableForm from '@/components/common/table/tableForm.vue';
import { CommonStore } from '@/stores/common';
import AddApprove from '@/views/competenceCenter/condition/components/addApprove.vue';
import { queryDesignVersionsApi } from '@/api/project/project';
+import { getSeeDisciplines } from '@/tenants/lyric/views/task/lyricTask';
const commonStore = CommonStore();
@@ -872,6 +873,15 @@ const onAddApproveConfirmFun = async (formData: any) => {
phaseName: currentPhaseInfo?.nodeName || '',
};
+ const getTaskTreeReq = {
+ projectNodeId: props.nodeLevel1Uuid,
+ phaseNodeId: nodeLevel2Uuid.value,
+ idMap: getIdMap(props.nodeLevel1Uuid, nodeLevel2Uuid.value),
+ tagMap: getTagMapList(),
+ filterDiscipline: getSeeDisciplines(),
+ queryTaskFlag: 0,
+ };
+
const param = {
addNodeList: approveParam.value.insertTreeList,
editNodeList: approveParam.value.updateList,
@@ -882,6 +892,7 @@ const onAddApproveConfirmFun = async (formData: any) => {
phaseNodeId: nodeLevel2Uuid.value,
approvePreviewInfo,
...formData,
+ getTaskTreeReq,
};
try {