vue2-client 1.2.41 → 1.2.44
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/CHANGELOG.md +12 -1
- package/package.json +1 -1
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +555 -0
- package/src/base-client/components/common/XAddForm/XAddForm.vue +2 -1
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +316 -315
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +1 -1
- package/src/components/menu/SideMenu.vue +1 -1
- package/src/config/default/setting.config.js +3 -1
- package/src/layouts/SinglePageView.vue +10 -1
- package/src/layouts/header/AdminHeader.vue +1 -1
- package/src/layouts/tabs/TabsView.vue +56 -40
- package/src/pages/exception/403.vue +21 -25
- package/src/pages/exception/404.vue +21 -25
- package/src/pages/exception/500.vue +21 -25
- package/src/pages/login/Login.vue +194 -201
- package/src/pages/system/ticket/index.vue +1 -1
- package/src/store/modules/account.js +2 -2
- package/src/theme/default/style.less +14 -0
- package/vue.config.js +143 -143
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<iframe
|
|
5
5
|
ref="singlepage"
|
|
6
6
|
:src="iframeSrc"
|
|
7
|
+
:name="this.fullPath"
|
|
7
8
|
class="single-page-iframe"
|
|
8
9
|
@load="load">
|
|
9
10
|
</iframe>
|
|
@@ -23,6 +24,10 @@ export default {
|
|
|
23
24
|
singlePageUrl: {
|
|
24
25
|
type: String,
|
|
25
26
|
default: ''
|
|
27
|
+
},
|
|
28
|
+
fullPath: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ''
|
|
26
31
|
}
|
|
27
32
|
},
|
|
28
33
|
data () {
|
|
@@ -40,6 +45,7 @@ export default {
|
|
|
40
45
|
this.setLogin(JSON.parse(sessionStorage.getItem(process.env.VUE_APP_LOGIN_KEY)))
|
|
41
46
|
}
|
|
42
47
|
this.iframe = this.$refs.singlepage.contentWindow
|
|
48
|
+
this.path = this.$route.path
|
|
43
49
|
},
|
|
44
50
|
methods: {
|
|
45
51
|
...mapMutations('account', ['setLogin']),
|
|
@@ -55,7 +61,10 @@ export default {
|
|
|
55
61
|
page: this.singlePageUrl
|
|
56
62
|
}
|
|
57
63
|
console.log('发送参数', data)
|
|
58
|
-
this.iframe
|
|
64
|
+
if (this.iframe) {
|
|
65
|
+
this.iframe.postMessage(data, '*')
|
|
66
|
+
}
|
|
67
|
+
this.$emit('load', this.fullPath)
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<a-layout-header :class="[headerTheme, 'admin-header']">
|
|
3
3
|
<div :class="['admin-header-wide', layout, pageWidth]">
|
|
4
4
|
<router-link v-if="isMobile || layout === 'head'" to="/" :class="['logo', isMobile ? null : 'pc', headerTheme]">
|
|
5
|
-
<img width="32" src="
|
|
5
|
+
<img width="32" src="@vue2-client/assets/img/logo.png" />
|
|
6
6
|
<h1 v-if="!isMobile">{{ systemName }}</h1>
|
|
7
7
|
</router-link>
|
|
8
8
|
<a-divider v-if="isMobile" type="vertical" />
|
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
<div id="TabsView">
|
|
3
|
+
<admin-layout>
|
|
4
|
+
<contextmenu :itemList="menuItemList" :visible.sync="menuVisible" @select="onMenuSelect" />
|
|
5
|
+
<tabs-head
|
|
6
|
+
v-if="multiPage"
|
|
7
|
+
:active="activePage"
|
|
8
|
+
:page-list="pageList"
|
|
9
|
+
@change="changePage"
|
|
10
|
+
@close="remove"
|
|
11
|
+
@refresh="refresh"
|
|
12
|
+
@contextmenu="onContextmenu"
|
|
13
|
+
/>
|
|
14
|
+
<div :class="['tabs-view-content', layout, pageWidth]" :style="`margin-top: ${multiPage ? -24 : 0}px`">
|
|
15
|
+
<page-toggle-transition v-show="!$route.meta.singlePage" :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
|
|
16
|
+
<a-keep-alive :exclude-keys="excludeKeys" v-if="multiPage && cachePage" v-model="clearCaches">
|
|
17
|
+
<router-view v-if="!refreshing" ref="tabContent" :key="$route.path" />
|
|
18
|
+
</a-keep-alive>
|
|
19
|
+
<router-view ref="tabContent" v-else-if="!refreshing" />
|
|
20
|
+
</page-toggle-transition>
|
|
21
|
+
<template v-for="page in single">
|
|
22
|
+
<single-page-view
|
|
23
|
+
v-show="page.meta.singlePage === $route.meta.singlePage"
|
|
24
|
+
:single-page-url="page.meta.singlePage"
|
|
25
|
+
:full-path="page.fullPath"
|
|
26
|
+
:key="page.meta.singlePage"
|
|
27
|
+
@load="onSinglePageLoad" />
|
|
28
|
+
</template>
|
|
29
|
+
</div>
|
|
30
|
+
</admin-layout>
|
|
31
|
+
</div>
|
|
25
32
|
</template>
|
|
26
33
|
|
|
27
34
|
<script>
|
|
@@ -144,6 +151,12 @@ export default {
|
|
|
144
151
|
refresh (key, page) {
|
|
145
152
|
page = page || this.pageList.find(item => item.path === key)
|
|
146
153
|
page.loading = true
|
|
154
|
+
// 单页面刷新
|
|
155
|
+
const singlePage = this.allSinglePages.find(item => item.fullPath === key)
|
|
156
|
+
if (singlePage) {
|
|
157
|
+
window.frames[singlePage.fullPath].location.reload()
|
|
158
|
+
return
|
|
159
|
+
}
|
|
147
160
|
this.clearCache(page)
|
|
148
161
|
if (key === this.activePage) {
|
|
149
162
|
// eslint-disable-next-line no-return-assign
|
|
@@ -154,6 +167,10 @@ export default {
|
|
|
154
167
|
setTimeout(() => page.loading = false, 500)
|
|
155
168
|
}
|
|
156
169
|
},
|
|
170
|
+
onSinglePageLoad (fullPath) {
|
|
171
|
+
const page = this.pageList.find(item => item.fullPath === fullPath)
|
|
172
|
+
page.loading = false
|
|
173
|
+
},
|
|
157
174
|
onContextmenu (pageKey, e) {
|
|
158
175
|
if (pageKey) {
|
|
159
176
|
e.preventDefault()
|
|
@@ -336,24 +353,23 @@ export default {
|
|
|
336
353
|
}
|
|
337
354
|
</script>
|
|
338
355
|
|
|
339
|
-
<style
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
356
|
+
<style lang="less">
|
|
357
|
+
#TabsView {
|
|
358
|
+
.tabs-view {
|
|
359
|
+
margin: -16px auto 8px;
|
|
360
|
+
&.head.fixed {
|
|
361
|
+
max-width: 1400px;
|
|
362
|
+
}
|
|
344
363
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
364
|
+
.tabs-view-content {
|
|
365
|
+
position: relative;
|
|
366
|
+
&.head.fixed {
|
|
367
|
+
width: 1400px;
|
|
368
|
+
margin: 0 auto;
|
|
369
|
+
}
|
|
370
|
+
.ant-card:only-of-type {
|
|
371
|
+
min-height: calc(100vh - 64px - 56px - 16px);
|
|
372
|
+
}
|
|
351
373
|
}
|
|
352
374
|
}
|
|
353
375
|
</style>
|
|
354
|
-
|
|
355
|
-
<style scoped>
|
|
356
|
-
.tabs-view-content >>> .ant-card:only-of-type {
|
|
357
|
-
min-height: calc(100vh - 64px - 56px - 16px);
|
|
358
|
-
}
|
|
359
|
-
</style>
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<exception-page :home-route="homePage" :style="`min-height: ${minHeight}`" type="403" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import ExceptionPage from '@vue2-client/components/exception/ExceptionPage'
|
|
7
|
-
import { mapState } from 'vuex'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="less">
|
|
25
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<exception-page :home-route="homePage" :style="`min-height: ${minHeight}`" type="403" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ExceptionPage from '@vue2-client/components/exception/ExceptionPage'
|
|
7
|
+
import { mapState } from 'vuex'
|
|
8
|
+
export default {
|
|
9
|
+
name: 'Exp403',
|
|
10
|
+
components: { ExceptionPage },
|
|
11
|
+
computed: {
|
|
12
|
+
...mapState('setting', ['pageMinHeight', 'homePage']),
|
|
13
|
+
minHeight () {
|
|
14
|
+
return this.pageMinHeight ? this.pageMinHeight + 'px' : '100vh'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style scoped lang="less">
|
|
21
|
+
</style>
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<exception-page :home-route="homePage" :style="`min-height: ${minHeight}`" type="404" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import ExceptionPage from '@vue2-client/components/exception/ExceptionPage'
|
|
7
|
-
import { mapState } from 'vuex'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="less">
|
|
25
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<exception-page :home-route="homePage" :style="`min-height: ${minHeight}`" type="404" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ExceptionPage from '@vue2-client/components/exception/ExceptionPage'
|
|
7
|
+
import { mapState } from 'vuex'
|
|
8
|
+
export default {
|
|
9
|
+
name: 'Exp404',
|
|
10
|
+
components: { ExceptionPage },
|
|
11
|
+
computed: {
|
|
12
|
+
...mapState('setting', ['pageMinHeight', 'homePage']),
|
|
13
|
+
minHeight () {
|
|
14
|
+
return this.pageMinHeight ? this.pageMinHeight + 'px' : '100vh'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style scoped lang="less">
|
|
21
|
+
</style>
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<exception-page :home-route="homePage" :style="`min-height: ${minHeight}`" type="500" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import ExceptionPage from '@vue2-client/components/exception/ExceptionPage'
|
|
7
|
-
import { mapState } from 'vuex'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped lang="less">
|
|
25
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<exception-page :home-route="homePage" :style="`min-height: ${minHeight}`" type="500" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ExceptionPage from '@vue2-client/components/exception/ExceptionPage'
|
|
7
|
+
import { mapState } from 'vuex'
|
|
8
|
+
export default {
|
|
9
|
+
name: 'Exp500',
|
|
10
|
+
components: { ExceptionPage },
|
|
11
|
+
computed: {
|
|
12
|
+
...mapState('setting', ['pageMinHeight', 'homePage']),
|
|
13
|
+
minHeight () {
|
|
14
|
+
return this.pageMinHeight ? this.pageMinHeight + 'px' : '100vh'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<style scoped lang="less">
|
|
21
|
+
</style>
|