Browse Source

Merge pull request 'fix:下拉框选择bug修复' (#104) from dev-xjf into master

Reviewed-on: http://120.26.116.243:3000/root/alert-front/pulls/104
cjl-new
xiaojinfei 3 weeks ago
parent
commit
f7c5f1740b
  1. 1
      src/views/run/instant/instant.data.ts
  2. 7
      src/views/warn/alarm/alarm.data.ts

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

@ -193,6 +193,7 @@ export const searchFormSchema: FormSchema[] = [
component: 'Select', component: 'Select',
labelWidth: 40, labelWidth: 40,
componentProps: { componentProps: {
placeholder: '全部算法',
options: [{ value: 1, label: "主成分分析(PCA)" }, { value: 2, label: "神经网络(ANN)" }], options: [{ value: 1, label: "主成分分析(PCA)" }, { value: 2, label: "神经网络(ANN)" }],
}, },
defaultValue: null, defaultValue: null,

7
src/views/warn/alarm/alarm.data.ts

@ -22,7 +22,6 @@ export const searchFormSchema: FormSchema[] = [
componentProps: ({ schema, tableAction, formActionType, formModel }) => { componentProps: ({ schema, tableAction, formActionType, formModel }) => {
return { return {
// xxxx props // xxxx props
allowClear: false,
placeholder: '全部机组', placeholder: '全部机组',
options: optionList.units.map(unit => ({ value: unit.id, label: unit.name })), options: optionList.units.map(unit => ({ value: unit.id, label: unit.name })),
onChange: async (e: any) => { onChange: async (e: any) => {
@ -35,7 +34,7 @@ export const searchFormSchema: FormSchema[] = [
typeId: formModel.type, typeId: formModel.type,
} }
//如果typeId是空,则不设置system'Options //如果typeId是空,则不设置system'Options
if (!param.typeId) { if (!param.typeId || !param.unitId) {
systemOptions.value = [] systemOptions.value = []
return return
} }
@ -55,7 +54,6 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
allowClear: false,
placeholder: '全部系统', placeholder: '全部系统',
options: optionList.types.map(type => ({ value: type.id, label: type.name })), options: optionList.types.map(type => ({ value: type.id, label: type.name })),
onChange: async (e: any) => { onChange: async (e: any) => {
@ -68,7 +66,7 @@ export const searchFormSchema: FormSchema[] = [
typeId: e, typeId: e,
} }
//如果typeId是空,则不设置system'Options //如果typeId是空,则不设置system'Options
if (!param.typeId) { if (!param.typeId || !param.unitId) {
systemOptions.value = [] systemOptions.value = []
return return
} }
@ -86,7 +84,6 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: () => { componentProps: () => {
return { return {
allowClear: false,
placeholder: '全部子系统', placeholder: '全部子系统',
options: systemOptions.value.map(system => ({ value: system.id, label: system.name })), options: systemOptions.value.map(system => ({ value: system.id, label: system.name })),
} }

Loading…
Cancel
Save