修复无阶段时的提示
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div class="comp-content">
|
||||
|
||||
<!-- <el-button @click="openTaskDetailDialogFun()">
|
||||
测试打开任务详情
|
||||
</el-button> -->
|
||||
@@ -10,13 +9,15 @@
|
||||
:data="tableList"
|
||||
readonly
|
||||
:loading="tableLoading"
|
||||
:specialActionList="[{
|
||||
title: '查看详情',
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
openTaskDetailDialogFun(row);
|
||||
:specialActionList="[
|
||||
{
|
||||
title: '查看详情',
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
openTaskDetailDialogFun(row);
|
||||
},
|
||||
},
|
||||
}]"
|
||||
]"
|
||||
>
|
||||
<template #otherLeftOptions>
|
||||
<el-form label-width="60">
|
||||
@@ -43,7 +44,6 @@
|
||||
@click="openTaskDetailDialogFun(row)"
|
||||
>查看详情</el-button>
|
||||
</template> -->
|
||||
|
||||
</loadCaseTable>
|
||||
|
||||
<!-- <loadcase-pro-table
|
||||
@@ -118,6 +118,8 @@ const props = defineProps<{
|
||||
projectUuid: string;
|
||||
}>();
|
||||
|
||||
const emits = defineEmits(['getPhaseList']);
|
||||
|
||||
const tableList = ref<any[]>([]);
|
||||
const tableLoading = ref(false);
|
||||
const phaseUuid = ref<any>('');
|
||||
@@ -165,9 +167,11 @@ const getPhaseListApi = async () => {
|
||||
// console.log('nodeLevel2ListOptions', nodeLevel2ListOptions.value);
|
||||
if (phaseListOptions.value.length) {
|
||||
// 没选中阶段 或者 选中了阶段但是不在阶段列表中
|
||||
if (!phaseListOptions.value.some(item => {
|
||||
return phaseUuid.value === item.value;
|
||||
})) {
|
||||
if (
|
||||
!phaseListOptions.value.some((item) => {
|
||||
return phaseUuid.value === item.value;
|
||||
})
|
||||
) {
|
||||
phaseUuid.value = phaseListOptions.value[0].value;
|
||||
updatePhaseUuid(phaseListOptions.value[0].value);
|
||||
}
|
||||
@@ -175,6 +179,7 @@ const getPhaseListApi = async () => {
|
||||
} else {
|
||||
phaseListOptions.value = [];
|
||||
}
|
||||
emits('getPhaseList', phaseListOptions.value.length);
|
||||
};
|
||||
|
||||
const showTaskDetailDialog = ref(false);
|
||||
@@ -188,14 +193,14 @@ const openTaskDetailDialogFun = (row?: any) => {
|
||||
showTaskDetailDialog.value = true;
|
||||
};
|
||||
|
||||
const updateTaskInfoFun = async (info:any) => {
|
||||
const { flag, data }:any = info;
|
||||
const updateTaskInfoFun = async (info: any) => {
|
||||
const { flag, data }: any = info;
|
||||
|
||||
console.log(flag, 'flag');
|
||||
console.log(data, 'data');
|
||||
|
||||
if (flag === 'info') {
|
||||
const res:any = await modifyNodeTaskPerformanceApi({
|
||||
const res: any = await modifyNodeTaskPerformanceApi({
|
||||
addNodeList: [],
|
||||
editNodeList: [data],
|
||||
deleteNodeList: [],
|
||||
@@ -209,7 +214,6 @@ const updateTaskInfoFun = async (info:any) => {
|
||||
}
|
||||
|
||||
showTaskDetailDialog.value = false;
|
||||
|
||||
};
|
||||
|
||||
const refreshPhaseList = () => {
|
||||
@@ -242,11 +246,10 @@ defineExpose({
|
||||
refreshPhaseList,
|
||||
getTaskTreeList,
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.export-btn {
|
||||
margin-right: var(--margin-small)
|
||||
margin-right: var(--margin-small);
|
||||
}
|
||||
.comp-content {
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user