n20-common-lib 2.8.33 → 2.8.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.8.33",
3
+ "version": "2.8.35",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -51,7 +51,7 @@
51
51
  </el-select>
52
52
 
53
53
  <el-select
54
- v-if="addTaskMode === '0' || addTaskWay === '2'"
54
+ v-if="addTaskModel === '0' || addTaskWay === '2'"
55
55
  v-model="addTaskType"
56
56
  disabled
57
57
  clearable
@@ -53,8 +53,7 @@
53
53
  '回到应用' | $lc
54
54
  }}</el-button>
55
55
  <!-- YSCW-end -->
56
- <el-dropdown v-if="!hideLang" class="m-l-lg" @command="setLang">
57
- <!-- <el-tooltip v-if="!hideLang" :content="'语言切换' | $lc"> -->
56
+ <el-dropdown v-if="!hideLang && langMap.length > 1" class="m-l-lg" @command="setLang">
58
57
  <i
59
58
  v-if="['th', 'vi'].includes(langVal)"
60
59
  style="font-size: 20px"
@@ -73,22 +72,21 @@
73
72
  }"
74
73
  ></span>
75
74
 
76
- <!-- </el-tooltip> -->
77
75
  <el-dropdown-menu slot="dropdown">
78
- <el-dropdown-item command="zh-cn"
76
+ <el-dropdown-item v-if="langMap.includes('zh-cn')" command="zh-cn"
79
77
  ><i class="iconfont icon-zhongwen f-s-icon"></i>{{ '简体中文' | $lc }}</el-dropdown-item
80
78
  >
81
- <el-dropdown-item command="zh-hk"
79
+ <el-dropdown-item v-if="langMap.includes('zh-hk')" command="zh-hk"
82
80
  ><i class="iconfont icon-fanti f-s-icon"></i>{{ '繁体中文' | $lc }}</el-dropdown-item
83
81
  >
84
- <el-dropdown-item command="en"
82
+ <el-dropdown-item v-if="langMap.includes('en')" command="en"
85
83
  ><i class="iconfont icon-yuyanqiehuan f-s-icon"></i>{{ '英文' | $lc }}</el-dropdown-item
86
84
  >
87
- <el-dropdown-item command="th"
85
+ <el-dropdown-item v-if="langMap.includes('th')" command="th"
88
86
  ><i class="n20-icon-yuyanqiehuan f-s-icon"></i>{{ '泰文' | $lc }}</el-dropdown-item
89
87
  >
90
- <el-dropdown-item command="vi"
91
- ><i class="n20-icon-a-yuenanyuyanqiehuan_huaban1 f-s-icon"></i>{{ '越文' | $lc }}</el-dropdown-item
88
+ <el-dropdown-item v-if="langMap.includes('vi')" command="vi"
89
+ ><i class="n20-icon-a-yuenanyuyanqiehuan_huaban1 f-s-icon"></i>{{ '越南语' | $lc }}</el-dropdown-item
92
90
  >
93
91
  </el-dropdown-menu>
94
92
  </el-dropdown>
@@ -440,6 +438,7 @@ export default {
440
438
  },
