9e8e52ec by zhen

修改目录层级

1 parent 08afbf02
...@@ -48,6 +48,7 @@ export const constantRoutes = [ ...@@ -48,6 +48,7 @@ export const constantRoutes = [
48 path: '/', 48 path: '/',
49 component: Layout, 49 component: Layout,
50 redirect: '/monitor', 50 redirect: '/monitor',
51 alwaysShow: true,
51 meta: { 52 meta: {
52 title: '资源监控', 53 title: '资源监控',
53 icon: 'home' 54 icon: 'home'
...@@ -71,14 +72,20 @@ export const constantRoutes = [ ...@@ -71,14 +72,20 @@ export const constantRoutes = [
71 title: '远程订单详情' 72 title: '远程订单详情'
72 }, 73 },
73 props: route => ({ custInfo: route.query }) 74 props: route => ({ custInfo: route.query })
74 }, 75 }
76 ]
77 },
78 {
79 path: '/product',
80 component: Layout,
81 children: [
75 { 82 {
76 path: 'product-infor-management', 83 path: 'product-infor-management',
77 name: 'product-infor-management', 84 name: 'product-infor-management',
78 component: () => import('@/views/productInforManagement'), 85 component: () => import('@/views/productInforManagement'),
79 meta: { 86 meta: {
80 title: '产品资料管理', 87 title: '产品资料管理',
81 icon: 'report' 88 icon: 'work'
82 } 89 }
83 }, 90 },
84 { 91 {
...@@ -103,6 +110,11 @@ export const constantRoutes = [ ...@@ -103,6 +110,11 @@ export const constantRoutes = [
103 } 110 }
104 } 111 }
105 ] 112 ]
113 },
114 {
115 path: '/iframe',
116 component: () => import('@/views/iframe'),
117 hidden: true
106 } 118 }
107 ] 119 ]
108 /** 120 /**
......
1 <template>
2 <div>
3 <h2>客户端</h2>
4 <p>
5 <el-button type="primary" @click="open">呼叫</el-button>
6 <el-button type="primary" @click="cancelCall">取消呼叫</el-button>
7 </p>
8 <iframe
9 v-if="isStart"
10 ref="srtcIframe"
11 title="srtcIframe"
12 :src="target"
13 frameborder="2"
14 allow="microphone;camera;midi;encrypted-media;fullscreen;"
15 ></iframe>
16 <p>callback:{{ message }}</p>
17 <p>这还少恩位置</p>
18 <p>这还少恩位置</p>
19 <p>这还少恩位置</p>
20 </div>
21 </template>
22
23 <script>
24 export default {
25 data() {
26 return {
27 baseUrl: 'https://localhost:8080',
28 isStart: false,
29 target: '',
30 strWindowFeatures: `
31 left=2400,
32 top=200
33 height=500,
34 width=700,
35 menubar=1,
36 toolbar=1,
37 fullscreen=1
38 `,
39 message: '',
40 windowRef: ''
41 }
42 },
43 beforeMount() {
44 window.addEventListener('message', this.receiveMessage, false)
45 },
46 methods: {
47 open() {
48 this.isStart = true
49 this.target = `${this.baseUrl}/#/srtc-iframe`
50 this.$nextTick().then(() => {
51 this.$refs.srtcIframe.onload = () => {
52 this.sendMessage()
53 }
54 })
55 },
56 sendMessage() {
57 this.$refs.srtcIframe.contentWindow.postMessage(
58 {
59 type: 'startCall',
60 data: {
61 appUserName: '123',
62 appUserPhone: '16621043587',
63 orderId: '123213',
64 webUserName: 'lz'
65 }
66 },
67 this.baseUrl
68 )
69 },
70 cancelCall() {
71 this.$refs.srtcIframe.contentWindow.postMessage(
72 {
73 type: 'cancelCall'
74 },
75 this.baseUrl
76 )
77 },
78 receiveMessage(e) {
79 if (e.origin !== this.baseUrl) {
80 return
81 }
82 const { type, data } = e
83 // switch (type) {
84 // case 'userJoin':
85 // this.popMessage(data)
86 // break
87 // case 'appHangUp':
88 // this.popMessage(data)
89 // break
90 // case 'webHangUp':
91 // this.popMessage(data)
92 // break
93 // }
94 this.popMessage(`${type}---${data}`)
95 },
96 popMessage(data) {
97 this.$message({
98 type: 'error',
99 message: data
100 })
101 }
102 }
103 }
104 </script>
105
106 <style lang="scss" scoped>
107 iframe {
108 width: 500px;
109 height: 600px;
110 position: fixed;
111 top: 0;
112 right: 0;
113 }
114 </style>
...@@ -26,23 +26,23 @@ module.exports = { ...@@ -26,23 +26,23 @@ module.exports = {
26 assetsDir: 'static', 26 assetsDir: 'static',
27 // 打包时不生成map文件,减少打包体积,加快打包速度 27 // 打包时不生成map文件,减少打包体积,加快打包速度
28 productionSourceMap: false, 28 productionSourceMap: false,
29 // devServer: { 29 devServer: {
30 // https: true, 30 https: true
31 // inline: true, 31 // inline: true,
32 // proxy: { 32 // proxy: {
33 // '/chery': { 33 // '/chery': {
34 // target: process.env.VUE_APP_BASE_API 34 // target: process.env.VUE_APP_BASE_API
35 // } 35 // }
36 // // '/': { 36 // // '/': {
37 // // bypass: devServerProxyBypass, 37 // // bypass: devServerProxyBypass,
38 // // secure: false, 38 // // secure: false,
39 // // target: serverTarget, 39 // // target: serverTarget,
40 // // headers: { 40 // // headers: {
41 // // Host: new URL(serverTarget).host 41 // // Host: new URL(serverTarget).host
42 // // } 42 // // }
43 // // } 43 // // }
44 // } 44 // }
45 // }, 45 },
46 configureWebpack: {}, 46 configureWebpack: {},
47 chainWebpack: config => { 47 chainWebpack: config => {
48 config.resolve.alias 48 config.resolve.alias
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!