修复bug
This commit is contained in:
@@ -81,6 +81,7 @@ import { getTagMapList } from '@/utils/task';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { PROJECT_EXE_STATUS_CODE } from '@/utils/enum/project';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean;
|
||||
@@ -189,6 +190,9 @@ const editNode = async (projectForm: any) => {
|
||||
// };
|
||||
// });
|
||||
// }
|
||||
if (projectForm.exeStatus === PROJECT_EXE_STATUS_CODE.COMPLETED) {
|
||||
projectForm.finishTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
const res: any = await editNodeApi({ editNodeList: [{ ...projectForm }] });
|
||||
if (res && res.code === 200) {
|
||||
ElMessage.success('编辑项目成功');
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
justify-content: center;
|
||||
margin-bottom: 12px;
|
||||
font-weight: bold;
|
||||
background-color: #F5F7FA;
|
||||
background-color: #f5f7fa;
|
||||
padding: 5px 0;
|
||||
span {
|
||||
margin: 0 20px;
|
||||
@@ -45,12 +45,14 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-panel, .right-panel {
|
||||
.left-panel,
|
||||
.right-panel {
|
||||
flex: 1;
|
||||
// margin-right: 16px;
|
||||
width: calc(50% - 32px);
|
||||
}
|
||||
.left-table, .right-table{
|
||||
.left-table,
|
||||
.right-table {
|
||||
height: calc(100% - 48px);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -1094,7 +1094,7 @@ onMounted(async () => {
|
||||
width: 100%;
|
||||
}
|
||||
.el-form-item__content {
|
||||
width: 120px;
|
||||
width: 140px;
|
||||
}
|
||||
}
|
||||
.right-panel {
|
||||
|
||||
@@ -10,10 +10,20 @@
|
||||
>
|
||||
<TableForm
|
||||
:data="demandInfo"
|
||||
:show-disabled="true"
|
||||
ref="tableFormRef"
|
||||
tableName="SIMULATION_TASK_DEMAND_CREATE"
|
||||
:colNum="2"
|
||||
:hideKeys="['attachments']"
|
||||
>
|
||||
<template #form-downAttachments>
|
||||
<div class="attachments">
|
||||
<div class="file" v-for="item in attachmentFiles" :key="item.id">
|
||||
<span>{{ item.name }}</span>
|
||||
<el-icon @click="downloadFileById(item.id)"><Download /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</TableForm>
|
||||
<template #footer>
|
||||
<div>
|
||||
@@ -31,6 +41,8 @@ import { computed, ref, watch } from 'vue';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import { getDemandDetailApi } from '@/api/project/demand';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import { dataQueryDirApi } from '@/api/data/data';
|
||||
import { downloadFileById } from '@/utils/file';
|
||||
|
||||
const props = defineProps<{
|
||||
showDialog: boolean;
|
||||
@@ -66,12 +78,27 @@ const getDemandInfo = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const attachmentFiles = ref<any[]>([]);
|
||||
|
||||
const getAttachments = async () => {
|
||||
const res: any = await dataQueryDirApi({ uuid: props.demandUid, current: 1, size: 99 });
|
||||
attachmentFiles.value =
|
||||
res.data?.data?.map((item: { originalName: any; fileSize: any; id: number }) => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
size: item.fileSize,
|
||||
id: item.id,
|
||||
};
|
||||
}) || [];
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.demandUid,
|
||||
(val) => {
|
||||
console.log('val', val);
|
||||
if (val) {
|
||||
getDemandInfo();
|
||||
getAttachments();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -80,4 +107,19 @@ watch(
|
||||
.table-box {
|
||||
height: 60vh;
|
||||
}
|
||||
.attachments {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
overflow-y: auto;
|
||||
.file {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.el-icon {
|
||||
color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="closeSendFun">取消</el-button>
|
||||
<el-button type="primary" @click="sendTaskConfirmFun">确认</el-button>
|
||||
<el-button :loading="loadingInterface" type="primary" @click="sendTaskConfirmFun">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
ref="exeTableRef"
|
||||
tableName="SIMULATION_TASK_SEND_LIST"
|
||||
:params="{ type: 3 }"
|
||||
:actionsWidth="tableActionsLength['2-2']"
|
||||
exportFileName="我分发的任务列表"
|
||||
:action-list="actionList"
|
||||
>
|
||||
<template #tableActions="{ row }">
|
||||
<div class="gl-table-actions">
|
||||
@@ -50,7 +50,9 @@
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="closeFun">取消</el-button>
|
||||
<el-button type="primary" @click="confirmFun">确认</el-button>
|
||||
<el-button v-loading="loadingInterface" type="primary" @click="confirmFun"
|
||||
>确认</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
@@ -86,6 +88,26 @@ const tableFormRef = ref();
|
||||
const closeFun = () => {
|
||||
formVisible.value = false;
|
||||
};
|
||||
|
||||
const actionList = ref([
|
||||
{
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
click: (row: any) => {
|
||||
editTaskFun(row);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
needConfirm: true,
|
||||
confirmTip: '确认删除吗?',
|
||||
click: (row: any) => {
|
||||
deleteTaskFun(row.uuid);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const editRow = ref();
|
||||
const editTaskFun = (row: any) => {
|
||||
formVisible.value = true;
|
||||
|
||||
@@ -129,7 +129,7 @@ const visibleDialog = async (visible: boolean, row?: any) => {
|
||||
id: item.id,
|
||||
};
|
||||
}) || [];
|
||||
oldAttachments.value = row.attachments;
|
||||
oldAttachments.value = [...row.attachments];
|
||||
let phaseList = [];
|
||||
if (row.phaseId) {
|
||||
phaseList = await getChildrenNodeList(NODE_TYPE.PHASE, row.projectId);
|
||||
@@ -144,6 +144,8 @@ const visibleDialog = async (visible: boolean, row?: any) => {
|
||||
if (row.simType) {
|
||||
simList = commonStore.getDictData(row.demandType);
|
||||
}
|
||||
row.planTime = [row.beginTime, row.endTime];
|
||||
|
||||
nextTick(() => {
|
||||
console.log('tableFormRef.value', tableFormRef.value);
|
||||
console.log('simList.A', simList);
|
||||
|
||||
Reference in New Issue
Block a user