merge
This commit is contained in:
@@ -96,7 +96,7 @@ import {
|
||||
} from '@/api/system/application';
|
||||
import appNameBg from '@/views/task/appCenter/components/appNameBg.vue';
|
||||
import { getDictionaryDataApi } from '@/api/system/systemData';
|
||||
import { getUserId } from '@/utils/user';
|
||||
import { getUserData, getUserId } from '@/utils/user';
|
||||
import appUseChart from './components/appUseChart.vue';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
@@ -304,6 +304,7 @@ const updateAppInfoFun = async (data: any) => {
|
||||
machineCode: localStorage.getItem('USER_UUID'),
|
||||
comment: data.comment || '',
|
||||
creator: getUserId() || '',
|
||||
creatorName: getUserData()?.nickname || '',
|
||||
};
|
||||
|
||||
const res: any = await addApplicationApi(param);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
showCheckbox
|
||||
:api="listRecycleBinApi"
|
||||
:actionList="actionList"
|
||||
:default-actions="[]"
|
||||
:default-actions="['preview']"
|
||||
@checkbox-all="checkboxChangeFun"
|
||||
@checkbox-change="checkboxChangeFun"
|
||||
>
|
||||
|
||||
@@ -126,7 +126,7 @@ const tableData = ref<any>({
|
||||
type: 'table',
|
||||
key: '数值结果表',
|
||||
value: [],
|
||||
head: ['序号', '指标名称', '指标编号', '分析值', '达标方式', '目标值', '单位'],
|
||||
head: ['序号', '指标名称', '指标编号', '分析值', '达成状态', '达标方式', '目标值', '单位'],
|
||||
});
|
||||
const tableData2 = ref<any>({
|
||||
type: 'table',
|
||||
@@ -216,9 +216,10 @@ const tableDataFun = (list: any) => {
|
||||
index: i + 1,
|
||||
nodeName: perofrmances[i].nodeName,
|
||||
nodeCode: perofrmances[i].nodeCode,
|
||||
targetValue: perofrmances[i].targetValue,
|
||||
resultValue: perofrmances[i].resultValue,
|
||||
completeStatus: getCompleteStatusNameFun(perofrmances[i].completeStatus),
|
||||
method: perofrmances[i].method,
|
||||
highValue: perofrmances[i].highValue,
|
||||
targetValue: perofrmances[i].targetValue,
|
||||
unit: perofrmances[i].unit,
|
||||
};
|
||||
tableData.value.value.push(obj);
|
||||
@@ -389,6 +390,11 @@ const updatePngFun = async (id: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getCompleteStatusNameFun = (status: any) => {
|
||||
const names = ['未分析', '合格', '不合格'];
|
||||
return names[status] || names[0];
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.runIfno,
|
||||
async (newVal) => {
|
||||
|
||||
@@ -891,7 +891,7 @@ const getNodeFileIdAndNames = async () => {
|
||||
const dirId = flowNodeData.value.userParams.inputDirId;
|
||||
const fileIds: any = [];
|
||||
const fileNames: any = [];
|
||||
let taskCmdParam: any = {};
|
||||
const taskCmdParam: any = {};
|
||||
|
||||
// 本地应用执行的脚本也需要下载下来
|
||||
if (flowNodeParamData.value?.postScripts?.length) {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:show-setting="false"
|
||||
></taskPerformance>
|
||||
</div>
|
||||
<div class="dir-content" v-else-if="runDirNameList.length && currentDirName != 'performance'">
|
||||
<div class="dir-content" v-else>
|
||||
<div class="table-box">
|
||||
<BaseTable
|
||||
v-if="tableShow"
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
:show-setting="false"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<el-button type="" @click="asyncFileFun">归档</el-button>
|
||||
<el-upload :show-file-list="false" :before-upload="beforeUploadFun">
|
||||
<el-button>上传</el-button>
|
||||
<el-button class="ml10" type="primary">上传</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" class="ml10" @click="downLoadFileFun">下载</el-button>
|
||||
<el-button type="danger" @click="deleteFileFun">删除</el-button>
|
||||
@@ -42,19 +43,47 @@
|
||||
</div> -->
|
||||
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" />
|
||||
<Dialog
|
||||
v-model="showSyncFileTypeSelectFlag"
|
||||
diaTitle="文件归档"
|
||||
:width="'20%'"
|
||||
:height="'30%'"
|
||||
:confirm-closable="false"
|
||||
>
|
||||
<div class="form-content">
|
||||
<el-form :model="formData">
|
||||
<el-form-item label="文件类型">
|
||||
<el-select v-model="formData.fileType">
|
||||
<el-option
|
||||
v-for="item in fileTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="cancalFun">取消</el-button>
|
||||
<el-button @click="submitFun" type="primary">确定</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { queryRunDirApi, uploadRunFilesApi } from '@/api/project/run';
|
||||
import { queryRunDirApi, syncKeyResultToTaskApi, uploadRunFilesApi } from '@/api/project/run';
|
||||
import { downloadFileById, downloadFileByStream, fileUploadAllocationTypeFun } from '@/utils/file';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import { formatFileSize } from '@/utils/file';
|
||||
import emitter from '@/utils/eventBus';
|
||||
import { dataDelFileApi } from '@/api/data/data';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
|
||||
const props = defineProps({
|
||||
nodeInfo: {
|
||||
@@ -67,6 +96,12 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const baseTableRef = ref();
|
||||
const showSyncFileTypeSelectFlag = ref(false);
|
||||
const formData = reactive<any>({
|
||||
fileType: '',
|
||||
});
|
||||
const { ALL_FILE_TYPE }: any = useDict('ALL_FILE_TYPE');
|
||||
const fileTypeList = ref<any>(ALL_FILE_TYPE.value['A']);
|
||||
const beforeUploadFun = async (file: any) => {
|
||||
if (!props.fileId) {
|
||||
return;
|
||||
@@ -185,6 +220,46 @@ const actionList = ref([
|
||||
},
|
||||
]);
|
||||
|
||||
// 归档算例下文件到工况下
|
||||
const syncFiles = ref<any>([]);
|
||||
const asyncFileFun = () => {
|
||||
syncFiles.value = baseTableRef.value.tableRef.getCheckboxRecords() || [];
|
||||
formData.fileType = '';
|
||||
if (syncFiles.value?.length) {
|
||||
showSyncFileTypeSelectFlag.value = true;
|
||||
} else {
|
||||
ElMessage.warning('请选择文件进行归档');
|
||||
}
|
||||
};
|
||||
|
||||
const cancalFun = () => {
|
||||
showSyncFileTypeSelectFlag.value = false;
|
||||
};
|
||||
|
||||
const submitFun = async () => {
|
||||
if (!formData.fileType) {
|
||||
ElMessage.warning('请选择归档文件类型');
|
||||
return;
|
||||
}
|
||||
|
||||
const fileIds = syncFiles.value.map((item: any) => {
|
||||
return item.id;
|
||||
});
|
||||
const param = {
|
||||
fileIds,
|
||||
fileType: formData.fileType,
|
||||
runId: props.nodeInfo.runId,
|
||||
};
|
||||
|
||||
try {
|
||||
const res: any = await syncKeyResultToTaskApi(param);
|
||||
if (res && res.code == 200) {
|
||||
ElMessage.success('归档成功');
|
||||
showSyncFileTypeSelectFlag.value = false;
|
||||
}
|
||||
} catch {}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.nodeInfo,
|
||||
(newVal) => {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
:api="listExperimentResultApi"
|
||||
:show-overflow="false"
|
||||
:params="tableParams"
|
||||
:full-height="true"
|
||||
>
|
||||
<template v-if="showLeftOptions" #leftOptions>
|
||||
<el-button type="primary" @click="uploadResultFun">上传结果</el-button>
|
||||
@@ -159,7 +160,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import { getFileBaseInfoApi } from '@/api/data/data';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import { downloadFileById, fileUploadAllocationIconFun, formatFileSize } from '@/utils/file';
|
||||
import { downloadFileById, fileUploadAllocationIconFun, fileUploadAllocationTypeFun, formatFileSize } from '@/utils/file';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { updateTaskStatusApi } from '@/api/project/task';
|
||||
import { FILE_TYPE } from '@/utils/enum/file';
|
||||
@@ -389,8 +390,8 @@ const submitFun = async () => {
|
||||
return {
|
||||
fileName: item.name,
|
||||
fileSize: item.size,
|
||||
// fileType: fileUploadAllocationTypeFun(item.name),
|
||||
fileType: formData.value.fileTypeDictValue,
|
||||
fileType: fileUploadAllocationTypeFun(item.name),
|
||||
// fileType: formData.value.fileTypeDictValue,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
@@ -398,8 +399,8 @@ const submitFun = async () => {
|
||||
return {
|
||||
fileName: item.name,
|
||||
fileSize: item.size,
|
||||
// fileType: fileUploadAllocationTypeFun(item.name),
|
||||
fileType: formData.value.fileTypeDictValue,
|
||||
fileType: fileUploadAllocationTypeFun(item.name),
|
||||
// fileType: formData.value.fileTypeDictValue,
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -410,15 +411,15 @@ const submitFun = async () => {
|
||||
obj.addImageInfo = {
|
||||
fileName: imageFileList.value[0].name,
|
||||
fileSize: imageFileList.value[0].size,
|
||||
// fileType: fileUploadAllocationTypeFun(imageFileList.value[0].name),
|
||||
fileType: formData.value.fileTypeDictValue,
|
||||
fileType: fileUploadAllocationTypeFun(imageFileList.value[0].name),
|
||||
// fileType: formData.value.fileTypeDictValue,
|
||||
};
|
||||
} else {
|
||||
obj.imageFileInfo = {
|
||||
fileName: imageFileList.value[0].name,
|
||||
fileSize: imageFileList.value[0].size,
|
||||
// fileType: fileUploadAllocationTypeFun(imageFileList.value[0].name),
|
||||
fileType: formData.value.fileTypeDictValue,
|
||||
fileType: fileUploadAllocationTypeFun(imageFileList.value[0].name),
|
||||
// fileType: formData.value.fileTypeDictValue,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
<el-radio-button label="图表" value="chart" />
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="content-inner" v-if="radioData === 'table'">
|
||||
<div class="content-inner" v-show="radioData === 'table'">
|
||||
<BaseTable
|
||||
:fullHeight="true"
|
||||
ref="workloadTableRef"
|
||||
:tableName="'PROJECT_TASK_WORKLOAD'"
|
||||
:data="tableData"
|
||||
:tableName="'SIMULATION_TASK_EXECUTE_LIST'"
|
||||
:hideSearch="true"
|
||||
:hidePagination="true"
|
||||
>
|
||||
<template #exeStatus="{ row }">
|
||||
@@ -46,13 +47,12 @@
|
||||
</template>
|
||||
</BaseTable>
|
||||
</div>
|
||||
<div class="content-inner" v-else>
|
||||
<div class="content-inner" v-if="radioData === 'chart'">
|
||||
<EchartCard
|
||||
title=""
|
||||
ref="workloadChartRef"
|
||||
:barType="'barChart'"
|
||||
:chartsId="'workload-chart'"
|
||||
@refresh="initWorkloadChartFun"
|
||||
></EchartCard>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,7 +60,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, nextTick } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import { listTaskWorkDaysApi } from '@/api/project/task';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
@@ -93,15 +93,10 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
const visible = ref(false);
|
||||
const tableData = ref<any>([]);
|
||||
const radioData = ref('table');
|
||||
const workloadTableRef = ref();
|
||||
const workloadChartRef = ref();
|
||||
|
||||
const changeRadioDataFun = async () => {
|
||||
if (radioData.value === 'table') {
|
||||
nextTick(() => {
|
||||
workloadTableRef.value.setDataFun(tableData.value);
|
||||
});
|
||||
} else {
|
||||
if (radioData.value === 'chart') {
|
||||
await initWorkloadChartFun();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="gl-page-content gantt">
|
||||
<div class="page-filter-box">
|
||||
<el-form :model="filterFprmData" inline>
|
||||
<slot name="filter-form"></slot>
|
||||
<slot v-if="dimension !== 'person'" name="filter-form"></slot>
|
||||
<el-form-item v-if="dimension === 'person'" label="用户组:">
|
||||
<el-select
|
||||
v-model="filterFprmData.userGroupId"
|
||||
@@ -183,7 +183,7 @@ const getUserGroupFun = async () => {
|
||||
if (groupList.value?.length) {
|
||||
// 默认选择仿真组
|
||||
filterFprmData.userGroupId =
|
||||
groupList.value.filter((v) => v.groupCode === 'SIMULATION_GROUP')[0]?.id || '';
|
||||
groupList.value.filter((v: any) => v.groupCode === 'SIMULATION_GROUP')[0]?.id || '';
|
||||
if (filterFprmData.userGroupId) {
|
||||
queryGroupUserListFun(filterFprmData.userGroupId);
|
||||
}
|
||||
@@ -228,6 +228,7 @@ const getWorkLoadDataFun = async () => {
|
||||
if (props.dimension === 'project') {
|
||||
delete param.userGroupId;
|
||||
delete param.userIds;
|
||||
param.projectIdList = param.projectIdList ? param.projectIdList.split(',') : [];
|
||||
if (param.projectIdList.length === 0) {
|
||||
return (loading.value = false);
|
||||
}
|
||||
@@ -600,8 +601,8 @@ watch(
|
||||
|
||||
const isInitialized = ref(false);
|
||||
onMounted(async () => {
|
||||
await getUserGroupFun();
|
||||
if (props.dimension === 'person') {
|
||||
await getUserGroupFun();
|
||||
filterFprmData.beginTime = dayjs().subtract(3, 'month').format('YYYY-MM-DD HH:mm:ss');
|
||||
filterFprmData.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
} else {
|
||||
|
||||
@@ -2,22 +2,28 @@
|
||||
<div class="project-gantt">
|
||||
<workLoad
|
||||
dimension="project"
|
||||
:filterData="{
|
||||
projectIdList: filterData.projectIdList ? filterData.projectIdList.split(',') : [],
|
||||
}"
|
||||
:filterData="filterData"
|
||||
:showTotal="true"
|
||||
:configColumns="columns"
|
||||
:api="queryProjectUserLoadsApi"
|
||||
:fieldMapFun="fieldMapFun"
|
||||
>
|
||||
<template #filter-form>
|
||||
<el-form-item label="项目">
|
||||
<el-form-item label="项目名称">
|
||||
<ProjectSelect
|
||||
class="select-width margin-right-12"
|
||||
v-model="filterData.projectIdList"
|
||||
multiple
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号">
|
||||
<ProjectSelect
|
||||
class="select-width margin-right-12"
|
||||
:showCodeList="true"
|
||||
v-model="filterData.projectIdList"
|
||||
multiple
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</workLoad>
|
||||
</div>
|
||||
@@ -40,7 +46,7 @@ const columns = [
|
||||
label: '项目',
|
||||
width: 180,
|
||||
template: function (task: any) {
|
||||
return `<div class="gantt-cell-ellipsis" title="${formatProjectName(task)}">${formatProjectName(task)}</div>`;
|
||||
return `<div class="gantt-cell-ellipsis" title="${task.userName}">${task.userName}</div>`;
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -58,13 +64,13 @@ const columns = [
|
||||
},
|
||||
},
|
||||
];
|
||||
const formatProjectName = (data: any) => {
|
||||
if (data.relateProjectName) {
|
||||
return data.userName + '(参考项目:' + data.relateProjectName + ')';
|
||||
} else {
|
||||
return data.userName;
|
||||
}
|
||||
};
|
||||
// const formatProjectName = (data: any) => {
|
||||
// if (data.relateProjectName) {
|
||||
// return data.userName + '(参考项目:' + data.relateProjectName + ')';
|
||||
// } else {
|
||||
// return data.userName;
|
||||
// }
|
||||
// };
|
||||
|
||||
// 字段映射
|
||||
const fieldMapFun = (data: any) => {
|
||||
|
||||
Reference in New Issue
Block a user