去掉taskTable的changeFun
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
:params="searchParams"
|
||||
:api="apiParams"
|
||||
:searchLimitNum="searchLimitNum"
|
||||
@searchChange="changeFun($event, 'search')"
|
||||
@searchChange="changeFun"
|
||||
@load="tableOnLoadFun"
|
||||
:hideSearchKeys="hideSearchKeys"
|
||||
v-bind="$attrs"
|
||||
@@ -150,9 +150,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, onBeforeUnmount, reactive, ref, type PropType } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { getChildrenNodeList } from '../../projectDetail/components/projectApi';
|
||||
// import { getChildrenNodeList } from '../../projectDetail/components/projectApi';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
// import { CommonStore } from '@/stores/common';
|
||||
import attachments from '@/views/task/simulationTask/components/attachments.vue';
|
||||
import { disposeMemberList } from '../../projectDetail/components/project';
|
||||
// import { useDict } from '@/utils/useDict';
|
||||
@@ -237,7 +237,7 @@ const {
|
||||
'DIFFICULTY_COEFFICIENT'
|
||||
);
|
||||
|
||||
const commonStore = CommonStore();
|
||||
// const commonStore = CommonStore();
|
||||
const approveDetailVisible = ref(false);
|
||||
const approveId = ref('');
|
||||
|
||||
@@ -342,7 +342,7 @@ const attachmentsVisible = ref(false);
|
||||
|
||||
const tableRef = ref();
|
||||
|
||||
const tableFormRef = ref();
|
||||
// const tableFormRef = ref();
|
||||
|
||||
const demandInfo = reactive({
|
||||
id: '',
|
||||
@@ -363,54 +363,54 @@ const tableDataqueryFun = () => {
|
||||
tableLoad.value = true;
|
||||
};
|
||||
|
||||
const changeFun = async (val: any, type: string) => {
|
||||
let optionRef: any;
|
||||
if (type === 'search') {
|
||||
optionRef = tableRef.value;
|
||||
} else {
|
||||
optionRef = tableFormRef.value;
|
||||
}
|
||||
if (val.key === 'project') {
|
||||
let nodeType = '';
|
||||
let nextKey = '';
|
||||
let nodeId = '';
|
||||
// if (val.key === 'project') {
|
||||
nodeType = NODE_TYPE.PHASE;
|
||||
nextKey = 'phase';
|
||||
nodeId = val.data.project;
|
||||
projectUuid.value = val.data.project;
|
||||
// }
|
||||
if (val.data.project) {
|
||||
const optionList = await getPhaseList(nodeType, nodeId);
|
||||
optionRef.setOptionsFun(nextKey, optionList);
|
||||
} else {
|
||||
optionRef.setOptionsFun(nextKey, []);
|
||||
optionRef?.setSearchParamsFun({
|
||||
...optionRef?.getSearchParamsFun(),
|
||||
[nextKey]: '',
|
||||
});
|
||||
phaseUuid.value = null;
|
||||
}
|
||||
}
|
||||
const changeFun = async () => {
|
||||
// let optionRef: any;
|
||||
// if (type === 'search') {
|
||||
// optionRef = tableRef.value;
|
||||
// } else {
|
||||
// optionRef = tableFormRef.value;
|
||||
// }
|
||||
// if (val.key === 'project') {
|
||||
// let nodeType = '';
|
||||
// let nextKey = '';
|
||||
// let nodeId = '';
|
||||
// // if (val.key === 'project') {
|
||||
// nodeType = NODE_TYPE.PHASE;
|
||||
// nextKey = 'phase';
|
||||
// nodeId = val.data.project;
|
||||
// projectUuid.value = val.data.project;
|
||||
// // }
|
||||
// if (val.data.project) {
|
||||
// const optionList = await getPhaseList(nodeType, nodeId);
|
||||
// optionRef.setOptionsFun(nextKey, optionList);
|
||||
// } else {
|
||||
// optionRef.setOptionsFun(nextKey, []);
|
||||
// optionRef?.setSearchParamsFun({
|
||||
// ...optionRef?.getSearchParamsFun(),
|
||||
// [nextKey]: '',
|
||||
// });
|
||||
// phaseUuid.value = null;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (val.key === 'phase') {
|
||||
phaseUuid.value = val.data.phase;
|
||||
}
|
||||
if (val.key === 'demandType') {
|
||||
const simTypeList: any = commonStore.getDictData(val.data.demandType);
|
||||
optionRef.setOptionsFun('simType', simTypeList.A);
|
||||
}
|
||||
};
|
||||
const getPhaseList = async (nodeType: string, projectUuid: string) => {
|
||||
let optionList = await getChildrenNodeList(nodeType, projectUuid);
|
||||
optionList = optionList.map((item: any) => {
|
||||
return {
|
||||
label: item.nodeName,
|
||||
value: item.uuid,
|
||||
};
|
||||
});
|
||||
return optionList;
|
||||
// if (val.key === 'phase') {
|
||||
// phaseUuid.value = val.data.phase;
|
||||
// }
|
||||
// if (val.key === 'demandType') {
|
||||
// const simTypeList: any = commonStore.getDictData(val.data.demandType);
|
||||
// optionRef.setOptionsFun('simType', simTypeList.A);
|
||||
// }
|
||||
};
|
||||
// const getPhaseList = async (nodeType: string, projectUuid: string) => {
|
||||
// let optionList = await getChildrenNodeList(nodeType, projectUuid);
|
||||
// optionList = optionList.map((item: any) => {
|
||||
// return {
|
||||
// label: item.nodeName,
|
||||
// value: item.uuid,
|
||||
// };
|
||||
// });
|
||||
// return optionList;
|
||||
// };
|
||||
|
||||
const seeAttachments = (demandId: string) => {
|
||||
attachmentsVisible.value = true;
|
||||
|
||||
Reference in New Issue
Block a user