hbte-saas-ui 0.0.2 → 1.0.0
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 +8 -2
- package/.browserslistrc +0 -3
- package/.editorconfig +0 -7
- package/.env.development +0 -1
- package/.env.lib +0 -1
- package/.eslintrc.js +0 -14
- package/.prettierrc +0 -3
- package/babel.config.js +0 -3
- package/docs/.vuepress/config.js +0 -23
- package/docs/.vuepress/styles/index.styl +0 -4
- package/docs/AdvQuery.md +0 -26
- package/docs/CustomQuery.md +0 -21
- package/docs/EditArea.md +0 -16
- package/docs/FilterDrop.md +0 -29
- package/docs/FullTable.md +0 -68
- package/docs/Pagination.md +0 -22
- package/docs/QueryForm.md +0 -27
- package/docs/README.md +0 -17
- package/docs/Table.md +0 -58
- package/docs/ToolGroup.md +0 -32
- package/examples/App.vue +0 -97
- package/examples/image/hb-image-viewer/3k.jpg +0 -0
- package/examples/image/hb-image-viewer/a.jpg +0 -0
- package/examples/image/hb-image-viewer/b.jpg +0 -0
- package/examples/main.js +0 -39
- package/examples/mock/authority.js +0 -1108
- package/examples/mock/dept.js +0 -4001
- package/examples/mock/fulltable.js +0 -407
- package/examples/mock/organizeData.js +0 -18965
- package/examples/router/index.js +0 -111
- package/examples/views/ElementCpTest.vue +0 -299
- package/examples/views/Fragment.vue +0 -196
- package/examples/views/HBAdvQuery.vue +0 -150
- package/examples/views/HBAuthority.vue +0 -339
- package/examples/views/HBDialog.vue +0 -39
- package/examples/views/HBEditarea.vue +0 -350
- package/examples/views/HBFilterDrop.vue +0 -72
- package/examples/views/HBFloatFooter.vue +0 -42
- package/examples/views/HBFullTable.vue +0 -751
- package/examples/views/HBImageViewer.vue +0 -57
- package/examples/views/HBNavMenu.vue +0 -37
- package/examples/views/HBOrganizeDialog.vue +0 -133
- package/examples/views/HBPagination.vue +0 -80
- package/examples/views/HBSelectVague.vue +0 -57
- package/examples/views/HBToolgroup.vue +0 -29
- package/examples/views/HBTopBar.vue +0 -16
- package/packages/adv-query/index.js +0 -5
- package/packages/adv-query/src/main.vue +0 -294
- package/packages/area-select/index.js +0 -7
- package/packages/area-select/src/main.vue +0 -37
- package/packages/authority/index.js +0 -5
- package/packages/authority/src/main.vue +0 -606
- package/packages/config.js +0 -3
- package/packages/custom-query/index.js +0 -5
- package/packages/custom-query/src/main.vue +0 -80
- package/packages/dialog/index.js +0 -7
- package/packages/dialog/src/main.vue +0 -176
- package/packages/edit-area/index.js +0 -13
- package/packages/edit-area/src/config.js +0 -3
- package/packages/edit-area/src/main.vue +0 -304
- package/packages/edit-area/src/simulateEvent.js +0 -219
- package/packages/filter-drop/index.js +0 -6
- package/packages/filter-drop/src/main.vue +0 -107
- package/packages/float-footer/index.js +0 -7
- package/packages/float-footer/src/main.vue +0 -40
- package/packages/fragment/index.js +0 -7
- package/packages/fragment/src/main.vue +0 -74
- package/packages/fragment/src/old.vue +0 -144
- package/packages/full-table/index.js +0 -6
- package/packages/full-table/src/config.js +0 -14
- package/packages/full-table/src/main.vue +0 -141
- package/packages/image-viewer/index.js +0 -8
- package/packages/image-viewer/src/main.js +0 -14
- package/packages/image-viewer/src/main.vue +0 -138
- package/packages/image-viewer/src/svg/cancel.svg +0 -2
- package/packages/image-viewer/src/svg/delete.svg +0 -2
- package/packages/image-viewer/src/svg/download.svg +0 -2
- package/packages/image-viewer/src/svg/rotate.svg +0 -77
- package/packages/image-viewer/src/svg/scaledown.svg +0 -71
- package/packages/image-viewer/src/svg/scaleup.svg +0 -72
- package/packages/index.js +0 -43
- package/packages/nav-menu/index.js +0 -7
- package/packages/nav-menu/src/main.vue +0 -277
- package/packages/organize-dialog/index.js +0 -5
- package/packages/organize-dialog/src/main.vue +0 -427
- package/packages/pagination/index.js +0 -6
- package/packages/pagination/src/main.vue +0 -146
- package/packages/query-form/index.js +0 -5
- package/packages/query-form/src/main.vue +0 -142
- package/packages/select-vague/index.js +0 -5
- package/packages/select-vague/src/main.vue +0 -80
- package/packages/table/index.js +0 -5
- package/packages/table/src/main.vue +0 -265
- package/packages/theme-chalk/adv-query.scss +0 -107
- package/packages/theme-chalk/authority.scss +0 -103
- package/packages/theme-chalk/common/elementCover.scss +0 -722
- package/packages/theme-chalk/common/flex.scss +0 -66
- package/packages/theme-chalk/common/global.scss +0 -147
- package/packages/theme-chalk/common/reset.scss +0 -92
- package/packages/theme-chalk/common/var.scss +0 -46
- package/packages/theme-chalk/custom-query.scss +0 -10
- package/packages/theme-chalk/dialog.scss +0 -9
- package/packages/theme-chalk/edit-area.scss +0 -119
- package/packages/theme-chalk/filter-drop.scss +0 -81
- package/packages/theme-chalk/float-footer.scss +0 -14
- package/packages/theme-chalk/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/fragment.scss +0 -51
- package/packages/theme-chalk/full-table.scss +0 -40
- package/packages/theme-chalk/icon.scss +0 -96
- package/packages/theme-chalk/image-viewer.scss +0 -94
- package/packages/theme-chalk/images/company-logo--default.png +0 -0
- package/packages/theme-chalk/images/nodata.png +0 -0
- package/packages/theme-chalk/images/user-logo--default.png +0 -0
- package/packages/theme-chalk/index.scss +0 -21
- package/packages/theme-chalk/nav-menu.scss +0 -205
- package/packages/theme-chalk/organize-dialog.scss +0 -170
- package/packages/theme-chalk/pagination.scss +0 -91
- package/packages/theme-chalk/select.scss +0 -8
- package/packages/theme-chalk/table.scss +0 -102
- package/packages/theme-chalk/tool-group.scss +0 -105
- package/packages/theme-chalk/top-bar.scss +0 -195
- package/packages/tool-group/index.js +0 -13
- package/packages/tool-group/src/config.js +0 -40
- package/packages/tool-group/src/main.vue +0 -93
- package/packages/top-bar/index.js +0 -7
- package/packages/top-bar/src/main.vue +0 -280
- package/public/index.html +0 -20
- package/vue.config.js +0 -6
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hb-topbar">
|
|
3
|
-
<div class="hb-topbar__top">
|
|
4
|
-
<div class="hb-topbar__wrap">
|
|
5
|
-
<div class="hb-topbar__block">
|
|
6
|
-
<img
|
|
7
|
-
:src="userInfo.companyLogo || defaultAvatar.companyLogo"
|
|
8
|
-
alt=""
|
|
9
|
-
class="hb-topbar-logo"
|
|
10
|
-
/>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="hb-topbar__text">
|
|
13
|
-
{{ userInfo.companyName || "杭州永谐科技有限公司" }}
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="hb-topbar__right">
|
|
17
|
-
<el-dropdown trigger="click" @command="tabMicroApp">
|
|
18
|
-
<span class="pointer">
|
|
19
|
-
{{ activeAppLabel }}
|
|
20
|
-
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
21
|
-
</span>
|
|
22
|
-
<el-dropdown-menu slot="dropdown" class="el-dropdown-choose-system">
|
|
23
|
-
<el-dropdown-item
|
|
24
|
-
v-for="item in microApps"
|
|
25
|
-
:key="item.name"
|
|
26
|
-
:command="item.path"
|
|
27
|
-
:disabled="item.disabled"
|
|
28
|
-
>
|
|
29
|
-
<div class="wrapper">
|
|
30
|
-
<i :class="item.icon"></i>{{ item.label }}
|
|
31
|
-
</div>
|
|
32
|
-
</el-dropdown-item>
|
|
33
|
-
</el-dropdown-menu>
|
|
34
|
-
</el-dropdown>
|
|
35
|
-
<div class="hb-topbar-icon">
|
|
36
|
-
<i
|
|
37
|
-
v-for="item in activeTools"
|
|
38
|
-
:key="item.name"
|
|
39
|
-
:class="item.icon"
|
|
40
|
-
:title="item.label"
|
|
41
|
-
class="hb-topbar-icon__item"
|
|
42
|
-
@click="chooseTool(item)"
|
|
43
|
-
></i>
|
|
44
|
-
<slot name="spTools"></slot>
|
|
45
|
-
<!-- <el-dropdown trigger="click" @command="chooseRoute()">
|
|
46
|
-
<i class="el-icon-files hb-topbar-icon__item"></i>
|
|
47
|
-
<el-dropdown-menu slot="dropdown">
|
|
48
|
-
<el-dropdown-item
|
|
49
|
-
v-for="route in microRoutes"
|
|
50
|
-
:key="route.fullPath"
|
|
51
|
-
:command="route.fullPath"
|
|
52
|
-
:class="[
|
|
53
|
-
route.fullPath === $route.fullPath
|
|
54
|
-
? 'hb-topbar-icon--active'
|
|
55
|
-
: '',
|
|
56
|
-
]"
|
|
57
|
-
>
|
|
58
|
-
{{ route.label + route.labelName }}
|
|
59
|
-
</el-dropdown-item>
|
|
60
|
-
<el-dropdown-item command="closeAll">关闭全部</el-dropdown-item>
|
|
61
|
-
</el-dropdown-menu>
|
|
62
|
-
</el-dropdown> -->
|
|
63
|
-
</div>
|
|
64
|
-
<el-dropdown trigger="click" @command="userSetting">
|
|
65
|
-
<span class="pointer">
|
|
66
|
-
{{ userInfo.name }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
67
|
-
</span>
|
|
68
|
-
<el-dropdown-menu slot="dropdown">
|
|
69
|
-
<el-dropdown-item
|
|
70
|
-
class="hb-topbar__right--dropdown-item"
|
|
71
|
-
v-for="item in activeSettings"
|
|
72
|
-
:key="item.name"
|
|
73
|
-
:command="item"
|
|
74
|
-
>{{ item.label }}</el-dropdown-item
|
|
75
|
-
>
|
|
76
|
-
</el-dropdown-menu>
|
|
77
|
-
</el-dropdown>
|
|
78
|
-
<div class="hb-topbar-avatar">
|
|
79
|
-
<img :src="userInfo.logo || defaultAvatar.userLogo" alt="" />
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="hb-topbar__bottom">
|
|
84
|
-
<div
|
|
85
|
-
class="hb-topbar-routetab"
|
|
86
|
-
:class="{
|
|
87
|
-
'hb-topbar-routetab--active': item.active,
|
|
88
|
-
}"
|
|
89
|
-
v-for="item in microRoutes"
|
|
90
|
-
:key="item.fullPath"
|
|
91
|
-
:title="item.label + item.labelName"
|
|
92
|
-
@contextmenu.prevent.stop="awakeContextMenu(item, $event)"
|
|
93
|
-
@click="activeRoute(item)"
|
|
94
|
-
>
|
|
95
|
-
<div class="hb-topbar-routetab__line"></div>
|
|
96
|
-
<i
|
|
97
|
-
class="icon-i-yiruku home"
|
|
98
|
-
v-if="item.fullPath === '/micro-platform'"
|
|
99
|
-
></i>
|
|
100
|
-
<div class="hb-topbar-routetab__title">
|
|
101
|
-
{{ item.label + item.labelName }}
|
|
102
|
-
</div>
|
|
103
|
-
<i
|
|
104
|
-
class="el-icon-close hb-topbar-routetab__close"
|
|
105
|
-
v-if="item.fullPath !== '/micro-platform'"
|
|
106
|
-
:class="{
|
|
107
|
-
active: item.active,
|
|
108
|
-
}"
|
|
109
|
-
@click.stop="closeRoute(item)"
|
|
110
|
-
></i>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
<div
|
|
114
|
-
:style="{ top: currentTop, left: currentLeft, zIndex: 10000 }"
|
|
115
|
-
class="hb-topbar__event"
|
|
116
|
-
v-if="contextMenuFlag && contextMenu"
|
|
117
|
-
>
|
|
118
|
-
<div
|
|
119
|
-
class="hb-topbar-routetab__event"
|
|
120
|
-
v-show="contextMenuRightTab"
|
|
121
|
-
@click="closeRightTabs"
|
|
122
|
-
>
|
|
123
|
-
关闭右侧标签页
|
|
124
|
-
</div>
|
|
125
|
-
<div
|
|
126
|
-
class="hb-topbar-routetab__event"
|
|
127
|
-
v-show="contextMenuLeftTab"
|
|
128
|
-
@click="closeLeftTabs"
|
|
129
|
-
>
|
|
130
|
-
关闭左侧标签页
|
|
131
|
-
</div>
|
|
132
|
-
<div
|
|
133
|
-
class="hb-topbar-routetab__event"
|
|
134
|
-
v-show="contextMenuOtherTab"
|
|
135
|
-
@click="closeOtherTabs"
|
|
136
|
-
>
|
|
137
|
-
关闭其他标签页
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
</template>
|
|
142
|
-
<script>
|
|
143
|
-
import { mapState, mapGetters, mapMutations } from "vuex";
|
|
144
|
-
import companyLogo from "../../theme-chalk/images/company-logo--default.png";
|
|
145
|
-
import userlogo from "../../theme-chalk/images/user-logo--default.png";
|
|
146
|
-
|
|
147
|
-
export default {
|
|
148
|
-
name: "HbTopBar", // 使用时 <hb-topbar> </hb-topbar>
|
|
149
|
-
componentName: "HbTopBar", // Vue.use() 的时候传入的名称
|
|
150
|
-
data() {
|
|
151
|
-
return {
|
|
152
|
-
base: this.$router.options.base,
|
|
153
|
-
rightClickRoute: null,
|
|
154
|
-
currentTop: "",
|
|
155
|
-
currentLeft: "",
|
|
156
|
-
contextMenuFlag: false,
|
|
157
|
-
defaultAvatar: {
|
|
158
|
-
userlogo,
|
|
159
|
-
companyLogo,
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
},
|
|
163
|
-
computed: {
|
|
164
|
-
...mapState(["activeApp", "microRoutes", "microApps", "userInfo"]),
|
|
165
|
-
...mapGetters(["activeTools", "activeSettings", "activeAppLabel"]),
|
|
166
|
-
contextMenuRightTab() {
|
|
167
|
-
let index = this.microRoutes.findIndex(
|
|
168
|
-
(item) => item === this.rightClickRoute
|
|
169
|
-
);
|
|
170
|
-
return index + 1 < this.microRoutes.length;
|
|
171
|
-
},
|
|
172
|
-
contextMenuLeftTab() {
|
|
173
|
-
let index = this.microRoutes.findIndex(
|
|
174
|
-
(item) => item === this.rightClickRoute
|
|
175
|
-
);
|
|
176
|
-
if (this.microRoutes.length <= 2) {
|
|
177
|
-
return false;
|
|
178
|
-
} else if (this.rightClickRoute.fullPath === "/micro-platform") {
|
|
179
|
-
return false;
|
|
180
|
-
} else if (index === 1) {
|
|
181
|
-
return false;
|
|
182
|
-
} else {
|
|
183
|
-
return true;
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
contextMenuOtherTab() {
|
|
187
|
-
if (this.microRoutes.length <= 1) {
|
|
188
|
-
return false;
|
|
189
|
-
} else if (
|
|
190
|
-
this.microRoutes.length === 2 &&
|
|
191
|
-
this.rightClickRoute.fullPath !== "/micro-platform"
|
|
192
|
-
) {
|
|
193
|
-
return false;
|
|
194
|
-
} else {
|
|
195
|
-
return true;
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
contextMenu() {
|
|
199
|
-
return (
|
|
200
|
-
this.contextMenuRightTab ||
|
|
201
|
-
this.contextMenuLeftTab ||
|
|
202
|
-
this.contextMenuOtherTab
|
|
203
|
-
);
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
methods: {
|
|
207
|
-
...mapMutations(["removeRoutes"]),
|
|
208
|
-
//切换微应用
|
|
209
|
-
tabMicroApp(path) {
|
|
210
|
-
this.$router.push(path);
|
|
211
|
-
this.$emit("tabMicroApp", path);
|
|
212
|
-
},
|
|
213
|
-
//路由选项卡集合下拉选项操作
|
|
214
|
-
chooseRoute(fullPath) {
|
|
215
|
-
if (fullPath !== "closeAll") {
|
|
216
|
-
this.$router.push(fullPath);
|
|
217
|
-
} else {
|
|
218
|
-
this.removeRoutes({ type: "all" });
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
//点击操作图标抛出事件
|
|
222
|
-
chooseTool(tool) {
|
|
223
|
-
window.dispatchEvent(tool.event);
|
|
224
|
-
},
|
|
225
|
-
//选择不同的用户相关操作
|
|
226
|
-
userSetting(setting) {
|
|
227
|
-
window.dispatchEvent(setting.event);
|
|
228
|
-
},
|
|
229
|
-
//唤醒右键菜单
|
|
230
|
-
awakeContextMenu(route, e) {
|
|
231
|
-
this.rightClickRoute = route;
|
|
232
|
-
if (this.contextMenu) {
|
|
233
|
-
let totalWidth = document.documentElement.clientWidth;
|
|
234
|
-
document.addEventListener("click", this.closeContestMenu, true);
|
|
235
|
-
this.currentTop = e.clientY + "px";
|
|
236
|
-
if (e.clientX + 136 <= totalWidth) {
|
|
237
|
-
this.currentLeft = e.clientX + "px";
|
|
238
|
-
} else {
|
|
239
|
-
this.currentLeft = e.clientX - 126 + "px";
|
|
240
|
-
}
|
|
241
|
-
this.contextMenuFlag = true;
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
closeContestMenu(e) {
|
|
245
|
-
this.contextMenuFlag = false;
|
|
246
|
-
document.removeEventListener("click", this.closeContestMenu, true);
|
|
247
|
-
e.preventDefault();
|
|
248
|
-
},
|
|
249
|
-
//关闭右侧标签页
|
|
250
|
-
closeRightTabs() {
|
|
251
|
-
this.removeRoutes({
|
|
252
|
-
route: this.rightClickRoute,
|
|
253
|
-
type: "right",
|
|
254
|
-
});
|
|
255
|
-
},
|
|
256
|
-
//关闭左侧标签页
|
|
257
|
-
closeLeftTabs() {
|
|
258
|
-
this.removeRoutes({
|
|
259
|
-
route: this.rightClickRoute,
|
|
260
|
-
type: "left",
|
|
261
|
-
});
|
|
262
|
-
},
|
|
263
|
-
//关闭其他标签页
|
|
264
|
-
closeOtherTabs() {
|
|
265
|
-
this.removeRoutes({
|
|
266
|
-
route: this.rightClickRoute,
|
|
267
|
-
type: "other",
|
|
268
|
-
});
|
|
269
|
-
},
|
|
270
|
-
//点击小叉关闭标签页
|
|
271
|
-
closeRoute(item) {
|
|
272
|
-
this.removeRoutes({ route: item });
|
|
273
|
-
},
|
|
274
|
-
//激活标签页路由
|
|
275
|
-
activeRoute(item) {
|
|
276
|
-
!item.active && this.$router.push(item.fullPath);
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
};
|
|
280
|
-
</script>
|
package/public/index.html
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
7
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
8
|
-
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
-
</head>
|
|
10
|
-
|
|
11
|
-
<body>
|
|
12
|
-
<noscript>
|
|
13
|
-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
|
|
14
|
-
Please enable it to continue.</strong>
|
|
15
|
-
</noscript>
|
|
16
|
-
<div id="app"></div>
|
|
17
|
-
<!-- built files will be auto injected -->
|
|
18
|
-
</body>
|
|
19
|
-
|
|
20
|
-
</html>
|