This commit is contained in:
2026-04-03 10:15:45 +08:00
20 changed files with 314 additions and 105 deletions

View File

@@ -91,6 +91,30 @@
@change="filterChange"
/>
</el-form-item>
<el-form-item v-if="filterItems.includes('createTime')" label="创建时间">
<el-date-picker
v-model="formData.createTime"
type="daterange"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
start-placeholder="开始日期"
end-placeholder="结束日期"
:clearable="true"
@change="filterChange"
/>
</el-form-item>
<el-form-item v-if="filterItems.includes('finishTime')" label="完成时间">
<el-date-picker
v-model="formData.finishTime"
type="daterange"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
start-placeholder="开始日期"
end-placeholder="结束日期"
:clearable="true"
@change="filterChange"
/>
</el-form-item>
<slot name="extraFilters" :extraFilters="extraFilters" />
</el-form>
</template>
@@ -162,6 +186,8 @@ const formData = ref<any>({
workspace: '',
discipline: '',
dateRange: [...props.defaultDateRange],
createTime: [],
finishTime: [],
});
const disabledDate = (time: Date) => {
@@ -180,6 +206,16 @@ const formatEmitData = () => {
...(props.filterItems.includes('workspace') && { workspace: formData.value.workspace }),
...(props.filterItems.includes('discipline') && { discipline: formData.value.discipline }),
...(props.filterItems.includes('dateRange') && { dateRange: formData.value.dateRange }),
...(props.filterItems.includes('createTime') && {
createTime: formData.value.createTime?.length
? [formData.value.createTime[0] + ' 00:00:00', formData.value.createTime[1] + ' 23:59:59']
: [],
}),
...(props.filterItems.includes('finishTime') && {
finishTime: formData.value.finishTime?.length
? [formData.value.finishTime[0] + ' 00:00:00', formData.value.finishTime[1] + ' 23:59:59']
: [],
}),
...props.extraFilters,
};
return obj;

View File

@@ -35,7 +35,7 @@
>
<template #reference>
<span class="link-text">
{{ $t('工况库.关联N个执行规范', { count: displayNames.length }) }}
{{ $t(linkTextKey, { count: displayNames.length }) }}
</span>
</template>
<div class="template-list">
@@ -78,6 +78,13 @@ import OverflowTooltip from '@/components/common/text/overflowTooltip.vue';
import { DIR_TYPE } from '@/utils/enum/data.ts';
import { downloadFileById } from '@/utils/file';
const linkTextKey = computed(() => {
if (props.dirType === DIR_TYPE.EXCEPTION_CASE) {
return '工况库.关联N个异常附件';
}
return '工况库.关联N个执行规范';
});
interface Props {
modelValue?: any;
modelName?: string;

View File

@@ -7,12 +7,12 @@
show-confirm-button
:diaTitle="localDiaTitle"
:confirm-closable="false"
:width="formData?.nodeType === NODE_TYPE.TASK ? 800 : 400"
:width="formData?.nodeType === NODE_TYPE.TASK ? 1200 : 400"
>
<template #default>
<TableForm
v-if="visible"
:colNum="formData?.nodeType === NODE_TYPE.TASK ? 2 : 1"
:colNum="formData?.nodeType === NODE_TYPE.TASK ? 3 : 1"
ref="tableFormRef"
:tableName="localTableName"
v-model:data="formData"

View File

@@ -1,17 +1,22 @@
<template>
<el-select-v2
ref="selectRef"
v-model="currentPool"
:options="options"
:placeholder="$t('工况库.请选择')"
:fit-input-width="true"
:clearable="clearable"
:multiple="multiple"
:collapse-tags="multiple"
collapse-tags-tooltip
filterable
@change="onChangeFun"
@clear="onChangeFun('')"
/>
</template>
<script lang="ts" setup>
import { ref, computed, onMounted } from 'vue';
import { ref, computed, onMounted, nextTick } from 'vue';
import { getAllTaskPoolApi } from '@/api/task/taskpool';
const emit = defineEmits(['update:modelValue', 'change']);
@@ -20,15 +25,18 @@ const props = withDefaults(
modelValue?: string;
needDefault?: boolean;
clearable?: boolean;
multiple?: boolean;
}>(),
{
needDefault: true,
clearable: false,
multiple: false,
}
);
const poolList = ref<{ poolName: string }[]>([]);
const currentPool = ref(props.modelValue || '');
// const currentPool = ref(props.modelValue || '');
const currentPool = ref(props.multiple ? [] : props.modelValue || '');
const options = computed(() =>
[...poolList.value].reverse().map((item) => ({
@@ -44,17 +52,37 @@ const queryPoolListFun = async () => {
poolList.value = res.data;
if (!currentPool.value && poolList.value.length > 0) {
if (props.needDefault) {
currentPool.value = poolList.value[poolList.value.length - 1].poolName;
if (props.multiple) {
// 多选模式下,默认不选择任何项
currentPool.value = [];
} else {
// 单选模式下,默认选择最后一项
currentPool.value = poolList.value[poolList.value.length - 1].poolName;
}
emit('update:modelValue', currentPool.value);
emit('change', currentPool.value);
}
}
}
};
const onChangeFun = (val: string) => {
emit('update:modelValue', val);
emit('change', val);
const selectRef = ref();
const onChangeFun = (val: string | string[]) => {
let emitValue: string;
if (props.multiple) {
// 多选时,将数组转换为逗号分隔的字符串
emitValue = Array.isArray(val) ? val.join(',') : '';
} else {
// 单选时,直接使用字符串值
emitValue = val as string;
}
emit('update:modelValue', emitValue);
emit('change', emitValue);
// 清除输入框中的筛选文本
nextTick(() => {
if (selectRef.value) {
selectRef.value.states.inputValue = '';
}
});
};
onMounted(() => {

View File

@@ -218,6 +218,7 @@ const lang = {
N个报告模版: 'Associated {count} Report Templates',
N个执行规范: 'Associated {count} Standards',
N个场景: 'Associated {count} Scenes',
N个异常附件: 'Associated {count} Exception Attachments',
: 'Please select task pool',
: 'Discipline Accuracy',
: 'Workspace Accuracy',

View File

@@ -214,6 +214,7 @@ const lang = {
N个报告模版: '关联{count}个报告模版',
N个执行规范: '关联{count}个执行规范',
N个场景: '关联{count}个场景',
N个异常附件: '关联{count}个异常附件',
: '请选择工况库',
: '学科准确度',
: '工位准确度',

View File

@@ -201,7 +201,6 @@ const changeChceckFun = async () => {
// isLoading.value = true;
// showComponents.value = false;
checktableData.value = checkTableRef.value.tableRef.getCheckboxRecords();
const fileType = analysisType.value;
for (let i = 0; i < checkAnalysisList.value.length; i++) {

View File

@@ -34,6 +34,7 @@ import { objectTypeArrayRemovesDuplicates } from '@/utils/common';
import FilePreview from '@/components/common/filePreview/index.vue';
import { downloadFileByStream } from '@/utils/file';
import FileIcon from '@/components/common/fileIcon/index.vue';
import { cloneDeep } from 'lodash-es';
// import compareTextFile from './compareTextFile.vue';
const props = defineProps({
@@ -65,11 +66,11 @@ const modelAttribute = ref<any>([
},
{
name: '所属项目',
value: 'ownProjectName',
value: 'tag1Name',
},
{
name: '所属阶段',
value: 'ownPhaseName',
value: 'tag2Name',
},
// {
// name: '所属机台',
@@ -81,11 +82,11 @@ const modelAttribute = ref<any>([
// },
{
name: '所属工况',
value: 'owntaskName',
value: 'taskName',
},
{
name: '所属算例',
value: 'ownRunName',
value: 'runName',
},
{
name: '文件大小',
@@ -100,8 +101,11 @@ const modelAttribute = ref<any>([
value: 'operate',
},
]);
const fileList = ref<any>([]);
const getTableColumnFun = (data: any) => {
fileList.value = cloneDeep(data);
const titles = data.map((item: any) => {
const name =
item.taskName && item.runName ? item.taskName + '_' + item.runName : item.originalName;
@@ -182,13 +186,20 @@ const getTableColumnFun = (data: any) => {
});
};
// 预览文件
const reviewFun = (column: any) => {
fileId.value = column.key;
const file = fileList.value.find((item: any) => {
return item.originalName === tableData.value[0][column.key];
});
fileId.value = file.id;
previewVisible.value = true;
};
const downLoadFun = (column: any) => {
fileId.value = column.key;
const file = fileList.value.find((item: any) => {
return item.originalName === tableData.value[0][column.key];
});
fileId.value = file.id;
downloadFileByStream(fileId.value);
};

View File

@@ -34,6 +34,7 @@ import { objectTypeArrayRemovesDuplicates } from '@/utils/common';
import FilePreview from '@/components/common/filePreview/index.vue';
import { downloadFileByStream } from '@/utils/file';
import FileIcon from '@/components/common/fileIcon/index.vue';
import { cloneDeep } from 'lodash-es';
// import compareTextFile from './compareTextFile.vue';
const props = defineProps({
@@ -65,11 +66,11 @@ const modelAttribute = ref<any>([
},
{
name: '所属项目',
value: 'ownProjectName',
value: 'tag1Name',
},
{
name: '所属阶段',
value: 'ownPhaseName',
value: 'tag2Name',
},
// {
// name: '所属机台',
@@ -81,11 +82,11 @@ const modelAttribute = ref<any>([
// },
{
name: '所属工况',
value: 'owntaskName',
value: 'taskName',
},
{
name: '所属算例',
value: 'ownRunName',
value: 'runName',
},
{
name: '文件大小',
@@ -101,7 +102,9 @@ const modelAttribute = ref<any>([
},
]);
const fileList = ref<any>([]);
const getTableColumnFun = (data: any) => {
fileList.value = cloneDeep(data);
const titles = data.map((item: any) => {
const name =
item.taskName && item.runName ? item.taskName + '_' + item.runName : item.originalName;
@@ -183,12 +186,18 @@ const getTableColumnFun = (data: any) => {
// 预览文件
const reviewFun = (column: any) => {
fileId.value = column.key;
const file = fileList.value.find((item: any) => {
return item.originalName === tableData.value[0][column.key];
});
fileId.value = file.id;
previewVisible.value = true;
};
const downLoadFun = (column: any) => {
fileId.value = column.key;
const file = fileList.value.find((item: any) => {
return item.originalName === tableData.value[0][column.key];
});
fileId.value = file.id;
downloadFileByStream(fileId.value);
};

View File

@@ -63,11 +63,11 @@ const modelAttribute = ref<any>([
},
{
name: '所属项目',
value: 'ownProjectName',
value: 'tag1Name',
},
{
name: '所属阶段',
value: 'ownPhaseName',
value: 'tag2Name',
},
// {
// name: '所属机台',
@@ -79,11 +79,11 @@ const modelAttribute = ref<any>([
// },
{
name: '所属工况',
value: 'owntaskName',
value: 'taskName',
},
{
name: '所属算例',
value: 'ownRunName',
value: 'runName',
},
{
name: '文件大小',
@@ -101,12 +101,20 @@ const modelAttribute = ref<any>([
// 预览文件
const reviewFun = (column: any) => {
fileId.value = column.key;
console.log(column, 'column');
console.log(tableData.value, 'tableData.value');
const file = fileList.value.find((item: any) => {
return item.originalName === tableData.value[0][column.key];
});
fileId.value = file.id;
previewVisible.value = true;
};
const downLoadFun = (column: any) => {
fileId.value = column.key;
const file = fileList.value.find((item: any) => {
return item.originalName === tableData.value[0][column.key];
});
fileId.value = file.id;
downloadFileByStream(fileId.value);
};

View File

@@ -6,6 +6,7 @@
:actionList="actionList"
hide-pagination
fullHeight
showIndex
:data="tableData"
>
<template #units="{ row }">
@@ -36,6 +37,7 @@
ref="unitsTableRef"
:actionList="unitActionList"
hide-pagination
showIndex
fullHeight
>
<template #units="{ row }">
@@ -163,16 +165,16 @@ const openDialog = (flag: string, row?: any) => {
formData.units = [];
formData.unitsList = [];
formData.description = '';
unitsTableData.value = [];
} else {
isEditDialog.value = true;
dialogVisible.value = true;
for (const key in row) {
formData[key] = row[key];
}
unitsTableData.value = cloneDeep(formData.unitsList);
}
unitsTableData.value = cloneDeep(formData.unitsList);
nextTick(() => {
unitsTableRef.value.setDataFun(unitsTableData.value);
});

View File

@@ -8,23 +8,23 @@
barType="barChart"
chartsId="disciplineConfidenceChart"
:filterItems="['discipline']"
:multipleItems="['discipline']"
:extraFilters="disciplineExtraFilters"
:option="disciplineConfidenceOption"
:nodata="disciplineNodata"
@update="disciplineConfidenceUpdate"
>
<template #actionSlot>
<downloadAction @download="downloadFun" />
</template>
<!-- <template #actionSlot>
<downloadAction
@download="(command) => downloadFun(command, 'disciplineConfidenceChart')"
/>
</template> -->
<template #extraFilters>
<el-form label-position="left">
<el-form-item label="模式">
<el-radio-group v-model="disciplineExtraFilters.mode">
<el-tooltip content="所有场景的均值,若场景无准确度则不计入分母" placement="top">
<el-radio value="1" size="large">有效数据</el-radio>
</el-tooltip>
<el-tooltip content="所有场景的均值,若场景无准确度也计入分母" placement="top">
<el-radio value="2" size="large">总量数据</el-radio>
</el-tooltip>
<el-radio value="effective" size="large">有效数据</el-radio>
<el-radio value="all" size="large">总量数据</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
@@ -40,28 +40,29 @@
:option="machineConfidenceOption"
:extraFilters="machineExtraFilters"
:filterItems="['discipline']"
:multipleItems="['discipline']"
:nodata="machineNodata"
@update="queryMachineConfidenceFun"
>
<template #actionSlot>
<downloadAction @download="downloadFun" />
</template>
<!-- <template #actionSlot>
<downloadAction
@download="(command) => downloadFun(command, 'machineConfidenceChart')"
/>
</template> -->
<template #extraFilters>
<el-form label-position="left">
<el-form-item label="地图库">
<poolSelect
:needDefault="false"
:clearable="true"
:multiple="true"
v-model="machineExtraFilters.workspacePoolName"
/>
</el-form-item>
<el-form-item label="模式">
<el-radio-group v-model="machineExtraFilters.mode">
<el-tooltip content="所有场景的均值,若场景无准确度则不计入分母" placement="top">
<el-radio value="1" size="large">有效数据</el-radio>
</el-tooltip>
<el-tooltip content="所有场景的均值,若场景无准确度也计入分母" placement="top">
<el-radio value="2" size="large">总量数据</el-radio>
</el-tooltip>
<el-radio value="effective" size="large">有效数据</el-radio>
<el-radio value="all" size="large">总量数据</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
@@ -107,20 +108,26 @@ import { debounce } from 'lodash-es';
import poolSelect from '@/components/pool/poolSelect.vue';
import EchartCard from '@/components/common/echartCard/index.vue';
import commonFilterChart from '@/components/common/echartCard/commonFilterChart.vue';
import { statisticDisciplineConfidenceTrendApi } from '@/api/task/taskpool';
import {
statisticDisciplineConfidenceTrendApi,
statisticTaskPoolConfidenceApi,
} from '@/api/task/taskpool';
import downloadAction from './common/download.vue';
import { exportToImage } from '@/utils/exportPdf';
import dayjs from 'dayjs';
const downloadFun = async (command: string | number | object) => {
console.log('执行了下载操作', command);
const downloadFun = async (command: string | number | object, id: string) => {
if (command === 'pic') {
const element = document.getElementById('machineConfidenceChart'); // 根据chartsId获取对应的DOM元素
const element = document.getElementById(id + '_pic'); // 根据id获取对应的DOM元素
if (element) {
await exportToImage(element, 'report');
const baseName = id === 'disciplineConfidenceChart' ? '学科准确度' : '机型准确度';
const timestamp = dayjs().format('YYYYMMDD_HHmmss');
const picName = `${baseName}_${timestamp}`;
await exportToImage(element, picName);
}
} else if (command === 'excel') {
// 导出excel的逻辑
console.log('导出excel');
console.log('导出excel', id);
}
};
@@ -128,49 +135,30 @@ const downloadFun = async (command: string | number | object) => {
const disciplineLoading = ref(false);
const disciplineConfidenceOption = ref<any>();
const disciplineExtraFilters = ref({
mode: '2',
mode: 'effective',
});
const disciplineConfidenceUpdate = (data: any) => {
console.log('学科准确度更新了', data); // {discipline: '', mode: '2'}
};
// #endregion
// #region 机型准确度
const machineConfidenceRef = ref();
const machineExtraFilters = ref({
workspacePoolName: '',
mode: '2',
});
const machineLoading = ref(false);
const resData = [
{ taskName: '产品动画仿真需求2026-2', confidence: '0.56' },
{ taskName: '整车模态分析', confidence: '0.12' },
{ taskName: '上料小车静力学分析', confidence: '0.66' },
{ taskName: '测试产品线新1111', confidence: '0.43' },
{ taskName: '物流线支架静力学分析', confidence: '0.83' },
{ taskName: '输送底板动力学分析', confidence: '0.51' },
{ taskName: 'rengwu4', confidence: '0.53' },
];
const machineConfidenceOption = ref<any>();
const queryMachineConfidenceFun = async (data: any) => {
console.log(data, '机型准确度更新了');
machineLoading.value = true;
try {
// const res: any = await statisticMachineConfidenceApi({ poolName: workspacePoolName.value });
const res = {
code: 200,
data: resData,
};
if (res.code === 200 && Array.isArray(res.data)) {
const data = res.data;
const xData = data.map((item) => (item as any).taskName);
const disciplineNodata = ref(false);
const disciplineConfidenceUpdate = async (data: any) => {
const params = {
type: 1,
bTotal: disciplineExtraFilters.value.mode === 'all',
filterDisciplines: data.discipline ? data.discipline.split(',') : [],
};
disciplineLoading.value = true;
const res: any = await statisticTaskPoolConfidenceApi(params);
if (res.code === 200) {
disciplineLoading.value = false;
const data = res.data || [];
disciplineNodata.value = data.length === 0;
if (data.length) {
const xData = data.map((item: any) => (item as any).discipline);
const option = {
color: ['#409eff'],
xAxis: { data: xData },
yAxis: { name: '准确度(%)' },
series: [
{
data: data.map((item) => (Number(item.confidence) * 100).toFixed(0)),
data: data.map((item: any) => item.confidence),
name: '准确度(%)',
},
],
@@ -178,7 +166,58 @@ const queryMachineConfidenceFun = async (data: any) => {
zoomShowNum: 5,
grid: { bottom: 50 },
};
machineConfidenceOption.value = option;
disciplineConfidenceOption.value = option;
}
} else {
disciplineNodata.value = true;
disciplineLoading.value = false;
}
};
// #endregion
// #region 机型准确度
const machineExtraFilters = ref({
workspacePoolName: '',
mode: 'effective',
});
const machineLoading = ref(false);
const machineConfidenceOption = ref<any>();
const machineNodata = ref(false);
const queryMachineConfidenceFun = async (data: any) => {
const params = {
type: 2,
bTotal: machineExtraFilters.value.mode === 'all',
filterDisciplines: data.discipline ? data.discipline.split(',') : [],
filterPoolNames: machineExtraFilters.value.workspacePoolName
? machineExtraFilters.value.workspacePoolName.split(',')
: [],
};
machineLoading.value = true;
try {
const res: any = await statisticTaskPoolConfidenceApi(params);
if (res.code === 200 && Array.isArray(res.data)) {
const data = res.data || [];
machineNodata.value = data.length === 0;
if (data.length) {
const xData = data.map((item: any) => (item as any).poolName);
const option = {
color: ['#409eff'],
xAxis: { data: xData },
yAxis: { name: '准确度(%)' },
series: [
{
data: data.map((item: any) => item.confidence),
name: '准确度(%)',
},
],
dataZoom: xData.length > 5,
zoomShowNum: 5,
grid: { bottom: 50 },
};
machineConfidenceOption.value = option;
}
} else {
machineNodata.value = true;
}
} finally {
machineLoading.value = false;

View File

@@ -34,7 +34,14 @@
:nodata="achieveBarOption?.xAxis.data.length === 0"
:option="achieveBarOption"
:showChangeModel="true"
:filterItems="['projectName', 'projectCode', 'discipline', 'workspace']"
:filterItems="[
'projectName',
'projectCode',
'discipline',
'workspace',
'createTime',
'finishTime',
]"
@update="achieveBarChartUpdate"
>
</commonFilterChart>
@@ -46,7 +53,14 @@
:bar-type="'pieChart'"
:nodata="achievePieChartNodata"
:option="achievePieOption"
:filterItems="['projectName', 'projectCode', 'discipline', 'workspace']"
:filterItems="[
'projectName',
'projectCode',
'discipline',
'workspace',
'createTime',
'finishTime',
]"
@update="achievePieChartUpdate"
>
</commonFilterChart>
@@ -176,6 +190,8 @@ const achieveBarChartUpdate = async (data: any) => {
tag1: data.tag1,
tag5: data.workspace,
discipline: data.discipline,
createTimeArr: data.createTime,
finishTimeArr: data.finishTime,
});
if (res && res.code === 200) {
const xData = res.data.result.map((item: any) => {
@@ -211,6 +227,8 @@ const achievePieChartUpdate = async (data: any) => {
tag1: data.tag1,
tag5: data.workspace,
discipline: data.discipline,
createTimeArr: data.createTime,
finishTimeArr: data.finishTime,
});
if (res.code === 200) {
achievePieChartNodata.value = res.data.allExeStatus.length === 0;
@@ -231,7 +249,6 @@ const achievePieChartUpdate = async (data: any) => {
value: achieveStatusObj[key],
});
}
console.log(seriesData, ' seriesData');
const option = getPieOptions(completionStatusColorList, seriesData);
achievePieOption.value = option;
}

View File

@@ -22,8 +22,8 @@
<script lang="ts" setup>
import { ref, computed } from 'vue';
import SimulationLoop from './components/simulationLoop.vue';
// import SimulationLoop from './components/simulationLoopNewBoard.vue'; // 新版仿真闭环看板
// import SimulationLoop from './components/simulationLoop.vue';
import SimulationLoop from './components/simulationLoopNewBoard.vue'; // 新版仿真闭环看板
// import SummaryDashboard from './components/summaryDashboard.vue';
import SummaryDashboard from './components/summaryNewBoard.vue'; // 新版仿真汇总看板
import dataStatistics from './components/dataStatistics.vue';

View File

@@ -15,7 +15,7 @@
fileIdField="fileId"
v-model:viewType="viewType"
>
<template #leftOptions>
<template #leftOptions v-if="showLeftOptions">
<el-upload
:show-file-list="false"
:accept="accept"

View File

@@ -15,7 +15,7 @@
fileIdField="fileId"
v-model:viewType="viewType"
>
<template #leftOptions>
<template #leftOptions v-if="showLeftOptions">
<el-upload
:show-file-list="false"
:accept="accept"

View File

@@ -379,6 +379,7 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
if (res && res.code === 200) {
templateList.value = res.data;
const str = getTaskImportLevelFun();
const plNames = getTaskInfoPlNames();
if (str) {
if (str === '高') {
@@ -397,7 +398,23 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
isDisabledApproval.value = true;
}
} else {
isDisabledApproval.value = false;
if (plNames?.length) {
templateList.value = res.data.filter((item: any) => {
let result: any = false;
for (let i = 0; i < plNames.length; i++) {
if (item.templateName.includes(plNames[i])) {
result = true;
}
}
return result;
});
if (templateList.value?.length) {
approvalFormData.templateId = templateList.value[0].templateId;
isDisabledApproval.value = true;
}
} else {
isDisabledApproval.value = false;
}
}
} else {
templateList.value = [];
@@ -417,6 +434,14 @@ const getTaskImportLevelFun = () => {
return null;
}
};
const getTaskInfoPlNames = () => {
const { pMemberList } = props.taskInfo;
const names =
pMemberList.map((item: any) => {
return item.nickname;
}) || [];
return names;
};
// 刷新报告列表
const reportChangeFun = () => {

View File

@@ -478,6 +478,7 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
templateList.value = res.data;
const str = getTaskImportLevelFun();
const plNames = getTaskInfoPlNames();
if (str) {
if (str === '高') {
@@ -496,7 +497,23 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
isDisabledApproval.value = true;
}
} else {
isDisabledApproval.value = false;
if (plNames?.length) {
templateList.value = res.data.filter((item: any) => {
let result: any = false;
for (let i = 0; i < plNames.length; i++) {
if (item.templateName.includes(plNames[i])) {
result = true;
}
}
return result;
});
if (templateList.value?.length) {
approvalFormData.templateId = templateList.value[0].templateId;
isDisabledApproval.value = true;
}
} else {
isDisabledApproval.value = false;
}
}
console.log(props.currentTaskInfo, 'currentTaskInfo');
@@ -523,6 +540,15 @@ const getTaskImportLevelFun = () => {
}
};
const getTaskInfoPlNames = () => {
const { pMemberList } = props.taskInfo;
const names =
pMemberList.map((item: any) => {
return item.nickname;
}) || [];
return names;
};
const skipRunFun = async (data: any) => {
let projectType = 'self_develop';
try {

View File

@@ -694,6 +694,7 @@ watch(
);
const demandFormName = ref('SIMULATION_TASK_DEMAND_CREATE');
const changeSimulationType = (val: string) => {
tableFormRef.value.resetFun();
setPageStorage('simulationType', val);
if (simulationType.value === '工业设计') {
demandFormName.value = 'SIMULATION_TASK_DEMAND_INDUSTRIAL_CREATE';
@@ -706,7 +707,6 @@ const changeSimulationType = (val: string) => {
simTypeList = commonStore.getDictData(val).A;
tableFormRef.value.setOptionsFun('simType', simTypeList);
formHideKeys.value = getDemandHideKeys(val);
tableFormRef.value.resetFun();
}, 500);
};

View File

@@ -39,7 +39,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="dimension === 'project'" label="项目名称">
<el-form-item label="项目名称">
<ProjectSelect
class="select-width margin-right-12"
v-model="filterFprmData.projectIdList"
@@ -47,7 +47,7 @@
@change="filterChangeFun"
/>
</el-form-item>
<el-form-item v-if="dimension === 'project'" label="项目编号">
<el-form-item label="项目编号">
<ProjectSelect
class="select-width margin-right-12"
:showCodeList="true"
@@ -327,8 +327,8 @@ const getWorkLoadDataFun = async () => {
return (loading.value = false);
}
} else {
param.tag1 = param.projectIdList;
delete param.projectIdList;
// param.projectIdList = param.projectIdList ? param.projectIdList.split(',') : [];
}
const res: any = await props.api(param);
if (res && res.code === 200) {