vue2-client 1.4.13 → 1.4.15

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.
@@ -1,78 +1,86 @@
1
- <template>
2
- <page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
3
- <template v-if="login">
4
- <iframe
5
- ref="singlepage"
6
- :src="iframeSrc"
7
- :name="this.fullPath"
8
- class="single-page-iframe"
9
- @load="load">
10
- </iframe>
11
- </template>
12
- </page-toggle-transition>
13
- </template>
14
-
15
- <script>
16
- import PageToggleTransition from '@vue2-client/components/transition/PageToggleTransition'
17
- import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
18
- import { mapState, mapMutations } from 'vuex'
19
-
20
- export default {
21
- name: 'SinglePageView',
22
- components: { PageToggleTransition },
23
- props: {
24
- singlePageUrl: {
25
- type: String,
26
- default: ''
27
- },
28
- fullPath: {
29
- type: String,
30
- default: ''
31
- }
32
- },
33
- data () {
34
- return {
35
- iframe: null
36
- }
37
- },
38
- computed: {
39
- ...mapState('setting', ['animate', 'iframeSrc']),
40
- ...mapState('account', ['login'])
41
- },
42
- mounted () {
43
- if (!this.login) {
44
- this.setLogin(JSON.parse(sessionStorage.getItem(process.env.VUE_APP_LOGIN_KEY)))
45
- }
46
- this.iframe = this.$refs.singlepage.contentWindow
47
- this.path = this.$route.path
48
- },
49
- methods: {
50
- ...mapMutations('account', ['setLogin']),
51
- load () {
52
- const appdata = {
53
- singleValues: this.$appdata.getSingleValues(),
54
- params: this.$appdata.getParams()
55
- }
56
- const data = {
57
- token: localStorage.getItem(ACCESS_TOKEN),
58
- login: this.login,
59
- appdata: appdata,
60
- page: this.singlePageUrl
61
- }
62
- console.log('发送参数', data)
63
- if (this.iframe) {
64
- this.iframe.postMessage(data, '*')
65
- }
66
- this.$emit('load', this.fullPath)
67
- }
68
- }
69
- }
70
- </script>
71
-
72
- <style lang="less">
73
- .single-page-iframe {
74
- width: 100%;
75
- height: calc(100vh - 117px);
76
- border: none;
77
- }
78
- </style>
1
+ <template>
2
+ <page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
3
+ <template v-if="login">
4
+ <iframe
5
+ ref="singlepage"
6
+ :src="url"
7
+ :name="this.fullPath"
8
+ class="single-page-iframe"
9
+ @load="load">
10
+ </iframe>
11
+ </template>
12
+ </page-toggle-transition>
13
+ </template>
14
+
15
+ <script>
16
+ import PageToggleTransition from '@vue2-client/components/transition/PageToggleTransition'
17
+ import { ACCESS_TOKEN } from '@vue2-client/store/mutation-types'
18
+ import { mapState, mapMutations } from 'vuex'
19
+
20
+ export default {
21
+ name: 'SinglePageView',
22
+ components: { PageToggleTransition },
23
+ props: {
24
+ singlePageUrl: {
25
+ type: String,
26
+ default: ''
27
+ },
28
+ fullPath: {
29
+ type: String,
30
+ default: ''
31
+ }
32
+ },
33
+ data () {
34
+ return {
35
+ iframe: null,
36
+ url: ''
37
+ }
38
+ },
39
+ computed: {
40
+ ...mapState('setting', ['animate', 'iframeSrc']),
41
+ ...mapState('account', ['login'])
42
+ },
43
+ created () {
44
+ if (this.singlePageUrl.indexOf('http') !== -1) {
45
+ this.url = this.singlePageUrl
46
+ } else {
47
+ this.url = this.iframeSrc
48
+ }
49
+ },
50
+ mounted () {
51
+ if (!this.login) {
52
+ this.setLogin(JSON.parse(sessionStorage.getItem(process.env.VUE_APP_LOGIN_KEY)))
53
+ }
54
+ this.iframe = this.$refs.singlepage.contentWindow
55
+ this.path = this.$route.path
56
+ },
57
+ methods: {
58
+ ...mapMutations('account', ['setLogin']),
59
+ load () {
60
+ const appdata = {
61
+ singleValues: this.$appdata.getSingleValues(),
62
+ params: this.$appdata.getParams()
63
+ }
64
+ const data = {
65
+ token: localStorage.getItem(ACCESS_TOKEN),
66
+ login: this.login,
67
+ appdata: appdata,
68
+ page: this.singlePageUrl
69
+ }
70
+ console.log('发送参数', data)
71
+ if (this.iframe) {
72
+ this.iframe.postMessage(data, '*')
73
+ }
74
+ this.$emit('load', this.fullPath)
75
+ }
76
+ }
77
+ }
78
+ </script>
79
+
80
+ <style lang="less">
81
+ .single-page-iframe {
82
+ width: 100%;
83
+ height: calc(100vh - 117px);
84
+ border: none;
85
+ }
86
+ </style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <x-form-table
4
+ title="登录日志"
5
+ :queryParamsName="queryParamsName"
6
+ @action="toDetail">
7
+ </x-form-table>
8
+ </a-card>
9
+ </template>
10
+
11
+ <script>
12
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
13
+
14
+ export default {
15
+ name: 'loginInfor',
16
+ components: {
17
+ XFormTable
18
+ },
19
+ data () {
20
+ return {
21
+ // 选中的编号
22
+ selectNo: undefined,
23
+ // 查询配置文件名
24
+ queryParamsName: 'loginInforQueryParams',
25
+ // 是否显示详情抽屉
26
+ detailVisible: false
27
+ }
28
+ },
29
+ methods: {
30
+ toDetail (record, id) {
31
+ this.selectNo = id + ''
32
+ this.detailVisible = true
33
+ }
34
+ }
35
+ }
36
+ </script>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <x-form-table
4
+ title="操作日志"
5
+ :queryParamsName="queryParamsName"
6
+ @action="toDetail">
7
+ </x-form-table>
8
+ </a-card>
9
+ </template>
10
+
11
+ <script>
12
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
13
+
14
+ export default {
15
+ name: 'operLog',
16
+ components: {
17
+ XFormTable
18
+ },
19
+ data () {
20
+ return {
21
+ // 选中的编号
22
+ selectNo: undefined,
23
+ // 查询配置文件名
24
+ queryParamsName: 'operLogQueryParams',
25
+ // 是否显示详情抽屉
26
+ detailVisible: false
27
+ }
28
+ },
29
+ methods: {
30
+ toDetail (record, id) {
31
+ this.selectNo = id + ''
32
+ this.detailVisible = true
33
+ }
34
+ }
35
+ }
36
+ </script>
@@ -1,61 +1,65 @@
1
- // 视图组件
2
- const view = {
3
- tabs: () => import('@vue2-client/layouts/tabs'),
4
- blank: () => import('@vue2-client/layouts/BlankView'),
5
- page: () => import('@vue2-client/layouts/PageView')
6
- }
7
- // 动态路由对象定义
8
- const routerResource = {}
9
- // --------------------------------------基本视图组件--------------------------------------
10
- // 空白视图
11
- routerResource.blank = view.blank
12
- // 单页面视图
13
- routerResource.singlePage = view.blank
14
-
15
- // --------------------------------------仪表盘--------------------------------------
16
- routerResource.dashboard = view.blank
17
- // 工作台
18
- routerResource.workplace = () => import('@vue2-client/pages/dashboard/workplace')
19
- // --------------------------------------系统配置--------------------------------------
20
- routerResource.system = view.blank
21
- // 字典管理
22
- routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
23
- // 查询配置管理
24
- routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
25
- // 文件管理
26
- routerResource.fileManager = () => import('@vue2-client/pages/system/file')
27
- // 系统问题反馈工单
28
- routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
29
-
30
- // 基础路由组件注册
31
- const routerMap = {
32
- login: {
33
- authority: '*',
34
- path: '/login',
35
- component: () => import('@vue2-client/pages/login')
36
- },
37
- root: {
38
- path: '/',
39
- name: '首页',
40
- redirect: '/login',
41
- component: view.tabs
42
- },
43
- exp403: {
44
- authority: '*',
45
- name: 'exp403',
46
- path: '403',
47
- component: () => import('@vue2-client/pages/exception/403')
48
- },
49
- exp404: {
50
- name: 'exp404',
51
- path: '404',
52
- component: () => import('@vue2-client/pages/exception/404')
53
- },
54
- exp500: {
55
- name: 'exp500',
56
- path: '500',
57
- component: () => import('@vue2-client/pages/exception/500')
58
- }
59
- }
60
- Object.assign(routerMap, routerResource)
61
- export default routerMap
1
+ // 视图组件
2
+ const view = {
3
+ tabs: () => import('@vue2-client/layouts/tabs'),
4
+ blank: () => import('@vue2-client/layouts/BlankView'),
5
+ page: () => import('@vue2-client/layouts/PageView')
6
+ }
7
+ // 动态路由对象定义
8
+ const routerResource = {}
9
+ // --------------------------------------基本视图组件--------------------------------------
10
+ // 空白视图
11
+ routerResource.blank = view.blank
12
+ // 单页面视图
13
+ routerResource.singlePage = view.blank
14
+
15
+ // --------------------------------------仪表盘--------------------------------------
16
+ routerResource.dashboard = view.blank
17
+ // 工作台
18
+ routerResource.workplace = () => import('@vue2-client/pages/dashboard/workplace')
19
+ // --------------------------------------系统配置--------------------------------------
20
+ routerResource.system = view.blank
21
+ // 字典管理
22
+ routerResource.dictionaryManage = () => import(/* webpackChunkName: "dictionary" */ '@vue2-client/pages/system/dictionary')
23
+ // 查询配置管理
24
+ routerResource.queryParamsManage = () => import(/* webpackChunkName: "queryParams" */ '@vue2-client/pages/system/queryParams')
25
+ // 文件管理
26
+ routerResource.fileManager = () => import('@vue2-client/pages/system/file')
27
+ // 登录日志
28
+ routerResource.loginInfor = () => import('@vue2-client/pages/system/monitor/loginInfor')
29
+ // 操作日志
30
+ routerResource.operLog = () => import('@vue2-client/pages/system/monitor/operLog')
31
+ // 系统问题反馈工单
32
+ routerResource.submitTicket = () => import(/* webpackChunkName: "submitTicket" */ '@vue2-client/pages/system/ticket')
33
+
34
+ // 基础路由组件注册
35
+ const routerMap = {
36
+ login: {
37
+ authority: '*',
38
+ path: '/login',
39
+ component: () => import('@vue2-client/pages/login')
40
+ },
41
+ root: {
42
+ path: '/',
43
+ name: '首页',
44
+ redirect: '/login',
45
+ component: view.tabs
46
+ },
47
+ exp403: {
48
+ authority: '*',
49
+ name: 'exp403',
50
+ path: '403',
51
+ component: () => import('@vue2-client/pages/exception/403')
52
+ },
53
+ exp404: {
54
+ name: 'exp404',
55
+ path: '404',
56
+ component: () => import('@vue2-client/pages/exception/404')
57
+ },
58
+ exp500: {
59
+ name: 'exp500',
60
+ path: '500',
61
+ component: () => import('@vue2-client/pages/exception/500')
62
+ }
63
+ }
64
+ Object.assign(routerMap, routerResource)
65
+ export default routerMap