mooho-base-admin-plus 0.1.69 → 0.4.1

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.
Files changed (109) hide show
  1. package/dist/mooho-base-admin-plus.min.esm.js +17680 -18012
  2. package/dist/mooho-base-admin-plus.min.js +77 -67
  3. package/dist/setting.js +6 -17
  4. package/dist/style.css +1 -1
  5. package/package.json +2 -2
  6. package/public/setting.js +6 -17
  7. package/src/api/customModel.js +1 -1
  8. package/src/api/dataSource.js +1 -1
  9. package/src/api/dataView.js +1 -1
  10. package/src/api/i18nText +33 -0
  11. package/src/api/model.js +1 -1
  12. package/src/components/home/notice-list.vue +2 -2
  13. package/src/components/home/shortcut.vue +9 -9
  14. package/src/components/input/dialog-select.vue +3 -3
  15. package/src/components/input/item-select.vue +5 -5
  16. package/src/components/upload/upload-attachment.vue +13 -3
  17. package/src/components/upload/upload-image.vue +2 -2
  18. package/src/components/view/column-check.vue +3 -3
  19. package/src/components/view/column-edit.vue +18 -18
  20. package/src/components/view/column-select.vue +4 -4
  21. package/src/components/view/condition-edit.vue +10 -10
  22. package/src/components/view/filter-edit.vue +30 -13
  23. package/src/components/view/filter-setting.vue +8 -8
  24. package/src/components/view/form-setting-layout.vue +37 -39
  25. package/src/components/view/form-setting.vue +18 -18
  26. package/src/components/view/group-column.vue +5 -5
  27. package/src/components/view/group-method.vue +5 -5
  28. package/src/components/view/modal-form-filter.vue +28 -25
  29. package/src/components/view/modal-form-sort.vue +32 -27
  30. package/src/components/view/modal-form.vue +30 -8
  31. package/src/components/view/modal-table.vue +22 -2
  32. package/src/components/view/table-filter.vue +18 -11
  33. package/src/components/view/table-setting.vue +30 -42
  34. package/src/components/view/view-chart.vue +6 -6
  35. package/src/components/view/view-form-draggable.vue +3 -3
  36. package/src/components/view/view-form.vue +23 -13
  37. package/src/components/view/view-table.vue +83 -39
  38. package/src/components/workflow/flow-chart.vue +22 -23
  39. package/src/i18n/index.js +43 -6
  40. package/src/i18n/locale/en-US.js +1 -1
  41. package/src/i18n/locale/lang.js +1 -1
  42. package/src/i18n/locale/zh-CN.js +1 -1
  43. package/src/index.js +12 -7
  44. package/src/layouts/basic-layout/header-breadcrumb/index.vue +18 -3
  45. package/src/layouts/basic-layout/header-i18n/index.vue +5 -6
  46. package/src/layouts/basic-layout/header-notice/index.vue +2 -2
  47. package/src/layouts/basic-layout/header-search/index.vue +3 -3
  48. package/src/layouts/basic-layout/header-user/index.vue +18 -18
  49. package/src/layouts/basic-layout/menu-side/index.vue +9 -3
  50. package/src/layouts/basic-layout/menu-side/menu-title.vue +5 -4
  51. package/src/layouts/basic-layout/mixins/click-item.js +21 -21
  52. package/src/layouts/basic-layout/mixins/sider-menu-badge.js +13 -13
  53. package/src/layouts/basic-layout/mixins/translate-title.js +11 -11
  54. package/src/layouts/basic-layout/tabs/index.vue +4 -4
  55. package/src/layouts/basic-layout/water-mark/index.vue +29 -29
  56. package/src/libs/random_str.js +10 -10
  57. package/src/libs/request/index.js +18 -4
  58. package/src/libs/water-mark.js +44 -44
  59. package/src/mixins/page.js +72 -18
  60. package/src/pages/account/login.vue +6 -6
  61. package/src/pages/common/task-form.vue +33 -33
  62. package/src/pages/common/todo.vue +1 -1
  63. package/src/pages/system/apiLog.vue +7 -7
  64. package/src/pages/system/applicationType.vue +6 -6
  65. package/src/pages/system/customTable.vue +7 -7
  66. package/src/pages/system/dict.vue +1 -1
  67. package/src/pages/system/dictType.vue +4 -4
  68. package/src/pages/system/entityView.vue +3 -3
  69. package/src/pages/system/error/404.vue +1 -1
  70. package/src/pages/system/extendColumn.vue +7 -7
  71. package/src/pages/system/formView.vue +10 -10
  72. package/src/pages/system/i18nText.vue +98 -0
  73. package/src/pages/system/log.vue +4 -4
  74. package/src/pages/system/openUser.vue +5 -5
  75. package/src/pages/system/organization.vue +1 -1
  76. package/src/pages/system/permission.vue +5 -5
  77. package/src/pages/system/planJob.vue +3 -3
  78. package/src/pages/system/process.vue +10 -10
  79. package/src/pages/system/role.vue +18 -18
  80. package/src/pages/system/rolePropertyEdit.vue +83 -100
  81. package/src/pages/system/systemData.vue +4 -4
  82. package/src/pages/system/tableView.vue +17 -17
  83. package/src/pages/system/taskQueue.vue +13 -6
  84. package/src/pages/system/user.vue +17 -17
  85. package/src/pages/template/processPage.vue +22 -22
  86. package/src/plugins/sweetalert2/index.js +1 -5
  87. package/src/router/dynamic.js +7 -6
  88. package/src/setting.js +1 -14
  89. package/src/store/modules/admin/modules/account.js +3 -4
  90. package/src/store/modules/admin/modules/i18n.js +41 -42
  91. package/src/store/modules/admin/modules/menu.js +1 -0
  92. package/src/styles/common.less +47 -47
  93. package/src/styles/css/default.css +4 -0
  94. package/src/styles/default/index.less +6 -6
  95. package/src/styles/font/iconfont.css +47 -47
  96. package/src/styles/font/iconfont.json +65 -65
  97. package/src/styles/layout/basic-layout/layout.less +527 -527
  98. package/src/styles/layout/basic-layout/menu.less +274 -274
  99. package/src/styles/layout/index.less +2 -2
  100. package/src/styles/setting.less +6 -6
  101. package/test/api/barcode.js +1 -1
  102. package/test/api/inbound.js +1 -1
  103. package/test/api/movePlan.js +1 -1
  104. package/test/api/outbound.js +1 -1
  105. package/test/main.js +3 -3
  106. package/test/router/routes.js +2 -2
  107. package/src/i18n/locale.js +0 -102
  108. package/src/layouts/basic-layout/i18n.js +0 -50
  109. package/src/plugins/log/index.js +0 -25
