|
|
@ -41,7 +41,7 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="basicFormRef" |
|
|
|
@success="getList" |
|
|
|
@success="success" |
|
|
|
:rules="SwitchRules" |
|
|
|
:formAllSchemas="Switch.allSchemas" |
|
|
|
:apiUpdate="SwitchApi.updateSwitch" |
|
|
@ -210,7 +210,16 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
const success = async (formType, data) => { |
|
|
|
const res = await SwitchApi.updateSwitch(data) |
|
|
|
if(true===res){ |
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
getList() |
|
|
|
}else{ |
|
|
|
message.error('修改失败') |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async() => { |
|
|
|
getList() |
|
|
|