optimization

This commit is contained in:
break60 2021-01-14 18:28:14 +08:00
parent 574ffa5fdf
commit 90a902441d
5 changed files with 28 additions and 8 deletions

View File

@ -116,15 +116,23 @@
},
// Select plugin
changePlugin () {
this.store.dispatch('security/getUiPluginsByID', {
this.store.dispatch('security/getUiPluginById', {
pluginId: this.pluginDefineId
}).then(res => {
this.rule = JSON.parse(res.pluginParams)
this.rule.forEach(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = $t(item.field)
}
})
}).catch(e => {
this.$message.error(e.msg || '')
})
},
_submit () {
this.$f.rule.forEach(item => {
item.title = item.name
})
let param = {
instanceName: this.instanceName,
pluginDefineId: this.pluginDefineId,
@ -152,10 +160,17 @@
},
watch: {},
created () {
let pluginInstanceParams = []
if (this.item) {
this.instanceName = this.item.instanceName
this.pluginDefineId = this.item.pluginDefineId
this.rule = JSON.parse(this.item.pluginInstanceParams)
JSON.parse(this.item.pluginInstanceParams).forEach(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = $t(item.field)
}
pluginInstanceParams.push(item)
})
this.rule = pluginInstanceParams
}
},
mounted () {

View File

@ -387,7 +387,8 @@ const router = new Router({
name: 'users-manage',
component: resolve => require(['../pages/security/pages/users/index'], resolve),
meta: {
title: `${i18n.$t('User Manage')}`
title: `${i18n.$t('User Manage')}`,
refresh_in_switched_tab: false
}
},
{

View File

@ -382,11 +382,11 @@ export default {
})
},
/**
* queryUiPluginsByID
* queryUiPluginById
*/
getUiPluginsByID ({ state }, payload) {
getUiPluginById ({ state }, payload) {
return new Promise((resolve, reject) => {
io.post('ui-plugins/queryUiPluginsByID', payload, res => {
io.post('ui-plugins/queryUiPluginDetailById', payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)

View File

@ -673,5 +673,7 @@ export default {
'The workflow canvas is abnormal and cannot be saved, please recreate': 'The workflow canvas is abnormal and cannot be saved, please recreate',
Info: 'Info',
'Datasource userName': 'owner',
'Resource userName': 'owner'
'Resource userName': 'owner',
receivers: 'receivers',
receiverCcs: 'receiverCcs'
}

View File

@ -672,5 +672,7 @@ export default {
'The workflow canvas is abnormal and cannot be saved, please recreate': '该工作流画布异常无法保存请重新创建',
Info: '提示',
'Datasource userName': '所属用户',
'Resource userName': '所属用户'
'Resource userName': '所属用户',
receivers: '收件人',
receiverCcs: '抄送人'
}