cloud-web-corejs 1.0.54-dev.613 → 1.0.54-dev.614

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.613",
4
+ "version": "1.0.54-dev.614",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -173,7 +173,7 @@
173
173
  v-if="showMenuModal"
174
174
  ></div>
175
175
  <el-dialog
176
- title="切换组织"
176
+ :title="$t1('切换组织')"
177
177
  width="355px"
178
178
  custom-class="dialog-style list-dialog"
179
179
  v-if="showCompanyDialog"
@@ -186,7 +186,11 @@
186
186
  @close="changeCompanyClose"
187
187
  >
188
188
  <div class="cont">
189
- <el-input placeholder="搜索" class="search-btn" v-model="filterText"></el-input>
189
+ <el-input
190
+ :placeholder="$t1('搜索')"
191
+ class="search-btn"
192
+ v-model="filterText"
193
+ ></el-input>
190
194
  <el-tree
191
195
  :props="defaultProps"
192
196
  :load="loadNode"
@@ -414,9 +418,9 @@ export default {
414
418
  window.open(path);
415
419
  },
416
420
  });
417
- } else{
418
- if (path.indexOf('token={token}') >= 0) {
419
- path = path.replace('token={token}', 'token=' + getToken())
421
+ } else {
422
+ if (path.indexOf("token={token}") >= 0) {
423
+ path = path.replace("token={token}", "token=" + getToken());
420
424
  }
421
425
  window.open(path);
422
426
  }
@@ -610,7 +614,7 @@ export default {
610
614
  let parentLabel = companyCode ? node.label : null;
611
615
  datas.forEach((item) => {
612
616
  item.leaf = !item.hasChild;
613
- let label = item.companyName;
617
+ let label = this.$t1(item.companyName);
614
618
  /*if(companyCode){
615
619
  label = label + '('+companyTypeMap[item.companyType]+')'
616
620
  }*/
@@ -1,14 +1,18 @@
1
1
  <template>
2
- <div class="item" v-if="i18nEnabled && languageSettings.length>1">
3
- <el-dropdown class='lang-box' trigger="click">
4
- <span class="el-dropdown-link">
5
- <i class="iconfont icon-duoyuyan"></i><i
6
- class="el-icon-arrow-down el-icon--right"></i>
7
- </span>
2
+ <div class="item" v-if="i18nEnabled && languageSettings.length > 1">
3
+ <el-dropdown class="lang-box" trigger="click">
4
+ <span class="el-dropdown-link">
5
+ <i class="iconfont icon-duoyuyan"></i
6
+ ><i class="el-icon-arrow-down el-icon--right"></i>
7
+ </span>
8
8
  <el-dropdown-menu slot="dropdown" class="lang-box-pup">
9
- <el-dropdown-item v-for="(item,index) in languageSettings" :key="index" :command="item.languageCode"
10
- @click.native="changeLanguage(item.languageCode)"
11
- :class="{'cur':currentName == item.languageName}">{{ item.languageName }}
9
+ <el-dropdown-item
10
+ v-for="(item, index) in languageSettings"
11
+ :key="index"
12
+ :command="item.languageCode"
13
+ @click.native="changeLanguage(item.languageCode)"
14
+ :class="{ cur: currentName == item.languageName }"
15
+ >{{ $t1(item.languageName) }}
12
16
  </el-dropdown-item>
13
17
  </el-dropdown-menu>
14
18
  </el-dropdown>
@@ -24,13 +28,13 @@ export default {
24
28
  return {
25
29
  languageSettings: [],
26
30
  languageSettingMap: {},
27
- i18nEnabled: settingConfig.i18nEnabled
28
- }
31
+ i18nEnabled: settingConfig.i18nEnabled,
32
+ };
29
33
  },
30
34
  computed: {
31
35
  currentName() {
32
- return this.languageSettingMap[this.$i18n.locale]
33
- }
36
+ return this.languageSettingMap[this.$i18n.locale];
37
+ },
34
38
  },
35
39
  mounted() {
36
40
  this.initLanguageSetting();
@@ -42,33 +46,33 @@ export default {
42
46
  url: USER_PREFIX + `/auth/switchLanguage`,
43
47
  method: `post`,
44
48
  data: {
45
- "stringOne": command
49
+ stringOne: command,
46
50
  },
47
51
  isLoading: true,
48
52
  modalStrictly: true,
49
53
  loadingTarget: document.body,
50
- success: res => {
51
- this.$i18n.locale = command // 设置给本地的i18n插件
54
+ success: (res) => {
55
+ this.$i18n.locale = command; // 设置给本地的i18n插件
52
56
  localStorage.setItem("i18n-lang", command);
53
- this.$message.success('切换多语言成功')
54
- location.reload()
55
- }
56
- })
57
+ this.$message.success("切换多语言成功");
58
+ location.reload();
59
+ },
60
+ });
57
61
  }
58
62
  },
59
63
  initLanguageSetting() {
60
64
  if (settingConfig.i18nEnabled !== true) return;
61
- let languageSettings = []
62
- languageSettings.push(...(this.$store.state.user.languageSettings));
65
+ let languageSettings = [];
66
+ languageSettings.push(...this.$store.state.user.languageSettings);
63
67
  let map = {};
64
- languageSettings.forEach(item => {
68
+ languageSettings.forEach((item) => {
65
69
  map[item.languageCode] = item.languageName;
66
70
  });
67
71
  this.languageSettingMap = map;
68
72
  this.languageSettings = languageSettings;
69
73
  },
70
- }
71
- }
74
+ },
75
+ };
72
76
  </script>
73
77
  <style scoped lang="scss">
74
78
  /*多语言*/
@@ -78,7 +82,7 @@ export default {
78
82
  height: 18px;
79
83
  line-height: 18px;
80
84
  vertical-align: middle;
81
- color: #FFF;
85
+ color: #fff;
82
86
  font-size: 12px;
83
87
 
84
88
  .el-icon--right {
@@ -86,7 +90,7 @@ export default {
86
90
  }
87
91
 
88
92
  .el-dropdown-link {
89
- color: #FFF;
93
+ color: #fff;
90
94
 
91
95
  .name {
92
96
  display: inline-block;
@@ -95,7 +99,7 @@ export default {
95
99
  overflow: hidden;
96
100
  vertical-align: middle;
97
101
  font-size: 12px;
98
- line-height: 19px
102
+ line-height: 19px;
99
103
  }
100
104
 
101
105
  i {
@@ -110,7 +114,6 @@ export default {
110
114
  }
111
115
  }
112
116
  }
113
-
114
117
  }
115
118
 
116
119
  .lang-box-pup .el-dropdown-menu__item.cur {