@@ -6,22 +6,22 @@
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
7
  <view-table ref="table" view-code="User" @create="$refs.form.open()">
8
8
  <template #command="{ row }">
9
- <Button size="small" title="角色" type="info" custom-icon="fa fa-users" @click="$refs.userRoleTable.open({ userID: row.id })"></Button>
10
- <Button size="small" title="编辑" type="primary" custom-icon="fa fa-edit" @click="$refs.form.open(row)"></Button>
11
- <Button size="small" title="数据权限" type="primary" custom-icon="fa fa-sitemap" @click="openDataPermission(row)"></Button>
12
- <Button size="small" title="删除" type="warning" custom-icon="fa fa-trash-alt" @click="$refs.table.remove(row)"></Button>
9
+ <Button size="small" :title="$t('Front_Btn_Role')" type="info" custom-icon="fa fa-users" @click="$refs.userRoleTable.open({ userID: row.id })"></Button>
10
+ <Button size="small" :title="$t('Front_Btn_Edit')" type="primary" custom-icon="fa fa-edit" @click="$refs.form.open(row)"></Button>
11
+ <Button size="small" :title="$t('Front_Btn_Data_Permission')" type="primary" custom-icon="fa fa-sitemap" @click="openDataPermission(row)"></Button>
12
+ <Button size="small" :title="$t('Front_Btn_Remove')" type="warning" custom-icon="fa fa-trash-alt" @click="$refs.table.remove(row)"></Button>
13
13
  </template>
14
14
  </view-table>
15
15
  </Card>
16
16
  <modal-form ref="form" view-code="UserEdit" @on-after-save="$refs.table.loadData()">
