lw-cdp-ui 1.4.53 → 1.4.55

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.
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class="layout-aside">
3
3
  <slot name="logo" v-if="unPassport">
4
- <img class="logo" src="../../../assets/images/logo.svg" alt="" @click="openMneu" />
4
+ <img v-if="$store.state?.user?.logo" class="logo" :src="$store.state.user.logo" alt="" @click="openMneu" />
5
+ <img v-else class="logo" src="../../../assets/images/logo.svg" alt="" @click="openMneu" />
5
6
  </slot>
6
7
 
7
8
  <el-popover
@@ -250,6 +250,7 @@ export default {
250
250
  combined: user.combined,
251
251
  menuDynamic: user.menuDynamic,
252
252
  loginPage: user.loginPage,
253
+ logo: user.logo,
253
254
  menuContent: user.menuContent
254
255
  }
255
256
  this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
@@ -324,7 +325,7 @@ export default {
324
325
  showThis() {
325
326
  this.pmenu = this.$route.meta.breadcrumb ? this.$route.meta.breadcrumb[0] : {}
326
327
  this.nextMenu = this.filterUrl(this.pmenu.children)
327
-
328
+
328
329
  this.$nextTick(() => {
329
330
  this.active = this.$route.meta.active || this.$route.fullPath
330
331
  })
@@ -14,7 +14,6 @@
14
14
  <slot name="loginBg">
15
15
  <img v-show="!isRegistered" class="img" src="../../assets/images/login.svg" />
16
16
  </slot>
17
-
18
17
  </div>
19
18
  <div class="login_main">
20
19
  <template v-if="isRegistered">
@@ -32,20 +31,29 @@
32
31
  {{ $t('loginPage.trialRequest') }}
33
32
  </slot>
34
33
  </div>
35
-
36
34
  </el-form-item>
37
35
  <el-form-item prop="name">
38
- <el-input v-model="registForm.name" prefix-icon="el-icon-user" clearable
36
+ <el-input
37
+ v-model="registForm.name"
38
+ prefix-icon="el-icon-user"
39
+ clearable
39
40
  :placeholder="$t('loginPage.enterTitle')">
40
41
  </el-input>
41
42
  </el-form-item>
42
43
  <el-form-item prop="phone">
43
- <el-input v-model="registForm.phone" prefix-icon="el-icon-iphone" clearable maxlength="11"
44
+ <el-input
45
+ v-model="registForm.phone"
46
+ prefix-icon="el-icon-iphone"
47
+ clearable
48
+ maxlength="11"
44
49
  :placeholder="$t('loginPage.enterPhone')">
45
50
  </el-input>
46
51
  </el-form-item>
47
52
  <el-form-item prop="company">
48
- <el-input v-model="registForm.company" prefix-icon="el-icon-office-building" clearable
53
+ <el-input
54
+ v-model="registForm.company"
55
+ prefix-icon="el-icon-office-building"
56
+ clearable
49
57
  :placeholder="$t('loginPage.enterCompany')">
50
58
  </el-input>
51
59
  </el-form-item>
@@ -61,7 +69,8 @@
61
69
  </el-form-item>
62
70
  <el-form-item>
63
71
  <el-button type="primary" style="width: 100%" :loading="islogin" @click="apply">{{
64
- $t('loginPage.trialRequest') }}</el-button>
72
+ $t('loginPage.trialRequest')
73
+ }}</el-button>
65
74
  </el-form-item>
66
75
  </el-form>
67
76
  </div>
@@ -74,7 +83,12 @@
74
83
  </el-button>
75
84
  </div>
76
85
  <div class="login-form">
77
- <el-form ref="passwordForm" class="form-body" :model="passwordForm" :rules="rules" label-width="0"
86
+ <el-form
87
+ ref="passwordForm"
88
+ class="form-body"
89
+ :model="passwordForm"
90
+ :rules="rules"
91
+ label-width="0"
78
92
  size="large">
79
93
  <el-form-item>
80
94
  <!-- 系统注册名称插槽 -->
@@ -83,27 +97,39 @@
83
97
  {{ $t('loginPage.passwordRequest') }}
84
98
  </slot>
85
99
  </div>
86
-
87
100
  </el-form-item>
88
101
  <el-form-item prop="oldPassword">
89
- <el-input v-model="passwordForm.oldPassword" prefix-icon="el-icon-lock" clearable show-password
102
+ <el-input
103
+ v-model="passwordForm.oldPassword"
104
+ prefix-icon="el-icon-lock"
105
+ clearable
106
+ show-password
90
107
  :placeholder="$t('loginPage.oldPassword')">
91
108
  </el-input>
92
109
  </el-form-item>
93
110
  <el-form-item prop="newPassword">
