fix:buf修复,任务详情弹窗修改

This commit is contained in:
2026-01-15 09:34:35 +08:00
parent 51cf50c054
commit 7e4c9084ef
7 changed files with 43 additions and 44 deletions

View File

@@ -77,7 +77,7 @@
></taskReport> ></taskReport>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="验结果" name="experiment"> <el-tab-pane label="验结果" name="experiment">
<experimentResult <experimentResult
v-if="activeTab === 'experiment'" v-if="activeTab === 'experiment'"
:task-info="currentTaskInfo" :task-info="currentTaskInfo"
@@ -93,7 +93,7 @@
</div> </div>
</el-tab-pane> --> </el-tab-pane> -->
</el-tabs> </el-tabs>
<div class="approval-button" v-if="taskInfo.status != 3"> <div class="approval-button" v-if="taskInfo.status != 3 && showApproval">
<el-button type="primary" @click="addApproveFun">发起评审</el-button> <el-button type="primary" @click="addApproveFun">发起评审</el-button>
</div> </div>
</div> </div>
@@ -175,6 +175,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true, default: true,
}, },
showApproval: {
type: Boolean,
default: true,
},
}); });
const dialogVisible = ref(true); const dialogVisible = ref(true);

View File

@@ -37,28 +37,27 @@
</template> </template>
</el-dropdown> </el-dropdown>
<Avatar <img
class="Avatar-style" class="gl-pointer-class"
@click="goProjectDetailFun(project.uuid, project.nodeName)"
v-if="project.detailImgUrl" v-if="project.detailImgUrl"
:fileId="project.detailImgUrl" @click="goProjectDetailFun(project.uuid, project.nodeName)"
></Avatar> :src="getImgPathFun(project.detailImgUrl)"
<template v-else> alt=""
<img />
class="gl-pointer-class" <img
v-if="(index as number) % 2 !== 0" class="gl-pointer-class"
@click="goProjectDetailFun(project.uuid, project.nodeName)" v-else-if="(index as number) % 2 !== 0"
src="@/assets/imgs/projectList/project-blue.png" @click="goProjectDetailFun(project.uuid, project.nodeName)"
alt="" src="@/assets/imgs/projectList/project-blue.png"
/> alt=""
<img />
class="gl-pointer-class" <img
v-else class="gl-pointer-class"
@click="goProjectDetailFun(project.uuid, project.nodeName)" v-else
src="@/assets/imgs/projectList/project-green.png" @click="goProjectDetailFun(project.uuid, project.nodeName)"
alt="" src="@/assets/imgs/projectList/project-green.png"
/> alt=""
</template> />
<div class="bottom-box"> <div class="bottom-box">
<span <span
@@ -170,7 +169,6 @@ import { ElMessageBox } from 'element-plus';
import { PROJECT_EXE_STATUS_CODE } from '@/utils/enum/project'; import { PROJECT_EXE_STATUS_CODE } from '@/utils/enum/project';
// import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant'; // import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
// import { getUserId, getUserTenantId } from '@/utils/user'; // import { getUserId, getUserTenantId } from '@/utils/user';
import Avatar from '@/components/common/avatar/index.vue';
export interface IUserInfo { export interface IUserInfo {
id: number; id: number;
@@ -202,6 +200,7 @@ interface IProjectInfo {
actualEndTime: string; actualEndTime: string;
description: string; description: string;
} }
const env = import.meta.env;
const actionList = ref<any>([ const actionList = ref<any>([
{ {
@@ -396,6 +395,14 @@ const actionClickFun = (row: any, action: any) => {
// ElMessage.error(res.message || '同步失败'); // ElMessage.error(res.message || '同步失败');
// } // }
// }; // };
const getImgPathFun = (fileId: any) => {
let url: any = '';
if (fileId) {
url = `${env.VITE_API_IMAGE_PREVIEW_URL}/data/previewImage?fileId=${fileId}`;
}
return url;
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -693,9 +700,4 @@ const actionClickFun = (row: any, action: any) => {
background-color: #fae4e5; background-color: #fae4e5;
color: #d8232a; color: #d8232a;
} }
.Avatar-style {
position: relative;
z-index: -1;
}
</style> </style>

View File

@@ -17,6 +17,7 @@
:taskId="currentTaskInfo.id" :taskId="currentTaskInfo.id"
:currentTaskInfo="currentTaskInfo" :currentTaskInfo="currentTaskInfo"
@closeFn="showTaskDetailDialog = false" @closeFn="showTaskDetailDialog = false"
:showApproval="false"
@updateFn="updateTaskInfoFun" @updateFn="updateTaskInfoFun"
> >
</taskDetail> </taskDetail>

View File

@@ -15,6 +15,7 @@
v-if="showTaskDetailDialog" v-if="showTaskDetailDialog"
:taskId="currentTaskInfo.id" :taskId="currentTaskInfo.id"
:currentTaskInfo="currentTaskInfo" :currentTaskInfo="currentTaskInfo"
:showApproval="false"
@closeFn="showTaskDetailDialog = false" @closeFn="showTaskDetailDialog = false"
@updateFn="updateTaskInfoFun" @updateFn="updateTaskInfoFun"
> >

View File

@@ -11,6 +11,7 @@
:api="demandListApi" :api="demandListApi"
exportFileName="我确认的需求" exportFileName="我确认的需求"
:actionList="actionList" :actionList="actionList"
@show="sendTaskFun"
> >
<template #leftOptions> <template #leftOptions>
<el-button <el-button

View File

@@ -40,6 +40,7 @@
:taskId="currentTaskInfo.id" :taskId="currentTaskInfo.id"
:currentTaskInfo="currentTaskInfo" :currentTaskInfo="currentTaskInfo"
@closeFn="showTaskDetailDialog = false" @closeFn="showTaskDetailDialog = false"
:show-task-info="false"
@updateFn="updateTaskInfoFun" @updateFn="updateTaskInfoFun"
> >
</TaskDetail> </TaskDetail>

View File

@@ -61,16 +61,6 @@
</div> </div>
</template> </template>
</Dialog> </Dialog>
<taskDetail
v-if="showTaskDetailDialog"
:taskId="currentTaskInfo.id"
:currentTaskInfo="currentTaskInfo"
:show-footer="false"
:show-task-info="false"
@closeFn="showTaskDetailDialog = false"
>
</taskDetail>
</div> </div>
<attachments :demandId="demandInfo.uuid" v-model:visible="attachmentsVisible"></attachments> <attachments :demandId="demandInfo.uuid" v-model:visible="attachmentsVisible"></attachments>
</template> </template>
@@ -94,7 +84,6 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
import { syncDemandList } from '../taskPage'; import { syncDemandList } from '../taskPage';
import { getChildrenNodeListApi } from '@/api/project/node'; import { getChildrenNodeListApi } from '@/api/project/node';
import type { Options } from '@/types'; import type { Options } from '@/types';
import taskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
const env = import.meta.env; const env = import.meta.env;
const PREFIX = env.VITE_API_PREFIX_PROJECT; const PREFIX = env.VITE_API_PREFIX_PROJECT;
@@ -115,12 +104,12 @@ const emits = defineEmits(['visibleDialog', 'loadTableForm', 'changeForm']);
const demandParams = ref({ type: 0 }); const demandParams = ref({ type: 0 });
const commonStore = CommonStore(); const commonStore = CommonStore();
const currentTaskInfo = ref({ id: '', uuid: '' });
const showTaskDetailDialog = ref(false);
const showTaskDetailFun = (row: any) => { const showTaskDetailFun = (row: any) => {
showTaskDetailDialog.value = true; // showTaskDetailDialog.value = true;
currentTaskInfo.value = row; // currentTaskInfo.value = row;
visibleDialog(false, row);
}; };
const actionList = ref([ const actionList = ref([
{ {