441
439
  data() {
442
440
  return {
441
+ langMap: [],
443
442
  systemList: [],
444
443
  show: false,
445
444
  headerLogoUrl: undefined,
@@ -477,7 +476,7 @@ export default {
477
476
  byLabel: '',
478
477
  byEV: false,
479
478
  headerUserInfoBg: realUrl('/server-assets/userInfoBg.png'),
480
- inBack: window.localStorage.getItem('pageInType') === 'inBack'
479
+ inBack: window.sessionStorage.getItem('pageInType') === 'inBack'
481
480
  }
482
481
  },
483
482
  computed: {
@@ -497,6 +496,7 @@ export default {
497
496
  this.headerBgColor = _layoutData.headerBgColor
498
497
  this.hideHelpDoc = _layoutData.hideHelpDoc
499
498
  this.hideLang = _layoutData.hideLang
499
+ this.langMap = _layoutData.lang
500
500
  this.hideDowApp = _layoutData.hideDowApp
501
501
  this.hideTheme = _layoutData.hideTheme
502
502
  this.showNavigation = _layoutData.showNavigation
@@ -581,7 +581,7 @@ export default {
581
581
  },
582
582
  async clickSystemChange(item) {
583
583
  await this.getTreeList(item)
584
- // localStorage.setItem('pageInType', 'toFront')
584
+ // sessionStorage.setItem('pageInType', 'toFront')
585
585
  window.localStorage.setItem('pageInSystemNo', item.NO)
586
586
  // 切换系统的时候清除缓存的页签
587
587
  window.sessionStorage.removeItem('tab-list')
@@ -814,7 +814,7 @@ export default {
814
814
  this.themeV = true
815
815
  },
816
816
  toBack() {
817
- window.localStorage.setItem('pageInType', 'toBack')
817
+ window.sessionStorage.setItem('pageInType', 'toBack')
818
818
 
819
819
  let { base = '/' } = this.$router.options
820
820
  if (!/\/$/.test(base)) base += '/'
@@ -822,7 +822,7 @@ export default {
822
822
  window.location.href = window.location.origin + base + 'dashboard/workplace'
823
823
  },
824
824
  toSystem() {
825
- window.localStorage.setItem('pageInType', 'toFront')
825
+ window.sessionStorage.setItem('pageInType', 'toFront')
826
826
 
827
827
  let { base = '/' } = this.$router.options
828
828
  if (!/\/$/.test(base)) base += '/'
@@ -63,7 +63,7 @@ export default {
63
63
  async clickMenu(row, MenuTre) {
64
64
  window.sessionStorage.setItem('navFlog', true)
65
65
  let pageInSystemNo = window.localStorage.getItem('pageInSystemNo')
66
- window.localStorage.setItem('pageInType', 'toFront')
66
+ window.sessionStorage.setItem('pageInType', 'toFront')
67
67
  if (pageInSystemNo === row.systemNo) {
68
68
  this.$emit('clickMenu', false)
69
69
  if (row?.children?.length) {
@@ -267,13 +267,13 @@ export default {
267
267
  this.tabList = tabList
268
268
  },
269
269
  setTabList() {
270
- let pageInType = localStorage.getItem('pageInType')
270
+ let pageInType = sessionStorage.getItem('pageInType')
271
271
  if (pageInType === 'toFront') {
272
272
  window.sessionStorage.removeItem('tab-list')
273
- window.localStorage.setItem('pageInType', 'inFront')
273
+ window.sessionStorage.setItem('pageInType', 'inFront')
274
274
  } else if (pageInType === 'toBack') {
275
275
  window.sessionStorage.removeItem('tab-list')
276
- window.localStorage.setItem('pageInType', 'inBack')
276
+ window.sessionStorage.setItem('pageInType', 'inBack')
277
277
  } else {
278
278
  window.sessionStorage.setItem('tab-list', JSON.stringify(this.tabList))
279
279
  }
@@ -95,13 +95,22 @@
95
95
  @changType="getChangetype"
96
96
  >
97
97
  <div slot="header" class="login-form-header m-b text-c">
98
- <el-dropdown class="m-l-lg login-language-box" @command="setLang">
98
+ <el-dropdown
99
+ v-if="!jsonData.hideLang && jsonData.lang.length > 1"
100
+ class="m-l-lg login-language-box"
101
+ @command="setLang"
102
+ >
99
103
  <span>{{ langMap[langVal] | $lc }}<i class="el-icon-arrow-down el-icon--right"></i></span>
100
104
  <el-dropdown-menu slot="dropdown">
101
- <el-dropdown-item command="zh-cn">{{ '简体中文' | $lc }}</el-dropdown-item>
102
- <el-dropdown-item command="zh-hk">{{ '繁体中文' | $lc }}</el-dropdown-item>
103
- <el-dropdown-item command="en">{{ '英文' | $lc }}</el-dropdown-item>
104
- <el-dropdown-item command="th">{{ '泰文' | $lc }}</el-dropdown-item>
105
+ <el-dropdown-item v-if="jsonData.lang.includes('zh-cn')" command="zh-cn">{{
106
+ '简体中文' | $lc
107
+ }}</el-dropdown-item>
108
+ <el-dropdown-item v-if="jsonData.lang.includes('zh-hk')" command="zh-hk">{{
109
+ '繁体中文' | $lc
110
+ }}</el-dropdown-item>
111
+ <el-dropdown-item v-if="jsonData.lang.includes('en')" command="en">{{ '英文' | $lc }}</el-dropdown-item>
112
+ <el-dropdown-item v-if="jsonData.lang.includes('th')" command="th">{{ '泰文' | $lc }}</el-dropdown-item>
113
+ <el-dropdown-item v-if="jsonData.lang.includes('vi')" command="vi">{{ '越南语' | $lc }}</el-dropdown-item>
105
114
  </el-dropdown-menu>
106
115
  </el-dropdown>
107
116
  <slot name="header">{{ '欢 迎 登 录' | $lc }}</slot>
@@ -214,7 +223,8 @@ export default {
214
223
  'zh-cn': '简体中文',
215
224
  'zh-hk': '繁体中文',
216
225
  en: '英文',
217
- th: '泰文'
226
+ th: '泰文',
227
+ vi: '越南语'
218
228
  },
219
229
  wrapStyle: '',
220
230
  logUrl: `${protocol}//${host}${pathname}`,
@@ -227,7 +237,8 @@ export default {
227
237
  loginLogoText: undefined,
228
238
  loginCopyright: undefined,
229
239
  loginSloganHtml: undefined,
230
- hideLang: undefined
240
+ hideLang: undefined,
241
+ lang: []
231
242
  },
232
243
  langVal: window.localStorage.getItem('pageLang') || 'zh-cn',
233
244
  operateType: 'login',
@@ -390,7 +401,7 @@ export default {
390
401
 
391
402
  this.init()
392
403
  this.getIsImgCode()
393
- localStorage.removeItem('pageInType')
404
+ sessionStorage.removeItem('pageInType')
394
405
  },
395
406
  beforeDestroy() {},
396
407
  methods: {
@@ -584,12 +595,11 @@ export default {
584
595
  },
585
596
  selSystem(item) {
586
597
  localStorage.setItem('pageInSystemNo', item.NO)
587
- localStorage.setItem('pageInType', 'inFront')
598
+ sessionStorage.setItem('pageInType', 'inFront')
588
599
  this.sltSys = item
589
600
  },
590
601
  setLang(val) {
591
602
  this.langVal = val
592
-
593
603
  window.localStorage.setItem('pageLang', this.langVal)
594
604
  Cookies.set('language', ['zh-cn', 'zh-hk'].includes(this.langVal) ? 'zh' : this.langVal, { expires: 365 })
595
605
  auth.setReqLang()
package/src/i18n.json CHANGED
@@ -1,4 +1,54 @@
1
1
  {
2
+ "财司综合业务系统": {
3
+ "en": "Corporate Finance System",
4
+ "th": "ระบบการเงินองค์กร",
5
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
6
+ },
7
+ "财司业务管理系统": {
8
+ "en": "Corporate Finance System",
9
+ "th": "ระบบการเงินองค์กร",
10
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
11
+ },
12
+ "财司辅助决策系统": {
13
+ "en": "Corporate Finance System",
14
+ "th": "ระบบการเงินองค์กร",
15
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
16
+ },
17
+ "财司网银系统": {
18
+ "en": "Corporate Finance System",
19
+ "th": "ระบบการเงินธุรกิจ",
20
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
21
+ },
22
+ "财司直连平台系统": {
23
+ "en": "Corporate Finance System",
24
+ "th": "ระบบการเงินธุรกิจ",
25
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
26
+ },
27
+ "金融网关系统": {
28
+ "en": "Corporate Finance System",
29
+ "th": "ระบบการเงินธุรกิจ",
30
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
31
+ },
32
+ "集团司库业务管控系统": {
33
+ "en": "Corporate Finance System",
34
+ "th": "ระบบการจัดการเงินสำหรับกลุ่ม",
35
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
36
+ },
37
+ "集团数据分析系统": {
38
+ "en": "Corporate Finance System",
39
+ "th": "ระบบการจัดการเงินสำหรับกลุ่ม",
40
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
41
+ },
42
+ "致用助手": {
43
+ "en": "Corporate Finance System",
44
+ "th": "ระบบการเงินธุรกิจ",
45
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
46
+ },
47
+ "金融风险管控系统": {
48
+ "en": "Corporate Finance System",
49
+ "th": "ระบบการจัดการเงินสำหรับกลุ่ม",
50
+ "vi": "Hệ thống Quản lý Tài chính Công ty"
51
+ },
2
52
  "筛选": {
3
53
  "en": "Filter",
4
54
  "th": "กรอง",
@@ -449,7 +499,7 @@
449
499
  "th": "ไทย",
450
500
  "vi": "Tiếng Thái"
451
501
  },
452
- "越文": {
502
+ "越南语": {
453
503
  "en": "Vietnamese",
454
504
  "th": "เวียด",
455
505
  "vi": "Tiếng Việt"