准确度修复,bug修复

This commit is contained in:
weibl
2026-01-23 10:56:31 +08:00
parent 7c2f6920ec
commit bf3465ae18
5 changed files with 48 additions and 4 deletions

View File

@@ -170,6 +170,7 @@
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
clearable
:disabled-date="(time: Date) => disabledDate(time, row, 'beginTime')"
/>
</template>
<!-- 计划结束时间 -->
@@ -189,6 +190,7 @@
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
clearable
:disabled-date="(time: Date) => disabledDate(time, row, 'endTime')"
/>
</template>
<!-- 军令状时间 -->
@@ -595,6 +597,22 @@ const onNodeNameChangeFun = (row: any, val: string) => {
}
};
const disabledDate = (time: Date, row: any, flag: string) => {
if (flag === 'beginTime') {
if (row.endTime) {
return time.getTime() > new Date(row.endTime).getTime();
} else {
return false;
}
} else {
if (row.beginTime) {
return time.getTime() < new Date(row.beginTime).getTime();
} else {
return false;
}
}
};
onMounted(() => {
initProjectDicts();
taskStore.fetchTemplates();

View File

@@ -92,6 +92,7 @@ import { CommonStore } from '@/stores/common';
// import dayjs from 'dayjs';
import { getTagMapList } from '@/utils/task';
import TableForm from '@/components/common/table/tableForm.vue';
import { useI18n } from 'vue-i18n';
const props = defineProps<{
showNodeInfoDialog: boolean;
@@ -100,6 +101,9 @@ const props = defineProps<{
projectBeginTime?: string;
projectEndTime?: string;
}>();
const { t } = useI18n();
const emits = defineEmits([
'update:showNodeInfoDialog',
'nextPageFun',
@@ -124,6 +128,8 @@ const actionList = ref([
{
title: '删除',
type: 'danger',
needConfirm: true,
confirmTip: t('通用.确认删除吗'),
click: (row: any) => {
disposeDeleteListFun(row);
},

View File

@@ -1069,10 +1069,10 @@ const tableFormChangeFun = (data: any) => {
};
const checkMethod = computed(() => {
return ({ row }: any) => {
// return row.uuid === 'simu_pool_task_7df6f758-001a-4893-8104-821f6e2a612513130';
return !checkChildrenIds.value.includes(row.uuid);
};
return () => true;
// return ({ row }: any) => {
// return !checkChildrenIds.value.includes(row.uuid);
// };
});
const checkChildrenIds = ref<any>([]);

View File

@@ -26,6 +26,7 @@
@change="changeFun"
@load="formLoad"
v-model:data="editRow"
:formAttrs="formAttrs"
>
</TableForm>
<template #footer>
@@ -78,6 +79,19 @@ const props = defineProps({
},
});
const formAttrs = ref({
progress: {
min: 0,
max: 100,
},
confidence: {
min: 0,
max: 1,
precision: 2,
step: 0.01,
},
});
const taskParams = ref({ type: 0 });
const exeTableRef = ref();

View File

@@ -89,6 +89,12 @@ const formAttrs = ref({
min: 0,
max: 100,
},
confidence: {
min: 0,
max: 1,
precision: 2,
step: 0.01,
},
});
const taskParams = ref({ type: 3 });