fix ui warningInstance title support internationalization.

This commit is contained in:
zhuangchong 2021-01-31 21:04:03 +08:00
parent 047b0a312f
commit e05d93aa33
4 changed files with 12 additions and 8 deletions

View File

@ -39,7 +39,7 @@
<template slot="content">
<el-select v-model="pluginDefineId" size="small" style="width: 100%" @change="changePlugin" disabled="true" v-if="item.id">
<el-option
v-for="items in pulginInstance"
v-for="items in pluginInstance"
:key="items.id"
:value="items.id"
:label="items.pluginName">
@ -47,7 +47,7 @@
</el-select>
<el-select v-model="pluginDefineId" size="small" style="width: 100%" @change="changePlugin" v-else>
<el-option
v-for="items in pulginInstance"
v-for="items in pluginInstance"
:key="items.id"
:value="items.id"
:label="items.pluginName">
@ -83,7 +83,7 @@
},
props: {
item: Object,
pulginInstance: Array
pluginInstance: Array
},
methods: {
_ok () {
@ -121,7 +121,7 @@
this.rule = JSON.parse(res.pluginParams)
this.rule.forEach(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = $t(item.field)
item.title = this.$t(item.field)
}
})
}).catch(e => {
@ -163,7 +163,7 @@
this.pluginDefineId = this.item.pluginDefineId
JSON.parse(this.item.pluginInstanceParams).forEach(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = $t(item.field)
item.title = this.$t(item.field)
}
pluginInstanceParams.push(item)
})

View File

@ -25,7 +25,7 @@
v-if="createWarningDialog"
:visible.sync="createWarningDialog"
width="auto">
<m-create-warning-instance :item="item" :pulginInstance="pulginInstance" @onUpdate="onUpdate" @close="close"></m-create-warning-instance>
<m-create-warning-instance :item="item" :pluginInstance="pluginInstance" @onUpdate="onUpdate" @close="close"></m-create-warning-instance>
</el-dialog>
</template>
</m-conditions>
@ -86,7 +86,7 @@
isADMIN: store.state.user.userInfo.userType === 'ADMIN_USER',
createWarningDialog: false,
item: {},
pulginInstance: []
pluginInstance: []
}
},
mixins: [listUrlParamHandle],
@ -114,7 +114,7 @@
},
_create (item) {
this.getPlugins({ pluginType: 'ALERT' }).then(res => {
this.pulginInstance = res
this.pluginInstance = res
}).catch(e => {
this.$message.error(e.msg)
})

View File

@ -400,6 +400,8 @@ export default {
'Please select a notification group': 'Please select a notification group',
Recipient: 'Recipient',
Cc: 'Cc',
receivers: 'receivers',
receiverCcs: 'receiverCcs',
'Whether it is a complement process?': 'Whether it is a complement process?',
'Schedule date': 'Schedule date',
'Mode of execution': 'Mode of execution',

View File

@ -400,6 +400,8 @@ export default {
'Please select a notification group': '请选择通知组',
Recipient: '收件人',
Cc: '抄送人',
receivers: '收件人',
receiverCcs: '抄送人',
'Whether it is a complement process?': '是否补数',
'Schedule date': '调度日期',
'Mode of execution': '执行方式',