diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue
index fbe9a24..983692a 100644
--- a/src/views/main-navbar.vue
+++ b/src/views/main-navbar.vue
@@ -10,40 +10,31 @@
- {{$t('commonSystemName')}}
- {{$t('commonAbbreviation')}}
+ {{pageLanguage.XjSysManage}}
+ {{pageLanguage.abbreviation}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -109,13 +61,94 @@
import UpdatePassword from './main-navbar-update-password'
import UpdateLanguage from './main-navbar-update-language'
import {clearLoginInfo} from '@/utils'
-
+ import {
+ searchFunctionButtonList,
+ saveButtonList,
+ searchSysLanguage,
+ } from "@/api/sysLanguage.js"
export default {
data() {
return {
updatePassowrdVisible: false,
updateLanguageVisible: false,
- message: this.$t('language.name')
+ message: this.$t('language.name'),
+ languageList: [],
+ pageLanguage: {
+ XjSysManage: '旭捷管理系统',
+ abbreviation: '旭捷',
+ setting: '设置',
+ languageSetting: '语言设置',
+ userSetting: '用户设置',
+ updatePassword: '修改密码',
+ updateDefaultLanguage: '修改默认语言',
+ cssSetting: '主提设置'
+ },
+ // 导出 end
+ pageLanguageList: [
+ {
+ functionId: "systemInformation",
+ languageValue: '旭捷管理系统',
+ objectId: 'XjSysManage',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '首页',
+ objectId: 'homePage',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '旭捷',
+ objectId: 'abbreviation',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '设置',
+ objectId: 'setting',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '语言设置',
+ objectId: 'languageSetting',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '用户设置',
+ objectId: 'userSetting',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '修改密码',
+ objectId: 'updatePassword',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '修改用户语言',
+ objectId: 'updateDefaultLanguage',
+ objectType: "label",
+ tableId: "systemInformation"
+ },
+ {
+ functionId: "systemInformation",
+ languageValue: '主题设置',
+ objectId: 'cssSetting',
+ objectType: "label",
+ tableId: "systemInformation"
+ }
+ ],
}
},
components: {
@@ -149,8 +182,36 @@
return this.$store.state.user.userDisplay
}
}
+ },
+ activated() {
+
},
methods: {
+ // 获取多语言列表
+ getLanguageList() {
+ searchSysLanguage({}).then(({data}) => {
+ this.languageList = data.rows
+ })
+ },
+ // 获取页面多语言数据
+ getFunctionButtonList() {
+ let queryButton = {
+ functionId: 'systemInformation',
+ tableId: 'systemInformation',
+ languageCode: this.$i18n.locale,
+ objectType: 'label'
+ }
+ searchFunctionButtonList(queryButton).then(({data}) => {
+ if (JSON.stringify(data.data) != '{}') {
+ this.pageLanguage = data.data
+
+ } else {
+ saveButtonList(this.pageLanguageList).then(({data}) => {
+ this.getFunctionButtonList()
+ })
+ }
+ })
+ },
// 注3:增加语言切换函数
switch_the_language(val) {
localStorage.setItem('locale', val)
@@ -190,6 +251,10 @@
}).catch(() => {
})
}
+ },
+ created() {
+ this.getLanguageList()
+ this.getFunctionButtonList()
}
}
diff --git a/src/views/main-sidebar.vue b/src/views/main-sidebar.vue
index ec36444..3870d66 100644
--- a/src/views/main-sidebar.vue
+++ b/src/views/main-sidebar.vue
@@ -14,22 +14,9 @@
- {{ $t('commonhomePage') }}
+ {{ pageLanguage.homePage }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
{
+ if (JSON.stringify(data.data) != '{}') {
+ this.pageLanguage = data.data
+ }
+ })
+ },
// 用户收藏夹
userFavorites() {
let query = {
@@ -175,19 +184,19 @@ export default {
menuSum = Array.from(new Set([...menuSum]))
if (menuSum.length > 0) {
- let menuList = menuSum.filter(item => item.parentId == 0);
- this.menuList=menuList
- this.treeList(menuList,menuSum)
+ let menuList = menuSum.filter(item => item.parentId == 0);
+ this.menuList = menuList
+ this.treeList(menuList, menuSum)
}
}
},
// 封装树形结构
- treeList(menuList,menuSum) {
+ treeList(menuList, menuSum) {
for (let m1 of menuList) {
for (let m2 of menuSum) {
- if (m1.menuId == m2.parentId){
+ if (m1.menuId == m2.parentId) {
m1.list.push(m2)
- this.treeList( m1.list,menuSum)
+ this.treeList(m1.list, menuSum)
}
}
}
diff --git a/src/views/modules/common/Chooselist.vue b/src/views/modules/common/Chooselist.vue
index 43e7e9a..8cb5895 100644
--- a/src/views/modules/common/Chooselist.vue
+++ b/src/views/modules/common/Chooselist.vue
@@ -139,7 +139,7 @@ export default {
prop = item.substring(index2+1,l)
}
let column = {
- "columnProp":prop,
+ "columnProp":prop.trim(),
"columnLabel": name,
"columnHidden": false,
"columnImage": false,
diff --git a/src/views/modules/sys/language/common.vue b/src/views/modules/sys/language/common.vue
index a38c6e1..f5ad180 100644
--- a/src/views/modules/sys/language/common.vue
+++ b/src/views/modules/sys/language/common.vue
@@ -7,7 +7,7 @@
-
+
@@ -30,8 +30,6 @@
class="el-button el-button--primary el-button--medium">
{{ buttons.download }}
-
- {{ buttons.list }}
@@ -82,11 +80,22 @@
-
-
+
+
+
+
+
+
+ {{ buttons.search }}
+
+
+ {{ buttons.addList }}
+
+
+