fix(sj_1.2.0_beta1): 移除批次状态多余查询选项
This commit is contained in:
parent
f044ddedd4
commit
44db284845
@ -2,10 +2,11 @@
|
|||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import type { SelectOption } from 'naive-ui';
|
import type { SelectOption } from 'naive-ui';
|
||||||
import SelectGroup from '@/components/common/select-group.vue';
|
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 DatetimeRange from '@/components/common/datetime-range.vue';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import { fetchGetJobNameList } from '@/service/api';
|
import { fetchGetJobNameList } from '@/service/api';
|
||||||
|
import { taskBatchStatusRecordOptions } from '@/constants/business';
|
||||||
|
import { translateOptions } from '@/utils/common';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'JobBatchSearch'
|
name: 'JobBatchSearch'
|
||||||
@ -56,7 +57,7 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
function translateOptions(options: Api.Job.Job[]) {
|
function translateJobOptions(options: Api.Job.Job[]) {
|
||||||
return options.map(option => ({
|
return options.map(option => ({
|
||||||
value: option.id,
|
value: option.id,
|
||||||
label: option.jobName
|
label: option.jobName
|
||||||
@ -77,7 +78,7 @@ function renderLabel(option: SelectOption) {
|
|||||||
<NAutoComplete
|
<NAutoComplete
|
||||||
v-model:value="keywords"
|
v-model:value="keywords"
|
||||||
:placeholder="$t('page.jobBatch.form.jobName')"
|
:placeholder="$t('page.jobBatch.form.jobName')"
|
||||||
:options="translateOptions(jobList)"
|
:options="translateJobOptions(jobList)"
|
||||||
:empty-visible="noSearchFlag"
|
:empty-visible="noSearchFlag"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@ -86,7 +87,14 @@ function renderLabel(option: SelectOption) {
|
|||||||
/>
|
/>
|
||||||
</NFormItemGi>
|
</NFormItemGi>
|
||||||
<NFormItemGi span="24 s:12 m:8" :label="$t('page.jobBatch.taskBatchStatus')" path="taskBatchStatus" class="pr-24px">
|
<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>
|
||||||
<NFormItemGi
|
<NFormItemGi
|
||||||
span="24 s:24 m:14 l:12 xl:8"
|
span="24 s:24 m:14 l:12 xl:8"
|
||||||
|
@ -546,9 +546,7 @@ const scriptMethodOptions = [
|
|||||||
required: true,
|
required: true,
|
||||||
message: `请输入键`,
|
message: `请输入键`,
|
||||||
trigger: ['input', 'blur'],
|
trigger: ['input', 'blur'],
|
||||||
validator() {
|
validator: () => isNotNull(httpHeaders[index].key)
|
||||||
return isNotNull(httpHeaders[index].key);
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<NInput v-model:value="httpHeaders[index].key" placeholder="Key" @keydown.enter.prevent />
|
<NInput v-model:value="httpHeaders[index].key" placeholder="Key" @keydown.enter.prevent />
|
||||||
@ -562,9 +560,7 @@ const scriptMethodOptions = [
|
|||||||
required: true,
|
required: true,
|
||||||
message: `请输入值`,
|
message: `请输入值`,
|
||||||
trigger: ['input', 'blur'],
|
trigger: ['input', 'blur'],
|
||||||
validator() {
|
validator: () => isNotNull(httpHeaders[index].value)
|
||||||
return isNotNull(httpHeaders[index].value);
|
|
||||||
}
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<NInput v-model:value="httpHeaders[index].value" placeholder="Value" @keydown.enter.prevent />
|
<NInput v-model:value="httpHeaders[index].value" placeholder="Value" @keydown.enter.prevent />
|
||||||
|
Loading…
Reference in New Issue
Block a user