This commit is contained in:
weibl
2026-02-05 15:43:35 +08:00
7 changed files with 93 additions and 68 deletions

View File

@@ -530,9 +530,13 @@ const actionClickFun = (row: any, action: any, index: number) => {
const { click, needConfirm, confirmTip, confirmTipFun } = action;
if (click) {
if (needConfirm) {
ElMessageBox.confirm(confirmTipFun(row, index) || confirmTip || '确定操作吗?', '提示', {
type: 'warning',
})
ElMessageBox.confirm(
(confirmTipFun && confirmTipFun(row, index)) || confirmTip || '确定操作吗?',
'提示',
{
type: 'warning',
}
)
.then(() => {
click(row, index);
})

View File

@@ -698,9 +698,13 @@ const actionClickFun = (row: any, action: any, index: number) => {
const { click, needConfirm, confirmTip, confirmTipFun } = action;
if (click) {
if (needConfirm) {
ElMessageBox.confirm(confirmTipFun(row, index) || confirmTip || '确定操作吗?', '提示', {
type: 'warning',
})
ElMessageBox.confirm(
(confirmTipFun && confirmTipFun(row, index)) || confirmTip || '确定操作吗?',
'提示',
{
type: 'warning',
}
)
.then(() => {
click(row, index);
})

View File

@@ -67,7 +67,7 @@ import { ElMessage } from 'element-plus';
const { t } = useI18n();
const dialogVisible = ref(false);
const formData = ref<any>({});
const flowList = ref<any>([]);
const flowListData = ref<any>([]);
const baseTableRef = ref<any>();
const tableFormRef = ref<any>();
@@ -100,12 +100,7 @@ const opoenFun = (data: any) => {
moduleName,
flowList: flowList.map((item: any) => item.flowCode).join(','),
};
flowList.value = flowList.map((item: any) => {
return {
flowCode: item.value,
flowName: item.label,
};
});
flowListData.value = flowList;
} else {
formData.value = {};
tableFormRef.value?.resetFun();
@@ -118,7 +113,7 @@ const editFun = async () => {
if (valid) {
const params = {
...formData.value,
flowList: flowList.value,
flowList: flowListData.value,
};
let api: any = systemQueryAddApproveFlowMapApi;
if (editId.value) {
@@ -136,7 +131,7 @@ const editFun = async () => {
const changeFun = (data: any) => {
if (data.key === 'flowList') {
flowList.value = data.val?.map((item: any) => {
flowListData.value = data.val?.map((item: any) => {
return {
flowCode: item.value,
flowName: item.label,

View File

@@ -5,6 +5,7 @@
<div class="dir-content">
<div class="table-box">
<BaseTable
v-if="tableShow"
showIndex
ref="baseTableRef"
:tableName="tableName"
@@ -19,16 +20,13 @@
:show-setting="false"
>
<template #leftOptions>
<el-button @click="ArchiveRunDataFun">归档</el-button>
<el-button @click="openFun">上传</el-button>
</template>
</BaseTable>
</div>
<!-- <div class="operate-box">
<el-button @click="openFun">上传</el-button>
<el-button @click="ArchiveRunDataFun">归档</el-button>
</div> -->
</div>
@@ -528,31 +526,37 @@ const reloadFun = () => {
}
};
const tableName = ref('RUN_RESULT_REPORT_TABLE');
const tableShow = ref(false);
const fileType = ref(FILE_TYPE.PNG_FILE);
const runResultDirChangeFun = () => {
const name = runDirNameList.value.find((item: any) => {
return item.id === currentDirName.value;
})?.name;
tableShow.value = false;
nextTick(() => {
const name = runDirNameList.value.find((item: any) => {
return item.id === currentDirName.value;
})?.name;
if (name === '图片结果') {
tableName.value = 'RUN_RESULT_IMAGE_TABLE';
keyResultType.value = '1';
accept.value = '.jpg,.jpeg,.png,.gif';
fileType.value = FILE_TYPE.PNG_FILE;
}
if (name === '曲线结果') {
tableName.value = 'RUN_RESULT_CANVAS_TABLE';
keyResultType.value = '2';
accept.value = '.csv';
fileType.value = FILE_TYPE.CANVAS_FILE;
}
if (name === '报告结果') {
tableName.value = 'RUN_RESULT_REPORT_TABLE';
keyResultType.value = '3';
accept.value = '.ppt(x),.pptx,.doc(x),.docx,.pdf';
fileType.value = FILE_TYPE.REPORT_FILE;
}
if (name === '图片结果') {
tableName.value = 'RUN_RESULT_IMAGE_TABLE';
keyResultType.value = '1';
accept.value = '.jpg,.jpeg,.png,.gif';
fileType.value = FILE_TYPE.PNG_FILE;
tableShow.value = true;
}
if (name === '曲线结果') {
tableName.value = 'RUN_RESULT_CANVAS_TABLE';
keyResultType.value = '2';
accept.value = '.csv';
fileType.value = FILE_TYPE.CANVAS_FILE;
tableShow.value = true;
}
if (name === '报告结果') {
tableName.value = 'RUN_RESULT_REPORT_TABLE';
keyResultType.value = '3';
accept.value = '.ppt(x),.pptx,.doc(x),.docx,.pdf';
fileType.value = FILE_TYPE.REPORT_FILE;
tableShow.value = true;
}
});
};
const accept = ref<any>('.ppt(x),.pptx,.doc(x),.docx,.pdf');

View File

@@ -19,9 +19,10 @@
:show-setting="false"
></taskPerformance>
</div>
<div class="dir-content" v-else-if="runDirNameList.length && currentDirName">
<div class="dir-content" v-else-if="runDirNameList.length && currentDirName != 'performance'">
<div class="table-box">
<BaseTable
v-if="tableShow"
showIndex
ref="baseTableRef"
:tableName="tableName"
@@ -555,31 +556,36 @@ const reloadFun = () => {
}
};
const tableName = ref('RUN_RESULT_IMAGE_TABLE');
const tableShow = ref(false);
const fileType = ref(FILE_TYPE.PNG_FILE);
const runResultDirChangeFun = () => {
const name = runDirNameList.value.find((item: any) => {
return item.id === currentDirName.value;
})?.name;
if (name === '图片结果') {
tableName.value = 'RUN_RESULT_IMAGE_TABLE';
apiParam.value.keyResultType = '1';
accept.value = '.jpg,.jpeg,.png,.gif';
fileType.value = FILE_TYPE.PNG_FILE;
}
if (name === '曲线结果') {
tableName.value = 'RUN_RESULT_CANVAS_TABLE';
apiParam.value.keyResultType = '2';
accept.value = '.csv';
fileType.value = FILE_TYPE.CANVAS_FILE;
}
if (name === '报告结果') {
tableName.value = 'RUN_RESULT_REPORT_TABLE';
apiParam.value.keyResultType = '3';
accept.value = '.ppt(x),.pptx,.doc(x),.docx,.pdf';
fileType.value = FILE_TYPE.REPORT_FILE;
}
tableShow.value = false;
nextTick(() => {
const name = runDirNameList.value.find((item: any) => {
return item.id === currentDirName.value;
})?.name;
if (name === '图片结果') {
tableName.value = 'RUN_RESULT_IMAGE_TABLE';
apiParam.value.keyResultType = '1';
accept.value = '.jpg,.jpeg,.png,.gif';
fileType.value = FILE_TYPE.PNG_FILE;
tableShow.value = true;
}
if (name === '曲线结果') {
tableName.value = 'RUN_RESULT_CANVAS_TABLE';
apiParam.value.keyResultType = '2';
accept.value = '.csv';
fileType.value = FILE_TYPE.CANVAS_FILE;
tableShow.value = true;
}
if (name === '报告结果') {
tableName.value = 'RUN_RESULT_REPORT_TABLE';
apiParam.value.keyResultType = '3';
accept.value = '.ppt(x),.pptx,.doc(x),.docx,.pdf';
fileType.value = FILE_TYPE.REPORT_FILE;
tableShow.value = true;
}
});
};
const accept = ref<any>('.jpg,.jpeg,.png,.gif');

View File

@@ -419,6 +419,14 @@ const submitFun = async () => {
}
}
};
emitter.on('UPLOAD_FINISHED', () => {
reloadFun();
});
const reloadFun = async () => {
if (baseTableRef.value) {
await baseTableRef.value.resetFun();
}
};
const updateTaskExeStatusFun = async () => {
const task = cloneDeep(props.taskInfo);

View File

@@ -346,12 +346,16 @@ const deleteNodeFun = async (row: IProjectInfo) => {
};
const actionClickFun = (row: any, action: any) => {
const { click, needConfirm, confirmTip } = action;
const { click, needConfirm, confirmTip, confirmTipFun } = action;
if (click) {
if (needConfirm) {
ElMessageBox.confirm(confirmTip || '确定操作吗?', '提示', {
type: 'warning',
})
ElMessageBox.confirm(
(confirmTipFun && confirmTipFun(row)) || confirmTip || '确定操作吗?',
'提示',
{
type: 'warning',
}
)
.then(() => {
click(row);
})