fix:机组系统子系统下拉框空则全部适配 #87

Merged
xiaojinfei merged 1 commits from dev-xjf into master 3 weeks ago
  1. 3
      src/views/run/calc/index.vue
  2. 6
      src/views/run/instant/instant.data.ts

3
src/views/run/calc/index.vue

@ -3,7 +3,8 @@ import {Space, Tag,Badge, Button, Divider, Switch} from 'ant-design-vue'
import {onMounted, ref, reactive} from 'vue'
import moment from 'moment'
import HistoryModal from '../../exa/config/HistoryModal.vue'
import {calcFormSchemas, columns, searchFormSchema} from './calc.data'
import {calcFormSchemas, columns} from './calc.data'
import {searchFormSchema} from '../instant/instant.data'
import {BasicTable, TableAction, useTable} from '@/components/Table'
import {BasicForm, useForm} from '@/components/Form'

6
src/views/run/instant/instant.data.ts

@ -112,7 +112,7 @@ export const searchFormSchema: FormSchema[] = [
return {
// xxxx props
allowClear: false,
placeholder: '请选择机组',
placeholder: '全部机组',
options: optionList.units.map(unit => ({ value: unit.id, label: unit.name })),
onChange: async (e: any) => {
// const { reload } = tableAction
@ -145,7 +145,7 @@ export const searchFormSchema: FormSchema[] = [
componentProps: ({ formModel }) => {
return {
allowClear: false,
placeholder: '请选择系统',
placeholder: '全部系统',
options: optionList.types.map(type => ({ value: type.id, label: type.name })),
onChange: async (e: any) => {
// const { reload } = tableAction
@ -176,7 +176,7 @@ export const searchFormSchema: FormSchema[] = [
componentProps: () => {
return {
allowClear: false,
placeholder: '请选择子系统',
placeholder: '全部子系统',
options: systemOptions.value.map(system => ({ value: system.id, label: system.name })),
}
},

Loading…
Cancel
Save