fix(sj_1.2.0_beta1): 移除批次状态多余查询选项

This commit is contained in:
xlsea 2024-09-05 22:35:22 +08:00
parent f044ddedd4
commit 44db284845
2 changed files with 14 additions and 10 deletions

View File

@ -2,10 +2,11 @@
import { ref, watch } from 'vue';
import type { SelectOption } from 'naive-ui';
import SelectGroup from '@/components/common/select-group.vue';
import TaskBatchStatus from '@/components/common/task-batch-status.vue';
import DatetimeRange from '@/components/common/datetime-range.vue';
import { $t } from '@/locales';
import { fetchGetJobNameList } from '@/service/api';
import { taskBatchStatusRecordOptions } from '@/constants/business';
import { translateOptions } from '@/utils/common';
defineOptions({
name: 'JobBatchSearch'
@ -56,7 +57,7 @@ watch(
}
);
function translateOptions(options: Api.Job.Job[]) {
function translateJobOptions(options: Api.Job.Job[]) {
return options.map(option => ({
value: option.id,
label: option.jobName
@ -77,7 +78,7 @@ function renderLabel(option: SelectOption) {
<NAutoComplete
v-model:value="keywords"
:placeholder="$t('page.jobBatch.form.jobName')"
:options="translateOptions(jobList)"
:options="translateJobOptions(jobList)"
:empty-visible="noSearchFlag"
clearable
filterable
@ -86,7 +87,14 @@ function renderLabel(option: SelectOption) {
/>
</NFormItemGi>
<NFormItemGi span="24 s:12 m:8" :label="$t('page.jobBatch.taskBatchStatus')" path="taskBatchStatus" class="pr-24px">
<TaskBatchStatus v-model:value="model.taskBatchStatus" clearable />
<NSelect
v-model:value="model.taskBatchStatus"
:placeholder="$t('common.taskBatchStatus.form')"
:options="
translateOptions(taskBatchStatusRecordOptions).filter(item => ![98, 99].includes(item.value as number))
"
clearable
/>
</NFormItemGi>
<NFormItemGi
span="24 s:24 m:14 l:12 xl:8"

View File

@ -546,9 +546,7 @@ const scriptMethodOptions = [
required: true,
message: `请输入键`,
trigger: ['input', 'blur'],
validator() {
return isNotNull(httpHeaders[index].key);
}
validator: () => isNotNull(httpHeaders[index].key)
}"
>
<NInput v-model:value="httpHeaders[index].key" placeholder="Key" @keydown.enter.prevent />
@ -562,9 +560,7 @@ const scriptMethodOptions = [
required: true,
message: `请输入值`,
trigger: ['input', 'blur'],
validator() {
return isNotNull(httpHeaders[index].value);
}
validator: () => isNotNull(httpHeaders[index].value)
}"
>
<NInput v-model:value="httpHeaders[index].value" placeholder="Value" @keydown.enter.prevent />