lw-cdp-ui 1.3.18 → 1.3.20
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/lwFlow/index.vue +0 -1
- package/dist/components/lwFlow/nodes/et2lTableGroup.js +1 -2
- package/dist/components/lwFormMini/ViewItem.vue +3 -3
- package/dist/components/lwFormMini/index.vue +45 -26
- package/dist/components/lwLayout/components/setting.vue +6 -6
- package/dist/components/lwLayout/components/tags.vue +9 -2
- package/dist/components/lwLayout/components/userbar.vue +18 -8
- package/dist/components/lwLayout/index.vue +11 -31
- package/dist/components/lwLayout/locale/en-us.js +20 -17
- package/dist/components/lwLayout/locale/zh-cn.js +21 -17
- package/dist/components/lwLogin/index.vue +11 -44
- package/dist/components/lwSearch/cascader/cascader.vue +44 -0
- package/dist/components/lwSearch/date/date.vue +13 -15
- package/dist/components/lwSearch/dateRange/dateRange.vue +12 -14
- package/dist/components/lwSearch/index.vue +46 -22
- package/dist/components/lwTable/components/TableColumn.vue +94 -45
- package/dist/components/lwTable/index.js +17 -4
- package/dist/components/lwTable/index.scss +1 -0
- package/dist/components/lwTable/useFullscreen.js +0 -2
- package/dist/components/lwTableForm/index.vue +11 -8
- package/dist/lw-cdp-ui.esm.js +4496 -4355
- package/dist/lw-cdp-ui.umd.js +13 -13
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -172,14 +172,13 @@ export default function registerEt2l(lf, node, dynamicGroup) {
|
|
|
172
172
|
class HtmlNodeModelAttributes extends dynamicGroup.model {
|
|
173
173
|
// 监听分组状态变化
|
|
174
174
|
toggleCollapse(value) {
|
|
175
|
-
console.log(value)
|
|
176
175
|
super.toggleCollapse(value)
|
|
177
176
|
}
|
|
178
177
|
// 计算子装载节点画布大小
|
|
179
178
|
async getChildSize() {
|
|
180
179
|
let children = Array.from(this.children)
|
|
181
180
|
let nodes = [...this.graphModel.nodes].filter((node) => children.includes(node.id))
|
|
182
|
-
|
|
181
|
+
|
|
183
182
|
if (nodes.length === 0) {
|
|
184
183
|
return { width: 300, height: 240 } // 默认展开大小
|
|
185
184
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<!-- 间隔标题 -->
|
|
3
3
|
<div v-if="item.component == 'divider'"
|
|
4
4
|
class="title-name title-name-divider"
|
|
5
|
-
:id="'divider-' +
|
|
6
|
-
:data-index="
|
|
5
|
+
:id="'divider-' + item.label"
|
|
6
|
+
:data-index="item.label">
|
|
7
7
|
<span>
|
|
8
8
|
{{ item.label }}
|
|
9
9
|
<el-tooltip v-if="item.tips">
|
|
@@ -289,7 +289,7 @@ export default {
|
|
|
289
289
|
if (!options?.multiple) {
|
|
290
290
|
val = [val]
|
|
291
291
|
}
|
|
292
|
-
let items = options.items.filter(item => { return val.includes(item.value)
|
|
292
|
+
let items = options.items.filter(item => { return val.includes(item.value) })
|
|
293
293
|
return items?.map(item => item.label).join('、') || val || '--'
|
|
294
294
|
},
|
|
295
295
|
dayjs: dayjs
|
|
@@ -313,13 +313,23 @@ export default {
|
|
|
313
313
|
this.$emit("submit", this.form)
|
|
314
314
|
},
|
|
315
315
|
clickAffix(index) {
|
|
316
|
-
this.affixIndex = index
|
|
317
|
-
const targetElement = document.getElementById('divider-' + index)
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
316
|
+
this.affixIndex = index;
|
|
317
|
+
const targetElement = document.getElementById('divider-' + index);
|
|
318
|
+
const scrollContainer = document.querySelector('.el-container > .el-main');
|
|
319
|
+
|
|
320
|
+
if (targetElement && scrollContainer) {
|
|
321
|
+
const offset = 85; // 目标元素与顶部的偏移量
|
|
322
|
+
const targetRect = targetElement.getBoundingClientRect();
|
|
323
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
324
|
+
|
|
325
|
+
// 计算目标元素相对于滚动容器内部的真实偏移量
|
|
326
|
+
const elementPosition = targetRect.top - containerRect.top + scrollContainer.scrollTop;
|
|
327
|
+
|
|
328
|
+
// 让 el-main 滚动到目标元素,保证它距离顶部 30px
|
|
329
|
+
scrollContainer.scrollTo({
|
|
330
|
+
top: elementPosition - offset,
|
|
331
|
+
behavior: 'smooth'
|
|
332
|
+
});
|
|
323
333
|
}
|
|
324
334
|
|
|
325
335
|
this.scrollObserverEnabled = false;
|
|
@@ -329,29 +339,38 @@ export default {
|
|
|
329
339
|
},
|
|
330
340
|
// 监听滚动
|
|
331
341
|
handleScroll() {
|
|
332
|
-
// 获取所有 title-name-divider 元素
|
|
333
342
|
const titleNameDividers = document.querySelectorAll('.title-name-divider');
|
|
334
343
|
const elMain = document.querySelector('.el-main');
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
|
|
345
|
+
if (!elMain || titleNameDividers.length === 0) return;
|
|
346
|
+
|
|
347
|
+
let _this = this;
|
|
348
|
+
|
|
349
|
+
// 创建 IntersectionObserver 观察滚动元素
|
|
350
|
+
const observer = new IntersectionObserver(
|
|
351
|
+
(entries) => {
|
|
352
|
+
entries.forEach((entry) => {
|
|
353
|
+
if (entry.isIntersecting && _this.scrollObserverEnabled) {
|
|
354
|
+
const dataIndex = entry.target.getAttribute('data-index');
|
|
355
|
+
_this.affixIndex = dataIndex; // 更新 affixIndex
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
root: elMain, // 设置 el-main 为滚动容器
|
|
361
|
+
rootMargin: '30px 0px -70% 0px', // 确保元素在滚动到 30px 位置时触发
|
|
362
|
+
threshold: 0.1 // 交叉比例,确保元素部分可见时触发
|
|
345
363
|
}
|
|
346
|
-
|
|
347
|
-
root: elMain, // 设置根元素为 el-main
|
|
348
|
-
rootMargin: '0px 0px 70% 0px' // 可根据需要调整
|
|
349
|
-
});
|
|
364
|
+
);
|
|
350
365
|
|
|
351
|
-
//
|
|
352
|
-
titleNameDividers.forEach(divider =>
|
|
353
|
-
|
|
354
|
-
|
|
366
|
+
// 观察每个 title-name-divider 元素
|
|
367
|
+
titleNameDividers.forEach((divider) => observer.observe(divider));
|
|
368
|
+
|
|
369
|
+
// 解绑旧的观察者(防止重复监听)
|
|
370
|
+
if (this.scrollObserver) {
|
|
371
|
+
this.scrollObserver.disconnect();
|
|
372
|
+
}
|
|
373
|
+
this.scrollObserver = observer;
|
|
355
374
|
}
|
|
356
375
|
}
|
|
357
376
|
}
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
style="padding:0 20px;">
|
|
6
6
|
<!-- <el-alert title="以下配置可实时预览,开发者可在 config/index.js 中配置默认值,非常不建议在生产环境下开放布局设置" type="error" :closable="false"></el-alert> -->
|
|
7
7
|
<el-divider></el-divider>
|
|
8
|
-
<el-form-item :label="$t('user.nightmode')">
|
|
8
|
+
<el-form-item :label="$t('lwLayout.user.nightmode')">
|
|
9
9
|
<el-switch v-model="dark"
|
|
10
10
|
active-value="dark"
|
|
11
11
|
inactive-value="default"></el-switch>
|
|
12
12
|
</el-form-item>
|
|
13
13
|
<el-divider></el-divider>
|
|
14
|
-
<el-form-item :label="$t('user.color')">
|
|
14
|
+
<el-form-item :label="$t('lwLayout.user.color')">
|
|
15
15
|
<el-color-picker v-model="colorPrimary"
|
|
16
16
|
:predefine="colorList">></el-color-picker>
|
|
17
17
|
</el-form-item>
|
|
18
18
|
<el-divider></el-divider>
|
|
19
|
-
<el-form-item :label="$t('user.layout')">
|
|
19
|
+
<el-form-item :label="$t('lwLayout.user.layout')">
|
|
20
20
|
<el-select v-model="layout"
|
|
21
21
|
placeholder="请选择">
|
|
22
22
|
<el-option label="默认"
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
value="dock"></el-option>
|
|
30
30
|
</el-select>
|
|
31
31
|
</el-form-item>
|
|
32
|
-
<el-form-item :label="$t('user.menu')">
|
|
32
|
+
<el-form-item :label="$t('lwLayout.user.menu')">
|
|
33
33
|
<el-switch v-model="menuIsCollapse"></el-switch>
|
|
34
34
|
</el-form-item>
|
|
35
|
-
<el-form-item :label="$t('user.tag')">
|
|
35
|
+
<el-form-item :label="$t('lwLayout.user.tag')">
|
|
36
36
|
<el-switch v-model="layoutTags"></el-switch>
|
|
37
37
|
</el-form-item>
|
|
38
38
|
<el-divider></el-divider>
|
|
39
|
-
<el-form-item :label="$t('user.lang')">
|
|
39
|
+
<el-form-item :label="$t('lwLayout.user.lang')">
|
|
40
40
|
<Lang />
|
|
41
41
|
</el-form-item>
|
|
42
42
|
|
|
@@ -181,9 +181,16 @@ export default {
|
|
|
181
181
|
if (item.children) {
|
|
182
182
|
item = item.children[0]
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
|
|
185
|
+
// 兼容合并菜单
|
|
186
|
+
if (item.meta?.code && item.meta?.code != this.$config.APP_NAME.toLowerCase()) {
|
|
187
|
+
item.path = `/i/${item.name}`
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (this.tagList.length == 1 && item.path == this.$route.path) {
|
|
185
191
|
return false
|
|
186
192
|
}
|
|
193
|
+
|
|
187
194
|
this.$store.commit("removeViewTags", tag)
|
|
188
195
|
this.$store.commit("removeIframeList", tag)
|
|
189
196
|
this.$store.commit("removeKeepLive", tag.name)
|
|
@@ -193,7 +200,7 @@ export default {
|
|
|
193
200
|
if (latestView) {
|
|
194
201
|
this.$router.push(latestView)
|
|
195
202
|
} else {
|
|
196
|
-
this.$router.push(
|
|
203
|
+
this.$router.push({ path: item.path })
|
|
197
204
|
}
|
|
198
205
|
}
|
|
199
206
|
},
|
|
@@ -27,23 +27,31 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</el-dropdown-item>
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
<el-dropdown-item divided
|
|
31
|
+
command="setting">{{$t('lwLayout.layout.layoutConfiguration')}}</el-dropdown-item>
|
|
32
32
|
<el-dropdown-item
|
|
33
|
-
command="clearCache">{{$t('layout.clearCache')}}</el-dropdown-item>
|
|
33
|
+
command="clearCache">{{$t('lwLayout.layout.clearCache')}}</el-dropdown-item>
|
|
34
34
|
<el-dropdown-item divided
|
|
35
|
-
command="outLogin">{{$t('layout.outLogin')}}</el-dropdown-item>
|
|
35
|
+
command="outLogin">{{$t('lwLayout.layout.outLogin')}}</el-dropdown-item>
|
|
36
36
|
</el-dropdown-menu>
|
|
37
37
|
</template>
|
|
38
38
|
</el-dropdown>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
+
<el-drawer title="布局实时演示"
|
|
42
|
+
v-model="settingDialog"
|
|
43
|
+
:size="400"
|
|
44
|
+
append-to-body
|
|
45
|
+
destroy-on-close>
|
|
46
|
+
<setting></setting>
|
|
47
|
+
</el-drawer>
|
|
41
48
|
</template>
|
|
42
49
|
|
|
43
50
|
<script>
|
|
44
51
|
import bu from './bu.vue'
|
|
45
52
|
import task from './task.vue'
|
|
46
53
|
import empty from '@/assets/images/empty.jpg'
|
|
54
|
+
import setting from './setting.vue';
|
|
47
55
|
export default {
|
|
48
56
|
props: {
|
|
49
57
|
isShowBu: {
|
|
@@ -61,11 +69,13 @@ export default {
|
|
|
61
69
|
},
|
|
62
70
|
components: {
|
|
63
71
|
bu,
|
|
64
|
-
task
|
|
72
|
+
task,
|
|
73
|
+
setting
|
|
65
74
|
},
|
|
66
75
|
data() {
|
|
67
76
|
return {
|
|
68
77
|
empty,
|
|
78
|
+
settingDialog: false,
|
|
69
79
|
userName: "",
|
|
70
80
|
userNameF: "",
|
|
71
81
|
searchVisible: false,
|
|
@@ -80,8 +90,8 @@ export default {
|
|
|
80
90
|
methods: {
|
|
81
91
|
//个人信息
|
|
82
92
|
handleUser(command) {
|
|
83
|
-
if (command == "
|
|
84
|
-
this
|
|
93
|
+
if (command == "setting") {
|
|
94
|
+
this.settingDialog = true;
|
|
85
95
|
}
|
|
86
96
|
if (command == "cmd") {
|
|
87
97
|
this.$router.push({ path: '/cmd' });
|
|
@@ -212,7 +222,7 @@ export default {
|
|
|
212
222
|
display: flex;
|
|
213
223
|
align-items: center;
|
|
214
224
|
gap: 20px;
|
|
215
|
-
width:
|
|
225
|
+
min-width: 100px;
|
|
216
226
|
:deep(.el-avatar) {
|
|
217
227
|
min-width: 30px;
|
|
218
228
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<div class="aminui-body el-container">
|
|
35
35
|
<div class="aminui-body-menu-top">
|
|
36
36
|
<div class="top-bar-title">
|
|
37
|
-
<span class="title">{{ $t("layout.topbar") }}:</span>
|
|
37
|
+
<span class="title">{{ $t("lwLayout.layout.topbar") }}:</span>
|
|
38
38
|
<Topbar v-if="!ismobile"></Topbar>
|
|
39
39
|
</div>
|
|
40
40
|
<userbar :isShowBu="isShowBu"
|
|
@@ -120,17 +120,7 @@
|
|
|
120
120
|
</div>
|
|
121
121
|
</div>
|
|
122
122
|
</template>
|
|
123
|
-
|
|
124
|
-
<div class="layout-setting"
|
|
125
|
-
@click="openSetting"><el-icon><el-icon-brush-filled /></el-icon></div>
|
|
126
|
-
|
|
127
|
-
<el-drawer title="布局实时演示"
|
|
128
|
-
v-model="settingDialog"
|
|
129
|
-
:size="400"
|
|
130
|
-
append-to-body
|
|
131
|
-
destroy-on-close>
|
|
132
|
-
<setting></setting>
|
|
133
|
-
</el-drawer>
|
|
123
|
+
|
|
134
124
|
</template>
|
|
135
125
|
|
|
136
126
|
<script>
|
|
@@ -140,7 +130,6 @@ import Topbar from './components/topbar.vue';
|
|
|
140
130
|
import Tags from './components/tags.vue';
|
|
141
131
|
import NavMenu from './components/NavMenu.vue';
|
|
142
132
|
import userbar from './components/userbar.vue';
|
|
143
|
-
import setting from './components/setting.vue';
|
|
144
133
|
import iframeView from './components/iframeView.vue';
|
|
145
134
|
export default {
|
|
146
135
|
name: 'lwLayout',
|
|
@@ -171,12 +160,10 @@ export default {
|
|
|
171
160
|
Tags,
|
|
172
161
|
NavMenu,
|
|
173
162
|
userbar,
|
|
174
|
-
setting,
|
|
175
163
|
iframeView
|
|
176
164
|
},
|
|
177
165
|
data() {
|
|
178
166
|
return {
|
|
179
|
-
settingDialog: false,
|
|
180
167
|
changeMenu: false,
|
|
181
168
|
menu: [],
|
|
182
169
|
nextMenu: [],
|
|
@@ -199,7 +186,7 @@ export default {
|
|
|
199
186
|
}
|
|
200
187
|
},
|
|
201
188
|
beforeCreate() {
|
|
202
|
-
//
|
|
189
|
+
// 挂载自定义菜单订阅
|
|
203
190
|
this.$bus.$on('setMenu', (menu) => {
|
|
204
191
|
this.changeMenu = true
|
|
205
192
|
this.menu = this.filterUrl(menu)
|
|
@@ -214,12 +201,6 @@ export default {
|
|
|
214
201
|
this.$store.state.global.menuIsCollapse = !!isMenuIsCollapse
|
|
215
202
|
},
|
|
216
203
|
async created() {
|
|
217
|
-
// 标识当前项目
|
|
218
|
-
let isCombined = this.$tool.data.get("MENUCOMBINED")
|
|
219
|
-
if (isCombined) {
|
|
220
|
-
this.$tool.data.set("MENUCOMBINEDNMAE", this.$config.APP_NAME);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
204
|
this.onLayoutResize();
|
|
224
205
|
window.addEventListener('resize', this.onLayoutResize);
|
|
225
206
|
this.getUserInfo();
|
|
@@ -261,16 +242,15 @@ export default {
|
|
|
261
242
|
let application = [...new Set(user.userAuthInfo.menus.map(permission => permission.split('.')[0].split('_')[0]))]
|
|
262
243
|
user.userAuthInfo.grantedApplications = user.userAuthInfo.grantedApplications.filter(x => application.includes(x.code))
|
|
263
244
|
|
|
245
|
+
let userAuthInfo = {
|
|
246
|
+
...user.userAuthInfo,
|
|
247
|
+
combined: user.combined,
|
|
248
|
+
loginPage: user.loginPage,
|
|
249
|
+
menuContent: user.menuContent,
|
|
250
|
+
}
|
|
264
251
|
this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
|
|
265
|
-
this.$tool.data.set('userAuthInfo',
|
|
266
|
-
this.$
|
|
267
|
-
this.$store.state.user = user.userAuthInfo
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
openSetting() {
|
|
273
|
-
this.settingDialog = true;
|
|
252
|
+
this.$tool.data.set('userAuthInfo', userAuthInfo)
|
|
253
|
+
this.$store.state.user = userAuthInfo
|
|
274
254
|
},
|
|
275
255
|
onLayoutResize() {
|
|
276
256
|
this.$store.commit("SET_ismobile", document.body.clientWidth < 992)
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
lwLayout: {
|
|
3
|
+
user: {
|
|
4
|
+
settings: 'Settings',
|
|
5
|
+
nightmode: 'Night Mode',
|
|
6
|
+
color: 'Theme Color',
|
|
7
|
+
layout: 'Layout',
|
|
8
|
+
menu: 'Collapse Menu',
|
|
9
|
+
tag: 'Tag Bar',
|
|
10
|
+
lang: 'Internationalization',
|
|
11
|
+
nightmode_msg: 'Suitable for low-light environments; the current dark mode is in beta.',
|
|
12
|
+
language: 'Language',
|
|
13
|
+
language_msg: 'Translation in progress; only the text of this view has been translated.'
|
|
14
|
+
},
|
|
15
|
+
layout: {
|
|
16
|
+
layoutConfiguration: 'Layout Configuration',
|
|
17
|
+
topbar: 'Location',
|
|
18
|
+
userData: 'User Center',
|
|
19
|
+
outLogin: 'Logout',
|
|
20
|
+
clearCache: 'Clear Cache'
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
lwLayout: {
|
|
3
|
+
user: {
|
|
4
|
+
settings: '设置',
|
|
5
|
+
nightmode: '黑夜模式',
|
|
6
|
+
color: '主题颜色',
|
|
7
|
+
layout: '框架布局',
|
|
8
|
+
menu: '折叠菜单',
|
|
9
|
+
tag: '标签栏',
|
|
10
|
+
lang: '国际化',
|
|
11
|
+
|
|
12
|
+
nightmode_msg: '适合光线较弱的环境,当前黑暗模式为beta版本',
|
|
13
|
+
language: '语言',
|
|
14
|
+
language_msg: '翻译进行中,暂翻译了本视图的文本'
|
|
15
|
+
},
|
|
16
|
+
layout: {
|
|
17
|
+
layoutConfiguration: '布局配置',
|
|
18
|
+
topbar: '所在位置',
|
|
19
|
+
userData: '个人中心',
|
|
20
|
+
outLogin: '退出登录',
|
|
21
|
+
clearCache: '清除缓存'
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
}
|
|
@@ -173,11 +173,6 @@ export default {
|
|
|
173
173
|
type: Boolean,
|
|
174
174
|
default: true
|
|
175
175
|
},
|
|
176
|
-
// 是否手动合并菜单到同一个项目
|
|
177
|
-
isCombined: {
|
|
178
|
-
type: Boolean,
|
|
179
|
-
default: true
|
|
180
|
-
},
|
|
181
176
|
// 是否加密登录
|
|
182
177
|
isEncryption: {
|
|
183
178
|
type: Boolean,
|
|
@@ -304,6 +299,7 @@ export default {
|
|
|
304
299
|
this.$store.commit("clearViewTags");
|
|
305
300
|
this.$store.commit("clearKeepLive");
|
|
306
301
|
this.$store.commit("clearIframeList")
|
|
302
|
+
this.$tool.data.remove("MENU_LIST")
|
|
307
303
|
},
|
|
308
304
|
methods: {
|
|
309
305
|
// 加密
|
|
@@ -324,7 +320,7 @@ export default {
|
|
|
324
320
|
username: this.ruleForm.user,
|
|
325
321
|
password: this.ruleForm.password,
|
|
326
322
|
};
|
|
327
|
-
|
|
323
|
+
|
|
328
324
|
if (this.isEncryption) {
|
|
329
325
|
const publicKey = await this.$api.auth.key()
|
|
330
326
|
if (publicKey) {
|
|
@@ -356,14 +352,19 @@ export default {
|
|
|
356
352
|
// 获取用户信息
|
|
357
353
|
let user = await this.$api.auth.user()
|
|
358
354
|
// 处理应用显示逻辑
|
|
359
|
-
let application
|
|
355
|
+
let application = [...new Set(user.userAuthInfo.menus.map(permission => permission.split('.')[0].split('_')[0]))]
|
|
360
356
|
user.userAuthInfo.grantedApplications = user.userAuthInfo.grantedApplications.filter(x => application.includes(x.code))
|
|
361
357
|
|
|
358
|
+
let userAuthInfo = {
|
|
359
|
+
...user.userAuthInfo,
|
|
360
|
+
combined: user.combined,
|
|
361
|
+
loginPage: user.loginPage,
|
|
362
|
+
menuContent: user.menuContent,
|
|
363
|
+
}
|
|
362
364
|
this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
|
|
363
|
-
this.$tool.data.set('userAuthInfo',
|
|
365
|
+
this.$tool.data.set('userAuthInfo', userAuthInfo)
|
|
364
366
|
// 用与应用菜单显示
|
|
365
|
-
this.$
|
|
366
|
-
this.$store.state.user = user.userAuthInfo
|
|
367
|
+
this.$store.state.user = userAuthInfo
|
|
367
368
|
|
|
368
369
|
|
|
369
370
|
// 兼容旧项目设置信息
|
|
@@ -372,42 +373,8 @@ export default {
|
|
|
372
373
|
sessionStorage.setItem('easyweb_session_passport_bu_list', JSON.stringify({ v: bu }))
|
|
373
374
|
document.cookie = `Authorization=Bearer ${token}`;
|
|
374
375
|
|
|
375
|
-
// 获取合并菜单信息 isCombined 这参数后期要加是否要合并菜单展示 现在默认tue
|
|
376
|
-
/**
|
|
377
|
-
* 此处进行 获取的数据路由router文件进行合并
|
|
378
|
-
* 需要开发一个接口返回 权限与具体页面路径映射数据 (这个功能要开发)
|
|
379
|
-
* 需要在 platform 菜单管理中 配置isCombined参数 用于标识是否合并项目菜单
|
|
380
|
-
* 原有的数据要加两个配置项 icon path
|
|
381
|
-
* 返回的数据是
|
|
382
|
-
* [
|
|
383
|
-
* {
|
|
384
|
-
"id": "ma_menu.workplace",
|
|
385
|
-
"tenantId": "connext",
|
|
386
|
-
"name": "工作台",
|
|
387
|
-
"type": "MENU",
|
|
388
|
-
...
|
|
389
|
-
"applications": ["ma"],
|
|
390
|
-
"icon": 'el-icon-discount', // icon
|
|
391
|
-
"path": '/reach/flow-template/, // 菜单路径
|
|
392
|
-
"authority": [
|
|
393
|
-
"ma.marketing_center.locate",
|
|
394
|
-
"ma.marketing_center_operation.locate",
|
|
395
|
-
]
|
|
396
|
-
}
|
|
397
|
-
* ]
|
|
398
|
-
*/
|
|
399
|
-
if (user.combined || this.isCombined) {
|
|
400
|
-
let menu = await this.$api.auth.menu();
|
|
401
|
-
this.$tool.data.set("MENUCOMBINED", menu);
|
|
402
|
-
// 注入 用于判断子项目 是否扁平化
|
|
403
|
-
this.$tool.data.set("MENUCOMBINEDNMAE", this.$config.APP_NAME);
|
|
404
|
-
} else {
|
|
405
|
-
this.$tool.data.remove("MENUCOMBINED");
|
|
406
|
-
this.$tool.data.remove("MENUCOMBINEDNMAE");
|
|
407
|
-
}
|
|
408
376
|
|
|
409
377
|
// 检验是否初始化
|
|
410
|
-
|
|
411
378
|
if (this.isInitialized) {
|
|
412
379
|
let initialized = await this.$api.auth.initialized()
|
|
413
380
|
this.$tool.data.set('zoneInitialized', initialized)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-cascader v-model="value" :options="item.options" :props="item.props" :filterable="item.filterable" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
emits: ["update:modelValue", "change"],
|
|
8
|
+
name: "Input",
|
|
9
|
+
props: {
|
|
10
|
+
disabled: { // 是否禁止操作
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
modelValue: { // 绑定的结果
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
item: { // 配置项
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({})
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
value: this.modelValue
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
watch: {
|
|
29
|
+
modelValue(newVal) {
|
|
30
|
+
this.value = newVal;
|
|
31
|
+
},
|
|
32
|
+
value(newVal) {
|
|
33
|
+
const filter = this.item.filter ?? false;
|
|
34
|
+
if (filter) {
|
|
35
|
+
newVal = newVal.replace(/ /g, ',').replace(/\,/g, ',').replace(/\,/g, ',').replace(/\n/g, ',');
|
|
36
|
+
}
|
|
37
|
+
console.log('%c [ newVal ]-36', 'font-size:13px; background:pink; color:#bf2c9f;', newVal)
|
|
38
|
+
|
|
39
|
+
this.$emit('update:modelValue', newVal);
|
|
40
|
+
this.$emit('change', newVal);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</el-date-picker>
|
|
16
|
-
</div>
|
|
2
|
+
<el-date-picker :type="item.type || 'date'"
|
|
3
|
+
:disabled="item.disabled"
|
|
4
|
+
:format="item.format || 'YYYY-MM-DD'"
|
|
5
|
+
:value-format="item.valueFormat"
|
|
6
|
+
:placeholder="item.placeholder || $t('lwSearch.please_select')"
|
|
7
|
+
:range-separator="item.rangeSeparator || $t('lwSearch.monthRange.rangeSeparator')"
|
|
8
|
+
:start-placeholder="item.startPlaceholder || $t('lwSearch.monthRange.startPlaceholder')"
|
|
9
|
+
:end-placeholder="item.endPlaceholder || $t('lwSearch.monthRange.endPlaceholder')"
|
|
10
|
+
clearable
|
|
11
|
+
v-model="value"
|
|
12
|
+
:disabled-date="disabledDate"
|
|
13
|
+
style="width: 100%">
|
|
14
|
+
</el-date-picker>
|
|
17
15
|
</template>
|
|
18
16
|
|
|
19
17
|
<script>
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</el-date-picker>
|
|
15
|
-
</div>
|
|
2
|
+
<el-date-picker :showTime="item.showTime"
|
|
3
|
+
:format="item.format || 'YYYY-MM-DD HH:mm:ss'"
|
|
4
|
+
:value-format="item.valueFormat || 'YYYY-MM-DD HH:mm:ss'"
|
|
5
|
+
clearable
|
|
6
|
+
v-model="value"
|
|
7
|
+
style="width: 100%"
|
|
8
|
+
type="datetimerange"
|
|
9
|
+
:start-placeholder="item.startPlaceholder || $t('lwSearch.dateRange.startPlaceholder')"
|
|
10
|
+
:end-placeholder="item.endPlaceholder || $t('lwSearch.dateRange.endPlaceholder')"
|
|
11
|
+
:default-time="item.defaultTime || defaultTime(0)"
|
|
12
|
+
size="">
|
|
13
|
+
</el-date-picker>
|
|
16
14
|
</template>
|
|
17
15
|
|
|
18
16
|
<script>
|