|
|
@ -122,15 +122,12 @@ |
|
|
|
this.store.dispatch('security/getUiPluginById', { |
|
|
|
this.store.dispatch('security/getUiPluginById', { |
|
|
|
pluginId: this.pluginDefineId |
|
|
|
pluginId: this.pluginDefineId |
|
|
|
}).then(res => { |
|
|
|
}).then(res => { |
|
|
|
this.rule = JSON.parse(res.pluginParams) |
|
|
|
this.rule = JSON.parse(res.pluginParams).map(item => { |
|
|
|
this.rule.forEach(item => { |
|
|
|
|
|
|
|
if (item.title.indexOf('$t') !== -1) { |
|
|
|
if (item.title.indexOf('$t') !== -1) { |
|
|
|
item.title = this.$t(item.field) |
|
|
|
item.title = this.$t(item.field) |
|
|
|
} |
|
|
|
} |
|
|
|
// fix null pointer exception |
|
|
|
item.props = item.props || {} |
|
|
|
if (!item.props) { |
|
|
|
return item |
|
|
|
item.props = {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}).catch(e => { |
|
|
|
}).catch(e => { |
|
|
|
this.$message.error(e.msg || '') |
|
|
|
this.$message.error(e.msg || '') |
|
|
|