imatrix-ui 0.0.15 → 0.1.1-up
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/.vscode/extensions.json +3 -0
- package/README.md +7 -0
- package/components/dynamic-source-select/dynamic-source-select-service.js +106 -0
- package/components/dynamic-source-select/dynamic-source-select.vue +673 -0
- package/components/dynamic-source-select/events.js +77 -0
- package/components/fs-preview/fs-preview.vue +287 -0
- package/components/index.js +26 -0
- package/components/plugins/export-data-new.js +623 -0
- package/components/plugins/export-data.js +431 -0
- package/components/plugins/index.js +15 -0
- package/components/plugins/public-method.js +47 -0
- package/components/rich-editor/index-bak.vue +306 -0
- package/components/rich-editor/index.vue +236 -0
- package/components/rich-editor/langs/zh-Hans.js +438 -0
- package/components/rich-editor/viewer.vue +105 -0
- package/components/super-grid/apis.js +1065 -0
- package/components/super-grid/columns-config.vue +430 -0
- package/components/super-grid/custom-formatter.js +330 -0
- package/components/super-grid/dynamic-input.vue +1706 -0
- package/components/super-grid/eventBus.js +2 -0
- package/components/super-grid/events.js +56 -0
- package/components/super-grid/formValidatorUtil.js +300 -0
- package/components/super-grid/formatter.js +190 -0
- package/components/super-grid/group-column.vue +100 -0
- package/components/super-grid/header-context-menu.vue +82 -0
- package/components/super-grid/index-column.vue +69 -0
- package/components/super-grid/normal-column.vue +1148 -0
- package/components/super-grid/public-methods.js +30 -0
- package/components/super-grid/row-operation.vue +193 -0
- package/components/super-grid/search-button.vue +74 -0
- package/components/super-grid/search-condition-input.vue +73 -0
- package/components/super-grid/search-condition-list.vue +68 -0
- package/components/super-grid/search-form-advancedQuery.vue +820 -0
- package/components/super-grid/search-form-dialog.vue +77 -0
- package/components/super-grid/search-form-item.vue +470 -0
- package/components/super-grid/search-form-number.vue +111 -0
- package/components/super-grid/search-form-open.vue +178 -0
- package/components/super-grid/search-form-ordinarySearch.vue +218 -0
- package/components/super-grid/search-form.vue +756 -0
- package/components/super-grid/search-methods.js +484 -0
- package/components/super-grid/selection-column.vue +46 -0
- package/components/super-grid/store.js +3 -0
- package/components/super-grid/super-grid-service.js +682 -0
- package/components/super-grid/super-grid.vue +2893 -0
- package/components/super-grid/utils.js +851 -0
- package/components/super-grid/view-image-dialog.vue +173 -0
- package/components/utils/gogocodeTransfer.js +59 -0
- package/components/utils/utils.js +180 -0
- package/components/utils/value-set.js +98 -0
- package/components/z-test-utton/index.vue +82 -0
- package/package.json +29 -40
- package/public/index.html +13 -0
- package/public/vite.svg +1 -0
- package/src/api/sso-service.js +172 -19
- package/src/api/tab.js +36 -0
- package/src/api/user-service.js +11 -11
- package/src/assets/401/401.gif +0 -0
- package/src/assets/404/404-cloud.png +0 -0
- package/src/assets/404/404.png +0 -0
- package/src/assets/cloud.png +0 -0
- package/src/directives/permission/index.js +13 -13
- package/src/directives/permission/permission.js +20 -15
- package/src/i18n/i18n.js +16 -0
- package/src/i18n/langs/cn.js +254 -0
- package/src/i18n/langs/en.js +264 -0
- package/src/permission.js +157 -71
- package/src/plugins.js +18 -18
- package/src/router/index.js +96 -69
- package/src/store/getters.js +15 -10
- package/src/store/index.js +19 -19
- package/src/store/modules/app.js +54 -42
- package/src/store/modules/permission.js +137 -73
- package/src/store/modules/tab-content.js +36 -0
- package/src/store/modules/user.js +293 -80
- package/src/styles/display-layout.scss +34 -0
- package/src/styles/element-ui.scss +29 -29
- package/src/styles/index.scss +157 -78
- package/src/styles/mixin.scss +27 -27
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +306 -0
- package/src/styles/theme/black/sidebar.scss +189 -0
- package/src/styles/theme/blue/font-style.scss +46 -0
- package/src/styles/theme/blue/index.scss +172 -0
- package/src/styles/{sidebar.scss → theme/blue/sidebar.scss} +171 -141
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +188 -0
- package/src/styles/theme/blue2/sidebar.scss +201 -0
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/card.scss +62 -0
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +7 -0
- package/src/styles/theme/dark-blue/font.scss +71 -0
- package/src/styles/theme/dark-blue/form.scss +51 -0
- package/src/styles/theme/dark-blue/index.scss +269 -0
- package/src/styles/theme/dark-blue/input.scss +15 -0
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +266 -0
- package/src/styles/theme/dark-blue/tab.scss +83 -0
- package/src/styles/theme/dark-blue/table.scss +60 -0
- package/src/styles/theme/dark-blue/tree.scss +31 -0
- package/src/styles/theme/dark-blue/var.scss +1028 -0
- package/src/styles/theme/gray/card-style.scss +54 -0
- package/src/styles/theme/gray/font-style.scss +70 -0
- package/src/styles/theme/gray/index.scss +172 -0
- package/src/styles/theme/gray/input-style.scss +19 -0
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/styles/theme/gray/sidebar.scss +231 -0
- package/src/styles/theme/gray/tab-style.scss +81 -0
- package/src/styles/transition.scss +47 -46
- package/src/utils/auth-api.js +159 -0
- package/src/utils/auth.js +61 -15
- package/src/utils/calculator/calculator-factory-wf.js +558 -0
- package/src/utils/calculator/calculator-factory.js +145 -0
- package/src/utils/calculator/calculator-util.js +166 -0
- package/src/utils/common-util.js +305 -0
- package/src/utils/eventBus.js +2 -0
- package/src/utils/iconUtils.js +28 -0
- package/src/utils/index.js +102 -86
- package/src/utils/jump-page-utils.js +814 -0
- package/src/utils/local-storage.js +33 -31
- package/src/utils/menu.js +19 -0
- package/src/utils/permission.js +31 -26
- package/src/utils/permissionAuth.js +90 -0
- package/src/utils/range-selector.js +188 -0
- package/src/utils/request.js +270 -116
- package/src/utils/restful-interface-utils.js +57 -0
- package/src/utils/util.js +698 -0
- package/src/utils/validate.js +34 -33
- package/src/utils/watermark.js +108 -0
- package/src/utils/workflow-util.js +93 -0
- package/src/views/404.vue +248 -228
- package/src/views/dsc-component/Sidebar/Item.vue +84 -0
- package/src/views/dsc-component/Sidebar/Link.vue +38 -0
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +196 -0
- package/src/views/dsc-component/Sidebar/index.vue +220 -0
- package/src/views/dsc-component/tabs/tab-content.vue +199 -0
- package/src/views/error-page/401.vue +106 -91
- package/src/views/error-page/404.vue +248 -228
- package/src/views/layout/EmptyLayout.vue +3 -0
- package/src/views/layout/Layout.vue +81 -68
- package/src/views/layout/NewLayout.vue +18 -0
- package/src/views/layout/components/AppMain.vue +39 -29
- package/src/views/layout/components/Breadcrumb/index.vue +156 -0
- package/src/views/layout/components/Menubar/Item.vue +57 -0
- package/src/views/layout/components/Menubar/Link.vue +38 -0
- package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
- package/src/views/layout/components/Menubar/index.vue +210 -0
- package/src/views/layout/components/Sidebar/Item.vue +53 -29
- package/src/views/layout/components/Sidebar/Link.vue +38 -39
- package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -100
- package/src/views/layout/components/Sidebar/index.vue +141 -48
- package/src/views/layout/components/iframe-page.vue +38 -0
- package/src/views/layout/components/index.js +4 -3
- package/src/views/layout/components/tabs/tab-content.vue +207 -0
- package/src/views/layout/mixin/ResizeHandler.js +41 -41
- package/src/views/layout/tab-content-iframe-index.vue +38 -0
- package/src/views/layout/tab-content-index.vue +93 -0
- package/src/views/login/authredirect.vue +10 -10
- package/src/views/login/index.vue +296 -203
- package/src/views/login/update-password.vue +243 -0
- package/src/views/redirect/index.vue +14 -12
- package/src/views/wf-history/tache-subprocess-history.vue +45 -0
- package/vite.config.js +31 -0
- package/lib/super-ui.css +0 -1
- package/lib/super-ui.umd.min.js +0 -2
- package/src/styles/variables.scss +0 -4
- package/src/views/layout/components/Navbar.vue +0 -92
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-tabs
|
|
4
|
+
v-if="openTab && openTab.length > 0"
|
|
5
|
+
v-model="activeIndex"
|
|
6
|
+
class="nav-tab menu-tab-container"
|
|
7
|
+
closable
|
|
8
|
+
@tab-remove="closeSelectedTag"
|
|
9
|
+
>
|
|
10
|
+
<el-tab-pane
|
|
11
|
+
v-for="tag in openTab"
|
|
12
|
+
:key="tag.code"
|
|
13
|
+
:label="tag.name"
|
|
14
|
+
:name="tag.code"
|
|
15
|
+
>
|
|
16
|
+
<iframe
|
|
17
|
+
ref="tabMainContent"
|
|
18
|
+
:src="getFullPath(tag)"
|
|
19
|
+
class="tab-main-content"
|
|
20
|
+
name="tab-main-content"
|
|
21
|
+
frameborder="0"
|
|
22
|
+
/>
|
|
23
|
+
</el-tab-pane>
|
|
24
|
+
</el-tabs>
|
|
25
|
+
<div class="default-page-tip">
|
|
26
|
+
<div class="default-page-tip-msg">
|
|
27
|
+
<div class="default-page-tip-item">
|
|
28
|
+
{{ defaultPageTipCn }}
|
|
29
|
+
</div>
|
|
30
|
+
<div class="default-page-tip-item">
|
|
31
|
+
{{ defaultPageTipEn }}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import * as Vue from 'vue'
|
|
40
|
+
import { mapGetters } from 'vuex'
|
|
41
|
+
export default {
|
|
42
|
+
name: 'TabContent',
|
|
43
|
+
data() {
|
|
44
|
+
let defaultPageTip = window.$vueApp.config.globalProperties.defaultPageTip
|
|
45
|
+
if (!defaultPageTip) {
|
|
46
|
+
defaultPageTip =
|
|
47
|
+
'欢迎访问质量管理系统/Welcome to Quality Management System'
|
|
48
|
+
}
|
|
49
|
+
let defaultPageTipCn = defaultPageTip
|
|
50
|
+
let defaultPageTipEn
|
|
51
|
+
if (defaultPageTip && defaultPageTip.indexOf('/') > 0) {
|
|
52
|
+
defaultPageTipCn = defaultPageTip.substring(
|
|
53
|
+
0,
|
|
54
|
+
defaultPageTip.lastIndexOf('/')
|
|
55
|
+
)
|
|
56
|
+
defaultPageTipEn = defaultPageTip.substring(
|
|
57
|
+
defaultPageTip.lastIndexOf('/') + 1
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
defaultPageTipCn,
|
|
62
|
+
defaultPageTipEn,
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
...mapGetters(['openTab']),
|
|
67
|
+
activeIndex: {
|
|
68
|
+
get() {
|
|
69
|
+
return this.$store.state.tabContent.activeIndex
|
|
70
|
+
},
|
|
71
|
+
set(val) {
|
|
72
|
+
this.$store.commit('set_active_index', val)
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
created() {
|
|
77
|
+
// 登录超时,给父iframe发送信号
|
|
78
|
+
window.addEventListener('message', this.recieveMessage)
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
closeSelectedTag(tagName) {
|
|
82
|
+
const index = this.$store.state.tabContent.openTab.findIndex(
|
|
83
|
+
(item) => item.code === tagName
|
|
84
|
+
)
|
|
85
|
+
const view = this.$store.state.tabContent.openTab[index]
|
|
86
|
+
this.$store.commit('delete_tabs', view)
|
|
87
|
+
if (tagName === this.activeIndex) {
|
|
88
|
+
// 表示删除的是当前选中的菜单,选中前面的菜单
|
|
89
|
+
this.toLastView(
|
|
90
|
+
this.$store.state.tabContent.openTab,
|
|
91
|
+
index > 0 ? index - 1 : 0
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
toLastView(visitedViews, lastIndex) {
|
|
96
|
+
if (
|
|
97
|
+
visitedViews &&
|
|
98
|
+
visitedViews.length > 0 &&
|
|
99
|
+
visitedViews.length > lastIndex
|
|
100
|
+
) {
|
|
101
|
+
const latestView = visitedViews[lastIndex]
|
|
102
|
+
if (latestView) {
|
|
103
|
+
this.$store.commit('set_active_index', latestView.code)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
getFullPath(tag) {
|
|
108
|
+
let path
|
|
109
|
+
if (tag.routePath === '/iframe-page/page') {
|
|
110
|
+
// 表示是iframe页面
|
|
111
|
+
let src
|
|
112
|
+
let params = ''
|
|
113
|
+
if (tag.routeQuery) {
|
|
114
|
+
for (const key in tag.routeQuery) {
|
|
115
|
+
if (key === 'src') {
|
|
116
|
+
src = tag.routeQuery[key]
|
|
117
|
+
} else {
|
|
118
|
+
params += key + '=' + tag.routeQuery[key] + '&'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (src) {
|
|
123
|
+
path = src
|
|
124
|
+
}
|
|
125
|
+
if (params) {
|
|
126
|
+
path += '?' + params
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
// 表示页面跳转
|
|
130
|
+
path = '#' + tag.routePath + '?'
|
|
131
|
+
if (tag.routeQuery) {
|
|
132
|
+
for (const key in tag.routeQuery) {
|
|
133
|
+
path += key + '=' + tag.routeQuery[key] + '&'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (
|
|
138
|
+
path &&
|
|
139
|
+
path.length > 0 &&
|
|
140
|
+
path.lastIndexOf('&') === path.length - 1
|
|
141
|
+
) {
|
|
142
|
+
path = path.substring(0, path.lastIndexOf('&'))
|
|
143
|
+
}
|
|
144
|
+
return path
|
|
145
|
+
},
|
|
146
|
+
recieveMessage(event) {
|
|
147
|
+
if (
|
|
148
|
+
event &&
|
|
149
|
+
typeof event.data === 'string' &&
|
|
150
|
+
event.data.indexOf('loginTimeout') >= 0
|
|
151
|
+
) {
|
|
152
|
+
// 表示iframe中的页面发送了登录超时的信号,将信号传给最外层window
|
|
153
|
+
console.log(
|
|
154
|
+
'tab-content-接收到登录超时的信息---event.data=',
|
|
155
|
+
event.data
|
|
156
|
+
)
|
|
157
|
+
window.parent.postMessage(event.data, '*')
|
|
158
|
+
} else if (
|
|
159
|
+
event &&
|
|
160
|
+
typeof event.data === 'string' &&
|
|
161
|
+
event.data === 'return-to-system-list'
|
|
162
|
+
) {
|
|
163
|
+
// 表示系统元数据/设计页面点击了“返回“按钮,需要返回到系统九宫格列表页面
|
|
164
|
+
this.$store.commit('clear_tabs')
|
|
165
|
+
this.$router.push({ path: '/mms/systems/list' })
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
}
|
|
170
|
+
</script>
|
|
171
|
+
|
|
172
|
+
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
173
|
+
iframe.tab-main-content {
|
|
174
|
+
width: 100%;
|
|
175
|
+
height: calc(100vh - 53px);
|
|
176
|
+
}
|
|
177
|
+
</style>
|
|
178
|
+
|
|
179
|
+
<style>
|
|
180
|
+
.nav-tab {
|
|
181
|
+
padding-top: 5px;
|
|
182
|
+
padding-left: 5px;
|
|
183
|
+
}
|
|
184
|
+
.nav-tab .el-tabs__header {
|
|
185
|
+
margin: 0;
|
|
186
|
+
/* border-bottom: 0px; */
|
|
187
|
+
}
|
|
188
|
+
.menu-tab-container .el-tabs__content {
|
|
189
|
+
padding: 0;
|
|
190
|
+
}
|
|
191
|
+
.default-page-tip {
|
|
192
|
+
width: 100%;
|
|
193
|
+
height: 100%;
|
|
194
|
+
background: #f7f7f8;
|
|
195
|
+
}
|
|
196
|
+
.default-page-tip-msg {
|
|
197
|
+
padding-top: 25%;
|
|
198
|
+
padding-bottom: 30%;
|
|
199
|
+
font-size: 24px;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
text-align: center;
|
|
202
|
+
color: gray;
|
|
203
|
+
}
|
|
204
|
+
.default-page-tip-item {
|
|
205
|
+
padding-top: 10px;
|
|
206
|
+
}
|
|
207
|
+
</style>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import store from '../../../store'
|
|
2
|
-
|
|
3
|
-
const { body } = document
|
|
4
|
-
const WIDTH = 1024
|
|
5
|
-
const RATIO = 3
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
watch: {
|
|
9
|
-
$route(route) {
|
|
10
|
-
if (this.device === 'mobile' && this.sidebar.opened) {
|
|
11
|
-
store.dispatch('closeSidebar', { withoutAnimation: false })
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
beforeMount() {
|
|
16
|
-
window.addEventListener('resize', this.resizeHandler)
|
|
17
|
-
},
|
|
18
|
-
mounted() {
|
|
19
|
-
const isMobile = this.isMobile()
|
|
20
|
-
if (isMobile) {
|
|
21
|
-
store.dispatch('toggelDevice', 'mobile')
|
|
22
|
-
store.dispatch('closeSidebar', { withoutAnimation: true })
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
isMobile() {
|
|
27
|
-
const rect = body.getBoundingClientRect()
|
|
28
|
-
return rect.width - RATIO < WIDTH
|
|
29
|
-
},
|
|
30
|
-
resizeHandler() {
|
|
31
|
-
if (!document.hidden) {
|
|
32
|
-
const isMobile = this.isMobile()
|
|
33
|
-
store.dispatch('toggelDevice', isMobile ? 'mobile' : 'desktop')
|
|
34
|
-
|
|
35
|
-
if (isMobile) {
|
|
36
|
-
store.dispatch('closeSidebar', { withoutAnimation: true })
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
import store from '../../../store'
|
|
2
|
+
|
|
3
|
+
const { body } = document
|
|
4
|
+
const WIDTH = 1024
|
|
5
|
+
const RATIO = 3
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
watch: {
|
|
9
|
+
$route(route) {
|
|
10
|
+
if (this.device === 'mobile' && this.sidebar.opened) {
|
|
11
|
+
store.dispatch('closeSidebar', { withoutAnimation: false })
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
beforeMount() {
|
|
16
|
+
window.addEventListener('resize', this.resizeHandler)
|
|
17
|
+
},
|
|
18
|
+
mounted() {
|
|
19
|
+
const isMobile = this.isMobile()
|
|
20
|
+
if (isMobile) {
|
|
21
|
+
store.dispatch('toggelDevice', 'mobile')
|
|
22
|
+
store.dispatch('closeSidebar', { withoutAnimation: true })
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
isMobile() {
|
|
27
|
+
const rect = body.getBoundingClientRect()
|
|
28
|
+
return rect.width - RATIO < WIDTH
|
|
29
|
+
},
|
|
30
|
+
resizeHandler() {
|
|
31
|
+
if (!document.hidden) {
|
|
32
|
+
const isMobile = this.isMobile()
|
|
33
|
+
store.dispatch('toggelDevice', isMobile ? 'mobile' : 'desktop')
|
|
34
|
+
|
|
35
|
+
if (isMobile) {
|
|
36
|
+
store.dispatch('closeSidebar', { withoutAnimation: true })
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<iframe
|
|
4
|
+
v-if="src && src !== null"
|
|
5
|
+
ref="menuContent"
|
|
6
|
+
:src="src"
|
|
7
|
+
name="menu-content"
|
|
8
|
+
title="Main content"
|
|
9
|
+
frameborder="0"
|
|
10
|
+
/>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
src: null,
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
watch: {
|
|
22
|
+
$route(to, from) {
|
|
23
|
+
// 必须这样写,否则会在切换页面时无法获得pageCode参数
|
|
24
|
+
this.src = this.$route.query.src
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
mounted() {
|
|
28
|
+
this.src = this.$route.query.src
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
iframe {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: calc(100vh - 50px);
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classObj" class="app-wrapper">
|
|
3
|
+
<div
|
|
4
|
+
v-if="device === 'mobile' && sidebar.opened"
|
|
5
|
+
class="drawer-bg"
|
|
6
|
+
@click="handleClickOutside"
|
|
7
|
+
/>
|
|
8
|
+
<menubar
|
|
9
|
+
:system-code="systemCode"
|
|
10
|
+
:collapse="true"
|
|
11
|
+
class="sidebar-container"
|
|
12
|
+
/>
|
|
13
|
+
<div class="main-container">
|
|
14
|
+
<breadcrumb v-if="showMenuRoute" />
|
|
15
|
+
<tab-content />
|
|
16
|
+
<!-- <app-main /> -->
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import { Menubar, Breadcrumb } from './components'
|
|
23
|
+
import ResizeMixin from './mixin/ResizeHandler'
|
|
24
|
+
import { isShowMenuRoute } from 'imatrix-ui/src/utils/common-util'
|
|
25
|
+
import TabContent from './components/tabs/tab-content.vue'
|
|
26
|
+
import * as Vue from 'vue'
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: 'Layout',
|
|
30
|
+
components: {
|
|
31
|
+
Menubar,
|
|
32
|
+
Breadcrumb,
|
|
33
|
+
TabContent,
|
|
34
|
+
},
|
|
35
|
+
mixins: [ResizeMixin],
|
|
36
|
+
data() {
|
|
37
|
+
// 是否显示菜单路径,默认是不显示
|
|
38
|
+
const showMenuRoute = isShowMenuRoute()
|
|
39
|
+
return {
|
|
40
|
+
showMenuRoute,
|
|
41
|
+
systemCode: null,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
sidebar() {
|
|
46
|
+
return this.$store.state.app.sidebar
|
|
47
|
+
},
|
|
48
|
+
device() {
|
|
49
|
+
return this.$store.state.app.device
|
|
50
|
+
},
|
|
51
|
+
classObj() {
|
|
52
|
+
return {
|
|
53
|
+
hideSidebar: !this.sidebar.opened,
|
|
54
|
+
openSidebar: this.sidebar.opened,
|
|
55
|
+
withoutAnimation: this.sidebar.withoutAnimation,
|
|
56
|
+
mobile: this.device === 'mobile',
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
created() {
|
|
61
|
+
this.systemCode = window.$vueApp.config.globalProperties.customSystem
|
|
62
|
+
console.log('新菜单组件-----systemCode====', this.systemCode)
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
handleClickOutside() {
|
|
66
|
+
this.$store.dispatch('closeSidebar', { withoutAnimation: false })
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
73
|
+
@import 'imatrix-ui/src/styles/mixin.scss';
|
|
74
|
+
.app-wrapper {
|
|
75
|
+
@include clearfix;
|
|
76
|
+
position: relative;
|
|
77
|
+
height: 100%;
|
|
78
|
+
width: 100%;
|
|
79
|
+
&.mobile.openSidebar {
|
|
80
|
+
position: fixed;
|
|
81
|
+
top: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
.drawer-bg {
|
|
85
|
+
background: #000;
|
|
86
|
+
opacity: 0.3;
|
|
87
|
+
width: 100%;
|
|
88
|
+
top: 0;
|
|
89
|
+
height: 100%;
|
|
90
|
+
position: absolute;
|
|
91
|
+
z-index: 999;
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
name: 'AuthRedirect',
|
|
4
|
-
created() {
|
|
5
|
-
const hash = window.location.search.slice(1)
|
|
6
|
-
window.opener.location.href = window.location.origin + '/login#' + hash
|
|
7
|
-
window.close()
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
</script>
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
name: 'AuthRedirect',
|
|
4
|
+
created() {
|
|
5
|
+
const hash = window.location.search.slice(1)
|
|
6
|
+
window.opener.location.href = window.location.origin + '/login#' + hash
|
|
7
|
+
window.close()
|
|
8
|
+
},
|
|
9
|
+
}
|
|
10
|
+
</script>
|