94
- <el-input v-model="passwordForm.newPassword" prefix-icon="el-icon-lock" clearable show-password
111
+ <el-input
112
+ v-model="passwordForm.newPassword"
113
+ prefix-icon="el-icon-lock"
114
+ clearable
115
+ show-password
95
116
  :placeholder="$t('loginPage.newPassword')">
96
117
  </el-input>
97
118
  </el-form-item>
98
119
  <el-form-item prop="confirmPassword">
99
- <el-input v-model="passwordForm.confirmPassword" prefix-icon="el-icon-lock" clearable show-password
120
+ <el-input
121
+ v-model="passwordForm.confirmPassword"
122
+ prefix-icon="el-icon-lock"
123
+ clearable
124
+ show-password
100
125
  :placeholder="$t('loginPage.confirmPassword')">
101
126
  </el-input>
102
127
  </el-form-item>
103
128
 
104
129
  <el-form-item>
105
130
  <el-button type="primary" style="width: 100%" :loading="islogin" @click="submitPassword">{{
106
- $t('loginPage.passwordEmail') }}</el-button>
131
+ $t('loginPage.passwordEmail')
132
+ }}</el-button>
107
133
  </el-form-item>
108
134
  </el-form>
109
135
  </div>
@@ -116,34 +142,41 @@
116
142
  <div class="login-form">
117
143
  <el-form ref="loginForm" class="form-body" :model="ruleForm" :rules="rules" label-width="0" size="large">
118
144
  <el-form-item>
119
-
120
145
  <div class="title-name">
121
146
  <slot name="title">{{ $t('loginPage.accountLogin') }}</slot>
122
147
  </div>
123
-
124
148
  </el-form-item>
125
149
  <el-form-item prop="user">
126
- <el-input v-model="ruleForm.user" prefix-icon="el-icon-user" clearable
150
+ <el-input
151
+ v-model="ruleForm.user"
152
+ prefix-icon="el-icon-user"
153
+ clearable
127
154
  :placeholder="$t('loginPage.userPlaceholder')">
128
155
  </el-input>
129
156
  </el-form-item>
130
157
  <el-form-item prop="password">
131
- <el-input v-model="ruleForm.password" prefix-icon="el-icon-lock" clearable show-password
158
+ <el-input
159
+ v-model="ruleForm.password"
160
+ prefix-icon="el-icon-lock"
161
+ clearable
162
+ show-password
132
163
  :placeholder="$t('loginPage.PWPlaceholder')">
133
164
  </el-input>
134
165
  </el-form-item>
135
166
  <el-form-item>
136
167
  <div class="login-remember">
137
168
  <el-checkbox :label="$t('loginPage.rememberMe')" v-model="ruleForm.autologin"></el-checkbox>
138
- <el-button type="primary" @click="changePassword" link>{{ $t("loginPage.forgetPassword") }}?
169
+ <el-button v-if="isEditPassword" type="primary" @click="changePassword" link
170
+ >{{ $t('loginPage.forgetPassword') }}?
139
171
  </el-button>
140
172
  </div>
141
173
  </el-form-item>
142
174
  <el-form-item>
