diff --git a/src/App.vue b/src/App.vue
index bbc835a7..a3fcdc21 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -110,10 +110,12 @@ export default {
show: false,
key: null,
arr: [],
+ il8nExternal: false,
}
},
mounted() {
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
+ Vue.prototype.$openI18n = this.openI18n
},
// watch: {
// '$route.query': {
@@ -181,22 +183,49 @@ export default {
i18n.mergeLocaleMessage('en', enMessages)
this.drawer = false
this.$message.success('国际化修改成功')
+ if (this.il8nExternal) {
+ this.$EventBus.$emit('il8nUpdate')
+ }
}
)
})
},
- openI18n() {
+ openI18n(ARRAY) {
this.tableData = []
+ this.il8nExternal = false
this.key = null
this.drawer = true
let arr = []
- let tableData = this.$tl.map((v) => {
- let a = { ...v }
- // if (!a.Description) {
- // a.Description = this.$route.path
- // }
- return a
- })
+ let tableData = []
+ if (ARRAY && Array.isArray(ARRAY)) {
+ this.il8nExternal = true
+ let data = ARRAY.map((v) => {
+ let a = { ...v }
+
+ return a
+ })
+ tableData = data.map((item) => {
+ return {
+ Code: item.Code,
+ Description: item.Description,
+ FrontType: item.FrontType,
+ Module: item.Module,
+ Value: item.Value,
+ ValueCN: item.ValueCN,
+ }
+ })
+ this.tableData = Object.assign([], tableData)
+ console.log(tableData)
+ return false
+ } else {
+ tableData = this.$tl.map((v) => {
+ let a = { ...v }
+ // if (!a.Description) {
+ // a.Description = this.$route.path
+ // }
+ return a
+ })
+ }
tableData = tableData.filter((v) => {
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
return ~this.$path.indexOf(v.Code)
diff --git a/src/views/system/i18n/index.vue b/src/views/system/i18n/index.vue
index 65cbc3c6..b7886b1d 100644
--- a/src/views/system/i18n/index.vue
+++ b/src/views/system/i18n/index.vue
@@ -154,6 +154,15 @@
>
批量更新
+
+ 批量编辑
+
{
+ this.getList()
+ })
},
methods: {
// 获取迭代
@@ -416,6 +428,10 @@ export default {
)
})
},
+ // 批量编辑国际化内容
+ handleBatchUpdateToChange() {
+ this.$openI18n(this.selectTableList)
+ },
async batch(row) {
let { PublishLogId, State } = row
let data = {
diff --git a/src/views/system/login-log/detail.vue b/src/views/system/login-log/detail.vue
index d28d8e86..f5e93903 100644
--- a/src/views/system/login-log/detail.vue
+++ b/src/views/system/login-log/detail.vue
@@ -85,7 +85,6 @@ export default {
if (!this.JsonObj) return []
let obj = JSON.parse(this.JsonObj)
let curData = []
- console.log(obj, 'obj')
Object.keys(obj).forEach((key) => {
if (this.curKeys.includes(key)) {
let o = {