lw-cdp-ui 1.2.48 → 1.2.49
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 +1 -1
- package/dist/assets/images/empty.jpg +0 -0
- package/dist/assets/images/login.svg +0 -558
- package/dist/assets/images/logo.jpg +0 -0
- package/dist/assets/images/logo.svg +0 -78
- package/dist/assets/images/logo1.svg +0 -86
- package/dist/assets/images/register.svg +0 -351
- package/dist/components/lwCronSelect/index.vue +0 -218
- package/dist/components/lwFlow/components/lfControl.vue +0 -126
- package/dist/components/lwFlow/components/lfNodePanel.vue +0 -98
- package/dist/components/lwFlow/config/dagre.js +0 -279
- package/dist/components/lwFlow/config/nodesList.js +0 -243
- package/dist/components/lwFlow/index.vue +0 -781
- package/dist/components/lwFlow/nodeEdit/audienceReceive.vue +0 -262
- package/dist/components/lwFlow/nodeEdit/basicSettings.vue +0 -88
- package/dist/components/lwFlow/nodeEdit/eventReceive.vue +0 -145
- package/dist/components/lwFlow/nodeEdit/index.vue +0 -306
- package/dist/components/lwFlow/nodeEdit/sms.vue +0 -107
- package/dist/components/lwFlow/nodeEdit/styleSettings.vue +0 -236
- package/dist/components/lwFlow/nodes/basisEnd.js +0 -56
- package/dist/components/lwFlow/nodes/basisStart.js +0 -56
- package/dist/components/lwFlow/nodes/custom.js +0 -129
- package/dist/components/lwFlow/nodes/et2lTable.js +0 -132
- package/dist/components/lwFlow/nodesData/datas/audienceReceive.js +0 -137
- package/dist/components/lwFlow/nodesData/datas/base.js +0 -190
- package/dist/components/lwFlow/nodesData/datas/collap.js +0 -95
- package/dist/components/lwFlow/nodesData/datas/eventReceive.js +0 -106
- package/dist/components/lwFlow/nodesData/datas/expand.js +0 -85
- package/dist/components/lwFlow/nodesData/datas/filter.js +0 -85
- package/dist/components/lwFlow/nodesData/datas/joiner.js +0 -96
- package/dist/components/lwFlow/nodesData/datas/mapper.js +0 -111
- package/dist/components/lwFlow/nodesData/datas/reduce.js +0 -69
- package/dist/components/lwFlow/nodesData/datas/sms.js +0 -69
- package/dist/components/lwFlow/nodesData/datas/source.js +0 -142
- package/dist/components/lwFlow/nodesData/datas/target.js +0 -95
- package/dist/components/lwFlow/nodesData/datas/timer.js +0 -180
- package/dist/components/lwFlow/nodesData/index.js +0 -41
- package/dist/components/lwForm/index.vue +0 -631
- package/dist/components/lwFormJson/JsonItem.vue +0 -302
- package/dist/components/lwFormJson/StatsConfig.vue +0 -544
- package/dist/components/lwFormJson/TreeItem.vue +0 -149
- package/dist/components/lwFormJson/index.vue +0 -362
- package/dist/components/lwFormJson/menuList.js +0 -324
- package/dist/components/lwFormMini/FormItem.vue +0 -466
- package/dist/components/lwFormMini/ViewItem.vue +0 -391
- package/dist/components/lwFormMini/index.vue +0 -421
- package/dist/components/lwFormMini/textToPassword.vue +0 -61
- package/dist/components/lwFormView/index.vue +0 -390
- package/dist/components/lwFormView/textToPassword.vue +0 -59
- package/dist/components/lwIconSelect/iconSelect.js +0 -289
- package/dist/components/lwIconSelect/index.vue +0 -142
- package/dist/components/lwLayout/components/NavMenu.vue +0 -36
- package/dist/components/lwLayout/components/aside.vue +0 -295
- package/dist/components/lwLayout/components/bu.vue +0 -88
- package/dist/components/lwLayout/components/iframeView.vue +0 -57
- package/dist/components/lwLayout/components/lang.vue +0 -77
- package/dist/components/lwLayout/components/setting.vue +0 -102
- package/dist/components/lwLayout/components/sideM.vue +0 -135
- package/dist/components/lwLayout/components/tags.vue +0 -388
- package/dist/components/lwLayout/components/topbar.vue +0 -69
- package/dist/components/lwLayout/components/userbar.vue +0 -214
- package/dist/components/lwLayout/index.vue +0 -469
- package/dist/components/lwLogin/index.vue +0 -511
- package/dist/components/lwLogin/locale/en-us.js +0 -37
- package/dist/components/lwLogin/locale/zh-cn.js +0 -37
- package/dist/components/lwSearch/date/date.vue +0 -113
- package/dist/components/lwSearch/dateRange/dateRange.vue +0 -118
- package/dist/components/lwSearch/dates/dates.vue +0 -366
- package/dist/components/lwSearch/index.vue +0 -628
- package/dist/components/lwSearch/input/input.vue +0 -55
- package/dist/components/lwSearch/locale/en-us.js +0 -15
- package/dist/components/lwSearch/locale/zh-cn.js +0 -15
- package/dist/components/lwSearch/select/select.vue +0 -58
- package/dist/components/lwSvgIcon/index.vue +0 -29
- package/dist/components/lwTable/index.js +0 -286
- package/dist/components/lwTable/index.scss +0 -238
- package/dist/components/lwTable/index.vue +0 -346
- package/dist/components/lwTable/locale/en-US.js +0 -26
- package/dist/components/lwTable/locale/zh-CN.js +0 -26
- package/dist/components/lwTable/useFullscreen.js +0 -73
- package/dist/components/lwTableForm/index.vue +0 -662
- package/dist/components/lwTableSelect/index.vue +0 -266
- package/dist/components/lwTableSelect/tableSelect.js +0 -23
- package/dist/components/lwUpload/index.vue +0 -564
- package/dist/lw-cdp-ui.esm.js +0 -19906
- package/dist/lw-cdp-ui.umd.js +0 -22
- package/dist/style.css +0 -1
- package/dist/vite.svg +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="" class="mobile-nav-button" @click="showMobileNav($event)" v-drag draggable="false"><el-icon><el-icon-menu /></el-icon></div>
|
|
3
|
-
|
|
4
|
-
<el-drawer ref="mobileNavBox" title="移动端菜单" :size="240" v-model="nav" direction="ltr" :with-header="false" destroy-on-close>
|
|
5
|
-
<el-container class="mobile-nav">
|
|
6
|
-
<el-header>
|
|
7
|
-
<div class="logo-bar"><img class="logo" src="../../../assets/images/logo.svg"><span>{{ $config.APP_NAME }}</span></div>
|
|
8
|
-
</el-header>
|
|
9
|
-
<el-main>
|
|
10
|
-
<el-scrollbar>
|
|
11
|
-
<el-menu :default-active="$route.meta.active || $route.fullPath" @select="select" router background-color="#212d3d" text-color="#fff" active-text-color="#409EFF">
|
|
12
|
-
<NavMenu :navMenus="menu"></NavMenu>
|
|
13
|
-
</el-menu>
|
|
14
|
-
</el-scrollbar>
|
|
15
|
-
</el-main>
|
|
16
|
-
</el-container>
|
|
17
|
-
</el-drawer>
|
|
18
|
-
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import NavMenu from './NavMenu.vue';
|
|
23
|
-
export default {
|
|
24
|
-
components: {
|
|
25
|
-
NavMenu
|
|
26
|
-
},
|
|
27
|
-
data() {
|
|
28
|
-
return {
|
|
29
|
-
nav: false,
|
|
30
|
-
menu: []
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
computed:{
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
created() {
|
|
37
|
-
var menu = this.$router.sc_getMenu()
|
|
38
|
-
this.menu = this.filterUrl(menu)
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
watch: {
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
methods: {
|
|
45
|
-
showMobileNav(e){
|
|
46
|
-
var isdrag = e.currentTarget.getAttribute('drag-flag')
|
|
47
|
-
if (isdrag == 'true') {
|
|
48
|
-
return false;
|
|
49
|
-
}else{
|
|
50
|
-
this.nav = true;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
select(){
|
|
55
|
-
this.$refs.mobileNavBox.handleClose()
|
|
56
|
-
},
|
|
57
|
-
//转换外部链接的路由
|
|
58
|
-
filterUrl(map){
|
|
59
|
-
var newMap = []
|
|
60
|
-
map && map.forEach(item => {
|
|
61
|
-
item.meta = item.meta?item.meta:{};
|
|
62
|
-
//处理隐藏
|
|
63
|
-
if(item.meta.hidden || item.meta.type=="button"){
|
|
64
|
-
return false
|
|
65
|
-
}
|
|
66
|
-
//处理http
|
|
67
|
-
if(item.meta.type=='iframe'){
|
|
68
|
-
item.path = `/i/${item.name}`;
|
|
69
|
-
}
|
|
70
|
-
//递归循环
|
|
71
|
-
if(item.children&&item.children.length > 0){
|
|
72
|
-
item.children = this.filterUrl(item.children);
|
|
73
|
-
}
|
|
74
|
-
newMap.push(item)
|
|
75
|
-
})
|
|
76
|
-
return newMap;
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
directives: {
|
|
80
|
-
drag(el){
|
|
81
|
-
let oDiv = el; //当前元素
|
|
82
|
-
let firstTime='',lastTime='';
|
|
83
|
-
//禁止选择网页上的文字
|
|
84
|
-
// document.onselectstart = function() {
|
|
85
|
-
// return false;
|
|
86
|
-
// };
|
|
87
|
-
oDiv.onmousedown = function(e){
|
|
88
|
-
//鼠标按下,计算当前元素距离可视区的距离
|
|
89
|
-
let disX = e.clientX - oDiv.offsetLeft;
|
|
90
|
-
let disY = e.clientY - oDiv.offsetTop;
|
|
91
|
-
document.onmousemove = function(e){
|
|
92
|
-
oDiv.setAttribute('drag-flag', true);
|
|
93
|
-
firstTime = new Date().getTime();
|
|
94
|
-
//通过事件委托,计算移动的距离
|
|
95
|
-
let l = e.clientX - disX;
|
|
96
|
-
let t = e.clientY - disY;
|
|
97
|
-
|
|
98
|
-
//移动当前元素
|
|
99
|
-
|
|
100
|
-
if(t > 0 && t < document.body.clientHeight - 50){
|
|
101
|
-
oDiv.style.top = t + "px";
|
|
102
|
-
}
|
|
103
|
-
if(l > 0 && l < document.body.clientWidth - 50){
|
|
104
|
-
oDiv.style.left = l + "px";
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
document.onmouseup = function(){
|
|
110
|
-
lastTime = new Date().getTime();
|
|
111
|
-
if( (lastTime - firstTime)>200 ){
|
|
112
|
-
oDiv.setAttribute('drag-flag', false);
|
|
113
|
-
}
|
|
114
|
-
document.onmousemove = null;
|
|
115
|
-
document.onmouseup = null;
|
|
116
|
-
};
|
|
117
|
-
//return false不加的话可能导致黏连,就是拖到一个地方时div粘在鼠标上不下来,相当于onmouseup失效
|
|
118
|
-
return false;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
</script>
|
|
124
|
-
|
|
125
|
-
<style scoped>
|
|
126
|
-
.mobile-nav-button {position: fixed;bottom:10px;left:10px;z-index: 10;width: 50px;height: 50px;background: #409EFF;box-shadow: 0 2px 12px 0 rgba(64, 158, 255, 1);border-radius: 50%;display: flex;align-items: center;justify-content: center;}
|
|
127
|
-
.mobile-nav-button i {color: #fff;font-size: 20px;}
|
|
128
|
-
|
|
129
|
-
.mobile-nav {background: #212d3d;}
|
|
130
|
-
.mobile-nav .el-header {background: transparent;border: 0;}
|
|
131
|
-
.mobile-nav .el-main {padding:0;}
|
|
132
|
-
.mobile-nav .logo-bar {display: flex;align-items: center;font-weight: bold;font-size: 20px;color: #fff;}
|
|
133
|
-
.mobile-nav .logo-bar img {width: 30px;margin-right: 10px;}
|
|
134
|
-
.mobile-nav .el-submenu__title:hover {background: #fff!important;}
|
|
135
|
-
</style>
|
|
@@ -1,388 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="adminui-tags">
|
|
3
|
-
<draggable v-model="$store.state.viewTags.viewTags"
|
|
4
|
-
@change="changeTages"
|
|
5
|
-
class="context-menu-list"
|
|
6
|
-
ref="tags"
|
|
7
|
-
itemKey="name">
|
|
8
|
-
<template #item="{element: tag, index}"
|
|
9
|
-
keyName="tag">
|
|
10
|
-
<li v-bind:key="tag"
|
|
11
|
-
:class="[isActive(tag)?'active':'',tag.meta.affix?'affix':'' ]"
|
|
12
|
-
@contextmenu.prevent="openContextMenu($event, tag)">
|
|
13
|
-
<router-link :to="tag">
|
|
14
|
-
<span>{{ getIdName(tag) }}</span>
|
|
15
|
-
<el-icon v-if="!tag.meta.affix"
|
|
16
|
-
@click.prevent.stop='closeSelectedTag(tag)'><el-icon-close /></el-icon>
|
|
17
|
-
</router-link>
|
|
18
|
-
</li>
|
|
19
|
-
</template>
|
|
20
|
-
</draggable>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<transition name="el-zoom-in-top">
|
|
24
|
-
<ul v-if="contextMenuVisible"
|
|
25
|
-
:style="{left:left+'px',top:top+'px'}"
|
|
26
|
-
class="contextmenu"
|
|
27
|
-
id="contextmenu">
|
|
28
|
-
<li @click="refreshTab()"><el-icon><el-icon-refresh /></el-icon>刷新</li>
|
|
29
|
-
<hr>
|
|
30
|
-
<li @click="closeTabs()"
|
|
31
|
-
:class="contextMenuItem.meta.affix?'disabled':''">
|
|
32
|
-
<el-icon><el-icon-close /></el-icon>关闭标签
|
|
33
|
-
</li>
|
|
34
|
-
<li @click="closeOtherTabs()">
|
|
35
|
-
<el-icon><el-icon-folder-delete /></el-icon>关闭其他标签
|
|
36
|
-
</li>
|
|
37
|
-
<hr>
|
|
38
|
-
<li @click="maximize()"><el-icon><el-icon-full-screen /></el-icon>最大化</li>
|
|
39
|
-
<li @click="openWindow()">
|
|
40
|
-
<el-icon><el-icon-copy-document /></el-icon>在新的窗口中打开
|
|
41
|
-
</li>
|
|
42
|
-
</ul>
|
|
43
|
-
</transition>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<script>
|
|
47
|
-
import draggable from 'vuedraggable'
|
|
48
|
-
|
|
49
|
-
export default {
|
|
50
|
-
name: "tags",
|
|
51
|
-
components: {
|
|
52
|
-
draggable
|
|
53
|
-
},
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
contextMenuVisible: false,
|
|
57
|
-
contextMenuItem: null,
|
|
58
|
-
left: 0,
|
|
59
|
-
top: 0,
|
|
60
|
-
tipVisible: false,
|
|
61
|
-
tipDisplayed: false,
|
|
62
|
-
menu: this.$router.sc_getMenu()
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
props: {
|
|
66
|
-
// 标签是否显示ID
|
|
67
|
-
tagShowID: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: false
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
computed: {
|
|
73
|
-
tagList() {
|
|
74
|
-
return this.$store.state.viewTags.viewTags
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
watch: {
|
|
78
|
-
//初始化滚动条
|
|
79
|
-
scrollInit() {
|
|
80
|
-
const tags = this.$refs.tags
|
|
81
|
-
if (tags) {
|
|
82
|
-
tags.addEventListener('scroll', () => {
|
|
83
|
-
if (tags.scrollLeft > 0) {
|
|
84
|
-
this.tipDisplayed = true
|
|
85
|
-
} else {
|
|
86
|
-
this.tipDisplayed = false
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
$route(e) {
|
|
92
|
-
this.addViewTags(e);
|
|
93
|
-
},
|
|
94
|
-
contextMenuVisible(value) {
|
|
95
|
-
var _this = this;
|
|
96
|
-
var cm = function (e) {
|
|
97
|
-
let sp = document.getElementById("contextmenu");
|
|
98
|
-
if (sp && !sp.contains(e.target)) {
|
|
99
|
-
_this.closeMenu()
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (value) {
|
|
103
|
-
document.body.addEventListener('click', e => cm(e))
|
|
104
|
-
} else {
|
|
105
|
-
document.body.removeEventListener('click', e => cm(e))
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
created() {
|
|
111
|
-
this.init()
|
|
112
|
-
|
|
113
|
-
// 将方法挂载到全局
|
|
114
|
-
this.$store.state.viewTags.closeTagAndJump = this.closeTagAndJump
|
|
115
|
-
},
|
|
116
|
-
mounted() {
|
|
117
|
-
this.scrollInit()
|
|
118
|
-
},
|
|
119
|
-
methods: {
|
|
120
|
-
// 初始化
|
|
121
|
-
init() {
|
|
122
|
-
let tags = this.$tool.data.get('RouteTags') || []
|
|
123
|
-
if (tags.length > 0) {
|
|
124
|
-
|
|
125
|
-
tags.forEach((tag, index) => {
|
|
126
|
-
var isRoute = this.treeFind(this.menu, node => node.path == tag.path)
|
|
127
|
-
if (isRoute) {
|
|
128
|
-
this.addViewTags(tag)
|
|
129
|
-
}
|
|
130
|
-
})
|
|
131
|
-
}
|
|
132
|
-
this.addViewTags(this.$route)
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
//查找树
|
|
136
|
-
treeFind(tree, func) {
|
|
137
|
-
for (const data of tree) {
|
|
138
|
-
if (func(data)) return data
|
|
139
|
-
if (data.children) {
|
|
140
|
-
const res = this.treeFind(data.children, func)
|
|
141
|
-
if (res) return res
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return null
|
|
145
|
-
},
|
|
146
|
-
// 拖动排序
|
|
147
|
-
changeTages(val) {
|
|
148
|
-
this.$tool.data.set('RouteTags', this.$store.state.viewTags.viewTags)
|
|
149
|
-
},
|
|
150
|
-
//增加tag
|
|
151
|
-
addViewTags(route) {
|
|
152
|
-
if (route.name && !route.meta.fullpage) {
|
|
153
|
-
delete route.redirectedFrom
|
|
154
|
-
route = { ...route, matched: [] }
|
|
155
|
-
this.$store.commit("pushViewTags", route)
|
|
156
|
-
this.$store.commit("pushKeepLive", route.name)
|
|
157
|
-
this.$tool.data.set('RouteTags', this.$store.state.viewTags.viewTags)
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
//判断标签容器是否出现滚动条
|
|
161
|
-
this.$nextTick(() => {
|
|
162
|
-
const tags = document.querySelector(".context-menu-list")
|
|
163
|
-
if (tags && tags.scrollWidth > tags.clientWidth) {
|
|
164
|
-
//确保当前标签在可视范围内
|
|
165
|
-
let targetTag = tags.querySelector(".active")
|
|
166
|
-
targetTag.scrollIntoView()
|
|
167
|
-
//显示提示
|
|
168
|
-
if (!this.tipDisplayed) {
|
|
169
|
-
this.tipVisible = true
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
})
|
|
173
|
-
},
|
|
174
|
-
//高亮tag
|
|
175
|
-
isActive(route) {
|
|
176
|
-
return route.fullPath === this.$route.fullPath
|
|
177
|
-
},
|
|
178
|
-
//关闭tag
|
|
179
|
-
closeSelectedTag(tag, autoPushLatestView = true) {
|
|
180
|
-
let item = this.menu[0]
|
|
181
|
-
if (item.children) {
|
|
182
|
-
item = item.children[0]
|
|
183
|
-
}
|
|
184
|
-
if (this.tagList.length == 1 && item.path == this.$route.fullPath) {
|
|
185
|
-
return false
|
|
186
|
-
}
|
|
187
|
-
this.$store.commit("removeViewTags", tag)
|
|
188
|
-
this.$store.commit("removeIframeList", tag)
|
|
189
|
-
this.$store.commit("removeKeepLive", tag.name)
|
|
190
|
-
this.$tool.data.set('RouteTags', this.$store.state.viewTags.viewTags)
|
|
191
|
-
if (autoPushLatestView && this.isActive(tag)) {
|
|
192
|
-
const latestView = this.tagList.slice(-1)[0]
|
|
193
|
-
if (latestView) {
|
|
194
|
-
this.$router.push(latestView)
|
|
195
|
-
} else {
|
|
196
|
-
this.$router.push('/')
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
//tag右键
|
|
201
|
-
openContextMenu(e, tag) {
|
|
202
|
-
this.contextMenuItem = tag;
|
|
203
|
-
this.contextMenuVisible = true;
|
|
204
|
-
this.left = e.clientX + 1;
|
|
205
|
-
this.top = e.clientY + 1;
|
|
206
|
-
|
|
207
|
-
//FIX 右键菜单边缘化位置处理
|
|
208
|
-
this.$nextTick(() => {
|
|
209
|
-
let sp = document.getElementById("contextmenu");
|
|
210
|
-
if (document.body.offsetWidth - e.clientX < sp.offsetWidth) {
|
|
211
|
-
this.left = document.body.offsetWidth - sp.offsetWidth + 1;
|
|
212
|
-
this.top = e.clientY + 1;
|
|
213
|
-
}
|
|
214
|
-
})
|
|
215
|
-
},
|
|
216
|
-
//关闭右键菜单
|
|
217
|
-
closeMenu() {
|
|
218
|
-
this.contextMenuItem = null;
|
|
219
|
-
this.contextMenuVisible = false
|
|
220
|
-
},
|
|
221
|
-
//TAB 刷新
|
|
222
|
-
refreshTab() {
|
|
223
|
-
var nowTag = this.contextMenuItem;
|
|
224
|
-
this.contextMenuVisible = false
|
|
225
|
-
//判断是否当前路由,否的话跳转
|
|
226
|
-
if (this.$route.fullPath != nowTag.fullPath) {
|
|
227
|
-
this.$router.push({
|
|
228
|
-
path: nowTag.fullPath,
|
|
229
|
-
query: nowTag.query
|
|
230
|
-
})
|
|
231
|
-
}
|
|
232
|
-
this.$store.commit("refreshIframe", nowTag)
|
|
233
|
-
this.$store.commit("removeKeepLive", nowTag.name)
|
|
234
|
-
this.$store.commit("setRouteShow", true)
|
|
235
|
-
this.$nextTick(() => {
|
|
236
|
-
this.$store.commit("pushKeepLive", nowTag.name)
|
|
237
|
-
this.$store.commit("setRouteShow", false)
|
|
238
|
-
})
|
|
239
|
-
},
|
|
240
|
-
//TAB 关闭
|
|
241
|
-
closeTabs() {
|
|
242
|
-
var nowTag = this.contextMenuItem;
|
|
243
|
-
if (!nowTag.meta.affix) {
|
|
244
|
-
this.closeSelectedTag(nowTag)
|
|
245
|
-
this.contextMenuVisible = false
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
|
-
//TAB 关闭其他
|
|
249
|
-
closeOtherTabs() {
|
|
250
|
-
var nowTag = this.contextMenuItem;
|
|
251
|
-
//判断是否当前路由,否的话跳转
|
|
252
|
-
if (this.$route.fullPath != nowTag.fullPath) {
|
|
253
|
-
this.$router.push({
|
|
254
|
-
path: nowTag.fullPath,
|
|
255
|
-
query: nowTag.query
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
var tags = [...this.tagList];
|
|
259
|
-
tags.forEach(tag => {
|
|
260
|
-
if (tag.meta && tag.meta.affix || nowTag.fullPath == tag.fullPath) {
|
|
261
|
-
return true
|
|
262
|
-
} else {
|
|
263
|
-
this.closeSelectedTag(tag, false)
|
|
264
|
-
}
|
|
265
|
-
})
|
|
266
|
-
this.contextMenuVisible = false
|
|
267
|
-
},
|
|
268
|
-
//TAB 最大化
|
|
269
|
-
maximize() {
|
|
270
|
-
var nowTag = this.contextMenuItem;
|
|
271
|
-
this.contextMenuVisible = false
|
|
272
|
-
//判断是否当前路由,否的话跳转
|
|
273
|
-
if (this.$route.fullPath != nowTag.fullPath) {
|
|
274
|
-
this.$router.push({
|
|
275
|
-
path: nowTag.fullPath,
|
|
276
|
-
query: nowTag.query
|
|
277
|
-
})
|
|
278
|
-
}
|
|
279
|
-
document.getElementById('app').classList.add('main-maximize')
|
|
280
|
-
},
|
|
281
|
-
//新窗口打开
|
|
282
|
-
openWindow() {
|
|
283
|
-
var nowTag = this.contextMenuItem;
|
|
284
|
-
var url = nowTag.href || '/';
|
|
285
|
-
if (!nowTag.meta.affix) {
|
|
286
|
-
this.closeSelectedTag(nowTag)
|
|
287
|
-
}
|
|
288
|
-
window.open(url);
|
|
289
|
-
this.contextMenuVisible = false
|
|
290
|
-
},
|
|
291
|
-
//横向滚动
|
|
292
|
-
scrollInit() {
|
|
293
|
-
const scrollDiv = document.querySelector('.context-menu-list')
|
|
294
|
-
if (!scrollDiv) { return false }
|
|
295
|
-
scrollDiv.addEventListener('mousewheel', handler, false) || scrollDiv.addEventListener("DOMMouseScroll", handler, false)
|
|
296
|
-
function handler(event) {
|
|
297
|
-
const detail = event.wheelDelta || event.detail;
|
|
298
|
-
//火狐上滚键值-3 下滚键值3,其他内核上滚键值120 下滚键值-120
|
|
299
|
-
const moveForwardStep = 1;
|
|
300
|
-
const moveBackStep = -1;
|
|
301
|
-
let step = 0;
|
|
302
|
-
if (detail == 3 || detail < 0 && detail != -3) {
|
|
303
|
-
step = moveForwardStep * 50;
|
|
304
|
-
} else {
|
|
305
|
-
step = moveBackStep * 50;
|
|
306
|
-
}
|
|
307
|
-
scrollDiv.scrollLeft += step;
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
hideTip() {
|
|
311
|
-
this.tipVisible = false
|
|
312
|
-
this.tipDisplayed = true
|
|
313
|
-
},
|
|
314
|
-
// 关闭当前标签 并跳转
|
|
315
|
-
closeTagAndJump(path, keep) {
|
|
316
|
-
this.$store.commit('removeKeepLive', keep)
|
|
317
|
-
this.closeSelectedTag(this.$route, false)
|
|
318
|
-
this.$router.push(path)
|
|
319
|
-
},
|
|
320
|
-
// 显示ID
|
|
321
|
-
getIdName(tag) {
|
|
322
|
-
if (tag.query?.id && this.tagShowID) {
|
|
323
|
-
let str = tag.meta.title
|
|
324
|
-
if (str.includes(':') || str.includes(':')) {
|
|
325
|
-
return tag.meta.title
|
|
326
|
-
} else {
|
|
327
|
-
return `${tag.meta.title}:${tag.query.id}`
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
} else {
|
|
331
|
-
return tag.meta.title
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
</script>
|
|
338
|
-
|
|
339
|
-
<style>
|
|
340
|
-
.contextmenu {
|
|
341
|
-
position: fixed;
|
|
342
|
-
width: 200px;
|
|
343
|
-
margin: 0;
|
|
344
|
-
border-radius: 0px;
|
|
345
|
-
background: var(--el-bg-color-overlay);
|
|
346
|
-
border: 1px solid var(--el-border-color-light);
|
|
347
|
-
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
348
|
-
z-index: 3000;
|
|
349
|
-
list-style-type: none;
|
|
350
|
-
padding: 10px 0;
|
|
351
|
-
}
|
|
352
|
-
.contextmenu hr {
|
|
353
|
-
margin: 5px 0;
|
|
354
|
-
border: none;
|
|
355
|
-
height: 1px;
|
|
356
|
-
font-size: 0px;
|
|
357
|
-
background-color: var(--el-border-color-light);
|
|
358
|
-
}
|
|
359
|
-
.contextmenu li {
|
|
360
|
-
display: flex;
|
|
361
|
-
align-items: center;
|
|
362
|
-
margin: 0;
|
|
363
|
-
cursor: pointer;
|
|
364
|
-
line-height: 30px;
|
|
365
|
-
padding: 0 17px;
|
|
366
|
-
color: #606266;
|
|
367
|
-
}
|
|
368
|
-
.contextmenu li i {
|
|
369
|
-
font-size: 14px;
|
|
370
|
-
margin-right: 10px;
|
|
371
|
-
}
|
|
372
|
-
.contextmenu li:hover {
|
|
373
|
-
background-color: var(--el-color-primary-light-9);
|
|
374
|
-
color: var(--el-color-primary);
|
|
375
|
-
}
|
|
376
|
-
.contextmenu li.disabled {
|
|
377
|
-
cursor: not-allowed;
|
|
378
|
-
color: #bbb;
|
|
379
|
-
background: transparent;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.tags-tip {
|
|
383
|
-
padding: 5px;
|
|
384
|
-
}
|
|
385
|
-
.tags-tip p {
|
|
386
|
-
margin-bottom: 10px;
|
|
387
|
-
}
|
|
388
|
-
</style>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="adminui-topbar">
|
|
3
|
-
<div class="left-panel">
|
|
4
|
-
<el-breadcrumb separator-icon="el-icon-arrow-right" class="hidden-sm-and-down">
|
|
5
|
-
<transition-group name="breadcrumb">
|
|
6
|
-
<template v-for="item in breadList" :key="item.title">
|
|
7
|
-
<el-breadcrumb-item v-if="item.path!='/' && !item.meta.hiddenBreadcrumb" :key="item.meta.title">
|
|
8
|
-
<el-icon class="icon" v-if="item.meta.icon">
|
|
9
|
-
<component :is="item.meta.icon" />
|
|
10
|
-
</el-icon>
|
|
11
|
-
<span style="font-size: 12px;">{{item.meta.title}}</span>
|
|
12
|
-
</el-breadcrumb-item>
|
|
13
|
-
</template>
|
|
14
|
-
</transition-group>
|
|
15
|
-
</el-breadcrumb>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="center-panel"></div>
|
|
18
|
-
<div class="right-panel">
|
|
19
|
-
<slot></slot>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script>
|
|
25
|
-
export default {
|
|
26
|
-
data() {
|
|
27
|
-
return {
|
|
28
|
-
breadList: [],
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
created() {
|
|
32
|
-
this.getBreadcrumb();
|
|
33
|
-
},
|
|
34
|
-
watch: {
|
|
35
|
-
$route() {
|
|
36
|
-
this.getBreadcrumb();
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
methods: {
|
|
40
|
-
getBreadcrumb() {
|
|
41
|
-
let matched = this.$route.meta.breadcrumb;
|
|
42
|
-
this.breadList = matched;
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style scoped>
|
|
49
|
-
.el-breadcrumb {
|
|
50
|
-
margin-left: 15px;
|
|
51
|
-
}
|
|
52
|
-
.el-breadcrumb .el-breadcrumb__inner .icon {
|
|
53
|
-
font-size: 14px;
|
|
54
|
-
margin-right: 5px;
|
|
55
|
-
float: left;
|
|
56
|
-
}
|
|
57
|
-
.breadcrumb-enter-active,
|
|
58
|
-
.breadcrumb-leave-active {
|
|
59
|
-
transition: all 0.3s;
|
|
60
|
-
}
|
|
61
|
-
.breadcrumb-enter-from,
|
|
62
|
-
.breadcrumb-leave-active {
|
|
63
|
-
opacity: 0;
|
|
64
|
-
transform: translateX(20px);
|
|
65
|
-
}
|
|
66
|
-
.breadcrumb-leave-active {
|
|
67
|
-
position: absolute;
|
|
68
|
-
}
|
|
69
|
-
</style>
|