17
17
  <template #footer>
18
- <Button type="primary" custom-icon="fa fa-save" @click="$refs.form.onSave()">保存</Button>
19
- <Button type="primary" custom-icon="fa fa-user-lock" @click="resetPassword">重置密码</Button>
18
+ <Button type="primary" custom-icon="fa fa-save" @click="$refs.form.onSave()">{{ $t('Front_Btn_Save') }}</Button>
19
+ <Button type="primary" custom-icon="fa fa-user-lock" @click="resetPassword">{{ $t('Front_Btn_Reset_Password') }}</Button>
20
20
  </template>
21
21
  </modal-form>
22
22
  <modal-table ref="userRoleTable" view-code="UserRole" @edit="({ row }) => editUserRole(row)">
23
23
  <template #filterCommand>
24
- <Button size="small" type="primary" custom-icon="fa fa-plus" @click="addUserRole()">添加</Button>
24
+ <Button size="small" type="primary" custom-icon="fa fa-plus" @click="addUserRole()">{{ $t('Front_Btn_Add') }}</Button>
25
25
  </template>
26
26
  </modal-table>
27
27
  <modal-form ref="userRoleForm" view-code="UserRoleEdit" @on-after-save="$refs.userRoleTable.loadData()" @on-change="userRoleChange">
@@ -67,12 +67,12 @@
67
67
  </view-table>
68
68
  </template>
69
69
  <template #footer>
70
- <Button type="primary" custom-icon="fa fa-save" @click="userRoleSave">保存</Button>
70
+ <Button type="primary" custom-icon="fa fa-save" @click="userRoleSave">{{ $t('Front_Btn_Save') }}</Button>
71
71
  </template>
72
72
  </modal-form>
73
73
  <modal-form ref="dataPermissionForm" view-code="DataPermission">
74
74
  <template #footer>
75
- <Button type="primary" custom-icon="fa fa-save" @click="saveDataPermission">保存</Button>
75
+ <Button type="primary" custom-icon="fa fa-save" @click="saveDataPermission">{{ $t('Front_Btn_Save') }}</Button>
76
76
  </template>
77
77
  </modal-form>
78
78
  </div>