143
- <el-button type="primary" style="width: 100%" :loading="islogin" @click="login">{{ $t("loginPage.signIn")
175
+ <el-button type="primary" style="width: 100%" :loading="islogin" @click="login">{{
176
+ $t('loginPage.signIn')
144
177
  }}</el-button>
145
178
  </el-form-item>
146
- <el-form-item>
179
+ <el-form-item v-if="isTrial">
147
180
  {{ $t('loginPage.noAccount') }}
148
181
  <el-button type="primary" link @click="isRegistered = true">{{ $t('loginPage.trialRequest') }}</el-button>
149
182
  </el-form-item>
@@ -170,6 +203,16 @@ export default {
170
203
  isEncryption: {
171
204
  type: Boolean,
172
205
  default: true
206
+ },
207
+ // 是否修改密码
208
+ isEditPassword: {
209
+ type: Boolean,
210
+ default: true
211
+ },
212
+ // 是否试用
213
+ isTrial: {
214
+ type: Boolean,
215
+ default: true
173
216
  }
174
217
  },
175
218
  components: {
@@ -369,7 +412,7 @@ export default {
369
412
  }
370
413
  this.$tool.data.set('buList', bu)
371
414
  let code = this.$tool.data.get('buCode')
372
- let item = bu.find(x => {
415
+ let item = bu.find((x) => {
373
416
  return x.code == code
374
417
  })
375
418
  if (!item) {
@@ -380,7 +423,7 @@ export default {
380
423
  let user = await this.$api.auth.user()
381
424
 
382
425
  // 判断密码是否过期
383
- if (!user?.userAuthInfo && user?.loginPage?.includes("pwdChange")) {
426
+ if (!user?.userAuthInfo && user?.loginPage?.includes('pwdChange')) {
384
427
  this.$message.warning('您的密码已过期,请修改密码!')
385
428
  this.isPassword = true
386
429
  this.islogin = false
@@ -388,8 +431,10 @@ export default {
388
431
  }
389
432
 
390
433
  // 处理应用显示逻辑
391
- let application = [...new Set(user.userAuthInfo.menus.map(permission => permission.split('.')[0].split('_')[0]))]
392
- user.userAuthInfo.grantedApplications = user.userAuthInfo.grantedApplications.filter(x =>
434
+ let application = [
435
+ ...new Set(user.userAuthInfo.menus.map((permission) => permission.split('.')[0].split('_')[0]))
436
+ ]
437
+ user.userAuthInfo.grantedApplications = user.userAuthInfo.grantedApplications.filter((x) =>
393
438
  application.includes(x.code)
394
439
  )
395
440
 
@@ -397,6 +442,7 @@ export default {
397
442
  ...user.userAuthInfo,
398
443
  combined: user.combined,
399
444
  loginPage: user.loginPage,
445
+ logo: user.logo,
400
446
  menuContent: user.menuContent
401
447
  }
402
448
  this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
@@ -495,7 +541,7 @@ export default {
495
541
 
496
542
  // 处理子节点
497
543
  if (node.children && node.children.length) {
498
- route.children = node.children.sort((a, b) => a.sort - b.sort).map(child => processNode(child, route))
544
+ route.children = node.children.sort((a, b) => a.sort - b.sort).map((child) => processNode(child, route))
499
545
  }
500
546
 
501
547
  return route
@@ -504,7 +550,7 @@ export default {
504
550
  // 按applications分组
505
551
  const groupedData = {}
506
552
 
507
- originData.forEach(item => {
553
+ originData.forEach((item) => {
508
554
  // 获取应用类型(如ec、cdp等)
509
555
  const appType = item.applications[0]
510
556
 
@@ -518,7 +564,7 @@ export default {
518
564
  })
519
565
 
520
566
  // 对每个应用类型的菜单进行排序
521
- Object.keys(groupedData).forEach(appType => {
567
+ Object.keys(groupedData).forEach((appType) => {
522
568
  groupedData[appType].sort((a, b) => a.sort - b.sort)
523
569
  })
524
570
 
@@ -41,7 +41,7 @@
41
41
  </el-button>
42
42
 
43
43
  <div :class="isExpandNumber ? 'expand-button' : 'hidden'" @click="handleExpandStatus()">
44
- <span>{{ isExpandStatus ? '收起' : '展开' }}</span>
44
+ <span>{{ isExpandStatus ? $t('lwSearch.shouQi') : $t('lwSearch.zhanKai') }}</span>
45
45
  </div>
46
46
  </div>
47
47
  </el-form>
@@ -56,7 +56,6 @@
56
56
  * 配置与lwFormMini配置一致
57
57
  * 升级后依旧兼容旧写法
58
58
  */
59
-
60
59
  import FormComponent from '../lwFormMini/FormComponent.vue'
61
60
 
62
61
  export default {
@@ -0,0 +1,30 @@
1
+ export default {
2
+ lwTable: {
3
+ tools: {
4
+ lineHeightName: 'row height',
5
+ lineHeight: {
6
+ mini: 'Compact',
7
+ small: 'Medium',
8
+ medium: 'High',
9
+ large: 'Extra High'
10
+ },
11
+ border: 'Border',
12
+ columnsSetting: 'Column Settings',
13
+ allCheck: 'Select All',
14
+ hasChecked: 'Selected',
15
+ cancel: 'Cancel',
16
+ fullScreen: 'Full Screen',
17
+ table_before: 'Before the table',
18
+ column_fixed: 'Column fixed',
19
+ last_column_fixed: 'Last column fixed',
20
+ please_select: 'Please select...',
21
+ total: 'total',
22
+ recordsPage: 'records Page',
23
+ pages: 'pages'
24
+ }
25
+ },
26
+ lwSearch: {
27
+ shouQi: 'Collapse',
28
+ zhanKai: 'Expand'
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ export default {
2
+ lwTable: {
3
+ tools: {
4
+ lineHeightName: '行高',
5
+ lineHeight: {
6
+ mini: '紧凑',
7
+ small: '中等',
8
+ medium: '高',
9
+ large: '较高'
10
+ },
11
+ border: '边框',
12
+ columnsSetting: '列设置',
13
+ allCheck: '全选',
14
+ hasChecked: '已选',
15
+ cancel: '取消',
16
+ fullScreen: '全屏',
17
+ table_before: '表格前',
18
+ column_fixed: '列固定',
19
+ last_column_fixed: '最后一列固定',
20
+ please_select: '请选择...',
21
+ total: '共',
22
+ recordsPage: '条记录 第',
23
+ pages: '页'
24
+ }
25
+ },
26
+ lwSearch: {
27
+ shouQi: '收起',
28
+ zhanKai: '展开'
29
+ }
30
+ }