lw-cdp-ui 1.4.72 → 1.4.74
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/dist/components/lwFormMini/ViewItem.vue +9 -0
- package/dist/components/lwLayout/components/bu.vue +22 -16
- package/dist/components/lwLayout/index.vue +3 -0
- package/dist/lw-cdp-ui.esm.js +2444 -2369
- package/dist/lw-cdp-ui.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- /package/dist/components/lwTable/locale/{en-US.js → en-us.js} +0 -0
- /package/dist/components/lwTable/locale/{zh-CN.js → zh-cn.js} +0 -0
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
<slot :name="item?.options?.component"></slot>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
+
<!-- 物理换行 -->
|
|
23
|
+
<div v-else-if="item.component == 'dividerBr'" class="title-name-divider-br" :class="{ border: item?.border }"></div>
|
|
24
|
+
|
|
22
25
|
<!-- 表单内容 -->
|
|
23
26
|
<el-form-item
|
|
24
27
|
v-else
|
|
@@ -337,4 +340,10 @@ export default {
|
|
|
337
340
|
margin-left: 10px;
|
|
338
341
|
}
|
|
339
342
|
}
|
|
343
|
+
.title-name-divider-br {
|
|
344
|
+
&.border {
|
|
345
|
+
margin-bottom: 15px;
|
|
346
|
+
border-top: 1px var(--el-border-color) var(--el-border-style);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
340
349
|
</style>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="screen panel-item hidden-sm-and-down"
|
|
3
|
-
@click="screen">
|
|
4
|
-
|
|
2
|
+
<div class="screen panel-item hidden-sm-and-down" @click="screen">
|
|
5
3
|
<el-dropdown @command="changeBusinessUnit">
|
|
6
4
|
<div class="bu-list">
|
|
7
|
-
<el-icon><el-icon-help /></el-icon>{{buName}}
|
|
5
|
+
<el-icon><el-icon-help /></el-icon>{{ buName }}
|
|
8
6
|
</div>
|
|
9
7
|
<template #dropdown>
|
|
10
8
|
<el-dropdown-menu>
|
|
11
|
-
<el-dropdown-item v-for="item in buList"
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
<el-dropdown-item v-for="item in buList" :key="item.id" :command="item.code">{{
|
|
10
|
+
item.name
|
|
11
|
+
}}</el-dropdown-item>
|
|
14
12
|
</el-dropdown-menu>
|
|
15
13
|
</template>
|
|
16
14
|
</el-dropdown>
|
|
@@ -22,18 +20,18 @@ export default {
|
|
|
22
20
|
data() {
|
|
23
21
|
return {
|
|
24
22
|
buName: '',
|
|
25
|
-
buList: []
|
|
23
|
+
buList: []
|
|
26
24
|
}
|
|
27
25
|
},
|
|
28
26
|
props: {
|
|
29
27
|
isInitialized: {
|
|
30
28
|
type: Boolean,
|
|
31
29
|
default: true
|
|
32
|
-
}
|
|
30
|
+
}
|
|
33
31
|
},
|
|
34
32
|
methods: {
|
|
35
33
|
async changeBusinessUnit(command) {
|
|
36
|
-
let item = this.buList.find(item => item.code === command)
|
|
34
|
+
let item = this.buList.find((item) => item.code === command)
|
|
37
35
|
this.buName = item.name
|
|
38
36
|
this.$store.commit('setRouteShow', true)
|
|
39
37
|
this.$tool.data.set('buCode', command)
|
|
@@ -46,9 +44,9 @@ export default {
|
|
|
46
44
|
let initialized = await this.$api.auth.initialized()
|
|
47
45
|
this.$tool.data.set('zoneInitialized', initialized)
|
|
48
46
|
if (!initialized) {
|
|
49
|
-
this.$router.push(this.$config.INIT_URL)
|
|
47
|
+
this.$router.push(this.$config.INIT_URL)
|
|
50
48
|
} else {
|
|
51
|
-
if (this.$route.path == this.$config.INIT_URL){
|
|
49
|
+
if (this.$route.path == this.$config.INIT_URL) {
|
|
52
50
|
this.$router.push('/')
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -56,8 +54,7 @@ export default {
|
|
|
56
54
|
|
|
57
55
|
//判断是否当前路由,否的话跳转
|
|
58
56
|
this.$store.commit('clearKeepLive')
|
|
59
|
-
this.$store.commit(
|
|
60
|
-
|
|
57
|
+
this.$store.commit('setRouteShow', false)
|
|
61
58
|
}
|
|
62
59
|
},
|
|
63
60
|
async created() {
|
|
@@ -71,9 +68,18 @@ export default {
|
|
|
71
68
|
this.$tool.data.set('buCode', bu[0].code)
|
|
72
69
|
buCode = bu[0].code
|
|
73
70
|
}
|
|
74
|
-
let item = this.buList.find(item => item.code === buCode)
|
|
71
|
+
let item = this.buList.find((item) => item.code === buCode)
|
|
75
72
|
this.buName = item ? item.name : ''
|
|
76
73
|
this.changeBusinessUnit(buCode)
|
|
74
|
+
|
|
75
|
+
// 监听多个浏览器页签切换 保持当前BU
|
|
76
|
+
document.addEventListener('visibilitychange', () => {
|
|
77
|
+
if (document.visibilityState === 'visible') {
|
|
78
|
+
let item = this.buList.find((item) => item.name === this.buName)
|
|
79
|
+
this.$tool.data.set('buCode', item.code)
|
|
80
|
+
this.$tool.data.set('tenantId', item.tenantId)
|
|
81
|
+
}
|
|
82
|
+
})
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
</script>
|
|
@@ -88,4 +94,4 @@ export default {
|
|
|
88
94
|
height: 100%;
|
|
89
95
|
white-space: nowrap;
|
|
90
96
|
}
|
|
91
|
-
</style>
|
|
97
|
+
</style>
|