NEZ-2369 fix : models新建Brand成功后在搜索条件不显示,重新刷新此模块才显示
This commit is contained in:
@@ -73,6 +73,7 @@
|
||||
import selectWalk from '../../popBox/selectWalk'
|
||||
import editRigthBox from '../../mixin/editRigthBox'
|
||||
import { sysObjectIdInput } from '@/components/common/js/validate'
|
||||
import bus from '@/libs/bus'
|
||||
|
||||
export default {
|
||||
name: 'modelBox',
|
||||
@@ -184,6 +185,7 @@ export default {
|
||||
if (typeof this.editModel.brandId === 'string') { // 判断是否是新增的
|
||||
this.$post(this.brandUrl, { name: this.editModel.brandId }).then(res => {
|
||||
if (res.code === 200) { // 新增成功
|
||||
bus.$emit('refreshBrand')
|
||||
this.getBrandList().then(res2 => { // 新增成功后,重新调用getBrandList,刷新brandList
|
||||
const newBrand = this.brandList.find(b => b.name === this.editModel.brandId) // 取出刚新增的brand对象
|
||||
if (newBrand) {
|
||||
|
||||
Reference in New Issue
Block a user