@@ -116,7 +116,7 @@
116
116
  for (let i = 0; i < this.roleProperties.length; i++) {
117
117
  let item = this.roleProperties[i];
118
118
  if (!!(item.source || '').trim()) {
119
- if (item.controlType === 'Select') {
119
+ if (item.controlType === 'Select' || item.controlType === 'MultiSelect') {
120
120
  item._dataSource = [];
121
121
  let param = this.getParam(item);
122
122
 
@@ -181,9 +181,9 @@
181
181
  let isOK = await this.$refs.userRoleForm.validate();
182
182
 
183
183
  if (!isOK) {
184
- this.error('有内容不符合要求,请正确填写!');
184
+ this.error('Front_Msg_Form_Validate_Fail');
185
185
  } else {
186
- this.confirm('确定要保存吗?', async () => {
186
+ this.confirm('Front_Msg_Sure_To_Save', async () => {
187
187
  let userRole = this.$refs.userRoleForm.getFullData();
188
188
 
189
189
  if (!userRole) {
@@ -204,7 +204,7 @@
204
204
  await modelApi.update('UserRole', data);
205
205
  }
206
206
 
207
- this.success('操作成功!', () => {
207
+ this.success('Front_Msg_Success', () => {
208
208
  this.$refs.userRoleDataTable.loadData([]);
209
209
  this.$refs.userRoleTable.loadData();
210
210
  this.$refs.userRoleForm.close();
@@ -247,9 +247,9 @@
247
247
  },
248
248
  // 重置密码
249
249
  async resetPassword() {
250
- this.confirm('确定要重置该用户的密码吗?', async () => {
250
+ this.confirm('Front_Msg_Sure_To_Reset_Password', async () => {
251
251
  await userApi.resetPassword(this.$refs.form.data.id);
252
- this.success('已重置为初始密码!');
252
+ this.success('Front_Msg_Reset_Password_Success');
253
253
  });
254
254
  },
255
255
  // 打开数据权限
@@ -273,9 +273,9 @@
273
273
 
274
274
  this.user.dataPermission = JSON.stringify(data);
275
275
 
276
- this.confirm('确定要保存数据权限吗?', async () => {
276
+ this.confirm('Front_Msg_Sure_To_Save', async () => {
277
277
  await modelApi.update('User', this.user);
278
- this.success('操作成功!');
278
+ this.success('Front_Msg_Success');
279
279
  this.$refs.dataPermissionForm.close();
280
280
  });
281
281
  }
@@ -9,7 +9,7 @@
9
9
  <Button
10
10
  size="small"
11
11
  v-if="row.application.status != 'Draft' && row.application.status != 'Rejected'"
12
- title="详细"
12
+ :title="$t('Front_Btn_Detail')"
13
13
  type="info"
14
14
  custom-icon="fa fa-file-alt"
15
15
  @click="$refs.showForm.open(row)"
@@ -17,7 +17,7 @@
17
17
  <Button
18
18
  size="small"
19
19
  v-if="(row.application.status == 'Draft' || row.application.status == 'Rejected') && row.application.applicantID == info.id"
20
- title="编辑"
20
+ :title="$t('Front_Btn_Edit')"
21
21
  type="primary"
22
22
  custom-icon="fa fa-edit"
23
23
  @click="$refs.form.open(row)"
@@ -28,8 +28,8 @@
28
28
  <modal-form ref="form" v-if="page" @on-after-save="$refs.table.loadData()">
29
29
  <template #footer>
30
30
  <span></span>
31
- <Button type="primary" custom-icon="fa fa-cloud-upload-alt" @click="submit">提交</Button>
32
- <Button type="primary" custom-icon="fa fa-save" @click="save">保存</Button>
31
+ <Button type="primary" custom-icon="fa fa-cloud-upload-alt" @click="submit">{{ $t('Front_Btn_Submit') }}</Button>
32
+ <Button type="primary" custom-icon="fa fa-save" @click="save">{{ $t('Front_Btn_Save') }}</Button>
33
33
  <Button
34
34
  type="warning"
35
35
  v-if="
@@ -42,7 +42,7 @@
42
42
  custom-icon="fa fa-trash-alt"
43
43
  @click="cancel"
44
44
  >
45
- 撤销
45
+ {{ $t('Front_Btn_Cancel') }}
46
46
  </Button>
47
47
  <Button
48
48
  type="info"
@@ -50,7 +50,7 @@
50
50
  custom-icon="fa fa-history"
51
51
  @click="$refs.approvalHistoryTable.open({ processInstID: $refs.form.data.application.processInstID })"
52
52
  >
53
- 历史
53
+ {{ $t('Front_Btn_History') }}
54
54
  </Button>
55
55
  </template>
56
56
  </modal-form>
@@ -78,8 +78,8 @@
78
78
  <Modal v-model="messageOpened" scrollable>
79
79
  <template #header>
80
80
  <div>
81
- <span class="title">意见发表</span>
82
- <span class="description">Message</span>
81
+ <span class="title">{{ $t('Front_Label_Leave_Message') }}</span>
82
+ <span class="description">{{ $t('Front_Label_Leave_Message_Desc') }}</span>
83
83
  </div>
84
84
  </template>
85
85
  <div class="ivu-ml-8 ivu-mr-8">
@@ -87,12 +87,12 @@
87
87
  <Row :gutter="24" type="flex">
88
88
  <Col v-bind="grid24">
89
89
  <FormItem
90
- label="意见内容"
90
+ :label="$t('Front_Label_Message_Content')"
91
91
  key="message"
92
92
  prop="message"
93
93
  :rules="{
94
94
  required: true,
95
- message: '请输入',
95
+ message: this.tParam('Front_Msg_Please_Input|' + this.$t('Front_Label_Message_Content')),
96
96
  trigger: 'blur,change'
97
97
  }"
98
98
  >
@@ -103,8 +103,8 @@
103
103
  </Form>
104
104
  </div>
105
105
  <template #footer>
106
- <Button type="primary" custom-icon="fa fa-check" @click="submitMessage">提交</Button>
107
- <Button type="default" custom-icon="fa fa-times" @click="messageOpened = false">关闭</Button>
106
+ <Button type="primary" custom-icon="fa fa-check" @click="submitMessage">{{ $t('Front_Btn_Submit') }}</Button>
107
+ <Button type="default" custom-icon="fa fa-times" @click="messageOpened = false">{{ $t('Front_Btn_Close') }}</Button>
108
108
  </template>
109
109
  </Modal>
110
110
  </div>
@@ -176,7 +176,7 @@
176
176
  let isOK = await this.$refs.form.validate();
177
177
 
178
178
  if (!isOK) {
179
- this.error('有内容不符合要求,请正确填写!');
179
+ this.error('Front_Msg_Form_Validate_Fail');
180
180
  } else {
181
181
  let data = this.$refs.form.getFullData();
182
182
 
@@ -185,10 +185,10 @@
185
185
  return;
186
186
  }
187
187
 
188
- this.confirm('确定要提交吗?', async () => {
188
+ this.confirm('Front_Msg_Sure_To_Submit', async () => {
189
189
  await applicationApi.submit(this.page.applicationTypeID, data);
190
190
 
191
- this.success('提交成功!', () => {
191
+ this.success('Front_Msg_Success', () => {
192
192
  this.$refs.table.loadData();
193
193
  this.$refs.form.close();
194
194
  });
@@ -204,10 +204,10 @@
204
204
  return;
205
205
  }
206
206
 
207
- this.confirm('确定要保存吗?', async () => {
207
+ this.confirm('Front_Msg_Sure_To_Save', async () => {
208
208
  let res = await applicationApi.save(this.page.applicationTypeID, data);
209
209
 
210
- this.success('保存成功!', () => {
210
+ this.success('Front_Msg_Success', () => {
211
211
  this.$refs.table.loadData();
212
212
  this.$refs.form.setData(res);
213
213
  });
@@ -223,12 +223,12 @@
223
223
  let isOK = await this.$refs.messageForm.validate();
224
224
 
225
225
  if (!isOK) {
226
- this.error('有内容不符合要求,请正确填写!');
226
+ this.error('Front_Msg_Form_Validate_Fail');
227
227
  } else {
228
- this.confirm('确定要发表意见吗?', async () => {
228
+ this.confirm('Front_Msg_Sure_To_Message_Application', async () => {
229
229
  await processInstApi.addMessage(this.$refs.showForm.data.application.processInstID, this.messageData.message);
230
230
 
231
- this.success('操作成功!', () => {
231
+ this.success('Front_Msg_Success', () => {
232
232
  this.messageData.message = null;
233
233
  this.messageOpened = false;
234
234
  });
@@ -237,10 +237,10 @@
237
237
  },
238
238
  // 撤销
239
239
  async cancel() {
240
- this.confirm('确定要撤销该申请吗?', async () => {
240
+ this.confirm('Front_Msg_Sure_To_Cancel_Application', async () => {
241
241
  await applicationApi.cancel(this.$refs.form.data.applicationID);
242
242
 
243
- this.success('操作成功!', () => {
243
+ this.success('Front_Msg_Success', () => {
244
244
  this.$refs.table.loadData();
245
245
  this.$refs.form.close();
246
246
  });
@@ -5,11 +5,7 @@ import 'sweetalert2/dist/sweetalert2.min.css';
5
5
  export default {
6
6
  install: app => {
7
7
  // sweetalert2 的设置默认配置的方法
8
- const swal = sweetalert2.mixin({
9
- confirmButtonText: '确定',
10
- confirmButtonColor: '#2d8cf0',
11
- cancelButtonText: '取消'
12
- });
8
+ const swal = sweetalert2;
13
9
 
14
10
  // 添加全局方法
15
11
  //Vue.swal = swal;
@@ -1,4 +1,5 @@
1
1
  import permissionApi from '../api/permission';
2
+ import Setting from '../setting';
2
3
 
3
4
  // 动态路由
4
5
  export default {
@@ -66,10 +67,10 @@ export default {
66
67
  name: url.replace(/\//g, '-'),
67
68
  meta: {
68
69
  auth: false,
69
- title: item.name,
70
- description: item.subName,
70
+ title: Setting.layout.showNotice ? window.$t('Permission_' + url) : item.name,
71
+ description: Setting.layout.showNotice ? window.$t('Permission_' + url + '_SubName') : item.subName,
71
72
  data,
72
- cache: item.isMenu
73
+ cache: true
73
74
  },
74
75
  component: () => {
75
76
  return new Promise(resolve => {
@@ -129,10 +130,10 @@ function buildPermission(pages, perArry, routes, layout, parent) {
129
130
  name: url.replace(/\//g, '-'),
130
131
  meta: {
131
132
  auth: false,
132
- title: item.name,
133
- description: item.subName,
133
+ title: Setting.layout.showNotice ? window.$t('Permission_' + url) : item.name,
134
+ description: Setting.layout.showNotice ? window.$t('Permission_' + url + '_SubName') : item.subName,
134
135
  data,
135
- cache: item.isMenu
136
+ cache: true
136
137
  },
137
138
  component: () => {
138
139
  return new Promise(resolve => {
package/src/setting.js CHANGED
@@ -31,20 +31,7 @@ const Setting = {
31
31
  // 是否根据用户电脑配置自动设置语言(仅第一次有效)
32
32
  auto: false,
33
33
  // 切换语言时是否刷新页面
34
- refresh: false,
35
- // 支持的语言列表
36
- list: [
37
- {
38
- locale: 'zh-CN',
39
- language: '简体中文'
40
- },
41
- {
42
- locale: 'en-US',
43
- language: 'English'
44
- }
45
- ],
46
- // 是否通过远程接口来获取 i81n 文件
47
- remote: false
34
+ refresh: false
48
35
  },
49
36
  /**
50
37
  * 打印控件
@@ -67,12 +67,11 @@ export default {
67
67
  if (confirm) {
68
68
  swal
69
69
  .fire({
70
- title: '确定要退出吗?\r\nAre you sure to logout?',
70
+ title: window.$t('Front_Msg_Sure_To_Logout'),
71
71
  icon: 'question',
72
72
  showCancelButton: true,
73
- confirmButtonText: '确定 OK',
74
- confirmButtonColor: '#2d8cf0',
75
- cancelButtonText: '取消 Cancel'
73
+ confirmButtonText: window.$t('Front_Btn_OK'),
74
+ cancelButtonText: window.$t('Front_Btn_Cancel')
76
75
  })
77
76
  .then(result => {
78
77
  if (result.value) {
@@ -1,58 +1,21 @@
1
1
  /**
2
2
  * 多语言
3
3
  * */
4
- import Languages from '../../../../i18n/locale';
5
4
  import Setting from '../../../../setting';
6
5
  import util from '../../../../libs/util';
7
6
  import { pathInit } from '../../../../store/modules/admin/modules/db';
7
+ import i18n from '../../../../i18n';
8
+ import i18nTextApi from '../../../../api/i18nText';
8
9
 
9
10
  const savedLocaleKey = 'i18n-locale';
10
11
 
11
12
  export default {
12
13
  namespaced: true,
13
14
  state: {
14
- locale: ''
15
+ locale: '',
16
+ languages: {}
15
17
  },
16
18
  actions: {
17
- /**
18
- * @description 获取当前语言
19
- * */
20
- getLocale({ state }) {
21
- let locale;
22
-
23
- const db = util.db.get(
24
- pathInit({
25
- dbName: 'database',
26
- path: '',
27
- user: true,
28
- defaultValue: {}
29
- })
30
- );
31
-
32
- const savedLocale = db.get(savedLocaleKey).value();
33
-
34
- // 先判断本地存储是否已有语言选择
35
- if (savedLocale) {
36
- locale = savedLocale;
37
- } else {
38
- // 判断是否开启自动识别语言
39
- if (Setting.i18n.auto) {
40
- // 如果自动识别的语言,本地没有该语言包,则设置为默认语言
41
- const navLang = navigator.language;
42
- if (Languages[navLang]) {
43
- locale = navLang;
44
- } else {
45
- locale = Setting.i18n.default;
46
- }
47
- } else {
48
- locale = Setting.i18n.default;
49
- }
50
-
51
- // 将初次的语言保存在本地
52
- db.set(savedLocaleKey, locale).write();
53
- }
54
- state.locale = locale;
55
- },
56
19
  /**
57
20
  * @description 设置当前语言
58
21
  * */
@@ -61,7 +24,7 @@ export default {
61
24
  pathInit({
62
25
  dbName: 'database',
63
26
  path: '',
64
- user: true,
27
+ user: false,
65
28
  defaultValue: {}
66
29
  })
67
30
  );
@@ -82,6 +45,42 @@ export default {
82
45
  title: vm.$route.meta.title
83
46
  });
84
47
  }
48
+ },
49
+ /**
50
+ * @description 加载语言
51
+ * @param {Object} state vuex state
52
+ */
53
+ async load({ state }) {
54
+ const db = util.db.get(
55
+ pathInit({
56
+ dbName: 'database',
57
+ path: '',
58
+ user: false,
59
+ defaultValue: {}
60
+ })
61
+ );
62
+
63
+ state.locale = db.get(savedLocaleKey).value();
64
+
65
+ // 导入 View UI Plus 语言包
66
+ const ViewUIPlusLocale = import.meta.globEager('../../../../i18n/locale/*-*.js');
67
+
68
+ let res = await i18nTextApi.getAll();
69
+ state.languages = {};
70
+
71
+ for (let lanCode in res) {
72
+ Object.keys(ViewUIPlusLocale).forEach(path => {
73
+ const currentLocale = ViewUIPlusLocale[path].default;
74
+
75
+ if (currentLocale.i.locale === lanCode) {
76
+ res[lanCode]['text'].i = currentLocale.i;
77
+ }
78
+ });
79
+
80
+ state.languages[lanCode] = res[lanCode].name;
81
+
82
+ i18n.global.setLocaleMessage(lanCode, res[lanCode]['text']);
83
+ }
85
84
  }
86
85
  }
87
86
  };
@@ -47,6 +47,7 @@ function convertMenu(source) {
47
47
  return source.map(item => {
48
48
  return {
49
49
  path: reg.test(item.url) ? item.url : '/' + item.url.split('?')[0],
50
+ code: item.url,
50
51
  title: item.name,
51
52
  subtitle: item.subName,
52
53
  target: item.isNewWindow ? '_blank' : null,
@@ -1,47 +1,47 @@
1
- #app, body, html{
2
- height: 100%;
3
- }
4
- body{
5
- background-color: @background-color-base;
6
- font-size: 14px;
7
- }
8
-
9
- // 隐藏滚动条样式
10
- .i-scrollbar-hide{
11
- &::-webkit-scrollbar{
12
- width: 0;
13
- }
14
- &::-webkit-scrollbar-track{
15
- background-color: transparent;
16
- }
17
- &::-webkit-scrollbar-thumb{
18
- background: #e8eaec;
19
- }
20
- }
21
-
22
- // 极简滚动条样式
23
- .i-scrollbar{
24
- &::-webkit-scrollbar{
25
- width: 6px;
26
- }
27
- &::-webkit-scrollbar-track{
28
- background-color: transparent;
29
- }
30
- &::-webkit-scrollbar-thumb{
31
- background: #808695;
32
- border-radius: 4px;
33
- }
34
- }
35
-
36
- // 去除 Table 的左右边框,更精简
37
- .i-table-no-border{
38
- .ivu-table th{
39
- background-color: #fff;
40
- }
41
- .ivu-table-wrapper, .ivu-table tr:last-child td{
42
- border: none;
43
- }
44
- .ivu-table:before, .ivu-table:after{
45
- display: none;
46
- }
47
- }
1
+ #app, body, html{
2
+ height: 100%;
3
+ }
4
+ body{
5
+ background-color: @background-color-base;
6
+ font-size: 14px;
7
+ }
8
+
9
+ // 隐藏滚动条样式
10
+ .i-scrollbar-hide{
11
+ &::-webkit-scrollbar{
12
+ width: 0;
13
+ }
14
+ &::-webkit-scrollbar-track{
15
+ background-color: transparent;
16
+ }
17
+ &::-webkit-scrollbar-thumb{
18
+ background: #e8eaec;
19
+ }
20
+ }
21
+
22
+ // 极简滚动条样式
23
+ .i-scrollbar{
24
+ &::-webkit-scrollbar{
25
+ width: 6px;
26
+ }
27
+ &::-webkit-scrollbar-track{
28
+ background-color: transparent;
29
+ }
30
+ &::-webkit-scrollbar-thumb{
31
+ background: #808695;
32
+ border-radius: 4px;
33
+ }
34
+ }
35
+
36
+ // 去除 Table 的左右边框,更精简
37
+ .i-table-no-border{
38
+ .ivu-table th{
39
+ background-color: #fff;
40
+ }
41
+ .ivu-table-wrapper, .ivu-table tr:last-child td{
42
+ border: none;
43
+ }
44
+ .ivu-table:before, .ivu-table:after{
45
+ display: none;
46
+ }
47
+ }
@@ -97,6 +97,10 @@
97
97
  line-height: 30px;
98
98
  }
99
99
 
100
+ .ivu-form-label-top .ivu-form-item-label {
101
+ padding: 0 0 4px;
102
+ }
103
+
100
104
  /* .form-title::before {
101
105
  background: #078dcf;
102
106
  position: absolute;
@@ -1,6 +1,6 @@
1
- // 自定义主题
2
- // 详见 https://www.iviewui.com/docs/guide/theme
3
- @import 'view-ui-plus/src/styles/index.less';
4
-
5
- @menu-dark-title: #191a23;
6
- @menu-dark-active-bg: #101117;
1
+ // 自定义主题
2
+ // 详见 https://www.iviewui.com/docs/guide/theme
3
+ @import 'view-ui-plus/src/styles/index.less';
4
+
5
+ @menu-dark-title: #191a23;
6
+ @menu-dark-active-bg: #101117;
@@ -1,47 +1,47 @@
1
- @font-face {
2
- font-family: "i-icon"; /* Project id 1125611 */
3
- src: url('iconfont.woff2?t=1651052284018') format('woff2'),
4
- url('iconfont.woff?t=1651052284018') format('woff'),
5
- url('iconfont.ttf?t=1651052284018') format('truetype');
6
- }
7
-
8
- .i-icon {
9
- font-family: "i-icon" !important;
10
- font-size: 16px;
11
- font-style: normal;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- .i-icon-i18n:before {
17
- content: "\e8e9";
18
- }
19
-
20
- .i-icon-refresh:before {
21
- content: "\e7d1";
22
- }
23
-
24
- .i-icon-record:before {
25
- content: "\e61f";
26
- }
27
-
28
- .i-icon-notification:before {
29
- content: "\e69d";
30
- }
31
-
32
- .i-icon-full-screen:before {
33
- content: "\e743";
34
- }
35
-
36
- .i-icon-exit-full-screen:before {
37
- content: "\e657";
38
- }
39
-
40
- .i-icon-menu-unfold:before {
41
- content: "\e68b";
42
- }
43
-
44
- .i-icon-menu-fold:before {
45
- content: "\e600";
46
- }
47
-
1
+ @font-face {
2
+ font-family: "i-icon"; /* Project id 1125611 */
3
+ src: url('iconfont.woff2?t=1651052284018') format('woff2'),
4
+ url('iconfont.woff?t=1651052284018') format('woff'),
5
+ url('iconfont.ttf?t=1651052284018') format('truetype');
6
+ }
7
+
8
+ .i-icon {
9
+ font-family: "i-icon" !important;
10
+ font-size: 16px;
11
+ font-style: normal;
12
+ -webkit-font-smoothing: antialiased;
13
+ -moz-osx-font-smoothing: grayscale;
14
+ }
15
+
16
+ .i-icon-i18n:before {
17
+ content: "\e8e9";
18
+ }
19
+
20
+ .i-icon-refresh:before {
21
+ content: "\e7d1";
22
+ }
23
+
24
+ .i-icon-record:before {
25
+ content: "\e61f";
26
+ }
27
+
28
+ .i-icon-notification:before {
29
+ content: "\e69d";
30
+ }
31
+
32
+ .i-icon-full-screen:before {
33
+ content: "\e743";
34
+ }
35
+
36
+ .i-icon-exit-full-screen:before {
37
+ content: "\e657";
38
+ }
39
+
40
+ .i-icon-menu-unfold:before {
41
+ content: "\e68b";
42
+ }
43
+
44
+ .i-icon-menu-fold:before {
45
+ content: "\e600";
46
+ }
47
+