diff --git a/helper.json b/helper.json new file mode 100644 index 0000000..44d4a24 --- /dev/null +++ b/helper.json @@ -0,0 +1,8 @@ +{ + "path": { + "root": "@=src", + "api": "src/api", + "request": "../utils/request" + }, + "api": [] +} \ No newline at end of file diff --git a/src/layout/index.vue b/src/layout/index.vue index 4018f35..ee29318 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -19,49 +19,49 @@ const user_channel = connection.subscribe(`store_merchant_${userStore.userInfo.s // 当user-2频道有message事件的消息时 user_channel.on('message', function (data) { - console.log("收到消息--",data); + console.log("收到消息--", data); try { - if(data?.content?.type=='cash_register'&&data?.content?.msg=="您有一笔订单已支付"){ + if (data?.content?.type == 'cash_register' && data?.content?.msg == "您有一笔订单已支付") { mitt.emit('pay_success', data?.content?.data); } - if(data?.content?.type=='store_merchant'&&data?.content?.msg=="您有一笔新的订单"){ + if (data?.content?.type == 'store_merchant' && data?.content?.msg == "您有一笔新的订单") { mitt.emit('new_order', data?.content); } - if(data?.content?.type=='platform_print'){ + if (data?.content?.type == 'platform_print') { mitt.emit('letPrintReceipt', data?.content?.data); } } catch (error) { - + } }); // 断线事件 user_channel.on('close', function () { - + }); // setTimeout(()=>{ // mitt.emit('new_order'); // }, 2000) -const KeyboardEvent = (e)=>{ +const KeyboardEvent = (e) => { console.log('按下', e.keyCode); - if(e.keyCode == 16) mitt.emit('shift'); - if(e.keyCode == 120) mitt.emit('F9'); - if(e.keyCode == 13) mitt.emit('enter'); - if(e.keyCode == 37) mitt.emit('left'); - if(e.keyCode == 39) mitt.emit('right'); - if(e.keyCode == 38) mitt.emit('up'); - if(e.keyCode == 40) mitt.emit('down'); - if(e.keyCode == 46) mitt.emit('delete'); - if(e.keyCode == 45) mitt.emit('insert'); + if (e.keyCode == 16) mitt.emit('shift'); + if (e.keyCode == 120) mitt.emit('F9'); + if (e.keyCode == 13) mitt.emit('enter'); + if (e.keyCode == 37) mitt.emit('left'); + if (e.keyCode == 39) mitt.emit('right'); + if (e.keyCode == 38) mitt.emit('up'); + if (e.keyCode == 40) mitt.emit('down'); + if (e.keyCode == 46) mitt.emit('delete'); + if (e.keyCode == 45) mitt.emit('insert'); } -onMounted(()=>{ +onMounted(() => { window.addEventListener('keydown', KeyboardEvent); console.log('开启键盘监听'); }) -onUnmounted(()=>{ +onUnmounted(() => { window.removeEventListener('keydown', KeyboardEvent); console.log('关闭键盘监听'); }) @@ -97,13 +97,16 @@ onUnmounted(()=>{ width: 100vw; height: 100vh; background-color: #001529; + .el-header { color: #fff; height: 4rem; } + .el-aside { color: #fff; } + .el-main { background-color: #f5f5f5; width: calc(100vw - 6.25rem); @@ -111,7 +114,7 @@ onUnmounted(()=>{ border-radius: 2rem 0 0 0; overflow-y: scroll; padding: 1rem; - + .my-main { height: 100%; width: 100%; diff --git a/src/layout/myAside.vue b/src/layout/myAside.vue index f49fdb9..57f844f 100644 --- a/src/layout/myAside.vue +++ b/src/layout/myAside.vue @@ -70,6 +70,12 @@ const list = ref([ ico: "FullScreen", count: 0, }, + { + name: "statistics", + title: "盈收统计 ", + ico: "TrendCharts", + count: 0, + }, // { name: "purchaseOrder", title: "采购订单", ico: "Van", count: 0 }, // { name: "orderCount", title: "订单统计", ico: "DocumentRemove", count: 0 }, // { name: "wallet", title: "余额提现", ico: "Wallet", count: 0 }, diff --git a/src/router/index.js b/src/router/index.js index 02872a2..5703e48 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -53,6 +53,12 @@ const routes = [ meta: { title: '订单核销' }, component: () => import('@/views/convert/index.vue'), }, + { + path: '/statistics', + name: 'statistics', + meta: { title: '盈收统计' }, + component: () => import('@/views/statistics/index.vue'), + }, { path: '/test', name: 'test', diff --git a/src/views/statistics/index.vue b/src/views/statistics/index.vue new file mode 100644 index 0000000..cc066f1 --- /dev/null +++ b/src/views/statistics/index.vue @@ -0,0 +1,8 @@ + + + \ No newline at end of file